diff --git a/assets/index-CxBnCt_J.js b/assets/index-BncYhJ_J.js similarity index 95% rename from assets/index-CxBnCt_J.js rename to assets/index-BncYhJ_J.js index e6a76b8..5c62be0 100644 --- a/assets/index-CxBnCt_J.js +++ b/assets/index-BncYhJ_J.js @@ -1,4 +1,4 @@ -var zp=Object.defineProperty;var Hp=(T,u,m)=>u in T?zp(T,u,{enumerable:!0,configurable:!0,writable:!0,value:m}):T[u]=m;var $0=(T,u,m)=>(Hp(T,typeof u!="symbol"?u+"":u,m),m);(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const S of document.querySelectorAll('link[rel="modulepreload"]'))A(S);new MutationObserver(S=>{for(const v of S)if(v.type==="childList")for(const w of v.addedNodes)w.tagName==="LINK"&&w.rel==="modulepreload"&&A(w)}).observe(document,{childList:!0,subtree:!0});function m(S){const v={};return S.integrity&&(v.integrity=S.integrity),S.referrerPolicy&&(v.referrerPolicy=S.referrerPolicy),S.crossOrigin==="use-credentials"?v.credentials="include":S.crossOrigin==="anonymous"?v.credentials="omit":v.credentials="same-origin",v}function A(S){if(S.ep)return;S.ep=!0;const v=m(S);fetch(S.href,v)}})();var EPSILON=1e-6,ARRAY_TYPE=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var T=0,u=arguments.length;u--;)T+=arguments[u]*arguments[u];return Math.sqrt(T)});function create$4(){var T=new ARRAY_TYPE(9);return ARRAY_TYPE!=Float32Array&&(T[1]=0,T[2]=0,T[3]=0,T[5]=0,T[6]=0,T[7]=0),T[0]=1,T[4]=1,T[8]=1,T}function fromValues$4(T,u,m,A,S,v,w,D,R){var L=new ARRAY_TYPE(9);return L[0]=T,L[1]=u,L[2]=m,L[3]=A,L[4]=S,L[5]=v,L[6]=w,L[7]=D,L[8]=R,L}function multiply$1(T,u,m){var A=u[0],S=u[1],v=u[2],w=u[3],D=u[4],R=u[5],L=u[6],P=u[7],d=u[8],E=m[0],e=m[1],N=m[2],q=m[3],z=m[4],e0=m[5],H=m[6],j=m[7],y=m[8];return T[0]=E*A+e*w+N*L,T[1]=E*S+e*D+N*P,T[2]=E*v+e*R+N*d,T[3]=q*A+z*w+e0*L,T[4]=q*S+z*D+e0*P,T[5]=q*v+z*R+e0*d,T[6]=H*A+j*w+y*L,T[7]=H*S+j*D+y*P,T[8]=H*v+j*R+y*d,T}function create$3(){var T=new ARRAY_TYPE(16);return ARRAY_TYPE!=Float32Array&&(T[1]=0,T[2]=0,T[3]=0,T[4]=0,T[6]=0,T[7]=0,T[8]=0,T[9]=0,T[11]=0,T[12]=0,T[13]=0,T[14]=0),T[0]=1,T[5]=1,T[10]=1,T[15]=1,T}function clone$2(T){var u=new ARRAY_TYPE(16);return u[0]=T[0],u[1]=T[1],u[2]=T[2],u[3]=T[3],u[4]=T[4],u[5]=T[5],u[6]=T[6],u[7]=T[7],u[8]=T[8],u[9]=T[9],u[10]=T[10],u[11]=T[11],u[12]=T[12],u[13]=T[13],u[14]=T[14],u[15]=T[15],u}function copy$1(T,u){return T[0]=u[0],T[1]=u[1],T[2]=u[2],T[3]=u[3],T[4]=u[4],T[5]=u[5],T[6]=u[6],T[7]=u[7],T[8]=u[8],T[9]=u[9],T[10]=u[10],T[11]=u[11],T[12]=u[12],T[13]=u[13],T[14]=u[14],T[15]=u[15],T}function fromValues$3(T,u,m,A,S,v,w,D,R,L,P,d,E,e,N,q){var z=new ARRAY_TYPE(16);return z[0]=T,z[1]=u,z[2]=m,z[3]=A,z[4]=S,z[5]=v,z[6]=w,z[7]=D,z[8]=R,z[9]=L,z[10]=P,z[11]=d,z[12]=E,z[13]=e,z[14]=N,z[15]=q,z}function identity(T){return T[0]=1,T[1]=0,T[2]=0,T[3]=0,T[4]=0,T[5]=1,T[6]=0,T[7]=0,T[8]=0,T[9]=0,T[10]=1,T[11]=0,T[12]=0,T[13]=0,T[14]=0,T[15]=1,T}function transpose(T,u){if(T===u){var m=u[1],A=u[2],S=u[3],v=u[6],w=u[7],D=u[11];T[1]=u[4],T[2]=u[8],T[3]=u[12],T[4]=m,T[6]=u[9],T[7]=u[13],T[8]=A,T[9]=v,T[11]=u[14],T[12]=S,T[13]=w,T[14]=D}else T[0]=u[0],T[1]=u[4],T[2]=u[8],T[3]=u[12],T[4]=u[1],T[5]=u[5],T[6]=u[9],T[7]=u[13],T[8]=u[2],T[9]=u[6],T[10]=u[10],T[11]=u[14],T[12]=u[3],T[13]=u[7],T[14]=u[11],T[15]=u[15];return T}function invert(T,u){var m=u[0],A=u[1],S=u[2],v=u[3],w=u[4],D=u[5],R=u[6],L=u[7],P=u[8],d=u[9],E=u[10],e=u[11],N=u[12],q=u[13],z=u[14],e0=u[15],H=m*D-A*w,j=m*R-S*w,y=m*L-v*w,Y=A*R-S*D,G=A*L-v*D,J=S*L-v*R,i0=P*q-d*N,Q=P*z-E*N,f=P*e0-e*N,l0=d*z-E*q,o0=d*e0-e*q,c0=E*e0-e*z,d0=H*c0-j*o0+y*l0+Y*f-G*Q+J*i0;return d0?(d0=1/d0,T[0]=(D*c0-R*o0+L*l0)*d0,T[1]=(S*o0-A*c0-v*l0)*d0,T[2]=(q*J-z*G+e0*Y)*d0,T[3]=(E*G-d*J-e*Y)*d0,T[4]=(R*f-w*c0-L*Q)*d0,T[5]=(m*c0-S*f+v*Q)*d0,T[6]=(z*y-N*J-e0*j)*d0,T[7]=(P*J-E*y+e*j)*d0,T[8]=(w*o0-D*f+L*i0)*d0,T[9]=(A*f-m*o0-v*i0)*d0,T[10]=(N*G-q*y+e0*H)*d0,T[11]=(d*y-P*G-e*H)*d0,T[12]=(D*Q-w*l0-R*i0)*d0,T[13]=(m*l0-A*Q+S*i0)*d0,T[14]=(q*j-N*Y-z*H)*d0,T[15]=(P*Y-d*j+E*H)*d0,T):null}function multiply(T,u,m){var A=u[0],S=u[1],v=u[2],w=u[3],D=u[4],R=u[5],L=u[6],P=u[7],d=u[8],E=u[9],e=u[10],N=u[11],q=u[12],z=u[13],e0=u[14],H=u[15],j=m[0],y=m[1],Y=m[2],G=m[3];return T[0]=j*A+y*D+Y*d+G*q,T[1]=j*S+y*R+Y*E+G*z,T[2]=j*v+y*L+Y*e+G*e0,T[3]=j*w+y*P+Y*N+G*H,j=m[4],y=m[5],Y=m[6],G=m[7],T[4]=j*A+y*D+Y*d+G*q,T[5]=j*S+y*R+Y*E+G*z,T[6]=j*v+y*L+Y*e+G*e0,T[7]=j*w+y*P+Y*N+G*H,j=m[8],y=m[9],Y=m[10],G=m[11],T[8]=j*A+y*D+Y*d+G*q,T[9]=j*S+y*R+Y*E+G*z,T[10]=j*v+y*L+Y*e+G*e0,T[11]=j*w+y*P+Y*N+G*H,j=m[12],y=m[13],Y=m[14],G=m[15],T[12]=j*A+y*D+Y*d+G*q,T[13]=j*S+y*R+Y*E+G*z,T[14]=j*v+y*L+Y*e+G*e0,T[15]=j*w+y*P+Y*N+G*H,T}function translate(T,u,m){var A=m[0],S=m[1],v=m[2],w,D,R,L,P,d,E,e,N,q,z,e0;return u===T?(T[12]=u[0]*A+u[4]*S+u[8]*v+u[12],T[13]=u[1]*A+u[5]*S+u[9]*v+u[13],T[14]=u[2]*A+u[6]*S+u[10]*v+u[14],T[15]=u[3]*A+u[7]*S+u[11]*v+u[15]):(w=u[0],D=u[1],R=u[2],L=u[3],P=u[4],d=u[5],E=u[6],e=u[7],N=u[8],q=u[9],z=u[10],e0=u[11],T[0]=w,T[1]=D,T[2]=R,T[3]=L,T[4]=P,T[5]=d,T[6]=E,T[7]=e,T[8]=N,T[9]=q,T[10]=z,T[11]=e0,T[12]=w*A+P*S+N*v+u[12],T[13]=D*A+d*S+q*v+u[13],T[14]=R*A+E*S+z*v+u[14],T[15]=L*A+e*S+e0*v+u[15]),T}function scale$3(T,u,m){var A=m[0],S=m[1],v=m[2];return T[0]=u[0]*A,T[1]=u[1]*A,T[2]=u[2]*A,T[3]=u[3]*A,T[4]=u[4]*S,T[5]=u[5]*S,T[6]=u[6]*S,T[7]=u[7]*S,T[8]=u[8]*v,T[9]=u[9]*v,T[10]=u[10]*v,T[11]=u[11]*v,T[12]=u[12],T[13]=u[13],T[14]=u[14],T[15]=u[15],T}function rotateX(T,u,m){var A=Math.sin(m),S=Math.cos(m),v=u[4],w=u[5],D=u[6],R=u[7],L=u[8],P=u[9],d=u[10],E=u[11];return u!==T&&(T[0]=u[0],T[1]=u[1],T[2]=u[2],T[3]=u[3],T[12]=u[12],T[13]=u[13],T[14]=u[14],T[15]=u[15]),T[4]=v*S+L*A,T[5]=w*S+P*A,T[6]=D*S+d*A,T[7]=R*S+E*A,T[8]=L*S-v*A,T[9]=P*S-w*A,T[10]=d*S-D*A,T[11]=E*S-R*A,T}function rotateZ(T,u,m){var A=Math.sin(m),S=Math.cos(m),v=u[0],w=u[1],D=u[2],R=u[3],L=u[4],P=u[5],d=u[6],E=u[7];return u!==T&&(T[8]=u[8],T[9]=u[9],T[10]=u[10],T[11]=u[11],T[12]=u[12],T[13]=u[13],T[14]=u[14],T[15]=u[15]),T[0]=v*S+L*A,T[1]=w*S+P*A,T[2]=D*S+d*A,T[3]=R*S+E*A,T[4]=L*S-v*A,T[5]=P*S-w*A,T[6]=d*S-D*A,T[7]=E*S-R*A,T}function fromRotation(T,u,m){var A=m[0],S=m[1],v=m[2],w=Math.hypot(A,S,v),D,R,L;return w0&&(v=1/Math.sqrt(v)),T[0]=u[0]*v,T[1]=u[1]*v,T[2]=u[2]*v,T}function dot(T,u){return T[0]*u[0]+T[1]*u[1]+T[2]*u[2]}function cross(T,u,m){var A=u[0],S=u[1],v=u[2],w=m[0],D=m[1],R=m[2];return T[0]=S*R-v*D,T[1]=v*w-A*R,T[2]=A*D-S*w,T}function lerp(T,u,m,A){var S=u[0],v=u[1],w=u[2];return T[0]=S+A*(m[0]-S),T[1]=v+A*(m[1]-v),T[2]=w+A*(m[2]-w),T}function angle(T,u){var m=T[0],A=T[1],S=T[2],v=u[0],w=u[1],D=u[2],R=Math.sqrt(m*m+A*A+S*S),L=Math.sqrt(v*v+w*w+D*D),P=R*L,d=P&&dot(T,u)/P;return Math.acos(Math.min(Math.max(d,-1),1))}var sub$1=subtract$1,len=length$1;(function(){var T=create$2();return function(u,m,A,S,v,w){var D,R;for(m||(m=3),A||(A=0),S?R=Math.min(S*m+A,u.length):R=u.length,D=A;D0&&(S=1/Math.sqrt(S)),T[0]=u[0]*S,T[1]=u[1]*S,T}(function(){var T=create();return function(u,m,A,S,v,w){var D,R;for(m||(m=2),A||(A=0),S?R=Math.min(S*m+A,u.length):R=u.length,D=A;D256){for(BUFFER=Array(T=256);T--;)BUFFER[T]=256*Math.random()|0;T=IDX=0}for(;T<16;T++)u=BUFFER[IDX+T],T==6?m+=HEX[u&15|64]:T==8?m+=HEX[u&63|128]:m+=HEX[u],T&1&&T>1&&T<11&&(m+="-");return IDX++,m}var u8$1=Uint8Array,u16$1=Uint16Array,i32$1=Int32Array,fleb$1=new u8$1([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),fdeb$1=new u8$1([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),clim$1=new u8$1([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),freb$1=function(T,u){for(var m=new u16$1(31),A=0;A<31;++A)m[A]=u+=1<>1|(i$1&21845)<<1;x$1=(x$1&52428)>>2|(x$1&13107)<<2,x$1=(x$1&61680)>>4|(x$1&3855)<<4,rev$1[i$1]=((x$1&65280)>>8|(x$1&255)<<8)>>1}var hMap$1=function(T,u,m){for(var A=T.length,S=0,v=new u16$1(u);S>R]=L}else for(D=new u16$1(A),S=0;S>15-T[S]);return D},flt$1=new u8$1(288);for(var i$1=0;i$1<144;++i$1)flt$1[i$1]=8;for(var i$1=144;i$1<256;++i$1)flt$1[i$1]=9;for(var i$1=256;i$1<280;++i$1)flt$1[i$1]=7;for(var i$1=280;i$1<288;++i$1)flt$1[i$1]=8;var fdt$1=new u8$1(32);for(var i$1=0;i$1<32;++i$1)fdt$1[i$1]=5;var flm$1=hMap$1(flt$1,9,0),flrm$1=hMap$1(flt$1,9,1),fdm$1=hMap$1(fdt$1,5,0),fdrm$1=hMap$1(fdt$1,5,1),max$1=function(T){for(var u=T[0],m=1;mu&&(u=T[m]);return u},bits$1=function(T,u,m){var A=u/8|0;return(T[A]|T[A+1]<<8)>>(u&7)&m},bits16$1=function(T,u){var m=u/8|0;return(T[m]|T[m+1]<<8|T[m+2]<<16)>>(u&7)},shft$1=function(T){return(T+7)/8|0},slc$1=function(T,u,m){return(u==null||u<0)&&(u=0),(m==null||m>T.length)&&(m=T.length),new u8$1(T.subarray(u,m))},ec$1=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],err$1=function(T,u,m){var A=new Error(u||ec$1[T]);if(A.code=T,Error.captureStackTrace&&Error.captureStackTrace(A,err$1),!m)throw A;return A},inflt$1=function(T,u,m,A){var S=T.length,v=A?A.length:0;if(!S||u.f&&!u.l)return m||new u8$1(0);var w=!m,D=w||u.i!=2,R=u.i;w&&(m=new u8$1(S*3));var L=function(be){var Ge=m.length;if(be>Ge){var J0=new u8$1(Math.max(Ge*2,be));J0.set(m),m=J0}},P=u.f||0,d=u.p||0,E=u.b||0,e=u.l,N=u.d,q=u.m,z=u.n,e0=S*8;do{if(!e){P=bits$1(T,d,1);var H=bits$1(T,d+1,3);if(d+=3,H)if(H==1)e=flrm$1,N=fdrm$1,q=9,z=5;else if(H==2){var G=bits$1(T,d,31)+257,J=bits$1(T,d+10,15)+4,i0=G+bits$1(T,d+5,31)+1;d+=14;for(var Q=new u8$1(i0),f=new u8$1(19),l0=0;l0>4;if(j<16)Q[l0++]=j;else{var p0=0,T0=0;for(j==16?(T0=3+bits$1(T,d,3),d+=2,p0=Q[l0-1]):j==17?(T0=3+bits$1(T,d,7),d+=3):j==18&&(T0=11+bits$1(T,d,127),d+=7);T0--;)Q[l0++]=p0}}var C0=Q.subarray(0,G),F0=Q.subarray(G);q=max$1(C0),z=max$1(F0),e=hMap$1(C0,q,1),N=hMap$1(F0,z,1)}else err$1(1);else{var j=shft$1(d)+4,y=T[j-4]|T[j-3]<<8,Y=j+y;if(Y>S){R&&err$1(0);break}D&&L(E+y),m.set(T.subarray(j,Y),E),u.b=E+=y,u.p=d=Y*8,u.f=P;continue}if(d>e0){R&&err$1(0);break}}D&&L(E+131072);for(var ee=(1<>4;if(d+=p0&15,d>e0){R&&err$1(0);break}if(p0||err$1(2),Le<256)m[E++]=Le;else if(Le==256){ke=d,e=null;break}else{var De=Le-254;if(Le>264){var l0=Le-257,I0=fleb$1[l0];De=bits$1(T,d,(1<>4;Ue||err$1(3),d+=Ue&15;var F0=fd$1[qe];if(qe>3){var I0=fdeb$1[qe];F0+=bits16$1(T,d)&(1<e0){R&&err$1(0);break}D&&L(E+131072);var $e=E+De;if(E>8},wbits16$1=function(T,u,m){m<<=u&7;var A=u/8|0;T[A]|=m,T[A+1]|=m>>8,T[A+2]|=m>>16},hTree$1=function(T,u){for(var m=[],A=0;AE&&(E=v[A].s);var e=new u16$1(E+1),N=ln$1(m[P-1],e,0);if(N>u){var A=0,q=0,z=N-u,e0=1<u)q+=e0-(1<>=z;q>0;){var j=v[A].s;e[j]=0&&q;--A){var y=v[A].s;e[y]==u&&(--e[y],++q)}N=u}return{t:new u8$1(e),l:N}},ln$1=function(T,u,m){return T.s==-1?Math.max(ln$1(T.l,u,m+1),ln$1(T.r,u,m+1)):u[T.s]=m},lc$1=function(T){for(var u=T.length;u&&!T[--u];);for(var m=new u16$1(++u),A=0,S=T[0],v=1,w=function(R){m[A++]=R},D=1;D<=u;++D)if(T[D]==S&&D!=u)++v;else{if(!S&&v>2){for(;v>138;v-=138)w(32754);v>2&&(w(v>10?v-11<<5|28690:v-3<<5|12305),v=0)}else if(v>3){for(w(S),--v;v>6;v-=6)w(8304);v>2&&(w(v-3<<5|8208),v=0)}for(;v--;)w(S);v=1,S=T[D]}return{c:m.subarray(0,A),n:u}},clen$1=function(T,u){for(var m=0,A=0;A>8,T[S+2]=T[S]^255,T[S+3]=T[S+1]^255;for(var v=0;v4&&!f[clim$1[o0-1]];--o0);var c0=L+5<<3,d0=clen$1(S,flt$1)+clen$1(v,fdt$1)+w,S0=clen$1(S,E)+clen$1(v,q)+w+14+3*o0+clen$1(J,f)+2*J[16]+3*J[17]+7*J[18];if(R>=0&&c0<=d0&&c0<=S0)return wfblk$1(u,P,T.subarray(R,R+L));var p0,T0,C0,F0;if(wbits$1(u,P,1+(S015&&(wbits$1(u,P,Le[i0]>>5&127),P+=Le[i0]>>12)}}else p0=flm$1,T0=flt$1,C0=fdm$1,F0=fdt$1;for(var i0=0;i0255){var De=I0>>18&31;wbits16$1(u,P,p0[De+257]),P+=T0[De+257],De>7&&(wbits$1(u,P,I0>>23&31),P+=fleb$1[De]);var Ue=I0&31;wbits16$1(u,P,C0[Ue]),P+=F0[Ue],Ue>3&&(wbits16$1(u,P,I0>>5&8191),P+=fdeb$1[Ue])}else wbits16$1(u,P,p0[I0]),P+=T0[I0]}return wbits16$1(u,P,p0[256]),P+T0[256]},deo$1=new i32$1([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),et$1=new u8$1(0),dflt$1=function(T,u,m,A,S,v){var w=v.z||T.length,D=new u8$1(A+w+5*(1+Math.ceil(w/7e3))+S),R=D.subarray(A,D.length-S),L=v.l,P=(v.r||0)&7;if(u){P&&(R[0]=v.r>>3);for(var d=deo$1[u-1],E=d>>13,e=d&8191,N=(1<7e3||f>24576)&&(p0>423||!L)){P=wblk$1(T,R,0,y,Y,G,i0,f,o0,Q-o0,P),f=J=i0=0,o0=Q;for(var T0=0;T0<286;++T0)Y[T0]=0;for(var T0=0;T0<30;++T0)G[T0]=0}var C0=2,F0=0,ee=e,ie=d0-S0&32767;if(p0>2&&c0==j(Q-ie))for(var ke=Math.min(E,p0)-1,Le=Math.min(32767,Q),De=Math.min(258,p0);ie<=Le&&--ee&&d0!=S0;){if(T[Q+C0]==T[Q+C0-ie]){for(var I0=0;I0C0){if(C0=I0,F0=ie,I0>ke)break;for(var Ue=Math.min(ie,I0-2),qe=0,T0=0;T0qe&&(qe=ri,S0=$e)}}}d0=S0,S0=q[d0],ie+=d0-S0&32767}if(F0){y[f++]=268435456|revfl$1[C0]<<18|revfd$1[F0];var be=revfl$1[C0]&31,Ge=revfd$1[F0]&31;i0+=fleb$1[be]+fdeb$1[Ge],++Y[257+be],++G[Ge],l0=Q+C0,++J}else y[f++]=T[Q],++Y[T[Q]]}}for(Q=Math.max(Q,l0);Q=w&&(R[P/8|0]=L,J0=w),P=wfblk$1(R,P+1,T.subarray(Q,J0))}v.i=w}return slc$1(D,0,A+shft$1(P)+S)},crct$1=function(){for(var T=new Int32Array(256),u=0;u<256;++u){for(var m=u,A=9;--A;)m=(m&1&&-306674912)^m>>>1;T[u]=m}return T}(),crc$1=function(){var T=-1;return{p:function(u){for(var m=T,A=0;A>>8;T=m},d:function(){return~T}}},dopt$1=function(T,u,m,A,S){if(!S&&(S={l:1},u.dictionary)){var v=u.dictionary.subarray(-32768),w=new u8$1(v.length+T.length);w.set(v),w.set(T,v.length),T=w,S.w=v.length}return dflt$1(T,u.level==null?6:u.level,u.mem==null?S.l?Math.ceil(Math.max(8,Math.min(13,Math.log(T.length)))*1.5):20:12+u.mem,m,A,S)},b2$1=function(T,u){return T[u]|T[u+1]<<8},b4$1=function(T,u){return(T[u]|T[u+1]<<8|T[u+2]<<16|T[u+3]<<24)>>>0},b8$1=function(T,u){return b4$1(T,u)+b4$1(T,u+4)*4294967296},wbytes$1=function(T,u,m){for(;m;++u)T[u]=m,m>>>=8},gzh$1=function(T,u){var m=u.filename;if(T[0]=31,T[1]=139,T[2]=8,T[8]=u.level<2?4:u.level==9?2:0,T[9]=3,u.mtime!=0&&wbytes$1(T,4,Math.floor(new Date(u.mtime||Date.now())/1e3)),m){T[3]=8;for(var A=0;A<=m.length;++A)T[A+10]=m.charCodeAt(A)}},gzs$1=function(T){(T[0]!=31||T[1]!=139||T[2]!=8)&&err$1(6,"invalid gzip data");var u=T[3],m=10;u&4&&(m+=(T[10]|T[11]<<8)+2);for(var A=(u>>3&1)+(u>>4&1);A>0;A-=!T[m++]);return m+(u&2)},gzl$1=function(T){var u=T.length;return(T[u-4]|T[u-3]<<8|T[u-2]<<16|T[u-1]<<24)>>>0},gzhl$1=function(T){return 10+(T.filename?T.filename.length+1:0)},zls$1=function(T,u){return((T[0]&15)!=8||T[0]>>4>7||(T[0]<<8|T[1])%31)&&err$1(6,"invalid zlib data"),(T[1]>>5&1)==+!u&&err$1(6,"invalid zlib data: "+(T[1]&32?"need":"unexpected")+" dictionary"),(T[1]>>3&4)+2};function StrmOpt$1(T,u){return typeof T=="function"&&(u=T,T={}),this.ondata=u,T}var Inflate$1=function(){function T(u,m){typeof u=="function"&&(m=u,u={}),this.ondata=m;var A=u&&u.dictionary&&u.dictionary.subarray(-32768);this.s={i:0,b:A?A.length:0},this.o=new u8$1(32768),this.p=new u8$1(0),A&&this.o.set(A)}return T.prototype.e=function(u){if(this.ondata||err$1(5),this.d&&err$1(4),!this.p.length)this.p=u;else if(u.length){var m=new u8$1(this.p.length+u.length);m.set(this.p),m.set(u,this.p.length),this.p=m}},T.prototype.c=function(u){this.s.i=+(this.d=u||!1);var m=this.s.b,A=inflt$1(this.p,this.s,this.o);this.ondata(slc$1(A,m,this.s.b),this.d),this.o=slc$1(A,this.s.b-32768),this.s.b=this.o.length,this.p=slc$1(this.p,this.s.p/8|0),this.s.p&=7},T.prototype.push=function(u,m){this.e(u),this.c(m)},T}();function inflateSync$1(T,u){return inflt$1(T,{i:2},u&&u.out,u&&u.dictionary)}function gzipSync$1(T,u){u||(u={});var m=crc$1(),A=T.length;m.p(T);var S=dopt$1(T,u,gzhl$1(u),8),v=S.length;return gzh$1(S,u),wbytes$1(S,v-8,m.d()),wbytes$1(S,v-4,A),S}var Gunzip$1=function(){function T(u,m){this.v=1,this.r=0,Inflate$1.call(this,u,m)}return T.prototype.push=function(u,m){if(Inflate$1.prototype.e.call(this,u),this.r+=u.length,this.v){var A=this.p.subarray(this.v-1),S=A.length>3?gzs$1(A):4;if(S>A.length){if(!m)return}else this.v>1&&this.onmember&&this.onmember(this.r-A.length);this.p=A.subarray(S),this.v=0}Inflate$1.prototype.c.call(this,m),this.s.f&&!this.s.l&&!m&&(this.v=shft$1(this.s.p)+9,this.s={i:0},this.o=new u8$1(0),this.push(new u8$1(0),m))},T}();function gunzipSync$1(T,u){var m=gzs$1(T);return m+8>T.length&&err$1(6,"invalid gzip data"),inflt$1(T.subarray(m,-8),{i:2},u&&u.out||new u8$1(gzl$1(T)),u&&u.dictionary)}var Unzlib$1=function(){function T(u,m){Inflate$1.call(this,u,m),this.v=u&&u.dictionary?2:1}return T.prototype.push=function(u,m){if(Inflate$1.prototype.e.call(this,u),this.v){if(this.p.length<6&&!m)return;this.p=this.p.subarray(zls$1(this.p,this.v-1)),this.v=0}m&&(this.p.length<4&&err$1(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),Inflate$1.prototype.c.call(this,m)},T}();function unzlibSync$1(T,u){return inflt$1(T.subarray(zls$1(T,u&&u.dictionary),-4),{i:2},u&&u.out,u&&u.dictionary)}var Decompress$1=function(){function T(u,m){this.o=StrmOpt$1.call(this,u,m)||{},this.G=Gunzip$1,this.I=Inflate$1,this.Z=Unzlib$1}return T.prototype.i=function(){var u=this;this.s.ondata=function(m,A){u.ondata(m,A)}},T.prototype.push=function(u,m){if(this.ondata||err$1(5),this.s)this.s.push(u,m);else{if(this.p&&this.p.length){var A=new u8$1(this.p.length+u.length);A.set(this.p),A.set(u,this.p.length)}else this.p=u;this.p.length>2&&(this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(this.o):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,m),this.p=null)}},T}();function decompressSync$1(T,u){return T[0]==31&&T[1]==139&&T[2]==8?gunzipSync$1(T,u):(T[0]&15)!=8||T[0]>>4>7||(T[0]<<8|T[1])%31?inflateSync$1(T,u):unzlibSync$1(T,u)}var te$1=typeof TextEncoder<"u"&&new TextEncoder,td$1=typeof TextDecoder<"u"&&new TextDecoder,tds$1=0;try{td$1.decode(et$1,{stream:!0}),tds$1=1}catch{}var dutf8$1=function(T){for(var u="",m=0;;){var A=T[m++],S=(A>127)+(A>223)+(A>239);if(m+S>T.length)return{s:u,r:slc$1(T,m-1)};S?S==3?(A=((A&15)<<18|(T[m++]&63)<<12|(T[m++]&63)<<6|T[m++]&63)-65536,u+=String.fromCharCode(55296|A>>10,56320|A&1023)):S&1?u+=String.fromCharCode((A&31)<<6|T[m++]&63):u+=String.fromCharCode((A&15)<<12|(T[m++]&63)<<6|T[m++]&63):u+=String.fromCharCode(A)}};function strToU8$1(T,u){if(u){for(var m=new u8$1(T.length),A=0;A>1)),w=0,D=function(P){v[w++]=P},A=0;Av.length){var R=new u8$1(w+8+(S-A<<1));R.set(v),v=R}var L=T.charCodeAt(A);L<128||u?D(L):L<2048?(D(192|L>>6),D(128|L&63)):L>55295&&L<57344?(L=65536+(L&1047552)|T.charCodeAt(++A)&1023,D(240|L>>18),D(128|L>>12&63),D(128|L>>6&63),D(128|L&63)):(D(224|L>>12),D(128|L>>6&63),D(128|L&63))}return slc$1(v,0,w)}function strFromU8$1(T,u){if(u){for(var m="",A=0;A65558)&&err$1(13);var S=b2$1(T,A+8);if(!S)return{};var v=b4$1(T,A+16),w=v==4294967295||S==65535;if(w){var D=b4$1(T,A-12);w=b4$1(T,D)==101075792,w&&(S=b4$1(T,D+32),v=b4$1(T,D+48))}for(var R=u&&u.filter,L=0;L{const m=(S,v)=>(T.set(v,S),S),A=S=>{if(T.has(S))return T.get(S);const[v,w]=u[S];switch(v){case PRIMITIVE:case VOID:return m(w,S);case ARRAY:{const D=m([],S);for(const R of w)D.push(A(R));return D}case OBJECT:{const D=m({},S);for(const[R,L]of w)D[A(R)]=A(L);return D}case DATE:return m(new Date(w),S);case REGEXP:{const{source:D,flags:R}=w;return m(new RegExp(D,R),S)}case MAP:{const D=m(new Map,S);for(const[R,L]of w)D.set(A(R),A(L));return D}case SET:{const D=m(new Set,S);for(const R of w)D.add(A(R));return D}case ERROR:{const{name:D,message:R}=w;return m(new env[D](R),S)}case BIGINT:return m(BigInt(w),S);case"BigInt":return m(Object(BigInt(w)),S)}return m(new env[v](w),S)};return A},deserialize=T=>deserializer(new Map,T)(0),EMPTY="",{toString}={},{keys}=Object,typeOf=T=>{const u=typeof T;if(u!=="object"||!T)return[PRIMITIVE,u];const m=toString.call(T).slice(8,-1);switch(m){case"Array":return[ARRAY,EMPTY];case"Object":return[OBJECT,EMPTY];case"Date":return[DATE,EMPTY];case"RegExp":return[REGEXP,EMPTY];case"Map":return[MAP,EMPTY];case"Set":return[SET,EMPTY]}return m.includes("Array")?[ARRAY,m]:m.includes("Error")?[ERROR,m]:[OBJECT,m]},shouldSkip=([T,u])=>T===PRIMITIVE&&(u==="function"||u==="symbol"),serializer=(T,u,m,A)=>{const S=(w,D)=>{const R=A.push(w)-1;return m.set(D,R),R},v=w=>{if(m.has(w))return m.get(w);let[D,R]=typeOf(w);switch(D){case PRIMITIVE:{let P=w;switch(R){case"bigint":D=BIGINT,P=w.toString();break;case"function":case"symbol":if(T)throw new TypeError("unable to serialize "+R);P=null;break;case"undefined":return S([VOID],w)}return S([D,P],w)}case ARRAY:{if(R)return S([R,[...w]],w);const P=[],d=S([D,P],w);for(const E of w)P.push(v(E));return d}case OBJECT:{if(R)switch(R){case"BigInt":return S([R,w.toString()],w);case"Boolean":case"Number":case"String":return S([R,w.valueOf()],w)}if(u&&"toJSON"in w)return v(w.toJSON());const P=[],d=S([D,P],w);for(const E of keys(w))(T||!shouldSkip(typeOf(w[E])))&&P.push([v(E),v(w[E])]);return d}case DATE:return S([D,w.toISOString()],w);case REGEXP:{const{source:P,flags:d}=w;return S([D,{source:P,flags:d}],w)}case MAP:{const P=[],d=S([D,P],w);for(const[E,e]of w)(T||!(shouldSkip(typeOf(E))||shouldSkip(typeOf(e))))&&P.push([v(E),v(e)]);return d}case SET:{const P=[],d=S([D,P],w);for(const E of w)(T||!shouldSkip(typeOf(E)))&&P.push(v(E));return d}}const{message:L}=w;return S([D,{name:R,message:L}],w)};return v},serialize=(T,{json:u,lossy:m}={})=>{const A=[];return serializer(!(u||m),!!u,new Map,A)(T),A};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(T){return T&&T.__esModule&&Object.prototype.hasOwnProperty.call(T,"default")?T.default:T}function getAugmentedNamespace(T){if(T.__esModule)return T;var u=T.default;if(typeof u=="function"){var m=function A(){return this instanceof A?Reflect.construct(u,arguments,this.constructor):u.apply(this,arguments)};m.prototype=u.prototype}else m={};return Object.defineProperty(m,"__esModule",{value:!0}),Object.keys(T).forEach(function(A){var S=Object.getOwnPropertyDescriptor(T,A);Object.defineProperty(m,A,S.get?S:{enumerable:!0,get:function(){return T[A]}})}),m}var arrayEqual=function(u,m){var A=u.length;if(u===m)return!0;if(A!==m.length)return!1;for(var S=0;S>1|(i&21845)<<1;x=(x&52428)>>2|(x&13107)<<2,x=(x&61680)>>4|(x&3855)<<4,rev[i]=((x&65280)>>8|(x&255)<<8)>>1}var hMap=function(T,u,m){for(var A=T.length,S=0,v=new u16(u);S>R]=L}else for(D=new u16(A),S=0;S>15-T[S]);return D},flt=new u8(288);for(var i=0;i<144;++i)flt[i]=8;for(var i=144;i<256;++i)flt[i]=9;for(var i=256;i<280;++i)flt[i]=7;for(var i=280;i<288;++i)flt[i]=8;var fdt=new u8(32);for(var i=0;i<32;++i)fdt[i]=5;var flm=hMap(flt,9,0),flrm=hMap(flt,9,1),fdm=hMap(fdt,5,0),fdrm=hMap(fdt,5,1),max=function(T){for(var u=T[0],m=1;mu&&(u=T[m]);return u},bits=function(T,u,m){var A=u/8|0;return(T[A]|T[A+1]<<8)>>(u&7)&m},bits16=function(T,u){var m=u/8|0;return(T[m]|T[m+1]<<8|T[m+2]<<16)>>(u&7)},shft=function(T){return(T+7)/8|0},slc=function(T,u,m){return(u==null||u<0)&&(u=0),(m==null||m>T.length)&&(m=T.length),new u8(T.subarray(u,m))};browser.FlateErrorCode={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14};var ec=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],err=function(T,u,m){var A=new Error(u||ec[T]);if(A.code=T,Error.captureStackTrace&&Error.captureStackTrace(A,err),!m)throw A;return A},inflt=function(T,u,m,A){var S=T.length,v=A?A.length:0;if(!S||u.f&&!u.l)return m||new u8(0);var w=!m,D=w||u.i!=2,R=u.i;w&&(m=new u8(S*3));var L=function(be){var Ge=m.length;if(be>Ge){var J0=new u8(Math.max(Ge*2,be));J0.set(m),m=J0}},P=u.f||0,d=u.p||0,E=u.b||0,e=u.l,N=u.d,q=u.m,z=u.n,e0=S*8;do{if(!e){P=bits(T,d,1);var H=bits(T,d+1,3);if(d+=3,H)if(H==1)e=flrm,N=fdrm,q=9,z=5;else if(H==2){var G=bits(T,d,31)+257,J=bits(T,d+10,15)+4,i0=G+bits(T,d+5,31)+1;d+=14;for(var Q=new u8(i0),f=new u8(19),l0=0;l0>4;if(j<16)Q[l0++]=j;else{var p0=0,T0=0;for(j==16?(T0=3+bits(T,d,3),d+=2,p0=Q[l0-1]):j==17?(T0=3+bits(T,d,7),d+=3):j==18&&(T0=11+bits(T,d,127),d+=7);T0--;)Q[l0++]=p0}}var C0=Q.subarray(0,G),F0=Q.subarray(G);q=max(C0),z=max(F0),e=hMap(C0,q,1),N=hMap(F0,z,1)}else err(1);else{var j=shft(d)+4,y=T[j-4]|T[j-3]<<8,Y=j+y;if(Y>S){R&&err(0);break}D&&L(E+y),m.set(T.subarray(j,Y),E),u.b=E+=y,u.p=d=Y*8,u.f=P;continue}if(d>e0){R&&err(0);break}}D&&L(E+131072);for(var ee=(1<>4;if(d+=p0&15,d>e0){R&&err(0);break}if(p0||err(2),Le<256)m[E++]=Le;else if(Le==256){ke=d,e=null;break}else{var De=Le-254;if(Le>264){var l0=Le-257,I0=fleb[l0];De=bits(T,d,(1<>4;Ue||err(3),d+=Ue&15;var F0=fd[qe];if(qe>3){var I0=fdeb[qe];F0+=bits16(T,d)&(1<e0){R&&err(0);break}D&&L(E+131072);var $e=E+De;if(E>8},wbits16=function(T,u,m){m<<=u&7;var A=u/8|0;T[A]|=m,T[A+1]|=m>>8,T[A+2]|=m>>16},hTree=function(T,u){for(var m=[],A=0;AE&&(E=v[A].s);var e=new u16(E+1),N=ln(m[P-1],e,0);if(N>u){var A=0,q=0,z=N-u,e0=1<u)q+=e0-(1<>=z;q>0;){var j=v[A].s;e[j]=0&&q;--A){var y=v[A].s;e[y]==u&&(--e[y],++q)}N=u}return{t:new u8(e),l:N}},ln=function(T,u,m){return T.s==-1?Math.max(ln(T.l,u,m+1),ln(T.r,u,m+1)):u[T.s]=m},lc=function(T){for(var u=T.length;u&&!T[--u];);for(var m=new u16(++u),A=0,S=T[0],v=1,w=function(R){m[A++]=R},D=1;D<=u;++D)if(T[D]==S&&D!=u)++v;else{if(!S&&v>2){for(;v>138;v-=138)w(32754);v>2&&(w(v>10?v-11<<5|28690:v-3<<5|12305),v=0)}else if(v>3){for(w(S),--v;v>6;v-=6)w(8304);v>2&&(w(v-3<<5|8208),v=0)}for(;v--;)w(S);v=1,S=T[D]}return{c:m.subarray(0,A),n:u}},clen=function(T,u){for(var m=0,A=0;A>8,T[S+2]=T[S]^255,T[S+3]=T[S+1]^255;for(var v=0;v4&&!f[clim[o0-1]];--o0);var c0=L+5<<3,d0=clen(S,flt)+clen(v,fdt)+w,S0=clen(S,E)+clen(v,q)+w+14+3*o0+clen(J,f)+2*J[16]+3*J[17]+7*J[18];if(R>=0&&c0<=d0&&c0<=S0)return wfblk(u,P,T.subarray(R,R+L));var p0,T0,C0,F0;if(wbits(u,P,1+(S015&&(wbits(u,P,Le[i0]>>5&127),P+=Le[i0]>>12)}}else p0=flm,T0=flt,C0=fdm,F0=fdt;for(var i0=0;i0255){var De=I0>>18&31;wbits16(u,P,p0[De+257]),P+=T0[De+257],De>7&&(wbits(u,P,I0>>23&31),P+=fleb[De]);var Ue=I0&31;wbits16(u,P,C0[Ue]),P+=F0[Ue],Ue>3&&(wbits16(u,P,I0>>5&8191),P+=fdeb[Ue])}else wbits16(u,P,p0[I0]),P+=T0[I0]}return wbits16(u,P,p0[256]),P+T0[256]},deo=new i32([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),et=new u8(0),dflt=function(T,u,m,A,S,v){var w=v.z||T.length,D=new u8(A+w+5*(1+Math.ceil(w/7e3))+S),R=D.subarray(A,D.length-S),L=v.l,P=(v.r||0)&7;if(u){P&&(R[0]=v.r>>3);for(var d=deo[u-1],E=d>>13,e=d&8191,N=(1<7e3||f>24576)&&(p0>423||!L)){P=wblk(T,R,0,y,Y,G,i0,f,o0,Q-o0,P),f=J=i0=0,o0=Q;for(var T0=0;T0<286;++T0)Y[T0]=0;for(var T0=0;T0<30;++T0)G[T0]=0}var C0=2,F0=0,ee=e,ie=d0-S0&32767;if(p0>2&&c0==j(Q-ie))for(var ke=Math.min(E,p0)-1,Le=Math.min(32767,Q),De=Math.min(258,p0);ie<=Le&&--ee&&d0!=S0;){if(T[Q+C0]==T[Q+C0-ie]){for(var I0=0;I0C0){if(C0=I0,F0=ie,I0>ke)break;for(var Ue=Math.min(ie,I0-2),qe=0,T0=0;T0qe&&(qe=ri,S0=$e)}}}d0=S0,S0=q[d0],ie+=d0-S0&32767}if(F0){y[f++]=268435456|revfl[C0]<<18|revfd[F0];var be=revfl[C0]&31,Ge=revfd[F0]&31;i0+=fleb[be]+fdeb[Ge],++Y[257+be],++G[Ge],l0=Q+C0,++J}else y[f++]=T[Q],++Y[T[Q]]}}for(Q=Math.max(Q,l0);Q=w&&(R[P/8|0]=L,J0=w),P=wfblk(R,P+1,T.subarray(Q,J0))}v.i=w}return slc(D,0,A+shft(P)+S)},crct=function(){for(var T=new Int32Array(256),u=0;u<256;++u){for(var m=u,A=9;--A;)m=(m&1&&-306674912)^m>>>1;T[u]=m}return T}(),crc=function(){var T=-1;return{p:function(u){for(var m=T,A=0;A>>8;T=m},d:function(){return~T}}},adler=function(){var T=1,u=0;return{p:function(m){for(var A=T,S=u,v=m.length|0,w=0;w!=v;){for(var D=Math.min(w+2655,v);w>16),S=(S&65535)+15*(S>>16)}T=A,u=S},d:function(){return T%=65521,u%=65521,(T&255)<<24|(T&65280)<<8|(u&255)<<8|u>>8}}},dopt=function(T,u,m,A,S){if(!S&&(S={l:1},u.dictionary)){var v=u.dictionary.subarray(-32768),w=new u8(v.length+T.length);w.set(v),w.set(T,v.length),T=w,S.w=v.length}return dflt(T,u.level==null?6:u.level,u.mem==null?S.l?Math.ceil(Math.max(8,Math.min(13,Math.log(T.length)))*1.5):20:12+u.mem,m,A,S)},mrg=function(T,u){var m={};for(var A in T)m[A]=T[A];for(var A in u)m[A]=u[A];return m},wcln=function(T,u,m){for(var A=T(),S=T.toString(),v=S.slice(S.indexOf("[")+1,S.lastIndexOf("]")).replace(/\s+/g,"").split(","),w=0;w>>0},b8=function(T,u){return b4(T,u)+b4(T,u+4)*4294967296},wbytes=function(T,u,m){for(;m;++u)T[u]=m,m>>>=8},gzh=function(T,u){var m=u.filename;if(T[0]=31,T[1]=139,T[2]=8,T[8]=u.level<2?4:u.level==9?2:0,T[9]=3,u.mtime!=0&&wbytes(T,4,Math.floor(new Date(u.mtime||Date.now())/1e3)),m){T[3]=8;for(var A=0;A<=m.length;++A)T[A+10]=m.charCodeAt(A)}},gzs=function(T){(T[0]!=31||T[1]!=139||T[2]!=8)&&err(6,"invalid gzip data");var u=T[3],m=10;u&4&&(m+=(T[10]|T[11]<<8)+2);for(var A=(u>>3&1)+(u>>4&1);A>0;A-=!T[m++]);return m+(u&2)},gzl=function(T){var u=T.length;return(T[u-4]|T[u-3]<<8|T[u-2]<<16|T[u-1]<<24)>>>0},gzhl=function(T){return 10+(T.filename?T.filename.length+1:0)},zlh=function(T,u){var m=u.level,A=m==0?0:m<6?1:m==9?3:2;if(T[0]=120,T[1]=A<<6|(u.dictionary&&32),T[1]|=31-(T[0]<<8|T[1])%31,u.dictionary){var S=adler();S.p(u.dictionary),wbytes(T,2,S.d())}},zls=function(T,u){return((T[0]&15)!=8||T[0]>>4>7||(T[0]<<8|T[1])%31)&&err(6,"invalid zlib data"),(T[1]>>5&1)==+!u&&err(6,"invalid zlib data: "+(T[1]&32?"need":"unexpected")+" dictionary"),(T[1]>>3&4)+2};function StrmOpt(T,u){return typeof T=="function"&&(u=T,T={}),this.ondata=u,T}var Deflate=function(){function T(u,m){if(typeof u=="function"&&(m=u,u={}),this.ondata=m,this.o=u||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new u8(98304),this.o.dictionary){var A=this.o.dictionary.subarray(-32768);this.b.set(A,32768-A.length),this.s.i=32768-A.length}}return T.prototype.p=function(u,m){this.ondata(dopt(u,this.o,0,0,this.s),m)},T.prototype.push=function(u,m){this.ondata||err(5),this.s.l&&err(4);var A=u.length+this.s.z;if(A>this.b.length){if(A>2*this.b.length-32768){var S=new u8(A&-32768);S.set(this.b.subarray(0,this.s.z)),this.b=S}var v=this.b.length-this.s.z;this.b.set(u.subarray(0,v),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(u.subarray(v),32768),this.s.z=u.length-v+32768,this.s.i=32766,this.s.w=32768}else this.b.set(u,this.s.z),this.s.z+=u.length;this.s.l=m&1,(this.s.z>this.s.w+8191||m)&&(this.p(this.b,m||!1),this.s.w=this.s.i,this.s.i-=2)},T.prototype.flush=function(){this.ondata||err(5),this.s.l&&err(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},T}();browser.Deflate=Deflate;var AsyncDeflate=function(){function T(u,m){astrmify([bDflt,function(){return[astrm,Deflate]}],this,StrmOpt.call(this,u,m),function(A){var S=new Deflate(A.data);onmessage=astrm(S)},6,1)}return T}();browser.AsyncDeflate=AsyncDeflate;function deflate$2(T,u,m){return m||(m=u,u={}),typeof m!="function"&&err(7),cbify(T,u,[bDflt],function(A){return pbf(deflateSync(A.data[0],A.data[1]))},0,m)}browser.deflate=deflate$2;function deflateSync(T,u){return dopt(T,u||{},0,0)}browser.deflateSync=deflateSync;var Inflate=function(){function T(u,m){typeof u=="function"&&(m=u,u={}),this.ondata=m;var A=u&&u.dictionary&&u.dictionary.subarray(-32768);this.s={i:0,b:A?A.length:0},this.o=new u8(32768),this.p=new u8(0),A&&this.o.set(A)}return T.prototype.e=function(u){if(this.ondata||err(5),this.d&&err(4),!this.p.length)this.p=u;else if(u.length){var m=new u8(this.p.length+u.length);m.set(this.p),m.set(u,this.p.length),this.p=m}},T.prototype.c=function(u){this.s.i=+(this.d=u||!1);var m=this.s.b,A=inflt(this.p,this.s,this.o);this.ondata(slc(A,m,this.s.b),this.d),this.o=slc(A,this.s.b-32768),this.s.b=this.o.length,this.p=slc(this.p,this.s.p/8|0),this.s.p&=7},T.prototype.push=function(u,m){this.e(u),this.c(m)},T}();browser.Inflate=Inflate;var AsyncInflate=function(){function T(u,m){astrmify([bInflt,function(){return[astrm,Inflate]}],this,StrmOpt.call(this,u,m),function(A){var S=new Inflate(A.data);onmessage=astrm(S)},7,0)}return T}();browser.AsyncInflate=AsyncInflate;function inflate$2(T,u,m){return m||(m=u,u={}),typeof m!="function"&&err(7),cbify(T,u,[bInflt],function(A){return pbf(inflateSync(A.data[0],gopt(A.data[1])))},1,m)}browser.inflate=inflate$2;function inflateSync(T,u){return inflt(T,{i:2},u&&u.out,u&&u.dictionary)}browser.inflateSync=inflateSync;var Gzip=function(){function T(u,m){this.c=crc(),this.l=0,this.v=1,Deflate.call(this,u,m)}return T.prototype.push=function(u,m){this.c.p(u),this.l+=u.length,Deflate.prototype.push.call(this,u,m)},T.prototype.p=function(u,m){var A=dopt(u,this.o,this.v&&gzhl(this.o),m&&8,this.s);this.v&&(gzh(A,this.o),this.v=0),m&&(wbytes(A,A.length-8,this.c.d()),wbytes(A,A.length-4,this.l)),this.ondata(A,m)},T.prototype.flush=function(){Deflate.prototype.flush.call(this)},T}();browser.Gzip=Gzip;browser.Compress=Gzip;var AsyncGzip=function(){function T(u,m){astrmify([bDflt,gze,function(){return[astrm,Deflate,Gzip]}],this,StrmOpt.call(this,u,m),function(A){var S=new Gzip(A.data);onmessage=astrm(S)},8,1)}return T}();browser.AsyncGzip=AsyncGzip;browser.AsyncCompress=AsyncGzip;function gzip(T,u,m){return m||(m=u,u={}),typeof m!="function"&&err(7),cbify(T,u,[bDflt,gze,function(){return[gzipSync]}],function(A){return pbf(gzipSync(A.data[0],A.data[1]))},2,m)}browser.gzip=gzip;browser.compress=gzip;function gzipSync(T,u){u||(u={});var m=crc(),A=T.length;m.p(T);var S=dopt(T,u,gzhl(u),8),v=S.length;return gzh(S,u),wbytes(S,v-8,m.d()),wbytes(S,v-4,A),S}browser.gzipSync=gzipSync;browser.compressSync=gzipSync;var Gunzip=function(){function T(u,m){this.v=1,this.r=0,Inflate.call(this,u,m)}return T.prototype.push=function(u,m){if(Inflate.prototype.e.call(this,u),this.r+=u.length,this.v){var A=this.p.subarray(this.v-1),S=A.length>3?gzs(A):4;if(S>A.length){if(!m)return}else this.v>1&&this.onmember&&this.onmember(this.r-A.length);this.p=A.subarray(S),this.v=0}Inflate.prototype.c.call(this,m),this.s.f&&!this.s.l&&!m&&(this.v=shft(this.s.p)+9,this.s={i:0},this.o=new u8(0),this.push(new u8(0),m))},T}();browser.Gunzip=Gunzip;var AsyncGunzip=function(){function T(u,m){var A=this;astrmify([bInflt,guze,function(){return[astrm,Inflate,Gunzip]}],this,StrmOpt.call(this,u,m),function(S){var v=new Gunzip(S.data);v.onmember=function(w){return postMessage(w)},onmessage=astrm(v)},9,0,function(S){return A.onmember&&A.onmember(S)})}return T}();browser.AsyncGunzip=AsyncGunzip;function gunzip(T,u,m){return m||(m=u,u={}),typeof m!="function"&&err(7),cbify(T,u,[bInflt,guze,function(){return[gunzipSync]}],function(A){return pbf(gunzipSync(A.data[0],A.data[1]))},3,m)}browser.gunzip=gunzip;function gunzipSync(T,u){var m=gzs(T);return m+8>T.length&&err(6,"invalid gzip data"),inflt(T.subarray(m,-8),{i:2},u&&u.out||new u8(gzl(T)),u&&u.dictionary)}browser.gunzipSync=gunzipSync;var Zlib=function(){function T(u,m){this.c=adler(),this.v=1,Deflate.call(this,u,m)}return T.prototype.push=function(u,m){this.c.p(u),Deflate.prototype.push.call(this,u,m)},T.prototype.p=function(u,m){var A=dopt(u,this.o,this.v&&(this.o.dictionary?6:2),m&&4,this.s);this.v&&(zlh(A,this.o),this.v=0),m&&wbytes(A,A.length-4,this.c.d()),this.ondata(A,m)},T.prototype.flush=function(){Deflate.prototype.flush.call(this)},T}();browser.Zlib=Zlib;var AsyncZlib=function(){function T(u,m){astrmify([bDflt,zle,function(){return[astrm,Deflate,Zlib]}],this,StrmOpt.call(this,u,m),function(A){var S=new Zlib(A.data);onmessage=astrm(S)},10,1)}return T}();browser.AsyncZlib=AsyncZlib;function zlib(T,u,m){return m||(m=u,u={}),typeof m!="function"&&err(7),cbify(T,u,[bDflt,zle,function(){return[zlibSync]}],function(A){return pbf(zlibSync(A.data[0],A.data[1]))},4,m)}browser.zlib=zlib;function zlibSync(T,u){u||(u={});var m=adler();m.p(T);var A=dopt(T,u,u.dictionary?6:2,4);return zlh(A,u),wbytes(A,A.length-4,m.d()),A}browser.zlibSync=zlibSync;var Unzlib=function(){function T(u,m){Inflate.call(this,u,m),this.v=u&&u.dictionary?2:1}return T.prototype.push=function(u,m){if(Inflate.prototype.e.call(this,u),this.v){if(this.p.length<6&&!m)return;this.p=this.p.subarray(zls(this.p,this.v-1)),this.v=0}m&&(this.p.length<4&&err(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),Inflate.prototype.c.call(this,m)},T}();browser.Unzlib=Unzlib;var AsyncUnzlib=function(){function T(u,m){astrmify([bInflt,zule,function(){return[astrm,Inflate,Unzlib]}],this,StrmOpt.call(this,u,m),function(A){var S=new Unzlib(A.data);onmessage=astrm(S)},11,0)}return T}();browser.AsyncUnzlib=AsyncUnzlib;function unzlib(T,u,m){return m||(m=u,u={}),typeof m!="function"&&err(7),cbify(T,u,[bInflt,zule,function(){return[unzlibSync]}],function(A){return pbf(unzlibSync(A.data[0],gopt(A.data[1])))},5,m)}browser.unzlib=unzlib;function unzlibSync(T,u){return inflt(T.subarray(zls(T,u&&u.dictionary),-4),{i:2},u&&u.out,u&&u.dictionary)}browser.unzlibSync=unzlibSync;var Decompress=function(){function T(u,m){this.o=StrmOpt.call(this,u,m)||{},this.G=Gunzip,this.I=Inflate,this.Z=Unzlib}return T.prototype.i=function(){var u=this;this.s.ondata=function(m,A){u.ondata(m,A)}},T.prototype.push=function(u,m){if(this.ondata||err(5),this.s)this.s.push(u,m);else{if(this.p&&this.p.length){var A=new u8(this.p.length+u.length);A.set(this.p),A.set(u,this.p.length)}else this.p=u;this.p.length>2&&(this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(this.o):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,m),this.p=null)}},T}();browser.Decompress=Decompress;var AsyncDecompress=function(){function T(u,m){Decompress.call(this,u,m),this.queuedSize=0,this.G=AsyncGunzip,this.I=AsyncInflate,this.Z=AsyncUnzlib}return T.prototype.i=function(){var u=this;this.s.ondata=function(m,A,S){u.ondata(m,A,S)},this.s.ondrain=function(m){u.queuedSize-=m,u.ondrain&&u.ondrain(m)}},T.prototype.push=function(u,m){this.queuedSize+=u.length,Decompress.prototype.push.call(this,u,m)},T}();browser.AsyncDecompress=AsyncDecompress;function decompress(T,u,m){return m||(m=u,u={}),typeof m!="function"&&err(7),T[0]==31&&T[1]==139&&T[2]==8?gunzip(T,u,m):(T[0]&15)!=8||T[0]>>4>7||(T[0]<<8|T[1])%31?inflate$2(T,u,m):unzlib(T,u,m)}browser.decompress=decompress;function decompressSync(T,u){return T[0]==31&&T[1]==139&&T[2]==8?gunzipSync(T,u):(T[0]&15)!=8||T[0]>>4>7||(T[0]<<8|T[1])%31?inflateSync(T,u):unzlibSync(T,u)}browser.decompressSync=decompressSync;var fltn=function(T,u,m,A){for(var S in T){var v=T[S],w=u+S,D=A;Array.isArray(v)&&(D=mrg(A,v[1]),v=v[0]),v instanceof u8?m[w]=[v,D]:(m[w+="/"]=[new u8(0),D],fltn(v,w,m,A))}},te=typeof TextEncoder<"u"&&new TextEncoder,td=typeof TextDecoder<"u"&&new TextDecoder,tds=0;try{td.decode(et,{stream:!0}),tds=1}catch{}var dutf8=function(T){for(var u="",m=0;;){var A=T[m++],S=(A>127)+(A>223)+(A>239);if(m+S>T.length)return{s:u,r:slc(T,m-1)};S?S==3?(A=((A&15)<<18|(T[m++]&63)<<12|(T[m++]&63)<<6|T[m++]&63)-65536,u+=String.fromCharCode(55296|A>>10,56320|A&1023)):S&1?u+=String.fromCharCode((A&31)<<6|T[m++]&63):u+=String.fromCharCode((A&15)<<12|(T[m++]&63)<<6|T[m++]&63):u+=String.fromCharCode(A)}},DecodeUTF8=function(){function T(u){this.ondata=u,tds?this.t=new TextDecoder:this.p=et}return T.prototype.push=function(u,m){if(this.ondata||err(5),m=!!m,this.t){this.ondata(this.t.decode(u,{stream:!0}),m),m&&(this.t.decode().length&&err(8),this.t=null);return}this.p||err(4);var A=new u8(this.p.length+u.length);A.set(this.p),A.set(u,this.p.length);var S=dutf8(A),v=S.s,w=S.r;m?(w.length&&err(8),this.p=null):this.p=w,this.ondata(v,m)},T}();browser.DecodeUTF8=DecodeUTF8;var EncodeUTF8=function(){function T(u){this.ondata=u}return T.prototype.push=function(u,m){this.ondata||err(5),this.d&&err(4),this.ondata(strToU8(u),this.d=m||!1)},T}();browser.EncodeUTF8=EncodeUTF8;function strToU8(T,u){if(u){for(var m=new u8(T.length),A=0;A>1)),w=0,D=function(P){v[w++]=P},A=0;Av.length){var R=new u8(w+8+(S-A<<1));R.set(v),v=R}var L=T.charCodeAt(A);L<128||u?D(L):L<2048?(D(192|L>>6),D(128|L&63)):L>55295&&L<57344?(L=65536+(L&1047552)|T.charCodeAt(++A)&1023,D(240|L>>18),D(128|L>>12&63),D(128|L>>6&63),D(128|L&63)):(D(224|L>>12),D(128|L>>6&63),D(128|L&63))}return slc(v,0,w)}browser.strToU8=strToU8;function strFromU8(T,u){if(u){for(var m="",A=0;A65535&&err(9),u+=A+4}return u},wzh=function(T,u,m,A,S,v,w,D){var R=A.length,L=m.extra,P=D&&D.length,d=exfl(L);wbytes(T,u,w!=null?33639248:67324752),u+=4,w!=null&&(T[u++]=20,T[u++]=m.os),T[u]=20,u+=2,T[u++]=m.flag<<1|(v<0&&8),T[u++]=S&&8,T[u++]=m.compression&255,T[u++]=m.compression>>8;var E=new Date(m.mtime==null?Date.now():m.mtime),e=E.getFullYear()-1980;if((e<0||e>119)&&err(10),wbytes(T,u,e<<25|E.getMonth()+1<<21|E.getDate()<<16|E.getHours()<<11|E.getMinutes()<<5|E.getSeconds()>>1),u+=4,v!=-1&&(wbytes(T,u,m.crc),wbytes(T,u+4,v<0?-v-2:v),wbytes(T,u+8,m.size)),wbytes(T,u+12,R),wbytes(T,u+14,d),u+=16,w!=null&&(wbytes(T,u,P),wbytes(T,u+6,m.attrs),wbytes(T,u+10,w),u+=14),T.set(A,u),u+=R,d)for(var N in L){var q=L[N],z=q.length;wbytes(T,u,+N),wbytes(T,u+2,z),T.set(q,u+4),u+=4+z}return P&&(T.set(D,u),u+=P),u},wzf=function(T,u,m,A,S){wbytes(T,u,101010256),wbytes(T,u+8,m),wbytes(T,u+10,m),wbytes(T,u+12,A),wbytes(T,u+16,S)},ZipPassThrough=function(){function T(u){this.filename=u,this.c=crc(),this.size=0,this.compression=0}return T.prototype.process=function(u,m){this.ondata(null,u,m)},T.prototype.push=function(u,m){this.ondata||err(5),this.c.p(u),this.size+=u.length,m&&(this.crc=this.c.d()),this.process(u,m||!1)},T}();browser.ZipPassThrough=ZipPassThrough;var ZipDeflate=function(){function T(u,m){var A=this;m||(m={}),ZipPassThrough.call(this,u),this.d=new Deflate(m,function(S,v){A.ondata(null,S,v)}),this.compression=8,this.flag=dbf(m.level)}return T.prototype.process=function(u,m){try{this.d.push(u,m)}catch(A){this.ondata(A,null,m)}},T.prototype.push=function(u,m){ZipPassThrough.prototype.push.call(this,u,m)},T}();browser.ZipDeflate=ZipDeflate;var AsyncZipDeflate=function(){function T(u,m){var A=this;m||(m={}),ZipPassThrough.call(this,u),this.d=new AsyncDeflate(m,function(S,v,w){A.ondata(S,v,w)}),this.compression=8,this.flag=dbf(m.level),this.terminate=this.d.terminate}return T.prototype.process=function(u,m){this.d.push(u,m)},T.prototype.push=function(u,m){ZipPassThrough.prototype.push.call(this,u,m)},T}();browser.AsyncZipDeflate=AsyncZipDeflate;var Zip=function(){function T(u){this.ondata=u,this.u=[],this.d=1}return T.prototype.add=function(u){var m=this;if(this.ondata||err(5),this.d&2)this.ondata(err(4+(this.d&1)*8,0,1),null,!1);else{var A=strToU8(u.filename),S=A.length,v=u.comment,w=v&&strToU8(v),D=S!=u.filename.length||w&&v.length!=w.length,R=S+exfl(u.extra)+30;S>65535&&this.ondata(err(11,0,1),null,!1);var L=new u8(R);wzh(L,0,u,A,D,-1);var P=[L],d=function(){for(var z=0,e0=P;z65535&&d0(err(11,0,1),null),!c0)d0(null,j);else if(G<16e4)try{d0(null,deflateSync(j,y))}catch(S0){d0(S0,null)}else P.push(deflate$2(j,y,d0))},q=0;q65535&&err(11);var e0=P?deflateSync(R,L):R,H=e0.length,j=crc();j.p(R),A.push(mrg(L,{size:R.length,crc:j.d(),c:e0,f:d,m:N,u:E!=w.length||N&&e.length!=q,o:S,compression:P})),S+=30+E+z+H,v+=76+2*(E+z)+(q||0)+H}for(var y=new u8(v+22),Y=S,G=v-S,J=0;J0){var S=Math.min(this.c,u.length),v=u.subarray(0,S);if(this.c-=S,this.d?this.d.push(v,!this.c):this.k[0].push(v),u=u.subarray(S),u.length)return this.push(u,m)}else{var w=0,D=0,R=void 0,L=void 0;this.p.length?u.length?(L=new u8(this.p.length+u.length),L.set(this.p),L.set(u,this.p.length)):L=this.p:L=u;for(var P=L.length,d=this.c,E=d&&this.d,e=function(){var e0,H=b4(L,D);if(H==67324752){w=1,R=D,N.d=null,N.c=0;var j=b2(L,D+6),y=b2(L,D+8),Y=j&2048,G=j&8,J=b2(L,D+26),i0=b2(L,D+28);if(P>D+30+J+i0){var Q=[];N.k.unshift(Q),w=2;var f=b4(L,D+18),l0=b4(L,D+22),o0=strFromU8(L.subarray(D+30,D+=30+J),!Y);f==4294967295?(e0=G?[-2]:z64e(L,D),f=e0[0],l0=e0[1]):G&&(f=-1),D+=i0,N.c=f;var c0,d0={name:o0,compression:y,start:function(){if(d0.ondata||err(5),!f)d0.ondata(null,et,!0);else{var S0=A.o[y];S0||d0.ondata(err(14,"unknown compression type "+y,1),null,!1),c0=f<0?new S0(o0):new S0(o0,f,l0),c0.ondata=function(F0,ee,ie){d0.ondata(F0,ee,ie)};for(var p0=0,T0=Q;p0=0&&(d0.size=f,d0.originalSize=l0),N.onfile(d0)}return"break"}else if(d){if(H==134695760)return R=D+=12+(d==-2&&8),w=3,N.c=0,"break";if(H==33639248)return R=D-=4,w=3,N.c=0,"break"}},N=this;D65558)return w(err(13,0,1),null),S;var R=b2(T,D+8);if(R){var L=R,P=b4(T,D+16),d=P==4294967295||L==65535;if(d){var E=b4(T,D-12);d=b4(T,E)==101075792,d&&(L=R=b4(T,E+32),P=b4(T,E+48))}for(var e=u&&u.filter,N=function(z){var e0=zh(T,P,d),H=e0[0],j=e0[1],y=e0[2],Y=e0[3],G=e0[4],J=e0[5],i0=slzh(T,J);P=G;var Q=function(l0,o0){l0?(S(),w(l0,null)):(o0&&(v[Y]=o0),--R||w(null,v))};if(!e||e({name:Y,size:j,originalSize:y,compression:H}))if(!H)Q(null,slc(T,i0,i0+j));else if(H==8){var f=T.subarray(i0,i0+j);if(y<524288||j>.8*y)try{Q(null,inflateSync(f,{out:new u8(y)}))}catch(l0){Q(l0,null)}else A.push(inflate$2(f,{size:y},Q))}else Q(err(14,"unknown compression type "+H,1),null);else Q(null,null)},q=0;q65558)&&err(13);var S=b2(T,A+8);if(!S)return{};var v=b4(T,A+16),w=v==4294967295||S==65535;if(w){var D=b4(T,A-12);w=b4(T,D)==101075792,w&&(S=b4(T,D+32),v=b4(T,D+48))}for(var R=u&&u.filter,L=0;L=0;S--)w=w*256+v[S];return w}static getExtensionsAt(u,m,A,S){let v=[],w=m;for(;wS&&(D=!D,R=Ki.getIntAt(u,w,D),R+w>S))throw new Error("This does not appear to be a valid NIFTI extension");if(R%16!=0)throw new Error("This does not appear to be a NIFTI extension");let L=Ki.getIntAt(u,w+4,D),P=u.buffer.slice(w+8,w+R);console.log("extensionByteIndex: "+(w+8)+" esize: "+R),console.log(P);let d=new nifti_extension_1.NIFTIEXTENSION(R,L,P,D);v.push(d),w+=R}return v}static toArrayBuffer(u){var m,A,S;for(m=new ArrayBuffer(u.length),A=new Uint8Array(m),S=0;S>>1:u>>>1;m[A]=u}return m}static crc32(u){Ki.crcTable||(Ki.crcTable=Ki.makeCRCTable());const m=Ki.crcTable;let A=-1;for(var S=0;S>>8^m[(A^u.getUint8(S))&255];return(A^-1)>>>0}};$0(Ki,"crcTable",null),$0(Ki,"GUNZIP_MAGIC_COOKIE1",31),$0(Ki,"GUNZIP_MAGIC_COOKIE2",139),$0(Ki,"getByteAt",function(u,m){return u.getInt8(m)}),$0(Ki,"getShortAt",function(u,m,A){return u.getInt16(m,A)});let Utils=Ki;utilities$1.Utils=Utils;Object.defineProperty(nifti1,"__esModule",{value:!0});nifti1.NIFTI1=void 0;const utilities_1$1=utilities$1,Ne=class Ne{constructor(){$0(this,"littleEndian",!1);$0(this,"dim_info",0);$0(this,"dims",[]);$0(this,"intent_p1",0);$0(this,"intent_p2",0);$0(this,"intent_p3",0);$0(this,"intent_code",0);$0(this,"datatypeCode",0);$0(this,"numBitsPerVoxel",0);$0(this,"slice_start",0);$0(this,"slice_end",0);$0(this,"slice_code",0);$0(this,"pixDims",[]);$0(this,"vox_offset",0);$0(this,"scl_slope",1);$0(this,"scl_inter",0);$0(this,"xyzt_units",0);$0(this,"cal_max",0);$0(this,"cal_min",0);$0(this,"slice_duration",0);$0(this,"toffset",0);$0(this,"description","");$0(this,"aux_file","");$0(this,"intent_name","");$0(this,"qform_code",0);$0(this,"sform_code",0);$0(this,"quatern_a",0);$0(this,"quatern_b",0);$0(this,"quatern_c",0);$0(this,"quatern_d",0);$0(this,"qoffset_x",0);$0(this,"qoffset_y",0);$0(this,"qoffset_z",0);$0(this,"affine",[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);$0(this,"qfac",1);$0(this,"quatern_R");$0(this,"magic","0");$0(this,"isHDR",!1);$0(this,"extensionFlag",[0,0,0,0]);$0(this,"extensionSize",0);$0(this,"extensionCode",0);$0(this,"extensions",[]);$0(this,"getDatatypeCodeString",function(u){return u===Ne.TYPE_UINT8?"1-Byte Unsigned Integer":u===Ne.TYPE_INT16?"2-Byte Signed Integer":u===Ne.TYPE_INT32?"4-Byte Signed Integer":u===Ne.TYPE_FLOAT32?"4-Byte Float":u===Ne.TYPE_FLOAT64?"8-Byte Float":u===Ne.TYPE_RGB24?"RGB":u===Ne.TYPE_INT8?"1-Byte Signed Integer":u===Ne.TYPE_UINT16?"2-Byte Unsigned Integer":u===Ne.TYPE_UINT32?"4-Byte Unsigned Integer":u===Ne.TYPE_INT64?"8-Byte Signed Integer":u===Ne.TYPE_UINT64?"8-Byte Unsigned Integer":"Unknown"});$0(this,"getTransformCodeString",function(u){return u===Ne.XFORM_SCANNER_ANAT?"Scanner":u===Ne.XFORM_ALIGNED_ANAT?"Aligned":u===Ne.XFORM_TALAIRACH?"Talairach":u===Ne.XFORM_MNI_152?"MNI":"Unknown"});$0(this,"getUnitsCodeString",function(u){return u===Ne.UNITS_METER?"Meters":u===Ne.UNITS_MM?"Millimeters":u===Ne.UNITS_MICRON?"Microns":u===Ne.UNITS_SEC?"Seconds":u===Ne.UNITS_MSEC?"Milliseconds":u===Ne.UNITS_USEC?"Microseconds":u===Ne.UNITS_HZ?"Hz":u===Ne.UNITS_PPM?"PPM":u===Ne.UNITS_RADS?"Rads":"Unknown"});$0(this,"nifti_mat33_mul",function(u,m){var A=[[0,0,0],[0,0,0],[0,0,0]],S,v;for(S=0;S<3;S+=1)for(v=0;v<3;v+=1)A[S][v]=u[S][0]*m[0][v]+u[S][1]*m[1][v]+u[S][2]*m[2][v];return A});$0(this,"nifti_mat33_determ",function(u){var m,A,S,v,w,D,R,L,P;return m=u[0][0],A=u[0][1],S=u[0][2],v=u[1][0],w=u[1][1],D=u[1][2],R=u[2][0],L=u[2][1],P=u[2][2],m*w*P-m*L*D-v*A*P+v*L*S+R*A*D-R*w*S})}readHeader(u){var m=new DataView(u),A=utilities_1$1.Utils.getIntAt(m,0,this.littleEndian),S,v,w,D;if(A!==Ne.MAGIC_COOKIE&&(this.littleEndian=!0,A=utilities_1$1.Utils.getIntAt(m,0,this.littleEndian)),A!==Ne.MAGIC_COOKIE)throw new Error("This does not appear to be a NIFTI file!");for(this.dim_info=utilities_1$1.Utils.getByteAt(m,39),S=0;S<8;S+=1)D=40+S*2,this.dims[S]=utilities_1$1.Utils.getShortAt(m,D,this.littleEndian);for(this.intent_p1=utilities_1$1.Utils.getFloatAt(m,56,this.littleEndian),this.intent_p2=utilities_1$1.Utils.getFloatAt(m,60,this.littleEndian),this.intent_p3=utilities_1$1.Utils.getFloatAt(m,64,this.littleEndian),this.intent_code=utilities_1$1.Utils.getShortAt(m,68,this.littleEndian),this.datatypeCode=utilities_1$1.Utils.getShortAt(m,70,this.littleEndian),this.numBitsPerVoxel=utilities_1$1.Utils.getShortAt(m,72,this.littleEndian),this.slice_start=utilities_1$1.Utils.getShortAt(m,74,this.littleEndian),S=0;S<8;S+=1)D=76+S*4,this.pixDims[S]=utilities_1$1.Utils.getFloatAt(m,D,this.littleEndian);if(this.vox_offset=utilities_1$1.Utils.getFloatAt(m,108,this.littleEndian),this.scl_slope=utilities_1$1.Utils.getFloatAt(m,112,this.littleEndian),this.scl_inter=utilities_1$1.Utils.getFloatAt(m,116,this.littleEndian),this.slice_end=utilities_1$1.Utils.getShortAt(m,120,this.littleEndian),this.slice_code=utilities_1$1.Utils.getByteAt(m,122),this.xyzt_units=utilities_1$1.Utils.getByteAt(m,123),this.cal_max=utilities_1$1.Utils.getFloatAt(m,124,this.littleEndian),this.cal_min=utilities_1$1.Utils.getFloatAt(m,128,this.littleEndian),this.slice_duration=utilities_1$1.Utils.getFloatAt(m,132,this.littleEndian),this.toffset=utilities_1$1.Utils.getFloatAt(m,136,this.littleEndian),this.description=utilities_1$1.Utils.getStringAt(m,148,228),this.aux_file=utilities_1$1.Utils.getStringAt(m,228,252),this.qform_code=utilities_1$1.Utils.getShortAt(m,252,this.littleEndian),this.sform_code=utilities_1$1.Utils.getShortAt(m,254,this.littleEndian),this.quatern_b=utilities_1$1.Utils.getFloatAt(m,256,this.littleEndian),this.quatern_c=utilities_1$1.Utils.getFloatAt(m,260,this.littleEndian),this.quatern_d=utilities_1$1.Utils.getFloatAt(m,264,this.littleEndian),this.quatern_a=Math.sqrt(1-(Math.pow(this.quatern_b,2)+Math.pow(this.quatern_c,2)+Math.pow(this.quatern_d,2))),this.qoffset_x=utilities_1$1.Utils.getFloatAt(m,268,this.littleEndian),this.qoffset_y=utilities_1$1.Utils.getFloatAt(m,272,this.littleEndian),this.qoffset_z=utilities_1$1.Utils.getFloatAt(m,276,this.littleEndian),this.qform_code<1&&this.sform_code<1&&(this.affine[0][0]=this.pixDims[1],this.affine[1][1]=this.pixDims[2],this.affine[2][2]=this.pixDims[3]),this.qform_code>0&&this.sform_code0)for(v=0;v<3;v+=1)for(w=0;w<4;w+=1)D=280+(v*4+w)*4,this.affine[v][w]=utilities_1$1.Utils.getFloatAt(m,D,this.littleEndian);if(this.affine[3][0]=0,this.affine[3][1]=0,this.affine[3][2]=0,this.affine[3][3]=1,this.intent_name=utilities_1$1.Utils.getStringAt(m,328,344),this.magic=utilities_1$1.Utils.getStringAt(m,344,348),this.isHDR=this.magic===String.fromCharCode.apply(null,Ne.MAGIC_NUMBER2),m.byteLength>Ne.MAGIC_COOKIE){this.extensionFlag[0]=utilities_1$1.Utils.getByteAt(m,348),this.extensionFlag[1]=utilities_1$1.Utils.getByteAt(m,349),this.extensionFlag[2]=utilities_1$1.Utils.getByteAt(m,350),this.extensionFlag[3]=utilities_1$1.Utils.getByteAt(m,351);let R=!0;!this.isHDR&&this.vox_offset<=352&&(R=!1),m.byteLength<=368&&(R=!1),R&&this.extensionFlag[0]&&(this.extensions=utilities_1$1.Utils.getExtensionsAt(m,this.getExtensionLocation(),this.littleEndian,this.vox_offset),this.extensionSize=this.extensions[0].esize,this.extensionCode=this.extensions[0].ecode)}}toFormattedString(){var u=utilities_1$1.Utils.formatNumber,m="";return m+="Dim Info = "+this.dim_info+` +var zp=Object.defineProperty;var Hp=(T,u,m)=>u in T?zp(T,u,{enumerable:!0,configurable:!0,writable:!0,value:m}):T[u]=m;var $0=(T,u,m)=>(Hp(T,typeof u!="symbol"?u+"":u,m),m);(function(){const u=document.createElement("link").relList;if(u&&u.supports&&u.supports("modulepreload"))return;for(const S of document.querySelectorAll('link[rel="modulepreload"]'))A(S);new MutationObserver(S=>{for(const v of S)if(v.type==="childList")for(const w of v.addedNodes)w.tagName==="LINK"&&w.rel==="modulepreload"&&A(w)}).observe(document,{childList:!0,subtree:!0});function m(S){const v={};return S.integrity&&(v.integrity=S.integrity),S.referrerPolicy&&(v.referrerPolicy=S.referrerPolicy),S.crossOrigin==="use-credentials"?v.credentials="include":S.crossOrigin==="anonymous"?v.credentials="omit":v.credentials="same-origin",v}function A(S){if(S.ep)return;S.ep=!0;const v=m(S);fetch(S.href,v)}})();var EPSILON=1e-6,ARRAY_TYPE=typeof Float32Array<"u"?Float32Array:Array;Math.hypot||(Math.hypot=function(){for(var T=0,u=arguments.length;u--;)T+=arguments[u]*arguments[u];return Math.sqrt(T)});function create$4(){var T=new ARRAY_TYPE(9);return ARRAY_TYPE!=Float32Array&&(T[1]=0,T[2]=0,T[3]=0,T[5]=0,T[6]=0,T[7]=0),T[0]=1,T[4]=1,T[8]=1,T}function fromValues$4(T,u,m,A,S,v,w,D,R){var L=new ARRAY_TYPE(9);return L[0]=T,L[1]=u,L[2]=m,L[3]=A,L[4]=S,L[5]=v,L[6]=w,L[7]=D,L[8]=R,L}function multiply$1(T,u,m){var A=u[0],S=u[1],v=u[2],w=u[3],D=u[4],R=u[5],L=u[6],P=u[7],d=u[8],E=m[0],e=m[1],N=m[2],q=m[3],z=m[4],e0=m[5],H=m[6],j=m[7],y=m[8];return T[0]=E*A+e*w+N*L,T[1]=E*S+e*D+N*P,T[2]=E*v+e*R+N*d,T[3]=q*A+z*w+e0*L,T[4]=q*S+z*D+e0*P,T[5]=q*v+z*R+e0*d,T[6]=H*A+j*w+y*L,T[7]=H*S+j*D+y*P,T[8]=H*v+j*R+y*d,T}function create$3(){var T=new ARRAY_TYPE(16);return ARRAY_TYPE!=Float32Array&&(T[1]=0,T[2]=0,T[3]=0,T[4]=0,T[6]=0,T[7]=0,T[8]=0,T[9]=0,T[11]=0,T[12]=0,T[13]=0,T[14]=0),T[0]=1,T[5]=1,T[10]=1,T[15]=1,T}function clone$2(T){var u=new ARRAY_TYPE(16);return u[0]=T[0],u[1]=T[1],u[2]=T[2],u[3]=T[3],u[4]=T[4],u[5]=T[5],u[6]=T[6],u[7]=T[7],u[8]=T[8],u[9]=T[9],u[10]=T[10],u[11]=T[11],u[12]=T[12],u[13]=T[13],u[14]=T[14],u[15]=T[15],u}function copy$1(T,u){return T[0]=u[0],T[1]=u[1],T[2]=u[2],T[3]=u[3],T[4]=u[4],T[5]=u[5],T[6]=u[6],T[7]=u[7],T[8]=u[8],T[9]=u[9],T[10]=u[10],T[11]=u[11],T[12]=u[12],T[13]=u[13],T[14]=u[14],T[15]=u[15],T}function fromValues$3(T,u,m,A,S,v,w,D,R,L,P,d,E,e,N,q){var z=new ARRAY_TYPE(16);return z[0]=T,z[1]=u,z[2]=m,z[3]=A,z[4]=S,z[5]=v,z[6]=w,z[7]=D,z[8]=R,z[9]=L,z[10]=P,z[11]=d,z[12]=E,z[13]=e,z[14]=N,z[15]=q,z}function identity(T){return T[0]=1,T[1]=0,T[2]=0,T[3]=0,T[4]=0,T[5]=1,T[6]=0,T[7]=0,T[8]=0,T[9]=0,T[10]=1,T[11]=0,T[12]=0,T[13]=0,T[14]=0,T[15]=1,T}function transpose(T,u){if(T===u){var m=u[1],A=u[2],S=u[3],v=u[6],w=u[7],D=u[11];T[1]=u[4],T[2]=u[8],T[3]=u[12],T[4]=m,T[6]=u[9],T[7]=u[13],T[8]=A,T[9]=v,T[11]=u[14],T[12]=S,T[13]=w,T[14]=D}else T[0]=u[0],T[1]=u[4],T[2]=u[8],T[3]=u[12],T[4]=u[1],T[5]=u[5],T[6]=u[9],T[7]=u[13],T[8]=u[2],T[9]=u[6],T[10]=u[10],T[11]=u[14],T[12]=u[3],T[13]=u[7],T[14]=u[11],T[15]=u[15];return T}function invert(T,u){var m=u[0],A=u[1],S=u[2],v=u[3],w=u[4],D=u[5],R=u[6],L=u[7],P=u[8],d=u[9],E=u[10],e=u[11],N=u[12],q=u[13],z=u[14],e0=u[15],H=m*D-A*w,j=m*R-S*w,y=m*L-v*w,Y=A*R-S*D,G=A*L-v*D,J=S*L-v*R,i0=P*q-d*N,Q=P*z-E*N,f=P*e0-e*N,o0=d*z-E*q,l0=d*e0-e*q,c0=E*e0-e*z,d0=H*c0-j*l0+y*o0+Y*f-G*Q+J*i0;return d0?(d0=1/d0,T[0]=(D*c0-R*l0+L*o0)*d0,T[1]=(S*l0-A*c0-v*o0)*d0,T[2]=(q*J-z*G+e0*Y)*d0,T[3]=(E*G-d*J-e*Y)*d0,T[4]=(R*f-w*c0-L*Q)*d0,T[5]=(m*c0-S*f+v*Q)*d0,T[6]=(z*y-N*J-e0*j)*d0,T[7]=(P*J-E*y+e*j)*d0,T[8]=(w*l0-D*f+L*i0)*d0,T[9]=(A*f-m*l0-v*i0)*d0,T[10]=(N*G-q*y+e0*H)*d0,T[11]=(d*y-P*G-e*H)*d0,T[12]=(D*Q-w*o0-R*i0)*d0,T[13]=(m*o0-A*Q+S*i0)*d0,T[14]=(q*j-N*Y-z*H)*d0,T[15]=(P*Y-d*j+E*H)*d0,T):null}function multiply(T,u,m){var A=u[0],S=u[1],v=u[2],w=u[3],D=u[4],R=u[5],L=u[6],P=u[7],d=u[8],E=u[9],e=u[10],N=u[11],q=u[12],z=u[13],e0=u[14],H=u[15],j=m[0],y=m[1],Y=m[2],G=m[3];return T[0]=j*A+y*D+Y*d+G*q,T[1]=j*S+y*R+Y*E+G*z,T[2]=j*v+y*L+Y*e+G*e0,T[3]=j*w+y*P+Y*N+G*H,j=m[4],y=m[5],Y=m[6],G=m[7],T[4]=j*A+y*D+Y*d+G*q,T[5]=j*S+y*R+Y*E+G*z,T[6]=j*v+y*L+Y*e+G*e0,T[7]=j*w+y*P+Y*N+G*H,j=m[8],y=m[9],Y=m[10],G=m[11],T[8]=j*A+y*D+Y*d+G*q,T[9]=j*S+y*R+Y*E+G*z,T[10]=j*v+y*L+Y*e+G*e0,T[11]=j*w+y*P+Y*N+G*H,j=m[12],y=m[13],Y=m[14],G=m[15],T[12]=j*A+y*D+Y*d+G*q,T[13]=j*S+y*R+Y*E+G*z,T[14]=j*v+y*L+Y*e+G*e0,T[15]=j*w+y*P+Y*N+G*H,T}function translate(T,u,m){var A=m[0],S=m[1],v=m[2],w,D,R,L,P,d,E,e,N,q,z,e0;return u===T?(T[12]=u[0]*A+u[4]*S+u[8]*v+u[12],T[13]=u[1]*A+u[5]*S+u[9]*v+u[13],T[14]=u[2]*A+u[6]*S+u[10]*v+u[14],T[15]=u[3]*A+u[7]*S+u[11]*v+u[15]):(w=u[0],D=u[1],R=u[2],L=u[3],P=u[4],d=u[5],E=u[6],e=u[7],N=u[8],q=u[9],z=u[10],e0=u[11],T[0]=w,T[1]=D,T[2]=R,T[3]=L,T[4]=P,T[5]=d,T[6]=E,T[7]=e,T[8]=N,T[9]=q,T[10]=z,T[11]=e0,T[12]=w*A+P*S+N*v+u[12],T[13]=D*A+d*S+q*v+u[13],T[14]=R*A+E*S+z*v+u[14],T[15]=L*A+e*S+e0*v+u[15]),T}function scale$3(T,u,m){var A=m[0],S=m[1],v=m[2];return T[0]=u[0]*A,T[1]=u[1]*A,T[2]=u[2]*A,T[3]=u[3]*A,T[4]=u[4]*S,T[5]=u[5]*S,T[6]=u[6]*S,T[7]=u[7]*S,T[8]=u[8]*v,T[9]=u[9]*v,T[10]=u[10]*v,T[11]=u[11]*v,T[12]=u[12],T[13]=u[13],T[14]=u[14],T[15]=u[15],T}function rotateX(T,u,m){var A=Math.sin(m),S=Math.cos(m),v=u[4],w=u[5],D=u[6],R=u[7],L=u[8],P=u[9],d=u[10],E=u[11];return u!==T&&(T[0]=u[0],T[1]=u[1],T[2]=u[2],T[3]=u[3],T[12]=u[12],T[13]=u[13],T[14]=u[14],T[15]=u[15]),T[4]=v*S+L*A,T[5]=w*S+P*A,T[6]=D*S+d*A,T[7]=R*S+E*A,T[8]=L*S-v*A,T[9]=P*S-w*A,T[10]=d*S-D*A,T[11]=E*S-R*A,T}function rotateZ(T,u,m){var A=Math.sin(m),S=Math.cos(m),v=u[0],w=u[1],D=u[2],R=u[3],L=u[4],P=u[5],d=u[6],E=u[7];return u!==T&&(T[8]=u[8],T[9]=u[9],T[10]=u[10],T[11]=u[11],T[12]=u[12],T[13]=u[13],T[14]=u[14],T[15]=u[15]),T[0]=v*S+L*A,T[1]=w*S+P*A,T[2]=D*S+d*A,T[3]=R*S+E*A,T[4]=L*S-v*A,T[5]=P*S-w*A,T[6]=d*S-D*A,T[7]=E*S-R*A,T}function fromRotation(T,u,m){var A=m[0],S=m[1],v=m[2],w=Math.hypot(A,S,v),D,R,L;return w0&&(v=1/Math.sqrt(v)),T[0]=u[0]*v,T[1]=u[1]*v,T[2]=u[2]*v,T}function dot(T,u){return T[0]*u[0]+T[1]*u[1]+T[2]*u[2]}function cross(T,u,m){var A=u[0],S=u[1],v=u[2],w=m[0],D=m[1],R=m[2];return T[0]=S*R-v*D,T[1]=v*w-A*R,T[2]=A*D-S*w,T}function lerp(T,u,m,A){var S=u[0],v=u[1],w=u[2];return T[0]=S+A*(m[0]-S),T[1]=v+A*(m[1]-v),T[2]=w+A*(m[2]-w),T}function angle(T,u){var m=T[0],A=T[1],S=T[2],v=u[0],w=u[1],D=u[2],R=Math.sqrt(m*m+A*A+S*S),L=Math.sqrt(v*v+w*w+D*D),P=R*L,d=P&&dot(T,u)/P;return Math.acos(Math.min(Math.max(d,-1),1))}var sub$1=subtract$1,len=length$1;(function(){var T=create$2();return function(u,m,A,S,v,w){var D,R;for(m||(m=3),A||(A=0),S?R=Math.min(S*m+A,u.length):R=u.length,D=A;D0&&(S=1/Math.sqrt(S)),T[0]=u[0]*S,T[1]=u[1]*S,T}(function(){var T=create();return function(u,m,A,S,v,w){var D,R;for(m||(m=2),A||(A=0),S?R=Math.min(S*m+A,u.length):R=u.length,D=A;D256){for(BUFFER=Array(T=256);T--;)BUFFER[T]=256*Math.random()|0;T=IDX=0}for(;T<16;T++)u=BUFFER[IDX+T],T==6?m+=HEX[u&15|64]:T==8?m+=HEX[u&63|128]:m+=HEX[u],T&1&&T>1&&T<11&&(m+="-");return IDX++,m}var u8$1=Uint8Array,u16$1=Uint16Array,i32$1=Int32Array,fleb$1=new u8$1([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),fdeb$1=new u8$1([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),clim$1=new u8$1([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),freb$1=function(T,u){for(var m=new u16$1(31),A=0;A<31;++A)m[A]=u+=1<>1|(i$1&21845)<<1;x$1=(x$1&52428)>>2|(x$1&13107)<<2,x$1=(x$1&61680)>>4|(x$1&3855)<<4,rev$1[i$1]=((x$1&65280)>>8|(x$1&255)<<8)>>1}var hMap$1=function(T,u,m){for(var A=T.length,S=0,v=new u16$1(u);S>R]=L}else for(D=new u16$1(A),S=0;S>15-T[S]);return D},flt$1=new u8$1(288);for(var i$1=0;i$1<144;++i$1)flt$1[i$1]=8;for(var i$1=144;i$1<256;++i$1)flt$1[i$1]=9;for(var i$1=256;i$1<280;++i$1)flt$1[i$1]=7;for(var i$1=280;i$1<288;++i$1)flt$1[i$1]=8;var fdt$1=new u8$1(32);for(var i$1=0;i$1<32;++i$1)fdt$1[i$1]=5;var flm$1=hMap$1(flt$1,9,0),flrm$1=hMap$1(flt$1,9,1),fdm$1=hMap$1(fdt$1,5,0),fdrm$1=hMap$1(fdt$1,5,1),max$1=function(T){for(var u=T[0],m=1;mu&&(u=T[m]);return u},bits$1=function(T,u,m){var A=u/8|0;return(T[A]|T[A+1]<<8)>>(u&7)&m},bits16$1=function(T,u){var m=u/8|0;return(T[m]|T[m+1]<<8|T[m+2]<<16)>>(u&7)},shft$1=function(T){return(T+7)/8|0},slc$1=function(T,u,m){return(u==null||u<0)&&(u=0),(m==null||m>T.length)&&(m=T.length),new u8$1(T.subarray(u,m))},ec$1=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],err$1=function(T,u,m){var A=new Error(u||ec$1[T]);if(A.code=T,Error.captureStackTrace&&Error.captureStackTrace(A,err$1),!m)throw A;return A},inflt$1=function(T,u,m,A){var S=T.length,v=A?A.length:0;if(!S||u.f&&!u.l)return m||new u8$1(0);var w=!m,D=w||u.i!=2,R=u.i;w&&(m=new u8$1(S*3));var L=function(Ve){var qe=m.length;if(Ve>qe){var Z0=new u8$1(Math.max(qe*2,Ve));Z0.set(m),m=Z0}},P=u.f||0,d=u.p||0,E=u.b||0,e=u.l,N=u.d,q=u.m,z=u.n,e0=S*8;do{if(!e){P=bits$1(T,d,1);var H=bits$1(T,d+1,3);if(d+=3,H)if(H==1)e=flrm$1,N=fdrm$1,q=9,z=5;else if(H==2){var G=bits$1(T,d,31)+257,J=bits$1(T,d+10,15)+4,i0=G+bits$1(T,d+5,31)+1;d+=14;for(var Q=new u8$1(i0),f=new u8$1(19),o0=0;o0>4;if(j<16)Q[o0++]=j;else{var g0=0,T0=0;for(j==16?(T0=3+bits$1(T,d,3),d+=2,g0=Q[o0-1]):j==17?(T0=3+bits$1(T,d,7),d+=3):j==18&&(T0=11+bits$1(T,d,127),d+=7);T0--;)Q[o0++]=g0}}var C0=Q.subarray(0,G),F0=Q.subarray(G);q=max$1(C0),z=max$1(F0),e=hMap$1(C0,q,1),N=hMap$1(F0,z,1)}else err$1(1);else{var j=shft$1(d)+4,y=T[j-4]|T[j-3]<<8,Y=j+y;if(Y>S){R&&err$1(0);break}D&&L(E+y),m.set(T.subarray(j,Y),E),u.b=E+=y,u.p=d=Y*8,u.f=P;continue}if(d>e0){R&&err$1(0);break}}D&&L(E+131072);for(var ee=(1<>4;if(d+=g0&15,d>e0){R&&err$1(0);break}if(g0||err$1(2),Ne<256)m[E++]=Ne;else if(Ne==256){ke=d,e=null;break}else{var De=Ne-254;if(Ne>264){var o0=Ne-257,I0=fleb$1[o0];De=bits$1(T,d,(1<>4;Le||err$1(3),d+=Le&15;var F0=fd$1[Ge];if(Ge>3){var I0=fdeb$1[Ge];F0+=bits16$1(T,d)&(1<e0){R&&err$1(0);break}D&&L(E+131072);var ii=E+De;if(E>8},wbits16$1=function(T,u,m){m<<=u&7;var A=u/8|0;T[A]|=m,T[A+1]|=m>>8,T[A+2]|=m>>16},hTree$1=function(T,u){for(var m=[],A=0;AE&&(E=v[A].s);var e=new u16$1(E+1),N=ln$1(m[P-1],e,0);if(N>u){var A=0,q=0,z=N-u,e0=1<u)q+=e0-(1<>=z;q>0;){var j=v[A].s;e[j]=0&&q;--A){var y=v[A].s;e[y]==u&&(--e[y],++q)}N=u}return{t:new u8$1(e),l:N}},ln$1=function(T,u,m){return T.s==-1?Math.max(ln$1(T.l,u,m+1),ln$1(T.r,u,m+1)):u[T.s]=m},lc$1=function(T){for(var u=T.length;u&&!T[--u];);for(var m=new u16$1(++u),A=0,S=T[0],v=1,w=function(R){m[A++]=R},D=1;D<=u;++D)if(T[D]==S&&D!=u)++v;else{if(!S&&v>2){for(;v>138;v-=138)w(32754);v>2&&(w(v>10?v-11<<5|28690:v-3<<5|12305),v=0)}else if(v>3){for(w(S),--v;v>6;v-=6)w(8304);v>2&&(w(v-3<<5|8208),v=0)}for(;v--;)w(S);v=1,S=T[D]}return{c:m.subarray(0,A),n:u}},clen$1=function(T,u){for(var m=0,A=0;A>8,T[S+2]=T[S]^255,T[S+3]=T[S+1]^255;for(var v=0;v4&&!f[clim$1[l0-1]];--l0);var c0=L+5<<3,d0=clen$1(S,flt$1)+clen$1(v,fdt$1)+w,S0=clen$1(S,E)+clen$1(v,q)+w+14+3*l0+clen$1(J,f)+2*J[16]+3*J[17]+7*J[18];if(R>=0&&c0<=d0&&c0<=S0)return wfblk$1(u,P,T.subarray(R,R+L));var g0,T0,C0,F0;if(wbits$1(u,P,1+(S015&&(wbits$1(u,P,Ne[i0]>>5&127),P+=Ne[i0]>>12)}}else g0=flm$1,T0=flt$1,C0=fdm$1,F0=fdt$1;for(var i0=0;i0255){var De=I0>>18&31;wbits16$1(u,P,g0[De+257]),P+=T0[De+257],De>7&&(wbits$1(u,P,I0>>23&31),P+=fleb$1[De]);var Le=I0&31;wbits16$1(u,P,C0[Le]),P+=F0[Le],Le>3&&(wbits16$1(u,P,I0>>5&8191),P+=fdeb$1[Le])}else wbits16$1(u,P,g0[I0]),P+=T0[I0]}return wbits16$1(u,P,g0[256]),P+T0[256]},deo$1=new i32$1([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),et$1=new u8$1(0),dflt$1=function(T,u,m,A,S,v){var w=v.z||T.length,D=new u8$1(A+w+5*(1+Math.ceil(w/7e3))+S),R=D.subarray(A,D.length-S),L=v.l,P=(v.r||0)&7;if(u){P&&(R[0]=v.r>>3);for(var d=deo$1[u-1],E=d>>13,e=d&8191,N=(1<7e3||f>24576)&&(g0>423||!L)){P=wblk$1(T,R,0,y,Y,G,i0,f,l0,Q-l0,P),f=J=i0=0,l0=Q;for(var T0=0;T0<286;++T0)Y[T0]=0;for(var T0=0;T0<30;++T0)G[T0]=0}var C0=2,F0=0,ee=e,ie=d0-S0&32767;if(g0>2&&c0==j(Q-ie))for(var ke=Math.min(E,g0)-1,Ne=Math.min(32767,Q),De=Math.min(258,g0);ie<=Ne&&--ee&&d0!=S0;){if(T[Q+C0]==T[Q+C0-ie]){for(var I0=0;I0C0){if(C0=I0,F0=ie,I0>ke)break;for(var Le=Math.min(ie,I0-2),Ge=0,T0=0;T0Ge&&(Ge=ei,S0=ii)}}}d0=S0,S0=q[d0],ie+=d0-S0&32767}if(F0){y[f++]=268435456|revfl$1[C0]<<18|revfd$1[F0];var Ve=revfl$1[C0]&31,qe=revfd$1[F0]&31;i0+=fleb$1[Ve]+fdeb$1[qe],++Y[257+Ve],++G[qe],o0=Q+C0,++J}else y[f++]=T[Q],++Y[T[Q]]}}for(Q=Math.max(Q,o0);Q=w&&(R[P/8|0]=L,Z0=w),P=wfblk$1(R,P+1,T.subarray(Q,Z0))}v.i=w}return slc$1(D,0,A+shft$1(P)+S)},crct$1=function(){for(var T=new Int32Array(256),u=0;u<256;++u){for(var m=u,A=9;--A;)m=(m&1&&-306674912)^m>>>1;T[u]=m}return T}(),crc$1=function(){var T=-1;return{p:function(u){for(var m=T,A=0;A>>8;T=m},d:function(){return~T}}},dopt$1=function(T,u,m,A,S){if(!S&&(S={l:1},u.dictionary)){var v=u.dictionary.subarray(-32768),w=new u8$1(v.length+T.length);w.set(v),w.set(T,v.length),T=w,S.w=v.length}return dflt$1(T,u.level==null?6:u.level,u.mem==null?S.l?Math.ceil(Math.max(8,Math.min(13,Math.log(T.length)))*1.5):20:12+u.mem,m,A,S)},b2$1=function(T,u){return T[u]|T[u+1]<<8},b4$1=function(T,u){return(T[u]|T[u+1]<<8|T[u+2]<<16|T[u+3]<<24)>>>0},b8$1=function(T,u){return b4$1(T,u)+b4$1(T,u+4)*4294967296},wbytes$1=function(T,u,m){for(;m;++u)T[u]=m,m>>>=8},gzh$1=function(T,u){var m=u.filename;if(T[0]=31,T[1]=139,T[2]=8,T[8]=u.level<2?4:u.level==9?2:0,T[9]=3,u.mtime!=0&&wbytes$1(T,4,Math.floor(new Date(u.mtime||Date.now())/1e3)),m){T[3]=8;for(var A=0;A<=m.length;++A)T[A+10]=m.charCodeAt(A)}},gzs$1=function(T){(T[0]!=31||T[1]!=139||T[2]!=8)&&err$1(6,"invalid gzip data");var u=T[3],m=10;u&4&&(m+=(T[10]|T[11]<<8)+2);for(var A=(u>>3&1)+(u>>4&1);A>0;A-=!T[m++]);return m+(u&2)},gzl$1=function(T){var u=T.length;return(T[u-4]|T[u-3]<<8|T[u-2]<<16|T[u-1]<<24)>>>0},gzhl$1=function(T){return 10+(T.filename?T.filename.length+1:0)},zls$1=function(T,u){return((T[0]&15)!=8||T[0]>>4>7||(T[0]<<8|T[1])%31)&&err$1(6,"invalid zlib data"),(T[1]>>5&1)==+!u&&err$1(6,"invalid zlib data: "+(T[1]&32?"need":"unexpected")+" dictionary"),(T[1]>>3&4)+2};function StrmOpt$1(T,u){return typeof T=="function"&&(u=T,T={}),this.ondata=u,T}var Inflate$1=function(){function T(u,m){typeof u=="function"&&(m=u,u={}),this.ondata=m;var A=u&&u.dictionary&&u.dictionary.subarray(-32768);this.s={i:0,b:A?A.length:0},this.o=new u8$1(32768),this.p=new u8$1(0),A&&this.o.set(A)}return T.prototype.e=function(u){if(this.ondata||err$1(5),this.d&&err$1(4),!this.p.length)this.p=u;else if(u.length){var m=new u8$1(this.p.length+u.length);m.set(this.p),m.set(u,this.p.length),this.p=m}},T.prototype.c=function(u){this.s.i=+(this.d=u||!1);var m=this.s.b,A=inflt$1(this.p,this.s,this.o);this.ondata(slc$1(A,m,this.s.b),this.d),this.o=slc$1(A,this.s.b-32768),this.s.b=this.o.length,this.p=slc$1(this.p,this.s.p/8|0),this.s.p&=7},T.prototype.push=function(u,m){this.e(u),this.c(m)},T}();function inflateSync$1(T,u){return inflt$1(T,{i:2},u&&u.out,u&&u.dictionary)}function gzipSync$1(T,u){u||(u={});var m=crc$1(),A=T.length;m.p(T);var S=dopt$1(T,u,gzhl$1(u),8),v=S.length;return gzh$1(S,u),wbytes$1(S,v-8,m.d()),wbytes$1(S,v-4,A),S}var Gunzip$1=function(){function T(u,m){this.v=1,this.r=0,Inflate$1.call(this,u,m)}return T.prototype.push=function(u,m){if(Inflate$1.prototype.e.call(this,u),this.r+=u.length,this.v){var A=this.p.subarray(this.v-1),S=A.length>3?gzs$1(A):4;if(S>A.length){if(!m)return}else this.v>1&&this.onmember&&this.onmember(this.r-A.length);this.p=A.subarray(S),this.v=0}Inflate$1.prototype.c.call(this,m),this.s.f&&!this.s.l&&!m&&(this.v=shft$1(this.s.p)+9,this.s={i:0},this.o=new u8$1(0),this.push(new u8$1(0),m))},T}();function gunzipSync$1(T,u){var m=gzs$1(T);return m+8>T.length&&err$1(6,"invalid gzip data"),inflt$1(T.subarray(m,-8),{i:2},u&&u.out||new u8$1(gzl$1(T)),u&&u.dictionary)}var Unzlib$1=function(){function T(u,m){Inflate$1.call(this,u,m),this.v=u&&u.dictionary?2:1}return T.prototype.push=function(u,m){if(Inflate$1.prototype.e.call(this,u),this.v){if(this.p.length<6&&!m)return;this.p=this.p.subarray(zls$1(this.p,this.v-1)),this.v=0}m&&(this.p.length<4&&err$1(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),Inflate$1.prototype.c.call(this,m)},T}();function unzlibSync$1(T,u){return inflt$1(T.subarray(zls$1(T,u&&u.dictionary),-4),{i:2},u&&u.out,u&&u.dictionary)}var Decompress$1=function(){function T(u,m){this.o=StrmOpt$1.call(this,u,m)||{},this.G=Gunzip$1,this.I=Inflate$1,this.Z=Unzlib$1}return T.prototype.i=function(){var u=this;this.s.ondata=function(m,A){u.ondata(m,A)}},T.prototype.push=function(u,m){if(this.ondata||err$1(5),this.s)this.s.push(u,m);else{if(this.p&&this.p.length){var A=new u8$1(this.p.length+u.length);A.set(this.p),A.set(u,this.p.length)}else this.p=u;this.p.length>2&&(this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(this.o):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,m),this.p=null)}},T}();function decompressSync$1(T,u){return T[0]==31&&T[1]==139&&T[2]==8?gunzipSync$1(T,u):(T[0]&15)!=8||T[0]>>4>7||(T[0]<<8|T[1])%31?inflateSync$1(T,u):unzlibSync$1(T,u)}var te$1=typeof TextEncoder<"u"&&new TextEncoder,td$1=typeof TextDecoder<"u"&&new TextDecoder,tds$1=0;try{td$1.decode(et$1,{stream:!0}),tds$1=1}catch{}var dutf8$1=function(T){for(var u="",m=0;;){var A=T[m++],S=(A>127)+(A>223)+(A>239);if(m+S>T.length)return{s:u,r:slc$1(T,m-1)};S?S==3?(A=((A&15)<<18|(T[m++]&63)<<12|(T[m++]&63)<<6|T[m++]&63)-65536,u+=String.fromCharCode(55296|A>>10,56320|A&1023)):S&1?u+=String.fromCharCode((A&31)<<6|T[m++]&63):u+=String.fromCharCode((A&15)<<12|(T[m++]&63)<<6|T[m++]&63):u+=String.fromCharCode(A)}};function strToU8$1(T,u){if(u){for(var m=new u8$1(T.length),A=0;A>1)),w=0,D=function(P){v[w++]=P},A=0;Av.length){var R=new u8$1(w+8+(S-A<<1));R.set(v),v=R}var L=T.charCodeAt(A);L<128||u?D(L):L<2048?(D(192|L>>6),D(128|L&63)):L>55295&&L<57344?(L=65536+(L&1047552)|T.charCodeAt(++A)&1023,D(240|L>>18),D(128|L>>12&63),D(128|L>>6&63),D(128|L&63)):(D(224|L>>12),D(128|L>>6&63),D(128|L&63))}return slc$1(v,0,w)}function strFromU8$1(T,u){if(u){for(var m="",A=0;A65558)&&err$1(13);var S=b2$1(T,A+8);if(!S)return{};var v=b4$1(T,A+16),w=v==4294967295||S==65535;if(w){var D=b4$1(T,A-12);w=b4$1(T,D)==101075792,w&&(S=b4$1(T,D+32),v=b4$1(T,D+48))}for(var R=u&&u.filter,L=0;L{const m=(S,v)=>(T.set(v,S),S),A=S=>{if(T.has(S))return T.get(S);const[v,w]=u[S];switch(v){case PRIMITIVE:case VOID:return m(w,S);case ARRAY:{const D=m([],S);for(const R of w)D.push(A(R));return D}case OBJECT:{const D=m({},S);for(const[R,L]of w)D[A(R)]=A(L);return D}case DATE:return m(new Date(w),S);case REGEXP:{const{source:D,flags:R}=w;return m(new RegExp(D,R),S)}case MAP:{const D=m(new Map,S);for(const[R,L]of w)D.set(A(R),A(L));return D}case SET:{const D=m(new Set,S);for(const R of w)D.add(A(R));return D}case ERROR:{const{name:D,message:R}=w;return m(new env[D](R),S)}case BIGINT:return m(BigInt(w),S);case"BigInt":return m(Object(BigInt(w)),S)}return m(new env[v](w),S)};return A},deserialize=T=>deserializer(new Map,T)(0),EMPTY="",{toString}={},{keys}=Object,typeOf=T=>{const u=typeof T;if(u!=="object"||!T)return[PRIMITIVE,u];const m=toString.call(T).slice(8,-1);switch(m){case"Array":return[ARRAY,EMPTY];case"Object":return[OBJECT,EMPTY];case"Date":return[DATE,EMPTY];case"RegExp":return[REGEXP,EMPTY];case"Map":return[MAP,EMPTY];case"Set":return[SET,EMPTY]}return m.includes("Array")?[ARRAY,m]:m.includes("Error")?[ERROR,m]:[OBJECT,m]},shouldSkip=([T,u])=>T===PRIMITIVE&&(u==="function"||u==="symbol"),serializer=(T,u,m,A)=>{const S=(w,D)=>{const R=A.push(w)-1;return m.set(D,R),R},v=w=>{if(m.has(w))return m.get(w);let[D,R]=typeOf(w);switch(D){case PRIMITIVE:{let P=w;switch(R){case"bigint":D=BIGINT,P=w.toString();break;case"function":case"symbol":if(T)throw new TypeError("unable to serialize "+R);P=null;break;case"undefined":return S([VOID],w)}return S([D,P],w)}case ARRAY:{if(R)return S([R,[...w]],w);const P=[],d=S([D,P],w);for(const E of w)P.push(v(E));return d}case OBJECT:{if(R)switch(R){case"BigInt":return S([R,w.toString()],w);case"Boolean":case"Number":case"String":return S([R,w.valueOf()],w)}if(u&&"toJSON"in w)return v(w.toJSON());const P=[],d=S([D,P],w);for(const E of keys(w))(T||!shouldSkip(typeOf(w[E])))&&P.push([v(E),v(w[E])]);return d}case DATE:return S([D,w.toISOString()],w);case REGEXP:{const{source:P,flags:d}=w;return S([D,{source:P,flags:d}],w)}case MAP:{const P=[],d=S([D,P],w);for(const[E,e]of w)(T||!(shouldSkip(typeOf(E))||shouldSkip(typeOf(e))))&&P.push([v(E),v(e)]);return d}case SET:{const P=[],d=S([D,P],w);for(const E of w)(T||!shouldSkip(typeOf(E)))&&P.push(v(E));return d}}const{message:L}=w;return S([D,{name:R,message:L}],w)};return v},serialize=(T,{json:u,lossy:m}={})=>{const A=[];return serializer(!(u||m),!!u,new Map,A)(T),A};var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(T){return T&&T.__esModule&&Object.prototype.hasOwnProperty.call(T,"default")?T.default:T}function getAugmentedNamespace(T){if(T.__esModule)return T;var u=T.default;if(typeof u=="function"){var m=function A(){return this instanceof A?Reflect.construct(u,arguments,this.constructor):u.apply(this,arguments)};m.prototype=u.prototype}else m={};return Object.defineProperty(m,"__esModule",{value:!0}),Object.keys(T).forEach(function(A){var S=Object.getOwnPropertyDescriptor(T,A);Object.defineProperty(m,A,S.get?S:{enumerable:!0,get:function(){return T[A]}})}),m}var arrayEqual=function(u,m){var A=u.length;if(u===m)return!0;if(A!==m.length)return!1;for(var S=0;S>1|(i&21845)<<1;x=(x&52428)>>2|(x&13107)<<2,x=(x&61680)>>4|(x&3855)<<4,rev[i]=((x&65280)>>8|(x&255)<<8)>>1}var hMap=function(T,u,m){for(var A=T.length,S=0,v=new u16(u);S>R]=L}else for(D=new u16(A),S=0;S>15-T[S]);return D},flt=new u8(288);for(var i=0;i<144;++i)flt[i]=8;for(var i=144;i<256;++i)flt[i]=9;for(var i=256;i<280;++i)flt[i]=7;for(var i=280;i<288;++i)flt[i]=8;var fdt=new u8(32);for(var i=0;i<32;++i)fdt[i]=5;var flm=hMap(flt,9,0),flrm=hMap(flt,9,1),fdm=hMap(fdt,5,0),fdrm=hMap(fdt,5,1),max=function(T){for(var u=T[0],m=1;mu&&(u=T[m]);return u},bits=function(T,u,m){var A=u/8|0;return(T[A]|T[A+1]<<8)>>(u&7)&m},bits16=function(T,u){var m=u/8|0;return(T[m]|T[m+1]<<8|T[m+2]<<16)>>(u&7)},shft=function(T){return(T+7)/8|0},slc=function(T,u,m){return(u==null||u<0)&&(u=0),(m==null||m>T.length)&&(m=T.length),new u8(T.subarray(u,m))};browser.FlateErrorCode={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14};var ec=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],err=function(T,u,m){var A=new Error(u||ec[T]);if(A.code=T,Error.captureStackTrace&&Error.captureStackTrace(A,err),!m)throw A;return A},inflt=function(T,u,m,A){var S=T.length,v=A?A.length:0;if(!S||u.f&&!u.l)return m||new u8(0);var w=!m,D=w||u.i!=2,R=u.i;w&&(m=new u8(S*3));var L=function(Ve){var qe=m.length;if(Ve>qe){var Z0=new u8(Math.max(qe*2,Ve));Z0.set(m),m=Z0}},P=u.f||0,d=u.p||0,E=u.b||0,e=u.l,N=u.d,q=u.m,z=u.n,e0=S*8;do{if(!e){P=bits(T,d,1);var H=bits(T,d+1,3);if(d+=3,H)if(H==1)e=flrm,N=fdrm,q=9,z=5;else if(H==2){var G=bits(T,d,31)+257,J=bits(T,d+10,15)+4,i0=G+bits(T,d+5,31)+1;d+=14;for(var Q=new u8(i0),f=new u8(19),o0=0;o0>4;if(j<16)Q[o0++]=j;else{var g0=0,T0=0;for(j==16?(T0=3+bits(T,d,3),d+=2,g0=Q[o0-1]):j==17?(T0=3+bits(T,d,7),d+=3):j==18&&(T0=11+bits(T,d,127),d+=7);T0--;)Q[o0++]=g0}}var C0=Q.subarray(0,G),F0=Q.subarray(G);q=max(C0),z=max(F0),e=hMap(C0,q,1),N=hMap(F0,z,1)}else err(1);else{var j=shft(d)+4,y=T[j-4]|T[j-3]<<8,Y=j+y;if(Y>S){R&&err(0);break}D&&L(E+y),m.set(T.subarray(j,Y),E),u.b=E+=y,u.p=d=Y*8,u.f=P;continue}if(d>e0){R&&err(0);break}}D&&L(E+131072);for(var ee=(1<>4;if(d+=g0&15,d>e0){R&&err(0);break}if(g0||err(2),Ne<256)m[E++]=Ne;else if(Ne==256){ke=d,e=null;break}else{var De=Ne-254;if(Ne>264){var o0=Ne-257,I0=fleb[o0];De=bits(T,d,(1<>4;Le||err(3),d+=Le&15;var F0=fd[Ge];if(Ge>3){var I0=fdeb[Ge];F0+=bits16(T,d)&(1<e0){R&&err(0);break}D&&L(E+131072);var ii=E+De;if(E>8},wbits16=function(T,u,m){m<<=u&7;var A=u/8|0;T[A]|=m,T[A+1]|=m>>8,T[A+2]|=m>>16},hTree=function(T,u){for(var m=[],A=0;AE&&(E=v[A].s);var e=new u16(E+1),N=ln(m[P-1],e,0);if(N>u){var A=0,q=0,z=N-u,e0=1<u)q+=e0-(1<>=z;q>0;){var j=v[A].s;e[j]=0&&q;--A){var y=v[A].s;e[y]==u&&(--e[y],++q)}N=u}return{t:new u8(e),l:N}},ln=function(T,u,m){return T.s==-1?Math.max(ln(T.l,u,m+1),ln(T.r,u,m+1)):u[T.s]=m},lc=function(T){for(var u=T.length;u&&!T[--u];);for(var m=new u16(++u),A=0,S=T[0],v=1,w=function(R){m[A++]=R},D=1;D<=u;++D)if(T[D]==S&&D!=u)++v;else{if(!S&&v>2){for(;v>138;v-=138)w(32754);v>2&&(w(v>10?v-11<<5|28690:v-3<<5|12305),v=0)}else if(v>3){for(w(S),--v;v>6;v-=6)w(8304);v>2&&(w(v-3<<5|8208),v=0)}for(;v--;)w(S);v=1,S=T[D]}return{c:m.subarray(0,A),n:u}},clen=function(T,u){for(var m=0,A=0;A>8,T[S+2]=T[S]^255,T[S+3]=T[S+1]^255;for(var v=0;v4&&!f[clim[l0-1]];--l0);var c0=L+5<<3,d0=clen(S,flt)+clen(v,fdt)+w,S0=clen(S,E)+clen(v,q)+w+14+3*l0+clen(J,f)+2*J[16]+3*J[17]+7*J[18];if(R>=0&&c0<=d0&&c0<=S0)return wfblk(u,P,T.subarray(R,R+L));var g0,T0,C0,F0;if(wbits(u,P,1+(S015&&(wbits(u,P,Ne[i0]>>5&127),P+=Ne[i0]>>12)}}else g0=flm,T0=flt,C0=fdm,F0=fdt;for(var i0=0;i0255){var De=I0>>18&31;wbits16(u,P,g0[De+257]),P+=T0[De+257],De>7&&(wbits(u,P,I0>>23&31),P+=fleb[De]);var Le=I0&31;wbits16(u,P,C0[Le]),P+=F0[Le],Le>3&&(wbits16(u,P,I0>>5&8191),P+=fdeb[Le])}else wbits16(u,P,g0[I0]),P+=T0[I0]}return wbits16(u,P,g0[256]),P+T0[256]},deo=new i32([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),et=new u8(0),dflt=function(T,u,m,A,S,v){var w=v.z||T.length,D=new u8(A+w+5*(1+Math.ceil(w/7e3))+S),R=D.subarray(A,D.length-S),L=v.l,P=(v.r||0)&7;if(u){P&&(R[0]=v.r>>3);for(var d=deo[u-1],E=d>>13,e=d&8191,N=(1<7e3||f>24576)&&(g0>423||!L)){P=wblk(T,R,0,y,Y,G,i0,f,l0,Q-l0,P),f=J=i0=0,l0=Q;for(var T0=0;T0<286;++T0)Y[T0]=0;for(var T0=0;T0<30;++T0)G[T0]=0}var C0=2,F0=0,ee=e,ie=d0-S0&32767;if(g0>2&&c0==j(Q-ie))for(var ke=Math.min(E,g0)-1,Ne=Math.min(32767,Q),De=Math.min(258,g0);ie<=Ne&&--ee&&d0!=S0;){if(T[Q+C0]==T[Q+C0-ie]){for(var I0=0;I0C0){if(C0=I0,F0=ie,I0>ke)break;for(var Le=Math.min(ie,I0-2),Ge=0,T0=0;T0Ge&&(Ge=ei,S0=ii)}}}d0=S0,S0=q[d0],ie+=d0-S0&32767}if(F0){y[f++]=268435456|revfl[C0]<<18|revfd[F0];var Ve=revfl[C0]&31,qe=revfd[F0]&31;i0+=fleb[Ve]+fdeb[qe],++Y[257+Ve],++G[qe],o0=Q+C0,++J}else y[f++]=T[Q],++Y[T[Q]]}}for(Q=Math.max(Q,o0);Q=w&&(R[P/8|0]=L,Z0=w),P=wfblk(R,P+1,T.subarray(Q,Z0))}v.i=w}return slc(D,0,A+shft(P)+S)},crct=function(){for(var T=new Int32Array(256),u=0;u<256;++u){for(var m=u,A=9;--A;)m=(m&1&&-306674912)^m>>>1;T[u]=m}return T}(),crc=function(){var T=-1;return{p:function(u){for(var m=T,A=0;A>>8;T=m},d:function(){return~T}}},adler=function(){var T=1,u=0;return{p:function(m){for(var A=T,S=u,v=m.length|0,w=0;w!=v;){for(var D=Math.min(w+2655,v);w>16),S=(S&65535)+15*(S>>16)}T=A,u=S},d:function(){return T%=65521,u%=65521,(T&255)<<24|(T&65280)<<8|(u&255)<<8|u>>8}}},dopt=function(T,u,m,A,S){if(!S&&(S={l:1},u.dictionary)){var v=u.dictionary.subarray(-32768),w=new u8(v.length+T.length);w.set(v),w.set(T,v.length),T=w,S.w=v.length}return dflt(T,u.level==null?6:u.level,u.mem==null?S.l?Math.ceil(Math.max(8,Math.min(13,Math.log(T.length)))*1.5):20:12+u.mem,m,A,S)},mrg=function(T,u){var m={};for(var A in T)m[A]=T[A];for(var A in u)m[A]=u[A];return m},wcln=function(T,u,m){for(var A=T(),S=T.toString(),v=S.slice(S.indexOf("[")+1,S.lastIndexOf("]")).replace(/\s+/g,"").split(","),w=0;w>>0},b8=function(T,u){return b4(T,u)+b4(T,u+4)*4294967296},wbytes=function(T,u,m){for(;m;++u)T[u]=m,m>>>=8},gzh=function(T,u){var m=u.filename;if(T[0]=31,T[1]=139,T[2]=8,T[8]=u.level<2?4:u.level==9?2:0,T[9]=3,u.mtime!=0&&wbytes(T,4,Math.floor(new Date(u.mtime||Date.now())/1e3)),m){T[3]=8;for(var A=0;A<=m.length;++A)T[A+10]=m.charCodeAt(A)}},gzs=function(T){(T[0]!=31||T[1]!=139||T[2]!=8)&&err(6,"invalid gzip data");var u=T[3],m=10;u&4&&(m+=(T[10]|T[11]<<8)+2);for(var A=(u>>3&1)+(u>>4&1);A>0;A-=!T[m++]);return m+(u&2)},gzl=function(T){var u=T.length;return(T[u-4]|T[u-3]<<8|T[u-2]<<16|T[u-1]<<24)>>>0},gzhl=function(T){return 10+(T.filename?T.filename.length+1:0)},zlh=function(T,u){var m=u.level,A=m==0?0:m<6?1:m==9?3:2;if(T[0]=120,T[1]=A<<6|(u.dictionary&&32),T[1]|=31-(T[0]<<8|T[1])%31,u.dictionary){var S=adler();S.p(u.dictionary),wbytes(T,2,S.d())}},zls=function(T,u){return((T[0]&15)!=8||T[0]>>4>7||(T[0]<<8|T[1])%31)&&err(6,"invalid zlib data"),(T[1]>>5&1)==+!u&&err(6,"invalid zlib data: "+(T[1]&32?"need":"unexpected")+" dictionary"),(T[1]>>3&4)+2};function StrmOpt(T,u){return typeof T=="function"&&(u=T,T={}),this.ondata=u,T}var Deflate=function(){function T(u,m){if(typeof u=="function"&&(m=u,u={}),this.ondata=m,this.o=u||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new u8(98304),this.o.dictionary){var A=this.o.dictionary.subarray(-32768);this.b.set(A,32768-A.length),this.s.i=32768-A.length}}return T.prototype.p=function(u,m){this.ondata(dopt(u,this.o,0,0,this.s),m)},T.prototype.push=function(u,m){this.ondata||err(5),this.s.l&&err(4);var A=u.length+this.s.z;if(A>this.b.length){if(A>2*this.b.length-32768){var S=new u8(A&-32768);S.set(this.b.subarray(0,this.s.z)),this.b=S}var v=this.b.length-this.s.z;this.b.set(u.subarray(0,v),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(u.subarray(v),32768),this.s.z=u.length-v+32768,this.s.i=32766,this.s.w=32768}else this.b.set(u,this.s.z),this.s.z+=u.length;this.s.l=m&1,(this.s.z>this.s.w+8191||m)&&(this.p(this.b,m||!1),this.s.w=this.s.i,this.s.i-=2)},T.prototype.flush=function(){this.ondata||err(5),this.s.l&&err(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},T}();browser.Deflate=Deflate;var AsyncDeflate=function(){function T(u,m){astrmify([bDflt,function(){return[astrm,Deflate]}],this,StrmOpt.call(this,u,m),function(A){var S=new Deflate(A.data);onmessage=astrm(S)},6,1)}return T}();browser.AsyncDeflate=AsyncDeflate;function deflate$2(T,u,m){return m||(m=u,u={}),typeof m!="function"&&err(7),cbify(T,u,[bDflt],function(A){return pbf(deflateSync(A.data[0],A.data[1]))},0,m)}browser.deflate=deflate$2;function deflateSync(T,u){return dopt(T,u||{},0,0)}browser.deflateSync=deflateSync;var Inflate=function(){function T(u,m){typeof u=="function"&&(m=u,u={}),this.ondata=m;var A=u&&u.dictionary&&u.dictionary.subarray(-32768);this.s={i:0,b:A?A.length:0},this.o=new u8(32768),this.p=new u8(0),A&&this.o.set(A)}return T.prototype.e=function(u){if(this.ondata||err(5),this.d&&err(4),!this.p.length)this.p=u;else if(u.length){var m=new u8(this.p.length+u.length);m.set(this.p),m.set(u,this.p.length),this.p=m}},T.prototype.c=function(u){this.s.i=+(this.d=u||!1);var m=this.s.b,A=inflt(this.p,this.s,this.o);this.ondata(slc(A,m,this.s.b),this.d),this.o=slc(A,this.s.b-32768),this.s.b=this.o.length,this.p=slc(this.p,this.s.p/8|0),this.s.p&=7},T.prototype.push=function(u,m){this.e(u),this.c(m)},T}();browser.Inflate=Inflate;var AsyncInflate=function(){function T(u,m){astrmify([bInflt,function(){return[astrm,Inflate]}],this,StrmOpt.call(this,u,m),function(A){var S=new Inflate(A.data);onmessage=astrm(S)},7,0)}return T}();browser.AsyncInflate=AsyncInflate;function inflate$2(T,u,m){return m||(m=u,u={}),typeof m!="function"&&err(7),cbify(T,u,[bInflt],function(A){return pbf(inflateSync(A.data[0],gopt(A.data[1])))},1,m)}browser.inflate=inflate$2;function inflateSync(T,u){return inflt(T,{i:2},u&&u.out,u&&u.dictionary)}browser.inflateSync=inflateSync;var Gzip=function(){function T(u,m){this.c=crc(),this.l=0,this.v=1,Deflate.call(this,u,m)}return T.prototype.push=function(u,m){this.c.p(u),this.l+=u.length,Deflate.prototype.push.call(this,u,m)},T.prototype.p=function(u,m){var A=dopt(u,this.o,this.v&&gzhl(this.o),m&&8,this.s);this.v&&(gzh(A,this.o),this.v=0),m&&(wbytes(A,A.length-8,this.c.d()),wbytes(A,A.length-4,this.l)),this.ondata(A,m)},T.prototype.flush=function(){Deflate.prototype.flush.call(this)},T}();browser.Gzip=Gzip;browser.Compress=Gzip;var AsyncGzip=function(){function T(u,m){astrmify([bDflt,gze,function(){return[astrm,Deflate,Gzip]}],this,StrmOpt.call(this,u,m),function(A){var S=new Gzip(A.data);onmessage=astrm(S)},8,1)}return T}();browser.AsyncGzip=AsyncGzip;browser.AsyncCompress=AsyncGzip;function gzip(T,u,m){return m||(m=u,u={}),typeof m!="function"&&err(7),cbify(T,u,[bDflt,gze,function(){return[gzipSync]}],function(A){return pbf(gzipSync(A.data[0],A.data[1]))},2,m)}browser.gzip=gzip;browser.compress=gzip;function gzipSync(T,u){u||(u={});var m=crc(),A=T.length;m.p(T);var S=dopt(T,u,gzhl(u),8),v=S.length;return gzh(S,u),wbytes(S,v-8,m.d()),wbytes(S,v-4,A),S}browser.gzipSync=gzipSync;browser.compressSync=gzipSync;var Gunzip=function(){function T(u,m){this.v=1,this.r=0,Inflate.call(this,u,m)}return T.prototype.push=function(u,m){if(Inflate.prototype.e.call(this,u),this.r+=u.length,this.v){var A=this.p.subarray(this.v-1),S=A.length>3?gzs(A):4;if(S>A.length){if(!m)return}else this.v>1&&this.onmember&&this.onmember(this.r-A.length);this.p=A.subarray(S),this.v=0}Inflate.prototype.c.call(this,m),this.s.f&&!this.s.l&&!m&&(this.v=shft(this.s.p)+9,this.s={i:0},this.o=new u8(0),this.push(new u8(0),m))},T}();browser.Gunzip=Gunzip;var AsyncGunzip=function(){function T(u,m){var A=this;astrmify([bInflt,guze,function(){return[astrm,Inflate,Gunzip]}],this,StrmOpt.call(this,u,m),function(S){var v=new Gunzip(S.data);v.onmember=function(w){return postMessage(w)},onmessage=astrm(v)},9,0,function(S){return A.onmember&&A.onmember(S)})}return T}();browser.AsyncGunzip=AsyncGunzip;function gunzip(T,u,m){return m||(m=u,u={}),typeof m!="function"&&err(7),cbify(T,u,[bInflt,guze,function(){return[gunzipSync]}],function(A){return pbf(gunzipSync(A.data[0],A.data[1]))},3,m)}browser.gunzip=gunzip;function gunzipSync(T,u){var m=gzs(T);return m+8>T.length&&err(6,"invalid gzip data"),inflt(T.subarray(m,-8),{i:2},u&&u.out||new u8(gzl(T)),u&&u.dictionary)}browser.gunzipSync=gunzipSync;var Zlib=function(){function T(u,m){this.c=adler(),this.v=1,Deflate.call(this,u,m)}return T.prototype.push=function(u,m){this.c.p(u),Deflate.prototype.push.call(this,u,m)},T.prototype.p=function(u,m){var A=dopt(u,this.o,this.v&&(this.o.dictionary?6:2),m&&4,this.s);this.v&&(zlh(A,this.o),this.v=0),m&&wbytes(A,A.length-4,this.c.d()),this.ondata(A,m)},T.prototype.flush=function(){Deflate.prototype.flush.call(this)},T}();browser.Zlib=Zlib;var AsyncZlib=function(){function T(u,m){astrmify([bDflt,zle,function(){return[astrm,Deflate,Zlib]}],this,StrmOpt.call(this,u,m),function(A){var S=new Zlib(A.data);onmessage=astrm(S)},10,1)}return T}();browser.AsyncZlib=AsyncZlib;function zlib(T,u,m){return m||(m=u,u={}),typeof m!="function"&&err(7),cbify(T,u,[bDflt,zle,function(){return[zlibSync]}],function(A){return pbf(zlibSync(A.data[0],A.data[1]))},4,m)}browser.zlib=zlib;function zlibSync(T,u){u||(u={});var m=adler();m.p(T);var A=dopt(T,u,u.dictionary?6:2,4);return zlh(A,u),wbytes(A,A.length-4,m.d()),A}browser.zlibSync=zlibSync;var Unzlib=function(){function T(u,m){Inflate.call(this,u,m),this.v=u&&u.dictionary?2:1}return T.prototype.push=function(u,m){if(Inflate.prototype.e.call(this,u),this.v){if(this.p.length<6&&!m)return;this.p=this.p.subarray(zls(this.p,this.v-1)),this.v=0}m&&(this.p.length<4&&err(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),Inflate.prototype.c.call(this,m)},T}();browser.Unzlib=Unzlib;var AsyncUnzlib=function(){function T(u,m){astrmify([bInflt,zule,function(){return[astrm,Inflate,Unzlib]}],this,StrmOpt.call(this,u,m),function(A){var S=new Unzlib(A.data);onmessage=astrm(S)},11,0)}return T}();browser.AsyncUnzlib=AsyncUnzlib;function unzlib(T,u,m){return m||(m=u,u={}),typeof m!="function"&&err(7),cbify(T,u,[bInflt,zule,function(){return[unzlibSync]}],function(A){return pbf(unzlibSync(A.data[0],gopt(A.data[1])))},5,m)}browser.unzlib=unzlib;function unzlibSync(T,u){return inflt(T.subarray(zls(T,u&&u.dictionary),-4),{i:2},u&&u.out,u&&u.dictionary)}browser.unzlibSync=unzlibSync;var Decompress=function(){function T(u,m){this.o=StrmOpt.call(this,u,m)||{},this.G=Gunzip,this.I=Inflate,this.Z=Unzlib}return T.prototype.i=function(){var u=this;this.s.ondata=function(m,A){u.ondata(m,A)}},T.prototype.push=function(u,m){if(this.ondata||err(5),this.s)this.s.push(u,m);else{if(this.p&&this.p.length){var A=new u8(this.p.length+u.length);A.set(this.p),A.set(u,this.p.length)}else this.p=u;this.p.length>2&&(this.s=this.p[0]==31&&this.p[1]==139&&this.p[2]==8?new this.G(this.o):(this.p[0]&15)!=8||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(this.o):new this.Z(this.o),this.i(),this.s.push(this.p,m),this.p=null)}},T}();browser.Decompress=Decompress;var AsyncDecompress=function(){function T(u,m){Decompress.call(this,u,m),this.queuedSize=0,this.G=AsyncGunzip,this.I=AsyncInflate,this.Z=AsyncUnzlib}return T.prototype.i=function(){var u=this;this.s.ondata=function(m,A,S){u.ondata(m,A,S)},this.s.ondrain=function(m){u.queuedSize-=m,u.ondrain&&u.ondrain(m)}},T.prototype.push=function(u,m){this.queuedSize+=u.length,Decompress.prototype.push.call(this,u,m)},T}();browser.AsyncDecompress=AsyncDecompress;function decompress(T,u,m){return m||(m=u,u={}),typeof m!="function"&&err(7),T[0]==31&&T[1]==139&&T[2]==8?gunzip(T,u,m):(T[0]&15)!=8||T[0]>>4>7||(T[0]<<8|T[1])%31?inflate$2(T,u,m):unzlib(T,u,m)}browser.decompress=decompress;function decompressSync(T,u){return T[0]==31&&T[1]==139&&T[2]==8?gunzipSync(T,u):(T[0]&15)!=8||T[0]>>4>7||(T[0]<<8|T[1])%31?inflateSync(T,u):unzlibSync(T,u)}browser.decompressSync=decompressSync;var fltn=function(T,u,m,A){for(var S in T){var v=T[S],w=u+S,D=A;Array.isArray(v)&&(D=mrg(A,v[1]),v=v[0]),v instanceof u8?m[w]=[v,D]:(m[w+="/"]=[new u8(0),D],fltn(v,w,m,A))}},te=typeof TextEncoder<"u"&&new TextEncoder,td=typeof TextDecoder<"u"&&new TextDecoder,tds=0;try{td.decode(et,{stream:!0}),tds=1}catch{}var dutf8=function(T){for(var u="",m=0;;){var A=T[m++],S=(A>127)+(A>223)+(A>239);if(m+S>T.length)return{s:u,r:slc(T,m-1)};S?S==3?(A=((A&15)<<18|(T[m++]&63)<<12|(T[m++]&63)<<6|T[m++]&63)-65536,u+=String.fromCharCode(55296|A>>10,56320|A&1023)):S&1?u+=String.fromCharCode((A&31)<<6|T[m++]&63):u+=String.fromCharCode((A&15)<<12|(T[m++]&63)<<6|T[m++]&63):u+=String.fromCharCode(A)}},DecodeUTF8=function(){function T(u){this.ondata=u,tds?this.t=new TextDecoder:this.p=et}return T.prototype.push=function(u,m){if(this.ondata||err(5),m=!!m,this.t){this.ondata(this.t.decode(u,{stream:!0}),m),m&&(this.t.decode().length&&err(8),this.t=null);return}this.p||err(4);var A=new u8(this.p.length+u.length);A.set(this.p),A.set(u,this.p.length);var S=dutf8(A),v=S.s,w=S.r;m?(w.length&&err(8),this.p=null):this.p=w,this.ondata(v,m)},T}();browser.DecodeUTF8=DecodeUTF8;var EncodeUTF8=function(){function T(u){this.ondata=u}return T.prototype.push=function(u,m){this.ondata||err(5),this.d&&err(4),this.ondata(strToU8(u),this.d=m||!1)},T}();browser.EncodeUTF8=EncodeUTF8;function strToU8(T,u){if(u){for(var m=new u8(T.length),A=0;A>1)),w=0,D=function(P){v[w++]=P},A=0;Av.length){var R=new u8(w+8+(S-A<<1));R.set(v),v=R}var L=T.charCodeAt(A);L<128||u?D(L):L<2048?(D(192|L>>6),D(128|L&63)):L>55295&&L<57344?(L=65536+(L&1047552)|T.charCodeAt(++A)&1023,D(240|L>>18),D(128|L>>12&63),D(128|L>>6&63),D(128|L&63)):(D(224|L>>12),D(128|L>>6&63),D(128|L&63))}return slc(v,0,w)}browser.strToU8=strToU8;function strFromU8(T,u){if(u){for(var m="",A=0;A65535&&err(9),u+=A+4}return u},wzh=function(T,u,m,A,S,v,w,D){var R=A.length,L=m.extra,P=D&&D.length,d=exfl(L);wbytes(T,u,w!=null?33639248:67324752),u+=4,w!=null&&(T[u++]=20,T[u++]=m.os),T[u]=20,u+=2,T[u++]=m.flag<<1|(v<0&&8),T[u++]=S&&8,T[u++]=m.compression&255,T[u++]=m.compression>>8;var E=new Date(m.mtime==null?Date.now():m.mtime),e=E.getFullYear()-1980;if((e<0||e>119)&&err(10),wbytes(T,u,e<<25|E.getMonth()+1<<21|E.getDate()<<16|E.getHours()<<11|E.getMinutes()<<5|E.getSeconds()>>1),u+=4,v!=-1&&(wbytes(T,u,m.crc),wbytes(T,u+4,v<0?-v-2:v),wbytes(T,u+8,m.size)),wbytes(T,u+12,R),wbytes(T,u+14,d),u+=16,w!=null&&(wbytes(T,u,P),wbytes(T,u+6,m.attrs),wbytes(T,u+10,w),u+=14),T.set(A,u),u+=R,d)for(var N in L){var q=L[N],z=q.length;wbytes(T,u,+N),wbytes(T,u+2,z),T.set(q,u+4),u+=4+z}return P&&(T.set(D,u),u+=P),u},wzf=function(T,u,m,A,S){wbytes(T,u,101010256),wbytes(T,u+8,m),wbytes(T,u+10,m),wbytes(T,u+12,A),wbytes(T,u+16,S)},ZipPassThrough=function(){function T(u){this.filename=u,this.c=crc(),this.size=0,this.compression=0}return T.prototype.process=function(u,m){this.ondata(null,u,m)},T.prototype.push=function(u,m){this.ondata||err(5),this.c.p(u),this.size+=u.length,m&&(this.crc=this.c.d()),this.process(u,m||!1)},T}();browser.ZipPassThrough=ZipPassThrough;var ZipDeflate=function(){function T(u,m){var A=this;m||(m={}),ZipPassThrough.call(this,u),this.d=new Deflate(m,function(S,v){A.ondata(null,S,v)}),this.compression=8,this.flag=dbf(m.level)}return T.prototype.process=function(u,m){try{this.d.push(u,m)}catch(A){this.ondata(A,null,m)}},T.prototype.push=function(u,m){ZipPassThrough.prototype.push.call(this,u,m)},T}();browser.ZipDeflate=ZipDeflate;var AsyncZipDeflate=function(){function T(u,m){var A=this;m||(m={}),ZipPassThrough.call(this,u),this.d=new AsyncDeflate(m,function(S,v,w){A.ondata(S,v,w)}),this.compression=8,this.flag=dbf(m.level),this.terminate=this.d.terminate}return T.prototype.process=function(u,m){this.d.push(u,m)},T.prototype.push=function(u,m){ZipPassThrough.prototype.push.call(this,u,m)},T}();browser.AsyncZipDeflate=AsyncZipDeflate;var Zip=function(){function T(u){this.ondata=u,this.u=[],this.d=1}return T.prototype.add=function(u){var m=this;if(this.ondata||err(5),this.d&2)this.ondata(err(4+(this.d&1)*8,0,1),null,!1);else{var A=strToU8(u.filename),S=A.length,v=u.comment,w=v&&strToU8(v),D=S!=u.filename.length||w&&v.length!=w.length,R=S+exfl(u.extra)+30;S>65535&&this.ondata(err(11,0,1),null,!1);var L=new u8(R);wzh(L,0,u,A,D,-1);var P=[L],d=function(){for(var z=0,e0=P;z65535&&d0(err(11,0,1),null),!c0)d0(null,j);else if(G<16e4)try{d0(null,deflateSync(j,y))}catch(S0){d0(S0,null)}else P.push(deflate$2(j,y,d0))},q=0;q65535&&err(11);var e0=P?deflateSync(R,L):R,H=e0.length,j=crc();j.p(R),A.push(mrg(L,{size:R.length,crc:j.d(),c:e0,f:d,m:N,u:E!=w.length||N&&e.length!=q,o:S,compression:P})),S+=30+E+z+H,v+=76+2*(E+z)+(q||0)+H}for(var y=new u8(v+22),Y=S,G=v-S,J=0;J0){var S=Math.min(this.c,u.length),v=u.subarray(0,S);if(this.c-=S,this.d?this.d.push(v,!this.c):this.k[0].push(v),u=u.subarray(S),u.length)return this.push(u,m)}else{var w=0,D=0,R=void 0,L=void 0;this.p.length?u.length?(L=new u8(this.p.length+u.length),L.set(this.p),L.set(u,this.p.length)):L=this.p:L=u;for(var P=L.length,d=this.c,E=d&&this.d,e=function(){var e0,H=b4(L,D);if(H==67324752){w=1,R=D,N.d=null,N.c=0;var j=b2(L,D+6),y=b2(L,D+8),Y=j&2048,G=j&8,J=b2(L,D+26),i0=b2(L,D+28);if(P>D+30+J+i0){var Q=[];N.k.unshift(Q),w=2;var f=b4(L,D+18),o0=b4(L,D+22),l0=strFromU8(L.subarray(D+30,D+=30+J),!Y);f==4294967295?(e0=G?[-2]:z64e(L,D),f=e0[0],o0=e0[1]):G&&(f=-1),D+=i0,N.c=f;var c0,d0={name:l0,compression:y,start:function(){if(d0.ondata||err(5),!f)d0.ondata(null,et,!0);else{var S0=A.o[y];S0||d0.ondata(err(14,"unknown compression type "+y,1),null,!1),c0=f<0?new S0(l0):new S0(l0,f,o0),c0.ondata=function(F0,ee,ie){d0.ondata(F0,ee,ie)};for(var g0=0,T0=Q;g0=0&&(d0.size=f,d0.originalSize=o0),N.onfile(d0)}return"break"}else if(d){if(H==134695760)return R=D+=12+(d==-2&&8),w=3,N.c=0,"break";if(H==33639248)return R=D-=4,w=3,N.c=0,"break"}},N=this;D65558)return w(err(13,0,1),null),S;var R=b2(T,D+8);if(R){var L=R,P=b4(T,D+16),d=P==4294967295||L==65535;if(d){var E=b4(T,D-12);d=b4(T,E)==101075792,d&&(L=R=b4(T,E+32),P=b4(T,E+48))}for(var e=u&&u.filter,N=function(z){var e0=zh(T,P,d),H=e0[0],j=e0[1],y=e0[2],Y=e0[3],G=e0[4],J=e0[5],i0=slzh(T,J);P=G;var Q=function(o0,l0){o0?(S(),w(o0,null)):(l0&&(v[Y]=l0),--R||w(null,v))};if(!e||e({name:Y,size:j,originalSize:y,compression:H}))if(!H)Q(null,slc(T,i0,i0+j));else if(H==8){var f=T.subarray(i0,i0+j);if(y<524288||j>.8*y)try{Q(null,inflateSync(f,{out:new u8(y)}))}catch(o0){Q(o0,null)}else A.push(inflate$2(f,{size:y},Q))}else Q(err(14,"unknown compression type "+H,1),null);else Q(null,null)},q=0;q65558)&&err(13);var S=b2(T,A+8);if(!S)return{};var v=b4(T,A+16),w=v==4294967295||S==65535;if(w){var D=b4(T,A-12);w=b4(T,D)==101075792,w&&(S=b4(T,D+32),v=b4(T,D+48))}for(var R=u&&u.filter,L=0;L=0;S--)w=w*256+v[S];return w}static getExtensionsAt(u,m,A,S){let v=[],w=m;for(;wS&&(D=!D,R=Ki.getIntAt(u,w,D),R+w>S))throw new Error("This does not appear to be a valid NIFTI extension");if(R%16!=0)throw new Error("This does not appear to be a NIFTI extension");let L=Ki.getIntAt(u,w+4,D),P=u.buffer.slice(w+8,w+R);console.log("extensionByteIndex: "+(w+8)+" esize: "+R),console.log(P);let d=new nifti_extension_1.NIFTIEXTENSION(R,L,P,D);v.push(d),w+=R}return v}static toArrayBuffer(u){var m,A,S;for(m=new ArrayBuffer(u.length),A=new Uint8Array(m),S=0;S>>1:u>>>1;m[A]=u}return m}static crc32(u){Ki.crcTable||(Ki.crcTable=Ki.makeCRCTable());const m=Ki.crcTable;let A=-1;for(var S=0;S>>8^m[(A^u.getUint8(S))&255];return(A^-1)>>>0}};$0(Ki,"crcTable",null),$0(Ki,"GUNZIP_MAGIC_COOKIE1",31),$0(Ki,"GUNZIP_MAGIC_COOKIE2",139),$0(Ki,"getByteAt",function(u,m){return u.getInt8(m)}),$0(Ki,"getShortAt",function(u,m,A){return u.getInt16(m,A)});let Utils=Ki;utilities$1.Utils=Utils;Object.defineProperty(nifti1,"__esModule",{value:!0});nifti1.NIFTI1=void 0;const utilities_1$1=utilities$1,Oe=class Oe{constructor(){$0(this,"littleEndian",!1);$0(this,"dim_info",0);$0(this,"dims",[]);$0(this,"intent_p1",0);$0(this,"intent_p2",0);$0(this,"intent_p3",0);$0(this,"intent_code",0);$0(this,"datatypeCode",0);$0(this,"numBitsPerVoxel",0);$0(this,"slice_start",0);$0(this,"slice_end",0);$0(this,"slice_code",0);$0(this,"pixDims",[]);$0(this,"vox_offset",0);$0(this,"scl_slope",1);$0(this,"scl_inter",0);$0(this,"xyzt_units",0);$0(this,"cal_max",0);$0(this,"cal_min",0);$0(this,"slice_duration",0);$0(this,"toffset",0);$0(this,"description","");$0(this,"aux_file","");$0(this,"intent_name","");$0(this,"qform_code",0);$0(this,"sform_code",0);$0(this,"quatern_a",0);$0(this,"quatern_b",0);$0(this,"quatern_c",0);$0(this,"quatern_d",0);$0(this,"qoffset_x",0);$0(this,"qoffset_y",0);$0(this,"qoffset_z",0);$0(this,"affine",[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);$0(this,"qfac",1);$0(this,"quatern_R");$0(this,"magic","0");$0(this,"isHDR",!1);$0(this,"extensionFlag",[0,0,0,0]);$0(this,"extensionSize",0);$0(this,"extensionCode",0);$0(this,"extensions",[]);$0(this,"getDatatypeCodeString",function(u){return u===Oe.TYPE_UINT8?"1-Byte Unsigned Integer":u===Oe.TYPE_INT16?"2-Byte Signed Integer":u===Oe.TYPE_INT32?"4-Byte Signed Integer":u===Oe.TYPE_FLOAT32?"4-Byte Float":u===Oe.TYPE_FLOAT64?"8-Byte Float":u===Oe.TYPE_RGB24?"RGB":u===Oe.TYPE_INT8?"1-Byte Signed Integer":u===Oe.TYPE_UINT16?"2-Byte Unsigned Integer":u===Oe.TYPE_UINT32?"4-Byte Unsigned Integer":u===Oe.TYPE_INT64?"8-Byte Signed Integer":u===Oe.TYPE_UINT64?"8-Byte Unsigned Integer":"Unknown"});$0(this,"getTransformCodeString",function(u){return u===Oe.XFORM_SCANNER_ANAT?"Scanner":u===Oe.XFORM_ALIGNED_ANAT?"Aligned":u===Oe.XFORM_TALAIRACH?"Talairach":u===Oe.XFORM_MNI_152?"MNI":"Unknown"});$0(this,"getUnitsCodeString",function(u){return u===Oe.UNITS_METER?"Meters":u===Oe.UNITS_MM?"Millimeters":u===Oe.UNITS_MICRON?"Microns":u===Oe.UNITS_SEC?"Seconds":u===Oe.UNITS_MSEC?"Milliseconds":u===Oe.UNITS_USEC?"Microseconds":u===Oe.UNITS_HZ?"Hz":u===Oe.UNITS_PPM?"PPM":u===Oe.UNITS_RADS?"Rads":"Unknown"});$0(this,"nifti_mat33_mul",function(u,m){var A=[[0,0,0],[0,0,0],[0,0,0]],S,v;for(S=0;S<3;S+=1)for(v=0;v<3;v+=1)A[S][v]=u[S][0]*m[0][v]+u[S][1]*m[1][v]+u[S][2]*m[2][v];return A});$0(this,"nifti_mat33_determ",function(u){var m,A,S,v,w,D,R,L,P;return m=u[0][0],A=u[0][1],S=u[0][2],v=u[1][0],w=u[1][1],D=u[1][2],R=u[2][0],L=u[2][1],P=u[2][2],m*w*P-m*L*D-v*A*P+v*L*S+R*A*D-R*w*S})}readHeader(u){var m=new DataView(u),A=utilities_1$1.Utils.getIntAt(m,0,this.littleEndian),S,v,w,D;if(A!==Oe.MAGIC_COOKIE&&(this.littleEndian=!0,A=utilities_1$1.Utils.getIntAt(m,0,this.littleEndian)),A!==Oe.MAGIC_COOKIE)throw new Error("This does not appear to be a NIFTI file!");for(this.dim_info=utilities_1$1.Utils.getByteAt(m,39),S=0;S<8;S+=1)D=40+S*2,this.dims[S]=utilities_1$1.Utils.getShortAt(m,D,this.littleEndian);for(this.intent_p1=utilities_1$1.Utils.getFloatAt(m,56,this.littleEndian),this.intent_p2=utilities_1$1.Utils.getFloatAt(m,60,this.littleEndian),this.intent_p3=utilities_1$1.Utils.getFloatAt(m,64,this.littleEndian),this.intent_code=utilities_1$1.Utils.getShortAt(m,68,this.littleEndian),this.datatypeCode=utilities_1$1.Utils.getShortAt(m,70,this.littleEndian),this.numBitsPerVoxel=utilities_1$1.Utils.getShortAt(m,72,this.littleEndian),this.slice_start=utilities_1$1.Utils.getShortAt(m,74,this.littleEndian),S=0;S<8;S+=1)D=76+S*4,this.pixDims[S]=utilities_1$1.Utils.getFloatAt(m,D,this.littleEndian);if(this.vox_offset=utilities_1$1.Utils.getFloatAt(m,108,this.littleEndian),this.scl_slope=utilities_1$1.Utils.getFloatAt(m,112,this.littleEndian),this.scl_inter=utilities_1$1.Utils.getFloatAt(m,116,this.littleEndian),this.slice_end=utilities_1$1.Utils.getShortAt(m,120,this.littleEndian),this.slice_code=utilities_1$1.Utils.getByteAt(m,122),this.xyzt_units=utilities_1$1.Utils.getByteAt(m,123),this.cal_max=utilities_1$1.Utils.getFloatAt(m,124,this.littleEndian),this.cal_min=utilities_1$1.Utils.getFloatAt(m,128,this.littleEndian),this.slice_duration=utilities_1$1.Utils.getFloatAt(m,132,this.littleEndian),this.toffset=utilities_1$1.Utils.getFloatAt(m,136,this.littleEndian),this.description=utilities_1$1.Utils.getStringAt(m,148,228),this.aux_file=utilities_1$1.Utils.getStringAt(m,228,252),this.qform_code=utilities_1$1.Utils.getShortAt(m,252,this.littleEndian),this.sform_code=utilities_1$1.Utils.getShortAt(m,254,this.littleEndian),this.quatern_b=utilities_1$1.Utils.getFloatAt(m,256,this.littleEndian),this.quatern_c=utilities_1$1.Utils.getFloatAt(m,260,this.littleEndian),this.quatern_d=utilities_1$1.Utils.getFloatAt(m,264,this.littleEndian),this.quatern_a=Math.sqrt(1-(Math.pow(this.quatern_b,2)+Math.pow(this.quatern_c,2)+Math.pow(this.quatern_d,2))),this.qoffset_x=utilities_1$1.Utils.getFloatAt(m,268,this.littleEndian),this.qoffset_y=utilities_1$1.Utils.getFloatAt(m,272,this.littleEndian),this.qoffset_z=utilities_1$1.Utils.getFloatAt(m,276,this.littleEndian),this.qform_code<1&&this.sform_code<1&&(this.affine[0][0]=this.pixDims[1],this.affine[1][1]=this.pixDims[2],this.affine[2][2]=this.pixDims[3]),this.qform_code>0&&this.sform_code0)for(v=0;v<3;v+=1)for(w=0;w<4;w+=1)D=280+(v*4+w)*4,this.affine[v][w]=utilities_1$1.Utils.getFloatAt(m,D,this.littleEndian);if(this.affine[3][0]=0,this.affine[3][1]=0,this.affine[3][2]=0,this.affine[3][3]=1,this.intent_name=utilities_1$1.Utils.getStringAt(m,328,344),this.magic=utilities_1$1.Utils.getStringAt(m,344,348),this.isHDR=this.magic===String.fromCharCode.apply(null,Oe.MAGIC_NUMBER2),m.byteLength>Oe.MAGIC_COOKIE){this.extensionFlag[0]=utilities_1$1.Utils.getByteAt(m,348),this.extensionFlag[1]=utilities_1$1.Utils.getByteAt(m,349),this.extensionFlag[2]=utilities_1$1.Utils.getByteAt(m,350),this.extensionFlag[3]=utilities_1$1.Utils.getByteAt(m,351);let R=!0;!this.isHDR&&this.vox_offset<=352&&(R=!1),m.byteLength<=368&&(R=!1),R&&this.extensionFlag[0]&&(this.extensions=utilities_1$1.Utils.getExtensionsAt(m,this.getExtensionLocation(),this.littleEndian,this.vox_offset),this.extensionSize=this.extensions[0].esize,this.extensionCode=this.extensions[0].ecode)}}toFormattedString(){var u=utilities_1$1.Utils.formatNumber,m="";return m+="Dim Info = "+this.dim_info+` `,m+="Image Dimensions (1-8): "+this.dims[0]+", "+this.dims[1]+", "+this.dims[2]+", "+this.dims[3]+", "+this.dims[4]+", "+this.dims[5]+", "+this.dims[6]+", "+this.dims[7]+` `,m+="Intent Parameters (1-3): "+this.intent_p1+", "+this.intent_p2+", "+this.intent_p3+` `,m+="Intent Code = "+this.intent_code+` @@ -10,7 +10,7 @@ var zp=Object.defineProperty;var Hp=(T,u,m)=>u in T?zp(T,u,{enumerable:!0,config `,m+="Data Scale: Slope = "+u(this.scl_slope)+" Intercept = "+u(this.scl_inter)+` `,m+="Slice End = "+this.slice_end+` `,m+="Slice Code = "+this.slice_code+` -`,m+="Units Code = "+this.xyzt_units+" ("+this.getUnitsCodeString(Ne.SPATIAL_UNITS_MASK&this.xyzt_units)+", "+this.getUnitsCodeString(Ne.TEMPORAL_UNITS_MASK&this.xyzt_units)+`) +`,m+="Units Code = "+this.xyzt_units+" ("+this.getUnitsCodeString(Oe.SPATIAL_UNITS_MASK&this.xyzt_units)+", "+this.getUnitsCodeString(Oe.TEMPORAL_UNITS_MASK&this.xyzt_units)+`) `,m+="Display Range: Max = "+u(this.cal_max)+" Min = "+u(this.cal_min)+` `,m+="Slice Duration = "+this.slice_duration+` `,m+="Time Axis Shift = "+this.toffset+` @@ -25,7 +25,7 @@ var zp=Object.defineProperty;var Hp=(T,u,m)=>u in T?zp(T,u,{enumerable:!0,config `,m+="S-Form Parameters Z: "+u(this.affine[2][0])+", "+u(this.affine[2][1])+", "+u(this.affine[2][2])+", "+u(this.affine[2][3])+` `,m+='Intent Name: "'+this.intent_name+`" `,this.extensionFlag[0]&&(m+="Extension: Size = "+this.extensionSize+" Code = "+this.extensionCode+` -`),m}getQformMat(){return this.convertNiftiQFormToNiftiSForm(this.quatern_b,this.quatern_c,this.quatern_d,this.qoffset_x,this.qoffset_y,this.qoffset_z,this.pixDims[1],this.pixDims[2],this.pixDims[3],this.pixDims[0])}convertNiftiQFormToNiftiSForm(u,m,A,S,v,w,D,R,L,P){var d=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],E,e=u,N=m,q=A,z,e0,H;return d[3][0]=d[3][1]=d[3][2]=0,d[3][3]=1,E=1-(e*e+N*N+q*q),E<1e-7?(E=1/Math.sqrt(e*e+N*N+q*q),e*=E,N*=E,q*=E,E=0):E=Math.sqrt(E),z=D>0?D:1,e0=R>0?R:1,H=L>0?L:1,P<0&&(H=-H),d[0][0]=(E*E+e*e-N*N-q*q)*z,d[0][1]=2*(e*N-E*q)*e0,d[0][2]=2*(e*q+E*N)*H,d[1][0]=2*(e*N+E*q)*z,d[1][1]=(E*E+N*N-e*e-q*q)*e0,d[1][2]=2*(N*q-E*e)*H,d[2][0]=2*(e*q-E*N)*z,d[2][1]=2*(N*q+E*e)*e0,d[2][2]=(E*E+q*q-N*N-e*e)*H,d[0][3]=S,d[1][3]=v,d[2][3]=w,d}convertNiftiSFormToNEMA(u){var m,A,S,v,w,D,R,L,P,d,E,e,N,q,z,e0,H,j,y,Y,G,J,i0,Q,f,l0,o0,c0,d0,S0,p0,T0,C0,F0;if(z=0,o0=[[0,0,0],[0,0,0],[0,0,0]],c0=[[0,0,0],[0,0,0],[0,0,0]],m=u[0][0],A=u[0][1],S=u[0][2],v=u[1][0],w=u[1][1],D=u[1][2],R=u[2][0],L=u[2][1],P=u[2][2],d=Math.sqrt(m*m+v*v+R*R),d===0||(m/=d,v/=d,R/=d,d=Math.sqrt(A*A+w*w+L*L),d===0))return null;if(A/=d,w/=d,L/=d,d=m*A+v*w+R*L,Math.abs(d)>1e-4){if(A-=d*m,w-=d*v,L-=d*R,d=Math.sqrt(A*A+w*w+L*L),d===0)return null;A/=d,w/=d,L/=d}if(d=Math.sqrt(S*S+D*D+P*P),d===0?(S=v*L-R*w,D=R*A-L*m,P=m*w-v*A):(S/=d,D/=d,P/=d),d=m*S+v*D+R*P,Math.abs(d)>1e-4){if(S-=d*m,D-=d*v,P-=d*R,d=Math.sqrt(S*S+D*D+P*P),d===0)return null;S/=d,D/=d,P/=d}if(d=A*S+w*D+L*P,Math.abs(d)>1e-4){if(S-=d*A,D-=d*w,P-=d*L,d=Math.sqrt(S*S+D*D+P*P),d===0)return null;S/=d,D/=d,P/=d}if(o0[0][0]=m,o0[0][1]=A,o0[0][2]=S,o0[1][0]=v,o0[1][1]=w,o0[1][2]=D,o0[2][0]=R,o0[2][1]=L,o0[2][2]=P,E=this.nifti_mat33_determ(o0),E===0)return null;for(l0=-666,y=J=i0=Q=1,Y=2,G=3,N=1;N<=3;N+=1)for(q=1;q<=3;q+=1)if(N!==q){for(z=1;z<=3;z+=1)if(!(N===z||q===z))for(c0[0][0]=c0[0][1]=c0[0][2]=c0[1][0]=c0[1][1]=c0[1][2]=c0[2][0]=c0[2][1]=c0[2][2]=0,e0=-1;e0<=1;e0+=2)for(H=-1;H<=1;H+=2)for(j=-1;j<=1;j+=2)c0[0][N-1]=e0,c0[1][q-1]=H,c0[2][z-1]=j,e=this.nifti_mat33_determ(c0),e*E>0&&(f=this.nifti_mat33_mul(c0,o0),d=f[0][0]+f[1][1]+f[2][2],d>l0&&(l0=d,y=N,Y=q,G=z,J=e0,i0=H,Q=j))}switch(d0=S0=p0=T0=C0=F0="",y*J){case 1:d0="X",T0="+";break;case-1:d0="X",T0="-";break;case 2:d0="Y",T0="+";break;case-2:d0="Y",T0="-";break;case 3:d0="Z",T0="+";break;case-3:d0="Z",T0="-";break}switch(Y*i0){case 1:S0="X",C0="+";break;case-1:S0="X",C0="-";break;case 2:S0="Y",C0="+";break;case-2:S0="Y",C0="-";break;case 3:S0="Z",C0="+";break;case-3:S0="Z",C0="-";break}switch(G*Q){case 1:p0="X",F0="+";break;case-1:p0="X",F0="-";break;case 2:p0="Y",F0="+";break;case-2:p0="Y",F0="-";break;case 3:p0="Z",F0="+";break;case-3:p0="Z",F0="-";break}return d0+S0+p0+T0+C0+F0}getExtensionLocation(){return Ne.MAGIC_COOKIE+4}getExtensionSize(u){return utilities_1$1.Utils.getIntAt(u,this.getExtensionLocation(),this.littleEndian)}getExtensionCode(u){return utilities_1$1.Utils.getIntAt(u,this.getExtensionLocation()+4,this.littleEndian)}addExtension(u,m=-1){m==-1?this.extensions.push(u):this.extensions.splice(m,0,u),this.vox_offset+=u.esize}removeExtension(u){let m=this.extensions[u];m&&(this.vox_offset-=m.esize),this.extensions.splice(u,1)}toArrayBuffer(u=!1){let S=352;if(u)for(let R of this.extensions)S+=R.esize;let v=new Uint8Array(S),w=new DataView(v.buffer);w.setInt32(0,348,this.littleEndian),w.setUint8(39,this.dim_info);for(let R=0;R<8;R++)w.setUint16(40+2*R,this.dims[R],this.littleEndian);w.setFloat32(56,this.intent_p1,this.littleEndian),w.setFloat32(60,this.intent_p2,this.littleEndian),w.setFloat32(64,this.intent_p3,this.littleEndian),w.setInt16(68,this.intent_code,this.littleEndian),w.setInt16(70,this.datatypeCode,this.littleEndian),w.setInt16(72,this.numBitsPerVoxel,this.littleEndian),w.setInt16(74,this.slice_start,this.littleEndian);for(let R=0;R<8;R++)w.setFloat32(76+4*R,this.pixDims[R],this.littleEndian);w.setFloat32(108,this.vox_offset,this.littleEndian),w.setFloat32(112,this.scl_slope,this.littleEndian),w.setFloat32(116,this.scl_inter,this.littleEndian),w.setInt16(120,this.slice_end,this.littleEndian),w.setUint8(122,this.slice_code),w.setUint8(123,this.xyzt_units),w.setFloat32(124,this.cal_max,this.littleEndian),w.setFloat32(128,this.cal_min,this.littleEndian),w.setFloat32(132,this.slice_duration,this.littleEndian),w.setFloat32(136,this.toffset,this.littleEndian),v.set(Buffer.from(this.description),148),v.set(Buffer.from(this.aux_file),228),w.setInt16(252,this.qform_code,this.littleEndian),w.setInt16(254,this.sform_code,this.littleEndian),w.setFloat32(256,this.quatern_b,this.littleEndian),w.setFloat32(260,this.quatern_c,this.littleEndian),w.setFloat32(264,this.quatern_d,this.littleEndian),w.setFloat32(268,this.qoffset_x,this.littleEndian),w.setFloat32(272,this.qoffset_y,this.littleEndian),w.setFloat32(276,this.qoffset_z,this.littleEndian);const D=this.affine.flat();for(let R=0;R<12;R++)w.setFloat32(280+4*R,D[R],this.littleEndian);if(v.set(Buffer.from(this.intent_name),328),v.set(Buffer.from(this.magic),344),u){v.set(Uint8Array.from([1,0,0,0]),348);let R=this.getExtensionLocation();for(const L of this.extensions)w.setInt32(R,L.esize,L.littleEndian),w.setInt32(R+4,L.ecode,L.littleEndian),v.set(new Uint8Array(L.edata),R+8),R+=L.esize}else v.set(new Uint8Array(4).fill(0),348);return v.buffer}};$0(Ne,"TYPE_NONE",0),$0(Ne,"TYPE_BINARY",1),$0(Ne,"TYPE_UINT8",2),$0(Ne,"TYPE_INT16",4),$0(Ne,"TYPE_INT32",8),$0(Ne,"TYPE_FLOAT32",16),$0(Ne,"TYPE_COMPLEX64",32),$0(Ne,"TYPE_FLOAT64",64),$0(Ne,"TYPE_RGB24",128),$0(Ne,"TYPE_INT8",256),$0(Ne,"TYPE_UINT16",512),$0(Ne,"TYPE_UINT32",768),$0(Ne,"TYPE_INT64",1024),$0(Ne,"TYPE_UINT64",1280),$0(Ne,"TYPE_FLOAT128",1536),$0(Ne,"TYPE_COMPLEX128",1792),$0(Ne,"TYPE_COMPLEX256",2048),$0(Ne,"XFORM_UNKNOWN",0),$0(Ne,"XFORM_SCANNER_ANAT",1),$0(Ne,"XFORM_ALIGNED_ANAT",2),$0(Ne,"XFORM_TALAIRACH",3),$0(Ne,"XFORM_MNI_152",4),$0(Ne,"SPATIAL_UNITS_MASK",7),$0(Ne,"TEMPORAL_UNITS_MASK",56),$0(Ne,"UNITS_UNKNOWN",0),$0(Ne,"UNITS_METER",1),$0(Ne,"UNITS_MM",2),$0(Ne,"UNITS_MICRON",3),$0(Ne,"UNITS_SEC",8),$0(Ne,"UNITS_MSEC",16),$0(Ne,"UNITS_USEC",24),$0(Ne,"UNITS_HZ",32),$0(Ne,"UNITS_PPM",40),$0(Ne,"UNITS_RADS",48),$0(Ne,"MAGIC_COOKIE",348),$0(Ne,"STANDARD_HEADER_SIZE",348),$0(Ne,"MAGIC_NUMBER_LOCATION",344),$0(Ne,"MAGIC_NUMBER",[110,43,49]),$0(Ne,"MAGIC_NUMBER2",[110,105,49]),$0(Ne,"EXTENSION_HEADER_SIZE",8);let NIFTI1=Ne;nifti1.NIFTI1=NIFTI1;var nifti2={};Object.defineProperty(nifti2,"__esModule",{value:!0});nifti2.NIFTI2=void 0;const nifti1_1=nifti1,utilities_1=utilities$1,At=class At{constructor(){$0(this,"littleEndian",!1);$0(this,"dim_info",0);$0(this,"dims",[]);$0(this,"intent_p1",0);$0(this,"intent_p2",0);$0(this,"intent_p3",0);$0(this,"intent_code",0);$0(this,"datatypeCode",0);$0(this,"numBitsPerVoxel",0);$0(this,"slice_start",0);$0(this,"slice_end",0);$0(this,"slice_code",0);$0(this,"pixDims",[]);$0(this,"vox_offset",0);$0(this,"scl_slope",1);$0(this,"scl_inter",0);$0(this,"xyzt_units",0);$0(this,"cal_max",0);$0(this,"cal_min",0);$0(this,"slice_duration",0);$0(this,"toffset",0);$0(this,"description","");$0(this,"aux_file","");$0(this,"intent_name","");$0(this,"qform_code",0);$0(this,"sform_code",0);$0(this,"quatern_b",0);$0(this,"quatern_c",0);$0(this,"quatern_d",0);$0(this,"qoffset_x",0);$0(this,"qoffset_y",0);$0(this,"qoffset_z",0);$0(this,"affine",[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);$0(this,"magic","0");$0(this,"extensionFlag",[0,0,0,0]);$0(this,"extensions",[]);$0(this,"extensionSize",0);$0(this,"extensionCode",0);$0(this,"getExtensionLocation",function(){return At.MAGIC_COOKIE+4});$0(this,"getExtensionSize",nifti1_1.NIFTI1.prototype.getExtensionSize);$0(this,"getExtensionCode",nifti1_1.NIFTI1.prototype.getExtensionCode);$0(this,"addExtension",nifti1_1.NIFTI1.prototype.addExtension);$0(this,"removeExtension",nifti1_1.NIFTI1.prototype.removeExtension);$0(this,"getDatatypeCodeString",nifti1_1.NIFTI1.prototype.getDatatypeCodeString);$0(this,"getTransformCodeString",nifti1_1.NIFTI1.prototype.getTransformCodeString);$0(this,"getUnitsCodeString",nifti1_1.NIFTI1.prototype.getUnitsCodeString);$0(this,"getQformMat",nifti1_1.NIFTI1.prototype.getQformMat);$0(this,"convertNiftiQFormToNiftiSForm",nifti1_1.NIFTI1.prototype.convertNiftiQFormToNiftiSForm);$0(this,"convertNiftiSFormToNEMA",nifti1_1.NIFTI1.prototype.convertNiftiSFormToNEMA);$0(this,"nifti_mat33_mul",nifti1_1.NIFTI1.prototype.nifti_mat33_mul);$0(this,"nifti_mat33_determ",nifti1_1.NIFTI1.prototype.nifti_mat33_determ)}readHeader(u){var m=new DataView(u),A=utilities_1.Utils.getIntAt(m,0,this.littleEndian),S,v,w,D;if(A!==At.MAGIC_COOKIE&&(this.littleEndian=!0,A=utilities_1.Utils.getIntAt(m,0,this.littleEndian)),A!==At.MAGIC_COOKIE)throw new Error("This does not appear to be a NIFTI file!");for(this.magic=utilities_1.Utils.getStringAt(m,4,12),this.datatypeCode=utilities_1.Utils.getShortAt(m,12,this.littleEndian),this.numBitsPerVoxel=utilities_1.Utils.getShortAt(m,14,this.littleEndian),S=0;S<8;S+=1)D=16+S*8,this.dims[S]=utilities_1.Utils.getLongAt(m,D,this.littleEndian);for(this.intent_p1=utilities_1.Utils.getDoubleAt(m,80,this.littleEndian),this.intent_p2=utilities_1.Utils.getDoubleAt(m,88,this.littleEndian),this.intent_p3=utilities_1.Utils.getDoubleAt(m,96,this.littleEndian),S=0;S<8;S+=1)D=104+S*8,this.pixDims[S]=utilities_1.Utils.getDoubleAt(m,D,this.littleEndian);for(this.vox_offset=utilities_1.Utils.getLongAt(m,168,this.littleEndian),this.scl_slope=utilities_1.Utils.getDoubleAt(m,176,this.littleEndian),this.scl_inter=utilities_1.Utils.getDoubleAt(m,184,this.littleEndian),this.cal_max=utilities_1.Utils.getDoubleAt(m,192,this.littleEndian),this.cal_min=utilities_1.Utils.getDoubleAt(m,200,this.littleEndian),this.slice_duration=utilities_1.Utils.getDoubleAt(m,208,this.littleEndian),this.toffset=utilities_1.Utils.getDoubleAt(m,216,this.littleEndian),this.slice_start=utilities_1.Utils.getLongAt(m,224,this.littleEndian),this.slice_end=utilities_1.Utils.getLongAt(m,232,this.littleEndian),this.description=utilities_1.Utils.getStringAt(m,240,320),this.aux_file=utilities_1.Utils.getStringAt(m,320,344),this.qform_code=utilities_1.Utils.getIntAt(m,344,this.littleEndian),this.sform_code=utilities_1.Utils.getIntAt(m,348,this.littleEndian),this.quatern_b=utilities_1.Utils.getDoubleAt(m,352,this.littleEndian),this.quatern_c=utilities_1.Utils.getDoubleAt(m,360,this.littleEndian),this.quatern_d=utilities_1.Utils.getDoubleAt(m,368,this.littleEndian),this.qoffset_x=utilities_1.Utils.getDoubleAt(m,376,this.littleEndian),this.qoffset_y=utilities_1.Utils.getDoubleAt(m,384,this.littleEndian),this.qoffset_z=utilities_1.Utils.getDoubleAt(m,392,this.littleEndian),v=0;v<3;v+=1)for(w=0;w<4;w+=1)D=400+(v*4+w)*8,this.affine[v][w]=utilities_1.Utils.getDoubleAt(m,D,this.littleEndian);this.affine[3][0]=0,this.affine[3][1]=0,this.affine[3][2]=0,this.affine[3][3]=1,this.slice_code=utilities_1.Utils.getIntAt(m,496,this.littleEndian),this.xyzt_units=utilities_1.Utils.getIntAt(m,500,this.littleEndian),this.intent_code=utilities_1.Utils.getIntAt(m,504,this.littleEndian),this.intent_name=utilities_1.Utils.getStringAt(m,508,524),this.dim_info=utilities_1.Utils.getByteAt(m,524),m.byteLength>At.MAGIC_COOKIE&&(this.extensionFlag[0]=utilities_1.Utils.getByteAt(m,540),this.extensionFlag[1]=utilities_1.Utils.getByteAt(m,541),this.extensionFlag[2]=utilities_1.Utils.getByteAt(m,542),this.extensionFlag[3]=utilities_1.Utils.getByteAt(m,543),this.extensionFlag[0]&&(this.extensions=utilities_1.Utils.getExtensionsAt(m,this.getExtensionLocation(),this.littleEndian,this.vox_offset),this.extensionSize=this.extensions[0].esize,this.extensionCode=this.extensions[0].ecode))}toFormattedString(){var u=utilities_1.Utils.formatNumber,m="";return m+="Datatype = "+ +this.datatypeCode+" ("+this.getDatatypeCodeString(this.datatypeCode)+`) +`),m}getQformMat(){return this.convertNiftiQFormToNiftiSForm(this.quatern_b,this.quatern_c,this.quatern_d,this.qoffset_x,this.qoffset_y,this.qoffset_z,this.pixDims[1],this.pixDims[2],this.pixDims[3],this.pixDims[0])}convertNiftiQFormToNiftiSForm(u,m,A,S,v,w,D,R,L,P){var d=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],E,e=u,N=m,q=A,z,e0,H;return d[3][0]=d[3][1]=d[3][2]=0,d[3][3]=1,E=1-(e*e+N*N+q*q),E<1e-7?(E=1/Math.sqrt(e*e+N*N+q*q),e*=E,N*=E,q*=E,E=0):E=Math.sqrt(E),z=D>0?D:1,e0=R>0?R:1,H=L>0?L:1,P<0&&(H=-H),d[0][0]=(E*E+e*e-N*N-q*q)*z,d[0][1]=2*(e*N-E*q)*e0,d[0][2]=2*(e*q+E*N)*H,d[1][0]=2*(e*N+E*q)*z,d[1][1]=(E*E+N*N-e*e-q*q)*e0,d[1][2]=2*(N*q-E*e)*H,d[2][0]=2*(e*q-E*N)*z,d[2][1]=2*(N*q+E*e)*e0,d[2][2]=(E*E+q*q-N*N-e*e)*H,d[0][3]=S,d[1][3]=v,d[2][3]=w,d}convertNiftiSFormToNEMA(u){var m,A,S,v,w,D,R,L,P,d,E,e,N,q,z,e0,H,j,y,Y,G,J,i0,Q,f,o0,l0,c0,d0,S0,g0,T0,C0,F0;if(z=0,l0=[[0,0,0],[0,0,0],[0,0,0]],c0=[[0,0,0],[0,0,0],[0,0,0]],m=u[0][0],A=u[0][1],S=u[0][2],v=u[1][0],w=u[1][1],D=u[1][2],R=u[2][0],L=u[2][1],P=u[2][2],d=Math.sqrt(m*m+v*v+R*R),d===0||(m/=d,v/=d,R/=d,d=Math.sqrt(A*A+w*w+L*L),d===0))return null;if(A/=d,w/=d,L/=d,d=m*A+v*w+R*L,Math.abs(d)>1e-4){if(A-=d*m,w-=d*v,L-=d*R,d=Math.sqrt(A*A+w*w+L*L),d===0)return null;A/=d,w/=d,L/=d}if(d=Math.sqrt(S*S+D*D+P*P),d===0?(S=v*L-R*w,D=R*A-L*m,P=m*w-v*A):(S/=d,D/=d,P/=d),d=m*S+v*D+R*P,Math.abs(d)>1e-4){if(S-=d*m,D-=d*v,P-=d*R,d=Math.sqrt(S*S+D*D+P*P),d===0)return null;S/=d,D/=d,P/=d}if(d=A*S+w*D+L*P,Math.abs(d)>1e-4){if(S-=d*A,D-=d*w,P-=d*L,d=Math.sqrt(S*S+D*D+P*P),d===0)return null;S/=d,D/=d,P/=d}if(l0[0][0]=m,l0[0][1]=A,l0[0][2]=S,l0[1][0]=v,l0[1][1]=w,l0[1][2]=D,l0[2][0]=R,l0[2][1]=L,l0[2][2]=P,E=this.nifti_mat33_determ(l0),E===0)return null;for(o0=-666,y=J=i0=Q=1,Y=2,G=3,N=1;N<=3;N+=1)for(q=1;q<=3;q+=1)if(N!==q){for(z=1;z<=3;z+=1)if(!(N===z||q===z))for(c0[0][0]=c0[0][1]=c0[0][2]=c0[1][0]=c0[1][1]=c0[1][2]=c0[2][0]=c0[2][1]=c0[2][2]=0,e0=-1;e0<=1;e0+=2)for(H=-1;H<=1;H+=2)for(j=-1;j<=1;j+=2)c0[0][N-1]=e0,c0[1][q-1]=H,c0[2][z-1]=j,e=this.nifti_mat33_determ(c0),e*E>0&&(f=this.nifti_mat33_mul(c0,l0),d=f[0][0]+f[1][1]+f[2][2],d>o0&&(o0=d,y=N,Y=q,G=z,J=e0,i0=H,Q=j))}switch(d0=S0=g0=T0=C0=F0="",y*J){case 1:d0="X",T0="+";break;case-1:d0="X",T0="-";break;case 2:d0="Y",T0="+";break;case-2:d0="Y",T0="-";break;case 3:d0="Z",T0="+";break;case-3:d0="Z",T0="-";break}switch(Y*i0){case 1:S0="X",C0="+";break;case-1:S0="X",C0="-";break;case 2:S0="Y",C0="+";break;case-2:S0="Y",C0="-";break;case 3:S0="Z",C0="+";break;case-3:S0="Z",C0="-";break}switch(G*Q){case 1:g0="X",F0="+";break;case-1:g0="X",F0="-";break;case 2:g0="Y",F0="+";break;case-2:g0="Y",F0="-";break;case 3:g0="Z",F0="+";break;case-3:g0="Z",F0="-";break}return d0+S0+g0+T0+C0+F0}getExtensionLocation(){return Oe.MAGIC_COOKIE+4}getExtensionSize(u){return utilities_1$1.Utils.getIntAt(u,this.getExtensionLocation(),this.littleEndian)}getExtensionCode(u){return utilities_1$1.Utils.getIntAt(u,this.getExtensionLocation()+4,this.littleEndian)}addExtension(u,m=-1){m==-1?this.extensions.push(u):this.extensions.splice(m,0,u),this.vox_offset+=u.esize}removeExtension(u){let m=this.extensions[u];m&&(this.vox_offset-=m.esize),this.extensions.splice(u,1)}toArrayBuffer(u=!1){let S=352;if(u)for(let R of this.extensions)S+=R.esize;let v=new Uint8Array(S),w=new DataView(v.buffer);w.setInt32(0,348,this.littleEndian),w.setUint8(39,this.dim_info);for(let R=0;R<8;R++)w.setUint16(40+2*R,this.dims[R],this.littleEndian);w.setFloat32(56,this.intent_p1,this.littleEndian),w.setFloat32(60,this.intent_p2,this.littleEndian),w.setFloat32(64,this.intent_p3,this.littleEndian),w.setInt16(68,this.intent_code,this.littleEndian),w.setInt16(70,this.datatypeCode,this.littleEndian),w.setInt16(72,this.numBitsPerVoxel,this.littleEndian),w.setInt16(74,this.slice_start,this.littleEndian);for(let R=0;R<8;R++)w.setFloat32(76+4*R,this.pixDims[R],this.littleEndian);w.setFloat32(108,this.vox_offset,this.littleEndian),w.setFloat32(112,this.scl_slope,this.littleEndian),w.setFloat32(116,this.scl_inter,this.littleEndian),w.setInt16(120,this.slice_end,this.littleEndian),w.setUint8(122,this.slice_code),w.setUint8(123,this.xyzt_units),w.setFloat32(124,this.cal_max,this.littleEndian),w.setFloat32(128,this.cal_min,this.littleEndian),w.setFloat32(132,this.slice_duration,this.littleEndian),w.setFloat32(136,this.toffset,this.littleEndian),v.set(Buffer.from(this.description),148),v.set(Buffer.from(this.aux_file),228),w.setInt16(252,this.qform_code,this.littleEndian),w.setInt16(254,this.sform_code,this.littleEndian),w.setFloat32(256,this.quatern_b,this.littleEndian),w.setFloat32(260,this.quatern_c,this.littleEndian),w.setFloat32(264,this.quatern_d,this.littleEndian),w.setFloat32(268,this.qoffset_x,this.littleEndian),w.setFloat32(272,this.qoffset_y,this.littleEndian),w.setFloat32(276,this.qoffset_z,this.littleEndian);const D=this.affine.flat();for(let R=0;R<12;R++)w.setFloat32(280+4*R,D[R],this.littleEndian);if(v.set(Buffer.from(this.intent_name),328),v.set(Buffer.from(this.magic),344),u){v.set(Uint8Array.from([1,0,0,0]),348);let R=this.getExtensionLocation();for(const L of this.extensions)w.setInt32(R,L.esize,L.littleEndian),w.setInt32(R+4,L.ecode,L.littleEndian),v.set(new Uint8Array(L.edata),R+8),R+=L.esize}else v.set(new Uint8Array(4).fill(0),348);return v.buffer}};$0(Oe,"TYPE_NONE",0),$0(Oe,"TYPE_BINARY",1),$0(Oe,"TYPE_UINT8",2),$0(Oe,"TYPE_INT16",4),$0(Oe,"TYPE_INT32",8),$0(Oe,"TYPE_FLOAT32",16),$0(Oe,"TYPE_COMPLEX64",32),$0(Oe,"TYPE_FLOAT64",64),$0(Oe,"TYPE_RGB24",128),$0(Oe,"TYPE_INT8",256),$0(Oe,"TYPE_UINT16",512),$0(Oe,"TYPE_UINT32",768),$0(Oe,"TYPE_INT64",1024),$0(Oe,"TYPE_UINT64",1280),$0(Oe,"TYPE_FLOAT128",1536),$0(Oe,"TYPE_COMPLEX128",1792),$0(Oe,"TYPE_COMPLEX256",2048),$0(Oe,"XFORM_UNKNOWN",0),$0(Oe,"XFORM_SCANNER_ANAT",1),$0(Oe,"XFORM_ALIGNED_ANAT",2),$0(Oe,"XFORM_TALAIRACH",3),$0(Oe,"XFORM_MNI_152",4),$0(Oe,"SPATIAL_UNITS_MASK",7),$0(Oe,"TEMPORAL_UNITS_MASK",56),$0(Oe,"UNITS_UNKNOWN",0),$0(Oe,"UNITS_METER",1),$0(Oe,"UNITS_MM",2),$0(Oe,"UNITS_MICRON",3),$0(Oe,"UNITS_SEC",8),$0(Oe,"UNITS_MSEC",16),$0(Oe,"UNITS_USEC",24),$0(Oe,"UNITS_HZ",32),$0(Oe,"UNITS_PPM",40),$0(Oe,"UNITS_RADS",48),$0(Oe,"MAGIC_COOKIE",348),$0(Oe,"STANDARD_HEADER_SIZE",348),$0(Oe,"MAGIC_NUMBER_LOCATION",344),$0(Oe,"MAGIC_NUMBER",[110,43,49]),$0(Oe,"MAGIC_NUMBER2",[110,105,49]),$0(Oe,"EXTENSION_HEADER_SIZE",8);let NIFTI1=Oe;nifti1.NIFTI1=NIFTI1;var nifti2={};Object.defineProperty(nifti2,"__esModule",{value:!0});nifti2.NIFTI2=void 0;const nifti1_1=nifti1,utilities_1=utilities$1,At=class At{constructor(){$0(this,"littleEndian",!1);$0(this,"dim_info",0);$0(this,"dims",[]);$0(this,"intent_p1",0);$0(this,"intent_p2",0);$0(this,"intent_p3",0);$0(this,"intent_code",0);$0(this,"datatypeCode",0);$0(this,"numBitsPerVoxel",0);$0(this,"slice_start",0);$0(this,"slice_end",0);$0(this,"slice_code",0);$0(this,"pixDims",[]);$0(this,"vox_offset",0);$0(this,"scl_slope",1);$0(this,"scl_inter",0);$0(this,"xyzt_units",0);$0(this,"cal_max",0);$0(this,"cal_min",0);$0(this,"slice_duration",0);$0(this,"toffset",0);$0(this,"description","");$0(this,"aux_file","");$0(this,"intent_name","");$0(this,"qform_code",0);$0(this,"sform_code",0);$0(this,"quatern_b",0);$0(this,"quatern_c",0);$0(this,"quatern_d",0);$0(this,"qoffset_x",0);$0(this,"qoffset_y",0);$0(this,"qoffset_z",0);$0(this,"affine",[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]]);$0(this,"magic","0");$0(this,"extensionFlag",[0,0,0,0]);$0(this,"extensions",[]);$0(this,"extensionSize",0);$0(this,"extensionCode",0);$0(this,"getExtensionLocation",function(){return At.MAGIC_COOKIE+4});$0(this,"getExtensionSize",nifti1_1.NIFTI1.prototype.getExtensionSize);$0(this,"getExtensionCode",nifti1_1.NIFTI1.prototype.getExtensionCode);$0(this,"addExtension",nifti1_1.NIFTI1.prototype.addExtension);$0(this,"removeExtension",nifti1_1.NIFTI1.prototype.removeExtension);$0(this,"getDatatypeCodeString",nifti1_1.NIFTI1.prototype.getDatatypeCodeString);$0(this,"getTransformCodeString",nifti1_1.NIFTI1.prototype.getTransformCodeString);$0(this,"getUnitsCodeString",nifti1_1.NIFTI1.prototype.getUnitsCodeString);$0(this,"getQformMat",nifti1_1.NIFTI1.prototype.getQformMat);$0(this,"convertNiftiQFormToNiftiSForm",nifti1_1.NIFTI1.prototype.convertNiftiQFormToNiftiSForm);$0(this,"convertNiftiSFormToNEMA",nifti1_1.NIFTI1.prototype.convertNiftiSFormToNEMA);$0(this,"nifti_mat33_mul",nifti1_1.NIFTI1.prototype.nifti_mat33_mul);$0(this,"nifti_mat33_determ",nifti1_1.NIFTI1.prototype.nifti_mat33_determ)}readHeader(u){var m=new DataView(u),A=utilities_1.Utils.getIntAt(m,0,this.littleEndian),S,v,w,D;if(A!==At.MAGIC_COOKIE&&(this.littleEndian=!0,A=utilities_1.Utils.getIntAt(m,0,this.littleEndian)),A!==At.MAGIC_COOKIE)throw new Error("This does not appear to be a NIFTI file!");for(this.magic=utilities_1.Utils.getStringAt(m,4,12),this.datatypeCode=utilities_1.Utils.getShortAt(m,12,this.littleEndian),this.numBitsPerVoxel=utilities_1.Utils.getShortAt(m,14,this.littleEndian),S=0;S<8;S+=1)D=16+S*8,this.dims[S]=utilities_1.Utils.getLongAt(m,D,this.littleEndian);for(this.intent_p1=utilities_1.Utils.getDoubleAt(m,80,this.littleEndian),this.intent_p2=utilities_1.Utils.getDoubleAt(m,88,this.littleEndian),this.intent_p3=utilities_1.Utils.getDoubleAt(m,96,this.littleEndian),S=0;S<8;S+=1)D=104+S*8,this.pixDims[S]=utilities_1.Utils.getDoubleAt(m,D,this.littleEndian);for(this.vox_offset=utilities_1.Utils.getLongAt(m,168,this.littleEndian),this.scl_slope=utilities_1.Utils.getDoubleAt(m,176,this.littleEndian),this.scl_inter=utilities_1.Utils.getDoubleAt(m,184,this.littleEndian),this.cal_max=utilities_1.Utils.getDoubleAt(m,192,this.littleEndian),this.cal_min=utilities_1.Utils.getDoubleAt(m,200,this.littleEndian),this.slice_duration=utilities_1.Utils.getDoubleAt(m,208,this.littleEndian),this.toffset=utilities_1.Utils.getDoubleAt(m,216,this.littleEndian),this.slice_start=utilities_1.Utils.getLongAt(m,224,this.littleEndian),this.slice_end=utilities_1.Utils.getLongAt(m,232,this.littleEndian),this.description=utilities_1.Utils.getStringAt(m,240,320),this.aux_file=utilities_1.Utils.getStringAt(m,320,344),this.qform_code=utilities_1.Utils.getIntAt(m,344,this.littleEndian),this.sform_code=utilities_1.Utils.getIntAt(m,348,this.littleEndian),this.quatern_b=utilities_1.Utils.getDoubleAt(m,352,this.littleEndian),this.quatern_c=utilities_1.Utils.getDoubleAt(m,360,this.littleEndian),this.quatern_d=utilities_1.Utils.getDoubleAt(m,368,this.littleEndian),this.qoffset_x=utilities_1.Utils.getDoubleAt(m,376,this.littleEndian),this.qoffset_y=utilities_1.Utils.getDoubleAt(m,384,this.littleEndian),this.qoffset_z=utilities_1.Utils.getDoubleAt(m,392,this.littleEndian),v=0;v<3;v+=1)for(w=0;w<4;w+=1)D=400+(v*4+w)*8,this.affine[v][w]=utilities_1.Utils.getDoubleAt(m,D,this.littleEndian);this.affine[3][0]=0,this.affine[3][1]=0,this.affine[3][2]=0,this.affine[3][3]=1,this.slice_code=utilities_1.Utils.getIntAt(m,496,this.littleEndian),this.xyzt_units=utilities_1.Utils.getIntAt(m,500,this.littleEndian),this.intent_code=utilities_1.Utils.getIntAt(m,504,this.littleEndian),this.intent_name=utilities_1.Utils.getStringAt(m,508,524),this.dim_info=utilities_1.Utils.getByteAt(m,524),m.byteLength>At.MAGIC_COOKIE&&(this.extensionFlag[0]=utilities_1.Utils.getByteAt(m,540),this.extensionFlag[1]=utilities_1.Utils.getByteAt(m,541),this.extensionFlag[2]=utilities_1.Utils.getByteAt(m,542),this.extensionFlag[3]=utilities_1.Utils.getByteAt(m,543),this.extensionFlag[0]&&(this.extensions=utilities_1.Utils.getExtensionsAt(m,this.getExtensionLocation(),this.littleEndian,this.vox_offset),this.extensionSize=this.extensions[0].esize,this.extensionCode=this.extensions[0].ecode))}toFormattedString(){var u=utilities_1.Utils.formatNumber,m="";return m+="Datatype = "+ +this.datatypeCode+" ("+this.getDatatypeCodeString(this.datatypeCode)+`) `,m+="Bits Per Voxel = = "+this.numBitsPerVoxel+` `,m+="Image Dimensions (1-8): "+this.dims[0]+", "+this.dims[1]+", "+this.dims[2]+", "+this.dims[3]+", "+this.dims[4]+", "+this.dims[5]+", "+this.dims[6]+", "+this.dims[7]+` `,m+="Intent Parameters (1-3): "+this.intent_p1+", "+this.intent_p2+", "+this.intent_p3+` @@ -51,12 +51,12 @@ var zp=Object.defineProperty;var Hp=(T,u,m)=>u in T?zp(T,u,{enumerable:!0,config `,m+="Intent Code = "+this.intent_code+` `,m+='Intent Name: "'+this.intent_name+`" `,m+="Dim Info = "+this.dim_info+` -`,m}toArrayBuffer(u=!1){let S=544;if(u)for(let R of this.extensions)S+=R.esize;let v=new Uint8Array(S),w=new DataView(v.buffer);w.setInt32(0,540,this.littleEndian),v.set(Buffer.from(this.magic),4),w.setInt16(12,this.datatypeCode,this.littleEndian),w.setInt16(14,this.numBitsPerVoxel,this.littleEndian);for(let R=0;R<8;R++)w.setBigInt64(16+8*R,BigInt(this.dims[R]),this.littleEndian);w.setFloat64(80,this.intent_p1,this.littleEndian),w.setFloat64(88,this.intent_p2,this.littleEndian),w.setFloat64(96,this.intent_p3,this.littleEndian);for(let R=0;R<8;R++)w.setFloat64(104+8*R,this.pixDims[R],this.littleEndian);w.setBigInt64(168,BigInt(this.vox_offset),this.littleEndian),w.setFloat64(176,this.scl_slope,this.littleEndian),w.setFloat64(184,this.scl_inter,this.littleEndian),w.setFloat64(192,this.cal_max,this.littleEndian),w.setFloat64(200,this.cal_min,this.littleEndian),w.setFloat64(208,this.slice_duration,this.littleEndian),w.setFloat64(216,this.toffset,this.littleEndian),w.setBigInt64(224,BigInt(this.slice_start),this.littleEndian),w.setBigInt64(232,BigInt(this.slice_end),this.littleEndian),v.set(Buffer.from(this.description),240),v.set(Buffer.from(this.aux_file),320),w.setInt32(344,this.qform_code,this.littleEndian),w.setInt32(348,this.sform_code,this.littleEndian),w.setFloat64(352,this.quatern_b,this.littleEndian),w.setFloat64(360,this.quatern_c,this.littleEndian),w.setFloat64(368,this.quatern_d,this.littleEndian),w.setFloat64(376,this.qoffset_x,this.littleEndian),w.setFloat64(384,this.qoffset_y,this.littleEndian),w.setFloat64(392,this.qoffset_z,this.littleEndian);const D=this.affine.flat();for(let R=0;R<12;R++)w.setFloat64(400+8*R,D[R],this.littleEndian);if(w.setInt32(496,this.slice_code,this.littleEndian),w.setInt32(500,this.xyzt_units,this.littleEndian),w.setInt32(504,this.intent_code,this.littleEndian),v.set(Buffer.from(this.intent_name),508),w.setUint8(524,this.dim_info),u){v.set(Uint8Array.from([1,0,0,0]),540);let R=this.getExtensionLocation();for(const L of this.extensions)w.setInt32(R,L.esize,L.littleEndian),w.setInt32(R+4,L.ecode,L.littleEndian),v.set(new Uint8Array(L.edata),R+8),R+=L.esize}else v.set(new Uint8Array(4).fill(0),540);return v.buffer}};$0(At,"MAGIC_COOKIE",540),$0(At,"MAGIC_NUMBER_LOCATION",4),$0(At,"MAGIC_NUMBER",[110,43,50,0,13,10,26,10]),$0(At,"MAGIC_NUMBER2",[110,105,50,0,13,10,26,10]);let NIFTI2=At;nifti2.NIFTI2=NIFTI2;(function(T){var u=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(G,J,i0,Q){Q===void 0&&(Q=i0);var f=Object.getOwnPropertyDescriptor(J,i0);(!f||("get"in f?!J.__esModule:f.writable||f.configurable))&&(f={enumerable:!0,get:function(){return J[i0]}}),Object.defineProperty(G,Q,f)}:function(G,J,i0,Q){Q===void 0&&(Q=i0),G[Q]=J[i0]}),m=commonjsGlobal&&commonjsGlobal.__setModuleDefault||(Object.create?function(G,J){Object.defineProperty(G,"default",{enumerable:!0,value:J})}:function(G,J){G.default=J}),A=commonjsGlobal&&commonjsGlobal.__importStar||function(G){if(G&&G.__esModule)return G;var J={};if(G!=null)for(var i0 in G)i0!=="default"&&Object.prototype.hasOwnProperty.call(G,i0)&&u(J,G,i0);return m(J,G),J};Object.defineProperty(T,"__esModule",{value:!0}),T.readExtensionData=T.readExtension=T.readImage=T.hasExtension=T.readHeader=T.decompress=T.isCompressed=T.isNIFTI=T.isNIFTI2=T.isNIFTI1=T.NIFTIEXTENSION=T.Utils=T.NIFTI2=T.NIFTI1=void 0;const S=A(browser),v=nifti1,w=nifti2,D=utilities$1;var R=nifti1;Object.defineProperty(T,"NIFTI1",{enumerable:!0,get:function(){return R.NIFTI1}});var L=nifti2;Object.defineProperty(T,"NIFTI2",{enumerable:!0,get:function(){return L.NIFTI2}});var P=utilities$1;Object.defineProperty(T,"Utils",{enumerable:!0,get:function(){return P.Utils}});var d=niftiExtension;Object.defineProperty(T,"NIFTIEXTENSION",{enumerable:!0,get:function(){return d.NIFTIEXTENSION}});function E(G,J=!1){var i0,Q,f,l0;return G.byteLength1)for(var v=Array.prototype.slice.call(arguments,1);S--;)A[m-1-S]=u.Utils.createArray.apply(this,v);return A},u.Utils.getStringAt=function(m,A,S,v,w){var D="",R,L;for(R=0;R0?parseInt(m,10):0},u.Utils.convertCamcelCaseToTitleCase=function(m){var A=m.replace(/([A-Z][a-z])/g," $1");return u.Utils.trim(A.charAt(0).toUpperCase()+A.slice(1))},u.Utils.safeParseFloat=function(m){return m=u.Utils.stripLeadingZeros(m),m.length>0?parseFloat(m):0},u.Utils.bytesToDouble=function(m){var A=(m[0]&128)>>7,S=(m[0]&127)<<4|(m[1]&240)>>4;if(S==0)return 0;if(S==2047)return A?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;var v=Math.pow(2,S-1023-52),w=m[7]+m[6]*Math.pow(2,8)+m[5]*Math.pow(2,8*2)+m[4]*Math.pow(2,8*3)+m[3]*Math.pow(2,8*4)+m[2]*Math.pow(2,8*5)+(m[1]&15)*Math.pow(2,8*6)+Math.pow(2,52);return Math.pow(-1,A)*w*v},u.Utils.concatArrayBuffers=function(m,A){var S=new Uint8Array(m.byteLength+A.byteLength);return S.set(new Uint8Array(m),0),S.set(new Uint8Array(A),m.byteLength),S.buffer},u.Utils.concatArrayBuffers2=function(m){var A=0,S=0,v;for(v=0;v>8&65280|m>>24&255},u.Utils.swap16=function(m){return((m&255)<<8|m>>8&255)<<16>>16},u.Utils.makeCRCTable=function(){for(var m,A=[],S=0;S<256;S++){m=S;for(var v=0;v<8;v++)m=m&1?3988292384^m>>>1:m>>>1;A[S]=m}return A},u.Utils.crc32=function(m){for(var A=u.Utils.crcTable||(u.Utils.crcTable=u.Utils.makeCRCTable()),S=-1,v=0;v>>8^A[(S^m.getUint8(v))&255];return(S^-1)>>>0},u.Utils.createBitMask=function(m,A,S){var v=4294967295;return v>>>=(4-m)*8+(m*8-A),S?m==1?v&=255:m==2?v&=65535:m==4?v&=4294967295:m==8&&(v=4294967295):v=4294967295,v},T.exports&&(T.exports=u.Utils)}(utilities)),utilities.exports}var hasRequiredDictionary;function requireDictionary(){return hasRequiredDictionary||(hasRequiredDictionary=1,function(T){var u=u||{};u.Dictionary=u.Dictionary||{},u.Utils=u.Utils||(typeof commonjsRequire<"u"?requireUtilities():null),u.Dictionary.dictPrivate={"0207":{"101F":["FE","ElscintDataScale"]}},u.Dictionary.dict={"0002":{"0001":["OB","FileMetaInformationVersion"],"0002":["UI","MediaStoredSOPClassUID"],"0003":["UI","MediaStoredSOPInstanceUID"],"0010":["UI","TransferSyntaxUID"],"0012":["UI","ImplementationClassUID"],"0013":["SH","ImplementationVersionName"],"0016":["AE","SourceApplicationEntityTitle"],"0100":["UI","PrivateInformationCreatorUID"],"0102":["OB","PrivateInformation"]},"0004":{1130:["CS","FilesetID"],1141:["CS","FilesetDescriptorFileFileID"],1142:["CS","FilesetDescriptorFileFormat"],1200:["UL","RootDirectoryEntitysFirstDirectoryRecordOffset"],1202:["UL","RootDirectoryEntitysLastDirectoryRecordOffset"],1212:["US","File-setConsistenceFlag"],1220:["SQ","DirectoryRecordSequence"],1400:["UL","NextDirectoryRecordOffset"],1410:["US","RecordInuseFlag"],1420:["UL","ReferencedLowerlevelDirectoryEntityOffset"],1430:["CS","DirectoryRecordType"],1432:["UI","PrivateRecordUID"],1500:["CS","ReferencedFileID"],1510:["UI","ReferencedSOPClassUIDInFile"],1511:["UI","ReferencedSOPInstanceUIDInFile"],1600:["UL","NumberOfReferences"]},"0008":{"0001":["UL","LengthToEnd"],"0005":["CS","SpecificCharacterSet"],"0006":["SQ","LanguageCodeSequence"],"0008":["CS","ImageType"],"0010":["SH","RecognitionCode"],"0012":["DA","InstanceCreationDate"],"0013":["TM","InstanceCreationTime"],"0014":["UI","InstanceCreatorUID"],"0016":["UI","SOPClassUID"],"0018":["UI","SOPInstanceUID"],"001A":["UI","RelatedGeneralSOPClassUID"],"001B":["UI","OriginalSpecializedSOPClassUID"],"0020":["DA","StudyDate"],"0021":["DA","SeriesDate"],"0022":["DA","AcquisitionDate"],"0023":["DA","ContentDate"],"0024":["DA","OverlayDate"],"0025":["DA","CurveDate"],"002A":["DT","AcquisitionDateTime"],"0030":["TM","StudyTime"],"0031":["TM","SeriesTime"],"0032":["TM","AcquisitionTime"],"0033":["TM","ContentTime"],"0034":["TM","OverlayTime"],"0035":["TM","CurveTime"],"0040":["US","DataSetType"],"0041":["LO","DataSetSubtype"],"0042":["CS","NuclearMedicineSeriesType"],"0050":["SH","AccessionNumber"],"0051":["SQ","IssuerOfAccessionNumberSequence"],"0052":["CS","QueryRetrieveLevel"],"0054":["AE","RetrieveAETitle"],"0056":["CS","InstanceAvailability"],"0058":["UI","FailedSOPInstanceUIDList"],"0060":["CS","Modality"],"0061":["CS","ModalitiesInStudy"],"0062":["UI","SOPClassesInStudy"],"0064":["CS","ConversionType"],"0068":["CS","PresentationIntentType"],"0070":["LO","Manufacturer"],"0080":["LO","InstitutionName"],"0081":["ST","InstitutionAddress"],"0082":["SQ","InstitutionCodeSequence"],"0090":["PN","ReferringPhysicianName"],"0092":["ST","ReferringPhysicianAddress"],"0094":["SH","ReferringPhysicianTelephoneNumbers"],"0096":["SQ","ReferringPhysicianIdentificationSequence"],"0100":["SH","CodeValue"],"0102":["SH","CodingSchemeDesignator"],"0103":["SH","CodingSchemeVersion"],"0104":["LO","CodeMeaning"],"0105":["CS","MappingResource"],"0106":["DT","ContextGroupVersion"],"0107":["DT","ContextGroupLocalVersion"],"010B":["CS","ContextGroupExtensionFlag"],"010C":["UI","CodingSchemeUID"],"010D":["UI","ContextGroupExtensionCreatorUID"],"010F":["CS","ContextIdentifier"],"0110":["SQ","CodingSchemeIdentificationSequence"],"0112":["LO","CodingSchemeRegistry"],"0114":["ST","CodingSchemeExternalID"],"0115":["ST","CodingSchemeName"],"0116":["ST","CodingSchemeResponsibleOrganization"],"0117":["UI","ContextUID"],"0201":["SH","TimezoneOffsetFromUTC"],1e3:["AE","NetworkID"],1010:["SH","StationName"],1030:["LO","StudyDescription"],1032:["SQ","ProcedureCodeSequence"],"103E":["LO","SeriesDescription"],"103F":["SQ","SeriesDescriptionCodeSequence"],1040:["LO","InstitutionalDepartmentName"],1048:["PN","PhysiciansOfRecord"],1049:["SQ","PhysiciansOfRecordIdentificationSequence"],1050:["PN","PerformingPhysicianName"],1052:["SQ","PerformingPhysicianIdentificationSequence"],1060:["PN","NameOfPhysiciansReadingStudy"],1062:["SQ","PhysiciansReadingStudyIdentificationSequence"],1070:["PN","OperatorsName"],1072:["SQ","OperatorIdentificationSequence"],1080:["LO","AdmittingDiagnosesDescription"],1084:["SQ","AdmittingDiagnosesCodeSequence"],1090:["LO","ManufacturerModelName"],1100:["SQ","ReferencedResultsSequence"],1110:["SQ","ReferencedStudySequence"],1111:["SQ","ReferencedPerformedProcedureStepSequence"],1115:["SQ","ReferencedSeriesSequence"],1120:["SQ","ReferencedPatientSequence"],1125:["SQ","ReferencedVisitSequence"],1130:["SQ","ReferencedOverlaySequence"],1134:["SQ","ReferencedStereometricInstanceSequence"],"113A":["SQ","ReferencedWaveformSequence"],1140:["SQ","ReferencedImageSequence"],1145:["SQ","ReferencedCurveSequence"],"114A":["SQ","ReferencedInstanceSequence"],"114B":["SQ","ReferencedRealWorldValueMappingInstanceSequence"],1150:["UI","ReferencedSOPClassUID"],1155:["UI","ReferencedSOPInstanceUID"],"115A":["UI","SOPClassesSupported"],1160:["IS","ReferencedFrameNumber"],1161:["UL","SimpleFrameList"],1162:["UL","CalculatedFrameList"],1163:["FD","TimeRange"],1164:["SQ","FrameExtractionSequence"],1167:["UI","MultiFrameSourceSOPInstanceUID"],1195:["UI","TransactionUID"],1197:["US","FailureReason"],1198:["SQ","FailedSOPSequence"],1199:["SQ","ReferencedSOPSequence"],1200:["SQ","StudiesContainingOtherReferencedInstancesSequence"],1250:["SQ","RelatedSeriesSequence"],2110:["CS","LossyImageCompressionRetired"],2111:["ST","DerivationDescription"],2112:["SQ","SourceImageSequence"],2120:["SH","StageName"],2122:["IS","StageNumber"],2124:["IS","NumberOfStages"],2127:["SH","ViewName"],2128:["IS","ViewNumber"],2129:["IS","NumberOfEventTimers"],"212A":["IS","NumberOfViewsInStage"],2130:["DS","EventElapsedTimes"],2132:["LO","EventTimerNames"],2133:["SQ","EventTimerSequence"],2134:["FD","EventTimeOffset"],2135:["SQ","EventCodeSequence"],2142:["IS","StartTrim"],2143:["IS","StopTrim"],2144:["IS","RecommendedDisplayFrameRate"],2200:["CS","TransducerPosition"],2204:["CS","TransducerOrientation"],2208:["CS","AnatomicStructure"],2218:["SQ","AnatomicRegionSequence"],2220:["SQ","AnatomicRegionModifierSequence"],2228:["SQ","PrimaryAnatomicStructureSequence"],2229:["SQ","AnatomicStructureSpaceOrRegionSequence"],2230:["SQ","PrimaryAnatomicStructureModifierSequence"],2240:["SQ","TransducerPositionSequence"],2242:["SQ","TransducerPositionModifierSequence"],2244:["SQ","TransducerOrientationSequence"],2246:["SQ","TransducerOrientationModifierSequence"],2251:["SQ","AnatomicStructureSpaceOrRegionCodeSequenceTrial"],2253:["SQ","AnatomicPortalOfEntranceCodeSequenceTrial"],2255:["SQ","AnatomicApproachDirectionCodeSequenceTrial"],2256:["ST","AnatomicPerspectiveDescriptionTrial"],2257:["SQ","AnatomicPerspectiveCodeSequenceTrial"],2258:["ST","AnatomicLocationOfExaminingInstrumentDescriptionTrial"],2259:["SQ","AnatomicLocationOfExaminingInstrumentCodeSequenceTrial"],"225A":["SQ","AnatomicStructureSpaceOrRegionModifierCodeSequenceTrial"],"225C":["SQ","OnAxisBackgroundAnatomicStructureCodeSequenceTrial"],3001:["SQ","AlternateRepresentationSequence"],3010:["UI","IrradiationEventUID"],4e3:["LT","IdentifyingComments"],9007:["CS","FrameType"],9092:["SQ","ReferencedImageEvidenceSequence"],9121:["SQ","ReferencedRawDataSequence"],9123:["UI","CreatorVersionUID"],9124:["SQ","DerivationImageSequence"],9154:["SQ","SourceImageEvidenceSequence"],9205:["CS","PixelPresentation"],9206:["CS","VolumetricProperties"],9207:["CS","VolumeBasedCalculationTechnique"],9208:["CS","ComplexImageComponent"],9209:["CS","AcquisitionContrast"],9215:["SQ","DerivationCodeSequence"],9237:["SQ","ReferencedPresentationStateSequence"],9410:["SQ","ReferencedOtherPlaneSequence"],9458:["SQ","FrameDisplaySequence"],9459:["FL","RecommendedDisplayFrameRateInFloat"],9460:["CS","SkipFrameRangeFlag"]},"0010":{"0010":["PN","PatientName"],"0020":["LO","PatientID"],"0021":["LO","IssuerOfPatientID"],"0022":["CS","TypeOfPatientID"],"0024":["SQ","IssuerOfPatientIDQualifiersSequence"],"0030":["DA","PatientBirthDate"],"0032":["TM","PatientBirthTime"],"0040":["CS","PatientSex"],"0050":["SQ","PatientInsurancePlanCodeSequence"],"0101":["SQ","PatientPrimaryLanguageCodeSequence"],"0102":["SQ","PatientPrimaryLanguageModifierCodeSequence"],1e3:["LO","OtherPatientIDs"],1001:["PN","OtherPatientNames"],1002:["SQ","OtherPatientIDsSequence"],1005:["PN","PatientBirthName"],1010:["AS","PatientAge"],1020:["DS","PatientSize"],1021:["SQ","PatientSizeCodeSequence"],1030:["DS","PatientWeight"],1040:["LO","PatientAddress"],1050:["LO","InsurancePlanIdentification"],1060:["PN","PatientMotherBirthName"],1080:["LO","MilitaryRank"],1081:["LO","BranchOfService"],1090:["LO","MedicalRecordLocator"],2e3:["LO","MedicalAlerts"],2110:["LO","Allergies"],2150:["LO","CountryOfResidence"],2152:["LO","RegionOfResidence"],2154:["SH","PatientTelephoneNumbers"],2160:["SH","EthnicGroup"],2180:["SH","Occupation"],"21A0":["CS","SmokingStatus"],"21B0":["LT","AdditionalPatientHistory"],"21C0":["US","PregnancyStatus"],"21D0":["DA","LastMenstrualDate"],"21F0":["LO","PatientReligiousPreference"],2201:["LO","PatientSpeciesDescription"],2202:["SQ","PatientSpeciesCodeSequence"],2203:["CS","PatientSexNeutered"],2210:["CS","AnatomicalOrientationType"],2292:["LO","PatientBreedDescription"],2293:["SQ","PatientBreedCodeSequence"],2294:["SQ","BreedRegistrationSequence"],2295:["LO","BreedRegistrationNumber"],2296:["SQ","BreedRegistryCodeSequence"],2297:["PN","ResponsiblePerson"],2298:["CS","ResponsiblePersonRole"],2299:["LO","ResponsibleOrganization"],4e3:["LT","PatientComments"],9431:["FL","ExaminedBodyThickness"]},"0012":{"0010":["LO","ClinicalTrialSponsorName"],"0020":["LO","ClinicalTrialProtocolID"],"0021":["LO","ClinicalTrialProtocolName"],"0030":["LO","ClinicalTrialSiteID"],"0031":["LO","ClinicalTrialSiteName"],"0040":["LO","ClinicalTrialSubjectID"],"0042":["LO","ClinicalTrialSubjectReadingID"],"0050":["LO","ClinicalTrialTimePointID"],"0051":["ST","ClinicalTrialTimePointDescription"],"0060":["LO","ClinicalTrialCoordinatingCenterName"],"0062":["CS","PatientIdentityRemoved"],"0063":["LO","DeidentificationMethod"],"0064":["SQ","DeidentificationMethodCodeSequence"],"0071":["LO","ClinicalTrialSeriesID"],"0072":["LO","ClinicalTrialSeriesDescription"],"0081":["LO","ClinicalTrialProtocolEthicsCommitteeName"],"0082":["LO","ClinicalTrialProtocolEthicsCommitteeApprovalNumber"],"0083":["SQ","ConsentForClinicalTrialUseSequence"],"0084":["CS","DistributionType"],"0085":["CS","ConsentForDistributionFlag"]},"0014":{"0023":["ST","CADFileFormat"],"0024":["ST","ComponentReferenceSystem"],"0025":["ST","ComponentManufacturingProcedure"],"0028":["ST","ComponentManufacturer"],"0030":["DS","MaterialThickness"],"0032":["DS","MaterialPipeDiameter"],"0034":["DS","MaterialIsolationDiameter"],"0042":["ST","MaterialGrade"],"0044":["ST","MaterialPropertiesFileID"],"0045":["ST","MaterialPropertiesFileFormat"],"0046":["LT","MaterialNotes"],"0050":["CS","ComponentShape"],"0052":["CS","CurvatureType"],"0054":["DS","OuterDiameter"],"0056":["DS","InnerDiameter"],1010:["ST","ActualEnvironmentalConditions"],1020:["DA","ExpiryDate"],1040:["ST","EnvironmentalConditions"],2002:["SQ","EvaluatorSequence"],2004:["IS","EvaluatorNumber"],2006:["PN","EvaluatorName"],2008:["IS","EvaluationAttempt"],2012:["SQ","IndicationSequence"],2014:["IS","IndicationNumber "],2016:["SH","IndicationLabel"],2018:["ST","IndicationDescription"],"201A":["CS","IndicationType"],"201C":["CS","IndicationDisposition"],"201E":["SQ","IndicationROISequence"],2030:["SQ","IndicationPhysicalPropertySequence"],2032:["SH","PropertyLabel"],2202:["IS","CoordinateSystemNumberOfAxes "],2204:["SQ","CoordinateSystemAxesSequence"],2206:["ST","CoordinateSystemAxisDescription"],2208:["CS","CoordinateSystemDataSetMapping"],"220A":["IS","CoordinateSystemAxisNumber"],"220C":["CS","CoordinateSystemAxisType"],"220E":["CS","CoordinateSystemAxisUnits"],2210:["OB","CoordinateSystemAxisValues"],2220:["SQ","CoordinateSystemTransformSequence"],2222:["ST","TransformDescription"],2224:["IS","TransformNumberOfAxes"],2226:["IS","TransformOrderOfAxes"],2228:["CS","TransformedAxisUnits"],"222A":["DS","CoordinateSystemTransformRotationAndScaleMatrix"],"222C":["DS","CoordinateSystemTransformTranslationMatrix"],3011:["DS","InternalDetectorFrameTime"],3012:["DS","NumberOfFramesIntegrated"],3020:["SQ","DetectorTemperatureSequence"],3022:["DS","SensorName"],3024:["DS","HorizontalOffsetOfSensor"],3026:["DS","VerticalOffsetOfSensor"],3028:["DS","SensorTemperature"],3040:["SQ","DarkCurrentSequence"],3050:["OB","DarkCurrentCounts"],3060:["SQ","GainCorrectionReferenceSequence"],3070:["OB","AirCounts"],3071:["DS","KVUsedInGainCalibration"],3072:["DS","MAUsedInGainCalibration"],3073:["DS","NumberOfFramesUsedForIntegration"],3074:["LO","FilterMaterialUsedInGainCalibration"],3075:["DS","FilterThicknessUsedInGainCalibration"],3076:["DA","DateOfGainCalibration"],3077:["TM","TimeOfGainCalibration"],3080:["OB","BadPixelImage"],3099:["LT","CalibrationNotes"],4002:["SQ","PulserEquipmentSequence"],4004:["CS","PulserType"],4006:["LT","PulserNotes"],4008:["SQ","ReceiverEquipmentSequence"],"400A":["CS","AmplifierType"],"400C":["LT","ReceiverNotes"],"400E":["SQ","PreAmplifierEquipmentSequence"],"400F":["LT","PreAmplifierNotes"],4010:["SQ","TransmitTransducerSequence"],4011:["SQ","ReceiveTransducerSequence"],4012:["US","NumberOfElements"],4013:["CS","ElementShape"],4014:["DS","ElementDimensionA"],4015:["DS","ElementDimensionB"],4016:["DS","ElementPitch"],4017:["DS","MeasuredBeamDimensionA"],4018:["DS","MeasuredBeamDimensionB"],4019:["DS","LocationOfMeasuredBeamDiameter"],"401A":["DS","NominalFrequency"],"401B":["DS","MeasuredCenterFrequency"],"401C":["DS","MeasuredBandwidth"],4020:["SQ","PulserSettingsSequence"],4022:["DS","PulseWidth"],4024:["DS","ExcitationFrequency"],4026:["CS","ModulationType"],4028:["DS","Damping"],4030:["SQ","ReceiverSettingsSequence"],4031:["DS","AcquiredSoundpathLength"],4032:["CS","AcquisitionCompressionType"],4033:["IS","AcquisitionSampleSize"],4034:["DS","RectifierSmoothing"],4035:["SQ","DACSequence"],4036:["CS","DACType"],4038:["DS","DACGainPoints"],"403A":["DS","DACTimePoints"],"403C":["DS","DACAmplitude"],4040:["SQ","PreAmplifierSettingsSequence"],4050:["SQ","TransmitTransducerSettingsSequence"],4051:["SQ","ReceiveTransducerSettingsSequence"],4052:["DS","IncidentAngle"],4054:["ST","CouplingTechnique"],4056:["ST","CouplingMedium"],4057:["DS","CouplingVelocity"],4058:["DS","CrystalCenterLocationX"],4059:["DS","CrystalCenterLocationZ"],"405A":["DS","SoundPathLength"],"405C":["ST","DelayLawIdentifier"],4060:["SQ","GateSettingsSequence"],4062:["DS","GateThreshold"],4064:["DS","VelocityOfSound"],4070:["SQ","CalibrationSettingsSequence"],4072:["ST","CalibrationProcedure"],4074:["SH","ProcedureVersion"],4076:["DA","ProcedureCreationDate"],4078:["DA","ProcedureExpirationDate"],"407A":["DA","ProcedureLastModifiedDate"],"407C":["TM","CalibrationTime"],"407E":["DA","CalibrationDate"],5002:["IS","LINACEnergy"],5004:["IS","LINACOutput"]},"0018":{"0010":["LO","ContrastBolusAgent"],"0012":["SQ","ContrastBolusAgentSequence"],"0014":["SQ","ContrastBolusAdministrationRouteSequence"],"0015":["CS","BodyPartExamined"],"0020":["CS","ScanningSequence"],"0021":["CS","SequenceVariant"],"0022":["CS","ScanOptions"],"0023":["CS","MRAcquisitionType"],"0024":["SH","SequenceName"],"0025":["CS","AngioFlag"],"0026":["SQ","InterventionDrugInformationSequence"],"0027":["TM","InterventionDrugStopTime"],"0028":["DS","InterventionDrugDose"],"0029":["SQ","InterventionDrugCodeSequence"],"002A":["SQ","AdditionalDrugSequence"],"0030":["LO","Radionuclide"],"0031":["LO","Radiopharmaceutical"],"0032":["DS","EnergyWindowCenterline"],"0033":["DS","EnergyWindowTotalWidth"],"0034":["LO","InterventionDrugName"],"0035":["TM","InterventionDrugStartTime"],"0036":["SQ","InterventionSequence"],"0037":["CS","TherapyType"],"0038":["CS","InterventionStatus"],"0039":["CS","TherapyDescription"],"003A":["ST","InterventionDescription"],"0040":["IS","CineRate"],"0042":["CS","InitialCineRunState"],"0050":["DS","SliceThickness"],"0060":["DS","KVP"],"0070":["IS","CountsAccumulated"],"0071":["CS","AcquisitionTerminationCondition"],"0072":["DS","EffectiveDuration"],"0073":["CS","AcquisitionStartCondition"],"0074":["IS","AcquisitionStartConditionData"],"0075":["IS","AcquisitionTerminationConditionData"],"0080":["DS","RepetitionTime"],"0081":["DS","EchoTime"],"0082":["DS","InversionTime"],"0083":["DS","NumberOfAverages"],"0084":["DS","ImagingFrequency"],"0085":["SH","ImagedNucleus"],"0086":["IS","EchoNumbers"],"0087":["DS","MagneticFieldStrength"],"0088":["DS","SpacingBetweenSlices"],"0089":["IS","NumberOfPhaseEncodingSteps"],"0090":["DS","DataCollectionDiameter"],"0091":["IS","EchoTrainLength"],"0093":["DS","PercentSampling"],"0094":["DS","PercentPhaseFieldOfView"],"0095":["DS","PixelBandwidth"],1e3:["LO","DeviceSerialNumber"],1002:["UI","DeviceUID"],1003:["LO","DeviceID"],1004:["LO","PlateID"],1005:["LO","GeneratorID"],1006:["LO","GridID"],1007:["LO","CassetteID"],1008:["LO","GantryID"],1010:["LO","SecondaryCaptureDeviceID"],1011:["LO","HardcopyCreationDeviceID"],1012:["DA","DateOfSecondaryCapture"],1014:["TM","TimeOfSecondaryCapture"],1016:["LO","SecondaryCaptureDeviceManufacturer"],1017:["LO","HardcopyDeviceManufacturer"],1018:["LO","SecondaryCaptureDeviceManufacturerModelName"],1019:["LO","SecondaryCaptureDeviceSoftwareVersions"],"101A":["LO","HardcopyDeviceSoftwareVersion"],"101B":["LO","HardcopyDeviceManufacturerModelName"],1020:["LO","SoftwareVersions"],1022:["SH","VideoImageFormatAcquired"],1023:["LO","DigitalImageFormatAcquired"],1030:["LO","ProtocolName"],1040:["LO","ContrastBolusRoute"],1041:["DS","ContrastBolusVolume"],1042:["TM","ContrastBolusStartTime"],1043:["TM","ContrastBolusStopTime"],1044:["DS","ContrastBolusTotalDose"],1045:["IS","SyringeCounts"],1046:["DS","ContrastFlowRate"],1047:["DS","ContrastFlowDuration"],1048:["CS","ContrastBolusIngredient"],1049:["DS","ContrastBolusIngredientConcentration"],1050:["DS","SpatialResolution"],1060:["DS","TriggerTime"],1061:["LO","TriggerSourceOrType"],1062:["IS","NominalInterval"],1063:["DS","FrameTime"],1064:["LO","CardiacFramingType"],1065:["DS","FrameTimeVector"],1066:["DS","FrameDelay"],1067:["DS","ImageTriggerDelay"],1068:["DS","MultiplexGroupTimeOffset"],1069:["DS","TriggerTimeOffset"],"106A":["CS","SynchronizationTrigger"],"106C":["US","SynchronizationChannel"],"106E":["UL","TriggerSamplePosition"],1070:["LO","RadiopharmaceuticalRoute"],1071:["DS","RadiopharmaceuticalVolume"],1072:["TM","RadiopharmaceuticalStartTime"],1073:["TM","RadiopharmaceuticalStopTime"],1074:["DS","RadionuclideTotalDose"],1075:["DS","RadionuclideHalfLife"],1076:["DS","RadionuclidePositronFraction"],1077:["DS","RadiopharmaceuticalSpecificActivity"],1078:["DT","RadiopharmaceuticalStartDateTime"],1079:["DT","RadiopharmaceuticalStopDateTime"],1080:["CS","BeatRejectionFlag"],1081:["IS","LowRRValue"],1082:["IS","HighRRValue"],1083:["IS","IntervalsAcquired"],1084:["IS","IntervalsRejected"],1085:["LO","PVCRejection"],1086:["IS","SkipBeats"],1088:["IS","HeartRate"],1090:["IS","CardiacNumberOfImages"],1094:["IS","TriggerWindow"],1100:["DS","ReconstructionDiameter"],1110:["DS","DistanceSourceToDetector"],1111:["DS","DistanceSourceToPatient"],1114:["DS","EstimatedRadiographicMagnificationFactor"],1120:["DS","GantryDetectorTilt"],1121:["DS","GantryDetectorSlew"],1130:["DS","TableHeight"],1131:["DS","TableTraverse"],1134:["CS","TableMotion"],1135:["DS","TableVerticalIncrement"],1136:["DS","TableLateralIncrement"],1137:["DS","TableLongitudinalIncrement"],1138:["DS","TableAngle"],"113A":["CS","TableType"],1140:["CS","RotationDirection"],1141:["DS","AngularPosition"],1142:["DS","RadialPosition"],1143:["DS","ScanArc"],1144:["DS","AngularStep"],1145:["DS","CenterOfRotationOffset"],1146:["DS","RotationOffset"],1147:["CS","FieldOfViewShape"],1149:["IS","FieldOfViewDimensions"],1150:["IS","ExposureTime"],1151:["IS","XRayTubeCurrent"],1152:["IS","Exposure"],1153:["IS","ExposureInuAs"],1154:["DS","AveragePulseWidth"],1155:["CS","RadiationSetting"],1156:["CS","RectificationType"],"115A":["CS","RadiationMode"],"115E":["DS","ImageAndFluoroscopyAreaDoseProduct"],1160:["SH","FilterType"],1161:["LO","TypeOfFilters"],1162:["DS","IntensifierSize"],1164:["DS","ImagerPixelSpacing"],1166:["CS","Grid"],1170:["IS","GeneratorPower"],1180:["SH","CollimatorGridName"],1181:["CS","CollimatorType"],1182:["IS","FocalDistance"],1183:["DS","XFocusCenter"],1184:["DS","YFocusCenter"],1190:["DS","FocalSpots"],1191:["CS","AnodeTargetMaterial"],"11A0":["DS","BodyPartThickness"],"11A2":["DS","CompressionForce"],1200:["DA","DateOfLastCalibration"],1201:["TM","TimeOfLastCalibration"],1210:["SH","ConvolutionKernel"],1240:["IS","UpperLowerPixelValues"],1242:["IS","ActualFrameDuration"],1243:["IS","CountRate"],1244:["US","PreferredPlaybackSequencing"],1250:["SH","ReceiveCoilName"],1251:["SH","TransmitCoilName"],1260:["SH","PlateType"],1261:["LO","PhosphorType"],1300:["DS","ScanVelocity"],1301:["CS","WholeBodyTechnique"],1302:["IS","ScanLength"],1310:["US","AcquisitionMatrix"],1312:["CS","InPlanePhaseEncodingDirection"],1314:["DS","FlipAngle"],1315:["CS","VariableFlipAngleFlag"],1316:["DS","SAR"],1318:["DS","dBdt"],1400:["LO","AcquisitionDeviceProcessingDescription"],1401:["LO","AcquisitionDeviceProcessingCode"],1402:["CS","CassetteOrientation"],1403:["CS","CassetteSize"],1404:["US","ExposuresOnPlate"],1405:["IS","RelativeXRayExposure"],1411:["DS","ExposureIndex"],1412:["DS","TargetExposureIndex"],1413:["DS","DeviationIndex"],1450:["DS","ColumnAngulation"],1460:["DS","TomoLayerHeight"],1470:["DS","TomoAngle"],1480:["DS","TomoTime"],1490:["CS","TomoType"],1491:["CS","TomoClass"],1495:["IS","NumberOfTomosynthesisSourceImages"],1500:["CS","PositionerMotion"],1508:["CS","PositionerType"],1510:["DS","PositionerPrimaryAngle"],1511:["DS","PositionerSecondaryAngle"],1520:["DS","PositionerPrimaryAngleIncrement"],1521:["DS","PositionerSecondaryAngleIncrement"],1530:["DS","DetectorPrimaryAngle"],1531:["DS","DetectorSecondaryAngle"],1600:["CS","ShutterShape"],1602:["IS","ShutterLeftVerticalEdge"],1604:["IS","ShutterRightVerticalEdge"],1606:["IS","ShutterUpperHorizontalEdge"],1608:["IS","ShutterLowerHorizontalEdge"],1610:["IS","CenterOfCircularShutter"],1612:["IS","RadiusOfCircularShutter"],1620:["IS","VerticesOfThePolygonalShutter"],1622:["US","ShutterPresentationValue"],1623:["US","ShutterOverlayGroup"],1624:["US","ShutterPresentationColorCIELabValue"],1700:["CS","CollimatorShape"],1702:["IS","CollimatorLeftVerticalEdge"],1704:["IS","CollimatorRightVerticalEdge"],1706:["IS","CollimatorUpperHorizontalEdge"],1708:["IS","CollimatorLowerHorizontalEdge"],1710:["IS","CenterOfCircularCollimator"],1712:["IS","RadiusOfCircularCollimator"],1720:["IS","VerticesOfThePolygonalCollimator"],1800:["CS","AcquisitionTimeSynchronized"],1801:["SH","TimeSource"],1802:["CS","TimeDistributionProtocol"],1803:["LO","NTPSourceAddress"],2001:["IS","PageNumberVector"],2002:["SH","FrameLabelVector"],2003:["DS","FramePrimaryAngleVector"],2004:["DS","FrameSecondaryAngleVector"],2005:["DS","SliceLocationVector"],2006:["SH","DisplayWindowLabelVector"],2010:["DS","NominalScannedPixelSpacing"],2020:["CS","DigitizingDeviceTransportDirection"],2030:["DS","RotationOfScannedFilm"],3100:["CS","IVUSAcquisition"],3101:["DS","IVUSPullbackRate"],3102:["DS","IVUSGatedRate"],3103:["IS","IVUSPullbackStartFrameNumber"],3104:["IS","IVUSPullbackStopFrameNumber"],3105:["IS","LesionNumber"],4e3:["LT","AcquisitionComments"],5e3:["SH","OutputPower"],5010:["LO","TransducerData"],5012:["DS","FocusDepth"],5020:["LO","ProcessingFunction"],5021:["LO","PostprocessingFunction"],5022:["DS","MechanicalIndex"],5024:["DS","BoneThermalIndex"],5026:["DS","CranialThermalIndex"],5027:["DS","SoftTissueThermalIndex"],5028:["DS","SoftTissueFocusThermalIndex"],5029:["DS","SoftTissueSurfaceThermalIndex"],5030:["DS","DynamicRange"],5040:["DS","TotalGain"],5050:["IS","DepthOfScanField"],5100:["CS","PatientPosition"],5101:["CS","ViewPosition"],5104:["SQ","ProjectionEponymousNameCodeSequence"],5210:["DS","ImageTransformationMatrix"],5212:["DS","ImageTranslationVector"],6e3:["DS","Sensitivity"],6011:["SQ","SequenceOfUltrasoundRegions"],6012:["US","RegionSpatialFormat"],6014:["US","RegionDataType"],6016:["UL","RegionFlags"],6018:["UL","RegionLocationMinX0"],"601A":["UL","RegionLocationMinY0"],"601C":["UL","RegionLocationMaxX1"],"601E":["UL","RegionLocationMaxY1"],6020:["SL","ReferencePixelX0"],6022:["SL","ReferencePixelY0"],6024:["US","PhysicalUnitsXDirection"],6026:["US","PhysicalUnitsYDirection"],6028:["FD","ReferencePixelPhysicalValueX"],"602A":["FD","ReferencePixelPhysicalValueY"],"602C":["FD","PhysicalDeltaX"],"602E":["FD","PhysicalDeltaY"],6030:["UL","TransducerFrequency"],6031:["CS","TransducerType"],6032:["UL","PulseRepetitionFrequency"],6034:["FD","DopplerCorrectionAngle"],6036:["FD","SteeringAngle"],6038:["UL","DopplerSampleVolumeXPositionRetired"],6039:["SL","DopplerSampleVolumeXPosition"],"603A":["UL","DopplerSampleVolumeYPositionRetired"],"603B":["SL","DopplerSampleVolumeYPosition"],"603C":["UL","TMLinePositionX0Retired"],"603D":["SL","TMLinePositionX0"],"603E":["UL","TMLinePositionY0Retired"],"603F":["SL","TMLinePositionY0"],6040:["UL","TMLinePositionX1Retired"],6041:["SL","TMLinePositionX1"],6042:["UL","TMLinePositionY1Retired"],6043:["SL","TMLinePositionY1"],6044:["US","PixelComponentOrganization"],6046:["UL","PixelComponentMask"],6048:["UL","PixelComponentRangeStart"],"604A":["UL","PixelComponentRangeStop"],"604C":["US","PixelComponentPhysicalUnits"],"604E":["US","PixelComponentDataType"],6050:["UL","NumberOfTableBreakPoints"],6052:["UL","TableOfXBreakPoints"],6054:["FD","TableOfYBreakPoints"],6056:["UL","NumberOfTableEntries"],6058:["UL","TableOfPixelValues"],"605A":["FL","TableOfParameterValues"],6060:["FL","RWaveTimeVector"],7e3:["CS","DetectorConditionsNominalFlag"],7001:["DS","DetectorTemperature"],7004:["CS","DetectorType"],7005:["CS","DetectorConfiguration"],7006:["LT","DetectorDescription"],7008:["LT","DetectorMode"],"700A":["SH","DetectorID"],"700C":["DA","DateOfLastDetectorCalibration"],"700E":["TM","TimeOfLastDetectorCalibration"],7010:["IS","ExposuresOnDetectorSinceLastCalibration"],7011:["IS","ExposuresOnDetectorSinceManufactured"],7012:["DS","DetectorTimeSinceLastExposure"],7014:["DS","DetectorActiveTime"],7016:["DS","DetectorActivationOffsetFromExposure"],"701A":["DS","DetectorBinning"],7020:["DS","DetectorElementPhysicalSize"],7022:["DS","DetectorElementSpacing"],7024:["CS","DetectorActiveShape"],7026:["DS","DetectorActiveDimensions"],7028:["DS","DetectorActiveOrigin"],"702A":["LO","DetectorManufacturerName"],"702B":["LO","DetectorManufacturerModelName"],7030:["DS","FieldOfViewOrigin"],7032:["DS","FieldOfViewRotation"],7034:["CS","FieldOfViewHorizontalFlip"],7036:["FL","PixelDataAreaOriginRelativeToFOV"],7038:["FL","PixelDataAreaRotationAngleRelativeToFOV"],7040:["LT","GridAbsorbingMaterial"],7041:["LT","GridSpacingMaterial"],7042:["DS","GridThickness"],7044:["DS","GridPitch"],7046:["IS","GridAspectRatio"],7048:["DS","GridPeriod"],"704C":["DS","GridFocalDistance"],7050:["CS","FilterMaterial"],7052:["DS","FilterThicknessMinimum"],7054:["DS","FilterThicknessMaximum"],7056:["FL","FilterBeamPathLengthMinimum"],7058:["FL","FilterBeamPathLengthMaximum"],7060:["CS","ExposureControlMode"],7062:["LT","ExposureControlModeDescription"],7064:["CS","ExposureStatus"],7065:["DS","PhototimerSetting"],8150:["DS","ExposureTimeInuS"],8151:["DS","XRayTubeCurrentInuA"],9004:["CS","ContentQualification"],9005:["SH","PulseSequenceName"],9006:["SQ","MRImagingModifierSequence"],9008:["CS","EchoPulseSequence"],9009:["CS","InversionRecovery"],9010:["CS","FlowCompensation"],9011:["CS","MultipleSpinEcho"],9012:["CS","MultiPlanarExcitation"],9014:["CS","PhaseContrast"],9015:["CS","TimeOfFlightContrast"],9016:["CS","Spoiling"],9017:["CS","SteadyStatePulseSequence"],9018:["CS","EchoPlanarPulseSequence"],9019:["FD","TagAngleFirstAxis"],9020:["CS","MagnetizationTransfer"],9021:["CS","T2Preparation"],9022:["CS","BloodSignalNulling"],9024:["CS","SaturationRecovery"],9025:["CS","SpectrallySelectedSuppression"],9026:["CS","SpectrallySelectedExcitation"],9027:["CS","SpatialPresaturation"],9028:["CS","Tagging"],9029:["CS","OversamplingPhase"],9030:["FD","TagSpacingFirstDimension"],9032:["CS","GeometryOfKSpaceTraversal"],9033:["CS","SegmentedKSpaceTraversal"],9034:["CS","RectilinearPhaseEncodeReordering"],9035:["FD","TagThickness"],9036:["CS","PartialFourierDirection"],9037:["CS","CardiacSynchronizationTechnique"],9041:["LO","ReceiveCoilManufacturerName"],9042:["SQ","MRReceiveCoilSequence"],9043:["CS","ReceiveCoilType"],9044:["CS","QuadratureReceiveCoil"],9045:["SQ","MultiCoilDefinitionSequence"],9046:["LO","MultiCoilConfiguration"],9047:["SH","MultiCoilElementName"],9048:["CS","MultiCoilElementUsed"],9049:["SQ","MRTransmitCoilSequence"],9050:["LO","TransmitCoilManufacturerName"],9051:["CS","TransmitCoilType"],9052:["FD","SpectralWidth"],9053:["FD","ChemicalShiftReference"],9054:["CS","VolumeLocalizationTechnique"],9058:["US","MRAcquisitionFrequencyEncodingSteps"],9059:["CS","Decoupling"],9060:["CS","DecoupledNucleus"],9061:["FD","DecouplingFrequency"],9062:["CS","DecouplingMethod"],9063:["FD","DecouplingChemicalShiftReference"],9064:["CS","KSpaceFiltering"],9065:["CS","TimeDomainFiltering"],9066:["US","NumberOfZeroFills"],9067:["CS","BaselineCorrection"],9069:["FD","ParallelReductionFactorInPlane"],9070:["FD","CardiacRRIntervalSpecified"],9073:["FD","AcquisitionDuration"],9074:["DT","FrameAcquisitionDateTime"],9075:["CS","DiffusionDirectionality"],9076:["SQ","DiffusionGradientDirectionSequence"],9077:["CS","ParallelAcquisition"],9078:["CS","ParallelAcquisitionTechnique"],9079:["FD","InversionTimes"],9080:["ST","MetaboliteMapDescription"],9081:["CS","PartialFourier"],9082:["FD","EffectiveEchoTime"],9083:["SQ","MetaboliteMapCodeSequence"],9084:["SQ","ChemicalShiftSequence"],9085:["CS","CardiacSignalSource"],9087:["FD","DiffusionBValue"],9089:["FD","DiffusionGradientOrientation"],9090:["FD","VelocityEncodingDirection"],9091:["FD","VelocityEncodingMinimumValue"],9092:["SQ","VelocityEncodingAcquisitionSequence"],9093:["US","NumberOfKSpaceTrajectories"],9094:["CS","CoverageOfKSpace"],9095:["UL","SpectroscopyAcquisitionPhaseRows"],9096:["FD","ParallelReductionFactorInPlaneRetired"],9098:["FD","TransmitterFrequency"],9100:["CS","ResonantNucleus"],9101:["CS","FrequencyCorrection"],9103:["SQ","MRSpectroscopyFOVGeometrySequence"],9104:["FD","SlabThickness"],9105:["FD","SlabOrientation"],9106:["FD","MidSlabPosition"],9107:["SQ","MRSpatialSaturationSequence"],9112:["SQ","MRTimingAndRelatedParametersSequence"],9114:["SQ","MREchoSequence"],9115:["SQ","MRModifierSequence"],9117:["SQ","MRDiffusionSequence"],9118:["SQ","CardiacSynchronizationSequence"],9119:["SQ","MRAveragesSequence"],9125:["SQ","MRFOVGeometrySequence"],9126:["SQ","VolumeLocalizationSequence"],9127:["UL","SpectroscopyAcquisitionDataColumns"],9147:["CS","DiffusionAnisotropyType"],9151:["DT","FrameReferenceDateTime"],9152:["SQ","MRMetaboliteMapSequence"],9155:["FD","ParallelReductionFactorOutOfPlane"],9159:["UL","SpectroscopyAcquisitionOutOfPlanePhaseSteps"],9166:["CS","BulkMotionStatus"],9168:["FD","ParallelReductionFactorSecondInPlane"],9169:["CS","CardiacBeatRejectionTechnique"],9170:["CS","RespiratoryMotionCompensationTechnique"],9171:["CS","RespiratorySignalSource"],9172:["CS","BulkMotionCompensationTechnique"],9173:["CS","BulkMotionSignalSource"],9174:["CS","ApplicableSafetyStandardAgency"],9175:["LO","ApplicableSafetyStandardDescription"],9176:["SQ","OperatingModeSequence"],9177:["CS","OperatingModeType"],9178:["CS","OperatingMode"],9179:["CS","SpecificAbsorptionRateDefinition"],9180:["CS","GradientOutputType"],9181:["FD","SpecificAbsorptionRateValue"],9182:["FD","GradientOutput"],9183:["CS","FlowCompensationDirection"],9184:["FD","TaggingDelay"],9185:["ST","RespiratoryMotionCompensationTechniqueDescription"],9186:["SH","RespiratorySignalSourceID"],9195:["FD","ChemicalShiftMinimumIntegrationLimitInHz"],9196:["FD","ChemicalShiftMaximumIntegrationLimitInHz"],9197:["SQ","MRVelocityEncodingSequence"],9198:["CS","FirstOrderPhaseCorrection"],9199:["CS","WaterReferencedPhaseCorrection"],9200:["CS","MRSpectroscopyAcquisitionType"],9214:["CS","RespiratoryCyclePosition"],9217:["FD","VelocityEncodingMaximumValue"],9218:["FD","TagSpacingSecondDimension"],9219:["SS","TagAngleSecondAxis"],9220:["FD","FrameAcquisitionDuration"],9226:["SQ","MRImageFrameTypeSequence"],9227:["SQ","MRSpectroscopyFrameTypeSequence"],9231:["US","MRAcquisitionPhaseEncodingStepsInPlane"],9232:["US","MRAcquisitionPhaseEncodingStepsOutOfPlane"],9234:["UL","SpectroscopyAcquisitionPhaseColumns"],9236:["CS","CardiacCyclePosition"],9239:["SQ","SpecificAbsorptionRateSequence"],9240:["US","RFEchoTrainLength"],9241:["US","GradientEchoTrainLength"],9250:["CS","ArterialSpinLabelingContrast"],9251:["SQ","MRArterialSpinLabelingSequence"],9252:["LO","ASLTechniqueDescription"],9253:["US","ASLSlabNumber"],9254:["FD ","ASLSlabThickness"],9255:["FD ","ASLSlabOrientation"],9256:["FD ","ASLMidSlabPosition"],9257:["CS","ASLContext"],9258:["UL","ASLPulseTrainDuration"],9259:["CS","ASLCrusherFlag"],"925A":["FD","ASLCrusherFlow"],"925B":["LO","ASLCrusherDescription"],"925C":["CS","ASLBolusCutoffFlag"],"925D":["SQ","ASLBolusCutoffTimingSequence"],"925E":["LO","ASLBolusCutoffTechnique"],"925F":["UL","ASLBolusCutoffDelayTime"],9260:["SQ","ASLSlabSequence"],9295:["FD","ChemicalShiftMinimumIntegrationLimitInppm"],9296:["FD","ChemicalShiftMaximumIntegrationLimitInppm"],9301:["SQ","CTAcquisitionTypeSequence"],9302:["CS","AcquisitionType"],9303:["FD","TubeAngle"],9304:["SQ","CTAcquisitionDetailsSequence"],9305:["FD","RevolutionTime"],9306:["FD","SingleCollimationWidth"],9307:["FD","TotalCollimationWidth"],9308:["SQ","CTTableDynamicsSequence"],9309:["FD","TableSpeed"],9310:["FD","TableFeedPerRotation"],9311:["FD","SpiralPitchFactor"],9312:["SQ","CTGeometrySequence"],9313:["FD","DataCollectionCenterPatient"],9314:["SQ","CTReconstructionSequence"],9315:["CS","ReconstructionAlgorithm"],9316:["CS","ConvolutionKernelGroup"],9317:["FD","ReconstructionFieldOfView"],9318:["FD","ReconstructionTargetCenterPatient"],9319:["FD","ReconstructionAngle"],9320:["SH","ImageFilter"],9321:["SQ","CTExposureSequence"],9322:["FD","ReconstructionPixelSpacing"],9323:["CS","ExposureModulationType"],9324:["FD","EstimatedDoseSaving"],9325:["SQ","CTXRayDetailsSequence"],9326:["SQ","CTPositionSequence"],9327:["FD","TablePosition"],9328:["FD","ExposureTimeInms"],9329:["SQ","CTImageFrameTypeSequence"],9330:["FD","XRayTubeCurrentInmA"],9332:["FD","ExposureInmAs"],9333:["CS","ConstantVolumeFlag"],9334:["CS","FluoroscopyFlag"],9335:["FD","DistanceSourceToDataCollectionCenter"],9337:["US","ContrastBolusAgentNumber"],9338:["SQ","ContrastBolusIngredientCodeSequence"],9340:["SQ","ContrastAdministrationProfileSequence"],9341:["SQ","ContrastBolusUsageSequence"],9342:["CS","ContrastBolusAgentAdministered"],9343:["CS","ContrastBolusAgentDetected"],9344:["CS","ContrastBolusAgentPhase"],9345:["FD","CTDIvol"],9346:["SQ","CTDIPhantomTypeCodeSequence"],9351:["FL","CalciumScoringMassFactorPatient"],9352:["FL","CalciumScoringMassFactorDevice"],9353:["FL","EnergyWeightingFactor"],9360:["SQ","CTAdditionalXRaySourceSequence"],9401:["SQ","ProjectionPixelCalibrationSequence"],9402:["FL","DistanceSourceToIsocenter"],9403:["FL","DistanceObjectToTableTop"],9404:["FL","ObjectPixelSpacingInCenterOfBeam"],9405:["SQ","PositionerPositionSequence"],9406:["SQ","TablePositionSequence"],9407:["SQ","CollimatorShapeSequence"],9410:["CS","PlanesInAcquisition"],9412:["SQ","XAXRFFrameCharacteristicsSequence"],9417:["SQ","FrameAcquisitionSequence"],9420:["CS","XRayReceptorType"],9423:["LO","AcquisitionProtocolName"],9424:["LT","AcquisitionProtocolDescription"],9425:["CS","ContrastBolusIngredientOpaque"],9426:["FL","DistanceReceptorPlaneToDetectorHousing"],9427:["CS","IntensifierActiveShape"],9428:["FL","IntensifierActiveDimensions"],9429:["FL","PhysicalDetectorSize"],9430:["FL","PositionOfIsocenterProjection"],9432:["SQ","FieldOfViewSequence"],9433:["LO","FieldOfViewDescription"],9434:["SQ","ExposureControlSensingRegionsSequence"],9435:["CS","ExposureControlSensingRegionShape"],9436:["SS","ExposureControlSensingRegionLeftVerticalEdge"],9437:["SS","ExposureControlSensingRegionRightVerticalEdge"],9438:["SS","ExposureControlSensingRegionUpperHorizontalEdge"],9439:["SS","ExposureControlSensingRegionLowerHorizontalEdge"],9440:["SS","CenterOfCircularExposureControlSensingRegion"],9441:["US","RadiusOfCircularExposureControlSensingRegion"],9442:["SS","VerticesOfThePolygonalExposureControlSensingRegion"],9447:["FL","ColumnAngulationPatient"],9449:["FL","BeamAngle"],9451:["SQ","FrameDetectorParametersSequence"],9452:["FL","CalculatedAnatomyThickness"],9455:["SQ","CalibrationSequence"],9456:["SQ","ObjectThicknessSequence"],9457:["CS","PlaneIdentification"],9461:["FL","FieldOfViewDimensionsInFloat"],9462:["SQ","IsocenterReferenceSystemSequence"],9463:["FL","PositionerIsocenterPrimaryAngle"],9464:["FL","PositionerIsocenterSecondaryAngle"],9465:["FL","PositionerIsocenterDetectorRotationAngle"],9466:["FL","TableXPositionToIsocenter"],9467:["FL","TableYPositionToIsocenter"],9468:["FL","TableZPositionToIsocenter"],9469:["FL","TableHorizontalRotationAngle"],9470:["FL","TableHeadTiltAngle"],9471:["FL","TableCradleTiltAngle"],9472:["SQ","FrameDisplayShutterSequence"],9473:["FL","AcquiredImageAreaDoseProduct"],9474:["CS","CArmPositionerTabletopRelationship"],9476:["SQ","XRayGeometrySequence"],9477:["SQ","IrradiationEventIdentificationSequence"],9504:["SQ","XRay3DFrameTypeSequence"],9506:["SQ","ContributingSourcesSequence"],9507:["SQ","XRay3DAcquisitionSequence"],9508:["FL","PrimaryPositionerScanArc"],9509:["FL","SecondaryPositionerScanArc"],9510:["FL ","PrimaryPositionerScanStartAngle"],9511:["FL","SecondaryPositionerScanStartAngle"],9514:["FL","PrimaryPositionerIncrement"],9515:["FL","SecondaryPositionerIncrement"],9516:["DT","StartAcquisitionDateTime"],9517:["DT","EndAcquisitionDateTime"],9524:["LO","ApplicationName"],9525:["LO","ApplicationVersion"],9526:["LO","ApplicationManufacturer"],9527:["CS","AlgorithmType"],9528:["LO","AlgorithmDescription"],9530:["SQ","XRay3DReconstructionSequence"],9531:["LO","ReconstructionDescription"],9538:["SQ","PerProjectionAcquisitionSequence"],9601:["SQ","DiffusionBMatrixSequence"],9602:["FD","DiffusionBValueXX"],9603:["FD","DiffusionBValueXY"],9604:["FD","DiffusionBValueXZ"],9605:["FD","DiffusionBValueYY"],9606:["FD","DiffusionBValueYZ"],9607:["FD","DiffusionBValueZZ"],9701:["DT","DecayCorrectionDateTime"],9715:["FD","StartDensityThreshold"],9716:["FD","StartRelativeDensityDifferenceThreshold"],9717:["FD","StartCardiacTriggerCountThreshold"],9718:["FD","StartRespiratoryTriggerCountThreshold"],9719:["FD","TerminationCountsThreshold"],9720:["FD","TerminationDensityThreshold"],9721:["FD","TerminationRelativeDensityThreshold"],9722:["FD","TerminationTimeThreshold"],9723:["FD","TerminationCardiacTriggerCountThreshold"],9724:["FD","TerminationRespiratoryTriggerCountThreshold"],9725:["CS","DetectorGeometry"],9726:["FD","TransverseDetectorSeparation"],9727:["FD","AxialDetectorDimension"],9729:["US","RadiopharmaceuticalAgentNumber"],9732:["SQ","PETFrameAcquisitionSequence"],9733:["SQ","PETDetectorMotionDetailsSequence"],9734:["SQ","PETTableDynamicsSequence"],9735:["SQ","PETPositionSequence"],9736:["SQ","PETFrameCorrectionFactorsSequence"],9737:["SQ","RadiopharmaceuticalUsageSequence"],9738:["CS","AttenuationCorrectionSource"],9739:["US","NumberOfIterations"],9740:["US","NumberOfSubsets"],9749:["SQ","PETReconstructionSequence"],9751:["SQ","PETFrameTypeSequence"],9755:["CS","TimeOfFlightInformationUsed"],9756:["CS","ReconstructionType"],9758:["CS","DecayCorrected"],9759:["CS","AttenuationCorrected"],9760:["CS","ScatterCorrected"],9761:["CS","DeadTimeCorrected"],9762:["CS","GantryMotionCorrected"],9763:["CS","PatientMotionCorrected"],9764:["CS","CountLossNormalizationCorrected"],9765:["CS","RandomsCorrected"],9766:["CS","NonUniformRadialSamplingCorrected"],9767:["CS","SensitivityCalibrated"],9768:["CS","DetectorNormalizationCorrection"],9769:["CS","IterativeReconstructionMethod"],9770:["CS","AttenuationCorrectionTemporalRelationship"],9771:["SQ","PatientPhysiologicalStateSequence"],9772:["SQ","PatientPhysiologicalStateCodeSequence"],9801:["FD","DepthsOfFocus"],9803:["SQ","ExcludedIntervalsSequence"],9804:["DT","ExclusionStartDatetime"],9805:["FD","ExclusionDuration"],9806:["SQ","USImageDescriptionSequence"],9807:["SQ","ImageDataTypeSequence"],9808:["CS","DataType"],9809:["SQ","TransducerScanPatternCodeSequence"],"980B":["CS","AliasedDataType"],"980C":["CS","PositionMeasuringDeviceUsed"],"980D":["SQ","TransducerGeometryCodeSequence"],"980E":["SQ","TransducerBeamSteeringCodeSequence"],"980F":["SQ","TransducerApplicationCodeSequence"],A001:["SQ","ContributingEquipmentSequence"],A002:["DT","ContributionDateTime"],A003:["ST","ContributionDescription"]},"0020":{"000D":["UI","StudyInstanceUID"],"000E":["UI","SeriesInstanceUID"],"0010":["SH","StudyID"],"0011":["IS","SeriesNumber"],"0012":["IS","AcquisitionNumber"],"0013":["IS","InstanceNumber"],"0014":["IS","IsotopeNumber"],"0015":["IS","PhaseNumber"],"0016":["IS","IntervalNumber"],"0017":["IS","TimeSlotNumber"],"0018":["IS","AngleNumber"],"0019":["IS","ItemNumber"],"0020":["CS","PatientOrientation"],"0022":["IS","OverlayNumber"],"0024":["IS","CurveNumber"],"0026":["IS","LUTNumber"],"0030":["DS","ImagePosition"],"0032":["DS","ImagePositionPatient"],"0035":["DS","ImageOrientation"],"0037":["DS","ImageOrientationPatient"],"0050":["DS","Location"],"0052":["UI","FrameOfReferenceUID"],"0060":["CS","Laterality"],"0062":["CS","ImageLaterality"],"0070":["LO","ImageGeometryType"],"0080":["CS","MaskingImage"],"00AA":["IS","ReportNumber"],"0100":["IS","TemporalPositionIdentifier"],"0105":["IS","NumberOfTemporalPositions"],"0110":["DS","TemporalResolution"],"0200":["UI","SynchronizationFrameOfReferenceUID"],"0242":["UI","SOPInstanceUIDOfConcatenationSource"],1e3:["IS","SeriesInStudy"],1001:["IS","AcquisitionsInSeries"],1002:["IS","ImagesInAcquisition"],1003:["IS","ImagesInSeries"],1004:["IS","AcquisitionsInStudy"],1005:["IS","ImagesInStudy"],1020:["LO","Reference"],1040:["LO","PositionReferenceIndicator"],1041:["DS","SliceLocation"],1070:["IS","OtherStudyNumbers"],1200:["IS","NumberOfPatientRelatedStudies"],1202:["IS","NumberOfPatientRelatedSeries"],1204:["IS","NumberOfPatientRelatedInstances"],1206:["IS","NumberOfStudyRelatedSeries"],1208:["IS","NumberOfStudyRelatedInstances"],1209:["IS","NumberOfSeriesRelatedInstances"],3401:["CS","ModifyingDeviceID"],3402:["CS","ModifiedImageID"],3403:["DA","ModifiedImageDate"],3404:["LO","ModifyingDeviceManufacturer"],3405:["TM","ModifiedImageTime"],3406:["LO","ModifiedImageDescription"],4e3:["LT","ImageComments"],5e3:["AT","OriginalImageIdentification"],5002:["LO","OriginalImageIdentificationNomenclature"],9056:["SH","StackID"],9057:["UL","InStackPositionNumber"],9071:["SQ","FrameAnatomySequence"],9072:["CS","FrameLaterality"],9111:["SQ","FrameContentSequence"],9113:["SQ","PlanePositionSequence"],9116:["SQ","PlaneOrientationSequence"],9128:["UL","TemporalPositionIndex"],9153:["FD","NominalCardiacTriggerDelayTime"],9154:["FL","NominalCardiacTriggerTimePriorToRPeak"],9155:["FL","ActualCardiacTriggerTimePriorToRPeak"],9156:["US","FrameAcquisitionNumber"],9157:["UL","DimensionIndexValues"],9158:["LT","FrameComments"],9161:["UI","ConcatenationUID"],9162:["US","InConcatenationNumber"],9163:["US","InConcatenationTotalNumber"],9164:["UI","DimensionOrganizationUID"],9165:["AT","DimensionIndexPointer"],9167:["AT","FunctionalGroupPointer"],9213:["LO","DimensionIndexPrivateCreator"],9221:["SQ","DimensionOrganizationSequence"],9222:["SQ","DimensionIndexSequence"],9228:["UL","ConcatenationFrameOffsetNumber"],9238:["LO","FunctionalGroupPrivateCreator"],9241:["FL","NominalPercentageOfCardiacPhase"],9245:["FL","NominalPercentageOfRespiratoryPhase"],9246:["FL","StartingRespiratoryAmplitude"],9247:["CS","StartingRespiratoryPhase"],9248:["FL","EndingRespiratoryAmplitude"],9249:["CS","EndingRespiratoryPhase"],9250:["CS","RespiratoryTriggerType"],9251:["FD","RRIntervalTimeNominal"],9252:["FD","ActualCardiacTriggerDelayTime"],9253:["SQ","RespiratorySynchronizationSequence"],9254:["FD","RespiratoryIntervalTime"],9255:["FD","NominalRespiratoryTriggerDelayTime"],9256:["FD","RespiratoryTriggerDelayThreshold"],9257:["FD","ActualRespiratoryTriggerDelayTime"],9301:["FD","ImagePositionVolume"],9302:["FD","ImageOrientationVolume"],9307:["CS","UltrasoundAcquisitionGeometry"],9308:["FD","ApexPosition"],9309:["FD","VolumeToTransducerMappingMatrix"],"930A":["FD","VolumeToTableMappingMatrix"],"930C":["CS","PatientFrameOfReferenceSource"],"930D":["FD","TemporalPositionTimeOffset"],"930E":["SQ","PlanePositionVolumeSequence"],"930F":["SQ","PlaneOrientationVolumeSequence"],9310:["SQ","TemporalPositionSequence"],9311:["CS","DimensionOrganizationType"],9312:["UI","VolumeFrameOfReferenceUID"],9313:["UI","TableFrameOfReferenceUID"],9421:["LO","DimensionDescriptionLabel"],9450:["SQ","PatientOrientationInFrameSequence"],9453:["LO","FrameLabel"],9518:["US","AcquisitionIndex"],9529:["SQ","ContributingSOPInstancesReferenceSequence"],9536:["US","ReconstructionIndex"]},"0022":{"0001":["US","LightPathFilterPassThroughWavelength"],"0002":["US","LightPathFilterPassBand"],"0003":["US","ImagePathFilterPassThroughWavelength"],"0004":["US","ImagePathFilterPassBand"],"0005":["CS","PatientEyeMovementCommanded"],"0006":["SQ","PatientEyeMovementCommandCodeSequence"],"0007":["FL","SphericalLensPower"],"0008":["FL","CylinderLensPower"],"0009":["FL","CylinderAxis"],"000A":["FL","EmmetropicMagnification"],"000B":["FL","IntraOcularPressure"],"000C":["FL","HorizontalFieldOfView"],"000D":["CS","PupilDilated"],"000E":["FL","DegreeOfDilation"],"0010":["FL","StereoBaselineAngle"],"0011":["FL","StereoBaselineDisplacement"],"0012":["FL","StereoHorizontalPixelOffset"],"0013":["FL","StereoVerticalPixelOffset"],"0014":["FL","StereoRotation"],"0015":["SQ","AcquisitionDeviceTypeCodeSequence"],"0016":["SQ","IlluminationTypeCodeSequence"],"0017":["SQ","LightPathFilterTypeStackCodeSequence"],"0018":["SQ","ImagePathFilterTypeStackCodeSequence"],"0019":["SQ","LensesCodeSequence"],"001A":["SQ","ChannelDescriptionCodeSequence"],"001B":["SQ","RefractiveStateSequence"],"001C":["SQ","MydriaticAgentCodeSequence"],"001D":["SQ","RelativeImagePositionCodeSequence"],"001E":["FL","CameraAngleOfView"],"0020":["SQ","StereoPairsSequence"],"0021":["SQ","LeftImageSequence"],"0022":["SQ","RightImageSequence"],"0030":["FL","AxialLengthOfTheEye"],"0031":["SQ","OphthalmicFrameLocationSequence"],"0032":["FL","ReferenceCoordinates"],"0035":["FL","DepthSpatialResolution"],"0036":["FL","MaximumDepthDistortion"],"0037":["FL","AlongScanSpatialResolution"],"0038":["FL","MaximumAlongScanDistortion"],"0039":["CS","OphthalmicImageOrientation"],"0041":["FL","DepthOfTransverseImage"],"0042":["SQ","MydriaticAgentConcentrationUnitsSequence"],"0048":["FL","AcrossScanSpatialResolution"],"0049":["FL","MaximumAcrossScanDistortion"],"004E":["DS","MydriaticAgentConcentration"],"0055":["FL","IlluminationWaveLength"],"0056":["FL","IlluminationPower"],"0057":["FL","IlluminationBandwidth"],"0058":["SQ","MydriaticAgentSequence"],1007:["SQ","OphthalmicAxialMeasurementsRightEyeSequence"],1008:["SQ","OphthalmicAxialMeasurementsLeftEyeSequence"],1010:["CS","OphthalmicAxialLengthMeasurementsType"],1019:["FL","OphthalmicAxialLength"],1024:["SQ","LensStatusCodeSequence"],1025:["SQ","VitreousStatusCodeSequence"],1028:["SQ","IOLFormulaCodeSequence"],1029:["LO","IOLFormulaDetail"],1033:["FL","KeratometerIndex"],1035:["SQ","SourceOfOphthalmicAxialLengthCodeSequence"],1037:["FL","TargetRefraction"],1039:["CS","RefractiveProcedureOccurred"],1040:["SQ","RefractiveSurgeryTypeCodeSequence"],1044:["SQ","OphthalmicUltrasoundAxialMeasurementsTypeCodeSequence"],1050:["SQ","OphthalmicAxialLengthMeasurementsSequence"],1053:["FL","IOLPower"],1054:["FL","PredictedRefractiveError"],1059:["FL","OphthalmicAxialLengthVelocity"],1065:["LO","LensStatusDescription"],1066:["LO","VitreousStatusDescription"],1090:["SQ","IOLPowerSequence"],1092:["SQ","LensConstantSequence"],1093:["LO","IOLManufacturer"],1094:["LO","LensConstantDescription"],1096:["SQ","KeratometryMeasurementTypeCodeSequence"],1100:["SQ","ReferencedOphthalmicAxialMeasurementsSequence"],1101:["SQ","OphthalmicAxialLengthMeasurementsSegmentNameCodeSequence"],1103:["SQ","RefractiveErrorBeforeRefractiveSurgeryCodeSequence"],1121:["FL","IOLPowerForExactEmmetropia"],1122:["FL","IOLPowerForExactTargetRefraction"],1125:["SQ","AnteriorChamberDepthDefinitionCodeSequence"],1130:["FL","LensThickness"],1131:["FL","AnteriorChamberDepth"],1132:["SQ","SourceOfLensThicknessDataCodeSequence"],1133:["SQ","SourceOfAnteriorChamberDepthDataCodeSequence"],1135:["SQ","SourceOfRefractiveErrorDataCodeSequence"],1140:["CS","OphthalmicAxialLengthMeasurementModified"],1150:["SQ","OphthalmicAxialLengthDataSourceCodeSequence"],1153:["SQ","OphthalmicAxialLengthAcquisitionMethodCodeSequence"],1155:["FL","SignalToNoiseRatio"],1159:["LO","OphthalmicAxialLengthDataSourceDescription"],1210:["SQ","OphthalmicAxialLengthMeasurementsTotalLengthSequence"],1211:["SQ","OphthalmicAxialLengthMeasurementsSegmentalLengthSequence"],1212:["SQ","OphthalmicAxialLengthMeasurementsLengthSummationSequence"],1220:["SQ","UltrasoundOphthalmicAxialLengthMeasurementsSequence"],1225:["SQ","OpticalOphthalmicAxialLengthMeasurementsSequence"],1230:["SQ","UltrasoundSelectedOphthalmicAxialLengthSequence"],1250:["SQ","OphthalmicAxialLengthSelectionMethodCodeSequence"],1255:["SQ","OpticalSelectedOphthalmicAxialLengthSequence"],1257:["SQ","SelectedSegmentalOphthalmicAxialLengthSequence"],1260:["SQ","SelectedTotalOphthalmicAxialLengthSequence"],1262:["SQ","OphthalmicAxialLengthQualityMetricSequence"],1273:["LO","OphthalmicAxialLengthQualityMetricTypeDescription"],1300:["SQ","IntraocularLensCalculationsRightEyeSequence"],1310:["SQ","IntraocularLensCalculationsLeftEyeSequence"],1330:["SQ","ReferencedOphthalmicAxialLengthMeasurementQCImageSequence"]},"0024":{"0010":["FL","VisualFieldHorizontalExtent"],"0011":["FL","VisualFieldVerticalExtent"],"0012":["CS","VisualFieldShape"],"0016":["SQ","ScreeningTestModeCodeSequence"],"0018":["FL","MaximumStimulusLuminance"],"0020":["FL","BackgroundLuminance"],"0021":["SQ","StimulusColorCodeSequence"],"0024":["SQ","BackgroundIlluminationColorCodeSequence"],"0025":["FL","StimulusArea"],"0028":["FL","StimulusPresentationTime"],"0032":["SQ","FixationSequence"],"0033":["SQ","FixationMonitoringCodeSequence"],"0034":["SQ","VisualFieldCatchTrialSequence"],"0035":["US","FixationCheckedQuantity"],"0036":["US","PatientNotProperlyFixatedQuantity"],"0037":["CS","PresentedVisualStimuliDataFlag"],"0038":["US","NumberOfVisualStimuli"],"0039":["CS","ExcessiveFixationLossesDataFlag"],"0040":["CS","ExcessiveFixationLosses"],"0042":["US","StimuliRetestingQuantity"],"0044":["LT","CommentsOnPatientPerformanceOfVisualField"],"0045":["CS","FalseNegativesEstimateFlag"],"0046":["FL","FalseNegativesEstimate"],"0048":["US","NegativeCatchTrialsQuantity"],"0050":["US","FalseNegativesQuantity"],"0051":["CS","ExcessiveFalseNegativesDataFlag"],"0052":["CS","ExcessiveFalseNegatives"],"0053":["CS","FalsePositivesEstimateFlag"],"0054":["FL","FalsePositivesEstimate"],"0055":["CS","CatchTrialsDataFlag"],"0056":["US","PositiveCatchTrialsQuantity"],"0057":["CS","TestPointNormalsDataFlag"],"0058":["SQ","TestPointNormalsSequence"],"0059":["CS","GlobalDeviationProbabilityNormalsFlag"],"0060":["US","FalsePositivesQuantity"],"0061":["CS","ExcessiveFalsePositivesDataFlag"],"0062":["CS","ExcessiveFalsePositives"],"0063":["CS","VisualFieldTestNormalsFlag"],"0064":["SQ","ResultsNormalsSequence"],"0065":["SQ","AgeCorrectedSensitivityDeviationAlgorithmSequence"],"0066":["FL","GlobalDeviationFromNormal"],"0067":["SQ","GeneralizedDefectSensitivityDeviationAlgorithmSequence"],"0068":["FL","LocalizedDeviationfromNormal"],"0069":["LO","PatientReliabilityIndicator"],"0070":["FL","VisualFieldMeanSensitivity"],"0071":["FL","GlobalDeviationProbability"],"0072":["CS","LocalDeviationProbabilityNormalsFlag"],"0073":["FL","LocalizedDeviationProbability"],"0074":["CS","ShortTermFluctuationCalculated"],"0075":["FL","ShortTermFluctuation"],"0076":["CS","ShortTermFluctuationProbabilityCalculated"],"0077":["FL","ShortTermFluctuationProbability"],"0078":["CS","CorrectedLocalizedDeviationFromNormalCalculated"],"0079":["FL","CorrectedLocalizedDeviationFromNormal"],"0080":["CS","CorrectedLocalizedDeviationFromNormalProbabilityCalculated"],"0081":["FL","CorrectedLocalizedDeviationFromNormalProbability"],"0083":["SQ","GlobalDeviationProbabilitySequence"],"0085":["SQ","LocalizedDeviationProbabilitySequence"],"0086":["CS","FovealSensitivityMeasured"],"0087":["FL","FovealSensitivity"],"0088":["FL","VisualFieldTestDuration"],"0089":["SQ","VisualFieldTestPointSequence"],"0090":["FL","VisualFieldTestPointXCoordinate"],"0091":["FL","VisualFieldTestPointYCoordinate"],"0092":["FL","AgeCorrectedSensitivityDeviationValue"],"0093":["CS","StimulusResults"],"0094":["FL","SensitivityValue"],"0095":["CS","RetestStimulusSeen"],"0096":["FL","RetestSensitivityValue"],"0097":["SQ","VisualFieldTestPointNormalsSequence"],"0098":["FL","QuantifiedDefect"],"0100":["FL","AgeCorrectedSensitivityDeviationProbabilityValue"],"0102":["CS","GeneralizedDefectCorrectedSensitivityDeviationFlag "],"0103":["FL","GeneralizedDefectCorrectedSensitivityDeviationValue "],"0104":["FL","GeneralizedDefectCorrectedSensitivityDeviationProbabilityValue"],"0105":["FL ","MinimumSensitivityValue"],"0106":["CS","BlindSpotLocalized"],"0107":["FL","BlindSpotXCoordinate"],"0108":["FL","BlindSpotYCoordinate "],"0110":["SQ","VisualAcuityMeasurementSequence"],"0112":["SQ","RefractiveParametersUsedOnPatientSequence"],"0113":["CS","MeasurementLaterality"],"0114":["SQ","OphthalmicPatientClinicalInformationLeftEyeSequence"],"0115":["SQ","OphthalmicPatientClinicalInformationRightEyeSequence"],"0117":["CS","FovealPointNormativeDataFlag"],"0118":["FL","FovealPointProbabilityValue"],"0120":["CS","ScreeningBaselineMeasured"],"0122":["SQ","ScreeningBaselineMeasuredSequence"],"0124":["CS","ScreeningBaselineType"],"0126":["FL","ScreeningBaselineValue"],"0202":["LO","AlgorithmSource"],"0306":["LO","DataSetName"],"0307":["LO","DataSetVersion"],"0308":["LO","DataSetSource"],"0309":["LO","DataSetDescription"],"0317":["SQ","VisualFieldTestReliabilityGlobalIndexSequence"],"0320":["SQ","VisualFieldGlobalResultsIndexSequence"],"0325":["SQ","DataObservationSequence"],"0338":["CS","IndexNormalsFlag"],"0341":["FL","IndexProbability"],"0344":["SQ","IndexProbabilitySequence"]},"0028":{"0002":["US","SamplesPerPixel"],"0003":["US","SamplesPerPixelUsed"],"0004":["CS","PhotometricInterpretation"],"0005":["US","ImageDimensions"],"0006":["US","PlanarConfiguration"],"0008":["IS","NumberOfFrames"],"0009":["AT","FrameIncrementPointer"],"000A":["AT","FrameDimensionPointer"],"0010":["US","Rows"],"0011":["US","Columns"],"0012":["US","Planes"],"0014":["US","UltrasoundColorDataPresent"],"0030":["DS","PixelSpacing"],"0031":["DS","ZoomFactor"],"0032":["DS","ZoomCenter"],"0034":["IS","PixelAspectRatio"],"0040":["CS","ImageFormat"],"0050":["LO","ManipulatedImage"],"0051":["CS","CorrectedImage"],"005F":["LO","CompressionRecognitionCode"],"0060":["CS","CompressionCode"],"0061":["SH","CompressionOriginator"],"0062":["LO","CompressionLabel"],"0063":["SH","CompressionDescription"],"0065":["CS","CompressionSequence"],"0066":["AT","CompressionStepPointers"],"0068":["US","RepeatInterval"],"0069":["US","BitsGrouped"],"0070":["US","PerimeterTable"],"0071":["SS","PerimeterValue"],"0080":["US","PredictorRows"],"0081":["US","PredictorColumns"],"0082":["US","PredictorConstants"],"0090":["CS","BlockedPixels"],"0091":["US","BlockRows"],"0092":["US","BlockColumns"],"0093":["US","RowOverlap"],"0094":["US","ColumnOverlap"],"0100":["US","BitsAllocated"],"0101":["US","BitsStored"],"0102":["US","HighBit"],"0103":["US","PixelRepresentation"],"0104":["SS","SmallestValidPixelValue"],"0105":["SS","LargestValidPixelValue"],"0106":["SS","SmallestImagePixelValue"],"0107":["SS","LargestImagePixelValue"],"0108":["SS","SmallestPixelValueInSeries"],"0109":["SS","LargestPixelValueInSeries"],"0110":["SS","SmallestImagePixelValueInPlane"],"0111":["SS","LargestImagePixelValueInPlane"],"0120":["SS","PixelPaddingValue"],"0121":["SS","PixelPaddingRangeLimit"],"0200":["US","ImageLocation"],"0300":["CS","QualityControlImage"],"0301":["CS","BurnedInAnnotation"],"0302":["CS","RecognizableVisualFeatures"],"0303":["CS","LongitudinalTemporalInformationModified"],"0400":["LO","TransformLabel"],"0401":["LO","TransformVersionNumber"],"0402":["US","NumberOfTransformSteps"],"0403":["LO","SequenceOfCompressedData"],"0404":["AT","DetailsOfCoefficients"],"0700":["LO","DCTLabel"],"0701":["CS","DataBlockDescription"],"0702":["AT","DataBlock"],"0710":["US","NormalizationFactorFormat"],"0720":["US","ZonalMapNumberFormat"],"0721":["AT","ZonalMapLocation"],"0722":["US","ZonalMapFormat"],"0730":["US","AdaptiveMapFormat"],"0740":["US","CodeNumberFormat"],"0A02":["CS","PixelSpacingCalibrationType"],"0A04":["LO","PixelSpacingCalibrationDescription"],1040:["CS","PixelIntensityRelationship"],1041:["SS","PixelIntensityRelationshipSign"],1050:["DS","WindowCenter"],1051:["DS","WindowWidth"],1052:["DS","RescaleIntercept"],1053:["DS","RescaleSlope"],1054:["LO","RescaleType"],1055:["LO","WindowCenterWidthExplanation"],1056:["CS","VOILUTFunction"],1080:["CS","GrayScale"],1090:["CS","RecommendedViewingMode"],1100:["SS","GrayLookupTableDescriptor"],1101:["SS","RedPaletteColorLookupTableDescriptor"],1102:["SS","GreenPaletteColorLookupTableDescriptor"],1103:["SS","BluePaletteColorLookupTableDescriptor"],1104:["US","AlphaPaletteColorLookupTableDescriptor"],1111:["SS","LargeRedPaletteColorLookupTableDescriptor"],1112:["SS","LargeGreenPaletteColorLookupTableDescriptor"],1113:["SS","LargeBluePaletteColorLookupTableDescriptor"],1199:["UI","PaletteColorLookupTableUID"],1200:["OW","GrayLookupTableData"],1201:["OW","RedPaletteColorLookupTableData"],1202:["OW","GreenPaletteColorLookupTableData"],1203:["OW","BluePaletteColorLookupTableData"],1204:["OW","AlphaPaletteColorLookupTableData"],1211:["OW","LargeRedPaletteColorLookupTableData"],1212:["OW","LargeGreenPaletteColorLookupTableData"],1213:["OW","LargeBluePaletteColorLookupTableData"],1214:["UI","LargePaletteColorLookupTableUID"],1221:["OW","SegmentedRedPaletteColorLookupTableData"],1222:["OW","SegmentedGreenPaletteColorLookupTableData"],1223:["OW","SegmentedBluePaletteColorLookupTableData"],1300:["CS","BreastImplantPresent"],1350:["CS","PartialView"],1351:["ST","PartialViewDescription"],1352:["SQ","PartialViewCodeSequence"],"135A":["CS","SpatialLocationsPreserved"],1401:["SQ","DataFrameAssignmentSequence"],1402:["CS","DataPathAssignment"],1403:["US","BitsMappedToColorLookupTable"],1404:["SQ","BlendingLUT1Sequence"],1405:["CS","BlendingLUT1TransferFunction"],1406:["FD","BlendingWeightConstant"],1407:["US","BlendingLookupTableDescriptor"],1408:["OW","BlendingLookupTableData"],"140B":["SQ","EnhancedPaletteColorLookupTableSequence"],"140C":["SQ","BlendingLUT2Sequence"],"140D":["CS","BlendingLUT2TransferFunction"],"140E":["CS","DataPathID"],"140F":["CS","RGBLUTTransferFunction"],1410:["CS","AlphaLUTTransferFunction"],2e3:["OB","ICCProfile"],2110:["CS","LossyImageCompression"],2112:["DS","LossyImageCompressionRatio"],2114:["CS","LossyImageCompressionMethod"],3e3:["SQ","ModalityLUTSequence"],3002:["SS","LUTDescriptor"],3003:["LO","LUTExplanation"],3004:["LO","ModalityLUTType"],3006:["OW","LUTData"],3010:["SQ","VOILUTSequence"],3110:["SQ","SoftcopyVOILUTSequence"],4e3:["LT","ImagePresentationComments"],5e3:["SQ","BiPlaneAcquisitionSequence"],6010:["US","RepresentativeFrameNumber"],6020:["US","FrameNumbersOfInterest"],6022:["LO","FrameOfInterestDescription"],6023:["CS","FrameOfInterestType"],6030:["US","MaskPointers"],6040:["US","RWavePointer"],6100:["SQ","MaskSubtractionSequence"],6101:["CS","MaskOperation"],6102:["US","ApplicableFrameRange"],6110:["US","MaskFrameNumbers"],6112:["US","ContrastFrameAveraging"],6114:["FL","MaskSubPixelShift"],6120:["SS","TIDOffset"],6190:["ST","MaskOperationExplanation"],"7FE0":["UT","PixelDataProviderURL"],9001:["UL","DataPointRows"],9002:["UL","DataPointColumns"],9003:["CS","SignalDomainColumns"],9099:["US","LargestMonochromePixelValue"],9108:["CS","DataRepresentation"],9110:["SQ","PixelMeasuresSequence"],9132:["SQ","FrameVOILUTSequence"],9145:["SQ","PixelValueTransformationSequence"],9235:["CS","SignalDomainRows"],9411:["FL","DisplayFilterPercentage"],9415:["SQ","FramePixelShiftSequence"],9416:["US","SubtractionItemID"],9422:["SQ","PixelIntensityRelationshipLUTSequence"],9443:["SQ","FramePixelDataPropertiesSequence"],9444:["CS","GeometricalProperties"],9445:["FL","GeometricMaximumDistortion"],9446:["CS","ImageProcessingApplied"],9454:["CS","MaskSelectionMode"],9474:["CS","LUTFunction"],9478:["FL","MaskVisibilityPercentage"],9501:["SQ","PixelShiftSequence"],9502:["SQ","RegionPixelShiftSequence"],9503:["SS","VerticesOfTheRegion"],9505:["SQ","MultiFramePresentationSequence"],9506:["US","PixelShiftFrameRange"],9507:["US","LUTFrameRange"],9520:["DS","ImageToEquipmentMappingMatrix"],9537:["CS","EquipmentCoordinateSystemIdentification"]},"0032":{"000A":["CS","StudyStatusID"],"000C":["CS","StudyPriorityID"],"0012":["LO","StudyIDIssuer"],"0032":["DA","StudyVerifiedDate"],"0033":["TM","StudyVerifiedTime"],"0034":["DA","StudyReadDate"],"0035":["TM","StudyReadTime"],1e3:["DA","ScheduledStudyStartDate"],1001:["TM","ScheduledStudyStartTime"],1010:["DA","ScheduledStudyStopDate"],1011:["TM","ScheduledStudyStopTime"],1020:["LO","ScheduledStudyLocation"],1021:["AE","ScheduledStudyLocationAETitle"],1030:["LO","ReasonForStudy"],1031:["SQ","RequestingPhysicianIdentificationSequence"],1032:["PN","RequestingPhysician"],1033:["LO","RequestingService"],1034:["SQ","RequestingServiceCodeSequence"],1040:["DA","StudyArrivalDate"],1041:["TM","StudyArrivalTime"],1050:["DA","StudyCompletionDate"],1051:["TM","StudyCompletionTime"],1055:["CS","StudyComponentStatusID"],1060:["LO","RequestedProcedureDescription"],1064:["SQ","RequestedProcedureCodeSequence"],1070:["LO","RequestedContrastAgent"],4e3:["LT","StudyComments"]},"0038":{"0004":["SQ","ReferencedPatientAliasSequence"],"0008":["CS","VisitStatusID"],"0010":["LO","AdmissionID"],"0011":["LO","IssuerOfAdmissionID"],"0014":["SQ","IssuerOfAdmissionIDSequence"],"0016":["LO","RouteOfAdmissions"],"001A":["DA","ScheduledAdmissionDate"],"001B":["TM","ScheduledAdmissionTime"],"001C":["DA","ScheduledDischargeDate"],"001D":["TM","ScheduledDischargeTime"],"001E":["LO","ScheduledPatientInstitutionResidence"],"0020":["DA","AdmittingDate"],"0021":["TM","AdmittingTime"],"0030":["DA","DischargeDate"],"0032":["TM","DischargeTime"],"0040":["LO","DischargeDiagnosisDescription"],"0044":["SQ","DischargeDiagnosisCodeSequence"],"0050":["LO","SpecialNeeds"],"0060":["LO","ServiceEpisodeID"],"0061":["LO","IssuerOfServiceEpisodeID"],"0062":["LO","ServiceEpisodeDescription"],"0064":["SQ","IssuerOfServiceEpisodeIDSequence"],"0100":["SQ","PertinentDocumentsSequence"],"0300":["LO","CurrentPatientLocation"],"0400":["LO","PatientInstitutionResidence"],"0500":["LO","PatientState"],"0502":["SQ","PatientClinicalTrialParticipationSequence"],4e3:["LT","VisitComments"]},"003A":{"0004":["CS","WaveformOriginality"],"0005":["US","NumberOfWaveformChannels"],"0010":["UL","NumberOfWaveformSamples"],"001A":["DS","SamplingFrequency"],"0020":["SH","MultiplexGroupLabel"],"0200":["SQ","ChannelDefinitionSequence"],"0202":["IS","WaveformChannelNumber"],"0203":["SH","ChannelLabel"],"0205":["CS","ChannelStatus"],"0208":["SQ","ChannelSourceSequence"],"0209":["SQ","ChannelSourceModifiersSequence"],"020A":["SQ","SourceWaveformSequence"],"020C":["LO","ChannelDerivationDescription"],"0210":["DS","ChannelSensitivity"],"0211":["SQ","ChannelSensitivityUnitsSequence"],"0212":["DS","ChannelSensitivityCorrectionFactor"],"0213":["DS","ChannelBaseline"],"0214":["DS","ChannelTimeSkew"],"0215":["DS","ChannelSampleSkew"],"0218":["DS","ChannelOffset"],"021A":["US","WaveformBitsStored"],"0220":["DS","FilterLowFrequency"],"0221":["DS","FilterHighFrequency"],"0222":["DS","NotchFilterFrequency"],"0223":["DS","NotchFilterBandwidth"],"0230":["FL","WaveformDataDisplayScale"],"0231":["US","WaveformDisplayBackgroundCIELabValue"],"0240":["SQ","WaveformPresentationGroupSequence"],"0241":["US","PresentationGroupNumber"],"0242":["SQ","ChannelDisplaySequence"],"0244":["US","ChannelRecommendedDisplayCIELabValue"],"0245":["FL","ChannelPosition"],"0246":["CS","DisplayShadingFlag"],"0247":["FL","FractionalChannelDisplayScale"],"0248":["FL","AbsoluteChannelDisplayScale"],"0300":["SQ","MultiplexedAudioChannelsDescriptionCodeSequence"],"0301":["IS","ChannelIdentificationCode"],"0302":["CS","ChannelMode"]},"0040":{"0001":["AE","ScheduledStationAETitle"],"0002":["DA","ScheduledProcedureStepStartDate"],"0003":["TM","ScheduledProcedureStepStartTime"],"0004":["DA","ScheduledProcedureStepEndDate"],"0005":["TM","ScheduledProcedureStepEndTime"],"0006":["PN","ScheduledPerformingPhysicianName"],"0007":["LO","ScheduledProcedureStepDescription"],"0008":["SQ","ScheduledProtocolCodeSequence"],"0009":["SH","ScheduledProcedureStepID"],"000A":["SQ","StageCodeSequence"],"000B":["SQ","ScheduledPerformingPhysicianIdentificationSequence"],"0010":["SH","ScheduledStationName"],"0011":["SH","ScheduledProcedureStepLocation"],"0012":["LO","PreMedication"],"0020":["CS","ScheduledProcedureStepStatus"],"0026":["SQ","OrderPlacerIdentifierSequence"],"0027":["SQ","OrderFillerIdentifierSequence"],"0031":["UT","LocalNamespaceEntityID"],"0032":["UT","UniversalEntityID"],"0033":["CS","UniversalEntityIDType"],"0035":["CS","IdentifierTypeCode"],"0036":["SQ","AssigningFacilitySequence"],"0039":["SQ","AssigningJurisdictionCodeSequence"],"003A":["SQ","AssigningAgencyOrDepartmentCodeSequence"],"0100":["SQ","ScheduledProcedureStepSequence"],"0220":["SQ","ReferencedNonImageCompositeSOPInstanceSequence"],"0241":["AE","PerformedStationAETitle"],"0242":["SH","PerformedStationName"],"0243":["SH","PerformedLocation"],"0244":["DA","PerformedProcedureStepStartDate"],"0245":["TM","PerformedProcedureStepStartTime"],"0250":["DA","PerformedProcedureStepEndDate"],"0251":["TM","PerformedProcedureStepEndTime"],"0252":["CS","PerformedProcedureStepStatus"],"0253":["SH","PerformedProcedureStepID"],"0254":["LO","PerformedProcedureStepDescription"],"0255":["LO","PerformedProcedureTypeDescription"],"0260":["SQ","PerformedProtocolCodeSequence"],"0261":["CS","PerformedProtocolType"],"0270":["SQ","ScheduledStepAttributesSequence"],"0275":["SQ","RequestAttributesSequence"],"0280":["ST","CommentsOnThePerformedProcedureStep"],"0281":["SQ","PerformedProcedureStepDiscontinuationReasonCodeSequence"],"0293":["SQ","QuantitySequence"],"0294":["DS","Quantity"],"0295":["SQ","MeasuringUnitsSequence"],"0296":["SQ","BillingItemSequence"],"0300":["US","TotalTimeOfFluoroscopy"],"0301":["US","TotalNumberOfExposures"],"0302":["US","EntranceDose"],"0303":["US","ExposedArea"],"0306":["DS","DistanceSourceToEntrance"],"0307":["DS","DistanceSourceToSupport"],"030E":["SQ","ExposureDoseSequence"],"0310":["ST","CommentsOnRadiationDose"],"0312":["DS","XRayOutput"],"0314":["DS","HalfValueLayer"],"0316":["DS","OrganDose"],"0318":["CS","OrganExposed"],"0320":["SQ","BillingProcedureStepSequence"],"0321":["SQ","FilmConsumptionSequence"],"0324":["SQ","BillingSuppliesAndDevicesSequence"],"0330":["SQ","ReferencedProcedureStepSequence"],"0340":["SQ","PerformedSeriesSequence"],"0400":["LT","CommentsOnTheScheduledProcedureStep"],"0440":["SQ","ProtocolContextSequence"],"0441":["SQ","ContentItemModifierSequence"],"0500":["SQ","ScheduledSpecimenSequence"],"050A":["LO","SpecimenAccessionNumber"],"0512":["LO","ContainerIdentifier"],"0513":["SQ","IssuerOfTheContainerIdentifierSequence"],"0515":["SQ","AlternateContainerIdentifierSequence"],"0518":["SQ","ContainerTypeCodeSequence"],"051A":["LO","ContainerDescription"],"0520":["SQ","ContainerComponentSequence"],"0550":["SQ","SpecimenSequence"],"0551":["LO","SpecimenIdentifier"],"0552":["SQ","SpecimenDescriptionSequenceTrial"],"0553":["ST","SpecimenDescriptionTrial"],"0554":["UI","SpecimenUID"],"0555":["SQ","AcquisitionContextSequence"],"0556":["ST","AcquisitionContextDescription"],"059A":["SQ","SpecimenTypeCodeSequence"],"0560":["SQ","SpecimenDescriptionSequence"],"0562":["SQ","IssuerOfTheSpecimenIdentifierSequence"],"0600":["LO","SpecimenShortDescription"],"0602":["UT","SpecimenDetailedDescription"],"0610":["SQ","SpecimenPreparationSequence"],"0612":["SQ","SpecimenPreparationStepContentItemSequence"],"0620":["SQ","SpecimenLocalizationContentItemSequence"],"06FA":["LO","SlideIdentifier"],"071A":["SQ","ImageCenterPointCoordinatesSequence"],"072A":["DS","XOffsetInSlideCoordinateSystem"],"073A":["DS","YOffsetInSlideCoordinateSystem"],"074A":["DS","ZOffsetInSlideCoordinateSystem"],"08D8":["SQ","PixelSpacingSequence"],"08DA":["SQ","CoordinateSystemAxisCodeSequence"],"08EA":["SQ","MeasurementUnitsCodeSequence"],"09F8":["SQ","VitalStainCodeSequenceTrial"],1001:["SH","RequestedProcedureID"],1002:["LO","ReasonForTheRequestedProcedure"],1003:["SH","RequestedProcedurePriority"],1004:["LO","PatientTransportArrangements"],1005:["LO","RequestedProcedureLocation"],1006:["SH","PlacerOrderNumberProcedure"],1007:["SH","FillerOrderNumberProcedure"],1008:["LO","ConfidentialityCode"],1009:["SH","ReportingPriority"],"100A":["SQ","ReasonForRequestedProcedureCodeSequence"],1010:["PN","NamesOfIntendedRecipientsOfResults"],1011:["SQ","IntendedRecipientsOfResultsIdentificationSequence"],1012:["SQ","ReasonForPerformedProcedureCodeSequence"],1060:["LO","RequestedProcedureDescriptionTrial"],1101:["SQ","PersonIdentificationCodeSequence"],1102:["ST","PersonAddress"],1103:["LO","PersonTelephoneNumbers"],1400:["LT","RequestedProcedureComments"],2001:["LO","ReasonForTheImagingServiceRequest"],2004:["DA","IssueDateOfImagingServiceRequest"],2005:["TM","IssueTimeOfImagingServiceRequest"],2006:["SH","PlacerOrderNumberImagingServiceRequestRetired"],2007:["SH","FillerOrderNumberImagingServiceRequestRetired"],2008:["PN","OrderEnteredBy"],2009:["SH","OrderEntererLocation"],2010:["SH","OrderCallbackPhoneNumber"],2016:["LO","PlacerOrderNumberImagingServiceRequest"],2017:["LO","FillerOrderNumberImagingServiceRequest"],2400:["LT","ImagingServiceRequestComments"],3001:["LO","ConfidentialityConstraintOnPatientDataDescription"],4001:["CS","GeneralPurposeScheduledProcedureStepStatus"],4002:["CS","GeneralPurposePerformedProcedureStepStatus"],4003:["CS","GeneralPurposeScheduledProcedureStepPriority"],4004:["SQ","ScheduledProcessingApplicationsCodeSequence"],4005:["DT","ScheduledProcedureStepStartDateTime"],4006:["CS","MultipleCopiesFlag"],4007:["SQ","PerformedProcessingApplicationsCodeSequence"],4009:["SQ","HumanPerformerCodeSequence"],4010:["DT","ScheduledProcedureStepModificationDateTime"],4011:["DT","ExpectedCompletionDateTime"],4015:["SQ","ResultingGeneralPurposePerformedProcedureStepsSequence"],4016:["SQ","ReferencedGeneralPurposeScheduledProcedureStepSequence"],4018:["SQ","ScheduledWorkitemCodeSequence"],4019:["SQ","PerformedWorkitemCodeSequence"],4020:["CS","InputAvailabilityFlag"],4021:["SQ","InputInformationSequence"],4022:["SQ","RelevantInformationSequence"],4023:["UI","ReferencedGeneralPurposeScheduledProcedureStepTransactionUID"],4025:["SQ","ScheduledStationNameCodeSequence"],4026:["SQ","ScheduledStationClassCodeSequence"],4027:["SQ","ScheduledStationGeographicLocationCodeSequence"],4028:["SQ","PerformedStationNameCodeSequence"],4029:["SQ","PerformedStationClassCodeSequence"],4030:["SQ","PerformedStationGeographicLocationCodeSequence"],4031:["SQ","RequestedSubsequentWorkitemCodeSequence"],4032:["SQ","NonDICOMOutputCodeSequence"],4033:["SQ","OutputInformationSequence"],4034:["SQ","ScheduledHumanPerformersSequence"],4035:["SQ","ActualHumanPerformersSequence"],4036:["LO","HumanPerformerOrganization"],4037:["PN","HumanPerformerName"],4040:["CS","RawDataHandling"],4041:["CS","InputReadinessState"],4050:["DT","PerformedProcedureStepStartDateTime"],4051:["DT","PerformedProcedureStepEndDateTime"],4052:["DT","ProcedureStepCancellationDateTime"],8302:["DS","EntranceDoseInmGy"],9094:["SQ","ReferencedImageRealWorldValueMappingSequence"],9096:["SQ","RealWorldValueMappingSequence"],9098:["SQ","PixelValueMappingCodeSequence"],9210:["SH","LUTLabel"],9211:["SS","RealWorldValueLastValueMapped"],9212:["FD","RealWorldValueLUTData"],9216:["SS","RealWorldValueFirstValueMapped"],9224:["FD","RealWorldValueIntercept"],9225:["FD","RealWorldValueSlope"],A007:["CS","FindingsFlagTrial"],A010:["CS","RelationshipType"],A020:["SQ","FindingsSequenceTrial"],A021:["UI","FindingsGroupUIDTrial"],A022:["UI","ReferencedFindingsGroupUIDTrial"],A023:["DA","FindingsGroupRecordingDateTrial"],A024:["TM","FindingsGroupRecordingTimeTrial"],A026:["SQ","FindingsSourceCategoryCodeSequenceTrial"],A027:["LO","VerifyingOrganization"],A028:["SQ","DocumentingOrganizationIdentifierCodeSequenceTrial"],A030:["DT","VerificationDateTime"],A032:["DT","ObservationDateTime"],A040:["CS","ValueType"],A043:["SQ","ConceptNameCodeSequence"],A047:["LO","MeasurementPrecisionDescriptionTrial"],A050:["CS","ContinuityOfContent"],A057:["CS","UrgencyOrPriorityAlertsTrial"],A060:["LO","SequencingIndicatorTrial"],A066:["SQ","DocumentIdentifierCodeSequenceTrial"],A067:["PN","DocumentAuthorTrial"],A068:["SQ","DocumentAuthorIdentifierCodeSequenceTrial"],A070:["SQ","IdentifierCodeSequenceTrial"],A073:["SQ","VerifyingObserverSequence"],A074:["OB","ObjectBinaryIdentifierTrial"],A075:["PN","VerifyingObserverName"],A076:["SQ","DocumentingObserverIdentifierCodeSequenceTrial"],A078:["SQ","AuthorObserverSequence"],A07A:["SQ","ParticipantSequence"],A07C:["SQ","CustodialOrganizationSequence"],A080:["CS","ParticipationType"],A082:["DT","ParticipationDateTime"],A084:["CS","ObserverType"],A085:["SQ","ProcedureIdentifierCodeSequenceTrial"],A088:["SQ","VerifyingObserverIdentificationCodeSequence"],A089:["OB","ObjectDirectoryBinaryIdentifierTrial"],A090:["SQ","EquivalentCDADocumentSequence"],A0B0:["US","ReferencedWaveformChannels"],A110:["DA","DateOfDocumentOrVerbalTransactionTrial"],A112:["TM","TimeOfDocumentCreationOrVerbalTransactionTrial"],A120:["DT","DateTime"],A121:["DA","Date"],A122:["TM","Time"],A123:["PN","PersonName"],A124:["UI","UID"],A125:["CS","ReportStatusIDTrial"],A130:["CS","TemporalRangeType"],A132:["UL","ReferencedSamplePositions"],A136:["US","ReferencedFrameNumbers"],A138:["DS","ReferencedTimeOffsets"],A13A:["DT","ReferencedDateTime"],A160:["UT","TextValue"],A167:["SQ","ObservationCategoryCodeSequenceTrial"],A168:["SQ","ConceptCodeSequence"],A16A:["ST","BibliographicCitationTrial"],A170:["SQ","PurposeOfReferenceCodeSequence"],A171:["UI","ObservationUIDTrial"],A172:["UI","ReferencedObservationUIDTrial"],A173:["CS","ReferencedObservationClassTrial"],A174:["CS","ReferencedObjectObservationClassTrial"],A180:["US","AnnotationGroupNumber"],A192:["DA","ObservationDateTrial"],A193:["TM","ObservationTimeTrial"],A194:["CS","MeasurementAutomationTrial"],A195:["SQ","ModifierCodeSequence"],A224:["ST","IdentificationDescriptionTrial"],A290:["CS","CoordinatesSetGeometricTypeTrial"],A296:["SQ","AlgorithmCodeSequenceTrial"],A297:["ST","AlgorithmDescriptionTrial"],A29A:["SL","PixelCoordinatesSetTrial"],A300:["SQ","MeasuredValueSequence"],A301:["SQ","NumericValueQualifierCodeSequence"],A307:["PN","CurrentObserverTrial"],A30A:["DS","NumericValue"],A313:["SQ","ReferencedAccessionSequenceTrial"],A33A:["ST","ReportStatusCommentTrial"],A340:["SQ","ProcedureContextSequenceTrial"],A352:["PN","VerbalSourceTrial"],A353:["ST","AddressTrial"],A354:["LO","TelephoneNumberTrial"],A358:["SQ","VerbalSourceIdentifierCodeSequenceTrial"],A360:["SQ","PredecessorDocumentsSequence"],A370:["SQ","ReferencedRequestSequence"],A372:["SQ","PerformedProcedureCodeSequence"],A375:["SQ","CurrentRequestedProcedureEvidenceSequence"],A380:["SQ","ReportDetailSequenceTrial"],A385:["SQ","PertinentOtherEvidenceSequence"],A390:["SQ","HL7StructuredDocumentReferenceSequence"],A402:["UI","ObservationSubjectUIDTrial"],A403:["CS","ObservationSubjectClassTrial"],A404:["SQ","ObservationSubjectTypeCodeSequenceTrial"],A491:["CS","CompletionFlag"],A492:["LO","CompletionFlagDescription"],A493:["CS","VerificationFlag"],A494:["CS","ArchiveRequested"],A496:["CS","PreliminaryFlag"],A504:["SQ","ContentTemplateSequence"],A525:["SQ","IdenticalDocumentsSequence"],A600:["CS","ObservationSubjectContextFlagTrial"],A601:["CS","ObserverContextFlagTrial"],A603:["CS","ProcedureContextFlagTrial"],A730:["SQ","ContentSequence"],A731:["SQ","RelationshipSequenceTrial"],A732:["SQ","RelationshipTypeCodeSequenceTrial"],A744:["SQ","LanguageCodeSequenceTrial"],A992:["ST","UniformResourceLocatorTrial"],B020:["SQ","WaveformAnnotationSequence"],DB00:["CS","TemplateIdentifier"],DB06:["DT","TemplateVersion"],DB07:["DT","TemplateLocalVersion"],DB0B:["CS","TemplateExtensionFlag"],DB0C:["UI","TemplateExtensionOrganizationUID"],DB0D:["UI","TemplateExtensionCreatorUID"],DB73:["UL","ReferencedContentItemIdentifier"],E001:["ST","HL7InstanceIdentifier"],E004:["DT","HL7DocumentEffectiveTime"],E006:["SQ","HL7DocumentTypeCodeSequence"],E008:["SQ","DocumentClassCodeSequence"],E010:["UT","RetrieveURI"],E011:["UI","RetrieveLocationUID"],E020:["CS","TypeOfInstances"],E021:["SQ","DICOMRetrievalSequence"],E022:["SQ","DICOMMediaRetrievalSequence"],E023:["SQ","WADORetrievalSequence"],E024:["SQ","XDSRetrievalSequence"],E030:["UI","RepositoryUniqueID"],E031:["UI","HomeCommunityID"]},"0042":{"0010":["ST","DocumentTitle"],"0011":["OB","EncapsulatedDocument"],"0012":["LO","MIMETypeOfEncapsulatedDocument"],"0013":["SQ","SourceInstanceSequence"],"0014":["LO","ListOfMIMETypes"]},"0044":{"0001":["ST","ProductPackageIdentifier"],"0002":["CS","SubstanceAdministrationApproval"],"0003":["LT","ApprovalStatusFurtherDescription"],"0004":["DT","ApprovalStatusDateTime"],"0007":["SQ","ProductTypeCodeSequence"],"0008":["LO","ProductName"],"0009":["LT","ProductDescription"],"000A":["LO","ProductLotIdentifier"],"000B":["DT","ProductExpirationDateTime"],"0010":["DT","SubstanceAdministrationDateTime"],"0011":["LO","SubstanceAdministrationNotes"],"0012":["LO","SubstanceAdministrationDeviceID"],"0013":["SQ","ProductParameterSequence"],"0019":["SQ","SubstanceAdministrationParameterSequence"]},"0046":{"0012":["LO","LensDescription"],"0014":["SQ","RightLensSequence"],"0015":["SQ","LeftLensSequence"],"0016":["SQ","UnspecifiedLateralityLensSequence"],"0018":["SQ","CylinderSequence"],"0028":["SQ","PrismSequence"],"0030":["FD","HorizontalPrismPower"],"0032":["CS","HorizontalPrismBase"],"0034":["FD","VerticalPrismPower"],"0036":["CS","VerticalPrismBase"],"0038":["CS","LensSegmentType"],"0040":["FD","OpticalTransmittance"],"0042":["FD","ChannelWidth"],"0044":["FD","PupilSize"],"0046":["FD","CornealSize"],"0050":["SQ","AutorefractionRightEyeSequence"],"0052":["SQ","AutorefractionLeftEyeSequence"],"0060":["FD","DistancePupillaryDistance"],"0062":["FD","NearPupillaryDistance"],"0063":["FD","IntermediatePupillaryDistance"],"0064":["FD","OtherPupillaryDistance"],"0070":["SQ","KeratometryRightEyeSequence"],"0071":["SQ","KeratometryLeftEyeSequence"],"0074":["SQ","SteepKeratometricAxisSequence"],"0075":["FD","RadiusOfCurvature"],"0076":["FD","KeratometricPower"],"0077":["FD","KeratometricAxis"],"0080":["SQ","FlatKeratometricAxisSequence"],"0092":["CS","BackgroundColor"],"0094":["CS","Optotype"],"0095":["CS","OptotypePresentation"],"0097":["SQ","SubjectiveRefractionRightEyeSequence"],"0098":["SQ","SubjectiveRefractionLeftEyeSequence"],"0100":["SQ","AddNearSequence"],"0101":["SQ","AddIntermediateSequence"],"0102":["SQ","AddOtherSequence"],"0104":["FD","AddPower"],"0106":["FD","ViewingDistance"],"0121":["SQ","VisualAcuityTypeCodeSequence"],"0122":["SQ","VisualAcuityRightEyeSequence"],"0123":["SQ","VisualAcuityLeftEyeSequence"],"0124":["SQ","VisualAcuityBothEyesOpenSequence"],"0125":["CS","ViewingDistanceType"],"0135":["SS","VisualAcuityModifiers"],"0137":["FD","DecimalVisualAcuity"],"0139":["LO","OptotypeDetailedDefinition"],"0145":["SQ","ReferencedRefractiveMeasurementsSequence"],"0146":["FD","SpherePower"],"0147":["FD","CylinderPower"]},"0048":{"0001":["FL","ImagedVolumeWidth"],"0002":["FL","ImagedVolumeHeight"],"0003":["FL","ImagedVolumeDepth"],"0006":["UL","TotalPixelMatrixColumns"],"0007":["UL","TotalPixelMatrixRows"],"0008":["SQ","TotalPixelMatrixOriginSequence"],"0010":["CS","SpecimenLabelInImage"],"0011":["CS","FocusMethod"],"0012":["CS","ExtendedDepthOfField"],"0013":["US","NumberOfFocalPlanes"],"0014":["FL","DistanceBetweenFocalPlanes"],"0015":["US","RecommendedAbsentPixelCIELabValue"],"0100":["SQ","IlluminatorTypeCodeSequence"],"0102":["DS","ImageOrientationSlide"],"0105":["SQ","OpticalPathSequence"],"0106":["SH","OpticalPathIdentifier"],"0107":["ST","OpticalPathDescription"],"0108":["SQ","IlluminationColorCodeSequence"],"0110":["SQ","SpecimenReferenceSequence"],"0111":["DS","CondenserLensPower"],"0112":["DS","ObjectiveLensPower"],"0113":["DS","ObjectiveLensNumericalAperture"],"0120":["SQ","PaletteColorLookupTableSequence"],"0200":["SQ","ReferencedImageNavigationSequence"],"0201":["US","TopLeftHandCornerOfLocalizerArea"],"0202":["US","BottomRightHandCornerOfLocalizerArea"],"0207":["SQ","OpticalPathIdentificationSequence"],"021A":["SQ","PlanePositionSlideSequence"],"021E":["SL","RowPositionInTotalImagePixelMatrix"],"021F":["SL","ColumnPositionInTotalImagePixelMatrix"],"0301":["CS","PixelOriginInterpretation"]},"0050":{"0004":["CS","CalibrationImage"],"0010":["SQ","DeviceSequence"],"0012":["SQ","ContainerComponentTypeCodeSequence"],"0013":["FD","ContainerComponentThickness"],"0014":["DS","DeviceLength"],"0015":["FD","ContainerComponentWidth"],"0016":["DS","DeviceDiameter"],"0017":["CS","DeviceDiameterUnits"],"0018":["DS","DeviceVolume"],"0019":["DS","InterMarkerDistance"],"001A":["CS","ContainerComponentMaterial"],"001B":["LO","ContainerComponentID"],"001C":["FD","ContainerComponentLength"],"001D":["FD","ContainerComponentDiameter"],"001E":["LO","ContainerComponentDescription"],"0020":["LO","DeviceDescription"]},"0052":{"0001":["FL","ContrastBolusIngredientPercentByVolume"],"0002":["FD","OCTFocalDistance"],"0003":["FD","BeamSpotSize"],"0004":["FD","EffectiveRefractiveIndex"],"0006":["CS","OCTAcquisitionDomain"],"0007":["FD","OCTOpticalCenterWavelength"],"0008":["FD","AxialResolution"],"0009":["FD","RangingDepth"],"0011":["FD","ALineRate"],"0012":["US","ALinesPerFrame"],"0013":["FD","CatheterRotationalRate"],"0014":["FD","ALinePixelSpacing"],"0016":["SQ","ModeOfPercutaneousAccessSequence"],"0025":["SQ","IntravascularOCTFrameTypeSequence"],"0026":["CS","OCTZOffsetApplied"],"0027":["SQ","IntravascularFrameContentSequence"],"0028":["FD","IntravascularLongitudinalDistance"],"0029":["SQ","IntravascularOCTFrameContentSequence"],"0030":["SS","OCTZOffsetCorrection"],"0031":["CS","CatheterDirectionOfRotation"],"0033":["FD","SeamLineLocation"],"0034":["FD","FirstALineLocation"],"0036":["US","SeamLineIndex"],"0038":["US","NumberOfPaddedAlines"],"0039":["CS","InterpolationType"],"003A":["CS","RefractiveIndexApplied"]},"0054":{"0010":["US","EnergyWindowVector"],"0011":["US","NumberOfEnergyWindows"],"0012":["SQ","EnergyWindowInformationSequence"],"0013":["SQ","EnergyWindowRangeSequence"],"0014":["DS","EnergyWindowLowerLimit"],"0015":["DS","EnergyWindowUpperLimit"],"0016":["SQ","RadiopharmaceuticalInformationSequence"],"0017":["IS","ResidualSyringeCounts"],"0018":["SH","EnergyWindowName"],"0020":["US","DetectorVector"],"0021":["US","NumberOfDetectors"],"0022":["SQ","DetectorInformationSequence"],"0030":["US","PhaseVector"],"0031":["US","NumberOfPhases"],"0032":["SQ","PhaseInformationSequence"],"0033":["US","NumberOfFramesInPhase"],"0036":["IS","PhaseDelay"],"0038":["IS","PauseBetweenFrames"],"0039":["CS","PhaseDescription"],"0050":["US","RotationVector"],"0051":["US","NumberOfRotations"],"0052":["SQ","RotationInformationSequence"],"0053":["US","NumberOfFramesInRotation"],"0060":["US","RRIntervalVector"],"0061":["US","NumberOfRRIntervals"],"0062":["SQ","GatedInformationSequence"],"0063":["SQ","DataInformationSequence"],"0070":["US","TimeSlotVector"],"0071":["US","NumberOfTimeSlots"],"0072":["SQ","TimeSlotInformationSequence"],"0073":["DS","TimeSlotTime"],"0080":["US","SliceVector"],"0081":["US","NumberOfSlices"],"0090":["US","AngularViewVector"],"0100":["US","TimeSliceVector"],"0101":["US","NumberOfTimeSlices"],"0200":["DS","StartAngle"],"0202":["CS","TypeOfDetectorMotion"],"0210":["IS","TriggerVector"],"0211":["US","NumberOfTriggersInPhase"],"0220":["SQ","ViewCodeSequence"],"0222":["SQ","ViewModifierCodeSequence"],"0300":["SQ","RadionuclideCodeSequence"],"0302":["SQ","AdministrationRouteCodeSequence"],"0304":["SQ","RadiopharmaceuticalCodeSequence"],"0306":["SQ","CalibrationDataSequence"],"0308":["US","EnergyWindowNumber"],"0400":["SH","ImageID"],"0410":["SQ","PatientOrientationCodeSequence"],"0412":["SQ","PatientOrientationModifierCodeSequence"],"0414":["SQ","PatientGantryRelationshipCodeSequence"],"0500":["CS","SliceProgressionDirection"],1e3:["CS","SeriesType"],1001:["CS","Units"],1002:["CS","CountsSource"],1004:["CS","ReprojectionMethod"],1006:["CS","SUVType"],1100:["CS","RandomsCorrectionMethod"],1101:["LO","AttenuationCorrectionMethod"],1102:["CS","DecayCorrection"],1103:["LO","ReconstructionMethod"],1104:["LO","DetectorLinesOfResponseUsed"],1105:["LO","ScatterCorrectionMethod"],1200:["DS","AxialAcceptance"],1201:["IS","AxialMash"],1202:["IS","TransverseMash"],1203:["DS","DetectorElementSize"],1210:["DS","CoincidenceWindowWidth"],1220:["CS","SecondaryCountsType"],1300:["DS","FrameReferenceTime"],1310:["IS","PrimaryPromptsCountsAccumulated"],1311:["IS","SecondaryCountsAccumulated"],1320:["DS","SliceSensitivityFactor"],1321:["DS","DecayFactor"],1322:["DS","DoseCalibrationFactor"],1323:["DS","ScatterFractionFactor"],1324:["DS","DeadTimeFactor"],1330:["US","ImageIndex"],1400:["CS","CountsIncluded"],1401:["CS","DeadTimeCorrectionFlag"]},"0060":{3e3:["SQ","HistogramSequence"],3002:["US","HistogramNumberOfBins"],3004:["SS","HistogramFirstBinValue"],3006:["SS","HistogramLastBinValue"],3008:["US","HistogramBinWidth"],3010:["LO","HistogramExplanation"],3020:["UL","HistogramData"]},"0062":{"0001":["CS","SegmentationType"],"0002":["SQ","SegmentSequence"],"0003":["SQ","SegmentedPropertyCategoryCodeSequence"],"0004":["US","SegmentNumber"],"0005":["LO","SegmentLabel"],"0006":["ST","SegmentDescription"],"0008":["CS","SegmentAlgorithmType"],"0009":["LO","SegmentAlgorithmName"],"000A":["SQ","SegmentIdentificationSequence"],"000B":["US","ReferencedSegmentNumber"],"000C":["US","RecommendedDisplayGrayscaleValue"],"000D":["US","RecommendedDisplayCIELabValue"],"000E":["US","MaximumFractionalValue"],"000F":["SQ","SegmentedPropertyTypeCodeSequence"],"0010":["CS","SegmentationFractionalType"]},"0064":{"0002":["SQ","DeformableRegistrationSequence"],"0003":["UI","SourceFrameOfReferenceUID"],"0005":["SQ","DeformableRegistrationGridSequence"],"0007":["UL","GridDimensions"],"0008":["FD","GridResolution"],"0009":["OF","VectorGridData"],"000F":["SQ","PreDeformationMatrixRegistrationSequence"],"0010":["SQ","PostDeformationMatrixRegistrationSequence"]},"0066":{"0001":["UL","NumberOfSurfaces"],"0002":["SQ","SurfaceSequence"],"0003":["UL","SurfaceNumber"],"0004":["LT","SurfaceComments"],"0009":["CS","SurfaceProcessing"],"000A":["FL","SurfaceProcessingRatio"],"000B":["LO","SurfaceProcessingDescription"],"000C":["FL","RecommendedPresentationOpacity"],"000D":["CS","RecommendedPresentationType"],"000E":["CS","FiniteVolume"],"0010":["CS","Manifold"],"0011":["SQ","SurfacePointsSequence"],"0012":["SQ","SurfacePointsNormalsSequence"],"0013":["SQ","SurfaceMeshPrimitivesSequence"],"0015":["UL","NumberOfSurfacePoints"],"0016":["OF","PointCoordinatesData"],"0017":["FL","PointPositionAccuracy"],"0018":["FL","MeanPointDistance"],"0019":["FL","MaximumPointDistance"],"001A":["FL","PointsBoundingBoxCoordinates"],"001B":["FL","AxisOfRotation"],"001C":["FL","CenterOfRotation"],"001E":["UL","NumberOfVectors"],"001F":["US","VectorDimensionality"],"0020":["FL","VectorAccuracy"],"0021":["OF","VectorCoordinateData"],"0023":["OW","TrianglePointIndexList"],"0024":["OW","EdgePointIndexList"],"0025":["OW","VertexPointIndexList"],"0026":["SQ","TriangleStripSequence"],"0027":["SQ","TriangleFanSequence"],"0028":["SQ","LineSequence"],"0029":["OW","PrimitivePointIndexList"],"002A":["UL","SurfaceCount"],"002B":["SQ","ReferencedSurfaceSequence"],"002C":["UL","ReferencedSurfaceNumber"],"002D":["SQ","SegmentSurfaceGenerationAlgorithmIdentificationSequence"],"002E":["SQ","SegmentSurfaceSourceInstanceSequence"],"002F":["SQ","AlgorithmFamilyCodeSequence"],"0030":["SQ","AlgorithmNameCodeSequence"],"0031":["LO","AlgorithmVersion"],"0032":["LT","AlgorithmParameters"],"0034":["SQ","FacetSequence"],"0035":["SQ","SurfaceProcessingAlgorithmIdentificationSequence"],"0036":["LO","AlgorithmName"]},"0068":{6210:["LO","ImplantSize"],6221:["LO","ImplantTemplateVersion"],6222:["SQ","ReplacedImplantTemplateSequence"],6223:["CS","ImplantType"],6224:["SQ","DerivationImplantTemplateSequence"],6225:["SQ","OriginalImplantTemplateSequence"],6226:["DT","EffectiveDateTime"],6230:["SQ","ImplantTargetAnatomySequence"],6260:["SQ","InformationFromManufacturerSequence"],6265:["SQ","NotificationFromManufacturerSequence"],6270:["DT","InformationIssueDateTime"],6280:["ST","InformationSummary"],"62A0":["SQ","ImplantRegulatoryDisapprovalCodeSequence"],"62A5":["FD","OverallTemplateSpatialTolerance"],"62C0":["SQ","HPGLDocumentSequence"],"62D0":["US","HPGLDocumentID"],"62D5":["LO","HPGLDocumentLabel"],"62E0":["SQ","ViewOrientationCodeSequence"],"62F0":["FD","ViewOrientationModifier"],"62F2":["FD","HPGLDocumentScaling"],6300:["OB","HPGLDocument"],6310:["US","HPGLContourPenNumber"],6320:["SQ","HPGLPenSequence"],6330:["US","HPGLPenNumber"],6340:["LO","HPGLPenLabel"],6345:["ST","HPGLPenDescription"],6346:["FD","RecommendedRotationPoint"],6347:["FD","BoundingRectangle"],6350:["US","ImplantTemplate3DModelSurfaceNumber"],6360:["SQ","SurfaceModelDescriptionSequence"],6380:["LO","SurfaceModelLabel"],6390:["FD","SurfaceModelScalingFactor"],"63A0":["SQ","MaterialsCodeSequence"],"63A4":["SQ","CoatingMaterialsCodeSequence"],"63A8":["SQ","ImplantTypeCodeSequence"],"63AC":["SQ","FixationMethodCodeSequence"],"63B0":["SQ","MatingFeatureSetsSequence"],"63C0":["US","MatingFeatureSetID"],"63D0":["LO","MatingFeatureSetLabel"],"63E0":["SQ","MatingFeatureSequence"],"63F0":["US","MatingFeatureID"],6400:["SQ","MatingFeatureDegreeOfFreedomSequence"],6410:["US","DegreeOfFreedomID"],6420:["CS","DegreeOfFreedomType"],6430:["SQ","TwoDMatingFeatureCoordinatesSequence"],6440:["US","ReferencedHPGLDocumentID"],6450:["FD","TwoDMatingPoint"],6460:["FD","TwoDMatingAxes"],6470:["SQ","TwoDDegreeOfFreedomSequence"],6490:["FD","ThreeDDegreeOfFreedomAxis"],"64A0":["FD","RangeOfFreedom"],"64C0":["FD","ThreeDMatingPoint"],"64D0":["FD","ThreeDMatingAxes"],"64F0":["FD","TwoDDegreeOfFreedomAxis"],6500:["SQ","PlanningLandmarkPointSequence"],6510:["SQ","PlanningLandmarkLineSequence"],6520:["SQ","PlanningLandmarkPlaneSequence"],6530:["US","PlanningLandmarkID"],6540:["LO","PlanningLandmarkDescription"],6545:["SQ","PlanningLandmarkIdentificationCodeSequence"],6550:["SQ","TwoDPointCoordinatesSequence"],6560:["FD","TwoDPointCoordinates"],6590:["FD","ThreeDPointCoordinates"],"65A0":["SQ","TwoDLineCoordinatesSequence"],"65B0":["FD","TwoDLineCoordinates"],"65D0":["FD","ThreeDLineCoordinates"],"65E0":["SQ","TwoDPlaneCoordinatesSequence"],"65F0":["FD","TwoDPlaneIntersection"],6610:["FD","ThreeDPlaneOrigin"],6620:["FD","ThreeDPlaneNormal"]},"0070":{"0001":["SQ","GraphicAnnotationSequence"],"0002":["CS","GraphicLayer"],"0003":["CS","BoundingBoxAnnotationUnits"],"0004":["CS","AnchorPointAnnotationUnits"],"0005":["CS","GraphicAnnotationUnits"],"0006":["ST","UnformattedTextValue"],"0008":["SQ","TextObjectSequence"],"0009":["SQ","GraphicObjectSequence"],"0010":["FL","BoundingBoxTopLeftHandCorner"],"0011":["FL","BoundingBoxBottomRightHandCorner"],"0012":["CS","BoundingBoxTextHorizontalJustification"],"0014":["FL","AnchorPoint"],"0015":["CS","AnchorPointVisibility"],"0020":["US","GraphicDimensions"],"0021":["US","NumberOfGraphicPoints"],"0022":["FL","GraphicData"],"0023":["CS","GraphicType"],"0024":["CS","GraphicFilled"],"0040":["IS","ImageRotationRetired"],"0041":["CS","ImageHorizontalFlip"],"0042":["US","ImageRotation"],"0050":["US","DisplayedAreaTopLeftHandCornerTrial"],"0051":["US","DisplayedAreaBottomRightHandCornerTrial"],"0052":["SL","DisplayedAreaTopLeftHandCorner"],"0053":["SL","DisplayedAreaBottomRightHandCorner"],"005A":["SQ","DisplayedAreaSelectionSequence"],"0060":["SQ","GraphicLayerSequence"],"0062":["IS","GraphicLayerOrder"],"0066":["US","GraphicLayerRecommendedDisplayGrayscaleValue"],"0067":["US","GraphicLayerRecommendedDisplayRGBValue"],"0068":["LO","GraphicLayerDescription"],"0080":["CS","ContentLabel"],"0081":["LO","ContentDescription"],"0082":["DA","PresentationCreationDate"],"0083":["TM","PresentationCreationTime"],"0084":["PN","ContentCreatorName"],"0086":["SQ","ContentCreatorIdentificationCodeSequence"],"0087":["SQ","AlternateContentDescriptionSequence"],"0100":["CS","PresentationSizeMode"],"0101":["DS","PresentationPixelSpacing"],"0102":["IS","PresentationPixelAspectRatio"],"0103":["FL","PresentationPixelMagnificationRatio"],"0207":["LO","GraphicGroupLabel"],"0208":["ST","GraphicGroupDescription"],"0209":["SQ","CompoundGraphicSequence"],"0226":["UL","CompoundGraphicInstanceID"],"0227":["LO","FontName"],"0228":["CS","FontNameType"],"0229":["LO","CSSFontName"],"0230":["FD","RotationAngle"],"0231":["SQ","TextStyleSequence"],"0232":["SQ","LineStyleSequence"],"0233":["SQ","FillStyleSequence"],"0234":["SQ","GraphicGroupSequence"],"0241":["US","TextColorCIELabValue"],"0242":["CS","HorizontalAlignment"],"0243":["CS","VerticalAlignment"],"0244":["CS","ShadowStyle"],"0245":["FL","ShadowOffsetX"],"0246":["FL","ShadowOffsetY"],"0247":["US","ShadowColorCIELabValue"],"0248":["CS","Underlined"],"0249":["CS","Bold"],"0250":["CS","Italic"],"0251":["US","PatternOnColorCIELabValue"],"0252":["US","PatternOffColorCIELabValue"],"0253":["FL","LineThickness"],"0254":["CS","LineDashingStyle"],"0255":["UL","LinePattern"],"0256":["OB","FillPattern"],"0257":["CS","FillMode"],"0258":["FL","ShadowOpacity"],"0261":["FL","GapLength"],"0262":["FL","DiameterOfVisibility"],"0273":["FL","RotationPoint"],"0274":["CS","TickAlignment"],"0278":["CS","ShowTickLabel"],"0279":["CS","TickLabelAlignment"],"0282":["CS","CompoundGraphicUnits"],"0284":["FL","PatternOnOpacity"],"0285":["FL","PatternOffOpacity"],"0287":["SQ","MajorTicksSequence"],"0288":["FL","TickPosition"],"0289":["SH","TickLabel"],"0294":["CS","CompoundGraphicType"],"0295":["UL","GraphicGroupID"],"0306":["CS","ShapeType"],"0308":["SQ","RegistrationSequence"],"0309":["SQ","MatrixRegistrationSequence"],"030A":["SQ","MatrixSequence"],"030C":["CS","FrameOfReferenceTransformationMatrixType"],"030D":["SQ","RegistrationTypeCodeSequence"],"030F":["ST","FiducialDescription"],"0310":["SH","FiducialIdentifier"],"0311":["SQ","FiducialIdentifierCodeSequence"],"0312":["FD","ContourUncertaintyRadius"],"0314":["SQ","UsedFiducialsSequence"],"0318":["SQ","GraphicCoordinatesDataSequence"],"031A":["UI","FiducialUID"],"031C":["SQ","FiducialSetSequence"],"031E":["SQ","FiducialSequence"],"0401":["US","GraphicLayerRecommendedDisplayCIELabValue"],"0402":["SQ","BlendingSequence"],"0403":["FL","RelativeOpacity"],"0404":["SQ","ReferencedSpatialRegistrationSequence"],"0405":["CS","BlendingPosition"]},"0072":{"0002":["SH","HangingProtocolName"],"0004":["LO","HangingProtocolDescription"],"0006":["CS","HangingProtocolLevel"],"0008":["LO","HangingProtocolCreator"],"000A":["DT","HangingProtocolCreationDateTime"],"000C":["SQ","HangingProtocolDefinitionSequence"],"000E":["SQ","HangingProtocolUserIdentificationCodeSequence"],"0010":["LO","HangingProtocolUserGroupName"],"0012":["SQ","SourceHangingProtocolSequence"],"0014":["US","NumberOfPriorsReferenced"],"0020":["SQ","ImageSetsSequence"],"0022":["SQ","ImageSetSelectorSequence"],"0024":["CS","ImageSetSelectorUsageFlag"],"0026":["AT","SelectorAttribute"],"0028":["US","SelectorValueNumber"],"0030":["SQ","TimeBasedImageSetsSequence"],"0032":["US","ImageSetNumber"],"0034":["CS","ImageSetSelectorCategory"],"0038":["US","RelativeTime"],"003A":["CS","RelativeTimeUnits"],"003C":["SS","AbstractPriorValue"],"003E":["SQ","AbstractPriorCodeSequence"],"0040":["LO","ImageSetLabel"],"0050":["CS","SelectorAttributeVR"],"0052":["AT","SelectorSequencePointer"],"0054":["LO","SelectorSequencePointerPrivateCreator"],"0056":["LO","SelectorAttributePrivateCreator"],"0060":["AT","SelectorATValue"],"0062":["CS","SelectorCSValue"],"0064":["IS","SelectorISValue"],"0066":["LO","SelectorLOValue"],"0068":["LT","SelectorLTValue"],"006A":["PN","SelectorPNValue"],"006C":["SH","SelectorSHValue"],"006E":["ST","SelectorSTValue"],"0070":["UT","SelectorUTValue"],"0072":["DS","SelectorDSValue"],"0074":["FD","SelectorFDValue"],"0076":["FL","SelectorFLValue"],"0078":["UL","SelectorULValue"],"007A":["US","SelectorUSValue"],"007C":["SL","SelectorSLValue"],"007E":["SS","SelectorSSValue"],"0080":["SQ","SelectorCodeSequenceValue"],"0100":["US","NumberOfScreens"],"0102":["SQ","NominalScreenDefinitionSequence"],"0104":["US","NumberOfVerticalPixels"],"0106":["US","NumberOfHorizontalPixels"],"0108":["FD","DisplayEnvironmentSpatialPosition"],"010A":["US","ScreenMinimumGrayscaleBitDepth"],"010C":["US","ScreenMinimumColorBitDepth"],"010E":["US","ApplicationMaximumRepaintTime"],"0200":["SQ","DisplaySetsSequence"],"0202":["US","DisplaySetNumber"],"0203":["LO","DisplaySetLabel"],"0204":["US","DisplaySetPresentationGroup"],"0206":["LO","DisplaySetPresentationGroupDescription"],"0208":["CS","PartialDataDisplayHandling"],"0210":["SQ","SynchronizedScrollingSequence"],"0212":["US","DisplaySetScrollingGroup"],"0214":["SQ","NavigationIndicatorSequence"],"0216":["US","NavigationDisplaySet"],"0218":["US","ReferenceDisplaySets"],"0300":["SQ","ImageBoxesSequence"],"0302":["US","ImageBoxNumber"],"0304":["CS","ImageBoxLayoutType"],"0306":["US","ImageBoxTileHorizontalDimension"],"0308":["US","ImageBoxTileVerticalDimension"],"0310":["CS","ImageBoxScrollDirection"],"0312":["CS","ImageBoxSmallScrollType"],"0314":["US","ImageBoxSmallScrollAmount"],"0316":["CS","ImageBoxLargeScrollType"],"0318":["US","ImageBoxLargeScrollAmount"],"0320":["US","ImageBoxOverlapPriority"],"0330":["FD","CineRelativeToRealTime"],"0400":["SQ","FilterOperationsSequence"],"0402":["CS","FilterByCategory"],"0404":["CS","FilterByAttributePresence"],"0406":["CS","FilterByOperator"],"0420":["US","StructuredDisplayBackgroundCIELabValue"],"0421":["US","EmptyImageBoxCIELabValue"],"0422":["SQ","StructuredDisplayImageBoxSequence"],"0424":["SQ","StructuredDisplayTextBoxSequence"],"0427":["SQ","ReferencedFirstFrameSequence"],"0430":["SQ","ImageBoxSynchronizationSequence"],"0432":["US","SynchronizedImageBoxList"],"0434":["CS","TypeOfSynchronization"],"0500":["CS","BlendingOperationType"],"0510":["CS","ReformattingOperationType"],"0512":["FD","ReformattingThickness"],"0514":["FD","ReformattingInterval"],"0516":["CS","ReformattingOperationInitialViewDirection"],"0520":["CS","ThreeDRenderingType"],"0600":["SQ","SortingOperationsSequence"],"0602":["CS","SortByCategory"],"0604":["CS","SortingDirection"],"0700":["CS","DisplaySetPatientOrientation"],"0702":["CS","VOIType"],"0704":["CS","PseudoColorType"],"0705":["SQ","PseudoColorPaletteInstanceReferenceSequence"],"0706":["CS","ShowGrayscaleInverted"],"0710":["CS","ShowImageTrueSizeFlag"],"0712":["CS","ShowGraphicAnnotationFlag"],"0714":["CS","ShowPatientDemographicsFlag"],"0716":["CS","ShowAcquisitionTechniquesFlag"],"0717":["CS","DisplaySetHorizontalJustification"],"0718":["CS","DisplaySetVerticalJustification"]},"0074":{"0120":["FD","ContinuationStartMeterset"],"0121":["FD","ContinuationEndMeterset"],1e3:["CS","ProcedureStepState"],1002:["SQ","ProcedureStepProgressInformationSequence"],1004:["DS","ProcedureStepProgress"],1006:["ST","ProcedureStepProgressDescription"],1008:["SQ","ProcedureStepCommunicationsURISequence"],"100A":["ST","ContactURI"],"100C":["LO","ContactDisplayName"],"100E":["SQ","ProcedureStepDiscontinuationReasonCodeSequence"],1020:["SQ","BeamTaskSequence"],1022:["CS","BeamTaskType"],1024:["IS","BeamOrderIndexTrial"],1026:["FD","TableTopVerticalAdjustedPosition"],1027:["FD","TableTopLongitudinalAdjustedPosition"],1028:["FD","TableTopLateralAdjustedPosition"],"102A":["FD","PatientSupportAdjustedAngle"],"102B":["FD","TableTopEccentricAdjustedAngle"],"102C":["FD","TableTopPitchAdjustedAngle"],"102D":["FD","TableTopRollAdjustedAngle"],1030:["SQ","DeliveryVerificationImageSequence"],1032:["CS","VerificationImageTiming"],1034:["CS","DoubleExposureFlag"],1036:["CS","DoubleExposureOrdering"],1038:["DS","DoubleExposureMetersetTrial"],"103A":["DS","DoubleExposureFieldDeltaTrial"],1040:["SQ","RelatedReferenceRTImageSequence"],1042:["SQ","GeneralMachineVerificationSequence"],1044:["SQ","ConventionalMachineVerificationSequence"],1046:["SQ","IonMachineVerificationSequence"],1048:["SQ","FailedAttributesSequence"],"104A":["SQ","OverriddenAttributesSequence"],"104C":["SQ","ConventionalControlPointVerificationSequence"],"104E":["SQ","IonControlPointVerificationSequence"],1050:["SQ","AttributeOccurrenceSequence"],1052:["AT","AttributeOccurrencePointer"],1054:["UL","AttributeItemSelector"],1056:["LO","AttributeOccurrencePrivateCreator"],1057:["IS","SelectorSequencePointerItems"],1200:["CS","ScheduledProcedureStepPriority"],1202:["LO","WorklistLabel"],1204:["LO","ProcedureStepLabel"],1210:["SQ","ScheduledProcessingParametersSequence"],1212:["SQ","PerformedProcessingParametersSequence"],1216:["SQ","UnifiedProcedureStepPerformedProcedureSequence"],1220:["SQ","RelatedProcedureStepSequence"],1222:["LO","ProcedureStepRelationshipType"],1224:["SQ","ReplacedProcedureStepSequence"],1230:["LO","DeletionLock"],1234:["AE","ReceivingAE"],1236:["AE","RequestingAE"],1238:["LT","ReasonForCancellation"],1242:["CS","SCPStatus"],1244:["CS","SubscriptionListStatus"],1246:["CS","UnifiedProcedureStepListStatus"],1324:["UL","BeamOrderIndex"],1338:["FD","DoubleExposureMeterset"],"133A":["FD","DoubleExposureFieldDelta"]},"0076":{"0001":["LO","ImplantAssemblyTemplateName"],"0003":["LO","ImplantAssemblyTemplateIssuer"],"0006":["LO","ImplantAssemblyTemplateVersion"],"0008":["SQ","ReplacedImplantAssemblyTemplateSequence"],"000A":["CS","ImplantAssemblyTemplateType"],"000C":["SQ","OriginalImplantAssemblyTemplateSequence"],"000E":["SQ","DerivationImplantAssemblyTemplateSequence"],"0010":["SQ","ImplantAssemblyTemplateTargetAnatomySequence"],"0020":["SQ","ProcedureTypeCodeSequence"],"0030":["LO","SurgicalTechnique"],"0032":["SQ","ComponentTypesSequence"],"0034":["CS","ComponentTypeCodeSequence"],"0036":["CS","ExclusiveComponentType"],"0038":["CS","MandatoryComponentType"],"0040":["SQ","ComponentSequence"],"0055":["US","ComponentID"],"0060":["SQ","ComponentAssemblySequence"],"0070":["US","Component1ReferencedID"],"0080":["US","Component1ReferencedMatingFeatureSetID"],"0090":["US","Component1ReferencedMatingFeatureID"],"00A0":["US","Component2ReferencedID"],"00B0":["US","Component2ReferencedMatingFeatureSetID"],"00C0":["US","Component2ReferencedMatingFeatureID"]},"0078":{"0001":["LO","ImplantTemplateGroupName"],"0010":["ST","ImplantTemplateGroupDescription"],"0020":["LO","ImplantTemplateGroupIssuer"],"0024":["LO","ImplantTemplateGroupVersion"],"0026":["SQ","ReplacedImplantTemplateGroupSequence"],"0028":["SQ","ImplantTemplateGroupTargetAnatomySequence"],"002A":["SQ","ImplantTemplateGroupMembersSequence"],"002E":["US","ImplantTemplateGroupMemberID"],"0050":["FD","ThreeDImplantTemplateGroupMemberMatchingPoint"],"0060":["FD","ThreeDImplantTemplateGroupMemberMatchingAxes"],"0070":["SQ","ImplantTemplateGroupMemberMatching2DCoordinatesSequence"],"0090":["FD","TwoDImplantTemplateGroupMemberMatchingPoint"],"00A0":["FD","TwoDImplantTemplateGroupMemberMatchingAxes"],"00B0":["SQ","ImplantTemplateGroupVariationDimensionSequence"],"00B2":["LO","ImplantTemplateGroupVariationDimensionName"],"00B4":["SQ","ImplantTemplateGroupVariationDimensionRankSequence"],"00B6":["US","ReferencedImplantTemplateGroupMemberID"],"00B8":["US","ImplantTemplateGroupVariationDimensionRank"]},"0088":{"0130":["SH","StorageMediaFileSetID"],"0140":["UI","StorageMediaFileSetUID"],"0200":["SQ","IconImageSequence"],"0904":["LO","TopicTitle"],"0906":["ST","TopicSubject"],"0910":["LO","TopicAuthor"],"0912":["LO","TopicKeywords"]},"0100":{"0410":["CS","SOPInstanceStatus"],"0420":["DT","SOPAuthorizationDateTime"],"0424":["LT","SOPAuthorizationComment"],"0426":["LO","AuthorizationEquipmentCertificationNumber"]},"0400":{"0005":["US","MACIDNumber"],"0010":["UI","MACCalculationTransferSyntaxUID"],"0015":["CS","MACAlgorithm"],"0020":["AT","DataElementsSigned"],"0100":["UI","DigitalSignatureUID"],"0105":["DT","DigitalSignatureDateTime"],"0110":["CS","CertificateType"],"0115":["OB","CertificateOfSigner"],"0120":["OB","Signature"],"0305":["CS","CertifiedTimestampType"],"0310":["OB","CertifiedTimestamp"],"0401":["SQ","DigitalSignaturePurposeCodeSequence"],"0402":["SQ","ReferencedDigitalSignatureSequence"],"0403":["SQ","ReferencedSOPInstanceMACSequence"],"0404":["OB","MAC"],"0500":["SQ","EncryptedAttributesSequence"],"0510":["UI","EncryptedContentTransferSyntaxUID"],"0520":["OB","EncryptedContent"],"0550":["SQ","ModifiedAttributesSequence"],"0561":["SQ","OriginalAttributesSequence"],"0562":["DT","AttributeModificationDateTime"],"0563":["LO","ModifyingSystem"],"0564":["LO","SourceOfPreviousValues"],"0565":["CS","ReasonForTheAttributeModification"]},2e3:{"0010":["IS","NumberOfCopies"],"001E":["SQ","PrinterConfigurationSequence"],"0020":["CS","PrintPriority"],"0030":["CS","MediumType"],"0040":["CS","FilmDestination"],"0050":["LO","FilmSessionLabel"],"0060":["IS","MemoryAllocation"],"0061":["IS","MaximumMemoryAllocation"],"0062":["CS","ColorImagePrintingFlag"],"0063":["CS","CollationFlag"],"0065":["CS","AnnotationFlag"],"0067":["CS","ImageOverlayFlag"],"0069":["CS","PresentationLUTFlag"],"006A":["CS","ImageBoxPresentationLUTFlag"],"00A0":["US","MemoryBitDepth"],"00A1":["US","PrintingBitDepth"],"00A2":["SQ","MediaInstalledSequence"],"00A4":["SQ","OtherMediaAvailableSequence"],"00A8":["SQ","SupportedImageDisplayFormatsSequence"],"0500":["SQ","ReferencedFilmBoxSequence"],"0510":["SQ","ReferencedStoredPrintSequence"]},2010:{"0010":["ST","ImageDisplayFormat"],"0030":["CS","AnnotationDisplayFormatID"],"0040":["CS","FilmOrientation"],"0050":["CS","FilmSizeID"],"0052":["CS","PrinterResolutionID"],"0054":["CS","DefaultPrinterResolutionID"],"0060":["CS","MagnificationType"],"0080":["CS","SmoothingType"],"00A6":["CS","DefaultMagnificationType"],"00A7":["CS","OtherMagnificationTypesAvailable"],"00A8":["CS","DefaultSmoothingType"],"00A9":["CS","OtherSmoothingTypesAvailable"],"0100":["CS","BorderDensity"],"0110":["CS","EmptyImageDensity"],"0120":["US","MinDensity"],"0130":["US","MaxDensity"],"0140":["CS","Trim"],"0150":["ST","ConfigurationInformation"],"0152":["LT","ConfigurationInformationDescription"],"0154":["IS","MaximumCollatedFilms"],"015E":["US","Illumination"],"0160":["US","ReflectedAmbientLight"],"0376":["DS","PrinterPixelSpacing"],"0500":["SQ","ReferencedFilmSessionSequence"],"0510":["SQ","ReferencedImageBoxSequence"],"0520":["SQ","ReferencedBasicAnnotationBoxSequence"]},2020:{"0010":["US","ImageBoxPosition"],"0020":["CS","Polarity"],"0030":["DS","RequestedImageSize"],"0040":["CS","RequestedDecimateCropBehavior"],"0050":["CS","RequestedResolutionID"],"00A0":["CS","RequestedImageSizeFlag"],"00A2":["CS","DecimateCropResult"],"0110":["SQ","BasicGrayscaleImageSequence"],"0111":["SQ","BasicColorImageSequence"],"0130":["SQ","ReferencedImageOverlayBoxSequence"],"0140":["SQ","ReferencedVOILUTBoxSequence"]},2030:{"0010":["US","AnnotationPosition"],"0020":["LO","TextString"]},2040:{"0010":["SQ","ReferencedOverlayPlaneSequence"],"0011":["US","ReferencedOverlayPlaneGroups"],"0020":["SQ","OverlayPixelDataSequence"],"0060":["CS","OverlayMagnificationType"],"0070":["CS","OverlaySmoothingType"],"0072":["CS","OverlayOrImageMagnification"],"0074":["US","MagnifyToNumberOfColumns"],"0080":["CS","OverlayForegroundDensity"],"0082":["CS","OverlayBackgroundDensity"],"0090":["CS","OverlayMode"],"0100":["CS","ThresholdDensity"],"0500":["SQ","ReferencedImageBoxSequenceRetired"]},2050:{"0010":["SQ","PresentationLUTSequence"],"0020":["CS","PresentationLUTShape"],"0500":["SQ","ReferencedPresentationLUTSequence"]},2100:{"0010":["SH","PrintJobID"],"0020":["CS","ExecutionStatus"],"0030":["CS","ExecutionStatusInfo"],"0040":["DA","CreationDate"],"0050":["TM","CreationTime"],"0070":["AE","Originator"],"0140":["AE","DestinationAE"],"0160":["SH","OwnerID"],"0170":["IS","NumberOfFilms"],"0500":["SQ","ReferencedPrintJobSequencePullStoredPrint"]},2110:{"0010":["CS","PrinterStatus"],"0020":["CS","PrinterStatusInfo"],"0030":["LO","PrinterName"],"0099":["SH","PrintQueueID"]},2120:{"0010":["CS","QueueStatus"],"0050":["SQ","PrintJobDescriptionSequence"],"0070":["SQ","ReferencedPrintJobSequence"]},2130:{"0010":["SQ","PrintManagementCapabilitiesSequence"],"0015":["SQ","PrinterCharacteristicsSequence"],"0030":["SQ","FilmBoxContentSequence"],"0040":["SQ","ImageBoxContentSequence"],"0050":["SQ","AnnotationContentSequence"],"0060":["SQ","ImageOverlayBoxContentSequence"],"0080":["SQ","PresentationLUTContentSequence"],"00A0":["SQ","ProposedStudySequence"],"00C0":["SQ","OriginalImageSequence"]},2200:{"0001":["CS","LabelUsingInformationExtractedFromInstances"],"0002":["UT","LabelText"],"0003":["CS","LabelStyleSelection"],"0004":["LT","MediaDisposition"],"0005":["LT","BarcodeValue"],"0006":["CS","BarcodeSymbology"],"0007":["CS","AllowMediaSplitting"],"0008":["CS","IncludeNonDICOMObjects"],"0009":["CS","IncludeDisplayApplication"],"000A":["CS","PreserveCompositeInstancesAfterMediaCreation"],"000B":["US","TotalNumberOfPiecesOfMediaCreated"],"000C":["LO","RequestedMediaApplicationProfile"],"000D":["SQ","ReferencedStorageMediaSequence"],"000E":["AT","FailureAttributes"],"000F":["CS","AllowLossyCompression"],"0020":["CS","RequestPriority"]},3002:{"0002":["SH","RTImageLabel"],"0003":["LO","RTImageName"],"0004":["ST","RTImageDescription"],"000A":["CS","ReportedValuesOrigin"],"000C":["CS","RTImagePlane"],"000D":["DS","XRayImageReceptorTranslation"],"000E":["DS","XRayImageReceptorAngle"],"0010":["DS","RTImageOrientation"],"0011":["DS","ImagePlanePixelSpacing"],"0012":["DS","RTImagePosition"],"0020":["SH","RadiationMachineName"],"0022":["DS","RadiationMachineSAD"],"0024":["DS","RadiationMachineSSD"],"0026":["DS","RTImageSID"],"0028":["DS","SourceToReferenceObjectDistance"],"0029":["IS","FractionNumber"],"0030":["SQ","ExposureSequence"],"0032":["DS","MetersetExposure"],"0034":["DS","DiaphragmPosition"],"0040":["SQ","FluenceMapSequence"],"0041":["CS","FluenceDataSource"],"0042":["DS","FluenceDataScale"],"0050":["SQ","PrimaryFluenceModeSequence"],"0051":["CS","FluenceMode"],"0052":["SH","FluenceModeID"]},3004:{"0001":["CS","DVHType"],"0002":["CS","DoseUnits"],"0004":["CS","DoseType"],"0006":["LO","DoseComment"],"0008":["DS","NormalizationPoint"],"000A":["CS","DoseSummationType"],"000C":["DS","GridFrameOffsetVector"],"000E":["DS","DoseGridScaling"],"0010":["SQ","RTDoseROISequence"],"0012":["DS","DoseValue"],"0014":["CS","TissueHeterogeneityCorrection"],"0040":["DS","DVHNormalizationPoint"],"0042":["DS","DVHNormalizationDoseValue"],"0050":["SQ","DVHSequence"],"0052":["DS","DVHDoseScaling"],"0054":["CS","DVHVolumeUnits"],"0056":["IS","DVHNumberOfBins"],"0058":["DS","DVHData"],"0060":["SQ","DVHReferencedROISequence"],"0062":["CS","DVHROIContributionType"],"0070":["DS","DVHMinimumDose"],"0072":["DS","DVHMaximumDose"],"0074":["DS","DVHMeanDose"]},3006:{"0002":["SH","StructureSetLabel"],"0004":["LO","StructureSetName"],"0006":["ST","StructureSetDescription"],"0008":["DA","StructureSetDate"],"0009":["TM","StructureSetTime"],"0010":["SQ","ReferencedFrameOfReferenceSequence"],"0012":["SQ","RTReferencedStudySequence"],"0014":["SQ","RTReferencedSeriesSequence"],"0016":["SQ","ContourImageSequence"],"0020":["SQ","StructureSetROISequence"],"0022":["IS","ROINumber"],"0024":["UI","ReferencedFrameOfReferenceUID"],"0026":["LO","ROIName"],"0028":["ST","ROIDescription"],"002A":["IS","ROIDisplayColor"],"002C":["DS","ROIVolume"],"0030":["SQ","RTRelatedROISequence"],"0033":["CS","RTROIRelationship"],"0036":["CS","ROIGenerationAlgorithm"],"0038":["LO","ROIGenerationDescription"],"0039":["SQ","ROIContourSequence"],"0040":["SQ","ContourSequence"],"0042":["CS","ContourGeometricType"],"0044":["DS","ContourSlabThickness"],"0045":["DS","ContourOffsetVector"],"0046":["IS","NumberOfContourPoints"],"0048":["IS","ContourNumber"],"0049":["IS","AttachedContours"],"0050":["DS","ContourData"],"0080":["SQ","RTROIObservationsSequence"],"0082":["IS","ObservationNumber"],"0084":["IS","ReferencedROINumber"],"0085":["SH","ROIObservationLabel"],"0086":["SQ","RTROIIdentificationCodeSequence"],"0088":["ST","ROIObservationDescription"],"00A0":["SQ","RelatedRTROIObservationsSequence"],"00A4":["CS","RTROIInterpretedType"],"00A6":["PN","ROIInterpreter"],"00B0":["SQ","ROIPhysicalPropertiesSequence"],"00B2":["CS","ROIPhysicalProperty"],"00B4":["DS","ROIPhysicalPropertyValue"],"00B6":["SQ","ROIElementalCompositionSequence"],"00B7":["US","ROIElementalCompositionAtomicNumber"],"00B8":["FL","ROIElementalCompositionAtomicMassFraction"],"00C0":["SQ","FrameOfReferenceRelationshipSequence"],"00C2":["UI","RelatedFrameOfReferenceUID"],"00C4":["CS","FrameOfReferenceTransformationType"],"00C6":["DS","FrameOfReferenceTransformationMatrix"],"00C8":["LO","FrameOfReferenceTransformationComment"]},3008:{"0010":["SQ","MeasuredDoseReferenceSequence"],"0012":["ST","MeasuredDoseDescription"],"0014":["CS","MeasuredDoseType"],"0016":["DS","MeasuredDoseValue"],"0020":["SQ","TreatmentSessionBeamSequence"],"0021":["SQ","TreatmentSessionIonBeamSequence"],"0022":["IS","CurrentFractionNumber"],"0024":["DA","TreatmentControlPointDate"],"0025":["TM","TreatmentControlPointTime"],"002A":["CS","TreatmentTerminationStatus"],"002B":["SH","TreatmentTerminationCode"],"002C":["CS","TreatmentVerificationStatus"],"0030":["SQ","ReferencedTreatmentRecordSequence"],"0032":["DS","SpecifiedPrimaryMeterset"],"0033":["DS","SpecifiedSecondaryMeterset"],"0036":["DS","DeliveredPrimaryMeterset"],"0037":["DS","DeliveredSecondaryMeterset"],"003A":["DS","SpecifiedTreatmentTime"],"003B":["DS","DeliveredTreatmentTime"],"0040":["SQ","ControlPointDeliverySequence"],"0041":["SQ","IonControlPointDeliverySequence"],"0042":["DS","SpecifiedMeterset"],"0044":["DS","DeliveredMeterset"],"0045":["FL","MetersetRateSet"],"0046":["FL","MetersetRateDelivered"],"0047":["FL","ScanSpotMetersetsDelivered"],"0048":["DS","DoseRateDelivered"],"0050":["SQ","TreatmentSummaryCalculatedDoseReferenceSequence"],"0052":["DS","CumulativeDoseToDoseReference"],"0054":["DA","FirstTreatmentDate"],"0056":["DA","MostRecentTreatmentDate"],"005A":["IS","NumberOfFractionsDelivered"],"0060":["SQ","OverrideSequence"],"0061":["AT","ParameterSequencePointer"],"0062":["AT","OverrideParameterPointer"],"0063":["IS","ParameterItemIndex"],"0064":["IS","MeasuredDoseReferenceNumber"],"0065":["AT","ParameterPointer"],"0066":["ST","OverrideReason"],"0068":["SQ","CorrectedParameterSequence"],"006A":["FL","CorrectionValue"],"0070":["SQ","CalculatedDoseReferenceSequence"],"0072":["IS","CalculatedDoseReferenceNumber"],"0074":["ST","CalculatedDoseReferenceDescription"],"0076":["DS","CalculatedDoseReferenceDoseValue"],"0078":["DS","StartMeterset"],"007A":["DS","EndMeterset"],"0080":["SQ","ReferencedMeasuredDoseReferenceSequence"],"0082":["IS","ReferencedMeasuredDoseReferenceNumber"],"0090":["SQ","ReferencedCalculatedDoseReferenceSequence"],"0092":["IS","ReferencedCalculatedDoseReferenceNumber"],"00A0":["SQ","BeamLimitingDeviceLeafPairsSequence"],"00B0":["SQ","RecordedWedgeSequence"],"00C0":["SQ","RecordedCompensatorSequence"],"00D0":["SQ","RecordedBlockSequence"],"00E0":["SQ","TreatmentSummaryMeasuredDoseReferenceSequence"],"00F0":["SQ","RecordedSnoutSequence"],"00F2":["SQ","RecordedRangeShifterSequence"],"00F4":["SQ","RecordedLateralSpreadingDeviceSequence"],"00F6":["SQ","RecordedRangeModulatorSequence"],"0100":["SQ","RecordedSourceSequence"],"0105":["LO","SourceSerialNumber"],"0110":["SQ","TreatmentSessionApplicationSetupSequence"],"0116":["CS","ApplicationSetupCheck"],"0120":["SQ","RecordedBrachyAccessoryDeviceSequence"],"0122":["IS","ReferencedBrachyAccessoryDeviceNumber"],"0130":["SQ","RecordedChannelSequence"],"0132":["DS","SpecifiedChannelTotalTime"],"0134":["DS","DeliveredChannelTotalTime"],"0136":["IS","SpecifiedNumberOfPulses"],"0138":["IS","DeliveredNumberOfPulses"],"013A":["DS","SpecifiedPulseRepetitionInterval"],"013C":["DS","DeliveredPulseRepetitionInterval"],"0140":["SQ","RecordedSourceApplicatorSequence"],"0142":["IS","ReferencedSourceApplicatorNumber"],"0150":["SQ","RecordedChannelShieldSequence"],"0152":["IS","ReferencedChannelShieldNumber"],"0160":["SQ","BrachyControlPointDeliveredSequence"],"0162":["DA","SafePositionExitDate"],"0164":["TM","SafePositionExitTime"],"0166":["DA","SafePositionReturnDate"],"0168":["TM","SafePositionReturnTime"],"0200":["CS","CurrentTreatmentStatus"],"0202":["ST","TreatmentStatusComment"],"0220":["SQ","FractionGroupSummarySequence"],"0223":["IS","ReferencedFractionNumber"],"0224":["CS","FractionGroupType"],"0230":["CS","BeamStopperPosition"],"0240":["SQ","FractionStatusSummarySequence"],"0250":["DA","TreatmentDate"],"0251":["TM","TreatmentTime"]},"300A":{"0002":["SH","RTPlanLabel"],"0003":["LO","RTPlanName"],"0004":["ST","RTPlanDescription"],"0006":["DA","RTPlanDate"],"0007":["TM","RTPlanTime"],"0009":["LO","TreatmentProtocols"],"000A":["CS","PlanIntent"],"000B":["LO","TreatmentSites"],"000C":["CS","RTPlanGeometry"],"000E":["ST","PrescriptionDescription"],"0010":["SQ","DoseReferenceSequence"],"0012":["IS","DoseReferenceNumber"],"0013":["UI","DoseReferenceUID"],"0014":["CS","DoseReferenceStructureType"],"0015":["CS","NominalBeamEnergyUnit"],"0016":["LO","DoseReferenceDescription"],"0018":["DS","DoseReferencePointCoordinates"],"001A":["DS","NominalPriorDose"],"0020":["CS","DoseReferenceType"],"0021":["DS","ConstraintWeight"],"0022":["DS","DeliveryWarningDose"],"0023":["DS","DeliveryMaximumDose"],"0025":["DS","TargetMinimumDose"],"0026":["DS","TargetPrescriptionDose"],"0027":["DS","TargetMaximumDose"],"0028":["DS","TargetUnderdoseVolumeFraction"],"002A":["DS","OrganAtRiskFullVolumeDose"],"002B":["DS","OrganAtRiskLimitDose"],"002C":["DS","OrganAtRiskMaximumDose"],"002D":["DS","OrganAtRiskOverdoseVolumeFraction"],"0040":["SQ","ToleranceTableSequence"],"0042":["IS","ToleranceTableNumber"],"0043":["SH","ToleranceTableLabel"],"0044":["DS","GantryAngleTolerance"],"0046":["DS","BeamLimitingDeviceAngleTolerance"],"0048":["SQ","BeamLimitingDeviceToleranceSequence"],"004A":["DS","BeamLimitingDevicePositionTolerance"],"004B":["FL","SnoutPositionTolerance"],"004C":["DS","PatientSupportAngleTolerance"],"004E":["DS","TableTopEccentricAngleTolerance"],"004F":["FL","TableTopPitchAngleTolerance"],"0050":["FL","TableTopRollAngleTolerance"],"0051":["DS","TableTopVerticalPositionTolerance"],"0052":["DS","TableTopLongitudinalPositionTolerance"],"0053":["DS","TableTopLateralPositionTolerance"],"0055":["CS","RTPlanRelationship"],"0070":["SQ","FractionGroupSequence"],"0071":["IS","FractionGroupNumber"],"0072":["LO","FractionGroupDescription"],"0078":["IS","NumberOfFractionsPlanned"],"0079":["IS","NumberOfFractionPatternDigitsPerDay"],"007A":["IS","RepeatFractionCycleLength"],"007B":["LT","FractionPattern"],"0080":["IS","NumberOfBeams"],"0082":["DS","BeamDoseSpecificationPoint"],"0084":["DS","BeamDose"],"0086":["DS","BeamMeterset"],"0088":["FL","BeamDosePointDepth"],"0089":["FL","BeamDosePointEquivalentDepth"],"008A":["FL","BeamDosePointSSD"],"00A0":["IS","NumberOfBrachyApplicationSetups"],"00A2":["DS","BrachyApplicationSetupDoseSpecificationPoint"],"00A4":["DS","BrachyApplicationSetupDose"],"00B0":["SQ","BeamSequence"],"00B2":["SH","TreatmentMachineName"],"00B3":["CS","PrimaryDosimeterUnit"],"00B4":["DS","SourceAxisDistance"],"00B6":["SQ","BeamLimitingDeviceSequence"],"00B8":["CS","RTBeamLimitingDeviceType"],"00BA":["DS","SourceToBeamLimitingDeviceDistance"],"00BB":["FL","IsocenterToBeamLimitingDeviceDistance"],"00BC":["IS","NumberOfLeafJawPairs"],"00BE":["DS","LeafPositionBoundaries"],"00C0":["IS","BeamNumber"],"00C2":["LO","BeamName"],"00C3":["ST","BeamDescription"],"00C4":["CS","BeamType"],"00C6":["CS","RadiationType"],"00C7":["CS","HighDoseTechniqueType"],"00C8":["IS","ReferenceImageNumber"],"00CA":["SQ","PlannedVerificationImageSequence"],"00CC":["LO","ImagingDeviceSpecificAcquisitionParameters"],"00CE":["CS","TreatmentDeliveryType"],"00D0":["IS","NumberOfWedges"],"00D1":["SQ","WedgeSequence"],"00D2":["IS","WedgeNumber"],"00D3":["CS","WedgeType"],"00D4":["SH","WedgeID"],"00D5":["IS","WedgeAngle"],"00D6":["DS","WedgeFactor"],"00D7":["FL","TotalWedgeTrayWaterEquivalentThickness"],"00D8":["DS","WedgeOrientation"],"00D9":["FL","IsocenterToWedgeTrayDistance"],"00DA":["DS","SourceToWedgeTrayDistance"],"00DB":["FL","WedgeThinEdgePosition"],"00DC":["SH","BolusID"],"00DD":["ST","BolusDescription"],"00E0":["IS","NumberOfCompensators"],"00E1":["SH","MaterialID"],"00E2":["DS","TotalCompensatorTrayFactor"],"00E3":["SQ","CompensatorSequence"],"00E4":["IS","CompensatorNumber"],"00E5":["SH","CompensatorID"],"00E6":["DS","SourceToCompensatorTrayDistance"],"00E7":["IS","CompensatorRows"],"00E8":["IS","CompensatorColumns"],"00E9":["DS","CompensatorPixelSpacing"],"00EA":["DS","CompensatorPosition"],"00EB":["DS","CompensatorTransmissionData"],"00EC":["DS","CompensatorThicknessData"],"00ED":["IS","NumberOfBoli"],"00EE":["CS","CompensatorType"],"00F0":["IS","NumberOfBlocks"],"00F2":["DS","TotalBlockTrayFactor"],"00F3":["FL","TotalBlockTrayWaterEquivalentThickness"],"00F4":["SQ","BlockSequence"],"00F5":["SH","BlockTrayID"],"00F6":["DS","SourceToBlockTrayDistance"],"00F7":["FL","IsocenterToBlockTrayDistance"],"00F8":["CS","BlockType"],"00F9":["LO","AccessoryCode"],"00FA":["CS","BlockDivergence"],"00FB":["CS","BlockMountingPosition"],"00FC":["IS","BlockNumber"],"00FE":["LO","BlockName"],"0100":["DS","BlockThickness"],"0102":["DS","BlockTransmission"],"0104":["IS","BlockNumberOfPoints"],"0106":["DS","BlockData"],"0107":["SQ","ApplicatorSequence"],"0108":["SH","ApplicatorID"],"0109":["CS","ApplicatorType"],"010A":["LO","ApplicatorDescription"],"010C":["DS","CumulativeDoseReferenceCoefficient"],"010E":["DS","FinalCumulativeMetersetWeight"],"0110":["IS","NumberOfControlPoints"],"0111":["SQ","ControlPointSequence"],"0112":["IS","ControlPointIndex"],"0114":["DS","NominalBeamEnergy"],"0115":["DS","DoseRateSet"],"0116":["SQ","WedgePositionSequence"],"0118":["CS","WedgePosition"],"011A":["SQ","BeamLimitingDevicePositionSequence"],"011C":["DS","LeafJawPositions"],"011E":["DS","GantryAngle"],"011F":["CS","GantryRotationDirection"],"0120":["DS","BeamLimitingDeviceAngle"],"0121":["CS","BeamLimitingDeviceRotationDirection"],"0122":["DS","PatientSupportAngle"],"0123":["CS","PatientSupportRotationDirection"],"0124":["DS","TableTopEccentricAxisDistance"],"0125":["DS","TableTopEccentricAngle"],"0126":["CS","TableTopEccentricRotationDirection"],"0128":["DS","TableTopVerticalPosition"],"0129":["DS","TableTopLongitudinalPosition"],"012A":["DS","TableTopLateralPosition"],"012C":["DS","IsocenterPosition"],"012E":["DS","SurfaceEntryPoint"],"0130":["DS","SourceToSurfaceDistance"],"0134":["DS","CumulativeMetersetWeight"],"0140":["FL","TableTopPitchAngle"],"0142":["CS","TableTopPitchRotationDirection"],"0144":["FL","TableTopRollAngle"],"0146":["CS","TableTopRollRotationDirection"],"0148":["FL","HeadFixationAngle"],"014A":["FL","GantryPitchAngle"],"014C":["CS","GantryPitchRotationDirection"],"014E":["FL","GantryPitchAngleTolerance"],"0180":["SQ","PatientSetupSequence"],"0182":["IS","PatientSetupNumber"],"0183":["LO","PatientSetupLabel"],"0184":["LO","PatientAdditionalPosition"],"0190":["SQ","FixationDeviceSequence"],"0192":["CS","FixationDeviceType"],"0194":["SH","FixationDeviceLabel"],"0196":["ST","FixationDeviceDescription"],"0198":["SH","FixationDevicePosition"],"0199":["FL","FixationDevicePitchAngle"],"019A":["FL","FixationDeviceRollAngle"],"01A0":["SQ","ShieldingDeviceSequence"],"01A2":["CS","ShieldingDeviceType"],"01A4":["SH","ShieldingDeviceLabel"],"01A6":["ST","ShieldingDeviceDescription"],"01A8":["SH","ShieldingDevicePosition"],"01B0":["CS","SetupTechnique"],"01B2":["ST","SetupTechniqueDescription"],"01B4":["SQ","SetupDeviceSequence"],"01B6":["CS","SetupDeviceType"],"01B8":["SH","SetupDeviceLabel"],"01BA":["ST","SetupDeviceDescription"],"01BC":["DS","SetupDeviceParameter"],"01D0":["ST","SetupReferenceDescription"],"01D2":["DS","TableTopVerticalSetupDisplacement"],"01D4":["DS","TableTopLongitudinalSetupDisplacement"],"01D6":["DS","TableTopLateralSetupDisplacement"],"0200":["CS","BrachyTreatmentTechnique"],"0202":["CS","BrachyTreatmentType"],"0206":["SQ","TreatmentMachineSequence"],"0210":["SQ","SourceSequence"],"0212":["IS","SourceNumber"],"0214":["CS","SourceType"],"0216":["LO","SourceManufacturer"],"0218":["DS","ActiveSourceDiameter"],"021A":["DS","ActiveSourceLength"],"0222":["DS","SourceEncapsulationNominalThickness"],"0224":["DS","SourceEncapsulationNominalTransmission"],"0226":["LO","SourceIsotopeName"],"0228":["DS","SourceIsotopeHalfLife"],"0229":["CS","SourceStrengthUnits"],"022A":["DS","ReferenceAirKermaRate"],"022B":["DS","SourceStrength"],"022C":["DA","SourceStrengthReferenceDate"],"022E":["TM","SourceStrengthReferenceTime"],"0230":["SQ","ApplicationSetupSequence"],"0232":["CS","ApplicationSetupType"],"0234":["IS","ApplicationSetupNumber"],"0236":["LO","ApplicationSetupName"],"0238":["LO","ApplicationSetupManufacturer"],"0240":["IS","TemplateNumber"],"0242":["SH","TemplateType"],"0244":["LO","TemplateName"],"0250":["DS","TotalReferenceAirKerma"],"0260":["SQ","BrachyAccessoryDeviceSequence"],"0262":["IS","BrachyAccessoryDeviceNumber"],"0263":["SH","BrachyAccessoryDeviceID"],"0264":["CS","BrachyAccessoryDeviceType"],"0266":["LO","BrachyAccessoryDeviceName"],"026A":["DS","BrachyAccessoryDeviceNominalThickness"],"026C":["DS","BrachyAccessoryDeviceNominalTransmission"],"0280":["SQ","ChannelSequence"],"0282":["IS","ChannelNumber"],"0284":["DS","ChannelLength"],"0286":["DS","ChannelTotalTime"],"0288":["CS","SourceMovementType"],"028A":["IS","NumberOfPulses"],"028C":["DS","PulseRepetitionInterval"],"0290":["IS","SourceApplicatorNumber"],"0291":["SH","SourceApplicatorID"],"0292":["CS","SourceApplicatorType"],"0294":["LO","SourceApplicatorName"],"0296":["DS","SourceApplicatorLength"],"0298":["LO","SourceApplicatorManufacturer"],"029C":["DS","SourceApplicatorWallNominalThickness"],"029E":["DS","SourceApplicatorWallNominalTransmission"],"02A0":["DS","SourceApplicatorStepSize"],"02A2":["IS","TransferTubeNumber"],"02A4":["DS","TransferTubeLength"],"02B0":["SQ","ChannelShieldSequence"],"02B2":["IS","ChannelShieldNumber"],"02B3":["SH","ChannelShieldID"],"02B4":["LO","ChannelShieldName"],"02B8":["DS","ChannelShieldNominalThickness"],"02BA":["DS","ChannelShieldNominalTransmission"],"02C8":["DS","FinalCumulativeTimeWeight"],"02D0":["SQ","BrachyControlPointSequence"],"02D2":["DS","ControlPointRelativePosition"],"02D4":["DS","ControlPoint3DPosition"],"02D6":["DS","CumulativeTimeWeight"],"02E0":["CS","CompensatorDivergence"],"02E1":["CS","CompensatorMountingPosition"],"02E2":["DS","SourceToCompensatorDistance"],"02E3":["FL","TotalCompensatorTrayWaterEquivalentThickness"],"02E4":["FL","IsocenterToCompensatorTrayDistance"],"02E5":["FL","CompensatorColumnOffset"],"02E6":["FL","IsocenterToCompensatorDistances"],"02E7":["FL","CompensatorRelativeStoppingPowerRatio"],"02E8":["FL","CompensatorMillingToolDiameter"],"02EA":["SQ","IonRangeCompensatorSequence"],"02EB":["LT","CompensatorDescription"],"0302":["IS","RadiationMassNumber"],"0304":["IS","RadiationAtomicNumber"],"0306":["SS","RadiationChargeState"],"0308":["CS","ScanMode"],"030A":["FL","VirtualSourceAxisDistances"],"030C":["SQ","SnoutSequence"],"030D":["FL","SnoutPosition"],"030F":["SH","SnoutID"],"0312":["IS","NumberOfRangeShifters"],"0314":["SQ","RangeShifterSequence"],"0316":["IS","RangeShifterNumber"],"0318":["SH","RangeShifterID"],"0320":["CS","RangeShifterType"],"0322":["LO","RangeShifterDescription"],"0330":["IS","NumberOfLateralSpreadingDevices"],"0332":["SQ","LateralSpreadingDeviceSequence"],"0334":["IS","LateralSpreadingDeviceNumber"],"0336":["SH","LateralSpreadingDeviceID"],"0338":["CS","LateralSpreadingDeviceType"],"033A":["LO","LateralSpreadingDeviceDescription"],"033C":["FL","LateralSpreadingDeviceWaterEquivalentThickness"],"0340":["IS","NumberOfRangeModulators"],"0342":["SQ","RangeModulatorSequence"],"0344":["IS","RangeModulatorNumber"],"0346":["SH","RangeModulatorID"],"0348":["CS","RangeModulatorType"],"034A":["LO","RangeModulatorDescription"],"034C":["SH","BeamCurrentModulationID"],"0350":["CS","PatientSupportType"],"0352":["SH","PatientSupportID"],"0354":["LO","PatientSupportAccessoryCode"],"0356":["FL","FixationLightAzimuthalAngle"],"0358":["FL","FixationLightPolarAngle"],"035A":["FL","MetersetRate"],"0360":["SQ","RangeShifterSettingsSequence"],"0362":["LO","RangeShifterSetting"],"0364":["FL","IsocenterToRangeShifterDistance"],"0366":["FL","RangeShifterWaterEquivalentThickness"],"0370":["SQ","LateralSpreadingDeviceSettingsSequence"],"0372":["LO","LateralSpreadingDeviceSetting"],"0374":["FL","IsocenterToLateralSpreadingDeviceDistance"],"0380":["SQ","RangeModulatorSettingsSequence"],"0382":["FL","RangeModulatorGatingStartValue"],"0384":["FL","RangeModulatorGatingStopValue"],"0386":["FL","RangeModulatorGatingStartWaterEquivalentThickness"],"0388":["FL","RangeModulatorGatingStopWaterEquivalentThickness"],"038A":["FL","IsocenterToRangeModulatorDistance"],"0390":["SH","ScanSpotTuneID"],"0392":["IS","NumberOfScanSpotPositions"],"0394":["FL","ScanSpotPositionMap"],"0396":["FL","ScanSpotMetersetWeights"],"0398":["FL","ScanningSpotSize"],"039A":["IS","NumberOfPaintings"],"03A0":["SQ","IonToleranceTableSequence"],"03A2":["SQ","IonBeamSequence"],"03A4":["SQ","IonBeamLimitingDeviceSequence"],"03A6":["SQ","IonBlockSequence"],"03A8":["SQ","IonControlPointSequence"],"03AA":["SQ","IonWedgeSequence"],"03AC":["SQ","IonWedgePositionSequence"],"0401":["SQ","ReferencedSetupImageSequence"],"0402":["ST","SetupImageComment"],"0410":["SQ","MotionSynchronizationSequence"],"0412":["FL","ControlPointOrientation"],"0420":["SQ","GeneralAccessorySequence"],"0421":["SH","GeneralAccessoryID"],"0422":["ST","GeneralAccessoryDescription"],"0423":["CS","GeneralAccessoryType"],"0424":["IS","GeneralAccessoryNumber"],"0431":["SQ","ApplicatorGeometrySequence"],"0432":["CS","ApplicatorApertureShape"],"0433":["FL","ApplicatorOpening"],"0434":["FL","ApplicatorOpeningX"],"0435":["FL","ApplicatorOpeningY"],"0436":["FL","SourceToApplicatorMountingPositionDistance"]},"300C":{"0002":["SQ","ReferencedRTPlanSequence"],"0004":["SQ","ReferencedBeamSequence"],"0006":["IS","ReferencedBeamNumber"],"0007":["IS","ReferencedReferenceImageNumber"],"0008":["DS","StartCumulativeMetersetWeight"],"0009":["DS","EndCumulativeMetersetWeight"],"000A":["SQ","ReferencedBrachyApplicationSetupSequence"],"000C":["IS","ReferencedBrachyApplicationSetupNumber"],"000E":["IS","ReferencedSourceNumber"],"0020":["SQ","ReferencedFractionGroupSequence"],"0022":["IS","ReferencedFractionGroupNumber"],"0040":["SQ","ReferencedVerificationImageSequence"],"0042":["SQ","ReferencedReferenceImageSequence"],"0050":["SQ","ReferencedDoseReferenceSequence"],"0051":["IS","ReferencedDoseReferenceNumber"],"0055":["SQ","BrachyReferencedDoseReferenceSequence"],"0060":["SQ","ReferencedStructureSetSequence"],"006A":["IS","ReferencedPatientSetupNumber"],"0080":["SQ","ReferencedDoseSequence"],"00A0":["IS","ReferencedToleranceTableNumber"],"00B0":["SQ","ReferencedBolusSequence"],"00C0":["IS","ReferencedWedgeNumber"],"00D0":["IS","ReferencedCompensatorNumber"],"00E0":["IS","ReferencedBlockNumber"],"00F0":["IS","ReferencedControlPointIndex"],"00F2":["SQ","ReferencedControlPointSequence"],"00F4":["IS","ReferencedStartControlPointIndex"],"00F6":["IS","ReferencedStopControlPointIndex"],"0100":["IS","ReferencedRangeShifterNumber"],"0102":["IS","ReferencedLateralSpreadingDeviceNumber"],"0104":["IS","ReferencedRangeModulatorNumber"]},"300E":{"0002":["CS","ApprovalStatus"],"0004":["DA","ReviewDate"],"0005":["TM","ReviewTime"],"0008":["PN","ReviewerName"]},4e3:{"0010":["LT","Arbitrary"],4e3:["LT","TextComments"]},4008:{"0040":["SH","ResultsID"],"0042":["LO","ResultsIDIssuer"],"0050":["SQ","ReferencedInterpretationSequence"],"00FF":["CS","ReportProductionStatusTrial"],"0100":["DA","InterpretationRecordedDate"],"0101":["TM","InterpretationRecordedTime"],"0102":["PN","InterpretationRecorder"],"0103":["LO","ReferenceToRecordedSound"],"0108":["DA","InterpretationTranscriptionDate"],"0109":["TM","InterpretationTranscriptionTime"],"010A":["PN","InterpretationTranscriber"],"010B":["ST","InterpretationText"],"010C":["PN","InterpretationAuthor"],"0111":["SQ","InterpretationApproverSequence"],"0112":["DA","InterpretationApprovalDate"],"0113":["TM","InterpretationApprovalTime"],"0114":["PN","PhysicianApprovingInterpretation"],"0115":["LT","InterpretationDiagnosisDescription"],"0117":["SQ","InterpretationDiagnosisCodeSequence"],"0118":["SQ","ResultsDistributionListSequence"],"0119":["PN","DistributionName"],"011A":["LO","DistributionAddress"],"0200":["SH","InterpretationID"],"0202":["LO","InterpretationIDIssuer"],"0210":["CS","InterpretationTypeID"],"0212":["CS","InterpretationStatusID"],"0300":["ST","Impressions"],4e3:["ST","ResultsComments"]},4010:{"0001":["CS","LowEnergyDetectors"],"0002":["CS","HighEnergyDetectors"],"0004":["SQ","DetectorGeometrySequence"],1001:["SQ","ThreatROIVoxelSequence"],1004:["FL","ThreatROIBase"],1005:["FL","ThreatROIExtents"],1006:["OB","ThreatROIBitmap"],1007:["SH","RouteSegmentID"],1008:["CS","GantryType"],1009:["CS","OOIOwnerType"],"100A":["SQ","RouteSegmentSequence"],1010:["US","PotentialThreatObjectID"],1011:["SQ","ThreatSequence"],1012:["CS","ThreatCategory"],1013:["LT","ThreatCategoryDescription"],1014:["CS","ATDAbilityAssessment"],1015:["CS","ATDAssessmentFlag"],1016:["FL","ATDAssessmentProbability"],1017:["FL","Mass"],1018:["FL","Density"],1019:["FL","ZEffective"],"101A":["SH","BoardingPassID"],"101B":["FL","CenterOfMass"],"101C":["FL","CenterOfPTO"],"101D":["FL","BoundingPolygon"],"101E":["SH","RouteSegmentStartLocationID"],"101F":["SH","RouteSegmentEndLocationID"],1020:["CS","RouteSegmentLocationIDType"],1021:["CS","AbortReason"],1023:["FL","VolumeOfPTO"],1024:["CS","AbortFlag"],1025:["DT","RouteSegmentStartTime"],1026:["DT","RouteSegmentEndTime"],1027:["CS","TDRType"],1028:["CS","InternationalRouteSegment"],1029:["LO","ThreatDetectionAlgorithmandVersion"],"102A":["SH","AssignedLocation"],"102B":["DT","AlarmDecisionTime"],1031:["CS","AlarmDecision"],1033:["US","NumberOfTotalObjects"],1034:["US","NumberOfAlarmObjects"],1037:["SQ","PTORepresentationSequence"],1038:["SQ","ATDAssessmentSequence"],1039:["CS","TIPType"],"103A":["CS","DICOSVersion"],1041:["DT","OOIOwnerCreationTime"],1042:["CS","OOIType"],1043:["FL","OOISize"],1044:["CS","AcquisitionStatus"],1045:["SQ","BasisMaterialsCodeSequence"],1046:["CS","PhantomType"],1047:["SQ","OOIOwnerSequence"],1048:["CS","ScanType"],1051:["LO","ItineraryID"],1052:["SH","ItineraryIDType"],1053:["LO","ItineraryIDAssigningAuthority"],1054:["SH","RouteID"],1055:["SH","RouteIDAssigningAuthority"],1056:["CS","InboundArrivalType"],1058:["SH","CarrierID"],1059:["CS","CarrierIDAssigningAuthority"],1060:["FL","SourceOrientation"],1061:["FL","SourcePosition"],1062:["FL","BeltHeight"],1064:["SQ","AlgorithmRoutingCodeSequence"],1067:["CS","TransportClassification"],1068:["LT","OOITypeDescriptor"],1069:["FL","TotalProcessingTime"],"106C":["OB","DetectorCalibrationData"]}},u.Dictionary.getVR=function(m,A){var S,v,w;return w=u.Dictionary.dict[u.Utils.dec2hex(m)],w&&(v=w[u.Utils.dec2hex(A)],v?S=v[0]:A===0&&(S="UL")),S||(w=u.Dictionary.dictPrivate[u.Utils.dec2hex(m)],w&&(v=w[u.Utils.dec2hex(A)],v&&(S=v[0]))),S||(S="OB"),S},u.Dictionary.getDescription=function(m,A){var S,v,w;return w=u.Dictionary.dict[u.Utils.dec2hex(m)],w&&(v=w[u.Utils.dec2hex(A)],v?S=v[1]:A===0&&(S="Group "+u.Utils.dec2hex(m)+" Length")),S||(w=u.Dictionary.dictPrivate[u.Utils.dec2hex(m)],w&&(v=w[u.Utils.dec2hex(A)],v&&(S=v[1]))),S||(S="PrivateData"),S},T.exports&&(T.exports=u.Dictionary)}(dictionary)),dictionary.exports}var image={exports:{}},tag={exports:{}},lib$1={exports:{}},_default$1={},lib={exports:{}},_default={},hasRequired_default$1;function require_default$1(){if(hasRequired_default$1)return _default;hasRequired_default$1=1;function T(){var v={};return v["align-content"]=!1,v["align-items"]=!1,v["align-self"]=!1,v["alignment-adjust"]=!1,v["alignment-baseline"]=!1,v.all=!1,v["anchor-point"]=!1,v.animation=!1,v["animation-delay"]=!1,v["animation-direction"]=!1,v["animation-duration"]=!1,v["animation-fill-mode"]=!1,v["animation-iteration-count"]=!1,v["animation-name"]=!1,v["animation-play-state"]=!1,v["animation-timing-function"]=!1,v.azimuth=!1,v["backface-visibility"]=!1,v.background=!0,v["background-attachment"]=!0,v["background-clip"]=!0,v["background-color"]=!0,v["background-image"]=!0,v["background-origin"]=!0,v["background-position"]=!0,v["background-repeat"]=!0,v["background-size"]=!0,v["baseline-shift"]=!1,v.binding=!1,v.bleed=!1,v["bookmark-label"]=!1,v["bookmark-level"]=!1,v["bookmark-state"]=!1,v.border=!0,v["border-bottom"]=!0,v["border-bottom-color"]=!0,v["border-bottom-left-radius"]=!0,v["border-bottom-right-radius"]=!0,v["border-bottom-style"]=!0,v["border-bottom-width"]=!0,v["border-collapse"]=!0,v["border-color"]=!0,v["border-image"]=!0,v["border-image-outset"]=!0,v["border-image-repeat"]=!0,v["border-image-slice"]=!0,v["border-image-source"]=!0,v["border-image-width"]=!0,v["border-left"]=!0,v["border-left-color"]=!0,v["border-left-style"]=!0,v["border-left-width"]=!0,v["border-radius"]=!0,v["border-right"]=!0,v["border-right-color"]=!0,v["border-right-style"]=!0,v["border-right-width"]=!0,v["border-spacing"]=!0,v["border-style"]=!0,v["border-top"]=!0,v["border-top-color"]=!0,v["border-top-left-radius"]=!0,v["border-top-right-radius"]=!0,v["border-top-style"]=!0,v["border-top-width"]=!0,v["border-width"]=!0,v.bottom=!1,v["box-decoration-break"]=!0,v["box-shadow"]=!0,v["box-sizing"]=!0,v["box-snap"]=!0,v["box-suppress"]=!0,v["break-after"]=!0,v["break-before"]=!0,v["break-inside"]=!0,v["caption-side"]=!1,v.chains=!1,v.clear=!0,v.clip=!1,v["clip-path"]=!1,v["clip-rule"]=!1,v.color=!0,v["color-interpolation-filters"]=!0,v["column-count"]=!1,v["column-fill"]=!1,v["column-gap"]=!1,v["column-rule"]=!1,v["column-rule-color"]=!1,v["column-rule-style"]=!1,v["column-rule-width"]=!1,v["column-span"]=!1,v["column-width"]=!1,v.columns=!1,v.contain=!1,v.content=!1,v["counter-increment"]=!1,v["counter-reset"]=!1,v["counter-set"]=!1,v.crop=!1,v.cue=!1,v["cue-after"]=!1,v["cue-before"]=!1,v.cursor=!1,v.direction=!1,v.display=!0,v["display-inside"]=!0,v["display-list"]=!0,v["display-outside"]=!0,v["dominant-baseline"]=!1,v.elevation=!1,v["empty-cells"]=!1,v.filter=!1,v.flex=!1,v["flex-basis"]=!1,v["flex-direction"]=!1,v["flex-flow"]=!1,v["flex-grow"]=!1,v["flex-shrink"]=!1,v["flex-wrap"]=!1,v.float=!1,v["float-offset"]=!1,v["flood-color"]=!1,v["flood-opacity"]=!1,v["flow-from"]=!1,v["flow-into"]=!1,v.font=!0,v["font-family"]=!0,v["font-feature-settings"]=!0,v["font-kerning"]=!0,v["font-language-override"]=!0,v["font-size"]=!0,v["font-size-adjust"]=!0,v["font-stretch"]=!0,v["font-style"]=!0,v["font-synthesis"]=!0,v["font-variant"]=!0,v["font-variant-alternates"]=!0,v["font-variant-caps"]=!0,v["font-variant-east-asian"]=!0,v["font-variant-ligatures"]=!0,v["font-variant-numeric"]=!0,v["font-variant-position"]=!0,v["font-weight"]=!0,v.grid=!1,v["grid-area"]=!1,v["grid-auto-columns"]=!1,v["grid-auto-flow"]=!1,v["grid-auto-rows"]=!1,v["grid-column"]=!1,v["grid-column-end"]=!1,v["grid-column-start"]=!1,v["grid-row"]=!1,v["grid-row-end"]=!1,v["grid-row-start"]=!1,v["grid-template"]=!1,v["grid-template-areas"]=!1,v["grid-template-columns"]=!1,v["grid-template-rows"]=!1,v["hanging-punctuation"]=!1,v.height=!0,v.hyphens=!1,v.icon=!1,v["image-orientation"]=!1,v["image-resolution"]=!1,v["ime-mode"]=!1,v["initial-letters"]=!1,v["inline-box-align"]=!1,v["justify-content"]=!1,v["justify-items"]=!1,v["justify-self"]=!1,v.left=!1,v["letter-spacing"]=!0,v["lighting-color"]=!0,v["line-box-contain"]=!1,v["line-break"]=!1,v["line-grid"]=!1,v["line-height"]=!1,v["line-snap"]=!1,v["line-stacking"]=!1,v["line-stacking-ruby"]=!1,v["line-stacking-shift"]=!1,v["line-stacking-strategy"]=!1,v["list-style"]=!0,v["list-style-image"]=!0,v["list-style-position"]=!0,v["list-style-type"]=!0,v.margin=!0,v["margin-bottom"]=!0,v["margin-left"]=!0,v["margin-right"]=!0,v["margin-top"]=!0,v["marker-offset"]=!1,v["marker-side"]=!1,v.marks=!1,v.mask=!1,v["mask-box"]=!1,v["mask-box-outset"]=!1,v["mask-box-repeat"]=!1,v["mask-box-slice"]=!1,v["mask-box-source"]=!1,v["mask-box-width"]=!1,v["mask-clip"]=!1,v["mask-image"]=!1,v["mask-origin"]=!1,v["mask-position"]=!1,v["mask-repeat"]=!1,v["mask-size"]=!1,v["mask-source-type"]=!1,v["mask-type"]=!1,v["max-height"]=!0,v["max-lines"]=!1,v["max-width"]=!0,v["min-height"]=!0,v["min-width"]=!0,v["move-to"]=!1,v["nav-down"]=!1,v["nav-index"]=!1,v["nav-left"]=!1,v["nav-right"]=!1,v["nav-up"]=!1,v["object-fit"]=!1,v["object-position"]=!1,v.opacity=!1,v.order=!1,v.orphans=!1,v.outline=!1,v["outline-color"]=!1,v["outline-offset"]=!1,v["outline-style"]=!1,v["outline-width"]=!1,v.overflow=!1,v["overflow-wrap"]=!1,v["overflow-x"]=!1,v["overflow-y"]=!1,v.padding=!0,v["padding-bottom"]=!0,v["padding-left"]=!0,v["padding-right"]=!0,v["padding-top"]=!0,v.page=!1,v["page-break-after"]=!1,v["page-break-before"]=!1,v["page-break-inside"]=!1,v["page-policy"]=!1,v.pause=!1,v["pause-after"]=!1,v["pause-before"]=!1,v.perspective=!1,v["perspective-origin"]=!1,v.pitch=!1,v["pitch-range"]=!1,v["play-during"]=!1,v.position=!1,v["presentation-level"]=!1,v.quotes=!1,v["region-fragment"]=!1,v.resize=!1,v.rest=!1,v["rest-after"]=!1,v["rest-before"]=!1,v.richness=!1,v.right=!1,v.rotation=!1,v["rotation-point"]=!1,v["ruby-align"]=!1,v["ruby-merge"]=!1,v["ruby-position"]=!1,v["shape-image-threshold"]=!1,v["shape-outside"]=!1,v["shape-margin"]=!1,v.size=!1,v.speak=!1,v["speak-as"]=!1,v["speak-header"]=!1,v["speak-numeral"]=!1,v["speak-punctuation"]=!1,v["speech-rate"]=!1,v.stress=!1,v["string-set"]=!1,v["tab-size"]=!1,v["table-layout"]=!1,v["text-align"]=!0,v["text-align-last"]=!0,v["text-combine-upright"]=!0,v["text-decoration"]=!0,v["text-decoration-color"]=!0,v["text-decoration-line"]=!0,v["text-decoration-skip"]=!0,v["text-decoration-style"]=!0,v["text-emphasis"]=!0,v["text-emphasis-color"]=!0,v["text-emphasis-position"]=!0,v["text-emphasis-style"]=!0,v["text-height"]=!0,v["text-indent"]=!0,v["text-justify"]=!0,v["text-orientation"]=!0,v["text-overflow"]=!0,v["text-shadow"]=!0,v["text-space-collapse"]=!0,v["text-transform"]=!0,v["text-underline-position"]=!0,v["text-wrap"]=!0,v.top=!1,v.transform=!1,v["transform-origin"]=!1,v["transform-style"]=!1,v.transition=!1,v["transition-delay"]=!1,v["transition-duration"]=!1,v["transition-property"]=!1,v["transition-timing-function"]=!1,v["unicode-bidi"]=!1,v["vertical-align"]=!1,v.visibility=!1,v["voice-balance"]=!1,v["voice-duration"]=!1,v["voice-family"]=!1,v["voice-pitch"]=!1,v["voice-range"]=!1,v["voice-rate"]=!1,v["voice-stress"]=!1,v["voice-volume"]=!1,v.volume=!1,v["white-space"]=!1,v.widows=!1,v.width=!0,v["will-change"]=!1,v["word-break"]=!0,v["word-spacing"]=!0,v["word-wrap"]=!0,v["wrap-flow"]=!1,v["wrap-through"]=!1,v["writing-mode"]=!1,v["z-index"]=!1,v}function u(v,w,D){}function m(v,w,D){}var A=/javascript\s*\:/img;function S(v,w){return A.test(w)?"":w}return _default.whiteList=T(),_default.getDefaultWhiteList=T,_default.onAttr=u,_default.onIgnoreAttr=m,_default.safeAttrValue=S,_default}var util$1,hasRequiredUtil$1;function requireUtil$1(){return hasRequiredUtil$1||(hasRequiredUtil$1=1,util$1={indexOf:function(T,u){var m,A;if(Array.prototype.indexOf)return T.indexOf(u);for(m=0,A=T.length;m/g,e=/"/g,N=/"/g,q=/&#([a-zA-Z0-9]*);?/gim,z=/:?/gim,e0=/&newline;?/gim,H=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,j=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,y=/u\s*r\s*l\s*\(.*/gi;function Y(p0){return p0.replace(e,""")}function G(p0){return p0.replace(N,'"')}function J(p0){return p0.replace(q,function(C0,F0){return F0[0]==="x"||F0[0]==="X"?String.fromCharCode(parseInt(F0.substr(1),16)):String.fromCharCode(parseInt(F0,10))})}function i0(p0){return p0.replace(z,":").replace(e0," ")}function Q(p0){for(var T0="",C0=0,F0=p0.length;C0",F0);if(ee===-1)break;C0=ee+3}return T0}function S0(p0){var T0=p0.split("");return T0=T0.filter(function(C0){var F0=C0.charCodeAt(0);return F0===127?!1:F0<=31?F0===10||F0===13:!0}),T0.join("")}return _default$1.whiteList=A(),_default$1.getDefaultWhiteList=A,_default$1.onTag=v,_default$1.onIgnoreTag=w,_default$1.onTagAttr=D,_default$1.onIgnoreTagAttr=R,_default$1.safeAttrValue=P,_default$1.escapeHtml=L,_default$1.escapeQuote=Y,_default$1.unescapeQuote=G,_default$1.escapeHtmlEntities=J,_default$1.escapeDangerHtml5Entities=i0,_default$1.clearNonPrintableCharacter=Q,_default$1.friendlyAttrValue=f,_default$1.escapeAttrValue=l0,_default$1.onIgnoreTagStripAll=o0,_default$1.StripTagBody=c0,_default$1.stripCommentTag=d0,_default$1.stripBlankChar=S0,_default$1.cssFilter=S,_default$1.getDefaultCSSWhiteList=u,_default$1}var parser$1={},hasRequiredParser$1;function requireParser$1(){if(hasRequiredParser$1)return parser$1;hasRequiredParser$1=1;var T=requireUtil();function u(d){var E=T.spaceIndex(d),e;return E===-1?e=d.slice(1,-1):e=d.slice(1,E+1),e=T.trim(e).toLowerCase(),e.slice(0,1)==="/"&&(e=e.slice(1)),e.slice(-1)==="/"&&(e=e.slice(0,-1)),e}function m(d){return d.slice(0,2)===""||H===j-1){N+=e(d.slice(q,z)),Y=d.slice(z,H+1),y=u(Y),N+=E(z,N.length,y,Y,m(Y)),q=H+1,z=!1;continue}if(G==='"'||G==="'")for(var J=1,i0=d.charAt(H-J);i0.trim()===""||i0==="=";){if(i0==="="){e0=G;continue e}i0=d.charAt(H-++J)}}else if(G===e0){e0=!1;continue}}return q0;E--){var e=d[E];if(e!==" ")return e==="="?E:-1}}function L(d){return d[0]==='"'&&d[d.length-1]==='"'||d[0]==="'"&&d[d.length-1]==="'"}function P(d){return L(d)?d.substr(1,d.length-2):d}return parser$1.parseTag=A,parser$1.parseAttr=v,parser$1}var xss,hasRequiredXss;function requireXss(){if(hasRequiredXss)return xss;hasRequiredXss=1;var T=requireLib$1().FilterCSS,u=require_default(),m=requireParser$1(),A=m.parseTag,S=m.parseAttr,v=requireUtil();function w(d){return d==null}function D(d){var E=v.spaceIndex(d);if(E===-1)return{html:"",closing:d[d.length-2]==="/"};d=v.trim(d.slice(E+1,-1));var e=d[d.length-1]==="/";return e&&(d=v.trim(d.slice(0,-1))),{html:d,closing:e}}function R(d){var E={};for(var e in d)E[e]=d[e];return E}function L(d){var E={};for(var e in d)Array.isArray(d[e])?E[e.toLowerCase()]=d[e].map(function(N){return N.toLowerCase()}):E[e.toLowerCase()]=d[e];return E}function P(d){d=R(d||{}),d.stripIgnoreTag&&(d.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),d.onIgnoreTag=u.onIgnoreTagStripAll),d.whiteList||d.allowList?d.whiteList=L(d.whiteList||d.allowList):d.whiteList=u.whiteList,d.onTag=d.onTag||u.onTag,d.onTagAttr=d.onTagAttr||u.onTagAttr,d.onIgnoreTag=d.onIgnoreTag||u.onIgnoreTag,d.onIgnoreTagAttr=d.onIgnoreTagAttr||u.onIgnoreTagAttr,d.safeAttrValue=d.safeAttrValue||u.safeAttrValue,d.escapeHtml=d.escapeHtml||u.escapeHtml,this.options=d,d.css===!1?this.cssFilter=!1:(d.css=d.css||{},this.cssFilter=new T(d.css))}return P.prototype.process=function(d){if(d=d||"",d=d.toString(),!d)return"";var E=this,e=E.options,N=e.whiteList,q=e.onTag,z=e.onIgnoreTag,e0=e.onTagAttr,H=e.onIgnoreTagAttr,j=e.safeAttrValue,y=e.escapeHtml,Y=E.cssFilter;e.stripBlankChar&&(d=u.stripBlankChar(d)),e.allowCommentTag||(d=u.stripCommentTag(d));var G=!1;e.stripIgnoreTagBody&&(G=u.StripTagBody(e.stripIgnoreTagBody,z),z=G.onIgnoreTag);var J=A(d,function(i0,Q,f,l0,o0){var c0={sourcePosition:i0,position:Q,isClosing:o0,isWhite:Object.prototype.hasOwnProperty.call(N,f)},d0=q(f,l0,c0);if(!w(d0))return d0;if(c0.isWhite){if(c0.isClosing)return"";var S0=D(l0),p0=N[f],T0=S(S0.html,function(C0,F0){var ee=v.indexOf(p0,C0)!==-1,ie=e0(f,C0,F0,ee);return w(ie)?ee?(F0=j(f,C0,F0,Y),F0?C0+'="'+F0+'"':C0):(ie=H(f,C0,F0,ee),w(ie)?void 0:ie):ie});return l0="<"+f,T0&&(l0+=" "+T0),S0.closing&&(l0+=" /"),l0+=">",l0}else return d0=z(f,l0,c0),w(d0)?y(l0):d0},y);return G&&(J=G.remove(J)),J},xss=P,xss}var hasRequiredLib;function requireLib(){return hasRequiredLib||(hasRequiredLib=1,function(T,u){var m=require_default(),A=requireParser$1(),S=requireXss();function v(D,R){var L=new S(R);return L.process(D)}u=T.exports=v,u.filterXSS=v,u.FilterXSS=S,function(){for(var D in m)u[D]=m[D];for(var R in A)u[R]=A[R]}(),typeof window<"u"&&(window.filterXSS=T.exports);function w(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}w()&&(self.filterXSS=T.exports)}(lib$1,lib$1.exports)),lib$1.exports}var siemens={exports:{}},hasRequiredSiemens;function requireSiemens(){return hasRequiredSiemens||(hasRequiredSiemens=1,function(T){var u=u||{};u.Utils=u.Utils||(typeof commonjsRequire<"u"?requireUtilities():null),u.Siemens=u.Siemens||function(m){this.output="",this.data=new DataView(m,0)},u.Siemens.CSA2_MAGIC_NUMBER=[83,86,49,48],u.Siemens.NAME_LENGTH=64,u.Siemens.ELEMENT_CSA1=4112,u.Siemens.ELEMENT_CSA2=4128,u.Siemens.GROUP_CSA=41,u.Siemens.prototype.readHeader=function(){var m,A;try{if(this.data.byteLength>u.Siemens.CSA2_MAGIC_NUMBER.length){for(A=!0,m=0;m1)for(var v=Array.prototype.slice.call(arguments,1);S--;)A[m-1-S]=u.Utils.createArray.apply(this,v);return A},u.Utils.getStringAt=function(m,A,S,v,w){var D="",R,L;for(R=0;R0?parseInt(m,10):0},u.Utils.convertCamcelCaseToTitleCase=function(m){var A=m.replace(/([A-Z][a-z])/g," $1");return u.Utils.trim(A.charAt(0).toUpperCase()+A.slice(1))},u.Utils.safeParseFloat=function(m){return m=u.Utils.stripLeadingZeros(m),m.length>0?parseFloat(m):0},u.Utils.bytesToDouble=function(m){var A=(m[0]&128)>>7,S=(m[0]&127)<<4|(m[1]&240)>>4;if(S==0)return 0;if(S==2047)return A?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;var v=Math.pow(2,S-1023-52),w=m[7]+m[6]*Math.pow(2,8)+m[5]*Math.pow(2,8*2)+m[4]*Math.pow(2,8*3)+m[3]*Math.pow(2,8*4)+m[2]*Math.pow(2,8*5)+(m[1]&15)*Math.pow(2,8*6)+Math.pow(2,52);return Math.pow(-1,A)*w*v},u.Utils.concatArrayBuffers=function(m,A){var S=new Uint8Array(m.byteLength+A.byteLength);return S.set(new Uint8Array(m),0),S.set(new Uint8Array(A),m.byteLength),S.buffer},u.Utils.concatArrayBuffers2=function(m){var A=0,S=0,v;for(v=0;v>8&65280|m>>24&255},u.Utils.swap16=function(m){return((m&255)<<8|m>>8&255)<<16>>16},u.Utils.makeCRCTable=function(){for(var m,A=[],S=0;S<256;S++){m=S;for(var v=0;v<8;v++)m=m&1?3988292384^m>>>1:m>>>1;A[S]=m}return A},u.Utils.crc32=function(m){for(var A=u.Utils.crcTable||(u.Utils.crcTable=u.Utils.makeCRCTable()),S=-1,v=0;v>>8^A[(S^m.getUint8(v))&255];return(S^-1)>>>0},u.Utils.createBitMask=function(m,A,S){var v=4294967295;return v>>>=(4-m)*8+(m*8-A),S?m==1?v&=255:m==2?v&=65535:m==4?v&=4294967295:m==8&&(v=4294967295):v=4294967295,v},T.exports&&(T.exports=u.Utils)}(utilities)),utilities.exports}var hasRequiredDictionary;function requireDictionary(){return hasRequiredDictionary||(hasRequiredDictionary=1,function(T){var u=u||{};u.Dictionary=u.Dictionary||{},u.Utils=u.Utils||(typeof commonjsRequire<"u"?requireUtilities():null),u.Dictionary.dictPrivate={"0207":{"101F":["FE","ElscintDataScale"]}},u.Dictionary.dict={"0002":{"0001":["OB","FileMetaInformationVersion"],"0002":["UI","MediaStoredSOPClassUID"],"0003":["UI","MediaStoredSOPInstanceUID"],"0010":["UI","TransferSyntaxUID"],"0012":["UI","ImplementationClassUID"],"0013":["SH","ImplementationVersionName"],"0016":["AE","SourceApplicationEntityTitle"],"0100":["UI","PrivateInformationCreatorUID"],"0102":["OB","PrivateInformation"]},"0004":{1130:["CS","FilesetID"],1141:["CS","FilesetDescriptorFileFileID"],1142:["CS","FilesetDescriptorFileFormat"],1200:["UL","RootDirectoryEntitysFirstDirectoryRecordOffset"],1202:["UL","RootDirectoryEntitysLastDirectoryRecordOffset"],1212:["US","File-setConsistenceFlag"],1220:["SQ","DirectoryRecordSequence"],1400:["UL","NextDirectoryRecordOffset"],1410:["US","RecordInuseFlag"],1420:["UL","ReferencedLowerlevelDirectoryEntityOffset"],1430:["CS","DirectoryRecordType"],1432:["UI","PrivateRecordUID"],1500:["CS","ReferencedFileID"],1510:["UI","ReferencedSOPClassUIDInFile"],1511:["UI","ReferencedSOPInstanceUIDInFile"],1600:["UL","NumberOfReferences"]},"0008":{"0001":["UL","LengthToEnd"],"0005":["CS","SpecificCharacterSet"],"0006":["SQ","LanguageCodeSequence"],"0008":["CS","ImageType"],"0010":["SH","RecognitionCode"],"0012":["DA","InstanceCreationDate"],"0013":["TM","InstanceCreationTime"],"0014":["UI","InstanceCreatorUID"],"0016":["UI","SOPClassUID"],"0018":["UI","SOPInstanceUID"],"001A":["UI","RelatedGeneralSOPClassUID"],"001B":["UI","OriginalSpecializedSOPClassUID"],"0020":["DA","StudyDate"],"0021":["DA","SeriesDate"],"0022":["DA","AcquisitionDate"],"0023":["DA","ContentDate"],"0024":["DA","OverlayDate"],"0025":["DA","CurveDate"],"002A":["DT","AcquisitionDateTime"],"0030":["TM","StudyTime"],"0031":["TM","SeriesTime"],"0032":["TM","AcquisitionTime"],"0033":["TM","ContentTime"],"0034":["TM","OverlayTime"],"0035":["TM","CurveTime"],"0040":["US","DataSetType"],"0041":["LO","DataSetSubtype"],"0042":["CS","NuclearMedicineSeriesType"],"0050":["SH","AccessionNumber"],"0051":["SQ","IssuerOfAccessionNumberSequence"],"0052":["CS","QueryRetrieveLevel"],"0054":["AE","RetrieveAETitle"],"0056":["CS","InstanceAvailability"],"0058":["UI","FailedSOPInstanceUIDList"],"0060":["CS","Modality"],"0061":["CS","ModalitiesInStudy"],"0062":["UI","SOPClassesInStudy"],"0064":["CS","ConversionType"],"0068":["CS","PresentationIntentType"],"0070":["LO","Manufacturer"],"0080":["LO","InstitutionName"],"0081":["ST","InstitutionAddress"],"0082":["SQ","InstitutionCodeSequence"],"0090":["PN","ReferringPhysicianName"],"0092":["ST","ReferringPhysicianAddress"],"0094":["SH","ReferringPhysicianTelephoneNumbers"],"0096":["SQ","ReferringPhysicianIdentificationSequence"],"0100":["SH","CodeValue"],"0102":["SH","CodingSchemeDesignator"],"0103":["SH","CodingSchemeVersion"],"0104":["LO","CodeMeaning"],"0105":["CS","MappingResource"],"0106":["DT","ContextGroupVersion"],"0107":["DT","ContextGroupLocalVersion"],"010B":["CS","ContextGroupExtensionFlag"],"010C":["UI","CodingSchemeUID"],"010D":["UI","ContextGroupExtensionCreatorUID"],"010F":["CS","ContextIdentifier"],"0110":["SQ","CodingSchemeIdentificationSequence"],"0112":["LO","CodingSchemeRegistry"],"0114":["ST","CodingSchemeExternalID"],"0115":["ST","CodingSchemeName"],"0116":["ST","CodingSchemeResponsibleOrganization"],"0117":["UI","ContextUID"],"0201":["SH","TimezoneOffsetFromUTC"],1e3:["AE","NetworkID"],1010:["SH","StationName"],1030:["LO","StudyDescription"],1032:["SQ","ProcedureCodeSequence"],"103E":["LO","SeriesDescription"],"103F":["SQ","SeriesDescriptionCodeSequence"],1040:["LO","InstitutionalDepartmentName"],1048:["PN","PhysiciansOfRecord"],1049:["SQ","PhysiciansOfRecordIdentificationSequence"],1050:["PN","PerformingPhysicianName"],1052:["SQ","PerformingPhysicianIdentificationSequence"],1060:["PN","NameOfPhysiciansReadingStudy"],1062:["SQ","PhysiciansReadingStudyIdentificationSequence"],1070:["PN","OperatorsName"],1072:["SQ","OperatorIdentificationSequence"],1080:["LO","AdmittingDiagnosesDescription"],1084:["SQ","AdmittingDiagnosesCodeSequence"],1090:["LO","ManufacturerModelName"],1100:["SQ","ReferencedResultsSequence"],1110:["SQ","ReferencedStudySequence"],1111:["SQ","ReferencedPerformedProcedureStepSequence"],1115:["SQ","ReferencedSeriesSequence"],1120:["SQ","ReferencedPatientSequence"],1125:["SQ","ReferencedVisitSequence"],1130:["SQ","ReferencedOverlaySequence"],1134:["SQ","ReferencedStereometricInstanceSequence"],"113A":["SQ","ReferencedWaveformSequence"],1140:["SQ","ReferencedImageSequence"],1145:["SQ","ReferencedCurveSequence"],"114A":["SQ","ReferencedInstanceSequence"],"114B":["SQ","ReferencedRealWorldValueMappingInstanceSequence"],1150:["UI","ReferencedSOPClassUID"],1155:["UI","ReferencedSOPInstanceUID"],"115A":["UI","SOPClassesSupported"],1160:["IS","ReferencedFrameNumber"],1161:["UL","SimpleFrameList"],1162:["UL","CalculatedFrameList"],1163:["FD","TimeRange"],1164:["SQ","FrameExtractionSequence"],1167:["UI","MultiFrameSourceSOPInstanceUID"],1195:["UI","TransactionUID"],1197:["US","FailureReason"],1198:["SQ","FailedSOPSequence"],1199:["SQ","ReferencedSOPSequence"],1200:["SQ","StudiesContainingOtherReferencedInstancesSequence"],1250:["SQ","RelatedSeriesSequence"],2110:["CS","LossyImageCompressionRetired"],2111:["ST","DerivationDescription"],2112:["SQ","SourceImageSequence"],2120:["SH","StageName"],2122:["IS","StageNumber"],2124:["IS","NumberOfStages"],2127:["SH","ViewName"],2128:["IS","ViewNumber"],2129:["IS","NumberOfEventTimers"],"212A":["IS","NumberOfViewsInStage"],2130:["DS","EventElapsedTimes"],2132:["LO","EventTimerNames"],2133:["SQ","EventTimerSequence"],2134:["FD","EventTimeOffset"],2135:["SQ","EventCodeSequence"],2142:["IS","StartTrim"],2143:["IS","StopTrim"],2144:["IS","RecommendedDisplayFrameRate"],2200:["CS","TransducerPosition"],2204:["CS","TransducerOrientation"],2208:["CS","AnatomicStructure"],2218:["SQ","AnatomicRegionSequence"],2220:["SQ","AnatomicRegionModifierSequence"],2228:["SQ","PrimaryAnatomicStructureSequence"],2229:["SQ","AnatomicStructureSpaceOrRegionSequence"],2230:["SQ","PrimaryAnatomicStructureModifierSequence"],2240:["SQ","TransducerPositionSequence"],2242:["SQ","TransducerPositionModifierSequence"],2244:["SQ","TransducerOrientationSequence"],2246:["SQ","TransducerOrientationModifierSequence"],2251:["SQ","AnatomicStructureSpaceOrRegionCodeSequenceTrial"],2253:["SQ","AnatomicPortalOfEntranceCodeSequenceTrial"],2255:["SQ","AnatomicApproachDirectionCodeSequenceTrial"],2256:["ST","AnatomicPerspectiveDescriptionTrial"],2257:["SQ","AnatomicPerspectiveCodeSequenceTrial"],2258:["ST","AnatomicLocationOfExaminingInstrumentDescriptionTrial"],2259:["SQ","AnatomicLocationOfExaminingInstrumentCodeSequenceTrial"],"225A":["SQ","AnatomicStructureSpaceOrRegionModifierCodeSequenceTrial"],"225C":["SQ","OnAxisBackgroundAnatomicStructureCodeSequenceTrial"],3001:["SQ","AlternateRepresentationSequence"],3010:["UI","IrradiationEventUID"],4e3:["LT","IdentifyingComments"],9007:["CS","FrameType"],9092:["SQ","ReferencedImageEvidenceSequence"],9121:["SQ","ReferencedRawDataSequence"],9123:["UI","CreatorVersionUID"],9124:["SQ","DerivationImageSequence"],9154:["SQ","SourceImageEvidenceSequence"],9205:["CS","PixelPresentation"],9206:["CS","VolumetricProperties"],9207:["CS","VolumeBasedCalculationTechnique"],9208:["CS","ComplexImageComponent"],9209:["CS","AcquisitionContrast"],9215:["SQ","DerivationCodeSequence"],9237:["SQ","ReferencedPresentationStateSequence"],9410:["SQ","ReferencedOtherPlaneSequence"],9458:["SQ","FrameDisplaySequence"],9459:["FL","RecommendedDisplayFrameRateInFloat"],9460:["CS","SkipFrameRangeFlag"]},"0010":{"0010":["PN","PatientName"],"0020":["LO","PatientID"],"0021":["LO","IssuerOfPatientID"],"0022":["CS","TypeOfPatientID"],"0024":["SQ","IssuerOfPatientIDQualifiersSequence"],"0030":["DA","PatientBirthDate"],"0032":["TM","PatientBirthTime"],"0040":["CS","PatientSex"],"0050":["SQ","PatientInsurancePlanCodeSequence"],"0101":["SQ","PatientPrimaryLanguageCodeSequence"],"0102":["SQ","PatientPrimaryLanguageModifierCodeSequence"],1e3:["LO","OtherPatientIDs"],1001:["PN","OtherPatientNames"],1002:["SQ","OtherPatientIDsSequence"],1005:["PN","PatientBirthName"],1010:["AS","PatientAge"],1020:["DS","PatientSize"],1021:["SQ","PatientSizeCodeSequence"],1030:["DS","PatientWeight"],1040:["LO","PatientAddress"],1050:["LO","InsurancePlanIdentification"],1060:["PN","PatientMotherBirthName"],1080:["LO","MilitaryRank"],1081:["LO","BranchOfService"],1090:["LO","MedicalRecordLocator"],2e3:["LO","MedicalAlerts"],2110:["LO","Allergies"],2150:["LO","CountryOfResidence"],2152:["LO","RegionOfResidence"],2154:["SH","PatientTelephoneNumbers"],2160:["SH","EthnicGroup"],2180:["SH","Occupation"],"21A0":["CS","SmokingStatus"],"21B0":["LT","AdditionalPatientHistory"],"21C0":["US","PregnancyStatus"],"21D0":["DA","LastMenstrualDate"],"21F0":["LO","PatientReligiousPreference"],2201:["LO","PatientSpeciesDescription"],2202:["SQ","PatientSpeciesCodeSequence"],2203:["CS","PatientSexNeutered"],2210:["CS","AnatomicalOrientationType"],2292:["LO","PatientBreedDescription"],2293:["SQ","PatientBreedCodeSequence"],2294:["SQ","BreedRegistrationSequence"],2295:["LO","BreedRegistrationNumber"],2296:["SQ","BreedRegistryCodeSequence"],2297:["PN","ResponsiblePerson"],2298:["CS","ResponsiblePersonRole"],2299:["LO","ResponsibleOrganization"],4e3:["LT","PatientComments"],9431:["FL","ExaminedBodyThickness"]},"0012":{"0010":["LO","ClinicalTrialSponsorName"],"0020":["LO","ClinicalTrialProtocolID"],"0021":["LO","ClinicalTrialProtocolName"],"0030":["LO","ClinicalTrialSiteID"],"0031":["LO","ClinicalTrialSiteName"],"0040":["LO","ClinicalTrialSubjectID"],"0042":["LO","ClinicalTrialSubjectReadingID"],"0050":["LO","ClinicalTrialTimePointID"],"0051":["ST","ClinicalTrialTimePointDescription"],"0060":["LO","ClinicalTrialCoordinatingCenterName"],"0062":["CS","PatientIdentityRemoved"],"0063":["LO","DeidentificationMethod"],"0064":["SQ","DeidentificationMethodCodeSequence"],"0071":["LO","ClinicalTrialSeriesID"],"0072":["LO","ClinicalTrialSeriesDescription"],"0081":["LO","ClinicalTrialProtocolEthicsCommitteeName"],"0082":["LO","ClinicalTrialProtocolEthicsCommitteeApprovalNumber"],"0083":["SQ","ConsentForClinicalTrialUseSequence"],"0084":["CS","DistributionType"],"0085":["CS","ConsentForDistributionFlag"]},"0014":{"0023":["ST","CADFileFormat"],"0024":["ST","ComponentReferenceSystem"],"0025":["ST","ComponentManufacturingProcedure"],"0028":["ST","ComponentManufacturer"],"0030":["DS","MaterialThickness"],"0032":["DS","MaterialPipeDiameter"],"0034":["DS","MaterialIsolationDiameter"],"0042":["ST","MaterialGrade"],"0044":["ST","MaterialPropertiesFileID"],"0045":["ST","MaterialPropertiesFileFormat"],"0046":["LT","MaterialNotes"],"0050":["CS","ComponentShape"],"0052":["CS","CurvatureType"],"0054":["DS","OuterDiameter"],"0056":["DS","InnerDiameter"],1010:["ST","ActualEnvironmentalConditions"],1020:["DA","ExpiryDate"],1040:["ST","EnvironmentalConditions"],2002:["SQ","EvaluatorSequence"],2004:["IS","EvaluatorNumber"],2006:["PN","EvaluatorName"],2008:["IS","EvaluationAttempt"],2012:["SQ","IndicationSequence"],2014:["IS","IndicationNumber "],2016:["SH","IndicationLabel"],2018:["ST","IndicationDescription"],"201A":["CS","IndicationType"],"201C":["CS","IndicationDisposition"],"201E":["SQ","IndicationROISequence"],2030:["SQ","IndicationPhysicalPropertySequence"],2032:["SH","PropertyLabel"],2202:["IS","CoordinateSystemNumberOfAxes "],2204:["SQ","CoordinateSystemAxesSequence"],2206:["ST","CoordinateSystemAxisDescription"],2208:["CS","CoordinateSystemDataSetMapping"],"220A":["IS","CoordinateSystemAxisNumber"],"220C":["CS","CoordinateSystemAxisType"],"220E":["CS","CoordinateSystemAxisUnits"],2210:["OB","CoordinateSystemAxisValues"],2220:["SQ","CoordinateSystemTransformSequence"],2222:["ST","TransformDescription"],2224:["IS","TransformNumberOfAxes"],2226:["IS","TransformOrderOfAxes"],2228:["CS","TransformedAxisUnits"],"222A":["DS","CoordinateSystemTransformRotationAndScaleMatrix"],"222C":["DS","CoordinateSystemTransformTranslationMatrix"],3011:["DS","InternalDetectorFrameTime"],3012:["DS","NumberOfFramesIntegrated"],3020:["SQ","DetectorTemperatureSequence"],3022:["DS","SensorName"],3024:["DS","HorizontalOffsetOfSensor"],3026:["DS","VerticalOffsetOfSensor"],3028:["DS","SensorTemperature"],3040:["SQ","DarkCurrentSequence"],3050:["OB","DarkCurrentCounts"],3060:["SQ","GainCorrectionReferenceSequence"],3070:["OB","AirCounts"],3071:["DS","KVUsedInGainCalibration"],3072:["DS","MAUsedInGainCalibration"],3073:["DS","NumberOfFramesUsedForIntegration"],3074:["LO","FilterMaterialUsedInGainCalibration"],3075:["DS","FilterThicknessUsedInGainCalibration"],3076:["DA","DateOfGainCalibration"],3077:["TM","TimeOfGainCalibration"],3080:["OB","BadPixelImage"],3099:["LT","CalibrationNotes"],4002:["SQ","PulserEquipmentSequence"],4004:["CS","PulserType"],4006:["LT","PulserNotes"],4008:["SQ","ReceiverEquipmentSequence"],"400A":["CS","AmplifierType"],"400C":["LT","ReceiverNotes"],"400E":["SQ","PreAmplifierEquipmentSequence"],"400F":["LT","PreAmplifierNotes"],4010:["SQ","TransmitTransducerSequence"],4011:["SQ","ReceiveTransducerSequence"],4012:["US","NumberOfElements"],4013:["CS","ElementShape"],4014:["DS","ElementDimensionA"],4015:["DS","ElementDimensionB"],4016:["DS","ElementPitch"],4017:["DS","MeasuredBeamDimensionA"],4018:["DS","MeasuredBeamDimensionB"],4019:["DS","LocationOfMeasuredBeamDiameter"],"401A":["DS","NominalFrequency"],"401B":["DS","MeasuredCenterFrequency"],"401C":["DS","MeasuredBandwidth"],4020:["SQ","PulserSettingsSequence"],4022:["DS","PulseWidth"],4024:["DS","ExcitationFrequency"],4026:["CS","ModulationType"],4028:["DS","Damping"],4030:["SQ","ReceiverSettingsSequence"],4031:["DS","AcquiredSoundpathLength"],4032:["CS","AcquisitionCompressionType"],4033:["IS","AcquisitionSampleSize"],4034:["DS","RectifierSmoothing"],4035:["SQ","DACSequence"],4036:["CS","DACType"],4038:["DS","DACGainPoints"],"403A":["DS","DACTimePoints"],"403C":["DS","DACAmplitude"],4040:["SQ","PreAmplifierSettingsSequence"],4050:["SQ","TransmitTransducerSettingsSequence"],4051:["SQ","ReceiveTransducerSettingsSequence"],4052:["DS","IncidentAngle"],4054:["ST","CouplingTechnique"],4056:["ST","CouplingMedium"],4057:["DS","CouplingVelocity"],4058:["DS","CrystalCenterLocationX"],4059:["DS","CrystalCenterLocationZ"],"405A":["DS","SoundPathLength"],"405C":["ST","DelayLawIdentifier"],4060:["SQ","GateSettingsSequence"],4062:["DS","GateThreshold"],4064:["DS","VelocityOfSound"],4070:["SQ","CalibrationSettingsSequence"],4072:["ST","CalibrationProcedure"],4074:["SH","ProcedureVersion"],4076:["DA","ProcedureCreationDate"],4078:["DA","ProcedureExpirationDate"],"407A":["DA","ProcedureLastModifiedDate"],"407C":["TM","CalibrationTime"],"407E":["DA","CalibrationDate"],5002:["IS","LINACEnergy"],5004:["IS","LINACOutput"]},"0018":{"0010":["LO","ContrastBolusAgent"],"0012":["SQ","ContrastBolusAgentSequence"],"0014":["SQ","ContrastBolusAdministrationRouteSequence"],"0015":["CS","BodyPartExamined"],"0020":["CS","ScanningSequence"],"0021":["CS","SequenceVariant"],"0022":["CS","ScanOptions"],"0023":["CS","MRAcquisitionType"],"0024":["SH","SequenceName"],"0025":["CS","AngioFlag"],"0026":["SQ","InterventionDrugInformationSequence"],"0027":["TM","InterventionDrugStopTime"],"0028":["DS","InterventionDrugDose"],"0029":["SQ","InterventionDrugCodeSequence"],"002A":["SQ","AdditionalDrugSequence"],"0030":["LO","Radionuclide"],"0031":["LO","Radiopharmaceutical"],"0032":["DS","EnergyWindowCenterline"],"0033":["DS","EnergyWindowTotalWidth"],"0034":["LO","InterventionDrugName"],"0035":["TM","InterventionDrugStartTime"],"0036":["SQ","InterventionSequence"],"0037":["CS","TherapyType"],"0038":["CS","InterventionStatus"],"0039":["CS","TherapyDescription"],"003A":["ST","InterventionDescription"],"0040":["IS","CineRate"],"0042":["CS","InitialCineRunState"],"0050":["DS","SliceThickness"],"0060":["DS","KVP"],"0070":["IS","CountsAccumulated"],"0071":["CS","AcquisitionTerminationCondition"],"0072":["DS","EffectiveDuration"],"0073":["CS","AcquisitionStartCondition"],"0074":["IS","AcquisitionStartConditionData"],"0075":["IS","AcquisitionTerminationConditionData"],"0080":["DS","RepetitionTime"],"0081":["DS","EchoTime"],"0082":["DS","InversionTime"],"0083":["DS","NumberOfAverages"],"0084":["DS","ImagingFrequency"],"0085":["SH","ImagedNucleus"],"0086":["IS","EchoNumbers"],"0087":["DS","MagneticFieldStrength"],"0088":["DS","SpacingBetweenSlices"],"0089":["IS","NumberOfPhaseEncodingSteps"],"0090":["DS","DataCollectionDiameter"],"0091":["IS","EchoTrainLength"],"0093":["DS","PercentSampling"],"0094":["DS","PercentPhaseFieldOfView"],"0095":["DS","PixelBandwidth"],1e3:["LO","DeviceSerialNumber"],1002:["UI","DeviceUID"],1003:["LO","DeviceID"],1004:["LO","PlateID"],1005:["LO","GeneratorID"],1006:["LO","GridID"],1007:["LO","CassetteID"],1008:["LO","GantryID"],1010:["LO","SecondaryCaptureDeviceID"],1011:["LO","HardcopyCreationDeviceID"],1012:["DA","DateOfSecondaryCapture"],1014:["TM","TimeOfSecondaryCapture"],1016:["LO","SecondaryCaptureDeviceManufacturer"],1017:["LO","HardcopyDeviceManufacturer"],1018:["LO","SecondaryCaptureDeviceManufacturerModelName"],1019:["LO","SecondaryCaptureDeviceSoftwareVersions"],"101A":["LO","HardcopyDeviceSoftwareVersion"],"101B":["LO","HardcopyDeviceManufacturerModelName"],1020:["LO","SoftwareVersions"],1022:["SH","VideoImageFormatAcquired"],1023:["LO","DigitalImageFormatAcquired"],1030:["LO","ProtocolName"],1040:["LO","ContrastBolusRoute"],1041:["DS","ContrastBolusVolume"],1042:["TM","ContrastBolusStartTime"],1043:["TM","ContrastBolusStopTime"],1044:["DS","ContrastBolusTotalDose"],1045:["IS","SyringeCounts"],1046:["DS","ContrastFlowRate"],1047:["DS","ContrastFlowDuration"],1048:["CS","ContrastBolusIngredient"],1049:["DS","ContrastBolusIngredientConcentration"],1050:["DS","SpatialResolution"],1060:["DS","TriggerTime"],1061:["LO","TriggerSourceOrType"],1062:["IS","NominalInterval"],1063:["DS","FrameTime"],1064:["LO","CardiacFramingType"],1065:["DS","FrameTimeVector"],1066:["DS","FrameDelay"],1067:["DS","ImageTriggerDelay"],1068:["DS","MultiplexGroupTimeOffset"],1069:["DS","TriggerTimeOffset"],"106A":["CS","SynchronizationTrigger"],"106C":["US","SynchronizationChannel"],"106E":["UL","TriggerSamplePosition"],1070:["LO","RadiopharmaceuticalRoute"],1071:["DS","RadiopharmaceuticalVolume"],1072:["TM","RadiopharmaceuticalStartTime"],1073:["TM","RadiopharmaceuticalStopTime"],1074:["DS","RadionuclideTotalDose"],1075:["DS","RadionuclideHalfLife"],1076:["DS","RadionuclidePositronFraction"],1077:["DS","RadiopharmaceuticalSpecificActivity"],1078:["DT","RadiopharmaceuticalStartDateTime"],1079:["DT","RadiopharmaceuticalStopDateTime"],1080:["CS","BeatRejectionFlag"],1081:["IS","LowRRValue"],1082:["IS","HighRRValue"],1083:["IS","IntervalsAcquired"],1084:["IS","IntervalsRejected"],1085:["LO","PVCRejection"],1086:["IS","SkipBeats"],1088:["IS","HeartRate"],1090:["IS","CardiacNumberOfImages"],1094:["IS","TriggerWindow"],1100:["DS","ReconstructionDiameter"],1110:["DS","DistanceSourceToDetector"],1111:["DS","DistanceSourceToPatient"],1114:["DS","EstimatedRadiographicMagnificationFactor"],1120:["DS","GantryDetectorTilt"],1121:["DS","GantryDetectorSlew"],1130:["DS","TableHeight"],1131:["DS","TableTraverse"],1134:["CS","TableMotion"],1135:["DS","TableVerticalIncrement"],1136:["DS","TableLateralIncrement"],1137:["DS","TableLongitudinalIncrement"],1138:["DS","TableAngle"],"113A":["CS","TableType"],1140:["CS","RotationDirection"],1141:["DS","AngularPosition"],1142:["DS","RadialPosition"],1143:["DS","ScanArc"],1144:["DS","AngularStep"],1145:["DS","CenterOfRotationOffset"],1146:["DS","RotationOffset"],1147:["CS","FieldOfViewShape"],1149:["IS","FieldOfViewDimensions"],1150:["IS","ExposureTime"],1151:["IS","XRayTubeCurrent"],1152:["IS","Exposure"],1153:["IS","ExposureInuAs"],1154:["DS","AveragePulseWidth"],1155:["CS","RadiationSetting"],1156:["CS","RectificationType"],"115A":["CS","RadiationMode"],"115E":["DS","ImageAndFluoroscopyAreaDoseProduct"],1160:["SH","FilterType"],1161:["LO","TypeOfFilters"],1162:["DS","IntensifierSize"],1164:["DS","ImagerPixelSpacing"],1166:["CS","Grid"],1170:["IS","GeneratorPower"],1180:["SH","CollimatorGridName"],1181:["CS","CollimatorType"],1182:["IS","FocalDistance"],1183:["DS","XFocusCenter"],1184:["DS","YFocusCenter"],1190:["DS","FocalSpots"],1191:["CS","AnodeTargetMaterial"],"11A0":["DS","BodyPartThickness"],"11A2":["DS","CompressionForce"],1200:["DA","DateOfLastCalibration"],1201:["TM","TimeOfLastCalibration"],1210:["SH","ConvolutionKernel"],1240:["IS","UpperLowerPixelValues"],1242:["IS","ActualFrameDuration"],1243:["IS","CountRate"],1244:["US","PreferredPlaybackSequencing"],1250:["SH","ReceiveCoilName"],1251:["SH","TransmitCoilName"],1260:["SH","PlateType"],1261:["LO","PhosphorType"],1300:["DS","ScanVelocity"],1301:["CS","WholeBodyTechnique"],1302:["IS","ScanLength"],1310:["US","AcquisitionMatrix"],1312:["CS","InPlanePhaseEncodingDirection"],1314:["DS","FlipAngle"],1315:["CS","VariableFlipAngleFlag"],1316:["DS","SAR"],1318:["DS","dBdt"],1400:["LO","AcquisitionDeviceProcessingDescription"],1401:["LO","AcquisitionDeviceProcessingCode"],1402:["CS","CassetteOrientation"],1403:["CS","CassetteSize"],1404:["US","ExposuresOnPlate"],1405:["IS","RelativeXRayExposure"],1411:["DS","ExposureIndex"],1412:["DS","TargetExposureIndex"],1413:["DS","DeviationIndex"],1450:["DS","ColumnAngulation"],1460:["DS","TomoLayerHeight"],1470:["DS","TomoAngle"],1480:["DS","TomoTime"],1490:["CS","TomoType"],1491:["CS","TomoClass"],1495:["IS","NumberOfTomosynthesisSourceImages"],1500:["CS","PositionerMotion"],1508:["CS","PositionerType"],1510:["DS","PositionerPrimaryAngle"],1511:["DS","PositionerSecondaryAngle"],1520:["DS","PositionerPrimaryAngleIncrement"],1521:["DS","PositionerSecondaryAngleIncrement"],1530:["DS","DetectorPrimaryAngle"],1531:["DS","DetectorSecondaryAngle"],1600:["CS","ShutterShape"],1602:["IS","ShutterLeftVerticalEdge"],1604:["IS","ShutterRightVerticalEdge"],1606:["IS","ShutterUpperHorizontalEdge"],1608:["IS","ShutterLowerHorizontalEdge"],1610:["IS","CenterOfCircularShutter"],1612:["IS","RadiusOfCircularShutter"],1620:["IS","VerticesOfThePolygonalShutter"],1622:["US","ShutterPresentationValue"],1623:["US","ShutterOverlayGroup"],1624:["US","ShutterPresentationColorCIELabValue"],1700:["CS","CollimatorShape"],1702:["IS","CollimatorLeftVerticalEdge"],1704:["IS","CollimatorRightVerticalEdge"],1706:["IS","CollimatorUpperHorizontalEdge"],1708:["IS","CollimatorLowerHorizontalEdge"],1710:["IS","CenterOfCircularCollimator"],1712:["IS","RadiusOfCircularCollimator"],1720:["IS","VerticesOfThePolygonalCollimator"],1800:["CS","AcquisitionTimeSynchronized"],1801:["SH","TimeSource"],1802:["CS","TimeDistributionProtocol"],1803:["LO","NTPSourceAddress"],2001:["IS","PageNumberVector"],2002:["SH","FrameLabelVector"],2003:["DS","FramePrimaryAngleVector"],2004:["DS","FrameSecondaryAngleVector"],2005:["DS","SliceLocationVector"],2006:["SH","DisplayWindowLabelVector"],2010:["DS","NominalScannedPixelSpacing"],2020:["CS","DigitizingDeviceTransportDirection"],2030:["DS","RotationOfScannedFilm"],3100:["CS","IVUSAcquisition"],3101:["DS","IVUSPullbackRate"],3102:["DS","IVUSGatedRate"],3103:["IS","IVUSPullbackStartFrameNumber"],3104:["IS","IVUSPullbackStopFrameNumber"],3105:["IS","LesionNumber"],4e3:["LT","AcquisitionComments"],5e3:["SH","OutputPower"],5010:["LO","TransducerData"],5012:["DS","FocusDepth"],5020:["LO","ProcessingFunction"],5021:["LO","PostprocessingFunction"],5022:["DS","MechanicalIndex"],5024:["DS","BoneThermalIndex"],5026:["DS","CranialThermalIndex"],5027:["DS","SoftTissueThermalIndex"],5028:["DS","SoftTissueFocusThermalIndex"],5029:["DS","SoftTissueSurfaceThermalIndex"],5030:["DS","DynamicRange"],5040:["DS","TotalGain"],5050:["IS","DepthOfScanField"],5100:["CS","PatientPosition"],5101:["CS","ViewPosition"],5104:["SQ","ProjectionEponymousNameCodeSequence"],5210:["DS","ImageTransformationMatrix"],5212:["DS","ImageTranslationVector"],6e3:["DS","Sensitivity"],6011:["SQ","SequenceOfUltrasoundRegions"],6012:["US","RegionSpatialFormat"],6014:["US","RegionDataType"],6016:["UL","RegionFlags"],6018:["UL","RegionLocationMinX0"],"601A":["UL","RegionLocationMinY0"],"601C":["UL","RegionLocationMaxX1"],"601E":["UL","RegionLocationMaxY1"],6020:["SL","ReferencePixelX0"],6022:["SL","ReferencePixelY0"],6024:["US","PhysicalUnitsXDirection"],6026:["US","PhysicalUnitsYDirection"],6028:["FD","ReferencePixelPhysicalValueX"],"602A":["FD","ReferencePixelPhysicalValueY"],"602C":["FD","PhysicalDeltaX"],"602E":["FD","PhysicalDeltaY"],6030:["UL","TransducerFrequency"],6031:["CS","TransducerType"],6032:["UL","PulseRepetitionFrequency"],6034:["FD","DopplerCorrectionAngle"],6036:["FD","SteeringAngle"],6038:["UL","DopplerSampleVolumeXPositionRetired"],6039:["SL","DopplerSampleVolumeXPosition"],"603A":["UL","DopplerSampleVolumeYPositionRetired"],"603B":["SL","DopplerSampleVolumeYPosition"],"603C":["UL","TMLinePositionX0Retired"],"603D":["SL","TMLinePositionX0"],"603E":["UL","TMLinePositionY0Retired"],"603F":["SL","TMLinePositionY0"],6040:["UL","TMLinePositionX1Retired"],6041:["SL","TMLinePositionX1"],6042:["UL","TMLinePositionY1Retired"],6043:["SL","TMLinePositionY1"],6044:["US","PixelComponentOrganization"],6046:["UL","PixelComponentMask"],6048:["UL","PixelComponentRangeStart"],"604A":["UL","PixelComponentRangeStop"],"604C":["US","PixelComponentPhysicalUnits"],"604E":["US","PixelComponentDataType"],6050:["UL","NumberOfTableBreakPoints"],6052:["UL","TableOfXBreakPoints"],6054:["FD","TableOfYBreakPoints"],6056:["UL","NumberOfTableEntries"],6058:["UL","TableOfPixelValues"],"605A":["FL","TableOfParameterValues"],6060:["FL","RWaveTimeVector"],7e3:["CS","DetectorConditionsNominalFlag"],7001:["DS","DetectorTemperature"],7004:["CS","DetectorType"],7005:["CS","DetectorConfiguration"],7006:["LT","DetectorDescription"],7008:["LT","DetectorMode"],"700A":["SH","DetectorID"],"700C":["DA","DateOfLastDetectorCalibration"],"700E":["TM","TimeOfLastDetectorCalibration"],7010:["IS","ExposuresOnDetectorSinceLastCalibration"],7011:["IS","ExposuresOnDetectorSinceManufactured"],7012:["DS","DetectorTimeSinceLastExposure"],7014:["DS","DetectorActiveTime"],7016:["DS","DetectorActivationOffsetFromExposure"],"701A":["DS","DetectorBinning"],7020:["DS","DetectorElementPhysicalSize"],7022:["DS","DetectorElementSpacing"],7024:["CS","DetectorActiveShape"],7026:["DS","DetectorActiveDimensions"],7028:["DS","DetectorActiveOrigin"],"702A":["LO","DetectorManufacturerName"],"702B":["LO","DetectorManufacturerModelName"],7030:["DS","FieldOfViewOrigin"],7032:["DS","FieldOfViewRotation"],7034:["CS","FieldOfViewHorizontalFlip"],7036:["FL","PixelDataAreaOriginRelativeToFOV"],7038:["FL","PixelDataAreaRotationAngleRelativeToFOV"],7040:["LT","GridAbsorbingMaterial"],7041:["LT","GridSpacingMaterial"],7042:["DS","GridThickness"],7044:["DS","GridPitch"],7046:["IS","GridAspectRatio"],7048:["DS","GridPeriod"],"704C":["DS","GridFocalDistance"],7050:["CS","FilterMaterial"],7052:["DS","FilterThicknessMinimum"],7054:["DS","FilterThicknessMaximum"],7056:["FL","FilterBeamPathLengthMinimum"],7058:["FL","FilterBeamPathLengthMaximum"],7060:["CS","ExposureControlMode"],7062:["LT","ExposureControlModeDescription"],7064:["CS","ExposureStatus"],7065:["DS","PhototimerSetting"],8150:["DS","ExposureTimeInuS"],8151:["DS","XRayTubeCurrentInuA"],9004:["CS","ContentQualification"],9005:["SH","PulseSequenceName"],9006:["SQ","MRImagingModifierSequence"],9008:["CS","EchoPulseSequence"],9009:["CS","InversionRecovery"],9010:["CS","FlowCompensation"],9011:["CS","MultipleSpinEcho"],9012:["CS","MultiPlanarExcitation"],9014:["CS","PhaseContrast"],9015:["CS","TimeOfFlightContrast"],9016:["CS","Spoiling"],9017:["CS","SteadyStatePulseSequence"],9018:["CS","EchoPlanarPulseSequence"],9019:["FD","TagAngleFirstAxis"],9020:["CS","MagnetizationTransfer"],9021:["CS","T2Preparation"],9022:["CS","BloodSignalNulling"],9024:["CS","SaturationRecovery"],9025:["CS","SpectrallySelectedSuppression"],9026:["CS","SpectrallySelectedExcitation"],9027:["CS","SpatialPresaturation"],9028:["CS","Tagging"],9029:["CS","OversamplingPhase"],9030:["FD","TagSpacingFirstDimension"],9032:["CS","GeometryOfKSpaceTraversal"],9033:["CS","SegmentedKSpaceTraversal"],9034:["CS","RectilinearPhaseEncodeReordering"],9035:["FD","TagThickness"],9036:["CS","PartialFourierDirection"],9037:["CS","CardiacSynchronizationTechnique"],9041:["LO","ReceiveCoilManufacturerName"],9042:["SQ","MRReceiveCoilSequence"],9043:["CS","ReceiveCoilType"],9044:["CS","QuadratureReceiveCoil"],9045:["SQ","MultiCoilDefinitionSequence"],9046:["LO","MultiCoilConfiguration"],9047:["SH","MultiCoilElementName"],9048:["CS","MultiCoilElementUsed"],9049:["SQ","MRTransmitCoilSequence"],9050:["LO","TransmitCoilManufacturerName"],9051:["CS","TransmitCoilType"],9052:["FD","SpectralWidth"],9053:["FD","ChemicalShiftReference"],9054:["CS","VolumeLocalizationTechnique"],9058:["US","MRAcquisitionFrequencyEncodingSteps"],9059:["CS","Decoupling"],9060:["CS","DecoupledNucleus"],9061:["FD","DecouplingFrequency"],9062:["CS","DecouplingMethod"],9063:["FD","DecouplingChemicalShiftReference"],9064:["CS","KSpaceFiltering"],9065:["CS","TimeDomainFiltering"],9066:["US","NumberOfZeroFills"],9067:["CS","BaselineCorrection"],9069:["FD","ParallelReductionFactorInPlane"],9070:["FD","CardiacRRIntervalSpecified"],9073:["FD","AcquisitionDuration"],9074:["DT","FrameAcquisitionDateTime"],9075:["CS","DiffusionDirectionality"],9076:["SQ","DiffusionGradientDirectionSequence"],9077:["CS","ParallelAcquisition"],9078:["CS","ParallelAcquisitionTechnique"],9079:["FD","InversionTimes"],9080:["ST","MetaboliteMapDescription"],9081:["CS","PartialFourier"],9082:["FD","EffectiveEchoTime"],9083:["SQ","MetaboliteMapCodeSequence"],9084:["SQ","ChemicalShiftSequence"],9085:["CS","CardiacSignalSource"],9087:["FD","DiffusionBValue"],9089:["FD","DiffusionGradientOrientation"],9090:["FD","VelocityEncodingDirection"],9091:["FD","VelocityEncodingMinimumValue"],9092:["SQ","VelocityEncodingAcquisitionSequence"],9093:["US","NumberOfKSpaceTrajectories"],9094:["CS","CoverageOfKSpace"],9095:["UL","SpectroscopyAcquisitionPhaseRows"],9096:["FD","ParallelReductionFactorInPlaneRetired"],9098:["FD","TransmitterFrequency"],9100:["CS","ResonantNucleus"],9101:["CS","FrequencyCorrection"],9103:["SQ","MRSpectroscopyFOVGeometrySequence"],9104:["FD","SlabThickness"],9105:["FD","SlabOrientation"],9106:["FD","MidSlabPosition"],9107:["SQ","MRSpatialSaturationSequence"],9112:["SQ","MRTimingAndRelatedParametersSequence"],9114:["SQ","MREchoSequence"],9115:["SQ","MRModifierSequence"],9117:["SQ","MRDiffusionSequence"],9118:["SQ","CardiacSynchronizationSequence"],9119:["SQ","MRAveragesSequence"],9125:["SQ","MRFOVGeometrySequence"],9126:["SQ","VolumeLocalizationSequence"],9127:["UL","SpectroscopyAcquisitionDataColumns"],9147:["CS","DiffusionAnisotropyType"],9151:["DT","FrameReferenceDateTime"],9152:["SQ","MRMetaboliteMapSequence"],9155:["FD","ParallelReductionFactorOutOfPlane"],9159:["UL","SpectroscopyAcquisitionOutOfPlanePhaseSteps"],9166:["CS","BulkMotionStatus"],9168:["FD","ParallelReductionFactorSecondInPlane"],9169:["CS","CardiacBeatRejectionTechnique"],9170:["CS","RespiratoryMotionCompensationTechnique"],9171:["CS","RespiratorySignalSource"],9172:["CS","BulkMotionCompensationTechnique"],9173:["CS","BulkMotionSignalSource"],9174:["CS","ApplicableSafetyStandardAgency"],9175:["LO","ApplicableSafetyStandardDescription"],9176:["SQ","OperatingModeSequence"],9177:["CS","OperatingModeType"],9178:["CS","OperatingMode"],9179:["CS","SpecificAbsorptionRateDefinition"],9180:["CS","GradientOutputType"],9181:["FD","SpecificAbsorptionRateValue"],9182:["FD","GradientOutput"],9183:["CS","FlowCompensationDirection"],9184:["FD","TaggingDelay"],9185:["ST","RespiratoryMotionCompensationTechniqueDescription"],9186:["SH","RespiratorySignalSourceID"],9195:["FD","ChemicalShiftMinimumIntegrationLimitInHz"],9196:["FD","ChemicalShiftMaximumIntegrationLimitInHz"],9197:["SQ","MRVelocityEncodingSequence"],9198:["CS","FirstOrderPhaseCorrection"],9199:["CS","WaterReferencedPhaseCorrection"],9200:["CS","MRSpectroscopyAcquisitionType"],9214:["CS","RespiratoryCyclePosition"],9217:["FD","VelocityEncodingMaximumValue"],9218:["FD","TagSpacingSecondDimension"],9219:["SS","TagAngleSecondAxis"],9220:["FD","FrameAcquisitionDuration"],9226:["SQ","MRImageFrameTypeSequence"],9227:["SQ","MRSpectroscopyFrameTypeSequence"],9231:["US","MRAcquisitionPhaseEncodingStepsInPlane"],9232:["US","MRAcquisitionPhaseEncodingStepsOutOfPlane"],9234:["UL","SpectroscopyAcquisitionPhaseColumns"],9236:["CS","CardiacCyclePosition"],9239:["SQ","SpecificAbsorptionRateSequence"],9240:["US","RFEchoTrainLength"],9241:["US","GradientEchoTrainLength"],9250:["CS","ArterialSpinLabelingContrast"],9251:["SQ","MRArterialSpinLabelingSequence"],9252:["LO","ASLTechniqueDescription"],9253:["US","ASLSlabNumber"],9254:["FD ","ASLSlabThickness"],9255:["FD ","ASLSlabOrientation"],9256:["FD ","ASLMidSlabPosition"],9257:["CS","ASLContext"],9258:["UL","ASLPulseTrainDuration"],9259:["CS","ASLCrusherFlag"],"925A":["FD","ASLCrusherFlow"],"925B":["LO","ASLCrusherDescription"],"925C":["CS","ASLBolusCutoffFlag"],"925D":["SQ","ASLBolusCutoffTimingSequence"],"925E":["LO","ASLBolusCutoffTechnique"],"925F":["UL","ASLBolusCutoffDelayTime"],9260:["SQ","ASLSlabSequence"],9295:["FD","ChemicalShiftMinimumIntegrationLimitInppm"],9296:["FD","ChemicalShiftMaximumIntegrationLimitInppm"],9301:["SQ","CTAcquisitionTypeSequence"],9302:["CS","AcquisitionType"],9303:["FD","TubeAngle"],9304:["SQ","CTAcquisitionDetailsSequence"],9305:["FD","RevolutionTime"],9306:["FD","SingleCollimationWidth"],9307:["FD","TotalCollimationWidth"],9308:["SQ","CTTableDynamicsSequence"],9309:["FD","TableSpeed"],9310:["FD","TableFeedPerRotation"],9311:["FD","SpiralPitchFactor"],9312:["SQ","CTGeometrySequence"],9313:["FD","DataCollectionCenterPatient"],9314:["SQ","CTReconstructionSequence"],9315:["CS","ReconstructionAlgorithm"],9316:["CS","ConvolutionKernelGroup"],9317:["FD","ReconstructionFieldOfView"],9318:["FD","ReconstructionTargetCenterPatient"],9319:["FD","ReconstructionAngle"],9320:["SH","ImageFilter"],9321:["SQ","CTExposureSequence"],9322:["FD","ReconstructionPixelSpacing"],9323:["CS","ExposureModulationType"],9324:["FD","EstimatedDoseSaving"],9325:["SQ","CTXRayDetailsSequence"],9326:["SQ","CTPositionSequence"],9327:["FD","TablePosition"],9328:["FD","ExposureTimeInms"],9329:["SQ","CTImageFrameTypeSequence"],9330:["FD","XRayTubeCurrentInmA"],9332:["FD","ExposureInmAs"],9333:["CS","ConstantVolumeFlag"],9334:["CS","FluoroscopyFlag"],9335:["FD","DistanceSourceToDataCollectionCenter"],9337:["US","ContrastBolusAgentNumber"],9338:["SQ","ContrastBolusIngredientCodeSequence"],9340:["SQ","ContrastAdministrationProfileSequence"],9341:["SQ","ContrastBolusUsageSequence"],9342:["CS","ContrastBolusAgentAdministered"],9343:["CS","ContrastBolusAgentDetected"],9344:["CS","ContrastBolusAgentPhase"],9345:["FD","CTDIvol"],9346:["SQ","CTDIPhantomTypeCodeSequence"],9351:["FL","CalciumScoringMassFactorPatient"],9352:["FL","CalciumScoringMassFactorDevice"],9353:["FL","EnergyWeightingFactor"],9360:["SQ","CTAdditionalXRaySourceSequence"],9401:["SQ","ProjectionPixelCalibrationSequence"],9402:["FL","DistanceSourceToIsocenter"],9403:["FL","DistanceObjectToTableTop"],9404:["FL","ObjectPixelSpacingInCenterOfBeam"],9405:["SQ","PositionerPositionSequence"],9406:["SQ","TablePositionSequence"],9407:["SQ","CollimatorShapeSequence"],9410:["CS","PlanesInAcquisition"],9412:["SQ","XAXRFFrameCharacteristicsSequence"],9417:["SQ","FrameAcquisitionSequence"],9420:["CS","XRayReceptorType"],9423:["LO","AcquisitionProtocolName"],9424:["LT","AcquisitionProtocolDescription"],9425:["CS","ContrastBolusIngredientOpaque"],9426:["FL","DistanceReceptorPlaneToDetectorHousing"],9427:["CS","IntensifierActiveShape"],9428:["FL","IntensifierActiveDimensions"],9429:["FL","PhysicalDetectorSize"],9430:["FL","PositionOfIsocenterProjection"],9432:["SQ","FieldOfViewSequence"],9433:["LO","FieldOfViewDescription"],9434:["SQ","ExposureControlSensingRegionsSequence"],9435:["CS","ExposureControlSensingRegionShape"],9436:["SS","ExposureControlSensingRegionLeftVerticalEdge"],9437:["SS","ExposureControlSensingRegionRightVerticalEdge"],9438:["SS","ExposureControlSensingRegionUpperHorizontalEdge"],9439:["SS","ExposureControlSensingRegionLowerHorizontalEdge"],9440:["SS","CenterOfCircularExposureControlSensingRegion"],9441:["US","RadiusOfCircularExposureControlSensingRegion"],9442:["SS","VerticesOfThePolygonalExposureControlSensingRegion"],9447:["FL","ColumnAngulationPatient"],9449:["FL","BeamAngle"],9451:["SQ","FrameDetectorParametersSequence"],9452:["FL","CalculatedAnatomyThickness"],9455:["SQ","CalibrationSequence"],9456:["SQ","ObjectThicknessSequence"],9457:["CS","PlaneIdentification"],9461:["FL","FieldOfViewDimensionsInFloat"],9462:["SQ","IsocenterReferenceSystemSequence"],9463:["FL","PositionerIsocenterPrimaryAngle"],9464:["FL","PositionerIsocenterSecondaryAngle"],9465:["FL","PositionerIsocenterDetectorRotationAngle"],9466:["FL","TableXPositionToIsocenter"],9467:["FL","TableYPositionToIsocenter"],9468:["FL","TableZPositionToIsocenter"],9469:["FL","TableHorizontalRotationAngle"],9470:["FL","TableHeadTiltAngle"],9471:["FL","TableCradleTiltAngle"],9472:["SQ","FrameDisplayShutterSequence"],9473:["FL","AcquiredImageAreaDoseProduct"],9474:["CS","CArmPositionerTabletopRelationship"],9476:["SQ","XRayGeometrySequence"],9477:["SQ","IrradiationEventIdentificationSequence"],9504:["SQ","XRay3DFrameTypeSequence"],9506:["SQ","ContributingSourcesSequence"],9507:["SQ","XRay3DAcquisitionSequence"],9508:["FL","PrimaryPositionerScanArc"],9509:["FL","SecondaryPositionerScanArc"],9510:["FL ","PrimaryPositionerScanStartAngle"],9511:["FL","SecondaryPositionerScanStartAngle"],9514:["FL","PrimaryPositionerIncrement"],9515:["FL","SecondaryPositionerIncrement"],9516:["DT","StartAcquisitionDateTime"],9517:["DT","EndAcquisitionDateTime"],9524:["LO","ApplicationName"],9525:["LO","ApplicationVersion"],9526:["LO","ApplicationManufacturer"],9527:["CS","AlgorithmType"],9528:["LO","AlgorithmDescription"],9530:["SQ","XRay3DReconstructionSequence"],9531:["LO","ReconstructionDescription"],9538:["SQ","PerProjectionAcquisitionSequence"],9601:["SQ","DiffusionBMatrixSequence"],9602:["FD","DiffusionBValueXX"],9603:["FD","DiffusionBValueXY"],9604:["FD","DiffusionBValueXZ"],9605:["FD","DiffusionBValueYY"],9606:["FD","DiffusionBValueYZ"],9607:["FD","DiffusionBValueZZ"],9701:["DT","DecayCorrectionDateTime"],9715:["FD","StartDensityThreshold"],9716:["FD","StartRelativeDensityDifferenceThreshold"],9717:["FD","StartCardiacTriggerCountThreshold"],9718:["FD","StartRespiratoryTriggerCountThreshold"],9719:["FD","TerminationCountsThreshold"],9720:["FD","TerminationDensityThreshold"],9721:["FD","TerminationRelativeDensityThreshold"],9722:["FD","TerminationTimeThreshold"],9723:["FD","TerminationCardiacTriggerCountThreshold"],9724:["FD","TerminationRespiratoryTriggerCountThreshold"],9725:["CS","DetectorGeometry"],9726:["FD","TransverseDetectorSeparation"],9727:["FD","AxialDetectorDimension"],9729:["US","RadiopharmaceuticalAgentNumber"],9732:["SQ","PETFrameAcquisitionSequence"],9733:["SQ","PETDetectorMotionDetailsSequence"],9734:["SQ","PETTableDynamicsSequence"],9735:["SQ","PETPositionSequence"],9736:["SQ","PETFrameCorrectionFactorsSequence"],9737:["SQ","RadiopharmaceuticalUsageSequence"],9738:["CS","AttenuationCorrectionSource"],9739:["US","NumberOfIterations"],9740:["US","NumberOfSubsets"],9749:["SQ","PETReconstructionSequence"],9751:["SQ","PETFrameTypeSequence"],9755:["CS","TimeOfFlightInformationUsed"],9756:["CS","ReconstructionType"],9758:["CS","DecayCorrected"],9759:["CS","AttenuationCorrected"],9760:["CS","ScatterCorrected"],9761:["CS","DeadTimeCorrected"],9762:["CS","GantryMotionCorrected"],9763:["CS","PatientMotionCorrected"],9764:["CS","CountLossNormalizationCorrected"],9765:["CS","RandomsCorrected"],9766:["CS","NonUniformRadialSamplingCorrected"],9767:["CS","SensitivityCalibrated"],9768:["CS","DetectorNormalizationCorrection"],9769:["CS","IterativeReconstructionMethod"],9770:["CS","AttenuationCorrectionTemporalRelationship"],9771:["SQ","PatientPhysiologicalStateSequence"],9772:["SQ","PatientPhysiologicalStateCodeSequence"],9801:["FD","DepthsOfFocus"],9803:["SQ","ExcludedIntervalsSequence"],9804:["DT","ExclusionStartDatetime"],9805:["FD","ExclusionDuration"],9806:["SQ","USImageDescriptionSequence"],9807:["SQ","ImageDataTypeSequence"],9808:["CS","DataType"],9809:["SQ","TransducerScanPatternCodeSequence"],"980B":["CS","AliasedDataType"],"980C":["CS","PositionMeasuringDeviceUsed"],"980D":["SQ","TransducerGeometryCodeSequence"],"980E":["SQ","TransducerBeamSteeringCodeSequence"],"980F":["SQ","TransducerApplicationCodeSequence"],A001:["SQ","ContributingEquipmentSequence"],A002:["DT","ContributionDateTime"],A003:["ST","ContributionDescription"]},"0020":{"000D":["UI","StudyInstanceUID"],"000E":["UI","SeriesInstanceUID"],"0010":["SH","StudyID"],"0011":["IS","SeriesNumber"],"0012":["IS","AcquisitionNumber"],"0013":["IS","InstanceNumber"],"0014":["IS","IsotopeNumber"],"0015":["IS","PhaseNumber"],"0016":["IS","IntervalNumber"],"0017":["IS","TimeSlotNumber"],"0018":["IS","AngleNumber"],"0019":["IS","ItemNumber"],"0020":["CS","PatientOrientation"],"0022":["IS","OverlayNumber"],"0024":["IS","CurveNumber"],"0026":["IS","LUTNumber"],"0030":["DS","ImagePosition"],"0032":["DS","ImagePositionPatient"],"0035":["DS","ImageOrientation"],"0037":["DS","ImageOrientationPatient"],"0050":["DS","Location"],"0052":["UI","FrameOfReferenceUID"],"0060":["CS","Laterality"],"0062":["CS","ImageLaterality"],"0070":["LO","ImageGeometryType"],"0080":["CS","MaskingImage"],"00AA":["IS","ReportNumber"],"0100":["IS","TemporalPositionIdentifier"],"0105":["IS","NumberOfTemporalPositions"],"0110":["DS","TemporalResolution"],"0200":["UI","SynchronizationFrameOfReferenceUID"],"0242":["UI","SOPInstanceUIDOfConcatenationSource"],1e3:["IS","SeriesInStudy"],1001:["IS","AcquisitionsInSeries"],1002:["IS","ImagesInAcquisition"],1003:["IS","ImagesInSeries"],1004:["IS","AcquisitionsInStudy"],1005:["IS","ImagesInStudy"],1020:["LO","Reference"],1040:["LO","PositionReferenceIndicator"],1041:["DS","SliceLocation"],1070:["IS","OtherStudyNumbers"],1200:["IS","NumberOfPatientRelatedStudies"],1202:["IS","NumberOfPatientRelatedSeries"],1204:["IS","NumberOfPatientRelatedInstances"],1206:["IS","NumberOfStudyRelatedSeries"],1208:["IS","NumberOfStudyRelatedInstances"],1209:["IS","NumberOfSeriesRelatedInstances"],3401:["CS","ModifyingDeviceID"],3402:["CS","ModifiedImageID"],3403:["DA","ModifiedImageDate"],3404:["LO","ModifyingDeviceManufacturer"],3405:["TM","ModifiedImageTime"],3406:["LO","ModifiedImageDescription"],4e3:["LT","ImageComments"],5e3:["AT","OriginalImageIdentification"],5002:["LO","OriginalImageIdentificationNomenclature"],9056:["SH","StackID"],9057:["UL","InStackPositionNumber"],9071:["SQ","FrameAnatomySequence"],9072:["CS","FrameLaterality"],9111:["SQ","FrameContentSequence"],9113:["SQ","PlanePositionSequence"],9116:["SQ","PlaneOrientationSequence"],9128:["UL","TemporalPositionIndex"],9153:["FD","NominalCardiacTriggerDelayTime"],9154:["FL","NominalCardiacTriggerTimePriorToRPeak"],9155:["FL","ActualCardiacTriggerTimePriorToRPeak"],9156:["US","FrameAcquisitionNumber"],9157:["UL","DimensionIndexValues"],9158:["LT","FrameComments"],9161:["UI","ConcatenationUID"],9162:["US","InConcatenationNumber"],9163:["US","InConcatenationTotalNumber"],9164:["UI","DimensionOrganizationUID"],9165:["AT","DimensionIndexPointer"],9167:["AT","FunctionalGroupPointer"],9213:["LO","DimensionIndexPrivateCreator"],9221:["SQ","DimensionOrganizationSequence"],9222:["SQ","DimensionIndexSequence"],9228:["UL","ConcatenationFrameOffsetNumber"],9238:["LO","FunctionalGroupPrivateCreator"],9241:["FL","NominalPercentageOfCardiacPhase"],9245:["FL","NominalPercentageOfRespiratoryPhase"],9246:["FL","StartingRespiratoryAmplitude"],9247:["CS","StartingRespiratoryPhase"],9248:["FL","EndingRespiratoryAmplitude"],9249:["CS","EndingRespiratoryPhase"],9250:["CS","RespiratoryTriggerType"],9251:["FD","RRIntervalTimeNominal"],9252:["FD","ActualCardiacTriggerDelayTime"],9253:["SQ","RespiratorySynchronizationSequence"],9254:["FD","RespiratoryIntervalTime"],9255:["FD","NominalRespiratoryTriggerDelayTime"],9256:["FD","RespiratoryTriggerDelayThreshold"],9257:["FD","ActualRespiratoryTriggerDelayTime"],9301:["FD","ImagePositionVolume"],9302:["FD","ImageOrientationVolume"],9307:["CS","UltrasoundAcquisitionGeometry"],9308:["FD","ApexPosition"],9309:["FD","VolumeToTransducerMappingMatrix"],"930A":["FD","VolumeToTableMappingMatrix"],"930C":["CS","PatientFrameOfReferenceSource"],"930D":["FD","TemporalPositionTimeOffset"],"930E":["SQ","PlanePositionVolumeSequence"],"930F":["SQ","PlaneOrientationVolumeSequence"],9310:["SQ","TemporalPositionSequence"],9311:["CS","DimensionOrganizationType"],9312:["UI","VolumeFrameOfReferenceUID"],9313:["UI","TableFrameOfReferenceUID"],9421:["LO","DimensionDescriptionLabel"],9450:["SQ","PatientOrientationInFrameSequence"],9453:["LO","FrameLabel"],9518:["US","AcquisitionIndex"],9529:["SQ","ContributingSOPInstancesReferenceSequence"],9536:["US","ReconstructionIndex"]},"0022":{"0001":["US","LightPathFilterPassThroughWavelength"],"0002":["US","LightPathFilterPassBand"],"0003":["US","ImagePathFilterPassThroughWavelength"],"0004":["US","ImagePathFilterPassBand"],"0005":["CS","PatientEyeMovementCommanded"],"0006":["SQ","PatientEyeMovementCommandCodeSequence"],"0007":["FL","SphericalLensPower"],"0008":["FL","CylinderLensPower"],"0009":["FL","CylinderAxis"],"000A":["FL","EmmetropicMagnification"],"000B":["FL","IntraOcularPressure"],"000C":["FL","HorizontalFieldOfView"],"000D":["CS","PupilDilated"],"000E":["FL","DegreeOfDilation"],"0010":["FL","StereoBaselineAngle"],"0011":["FL","StereoBaselineDisplacement"],"0012":["FL","StereoHorizontalPixelOffset"],"0013":["FL","StereoVerticalPixelOffset"],"0014":["FL","StereoRotation"],"0015":["SQ","AcquisitionDeviceTypeCodeSequence"],"0016":["SQ","IlluminationTypeCodeSequence"],"0017":["SQ","LightPathFilterTypeStackCodeSequence"],"0018":["SQ","ImagePathFilterTypeStackCodeSequence"],"0019":["SQ","LensesCodeSequence"],"001A":["SQ","ChannelDescriptionCodeSequence"],"001B":["SQ","RefractiveStateSequence"],"001C":["SQ","MydriaticAgentCodeSequence"],"001D":["SQ","RelativeImagePositionCodeSequence"],"001E":["FL","CameraAngleOfView"],"0020":["SQ","StereoPairsSequence"],"0021":["SQ","LeftImageSequence"],"0022":["SQ","RightImageSequence"],"0030":["FL","AxialLengthOfTheEye"],"0031":["SQ","OphthalmicFrameLocationSequence"],"0032":["FL","ReferenceCoordinates"],"0035":["FL","DepthSpatialResolution"],"0036":["FL","MaximumDepthDistortion"],"0037":["FL","AlongScanSpatialResolution"],"0038":["FL","MaximumAlongScanDistortion"],"0039":["CS","OphthalmicImageOrientation"],"0041":["FL","DepthOfTransverseImage"],"0042":["SQ","MydriaticAgentConcentrationUnitsSequence"],"0048":["FL","AcrossScanSpatialResolution"],"0049":["FL","MaximumAcrossScanDistortion"],"004E":["DS","MydriaticAgentConcentration"],"0055":["FL","IlluminationWaveLength"],"0056":["FL","IlluminationPower"],"0057":["FL","IlluminationBandwidth"],"0058":["SQ","MydriaticAgentSequence"],1007:["SQ","OphthalmicAxialMeasurementsRightEyeSequence"],1008:["SQ","OphthalmicAxialMeasurementsLeftEyeSequence"],1010:["CS","OphthalmicAxialLengthMeasurementsType"],1019:["FL","OphthalmicAxialLength"],1024:["SQ","LensStatusCodeSequence"],1025:["SQ","VitreousStatusCodeSequence"],1028:["SQ","IOLFormulaCodeSequence"],1029:["LO","IOLFormulaDetail"],1033:["FL","KeratometerIndex"],1035:["SQ","SourceOfOphthalmicAxialLengthCodeSequence"],1037:["FL","TargetRefraction"],1039:["CS","RefractiveProcedureOccurred"],1040:["SQ","RefractiveSurgeryTypeCodeSequence"],1044:["SQ","OphthalmicUltrasoundAxialMeasurementsTypeCodeSequence"],1050:["SQ","OphthalmicAxialLengthMeasurementsSequence"],1053:["FL","IOLPower"],1054:["FL","PredictedRefractiveError"],1059:["FL","OphthalmicAxialLengthVelocity"],1065:["LO","LensStatusDescription"],1066:["LO","VitreousStatusDescription"],1090:["SQ","IOLPowerSequence"],1092:["SQ","LensConstantSequence"],1093:["LO","IOLManufacturer"],1094:["LO","LensConstantDescription"],1096:["SQ","KeratometryMeasurementTypeCodeSequence"],1100:["SQ","ReferencedOphthalmicAxialMeasurementsSequence"],1101:["SQ","OphthalmicAxialLengthMeasurementsSegmentNameCodeSequence"],1103:["SQ","RefractiveErrorBeforeRefractiveSurgeryCodeSequence"],1121:["FL","IOLPowerForExactEmmetropia"],1122:["FL","IOLPowerForExactTargetRefraction"],1125:["SQ","AnteriorChamberDepthDefinitionCodeSequence"],1130:["FL","LensThickness"],1131:["FL","AnteriorChamberDepth"],1132:["SQ","SourceOfLensThicknessDataCodeSequence"],1133:["SQ","SourceOfAnteriorChamberDepthDataCodeSequence"],1135:["SQ","SourceOfRefractiveErrorDataCodeSequence"],1140:["CS","OphthalmicAxialLengthMeasurementModified"],1150:["SQ","OphthalmicAxialLengthDataSourceCodeSequence"],1153:["SQ","OphthalmicAxialLengthAcquisitionMethodCodeSequence"],1155:["FL","SignalToNoiseRatio"],1159:["LO","OphthalmicAxialLengthDataSourceDescription"],1210:["SQ","OphthalmicAxialLengthMeasurementsTotalLengthSequence"],1211:["SQ","OphthalmicAxialLengthMeasurementsSegmentalLengthSequence"],1212:["SQ","OphthalmicAxialLengthMeasurementsLengthSummationSequence"],1220:["SQ","UltrasoundOphthalmicAxialLengthMeasurementsSequence"],1225:["SQ","OpticalOphthalmicAxialLengthMeasurementsSequence"],1230:["SQ","UltrasoundSelectedOphthalmicAxialLengthSequence"],1250:["SQ","OphthalmicAxialLengthSelectionMethodCodeSequence"],1255:["SQ","OpticalSelectedOphthalmicAxialLengthSequence"],1257:["SQ","SelectedSegmentalOphthalmicAxialLengthSequence"],1260:["SQ","SelectedTotalOphthalmicAxialLengthSequence"],1262:["SQ","OphthalmicAxialLengthQualityMetricSequence"],1273:["LO","OphthalmicAxialLengthQualityMetricTypeDescription"],1300:["SQ","IntraocularLensCalculationsRightEyeSequence"],1310:["SQ","IntraocularLensCalculationsLeftEyeSequence"],1330:["SQ","ReferencedOphthalmicAxialLengthMeasurementQCImageSequence"]},"0024":{"0010":["FL","VisualFieldHorizontalExtent"],"0011":["FL","VisualFieldVerticalExtent"],"0012":["CS","VisualFieldShape"],"0016":["SQ","ScreeningTestModeCodeSequence"],"0018":["FL","MaximumStimulusLuminance"],"0020":["FL","BackgroundLuminance"],"0021":["SQ","StimulusColorCodeSequence"],"0024":["SQ","BackgroundIlluminationColorCodeSequence"],"0025":["FL","StimulusArea"],"0028":["FL","StimulusPresentationTime"],"0032":["SQ","FixationSequence"],"0033":["SQ","FixationMonitoringCodeSequence"],"0034":["SQ","VisualFieldCatchTrialSequence"],"0035":["US","FixationCheckedQuantity"],"0036":["US","PatientNotProperlyFixatedQuantity"],"0037":["CS","PresentedVisualStimuliDataFlag"],"0038":["US","NumberOfVisualStimuli"],"0039":["CS","ExcessiveFixationLossesDataFlag"],"0040":["CS","ExcessiveFixationLosses"],"0042":["US","StimuliRetestingQuantity"],"0044":["LT","CommentsOnPatientPerformanceOfVisualField"],"0045":["CS","FalseNegativesEstimateFlag"],"0046":["FL","FalseNegativesEstimate"],"0048":["US","NegativeCatchTrialsQuantity"],"0050":["US","FalseNegativesQuantity"],"0051":["CS","ExcessiveFalseNegativesDataFlag"],"0052":["CS","ExcessiveFalseNegatives"],"0053":["CS","FalsePositivesEstimateFlag"],"0054":["FL","FalsePositivesEstimate"],"0055":["CS","CatchTrialsDataFlag"],"0056":["US","PositiveCatchTrialsQuantity"],"0057":["CS","TestPointNormalsDataFlag"],"0058":["SQ","TestPointNormalsSequence"],"0059":["CS","GlobalDeviationProbabilityNormalsFlag"],"0060":["US","FalsePositivesQuantity"],"0061":["CS","ExcessiveFalsePositivesDataFlag"],"0062":["CS","ExcessiveFalsePositives"],"0063":["CS","VisualFieldTestNormalsFlag"],"0064":["SQ","ResultsNormalsSequence"],"0065":["SQ","AgeCorrectedSensitivityDeviationAlgorithmSequence"],"0066":["FL","GlobalDeviationFromNormal"],"0067":["SQ","GeneralizedDefectSensitivityDeviationAlgorithmSequence"],"0068":["FL","LocalizedDeviationfromNormal"],"0069":["LO","PatientReliabilityIndicator"],"0070":["FL","VisualFieldMeanSensitivity"],"0071":["FL","GlobalDeviationProbability"],"0072":["CS","LocalDeviationProbabilityNormalsFlag"],"0073":["FL","LocalizedDeviationProbability"],"0074":["CS","ShortTermFluctuationCalculated"],"0075":["FL","ShortTermFluctuation"],"0076":["CS","ShortTermFluctuationProbabilityCalculated"],"0077":["FL","ShortTermFluctuationProbability"],"0078":["CS","CorrectedLocalizedDeviationFromNormalCalculated"],"0079":["FL","CorrectedLocalizedDeviationFromNormal"],"0080":["CS","CorrectedLocalizedDeviationFromNormalProbabilityCalculated"],"0081":["FL","CorrectedLocalizedDeviationFromNormalProbability"],"0083":["SQ","GlobalDeviationProbabilitySequence"],"0085":["SQ","LocalizedDeviationProbabilitySequence"],"0086":["CS","FovealSensitivityMeasured"],"0087":["FL","FovealSensitivity"],"0088":["FL","VisualFieldTestDuration"],"0089":["SQ","VisualFieldTestPointSequence"],"0090":["FL","VisualFieldTestPointXCoordinate"],"0091":["FL","VisualFieldTestPointYCoordinate"],"0092":["FL","AgeCorrectedSensitivityDeviationValue"],"0093":["CS","StimulusResults"],"0094":["FL","SensitivityValue"],"0095":["CS","RetestStimulusSeen"],"0096":["FL","RetestSensitivityValue"],"0097":["SQ","VisualFieldTestPointNormalsSequence"],"0098":["FL","QuantifiedDefect"],"0100":["FL","AgeCorrectedSensitivityDeviationProbabilityValue"],"0102":["CS","GeneralizedDefectCorrectedSensitivityDeviationFlag "],"0103":["FL","GeneralizedDefectCorrectedSensitivityDeviationValue "],"0104":["FL","GeneralizedDefectCorrectedSensitivityDeviationProbabilityValue"],"0105":["FL ","MinimumSensitivityValue"],"0106":["CS","BlindSpotLocalized"],"0107":["FL","BlindSpotXCoordinate"],"0108":["FL","BlindSpotYCoordinate "],"0110":["SQ","VisualAcuityMeasurementSequence"],"0112":["SQ","RefractiveParametersUsedOnPatientSequence"],"0113":["CS","MeasurementLaterality"],"0114":["SQ","OphthalmicPatientClinicalInformationLeftEyeSequence"],"0115":["SQ","OphthalmicPatientClinicalInformationRightEyeSequence"],"0117":["CS","FovealPointNormativeDataFlag"],"0118":["FL","FovealPointProbabilityValue"],"0120":["CS","ScreeningBaselineMeasured"],"0122":["SQ","ScreeningBaselineMeasuredSequence"],"0124":["CS","ScreeningBaselineType"],"0126":["FL","ScreeningBaselineValue"],"0202":["LO","AlgorithmSource"],"0306":["LO","DataSetName"],"0307":["LO","DataSetVersion"],"0308":["LO","DataSetSource"],"0309":["LO","DataSetDescription"],"0317":["SQ","VisualFieldTestReliabilityGlobalIndexSequence"],"0320":["SQ","VisualFieldGlobalResultsIndexSequence"],"0325":["SQ","DataObservationSequence"],"0338":["CS","IndexNormalsFlag"],"0341":["FL","IndexProbability"],"0344":["SQ","IndexProbabilitySequence"]},"0028":{"0002":["US","SamplesPerPixel"],"0003":["US","SamplesPerPixelUsed"],"0004":["CS","PhotometricInterpretation"],"0005":["US","ImageDimensions"],"0006":["US","PlanarConfiguration"],"0008":["IS","NumberOfFrames"],"0009":["AT","FrameIncrementPointer"],"000A":["AT","FrameDimensionPointer"],"0010":["US","Rows"],"0011":["US","Columns"],"0012":["US","Planes"],"0014":["US","UltrasoundColorDataPresent"],"0030":["DS","PixelSpacing"],"0031":["DS","ZoomFactor"],"0032":["DS","ZoomCenter"],"0034":["IS","PixelAspectRatio"],"0040":["CS","ImageFormat"],"0050":["LO","ManipulatedImage"],"0051":["CS","CorrectedImage"],"005F":["LO","CompressionRecognitionCode"],"0060":["CS","CompressionCode"],"0061":["SH","CompressionOriginator"],"0062":["LO","CompressionLabel"],"0063":["SH","CompressionDescription"],"0065":["CS","CompressionSequence"],"0066":["AT","CompressionStepPointers"],"0068":["US","RepeatInterval"],"0069":["US","BitsGrouped"],"0070":["US","PerimeterTable"],"0071":["SS","PerimeterValue"],"0080":["US","PredictorRows"],"0081":["US","PredictorColumns"],"0082":["US","PredictorConstants"],"0090":["CS","BlockedPixels"],"0091":["US","BlockRows"],"0092":["US","BlockColumns"],"0093":["US","RowOverlap"],"0094":["US","ColumnOverlap"],"0100":["US","BitsAllocated"],"0101":["US","BitsStored"],"0102":["US","HighBit"],"0103":["US","PixelRepresentation"],"0104":["SS","SmallestValidPixelValue"],"0105":["SS","LargestValidPixelValue"],"0106":["SS","SmallestImagePixelValue"],"0107":["SS","LargestImagePixelValue"],"0108":["SS","SmallestPixelValueInSeries"],"0109":["SS","LargestPixelValueInSeries"],"0110":["SS","SmallestImagePixelValueInPlane"],"0111":["SS","LargestImagePixelValueInPlane"],"0120":["SS","PixelPaddingValue"],"0121":["SS","PixelPaddingRangeLimit"],"0200":["US","ImageLocation"],"0300":["CS","QualityControlImage"],"0301":["CS","BurnedInAnnotation"],"0302":["CS","RecognizableVisualFeatures"],"0303":["CS","LongitudinalTemporalInformationModified"],"0400":["LO","TransformLabel"],"0401":["LO","TransformVersionNumber"],"0402":["US","NumberOfTransformSteps"],"0403":["LO","SequenceOfCompressedData"],"0404":["AT","DetailsOfCoefficients"],"0700":["LO","DCTLabel"],"0701":["CS","DataBlockDescription"],"0702":["AT","DataBlock"],"0710":["US","NormalizationFactorFormat"],"0720":["US","ZonalMapNumberFormat"],"0721":["AT","ZonalMapLocation"],"0722":["US","ZonalMapFormat"],"0730":["US","AdaptiveMapFormat"],"0740":["US","CodeNumberFormat"],"0A02":["CS","PixelSpacingCalibrationType"],"0A04":["LO","PixelSpacingCalibrationDescription"],1040:["CS","PixelIntensityRelationship"],1041:["SS","PixelIntensityRelationshipSign"],1050:["DS","WindowCenter"],1051:["DS","WindowWidth"],1052:["DS","RescaleIntercept"],1053:["DS","RescaleSlope"],1054:["LO","RescaleType"],1055:["LO","WindowCenterWidthExplanation"],1056:["CS","VOILUTFunction"],1080:["CS","GrayScale"],1090:["CS","RecommendedViewingMode"],1100:["SS","GrayLookupTableDescriptor"],1101:["SS","RedPaletteColorLookupTableDescriptor"],1102:["SS","GreenPaletteColorLookupTableDescriptor"],1103:["SS","BluePaletteColorLookupTableDescriptor"],1104:["US","AlphaPaletteColorLookupTableDescriptor"],1111:["SS","LargeRedPaletteColorLookupTableDescriptor"],1112:["SS","LargeGreenPaletteColorLookupTableDescriptor"],1113:["SS","LargeBluePaletteColorLookupTableDescriptor"],1199:["UI","PaletteColorLookupTableUID"],1200:["OW","GrayLookupTableData"],1201:["OW","RedPaletteColorLookupTableData"],1202:["OW","GreenPaletteColorLookupTableData"],1203:["OW","BluePaletteColorLookupTableData"],1204:["OW","AlphaPaletteColorLookupTableData"],1211:["OW","LargeRedPaletteColorLookupTableData"],1212:["OW","LargeGreenPaletteColorLookupTableData"],1213:["OW","LargeBluePaletteColorLookupTableData"],1214:["UI","LargePaletteColorLookupTableUID"],1221:["OW","SegmentedRedPaletteColorLookupTableData"],1222:["OW","SegmentedGreenPaletteColorLookupTableData"],1223:["OW","SegmentedBluePaletteColorLookupTableData"],1300:["CS","BreastImplantPresent"],1350:["CS","PartialView"],1351:["ST","PartialViewDescription"],1352:["SQ","PartialViewCodeSequence"],"135A":["CS","SpatialLocationsPreserved"],1401:["SQ","DataFrameAssignmentSequence"],1402:["CS","DataPathAssignment"],1403:["US","BitsMappedToColorLookupTable"],1404:["SQ","BlendingLUT1Sequence"],1405:["CS","BlendingLUT1TransferFunction"],1406:["FD","BlendingWeightConstant"],1407:["US","BlendingLookupTableDescriptor"],1408:["OW","BlendingLookupTableData"],"140B":["SQ","EnhancedPaletteColorLookupTableSequence"],"140C":["SQ","BlendingLUT2Sequence"],"140D":["CS","BlendingLUT2TransferFunction"],"140E":["CS","DataPathID"],"140F":["CS","RGBLUTTransferFunction"],1410:["CS","AlphaLUTTransferFunction"],2e3:["OB","ICCProfile"],2110:["CS","LossyImageCompression"],2112:["DS","LossyImageCompressionRatio"],2114:["CS","LossyImageCompressionMethod"],3e3:["SQ","ModalityLUTSequence"],3002:["SS","LUTDescriptor"],3003:["LO","LUTExplanation"],3004:["LO","ModalityLUTType"],3006:["OW","LUTData"],3010:["SQ","VOILUTSequence"],3110:["SQ","SoftcopyVOILUTSequence"],4e3:["LT","ImagePresentationComments"],5e3:["SQ","BiPlaneAcquisitionSequence"],6010:["US","RepresentativeFrameNumber"],6020:["US","FrameNumbersOfInterest"],6022:["LO","FrameOfInterestDescription"],6023:["CS","FrameOfInterestType"],6030:["US","MaskPointers"],6040:["US","RWavePointer"],6100:["SQ","MaskSubtractionSequence"],6101:["CS","MaskOperation"],6102:["US","ApplicableFrameRange"],6110:["US","MaskFrameNumbers"],6112:["US","ContrastFrameAveraging"],6114:["FL","MaskSubPixelShift"],6120:["SS","TIDOffset"],6190:["ST","MaskOperationExplanation"],"7FE0":["UT","PixelDataProviderURL"],9001:["UL","DataPointRows"],9002:["UL","DataPointColumns"],9003:["CS","SignalDomainColumns"],9099:["US","LargestMonochromePixelValue"],9108:["CS","DataRepresentation"],9110:["SQ","PixelMeasuresSequence"],9132:["SQ","FrameVOILUTSequence"],9145:["SQ","PixelValueTransformationSequence"],9235:["CS","SignalDomainRows"],9411:["FL","DisplayFilterPercentage"],9415:["SQ","FramePixelShiftSequence"],9416:["US","SubtractionItemID"],9422:["SQ","PixelIntensityRelationshipLUTSequence"],9443:["SQ","FramePixelDataPropertiesSequence"],9444:["CS","GeometricalProperties"],9445:["FL","GeometricMaximumDistortion"],9446:["CS","ImageProcessingApplied"],9454:["CS","MaskSelectionMode"],9474:["CS","LUTFunction"],9478:["FL","MaskVisibilityPercentage"],9501:["SQ","PixelShiftSequence"],9502:["SQ","RegionPixelShiftSequence"],9503:["SS","VerticesOfTheRegion"],9505:["SQ","MultiFramePresentationSequence"],9506:["US","PixelShiftFrameRange"],9507:["US","LUTFrameRange"],9520:["DS","ImageToEquipmentMappingMatrix"],9537:["CS","EquipmentCoordinateSystemIdentification"]},"0032":{"000A":["CS","StudyStatusID"],"000C":["CS","StudyPriorityID"],"0012":["LO","StudyIDIssuer"],"0032":["DA","StudyVerifiedDate"],"0033":["TM","StudyVerifiedTime"],"0034":["DA","StudyReadDate"],"0035":["TM","StudyReadTime"],1e3:["DA","ScheduledStudyStartDate"],1001:["TM","ScheduledStudyStartTime"],1010:["DA","ScheduledStudyStopDate"],1011:["TM","ScheduledStudyStopTime"],1020:["LO","ScheduledStudyLocation"],1021:["AE","ScheduledStudyLocationAETitle"],1030:["LO","ReasonForStudy"],1031:["SQ","RequestingPhysicianIdentificationSequence"],1032:["PN","RequestingPhysician"],1033:["LO","RequestingService"],1034:["SQ","RequestingServiceCodeSequence"],1040:["DA","StudyArrivalDate"],1041:["TM","StudyArrivalTime"],1050:["DA","StudyCompletionDate"],1051:["TM","StudyCompletionTime"],1055:["CS","StudyComponentStatusID"],1060:["LO","RequestedProcedureDescription"],1064:["SQ","RequestedProcedureCodeSequence"],1070:["LO","RequestedContrastAgent"],4e3:["LT","StudyComments"]},"0038":{"0004":["SQ","ReferencedPatientAliasSequence"],"0008":["CS","VisitStatusID"],"0010":["LO","AdmissionID"],"0011":["LO","IssuerOfAdmissionID"],"0014":["SQ","IssuerOfAdmissionIDSequence"],"0016":["LO","RouteOfAdmissions"],"001A":["DA","ScheduledAdmissionDate"],"001B":["TM","ScheduledAdmissionTime"],"001C":["DA","ScheduledDischargeDate"],"001D":["TM","ScheduledDischargeTime"],"001E":["LO","ScheduledPatientInstitutionResidence"],"0020":["DA","AdmittingDate"],"0021":["TM","AdmittingTime"],"0030":["DA","DischargeDate"],"0032":["TM","DischargeTime"],"0040":["LO","DischargeDiagnosisDescription"],"0044":["SQ","DischargeDiagnosisCodeSequence"],"0050":["LO","SpecialNeeds"],"0060":["LO","ServiceEpisodeID"],"0061":["LO","IssuerOfServiceEpisodeID"],"0062":["LO","ServiceEpisodeDescription"],"0064":["SQ","IssuerOfServiceEpisodeIDSequence"],"0100":["SQ","PertinentDocumentsSequence"],"0300":["LO","CurrentPatientLocation"],"0400":["LO","PatientInstitutionResidence"],"0500":["LO","PatientState"],"0502":["SQ","PatientClinicalTrialParticipationSequence"],4e3:["LT","VisitComments"]},"003A":{"0004":["CS","WaveformOriginality"],"0005":["US","NumberOfWaveformChannels"],"0010":["UL","NumberOfWaveformSamples"],"001A":["DS","SamplingFrequency"],"0020":["SH","MultiplexGroupLabel"],"0200":["SQ","ChannelDefinitionSequence"],"0202":["IS","WaveformChannelNumber"],"0203":["SH","ChannelLabel"],"0205":["CS","ChannelStatus"],"0208":["SQ","ChannelSourceSequence"],"0209":["SQ","ChannelSourceModifiersSequence"],"020A":["SQ","SourceWaveformSequence"],"020C":["LO","ChannelDerivationDescription"],"0210":["DS","ChannelSensitivity"],"0211":["SQ","ChannelSensitivityUnitsSequence"],"0212":["DS","ChannelSensitivityCorrectionFactor"],"0213":["DS","ChannelBaseline"],"0214":["DS","ChannelTimeSkew"],"0215":["DS","ChannelSampleSkew"],"0218":["DS","ChannelOffset"],"021A":["US","WaveformBitsStored"],"0220":["DS","FilterLowFrequency"],"0221":["DS","FilterHighFrequency"],"0222":["DS","NotchFilterFrequency"],"0223":["DS","NotchFilterBandwidth"],"0230":["FL","WaveformDataDisplayScale"],"0231":["US","WaveformDisplayBackgroundCIELabValue"],"0240":["SQ","WaveformPresentationGroupSequence"],"0241":["US","PresentationGroupNumber"],"0242":["SQ","ChannelDisplaySequence"],"0244":["US","ChannelRecommendedDisplayCIELabValue"],"0245":["FL","ChannelPosition"],"0246":["CS","DisplayShadingFlag"],"0247":["FL","FractionalChannelDisplayScale"],"0248":["FL","AbsoluteChannelDisplayScale"],"0300":["SQ","MultiplexedAudioChannelsDescriptionCodeSequence"],"0301":["IS","ChannelIdentificationCode"],"0302":["CS","ChannelMode"]},"0040":{"0001":["AE","ScheduledStationAETitle"],"0002":["DA","ScheduledProcedureStepStartDate"],"0003":["TM","ScheduledProcedureStepStartTime"],"0004":["DA","ScheduledProcedureStepEndDate"],"0005":["TM","ScheduledProcedureStepEndTime"],"0006":["PN","ScheduledPerformingPhysicianName"],"0007":["LO","ScheduledProcedureStepDescription"],"0008":["SQ","ScheduledProtocolCodeSequence"],"0009":["SH","ScheduledProcedureStepID"],"000A":["SQ","StageCodeSequence"],"000B":["SQ","ScheduledPerformingPhysicianIdentificationSequence"],"0010":["SH","ScheduledStationName"],"0011":["SH","ScheduledProcedureStepLocation"],"0012":["LO","PreMedication"],"0020":["CS","ScheduledProcedureStepStatus"],"0026":["SQ","OrderPlacerIdentifierSequence"],"0027":["SQ","OrderFillerIdentifierSequence"],"0031":["UT","LocalNamespaceEntityID"],"0032":["UT","UniversalEntityID"],"0033":["CS","UniversalEntityIDType"],"0035":["CS","IdentifierTypeCode"],"0036":["SQ","AssigningFacilitySequence"],"0039":["SQ","AssigningJurisdictionCodeSequence"],"003A":["SQ","AssigningAgencyOrDepartmentCodeSequence"],"0100":["SQ","ScheduledProcedureStepSequence"],"0220":["SQ","ReferencedNonImageCompositeSOPInstanceSequence"],"0241":["AE","PerformedStationAETitle"],"0242":["SH","PerformedStationName"],"0243":["SH","PerformedLocation"],"0244":["DA","PerformedProcedureStepStartDate"],"0245":["TM","PerformedProcedureStepStartTime"],"0250":["DA","PerformedProcedureStepEndDate"],"0251":["TM","PerformedProcedureStepEndTime"],"0252":["CS","PerformedProcedureStepStatus"],"0253":["SH","PerformedProcedureStepID"],"0254":["LO","PerformedProcedureStepDescription"],"0255":["LO","PerformedProcedureTypeDescription"],"0260":["SQ","PerformedProtocolCodeSequence"],"0261":["CS","PerformedProtocolType"],"0270":["SQ","ScheduledStepAttributesSequence"],"0275":["SQ","RequestAttributesSequence"],"0280":["ST","CommentsOnThePerformedProcedureStep"],"0281":["SQ","PerformedProcedureStepDiscontinuationReasonCodeSequence"],"0293":["SQ","QuantitySequence"],"0294":["DS","Quantity"],"0295":["SQ","MeasuringUnitsSequence"],"0296":["SQ","BillingItemSequence"],"0300":["US","TotalTimeOfFluoroscopy"],"0301":["US","TotalNumberOfExposures"],"0302":["US","EntranceDose"],"0303":["US","ExposedArea"],"0306":["DS","DistanceSourceToEntrance"],"0307":["DS","DistanceSourceToSupport"],"030E":["SQ","ExposureDoseSequence"],"0310":["ST","CommentsOnRadiationDose"],"0312":["DS","XRayOutput"],"0314":["DS","HalfValueLayer"],"0316":["DS","OrganDose"],"0318":["CS","OrganExposed"],"0320":["SQ","BillingProcedureStepSequence"],"0321":["SQ","FilmConsumptionSequence"],"0324":["SQ","BillingSuppliesAndDevicesSequence"],"0330":["SQ","ReferencedProcedureStepSequence"],"0340":["SQ","PerformedSeriesSequence"],"0400":["LT","CommentsOnTheScheduledProcedureStep"],"0440":["SQ","ProtocolContextSequence"],"0441":["SQ","ContentItemModifierSequence"],"0500":["SQ","ScheduledSpecimenSequence"],"050A":["LO","SpecimenAccessionNumber"],"0512":["LO","ContainerIdentifier"],"0513":["SQ","IssuerOfTheContainerIdentifierSequence"],"0515":["SQ","AlternateContainerIdentifierSequence"],"0518":["SQ","ContainerTypeCodeSequence"],"051A":["LO","ContainerDescription"],"0520":["SQ","ContainerComponentSequence"],"0550":["SQ","SpecimenSequence"],"0551":["LO","SpecimenIdentifier"],"0552":["SQ","SpecimenDescriptionSequenceTrial"],"0553":["ST","SpecimenDescriptionTrial"],"0554":["UI","SpecimenUID"],"0555":["SQ","AcquisitionContextSequence"],"0556":["ST","AcquisitionContextDescription"],"059A":["SQ","SpecimenTypeCodeSequence"],"0560":["SQ","SpecimenDescriptionSequence"],"0562":["SQ","IssuerOfTheSpecimenIdentifierSequence"],"0600":["LO","SpecimenShortDescription"],"0602":["UT","SpecimenDetailedDescription"],"0610":["SQ","SpecimenPreparationSequence"],"0612":["SQ","SpecimenPreparationStepContentItemSequence"],"0620":["SQ","SpecimenLocalizationContentItemSequence"],"06FA":["LO","SlideIdentifier"],"071A":["SQ","ImageCenterPointCoordinatesSequence"],"072A":["DS","XOffsetInSlideCoordinateSystem"],"073A":["DS","YOffsetInSlideCoordinateSystem"],"074A":["DS","ZOffsetInSlideCoordinateSystem"],"08D8":["SQ","PixelSpacingSequence"],"08DA":["SQ","CoordinateSystemAxisCodeSequence"],"08EA":["SQ","MeasurementUnitsCodeSequence"],"09F8":["SQ","VitalStainCodeSequenceTrial"],1001:["SH","RequestedProcedureID"],1002:["LO","ReasonForTheRequestedProcedure"],1003:["SH","RequestedProcedurePriority"],1004:["LO","PatientTransportArrangements"],1005:["LO","RequestedProcedureLocation"],1006:["SH","PlacerOrderNumberProcedure"],1007:["SH","FillerOrderNumberProcedure"],1008:["LO","ConfidentialityCode"],1009:["SH","ReportingPriority"],"100A":["SQ","ReasonForRequestedProcedureCodeSequence"],1010:["PN","NamesOfIntendedRecipientsOfResults"],1011:["SQ","IntendedRecipientsOfResultsIdentificationSequence"],1012:["SQ","ReasonForPerformedProcedureCodeSequence"],1060:["LO","RequestedProcedureDescriptionTrial"],1101:["SQ","PersonIdentificationCodeSequence"],1102:["ST","PersonAddress"],1103:["LO","PersonTelephoneNumbers"],1400:["LT","RequestedProcedureComments"],2001:["LO","ReasonForTheImagingServiceRequest"],2004:["DA","IssueDateOfImagingServiceRequest"],2005:["TM","IssueTimeOfImagingServiceRequest"],2006:["SH","PlacerOrderNumberImagingServiceRequestRetired"],2007:["SH","FillerOrderNumberImagingServiceRequestRetired"],2008:["PN","OrderEnteredBy"],2009:["SH","OrderEntererLocation"],2010:["SH","OrderCallbackPhoneNumber"],2016:["LO","PlacerOrderNumberImagingServiceRequest"],2017:["LO","FillerOrderNumberImagingServiceRequest"],2400:["LT","ImagingServiceRequestComments"],3001:["LO","ConfidentialityConstraintOnPatientDataDescription"],4001:["CS","GeneralPurposeScheduledProcedureStepStatus"],4002:["CS","GeneralPurposePerformedProcedureStepStatus"],4003:["CS","GeneralPurposeScheduledProcedureStepPriority"],4004:["SQ","ScheduledProcessingApplicationsCodeSequence"],4005:["DT","ScheduledProcedureStepStartDateTime"],4006:["CS","MultipleCopiesFlag"],4007:["SQ","PerformedProcessingApplicationsCodeSequence"],4009:["SQ","HumanPerformerCodeSequence"],4010:["DT","ScheduledProcedureStepModificationDateTime"],4011:["DT","ExpectedCompletionDateTime"],4015:["SQ","ResultingGeneralPurposePerformedProcedureStepsSequence"],4016:["SQ","ReferencedGeneralPurposeScheduledProcedureStepSequence"],4018:["SQ","ScheduledWorkitemCodeSequence"],4019:["SQ","PerformedWorkitemCodeSequence"],4020:["CS","InputAvailabilityFlag"],4021:["SQ","InputInformationSequence"],4022:["SQ","RelevantInformationSequence"],4023:["UI","ReferencedGeneralPurposeScheduledProcedureStepTransactionUID"],4025:["SQ","ScheduledStationNameCodeSequence"],4026:["SQ","ScheduledStationClassCodeSequence"],4027:["SQ","ScheduledStationGeographicLocationCodeSequence"],4028:["SQ","PerformedStationNameCodeSequence"],4029:["SQ","PerformedStationClassCodeSequence"],4030:["SQ","PerformedStationGeographicLocationCodeSequence"],4031:["SQ","RequestedSubsequentWorkitemCodeSequence"],4032:["SQ","NonDICOMOutputCodeSequence"],4033:["SQ","OutputInformationSequence"],4034:["SQ","ScheduledHumanPerformersSequence"],4035:["SQ","ActualHumanPerformersSequence"],4036:["LO","HumanPerformerOrganization"],4037:["PN","HumanPerformerName"],4040:["CS","RawDataHandling"],4041:["CS","InputReadinessState"],4050:["DT","PerformedProcedureStepStartDateTime"],4051:["DT","PerformedProcedureStepEndDateTime"],4052:["DT","ProcedureStepCancellationDateTime"],8302:["DS","EntranceDoseInmGy"],9094:["SQ","ReferencedImageRealWorldValueMappingSequence"],9096:["SQ","RealWorldValueMappingSequence"],9098:["SQ","PixelValueMappingCodeSequence"],9210:["SH","LUTLabel"],9211:["SS","RealWorldValueLastValueMapped"],9212:["FD","RealWorldValueLUTData"],9216:["SS","RealWorldValueFirstValueMapped"],9224:["FD","RealWorldValueIntercept"],9225:["FD","RealWorldValueSlope"],A007:["CS","FindingsFlagTrial"],A010:["CS","RelationshipType"],A020:["SQ","FindingsSequenceTrial"],A021:["UI","FindingsGroupUIDTrial"],A022:["UI","ReferencedFindingsGroupUIDTrial"],A023:["DA","FindingsGroupRecordingDateTrial"],A024:["TM","FindingsGroupRecordingTimeTrial"],A026:["SQ","FindingsSourceCategoryCodeSequenceTrial"],A027:["LO","VerifyingOrganization"],A028:["SQ","DocumentingOrganizationIdentifierCodeSequenceTrial"],A030:["DT","VerificationDateTime"],A032:["DT","ObservationDateTime"],A040:["CS","ValueType"],A043:["SQ","ConceptNameCodeSequence"],A047:["LO","MeasurementPrecisionDescriptionTrial"],A050:["CS","ContinuityOfContent"],A057:["CS","UrgencyOrPriorityAlertsTrial"],A060:["LO","SequencingIndicatorTrial"],A066:["SQ","DocumentIdentifierCodeSequenceTrial"],A067:["PN","DocumentAuthorTrial"],A068:["SQ","DocumentAuthorIdentifierCodeSequenceTrial"],A070:["SQ","IdentifierCodeSequenceTrial"],A073:["SQ","VerifyingObserverSequence"],A074:["OB","ObjectBinaryIdentifierTrial"],A075:["PN","VerifyingObserverName"],A076:["SQ","DocumentingObserverIdentifierCodeSequenceTrial"],A078:["SQ","AuthorObserverSequence"],A07A:["SQ","ParticipantSequence"],A07C:["SQ","CustodialOrganizationSequence"],A080:["CS","ParticipationType"],A082:["DT","ParticipationDateTime"],A084:["CS","ObserverType"],A085:["SQ","ProcedureIdentifierCodeSequenceTrial"],A088:["SQ","VerifyingObserverIdentificationCodeSequence"],A089:["OB","ObjectDirectoryBinaryIdentifierTrial"],A090:["SQ","EquivalentCDADocumentSequence"],A0B0:["US","ReferencedWaveformChannels"],A110:["DA","DateOfDocumentOrVerbalTransactionTrial"],A112:["TM","TimeOfDocumentCreationOrVerbalTransactionTrial"],A120:["DT","DateTime"],A121:["DA","Date"],A122:["TM","Time"],A123:["PN","PersonName"],A124:["UI","UID"],A125:["CS","ReportStatusIDTrial"],A130:["CS","TemporalRangeType"],A132:["UL","ReferencedSamplePositions"],A136:["US","ReferencedFrameNumbers"],A138:["DS","ReferencedTimeOffsets"],A13A:["DT","ReferencedDateTime"],A160:["UT","TextValue"],A167:["SQ","ObservationCategoryCodeSequenceTrial"],A168:["SQ","ConceptCodeSequence"],A16A:["ST","BibliographicCitationTrial"],A170:["SQ","PurposeOfReferenceCodeSequence"],A171:["UI","ObservationUIDTrial"],A172:["UI","ReferencedObservationUIDTrial"],A173:["CS","ReferencedObservationClassTrial"],A174:["CS","ReferencedObjectObservationClassTrial"],A180:["US","AnnotationGroupNumber"],A192:["DA","ObservationDateTrial"],A193:["TM","ObservationTimeTrial"],A194:["CS","MeasurementAutomationTrial"],A195:["SQ","ModifierCodeSequence"],A224:["ST","IdentificationDescriptionTrial"],A290:["CS","CoordinatesSetGeometricTypeTrial"],A296:["SQ","AlgorithmCodeSequenceTrial"],A297:["ST","AlgorithmDescriptionTrial"],A29A:["SL","PixelCoordinatesSetTrial"],A300:["SQ","MeasuredValueSequence"],A301:["SQ","NumericValueQualifierCodeSequence"],A307:["PN","CurrentObserverTrial"],A30A:["DS","NumericValue"],A313:["SQ","ReferencedAccessionSequenceTrial"],A33A:["ST","ReportStatusCommentTrial"],A340:["SQ","ProcedureContextSequenceTrial"],A352:["PN","VerbalSourceTrial"],A353:["ST","AddressTrial"],A354:["LO","TelephoneNumberTrial"],A358:["SQ","VerbalSourceIdentifierCodeSequenceTrial"],A360:["SQ","PredecessorDocumentsSequence"],A370:["SQ","ReferencedRequestSequence"],A372:["SQ","PerformedProcedureCodeSequence"],A375:["SQ","CurrentRequestedProcedureEvidenceSequence"],A380:["SQ","ReportDetailSequenceTrial"],A385:["SQ","PertinentOtherEvidenceSequence"],A390:["SQ","HL7StructuredDocumentReferenceSequence"],A402:["UI","ObservationSubjectUIDTrial"],A403:["CS","ObservationSubjectClassTrial"],A404:["SQ","ObservationSubjectTypeCodeSequenceTrial"],A491:["CS","CompletionFlag"],A492:["LO","CompletionFlagDescription"],A493:["CS","VerificationFlag"],A494:["CS","ArchiveRequested"],A496:["CS","PreliminaryFlag"],A504:["SQ","ContentTemplateSequence"],A525:["SQ","IdenticalDocumentsSequence"],A600:["CS","ObservationSubjectContextFlagTrial"],A601:["CS","ObserverContextFlagTrial"],A603:["CS","ProcedureContextFlagTrial"],A730:["SQ","ContentSequence"],A731:["SQ","RelationshipSequenceTrial"],A732:["SQ","RelationshipTypeCodeSequenceTrial"],A744:["SQ","LanguageCodeSequenceTrial"],A992:["ST","UniformResourceLocatorTrial"],B020:["SQ","WaveformAnnotationSequence"],DB00:["CS","TemplateIdentifier"],DB06:["DT","TemplateVersion"],DB07:["DT","TemplateLocalVersion"],DB0B:["CS","TemplateExtensionFlag"],DB0C:["UI","TemplateExtensionOrganizationUID"],DB0D:["UI","TemplateExtensionCreatorUID"],DB73:["UL","ReferencedContentItemIdentifier"],E001:["ST","HL7InstanceIdentifier"],E004:["DT","HL7DocumentEffectiveTime"],E006:["SQ","HL7DocumentTypeCodeSequence"],E008:["SQ","DocumentClassCodeSequence"],E010:["UT","RetrieveURI"],E011:["UI","RetrieveLocationUID"],E020:["CS","TypeOfInstances"],E021:["SQ","DICOMRetrievalSequence"],E022:["SQ","DICOMMediaRetrievalSequence"],E023:["SQ","WADORetrievalSequence"],E024:["SQ","XDSRetrievalSequence"],E030:["UI","RepositoryUniqueID"],E031:["UI","HomeCommunityID"]},"0042":{"0010":["ST","DocumentTitle"],"0011":["OB","EncapsulatedDocument"],"0012":["LO","MIMETypeOfEncapsulatedDocument"],"0013":["SQ","SourceInstanceSequence"],"0014":["LO","ListOfMIMETypes"]},"0044":{"0001":["ST","ProductPackageIdentifier"],"0002":["CS","SubstanceAdministrationApproval"],"0003":["LT","ApprovalStatusFurtherDescription"],"0004":["DT","ApprovalStatusDateTime"],"0007":["SQ","ProductTypeCodeSequence"],"0008":["LO","ProductName"],"0009":["LT","ProductDescription"],"000A":["LO","ProductLotIdentifier"],"000B":["DT","ProductExpirationDateTime"],"0010":["DT","SubstanceAdministrationDateTime"],"0011":["LO","SubstanceAdministrationNotes"],"0012":["LO","SubstanceAdministrationDeviceID"],"0013":["SQ","ProductParameterSequence"],"0019":["SQ","SubstanceAdministrationParameterSequence"]},"0046":{"0012":["LO","LensDescription"],"0014":["SQ","RightLensSequence"],"0015":["SQ","LeftLensSequence"],"0016":["SQ","UnspecifiedLateralityLensSequence"],"0018":["SQ","CylinderSequence"],"0028":["SQ","PrismSequence"],"0030":["FD","HorizontalPrismPower"],"0032":["CS","HorizontalPrismBase"],"0034":["FD","VerticalPrismPower"],"0036":["CS","VerticalPrismBase"],"0038":["CS","LensSegmentType"],"0040":["FD","OpticalTransmittance"],"0042":["FD","ChannelWidth"],"0044":["FD","PupilSize"],"0046":["FD","CornealSize"],"0050":["SQ","AutorefractionRightEyeSequence"],"0052":["SQ","AutorefractionLeftEyeSequence"],"0060":["FD","DistancePupillaryDistance"],"0062":["FD","NearPupillaryDistance"],"0063":["FD","IntermediatePupillaryDistance"],"0064":["FD","OtherPupillaryDistance"],"0070":["SQ","KeratometryRightEyeSequence"],"0071":["SQ","KeratometryLeftEyeSequence"],"0074":["SQ","SteepKeratometricAxisSequence"],"0075":["FD","RadiusOfCurvature"],"0076":["FD","KeratometricPower"],"0077":["FD","KeratometricAxis"],"0080":["SQ","FlatKeratometricAxisSequence"],"0092":["CS","BackgroundColor"],"0094":["CS","Optotype"],"0095":["CS","OptotypePresentation"],"0097":["SQ","SubjectiveRefractionRightEyeSequence"],"0098":["SQ","SubjectiveRefractionLeftEyeSequence"],"0100":["SQ","AddNearSequence"],"0101":["SQ","AddIntermediateSequence"],"0102":["SQ","AddOtherSequence"],"0104":["FD","AddPower"],"0106":["FD","ViewingDistance"],"0121":["SQ","VisualAcuityTypeCodeSequence"],"0122":["SQ","VisualAcuityRightEyeSequence"],"0123":["SQ","VisualAcuityLeftEyeSequence"],"0124":["SQ","VisualAcuityBothEyesOpenSequence"],"0125":["CS","ViewingDistanceType"],"0135":["SS","VisualAcuityModifiers"],"0137":["FD","DecimalVisualAcuity"],"0139":["LO","OptotypeDetailedDefinition"],"0145":["SQ","ReferencedRefractiveMeasurementsSequence"],"0146":["FD","SpherePower"],"0147":["FD","CylinderPower"]},"0048":{"0001":["FL","ImagedVolumeWidth"],"0002":["FL","ImagedVolumeHeight"],"0003":["FL","ImagedVolumeDepth"],"0006":["UL","TotalPixelMatrixColumns"],"0007":["UL","TotalPixelMatrixRows"],"0008":["SQ","TotalPixelMatrixOriginSequence"],"0010":["CS","SpecimenLabelInImage"],"0011":["CS","FocusMethod"],"0012":["CS","ExtendedDepthOfField"],"0013":["US","NumberOfFocalPlanes"],"0014":["FL","DistanceBetweenFocalPlanes"],"0015":["US","RecommendedAbsentPixelCIELabValue"],"0100":["SQ","IlluminatorTypeCodeSequence"],"0102":["DS","ImageOrientationSlide"],"0105":["SQ","OpticalPathSequence"],"0106":["SH","OpticalPathIdentifier"],"0107":["ST","OpticalPathDescription"],"0108":["SQ","IlluminationColorCodeSequence"],"0110":["SQ","SpecimenReferenceSequence"],"0111":["DS","CondenserLensPower"],"0112":["DS","ObjectiveLensPower"],"0113":["DS","ObjectiveLensNumericalAperture"],"0120":["SQ","PaletteColorLookupTableSequence"],"0200":["SQ","ReferencedImageNavigationSequence"],"0201":["US","TopLeftHandCornerOfLocalizerArea"],"0202":["US","BottomRightHandCornerOfLocalizerArea"],"0207":["SQ","OpticalPathIdentificationSequence"],"021A":["SQ","PlanePositionSlideSequence"],"021E":["SL","RowPositionInTotalImagePixelMatrix"],"021F":["SL","ColumnPositionInTotalImagePixelMatrix"],"0301":["CS","PixelOriginInterpretation"]},"0050":{"0004":["CS","CalibrationImage"],"0010":["SQ","DeviceSequence"],"0012":["SQ","ContainerComponentTypeCodeSequence"],"0013":["FD","ContainerComponentThickness"],"0014":["DS","DeviceLength"],"0015":["FD","ContainerComponentWidth"],"0016":["DS","DeviceDiameter"],"0017":["CS","DeviceDiameterUnits"],"0018":["DS","DeviceVolume"],"0019":["DS","InterMarkerDistance"],"001A":["CS","ContainerComponentMaterial"],"001B":["LO","ContainerComponentID"],"001C":["FD","ContainerComponentLength"],"001D":["FD","ContainerComponentDiameter"],"001E":["LO","ContainerComponentDescription"],"0020":["LO","DeviceDescription"]},"0052":{"0001":["FL","ContrastBolusIngredientPercentByVolume"],"0002":["FD","OCTFocalDistance"],"0003":["FD","BeamSpotSize"],"0004":["FD","EffectiveRefractiveIndex"],"0006":["CS","OCTAcquisitionDomain"],"0007":["FD","OCTOpticalCenterWavelength"],"0008":["FD","AxialResolution"],"0009":["FD","RangingDepth"],"0011":["FD","ALineRate"],"0012":["US","ALinesPerFrame"],"0013":["FD","CatheterRotationalRate"],"0014":["FD","ALinePixelSpacing"],"0016":["SQ","ModeOfPercutaneousAccessSequence"],"0025":["SQ","IntravascularOCTFrameTypeSequence"],"0026":["CS","OCTZOffsetApplied"],"0027":["SQ","IntravascularFrameContentSequence"],"0028":["FD","IntravascularLongitudinalDistance"],"0029":["SQ","IntravascularOCTFrameContentSequence"],"0030":["SS","OCTZOffsetCorrection"],"0031":["CS","CatheterDirectionOfRotation"],"0033":["FD","SeamLineLocation"],"0034":["FD","FirstALineLocation"],"0036":["US","SeamLineIndex"],"0038":["US","NumberOfPaddedAlines"],"0039":["CS","InterpolationType"],"003A":["CS","RefractiveIndexApplied"]},"0054":{"0010":["US","EnergyWindowVector"],"0011":["US","NumberOfEnergyWindows"],"0012":["SQ","EnergyWindowInformationSequence"],"0013":["SQ","EnergyWindowRangeSequence"],"0014":["DS","EnergyWindowLowerLimit"],"0015":["DS","EnergyWindowUpperLimit"],"0016":["SQ","RadiopharmaceuticalInformationSequence"],"0017":["IS","ResidualSyringeCounts"],"0018":["SH","EnergyWindowName"],"0020":["US","DetectorVector"],"0021":["US","NumberOfDetectors"],"0022":["SQ","DetectorInformationSequence"],"0030":["US","PhaseVector"],"0031":["US","NumberOfPhases"],"0032":["SQ","PhaseInformationSequence"],"0033":["US","NumberOfFramesInPhase"],"0036":["IS","PhaseDelay"],"0038":["IS","PauseBetweenFrames"],"0039":["CS","PhaseDescription"],"0050":["US","RotationVector"],"0051":["US","NumberOfRotations"],"0052":["SQ","RotationInformationSequence"],"0053":["US","NumberOfFramesInRotation"],"0060":["US","RRIntervalVector"],"0061":["US","NumberOfRRIntervals"],"0062":["SQ","GatedInformationSequence"],"0063":["SQ","DataInformationSequence"],"0070":["US","TimeSlotVector"],"0071":["US","NumberOfTimeSlots"],"0072":["SQ","TimeSlotInformationSequence"],"0073":["DS","TimeSlotTime"],"0080":["US","SliceVector"],"0081":["US","NumberOfSlices"],"0090":["US","AngularViewVector"],"0100":["US","TimeSliceVector"],"0101":["US","NumberOfTimeSlices"],"0200":["DS","StartAngle"],"0202":["CS","TypeOfDetectorMotion"],"0210":["IS","TriggerVector"],"0211":["US","NumberOfTriggersInPhase"],"0220":["SQ","ViewCodeSequence"],"0222":["SQ","ViewModifierCodeSequence"],"0300":["SQ","RadionuclideCodeSequence"],"0302":["SQ","AdministrationRouteCodeSequence"],"0304":["SQ","RadiopharmaceuticalCodeSequence"],"0306":["SQ","CalibrationDataSequence"],"0308":["US","EnergyWindowNumber"],"0400":["SH","ImageID"],"0410":["SQ","PatientOrientationCodeSequence"],"0412":["SQ","PatientOrientationModifierCodeSequence"],"0414":["SQ","PatientGantryRelationshipCodeSequence"],"0500":["CS","SliceProgressionDirection"],1e3:["CS","SeriesType"],1001:["CS","Units"],1002:["CS","CountsSource"],1004:["CS","ReprojectionMethod"],1006:["CS","SUVType"],1100:["CS","RandomsCorrectionMethod"],1101:["LO","AttenuationCorrectionMethod"],1102:["CS","DecayCorrection"],1103:["LO","ReconstructionMethod"],1104:["LO","DetectorLinesOfResponseUsed"],1105:["LO","ScatterCorrectionMethod"],1200:["DS","AxialAcceptance"],1201:["IS","AxialMash"],1202:["IS","TransverseMash"],1203:["DS","DetectorElementSize"],1210:["DS","CoincidenceWindowWidth"],1220:["CS","SecondaryCountsType"],1300:["DS","FrameReferenceTime"],1310:["IS","PrimaryPromptsCountsAccumulated"],1311:["IS","SecondaryCountsAccumulated"],1320:["DS","SliceSensitivityFactor"],1321:["DS","DecayFactor"],1322:["DS","DoseCalibrationFactor"],1323:["DS","ScatterFractionFactor"],1324:["DS","DeadTimeFactor"],1330:["US","ImageIndex"],1400:["CS","CountsIncluded"],1401:["CS","DeadTimeCorrectionFlag"]},"0060":{3e3:["SQ","HistogramSequence"],3002:["US","HistogramNumberOfBins"],3004:["SS","HistogramFirstBinValue"],3006:["SS","HistogramLastBinValue"],3008:["US","HistogramBinWidth"],3010:["LO","HistogramExplanation"],3020:["UL","HistogramData"]},"0062":{"0001":["CS","SegmentationType"],"0002":["SQ","SegmentSequence"],"0003":["SQ","SegmentedPropertyCategoryCodeSequence"],"0004":["US","SegmentNumber"],"0005":["LO","SegmentLabel"],"0006":["ST","SegmentDescription"],"0008":["CS","SegmentAlgorithmType"],"0009":["LO","SegmentAlgorithmName"],"000A":["SQ","SegmentIdentificationSequence"],"000B":["US","ReferencedSegmentNumber"],"000C":["US","RecommendedDisplayGrayscaleValue"],"000D":["US","RecommendedDisplayCIELabValue"],"000E":["US","MaximumFractionalValue"],"000F":["SQ","SegmentedPropertyTypeCodeSequence"],"0010":["CS","SegmentationFractionalType"]},"0064":{"0002":["SQ","DeformableRegistrationSequence"],"0003":["UI","SourceFrameOfReferenceUID"],"0005":["SQ","DeformableRegistrationGridSequence"],"0007":["UL","GridDimensions"],"0008":["FD","GridResolution"],"0009":["OF","VectorGridData"],"000F":["SQ","PreDeformationMatrixRegistrationSequence"],"0010":["SQ","PostDeformationMatrixRegistrationSequence"]},"0066":{"0001":["UL","NumberOfSurfaces"],"0002":["SQ","SurfaceSequence"],"0003":["UL","SurfaceNumber"],"0004":["LT","SurfaceComments"],"0009":["CS","SurfaceProcessing"],"000A":["FL","SurfaceProcessingRatio"],"000B":["LO","SurfaceProcessingDescription"],"000C":["FL","RecommendedPresentationOpacity"],"000D":["CS","RecommendedPresentationType"],"000E":["CS","FiniteVolume"],"0010":["CS","Manifold"],"0011":["SQ","SurfacePointsSequence"],"0012":["SQ","SurfacePointsNormalsSequence"],"0013":["SQ","SurfaceMeshPrimitivesSequence"],"0015":["UL","NumberOfSurfacePoints"],"0016":["OF","PointCoordinatesData"],"0017":["FL","PointPositionAccuracy"],"0018":["FL","MeanPointDistance"],"0019":["FL","MaximumPointDistance"],"001A":["FL","PointsBoundingBoxCoordinates"],"001B":["FL","AxisOfRotation"],"001C":["FL","CenterOfRotation"],"001E":["UL","NumberOfVectors"],"001F":["US","VectorDimensionality"],"0020":["FL","VectorAccuracy"],"0021":["OF","VectorCoordinateData"],"0023":["OW","TrianglePointIndexList"],"0024":["OW","EdgePointIndexList"],"0025":["OW","VertexPointIndexList"],"0026":["SQ","TriangleStripSequence"],"0027":["SQ","TriangleFanSequence"],"0028":["SQ","LineSequence"],"0029":["OW","PrimitivePointIndexList"],"002A":["UL","SurfaceCount"],"002B":["SQ","ReferencedSurfaceSequence"],"002C":["UL","ReferencedSurfaceNumber"],"002D":["SQ","SegmentSurfaceGenerationAlgorithmIdentificationSequence"],"002E":["SQ","SegmentSurfaceSourceInstanceSequence"],"002F":["SQ","AlgorithmFamilyCodeSequence"],"0030":["SQ","AlgorithmNameCodeSequence"],"0031":["LO","AlgorithmVersion"],"0032":["LT","AlgorithmParameters"],"0034":["SQ","FacetSequence"],"0035":["SQ","SurfaceProcessingAlgorithmIdentificationSequence"],"0036":["LO","AlgorithmName"]},"0068":{6210:["LO","ImplantSize"],6221:["LO","ImplantTemplateVersion"],6222:["SQ","ReplacedImplantTemplateSequence"],6223:["CS","ImplantType"],6224:["SQ","DerivationImplantTemplateSequence"],6225:["SQ","OriginalImplantTemplateSequence"],6226:["DT","EffectiveDateTime"],6230:["SQ","ImplantTargetAnatomySequence"],6260:["SQ","InformationFromManufacturerSequence"],6265:["SQ","NotificationFromManufacturerSequence"],6270:["DT","InformationIssueDateTime"],6280:["ST","InformationSummary"],"62A0":["SQ","ImplantRegulatoryDisapprovalCodeSequence"],"62A5":["FD","OverallTemplateSpatialTolerance"],"62C0":["SQ","HPGLDocumentSequence"],"62D0":["US","HPGLDocumentID"],"62D5":["LO","HPGLDocumentLabel"],"62E0":["SQ","ViewOrientationCodeSequence"],"62F0":["FD","ViewOrientationModifier"],"62F2":["FD","HPGLDocumentScaling"],6300:["OB","HPGLDocument"],6310:["US","HPGLContourPenNumber"],6320:["SQ","HPGLPenSequence"],6330:["US","HPGLPenNumber"],6340:["LO","HPGLPenLabel"],6345:["ST","HPGLPenDescription"],6346:["FD","RecommendedRotationPoint"],6347:["FD","BoundingRectangle"],6350:["US","ImplantTemplate3DModelSurfaceNumber"],6360:["SQ","SurfaceModelDescriptionSequence"],6380:["LO","SurfaceModelLabel"],6390:["FD","SurfaceModelScalingFactor"],"63A0":["SQ","MaterialsCodeSequence"],"63A4":["SQ","CoatingMaterialsCodeSequence"],"63A8":["SQ","ImplantTypeCodeSequence"],"63AC":["SQ","FixationMethodCodeSequence"],"63B0":["SQ","MatingFeatureSetsSequence"],"63C0":["US","MatingFeatureSetID"],"63D0":["LO","MatingFeatureSetLabel"],"63E0":["SQ","MatingFeatureSequence"],"63F0":["US","MatingFeatureID"],6400:["SQ","MatingFeatureDegreeOfFreedomSequence"],6410:["US","DegreeOfFreedomID"],6420:["CS","DegreeOfFreedomType"],6430:["SQ","TwoDMatingFeatureCoordinatesSequence"],6440:["US","ReferencedHPGLDocumentID"],6450:["FD","TwoDMatingPoint"],6460:["FD","TwoDMatingAxes"],6470:["SQ","TwoDDegreeOfFreedomSequence"],6490:["FD","ThreeDDegreeOfFreedomAxis"],"64A0":["FD","RangeOfFreedom"],"64C0":["FD","ThreeDMatingPoint"],"64D0":["FD","ThreeDMatingAxes"],"64F0":["FD","TwoDDegreeOfFreedomAxis"],6500:["SQ","PlanningLandmarkPointSequence"],6510:["SQ","PlanningLandmarkLineSequence"],6520:["SQ","PlanningLandmarkPlaneSequence"],6530:["US","PlanningLandmarkID"],6540:["LO","PlanningLandmarkDescription"],6545:["SQ","PlanningLandmarkIdentificationCodeSequence"],6550:["SQ","TwoDPointCoordinatesSequence"],6560:["FD","TwoDPointCoordinates"],6590:["FD","ThreeDPointCoordinates"],"65A0":["SQ","TwoDLineCoordinatesSequence"],"65B0":["FD","TwoDLineCoordinates"],"65D0":["FD","ThreeDLineCoordinates"],"65E0":["SQ","TwoDPlaneCoordinatesSequence"],"65F0":["FD","TwoDPlaneIntersection"],6610:["FD","ThreeDPlaneOrigin"],6620:["FD","ThreeDPlaneNormal"]},"0070":{"0001":["SQ","GraphicAnnotationSequence"],"0002":["CS","GraphicLayer"],"0003":["CS","BoundingBoxAnnotationUnits"],"0004":["CS","AnchorPointAnnotationUnits"],"0005":["CS","GraphicAnnotationUnits"],"0006":["ST","UnformattedTextValue"],"0008":["SQ","TextObjectSequence"],"0009":["SQ","GraphicObjectSequence"],"0010":["FL","BoundingBoxTopLeftHandCorner"],"0011":["FL","BoundingBoxBottomRightHandCorner"],"0012":["CS","BoundingBoxTextHorizontalJustification"],"0014":["FL","AnchorPoint"],"0015":["CS","AnchorPointVisibility"],"0020":["US","GraphicDimensions"],"0021":["US","NumberOfGraphicPoints"],"0022":["FL","GraphicData"],"0023":["CS","GraphicType"],"0024":["CS","GraphicFilled"],"0040":["IS","ImageRotationRetired"],"0041":["CS","ImageHorizontalFlip"],"0042":["US","ImageRotation"],"0050":["US","DisplayedAreaTopLeftHandCornerTrial"],"0051":["US","DisplayedAreaBottomRightHandCornerTrial"],"0052":["SL","DisplayedAreaTopLeftHandCorner"],"0053":["SL","DisplayedAreaBottomRightHandCorner"],"005A":["SQ","DisplayedAreaSelectionSequence"],"0060":["SQ","GraphicLayerSequence"],"0062":["IS","GraphicLayerOrder"],"0066":["US","GraphicLayerRecommendedDisplayGrayscaleValue"],"0067":["US","GraphicLayerRecommendedDisplayRGBValue"],"0068":["LO","GraphicLayerDescription"],"0080":["CS","ContentLabel"],"0081":["LO","ContentDescription"],"0082":["DA","PresentationCreationDate"],"0083":["TM","PresentationCreationTime"],"0084":["PN","ContentCreatorName"],"0086":["SQ","ContentCreatorIdentificationCodeSequence"],"0087":["SQ","AlternateContentDescriptionSequence"],"0100":["CS","PresentationSizeMode"],"0101":["DS","PresentationPixelSpacing"],"0102":["IS","PresentationPixelAspectRatio"],"0103":["FL","PresentationPixelMagnificationRatio"],"0207":["LO","GraphicGroupLabel"],"0208":["ST","GraphicGroupDescription"],"0209":["SQ","CompoundGraphicSequence"],"0226":["UL","CompoundGraphicInstanceID"],"0227":["LO","FontName"],"0228":["CS","FontNameType"],"0229":["LO","CSSFontName"],"0230":["FD","RotationAngle"],"0231":["SQ","TextStyleSequence"],"0232":["SQ","LineStyleSequence"],"0233":["SQ","FillStyleSequence"],"0234":["SQ","GraphicGroupSequence"],"0241":["US","TextColorCIELabValue"],"0242":["CS","HorizontalAlignment"],"0243":["CS","VerticalAlignment"],"0244":["CS","ShadowStyle"],"0245":["FL","ShadowOffsetX"],"0246":["FL","ShadowOffsetY"],"0247":["US","ShadowColorCIELabValue"],"0248":["CS","Underlined"],"0249":["CS","Bold"],"0250":["CS","Italic"],"0251":["US","PatternOnColorCIELabValue"],"0252":["US","PatternOffColorCIELabValue"],"0253":["FL","LineThickness"],"0254":["CS","LineDashingStyle"],"0255":["UL","LinePattern"],"0256":["OB","FillPattern"],"0257":["CS","FillMode"],"0258":["FL","ShadowOpacity"],"0261":["FL","GapLength"],"0262":["FL","DiameterOfVisibility"],"0273":["FL","RotationPoint"],"0274":["CS","TickAlignment"],"0278":["CS","ShowTickLabel"],"0279":["CS","TickLabelAlignment"],"0282":["CS","CompoundGraphicUnits"],"0284":["FL","PatternOnOpacity"],"0285":["FL","PatternOffOpacity"],"0287":["SQ","MajorTicksSequence"],"0288":["FL","TickPosition"],"0289":["SH","TickLabel"],"0294":["CS","CompoundGraphicType"],"0295":["UL","GraphicGroupID"],"0306":["CS","ShapeType"],"0308":["SQ","RegistrationSequence"],"0309":["SQ","MatrixRegistrationSequence"],"030A":["SQ","MatrixSequence"],"030C":["CS","FrameOfReferenceTransformationMatrixType"],"030D":["SQ","RegistrationTypeCodeSequence"],"030F":["ST","FiducialDescription"],"0310":["SH","FiducialIdentifier"],"0311":["SQ","FiducialIdentifierCodeSequence"],"0312":["FD","ContourUncertaintyRadius"],"0314":["SQ","UsedFiducialsSequence"],"0318":["SQ","GraphicCoordinatesDataSequence"],"031A":["UI","FiducialUID"],"031C":["SQ","FiducialSetSequence"],"031E":["SQ","FiducialSequence"],"0401":["US","GraphicLayerRecommendedDisplayCIELabValue"],"0402":["SQ","BlendingSequence"],"0403":["FL","RelativeOpacity"],"0404":["SQ","ReferencedSpatialRegistrationSequence"],"0405":["CS","BlendingPosition"]},"0072":{"0002":["SH","HangingProtocolName"],"0004":["LO","HangingProtocolDescription"],"0006":["CS","HangingProtocolLevel"],"0008":["LO","HangingProtocolCreator"],"000A":["DT","HangingProtocolCreationDateTime"],"000C":["SQ","HangingProtocolDefinitionSequence"],"000E":["SQ","HangingProtocolUserIdentificationCodeSequence"],"0010":["LO","HangingProtocolUserGroupName"],"0012":["SQ","SourceHangingProtocolSequence"],"0014":["US","NumberOfPriorsReferenced"],"0020":["SQ","ImageSetsSequence"],"0022":["SQ","ImageSetSelectorSequence"],"0024":["CS","ImageSetSelectorUsageFlag"],"0026":["AT","SelectorAttribute"],"0028":["US","SelectorValueNumber"],"0030":["SQ","TimeBasedImageSetsSequence"],"0032":["US","ImageSetNumber"],"0034":["CS","ImageSetSelectorCategory"],"0038":["US","RelativeTime"],"003A":["CS","RelativeTimeUnits"],"003C":["SS","AbstractPriorValue"],"003E":["SQ","AbstractPriorCodeSequence"],"0040":["LO","ImageSetLabel"],"0050":["CS","SelectorAttributeVR"],"0052":["AT","SelectorSequencePointer"],"0054":["LO","SelectorSequencePointerPrivateCreator"],"0056":["LO","SelectorAttributePrivateCreator"],"0060":["AT","SelectorATValue"],"0062":["CS","SelectorCSValue"],"0064":["IS","SelectorISValue"],"0066":["LO","SelectorLOValue"],"0068":["LT","SelectorLTValue"],"006A":["PN","SelectorPNValue"],"006C":["SH","SelectorSHValue"],"006E":["ST","SelectorSTValue"],"0070":["UT","SelectorUTValue"],"0072":["DS","SelectorDSValue"],"0074":["FD","SelectorFDValue"],"0076":["FL","SelectorFLValue"],"0078":["UL","SelectorULValue"],"007A":["US","SelectorUSValue"],"007C":["SL","SelectorSLValue"],"007E":["SS","SelectorSSValue"],"0080":["SQ","SelectorCodeSequenceValue"],"0100":["US","NumberOfScreens"],"0102":["SQ","NominalScreenDefinitionSequence"],"0104":["US","NumberOfVerticalPixels"],"0106":["US","NumberOfHorizontalPixels"],"0108":["FD","DisplayEnvironmentSpatialPosition"],"010A":["US","ScreenMinimumGrayscaleBitDepth"],"010C":["US","ScreenMinimumColorBitDepth"],"010E":["US","ApplicationMaximumRepaintTime"],"0200":["SQ","DisplaySetsSequence"],"0202":["US","DisplaySetNumber"],"0203":["LO","DisplaySetLabel"],"0204":["US","DisplaySetPresentationGroup"],"0206":["LO","DisplaySetPresentationGroupDescription"],"0208":["CS","PartialDataDisplayHandling"],"0210":["SQ","SynchronizedScrollingSequence"],"0212":["US","DisplaySetScrollingGroup"],"0214":["SQ","NavigationIndicatorSequence"],"0216":["US","NavigationDisplaySet"],"0218":["US","ReferenceDisplaySets"],"0300":["SQ","ImageBoxesSequence"],"0302":["US","ImageBoxNumber"],"0304":["CS","ImageBoxLayoutType"],"0306":["US","ImageBoxTileHorizontalDimension"],"0308":["US","ImageBoxTileVerticalDimension"],"0310":["CS","ImageBoxScrollDirection"],"0312":["CS","ImageBoxSmallScrollType"],"0314":["US","ImageBoxSmallScrollAmount"],"0316":["CS","ImageBoxLargeScrollType"],"0318":["US","ImageBoxLargeScrollAmount"],"0320":["US","ImageBoxOverlapPriority"],"0330":["FD","CineRelativeToRealTime"],"0400":["SQ","FilterOperationsSequence"],"0402":["CS","FilterByCategory"],"0404":["CS","FilterByAttributePresence"],"0406":["CS","FilterByOperator"],"0420":["US","StructuredDisplayBackgroundCIELabValue"],"0421":["US","EmptyImageBoxCIELabValue"],"0422":["SQ","StructuredDisplayImageBoxSequence"],"0424":["SQ","StructuredDisplayTextBoxSequence"],"0427":["SQ","ReferencedFirstFrameSequence"],"0430":["SQ","ImageBoxSynchronizationSequence"],"0432":["US","SynchronizedImageBoxList"],"0434":["CS","TypeOfSynchronization"],"0500":["CS","BlendingOperationType"],"0510":["CS","ReformattingOperationType"],"0512":["FD","ReformattingThickness"],"0514":["FD","ReformattingInterval"],"0516":["CS","ReformattingOperationInitialViewDirection"],"0520":["CS","ThreeDRenderingType"],"0600":["SQ","SortingOperationsSequence"],"0602":["CS","SortByCategory"],"0604":["CS","SortingDirection"],"0700":["CS","DisplaySetPatientOrientation"],"0702":["CS","VOIType"],"0704":["CS","PseudoColorType"],"0705":["SQ","PseudoColorPaletteInstanceReferenceSequence"],"0706":["CS","ShowGrayscaleInverted"],"0710":["CS","ShowImageTrueSizeFlag"],"0712":["CS","ShowGraphicAnnotationFlag"],"0714":["CS","ShowPatientDemographicsFlag"],"0716":["CS","ShowAcquisitionTechniquesFlag"],"0717":["CS","DisplaySetHorizontalJustification"],"0718":["CS","DisplaySetVerticalJustification"]},"0074":{"0120":["FD","ContinuationStartMeterset"],"0121":["FD","ContinuationEndMeterset"],1e3:["CS","ProcedureStepState"],1002:["SQ","ProcedureStepProgressInformationSequence"],1004:["DS","ProcedureStepProgress"],1006:["ST","ProcedureStepProgressDescription"],1008:["SQ","ProcedureStepCommunicationsURISequence"],"100A":["ST","ContactURI"],"100C":["LO","ContactDisplayName"],"100E":["SQ","ProcedureStepDiscontinuationReasonCodeSequence"],1020:["SQ","BeamTaskSequence"],1022:["CS","BeamTaskType"],1024:["IS","BeamOrderIndexTrial"],1026:["FD","TableTopVerticalAdjustedPosition"],1027:["FD","TableTopLongitudinalAdjustedPosition"],1028:["FD","TableTopLateralAdjustedPosition"],"102A":["FD","PatientSupportAdjustedAngle"],"102B":["FD","TableTopEccentricAdjustedAngle"],"102C":["FD","TableTopPitchAdjustedAngle"],"102D":["FD","TableTopRollAdjustedAngle"],1030:["SQ","DeliveryVerificationImageSequence"],1032:["CS","VerificationImageTiming"],1034:["CS","DoubleExposureFlag"],1036:["CS","DoubleExposureOrdering"],1038:["DS","DoubleExposureMetersetTrial"],"103A":["DS","DoubleExposureFieldDeltaTrial"],1040:["SQ","RelatedReferenceRTImageSequence"],1042:["SQ","GeneralMachineVerificationSequence"],1044:["SQ","ConventionalMachineVerificationSequence"],1046:["SQ","IonMachineVerificationSequence"],1048:["SQ","FailedAttributesSequence"],"104A":["SQ","OverriddenAttributesSequence"],"104C":["SQ","ConventionalControlPointVerificationSequence"],"104E":["SQ","IonControlPointVerificationSequence"],1050:["SQ","AttributeOccurrenceSequence"],1052:["AT","AttributeOccurrencePointer"],1054:["UL","AttributeItemSelector"],1056:["LO","AttributeOccurrencePrivateCreator"],1057:["IS","SelectorSequencePointerItems"],1200:["CS","ScheduledProcedureStepPriority"],1202:["LO","WorklistLabel"],1204:["LO","ProcedureStepLabel"],1210:["SQ","ScheduledProcessingParametersSequence"],1212:["SQ","PerformedProcessingParametersSequence"],1216:["SQ","UnifiedProcedureStepPerformedProcedureSequence"],1220:["SQ","RelatedProcedureStepSequence"],1222:["LO","ProcedureStepRelationshipType"],1224:["SQ","ReplacedProcedureStepSequence"],1230:["LO","DeletionLock"],1234:["AE","ReceivingAE"],1236:["AE","RequestingAE"],1238:["LT","ReasonForCancellation"],1242:["CS","SCPStatus"],1244:["CS","SubscriptionListStatus"],1246:["CS","UnifiedProcedureStepListStatus"],1324:["UL","BeamOrderIndex"],1338:["FD","DoubleExposureMeterset"],"133A":["FD","DoubleExposureFieldDelta"]},"0076":{"0001":["LO","ImplantAssemblyTemplateName"],"0003":["LO","ImplantAssemblyTemplateIssuer"],"0006":["LO","ImplantAssemblyTemplateVersion"],"0008":["SQ","ReplacedImplantAssemblyTemplateSequence"],"000A":["CS","ImplantAssemblyTemplateType"],"000C":["SQ","OriginalImplantAssemblyTemplateSequence"],"000E":["SQ","DerivationImplantAssemblyTemplateSequence"],"0010":["SQ","ImplantAssemblyTemplateTargetAnatomySequence"],"0020":["SQ","ProcedureTypeCodeSequence"],"0030":["LO","SurgicalTechnique"],"0032":["SQ","ComponentTypesSequence"],"0034":["CS","ComponentTypeCodeSequence"],"0036":["CS","ExclusiveComponentType"],"0038":["CS","MandatoryComponentType"],"0040":["SQ","ComponentSequence"],"0055":["US","ComponentID"],"0060":["SQ","ComponentAssemblySequence"],"0070":["US","Component1ReferencedID"],"0080":["US","Component1ReferencedMatingFeatureSetID"],"0090":["US","Component1ReferencedMatingFeatureID"],"00A0":["US","Component2ReferencedID"],"00B0":["US","Component2ReferencedMatingFeatureSetID"],"00C0":["US","Component2ReferencedMatingFeatureID"]},"0078":{"0001":["LO","ImplantTemplateGroupName"],"0010":["ST","ImplantTemplateGroupDescription"],"0020":["LO","ImplantTemplateGroupIssuer"],"0024":["LO","ImplantTemplateGroupVersion"],"0026":["SQ","ReplacedImplantTemplateGroupSequence"],"0028":["SQ","ImplantTemplateGroupTargetAnatomySequence"],"002A":["SQ","ImplantTemplateGroupMembersSequence"],"002E":["US","ImplantTemplateGroupMemberID"],"0050":["FD","ThreeDImplantTemplateGroupMemberMatchingPoint"],"0060":["FD","ThreeDImplantTemplateGroupMemberMatchingAxes"],"0070":["SQ","ImplantTemplateGroupMemberMatching2DCoordinatesSequence"],"0090":["FD","TwoDImplantTemplateGroupMemberMatchingPoint"],"00A0":["FD","TwoDImplantTemplateGroupMemberMatchingAxes"],"00B0":["SQ","ImplantTemplateGroupVariationDimensionSequence"],"00B2":["LO","ImplantTemplateGroupVariationDimensionName"],"00B4":["SQ","ImplantTemplateGroupVariationDimensionRankSequence"],"00B6":["US","ReferencedImplantTemplateGroupMemberID"],"00B8":["US","ImplantTemplateGroupVariationDimensionRank"]},"0088":{"0130":["SH","StorageMediaFileSetID"],"0140":["UI","StorageMediaFileSetUID"],"0200":["SQ","IconImageSequence"],"0904":["LO","TopicTitle"],"0906":["ST","TopicSubject"],"0910":["LO","TopicAuthor"],"0912":["LO","TopicKeywords"]},"0100":{"0410":["CS","SOPInstanceStatus"],"0420":["DT","SOPAuthorizationDateTime"],"0424":["LT","SOPAuthorizationComment"],"0426":["LO","AuthorizationEquipmentCertificationNumber"]},"0400":{"0005":["US","MACIDNumber"],"0010":["UI","MACCalculationTransferSyntaxUID"],"0015":["CS","MACAlgorithm"],"0020":["AT","DataElementsSigned"],"0100":["UI","DigitalSignatureUID"],"0105":["DT","DigitalSignatureDateTime"],"0110":["CS","CertificateType"],"0115":["OB","CertificateOfSigner"],"0120":["OB","Signature"],"0305":["CS","CertifiedTimestampType"],"0310":["OB","CertifiedTimestamp"],"0401":["SQ","DigitalSignaturePurposeCodeSequence"],"0402":["SQ","ReferencedDigitalSignatureSequence"],"0403":["SQ","ReferencedSOPInstanceMACSequence"],"0404":["OB","MAC"],"0500":["SQ","EncryptedAttributesSequence"],"0510":["UI","EncryptedContentTransferSyntaxUID"],"0520":["OB","EncryptedContent"],"0550":["SQ","ModifiedAttributesSequence"],"0561":["SQ","OriginalAttributesSequence"],"0562":["DT","AttributeModificationDateTime"],"0563":["LO","ModifyingSystem"],"0564":["LO","SourceOfPreviousValues"],"0565":["CS","ReasonForTheAttributeModification"]},2e3:{"0010":["IS","NumberOfCopies"],"001E":["SQ","PrinterConfigurationSequence"],"0020":["CS","PrintPriority"],"0030":["CS","MediumType"],"0040":["CS","FilmDestination"],"0050":["LO","FilmSessionLabel"],"0060":["IS","MemoryAllocation"],"0061":["IS","MaximumMemoryAllocation"],"0062":["CS","ColorImagePrintingFlag"],"0063":["CS","CollationFlag"],"0065":["CS","AnnotationFlag"],"0067":["CS","ImageOverlayFlag"],"0069":["CS","PresentationLUTFlag"],"006A":["CS","ImageBoxPresentationLUTFlag"],"00A0":["US","MemoryBitDepth"],"00A1":["US","PrintingBitDepth"],"00A2":["SQ","MediaInstalledSequence"],"00A4":["SQ","OtherMediaAvailableSequence"],"00A8":["SQ","SupportedImageDisplayFormatsSequence"],"0500":["SQ","ReferencedFilmBoxSequence"],"0510":["SQ","ReferencedStoredPrintSequence"]},2010:{"0010":["ST","ImageDisplayFormat"],"0030":["CS","AnnotationDisplayFormatID"],"0040":["CS","FilmOrientation"],"0050":["CS","FilmSizeID"],"0052":["CS","PrinterResolutionID"],"0054":["CS","DefaultPrinterResolutionID"],"0060":["CS","MagnificationType"],"0080":["CS","SmoothingType"],"00A6":["CS","DefaultMagnificationType"],"00A7":["CS","OtherMagnificationTypesAvailable"],"00A8":["CS","DefaultSmoothingType"],"00A9":["CS","OtherSmoothingTypesAvailable"],"0100":["CS","BorderDensity"],"0110":["CS","EmptyImageDensity"],"0120":["US","MinDensity"],"0130":["US","MaxDensity"],"0140":["CS","Trim"],"0150":["ST","ConfigurationInformation"],"0152":["LT","ConfigurationInformationDescription"],"0154":["IS","MaximumCollatedFilms"],"015E":["US","Illumination"],"0160":["US","ReflectedAmbientLight"],"0376":["DS","PrinterPixelSpacing"],"0500":["SQ","ReferencedFilmSessionSequence"],"0510":["SQ","ReferencedImageBoxSequence"],"0520":["SQ","ReferencedBasicAnnotationBoxSequence"]},2020:{"0010":["US","ImageBoxPosition"],"0020":["CS","Polarity"],"0030":["DS","RequestedImageSize"],"0040":["CS","RequestedDecimateCropBehavior"],"0050":["CS","RequestedResolutionID"],"00A0":["CS","RequestedImageSizeFlag"],"00A2":["CS","DecimateCropResult"],"0110":["SQ","BasicGrayscaleImageSequence"],"0111":["SQ","BasicColorImageSequence"],"0130":["SQ","ReferencedImageOverlayBoxSequence"],"0140":["SQ","ReferencedVOILUTBoxSequence"]},2030:{"0010":["US","AnnotationPosition"],"0020":["LO","TextString"]},2040:{"0010":["SQ","ReferencedOverlayPlaneSequence"],"0011":["US","ReferencedOverlayPlaneGroups"],"0020":["SQ","OverlayPixelDataSequence"],"0060":["CS","OverlayMagnificationType"],"0070":["CS","OverlaySmoothingType"],"0072":["CS","OverlayOrImageMagnification"],"0074":["US","MagnifyToNumberOfColumns"],"0080":["CS","OverlayForegroundDensity"],"0082":["CS","OverlayBackgroundDensity"],"0090":["CS","OverlayMode"],"0100":["CS","ThresholdDensity"],"0500":["SQ","ReferencedImageBoxSequenceRetired"]},2050:{"0010":["SQ","PresentationLUTSequence"],"0020":["CS","PresentationLUTShape"],"0500":["SQ","ReferencedPresentationLUTSequence"]},2100:{"0010":["SH","PrintJobID"],"0020":["CS","ExecutionStatus"],"0030":["CS","ExecutionStatusInfo"],"0040":["DA","CreationDate"],"0050":["TM","CreationTime"],"0070":["AE","Originator"],"0140":["AE","DestinationAE"],"0160":["SH","OwnerID"],"0170":["IS","NumberOfFilms"],"0500":["SQ","ReferencedPrintJobSequencePullStoredPrint"]},2110:{"0010":["CS","PrinterStatus"],"0020":["CS","PrinterStatusInfo"],"0030":["LO","PrinterName"],"0099":["SH","PrintQueueID"]},2120:{"0010":["CS","QueueStatus"],"0050":["SQ","PrintJobDescriptionSequence"],"0070":["SQ","ReferencedPrintJobSequence"]},2130:{"0010":["SQ","PrintManagementCapabilitiesSequence"],"0015":["SQ","PrinterCharacteristicsSequence"],"0030":["SQ","FilmBoxContentSequence"],"0040":["SQ","ImageBoxContentSequence"],"0050":["SQ","AnnotationContentSequence"],"0060":["SQ","ImageOverlayBoxContentSequence"],"0080":["SQ","PresentationLUTContentSequence"],"00A0":["SQ","ProposedStudySequence"],"00C0":["SQ","OriginalImageSequence"]},2200:{"0001":["CS","LabelUsingInformationExtractedFromInstances"],"0002":["UT","LabelText"],"0003":["CS","LabelStyleSelection"],"0004":["LT","MediaDisposition"],"0005":["LT","BarcodeValue"],"0006":["CS","BarcodeSymbology"],"0007":["CS","AllowMediaSplitting"],"0008":["CS","IncludeNonDICOMObjects"],"0009":["CS","IncludeDisplayApplication"],"000A":["CS","PreserveCompositeInstancesAfterMediaCreation"],"000B":["US","TotalNumberOfPiecesOfMediaCreated"],"000C":["LO","RequestedMediaApplicationProfile"],"000D":["SQ","ReferencedStorageMediaSequence"],"000E":["AT","FailureAttributes"],"000F":["CS","AllowLossyCompression"],"0020":["CS","RequestPriority"]},3002:{"0002":["SH","RTImageLabel"],"0003":["LO","RTImageName"],"0004":["ST","RTImageDescription"],"000A":["CS","ReportedValuesOrigin"],"000C":["CS","RTImagePlane"],"000D":["DS","XRayImageReceptorTranslation"],"000E":["DS","XRayImageReceptorAngle"],"0010":["DS","RTImageOrientation"],"0011":["DS","ImagePlanePixelSpacing"],"0012":["DS","RTImagePosition"],"0020":["SH","RadiationMachineName"],"0022":["DS","RadiationMachineSAD"],"0024":["DS","RadiationMachineSSD"],"0026":["DS","RTImageSID"],"0028":["DS","SourceToReferenceObjectDistance"],"0029":["IS","FractionNumber"],"0030":["SQ","ExposureSequence"],"0032":["DS","MetersetExposure"],"0034":["DS","DiaphragmPosition"],"0040":["SQ","FluenceMapSequence"],"0041":["CS","FluenceDataSource"],"0042":["DS","FluenceDataScale"],"0050":["SQ","PrimaryFluenceModeSequence"],"0051":["CS","FluenceMode"],"0052":["SH","FluenceModeID"]},3004:{"0001":["CS","DVHType"],"0002":["CS","DoseUnits"],"0004":["CS","DoseType"],"0006":["LO","DoseComment"],"0008":["DS","NormalizationPoint"],"000A":["CS","DoseSummationType"],"000C":["DS","GridFrameOffsetVector"],"000E":["DS","DoseGridScaling"],"0010":["SQ","RTDoseROISequence"],"0012":["DS","DoseValue"],"0014":["CS","TissueHeterogeneityCorrection"],"0040":["DS","DVHNormalizationPoint"],"0042":["DS","DVHNormalizationDoseValue"],"0050":["SQ","DVHSequence"],"0052":["DS","DVHDoseScaling"],"0054":["CS","DVHVolumeUnits"],"0056":["IS","DVHNumberOfBins"],"0058":["DS","DVHData"],"0060":["SQ","DVHReferencedROISequence"],"0062":["CS","DVHROIContributionType"],"0070":["DS","DVHMinimumDose"],"0072":["DS","DVHMaximumDose"],"0074":["DS","DVHMeanDose"]},3006:{"0002":["SH","StructureSetLabel"],"0004":["LO","StructureSetName"],"0006":["ST","StructureSetDescription"],"0008":["DA","StructureSetDate"],"0009":["TM","StructureSetTime"],"0010":["SQ","ReferencedFrameOfReferenceSequence"],"0012":["SQ","RTReferencedStudySequence"],"0014":["SQ","RTReferencedSeriesSequence"],"0016":["SQ","ContourImageSequence"],"0020":["SQ","StructureSetROISequence"],"0022":["IS","ROINumber"],"0024":["UI","ReferencedFrameOfReferenceUID"],"0026":["LO","ROIName"],"0028":["ST","ROIDescription"],"002A":["IS","ROIDisplayColor"],"002C":["DS","ROIVolume"],"0030":["SQ","RTRelatedROISequence"],"0033":["CS","RTROIRelationship"],"0036":["CS","ROIGenerationAlgorithm"],"0038":["LO","ROIGenerationDescription"],"0039":["SQ","ROIContourSequence"],"0040":["SQ","ContourSequence"],"0042":["CS","ContourGeometricType"],"0044":["DS","ContourSlabThickness"],"0045":["DS","ContourOffsetVector"],"0046":["IS","NumberOfContourPoints"],"0048":["IS","ContourNumber"],"0049":["IS","AttachedContours"],"0050":["DS","ContourData"],"0080":["SQ","RTROIObservationsSequence"],"0082":["IS","ObservationNumber"],"0084":["IS","ReferencedROINumber"],"0085":["SH","ROIObservationLabel"],"0086":["SQ","RTROIIdentificationCodeSequence"],"0088":["ST","ROIObservationDescription"],"00A0":["SQ","RelatedRTROIObservationsSequence"],"00A4":["CS","RTROIInterpretedType"],"00A6":["PN","ROIInterpreter"],"00B0":["SQ","ROIPhysicalPropertiesSequence"],"00B2":["CS","ROIPhysicalProperty"],"00B4":["DS","ROIPhysicalPropertyValue"],"00B6":["SQ","ROIElementalCompositionSequence"],"00B7":["US","ROIElementalCompositionAtomicNumber"],"00B8":["FL","ROIElementalCompositionAtomicMassFraction"],"00C0":["SQ","FrameOfReferenceRelationshipSequence"],"00C2":["UI","RelatedFrameOfReferenceUID"],"00C4":["CS","FrameOfReferenceTransformationType"],"00C6":["DS","FrameOfReferenceTransformationMatrix"],"00C8":["LO","FrameOfReferenceTransformationComment"]},3008:{"0010":["SQ","MeasuredDoseReferenceSequence"],"0012":["ST","MeasuredDoseDescription"],"0014":["CS","MeasuredDoseType"],"0016":["DS","MeasuredDoseValue"],"0020":["SQ","TreatmentSessionBeamSequence"],"0021":["SQ","TreatmentSessionIonBeamSequence"],"0022":["IS","CurrentFractionNumber"],"0024":["DA","TreatmentControlPointDate"],"0025":["TM","TreatmentControlPointTime"],"002A":["CS","TreatmentTerminationStatus"],"002B":["SH","TreatmentTerminationCode"],"002C":["CS","TreatmentVerificationStatus"],"0030":["SQ","ReferencedTreatmentRecordSequence"],"0032":["DS","SpecifiedPrimaryMeterset"],"0033":["DS","SpecifiedSecondaryMeterset"],"0036":["DS","DeliveredPrimaryMeterset"],"0037":["DS","DeliveredSecondaryMeterset"],"003A":["DS","SpecifiedTreatmentTime"],"003B":["DS","DeliveredTreatmentTime"],"0040":["SQ","ControlPointDeliverySequence"],"0041":["SQ","IonControlPointDeliverySequence"],"0042":["DS","SpecifiedMeterset"],"0044":["DS","DeliveredMeterset"],"0045":["FL","MetersetRateSet"],"0046":["FL","MetersetRateDelivered"],"0047":["FL","ScanSpotMetersetsDelivered"],"0048":["DS","DoseRateDelivered"],"0050":["SQ","TreatmentSummaryCalculatedDoseReferenceSequence"],"0052":["DS","CumulativeDoseToDoseReference"],"0054":["DA","FirstTreatmentDate"],"0056":["DA","MostRecentTreatmentDate"],"005A":["IS","NumberOfFractionsDelivered"],"0060":["SQ","OverrideSequence"],"0061":["AT","ParameterSequencePointer"],"0062":["AT","OverrideParameterPointer"],"0063":["IS","ParameterItemIndex"],"0064":["IS","MeasuredDoseReferenceNumber"],"0065":["AT","ParameterPointer"],"0066":["ST","OverrideReason"],"0068":["SQ","CorrectedParameterSequence"],"006A":["FL","CorrectionValue"],"0070":["SQ","CalculatedDoseReferenceSequence"],"0072":["IS","CalculatedDoseReferenceNumber"],"0074":["ST","CalculatedDoseReferenceDescription"],"0076":["DS","CalculatedDoseReferenceDoseValue"],"0078":["DS","StartMeterset"],"007A":["DS","EndMeterset"],"0080":["SQ","ReferencedMeasuredDoseReferenceSequence"],"0082":["IS","ReferencedMeasuredDoseReferenceNumber"],"0090":["SQ","ReferencedCalculatedDoseReferenceSequence"],"0092":["IS","ReferencedCalculatedDoseReferenceNumber"],"00A0":["SQ","BeamLimitingDeviceLeafPairsSequence"],"00B0":["SQ","RecordedWedgeSequence"],"00C0":["SQ","RecordedCompensatorSequence"],"00D0":["SQ","RecordedBlockSequence"],"00E0":["SQ","TreatmentSummaryMeasuredDoseReferenceSequence"],"00F0":["SQ","RecordedSnoutSequence"],"00F2":["SQ","RecordedRangeShifterSequence"],"00F4":["SQ","RecordedLateralSpreadingDeviceSequence"],"00F6":["SQ","RecordedRangeModulatorSequence"],"0100":["SQ","RecordedSourceSequence"],"0105":["LO","SourceSerialNumber"],"0110":["SQ","TreatmentSessionApplicationSetupSequence"],"0116":["CS","ApplicationSetupCheck"],"0120":["SQ","RecordedBrachyAccessoryDeviceSequence"],"0122":["IS","ReferencedBrachyAccessoryDeviceNumber"],"0130":["SQ","RecordedChannelSequence"],"0132":["DS","SpecifiedChannelTotalTime"],"0134":["DS","DeliveredChannelTotalTime"],"0136":["IS","SpecifiedNumberOfPulses"],"0138":["IS","DeliveredNumberOfPulses"],"013A":["DS","SpecifiedPulseRepetitionInterval"],"013C":["DS","DeliveredPulseRepetitionInterval"],"0140":["SQ","RecordedSourceApplicatorSequence"],"0142":["IS","ReferencedSourceApplicatorNumber"],"0150":["SQ","RecordedChannelShieldSequence"],"0152":["IS","ReferencedChannelShieldNumber"],"0160":["SQ","BrachyControlPointDeliveredSequence"],"0162":["DA","SafePositionExitDate"],"0164":["TM","SafePositionExitTime"],"0166":["DA","SafePositionReturnDate"],"0168":["TM","SafePositionReturnTime"],"0200":["CS","CurrentTreatmentStatus"],"0202":["ST","TreatmentStatusComment"],"0220":["SQ","FractionGroupSummarySequence"],"0223":["IS","ReferencedFractionNumber"],"0224":["CS","FractionGroupType"],"0230":["CS","BeamStopperPosition"],"0240":["SQ","FractionStatusSummarySequence"],"0250":["DA","TreatmentDate"],"0251":["TM","TreatmentTime"]},"300A":{"0002":["SH","RTPlanLabel"],"0003":["LO","RTPlanName"],"0004":["ST","RTPlanDescription"],"0006":["DA","RTPlanDate"],"0007":["TM","RTPlanTime"],"0009":["LO","TreatmentProtocols"],"000A":["CS","PlanIntent"],"000B":["LO","TreatmentSites"],"000C":["CS","RTPlanGeometry"],"000E":["ST","PrescriptionDescription"],"0010":["SQ","DoseReferenceSequence"],"0012":["IS","DoseReferenceNumber"],"0013":["UI","DoseReferenceUID"],"0014":["CS","DoseReferenceStructureType"],"0015":["CS","NominalBeamEnergyUnit"],"0016":["LO","DoseReferenceDescription"],"0018":["DS","DoseReferencePointCoordinates"],"001A":["DS","NominalPriorDose"],"0020":["CS","DoseReferenceType"],"0021":["DS","ConstraintWeight"],"0022":["DS","DeliveryWarningDose"],"0023":["DS","DeliveryMaximumDose"],"0025":["DS","TargetMinimumDose"],"0026":["DS","TargetPrescriptionDose"],"0027":["DS","TargetMaximumDose"],"0028":["DS","TargetUnderdoseVolumeFraction"],"002A":["DS","OrganAtRiskFullVolumeDose"],"002B":["DS","OrganAtRiskLimitDose"],"002C":["DS","OrganAtRiskMaximumDose"],"002D":["DS","OrganAtRiskOverdoseVolumeFraction"],"0040":["SQ","ToleranceTableSequence"],"0042":["IS","ToleranceTableNumber"],"0043":["SH","ToleranceTableLabel"],"0044":["DS","GantryAngleTolerance"],"0046":["DS","BeamLimitingDeviceAngleTolerance"],"0048":["SQ","BeamLimitingDeviceToleranceSequence"],"004A":["DS","BeamLimitingDevicePositionTolerance"],"004B":["FL","SnoutPositionTolerance"],"004C":["DS","PatientSupportAngleTolerance"],"004E":["DS","TableTopEccentricAngleTolerance"],"004F":["FL","TableTopPitchAngleTolerance"],"0050":["FL","TableTopRollAngleTolerance"],"0051":["DS","TableTopVerticalPositionTolerance"],"0052":["DS","TableTopLongitudinalPositionTolerance"],"0053":["DS","TableTopLateralPositionTolerance"],"0055":["CS","RTPlanRelationship"],"0070":["SQ","FractionGroupSequence"],"0071":["IS","FractionGroupNumber"],"0072":["LO","FractionGroupDescription"],"0078":["IS","NumberOfFractionsPlanned"],"0079":["IS","NumberOfFractionPatternDigitsPerDay"],"007A":["IS","RepeatFractionCycleLength"],"007B":["LT","FractionPattern"],"0080":["IS","NumberOfBeams"],"0082":["DS","BeamDoseSpecificationPoint"],"0084":["DS","BeamDose"],"0086":["DS","BeamMeterset"],"0088":["FL","BeamDosePointDepth"],"0089":["FL","BeamDosePointEquivalentDepth"],"008A":["FL","BeamDosePointSSD"],"00A0":["IS","NumberOfBrachyApplicationSetups"],"00A2":["DS","BrachyApplicationSetupDoseSpecificationPoint"],"00A4":["DS","BrachyApplicationSetupDose"],"00B0":["SQ","BeamSequence"],"00B2":["SH","TreatmentMachineName"],"00B3":["CS","PrimaryDosimeterUnit"],"00B4":["DS","SourceAxisDistance"],"00B6":["SQ","BeamLimitingDeviceSequence"],"00B8":["CS","RTBeamLimitingDeviceType"],"00BA":["DS","SourceToBeamLimitingDeviceDistance"],"00BB":["FL","IsocenterToBeamLimitingDeviceDistance"],"00BC":["IS","NumberOfLeafJawPairs"],"00BE":["DS","LeafPositionBoundaries"],"00C0":["IS","BeamNumber"],"00C2":["LO","BeamName"],"00C3":["ST","BeamDescription"],"00C4":["CS","BeamType"],"00C6":["CS","RadiationType"],"00C7":["CS","HighDoseTechniqueType"],"00C8":["IS","ReferenceImageNumber"],"00CA":["SQ","PlannedVerificationImageSequence"],"00CC":["LO","ImagingDeviceSpecificAcquisitionParameters"],"00CE":["CS","TreatmentDeliveryType"],"00D0":["IS","NumberOfWedges"],"00D1":["SQ","WedgeSequence"],"00D2":["IS","WedgeNumber"],"00D3":["CS","WedgeType"],"00D4":["SH","WedgeID"],"00D5":["IS","WedgeAngle"],"00D6":["DS","WedgeFactor"],"00D7":["FL","TotalWedgeTrayWaterEquivalentThickness"],"00D8":["DS","WedgeOrientation"],"00D9":["FL","IsocenterToWedgeTrayDistance"],"00DA":["DS","SourceToWedgeTrayDistance"],"00DB":["FL","WedgeThinEdgePosition"],"00DC":["SH","BolusID"],"00DD":["ST","BolusDescription"],"00E0":["IS","NumberOfCompensators"],"00E1":["SH","MaterialID"],"00E2":["DS","TotalCompensatorTrayFactor"],"00E3":["SQ","CompensatorSequence"],"00E4":["IS","CompensatorNumber"],"00E5":["SH","CompensatorID"],"00E6":["DS","SourceToCompensatorTrayDistance"],"00E7":["IS","CompensatorRows"],"00E8":["IS","CompensatorColumns"],"00E9":["DS","CompensatorPixelSpacing"],"00EA":["DS","CompensatorPosition"],"00EB":["DS","CompensatorTransmissionData"],"00EC":["DS","CompensatorThicknessData"],"00ED":["IS","NumberOfBoli"],"00EE":["CS","CompensatorType"],"00F0":["IS","NumberOfBlocks"],"00F2":["DS","TotalBlockTrayFactor"],"00F3":["FL","TotalBlockTrayWaterEquivalentThickness"],"00F4":["SQ","BlockSequence"],"00F5":["SH","BlockTrayID"],"00F6":["DS","SourceToBlockTrayDistance"],"00F7":["FL","IsocenterToBlockTrayDistance"],"00F8":["CS","BlockType"],"00F9":["LO","AccessoryCode"],"00FA":["CS","BlockDivergence"],"00FB":["CS","BlockMountingPosition"],"00FC":["IS","BlockNumber"],"00FE":["LO","BlockName"],"0100":["DS","BlockThickness"],"0102":["DS","BlockTransmission"],"0104":["IS","BlockNumberOfPoints"],"0106":["DS","BlockData"],"0107":["SQ","ApplicatorSequence"],"0108":["SH","ApplicatorID"],"0109":["CS","ApplicatorType"],"010A":["LO","ApplicatorDescription"],"010C":["DS","CumulativeDoseReferenceCoefficient"],"010E":["DS","FinalCumulativeMetersetWeight"],"0110":["IS","NumberOfControlPoints"],"0111":["SQ","ControlPointSequence"],"0112":["IS","ControlPointIndex"],"0114":["DS","NominalBeamEnergy"],"0115":["DS","DoseRateSet"],"0116":["SQ","WedgePositionSequence"],"0118":["CS","WedgePosition"],"011A":["SQ","BeamLimitingDevicePositionSequence"],"011C":["DS","LeafJawPositions"],"011E":["DS","GantryAngle"],"011F":["CS","GantryRotationDirection"],"0120":["DS","BeamLimitingDeviceAngle"],"0121":["CS","BeamLimitingDeviceRotationDirection"],"0122":["DS","PatientSupportAngle"],"0123":["CS","PatientSupportRotationDirection"],"0124":["DS","TableTopEccentricAxisDistance"],"0125":["DS","TableTopEccentricAngle"],"0126":["CS","TableTopEccentricRotationDirection"],"0128":["DS","TableTopVerticalPosition"],"0129":["DS","TableTopLongitudinalPosition"],"012A":["DS","TableTopLateralPosition"],"012C":["DS","IsocenterPosition"],"012E":["DS","SurfaceEntryPoint"],"0130":["DS","SourceToSurfaceDistance"],"0134":["DS","CumulativeMetersetWeight"],"0140":["FL","TableTopPitchAngle"],"0142":["CS","TableTopPitchRotationDirection"],"0144":["FL","TableTopRollAngle"],"0146":["CS","TableTopRollRotationDirection"],"0148":["FL","HeadFixationAngle"],"014A":["FL","GantryPitchAngle"],"014C":["CS","GantryPitchRotationDirection"],"014E":["FL","GantryPitchAngleTolerance"],"0180":["SQ","PatientSetupSequence"],"0182":["IS","PatientSetupNumber"],"0183":["LO","PatientSetupLabel"],"0184":["LO","PatientAdditionalPosition"],"0190":["SQ","FixationDeviceSequence"],"0192":["CS","FixationDeviceType"],"0194":["SH","FixationDeviceLabel"],"0196":["ST","FixationDeviceDescription"],"0198":["SH","FixationDevicePosition"],"0199":["FL","FixationDevicePitchAngle"],"019A":["FL","FixationDeviceRollAngle"],"01A0":["SQ","ShieldingDeviceSequence"],"01A2":["CS","ShieldingDeviceType"],"01A4":["SH","ShieldingDeviceLabel"],"01A6":["ST","ShieldingDeviceDescription"],"01A8":["SH","ShieldingDevicePosition"],"01B0":["CS","SetupTechnique"],"01B2":["ST","SetupTechniqueDescription"],"01B4":["SQ","SetupDeviceSequence"],"01B6":["CS","SetupDeviceType"],"01B8":["SH","SetupDeviceLabel"],"01BA":["ST","SetupDeviceDescription"],"01BC":["DS","SetupDeviceParameter"],"01D0":["ST","SetupReferenceDescription"],"01D2":["DS","TableTopVerticalSetupDisplacement"],"01D4":["DS","TableTopLongitudinalSetupDisplacement"],"01D6":["DS","TableTopLateralSetupDisplacement"],"0200":["CS","BrachyTreatmentTechnique"],"0202":["CS","BrachyTreatmentType"],"0206":["SQ","TreatmentMachineSequence"],"0210":["SQ","SourceSequence"],"0212":["IS","SourceNumber"],"0214":["CS","SourceType"],"0216":["LO","SourceManufacturer"],"0218":["DS","ActiveSourceDiameter"],"021A":["DS","ActiveSourceLength"],"0222":["DS","SourceEncapsulationNominalThickness"],"0224":["DS","SourceEncapsulationNominalTransmission"],"0226":["LO","SourceIsotopeName"],"0228":["DS","SourceIsotopeHalfLife"],"0229":["CS","SourceStrengthUnits"],"022A":["DS","ReferenceAirKermaRate"],"022B":["DS","SourceStrength"],"022C":["DA","SourceStrengthReferenceDate"],"022E":["TM","SourceStrengthReferenceTime"],"0230":["SQ","ApplicationSetupSequence"],"0232":["CS","ApplicationSetupType"],"0234":["IS","ApplicationSetupNumber"],"0236":["LO","ApplicationSetupName"],"0238":["LO","ApplicationSetupManufacturer"],"0240":["IS","TemplateNumber"],"0242":["SH","TemplateType"],"0244":["LO","TemplateName"],"0250":["DS","TotalReferenceAirKerma"],"0260":["SQ","BrachyAccessoryDeviceSequence"],"0262":["IS","BrachyAccessoryDeviceNumber"],"0263":["SH","BrachyAccessoryDeviceID"],"0264":["CS","BrachyAccessoryDeviceType"],"0266":["LO","BrachyAccessoryDeviceName"],"026A":["DS","BrachyAccessoryDeviceNominalThickness"],"026C":["DS","BrachyAccessoryDeviceNominalTransmission"],"0280":["SQ","ChannelSequence"],"0282":["IS","ChannelNumber"],"0284":["DS","ChannelLength"],"0286":["DS","ChannelTotalTime"],"0288":["CS","SourceMovementType"],"028A":["IS","NumberOfPulses"],"028C":["DS","PulseRepetitionInterval"],"0290":["IS","SourceApplicatorNumber"],"0291":["SH","SourceApplicatorID"],"0292":["CS","SourceApplicatorType"],"0294":["LO","SourceApplicatorName"],"0296":["DS","SourceApplicatorLength"],"0298":["LO","SourceApplicatorManufacturer"],"029C":["DS","SourceApplicatorWallNominalThickness"],"029E":["DS","SourceApplicatorWallNominalTransmission"],"02A0":["DS","SourceApplicatorStepSize"],"02A2":["IS","TransferTubeNumber"],"02A4":["DS","TransferTubeLength"],"02B0":["SQ","ChannelShieldSequence"],"02B2":["IS","ChannelShieldNumber"],"02B3":["SH","ChannelShieldID"],"02B4":["LO","ChannelShieldName"],"02B8":["DS","ChannelShieldNominalThickness"],"02BA":["DS","ChannelShieldNominalTransmission"],"02C8":["DS","FinalCumulativeTimeWeight"],"02D0":["SQ","BrachyControlPointSequence"],"02D2":["DS","ControlPointRelativePosition"],"02D4":["DS","ControlPoint3DPosition"],"02D6":["DS","CumulativeTimeWeight"],"02E0":["CS","CompensatorDivergence"],"02E1":["CS","CompensatorMountingPosition"],"02E2":["DS","SourceToCompensatorDistance"],"02E3":["FL","TotalCompensatorTrayWaterEquivalentThickness"],"02E4":["FL","IsocenterToCompensatorTrayDistance"],"02E5":["FL","CompensatorColumnOffset"],"02E6":["FL","IsocenterToCompensatorDistances"],"02E7":["FL","CompensatorRelativeStoppingPowerRatio"],"02E8":["FL","CompensatorMillingToolDiameter"],"02EA":["SQ","IonRangeCompensatorSequence"],"02EB":["LT","CompensatorDescription"],"0302":["IS","RadiationMassNumber"],"0304":["IS","RadiationAtomicNumber"],"0306":["SS","RadiationChargeState"],"0308":["CS","ScanMode"],"030A":["FL","VirtualSourceAxisDistances"],"030C":["SQ","SnoutSequence"],"030D":["FL","SnoutPosition"],"030F":["SH","SnoutID"],"0312":["IS","NumberOfRangeShifters"],"0314":["SQ","RangeShifterSequence"],"0316":["IS","RangeShifterNumber"],"0318":["SH","RangeShifterID"],"0320":["CS","RangeShifterType"],"0322":["LO","RangeShifterDescription"],"0330":["IS","NumberOfLateralSpreadingDevices"],"0332":["SQ","LateralSpreadingDeviceSequence"],"0334":["IS","LateralSpreadingDeviceNumber"],"0336":["SH","LateralSpreadingDeviceID"],"0338":["CS","LateralSpreadingDeviceType"],"033A":["LO","LateralSpreadingDeviceDescription"],"033C":["FL","LateralSpreadingDeviceWaterEquivalentThickness"],"0340":["IS","NumberOfRangeModulators"],"0342":["SQ","RangeModulatorSequence"],"0344":["IS","RangeModulatorNumber"],"0346":["SH","RangeModulatorID"],"0348":["CS","RangeModulatorType"],"034A":["LO","RangeModulatorDescription"],"034C":["SH","BeamCurrentModulationID"],"0350":["CS","PatientSupportType"],"0352":["SH","PatientSupportID"],"0354":["LO","PatientSupportAccessoryCode"],"0356":["FL","FixationLightAzimuthalAngle"],"0358":["FL","FixationLightPolarAngle"],"035A":["FL","MetersetRate"],"0360":["SQ","RangeShifterSettingsSequence"],"0362":["LO","RangeShifterSetting"],"0364":["FL","IsocenterToRangeShifterDistance"],"0366":["FL","RangeShifterWaterEquivalentThickness"],"0370":["SQ","LateralSpreadingDeviceSettingsSequence"],"0372":["LO","LateralSpreadingDeviceSetting"],"0374":["FL","IsocenterToLateralSpreadingDeviceDistance"],"0380":["SQ","RangeModulatorSettingsSequence"],"0382":["FL","RangeModulatorGatingStartValue"],"0384":["FL","RangeModulatorGatingStopValue"],"0386":["FL","RangeModulatorGatingStartWaterEquivalentThickness"],"0388":["FL","RangeModulatorGatingStopWaterEquivalentThickness"],"038A":["FL","IsocenterToRangeModulatorDistance"],"0390":["SH","ScanSpotTuneID"],"0392":["IS","NumberOfScanSpotPositions"],"0394":["FL","ScanSpotPositionMap"],"0396":["FL","ScanSpotMetersetWeights"],"0398":["FL","ScanningSpotSize"],"039A":["IS","NumberOfPaintings"],"03A0":["SQ","IonToleranceTableSequence"],"03A2":["SQ","IonBeamSequence"],"03A4":["SQ","IonBeamLimitingDeviceSequence"],"03A6":["SQ","IonBlockSequence"],"03A8":["SQ","IonControlPointSequence"],"03AA":["SQ","IonWedgeSequence"],"03AC":["SQ","IonWedgePositionSequence"],"0401":["SQ","ReferencedSetupImageSequence"],"0402":["ST","SetupImageComment"],"0410":["SQ","MotionSynchronizationSequence"],"0412":["FL","ControlPointOrientation"],"0420":["SQ","GeneralAccessorySequence"],"0421":["SH","GeneralAccessoryID"],"0422":["ST","GeneralAccessoryDescription"],"0423":["CS","GeneralAccessoryType"],"0424":["IS","GeneralAccessoryNumber"],"0431":["SQ","ApplicatorGeometrySequence"],"0432":["CS","ApplicatorApertureShape"],"0433":["FL","ApplicatorOpening"],"0434":["FL","ApplicatorOpeningX"],"0435":["FL","ApplicatorOpeningY"],"0436":["FL","SourceToApplicatorMountingPositionDistance"]},"300C":{"0002":["SQ","ReferencedRTPlanSequence"],"0004":["SQ","ReferencedBeamSequence"],"0006":["IS","ReferencedBeamNumber"],"0007":["IS","ReferencedReferenceImageNumber"],"0008":["DS","StartCumulativeMetersetWeight"],"0009":["DS","EndCumulativeMetersetWeight"],"000A":["SQ","ReferencedBrachyApplicationSetupSequence"],"000C":["IS","ReferencedBrachyApplicationSetupNumber"],"000E":["IS","ReferencedSourceNumber"],"0020":["SQ","ReferencedFractionGroupSequence"],"0022":["IS","ReferencedFractionGroupNumber"],"0040":["SQ","ReferencedVerificationImageSequence"],"0042":["SQ","ReferencedReferenceImageSequence"],"0050":["SQ","ReferencedDoseReferenceSequence"],"0051":["IS","ReferencedDoseReferenceNumber"],"0055":["SQ","BrachyReferencedDoseReferenceSequence"],"0060":["SQ","ReferencedStructureSetSequence"],"006A":["IS","ReferencedPatientSetupNumber"],"0080":["SQ","ReferencedDoseSequence"],"00A0":["IS","ReferencedToleranceTableNumber"],"00B0":["SQ","ReferencedBolusSequence"],"00C0":["IS","ReferencedWedgeNumber"],"00D0":["IS","ReferencedCompensatorNumber"],"00E0":["IS","ReferencedBlockNumber"],"00F0":["IS","ReferencedControlPointIndex"],"00F2":["SQ","ReferencedControlPointSequence"],"00F4":["IS","ReferencedStartControlPointIndex"],"00F6":["IS","ReferencedStopControlPointIndex"],"0100":["IS","ReferencedRangeShifterNumber"],"0102":["IS","ReferencedLateralSpreadingDeviceNumber"],"0104":["IS","ReferencedRangeModulatorNumber"]},"300E":{"0002":["CS","ApprovalStatus"],"0004":["DA","ReviewDate"],"0005":["TM","ReviewTime"],"0008":["PN","ReviewerName"]},4e3:{"0010":["LT","Arbitrary"],4e3:["LT","TextComments"]},4008:{"0040":["SH","ResultsID"],"0042":["LO","ResultsIDIssuer"],"0050":["SQ","ReferencedInterpretationSequence"],"00FF":["CS","ReportProductionStatusTrial"],"0100":["DA","InterpretationRecordedDate"],"0101":["TM","InterpretationRecordedTime"],"0102":["PN","InterpretationRecorder"],"0103":["LO","ReferenceToRecordedSound"],"0108":["DA","InterpretationTranscriptionDate"],"0109":["TM","InterpretationTranscriptionTime"],"010A":["PN","InterpretationTranscriber"],"010B":["ST","InterpretationText"],"010C":["PN","InterpretationAuthor"],"0111":["SQ","InterpretationApproverSequence"],"0112":["DA","InterpretationApprovalDate"],"0113":["TM","InterpretationApprovalTime"],"0114":["PN","PhysicianApprovingInterpretation"],"0115":["LT","InterpretationDiagnosisDescription"],"0117":["SQ","InterpretationDiagnosisCodeSequence"],"0118":["SQ","ResultsDistributionListSequence"],"0119":["PN","DistributionName"],"011A":["LO","DistributionAddress"],"0200":["SH","InterpretationID"],"0202":["LO","InterpretationIDIssuer"],"0210":["CS","InterpretationTypeID"],"0212":["CS","InterpretationStatusID"],"0300":["ST","Impressions"],4e3:["ST","ResultsComments"]},4010:{"0001":["CS","LowEnergyDetectors"],"0002":["CS","HighEnergyDetectors"],"0004":["SQ","DetectorGeometrySequence"],1001:["SQ","ThreatROIVoxelSequence"],1004:["FL","ThreatROIBase"],1005:["FL","ThreatROIExtents"],1006:["OB","ThreatROIBitmap"],1007:["SH","RouteSegmentID"],1008:["CS","GantryType"],1009:["CS","OOIOwnerType"],"100A":["SQ","RouteSegmentSequence"],1010:["US","PotentialThreatObjectID"],1011:["SQ","ThreatSequence"],1012:["CS","ThreatCategory"],1013:["LT","ThreatCategoryDescription"],1014:["CS","ATDAbilityAssessment"],1015:["CS","ATDAssessmentFlag"],1016:["FL","ATDAssessmentProbability"],1017:["FL","Mass"],1018:["FL","Density"],1019:["FL","ZEffective"],"101A":["SH","BoardingPassID"],"101B":["FL","CenterOfMass"],"101C":["FL","CenterOfPTO"],"101D":["FL","BoundingPolygon"],"101E":["SH","RouteSegmentStartLocationID"],"101F":["SH","RouteSegmentEndLocationID"],1020:["CS","RouteSegmentLocationIDType"],1021:["CS","AbortReason"],1023:["FL","VolumeOfPTO"],1024:["CS","AbortFlag"],1025:["DT","RouteSegmentStartTime"],1026:["DT","RouteSegmentEndTime"],1027:["CS","TDRType"],1028:["CS","InternationalRouteSegment"],1029:["LO","ThreatDetectionAlgorithmandVersion"],"102A":["SH","AssignedLocation"],"102B":["DT","AlarmDecisionTime"],1031:["CS","AlarmDecision"],1033:["US","NumberOfTotalObjects"],1034:["US","NumberOfAlarmObjects"],1037:["SQ","PTORepresentationSequence"],1038:["SQ","ATDAssessmentSequence"],1039:["CS","TIPType"],"103A":["CS","DICOSVersion"],1041:["DT","OOIOwnerCreationTime"],1042:["CS","OOIType"],1043:["FL","OOISize"],1044:["CS","AcquisitionStatus"],1045:["SQ","BasisMaterialsCodeSequence"],1046:["CS","PhantomType"],1047:["SQ","OOIOwnerSequence"],1048:["CS","ScanType"],1051:["LO","ItineraryID"],1052:["SH","ItineraryIDType"],1053:["LO","ItineraryIDAssigningAuthority"],1054:["SH","RouteID"],1055:["SH","RouteIDAssigningAuthority"],1056:["CS","InboundArrivalType"],1058:["SH","CarrierID"],1059:["CS","CarrierIDAssigningAuthority"],1060:["FL","SourceOrientation"],1061:["FL","SourcePosition"],1062:["FL","BeltHeight"],1064:["SQ","AlgorithmRoutingCodeSequence"],1067:["CS","TransportClassification"],1068:["LT","OOITypeDescriptor"],1069:["FL","TotalProcessingTime"],"106C":["OB","DetectorCalibrationData"]}},u.Dictionary.getVR=function(m,A){var S,v,w;return w=u.Dictionary.dict[u.Utils.dec2hex(m)],w&&(v=w[u.Utils.dec2hex(A)],v?S=v[0]:A===0&&(S="UL")),S||(w=u.Dictionary.dictPrivate[u.Utils.dec2hex(m)],w&&(v=w[u.Utils.dec2hex(A)],v&&(S=v[0]))),S||(S="OB"),S},u.Dictionary.getDescription=function(m,A){var S,v,w;return w=u.Dictionary.dict[u.Utils.dec2hex(m)],w&&(v=w[u.Utils.dec2hex(A)],v?S=v[1]:A===0&&(S="Group "+u.Utils.dec2hex(m)+" Length")),S||(w=u.Dictionary.dictPrivate[u.Utils.dec2hex(m)],w&&(v=w[u.Utils.dec2hex(A)],v&&(S=v[1]))),S||(S="PrivateData"),S},T.exports&&(T.exports=u.Dictionary)}(dictionary)),dictionary.exports}var image={exports:{}},tag={exports:{}},lib$1={exports:{}},_default$1={},lib={exports:{}},_default={},hasRequired_default$1;function require_default$1(){if(hasRequired_default$1)return _default;hasRequired_default$1=1;function T(){var v={};return v["align-content"]=!1,v["align-items"]=!1,v["align-self"]=!1,v["alignment-adjust"]=!1,v["alignment-baseline"]=!1,v.all=!1,v["anchor-point"]=!1,v.animation=!1,v["animation-delay"]=!1,v["animation-direction"]=!1,v["animation-duration"]=!1,v["animation-fill-mode"]=!1,v["animation-iteration-count"]=!1,v["animation-name"]=!1,v["animation-play-state"]=!1,v["animation-timing-function"]=!1,v.azimuth=!1,v["backface-visibility"]=!1,v.background=!0,v["background-attachment"]=!0,v["background-clip"]=!0,v["background-color"]=!0,v["background-image"]=!0,v["background-origin"]=!0,v["background-position"]=!0,v["background-repeat"]=!0,v["background-size"]=!0,v["baseline-shift"]=!1,v.binding=!1,v.bleed=!1,v["bookmark-label"]=!1,v["bookmark-level"]=!1,v["bookmark-state"]=!1,v.border=!0,v["border-bottom"]=!0,v["border-bottom-color"]=!0,v["border-bottom-left-radius"]=!0,v["border-bottom-right-radius"]=!0,v["border-bottom-style"]=!0,v["border-bottom-width"]=!0,v["border-collapse"]=!0,v["border-color"]=!0,v["border-image"]=!0,v["border-image-outset"]=!0,v["border-image-repeat"]=!0,v["border-image-slice"]=!0,v["border-image-source"]=!0,v["border-image-width"]=!0,v["border-left"]=!0,v["border-left-color"]=!0,v["border-left-style"]=!0,v["border-left-width"]=!0,v["border-radius"]=!0,v["border-right"]=!0,v["border-right-color"]=!0,v["border-right-style"]=!0,v["border-right-width"]=!0,v["border-spacing"]=!0,v["border-style"]=!0,v["border-top"]=!0,v["border-top-color"]=!0,v["border-top-left-radius"]=!0,v["border-top-right-radius"]=!0,v["border-top-style"]=!0,v["border-top-width"]=!0,v["border-width"]=!0,v.bottom=!1,v["box-decoration-break"]=!0,v["box-shadow"]=!0,v["box-sizing"]=!0,v["box-snap"]=!0,v["box-suppress"]=!0,v["break-after"]=!0,v["break-before"]=!0,v["break-inside"]=!0,v["caption-side"]=!1,v.chains=!1,v.clear=!0,v.clip=!1,v["clip-path"]=!1,v["clip-rule"]=!1,v.color=!0,v["color-interpolation-filters"]=!0,v["column-count"]=!1,v["column-fill"]=!1,v["column-gap"]=!1,v["column-rule"]=!1,v["column-rule-color"]=!1,v["column-rule-style"]=!1,v["column-rule-width"]=!1,v["column-span"]=!1,v["column-width"]=!1,v.columns=!1,v.contain=!1,v.content=!1,v["counter-increment"]=!1,v["counter-reset"]=!1,v["counter-set"]=!1,v.crop=!1,v.cue=!1,v["cue-after"]=!1,v["cue-before"]=!1,v.cursor=!1,v.direction=!1,v.display=!0,v["display-inside"]=!0,v["display-list"]=!0,v["display-outside"]=!0,v["dominant-baseline"]=!1,v.elevation=!1,v["empty-cells"]=!1,v.filter=!1,v.flex=!1,v["flex-basis"]=!1,v["flex-direction"]=!1,v["flex-flow"]=!1,v["flex-grow"]=!1,v["flex-shrink"]=!1,v["flex-wrap"]=!1,v.float=!1,v["float-offset"]=!1,v["flood-color"]=!1,v["flood-opacity"]=!1,v["flow-from"]=!1,v["flow-into"]=!1,v.font=!0,v["font-family"]=!0,v["font-feature-settings"]=!0,v["font-kerning"]=!0,v["font-language-override"]=!0,v["font-size"]=!0,v["font-size-adjust"]=!0,v["font-stretch"]=!0,v["font-style"]=!0,v["font-synthesis"]=!0,v["font-variant"]=!0,v["font-variant-alternates"]=!0,v["font-variant-caps"]=!0,v["font-variant-east-asian"]=!0,v["font-variant-ligatures"]=!0,v["font-variant-numeric"]=!0,v["font-variant-position"]=!0,v["font-weight"]=!0,v.grid=!1,v["grid-area"]=!1,v["grid-auto-columns"]=!1,v["grid-auto-flow"]=!1,v["grid-auto-rows"]=!1,v["grid-column"]=!1,v["grid-column-end"]=!1,v["grid-column-start"]=!1,v["grid-row"]=!1,v["grid-row-end"]=!1,v["grid-row-start"]=!1,v["grid-template"]=!1,v["grid-template-areas"]=!1,v["grid-template-columns"]=!1,v["grid-template-rows"]=!1,v["hanging-punctuation"]=!1,v.height=!0,v.hyphens=!1,v.icon=!1,v["image-orientation"]=!1,v["image-resolution"]=!1,v["ime-mode"]=!1,v["initial-letters"]=!1,v["inline-box-align"]=!1,v["justify-content"]=!1,v["justify-items"]=!1,v["justify-self"]=!1,v.left=!1,v["letter-spacing"]=!0,v["lighting-color"]=!0,v["line-box-contain"]=!1,v["line-break"]=!1,v["line-grid"]=!1,v["line-height"]=!1,v["line-snap"]=!1,v["line-stacking"]=!1,v["line-stacking-ruby"]=!1,v["line-stacking-shift"]=!1,v["line-stacking-strategy"]=!1,v["list-style"]=!0,v["list-style-image"]=!0,v["list-style-position"]=!0,v["list-style-type"]=!0,v.margin=!0,v["margin-bottom"]=!0,v["margin-left"]=!0,v["margin-right"]=!0,v["margin-top"]=!0,v["marker-offset"]=!1,v["marker-side"]=!1,v.marks=!1,v.mask=!1,v["mask-box"]=!1,v["mask-box-outset"]=!1,v["mask-box-repeat"]=!1,v["mask-box-slice"]=!1,v["mask-box-source"]=!1,v["mask-box-width"]=!1,v["mask-clip"]=!1,v["mask-image"]=!1,v["mask-origin"]=!1,v["mask-position"]=!1,v["mask-repeat"]=!1,v["mask-size"]=!1,v["mask-source-type"]=!1,v["mask-type"]=!1,v["max-height"]=!0,v["max-lines"]=!1,v["max-width"]=!0,v["min-height"]=!0,v["min-width"]=!0,v["move-to"]=!1,v["nav-down"]=!1,v["nav-index"]=!1,v["nav-left"]=!1,v["nav-right"]=!1,v["nav-up"]=!1,v["object-fit"]=!1,v["object-position"]=!1,v.opacity=!1,v.order=!1,v.orphans=!1,v.outline=!1,v["outline-color"]=!1,v["outline-offset"]=!1,v["outline-style"]=!1,v["outline-width"]=!1,v.overflow=!1,v["overflow-wrap"]=!1,v["overflow-x"]=!1,v["overflow-y"]=!1,v.padding=!0,v["padding-bottom"]=!0,v["padding-left"]=!0,v["padding-right"]=!0,v["padding-top"]=!0,v.page=!1,v["page-break-after"]=!1,v["page-break-before"]=!1,v["page-break-inside"]=!1,v["page-policy"]=!1,v.pause=!1,v["pause-after"]=!1,v["pause-before"]=!1,v.perspective=!1,v["perspective-origin"]=!1,v.pitch=!1,v["pitch-range"]=!1,v["play-during"]=!1,v.position=!1,v["presentation-level"]=!1,v.quotes=!1,v["region-fragment"]=!1,v.resize=!1,v.rest=!1,v["rest-after"]=!1,v["rest-before"]=!1,v.richness=!1,v.right=!1,v.rotation=!1,v["rotation-point"]=!1,v["ruby-align"]=!1,v["ruby-merge"]=!1,v["ruby-position"]=!1,v["shape-image-threshold"]=!1,v["shape-outside"]=!1,v["shape-margin"]=!1,v.size=!1,v.speak=!1,v["speak-as"]=!1,v["speak-header"]=!1,v["speak-numeral"]=!1,v["speak-punctuation"]=!1,v["speech-rate"]=!1,v.stress=!1,v["string-set"]=!1,v["tab-size"]=!1,v["table-layout"]=!1,v["text-align"]=!0,v["text-align-last"]=!0,v["text-combine-upright"]=!0,v["text-decoration"]=!0,v["text-decoration-color"]=!0,v["text-decoration-line"]=!0,v["text-decoration-skip"]=!0,v["text-decoration-style"]=!0,v["text-emphasis"]=!0,v["text-emphasis-color"]=!0,v["text-emphasis-position"]=!0,v["text-emphasis-style"]=!0,v["text-height"]=!0,v["text-indent"]=!0,v["text-justify"]=!0,v["text-orientation"]=!0,v["text-overflow"]=!0,v["text-shadow"]=!0,v["text-space-collapse"]=!0,v["text-transform"]=!0,v["text-underline-position"]=!0,v["text-wrap"]=!0,v.top=!1,v.transform=!1,v["transform-origin"]=!1,v["transform-style"]=!1,v.transition=!1,v["transition-delay"]=!1,v["transition-duration"]=!1,v["transition-property"]=!1,v["transition-timing-function"]=!1,v["unicode-bidi"]=!1,v["vertical-align"]=!1,v.visibility=!1,v["voice-balance"]=!1,v["voice-duration"]=!1,v["voice-family"]=!1,v["voice-pitch"]=!1,v["voice-range"]=!1,v["voice-rate"]=!1,v["voice-stress"]=!1,v["voice-volume"]=!1,v.volume=!1,v["white-space"]=!1,v.widows=!1,v.width=!0,v["will-change"]=!1,v["word-break"]=!0,v["word-spacing"]=!0,v["word-wrap"]=!0,v["wrap-flow"]=!1,v["wrap-through"]=!1,v["writing-mode"]=!1,v["z-index"]=!1,v}function u(v,w,D){}function m(v,w,D){}var A=/javascript\s*\:/img;function S(v,w){return A.test(w)?"":w}return _default.whiteList=T(),_default.getDefaultWhiteList=T,_default.onAttr=u,_default.onIgnoreAttr=m,_default.safeAttrValue=S,_default}var util$1,hasRequiredUtil$1;function requireUtil$1(){return hasRequiredUtil$1||(hasRequiredUtil$1=1,util$1={indexOf:function(T,u){var m,A;if(Array.prototype.indexOf)return T.indexOf(u);for(m=0,A=T.length;m/g,e=/"/g,N=/"/g,q=/&#([a-zA-Z0-9]*);?/gim,z=/:?/gim,e0=/&newline;?/gim,H=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,j=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,y=/u\s*r\s*l\s*\(.*/gi;function Y(g0){return g0.replace(e,""")}function G(g0){return g0.replace(N,'"')}function J(g0){return g0.replace(q,function(C0,F0){return F0[0]==="x"||F0[0]==="X"?String.fromCharCode(parseInt(F0.substr(1),16)):String.fromCharCode(parseInt(F0,10))})}function i0(g0){return g0.replace(z,":").replace(e0," ")}function Q(g0){for(var T0="",C0=0,F0=g0.length;C0",F0);if(ee===-1)break;C0=ee+3}return T0}function S0(g0){var T0=g0.split("");return T0=T0.filter(function(C0){var F0=C0.charCodeAt(0);return F0===127?!1:F0<=31?F0===10||F0===13:!0}),T0.join("")}return _default$1.whiteList=A(),_default$1.getDefaultWhiteList=A,_default$1.onTag=v,_default$1.onIgnoreTag=w,_default$1.onTagAttr=D,_default$1.onIgnoreTagAttr=R,_default$1.safeAttrValue=P,_default$1.escapeHtml=L,_default$1.escapeQuote=Y,_default$1.unescapeQuote=G,_default$1.escapeHtmlEntities=J,_default$1.escapeDangerHtml5Entities=i0,_default$1.clearNonPrintableCharacter=Q,_default$1.friendlyAttrValue=f,_default$1.escapeAttrValue=o0,_default$1.onIgnoreTagStripAll=l0,_default$1.StripTagBody=c0,_default$1.stripCommentTag=d0,_default$1.stripBlankChar=S0,_default$1.cssFilter=S,_default$1.getDefaultCSSWhiteList=u,_default$1}var parser$1={},hasRequiredParser$1;function requireParser$1(){if(hasRequiredParser$1)return parser$1;hasRequiredParser$1=1;var T=requireUtil();function u(d){var E=T.spaceIndex(d),e;return E===-1?e=d.slice(1,-1):e=d.slice(1,E+1),e=T.trim(e).toLowerCase(),e.slice(0,1)==="/"&&(e=e.slice(1)),e.slice(-1)==="/"&&(e=e.slice(0,-1)),e}function m(d){return d.slice(0,2)===""||H===j-1){N+=e(d.slice(q,z)),Y=d.slice(z,H+1),y=u(Y),N+=E(z,N.length,y,Y,m(Y)),q=H+1,z=!1;continue}if(G==='"'||G==="'")for(var J=1,i0=d.charAt(H-J);i0.trim()===""||i0==="=";){if(i0==="="){e0=G;continue e}i0=d.charAt(H-++J)}}else if(G===e0){e0=!1;continue}}return q0;E--){var e=d[E];if(e!==" ")return e==="="?E:-1}}function L(d){return d[0]==='"'&&d[d.length-1]==='"'||d[0]==="'"&&d[d.length-1]==="'"}function P(d){return L(d)?d.substr(1,d.length-2):d}return parser$1.parseTag=A,parser$1.parseAttr=v,parser$1}var xss,hasRequiredXss;function requireXss(){if(hasRequiredXss)return xss;hasRequiredXss=1;var T=requireLib$1().FilterCSS,u=require_default(),m=requireParser$1(),A=m.parseTag,S=m.parseAttr,v=requireUtil();function w(d){return d==null}function D(d){var E=v.spaceIndex(d);if(E===-1)return{html:"",closing:d[d.length-2]==="/"};d=v.trim(d.slice(E+1,-1));var e=d[d.length-1]==="/";return e&&(d=v.trim(d.slice(0,-1))),{html:d,closing:e}}function R(d){var E={};for(var e in d)E[e]=d[e];return E}function L(d){var E={};for(var e in d)Array.isArray(d[e])?E[e.toLowerCase()]=d[e].map(function(N){return N.toLowerCase()}):E[e.toLowerCase()]=d[e];return E}function P(d){d=R(d||{}),d.stripIgnoreTag&&(d.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),d.onIgnoreTag=u.onIgnoreTagStripAll),d.whiteList||d.allowList?d.whiteList=L(d.whiteList||d.allowList):d.whiteList=u.whiteList,d.onTag=d.onTag||u.onTag,d.onTagAttr=d.onTagAttr||u.onTagAttr,d.onIgnoreTag=d.onIgnoreTag||u.onIgnoreTag,d.onIgnoreTagAttr=d.onIgnoreTagAttr||u.onIgnoreTagAttr,d.safeAttrValue=d.safeAttrValue||u.safeAttrValue,d.escapeHtml=d.escapeHtml||u.escapeHtml,this.options=d,d.css===!1?this.cssFilter=!1:(d.css=d.css||{},this.cssFilter=new T(d.css))}return P.prototype.process=function(d){if(d=d||"",d=d.toString(),!d)return"";var E=this,e=E.options,N=e.whiteList,q=e.onTag,z=e.onIgnoreTag,e0=e.onTagAttr,H=e.onIgnoreTagAttr,j=e.safeAttrValue,y=e.escapeHtml,Y=E.cssFilter;e.stripBlankChar&&(d=u.stripBlankChar(d)),e.allowCommentTag||(d=u.stripCommentTag(d));var G=!1;e.stripIgnoreTagBody&&(G=u.StripTagBody(e.stripIgnoreTagBody,z),z=G.onIgnoreTag);var J=A(d,function(i0,Q,f,o0,l0){var c0={sourcePosition:i0,position:Q,isClosing:l0,isWhite:Object.prototype.hasOwnProperty.call(N,f)},d0=q(f,o0,c0);if(!w(d0))return d0;if(c0.isWhite){if(c0.isClosing)return"";var S0=D(o0),g0=N[f],T0=S(S0.html,function(C0,F0){var ee=v.indexOf(g0,C0)!==-1,ie=e0(f,C0,F0,ee);return w(ie)?ee?(F0=j(f,C0,F0,Y),F0?C0+'="'+F0+'"':C0):(ie=H(f,C0,F0,ee),w(ie)?void 0:ie):ie});return o0="<"+f,T0&&(o0+=" "+T0),S0.closing&&(o0+=" /"),o0+=">",o0}else return d0=z(f,o0,c0),w(d0)?y(o0):d0},y);return G&&(J=G.remove(J)),J},xss=P,xss}var hasRequiredLib;function requireLib(){return hasRequiredLib||(hasRequiredLib=1,function(T,u){var m=require_default(),A=requireParser$1(),S=requireXss();function v(D,R){var L=new S(R);return L.process(D)}u=T.exports=v,u.filterXSS=v,u.FilterXSS=S,function(){for(var D in m)u[D]=m[D];for(var R in A)u[R]=A[R]}(),typeof window<"u"&&(window.filterXSS=T.exports);function w(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}w()&&(self.filterXSS=T.exports)}(lib$1,lib$1.exports)),lib$1.exports}var siemens={exports:{}},hasRequiredSiemens;function requireSiemens(){return hasRequiredSiemens||(hasRequiredSiemens=1,function(T){var u=u||{};u.Utils=u.Utils||(typeof commonjsRequire<"u"?requireUtilities():null),u.Siemens=u.Siemens||function(m){this.output="",this.data=new DataView(m,0)},u.Siemens.CSA2_MAGIC_NUMBER=[83,86,49,48],u.Siemens.NAME_LENGTH=64,u.Siemens.ELEMENT_CSA1=4112,u.Siemens.ELEMENT_CSA2=4128,u.Siemens.GROUP_CSA=41,u.Siemens.prototype.readHeader=function(){var m,A;try{if(this.data.byteLength>u.Siemens.CSA2_MAGIC_NUMBER.length){for(A=!0,m=0;m128)return this.output;for(m+=4,m+=4,S=0;Sthis.data.buffer.length?-1:(m+=16,A>0&&(this.output+=this.readString(m,A)+" "),m+A)},u.Siemens.prototype.canRead=function(m,A){return m===u.Siemens.GROUP_CSA&&(A===u.Siemens.ELEMENT_CSA1||A===u.Siemens.ELEMENT_CSA2)},T.exports&&(T.exports=u.Siemens)}(siemens)),siemens.exports}var hasRequiredTag;function requireTag(){return hasRequiredTag||(hasRequiredTag=1,function(T){var u=requireLib(),m=m||{};m.Utils=m.Utils||(typeof commonjsRequire<"u"?requireUtilities():null),m.Dictionary=m.Dictionary||(typeof commonjsRequire<"u"?requireDictionary():null),m.Siemens=m.Siemens||(typeof commonjsRequire<"u"?requireSiemens():null),m.Tag=m.Tag||function(A,S,v,w,D,R,L,P,d){if(this.group=A,this.element=S,this.vr=v,this.offsetStart=D,this.offsetValue=R,this.offsetEnd=L,this.sublist=!1,this.preformatted=!1,this.id=m.Tag.createId(A,S),w instanceof Array)this.value=w,this.sublist=!0;else if(w!==null){var E=new DataView(w);this.value=m.Tag.convertValue(v,E,P,d),this.value===E&&this.isPrivateData()&&(this.value=m.Tag.convertPrivateValue(A,S,E),this.preformatted=this.value!==E)}else this.value=null},m.Tag.PRIVATE_DATA_READERS=[m.Siemens],m.Tag.VR_AE_MAX_LENGTH=16,m.Tag.VR_AS_MAX_LENGTH=4,m.Tag.VR_AT_MAX_LENGTH=4,m.Tag.VR_CS_MAX_LENGTH=16,m.Tag.VR_DA_MAX_LENGTH=8,m.Tag.VR_DS_MAX_LENGTH=16,m.Tag.VR_DT_MAX_LENGTH=26,m.Tag.VR_FL_MAX_LENGTH=4,m.Tag.VR_FD_MAX_LENGTH=8,m.Tag.VR_IS_MAX_LENGTH=12,m.Tag.VR_LO_MAX_LENGTH=64,m.Tag.VR_LT_MAX_LENGTH=10240,m.Tag.VR_OB_MAX_LENGTH=-1,m.Tag.VR_OD_MAX_LENGTH=-1,m.Tag.VR_OF_MAX_LENGTH=-1,m.Tag.VR_OW_MAX_LENGTH=-1,m.Tag.VR_PN_MAX_LENGTH=64*5,m.Tag.VR_SH_MAX_LENGTH=16,m.Tag.VR_SL_MAX_LENGTH=4,m.Tag.VR_SS_MAX_LENGTH=2,m.Tag.VR_ST_MAX_LENGTH=1024,m.Tag.VR_TM_MAX_LENGTH=16,m.Tag.VR_UI_MAX_LENGTH=64,m.Tag.VR_UL_MAX_LENGTH=4,m.Tag.VR_UN_MAX_LENGTH=-1,m.Tag.VR_US_MAX_LENGTH=2,m.Tag.VR_UT_MAX_LENGTH=-1,m.Tag.VR_UC_MAX_LENGTH=-1,m.Tag.TAG_TRANSFER_SYNTAX=[2,16],m.Tag.TAG_META_LENGTH=[2,0],m.Tag.TAG_SUBLIST_ITEM=[65534,57344],m.Tag.TAG_SUBLIST_ITEM_DELIM=[65534,57357],m.Tag.TAG_SUBLIST_SEQ_DELIM=[65534,57565],m.Tag.TAG_ROWS=[40,16],m.Tag.TAG_COLS=[40,17],m.Tag.TAG_ACQUISITION_MATRIX=[24,4880],m.Tag.TAG_NUMBER_OF_FRAMES=[40,8],m.Tag.TAG_NUMBER_TEMPORAL_POSITIONS=[32,261],m.Tag.TAG_PIXEL_SPACING=[40,48],m.Tag.TAG_SLICE_THICKNESS=[24,80],m.Tag.TAG_SLICE_GAP=[24,136],m.Tag.TAG_TR=[24,128],m.Tag.TAG_FRAME_TIME=[24,4195],m.Tag.TAG_BITS_ALLOCATED=[40,256],m.Tag.TAG_BITS_STORED=[40,257],m.Tag.TAG_PIXEL_REPRESENTATION=[40,259],m.Tag.TAG_HIGH_BIT=[40,258],m.Tag.TAG_PHOTOMETRIC_INTERPRETATION=[40,4],m.Tag.TAG_SAMPLES_PER_PIXEL=[40,2],m.Tag.TAG_PLANAR_CONFIG=[40,6],m.Tag.TAG_PALETTE_RED=[40,4609],m.Tag.TAG_PALETTE_GREEN=[40,4610],m.Tag.TAG_PALETTE_BLUE=[40,4611],m.Tag.TAG_DATA_SCALE_SLOPE=[40,4179],m.Tag.TAG_DATA_SCALE_INTERCEPT=[40,4178],m.Tag.TAG_DATA_SCALE_ELSCINT=[519,4127],m.Tag.TAG_PIXEL_BANDWIDTH=[24,149],m.Tag.TAG_IMAGE_MIN=[40,262],m.Tag.TAG_IMAGE_MAX=[40,263],m.Tag.TAG_WINDOW_CENTER=[40,4176],m.Tag.TAG_WINDOW_WIDTH=[40,4177],m.Tag.TAG_SPECIFIC_CHAR_SET=[8,5],m.Tag.TAG_PATIENT_NAME=[16,16],m.Tag.TAG_PATIENT_ID=[16,32],m.Tag.TAG_STUDY_DATE=[8,32],m.Tag.TAG_STUDY_TIME=[8,48],m.Tag.TAG_STUDY_DES=[8,4144],m.Tag.TAG_IMAGE_TYPE=[8,8],m.Tag.TAG_IMAGE_COMMENTS=[32,16384],m.Tag.TAG_SEQUENCE_NAME=[24,36],m.Tag.TAG_MODALITY=[8,96],m.Tag.TAG_FRAME_OF_REF_UID=[32,82],m.Tag.TAG_STUDY_UID=[32,13],m.Tag.TAG_SERIES_DESCRIPTION=[8,4158],m.Tag.TAG_SERIES_INSTANCE_UID=[32,14],m.Tag.TAG_SERIES_NUMBER=[32,17],m.Tag.TAG_ECHO_NUMBER=[24,134],m.Tag.TAG_TEMPORAL_POSITION=[32,256],m.Tag.TAG_IMAGE_NUM=[32,19],m.Tag.TAG_SLICE_LOCATION=[32,4161],m.Tag.TAG_IMAGE_ORIENTATION=[32,55],m.Tag.TAG_IMAGE_POSITION=[32,50],m.Tag.TAG_SLICE_LOCATION_VECTOR=[24,8197],m.Tag.TAG_LUT_SHAPE=[8272,32],m.Tag.TAG_PIXEL_DATA=[32736,16],m.Tag.createId=function(A,S){var v=m.Utils.dec2hex(A),w=m.Utils.dec2hex(S);return v+w},m.Tag.getUnsignedInteger16=function(A,S){var v,w,D;for(w=A.byteLength/2,v=[],D=0;D=4?(D=parseInt(S[w].substring(0,4),10),S[w].length>=6&&(R=m.Utils.safeParseInt(S[w].substring(4,6))-1),S[w].length>=8&&(L=m.Utils.safeParseInt(S[w].substring(6,8))),S[w].length>=10&&(P=m.Utils.safeParseInt(S[w].substring(8,10))),S[w].length>=12&&(d=m.Utils.safeParseInt(S[w].substring(10,12))),S[w].length>=14&&(E=m.Utils.safeParseInt(S[w].substring(12,14))),v[w]=new Date(D,R,L,P,d,E)):v[w]=Date.parse(S[w]),m.Utils.isValidDate(v[w])||(v[w]=S[w]);return v},m.Tag.getTimeStringValue=function(A,S){var v=m.Tag.getStringValue(A),w=[];if(S){var D=null,R,L=0,P=0,d=0;for(R=0;R1&&(P=m.Utils.safeParseInt(D[1])),D.length>2&&(d=m.Utils.safeParseFloat(D[2]))):(v[R].length>=2&&(L=m.Utils.safeParseInt(v[R].substring(0,2))),v[R].length>=4&&(P=m.Utils.safeParseInt(v[R].substring(2,4))),v[R].length>=6&&(d=m.Utils.safeParseFloat(v[R].substring(4)))),w[R]=Math.round(L*60*60*1e3+P*60*1e3+d*1e3);return w}return v},m.Tag.getDoubleStringValue=function(A){var S=m.Tag.getStringValue(A),v=[],w;for(w=0;w"+this.value+"]":v="["+this.value+"]":v="";return this.isSublistItem()?L="Sequence Item":this.isSublistItemDelim()?L="Sequence Item Delimiter":this.isSequenceDelim()?L="Sequence Delimiter":this.isPixelData()?L="Pixel Data":P=m.Utils.convertCamcelCaseToTitleCase(m.Dictionary.getDescription(this.group,this.element)),v=u(v),S?d+""+L+"   "+P+"   "+v:d+" "+L+" "+P+" "+v},m.Tag.prototype.toHTMLString=function(A){return this.toString(A,!0)},m.Tag.prototype.isTransformSyntax=function(){return this.group===m.Tag.TAG_TRANSFER_SYNTAX[0]&&this.element===m.Tag.TAG_TRANSFER_SYNTAX[1]},m.Tag.prototype.isCharset=function(){return this.group===m.Tag.TAG_SPECIFIC_CHAR_SET[0]&&this.element===m.Tag.TAG_SPECIFIC_CHAR_SET[1]},m.Tag.prototype.isPixelData=function(){return this.group===m.Tag.TAG_PIXEL_DATA[0]&&this.element===m.Tag.TAG_PIXEL_DATA[1]},m.Tag.prototype.isPrivateData=function(){return(this.group&1)===1},m.Tag.prototype.hasInterpretedPrivateData=function(){return this.isPrivateData()&&m.Utils.isString(this.value)},m.Tag.prototype.isSublistItem=function(){return this.group===m.Tag.TAG_SUBLIST_ITEM[0]&&this.element===m.Tag.TAG_SUBLIST_ITEM[1]},m.Tag.prototype.isSublistItemDelim=function(){return this.group===m.Tag.TAG_SUBLIST_ITEM_DELIM[0]&&this.element===m.Tag.TAG_SUBLIST_ITEM_DELIM[1]},m.Tag.prototype.isSequenceDelim=function(){return this.group===m.Tag.TAG_SUBLIST_SEQ_DELIM[0]&&this.element===m.Tag.TAG_SUBLIST_SEQ_DELIM[1]},m.Tag.prototype.isMetaLength=function(){return this.group===m.Tag.TAG_META_LENGTH[0]&&this.element===m.Tag.TAG_META_LENGTH[1]},T.exports&&(T.exports=m.Tag)}(tag)),tag.exports}var rle={exports:{}},hasRequiredRle;function requireRle(){return hasRequiredRle||(hasRequiredRle=1,function(T){var u=u||{};u.RLE=u.RLE||function(){this.rawData=null,this.bytesRead=0,this.bytesPut=0,this.segElemPut=0,this.numSegments=0,this.segmentOffsets=[],this.littleEndian=!0,this.segmentIndex=0,this.numElements=0,this.size=0,this.output=null},u.RLE.HEADER_SIZE=64,u.RLE.prototype.decode=function(m,A,S){var v;for(this.rawData=new DataView(m),this.littleEndian=A,this.numElements=S,this.readHeader(),this.output=new DataView(new ArrayBuffer(this.size)),v=0;v=0&&m<128?this.readLiteral(m):m<=-1&&m>-128?this.readEncoded(m):m===-128&&console.warn("RLE: unsupported code!");this.segmentIndex+=1},u.RLE.prototype.readLiteral=function(m){var A,S=m+1;if(this.hasValidInput())for(A=0;A1)for(var v=Array.prototype.slice.call(arguments,1);S--;)A[m-1-S]=u.lossless.Utils.createArray.apply(this,v);return A},u.lossless.Utils.makeCRCTable=function(){for(var m,A=[],S=0;S<256;S++){m=S;for(var v=0;v<8;v++)m=m&1?3988292384^m>>>1:m>>>1;A[S]=m}return A},u.lossless.Utils.crc32=function(m){for(var A=new Uint8Array(m.buffer),S=u.lossless.Utils.crcTable||(u.lossless.Utils.crcTable=u.lossless.Utils.makeCRCTable()),v=-1,w=0;w>>8^S[(v^A[w])&255];return(v^-1)>>>0},T.exports&&(T.exports=u.lossless.Utils)}(utils)),utils.exports}var hasRequiredHuffmanTable;function requireHuffmanTable(){return hasRequiredHuffmanTable||(hasRequiredHuffmanTable=1,function(T){var u=u||{};u.lossless=u.lossless||{},u.lossless.DataStream=u.lossless.DataStream||(typeof commonjsRequire<"u"?requireDataStream():null),u.lossless.Utils=u.lossless.Utils||(typeof commonjsRequire<"u"?requireUtils():null),u.lossless.HuffmanTable=u.lossless.HuffmanTable||function(){this.l=u.lossless.Utils.createArray(4,2,16),this.th=[],this.v=u.lossless.Utils.createArray(4,2,16,200),this.tc=u.lossless.Utils.createArray(4,2),this.tc[0][0]=0,this.tc[1][0]=0,this.tc[2][0]=0,this.tc[3][0]=0,this.tc[0][1]=0,this.tc[1][1]=0,this.tc[2][1]=0,this.tc[3][1]=0,this.th[0]=0,this.th[1]=0,this.th[2]=0,this.th[3]=0},u.lossless.HuffmanTable.MSB=2147483648,u.lossless.HuffmanTable.prototype.read=function(m,A){var S=0,v,w,D,R,L,P;for(v=m.get16(),S+=2;S3)throw new Error("ERROR: Huffman table ID > 3");if(R=w>>4,R>2)throw new Error("ERROR: Huffman table [Table class > 2 ]");for(this.th[D]=1,this.tc[D][R]=1,L=0;L<16;L+=1)this.l[D][R][L]=m.get8(),S+=1;for(L=0;L<16;L+=1)for(P=0;Pv)throw new Error("ERROR: Huffman table format error [count>Lh]");this.v[D][R][L][P]=m.get8(),S+=1}}if(S!==v)throw new Error("ERROR: Huffman table format error [count!=Lf]");for(L=0;L<4;L+=1)for(P=0;P<2;P+=1)this.tc[L][P]!==0&&this.buildHuffTable(A[L][P],this.l[L][P],this.v[L][P]);return 1},u.lossless.HuffmanTable.prototype.buildHuffTable=function(m,A,S){var v,w,D,R,L,P;for(w=256,D=0,R=0;R<8;R+=1)for(L=0;L>R+1;P+=1)m[D]=S[R][L]|R+1<<8,D+=1;for(R=1;D<256;R+=1,D+=1)m[D]=R|u.lossless.HuffmanTable.MSB;for(v=1,D=0,R=8;R<16;R+=1)for(L=0;L>R-7;P+=1)m[v*256+D]=S[R][L]|R+1<<8,D+=1;if(D>=256){if(D>256)throw new Error("ERROR: Huffman table error(1)!");D=0,v+=1}}},T.exports&&(T.exports=u.lossless.HuffmanTable)}(huffmanTable)),huffmanTable.exports}var quantizationTable={exports:{}},hasRequiredQuantizationTable;function requireQuantizationTable(){return hasRequiredQuantizationTable||(hasRequiredQuantizationTable=1,function(T){var u=u||{};u.lossless=u.lossless||{},u.lossless.DataStream=u.lossless.DataStream||(typeof commonjsRequire<"u"?requireDataStream():null),u.lossless.Utils=u.lossless.Utils||(typeof commonjsRequire<"u"?requireUtils():null),u.lossless.QuantizationTable=u.lossless.QuantizationTable||function(){this.precision=[],this.tq=[],this.quantTables=u.lossless.Utils.createArray(4,64),this.tq[0]=0,this.tq[1]=0,this.tq[2]=0,this.tq[3]=0},u.lossless.QuantizationTable.enhanceQuantizationTable=function(m,A){var S;for(S=0;S<8;S+=1)m[A[0*8+S]]*=90,m[A[4*8+S]]*=90,m[A[2*8+S]]*=118,m[A[6*8+S]]*=49,m[A[5*8+S]]*=71,m[A[1*8+S]]*=126,m[A[7*8+S]]*=25,m[A[3*8+S]]*=106;for(S=0;S<8;S+=1)m[A[0+8*S]]*=90,m[A[4+8*S]]*=90,m[A[2+8*S]]*=118,m[A[6+8*S]]*=49,m[A[5+8*S]]*=71,m[A[1+8*S]]*=126,m[A[7+8*S]]*=25,m[A[3+8*S]]*=106;for(S=0;S<64;S+=1)m[S]>>=6},u.lossless.QuantizationTable.prototype.read=function(m,A){var S=0,v,w,D,R;for(v=m.get16(),S+=2;S3)throw new Error("ERROR: Quantization table ID > 3");if(this.precision[D]=w>>4,this.precision[D]===0)this.precision[D]=8;else if(this.precision[D]===1)this.precision[D]=16;else throw new Error("ERROR: Quantization table precision error");if(this.tq[D]=1,this.precision[D]===8){for(R=0;R<64;R+=1){if(S>v)throw new Error("ERROR: Quantization table format error");this.quantTables[D][R]=m.get8(),S+=1}u.lossless.QuantizationTable.enhanceQuantizationTable(this.quantTables[D],A)}else{for(R=0;R<64;R+=1){if(S>v)throw new Error("ERROR: Quantization table format error");this.quantTables[D][R]=m.get16(),S+=2}u.lossless.QuantizationTable.enhanceQuantizationTable(this.quantTables[D],A)}}if(S!==v)throw new Error("ERROR: Quantization table error [count!=Lq]");return 1},T.exports&&(T.exports=u.lossless.QuantizationTable)}(quantizationTable)),quantizationTable.exports}var scanHeader={exports:{}},scanComponent={exports:{}},hasRequiredScanComponent;function requireScanComponent(){return hasRequiredScanComponent||(hasRequiredScanComponent=1,function(T){var u=u||{};u.lossless=u.lossless||{},u.lossless.ScanComponent=u.lossless.ScanComponent||function(){this.acTabSel=0,this.dcTabSel=0,this.scanCompSel=0},T.exports&&(T.exports=u.lossless.ScanComponent)}(scanComponent)),scanComponent.exports}var hasRequiredScanHeader;function requireScanHeader(){return hasRequiredScanHeader||(hasRequiredScanHeader=1,function(T){var u=u||{};u.lossless=u.lossless||{},u.lossless.DataStream=u.lossless.DataStream||(typeof commonjsRequire<"u"?requireDataStream():null),u.lossless.ScanComponent=u.lossless.ScanComponent||(typeof commonjsRequire<"u"?requireScanComponent():null),u.lossless.ScanHeader=u.lossless.ScanHeader||function(){this.ah=0,this.al=0,this.numComp=0,this.selection=0,this.spectralEnd=0,this.components=[]},u.lossless.ScanHeader.prototype.read=function(m){var A=0,S,v,w;for(S=m.get16(),A+=2,this.numComp=m.get8(),A+=1,v=0;vS)throw new Error("ERROR: scan header format error");this.components[v].scanCompSel=m.get8(),A+=1,w=m.get8(),A+=1,this.components[v].dcTabSel=w>>4,this.components[v].acTabSel=w&15}if(this.selection=m.get8(),A+=1,this.spectralEnd=m.get8(),A+=1,w=m.get8(),this.ah=w>>4,this.al=w&15,A+=1,A!==S)throw new Error("ERROR: scan header format error [count!=Ns]");return 1},T.exports&&(T.exports=u.lossless.ScanHeader)}(scanHeader)),scanHeader.exports}var frameHeader={exports:{}},hasRequiredFrameHeader;function requireFrameHeader(){return hasRequiredFrameHeader||(hasRequiredFrameHeader=1,function(T){var u=u||{};u.lossless=u.lossless||{},u.lossless.ComponentSpec=u.lossless.ComponentSpec||(typeof commonjsRequire<"u"?requireComponentSpec():null),u.lossless.DataStream=u.lossless.DataStream||(typeof commonjsRequire<"u"?requireDataStream():null),u.lossless.FrameHeader=u.lossless.FrameHeader||function(){this.components=[],this.dimX=0,this.dimY=0,this.numComp=0,this.precision=0},u.lossless.FrameHeader.prototype.read=function(m){var A=0,S,v,w,D;for(S=m.get16(),A+=2,this.precision=m.get8(),A+=1,this.dimY=m.get16(),A+=2,this.dimX=m.get16(),A+=2,this.numComp=m.get8(),A+=1,v=1;v<=this.numComp;v+=1){if(A>S)throw new Error("ERROR: frame format error");if(w=m.get8(),A+=1,A>=S)throw new Error("ERROR: frame format error [c>=Lf]");D=m.get8(),A+=1,this.components[w]||(this.components[w]=new u.lossless.ComponentSpec),this.components[w].hSamp=D>>4,this.components[w].vSamp=D&15,this.components[w].quantTableSel=m.get8(),A+=1}if(A!==S)throw new Error("ERROR: frame format error [Lf!=count]");return 1},T.exports&&(T.exports=u.lossless.FrameHeader)}(frameHeader)),frameHeader.exports}var hasRequiredDecoder;function requireDecoder(){return hasRequiredDecoder||(hasRequiredDecoder=1,function(T){var u=u||{};u.lossless=u.lossless||{},u.lossless.DataStream=u.lossless.DataStream||(typeof commonjsRequire<"u"?requireDataStream():null),u.lossless.HuffmanTable=u.lossless.HuffmanTable||(typeof commonjsRequire<"u"?requireHuffmanTable():null),u.lossless.QuantizationTable=u.lossless.QuantizationTable||(typeof commonjsRequire<"u"?requireQuantizationTable():null),u.lossless.ScanHeader=u.lossless.ScanHeader||(typeof commonjsRequire<"u"?requireScanHeader():null),u.lossless.FrameHeader=u.lossless.FrameHeader||(typeof commonjsRequire<"u"?requireFrameHeader():null),u.lossless.Utils=u.lossless.Utils||(typeof commonjsRequire<"u"?requireUtils():null),u.lossless.Decoder=u.lossless.Decoder||function(A,S){this.buffer=A,this.frame=new u.lossless.FrameHeader,this.huffTable=new u.lossless.HuffmanTable,this.quantTable=new u.lossless.QuantizationTable,this.scan=new u.lossless.ScanHeader,this.DU=u.lossless.Utils.createArray(10,4,64),this.HuffTab=u.lossless.Utils.createArray(4,2,50*256),this.IDCT_Source=[],this.nBlock=[],this.acTab=u.lossless.Utils.createArray(10,1),this.dcTab=u.lossless.Utils.createArray(10,1),this.qTab=u.lossless.Utils.createArray(10,1),this.marker=0,this.markerIndex=0,this.numComp=0,this.restartInterval=0,this.selection=0,this.xDim=0,this.yDim=0,this.xLoc=0,this.yLoc=0,this.numBytes=0,this.outputData=null,this.restarting=!1,this.mask=0,typeof S<"u"&&(this.numBytes=S)},u.lossless.Decoder.IDCT_P=[0,5,40,16,45,2,7,42,21,56,8,61,18,47,1,4,41,23,58,13,32,24,37,10,63,17,44,3,6,43,20,57,15,34,29,48,53,26,39,9,60,19,46,22,59,12,33,31,50,55,25,36,11,62,14,35,28,49,52,27,38,30,51,54],u.lossless.Decoder.TABLE=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],u.lossless.Decoder.MAX_HUFFMAN_SUBTREE=50,u.lossless.Decoder.MSB=2147483648,u.lossless.Decoder.RESTART_MARKER_BEGIN=65488,u.lossless.Decoder.RESTART_MARKER_END=65495,u.lossless.Decoder.prototype.decompress=function(A,S,v){return this.decode(A,S,v).buffer},u.lossless.Decoder.prototype.decode=function(A,S,v,w){var D,R=0,L=[],P,d,E=[],e=[],N;if(typeof A<"u"&&(this.buffer=A),typeof w<"u"&&(this.numBytes=w),this.stream=new u.lossless.DataStream(this.buffer,S,v),this.buffer=null,this.xLoc=0,this.yLoc=0,D=this.stream.get16(),D!==65496)throw new Error("Not a JPEG file");for(D=this.stream.get16();D>>4!==4092||D===65476;){switch(D){case 65476:this.huffTable.read(this.stream,this.HuffTab);break;case 65484:throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,u.lossless.Decoder.TABLE);break;case 65501:this.restartInterval=this.readNumber();break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(D>>8!==255)throw new Error("ERROR: format throw new IOException! (decode)")}D=this.stream.get16()}if(D<65472||D>65479)throw new Error("ERROR: could not handle arithmetic code!");this.frame.read(this.stream),D=this.stream.get16();do{for(;D!==65498;){switch(D){case 65476:this.huffTable.read(this.stream,this.HuffTab);break;case 65484:throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,u.lossless.Decoder.TABLE);break;case 65501:this.restartInterval=this.readNumber();break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(D>>8!==255)throw new Error("ERROR: format throw new IOException! (Parser.decode)")}D=this.stream.get16()}switch(this.precision=this.frame.precision,this.components=this.frame.components,this.numBytes||(this.numBytes=parseInt(Math.ceil(this.precision/8))),this.numBytes==1?this.mask=255:this.mask=65535,this.scan.read(this.stream),this.numComp=this.scan.numComp,this.selection=this.scan.selection,this.numBytes===1?this.numComp===3?(this.getter=this.getValueRGB,this.setter=this.setValueRGB,this.output=this.outputRGB):(this.getter=this.getValue8,this.setter=this.setValue8,this.output=this.outputSingle):(this.getter=this.getValue16,this.setter=this.setValue16,this.output=this.outputSingle),this.selection){case 2:this.selector=this.select2;break;case 3:this.selector=this.select3;break;case 4:this.selector=this.select4;break;case 5:this.selector=this.select5;break;case 6:this.selector=this.select6;break;case 7:this.selector=this.select7;break;default:this.selector=this.select1;break}for(this.scanComps=this.scan.components,this.quantTables=this.quantTable.quantTables,P=0;P=u.lossless.Decoder.RESTART_MARKER_BEGIN&&D<=u.lossless.Decoder.RESTART_MARKER_END))break}D===65500&&R===1&&(this.readNumber(),D=this.stream.get16())}while(D!==65497&&this.xLoc>1)},u.lossless.Decoder.prototype.select6=function(A){return this.getPreviousY(A)+(this.getPreviousX(A)-this.getPreviousXY(A)>>1)},u.lossless.Decoder.prototype.select7=function(A){return(this.getPreviousX(A)+this.getPreviousY(A))/2},u.lossless.Decoder.prototype.decodeRGB=function(A,S,v){var w,D,R,L,P,d,E,e;for(A[0]=this.selector(0),A[1]=this.selector(1),A[2]=this.selector(2),P=0;P=65280)return w;for(A[P]=this.IDCT_Source[0]=A[P]+this.getn(v,w,S,v),this.IDCT_Source[0]*=L[0],e=1;e<64;e+=1){if(w=this.getHuffmanValue(D,S,v),w>=65280)return w;if(e+=w>>4,w&15)this.IDCT_Source[u.lossless.Decoder.IDCT_P[e]]=this.getn(v,w&15,S,v)*L[e];else if(!(w>>4))break}}return 0},u.lossless.Decoder.prototype.decodeSingle=function(A,S,v){var w,D,R,L;for(this.restarting?(this.restarting=!1,A[0]=1<=65280)return w;if(R=this.getn(A,w,S,v),L=R>>8,L>=u.lossless.Decoder.RESTART_MARKER_BEGIN&&L<=u.lossless.Decoder.RESTART_MARKER_END)return L;A[0]+=R}return 0},u.lossless.Decoder.prototype.getHuffmanValue=function(A,S,v){var w,D,R;if(R=65535,v[0]<8?(S[0]<<=8,D=this.stream.get8(),D===255&&(this.marker=this.stream.get8(),this.marker!==0&&(this.markerIndex=9)),S[0]|=D):v[0]-=8,w=A[S[0]>>v[0]],w&u.lossless.Decoder.MSB){if(this.markerIndex!==0)return this.markerIndex=0,65280|this.marker;S[0]&=R>>16-v[0],S[0]<<=8,D=this.stream.get8(),D===255&&(this.marker=this.stream.get8(),this.marker!==0&&(this.markerIndex=9)),S[0]|=D,w=A[(w&255)*256+(S[0]>>v[0])],v[0]+=8}if(v[0]+=8-(w>>8),v[0]<0)throw new Error("index="+v[0]+" temp="+S[0]+" code="+w+" in HuffmanValue()");return v[0]>16-v[0],w&255)},u.lossless.Decoder.prototype.getn=function(A,S,v,w){var D,R,L,P,d;if(R=1,L=-1,P=65535,S===0)return 0;if(S===16)return A[0]>=0?-32768:32768;if(w[0]-=S,w[0]>=0){if(w[0]>w[0],v[0]&=P>>16-w[0]}else{if(v[0]<<=8,d=this.stream.get8(),d===255&&(this.marker=this.stream.get8(),this.marker!==0&&(this.markerIndex=9)),v[0]|=d,w[0]+=8,w[0]<0){if(this.markerIndex!==0)return this.markerIndex=0,(65280|this.marker)<<8;v[0]<<=8,d=this.stream.get8(),d===255&&(this.marker=this.stream.get8(),this.marker!==0&&(this.markerIndex=9)),v[0]|=d,w[0]+=8}if(w[0]<0)throw new Error("index="+w[0]+" in getn()");if(w[0]>w[0],v[0]&=P>>16-w[0]}return D0?this.getter(this.yLoc*this.xDim+this.xLoc-1,A):this.yLoc>0?this.getPreviousY(A):1<0&&this.yLoc>0?this.getter((this.yLoc-1)*this.xDim+this.xLoc-1,A):this.getPreviousY(A)},u.lossless.Decoder.prototype.getPreviousY=function(A){return this.yLoc>0?this.getter((this.yLoc-1)*this.xDim+this.xLoc,A):this.getPreviousX(A)},u.lossless.Decoder.prototype.isLastPixel=function(){return this.xLoc===this.xDim-1&&this.yLoc===this.yDim-1},u.lossless.Decoder.prototype.outputSingle=function(A){this.xLoc=this.xDim&&(this.yLoc+=1,this.xLoc=0))},u.lossless.Decoder.prototype.outputRGB=function(A){var S=this.yLoc*this.xDim+this.xLoc;this.xLoc=this.xDim&&(this.yLoc+=1,this.xLoc=0))},u.lossless.Decoder.prototype.setValue8=function(A,S){this.outputData[A]=S},u.lossless.Decoder.prototype.getValue8=function(A){return this.outputData[A]};var m=function(){var A=new ArrayBuffer(2);return new DataView(A).setInt16(0,256,!0),new Int16Array(A)[0]===256}();m?(u.lossless.Decoder.prototype.setValue16=u.lossless.Decoder.prototype.setValue8,u.lossless.Decoder.prototype.getValue16=u.lossless.Decoder.prototype.getValue8):(u.lossless.Decoder.prototype.setValue16=function(A,S){this.outputData[A]=(S&255)<<8|S>>8&255},u.lossless.Decoder.prototype.getValue16=function(A){var S=this.outputData[A];return(S&255)<<8|S>>8&255}),u.lossless.Decoder.prototype.setValueRGB=function(A,S,v){this.outputData[A*3+v]=S},u.lossless.Decoder.prototype.getValueRGB=function(A,S){return this.outputData[A*3+S]},u.lossless.Decoder.prototype.readApp=function(){var A=0,S=this.stream.get16();for(A+=2;A0&&!y[f-1];)f--;J.push({children:[],index:0});var l0=J[0],o0;for(i0=0;i00;)l0=J.pop();for(l0.index++,J.push(l0);J.length<=i0;)J.push(o0={children:[],index:0}),l0.children[l0.index]=o0.children,l0=o0;G++}i0+10)return T0--,p0>>T0&1;if(p0=y[Y++],p0==255){var z0=y[Y++];if(z0)throw"unexpected marker: "+(p0<<8|z0).toString(16)}return T0=7,p0>>>7}function F0(z0){for(var V0=z0,pe;(pe=C0())!==null;){if(V0=V0[pe],typeof V0=="number")return V0;if(typeof V0!="object")throw"invalid huffman sequence"}return null}function ee(z0){for(var V0=0;z0>0;){var pe=C0();if(pe===null)return;V0=V0<<1|pe,z0--}return V0}function ie(z0){var V0=ee(z0);return V0>=1<>4;if(U0===0){if(X0<15)break;K0+=16;continue}K0+=X0;var Q0=S[K0];z0.blockData[V0+Q0]=ie(U0),K0++}}function Le(z0,V0){var pe=F0(z0.huffmanTableDC),q0=pe===0?0:ie(pe)<0){I0--;return}for(var pe=Q,q0=f;pe<=q0;){var K0=F0(z0.huffmanTableAC),W=K0&15,U0=K0>>4;if(W===0){if(U0<15){I0=ee(U0)+(1<>4,X0===0)K0<15?(I0=ee(K0)+(1<=65488&&O0<=65495)Y+=2;else break}return Y-S0}function e0(y,Y,G){var J=y.quantizationTable,i0,Q,f,l0,o0,c0,d0,S0,p0,T0;for(T0=0;T0<64;T0++)G[T0]=y.blockData[Y+T0]*J[T0];for(T0=0;T0<8;++T0){var C0=8*T0;if(G[1+C0]===0&&G[2+C0]===0&&G[3+C0]===0&&G[4+C0]===0&&G[5+C0]===0&&G[6+C0]===0&&G[7+C0]===0){p0=d*G[0+C0]+512>>10,G[0+C0]=p0,G[1+C0]=p0,G[2+C0]=p0,G[3+C0]=p0,G[4+C0]=p0,G[5+C0]=p0,G[6+C0]=p0,G[7+C0]=p0;continue}i0=d*G[0+C0]+128>>8,Q=d*G[4+C0]+128>>8,f=G[2+C0],l0=G[6+C0],o0=E*(G[1+C0]-G[7+C0])+128>>8,S0=E*(G[1+C0]+G[7+C0])+128>>8,c0=G[3+C0]<<4,d0=G[5+C0]<<4,p0=i0-Q+1>>1,i0=i0+Q+1>>1,Q=p0,p0=f*P+l0*L+128>>8,f=f*L-l0*P+128>>8,l0=p0,p0=o0-d0+1>>1,o0=o0+d0+1>>1,d0=p0,p0=S0+c0+1>>1,c0=S0-c0+1>>1,S0=p0,p0=i0-l0+1>>1,i0=i0+l0+1>>1,l0=p0,p0=Q-f+1>>1,Q=Q+f+1>>1,f=p0,p0=o0*R+S0*D+2048>>12,o0=o0*D-S0*R+2048>>12,S0=p0,p0=c0*w+d0*v+2048>>12,c0=c0*v-d0*w+2048>>12,d0=p0,G[0+C0]=i0+S0,G[7+C0]=i0-S0,G[1+C0]=Q+d0,G[6+C0]=Q-d0,G[2+C0]=f+c0,G[5+C0]=f-c0,G[3+C0]=l0+o0,G[4+C0]=l0-o0}for(T0=0;T0<8;++T0){var F0=T0;if(G[1*8+F0]===0&&G[2*8+F0]===0&&G[3*8+F0]===0&&G[4*8+F0]===0&&G[5*8+F0]===0&&G[6*8+F0]===0&&G[7*8+F0]===0){p0=d*G[T0+0]+8192>>14,G[0*8+F0]=p0,G[1*8+F0]=p0,G[2*8+F0]=p0,G[3*8+F0]=p0,G[4*8+F0]=p0,G[5*8+F0]=p0,G[6*8+F0]=p0,G[7*8+F0]=p0;continue}i0=d*G[0*8+F0]+2048>>12,Q=d*G[4*8+F0]+2048>>12,f=G[2*8+F0],l0=G[6*8+F0],o0=E*(G[1*8+F0]-G[7*8+F0])+2048>>12,S0=E*(G[1*8+F0]+G[7*8+F0])+2048>>12,c0=G[3*8+F0],d0=G[5*8+F0],p0=i0-Q+1>>1,i0=i0+Q+1>>1,Q=p0,p0=f*P+l0*L+2048>>12,f=f*L-l0*P+2048>>12,l0=p0,p0=o0-d0+1>>1,o0=o0+d0+1>>1,d0=p0,p0=S0+c0+1>>1,c0=S0-c0+1>>1,S0=p0,p0=i0-l0+1>>1,i0=i0+l0+1>>1,l0=p0,p0=Q-f+1>>1,Q=Q+f+1>>1,f=p0,p0=o0*R+S0*D+2048>>12,o0=o0*D-S0*R+2048>>12,S0=p0,p0=c0*w+d0*v+2048>>12,c0=c0*v-d0*w+2048>>12,d0=p0,G[0*8+F0]=i0+S0,G[7*8+F0]=i0-S0,G[1*8+F0]=Q+d0,G[6*8+F0]=Q-d0,G[2*8+F0]=f+c0,G[5*8+F0]=f-c0,G[3*8+F0]=l0+o0,G[4*8+F0]=l0-o0}for(T0=0;T0<64;++T0){var ee=Y+T0,ie=G[T0];ie=ie<=-2056/y.bitConversion?0:ie>=2024/y.bitConversion?255/y.bitConversion:ie+2056/y.bitConversion>>4,y.blockData[ee]=ie}}function H(y,Y){for(var G=Y.blocksPerLine,J=Y.blocksPerColumn,i0=new Int32Array(64),Q=0;Q=255?255:y|0}return e.prototype={load:function(Y){var G=(function(o0){this.parse(o0),this.onload&&this.onload()}).bind(this);if(Y.indexOf("data:")>-1){for(var J=Y.indexOf("base64,")+7,i0=atob(Y.substring(J)),Q=new Uint8Array(i0.length),f=i0.length-1;f>=0;f--)Q[f]=i0.charCodeAt(f);G(i0)}else{var l0=new XMLHttpRequest;l0.open("GET",Y,!0),l0.responseType="arraybuffer",l0.onload=(function(){var o0=new Uint8Array(l0.response);G(o0)}).bind(this),l0.send(null)}},parse:function(Y){function G(){var W=Y[Q]<<8|Y[Q+1];return Q+=2,W}function J(){var W=G(),U0=Y.subarray(Q,Q+W-2);return Q+=U0.length,U0}function i0(W){for(var U0=Math.ceil(W.samplesPerLine/8/W.maxH),X0=Math.ceil(W.scanLines/8/W.maxV),Q0=0;Q0>4)if(De>>4===1)for(F0=0;F0<64;F0++){var qe=S[F0];I0[qe]=G()}else throw"DQT: invalid table spec";else for(F0=0;F0<64;F0++){var Ue=S[F0];I0[Ue]=Y[Q++]}d0[De&15]=I0}break;case 65472:case 65473:case 65474:if(o0)throw"Only single frame JPEGs supported";G(),o0={},o0.extended=T0===65473,o0.progressive=T0===65474,o0.precision=Y[Q++],o0.scanLines=G(),o0.samplesPerLine=G(),o0.components=[],o0.componentIds={};var $e=Y[Q++],oi,ri=0,be=0;for(C0=0;C0<$e;C0++){oi=Y[Q];var Ge=Y[Q+1]>>4,J0=Y[Q+1]&15;ri>4?S0:p0)[x0&15]=N(R0,N0)}break;case 65501:G(),c0=G();break;case 65498:G();var O0=Y[Q++],B0=[],E0;for(C0=0;C0>4],E0.huffmanTableAC=S0[z0&15],B0.push(E0)}var V0=Y[Q++],pe=Y[Q++],q0=Y[Q++],K0=z(Y,Q,o0,B0,c0,V0,pe,q0>>4,q0&15);Q+=K0;break;default:if(Y[Q-3]==255&&Y[Q-2]>=192&&Y[Q-2]<=254){Q-=3;break}throw"unknown JPEG marker "+T0.toString(16)}T0=G()}switch(this.width=o0.samplesPerLine,this.height=o0.scanLines,this.jfif=f,this.adobe=l0,this.components=[],o0.components.length){case 1:this.colorspace=u.Grayscale;break;case 3:this.adobe?this.colorspace=u.AdobeRGB:this.colorspace=u.RGB;break;case 4:this.colorspace=u.CYMK;break;default:this.colorspace=u.Unknown}for(var C0=0;C0>24&255,O0>>16&255,O0>>8&255,O0&255);w("Unsupported header type "+O0+" ("+V0+")");break}E0&&(x0+=B0)}},parseImageProperties:function(M0){for(var se=M0.getByte();se>=0;){var x0=se;se=M0.getByte();var R0=x0<<8|se;if(R0===65361){M0.skip(4);var me=M0.getInt32()>>>0,N0=M0.getInt32()>>>0,O0=M0.getInt32()>>>0,B0=M0.getInt32()>>>0;M0.skip(16);var E0=M0.getUint16();this.width=me-O0,this.height=N0-B0,this.componentsCount=E0,this.bitsPerComponent=8;return}}throw new Error("JPX Error: No size marker found in JPX stream")},parseCodestream:function(M0,se,x0){var R0={};try{for(var me=!1,N0=se;N0+1>5,z0=[];E0>3,ue.mu=0):(ue.epsilon=M0[E0]>>3,ue.mu=(M0[E0]&7)<<8|M0[E0+1],E0+=2),z0.push(ue)}oe.SPqcds=z0,R0.mainHeader?R0.QCD=oe:(R0.currentTile.QCD=oe,R0.currentTile.QCC=[]);break;case 65373:B0=q(M0,N0);var D0={};E0=N0+2;var b0;switch(R0.SIZ.Csiz<257?b0=M0[E0++]:(b0=q(M0,E0),E0+=2),j0=M0[E0++],j0&31){case 0:V0=8,pe=!0;break;case 1:V0=16,pe=!1;break;case 2:V0=16,pe=!0;break;default:throw new Error("JPX Error: Invalid SQcd value "+j0)}for(D0.noQuantization=V0===8,D0.scalarExpounded=pe,D0.guardBits=j0>>5,z0=[];E0>3,ue.mu=0):(ue.epsilon=M0[E0]>>3,ue.mu=(M0[E0]&7)<<8|M0[E0+1],E0+=2),z0.push(ue);D0.SPqcds=z0,R0.mainHeader?R0.QCC[b0]=D0:R0.currentTile.QCC[b0]=D0;break;case 65362:B0=q(M0,N0);var n0={};E0=N0+2;var h0=M0[E0++];n0.entropyCoderWithCustomPrecincts=!!(h0&1),n0.sopMarkerUsed=!!(h0&2),n0.ephMarkerUsed=!!(h0&4),n0.progressionOrder=M0[E0++],n0.layersCount=q(M0,E0),E0+=2,n0.multipleComponentTransform=M0[E0++],n0.decompositionLevelsCount=M0[E0++],n0.xcb=(M0[E0++]&15)+2,n0.ycb=(M0[E0++]&15)+2;var Fe=M0[E0++];if(n0.selectiveArithmeticCodingBypass=!!(Fe&1),n0.resetContextProbabilities=!!(Fe&2),n0.terminationOnEachCodingPass=!!(Fe&4),n0.verticalyStripe=!!(Fe&8),n0.predictableTermination=!!(Fe&16),n0.segmentationSymbolUsed=!!(Fe&32),n0.reversibleTransformation=M0[E0++],n0.entropyCoderWithCustomPrecincts){for(var u0=[];E0>4})}n0.precinctsSizes=u0}var L0=[];if(n0.selectiveArithmeticCodingBypass&&L0.push("selectiveArithmeticCodingBypass"),n0.resetContextProbabilities&&L0.push("resetContextProbabilities"),n0.terminationOnEachCodingPass&&L0.push("terminationOnEachCodingPass"),n0.verticalyStripe&&L0.push("verticalyStripe"),n0.predictableTermination&&L0.push("predictableTermination"),L0.length>0)throw me=!0,new Error("JPX Error: Unsupported COD options ("+L0.join(", ")+")");R0.mainHeader?R0.COD=n0:(R0.currentTile.COD=n0,R0.currentTile.COC=[]);break;case 65424:B0=q(M0,N0),q0={},q0.index=q(M0,N0+2),q0.length=z(M0,N0+4),q0.dataEnd=q0.length+N0-2,q0.partIndex=M0[N0+8],q0.partsCount=M0[N0+9],R0.mainHeader=!1,q0.partIndex===0&&(q0.COD=R0.COD,q0.COC=R0.COC.slice(0),q0.QCD=R0.QCD,q0.QCC=R0.QCC.slice(0)),R0.currentTile=q0;break;case 65427:q0=R0.currentTile,q0.partIndex===0&&(Ue(R0,q0.index),ie(R0)),B0=q0.dataEnd-N0,ke(R0,M0,N0,B0);break;case 65365:case 65367:case 65368:case 65380:B0=q(M0,N0);break;case 65363:throw new Error("JPX Error: Codestream code 0xFF53 (COC) is not implemented");default:throw new Error("JPX Error: Unknown codestream code: "+O0.toString(16))}N0+=B0}}catch(Ye){if(me||this.failOnCorruptedImage)throw Ye;w("Trying to recover from "+Ye.message)}this.tiles=I0(R0),this.width=R0.SIZ.Xsiz-R0.SIZ.XOsiz,this.height=R0.SIZ.Ysiz-R0.SIZ.YOsiz,this.componentsCount=R0.SIZ.Csiz}};function i0(J0,M0){J0.x0=Math.ceil(M0.XOsiz/J0.XRsiz),J0.x1=Math.ceil(M0.Xsiz/J0.XRsiz),J0.y0=Math.ceil(M0.YOsiz/J0.YRsiz),J0.y1=Math.ceil(M0.Ysiz/J0.YRsiz),J0.width=J0.x1-J0.x0,J0.height=J0.y1-J0.y0}function Q(J0,M0){for(var se=J0.SIZ,x0,R0=[],me=Math.ceil((se.Xsiz-se.XTOsiz)/se.XTsiz),N0=Math.ceil((se.Ysiz-se.YTOsiz)/se.YTsiz),O0=0;O00?Math.min(x0.xcb,R0.PPx-1):Math.min(x0.xcb,R0.PPx),R0.ycb_=se>0?Math.min(x0.ycb,R0.PPy-1):Math.min(x0.ycb,R0.PPy),R0}function l0(J0,M0,se){var x0=1<M0.trx0?Math.ceil(M0.trx1/x0)-Math.floor(M0.trx0/x0):0,E0=M0.try1>M0.try0?Math.ceil(M0.try1/R0)-Math.floor(M0.try0/R0):0,j0=B0*E0;M0.precinctParameters={precinctWidth:x0,precinctHeight:R0,numprecinctswide:B0,numprecinctshigh:E0,numprecincts:j0,precinctWidthInSubband:N0,precinctHeightInSubband:O0}}function o0(J0,M0,se){var x0=se.xcb_,R0=se.ycb_,me=1<>x0,B0=M0.tby0>>R0,E0=M0.tbx1+me-1>>x0,j0=M0.tby1+N0-1>>R0,z0=M0.resolution.precinctParameters,V0=[],pe=[],q0,K0,W,U0;for(K0=B0;K0oe.cbxMax&&(oe.cbxMax=q0),K0oe.cbyMax&&(oe.cbyMax=K0)):pe[U0]=oe={cbxMin:q0,cbyMin:K0,cbxMax:q0,cbyMax:K0},W.precinct=oe}}M0.codeblockParameters={codeblockWidth:x0,codeblockHeight:R0,numcodeblockwide:E0-O0+1,numcodeblockhigh:j0-B0+1},M0.codeblocks=V0,M0.precincts=pe}function c0(J0,M0,se){for(var x0=[],R0=J0.subbands,me=0,N0=R0.length;mepe.codingStyleParameters.decompositionLevelsCount)){for(var q0=pe.resolutions[E0],K0=q0.precinctParameters.numprecincts;z0pe.codingStyleParameters.decompositionLevelsCount)){for(var q0=pe.resolutions[B0],K0=q0.precinctParameters.numprecincts;z0W.codingStyleParameters.decompositionLevelsCount)){var U0=W.resolutions[O0],X0=U0.precinctParameters.numprecincts;if(!(E0>=X0)){for(;N0=0;--W){var U0=B0.resolutions[W],X0=K0*U0.precinctParameters.precinctWidth,Q0=K0*U0.precinctParameters.precinctHeight;z0=Math.min(z0,X0),V0=Math.min(V0,Q0),pe=Math.max(pe,U0.precinctParameters.numprecinctswide),q0=Math.max(q0,U0.precinctParameters.numprecinctshigh),j0[W]={width:X0,height:Q0},K0<<=1}se=Math.min(se,z0),x0=Math.min(x0,V0),R0=Math.max(R0,pe),me=Math.max(me,q0),N0[O0]={resolutions:j0,minWidth:z0,minHeight:V0,maxNumWide:pe,maxNumHigh:q0}}return{components:N0,minWidth:se,minHeight:x0,maxNumWide:R0,maxNumHigh:me}}function ie(J0){for(var M0=J0.SIZ,se=J0.currentTile.index,x0=J0.tiles[se],R0=M0.Csiz,me=0;me=M0.length)throw new Error("Unexpected EOF");var we=M0[se+R0];R0++,O0?(me=me<<7|we,N0+=7,O0=!1):(me=me<<8|we,N0+=8),we===255&&(O0=!0)}return N0-=m0,me>>>N0&(1<=M0.length)return;if(Ye.isAboveThreshold())break;if(Ye.isKnown()){Ye.nextLevel();continue}if(B0(1))if(Ye.setKnown(),Ye.isLeaf()){ue.included=!0,u0=Me=!0;break}else Ye.nextLevel();else Ye.incrementValue()}}if(u0){if(Me){for(W0=n0.zeroBitPlanesTree,W0.reset(h0,Fe);;){if(R0>=M0.length)return;if(B0(1)){if(L0=!W0.nextLevel(),L0)break}else W0.incrementValue()}ue.zeroBitPlanes=W0.value}for(var y0=V0();B0(1);)ue.Lblock++;var $=N(y0),Z0=(y0<1<<$?$-1:$)+ue.Lblock,g0=B0(Z0);oe.push({codeblock:ue,codingpasses:y0,dataLength:g0})}}for(z0(),W&&E0(146);oe.length>0;){var k0=oe.shift();ue=k0.codeblock,ue.data===void 0&&(ue.data=[]),ue.data.push({data:M0,start:se+R0,end:se+R0+k0.dataLength,codingpasses:k0.codingpasses}),R0+=k0.dataLength}}catch{return}return R0}function Le(J0,M0,se,x0,R0,me,N0,O0){for(var B0=x0.tbx0,E0=x0.tby0,j0=x0.tbx1-x0.tbx0,z0=x0.codeblocks,V0=x0.type.charAt(0)==="H"?1:0,pe=x0.type.charAt(1)==="H"?M0:0,q0=0,K0=z0.length;q0=me?J0[Oe]=g0:J0[Oe]=g0*(1<0?1-W:0));var h0=U0.subbands[ue],Fe=G[h0.type],u0=V0?1:Math.pow(2,z0+Fe-n0)*(1+b0/2048),Me=E0+n0-1;Le(oe,X0,Q0,h0,u0,Me,V0,j0)}q0.push({width:X0,height:Q0,items:oe})}var L0=pe.calculate(q0,x0.tcx0,x0.tcy0);return{left:x0.tcx0,top:x0.tcy0,width:L0.width,height:L0.height,items:L0.items}}function I0(J0){for(var M0=J0.SIZ,se=J0.components,x0=M0.Csiz,R0=[],me=0,N0=J0.tiles.length;me>2),h0=Fe+n0,u0=Fe+b0,V0[Q0++]=h0<=0?0:h0>=W?255:h0>>q0,V0[Q0++]=Fe<=0?0:Fe>=W?255:Fe>>q0,V0[Q0++]=u0<=0?0:u0>=W?255:u0>>q0;else for(oe=0;oe=W?255:h0>>q0,V0[Q0++]=Fe<=0?0:Fe>=W?255:Fe>>q0,V0[Q0++]=u0<=0?0:u0>=W?255:u0>>q0;if(Ye)for(oe=0,Q0=3;oe=X0?255:Me+K0>>q0}else for(E0=0;E0=W?255:L0+K0>>q0,Q0+=x0}else{var z0=se[E0].isSigned,g0=B0[E0].items;if(z0)for(Q0=E0,oe=0,ue=g0.length;oe>=1,R0>>=1,me++}me--,O0=this.levels[me],O0.items[O0.index]=N0,this.currentLevel=me,delete this.value},incrementValue:function(){var x0=this.levels[this.currentLevel];x0.items[x0.index]++},nextLevel:function(){var x0=this.currentLevel,R0=this.levels[x0],me=R0.items[R0.index];return x0--,x0<0?(this.value=me,!1):(this.currentLevel=x0,R0=this.levels[x0],R0.items[R0.index]=me,!0)}},M0}(),$e=function(){function M0(se,x0){var R0=N(Math.max(se,x0))+1;this.levels=[];for(var me=0;me>=1,R0>>=1,N0++}this.currentLevel=this.levels.length-1,this.minValue=this.levels[this.currentLevel].items[0]},incrementValue:function(){var x0=this.levels[this.currentLevel];x0.items[x0.index]=x0.items[x0.index]+1,x0.items[x0.index]>this.minValue&&(this.minValue=x0.items[x0.index])},nextLevel:function(){var x0=this.currentLevel;if(x0--,x0<0)return!1;this.currentLevel=x0;var R0=this.levels[x0];return R0.items[R0.index]this.minValue&&(this.minValue=R0.items[R0.index]),!0},isLeaf:function(){return this.currentLevel===0},isAboveThreshold:function(){var x0=this.currentLevel,R0=this.levels[x0];return R0.items[R0.index]>this.currentStopValue},isKnown:function(){var x0=this.currentLevel,R0=this.levels[x0];return R0.status[R0.index]>0},setKnown:function(){var x0=this.currentLevel,R0=this.levels[x0];R0.status[R0.index]=1}},M0}(),oi=function(){var M0=17,se=18,x0=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]),R0=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]),me=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);function N0(O0,B0,E0,j0,z0){this.width=O0,this.height=B0,this.contextLabelTable=E0==="HH"?me:E0==="HL"?R0:x0;var V0=O0*B0;this.neighborsSignificance=new Uint8Array(V0),this.coefficentsSign=new Uint8Array(V0),this.coefficentsMagnitude=z0>14?new Uint32Array(V0):z0>6?new Uint16Array(V0):new Uint8Array(V0),this.processingFlags=new Uint8Array(V0);var pe=new Uint8Array(V0);if(j0!==0)for(var q0=0;q00,K0=E0+10&&(W=j0-V0,q0&&(z0[W-1]+=16),K0&&(z0[W+1]+=16),z0[W]+=4),B0+1=j0)break;if(q0[b0]&=X0,!(z0[b0]||!pe[b0])){var Fe=W[pe[b0]],u0=B0.readBit(K0,Fe);if(u0){var Me=this.decodeSignBit(h0,D0,b0);V0[b0]=Me,z0[b0]=1,this.setNeighborsSignificance(h0,D0,b0),q0[b0]|=oe}U0[b0]++,q0[b0]|=Q0}}},decodeSignBit:function(B0,E0,j0){var z0=this.width,V0=this.height,pe=this.coefficentsMagnitude,q0=this.coefficentsSign,K0,W,U0,X0,Q0,oe;X0=E0>0&&pe[j0-1]!==0,E0+10&&pe[j0-z0]!==0,B0+1=0?(Q0=9+K0,oe=this.decoder.readBit(this.contexts,Q0)):(Q0=9-K0,oe=this.decoder.readBit(this.contexts,Q0)^1),oe},runMagnitudeRefinementPass:function(){for(var B0=this.decoder,E0=this.width,j0=this.height,z0=this.coefficentsMagnitude,V0=this.neighborsSignificance,pe=this.contexts,q0=this.bitsDecoded,K0=this.processingFlags,W=1,U0=2,X0=E0*j0,Q0=E0*4,oe=0,ue;oe>1;R0=R0|0;var O0,B0,E0,j0,z0=-1.586134342059924,V0=-.052980118572961,pe=.882911075530934,q0=.443506852043971,K0=1.230174104914001,W=1/K0;for(O0=R0-3,B0=N0+4;B0--;O0+=2)x0[O0]*=W;for(O0=R0-2,E0=q0*x0[O0-1],B0=N0+3;B0--&&(j0=q0*x0[O0+1],x0[O0]=K0*x0[O0]-E0-j0,B0--);O0+=2)O0+=2,E0=q0*x0[O0+1],x0[O0]=K0*x0[O0]-E0-j0;for(O0=R0-1,E0=pe*x0[O0-1],B0=N0+2;B0--&&(j0=pe*x0[O0+1],x0[O0]-=E0+j0,B0--);O0+=2)O0+=2,E0=pe*x0[O0+1],x0[O0]-=E0+j0;for(O0=R0,E0=V0*x0[O0-1],B0=N0+1;B0--&&(j0=V0*x0[O0+1],x0[O0]-=E0+j0,B0--);O0+=2)O0+=2,E0=V0*x0[O0+1],x0[O0]-=E0+j0;if(N0!==0)for(O0=R0+1,E0=z0*x0[O0-1],B0=N0;B0--&&(j0=z0*x0[O0+1],x0[O0]-=E0+j0,B0--);O0+=2)O0+=2,E0=z0*x0[O0+1],x0[O0]-=E0+j0},M0}(),Ge=function(){function M0(){ri.call(this)}return M0.prototype=Object.create(ri.prototype),M0.prototype.filter=function(x0,R0,me){var N0=me>>1;R0=R0|0;var O0,B0;for(O0=R0,B0=N0+1;B0--;O0+=2)x0[O0]-=x0[O0-1]+x0[O0+1]+2>>2;for(O0=R0+1,B0=N0;B0--;O0+=2)x0[O0]+=x0[O0-1]+x0[O0+1]>>1},M0}();return J}(),m=function(){var G=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];function J(i0,Q,f){this.data=i0,this.bp=Q,this.dataEnd=f,this.chigh=i0[Q],this.clow=0,this.byteIn(),this.chigh=this.chigh<<7&65535|this.clow>>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}return J.prototype={byteIn:function(){var Q=this.data,f=this.bp;if(Q[f]===255){var l0=Q[f+1];l0>143?(this.clow+=65280,this.ct=8):(f++,this.clow+=Q[f]<<9,this.ct=7,this.bp=f)}else f++,this.clow+=f65535&&(this.chigh+=this.clow>>16,this.clow&=65535)},readBit:function(Q,f){var l0=Q[f]>>1,o0=Q[f]&1,c0=G[l0],d0=c0.qe,S0,p0=this.a-d0;if(this.chigh>15&1,this.clow=this.clow<<1&65535,this.ct--;while(!(p0&32768));return this.a=p0,Q[f]=l0<<1|o0,S0}},J}(),A=typeof window>"u"?commonjsGlobal:window;A.PDFJS||(A.PDFJS={});var S=S||{};S.VERBOSITY_LEVELS={errors:0,warnings:1,infos:5},S.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};function v(Y){S.verbosity>=S.VERBOSITY_LEVELS.infos&&console.log("Info: "+Y)}function w(Y){S.verbosity>=S.VERBOSITY_LEVELS.warnings&&console.log("Warning: "+Y)}S.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"},S.UnsupportedManager=function(){var G=[];return{listen:function(J){G.push(J)},notify:function(J){w('Unsupported feature "'+J+'"');for(var i0=0,Q=G.length;i0G;)G<<=1,J++;return J}function q(Y,G){return Y[G]<<8|Y[G+1]}function z(Y,G){return(Y[G]<<24|Y[G+1]<<16|Y[G+2]<<8|Y[G+3])>>>0}function e0(){var Y=new Uint8Array(2);Y[0]=1;var G=new Uint16Array(Y.buffer);return G[0]===1}Object.defineProperty(S,"isLittleEndian",{configurable:!0,get:function(){return R(S,"isLittleEndian",e0())}});function H(){var Y=document.createElement("canvas");Y.width=Y.height=1;var G=Y.getContext("2d"),J=G.createImageData(1,1);return typeof J.data.buffer<"u"}Object.defineProperty(S,"hasCanvasTypedArrays",{configurable:!0,get:function(){return R(S,"hasCanvasTypedArrays",H())}});var j=S.Util=function(){function G(){}var J=["rgb(",0,",",0,",",0,")"];return G.makeCssRgb=function(Q,f,l0){return J[1]=Q,J[3]=f,J[5]=l0,J.join("")},G.transform=function(Q,f){return[Q[0]*f[0]+Q[2]*f[1],Q[1]*f[0]+Q[3]*f[1],Q[0]*f[2]+Q[2]*f[3],Q[1]*f[2]+Q[3]*f[3],Q[0]*f[4]+Q[2]*f[5]+Q[4],Q[1]*f[4]+Q[3]*f[5]+Q[5]]},G.applyTransform=function(Q,f){var l0=Q[0]*f[0]+Q[1]*f[2]+f[4],o0=Q[0]*f[1]+Q[1]*f[3]+f[5];return[l0,o0]},G.applyInverseTransform=function(Q,f){var l0=f[0]*f[3]-f[1]*f[2],o0=(Q[0]*f[3]-Q[1]*f[2]+f[2]*f[5]-f[4]*f[3])/l0,c0=(-Q[0]*f[1]+Q[1]*f[0]+f[4]*f[1]-f[5]*f[0])/l0;return[o0,c0]},G.getAxialAlignedBoundingBox=function(Q,f){var l0=G.applyTransform(Q,f),o0=G.applyTransform(Q.slice(2,4),f),c0=G.applyTransform([Q[0],Q[3]],f),d0=G.applyTransform([Q[2],Q[1]],f);return[Math.min(l0[0],o0[0],c0[0],d0[0]),Math.min(l0[1],o0[1],c0[1],d0[1]),Math.max(l0[0],o0[0],c0[0],d0[0]),Math.max(l0[1],o0[1],c0[1],d0[1])]},G.inverseTransform=function(Q){var f=Q[0]*Q[3]-Q[1]*Q[2];return[Q[3]/f,-Q[1]/f,-Q[2]/f,Q[0]/f,(Q[2]*Q[5]-Q[4]*Q[3])/f,(Q[4]*Q[1]-Q[5]*Q[0])/f]},G.apply3dTransform=function(Q,f){return[Q[0]*f[0]+Q[1]*f[1]+Q[2]*f[2],Q[3]*f[0]+Q[4]*f[1]+Q[5]*f[2],Q[6]*f[0]+Q[7]*f[1]+Q[8]*f[2]]},G.singularValueDecompose2dScale=function(Q){var f=[Q[0],Q[2],Q[1],Q[3]],l0=Q[0]*f[0]+Q[1]*f[2],o0=Q[0]*f[1]+Q[1]*f[3],c0=Q[2]*f[0]+Q[3]*f[2],d0=Q[2]*f[1]+Q[3]*f[3],S0=(l0+d0)/2,p0=Math.sqrt((l0+d0)*(l0+d0)-4*(l0*d0-c0*o0))/2,T0=S0+p0||1,C0=S0-p0||1;return[Math.sqrt(T0),Math.sqrt(C0)]},G.normalizeRect=function(Q){var f=Q.slice(0);return Q[0]>Q[2]&&(f[0]=Q[2],f[2]=Q[0]),Q[1]>Q[3]&&(f[1]=Q[3],f[3]=Q[1]),f},G.intersect=function(Q,f){function l0(S0,p0){return S0-p0}var o0=[Q[0],Q[2],f[0],f[2]].sort(l0),c0=[Q[1],Q[3],f[1],f[3]].sort(l0),d0=[];if(Q=G.normalizeRect(Q),f=G.normalizeRect(f),o0[0]===Q[0]&&o0[1]===f[0]||o0[0]===f[0]&&o0[1]===Q[0])d0[0]=o0[1],d0[2]=o0[2];else return!1;if(c0[0]===Q[1]&&c0[1]===f[1]||c0[0]===f[1]&&c0[1]===Q[1])d0[1]=c0[1],d0[3]=c0[2];else return!1;return d0},G.sign=function(Q){return Q<0?-1:1},G.appendToArray=function(Q,f){Array.prototype.push.apply(Q,f)},G.prependToArray=function(Q,f){Array.prototype.unshift.apply(Q,f)},G.extendObj=function(Q,f){for(var l0 in f)Q[l0]=f[l0]},G.getInheritableProperty=function(Q,f){for(;Q&&!Q.has(f);)Q=Q.get("Parent");return Q?Q.get(f):null},G.inherit=function(Q,f,l0){Q.prototype=Object.create(f.prototype),Q.prototype.constructor=Q;for(var o0 in l0)Q.prototype[o0]=l0[o0]},G.loadScript=function(Q,f){var l0=document.createElement("script"),o0=!1;l0.setAttribute("src",Q),f&&(l0.onload=function(){o0||f(),o0=!0}),document.getElementsByTagName("head")[0].appendChild(l0)},G}();S.PageViewport=function(){function G(J,i0,Q,f,l0,o0){this.viewBox=J,this.scale=i0,this.rotation=Q,this.offsetX=f,this.offsetY=l0;var c0=(J[2]+J[0])/2,d0=(J[3]+J[1])/2,S0,p0,T0,C0;switch(Q=Q%360,Q=Q<0?Q+360:Q,Q){case 180:S0=-1,p0=0,T0=0,C0=1;break;case 90:S0=0,p0=1,T0=1,C0=0;break;case 270:S0=0,p0=-1,T0=-1,C0=0;break;default:S0=1,p0=0,T0=0,C0=-1;break}o0&&(T0=-T0,C0=-C0);var F0,ee,ie,ke;S0===0?(F0=Math.abs(d0-J[1])*i0+f,ee=Math.abs(c0-J[0])*i0+l0,ie=Math.abs(J[3]-J[1])*i0,ke=Math.abs(J[2]-J[0])*i0):(F0=Math.abs(c0-J[0])*i0+f,ee=Math.abs(d0-J[1])*i0+l0,ie=Math.abs(J[2]-J[0])*i0,ke=Math.abs(J[3]-J[1])*i0),this.transform=[S0*i0,p0*i0,T0*i0,C0*i0,F0-S0*i0*c0-T0*i0*d0,ee-p0*i0*c0-C0*i0*d0],this.width=ie,this.height=ke,this.fontScale=i0}return G.prototype={clone:function(i0){i0=i0||{};var Q="scale"in i0?i0.scale:this.scale,f="rotation"in i0?i0.rotation:this.rotation;return new G(this.viewBox.slice(),Q,f,this.offsetX,this.offsetY,i0.dontFlip)},convertToViewportPoint:function(i0,Q){return j.applyTransform([i0,Q],this.transform)},convertToViewportRectangle:function(i0){var Q=j.applyTransform([i0[0],i0[1]],this.transform),f=j.applyTransform([i0[2],i0[3]],this.transform);return[Q[0],Q[1],f[0],f[1]]},convertToPdfPoint:function(i0,Q){return j.applyInverseTransform([i0,Q],this.transform)}},G}();function y(){var Y={};return Y.promise=new Promise(function(G,J){Y.resolve=G,Y.reject=J}),Y}S.createPromiseCapability=y,function(){if(A.Promise){typeof A.Promise.all!="function"&&(A.Promise.all=function(o0){var c0=0,d0=[],S0,p0,T0=new A.Promise(function(C0,F0){S0=C0,p0=F0});return o0.forEach(function(C0,F0){c0++,C0.then(function(ee){d0[F0]=ee,c0--,c0===0&&S0(d0)},p0)}),c0===0&&S0(d0),T0}),typeof A.Promise.resolve!="function"&&(A.Promise.resolve=function(o0){return new A.Promise(function(c0){c0(o0)})}),typeof A.Promise.reject!="function"&&(A.Promise.reject=function(o0){return new A.Promise(function(c0,d0){d0(o0)})}),typeof A.Promise.prototype.catch2!="function"&&(A.Promise.prototype.catch2=function(o0){return A.Promise.prototype.then(void 0,o0)});return}var G=0,J=1,i0=2,Q=500,f={handlers:[],running:!1,unhandledRejections:[],pendingRejectionCheck:!1,scheduleHandlers:function(c0){c0._status!==G&&(this.handlers=this.handlers.concat(c0._handlers),c0._handlers=[],!this.running&&(this.running=!0,setTimeout(this.runHandlers.bind(this),0)))},runHandlers:function(){for(var c0=1,d0=Date.now()+c0;this.handlers.length>0;){var S0=this.handlers.shift(),p0=S0.thisPromise._status,T0=S0.thisPromise._value;try{p0===J?typeof S0.onResolve=="function"&&(T0=S0.onResolve(T0)):typeof S0.onReject=="function"&&(T0=S0.onReject(T0),p0=J,S0.thisPromise._unhandledRejection&&this.removeUnhandeledRejection(S0.thisPromise))}catch(C0){p0=i0,T0=C0}if(S0.nextPromise._updateStatus(p0,T0),Date.now()>=d0)break}if(this.handlers.length>0){setTimeout(this.runHandlers.bind(this),0);return}this.running=!1},addUnhandledRejection:function(c0){this.unhandledRejections.push({promise:c0,time:Date.now()}),this.scheduleRejectionCheck()},removeUnhandeledRejection:function(c0){c0._unhandledRejection=!1;for(var d0=0;d0Q){var p0=this.unhandledRejections[S0].promise._value,T0="Unhandled rejection: "+p0;p0.stack&&(T0+=` -`+p0.stack),w(T0),this.unhandledRejections.splice(S0),S0--}this.unhandledRejections.length&&this.scheduleRejectionCheck()}).bind(this),Q))}};function l0(o0){this._status=G,this._handlers=[];try{o0.call(this,this._resolve.bind(this),this._reject.bind(this))}catch(c0){this._reject(c0)}}l0.all=function(c0){var d0,S0,p0=new l0(function(De,I0){d0=De,S0=I0}),T0=c0.length,C0=[];if(T0===0)return d0(C0),p0;function F0(De){p0._status!==i0&&(C0=[],S0(De))}for(var ee=0,ie=c0.length;ee>2,C0=(d0&3)<<4|S0>>4,F0=o0+1>6:64,ee=o0+2"+this.value+"]":v="["+this.value+"]":v="";return this.isSublistItem()?L="Sequence Item":this.isSublistItemDelim()?L="Sequence Item Delimiter":this.isSequenceDelim()?L="Sequence Delimiter":this.isPixelData()?L="Pixel Data":P=m.Utils.convertCamcelCaseToTitleCase(m.Dictionary.getDescription(this.group,this.element)),v=u(v),S?d+""+L+"   "+P+"   "+v:d+" "+L+" "+P+" "+v},m.Tag.prototype.toHTMLString=function(A){return this.toString(A,!0)},m.Tag.prototype.isTransformSyntax=function(){return this.group===m.Tag.TAG_TRANSFER_SYNTAX[0]&&this.element===m.Tag.TAG_TRANSFER_SYNTAX[1]},m.Tag.prototype.isCharset=function(){return this.group===m.Tag.TAG_SPECIFIC_CHAR_SET[0]&&this.element===m.Tag.TAG_SPECIFIC_CHAR_SET[1]},m.Tag.prototype.isPixelData=function(){return this.group===m.Tag.TAG_PIXEL_DATA[0]&&this.element===m.Tag.TAG_PIXEL_DATA[1]},m.Tag.prototype.isPrivateData=function(){return(this.group&1)===1},m.Tag.prototype.hasInterpretedPrivateData=function(){return this.isPrivateData()&&m.Utils.isString(this.value)},m.Tag.prototype.isSublistItem=function(){return this.group===m.Tag.TAG_SUBLIST_ITEM[0]&&this.element===m.Tag.TAG_SUBLIST_ITEM[1]},m.Tag.prototype.isSublistItemDelim=function(){return this.group===m.Tag.TAG_SUBLIST_ITEM_DELIM[0]&&this.element===m.Tag.TAG_SUBLIST_ITEM_DELIM[1]},m.Tag.prototype.isSequenceDelim=function(){return this.group===m.Tag.TAG_SUBLIST_SEQ_DELIM[0]&&this.element===m.Tag.TAG_SUBLIST_SEQ_DELIM[1]},m.Tag.prototype.isMetaLength=function(){return this.group===m.Tag.TAG_META_LENGTH[0]&&this.element===m.Tag.TAG_META_LENGTH[1]},T.exports&&(T.exports=m.Tag)}(tag)),tag.exports}var rle={exports:{}},hasRequiredRle;function requireRle(){return hasRequiredRle||(hasRequiredRle=1,function(T){var u=u||{};u.RLE=u.RLE||function(){this.rawData=null,this.bytesRead=0,this.bytesPut=0,this.segElemPut=0,this.numSegments=0,this.segmentOffsets=[],this.littleEndian=!0,this.segmentIndex=0,this.numElements=0,this.size=0,this.output=null},u.RLE.HEADER_SIZE=64,u.RLE.prototype.decode=function(m,A,S){var v;for(this.rawData=new DataView(m),this.littleEndian=A,this.numElements=S,this.readHeader(),this.output=new DataView(new ArrayBuffer(this.size)),v=0;v=0&&m<128?this.readLiteral(m):m<=-1&&m>-128?this.readEncoded(m):m===-128&&console.warn("RLE: unsupported code!");this.segmentIndex+=1},u.RLE.prototype.readLiteral=function(m){var A,S=m+1;if(this.hasValidInput())for(A=0;A1)for(var v=Array.prototype.slice.call(arguments,1);S--;)A[m-1-S]=u.lossless.Utils.createArray.apply(this,v);return A},u.lossless.Utils.makeCRCTable=function(){for(var m,A=[],S=0;S<256;S++){m=S;for(var v=0;v<8;v++)m=m&1?3988292384^m>>>1:m>>>1;A[S]=m}return A},u.lossless.Utils.crc32=function(m){for(var A=new Uint8Array(m.buffer),S=u.lossless.Utils.crcTable||(u.lossless.Utils.crcTable=u.lossless.Utils.makeCRCTable()),v=-1,w=0;w>>8^S[(v^A[w])&255];return(v^-1)>>>0},T.exports&&(T.exports=u.lossless.Utils)}(utils)),utils.exports}var hasRequiredHuffmanTable;function requireHuffmanTable(){return hasRequiredHuffmanTable||(hasRequiredHuffmanTable=1,function(T){var u=u||{};u.lossless=u.lossless||{},u.lossless.DataStream=u.lossless.DataStream||(typeof commonjsRequire<"u"?requireDataStream():null),u.lossless.Utils=u.lossless.Utils||(typeof commonjsRequire<"u"?requireUtils():null),u.lossless.HuffmanTable=u.lossless.HuffmanTable||function(){this.l=u.lossless.Utils.createArray(4,2,16),this.th=[],this.v=u.lossless.Utils.createArray(4,2,16,200),this.tc=u.lossless.Utils.createArray(4,2),this.tc[0][0]=0,this.tc[1][0]=0,this.tc[2][0]=0,this.tc[3][0]=0,this.tc[0][1]=0,this.tc[1][1]=0,this.tc[2][1]=0,this.tc[3][1]=0,this.th[0]=0,this.th[1]=0,this.th[2]=0,this.th[3]=0},u.lossless.HuffmanTable.MSB=2147483648,u.lossless.HuffmanTable.prototype.read=function(m,A){var S=0,v,w,D,R,L,P;for(v=m.get16(),S+=2;S3)throw new Error("ERROR: Huffman table ID > 3");if(R=w>>4,R>2)throw new Error("ERROR: Huffman table [Table class > 2 ]");for(this.th[D]=1,this.tc[D][R]=1,L=0;L<16;L+=1)this.l[D][R][L]=m.get8(),S+=1;for(L=0;L<16;L+=1)for(P=0;Pv)throw new Error("ERROR: Huffman table format error [count>Lh]");this.v[D][R][L][P]=m.get8(),S+=1}}if(S!==v)throw new Error("ERROR: Huffman table format error [count!=Lf]");for(L=0;L<4;L+=1)for(P=0;P<2;P+=1)this.tc[L][P]!==0&&this.buildHuffTable(A[L][P],this.l[L][P],this.v[L][P]);return 1},u.lossless.HuffmanTable.prototype.buildHuffTable=function(m,A,S){var v,w,D,R,L,P;for(w=256,D=0,R=0;R<8;R+=1)for(L=0;L>R+1;P+=1)m[D]=S[R][L]|R+1<<8,D+=1;for(R=1;D<256;R+=1,D+=1)m[D]=R|u.lossless.HuffmanTable.MSB;for(v=1,D=0,R=8;R<16;R+=1)for(L=0;L>R-7;P+=1)m[v*256+D]=S[R][L]|R+1<<8,D+=1;if(D>=256){if(D>256)throw new Error("ERROR: Huffman table error(1)!");D=0,v+=1}}},T.exports&&(T.exports=u.lossless.HuffmanTable)}(huffmanTable)),huffmanTable.exports}var quantizationTable={exports:{}},hasRequiredQuantizationTable;function requireQuantizationTable(){return hasRequiredQuantizationTable||(hasRequiredQuantizationTable=1,function(T){var u=u||{};u.lossless=u.lossless||{},u.lossless.DataStream=u.lossless.DataStream||(typeof commonjsRequire<"u"?requireDataStream():null),u.lossless.Utils=u.lossless.Utils||(typeof commonjsRequire<"u"?requireUtils():null),u.lossless.QuantizationTable=u.lossless.QuantizationTable||function(){this.precision=[],this.tq=[],this.quantTables=u.lossless.Utils.createArray(4,64),this.tq[0]=0,this.tq[1]=0,this.tq[2]=0,this.tq[3]=0},u.lossless.QuantizationTable.enhanceQuantizationTable=function(m,A){var S;for(S=0;S<8;S+=1)m[A[0*8+S]]*=90,m[A[4*8+S]]*=90,m[A[2*8+S]]*=118,m[A[6*8+S]]*=49,m[A[5*8+S]]*=71,m[A[1*8+S]]*=126,m[A[7*8+S]]*=25,m[A[3*8+S]]*=106;for(S=0;S<8;S+=1)m[A[0+8*S]]*=90,m[A[4+8*S]]*=90,m[A[2+8*S]]*=118,m[A[6+8*S]]*=49,m[A[5+8*S]]*=71,m[A[1+8*S]]*=126,m[A[7+8*S]]*=25,m[A[3+8*S]]*=106;for(S=0;S<64;S+=1)m[S]>>=6},u.lossless.QuantizationTable.prototype.read=function(m,A){var S=0,v,w,D,R;for(v=m.get16(),S+=2;S3)throw new Error("ERROR: Quantization table ID > 3");if(this.precision[D]=w>>4,this.precision[D]===0)this.precision[D]=8;else if(this.precision[D]===1)this.precision[D]=16;else throw new Error("ERROR: Quantization table precision error");if(this.tq[D]=1,this.precision[D]===8){for(R=0;R<64;R+=1){if(S>v)throw new Error("ERROR: Quantization table format error");this.quantTables[D][R]=m.get8(),S+=1}u.lossless.QuantizationTable.enhanceQuantizationTable(this.quantTables[D],A)}else{for(R=0;R<64;R+=1){if(S>v)throw new Error("ERROR: Quantization table format error");this.quantTables[D][R]=m.get16(),S+=2}u.lossless.QuantizationTable.enhanceQuantizationTable(this.quantTables[D],A)}}if(S!==v)throw new Error("ERROR: Quantization table error [count!=Lq]");return 1},T.exports&&(T.exports=u.lossless.QuantizationTable)}(quantizationTable)),quantizationTable.exports}var scanHeader={exports:{}},scanComponent={exports:{}},hasRequiredScanComponent;function requireScanComponent(){return hasRequiredScanComponent||(hasRequiredScanComponent=1,function(T){var u=u||{};u.lossless=u.lossless||{},u.lossless.ScanComponent=u.lossless.ScanComponent||function(){this.acTabSel=0,this.dcTabSel=0,this.scanCompSel=0},T.exports&&(T.exports=u.lossless.ScanComponent)}(scanComponent)),scanComponent.exports}var hasRequiredScanHeader;function requireScanHeader(){return hasRequiredScanHeader||(hasRequiredScanHeader=1,function(T){var u=u||{};u.lossless=u.lossless||{},u.lossless.DataStream=u.lossless.DataStream||(typeof commonjsRequire<"u"?requireDataStream():null),u.lossless.ScanComponent=u.lossless.ScanComponent||(typeof commonjsRequire<"u"?requireScanComponent():null),u.lossless.ScanHeader=u.lossless.ScanHeader||function(){this.ah=0,this.al=0,this.numComp=0,this.selection=0,this.spectralEnd=0,this.components=[]},u.lossless.ScanHeader.prototype.read=function(m){var A=0,S,v,w;for(S=m.get16(),A+=2,this.numComp=m.get8(),A+=1,v=0;vS)throw new Error("ERROR: scan header format error");this.components[v].scanCompSel=m.get8(),A+=1,w=m.get8(),A+=1,this.components[v].dcTabSel=w>>4,this.components[v].acTabSel=w&15}if(this.selection=m.get8(),A+=1,this.spectralEnd=m.get8(),A+=1,w=m.get8(),this.ah=w>>4,this.al=w&15,A+=1,A!==S)throw new Error("ERROR: scan header format error [count!=Ns]");return 1},T.exports&&(T.exports=u.lossless.ScanHeader)}(scanHeader)),scanHeader.exports}var frameHeader={exports:{}},hasRequiredFrameHeader;function requireFrameHeader(){return hasRequiredFrameHeader||(hasRequiredFrameHeader=1,function(T){var u=u||{};u.lossless=u.lossless||{},u.lossless.ComponentSpec=u.lossless.ComponentSpec||(typeof commonjsRequire<"u"?requireComponentSpec():null),u.lossless.DataStream=u.lossless.DataStream||(typeof commonjsRequire<"u"?requireDataStream():null),u.lossless.FrameHeader=u.lossless.FrameHeader||function(){this.components=[],this.dimX=0,this.dimY=0,this.numComp=0,this.precision=0},u.lossless.FrameHeader.prototype.read=function(m){var A=0,S,v,w,D;for(S=m.get16(),A+=2,this.precision=m.get8(),A+=1,this.dimY=m.get16(),A+=2,this.dimX=m.get16(),A+=2,this.numComp=m.get8(),A+=1,v=1;v<=this.numComp;v+=1){if(A>S)throw new Error("ERROR: frame format error");if(w=m.get8(),A+=1,A>=S)throw new Error("ERROR: frame format error [c>=Lf]");D=m.get8(),A+=1,this.components[w]||(this.components[w]=new u.lossless.ComponentSpec),this.components[w].hSamp=D>>4,this.components[w].vSamp=D&15,this.components[w].quantTableSel=m.get8(),A+=1}if(A!==S)throw new Error("ERROR: frame format error [Lf!=count]");return 1},T.exports&&(T.exports=u.lossless.FrameHeader)}(frameHeader)),frameHeader.exports}var hasRequiredDecoder;function requireDecoder(){return hasRequiredDecoder||(hasRequiredDecoder=1,function(T){var u=u||{};u.lossless=u.lossless||{},u.lossless.DataStream=u.lossless.DataStream||(typeof commonjsRequire<"u"?requireDataStream():null),u.lossless.HuffmanTable=u.lossless.HuffmanTable||(typeof commonjsRequire<"u"?requireHuffmanTable():null),u.lossless.QuantizationTable=u.lossless.QuantizationTable||(typeof commonjsRequire<"u"?requireQuantizationTable():null),u.lossless.ScanHeader=u.lossless.ScanHeader||(typeof commonjsRequire<"u"?requireScanHeader():null),u.lossless.FrameHeader=u.lossless.FrameHeader||(typeof commonjsRequire<"u"?requireFrameHeader():null),u.lossless.Utils=u.lossless.Utils||(typeof commonjsRequire<"u"?requireUtils():null),u.lossless.Decoder=u.lossless.Decoder||function(A,S){this.buffer=A,this.frame=new u.lossless.FrameHeader,this.huffTable=new u.lossless.HuffmanTable,this.quantTable=new u.lossless.QuantizationTable,this.scan=new u.lossless.ScanHeader,this.DU=u.lossless.Utils.createArray(10,4,64),this.HuffTab=u.lossless.Utils.createArray(4,2,50*256),this.IDCT_Source=[],this.nBlock=[],this.acTab=u.lossless.Utils.createArray(10,1),this.dcTab=u.lossless.Utils.createArray(10,1),this.qTab=u.lossless.Utils.createArray(10,1),this.marker=0,this.markerIndex=0,this.numComp=0,this.restartInterval=0,this.selection=0,this.xDim=0,this.yDim=0,this.xLoc=0,this.yLoc=0,this.numBytes=0,this.outputData=null,this.restarting=!1,this.mask=0,typeof S<"u"&&(this.numBytes=S)},u.lossless.Decoder.IDCT_P=[0,5,40,16,45,2,7,42,21,56,8,61,18,47,1,4,41,23,58,13,32,24,37,10,63,17,44,3,6,43,20,57,15,34,29,48,53,26,39,9,60,19,46,22,59,12,33,31,50,55,25,36,11,62,14,35,28,49,52,27,38,30,51,54],u.lossless.Decoder.TABLE=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],u.lossless.Decoder.MAX_HUFFMAN_SUBTREE=50,u.lossless.Decoder.MSB=2147483648,u.lossless.Decoder.RESTART_MARKER_BEGIN=65488,u.lossless.Decoder.RESTART_MARKER_END=65495,u.lossless.Decoder.prototype.decompress=function(A,S,v){return this.decode(A,S,v).buffer},u.lossless.Decoder.prototype.decode=function(A,S,v,w){var D,R=0,L=[],P,d,E=[],e=[],N;if(typeof A<"u"&&(this.buffer=A),typeof w<"u"&&(this.numBytes=w),this.stream=new u.lossless.DataStream(this.buffer,S,v),this.buffer=null,this.xLoc=0,this.yLoc=0,D=this.stream.get16(),D!==65496)throw new Error("Not a JPEG file");for(D=this.stream.get16();D>>4!==4092||D===65476;){switch(D){case 65476:this.huffTable.read(this.stream,this.HuffTab);break;case 65484:throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,u.lossless.Decoder.TABLE);break;case 65501:this.restartInterval=this.readNumber();break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(D>>8!==255)throw new Error("ERROR: format throw new IOException! (decode)")}D=this.stream.get16()}if(D<65472||D>65479)throw new Error("ERROR: could not handle arithmetic code!");this.frame.read(this.stream),D=this.stream.get16();do{for(;D!==65498;){switch(D){case 65476:this.huffTable.read(this.stream,this.HuffTab);break;case 65484:throw new Error("Program doesn't support arithmetic coding. (format throw new IOException)");case 65499:this.quantTable.read(this.stream,u.lossless.Decoder.TABLE);break;case 65501:this.restartInterval=this.readNumber();break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:this.readApp();break;case 65534:this.readComment();break;default:if(D>>8!==255)throw new Error("ERROR: format throw new IOException! (Parser.decode)")}D=this.stream.get16()}switch(this.precision=this.frame.precision,this.components=this.frame.components,this.numBytes||(this.numBytes=parseInt(Math.ceil(this.precision/8))),this.numBytes==1?this.mask=255:this.mask=65535,this.scan.read(this.stream),this.numComp=this.scan.numComp,this.selection=this.scan.selection,this.numBytes===1?this.numComp===3?(this.getter=this.getValueRGB,this.setter=this.setValueRGB,this.output=this.outputRGB):(this.getter=this.getValue8,this.setter=this.setValue8,this.output=this.outputSingle):(this.getter=this.getValue16,this.setter=this.setValue16,this.output=this.outputSingle),this.selection){case 2:this.selector=this.select2;break;case 3:this.selector=this.select3;break;case 4:this.selector=this.select4;break;case 5:this.selector=this.select5;break;case 6:this.selector=this.select6;break;case 7:this.selector=this.select7;break;default:this.selector=this.select1;break}for(this.scanComps=this.scan.components,this.quantTables=this.quantTable.quantTables,P=0;P=u.lossless.Decoder.RESTART_MARKER_BEGIN&&D<=u.lossless.Decoder.RESTART_MARKER_END))break}D===65500&&R===1&&(this.readNumber(),D=this.stream.get16())}while(D!==65497&&this.xLoc>1)},u.lossless.Decoder.prototype.select6=function(A){return this.getPreviousY(A)+(this.getPreviousX(A)-this.getPreviousXY(A)>>1)},u.lossless.Decoder.prototype.select7=function(A){return(this.getPreviousX(A)+this.getPreviousY(A))/2},u.lossless.Decoder.prototype.decodeRGB=function(A,S,v){var w,D,R,L,P,d,E,e;for(A[0]=this.selector(0),A[1]=this.selector(1),A[2]=this.selector(2),P=0;P=65280)return w;for(A[P]=this.IDCT_Source[0]=A[P]+this.getn(v,w,S,v),this.IDCT_Source[0]*=L[0],e=1;e<64;e+=1){if(w=this.getHuffmanValue(D,S,v),w>=65280)return w;if(e+=w>>4,w&15)this.IDCT_Source[u.lossless.Decoder.IDCT_P[e]]=this.getn(v,w&15,S,v)*L[e];else if(!(w>>4))break}}return 0},u.lossless.Decoder.prototype.decodeSingle=function(A,S,v){var w,D,R,L;for(this.restarting?(this.restarting=!1,A[0]=1<=65280)return w;if(R=this.getn(A,w,S,v),L=R>>8,L>=u.lossless.Decoder.RESTART_MARKER_BEGIN&&L<=u.lossless.Decoder.RESTART_MARKER_END)return L;A[0]+=R}return 0},u.lossless.Decoder.prototype.getHuffmanValue=function(A,S,v){var w,D,R;if(R=65535,v[0]<8?(S[0]<<=8,D=this.stream.get8(),D===255&&(this.marker=this.stream.get8(),this.marker!==0&&(this.markerIndex=9)),S[0]|=D):v[0]-=8,w=A[S[0]>>v[0]],w&u.lossless.Decoder.MSB){if(this.markerIndex!==0)return this.markerIndex=0,65280|this.marker;S[0]&=R>>16-v[0],S[0]<<=8,D=this.stream.get8(),D===255&&(this.marker=this.stream.get8(),this.marker!==0&&(this.markerIndex=9)),S[0]|=D,w=A[(w&255)*256+(S[0]>>v[0])],v[0]+=8}if(v[0]+=8-(w>>8),v[0]<0)throw new Error("index="+v[0]+" temp="+S[0]+" code="+w+" in HuffmanValue()");return v[0]>16-v[0],w&255)},u.lossless.Decoder.prototype.getn=function(A,S,v,w){var D,R,L,P,d;if(R=1,L=-1,P=65535,S===0)return 0;if(S===16)return A[0]>=0?-32768:32768;if(w[0]-=S,w[0]>=0){if(w[0]>w[0],v[0]&=P>>16-w[0]}else{if(v[0]<<=8,d=this.stream.get8(),d===255&&(this.marker=this.stream.get8(),this.marker!==0&&(this.markerIndex=9)),v[0]|=d,w[0]+=8,w[0]<0){if(this.markerIndex!==0)return this.markerIndex=0,(65280|this.marker)<<8;v[0]<<=8,d=this.stream.get8(),d===255&&(this.marker=this.stream.get8(),this.marker!==0&&(this.markerIndex=9)),v[0]|=d,w[0]+=8}if(w[0]<0)throw new Error("index="+w[0]+" in getn()");if(w[0]>w[0],v[0]&=P>>16-w[0]}return D0?this.getter(this.yLoc*this.xDim+this.xLoc-1,A):this.yLoc>0?this.getPreviousY(A):1<0&&this.yLoc>0?this.getter((this.yLoc-1)*this.xDim+this.xLoc-1,A):this.getPreviousY(A)},u.lossless.Decoder.prototype.getPreviousY=function(A){return this.yLoc>0?this.getter((this.yLoc-1)*this.xDim+this.xLoc,A):this.getPreviousX(A)},u.lossless.Decoder.prototype.isLastPixel=function(){return this.xLoc===this.xDim-1&&this.yLoc===this.yDim-1},u.lossless.Decoder.prototype.outputSingle=function(A){this.xLoc=this.xDim&&(this.yLoc+=1,this.xLoc=0))},u.lossless.Decoder.prototype.outputRGB=function(A){var S=this.yLoc*this.xDim+this.xLoc;this.xLoc=this.xDim&&(this.yLoc+=1,this.xLoc=0))},u.lossless.Decoder.prototype.setValue8=function(A,S){this.outputData[A]=S},u.lossless.Decoder.prototype.getValue8=function(A){return this.outputData[A]};var m=function(){var A=new ArrayBuffer(2);return new DataView(A).setInt16(0,256,!0),new Int16Array(A)[0]===256}();m?(u.lossless.Decoder.prototype.setValue16=u.lossless.Decoder.prototype.setValue8,u.lossless.Decoder.prototype.getValue16=u.lossless.Decoder.prototype.getValue8):(u.lossless.Decoder.prototype.setValue16=function(A,S){this.outputData[A]=(S&255)<<8|S>>8&255},u.lossless.Decoder.prototype.getValue16=function(A){var S=this.outputData[A];return(S&255)<<8|S>>8&255}),u.lossless.Decoder.prototype.setValueRGB=function(A,S,v){this.outputData[A*3+v]=S},u.lossless.Decoder.prototype.getValueRGB=function(A,S){return this.outputData[A*3+S]},u.lossless.Decoder.prototype.readApp=function(){var A=0,S=this.stream.get16();for(A+=2;A0&&!y[f-1];)f--;J.push({children:[],index:0});var o0=J[0],l0;for(i0=0;i00;)o0=J.pop();for(o0.index++,J.push(o0);J.length<=i0;)J.push(l0={children:[],index:0}),o0.children[o0.index]=l0.children,o0=l0;G++}i0+10)return T0--,g0>>T0&1;if(g0=y[Y++],g0==255){var z0=y[Y++];if(z0)throw"unexpected marker: "+(g0<<8|z0).toString(16)}return T0=7,g0>>>7}function F0(z0){for(var V0=z0,pe;(pe=C0())!==null;){if(V0=V0[pe],typeof V0=="number")return V0;if(typeof V0!="object")throw"invalid huffman sequence"}return null}function ee(z0){for(var V0=0;z0>0;){var pe=C0();if(pe===null)return;V0=V0<<1|pe,z0--}return V0}function ie(z0){var V0=ee(z0);return V0>=1<>4;if(U0===0){if(X0<15)break;K0+=16;continue}K0+=X0;var Q0=S[K0];z0.blockData[V0+Q0]=ie(U0),K0++}}function Ne(z0,V0){var pe=F0(z0.huffmanTableDC),q0=pe===0?0:ie(pe)<0){I0--;return}for(var pe=Q,q0=f;pe<=q0;){var K0=F0(z0.huffmanTableAC),W=K0&15,U0=K0>>4;if(W===0){if(U0<15){I0=ee(U0)+(1<>4,X0===0)K0<15?(I0=ee(K0)+(1<=65488&&O0<=65495)Y+=2;else break}return Y-S0}function e0(y,Y,G){var J=y.quantizationTable,i0,Q,f,o0,l0,c0,d0,S0,g0,T0;for(T0=0;T0<64;T0++)G[T0]=y.blockData[Y+T0]*J[T0];for(T0=0;T0<8;++T0){var C0=8*T0;if(G[1+C0]===0&&G[2+C0]===0&&G[3+C0]===0&&G[4+C0]===0&&G[5+C0]===0&&G[6+C0]===0&&G[7+C0]===0){g0=d*G[0+C0]+512>>10,G[0+C0]=g0,G[1+C0]=g0,G[2+C0]=g0,G[3+C0]=g0,G[4+C0]=g0,G[5+C0]=g0,G[6+C0]=g0,G[7+C0]=g0;continue}i0=d*G[0+C0]+128>>8,Q=d*G[4+C0]+128>>8,f=G[2+C0],o0=G[6+C0],l0=E*(G[1+C0]-G[7+C0])+128>>8,S0=E*(G[1+C0]+G[7+C0])+128>>8,c0=G[3+C0]<<4,d0=G[5+C0]<<4,g0=i0-Q+1>>1,i0=i0+Q+1>>1,Q=g0,g0=f*P+o0*L+128>>8,f=f*L-o0*P+128>>8,o0=g0,g0=l0-d0+1>>1,l0=l0+d0+1>>1,d0=g0,g0=S0+c0+1>>1,c0=S0-c0+1>>1,S0=g0,g0=i0-o0+1>>1,i0=i0+o0+1>>1,o0=g0,g0=Q-f+1>>1,Q=Q+f+1>>1,f=g0,g0=l0*R+S0*D+2048>>12,l0=l0*D-S0*R+2048>>12,S0=g0,g0=c0*w+d0*v+2048>>12,c0=c0*v-d0*w+2048>>12,d0=g0,G[0+C0]=i0+S0,G[7+C0]=i0-S0,G[1+C0]=Q+d0,G[6+C0]=Q-d0,G[2+C0]=f+c0,G[5+C0]=f-c0,G[3+C0]=o0+l0,G[4+C0]=o0-l0}for(T0=0;T0<8;++T0){var F0=T0;if(G[1*8+F0]===0&&G[2*8+F0]===0&&G[3*8+F0]===0&&G[4*8+F0]===0&&G[5*8+F0]===0&&G[6*8+F0]===0&&G[7*8+F0]===0){g0=d*G[T0+0]+8192>>14,G[0*8+F0]=g0,G[1*8+F0]=g0,G[2*8+F0]=g0,G[3*8+F0]=g0,G[4*8+F0]=g0,G[5*8+F0]=g0,G[6*8+F0]=g0,G[7*8+F0]=g0;continue}i0=d*G[0*8+F0]+2048>>12,Q=d*G[4*8+F0]+2048>>12,f=G[2*8+F0],o0=G[6*8+F0],l0=E*(G[1*8+F0]-G[7*8+F0])+2048>>12,S0=E*(G[1*8+F0]+G[7*8+F0])+2048>>12,c0=G[3*8+F0],d0=G[5*8+F0],g0=i0-Q+1>>1,i0=i0+Q+1>>1,Q=g0,g0=f*P+o0*L+2048>>12,f=f*L-o0*P+2048>>12,o0=g0,g0=l0-d0+1>>1,l0=l0+d0+1>>1,d0=g0,g0=S0+c0+1>>1,c0=S0-c0+1>>1,S0=g0,g0=i0-o0+1>>1,i0=i0+o0+1>>1,o0=g0,g0=Q-f+1>>1,Q=Q+f+1>>1,f=g0,g0=l0*R+S0*D+2048>>12,l0=l0*D-S0*R+2048>>12,S0=g0,g0=c0*w+d0*v+2048>>12,c0=c0*v-d0*w+2048>>12,d0=g0,G[0*8+F0]=i0+S0,G[7*8+F0]=i0-S0,G[1*8+F0]=Q+d0,G[6*8+F0]=Q-d0,G[2*8+F0]=f+c0,G[5*8+F0]=f-c0,G[3*8+F0]=o0+l0,G[4*8+F0]=o0-l0}for(T0=0;T0<64;++T0){var ee=Y+T0,ie=G[T0];ie=ie<=-2056/y.bitConversion?0:ie>=2024/y.bitConversion?255/y.bitConversion:ie+2056/y.bitConversion>>4,y.blockData[ee]=ie}}function H(y,Y){for(var G=Y.blocksPerLine,J=Y.blocksPerColumn,i0=new Int32Array(64),Q=0;Q=255?255:y|0}return e.prototype={load:function(Y){var G=(function(l0){this.parse(l0),this.onload&&this.onload()}).bind(this);if(Y.indexOf("data:")>-1){for(var J=Y.indexOf("base64,")+7,i0=atob(Y.substring(J)),Q=new Uint8Array(i0.length),f=i0.length-1;f>=0;f--)Q[f]=i0.charCodeAt(f);G(i0)}else{var o0=new XMLHttpRequest;o0.open("GET",Y,!0),o0.responseType="arraybuffer",o0.onload=(function(){var l0=new Uint8Array(o0.response);G(l0)}).bind(this),o0.send(null)}},parse:function(Y){function G(){var W=Y[Q]<<8|Y[Q+1];return Q+=2,W}function J(){var W=G(),U0=Y.subarray(Q,Q+W-2);return Q+=U0.length,U0}function i0(W){for(var U0=Math.ceil(W.samplesPerLine/8/W.maxH),X0=Math.ceil(W.scanLines/8/W.maxV),Q0=0;Q0>4)if(De>>4===1)for(F0=0;F0<64;F0++){var Ge=S[F0];I0[Ge]=G()}else throw"DQT: invalid table spec";else for(F0=0;F0<64;F0++){var Le=S[F0];I0[Le]=Y[Q++]}d0[De&15]=I0}break;case 65472:case 65473:case 65474:if(l0)throw"Only single frame JPEGs supported";G(),l0={},l0.extended=T0===65473,l0.progressive=T0===65474,l0.precision=Y[Q++],l0.scanLines=G(),l0.samplesPerLine=G(),l0.components=[],l0.componentIds={};var ii=Y[Q++],oi,ei=0,Ve=0;for(C0=0;C0>4,Z0=Y[Q+1]&15;ei>4?S0:g0)[x0&15]=N(R0,N0)}break;case 65501:G(),c0=G();break;case 65498:G();var O0=Y[Q++],B0=[],E0;for(C0=0;C0>4],E0.huffmanTableAC=S0[z0&15],B0.push(E0)}var V0=Y[Q++],pe=Y[Q++],q0=Y[Q++],K0=z(Y,Q,l0,B0,c0,V0,pe,q0>>4,q0&15);Q+=K0;break;default:if(Y[Q-3]==255&&Y[Q-2]>=192&&Y[Q-2]<=254){Q-=3;break}throw"unknown JPEG marker "+T0.toString(16)}T0=G()}switch(this.width=l0.samplesPerLine,this.height=l0.scanLines,this.jfif=f,this.adobe=o0,this.components=[],l0.components.length){case 1:this.colorspace=u.Grayscale;break;case 3:this.adobe?this.colorspace=u.AdobeRGB:this.colorspace=u.RGB;break;case 4:this.colorspace=u.CYMK;break;default:this.colorspace=u.Unknown}for(var C0=0;C0>24&255,O0>>16&255,O0>>8&255,O0&255);w("Unsupported header type "+O0+" ("+V0+")");break}E0&&(x0+=B0)}},parseImageProperties:function(M0){for(var se=M0.getByte();se>=0;){var x0=se;se=M0.getByte();var R0=x0<<8|se;if(R0===65361){M0.skip(4);var me=M0.getInt32()>>>0,N0=M0.getInt32()>>>0,O0=M0.getInt32()>>>0,B0=M0.getInt32()>>>0;M0.skip(16);var E0=M0.getUint16();this.width=me-O0,this.height=N0-B0,this.componentsCount=E0,this.bitsPerComponent=8;return}}throw new Error("JPX Error: No size marker found in JPX stream")},parseCodestream:function(M0,se,x0){var R0={};try{for(var me=!1,N0=se;N0+1>5,z0=[];E0>3,ue.mu=0):(ue.epsilon=M0[E0]>>3,ue.mu=(M0[E0]&7)<<8|M0[E0+1],E0+=2),z0.push(ue)}oe.SPqcds=z0,R0.mainHeader?R0.QCD=oe:(R0.currentTile.QCD=oe,R0.currentTile.QCC=[]);break;case 65373:B0=q(M0,N0);var D0={};E0=N0+2;var b0;switch(R0.SIZ.Csiz<257?b0=M0[E0++]:(b0=q(M0,E0),E0+=2),j0=M0[E0++],j0&31){case 0:V0=8,pe=!0;break;case 1:V0=16,pe=!1;break;case 2:V0=16,pe=!0;break;default:throw new Error("JPX Error: Invalid SQcd value "+j0)}for(D0.noQuantization=V0===8,D0.scalarExpounded=pe,D0.guardBits=j0>>5,z0=[];E0>3,ue.mu=0):(ue.epsilon=M0[E0]>>3,ue.mu=(M0[E0]&7)<<8|M0[E0+1],E0+=2),z0.push(ue);D0.SPqcds=z0,R0.mainHeader?R0.QCC[b0]=D0:R0.currentTile.QCC[b0]=D0;break;case 65362:B0=q(M0,N0);var n0={};E0=N0+2;var h0=M0[E0++];n0.entropyCoderWithCustomPrecincts=!!(h0&1),n0.sopMarkerUsed=!!(h0&2),n0.ephMarkerUsed=!!(h0&4),n0.progressionOrder=M0[E0++],n0.layersCount=q(M0,E0),E0+=2,n0.multipleComponentTransform=M0[E0++],n0.decompositionLevelsCount=M0[E0++],n0.xcb=(M0[E0++]&15)+2,n0.ycb=(M0[E0++]&15)+2;var Fe=M0[E0++];if(n0.selectiveArithmeticCodingBypass=!!(Fe&1),n0.resetContextProbabilities=!!(Fe&2),n0.terminationOnEachCodingPass=!!(Fe&4),n0.verticalyStripe=!!(Fe&8),n0.predictableTermination=!!(Fe&16),n0.segmentationSymbolUsed=!!(Fe&32),n0.reversibleTransformation=M0[E0++],n0.entropyCoderWithCustomPrecincts){for(var u0=[];E0>4})}n0.precinctsSizes=u0}var L0=[];if(n0.selectiveArithmeticCodingBypass&&L0.push("selectiveArithmeticCodingBypass"),n0.resetContextProbabilities&&L0.push("resetContextProbabilities"),n0.terminationOnEachCodingPass&&L0.push("terminationOnEachCodingPass"),n0.verticalyStripe&&L0.push("verticalyStripe"),n0.predictableTermination&&L0.push("predictableTermination"),L0.length>0)throw me=!0,new Error("JPX Error: Unsupported COD options ("+L0.join(", ")+")");R0.mainHeader?R0.COD=n0:(R0.currentTile.COD=n0,R0.currentTile.COC=[]);break;case 65424:B0=q(M0,N0),q0={},q0.index=q(M0,N0+2),q0.length=z(M0,N0+4),q0.dataEnd=q0.length+N0-2,q0.partIndex=M0[N0+8],q0.partsCount=M0[N0+9],R0.mainHeader=!1,q0.partIndex===0&&(q0.COD=R0.COD,q0.COC=R0.COC.slice(0),q0.QCD=R0.QCD,q0.QCC=R0.QCC.slice(0)),R0.currentTile=q0;break;case 65427:q0=R0.currentTile,q0.partIndex===0&&(Le(R0,q0.index),ie(R0)),B0=q0.dataEnd-N0,ke(R0,M0,N0,B0);break;case 65365:case 65367:case 65368:case 65380:B0=q(M0,N0);break;case 65363:throw new Error("JPX Error: Codestream code 0xFF53 (COC) is not implemented");default:throw new Error("JPX Error: Unknown codestream code: "+O0.toString(16))}N0+=B0}}catch(Ye){if(me||this.failOnCorruptedImage)throw Ye;w("Trying to recover from "+Ye.message)}this.tiles=I0(R0),this.width=R0.SIZ.Xsiz-R0.SIZ.XOsiz,this.height=R0.SIZ.Ysiz-R0.SIZ.YOsiz,this.componentsCount=R0.SIZ.Csiz}};function i0(Z0,M0){Z0.x0=Math.ceil(M0.XOsiz/Z0.XRsiz),Z0.x1=Math.ceil(M0.Xsiz/Z0.XRsiz),Z0.y0=Math.ceil(M0.YOsiz/Z0.YRsiz),Z0.y1=Math.ceil(M0.Ysiz/Z0.YRsiz),Z0.width=Z0.x1-Z0.x0,Z0.height=Z0.y1-Z0.y0}function Q(Z0,M0){for(var se=Z0.SIZ,x0,R0=[],me=Math.ceil((se.Xsiz-se.XTOsiz)/se.XTsiz),N0=Math.ceil((se.Ysiz-se.YTOsiz)/se.YTsiz),O0=0;O00?Math.min(x0.xcb,R0.PPx-1):Math.min(x0.xcb,R0.PPx),R0.ycb_=se>0?Math.min(x0.ycb,R0.PPy-1):Math.min(x0.ycb,R0.PPy),R0}function o0(Z0,M0,se){var x0=1<M0.trx0?Math.ceil(M0.trx1/x0)-Math.floor(M0.trx0/x0):0,E0=M0.try1>M0.try0?Math.ceil(M0.try1/R0)-Math.floor(M0.try0/R0):0,j0=B0*E0;M0.precinctParameters={precinctWidth:x0,precinctHeight:R0,numprecinctswide:B0,numprecinctshigh:E0,numprecincts:j0,precinctWidthInSubband:N0,precinctHeightInSubband:O0}}function l0(Z0,M0,se){var x0=se.xcb_,R0=se.ycb_,me=1<>x0,B0=M0.tby0>>R0,E0=M0.tbx1+me-1>>x0,j0=M0.tby1+N0-1>>R0,z0=M0.resolution.precinctParameters,V0=[],pe=[],q0,K0,W,U0;for(K0=B0;K0oe.cbxMax&&(oe.cbxMax=q0),K0oe.cbyMax&&(oe.cbyMax=K0)):pe[U0]=oe={cbxMin:q0,cbyMin:K0,cbxMax:q0,cbyMax:K0},W.precinct=oe}}M0.codeblockParameters={codeblockWidth:x0,codeblockHeight:R0,numcodeblockwide:E0-O0+1,numcodeblockhigh:j0-B0+1},M0.codeblocks=V0,M0.precincts=pe}function c0(Z0,M0,se){for(var x0=[],R0=Z0.subbands,me=0,N0=R0.length;mepe.codingStyleParameters.decompositionLevelsCount)){for(var q0=pe.resolutions[E0],K0=q0.precinctParameters.numprecincts;z0pe.codingStyleParameters.decompositionLevelsCount)){for(var q0=pe.resolutions[B0],K0=q0.precinctParameters.numprecincts;z0W.codingStyleParameters.decompositionLevelsCount)){var U0=W.resolutions[O0],X0=U0.precinctParameters.numprecincts;if(!(E0>=X0)){for(;N0=0;--W){var U0=B0.resolutions[W],X0=K0*U0.precinctParameters.precinctWidth,Q0=K0*U0.precinctParameters.precinctHeight;z0=Math.min(z0,X0),V0=Math.min(V0,Q0),pe=Math.max(pe,U0.precinctParameters.numprecinctswide),q0=Math.max(q0,U0.precinctParameters.numprecinctshigh),j0[W]={width:X0,height:Q0},K0<<=1}se=Math.min(se,z0),x0=Math.min(x0,V0),R0=Math.max(R0,pe),me=Math.max(me,q0),N0[O0]={resolutions:j0,minWidth:z0,minHeight:V0,maxNumWide:pe,maxNumHigh:q0}}return{components:N0,minWidth:se,minHeight:x0,maxNumWide:R0,maxNumHigh:me}}function ie(Z0){for(var M0=Z0.SIZ,se=Z0.currentTile.index,x0=Z0.tiles[se],R0=M0.Csiz,me=0;me=M0.length)throw new Error("Unexpected EOF");var we=M0[se+R0];R0++,O0?(me=me<<7|we,N0+=7,O0=!1):(me=me<<8|we,N0+=8),we===255&&(O0=!0)}return N0-=m0,me>>>N0&(1<=M0.length)return;if(Ye.isAboveThreshold())break;if(Ye.isKnown()){Ye.nextLevel();continue}if(B0(1))if(Ye.setKnown(),Ye.isLeaf()){ue.included=!0,u0=Me=!0;break}else Ye.nextLevel();else Ye.incrementValue()}}if(u0){if(Me){for(W0=n0.zeroBitPlanesTree,W0.reset(h0,Fe);;){if(R0>=M0.length)return;if(B0(1)){if(L0=!W0.nextLevel(),L0)break}else W0.incrementValue()}ue.zeroBitPlanes=W0.value}for(var y0=V0();B0(1);)ue.Lblock++;var $=N(y0),J0=(y0<1<<$?$-1:$)+ue.Lblock,p0=B0(J0);oe.push({codeblock:ue,codingpasses:y0,dataLength:p0})}}for(z0(),W&&E0(146);oe.length>0;){var k0=oe.shift();ue=k0.codeblock,ue.data===void 0&&(ue.data=[]),ue.data.push({data:M0,start:se+R0,end:se+R0+k0.dataLength,codingpasses:k0.codingpasses}),R0+=k0.dataLength}}catch{return}return R0}function Ne(Z0,M0,se,x0,R0,me,N0,O0){for(var B0=x0.tbx0,E0=x0.tby0,j0=x0.tbx1-x0.tbx0,z0=x0.codeblocks,V0=x0.type.charAt(0)==="H"?1:0,pe=x0.type.charAt(1)==="H"?M0:0,q0=0,K0=z0.length;q0=me?Z0[Ue]=p0:Z0[Ue]=p0*(1<0?1-W:0));var h0=U0.subbands[ue],Fe=G[h0.type],u0=V0?1:Math.pow(2,z0+Fe-n0)*(1+b0/2048),Me=E0+n0-1;Ne(oe,X0,Q0,h0,u0,Me,V0,j0)}q0.push({width:X0,height:Q0,items:oe})}var L0=pe.calculate(q0,x0.tcx0,x0.tcy0);return{left:x0.tcx0,top:x0.tcy0,width:L0.width,height:L0.height,items:L0.items}}function I0(Z0){for(var M0=Z0.SIZ,se=Z0.components,x0=M0.Csiz,R0=[],me=0,N0=Z0.tiles.length;me>2),h0=Fe+n0,u0=Fe+b0,V0[Q0++]=h0<=0?0:h0>=W?255:h0>>q0,V0[Q0++]=Fe<=0?0:Fe>=W?255:Fe>>q0,V0[Q0++]=u0<=0?0:u0>=W?255:u0>>q0;else for(oe=0;oe=W?255:h0>>q0,V0[Q0++]=Fe<=0?0:Fe>=W?255:Fe>>q0,V0[Q0++]=u0<=0?0:u0>=W?255:u0>>q0;if(Ye)for(oe=0,Q0=3;oe=X0?255:Me+K0>>q0}else for(E0=0;E0=W?255:L0+K0>>q0,Q0+=x0}else{var z0=se[E0].isSigned,p0=B0[E0].items;if(z0)for(Q0=E0,oe=0,ue=p0.length;oe>=1,R0>>=1,me++}me--,O0=this.levels[me],O0.items[O0.index]=N0,this.currentLevel=me,delete this.value},incrementValue:function(){var x0=this.levels[this.currentLevel];x0.items[x0.index]++},nextLevel:function(){var x0=this.currentLevel,R0=this.levels[x0],me=R0.items[R0.index];return x0--,x0<0?(this.value=me,!1):(this.currentLevel=x0,R0=this.levels[x0],R0.items[R0.index]=me,!0)}},M0}(),ii=function(){function M0(se,x0){var R0=N(Math.max(se,x0))+1;this.levels=[];for(var me=0;me>=1,R0>>=1,N0++}this.currentLevel=this.levels.length-1,this.minValue=this.levels[this.currentLevel].items[0]},incrementValue:function(){var x0=this.levels[this.currentLevel];x0.items[x0.index]=x0.items[x0.index]+1,x0.items[x0.index]>this.minValue&&(this.minValue=x0.items[x0.index])},nextLevel:function(){var x0=this.currentLevel;if(x0--,x0<0)return!1;this.currentLevel=x0;var R0=this.levels[x0];return R0.items[R0.index]this.minValue&&(this.minValue=R0.items[R0.index]),!0},isLeaf:function(){return this.currentLevel===0},isAboveThreshold:function(){var x0=this.currentLevel,R0=this.levels[x0];return R0.items[R0.index]>this.currentStopValue},isKnown:function(){var x0=this.currentLevel,R0=this.levels[x0];return R0.status[R0.index]>0},setKnown:function(){var x0=this.currentLevel,R0=this.levels[x0];R0.status[R0.index]=1}},M0}(),oi=function(){var M0=17,se=18,x0=new Uint8Array([0,5,8,0,3,7,8,0,4,7,8,0,0,0,0,0,1,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8,0,0,0,0,0,2,6,8,0,3,7,8,0,4,7,8]),R0=new Uint8Array([0,3,4,0,5,7,7,0,8,8,8,0,0,0,0,0,1,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8,0,0,0,0,0,2,3,4,0,6,7,7,0,8,8,8]),me=new Uint8Array([0,1,2,0,1,2,2,0,2,2,2,0,0,0,0,0,3,4,5,0,4,5,5,0,5,5,5,0,0,0,0,0,6,7,7,0,7,7,7,0,7,7,7,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8,0,0,0,0,0,8,8,8,0,8,8,8,0,8,8,8]);function N0(O0,B0,E0,j0,z0){this.width=O0,this.height=B0,this.contextLabelTable=E0==="HH"?me:E0==="HL"?R0:x0;var V0=O0*B0;this.neighborsSignificance=new Uint8Array(V0),this.coefficentsSign=new Uint8Array(V0),this.coefficentsMagnitude=z0>14?new Uint32Array(V0):z0>6?new Uint16Array(V0):new Uint8Array(V0),this.processingFlags=new Uint8Array(V0);var pe=new Uint8Array(V0);if(j0!==0)for(var q0=0;q00,K0=E0+10&&(W=j0-V0,q0&&(z0[W-1]+=16),K0&&(z0[W+1]+=16),z0[W]+=4),B0+1=j0)break;if(q0[b0]&=X0,!(z0[b0]||!pe[b0])){var Fe=W[pe[b0]],u0=B0.readBit(K0,Fe);if(u0){var Me=this.decodeSignBit(h0,D0,b0);V0[b0]=Me,z0[b0]=1,this.setNeighborsSignificance(h0,D0,b0),q0[b0]|=oe}U0[b0]++,q0[b0]|=Q0}}},decodeSignBit:function(B0,E0,j0){var z0=this.width,V0=this.height,pe=this.coefficentsMagnitude,q0=this.coefficentsSign,K0,W,U0,X0,Q0,oe;X0=E0>0&&pe[j0-1]!==0,E0+10&&pe[j0-z0]!==0,B0+1=0?(Q0=9+K0,oe=this.decoder.readBit(this.contexts,Q0)):(Q0=9-K0,oe=this.decoder.readBit(this.contexts,Q0)^1),oe},runMagnitudeRefinementPass:function(){for(var B0=this.decoder,E0=this.width,j0=this.height,z0=this.coefficentsMagnitude,V0=this.neighborsSignificance,pe=this.contexts,q0=this.bitsDecoded,K0=this.processingFlags,W=1,U0=2,X0=E0*j0,Q0=E0*4,oe=0,ue;oe>1;R0=R0|0;var O0,B0,E0,j0,z0=-1.586134342059924,V0=-.052980118572961,pe=.882911075530934,q0=.443506852043971,K0=1.230174104914001,W=1/K0;for(O0=R0-3,B0=N0+4;B0--;O0+=2)x0[O0]*=W;for(O0=R0-2,E0=q0*x0[O0-1],B0=N0+3;B0--&&(j0=q0*x0[O0+1],x0[O0]=K0*x0[O0]-E0-j0,B0--);O0+=2)O0+=2,E0=q0*x0[O0+1],x0[O0]=K0*x0[O0]-E0-j0;for(O0=R0-1,E0=pe*x0[O0-1],B0=N0+2;B0--&&(j0=pe*x0[O0+1],x0[O0]-=E0+j0,B0--);O0+=2)O0+=2,E0=pe*x0[O0+1],x0[O0]-=E0+j0;for(O0=R0,E0=V0*x0[O0-1],B0=N0+1;B0--&&(j0=V0*x0[O0+1],x0[O0]-=E0+j0,B0--);O0+=2)O0+=2,E0=V0*x0[O0+1],x0[O0]-=E0+j0;if(N0!==0)for(O0=R0+1,E0=z0*x0[O0-1],B0=N0;B0--&&(j0=z0*x0[O0+1],x0[O0]-=E0+j0,B0--);O0+=2)O0+=2,E0=z0*x0[O0+1],x0[O0]-=E0+j0},M0}(),qe=function(){function M0(){ei.call(this)}return M0.prototype=Object.create(ei.prototype),M0.prototype.filter=function(x0,R0,me){var N0=me>>1;R0=R0|0;var O0,B0;for(O0=R0,B0=N0+1;B0--;O0+=2)x0[O0]-=x0[O0-1]+x0[O0+1]+2>>2;for(O0=R0+1,B0=N0;B0--;O0+=2)x0[O0]+=x0[O0-1]+x0[O0+1]>>1},M0}();return J}(),m=function(){var G=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:9217,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0},{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];function J(i0,Q,f){this.data=i0,this.bp=Q,this.dataEnd=f,this.chigh=i0[Q],this.clow=0,this.byteIn(),this.chigh=this.chigh<<7&65535|this.clow>>9&127,this.clow=this.clow<<7&65535,this.ct-=7,this.a=32768}return J.prototype={byteIn:function(){var Q=this.data,f=this.bp;if(Q[f]===255){var o0=Q[f+1];o0>143?(this.clow+=65280,this.ct=8):(f++,this.clow+=Q[f]<<9,this.ct=7,this.bp=f)}else f++,this.clow+=f65535&&(this.chigh+=this.clow>>16,this.clow&=65535)},readBit:function(Q,f){var o0=Q[f]>>1,l0=Q[f]&1,c0=G[o0],d0=c0.qe,S0,g0=this.a-d0;if(this.chigh>15&1,this.clow=this.clow<<1&65535,this.ct--;while(!(g0&32768));return this.a=g0,Q[f]=o0<<1|l0,S0}},J}(),A=typeof window>"u"?commonjsGlobal:window;A.PDFJS||(A.PDFJS={});var S=S||{};S.VERBOSITY_LEVELS={errors:0,warnings:1,infos:5},S.OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91};function v(Y){S.verbosity>=S.VERBOSITY_LEVELS.infos&&console.log("Info: "+Y)}function w(Y){S.verbosity>=S.VERBOSITY_LEVELS.warnings&&console.log("Warning: "+Y)}S.UNSUPPORTED_FEATURES={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"},S.UnsupportedManager=function(){var G=[];return{listen:function(J){G.push(J)},notify:function(J){w('Unsupported feature "'+J+'"');for(var i0=0,Q=G.length;i0G;)G<<=1,J++;return J}function q(Y,G){return Y[G]<<8|Y[G+1]}function z(Y,G){return(Y[G]<<24|Y[G+1]<<16|Y[G+2]<<8|Y[G+3])>>>0}function e0(){var Y=new Uint8Array(2);Y[0]=1;var G=new Uint16Array(Y.buffer);return G[0]===1}Object.defineProperty(S,"isLittleEndian",{configurable:!0,get:function(){return R(S,"isLittleEndian",e0())}});function H(){var Y=document.createElement("canvas");Y.width=Y.height=1;var G=Y.getContext("2d"),J=G.createImageData(1,1);return typeof J.data.buffer<"u"}Object.defineProperty(S,"hasCanvasTypedArrays",{configurable:!0,get:function(){return R(S,"hasCanvasTypedArrays",H())}});var j=S.Util=function(){function G(){}var J=["rgb(",0,",",0,",",0,")"];return G.makeCssRgb=function(Q,f,o0){return J[1]=Q,J[3]=f,J[5]=o0,J.join("")},G.transform=function(Q,f){return[Q[0]*f[0]+Q[2]*f[1],Q[1]*f[0]+Q[3]*f[1],Q[0]*f[2]+Q[2]*f[3],Q[1]*f[2]+Q[3]*f[3],Q[0]*f[4]+Q[2]*f[5]+Q[4],Q[1]*f[4]+Q[3]*f[5]+Q[5]]},G.applyTransform=function(Q,f){var o0=Q[0]*f[0]+Q[1]*f[2]+f[4],l0=Q[0]*f[1]+Q[1]*f[3]+f[5];return[o0,l0]},G.applyInverseTransform=function(Q,f){var o0=f[0]*f[3]-f[1]*f[2],l0=(Q[0]*f[3]-Q[1]*f[2]+f[2]*f[5]-f[4]*f[3])/o0,c0=(-Q[0]*f[1]+Q[1]*f[0]+f[4]*f[1]-f[5]*f[0])/o0;return[l0,c0]},G.getAxialAlignedBoundingBox=function(Q,f){var o0=G.applyTransform(Q,f),l0=G.applyTransform(Q.slice(2,4),f),c0=G.applyTransform([Q[0],Q[3]],f),d0=G.applyTransform([Q[2],Q[1]],f);return[Math.min(o0[0],l0[0],c0[0],d0[0]),Math.min(o0[1],l0[1],c0[1],d0[1]),Math.max(o0[0],l0[0],c0[0],d0[0]),Math.max(o0[1],l0[1],c0[1],d0[1])]},G.inverseTransform=function(Q){var f=Q[0]*Q[3]-Q[1]*Q[2];return[Q[3]/f,-Q[1]/f,-Q[2]/f,Q[0]/f,(Q[2]*Q[5]-Q[4]*Q[3])/f,(Q[4]*Q[1]-Q[5]*Q[0])/f]},G.apply3dTransform=function(Q,f){return[Q[0]*f[0]+Q[1]*f[1]+Q[2]*f[2],Q[3]*f[0]+Q[4]*f[1]+Q[5]*f[2],Q[6]*f[0]+Q[7]*f[1]+Q[8]*f[2]]},G.singularValueDecompose2dScale=function(Q){var f=[Q[0],Q[2],Q[1],Q[3]],o0=Q[0]*f[0]+Q[1]*f[2],l0=Q[0]*f[1]+Q[1]*f[3],c0=Q[2]*f[0]+Q[3]*f[2],d0=Q[2]*f[1]+Q[3]*f[3],S0=(o0+d0)/2,g0=Math.sqrt((o0+d0)*(o0+d0)-4*(o0*d0-c0*l0))/2,T0=S0+g0||1,C0=S0-g0||1;return[Math.sqrt(T0),Math.sqrt(C0)]},G.normalizeRect=function(Q){var f=Q.slice(0);return Q[0]>Q[2]&&(f[0]=Q[2],f[2]=Q[0]),Q[1]>Q[3]&&(f[1]=Q[3],f[3]=Q[1]),f},G.intersect=function(Q,f){function o0(S0,g0){return S0-g0}var l0=[Q[0],Q[2],f[0],f[2]].sort(o0),c0=[Q[1],Q[3],f[1],f[3]].sort(o0),d0=[];if(Q=G.normalizeRect(Q),f=G.normalizeRect(f),l0[0]===Q[0]&&l0[1]===f[0]||l0[0]===f[0]&&l0[1]===Q[0])d0[0]=l0[1],d0[2]=l0[2];else return!1;if(c0[0]===Q[1]&&c0[1]===f[1]||c0[0]===f[1]&&c0[1]===Q[1])d0[1]=c0[1],d0[3]=c0[2];else return!1;return d0},G.sign=function(Q){return Q<0?-1:1},G.appendToArray=function(Q,f){Array.prototype.push.apply(Q,f)},G.prependToArray=function(Q,f){Array.prototype.unshift.apply(Q,f)},G.extendObj=function(Q,f){for(var o0 in f)Q[o0]=f[o0]},G.getInheritableProperty=function(Q,f){for(;Q&&!Q.has(f);)Q=Q.get("Parent");return Q?Q.get(f):null},G.inherit=function(Q,f,o0){Q.prototype=Object.create(f.prototype),Q.prototype.constructor=Q;for(var l0 in o0)Q.prototype[l0]=o0[l0]},G.loadScript=function(Q,f){var o0=document.createElement("script"),l0=!1;o0.setAttribute("src",Q),f&&(o0.onload=function(){l0||f(),l0=!0}),document.getElementsByTagName("head")[0].appendChild(o0)},G}();S.PageViewport=function(){function G(J,i0,Q,f,o0,l0){this.viewBox=J,this.scale=i0,this.rotation=Q,this.offsetX=f,this.offsetY=o0;var c0=(J[2]+J[0])/2,d0=(J[3]+J[1])/2,S0,g0,T0,C0;switch(Q=Q%360,Q=Q<0?Q+360:Q,Q){case 180:S0=-1,g0=0,T0=0,C0=1;break;case 90:S0=0,g0=1,T0=1,C0=0;break;case 270:S0=0,g0=-1,T0=-1,C0=0;break;default:S0=1,g0=0,T0=0,C0=-1;break}l0&&(T0=-T0,C0=-C0);var F0,ee,ie,ke;S0===0?(F0=Math.abs(d0-J[1])*i0+f,ee=Math.abs(c0-J[0])*i0+o0,ie=Math.abs(J[3]-J[1])*i0,ke=Math.abs(J[2]-J[0])*i0):(F0=Math.abs(c0-J[0])*i0+f,ee=Math.abs(d0-J[1])*i0+o0,ie=Math.abs(J[2]-J[0])*i0,ke=Math.abs(J[3]-J[1])*i0),this.transform=[S0*i0,g0*i0,T0*i0,C0*i0,F0-S0*i0*c0-T0*i0*d0,ee-g0*i0*c0-C0*i0*d0],this.width=ie,this.height=ke,this.fontScale=i0}return G.prototype={clone:function(i0){i0=i0||{};var Q="scale"in i0?i0.scale:this.scale,f="rotation"in i0?i0.rotation:this.rotation;return new G(this.viewBox.slice(),Q,f,this.offsetX,this.offsetY,i0.dontFlip)},convertToViewportPoint:function(i0,Q){return j.applyTransform([i0,Q],this.transform)},convertToViewportRectangle:function(i0){var Q=j.applyTransform([i0[0],i0[1]],this.transform),f=j.applyTransform([i0[2],i0[3]],this.transform);return[Q[0],Q[1],f[0],f[1]]},convertToPdfPoint:function(i0,Q){return j.applyInverseTransform([i0,Q],this.transform)}},G}();function y(){var Y={};return Y.promise=new Promise(function(G,J){Y.resolve=G,Y.reject=J}),Y}S.createPromiseCapability=y,function(){if(A.Promise){typeof A.Promise.all!="function"&&(A.Promise.all=function(l0){var c0=0,d0=[],S0,g0,T0=new A.Promise(function(C0,F0){S0=C0,g0=F0});return l0.forEach(function(C0,F0){c0++,C0.then(function(ee){d0[F0]=ee,c0--,c0===0&&S0(d0)},g0)}),c0===0&&S0(d0),T0}),typeof A.Promise.resolve!="function"&&(A.Promise.resolve=function(l0){return new A.Promise(function(c0){c0(l0)})}),typeof A.Promise.reject!="function"&&(A.Promise.reject=function(l0){return new A.Promise(function(c0,d0){d0(l0)})}),typeof A.Promise.prototype.catch2!="function"&&(A.Promise.prototype.catch2=function(l0){return A.Promise.prototype.then(void 0,l0)});return}var G=0,J=1,i0=2,Q=500,f={handlers:[],running:!1,unhandledRejections:[],pendingRejectionCheck:!1,scheduleHandlers:function(c0){c0._status!==G&&(this.handlers=this.handlers.concat(c0._handlers),c0._handlers=[],!this.running&&(this.running=!0,setTimeout(this.runHandlers.bind(this),0)))},runHandlers:function(){for(var c0=1,d0=Date.now()+c0;this.handlers.length>0;){var S0=this.handlers.shift(),g0=S0.thisPromise._status,T0=S0.thisPromise._value;try{g0===J?typeof S0.onResolve=="function"&&(T0=S0.onResolve(T0)):typeof S0.onReject=="function"&&(T0=S0.onReject(T0),g0=J,S0.thisPromise._unhandledRejection&&this.removeUnhandeledRejection(S0.thisPromise))}catch(C0){g0=i0,T0=C0}if(S0.nextPromise._updateStatus(g0,T0),Date.now()>=d0)break}if(this.handlers.length>0){setTimeout(this.runHandlers.bind(this),0);return}this.running=!1},addUnhandledRejection:function(c0){this.unhandledRejections.push({promise:c0,time:Date.now()}),this.scheduleRejectionCheck()},removeUnhandeledRejection:function(c0){c0._unhandledRejection=!1;for(var d0=0;d0Q){var g0=this.unhandledRejections[S0].promise._value,T0="Unhandled rejection: "+g0;g0.stack&&(T0+=` +`+g0.stack),w(T0),this.unhandledRejections.splice(S0),S0--}this.unhandledRejections.length&&this.scheduleRejectionCheck()}).bind(this),Q))}};function o0(l0){this._status=G,this._handlers=[];try{l0.call(this,this._resolve.bind(this),this._reject.bind(this))}catch(c0){this._reject(c0)}}o0.all=function(c0){var d0,S0,g0=new o0(function(De,I0){d0=De,S0=I0}),T0=c0.length,C0=[];if(T0===0)return d0(C0),g0;function F0(De){g0._status!==i0&&(C0=[],S0(De))}for(var ee=0,ie=c0.length;ee>2,C0=(d0&3)<<4|S0>>4,F0=l0+1>6:64,ee=l0+2u in T?zp(T,u,{enumerable:!0,config */var CharLS=function(Module){Module=Module||{};var Module;Module||(Module=(typeof CharLS<"u"?CharLS:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof commonjsRequire=="function"&&!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(u){process.stdout.write(u+` `)}),Module.printErr||(Module.printErr=function(u){process.stderr.write(u+` `)});var nodeFS=require$$1,nodePath=require$$1;Module.read=function(u,m){u=nodePath.normalize(u);var A=nodeFS.readFileSync(u);return!A&&u!=nodePath.resolve(u)&&(u=path.join(__dirname,"..","src",u),A=nodeFS.readFileSync(u)),A&&!m&&(A=A.toString()),A},Module.readBinary=function(u){var m=Module.read(u,!0);return m.buffer||(m=new Uint8Array(m)),assert(m.buffer),m},Module.load=function(u){globalEval(read(u))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),module.exports=Module,process.on("uncaughtException",function(T){if(!(T instanceof ExitStatus))throw T}),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr<"u"&&(Module.printErr=printErr),typeof read<"u"?Module.read=read:Module.read=function(){throw"no read() available (jsc?)"},Module.readBinary=function(u){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(u));var m=read(u,"binary");return assert(typeof m=="object"),m},typeof scriptArgs<"u"?Module.arguments=scriptArgs:typeof arguments<"u"&&(Module.arguments=arguments);else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(u){var m=new XMLHttpRequest;return m.open("GET",u,!1),m.send(null),m.responseText},typeof arguments<"u"&&(Module.arguments=arguments),typeof console<"u")Module.print||(Module.print=function(u){console.log(u)}),Module.printErr||(Module.printErr=function(u){console.log(u)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump<"u"?function(T){dump(T)}:function(T){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle>"u"&&(Module.setWindowTitle=function(T){document.title=T})}else throw"Unknown runtime environment. Where are we?";function globalEval(T){eval.call(null,T)}!Module.load&&Module.read&&(Module.load=function(u){globalEval(Module.read(u))}),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(T){tempRet0=T},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(T){STACKTOP=T},getNativeTypeSize:function(T){switch(T){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(T[T.length-1]==="*")return Runtime.QUANTUM_SIZE;if(T[0]==="i"){var u=parseInt(T.substr(1));return assert(u%8===0),u/8}else return 0}}},getNativeFieldSize:function(T){return Math.max(Runtime.getNativeTypeSize(T),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(T,u){return u==="double"||u==="i64"?T&7&&(assert((T&7)===4),T+=4):assert((T&3)===0),T},getAlignSize:function(T,u,m){return!m&&(T=="i64"||T=="double")?8:T?Math.min(u||(T?Runtime.getNativeFieldSize(T):0),Runtime.QUANTUM_SIZE):Math.min(u,8)},dynCall:function(T,u,m){return m&&m.length?(m.splice||(m=Array.prototype.slice.call(m)),m.splice(0,0,u),Module["dynCall_"+T].apply(null,m)):Module["dynCall_"+T].call(null,u)},functionPointers:[],addFunction:function(T){for(var u=0;u=TOTAL_MEMORY){var m=enlargeMemory();if(!m)return DYNAMICTOP=u,0}return u},alignMemory:function(T,u){var m=T=Math.ceil(T/(u||16))*(u||16);return m},makeBigInt:function(T,u,m){var A=m?+(T>>>0)+ +(u>>>0)*4294967296:+(T>>>0)+ +(u|0)*4294967296;return A},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=!1,tempDouble,tempI64,tempRet0;function assert(T,u){T||abort("Assertion failed: "+u)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(T){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}var cwrap,ccall;(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(T){var u=Runtime.stackAlloc(T.length);return writeArrayToMemory(T,u),u},stringToC:function(T){var u=0;return T!=null&&T!==0&&(u=Runtime.stackAlloc((T.length<<2)+1),writeStringToMemory(T,u)),u}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(u,m,A,S,v){var w=getCFunc(u),D=[],R=0;if(S)for(var L=0;L>0]=u;break;case"i8":HEAP8[T>>0]=u;break;case"i16":HEAP16[T>>1]=u;break;case"i32":HEAP32[T>>2]=u;break;case"i64":tempI64=[u>>>0,(tempDouble=u,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[T>>2]=tempI64[0],HEAP32[T+4>>2]=tempI64[1];break;case"float":HEAPF32[T>>2]=u;break;case"double":HEAPF64[T>>3]=u;break;default:abort("invalid type for setValue: "+m)}}Module.setValue=setValue;function getValue(T,u,m){switch(u=u||"i8",u.charAt(u.length-1)==="*"&&(u="i32"),u){case"i1":return HEAP8[T>>0];case"i8":return HEAP8[T>>0];case"i16":return HEAP16[T>>1];case"i32":return HEAP32[T>>2];case"i64":return HEAP32[T>>2];case"float":return HEAPF32[T>>2];case"double":return HEAPF64[T>>3];default:abort("invalid type for setValue: "+u)}return null}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;function allocate(T,u,m,A){var S,v;typeof T=="number"?(S=!0,v=T):(S=!1,v=T.length);var w=typeof u=="string"?u:null,D;if(m==ALLOC_NONE?D=A:D=[_malloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][m===void 0?ALLOC_STATIC:m](Math.max(v,w?1:u.length)),S){var A=D,R;for(assert((D&3)==0),R=D+(v&-4);A>2]=0;for(R=D+v;A>0]=0;return D}if(w==="i8")return T.subarray||T.slice?HEAPU8.set(T,D):HEAPU8.set(new Uint8Array(T),D),D;for(var L=0,P,d,E;L>0],m|=A,!(A==0&&!u||(S++,u&&S==u)););u||(u=S);var v="";if(m<128){for(var w=1024,D;u>0;)D=String.fromCharCode.apply(String,HEAPU8.subarray(T,T+Math.min(u,w))),v=v?v+D:D,T+=w,u-=w;return v}return Module.UTF8ToString(T)}Module.Pointer_stringify=Pointer_stringify;function AsciiToString(T){for(var u="";;){var m=HEAP8[T++>>0];if(!m)return u;u+=String.fromCharCode(m)}}Module.AsciiToString=AsciiToString;function stringToAscii(T,u){return writeAsciiToMemory(T,u,!1)}Module.stringToAscii=stringToAscii;function UTF8ArrayToString(T,u){for(var m,A,S,v,w,D,R="";;){if(m=T[u++],!m)return R;if(!(m&128)){R+=String.fromCharCode(m);continue}if(A=T[u++]&63,(m&224)==192){R+=String.fromCharCode((m&31)<<6|A);continue}if(S=T[u++]&63,(m&240)==224?m=(m&15)<<12|A<<6|S:(v=T[u++]&63,(m&248)==240?m=(m&7)<<18|A<<12|S<<6|v:(w=T[u++]&63,(m&252)==248?m=(m&3)<<24|A<<18|S<<12|v<<6|w:(D=T[u++]&63,m=(m&1)<<30|A<<24|S<<18|v<<12|w<<6|D))),m<65536)R+=String.fromCharCode(m);else{var L=m-65536;R+=String.fromCharCode(55296|L>>10,56320|L&1023)}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(T){return UTF8ArrayToString(HEAPU8,T)}Module.UTF8ToString=UTF8ToString;function stringToUTF8Array(T,u,m,A){if(!(A>0))return 0;for(var S=m,v=m+A-1,w=0;w=55296&&D<=57343&&(D=65536+((D&1023)<<10)|T.charCodeAt(++w)&1023),D<=127){if(m>=v)break;u[m++]=D}else if(D<=2047){if(m+1>=v)break;u[m++]=192|D>>6,u[m++]=128|D&63}else if(D<=65535){if(m+2>=v)break;u[m++]=224|D>>12,u[m++]=128|D>>6&63,u[m++]=128|D&63}else if(D<=2097151){if(m+3>=v)break;u[m++]=240|D>>18,u[m++]=128|D>>12&63,u[m++]=128|D>>6&63,u[m++]=128|D&63}else if(D<=67108863){if(m+4>=v)break;u[m++]=248|D>>24,u[m++]=128|D>>18&63,u[m++]=128|D>>12&63,u[m++]=128|D>>6&63,u[m++]=128|D&63}else{if(m+5>=v)break;u[m++]=252|D>>30,u[m++]=128|D>>24&63,u[m++]=128|D>>18&63,u[m++]=128|D>>12&63,u[m++]=128|D>>6&63,u[m++]=128|D&63}}return u[m]=0,m-S}Module.stringToUTF8Array=stringToUTF8Array;function stringToUTF8(T,u,m){return stringToUTF8Array(T,HEAPU8,u,m)}Module.stringToUTF8=stringToUTF8;function lengthBytesUTF8(T){for(var u=0,m=0;m=55296&&A<=57343&&(A=65536+((A&1023)<<10)|T.charCodeAt(++m)&1023),A<=127?++u:A<=2047?u+=2:A<=65535?u+=3:A<=2097151?u+=4:A<=67108863?u+=5:u+=6}return u}Module.lengthBytesUTF8=lengthBytesUTF8;function UTF16ToString(T){for(var u=0,m="";;){var A=HEAP16[T+u*2>>1];if(A==0)return m;++u,m+=String.fromCharCode(A)}}Module.UTF16ToString=UTF16ToString;function stringToUTF16(T,u,m){if(m===void 0&&(m=2147483647),m<2)return 0;m-=2;for(var A=u,S=m>1]=w,u+=2}return HEAP16[u>>1]=0,u-A}Module.stringToUTF16=stringToUTF16;function lengthBytesUTF16(T){return T.length*2}Module.lengthBytesUTF16=lengthBytesUTF16;function UTF32ToString(T){for(var u=0,m="";;){var A=HEAP32[T+u*4>>2];if(A==0)return m;if(++u,A>=65536){var S=A-65536;m+=String.fromCharCode(55296|S>>10,56320|S&1023)}else m+=String.fromCharCode(A)}}Module.UTF32ToString=UTF32ToString;function stringToUTF32(T,u,m){if(m===void 0&&(m=2147483647),m<4)return 0;for(var A=u,S=A+m-4,v=0;v=55296&&w<=57343){var D=T.charCodeAt(++v);w=65536+((w&1023)<<10)|D&1023}if(HEAP32[u>>2]=w,u+=4,u+4>S)break}return HEAP32[u>>2]=0,u-A}Module.stringToUTF32=stringToUTF32;function lengthBytesUTF32(T){for(var u=0,m=0;m=55296&&A<=57343&&++m,u+=4}return u}Module.lengthBytesUTF32=lengthBytesUTF32;function demangle(T){var u=!!Module.___cxa_demangle;if(u)try{var m=_malloc(T.length);writeStringToMemory(T.substr(1),m);var A=_malloc(4),S=Module.___cxa_demangle(m,0,0,A);if(getValue(A,"i32")===0&&S)return Pointer_stringify(S)}catch{}finally{m&&_free(m),A&&_free(A),S&&_free(S)}var v=3,w={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:"..."},D=[],R=!0;function L(){v++,T[v]==="K"&&v++;for(var E=[];T[v]!=="E";){if(T[v]==="S"){v++;var e=T.indexOf("_",v),N=T.substring(v,e)||0;E.push(D[N]||"?"),v=e+1;continue}if(T[v]==="C"){E.push(E[E.length-1]),v+=2;continue}var q=parseInt(T.substr(v)),z=q.toString().length;if(!q||!z){v--;break}var e0=T.substr(v+z,q);E.push(e0),D.push(e0),v+=z+q}return v++,E}function P(E,e,N){e=e||1/0;var q="",z=[];function e0(){return"("+z.join(", ")+")"}var H;if(T[v]==="N"){if(H=L().join("::"),e--,e===0)return E?[H]:H}else{(T[v]==="K"||R&&T[v]==="L")&&v++;var j=parseInt(T.substr(v));if(j){var y=j.toString().length;H=T.substr(v+y,j),v+=y+j}}if(R=!1,T[v]==="I"){v++;var Y=P(!0),G=P(!0,1,!0);q+=G[0]+" "+H+"<"+Y.join(", ")+">"}else q=H;e:for(;v0;){var J=T[v++];if(J in w)z.push(w[J]);else switch(J){case"P":z.push(P(!0,1,!0)[0]+"*");break;case"R":z.push(P(!0,1,!0)[0]+"&");break;case"L":{v++;var i0=T.indexOf("E",v),j=i0-v;z.push(T.substr(v,j)),v+=j+2;break}case"A":{var j=parseInt(T.substr(v));if(v+=j.toString().length,T[v]!=="_")throw"?";v++,z.push(P(!0,1,!0)[0]+" ["+j+"]");break}case"E":break e;default:q+="?"+J;break e}}return!N&&z.length===1&&z[0]==="void"&&(z=[]),E?(q&&z.push(q+"?"),z):q+e0()}var d=T;try{if(T=="Object._main"||T=="_main")return"main()";if(typeof T=="number"&&(T=Pointer_stringify(T)),T[0]!=="_"||T[1]!=="_"||T[2]!=="Z")return T;switch(T[3]){case"n":return"operator new()";case"d":return"operator delete()"}d=P()}catch{d+="?"}return d.indexOf("?")>=0&&!u&&Runtime.warnOnce("warning: a problem occurred in builtin C++ name demangling; build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),d}function demangleAll(T){return T.replace(/__Z[\w\d_]+/g,function(u){var m=demangle(u);return u===m?u:u+" ["+m+"]"})}function jsStackTrace(){var T=new Error;if(!T.stack){try{throw new Error(0)}catch(u){T=u}if(!T.stack)return"(no stack trace available)"}return T.stack.toString()}function stackTrace(){return demangleAll(jsStackTrace())}Module.stackTrace=stackTrace;var PAGE_SIZE=4096;function alignMemoryPage(T){return T%4096>0&&(T+=4096-T%4096),T}var 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;function enlargeMemory(){var T=Math.pow(2,31);if(DYNAMICTOP>=T)return!1;for(;TOTAL_MEMORY<=DYNAMICTOP;)if(TOTAL_MEMORY=T)return!1;try{if(ArrayBuffer.transfer)buffer=ArrayBuffer.transfer(buffer,TOTAL_MEMORY);else{var m=HEAP8;buffer=new ArrayBuffer(TOTAL_MEMORY)}}catch{return!1}var A=_emscripten_replace_memory(buffer);return A?(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(m),!0):!1}var byteLength;try{byteLength=Function.prototype.call.bind(Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get),byteLength(new ArrayBuffer(4))}catch(T){byteLength=function(u){return u.byteLength}}for(var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||16777216,totalMemory=64*1024;totalMemory0;){var u=T.shift();if(typeof u=="function"){u();continue}var m=u.func;typeof m=="number"?u.arg===void 0?Runtime.dynCall("v",m):Runtime.dynCall("vi",m,[u.arg]):m(u.arg===void 0?null:u.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(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__)}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(T){__ATPRERUN__.unshift(T)}Module.addOnPreRun=addOnPreRun;function addOnInit(T){__ATINIT__.unshift(T)}Module.addOnInit=addOnInit;function addOnPreMain(T){__ATMAIN__.unshift(T)}Module.addOnPreMain=addOnPreMain;function addOnExit(T){__ATEXIT__.unshift(T)}Module.addOnExit=addOnExit;function addOnPostRun(T){__ATPOSTRUN__.unshift(T)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(T,u,m){var A=m>0?m:lengthBytesUTF8(T)+1,S=new Array(A),v=stringToUTF8Array(T,S,0,S.length);return u&&(S.length=v),S}Module.intArrayFromString=intArrayFromString;function intArrayToString(T){for(var u=[],m=0;m255&&(A&=255),u.push(String.fromCharCode(A))}return u.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(T,u,m){for(var A=intArrayFromString(T,m),S=0;S>0]=v,S=S+1}}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(T,u){for(var m=0;m>0]=T[m]}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(T,u,m){for(var A=0;A>0]=T.charCodeAt(A);m||(HEAP8[u>>0]=0)}Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function T(u,m){var A=u>>>16,S=u&65535,v=m>>>16,w=m&65535;return S*w+(A*w+S*v<<16)|0}),Math.imul=Math.imul,Math.clz32||(Math.clz32=function(T){T=T>>>0;for(var u=0;u<32;u++)if(T&1<<31-u)return u;return 32}),Math.clz32=Math.clz32;var Math_abs=Math.abs,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_min=Math.min,runDependencies=0,dependenciesFulfilled=null;function addRunDependency(T){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}Module.addRunDependency=addRunDependency;function removeRunDependency(T){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&dependenciesFulfilled){var u=dependenciesFulfilled;dependenciesFulfilled=null,u()}}Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={},STATIC_BASE=8,STATICTOP=STATIC_BASE+59744,__ATINIT__.push({func:function(){__GLOBAL__I_000101()}},{func:function(){__GLOBAL__sub_I_jpegls_cpp()}},{func:function(){}}),allocate([0,0,0,0,0,0,0,0,84,144,0,0,31,194,0,0,216,0,0,0,0,0,0,0,84,144,0,0,237,191,0,0,48,0,0,0,0,0,0,0,44,144,0,0,41,192,0,0,84,144,0,0,55,192,0,0,48,0,0,0,0,0,0,0,84,144,0,0,115,192,0,0,48,0,0,0,0,0,0,0,84,144,0,0,175,192,0,0,152,3,0,0,0,0,0,0,84,144,0,0,241,192,0,0,216,3,0,0,0,0,0,0,84,144,0,0,55,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,95,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,135,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,175,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,216,193,0,0,48,0,0,0,0,0,0,0,84,144,0,0,241,193,0,0,48,0,0,0,0,0,0,0,44,144,0,0,13,194,0,0,84,144,0,0,80,194,0,0,216,0,0,0,0,0,0,0,84,144,0,0,44,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,139,194,0,0,48,0,0,0,0,0,0,0,84,144,0,0,179,194,0,0,48,0,0,0,0,0,0,0,84,144,0,0,219,194,0,0,48,0,0,0,0,0,0,0,84,144,0,0,3,195,0,0,48,0,0,0,0,0,0,0,84,144,0,0,103,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,157,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,211,195,0,0,216,0,0,0,0,0,0,0,84,144,0,0,8,196,0,0,216,0,0,0,0,0,0,0,84,144,0,0,71,196,0,0,216,0,0,0,0,0,0,0,84,144,0,0,138,196,0,0,160,1,0,0,0,0,0,0,44,144,0,0,120,196,0,0,84,144,0,0,187,196,0,0,160,1,0,0,0,0,0,0,84,144,0,0,246,196,0,0,160,1,0,0,0,0,0,0,84,144,0,0,49,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,103,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,157,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,210,197,0,0,160,1,0,0,0,0,0,0,84,144,0,0,17,198,0,0,160,1,0,0,0,0,0,0,84,144,0,0,86,198,0,0,72,3,0,0,0,0,0,0,84,144,0,0,162,198,0,0,56,2,0,0,0,0,0,0,44,144,0,0,182,198,0,0,84,144,0,0,196,198,0,0,56,2,0,0,0,0,0,0,84,144,0,0,112,199,0,0,96,2,0,0,0,0,0,0,44,144,0,0,125,199,0,0,84,144,0,0,138,199,0,0,96,2,0,0,0,0,0,0,44,144,0,0,156,199,0,0,84,144,0,0,169,199,0,0,96,2,0,0,0,0,0,0,84,144,0,0,181,199,0,0,120,2,0,0,0,0,0,0,84,144,0,0,214,199,0,0,144,2,0,0,0,0,0,0,84,144,0,0,28,200,0,0,144,2,0,0,0,0,0,0,84,144,0,0,248,199,0,0,176,2,0,0,0,0,0,0,84,144,0,0,62,200,0,0,160,2,0,0,0,0,0,0,84,144,0,0,99,200,0,0,160,2,0,0,0,0,0,0,84,144,0,0,182,221,0,0,160,3,0,0,0,0,0,0,84,144,0,0,245,221,0,0,160,3,0,0,0,0,0,0,84,144,0,0,13,222,0,0,152,3,0,0,0,0,0,0,84,144,0,0,38,222,0,0,152,3,0,0,0,0,0,0,44,144,0,0,62,222,0,0,84,144,0,0,87,222,0,0,104,2,0,0,0,0,0,0,44,144,0,0,110,222,0,0,84,144,0,0,135,222,0,0,72,3,0,0,0,0,0,0,84,144,0,0,161,222,0,0,56,3,0,0,0,0,0,0,44,144,0,0,187,222,0,0,84,144,0,0,205,222,0,0,112,3,0,0,0,0,0,0,84,144,0,0,247,222,0,0,112,3,0,0,0,0,0,0,44,144,0,0,33,223,0,0,44,144,0,0,82,223,0,0,124,144,0,0,131,223,0,0,0,0,0,0,1,0,0,0,120,3,0,0,3,244,255,255,124,144,0,0,178,223,0,0,0,0,0,0,1,0,0,0,136,3,0,0,3,244,255,255,124,144,0,0,225,223,0,0,0,0,0,0,1,0,0,0,120,3,0,0,3,244,255,255,124,144,0,0,16,224,0,0,0,0,0,0,1,0,0,0,136,3,0,0,3,244,255,255,84,144,0,0,63,224,0,0,80,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,84,144,0,0,187,224,0,0,48,3,0,0,0,0,0,0,124,144,0,0,209,224,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,64,10,0,0,2,0,0,0,124,144,0,0,227,224,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,124,144,0,0,5,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,124,144,0,0,40,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,84,144,0,0,75,225,0,0,144,4,0,0,0,0,0,0,84,144,0,0,109,225,0,0,144,4,0,0,0,0,0,0,124,144,0,0,144,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,72,10,0,0,2,0,0,0,84,144,0,0,178,225,0,0,32,4,0,0,0,0,0,0,84,144,0,0,200,225,0,0,32,4,0,0,0,0,0,0,84,144,0,0,220,225,0,0,32,4,0,0,0,0,0,0,124,144,0,0,240,225,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,64,10,0,0,2,0,0,0,84,144,0,0,2,226,0,0,32,4,0,0,0,0,0,0,84,144,0,0,23,226,0,0,32,4,0,0,0,0,0,0,124,144,0,0,44,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,80,10,0,0,0,0,0,0,124,144,0,0,112,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,104,10,0,0,0,0,0,0,124,144,0,0,180,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,128,10,0,0,0,0,0,0,124,144,0,0,248,226,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,152,10,0,0,0,0,0,0,124,144,0,0,60,227,0,0,0,0,0,0,3,0,0,0,32,4,0,0,2,0,0,0,176,10,0,0,2,0,0,0,184,10,0,0,0,8,0,0,124,144,0,0,129,227,0,0,0,0,0,0,3,0,0,0,32,4,0,0,2,0,0,0,176,10,0,0,2,0,0,0,192,10,0,0,0,8,0,0,124,144,0,0,198,227,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,200,10,0,0,0,8,0,0,124,144,0,0,11,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,200,10,0,0,0,8,0,0,124,144,0,0,80,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,108,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,136,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,164,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,208,10,0,0,2,0,0,0,124,144,0,0,192,228,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,216,10,0,0,0,0,0,0,124,144,0,0,6,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,224,10,0,0,0,0,0,0,124,144,0,0,76,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,232,10,0,0,0,0,0,0,124,144,0,0,146,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,240,10,0,0,0,0,0,0,124,144,0,0,216,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,248,10,0,0,2,0,0,0,124,144,0,0,237,229,0,0,0,0,0,0,2,0,0,0,32,4,0,0,2,0,0,0,248,10,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,144,0,0,73,233,0,0,44,144,0,0,50,233,0,0,124,144,0,0,28,233,0,0,0,0,0,0,1,0,0,0,8,11,0,0,0,0,0,0,124,144,0,0,237,232,0,0,0,0,0,0,1,0,0,0,8,11,0,0,0,0,0,0,124,144,0,0,215,232,0,0,0,0,0,0,1,0,0,0,0,11,0,0,0,0,0,0,124,144,0,0,168,232,0,0,0,0,0,0,1,0,0,0,0,11,0,0,0,0,0,0,44,144,0,0,149,232,0,0,44,144,0,0,115,232,0,0,44,144,0,0,81,232,0,0,44,144,0,0,60,232,0,0,44,144,0,0,39,232,0,0,44,144,0,0,14,232,0,0,44,144,0,0,245,231,0,0,44,144,0,0,220,231,0,0,44,144,0,0,195,231,0,0,44,144,0,0,171,231,0,0,44,144,0,0,190,232,0,0,44,144,0,0,3,233],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE),allocate([156,143,0,0,0,0,0,0,8,2,0,0,1,0,0,0,2,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,248,1,0,0,3,0,0,0,4,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,0,0,0,0,232,1,0,0,5,0,0,0,6,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,0,0,0,0,216,1,0,0,7,0,0,0,8,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,0,0,0,0,200,1,0,0,9,0,0,0,10,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,0,0,0,0,184,1,0,0,11,0,0,0,12,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,0,0,0,0,168,1,0,0,13,0,0,0,14,0,0,0,7,0,0,0,7,0,0,0,7,0,0,0,0,0,0,0,144,1,0,0,15,0,0,0,16,0,0,0,8,0,0,0,8,0,0,0,8,0,0,0,0,0,0,0,128,1,0,0,17,0,0,0,18,0,0,0,9,0,0,0,1,0,0,0,9,0,0,0,0,0,0,0,112,1,0,0,19,0,0,0,20,0,0,0,10,0,0,0,2,0,0,0,10,0,0,0,0,0,0,0,96,1,0,0,21,0,0,0,22,0,0,0,11,0,0,0,3,0,0,0,11,0,0,0,0,0,0,0,80,1,0,0,23,0,0,0,24,0,0,0,12,0,0,0,4,0,0,0,12,0,0,0,0,0,0,0,64,1,0,0,25,0,0,0,26,0,0,0,13,0,0,0,5,0,0,0,13,0,0,0,0,0,0,0,240,0,0,0,27,0,0,0,28,0,0,0,14,0,0,0,6,0,0,0,14,0,0,0,0,0,0,0,224,0,0,0,29,0,0,0,30,0,0,0,15,0,0,0,7,0,0,0,15,0,0,0,0,0,0,0,16,0,0,0,31,0,0,0,32,0,0,0,16,0,0,0,8,0,0,0,16,0,0,0,0,0,0,0,200,0,0,0,33,0,0,0,34,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,184,0,0,0,33,0,0,0,35,0,0,0,3,0,0,0,4,0,0,0,56,0,0,0,0,0,0,0,216,3,0,0,36,0,0,0,37,0,0,0,200,255,255,255,200,255,255,255,216,3,0,0,38,0,0,0,39,0,0,0,56,0,0,0,0,0,0,0,104,0,0,0,40,0,0,0,41,0,0,0,200,255,255,255,200,255,255,255,104,0,0,0,42,0,0,0,43,0,0,0,0,0,0,0,88,0,0,0,44,0,0,0,45,0,0,0,17,0,0,0,1,0,0,0,1,0,0,0,5,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,17,0,0,0,3,0,0,0,18,0,0,0,104,141,0,0,64,141,0,0,84,141,0,0,124,141,0,0,0,0,0,0,32,0,0,0,46,0,0,0,47,0,0,0,6,0,0,0,7,0,0,0,0,0,0,0,56,0,0,0,48,0,0,0,49,0,0,0,8,0,0,0,9,0,0,0,0,0,0,0,72,0,0,0,50,0,0,0,51,0,0,0,10,0,0,0,11,0,0,0,0,0,0,0,120,0,0,0,52,0,0,0,53,0,0,0,12,0,0,0,13,0,0,0,0,0,0,0,136,0,0,0,54,0,0,0,55,0,0,0,14,0,0,0,15,0,0,0,0,0,0,0,152,0,0,0,56,0,0,0,57,0,0,0,16,0,0,0,17,0,0,0,0,0,0,0,168,0,0,0,58,0,0,0,59,0,0,0,18,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,6,0,0,0,6,0,0,0,7,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,0,0,0,0,216,0,0,0,60,0,0,0,61,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,62,0,0,0,63,0,0,0,20,0,0,0,21,0,0,0,0,0,0,0,16,1,0,0,64,0,0,0,65,0,0,0,22,0,0,0,23,0,0,0,0,0,0,0,32,1,0,0,66,0,0,0,67,0,0,0,24,0,0,0,25,0,0,0,0,0,0,0,48,1,0,0,68,0,0,0,69,0,0,0,26,0,0,0,27,0,0,0,0,0,0,0,160,1,0,0,70,0,0,0,71,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,24,2,0,0,72,0,0,0,73,0,0,0,5,0,0,0,1,0,0,0,4,0,0,0,5,0,0,0,2,0,0,0,0,0,0,0,40,2,0,0,74,0,0,0,75,0,0,0,18,0,0,0,0,0,0,0,64,2,0,0,76,0,0,0,77,0,0,0,19,0,0,0,2,0,0,0,0,0,0,0,80,2,0,0,78,0,0,0,79,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,104,2,0,0,80,0,0,0,81,0,0,0,7,0,0,0,0,0,0,0,128,2,0,0,82,0,0,0,83,0,0,0,8,0,0,0,0,0,0,0,160,2,0,0,84,0,0,0,85,0,0,0,86,0,0,0,87,0,0,0,6,0,0,0,2,0,0,0,9,0,0,0,28,0,0,0,0,0,0,0,208,2,0,0,84,0,0,0,88,0,0,0,86,0,0,0,87,0,0,0,6,0,0,0,3,0,0,0,10,0,0,0,29,0,0,0,0,0,0,0,224,2,0,0,84,0,0,0,89,0,0,0,86,0,0,0,87,0,0,0,6,0,0,0,4,0,0,0,11,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,1,203,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,192,3,0,0,192,4,0,0,192,5,0,0,192,6,0,0,192,7,0,0,192,8,0,0,192,9,0,0,192,10,0,0,192,11,0,0,192,12,0,0,192,13,0,0,192,14,0,0,192,15,0,0,192,16,0,0,192,17,0,0,192,18,0,0,192,19,0,0,192,20,0,0,192,21,0,0,192,22,0,0,192,23,0,0,192,24,0,0,192,25,0,0,192,26,0,0,192,27,0,0,192,28,0,0,192,29,0,0,192,30,0,0,192,31,0,0,192,0,0,0,179,1,0,0,195,2,0,0,195,3,0,0,195,4,0,0,195,5,0,0,195,6,0,0,195,7,0,0,195,8,0,0,195,9,0,0,195,10,0,0,195,11,0,0,195,12,0,0,195,13,0,0,211,14,0,0,195,15,0,0,195,0,0,12,187,1,0,12,195,2,0,12,195,3,0,12,195,4,0,12,211,88,146,0,0,200,146,0,0,56,147,0,0,56,147,0,0,120,187,0,0,168,155,0,0,168,149,0,0,0,0,0,0,10,0,0,0,100,0,0,0,232,3,0,0,16,39,0,0,160,134,1,0,64,66,15,0,128,150,152,0,0,225,245,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,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,5,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,9,0,0,0,159,219,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,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,9,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,9,0,0,0,151,215,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,5,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,9,0,0,0,143,211,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,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,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,30,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,38,0,0,0,39,0,0,0,40,0,0,0,41,0,0,0,42,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,47,0,0,0,48,0,0,0,49,0,0,0,50,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,57,0,0,0,58,0,0,0,59,0,0,0,60,0,0,0,61,0,0,0,62,0,0,0,63,0,0,0,64,0,0,0,65,0,0,0,66,0,0,0,67,0,0,0,68,0,0,0,69,0,0,0,70,0,0,0,71,0,0,0,72,0,0,0,73,0,0,0,74,0,0,0,75,0,0,0,76,0,0,0,77,0,0,0,78,0,0,0,79,0,0,0,80,0,0,0,81,0,0,0,82,0,0,0,83,0,0,0,84,0,0,0,85,0,0,0,86,0,0,0,87,0,0,0,88,0,0,0,89,0,0,0,90,0,0,0,91,0,0,0,92,0,0,0,93,0,0,0,94,0,0,0,95,0,0,0,96,0,0,0,65,0,0,0,66,0,0,0,67,0,0,0,68,0,0,0,69,0,0,0,70,0,0,0,71,0,0,0,72,0,0,0,73,0,0,0,74,0,0,0,75,0,0,0,76,0,0,0,77,0,0,0,78,0,0,0,79,0,0,0,80,0,0,0,81,0,0,0,82,0,0,0,83,0,0,0,84,0,0,0,85,0,0,0,86,0,0,0,87,0,0,0,88,0,0,0,89,0,0,0,90,0,0,0,123,0,0,0,124,0,0,0,125,0,0,0,126,0,0,0,127],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+35640),allocate([1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,30,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,38,0,0,0,39,0,0,0,40,0,0,0,41,0,0,0,42,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,47,0,0,0,48,0,0,0,49,0,0,0,50,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,57,0,0,0,58,0,0,0,59,0,0,0,60,0,0,0,61,0,0,0,62,0,0,0,63,0,0,0,64,0,0,0,97,0,0,0,98,0,0,0,99,0,0,0,100,0,0,0,101,0,0,0,102,0,0,0,103,0,0,0,104,0,0,0,105,0,0,0,106,0,0,0,107,0,0,0,108,0,0,0,109,0,0,0,110,0,0,0,111,0,0,0,112,0,0,0,113,0,0,0,114,0,0,0,115,0,0,0,116,0,0,0,117,0,0,0,118,0,0,0,119,0,0,0,120,0,0,0,121,0,0,0,122,0,0,0,91,0,0,0,92,0,0,0,93,0,0,0,94,0,0,0,95,0,0,0,96,0,0,0,97,0,0,0,98,0,0,0,99,0,0,0,100,0,0,0,101,0,0,0,102,0,0,0,103,0,0,0,104,0,0,0,105,0,0,0,106,0,0,0,107,0,0,0,108,0,0,0,109,0,0,0,110,0,0,0,111,0,0,0,112,0,0,0,113,0,0,0,114,0,0,0,115,0,0,0,116,0,0,0,117,0,0,0,118,0,0,0,119,0,0,0,120,0,0,0,121,0,0,0,122,0,0,0,123,0,0,0,124,0,0,0,125,0,0,0,126,0,0,0,127],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+39844),allocate([240,2,0,0,90,0,0,0,91,0,0,0,20,0,0,0,12,0,0,0,5,0,0,0,31,0,0,0,10,0,0,0,11,0,0,0,13,0,0,0,12,0,0,0,13,0,0,0,19,0,0,0,14,0,0,0,20,0,0,0,0,0,0,0,0,3,0,0,90,0,0,0,92,0,0,0,21,0,0,0,12,0,0,0,5,0,0,0,31,0,0,0,14,0,0,0,11,0,0,0,13,0,0,0,15,0,0,0,16,0,0,0,21,0,0,0,15,0,0,0,22,0,0,0,0,0,0,0,16,3,0,0,93,0,0,0,94,0,0,0,22,0,0,0,1,0,0,0,6,0,0,0,32,0,0,0,17,0,0,0,2,0,0,0,2,0,0,0,18,0,0,0,4,0,0,0,23,0,0,0,16,0,0,0,24,0,0,0,0,0,0,0,32,3,0,0,93,0,0,0,95,0,0,0,23,0,0,0,1,0,0,0,6,0,0,0,32,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,19,0,0,0,20,0,0,0,25,0,0,0,3,0,0,0,26,0,0,0,0,0,0,0,56,3,0,0,96,0,0,0,97,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,152,3,0,0,93,0,0,0,98,0,0,0,17,0,0,0,1,0,0,0,6,0,0,0,32,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,18,0,0,0,4,0,0,0,23,0,0,0,3,0,0,0,26,0,0,0,0,0,0,0,160,3,0,0,90,0,0,0,99,0,0,0,24,0,0,0,12,0,0,0,5,0,0,0,31,0,0,0,14,0,0,0,11,0,0,0,13,0,0,0,12,0,0,0,13,0,0,0,19,0,0,0,15,0,0,0,22,0,0,0,8,0,0,0,0,0,0,0,168,3,0,0,100,0,0,0,101,0,0,0,248,255,255,255,248,255,255,255,168,3,0,0,102,0,0,0,103,0,0,0,8,0,0,0,0,0,0,0,192,3,0,0,104,0,0,0,105,0,0,0,248,255,255,255,248,255,255,255,192,3,0,0,106,0,0,0,107,0,0,0,4,0,0,0,0,0,0,0,216,3,0,0,36,0,0,0,37,0,0,0,252,255,255,255,252,255,255,255,216,3,0,0,38,0,0,0,39,0,0,0,4,0,0,0,0,0,0,0,240,3,0,0,108,0,0,0,109,0,0,0,252,255,255,255,252,255,255,255,240,3,0,0,110,0,0,0,111,0,0,0,0,0,0,0,96,3,0,0,112,0,0,0,113,0,0,0,7,0,0,0,0,0,0,0,112,3,0,0,114,0,0,0,115,0,0,0,0,0,0,0,8,4,0,0,72,0,0,0,116,0,0,0,21,0,0,0,1,0,0,0,4,0,0,0,5,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,117,0,0,0,118,0,0,0,119,0,0,0,1,0,0,0,33,0,0,0,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,5,0,0,120,0,0,0,121,0,0,0,119,0,0,0,2,0,0,0,34,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,5,0,0,122,0,0,0,123,0,0,0,119,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,5,0,0,124,0,0,0,125,0,0,0,119,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,5,0,0,126,0,0,0,127,0,0,0,119,0,0,0,3,0,0,0,4,0,0,0,23,0,0,0,5,0,0,0,24,0,0,0,1,0,0,0,2,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,5,0,0,128,0,0,0,129,0,0,0,119,0,0,0,7,0,0,0,8,0,0,0,25,0,0,0,9,0,0,0,26,0,0,0,3,0,0,0,4,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,5,0,0,130,0,0,0,131,0,0,0,119,0,0,0,22,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,30,0,0,0,31,0,0,0,1,0,0,0,248,255,255,255,224,5,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,6,0,0,132,0,0,0,133,0,0,0,119,0,0,0,30,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,2,0,0,0,248,255,255,255,8,6,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,6,0,0,134,0,0,0,135,0,0,0,119,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,6,0,0,136,0,0,0,137,0,0,0,119,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,6,0,0,138,0,0,0,139,0,0,0,119,0,0,0,38,0,0,0,39,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,40,0,0,0,29,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144,6,0,0,140,0,0,0,141,0,0,0,119,0,0,0,41,0,0,0,42,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,43,0,0,0,35,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,176,6,0,0,142,0,0,0,143,0,0,0,119,0,0,0,44,0,0,0,45,0,0,0,37,0,0,0,38,0,0,0,39,0,0,0,40,0,0,0,46,0,0,0,41,0,0,0,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,208,6,0,0,144,0,0,0,145,0,0,0,119,0,0,0,47,0,0,0,48,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,49,0,0,0,47,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,6,0,0,146,0,0,0,147,0,0,0,119,0,0,0,3,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,7,0,0,148,0,0,0,149,0,0,0,119,0,0,0,5,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,7,0,0,150,0,0,0,151,0,0,0,119,0,0,0,1,0,0,0,37,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,7,0,0,152,0,0,0,153,0,0,0,119,0,0,0,2,0,0,0,38,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,7,0,0,154,0,0,0,155,0,0,0,119,0,0,0,19,0,0,0,7,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,144,7,0,0,156,0,0,0,157,0,0,0,119,0,0,0,20,0,0,0,8,0,0,0,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,4,0,0,158,0,0,0,159,0,0,0,119,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,5,0,0,160,0,0,0,161,0,0,0,119,0,0,0,27,0,0,0,21,0,0,0,28,0,0,0,22,0,0,0,29,0,0,0,9,0,0,0,23,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,208,4,0,0,162,0,0,0,163,0,0,0,119,0,0,0,3,0,0,0,4,0,0,0,12,0,0,0,50,0,0,0,51,0,0,0,13,0,0,0,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,5,0,0,164,0,0,0,165,0,0,0,119,0,0,0,53,0,0,0,54,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,0,0,0,0,80,5,0,0,166,0,0,0,167,0,0,0,119,0,0,0,55,0,0,0,56,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,0,0,0,0,32,4,0,0,168,0,0,0,169,0,0,0,119,0,0,0,0,0,0,0,48,4,0,0,168,0,0,0,170,0,0,0,119,0,0,0,24,0,0,0,10,0,0,0,11,0,0,0,12,0,0,0,30,0,0,0,25,0,0,0,31,0,0,0,26,0,0,0,32,0,0,0,13,0,0,0,27,0,0,0,14,0,0,0,0,0,0,0,80,4,0,0,168,0,0,0,171,0,0,0,119,0,0,0,5,0,0,0,6,0,0,0,15,0,0,0,57,0,0,0,58,0,0,0,16,0,0,0,59,0,0,0,0,0,0,0,112,4,0,0,168,0,0,0,172,0,0,0,119,0,0,0,7,0,0,0,8,0,0,0,17,0,0,0,60,0,0,0,61,0,0,0,18,0,0,0,62,0,0,0,0,0,0,0,144,4,0,0,168,0,0,0,173,0,0,0,119,0,0,0,9,0,0,0,10,0,0,0,19,0,0,0,63,0,0,0,64,0,0,0,20,0,0,0,65,0,0,0,0,0,0,0,176,4,0,0,168,0,0,0,174,0,0,0,119,0,0,0,9,0,0,0,10,0,0,0,19,0,0,0,63,0,0,0,64,0,0,0,20,0,0,0,65,0,0,0,0,0,0,0,192,4,0,0,168,0,0,0,175,0,0,0,119,0,0,0,9,0,0,0,10,0,0,0,19,0,0,0,63,0,0,0,64,0,0,0,20,0,0,0,65,0,0,0,0,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,37,0,0,0,109,0,0,0,47,0,0,0,37,0,0,0,100,0,0,0,47,0,0,0,37,0,0,0,121,0,0,0,37,0,0,0,89,0,0,0,45,0,0,0,37,0,0,0,109,0,0,0,45,0,0,0,37,0,0,0,100,0,0,0,37,0,0,0,73,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,32,0,0,0,37,0,0,0,112,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,116,0,0,0,114,0,0,0,117,0,0,0,101,0,0,0,0,0,0,0,102,0,0,0,97,0,0,0,108,0,0,0,115,0,0,0,101,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,83,0,0,0,117,0,0,0,110,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,77,0,0,0,111,0,0,0,110,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,84,0,0,0,117,0,0,0,101,0,0,0,115,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,87,0,0,0,101,0,0,0,100,0,0,0,110,0,0,0,101,0,0,0,115,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,84,0,0,0,104,0,0,0,117,0,0,0,114,0,0,0,115,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,70,0,0,0,114,0,0,0,105,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,83,0,0,0,97,0,0,0,116,0,0,0,117,0,0,0,114,0,0,0,100,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,83,0,0,0,117,0,0,0,110,0,0,0,0,0,0,0,77,0,0,0,111,0,0,0,110,0,0,0,0,0,0,0,84,0,0,0,117,0,0,0,101,0,0,0,0,0,0,0,87,0,0,0,101,0,0,0,100,0,0,0,0,0,0,0,84,0,0,0,104,0,0,0,117,0,0,0,0,0,0,0,70,0,0,0,114,0,0,0,105,0,0,0,0,0,0,0,83,0,0,0,97,0,0,0,116,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,74,0,0,0,97,0,0,0,110,0,0,0,117,0,0,0,97,0,0,0,114,0,0,0,121,0,0,0,0,0,0,0,70,0,0,0,101,0,0,0,98,0,0,0,114,0,0,0,117,0,0,0,97,0,0,0,114,0,0,0,121,0,0,0,0,0,0,0,77,0,0,0,97,0,0,0,114,0,0,0,99,0,0,0,104,0,0,0,0,0,0,0,65,0,0,0,112,0,0,0,114,0,0,0,105,0,0,0,108,0,0,0,0,0,0,0,77,0,0,0,97,0,0,0,121,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,110,0,0,0,101,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,108,0,0,0,121,0,0,0,0,0,0,0,65,0,0,0,117,0,0,0,103,0,0,0,117,0,0,0,115,0,0,0,116,0,0,0,0,0,0,0,83,0,0,0,101,0,0,0,112,0,0,0,116,0,0,0,101,0,0,0,109,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,79,0,0,0,99,0,0,0,116,0,0,0,111,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,78,0,0,0,111,0,0,0,118,0,0,0,101,0,0,0,109,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,68,0,0,0,101,0,0,0,99,0,0,0,101,0,0,0,109,0,0,0,98,0,0,0,101,0,0,0,114,0,0,0,0,0,0,0,74,0,0,0,97,0,0,0,110,0,0,0,0,0,0,0,70,0,0,0,101,0,0,0,98,0,0,0,0,0,0,0,77,0,0,0,97,0,0,0,114,0,0,0,0,0,0,0,65,0,0,0,112,0,0,0,114,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,110,0,0,0,0,0,0,0,74,0,0,0,117,0,0,0,108,0,0,0,0,0,0,0,65,0,0,0,117,0,0,0,103,0,0,0,0,0,0,0,83,0,0,0,101,0,0,0,112,0,0,0,0,0,0,0,79,0,0,0,99,0,0,0,116,0,0,0,0,0,0,0,78,0,0,0,111,0,0,0,118,0,0,0,0,0,0,0,68,0,0,0,101,0,0,0,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,0,0,0,77,0,0,0,0,0,0,0,80,0,0,0,77,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,109,0,0,0,47,0,0,0,37,0,0,0,100,0,0,0,47,0,0,0,37,0,0,0,121,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,97,0,0,0,32,0,0,0,37,0,0,0,98,0,0,0,32,0,0,0,37,0,0,0,100,0,0,0,32,0,0,0,37,0,0,0,72,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,32,0,0,0,37,0,0,0,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,37,0,0,0,73,0,0,0,58,0,0,0,37,0,0,0,77,0,0,0,58,0,0,0,37,0,0,0,83,0,0,0,32,0,0,0,37,0,0,0,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,3,32,2,32,2,32,2,32,2,32,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,2,0,1,96,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,4,192,8,216,8,216,8,216,8,216,8,216,8,216,8,216,8,216,8,216,8,216,4,192,4,192,4,192,4,192,4,192,4,192,4,192,8,213,8,213,8,213,8,213,8,213,8,213,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,8,197,4,192,4,192,4,192,4,192,4,192,4,192,8,214,8,214,8,214,8,214,8,214,8,214,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,8,198,4,192,4,192,4,192,4,192,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,97,119,83,116,114,101,97,109,32,111,114,32,114,97,119,68,97,116,97,32,110,101,101,100,115,32,116,111,32,114,101,102,101,114,101,110,99,101,32,116,111,32,115,111,109,101,116,104,105,110,103,0,119,105,100,116,104,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,49,44,32,54,53,53,51,53,93,0,104,101,105,103,104,116,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,49,44,32,54,53,53,51,53,93,0,98,105,116,115,112,101,114,115,97,109,112,108,101,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,50,44,32,49,54,93,0,105,110,116,101,114,108,101,97,118,101,77,111,100,101,32,110,101,101,100,115,32,116,111,32,98,101,32,115,101,116,32,116,111,32,97,32,118,97,108,117,101,32,111,102,32,123,78,111,110,101,44,32,83,97,109,112,108,101,44,32,76,105,110,101,125,0,99,111,109,112,111,110,101,110,116,115,32,110,101,101,100,115,32,116,111,32,98,101,32,105,110,32,116,104,101,32,114,97,110,103,101,32,91,49,44,32,50,53,53,93,0,117,110,99,111,109,112,114,101,115,115,101,100,32,115,105,122,101,32,100,111,101,115,32,110,111,116,32,109,97,116,99,104,32,119,105,116,104,32,116,104,101,32,111,116,104,101,114,32,112,97,114,97,109,101,116,101,114,115,0,105,110,116,101,114,108,101,97,118,101,77,111,100,101,32,99,97,110,110,111,116,32,98,101,32,115,101,116,32,116,111,32,83,97,109,112,108,101,32,105,110,32,99,111,109,98,105,110,97,116,105,111,110,32,119,105,116,104,32,99,111,109,112,111,110,101,110,116,115,32,61,32,52,0,105,110,116,101,114,108,101,97,118,101,77,111,100,101,32,99,97,110,32,111,110,108,121,32,98,101,32,115,101,116,32,116,111,32,78,111,110,101,32,105,110,32,99,111,109,98,105,110,97,116,105,111,110,32,119,105,116,104,32,99,111,109,112,111,110,101,110,116,115,32,61,32,49,0,67,111,108,111,114,32,116,114,97,110,115,102,111,114,109,97,116,105,111,110,32,0,78,111,32,109,111,114,101,32,98,121,116,101,115,32,97,118,97,105,108,97,98,108,101,32,105,110,32,105,110,112,117,116,32,98,117,102,102,101,114,44,32,115,116,105,108,108,32,110,101,101,100,101,100,105,110,103,32,0,65,110,32,111,100,100,32,110,117,109,98,101,114,32,111,102,32,98,121,116,101,115,32,40,0,41,32,99,97,110,110,111,116,32,98,101,32,115,119,97,112,112,101,100,46,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,54,84,114,97,110,115,102,111,114,109,83,104,105,102,116,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,51,73,116,69,69,69,0,49,49,80,114,111,99,101,115,115,76,105,110,101,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,54,84,114,97,110,115,102,111,114,109,83,104,105,102,116,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,50,73,116,69,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,54,84,114,97,110,115,102,111,114,109,83,104,105,102,116,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,49,73,116,69,69,69,0,78,83,116,51,95,95,49,49,53,98,97,115,105,99,95,115,116,114,105,110,103,98,117,102,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,78,83,95,57,97,108,108,111,99,97,116,111,114,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,57,98,97,115,105,99,95,111,115,116,114,105,110,103,115,116,114,101,97,109,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,78,83,95,57,97,108,108,111,99,97,116,111,114,73,99,69,69,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,51,73,116,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,50,73,116,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,49,73,116,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,51,84,114,97,110,115,102,111,114,109,78,111,110,101,73,116,69,69,0,50,50,80,111,115,116,80,114,111,99,101,115,83,105,110,103,108,101,83,116,114,101,97,109,0,50,53,80,111,115,116,80,114,111,99,101,115,83,105,110,103,108,101,67,111,109,112,111,110,101,110,116,0,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,116,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,55,84,114,105,112,108,101,116,73,116,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,51,73,104,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,50,73,104,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,50,84,114,97,110,115,102,111,114,109,72,112,49,73,104,69,69,0,49,56,80,114,111,99,101,115,115,84,114,97,110,115,102,111,114,109,101,100,73,49,51,84,114,97,110,115,102,111,114,109,78,111,110,101,73,104,69,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,55,84,114,105,112,108,101,116,73,104,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,54,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,50,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,104,76,105,56,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,55,84,114,105,112,108,101,116,73,104,69,76,105,56,69,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,104,69,49,53,69,110,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,116,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,116,55,84,114,105,112,108,101,116,73,116,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,55,84,114,105,112,108,101,116,73,104,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,54,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,116,76,105,49,50,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,104,76,105,56,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,53,76,111,115,115,108,101,115,115,84,114,97,105,116,115,84,73,55,84,114,105,112,108,101,116,73,104,69,76,105,56,69,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,56,74,108,115,67,111,100,101,99,73,49,52,68,101,102,97,117,108,116,84,114,97,105,116,115,84,73,104,104,69,49,53,68,101,99,111,100,101,114,83,116,114,97,116,101,103,121,69,0,67,104,97,114,76,83,32,101,114,114,111,114,0,99,104,97,114,108,115,0,49,53,99,104,97,114,108,115,95,99,97,116,101,103,111,114,121,0,112,97,114,97,109,115,46,88,116,104,117,109,98,110,97,105,108,32,105,115,32,62,32,48,32,98,117,116,32,112,97,114,97,109,115,46,116,104,117,109,98,110,97,105,108,32,61,61,32,110,117,108,108,95,112,116,114,0,49,55,74,112,101,103,77,97,114,107,101,114,83,101,103,109,101,110,116,0,49,49,74,112,101,103,83,101,103,109,101,110,116,0,50,48,74,112,101,103,73,109,97,103,101,68,97,116,97,83,101,103,109,101,110,116,0,69,120,112,101,99,116,101,100,32,74,80,69,71,32,77,97,114,107,101,114,32,115,116,97,114,116,32,98,121,116,101,32,48,120,70,70,32,98,117,116,32,116,104,101,32,98,121,116,101,32,118,97,108,117,101,32,119,97,115,32,48,120,0,74,80,69,71,32,101,110,99,111,100,105,110,103,32,119,105,116,104,32,109,97,114,107,101,114,32,0,32,105,115,32,110,111,116,32,115,117,112,112,111,114,116,101,100,46,0,85,110,107,110,111,119,110,32,74,80,69,71,32,109,97,114,107,101,114,32,0,32,101,110,99,111,117,110,116,101,114,101,100,46,0,109,114,102,120,0,83,116,57,98,97,100,95,97,108,108,111,99,0,83,116,57,101,120,99,101,112,116,105,111,110,0,83,116,49,51,114,117,110,116,105,109,101,95,101,114,114,111,114,0,83,116,57,116,121,112,101,95,105,110,102,111,0,83,116,56,98,97,100,95,99,97,115,116,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,54,95,95,115,104,105,109,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,57,95,95,112,111,105,110,116,101,114,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,49,55,95,95,112,98,97,115,101,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,48,95,95,115,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,78,49,48,95,95,99,120,120,97,98,105,118,49,50,49,95,95,118,109,105,95,99,108,97,115,115,95,116,121,112,101,95,105,110,102,111,69,0,33,34,98,97,115,105,99,95,115,116,114,105,110,103,32,108,101,110,103,116,104,95,101,114,114,111,114,34,0,47,85,115,101,114,115,47,99,104,97,102,101,121,47,101,109,115,100,107,95,112,111,114,116,97,98,108,101,47,101,109,115,99,114,105,112,116,101,110,47,49,46,51,53,46,48,47,115,121,115,116,101,109,47,105,110,99,108,117,100,101,47,108,105,98,99,120,120,47,115,116,114,105,110,103,0,95,95,116,104,114,111,119,95,108,101,110,103,116,104,95,101,114,114,111,114,0,33,34,118,101,99,116,111,114,32,108,101,110,103,116,104,95,101,114,114,111,114,34,0,47,85,115,101,114,115,47,99,104,97,102,101,121,47,101,109,115,100,107,95,112,111,114,116,97,98,108,101,47,101,109,115,99,114,105,112,116,101,110,47,49,46,51,53,46,48,47,115,121,115,116,101,109,47,105,110,99,108,117,100,101,47,108,105,98,99,120,120,47,118,101,99,116,111,114,0,112,116,104,114,101,97,100,95,111,110,99,101,32,102,97,105,108,117,114,101,32,105,110,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,95,102,97,115,116,40,41,0,115,116,100,58,58,98,97,100,95,97,108,108,111,99,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,114,101,116,117,114,110,101,100,0,116,101,114,109,105,110,97,116,101,95,104,97,110,100,108,101,114,32,117,110,101,120,112,101,99,116,101,100,108,121,32,116,104,114,101,119,32,97,110,32,101,120,99,101,112,116,105,111,110,0,115,116,100,58,58,98,97,100,95,99,97,115,116,0,99,97,110,110,111,116,32,99,114,101,97,116,101,32,112,116,104,114,101,97,100,32,107,101,121,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,99,97,110,110,111,116,32,122,101,114,111,32,111,117,116,32,116,104,114,101,97,100,32,118,97,108,117,101,32,102,111,114,32,95,95,99,120,97,95,103,101,116,95,103,108,111,98,97,108,115,40,41,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,58,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,101,120,99,101,112,116,105,111,110,32,111,102,32,116,121,112,101,32,37,115,0,116,101,114,109,105,110,97,116,105,110,103,32,119,105,116,104,32,37,115,32,102,111,114,101,105,103,110,32,101,120,99,101,112,116,105,111,110,0,116,101,114,109,105,110,97,116,105,110,103,0,117,110,99,97,117,103,104,116,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+42396),allocate([32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0,105,110,102,105,110,105,116,121,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,3,4,5,6,7,8,9,255,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,1,2,4,7,3,6,5,0,80,79,83,73,88],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+52636),allocate([17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,46,0,0,78,83,116,51,95,95,49,49,49,95,95,115,116,100,111,117,116,98,117,102,73,119,69,69,0,117,110,115,117,112,112,111,114,116,101,100,32,108,111,99,97,108,101,32,102,111,114,32,115,116,97,110,100,97,114,100,32,105,110,112,117,116,0,78,83,116,51,95,95,49,49,48,95,95,115,116,100,105,110,98,117,102,73,119,69,69,0,78,83,116,51,95,95,49,49,49,95,95,115,116,100,111,117,116,98,117,102,73,99,69,69,0,78,83,116,51,95,95,49,49,48,95,95,115,116,100,105,110,98,117,102,73,99,69,69,0,78,83,116,51,95,95,49,49,52,95,95,115,104,97,114,101,100,95,99,111,117,110,116,69,0,78,83,116,51,95,95,49,49,50,115,121,115,116,101,109,95,101,114,114,111,114,69,0,78,83,116,51,95,95,49,49,52,101,114,114,111,114,95,99,97,116,101,103,111,114,121,69,0,78,83,116,51,95,95,49,49,50,95,95,100,111,95,109,101,115,115,97,103,101,69,0,58,32,0,78,83,116,51,95,95,49,56,105,111,115,95,98,97,115,101,55,102,97,105,108,117,114,101,69,0,78,83,116,51,95,95,49,56,105,111,115,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,98,97,115,105,99,95,105,111,115,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,57,98,97,115,105,99,95,105,111,115,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,53,98,97,115,105,99,95,115,116,114,101,97,109,98,117,102,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,53,98,97,115,105,99,95,115,116,114,101,97,109,98,117,102,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,105,115,116,114,101,97,109,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,105,115,116,114,101,97,109,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,111,115,116,114,101,97,109,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,0,78,83,116,51,95,95,49,49,51,98,97,115,105,99,95,111,115,116,114,101,97,109,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,0,78,83,116,51,95,95,49,49,57,95,95,105,111,115,116,114,101,97,109,95,99,97,116,101,103,111,114,121,69,0,105,111,115,95,98,97,115,101,58,58,99,108,101,97,114,0,105,111,115,116,114,101,97,109,0,117,110,115,112,101,99,105,102,105,101,100,32,105,111,115,116,114,101,97,109,95,99,97,116,101,103,111,114,121,32,101,114,114,111,114,0,48,49,50,51,52,53,54,55,56,57,97,98,99,100,101,102,65,66,67,68,69,70,120,88,43,45,112,80,105,73,110,78,0,78,83,116,51,95,95,49,54,108,111,99,97,108,101,53,102,97,99,101,116,69,0,78,83,116,51,95,95,49,53,99,116,121,112,101,73,119,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,99,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,68,115,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,68,105,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,49,54,95,95,110,97,114,114,111,119,95,116,111,95,117,116,102,56,73,76,106,51,50,69,69,69,0,78,83,116,51,95,95,49,49,55,95,95,119,105,100,101,110,95,102,114,111,109,95,117,116,102,56,73,76,106,51,50,69,69,69,0,78,83,116,51,95,95,49,55,99,111,100,101,99,118,116,73,119,99,49,49,95,95,109,98,115,116,97,116,101,95,116,69,69,0,78,83,116,51,95,95,49,54,108,111,99,97,108,101,53,95,95,105,109,112,69,0,78,83,116,51,95,95,49,55,99,111,108,108,97,116,101,73,99,69,69,0,78,83,116,51,95,95,49,55,99,111,108,108,97,116,101,73,119,69,69,0,78,83,116,51,95,95,49,53,99,116,121,112,101,73,99,69,69,0,78,83,116,51,95,95,49,56,110,117,109,112,117,110,99,116,73,99,69,69,0,78,83,116,51,95,95,49,56,110,117,109,112,117,110,99,116,73,119,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,103,101,116,73,99,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,103,101,116,73,119,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,112,117,116,73,99,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,55,110,117,109,95,112,117,116,73,119,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,103,101,116,73,99,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,103,101,116,73,119,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,112,117,116,73,99,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,116,105,109,101,95,112,117,116,73,119,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,99,76,98,48,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,99,76,98,49,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,119,76,98,48,69,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,112,117,110,99,116,73,119,76,98,49,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,103,101,116,73,99,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,103,101,116,73,119,78,83,95,49,57,105,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,112,117,116,73,99,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,99,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,99,69,69,69,69,69,69,0,78,83,116,51,95,95,49,57,109,111,110,101,121,95,112,117,116,73,119,78,83,95,49,57,111,115,116,114,101,97,109,98,117,102,95,105,116,101,114,97,116,111,114,73,119,78,83,95,49,49,99,104,97,114,95,116,114,97,105,116,115,73,119,69,69,69,69,69,69,0,78,83,116,51,95,95,49,56,109,101,115,115,97,103,101,115,73,99,69,69,0,78,83,116,51,95,95,49,56,109,101,115,115,97,103,101,115,73,119,69,69,0,37,112,0,67,0,37,0,0,0,0,0,108,0,108,108,0,0,76,0,37,112,0,0,0,0,37,72,58,37,77,58,37,83,37,109,47,37,100,47,37,121,37,89,45,37,109,45,37,100,37,73,58,37,77,58,37,83,32,37,112,37,72,58,37,77,37,72,58,37,77,58,37,83,108,111,99,97,108,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,48,49,50,51,52,53,54,55,56,57,0,37,76,102,0,109,111,110,101,121,95,103,101,116,32,101,114,114,111,114,0,48,49,50,51,52,53,54,55,56,57,0,37,46,48,76,102,0,116,114,117,101,0,102,97,108,115,101,0,83,117,110,100,97,121,0,77,111,110,100,97,121,0,84,117,101,115,100,97,121,0,87,101,100,110,101,115,100,97,121,0,84,104,117,114,115,100,97,121,0,70,114,105,100,97,121,0,83,97,116,117,114,100,97,121,0,83,117,110,0,77,111,110,0,84,117,101,0,87,101,100,0,84,104,117,0,70,114,105,0,83,97,116,0,74,97,110,117,97,114,121,0,70,101,98,114,117,97,114,121,0,77,97,114,99,104,0,65,112,114,105,108,0,77,97,121,0,74,117,110,101,0,74,117,108,121,0,65,117,103,117,115,116,0,83,101,112,116,101,109,98,101,114,0,79,99,116,111,98,101,114,0,78,111,118,101,109,98,101,114,0,68,101,99,101,109,98,101,114,0,74,97,110,0,70,101,98,0,77,97,114,0,65,112,114,0,74,117,110,0,74,117,108,0,65,117,103,0,83,101,112,0,79,99,116,0,78,111,118,0,68,101,99,0,65,77,0,80,77,0,37,109,47,37,100,47,37,121,0,37,72,58,37,77,58,37,83,0,37,97,32,37,98,32,37,100,32,37,72,58,37,77,58,37,83,32,37,89,0,37,73,58,37,77,58,37,83,32,37,112,0,78,83,116,51,95,95,49,49,51,109,101,115,115,97,103,101,115,95,98,97,115,101,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,112,117,116,73,119,69,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,112,117,116,73,99,69,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,103,101,116,73,119,69,69,0,78,83,116,51,95,95,49,49,49,95,95,109,111,110,101,121,95,103,101,116,73,99,69,69,0,78,83,116,51,95,95,49,49,48,109,111,110,101,121,95,98,97,115,101,69,0,78,83,116,51,95,95,49,49,48,95,95,116,105,109,101,95,112,117,116,69,0,78,83,116,51,95,95,49,50,48,95,95,116,105,109,101,95,103,101,116,95,99,95,115,116,111,114,97,103,101,73,119,69,69,0,78,83,116,51,95,95,49,50,48,95,95,116,105,109,101,95,103,101,116,95,99,95,115,116,111,114,97,103,101,73,99,69,69,0,78,83,116,51,95,95,49,57,116,105,109,101,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,112,117,116,73,119,69,69,0,78,83,116,51,95,95,49,49,52,95,95,110,117,109,95,112,117,116,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,112,117,116,73,99,69,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,103,101,116,73,119,69,69,0,78,83,116,51,95,95,49,49,52,95,95,110,117,109,95,103,101,116,95,98,97,115,101,69,0,78,83,116,51,95,95,49,57,95,95,110,117,109,95,103,101,116,73,99,69,69,0,78,83,116,51,95,95,49,49,50,99,111,100,101,99,118,116,95,98,97,115,101,69,0,78,83,116,51,95,95,49,49,48,99,116,121,112,101,95,98,97,115,101,69,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE+56215);var tempDoublePtr=Runtime.alignMemory(allocate(12,"i8",ALLOC_STATIC),8);assert(tempDoublePtr%8==0);function _atexit(T,u){__ATEXIT__.unshift({func:T,arg:u})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}Module._i64Subtract=_i64Subtract;function ___assert_fail(T,u,m,A){throw ABORT=!0,"Assertion failed: "+Pointer_stringify(T)+", at: "+[u?Pointer_stringify(u):"unknown filename",m,A?Pointer_stringify(A):"unknown function"]+" at "+stackTrace()}function __ZSt18uncaught_exceptionv(){return!!__ZSt18uncaught_exceptionv.uncaught_exception}var EXCEPTIONS={last:0,caught:[],infos:{},deAdjust:function(T){if(!T||EXCEPTIONS.infos[T])return T;for(var u in EXCEPTIONS.infos){var m=EXCEPTIONS.infos[u];if(m.adjusted===T)return u}return T},addRef:function(T){if(T){var u=EXCEPTIONS.infos[T];u.refcount++}},decRef:function(T){if(T){var u=EXCEPTIONS.infos[T];assert(u.refcount>0),u.refcount--,u.refcount===0&&(u.destructor&&Runtime.dynCall("vi",u.destructor,[T]),delete EXCEPTIONS.infos[T],___cxa_free_exception(T))}},clearRef:function(T){if(T){var u=EXCEPTIONS.infos[T];u.refcount=0}}};function ___resumeException(T){throw EXCEPTIONS.last||(EXCEPTIONS.last=T),EXCEPTIONS.clearRef(EXCEPTIONS.deAdjust(T)),T}function ___cxa_find_matching_catch(){var T=EXCEPTIONS.last;if(!T)return asm.setTempRet0(0),0|0;var u=EXCEPTIONS.infos[T],m=u.type;if(!m)return asm.setTempRet0(0),T|0;var A=Array.prototype.slice.call(arguments);Module.___cxa_is_pointer_type(m),___cxa_find_matching_catch.buffer||(___cxa_find_matching_catch.buffer=_malloc(4)),HEAP32[___cxa_find_matching_catch.buffer>>2]=T,T=___cxa_find_matching_catch.buffer;for(var S=0;S>2],u.adjusted=T,asm.setTempRet0(A[S]),T|0;return T=HEAP32[T>>2],asm.setTempRet0(m),T|0}function ___cxa_throw(T,u,m){throw EXCEPTIONS.infos[T]={ptr:T,adjusted:T,type:u,destructor:m,refcount:0},EXCEPTIONS.last=T,"uncaught_exception"in __ZSt18uncaught_exceptionv?__ZSt18uncaught_exceptionv.uncaught_exception++:__ZSt18uncaught_exceptionv.uncaught_exception=1,T}Module._memset=_memset;function ___gxx_personality_v0(){}function __isLeapYear(T){return T%4===0&&(T%100!==0||T%400===0)}function __arraySum(T,u){for(var m=0,A=0;A<=u;m+=T[A++]);return m}var __MONTH_DAYS_LEAP=[31,29,31,30,31,30,31,31,30,31,30,31],__MONTH_DAYS_REGULAR=[31,28,31,30,31,30,31,31,30,31,30,31];function __addDays(T,u){for(var m=new Date(T.getTime());u>0;){var A=__isLeapYear(m.getFullYear()),S=m.getMonth(),v=(A?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR)[S];if(u>v-m.getDate())u-=v-m.getDate()+1,m.setDate(1),S<11?m.setMonth(S+1):(m.setMonth(0),m.setFullYear(m.getFullYear()+1));else return m.setDate(m.getDate()+u),m}return m}function _strftime(T,u,m,A){var S=HEAP32[A+40>>2],v={tm_sec:HEAP32[A>>2],tm_min:HEAP32[A+4>>2],tm_hour:HEAP32[A+8>>2],tm_mday:HEAP32[A+12>>2],tm_mon:HEAP32[A+16>>2],tm_year:HEAP32[A+20>>2],tm_wday:HEAP32[A+24>>2],tm_yday:HEAP32[A+28>>2],tm_isdst:HEAP32[A+32>>2],tm_gmtoff:HEAP32[A+36>>2],tm_zone:S?Pointer_stringify(S):""},w=Pointer_stringify(m),D={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S"};for(var R in D)w=w.replace(new RegExp(R,"g"),D[R]);var L=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],P=["January","February","March","April","May","June","July","August","September","October","November","December"];function d(H,j,y){for(var Y=typeof H=="number"?H.toString():H||"";Y.length0?1:0}var Y;return(Y=y(H.getFullYear()-j.getFullYear()))===0&&(Y=y(H.getMonth()-j.getMonth()))===0&&(Y=y(H.getDate()-j.getDate())),Y}function N(H){switch(H.getDay()){case 0:return new Date(H.getFullYear()-1,11,29);case 1:return H;case 2:return new Date(H.getFullYear(),0,3);case 3:return new Date(H.getFullYear(),0,2);case 4:return new Date(H.getFullYear(),0,1);case 5:return new Date(H.getFullYear()-1,11,31);case 6:return new Date(H.getFullYear()-1,11,30)}}function q(H){var j=__addDays(new Date(H.tm_year+1900,0,1),H.tm_yday),y=new Date(j.getFullYear(),0,4),Y=new Date(j.getFullYear()+1,0,4),G=N(y),J=N(Y);return e(G,j)<=0?e(J,j)<=0?j.getFullYear()+1:j.getFullYear():j.getFullYear()-1}var z={"%a":function(H){return L[H.tm_wday].substring(0,3)},"%A":function(H){return L[H.tm_wday]},"%b":function(H){return P[H.tm_mon].substring(0,3)},"%B":function(H){return P[H.tm_mon]},"%C":function(H){var j=H.tm_year+1900;return E(j/100|0,2)},"%d":function(H){return E(H.tm_mday,2)},"%e":function(H){return d(H.tm_mday,2," ")},"%g":function(H){return q(H).toString().substring(2)},"%G":function(H){return q(H)},"%H":function(H){return E(H.tm_hour,2)},"%I":function(H){return E(H.tm_hour<13?H.tm_hour:H.tm_hour-12,2)},"%j":function(H){return E(H.tm_mday+__arraySum(__isLeapYear(H.tm_year+1900)?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,H.tm_mon-1),3)},"%m":function(H){return E(H.tm_mon+1,2)},"%M":function(H){return E(H.tm_min,2)},"%n":function(){return` -`},"%p":function(H){return H.tm_hour>0&&H.tm_hour<13?"AM":"PM"},"%S":function(H){return E(H.tm_sec,2)},"%t":function(){return" "},"%u":function(H){var j=new Date(H.tm_year+1900,H.tm_mon+1,H.tm_mday,0,0,0,0);return j.getDay()||7},"%U":function(H){var j=new Date(H.tm_year+1900,0,1),y=j.getDay()===0?j:__addDays(j,7-j.getDay()),Y=new Date(H.tm_year+1900,H.tm_mon,H.tm_mday);if(e(y,Y)<0){var G=__arraySum(__isLeapYear(Y.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,Y.getMonth()-1)-31,J=31-y.getDate(),i0=J+G+Y.getDate();return E(Math.ceil(i0/7),2)}return e(y,j)===0?"01":"00"},"%V":function(H){var j=new Date(H.tm_year+1900,0,4),y=new Date(H.tm_year+1901,0,4),Y=N(j),G=N(y),J=__addDays(new Date(H.tm_year+1900,0,1),H.tm_yday);if(e(J,Y)<0)return"53";if(e(G,J)<=0)return"01";var i0;return Y.getFullYear()=0;return j=Math.abs(j)/60,j=j/60*100+j%60,(y?"+":"-")+("0000"+j).slice(-4)},"%Z":function(H){return H.tm_zone},"%%":function(){return"%"}};for(var R in z)w.indexOf(R)>=0&&(w=w.replace(new RegExp(R,"g"),z[R](v)));var e0=intArrayFromString(w,!1);return e0.length>u?0:(writeArrayToMemory(e0,T),e0.length-1)}function _strftime_l(T,u,m,A){return _strftime(T,u,m,A)}function _abort(){Module.abort()}function _free(){}Module._free=_free;function ___cxa_free_exception(T){try{return _free(T)}catch{}}function ___cxa_end_catch(){if(___cxa_end_catch.rethrown){___cxa_end_catch.rethrown=!1;return}asm.setThrew(0);var T=EXCEPTIONS.caught.pop();T&&(EXCEPTIONS.decRef(EXCEPTIONS.deAdjust(T)),EXCEPTIONS.last=0)}function _pthread_once(T,u){_pthread_once.seen||(_pthread_once.seen={}),!(T in _pthread_once.seen)&&(Runtime.dynCall("v",u),_pthread_once.seen[T]=1)}function ___lock(){}function ___unlock(){}var PTHREAD_SPECIFIC={};function _pthread_getspecific(T){return PTHREAD_SPECIFIC[T]||0}function ___setErrNo(T){return Module.___errno_location&&(HEAP32[Module.___errno_location()>>2]=T),T}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};function _sysconf(T){switch(T){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 typeof navigator=="object"&&navigator.hardwareConcurrency||1}return ___setErrNo(ERRNO_CODES.EINVAL),-1}var _fabs=Math_abs,PTHREAD_SPECIFIC_NEXT_KEY=1;function _pthread_key_create(T,u){return T==0?ERRNO_CODES.EINVAL:(HEAP32[T>>2]=PTHREAD_SPECIFIC_NEXT_KEY,PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0,PTHREAD_SPECIFIC_NEXT_KEY++,0)}function _emscripten_set_main_loop_timing(T,u){if(Browser.mainLoop.timingMode=T,Browser.mainLoop.timingValue=u,!Browser.mainLoop.func)return 1;if(T==0)Browser.mainLoop.scheduler=function(){setTimeout(Browser.mainLoop.runner,u)},Browser.mainLoop.method="timeout";else if(T==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(T==2){if(!window.setImmediate){let v=function(w){w.source===window&&w.data===A&&(w.stopPropagation(),m.shift()())};var S=v,m=[],A="__emcc";window.addEventListener("message",v,!0),window.setImmediate=function(D){m.push(D),window.postMessage(A,"*")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0}function _emscripten_set_main_loop(T,u,m,A,S){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=T,Browser.mainLoop.arg=A;var v=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var D=Date.now(),R=Browser.mainLoop.queue.shift();if(R.func(R.arg),Browser.mainLoop.remainingBlockers){var L=Browser.mainLoop.remainingBlockers,P=L%1==0?L-1:Math.floor(L);R.counted?Browser.mainLoop.remainingBlockers=P:(P=P+.5,Browser.mainLoop.remainingBlockers=(8*L+P)/9)}console.log('main loop blocker "'+R.name+'" took '+(Date.now()-D)+" ms"),Browser.mainLoop.updateStatus(),setTimeout(Browser.mainLoop.runner,0);return}if(!(v1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}Browser.mainLoop.method==="timeout"&&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(){typeof A<"u"?Runtime.dynCall("vi",T,[A]):Runtime.dynCall("v",T)}),!(v0?_emscripten_set_main_loop_timing(0,1e3/u):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),m)throw"SimulateInfiniteLoop"}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 T=Browser.mainLoop.timingMode,u=Browser.mainLoop.timingValue,m=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(m,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(T,u),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var T=Module.statusMessage||"Please wait...",u=Browser.mainLoop.remainingBlockers,m=Browser.mainLoop.expectedBlockers;u?u"u"&&(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(v){return!Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(v)},T.handle=function(v,w,D,R){var L=null;if(Browser.hasBlobConstructor)try{L=new Blob([v],{type:Browser.getMimetype(w)}),L.size!==v.length&&(L=new Blob([new Uint8Array(v).buffer],{type:Browser.getMimetype(w)}))}catch(e){Runtime.warnOnce("Blob constructor present but fails: "+e+"; falling back to blob builder")}if(!L){var P=new Browser.BlobBuilder;P.append(new Uint8Array(v).buffer),L=P.getBlob()}var d=Browser.URLObject.createObjectURL(L),E=new Image;E.onload=function(){assert(E.complete,"Image "+w+" could not be decoded");var N=document.createElement("canvas");N.width=E.width,N.height=E.height;var q=N.getContext("2d");q.drawImage(E,0,0),Module.preloadedImages[w]=N,Browser.URLObject.revokeObjectURL(d),D&&D(v)},E.onerror=function(N){console.log("Image "+d+" could not be decoded"),R&&R()},E.src=d},Module.preloadPlugins.push(T);var u={};u.canHandle=function(v){return!Module.noAudioDecoding&&v.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},u.handle=function(v,w,D,R){var L=!1;function P(q){L||(L=!0,Module.preloadedAudios[w]=q,D&&D(v))}function d(){L||(L=!0,Module.preloadedAudios[w]=new Audio,R&&R())}if(Browser.hasBlobConstructor){try{var E=new Blob([v],{type:Browser.getMimetype(w)})}catch{return d()}var e=Browser.URLObject.createObjectURL(E),N=new Audio;N.addEventListener("canplaythrough",function(){P(N)},!1),N.onerror=function(z){if(L)return;console.log("warning: browser could not fully decode audio "+w+", trying slower base64 approach");function e0(H){for(var j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y="=",Y="",G=0,J=0,i0=0;i0=6;){var Q=G>>J-6&63;J-=6,Y+=j[Q]}return J==2?(Y+=j[(G&3)<<4],Y+=y+y):J==4&&(Y+=j[(G&15)<<2],Y+=y),Y}N.src="data:audio/x-"+w.substr(-3)+";base64,"+e0(v),P(N)},N.src=e,Browser.safeSetTimeout(function(){P(N)},1e4)}else return d()},Module.preloadPlugins.push(u);var m=Module.canvas;function A(){Browser.pointerLock=document.pointerLockElement===m||document.mozPointerLockElement===m||document.webkitPointerLockElement===m||document.msPointerLockElement===m}m&&(m.requestPointerLock=m.requestPointerLock||m.mozRequestPointerLock||m.webkitRequestPointerLock||m.msRequestPointerLock||function(){},m.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},m.exitPointerLock=m.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",A,!1),document.addEventListener("mozpointerlockchange",A,!1),document.addEventListener("webkitpointerlockchange",A,!1),document.addEventListener("mspointerlockchange",A,!1),Module.elementPointerLock&&m.addEventListener("click",function(S){!Browser.pointerLock&&m.requestPointerLock&&(m.requestPointerLock(),S.preventDefault())},!1))},createContext:function(T,u,m,A){if(u&&Module.ctx&&T==Module.canvas)return Module.ctx;var S,v;if(u){var w={antialias:!1,alpha:!1};if(A)for(var D in A)w[D]=A[D];v=GL.createContext(T,w),v&&(S=GL.getContext(v).GLctx),T.style.backgroundColor="black"}else S=T.getContext("2d");return S?(m&&(u||assert(typeof GLctx>"u","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=S,u&&GL.makeContextCurrent(v),Module.useWebGL=u,Browser.moduleContextCreatedCallbacks.forEach(function(R){R()}),Browser.init()),S):null},destroyContext:function(T,u,m){},fullScreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullScreen:function(T,u,m){Browser.lockPointer=T,Browser.resizeCanvas=u,Browser.vrDevice=m,typeof Browser.lockPointer>"u"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas>"u"&&(Browser.resizeCanvas=!1),typeof Browser.vrDevice>"u"&&(Browser.vrDevice=null);var A=Module.canvas;function S(){Browser.isFullScreen=!1;var w=A.parentNode;(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===w?(A.cancelFullScreen=document.cancelFullScreen||document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msExitFullscreen||document.exitFullscreen||function(){},A.cancelFullScreen=A.cancelFullScreen.bind(document),Browser.lockPointer&&A.requestPointerLock(),Browser.isFullScreen=!0,Browser.resizeCanvas&&Browser.setFullScreenCanvasSize()):(w.parentNode.insertBefore(A,w),w.parentNode.removeChild(w),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullScreen),Browser.updateCanvasDimensions(A)}Browser.fullScreenHandlersInstalled||(Browser.fullScreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",S,!1),document.addEventListener("mozfullscreenchange",S,!1),document.addEventListener("webkitfullscreenchange",S,!1),document.addEventListener("MSFullscreenChange",S,!1));var v=document.createElement("div");A.parentNode.insertBefore(v,A),v.appendChild(A),v.requestFullScreen=v.requestFullScreen||v.mozRequestFullScreen||v.msRequestFullscreen||(v.webkitRequestFullScreen?function(){v.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),m?v.requestFullScreen({vrDisplay:m}):v.requestFullScreen()},nextRAF:0,fakeRequestAnimationFrame:function(T){var u=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=u+1e3/60;else for(;u+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var m=Math.max(Browser.nextRAF-u,0);setTimeout(T,m)},requestAnimationFrame:function T(u){typeof window>"u"?Browser.fakeRequestAnimationFrame(u):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(u))},safeCallback:function(T){return function(){if(!ABORT)return T.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var T=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],T.forEach(function(u){u()})}},safeRequestAnimationFrame:function(T){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?T():Browser.queuedAsyncCallbacks.push(T))})},safeSetTimeout:function(T,u){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?T():Browser.queuedAsyncCallbacks.push(T))},u)},safeSetInterval:function(T,u){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&T()},u)},getMimetype:function(T){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[T.substr(T.lastIndexOf(".")+1)]},getUserMedia:function(T){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(T)},getMovementX:function(T){return T.movementX||T.mozMovementX||T.webkitMovementX||0},getMovementY:function(T){return T.movementY||T.mozMovementY||T.webkitMovementY||0},getMouseWheelDelta:function(T){var u=0;switch(T.type){case"DOMMouseScroll":u=T.detail;break;case"mousewheel":u=T.wheelDelta;break;case"wheel":u=T.deltaY;break;default:throw"unrecognized mouse wheel event: "+T.type}return u},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(T){if(Browser.pointerLock)T.type!="mousemove"&&"mozMovementX"in T?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(T),Browser.mouseMovementY=Browser.getMovementY(T)),typeof SDL<"u"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var u=Module.canvas.getBoundingClientRect(),m=Module.canvas.width,A=Module.canvas.height,S=typeof window.scrollX<"u"?window.scrollX:window.pageXOffset,v=typeof window.scrollY<"u"?window.scrollY:window.pageYOffset;if(T.type==="touchstart"||T.type==="touchend"||T.type==="touchmove"){var w=T.touch;if(w===void 0)return;var D=w.pageX-(S+u.left),R=w.pageY-(v+u.top);D=D*(m/u.width),R=R*(A/u.height);var L={x:D,y:R};if(T.type==="touchstart")Browser.lastTouches[w.identifier]=L,Browser.touches[w.identifier]=L;else if(T.type==="touchend"||T.type==="touchmove"){var P=Browser.touches[w.identifier];P||(P=L),Browser.lastTouches[w.identifier]=P,Browser.touches[w.identifier]=L}return}var d=T.pageX-(S+u.left),E=T.pageY-(v+u.top);d=d*(m/u.width),E=E*(A/u.height),Browser.mouseMovementX=d-Browser.mouseX,Browser.mouseMovementY=E-Browser.mouseY,Browser.mouseX=d,Browser.mouseY=E}},xhrLoad:function(T,u,m){var A=new XMLHttpRequest;A.open("GET",T,!0),A.responseType="arraybuffer",A.onload=function(){A.status==200||A.status==0&&A.response?u(A.response):m()},A.onerror=m,A.send(null)},asyncLoad:function(T,u,m,A){Browser.xhrLoad(T,function(S){assert(S,'Loading data file "'+T+'" failed (no arrayBuffer).'),u(new Uint8Array(S)),A||removeRunDependency()},function(S){if(m)m();else throw'Loading data file "'+T+'" failed.'}),A||addRunDependency()},resizeListeners:[],updateResizeListeners:function(){var T=Module.canvas;Browser.resizeListeners.forEach(function(u){u(T.width,T.height)})},setCanvasSize:function(T,u,m){var A=Module.canvas;Browser.updateCanvasDimensions(A,T,u),m||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:function(){if(typeof SDL<"u"){var T=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];T=T|8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=T}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL<"u"){var T=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];T=T&-8388609,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=T}Browser.updateResizeListeners()},updateCanvasDimensions:function(T,u,m){u&&m?(T.widthNative=u,T.heightNative=m):(u=T.widthNative,m=T.heightNative);var A=u,S=m;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(A/S>2];return u},getStr:function(){var T=Pointer_stringify(SYSCALLS.get());return T},get64:function(){var T=SYSCALLS.get(),u=SYSCALLS.get();return T>=0?assert(u===0):assert(u===-1),T},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall54(T,u){SYSCALLS.varargs=u;try{return 0}catch(m){return(typeof FS>"u"||!(m instanceof FS.ErrnoError))&&abort(m),-m.errno}}Module._i64Add=_i64Add,Module._bitshift64Lshr=_bitshift64Lshr;function ___cxa_pure_virtual(){throw ABORT=!0,"Pure virtual function called!"}function _pthread_cleanup_push(T,u){__ATEXIT__.push(function(){Runtime.dynCall("vi",T,[u])}),_pthread_cleanup_push.level=__ATEXIT__.length}function _pthread_cond_broadcast(){return 0}function ___cxa_guard_acquire(T){return HEAP8[T>>0]?0:(HEAP8[T>>0]=1,1)}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 ___cxa_guard_release(){}function ___cxa_begin_catch(T){return __ZSt18uncaught_exceptionv.uncaught_exception--,EXCEPTIONS.caught.push(T),EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(T)),T}function _llvm_eh_typeid_for(T){return T}function _emscripten_memcpy_big(T,u,m){return HEAPU8.set(HEAPU8.subarray(u,u+m),T),T}Module._memcpy=_memcpy;function ___syscall6(T,u){SYSCALLS.varargs=u;try{var m=SYSCALLS.getStreamFromFD();return FS.close(m),0}catch(A){return(typeof FS>"u"||!(A instanceof FS.ErrnoError))&&abort(A),-A.errno}}function _pthread_mutex_lock(){}function _sbrk(T){var u=_sbrk;u.called||(DYNAMICTOP=alignMemoryPage(DYNAMICTOP),u.called=!0,assert(Runtime.dynamicAlloc),u.alloc=Runtime.dynamicAlloc,Runtime.dynamicAlloc=function(){abort("cannot dynamically allocate, sbrk now has control")});var m=DYNAMICTOP;if(T!=0){var A=u.alloc(T);if(!A)return 4294967295}return m}Module._bitshift64Shl=_bitshift64Shl;function ___cxa_guard_abort(){}Module._memmove=_memmove;function _pthread_cond_wait(){return 0}function ___cxa_rethrow(){___cxa_end_catch.rethrown=!0;var T=EXCEPTIONS.caught.pop();throw EXCEPTIONS.last=T,T}function _pthread_mutex_unlock(){}function _time(T){var u=Date.now()/1e3|0;return T&&(HEAP32[T>>2]=u),u}function _pthread_self(){return 0}function ___syscall140(T,u){SYSCALLS.varargs=u;try{var m=SYSCALLS.getStreamFromFD(),A=SYSCALLS.get(),S=SYSCALLS.get(),v=SYSCALLS.get(),w=SYSCALLS.get(),D=S;return assert(A===0),FS.llseek(m,D,w),HEAP32[v>>2]=m.position,m.getdents&&D===0&&w===0&&(m.getdents=null),0}catch(R){return(typeof FS>"u"||!(R instanceof FS.ErrnoError))&&abort(R),-R.errno}}function ___syscall146(T,u){SYSCALLS.varargs=u;try{var m=SYSCALLS.get(),A=SYSCALLS.get(),S=SYSCALLS.get(),v=0;___syscall146.buffer||(___syscall146.buffer=[]);for(var w=___syscall146.buffer,D=0;D>2],L=HEAP32[A+(D*8+4)>>2],P=0;P"u"||!(E instanceof FS.ErrnoError))&&abort(E),-E.errno}}function ___syscall145(T,u){SYSCALLS.varargs=u;try{var m=SYSCALLS.getStreamFromFD(),A=SYSCALLS.get(),S=SYSCALLS.get();return SYSCALLS.doReadv(m,A,S)}catch(v){return(typeof FS>"u"||!(v instanceof FS.ErrnoError))&&abort(v),-v.errno}}var ___dso_handle=allocate(1,"i32*",ALLOC_STATIC);Module.requestFullScreen=function T(u,m,A){Browser.requestFullScreen(u,m,A)},Module.requestAnimationFrame=function T(u){Browser.requestAnimationFrame(u)},Module.setCanvasSize=function T(u,m,A){Browser.setCanvasSize(u,m,A)},Module.pauseMainLoop=function T(){Browser.mainLoop.pause()},Module.resumeMainLoop=function T(){Browser.mainLoop.resume()},Module.getUserMedia=function T(){Browser.getUserMedia()},Module.createContext=function T(u,m,A,S){return Browser.createContext(u,m,A,S)},STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),staticSealed=!0,STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX),assert(DYNAMIC_BASE2147483648?!1:(d=new A(t),E=new S(t),e=new v(t),N=new w(t),q=new D(t),z=new R(t),e0=new L(t),H=new P(t),m=t,!0)}function $n(t){t=t|0;var r=0;return r=y,y=y+t|0,y=y+15&-16,r|0}function es(){return y|0}function is(t){t=t|0,y=t}function ts(t,r){t=t|0,r=r|0,y=t,Y=r}function rs(t,r){t=t|0,r=r|0,f||(f=t,l0=r)}function iA(t){t=t|0,d[G>>0]=d[t>>0],d[G+1>>0]=d[t+1>>0],d[G+2>>0]=d[t+2>>0],d[G+3>>0]=d[t+3>>0]}function tA(t){t=t|0,d[G>>0]=d[t>>0],d[G+1>>0]=d[t+1>>0],d[G+2>>0]=d[t+2>>0],d[G+3>>0]=d[t+3>>0],d[G+4>>0]=d[t+4>>0],d[G+5>>0]=d[t+5>>0],d[G+6>>0]=d[t+6>>0],d[G+7>>0]=d[t+7>>0]}function ns(t){t=t|0,I0=t}function ss(){return I0|0}function os(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0;if(_=y,y=y+128|0,C=_+44|0,U=_+8|0,h=_+4|0,g=_,I=n+4|0,k=n+8|0,f=0,P0(35,e[n>>2]|0,e[I>>2]|0,e[k>>2]|0,s|0),p=f,f=0,p&1)B=5;else{a=C,l=a+84|0;do e[a>>2]=e[s>>2],a=a+4|0,s=s+4|0;while((a|0)<(l|0));if(s=C+12|0,!(e[s>>2]|0)&&(c=W(((e[C+8>>2]|0)+7|0)/8|0,e[C>>2]|0)|0,e[s>>2]=c,(e[C+24>>2]|0)!=0)&&(p=W(e[C+16>>2]|0,c)|0,e[s>>2]=p),f=0,n0(176,U|0),p=f,f=0,p&1)B=5;else{s=C+56|0;do if(e[s>>2]|0)if(f=0,s=u0(66,s|0)|0,p=f,f=0,p&1)B=15;else{if(e[h>>2]=s,l=U+28|0,a=e[l>>2]|0,a>>>0<(e[U+32>>2]|0)>>>0){e[a>>2]=s,e[l>>2]=a+4,e[h>>2]=0,B=19;break}if(f=0,h0(57,U+24|0,h|0),p=f,f=0,p&1){if(l=b(824,0)|0,s=I0,a=e[h>>2]|0,e[h>>2]=0,!a)break;Ce[e[(e[a>>2]|0)+4>>2]&255](a);break}else{if(s=e[h>>2]|0,e[h>>2]=0,!s){B=19;break}Ce[e[(e[s>>2]|0)+4>>2]&255](s),B=19;break}}else B=19;while(!1);e:do if((B|0)==19)if(a=C+4|0,c=C+8|0,h=C+16|0,f=0,s=k0(14,e[C>>2]|0,e[a>>2]|0,e[c>>2]|0,e[h>>2]|0)|0,p=f,f=0,p&1)B=15;else{e[g>>2]=s,p=U+28|0,l=e[p>>2]|0;do if(l>>>0>=(e[U+32>>2]|0)>>>0)if(f=0,h0(57,U+24|0,g|0),l=f,f=0,l&1){if(l=b(824,0)|0,s=I0,a=e[g>>2]|0,e[g>>2]=0,!a)break e;Ce[e[(e[a>>2]|0)+4>>2]&255](a);break e}else{if(s=e[g>>2]|0,e[g>>2]=0,!s)break;Ce[e[(e[s>>2]|0)+4>>2]&255](s);break}else e[l>>2]=s,e[p>>2]=l+4,e[g>>2]=0;while(!1);if(s=e[C+28>>2]|0,s|0&&(f=0,h0(58,U|0,s|0),B=f,f=0,B&1)){B=15;break}i:do if(e[C+24>>2]|0){if(f=0,m0(4,U|0,n|0,C|0),B=f,f=0,B&1){B=15;break e}}else if(s=W(e[a>>2]|0,e[C>>2]|0)|0,s=W(s,((e[c>>2]|0)+7|0)/8|0)|0,(e[h>>2]|0)>0){for(a=0;f=0,m0(4,U|0,n|0,C|0),B=f,f=0,!(B&1);)if(l=e[I>>2]|0,l&&(e[I>>2]=l+s,e[k>>2]=(e[k>>2]|0)-s),a=a+1|0,(a|0)>=(e[h>>2]|0))break i;l=b(824,0)|0,s=I0,B=16;break e}while(!1);if(f=0,y0(33,U|0,t|0)|0,B=f,f=0,B&1)B=15;else{if(e[r>>2]=e[U+16>>2],o&&(d[o>>0]=0),a=U+24|0,s=e[a>>2]|0,s){if(l=e[p>>2]|0,(l|0)!=(s|0)){do o=l+-4|0,e[p>>2]=o,l=e[o>>2]|0,e[o>>2]=0,l&&Ce[e[(e[l>>2]|0)+4>>2]&255](l),l=e[p>>2]|0;while((l|0)!=(s|0));s=e[a>>2]|0}a0(s)}return o=0,y=_,o|0}}while(!1);if((B|0)==15&&(l=b(824,0)|0,s=I0,B=16),p=U+24|0,a=e[p>>2]|0,a){if(h=U+28|0,c=e[h>>2]|0,(c|0)!=(a|0)){do U=c+-4|0,e[h>>2]=U,c=e[U>>2]|0,e[U>>2]=0,c&&Ce[e[(e[c>>2]|0)+4>>2]&255](c),c=e[h>>2]|0;while((c|0)!=(a|0));a=e[p>>2]|0}a0(a)}}}if((B|0)==5&&(l=b(824,0)|0,s=I0),U=(s|0)==(Lr(824)|0),c=zi(l|0)|0,s=(o|0)==0,!U)return s||(d[o>>0]=0),Wi(),o=14,y=_,o|0;a=c+12|0;do if(s)B=60;else if(s=e[a>>2]|0,f=0,l=g0(1)|0,U=f,f=0,!(U&1))if((s|0)==(l|0)){E1(o,Se[e[(e[c>>2]|0)+8>>2]&127](c)|0)|0,B=60;break}else{d[o>>0]=0,B=60;break}while(!1);return(B|0)==60&&(V=e[a>>2]|0,f=0,O=g0(1)|0,o=f,f=0,!(o&1))?(o=(V|0)==(O|0)?e[c+8>>2]|0:13,Wi(),y=_,o|0):(s=b()|0,f=0,we(3),_=f,f=0,_&1?(_=b(0)|0,Ie(_)):r0(s|0),0)}function ls(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0;switch(p=y,y=y+112|0,l=p+96|0,h=p+84|0,g=p+72|0,C=p+60|0,I=p+48|0,k=p+36|0,U=p+24|0,B=p+12|0,V=p,c=(r|0)==0,(t|0)==0&c&&(o=de(16)|0,f=0,m0(5,l|0,48504,52),V=f,f=0,V&1?r=b()|0:(f=0,r=g0(1)|0,V=f,f=0,!(V&1)&&(f=0,P0(36,o|0,1,r|0,l|0),V=f,f=0,!(V&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(l),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)),a=e[s>>2]|0,(a+-1|0)>>>0>65534&&(o=de(16)|0,f=0,m0(5,h|0,48557,41),V=f,f=0,V&1?r=b()|0:(f=0,r=g0(1)|0,V=f,f=0,!(V&1)&&(f=0,P0(36,o|0,1,r|0,h|0),V=f,f=0,!(V&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(h),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)),l=e[s+4>>2]|0,(l+-1|0)>>>0>65534&&(o=de(16)|0,f=0,m0(5,g|0,48599,42),V=f,f=0,V&1?r=b()|0:(f=0,r=g0(1)|0,V=f,f=0,!(V&1)&&(f=0,P0(36,o|0,1,r|0,g|0),V=f,f=0,!(V&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(g),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)),o=e[s+8>>2]|0,(o+-2|0)>>>0>14&&(o=de(16)|0,f=0,m0(5,C|0,48642,46),V=f,f=0,V&1?r=b()|0:(f=0,r=g0(1)|0,V=f,f=0,!(V&1)&&(f=0,P0(36,o|0,1,r|0,C|0),V=f,f=0,!(V&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(C),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)),t=e[s+24>>2]|0,t>>>0>=3&&(o=de(16)|0,f=0,m0(5,I|0,48689,65),V=f,f=0,V&1?r=b()|0:(f=0,r=g0(1)|0,V=f,f=0,!(V&1)&&(f=0,P0(36,o|0,1,r|0,I|0),V=f,f=0,!(V&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(I),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)),r=e[s+16>>2]|0,(r+-1|0)>>>0>254&&(o=de(16)|0,f=0,m0(5,k|0,48755,44),V=f,f=0,V&1?r=b()|0:(f=0,r=g0(1)|0,V=f,f=0,!(V&1)&&(f=0,P0(36,o|0,1,r|0,k|0),V=f,f=0,!(V&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(k),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)),!c&&(k=W(l,a)|0,(W(W(k,(o|0)>8?2:1)|0,r)|0)>>>0>n>>>0)&&(o=de(16)|0,f=0,m0(5,U|0,48800,58),V=f,f=0,V&1?r=b()|0:(f=0,r=g0(1)|0,V=f,f=0,!(V&1)&&(f=0,P0(36,o|0,1,r|0,U|0),V=f,f=0,!(V&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(U),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)),r|0){case 4:{if((t|0)!=2){y=p;return}o=de(16)|0,f=0,m0(5,B|0,48859,73),V=f,f=0,V&1?r=b()|0:(f=0,r=g0(1)|0,V=f,f=0,!(V&1)&&(f=0,P0(36,o|0,1,r|0,B|0),V=f,f=0,!(V&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(B),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)}case 3:{y=p;return}default:{if(!t){y=p;return}o=de(16)|0,f=0,m0(5,V|0,48933,73),B=f,f=0,B&1?r=b()|0:(f=0,r=g0(1)|0,B=f,f=0,!(B&1)&&(f=0,P0(36,o|0,1,r|0,V|0),B=f,f=0,!(B&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(V),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)}}}function Ie(t){t=t|0,zi(t|0)|0,Ig()}function as(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+128|0,l=g+116|0,a=g,f=0,e[l>>2]=e[r>>2],e[l+4>>2]=e[r+4>>2],e[l+8>>2]=e[r+8>>2],h0(59,a|0,l|0),o=f,f=0,!(o&1)){if(n){o=a+16|0,r=o+84|0;do e[o>>2]=e[n>>2],o=o+4|0,n=n+4|0;while((o|0)<(r|0))}if(f=0,e[l>>2]=e[t>>2],e[l+4>>2]=e[t+4>>2],e[l+8>>2]=e[t+8>>2],h0(60,a|0,l|0),a=f,f=0,!(a&1))return s&&(d[s>>0]=0),p=0,y=g,p|0}if(t=b(824,0)|0,a=I0,a=(a|0)==(Lr(824)|0),t=zi(t|0)|0,r=(s|0)==0,!a)return r||(d[s>>0]=0),Wi(),p=14,y=g,p|0;o=t+12|0;do if(r)p=10;else if(r=e[o>>2]|0,f=0,n=g0(1)|0,a=f,f=0,!(a&1))if((r|0)==(n|0)){E1(s,Se[e[(e[t>>2]|0)+8>>2]&127](t)|0)|0,p=10;break}else{d[s>>0]=0,p=10;break}while(!1);return(p|0)==10&&(c=e[o>>2]|0,f=0,h=g0(1)|0,p=f,f=0,!(p&1))?(p=(c|0)==(h|0)?e[t+8>>2]|0:13,Wi(),y=g,p|0):(r=b()|0,f=0,we(3),g=f,f=0,g&1?(g=b(0)|0,Ie(g)):r0(r|0),0)}function fs(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(h=y,y=y+128|0,o=h+116|0,s=h,f=0,e[o>>2]=e[t>>2],e[o+4>>2]=e[t+4>>2],e[o+8>>2]=e[t+8>>2],h0(59,s|0,o|0),o=f,f=0,!(o&1)&&(f=0,n0(177,s|0),o=f,f=0,!(o&1))&&(f=0,h0(61,s|0,1),o=f,f=0,!(o&1))){t=s+16|0,s=r+84|0;do e[r>>2]=e[t>>2],r=r+4|0,t=t+4|0;while((r|0)<(s|0));return n&&(d[n>>0]=0),n=0,y=h,n|0}if(o=b(824,0)|0,r=I0,r=(r|0)==(Lr(824)|0),o=zi(o|0)|0,t=(n|0)==0,!r)return t||(d[n>>0]=0),Wi(),n=14,y=h,n|0;r=o+12|0;do if(t)c=13;else if(t=e[r>>2]|0,f=0,s=g0(1)|0,p=f,f=0,!(p&1))if((t|0)==(s|0)){E1(n,Se[e[(e[o>>2]|0)+8>>2]&127](o)|0)|0,c=13;break}else{d[n>>0]=0,c=13;break}while(!1);return(c|0)==13&&(l=e[r>>2]|0,f=0,a=g0(1)|0,p=f,f=0,!(p&1))?(p=(l|0)==(a|0)?e[o+8>>2]|0:13,Wi(),y=h,p|0):(t=b()|0,f=0,we(3),p=f,f=0,p&1?(p=b(0)|0,Ie(p)):r0(t|0),0)}function us(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0;return C=y,y=y+48|0,h=C+36|0,c=C+24|0,p=C+12|0,g=C,(t|0)!=0&(n|0)!=0&(s|0)!=0&(l|0)!=0?(e[p>>2]=0,e[p+4>>2]=t,e[p+8>>2]=r,e[g>>2]=0,e[g+4>>2]=s,e[g+8>>2]=o,e[c>>2]=e[p>>2],e[c+4>>2]=e[p+4>>2],e[c+8>>2]=e[p+8>>2],e[h>>2]=e[g>>2],e[h+4>>2]=e[g+4>>2],e[h+8>>2]=e[g+8>>2],o=os(c,n,h,l,a)|0,y=C,o|0):(o=1,y=C,o|0)}function cs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0;return o=y,y=y+32|0,l=o+12|0,a=o,c=a,e[c>>2]=0,e[c+4>>2]=0,e[a+4>>2]=t,e[a+8>>2]=r,e[l>>2]=e[a>>2],e[l+4>>2]=e[a+4>>2],e[l+8>>2]=e[a+8>>2],n=fs(l,n,s)|0,y=o,n|0}function hs(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+48|0,c=a+36|0,h=a+24|0,g=a+12|0,p=a,e[g>>2]=0,e[g+4>>2]=t,e[g+8>>2]=r,e[p>>2]=0,e[p+4>>2]=n,e[p+8>>2]=s,e[h>>2]=e[g>>2],e[h+4>>2]=e[g+4>>2],e[h+8>>2]=e[g+8>>2],e[c>>2]=e[p>>2],e[c+4>>2]=e[p+4>>2],e[c+8>>2]=e[p+8>>2],s=as(h,c,o,l)|0,y=a,s|0}function ms(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(p=t+4|0,n=e[t>>2]|0,o=((e[p>>2]|0)-n>>2)+1|0,o>>>0>1073741823&&(ct(t),n=e[t>>2]|0),g=t+8|0,s=(e[g>>2]|0)-n|0,s>>2>>>0<536870911?(s=s>>1,s=s>>>0>>0?o:s,n=(e[p>>2]|0)-n>>2,s?c=6:(l=0,a=0)):(s=1073741823,n=(e[p>>2]|0)-n>>2,c=6),(c|0)==6&&(l=s,a=G0(s<<2)|0),o=a+(n<<2)|0,s=o,h=a+(l<<2)|0,c=e[r>>2]|0,e[r>>2]=0,e[o>>2]=c,c=a+(n+1<<2)|0,a=e[t>>2]|0,n=e[p>>2]|0,(n|0)==(a|0))o=t,l=p;else{do n=n+-4|0,r=e[n>>2]|0,e[n>>2]=0,e[o+-4>>2]=r,o=s+-4|0,s=o;while((n|0)!=(a|0));n=s,o=t,l=p,s=n,a=e[t>>2]|0,n=e[p>>2]|0}if(e[o>>2]=s,e[l>>2]=c,e[g>>2]=h,o=a,(n|0)!=(o|0))do n=n+-4|0,s=e[n>>2]|0,e[n>>2]=0,s&&Ce[e[(e[s>>2]|0)+4>>2]&255](s);while((n|0)!=(o|0));a&&a0(a)}function ds(){return d[8]|0||!(Ae(8)|0)||(Te(72,35648,Q|0)|0,ve(8)),35648}function sr(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;g=y,y=y+32|0,h=g,hi(h,(1<>2]|0,p=l+1|0,n=p<<1,e[t>>2]=0,a=t+4|0,e[a>>2]=0,e[t+8>>2]=0;e:do if(p){if((l|0)<-1&&(f=0,n0(178,t|0),c=f,f=0,c&1)||(s=4),(s|0)==4&&(f=0,o=u0(67,n|0)|0,c=f,f=0,!(c&1))){for(e[a>>2]=o,e[t>>2]=o,e[t+8>>2]=o+n,r=o;;)if(d[r>>0]=0,r=(e[a>>2]|0)+1|0,e[a>>2]=r,n=n+-1|0,!n)break e}n=b()|0,r=e[t>>2]|0,r||r0(n|0),(e[a>>2]|0)!=(r|0)&&(e[a>>2]=r),a0(r),r0(n|0)}while(!1);if(r=~l,(l|0)<(r|0)){y=g;return}a=h+12|0,c=h+8|0,l=h+4|0,o=r;do r=e[a>>2]|0,(o|0)>(0-r|0)?(n=e[c>>2]|0,(o|0)>(0-n|0)?(s=e[l>>2]|0,(o|0)>(0-s|0)?(o|0)>=0?(o|0)>0?(s|0)<=(o|0)?(n|0)>(o|0)?r=2:r=(r|0)>(o|0)?3:4:r=1:r=0:r=-1:r=-2):r=-3):r=-4,d[(e[t>>2]|0)+(o+p)>>0]=r,o=o+1|0;while((o|0)<(p|0));y=g}function gs(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;switch(I=e[n+16>>2]|0,I|0){case 64:case 0:{f=0,t=y0(34,t|0,r|0)|0,r=f,f=0,r&1?k=16:s=t;break}default:{for(o=(1<>2])+-1|0,C=e[r+20>>2]|0,g=C<<1,g=((g+o|0)/(g|1|0)|0)+1|0,t=0;(1<>2]|0,f=0,s=u0(67,4624)|0,p=f,f=0,p&1)k=16;else{l=((a|0)<8?8:a)+a<<1,c=s+4|0,h=r,p=c+84|0;do e[c>>2]=e[h>>2],c=c+4|0,h=h+4|0;while((c|0)<(p|0));c=s+88|0,p=c+40|0;do e[c>>2]=0,c=c+4|0;while((c|0)<(p|0));e[s>>2]=35660,e[s+128>>2]=o,e[s+132>>2]=g,e[s+136>>2]=C,e[s+140>>2]=t,e[s+144>>2]=a,e[s+148>>2]=l,e[s+152>>2]=I,t=s+156|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+172>>2]=e[r>>2],e[s+176>>2]=0,e[s+180>>2]=0,e[s+184>>2]=0,t=s+4568|0,o=s+188|0;do e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,E[o+10>>1]=1,o=o+12|0;while((o|0)!=(t|0));e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4580|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4592|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+28>>2]|0||(e[s+20>>2]=1)}}}return(k|0)==16&&(k=b()|0,r0(k|0)),!s||(f=0,h0(e[(e[s>>2]|0)+12>>2]|0,s|0,n|0),k=f,f=0,!(k&1))?s|0:(t=b()|0,s||(k=t,r0(k|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),k=t,r0(k|0),0)}function ps(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(n=(e[r+24>>2]|0)==2,n&&(e[r+16>>2]|0)!=3)return r=0,r|0;g=e[r+20>>2]|0,t=e[r+8>>2]|0;e:do if(!g){if(n){if((t|0)!=8)break;s=G0(4600)|0,a=s+4|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));a=s+88|0,h=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(h|0));e[s>>2]=35688,t=s+132|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+148>>2]=e[r>>2],e[s+152>>2]=0,e[s+156>>2]=0,e[s+160>>2]=0,t=s+4544|0,n=s+164|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4556|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4568|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+28>>2]|0||(e[s+20>>2]=1),r=s,r|0}switch(t|0){case 8:{s=G0(4600)|0,a=s+4|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));a=s+88|0,h=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(h|0));e[s>>2]=35716,t=s+132|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+148>>2]=e[r>>2],e[s+152>>2]=0,e[s+156>>2]=0,e[s+160>>2]=0,t=s+4544|0,n=s+164|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4556|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4568|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+28>>2]|0||(e[s+20>>2]=1),r=s,r|0}case 12:{s=G0(4600)|0,a=s+4|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));a=s+88|0,h=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(h|0));e[s>>2]=35744,t=s+132|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+148>>2]=e[r>>2],e[s+152>>2]=0,e[s+156>>2]=0,e[s+160>>2]=0,t=s+4544|0,n=s+164|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4556|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4568|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+28>>2]|0||(e[s+20>>2]=1),r=s,r|0}case 16:{s=G0(4600)|0,a=s+4|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));a=s+88|0,h=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(h|0));e[s>>2]=35772,t=s+132|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+148>>2]=e[r>>2],e[s+152>>2]=0,e[s+156>>2]=0,e[s+160>>2]=0,t=s+4544|0,n=s+164|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4556|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4568|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+28>>2]|0||(e[s+20>>2]=1),r=s,r|0}default:break e}}while(!1);if(p=(1<>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));a=o+88|0,h=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(h|0));e[o>>2]=35800,e[o+128>>2]=p,e[o+132>>2]=l,e[o+136>>2]=g,e[o+140>>2]=t,e[o+144>>2]=n,e[o+148>>2]=s,e[o+152>>2]=64,t=o+156|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+172>>2]=e[r>>2],e[o+176>>2]=0,e[o+180>>2]=0,e[o+184>>2]=0,t=o+4568|0,n=o+188|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=o+4580|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=o+4592|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+28>>2]|0||(e[o+20>>2]=1),r=o,r|0}else{for(t=0;(1<>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));a=o+88|0,h=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(h|0));e[o>>2]=35660,e[o+128>>2]=p,e[o+132>>2]=l,e[o+136>>2]=g,e[o+140>>2]=t,e[o+144>>2]=n,e[o+148>>2]=s,e[o+152>>2]=64,t=o+156|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+172>>2]=e[r>>2],e[o+176>>2]=0,e[o+180>>2]=0,e[o+184>>2]=0,t=o+4568|0,n=o+188|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=o+4580|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=o+4592|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+28>>2]|0||(e[o+20>>2]=1),r=o,r|0}if((t|0)>=17)return r=0,r|0;if(l=g<<1,l=((l+p|0)/(l|1|0)|0)+1|0,n){for(t=0;(1<>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));a=o+88|0,h=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(h|0));e[o>>2]=35828,e[o+128>>2]=p,e[o+132>>2]=l,e[o+136>>2]=g,e[o+140>>2]=t,e[o+144>>2]=n,e[o+148>>2]=s,e[o+152>>2]=64,t=o+156|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+172>>2]=e[r>>2],e[o+176>>2]=0,e[o+180>>2]=0,e[o+184>>2]=0,t=o+4568|0,n=o+188|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=o+4580|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=o+4592|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+28>>2]|0||(e[o+20>>2]=1),r=o,r|0}else{for(t=0;(1<>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));a=o+88|0,h=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(h|0));e[o>>2]=35856,e[o+128>>2]=p,e[o+132>>2]=l,e[o+136>>2]=g,e[o+140>>2]=t,e[o+144>>2]=n,e[o+148>>2]=s,e[o+152>>2]=64,t=o+156|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+172>>2]=e[r>>2],e[o+176>>2]=0,e[o+180>>2]=0,e[o+184>>2]=0,t=o+4568|0,n=o+188|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=o+4580|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=o+4592|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+28>>2]|0||(e[o+20>>2]=1),r=o,r|0}return 0}function As(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;switch(I=e[n+16>>2]|0,I|0){case 64:case 0:{f=0,t=y0(35,t|0,r|0)|0,r=f,f=0,r&1?k=16:s=t;break}default:{for(o=(1<>2])+-1|0,C=e[r+20>>2]|0,g=C<<1,g=((g+o|0)/(g|1|0)|0)+1|0,t=0;(1<>2]|0,f=0,s=u0(67,4632)|0,p=f,f=0,p&1)k=16;else{l=((a|0)<8?8:a)+a<<1,e[s+4>>2]=0,c=s+8|0,h=r,p=c+84|0;do e[c>>2]=e[h>>2],c=c+4|0,h=h+4|0;while((c|0)<(p|0));e[s+92>>2]=0,e[s+96>>2]=0,e[s+100>>2]=32,e[s+104>>2]=0,e[s+108>>2]=0,d[s+112>>0]=0,p=s+116|0,e[p>>2]=0,e[p+4>>2]=0,e[p+8>>2]=0,e[p+12>>2]=0,e[p+16>>2]=0,e[s>>2]=35884,e[s+136>>2]=o,e[s+140>>2]=g,e[s+144>>2]=C,e[s+148>>2]=t,e[s+152>>2]=a,e[s+156>>2]=l,e[s+160>>2]=I,t=s+164|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+180>>2]=e[r>>2],e[s+184>>2]=0,e[s+188>>2]=0,e[s+192>>2]=0,t=s+4576|0,o=s+196|0;do e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,E[o+10>>1]=1,o=o+12|0;while((o|0)!=(t|0));e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4588|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4600|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+32>>2]|0||(e[s+24>>2]=1)}}}return(k|0)==16&&(k=b()|0,r0(k|0)),!s||(f=0,h0(e[(e[s>>2]|0)+8>>2]|0,s|0,n|0),k=f,f=0,!(k&1))?s|0:(t=b()|0,s||(k=t,r0(k|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),k=t,r0(k|0),0)}function Ss(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(n=(e[r+24>>2]|0)==2,n&&(e[r+16>>2]|0)!=3)return r=0,r|0;g=e[r+20>>2]|0,t=e[r+8>>2]|0;e:do if(!g){if(n){if((t|0)!=8)break;s=G0(4608)|0,e[s+4>>2]=0,a=s+8|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));e[s+92>>2]=0,e[s+96>>2]=0,e[s+100>>2]=32,e[s+104>>2]=0,e[s+108>>2]=0,d[s+112>>0]=0,t=s+116|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[s>>2]=35912,t=s+140|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+156>>2]=e[r>>2],e[s+160>>2]=0,e[s+164>>2]=0,e[s+168>>2]=0,t=s+4552|0,n=s+172|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4564|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4576|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+32>>2]|0||(e[s+24>>2]=1),r=s,r|0}switch(t|0){case 8:{s=G0(4608)|0,e[s+4>>2]=0,a=s+8|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));e[s+92>>2]=0,e[s+96>>2]=0,e[s+100>>2]=32,e[s+104>>2]=0,e[s+108>>2]=0,d[s+112>>0]=0,t=s+116|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[s>>2]=35940,t=s+140|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+156>>2]=e[r>>2],e[s+160>>2]=0,e[s+164>>2]=0,e[s+168>>2]=0,t=s+4552|0,n=s+172|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4564|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4576|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+32>>2]|0||(e[s+24>>2]=1),r=s,r|0}case 12:{s=G0(4608)|0,e[s+4>>2]=0,a=s+8|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));e[s+92>>2]=0,e[s+96>>2]=0,e[s+100>>2]=32,e[s+104>>2]=0,e[s+108>>2]=0,d[s+112>>0]=0,t=s+116|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[s>>2]=35968,t=s+140|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+156>>2]=e[r>>2],e[s+160>>2]=0,e[s+164>>2]=0,e[s+168>>2]=0,t=s+4552|0,n=s+172|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4564|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4576|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+32>>2]|0||(e[s+24>>2]=1),r=s,r|0}case 16:{s=G0(4608)|0,e[s+4>>2]=0,a=s+8|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));e[s+92>>2]=0,e[s+96>>2]=0,e[s+100>>2]=32,e[s+104>>2]=0,e[s+108>>2]=0,d[s+112>>0]=0,t=s+116|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[s>>2]=35996,t=s+140|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+156>>2]=e[r>>2],e[s+160>>2]=0,e[s+164>>2]=0,e[s+168>>2]=0,t=s+4552|0,n=s+172|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4564|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4576|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+32>>2]|0||(e[s+24>>2]=1),r=s,r|0}default:break e}}while(!1);if(p=(1<>2]=0,a=o+8|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));e[o+92>>2]=0,e[o+96>>2]=0,e[o+100>>2]=32,e[o+104>>2]=0,e[o+108>>2]=0,d[o+112>>0]=0,h=o+116|0,e[h>>2]=0,e[h+4>>2]=0,e[h+8>>2]=0,e[h+12>>2]=0,e[h+16>>2]=0,e[o>>2]=36024,e[o+136>>2]=p,e[o+140>>2]=l,e[o+144>>2]=g,e[o+148>>2]=t,e[o+152>>2]=n,e[o+156>>2]=s,e[o+160>>2]=64,t=o+164|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+180>>2]=e[r>>2],e[o+184>>2]=0,e[o+188>>2]=0,e[o+192>>2]=0,t=o+4576|0,n=o+196|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=o+4588|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=o+4600|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+32>>2]|0||(e[o+24>>2]=1),r=o,r|0}else{for(t=0;(1<>2]=0,a=o+8|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));e[o+92>>2]=0,e[o+96>>2]=0,e[o+100>>2]=32,e[o+104>>2]=0,e[o+108>>2]=0,d[o+112>>0]=0,h=o+116|0,e[h>>2]=0,e[h+4>>2]=0,e[h+8>>2]=0,e[h+12>>2]=0,e[h+16>>2]=0,e[o>>2]=35884,e[o+136>>2]=p,e[o+140>>2]=l,e[o+144>>2]=g,e[o+148>>2]=t,e[o+152>>2]=n,e[o+156>>2]=s,e[o+160>>2]=64,t=o+164|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+180>>2]=e[r>>2],e[o+184>>2]=0,e[o+188>>2]=0,e[o+192>>2]=0,t=o+4576|0,n=o+196|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=o+4588|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=o+4600|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+32>>2]|0||(e[o+24>>2]=1),r=o,r|0}if((t|0)>=17)return r=0,r|0;if(l=g<<1,l=((l+p|0)/(l|1|0)|0)+1|0,n){for(t=0;(1<>2]=0,a=o+8|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));e[o+92>>2]=0,e[o+96>>2]=0,e[o+100>>2]=32,e[o+104>>2]=0,e[o+108>>2]=0,d[o+112>>0]=0,h=o+116|0,e[h>>2]=0,e[h+4>>2]=0,e[h+8>>2]=0,e[h+12>>2]=0,e[h+16>>2]=0,e[o>>2]=36052,e[o+136>>2]=p,e[o+140>>2]=l,e[o+144>>2]=g,e[o+148>>2]=t,e[o+152>>2]=n,e[o+156>>2]=s,e[o+160>>2]=64,t=o+164|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+180>>2]=e[r>>2],e[o+184>>2]=0,e[o+188>>2]=0,e[o+192>>2]=0,t=o+4576|0,n=o+196|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=o+4588|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=o+4600|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+32>>2]|0||(e[o+24>>2]=1),r=o,r|0}else{for(t=0;(1<>2]=0,a=o+8|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));e[o+92>>2]=0,e[o+96>>2]=0,e[o+100>>2]=32,e[o+104>>2]=0,e[o+108>>2]=0,d[o+112>>0]=0,h=o+116|0,e[h>>2]=0,e[h+4>>2]=0,e[h+8>>2]=0,e[h+12>>2]=0,e[h+16>>2]=0,e[o>>2]=36080,e[o+136>>2]=p,e[o+140>>2]=l,e[o+144>>2]=g,e[o+148>>2]=t,e[o+152>>2]=n,e[o+156>>2]=s,e[o+160>>2]=64,t=o+164|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+180>>2]=e[r>>2],e[o+184>>2]=0,e[o+188>>2]=0,e[o+192>>2]=0,t=o+4576|0,n=o+196|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=o+4588|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=o+4600|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+32>>2]|0||(e[o+24>>2]=1),r=o,r|0}return 0}function vs(){var t=0,r=0,n=0,s=0,o=0,l=0,a=0;t=2832;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=4880);je(2832,0,2048)|0,t=0;do a=2832+(t+128<<3)|0,e[a>>2]=0,e[a+4>>2]=1,t=t+1|0;while((t|0)!=128);t=3088,e[t>>2]=1,e[t+4>>2]=3,t=3096,e[t>>2]=1,e[t+4>>2]=3,t=3104,e[t>>2]=1,e[t+4>>2]=3,t=3112,e[t>>2]=1,e[t+4>>2]=3,t=3120,e[t>>2]=1,e[t+4>>2]=3,t=3128,e[t>>2]=1,e[t+4>>2]=3,t=3136,e[t>>2]=1,e[t+4>>2]=3,t=3144,e[t>>2]=1,e[t+4>>2]=3,t=3152,e[t>>2]=1,e[t+4>>2]=3,t=3160,e[t>>2]=1,e[t+4>>2]=3,t=3168,e[t>>2]=1,e[t+4>>2]=3,t=3176,e[t>>2]=1,e[t+4>>2]=3,t=3184,e[t>>2]=1,e[t+4>>2]=3,t=3192,e[t>>2]=1,e[t+4>>2]=3,t=3200,e[t>>2]=1,e[t+4>>2]=3,t=3208,e[t>>2]=1,e[t+4>>2]=3,t=3216,e[t>>2]=1,e[t+4>>2]=3,t=3224,e[t>>2]=1,e[t+4>>2]=3,t=3232,e[t>>2]=1,e[t+4>>2]=3,t=3240,e[t>>2]=1,e[t+4>>2]=3,t=3248,e[t>>2]=1,e[t+4>>2]=3,t=3256,e[t>>2]=1,e[t+4>>2]=3,t=3264,e[t>>2]=1,e[t+4>>2]=3,t=3272,e[t>>2]=1,e[t+4>>2]=3,t=3280,e[t>>2]=1,e[t+4>>2]=3,t=3288,e[t>>2]=1,e[t+4>>2]=3,t=3296,e[t>>2]=1,e[t+4>>2]=3,t=3304,e[t>>2]=1,e[t+4>>2]=3,t=3312,e[t>>2]=1,e[t+4>>2]=3,t=3320,e[t>>2]=1,e[t+4>>2]=3,t=3328,e[t>>2]=1,e[t+4>>2]=3,t=3336,e[t>>2]=1,e[t+4>>2]=3,t=2896,e[t>>2]=2,e[t+4>>2]=5,t=2904,e[t>>2]=2,e[t+4>>2]=5,t=2912,e[t>>2]=2,e[t+4>>2]=5,t=2920,e[t>>2]=2,e[t+4>>2]=5,t=2928,e[t>>2]=2,e[t+4>>2]=5,t=2936,e[t>>2]=2,e[t+4>>2]=5,t=2944,e[t>>2]=2,e[t+4>>2]=5,t=2952,e[t>>2]=2,e[t+4>>2]=5,t=2848,e[t>>2]=3,e[t+4>>2]=7,t=2856,e[t>>2]=3,e[t+4>>2]=7,t=0;do a=2832+(t+64<<3)|0,e[a>>2]=-1,e[a+4>>2]=2,t=t+1|0;while((t|0)!=64);t=2960,e[t>>2]=-2,e[t+4>>2]=4,t=2968,e[t>>2]=-2,e[t+4>>2]=4,t=2976,e[t>>2]=-2,e[t+4>>2]=4,t=2984,e[t>>2]=-2,e[t+4>>2]=4,t=2992,e[t>>2]=-2,e[t+4>>2]=4,t=3e3,e[t>>2]=-2,e[t+4>>2]=4,t=3008,e[t>>2]=-2,e[t+4>>2]=4,t=3016,e[t>>2]=-2,e[t+4>>2]=4,t=3024,e[t>>2]=-2,e[t+4>>2]=4,t=3032,e[t>>2]=-2,e[t+4>>2]=4,t=3040,e[t>>2]=-2,e[t+4>>2]=4,t=3048,e[t>>2]=-2,e[t+4>>2]=4,t=3056,e[t>>2]=-2,e[t+4>>2]=4,t=3064,e[t>>2]=-2,e[t+4>>2]=4,t=3072,e[t>>2]=-2,e[t+4>>2]=4,t=3080,e[t>>2]=-2,e[t+4>>2]=4,t=2864,e[t>>2]=-3,e[t+4>>2]=6,t=2872,e[t>>2]=-3,e[t+4>>2]=6,t=2880,e[t>>2]=-3,e[t+4>>2]=6,t=2888,e[t>>2]=-3,e[t+4>>2]=6,t=2840,e[t>>2]=-4,e[t+4>>2]=8,t=4880;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=6928);for(je(4880,0,2048)|0,n=2,t=0,o=0,l=0;;){if(n=n<<16>>16,r=8-n|0,s=1<>2]=o,e[a+4>>2]=n,r=r+1|0;while((r|0)<(s|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==7){r=2,o=1,l=-1,a=-1;break}else n=(t>>1)+2|0,o=r>>16}for(;;){if(n=r<<16>>16,t=8-n|0,s=1<>2]=l,e[o+4>>2]=n,r=r+1|0;while((r|0)<(s|0))}if(t=(a<<16)+-65536|0,o=t>>31^t>>15,r=(o>>1)+2|0,(r|0)>8){t=6928;break}else l=t>>16,a=a+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=8976);for(je(6928,0,2048)|0,o=3,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==12){o=3,r=1,s=-1,l=-1;break}else o=(t>>2)+3|0,s=r>>16}for(;;){if(t=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(t=(l<<16)+-65536|0,r=t>>31^t>>15,o=(r>>2)+3|0,(o|0)>8){t=8976;break}else s=t>>16,l=l+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=11024);for(je(8976,0,2048)|0,o=4,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==20){o=4,r=1,s=-1,l=-1;break}else o=(t>>3)+4|0,s=r>>16}for(;;){if(t=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(t=(l<<16)+-65536|0,r=t>>31^t>>15,o=(r>>3)+4|0,(o|0)>8){t=11024;break}else s=t>>16,l=l+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=13072);for(je(11024,0,2048)|0,o=5,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==32){o=5,r=1,s=-1,l=-1;break}else o=(t>>4)+5|0,s=r>>16}for(;;){if(t=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(t=(l<<16)+-65536|0,r=t>>31^t>>15,o=(r>>4)+5|0,(o|0)>8){t=13072;break}else s=t>>16,l=l+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=15120);for(je(13072,0,2048)|0,o=6,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==48){o=6,r=1,s=-1,l=-1;break}else o=(t>>5)+6|0,s=r>>16}for(;;){if(t=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(t=(l<<16)+-65536|0,r=t>>31^t>>15,o=(r>>5)+6|0,(o|0)>8){t=15120;break}else s=t>>16,l=l+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=17168);for(je(15120,0,2048)|0,o=7,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==64){o=7,r=1,s=-1,l=-1;break}else o=(t>>6)+7|0,s=r>>16}for(;;){if(t=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(t=(l<<16)+-65536|0,r=t>>31^t>>15,o=(r>>6)+7|0,(o|0)>8){t=17168;break}else s=t>>16,l=l+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=19216);for(je(17168,0,2048)|0,o=8,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==64){l=8,s=1,o=-1,a=-1;break}else o=(t>>7)+8|0,s=r>>16}for(;;){if(t=8-l|0,n=1<>2]=o,e[s+4>>2]=l,r=r+1|0;while((r|0)<(n|0))}if(r=(a<<16)+-65536|0,s=r>>31^r>>15,t=s>>7,(t|0)>0){t=19216;break}else l=t+8|0,o=r>>16,a=a+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=21264);je(19216,0,2048)|0,t=21264;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=23312);je(21264,0,2048)|0,t=23312;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=25360);je(23312,0,2048)|0,t=25360;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=27408);je(25360,0,2048)|0,t=27408;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=29456);je(27408,0,2048)|0,t=29456;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=31504);je(29456,0,2048)|0,t=31504;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=33552);je(31504,0,2048)|0,t=33552;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=35600);je(33552,0,2048)|0,sr(35600,8),Te(179,35600,Q|0)|0,sr(35612,10),Te(179,35612,Q|0)|0,sr(35624,12),Te(179,35624,Q|0)|0,sr(35636,16),Te(179,35636,Q|0)|0}function ws(t){t=t|0;var r=0;r=e[t>>2]|0,r&&(t=t+4|0,(e[t>>2]|0)!=(r|0)&&(e[t>>2]=r),a0(r))}function Ts(t){t=t|0;var r=0,n=0;e[t>>2]=36080,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Cs(t){t=t|0;var r=0,n=0;if(e[t>>2]=36080,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function xs(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;a=y,y=y+32|0,h=a,hi(h,e[t+136>>2]|0,e[t+144>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[h+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[h+12>>2]|0,n=e[r+16>>2]|0,s=e[h+16>>2]|0,e[t+184>>2]=c|0?c:e[h+4>>2]|0,e[t+188>>2]=l,e[t+192>>2]=o,qo(t),o=t+140|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+196+(l*12|0)>>2]=r,e[t+196+(l*12|0)+4>>2]=0,E[t+196+(l*12|0)+8>>1]=0,E[t+196+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,h=(n|0?n:s)&255,e[t+4576>>2]=c,e[t+4580>>2]=0,d[t+4584>>0]=h,d[t+4585>>0]=1,d[t+4586>>0]=0,e[t+4588>>2]=c,e[t+4592>>2]=1,d[t+4596>>0]=h,d[t+4597>>0]=1,d[t+4598>>0]=0,e[t+4600>>2]=0,y=a}function ys(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+16|0,h=g,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[h>>2]=0,e[h+4>>2]=s,c=n+8|0,e[h+8>>2]=e[c>>2],s){r=G0(4624)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35856,e[r+128>>2]=e[t+136>>2],e[r+132>>2]=e[t+140>>2],e[r+136>>2]=e[t+144>>2],e[r+140>>2]=e[t+148>>2],e[r+144>>2]=e[t+152>>2],e[r+148>>2]=e[t+156>>2],e[r+152>>2]=e[t+160>>2],o=r+156|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+172>>2]=e[s>>2],e[r+176>>2]=0,e[r+180>>2]=0,e[r+184>>2]=0,o=r+4568|0,s=r+188|0;do e[s>>2]=0,e[s+4>>2]=0,E[s+8>>1]=0,E[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,d[o+10>>0]=0,a=r+4580|0,e[a>>2]=0,e[a+4>>2]=0,E[a+8>>1]=0,d[a+10>>0]=0,a=r+4592|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,h)}return h=t+100|0,e[h>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(p=r+4e3|0,(s|0)!=(p|0))&&(e[c>>2]=p,s=p):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,X1(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],X1(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0)}function Is(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(k=t+8|0,B=t+36|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(37,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(38,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(39,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(40,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function Ds(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;e[t>>2]=36460,e[t+4>>2]=n,C=t+8|0,l=e[n>>2]|0,p=n+16|0,s=e[p>>2]|0,a=W(s,l)|0,e[C>>2]=0,I=t+12|0,e[I>>2]=0,e[t+16>>2]=0;do if(a){if((a|0)<0&&(f=0,n0(178,C|0),l=f,f=0,l&1)||(g=4),(g|0)==4&&(c=a<<1,f=0,h=u0(67,c|0)|0,l=f,f=0,!(l&1))){e[C>>2]=h,l=h+(a<<1)|0,e[t+16>>2]=l,je(h|0,0,c|0)|0,e[I>>2]=l,l=e[n>>2]|0,s=e[p>>2]|0;break}a=b()|0,o=e[C>>2]|0,s=o,o&&(l=e[I>>2]|0,(l|0)!=(o|0)&&(e[I>>2]=l+(~((l+-2-s|0)>>>1)<<1)),a0(o)),I=a,r0(I|0)}while(!1);if(a=t+20|0,s=W(l<<1,s)|0,e[a>>2]=0,c=t+24|0,e[c>>2]=0,e[t+28>>2]=0,!s){I=t+36|0,e[I>>2]=e[r>>2],e[I+4>>2]=e[r+4>>2],e[I+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(g=13),(g|0)==13&&(f=0,o=u0(67,s|0)|0,g=f,f=0,!(g&1))){e[c>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[c>>2]|0)+1|0,e[c>>2]=o,s=s+-1|0;while(s|0);I=t+36|0,e[I>>2]=e[r>>2],e[I+4>>2]=e[r+4>>2],e[I+8>>2]=e[r+8>>2];return}l=b()|0,o=e[a>>2]|0,o&&((e[c>>2]|0)!=(o|0)&&(e[c>>2]=o),a0(o)),o=e[C>>2]|0,o||(I=l,r0(I|0)),s=e[I>>2]|0,(s|0)!=(o|0)&&(e[I>>2]=s+(~((s+-2-o|0)>>>1)<<1)),a0(o),I=l,r0(I|0)}function Es(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;e[t>>2]=36436,e[t+4>>2]=n,C=t+8|0,l=e[n>>2]|0,p=n+16|0,s=e[p>>2]|0,a=W(s,l)|0,e[C>>2]=0,I=t+12|0,e[I>>2]=0,e[t+16>>2]=0;do if(a){if((a|0)<0&&(f=0,n0(178,C|0),l=f,f=0,l&1)||(g=4),(g|0)==4&&(c=a<<1,f=0,h=u0(67,c|0)|0,l=f,f=0,!(l&1))){e[C>>2]=h,l=h+(a<<1)|0,e[t+16>>2]=l,je(h|0,0,c|0)|0,e[I>>2]=l,l=e[n>>2]|0,s=e[p>>2]|0;break}a=b()|0,o=e[C>>2]|0,s=o,o&&(l=e[I>>2]|0,(l|0)!=(o|0)&&(e[I>>2]=l+(~((l+-2-s|0)>>>1)<<1)),a0(o)),I=a,r0(I|0)}while(!1);if(a=t+20|0,s=W(l<<1,s)|0,e[a>>2]=0,c=t+24|0,e[c>>2]=0,e[t+28>>2]=0,!s){I=t+36|0,e[I>>2]=e[r>>2],e[I+4>>2]=e[r+4>>2],e[I+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(g=13),(g|0)==13&&(f=0,o=u0(67,s|0)|0,g=f,f=0,!(g&1))){e[c>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[c>>2]|0)+1|0,e[c>>2]=o,s=s+-1|0;while(s|0);I=t+36|0,e[I>>2]=e[r>>2],e[I+4>>2]=e[r+4>>2],e[I+8>>2]=e[r+8>>2];return}l=b()|0,o=e[a>>2]|0,o&&((e[c>>2]|0)!=(o|0)&&(e[c>>2]=o),a0(o)),o=e[C>>2]|0,o||(I=l,r0(I|0)),s=e[I>>2]|0,(s|0)!=(o|0)&&(e[I>>2]=s+(~((s+-2-o|0)>>>1)<<1)),a0(o),I=l,r0(I|0)}function ks(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;e[t>>2]=36412,e[t+4>>2]=n,C=t+8|0,l=e[n>>2]|0,p=n+16|0,s=e[p>>2]|0,a=W(s,l)|0,e[C>>2]=0,I=t+12|0,e[I>>2]=0,e[t+16>>2]=0;do if(a){if((a|0)<0&&(f=0,n0(178,C|0),l=f,f=0,l&1)||(g=4),(g|0)==4&&(c=a<<1,f=0,h=u0(67,c|0)|0,l=f,f=0,!(l&1))){e[C>>2]=h,l=h+(a<<1)|0,e[t+16>>2]=l,je(h|0,0,c|0)|0,e[I>>2]=l,l=e[n>>2]|0,s=e[p>>2]|0;break}a=b()|0,o=e[C>>2]|0,s=o,o&&(l=e[I>>2]|0,(l|0)!=(o|0)&&(e[I>>2]=l+(~((l+-2-s|0)>>>1)<<1)),a0(o)),I=a,r0(I|0)}while(!1);if(a=t+20|0,s=W(l<<1,s)|0,e[a>>2]=0,c=t+24|0,e[c>>2]=0,e[t+28>>2]=0,!s){I=t+36|0,e[I>>2]=e[r>>2],e[I+4>>2]=e[r+4>>2],e[I+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(g=13),(g|0)==13&&(f=0,o=u0(67,s|0)|0,g=f,f=0,!(g&1))){e[c>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[c>>2]|0)+1|0,e[c>>2]=o,s=s+-1|0;while(s|0);I=t+36|0,e[I>>2]=e[r>>2],e[I+4>>2]=e[r+4>>2],e[I+8>>2]=e[r+8>>2];return}l=b()|0,o=e[a>>2]|0,o&&((e[c>>2]|0)!=(o|0)&&(e[c>>2]=o),a0(o)),o=e[C>>2]|0,o||(I=l,r0(I|0)),s=e[I>>2]|0,(s|0)!=(o|0)&&(e[I>>2]=s+(~((s+-2-o|0)>>>1)<<1)),a0(o),I=l,r0(I|0)}function Fs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;e[t>>2]=36388,e[t+4>>2]=n,C=t+8|0,l=e[n>>2]|0,p=n+16|0,s=e[p>>2]|0,a=W(s,l)|0,e[C>>2]=0,I=t+12|0,e[I>>2]=0,e[t+16>>2]=0;do if(a){if((a|0)<0&&(f=0,n0(178,C|0),l=f,f=0,l&1)||(g=4),(g|0)==4&&(c=a<<1,f=0,h=u0(67,c|0)|0,l=f,f=0,!(l&1))){e[C>>2]=h,l=h+(a<<1)|0,e[t+16>>2]=l,je(h|0,0,c|0)|0,e[I>>2]=l,l=e[n>>2]|0,s=e[p>>2]|0;break}a=b()|0,o=e[C>>2]|0,s=o,o&&(l=e[I>>2]|0,(l|0)!=(o|0)&&(e[I>>2]=l+(~((l+-2-s|0)>>>1)<<1)),a0(o)),I=a,r0(I|0)}while(!1);if(a=t+20|0,s=W(l<<1,s)|0,e[a>>2]=0,c=t+24|0,e[c>>2]=0,e[t+28>>2]=0,!s){I=t+36|0,e[I>>2]=e[r>>2],e[I+4>>2]=e[r+4>>2],e[I+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(g=13),(g|0)==13&&(f=0,o=u0(67,s|0)|0,g=f,f=0,!(g&1))){e[c>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[c>>2]|0)+1|0,e[c>>2]=o,s=s+-1|0;while(s|0);I=t+36|0,e[I>>2]=e[r>>2],e[I+4>>2]=e[r+4>>2],e[I+8>>2]=e[r+8>>2];return}l=b()|0,o=e[a>>2]|0,o&&((e[c>>2]|0)!=(o|0)&&(e[c>>2]=o),a0(o)),o=e[C>>2]|0,o||(I=l,r0(I|0)),s=e[I>>2]|0,(s|0)!=(o|0)&&(e[I>>2]=s+(~((s+-2-o|0)>>>1)<<1)),a0(o),I=l,r0(I|0)}function Ms(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;a=t+32|0,a5(a,r)|0,l=t+44|0,e[l>>2]=0,c=t+48|0,o=e[c>>2]|0,o&8&&(r=d[a>>0]|0,r&1?(r=(e[t+40>>2]|0)+(e[t+36>>2]|0)|0,e[l>>2]=r,s=e[t+40>>2]|0,n=s):(r=((r&255)>>>1)+(a+1)|0,e[l>>2]=r,n=a+1|0,s=a+1|0),e[t+8>>2]=n,e[t+12>>2]=s,e[t+16>>2]=r),o&16&&(r=d[a>>0]|0,r&1?(o=e[t+36>>2]|0,e[l>>2]=(e[t+40>>2]|0)+o,r=(e[a>>2]&-2)+-1|0,l=o):(o=(r&255)>>>1,e[l>>2]=a+1+o,r=10,l=o),O2(a,r,0),r=d[a>>0]|0,r&1?(n=e[t+40>>2]|0,o=n,s=e[t+36>>2]|0):(o=a+1|0,s=(r&255)>>>1,n=a+1|0),r=t+24|0,e[r>>2]=n,e[t+20>>2]=n,e[t+28>>2]=o+s,e[c>>2]&3&&(e[r>>2]=n+l))}function _s(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;I=y,y=y+32|0,a=I+16|0,C=I+8|0,c=I,f=0,h0(65,C|0,t|0),p=f,f=0;e:do if(p&1)n=b(0)|0,s=t,o=t;else{do if(d[C>>0]|0){s=e[(e[t>>2]|0)+-12>>2]|0,e[c>>2]=e[t+(s+24)>>2],h=t+s|0,p=e[t+(s+4)>>2]|0,o=r+n|0,s=t+(s+76)|0,n=e[s>>2]|0;do if((n|0)==-1)if(f=0,n=u0(68,h|0)|0,k=f,f=0,k&1)g=13;else{if(e[a>>2]=n,f=0,n=y0(37,a|0,44220)|0,k=f,f=0,!(k&1)&&(f=0,l=y0(e[(e[n>>2]|0)+28>>2]|0,n|0,32)|0,k=f,f=0,!(k&1))){Mi(a),n=l<<24>>24,e[s>>2]=n,g=9;break}n=b(0)|0,Mi(a)}else g=9;while(!1);if((g|0)==9)if(f=0,e[a>>2]=e[c>>2],n=Fe(39,a|0,r|0,((p&176|0)==32?o:r)|0,o|0,h|0,n&255|0)|0,k=f,f=0,k&1)g=13;else{if(n)break;if(k=e[(e[t>>2]|0)+-12>>2]|0,f=0,h0(66,t+k|0,e[t+(k+16)>>2]|5|0),k=f,f=0,k&1)g=13;else break}(g|0)==13&&(n=b(0)|0),yt(C),s=t,o=t;break e}while(!1);return yt(C),y=I,t|0}while(!1);return zi(n|0)|0,f=0,n0(181,s+(e[(e[o>>2]|0)+-12>>2]|0)|0),k=f,f=0,k&1?(n=b()|0,f=0,we(3),k=f,f=0,k&1?(k=b(0)|0,Ie(k)):r0(n|0),0):(Wi(),y=I,t|0)}function Rs(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;if(n=e[r+48>>2]|0,n&16){if(n=r+44|0,s=e[n>>2]|0,o=e[r+24>>2]|0,s>>>0>>0?e[n>>2]=o:o=s,s=e[r+20>>2]|0,l=o-s|0,l>>>0>4294967279&&tt(t),l>>>0<11?(d[t>>0]=l<<1,n=t+1|0):(r=l+16&-16,n=G0(r)|0,e[t+8>>2]=n,e[t>>2]=r|1,e[t+4>>2]=l),(s|0)!=(o|0)){for(r=n;d[r>>0]=d[s>>0]|0,s=s+1|0,(s|0)!=(o|0);)r=r+1|0;n=n+l|0}d[n>>0]=0;return}if(!(n&8)){e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0;return}if(s=e[r+8>>2]|0,r=e[r+16>>2]|0,l=r-s|0,l>>>0>4294967279&&tt(t),l>>>0<11?(d[t>>0]=l<<1,n=t+1|0):(o=l+16&-16,n=G0(o)|0,e[t+8>>2]=n,e[t>>2]=o|1,e[t+4>>2]=l),(s|0)!=(r|0)){for(o=n;d[o>>0]=d[s>>0]|0,s=s+1|0,(s|0)!=(r|0);)o=o+1|0;n=n+l|0}d[n>>0]=0}function Ps(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;e[t>>2]=36364,e[t+4>>2]=n,I=t+8|0,a=e[n>>2]|0,g=n+16|0,l=e[g>>2]|0,p=W(l,a)|0,e[I>>2]=0,k=t+12|0,e[k>>2]=0,e[t+16>>2]=0;do if(p){if((p|0)<0&&(f=0,n0(178,I|0),a=f,f=0,a&1)||(C=4),(C|0)==4&&(c=p<<1,f=0,h=u0(67,c|0)|0,a=f,f=0,!(a&1))){e[I>>2]=h,a=h+(p<<1)|0,e[t+16>>2]=a,je(h|0,0,c|0)|0,e[k>>2]=a,a=e[n>>2]|0,l=e[g>>2]|0;break}c=b()|0,o=e[I>>2]|0,l=o,o&&(a=e[k>>2]|0,(a|0)!=(o|0)&&(e[k>>2]=a+(~((a+-2-l|0)>>>1)<<1)),a0(o)),k=c,r0(k|0)}while(!1);if(c=t+20|0,l=W(a<<1,l)|0,e[c>>2]=0,h=t+24|0,e[h>>2]=0,e[t+28>>2]=0,!l){k=t+32|0,I=s,I=e[I>>2]|0,s=s+4|0,s=e[s>>2]|0,C=k,e[C>>2]=I,k=k+4|0,e[k>>2]=s,k=t+40|0,e[k>>2]=I,k=t+48|0,e[k>>2]=e[r>>2],e[k+4>>2]=e[r+4>>2],e[k+8>>2]=e[r+8>>2];return}if((l|0)<0&&(f=0,n0(178,c|0),g=f,f=0,g&1)||(C=13),(C|0)==13&&(f=0,o=u0(67,l|0)|0,C=f,f=0,!(C&1))){e[h>>2]=o,e[c>>2]=o,e[t+28>>2]=o+l;do d[o>>0]=0,o=(e[h>>2]|0)+1|0,e[h>>2]=o,l=l+-1|0;while(l|0);k=t+32|0,I=s,I=e[I>>2]|0,s=s+4|0,s=e[s>>2]|0,C=k,e[C>>2]=I,k=k+4|0,e[k>>2]=s,k=t+40|0,e[k>>2]=I,k=t+48|0,e[k>>2]=e[r>>2],e[k+4>>2]=e[r+4>>2],e[k+8>>2]=e[r+8>>2];return}a=b()|0,o=e[c>>2]|0,o&&((e[h>>2]|0)!=(o|0)&&(e[h>>2]=o),a0(o)),o=e[I>>2]|0,o||(k=a,r0(k|0)),l=e[k>>2]|0,(l|0)!=(o|0)&&(e[k>>2]=l+(~((l+-2-o|0)>>>1)<<1)),a0(o),k=a,r0(k|0)}function Ls(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;e[t>>2]=36340,e[t+4>>2]=n,I=t+8|0,a=e[n>>2]|0,g=n+16|0,l=e[g>>2]|0,p=W(l,a)|0,e[I>>2]=0,k=t+12|0,e[k>>2]=0,e[t+16>>2]=0;do if(p){if((p|0)<0&&(f=0,n0(178,I|0),a=f,f=0,a&1)||(C=4),(C|0)==4&&(c=p<<1,f=0,h=u0(67,c|0)|0,a=f,f=0,!(a&1))){e[I>>2]=h,a=h+(p<<1)|0,e[t+16>>2]=a,je(h|0,0,c|0)|0,e[k>>2]=a,a=e[n>>2]|0,l=e[g>>2]|0;break}c=b()|0,o=e[I>>2]|0,l=o,o&&(a=e[k>>2]|0,(a|0)!=(o|0)&&(e[k>>2]=a+(~((a+-2-l|0)>>>1)<<1)),a0(o)),k=c,r0(k|0)}while(!1);if(c=t+20|0,l=W(a<<1,l)|0,e[c>>2]=0,h=t+24|0,e[h>>2]=0,e[t+28>>2]=0,!l){k=t+32|0,I=s,I=e[I>>2]|0,s=s+4|0,s=e[s>>2]|0,C=k,e[C>>2]=I,k=k+4|0,e[k>>2]=s,k=t+40|0,e[k>>2]=I,k=t+48|0,e[k>>2]=e[r>>2],e[k+4>>2]=e[r+4>>2],e[k+8>>2]=e[r+8>>2];return}if((l|0)<0&&(f=0,n0(178,c|0),g=f,f=0,g&1)||(C=13),(C|0)==13&&(f=0,o=u0(67,l|0)|0,C=f,f=0,!(C&1))){e[h>>2]=o,e[c>>2]=o,e[t+28>>2]=o+l;do d[o>>0]=0,o=(e[h>>2]|0)+1|0,e[h>>2]=o,l=l+-1|0;while(l|0);k=t+32|0,I=s,I=e[I>>2]|0,s=s+4|0,s=e[s>>2]|0,C=k,e[C>>2]=I,k=k+4|0,e[k>>2]=s,k=t+40|0,e[k>>2]=I,k=t+48|0,e[k>>2]=e[r>>2],e[k+4>>2]=e[r+4>>2],e[k+8>>2]=e[r+8>>2];return}a=b()|0,o=e[c>>2]|0,o&&((e[h>>2]|0)!=(o|0)&&(e[h>>2]=o),a0(o)),o=e[I>>2]|0,o||(k=a,r0(k|0)),l=e[k>>2]|0,(l|0)!=(o|0)&&(e[k>>2]=l+(~((l+-2-o|0)>>>1)<<1)),a0(o),k=a,r0(k|0)}function Us(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;e[t>>2]=36316,e[t+4>>2]=n,I=t+8|0,a=e[n>>2]|0,g=n+16|0,l=e[g>>2]|0,p=W(l,a)|0,e[I>>2]=0,k=t+12|0,e[k>>2]=0,e[t+16>>2]=0;do if(p){if((p|0)<0&&(f=0,n0(178,I|0),a=f,f=0,a&1)||(C=4),(C|0)==4&&(c=p<<1,f=0,h=u0(67,c|0)|0,a=f,f=0,!(a&1))){e[I>>2]=h,a=h+(p<<1)|0,e[t+16>>2]=a,je(h|0,0,c|0)|0,e[k>>2]=a,a=e[n>>2]|0,l=e[g>>2]|0;break}c=b()|0,o=e[I>>2]|0,l=o,o&&(a=e[k>>2]|0,(a|0)!=(o|0)&&(e[k>>2]=a+(~((a+-2-l|0)>>>1)<<1)),a0(o)),k=c,r0(k|0)}while(!1);if(c=t+20|0,l=W(a<<1,l)|0,e[c>>2]=0,h=t+24|0,e[h>>2]=0,e[t+28>>2]=0,!l){k=t+32|0,I=s,I=e[I>>2]|0,s=s+4|0,s=e[s>>2]|0,C=k,e[C>>2]=I,k=k+4|0,e[k>>2]=s,k=t+40|0,e[k>>2]=I,k=t+48|0,e[k>>2]=e[r>>2],e[k+4>>2]=e[r+4>>2],e[k+8>>2]=e[r+8>>2];return}if((l|0)<0&&(f=0,n0(178,c|0),g=f,f=0,g&1)||(C=13),(C|0)==13&&(f=0,o=u0(67,l|0)|0,C=f,f=0,!(C&1))){e[h>>2]=o,e[c>>2]=o,e[t+28>>2]=o+l;do d[o>>0]=0,o=(e[h>>2]|0)+1|0,e[h>>2]=o,l=l+-1|0;while(l|0);k=t+32|0,I=s,I=e[I>>2]|0,s=s+4|0,s=e[s>>2]|0,C=k,e[C>>2]=I,k=k+4|0,e[k>>2]=s,k=t+40|0,e[k>>2]=I,k=t+48|0,e[k>>2]=e[r>>2],e[k+4>>2]=e[r+4>>2],e[k+8>>2]=e[r+8>>2];return}a=b()|0,o=e[c>>2]|0,o&&((e[h>>2]|0)!=(o|0)&&(e[h>>2]=o),a0(o)),o=e[I>>2]|0,o||(k=a,r0(k|0)),l=e[k>>2]|0,(l|0)!=(o|0)&&(e[k>>2]=l+(~((l+-2-o|0)>>>1)<<1)),a0(o),k=a,r0(k|0)}function Os(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36316,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s))}function Ns(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36316,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,!s){a0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s),a0(t)}function Bs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;if(o=t+48|0,!(e[o>>2]|0)){c=t+52|0,b1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}h=t+4|0,l=n<<1,a=W(l,e[(e[h>>2]|0)+16>>2]|0)|0,c=t+20|0,b1(t,r,e[c>>2]|0,n,s),r=e[h>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),h=e[o>>2]|0,(Qe[e[(e[h>>2]|0)+48>>2]&63](h,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,3,35648),h=f,f=0,h&1?(h=b()|0,ge(r|0),r0(h|0)):Be(r|0,824,96))}function Vs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+48>>2]|0,o){qs(t,o,r,n,s);return}else{o=t+52|0,Ur(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Ur(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;h=t+4|0,l=e[h>>2]|0;do if(!(d[l+32>>0]|0))p=r;else{if(a=t+8|0,ii(e[a>>2]|0,r|0,s*6|0)|0,l=e[h>>2]|0,c=e[l+16>>2]|0,(s|0)<=0){p=e[a>>2]|0;break}for(r=e[a>>2]|0,l=r,a=0;p=l+4|0,g=E[l>>1]|0,E[l>>1]=E[p>>1]|0,E[p>>1]=g,a=a+1|0,(a|0)!=(s|0);)l=l+(c<<1)|0;p=r,l=e[h>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:if((e[l+24>>2]|0)==2){if((s|0)<=0)return;l=t+32|0,r=0;do g=e[l>>2]|0,h=q[p+(r*6|0)+2>>1]<>1]<>1]<>1]=(h+49152+((t+o|0)>>>2)&65535)>>>g,E[n+(r*6|0)+2>>1]=t>>>g,E[n+(r*6|0)+4>>1]=o>>>g,r=r+1|0;while((r|0)!=(s|0));return}else{if(a=(o|0)<(s|0)?o:s,(a|0)<=0)return;c=o<<1,l=e[t+32>>2]|0,r=0;do s=q[p+(r*6|0)+2>>1]<>1]<>1]<>1]=(s+49152+((t+g|0)>>>2)&65535)>>>l,E[n+(r+o<<1)>>1]=t>>>l,E[n+(r+c<<1)>>1]=g>>>l,r=r+1|0;while((r|0)!=(a|0));return}case 4:{if((e[l+24>>2]|0)!=1||(a=(o|0)<(s|0)?o:s,(a|0)<=0))return;c=o<<1,h=o*3|0,l=e[t+32>>2]|0,r=0;do g=E[p+(r<<3)+6>>1]|0,C=q[p+(r<<3)+2>>1]<>1]<>1]<>1]=(C+49152+((s+t|0)>>>2)&65535)>>>l,E[n+(r+o<<1)>>1]=s>>>l,E[n+(r+c<<1)>>1]=t>>>l,E[n+(r+h<<1)>>1]=g,r=r+1|0;while((r|0)!=(a|0));return}default:return}}function qs(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;C=y,y=y+176|0,I=C+152|0,U=C+16|0,k=C,h=t+4|0,l=e[h>>2]|0,g=s<<1,a=W(g,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=Qe[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){p=26;break}else a=a-l|0;if((p|0)==26){l=e[h>>2]|0;break}p=U+56|0,h=U+4|0,e[U>>2]=36160,e[p>>2]=36180,f=0,h0(62,U+56|0,h|0),C=f,f=0,C&1&&(U=b()|0,H0(p),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,h|0),C=f,f=0;do if(C&1)l=b()|0;else{if(e[h>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f=0,h0(63,h|0,I|0),C=f,f=0,C&1){l=b()|0,f0(I),f0(r),ce(h);break}f0(I),f=0,l=L0(28,U|0,49029,57)|0,I=f,f=0,!(I&1)&&(f=0,y0(36,l|0,0)|0,I=f,f=0,!(I&1))&&(c=de(16)|0,f=0,h0(64,k|0,h|0),I=f,f=0,I&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,k|0),I=f,f=0,I&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(k),a||(k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0))),ge(c|0),k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)),k=b()|0,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)}while(!1);U=l,H0(p),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,Ur(t,U,n,s,o),y=C;return}Zi(e[a>>2]|0,W(g,e[l+16>>2]|0)|0),U=e[a>>2]|0,Ur(t,U,n,s,o),y=C}function Zi(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;if(o=y,y=y+176|0,n=o+152|0,h=o+16|0,a=o,!(r&1)){if(n=(r|0)/4|0,(r|0)>3){s=0;do h=t+(s<<2)|0,c=e[h>>2]|0,e[h>>2]=c>>>8&16711935|c<<8&-16711936,s=s+1|0;while((s|0)<(n|0))}if(!(r&3)){y=o;return}a=t+(r+-2)|0,h=t+(r+-1)|0,c=d[a>>0]|0,d[a>>0]=d[h>>0]|0,d[h>>0]=c,y=o;return}c=h+56|0,l=h+4|0,e[h>>2]=36160,e[c>>2]=36180,f=0,h0(62,h+56|0,l|0),o=f,f=0,o&1&&(h=b()|0,H0(c),r0(h|0)),e[h+128>>2]=0,e[h+132>>2]=-1,e[h>>2]=36200,e[h+56>>2]=36220,f=0,n0(180,l|0),o=f,f=0;do if(o&1)n=b()|0;else{if(e[l>>2]=36236,o=h+36|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[h+52>>2]=16,e[n>>2]=0,e[n+4>>2]=0,e[n+8>>2]=0,f=0,h0(63,l|0,n|0),t=f,f=0,t&1){h=b()|0,f0(n),f0(o),ce(l),n=h;break}f0(n),f=0,n=L0(28,h|0,49087,24)|0,t=f,f=0,!(t&1)&&(f=0,s=y0(36,n|0,r|0)|0,r=f,f=0,!(r&1))&&(f=0,L0(28,s|0,49112,20)|0,r=f,f=0,!(r&1))&&(t=de(16)|0,f=0,h0(64,a|0,l|0),r=f,f=0,r&1?n=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,t|0,1,35648,a|0),r=f,f=0,r&1?s=1:(f=0,m0(6,t|0,824,96),f=0,s=0),n=b()|0,f0(a),s||(a=n,e[h>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,f0(o),ce(l),H0(c),r0(a|0))),ge(t|0),a=n,e[h>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,f0(o),ce(l),H0(c),r0(a|0)),a=b()|0,e[h>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,f0(o),ce(l),H0(c),r0(a|0)}while(!1);h=n,H0(c),r0(h|0)}function b1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;p=t+4|0,l=e[p>>2]|0;e:do switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)<=0)break e;l=t+40|0,t=0;do o=e[l>>2]|0,c=q[r+(t*6|0)+2>>1]<>1]<>1]<>2)+16384|0,E[n+(t*6|0)>>1]=(a+32768+h&65535)>>>o,E[n+(t*6|0)+2>>1]=(h&65535)>>>o,E[n+(t*6|0)+4>>1]=(c+32768+h&65535)>>>o,t=t+1|0;while((t|0)!=(s|0))}else{if(a=(s|0)<(o|0)?s:o,(a|0)<=0)break e;c=o<<1,l=t+40|0,t=0;do h=e[l>>2]|0,C=q[r+(t+o<<1)>>1]<>1]<>1]<>2)+16384|0,E[n+(t*6|0)>>1]=(I+32768+g&65535)>>>h,E[n+(t*6|0)+2>>1]=(g&65535)>>>h,E[n+(t*6|0)+4>>1]=(C+32768+g&65535)>>>h,t=t+1|0;while((t|0)!=(a|0))}break}case 4:{if((e[l+24>>2]|0)==1&&(h=(s|0)<(o|0)?s:o,(h|0)>0)){c=o<<1,l=t+40|0,t=o*3|0,a=0;do I=e[l>>2]|0,C=q[r+(a+o<<1)>>1]<>1]<>1]<>2)+16384|0,k=E[r+(a+t<<1)>>1]|0,B=pi((g&65535)>>>I&65535|0,0,16)|0,C=(C+32768+g&65535)>>>I|I0,k=pi(k&65535|0,0,48)|0,k=B|(U+32768+g&65535)>>>I&65535|k,C=C&65535|I0,I=n+(a<<3)|0,g=I,E[g>>1]=k,E[g+2>>1]=k>>>16,I=I+4|0,E[I>>1]=C,E[I+2>>1]=C>>>16,a=a+1|0;while((a|0)!=(h|0))}break}default:}while(!1);if(l=e[p>>2]|0,!!(d[l+32>>0]|0)&&(a=e[l+16>>2]|0,!((s|0)<=0)))for(l=n,t=0;B=l+4|0,U=E[l>>1]|0,E[l>>1]=E[B>>1]|0,E[B>>1]=U,t=t+1|0,(t|0)!=(s|0);)l=l+(a<<1)|0}function bs(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36340,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s))}function Gs(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36340,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,!s){a0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s),a0(t)}function Qs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;if(o=t+48|0,!(e[o>>2]|0)){c=t+52|0,G1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}h=t+4|0,l=n<<1,a=W(l,e[(e[h>>2]|0)+16>>2]|0)|0,c=t+20|0,G1(t,r,e[c>>2]|0,n,s),r=e[h>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),h=e[o>>2]|0,(Qe[e[(e[h>>2]|0)+48>>2]&63](h,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,3,35648),h=f,f=0,h&1?(h=b()|0,ge(r|0),r0(h|0)):Be(r|0,824,96))}function zs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+48>>2]|0,o){Hs(t,o,r,n,s);return}else{o=t+52|0,Or(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Or(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;h=t+4|0,l=e[h>>2]|0;do if(!(d[l+32>>0]|0))p=r;else{if(a=t+8|0,ii(e[a>>2]|0,r|0,s*6|0)|0,l=e[h>>2]|0,c=e[l+16>>2]|0,(s|0)<=0){p=e[a>>2]|0;break}for(r=e[a>>2]|0,l=r,a=0;p=l+4|0,g=E[l>>1]|0,E[l>>1]=E[p>>1]|0,E[p>>1]=g,a=a+1|0,(a|0)!=(s|0);)l=l+(c<<1)|0;p=r,l=e[h>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:if((e[l+24>>2]|0)==2){if((s|0)<=0)return;l=t+32|0,r=0;do o=e[l>>2]|0,h=q[p+(r*6|0)>>1]<>1]<>1]<>>1)&65535)>>>o&65535,E[n+(r*6|0)>>1]=(h+32768-t&65535)>>>o,E[n+(r*6|0)+2>>1]=(t&65535)>>>o,E[n+(r*6|0)+4>>1]=g,r=r+1|0;while((r|0)!=(s|0));return}else{if(a=(o|0)<(s|0)?o:s,(a|0)<=0)return;c=o<<1,l=e[t+32>>2]|0,r=0;do s=q[p+(r*6|0)>>1]<>1]<>1]<>>1)&65535)>>>l&65535,E[n+(r<<1)>>1]=(s+32768-t&65535)>>>l,E[n+(r+o<<1)>>1]=(t&65535)>>>l,E[n+(r+c<<1)>>1]=g,r=r+1|0;while((r|0)!=(a|0));return}case 4:{if((e[l+24>>2]|0)!=1||(a=(o|0)<(s|0)?o:s,(a|0)<=0))return;c=o<<1,h=o*3|0,l=e[t+32>>2]|0,r=0;do g=E[p+(r<<3)+6>>1]|0,C=q[p+(r<<3)>>1]<>1]<>1]<>>1)&65535)>>>l&65535,E[n+(r<<1)>>1]=(C+32768-s&65535)>>>l,E[n+(r+o<<1)>>1]=(s&65535)>>>l,E[n+(r+c<<1)>>1]=t,E[n+(r+h<<1)>>1]=g,r=r+1|0;while((r|0)!=(a|0));return}default:return}}function Hs(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;C=y,y=y+176|0,I=C+152|0,U=C+16|0,k=C,h=t+4|0,l=e[h>>2]|0,g=s<<1,a=W(g,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=Qe[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){p=26;break}else a=a-l|0;if((p|0)==26){l=e[h>>2]|0;break}p=U+56|0,h=U+4|0,e[U>>2]=36160,e[p>>2]=36180,f=0,h0(62,U+56|0,h|0),C=f,f=0,C&1&&(U=b()|0,H0(p),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,h|0),C=f,f=0;do if(C&1)l=b()|0;else{if(e[h>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f=0,h0(63,h|0,I|0),C=f,f=0,C&1){l=b()|0,f0(I),f0(r),ce(h);break}f0(I),f=0,l=L0(28,U|0,49029,57)|0,I=f,f=0,!(I&1)&&(f=0,y0(36,l|0,0)|0,I=f,f=0,!(I&1))&&(c=de(16)|0,f=0,h0(64,k|0,h|0),I=f,f=0,I&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,k|0),I=f,f=0,I&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(k),a||(k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0))),ge(c|0),k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)),k=b()|0,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)}while(!1);U=l,H0(p),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,Or(t,U,n,s,o),y=C;return}Zi(e[a>>2]|0,W(g,e[l+16>>2]|0)|0),U=e[a>>2]|0,Or(t,U,n,s,o),y=C}function G1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;p=t+4|0,l=e[p>>2]|0;e:do switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)<=0)break e;l=t+40|0,t=0;do h=e[l>>2]|0,c=q[r+(t*6|0)+2>>1]<>1]<>1]<>>1)&65535)>>>h&65535,E[n+(t*6|0)>>1]=a>>>h,E[n+(t*6|0)+2>>1]=c>>>h,E[n+(t*6|0)+4>>1]=o,t=t+1|0;while((t|0)!=(s|0))}else{if(a=(s|0)<(o|0)?s:o,(a|0)<=0)break e;c=o<<1,l=t+40|0,t=0;do g=e[l>>2]|0,C=q[r+(t+o<<1)>>1]<>1]<>1]<>>1)&65535)>>>g&65535,E[n+(t*6|0)>>1]=I>>>g,E[n+(t*6|0)+2>>1]=C>>>g,E[n+(t*6|0)+4>>1]=h,t=t+1|0;while((t|0)!=(a|0))}break}case 4:{if((e[l+24>>2]|0)==1&&(h=(s|0)<(o|0)?s:o,(h|0)>0)){c=o<<1,l=t+40|0,t=o*3|0,a=0;do g=e[l>>2]|0,I=q[r+(a+o<<1)>>1]<>1]<>1]<>>1)&65535)>>>g,k=E[r+(a+t<<1)>>1]|0,I=pi(I>>>g&65535|0,0,16)|0,C=I0|C,k=pi(k&65535|0,0,48)|0,k=U>>>g&65535|I|k,C=C&65535|I0,I=n+(a<<3)|0,g=I,E[g>>1]=k,E[g+2>>1]=k>>>16,I=I+4|0,E[I>>1]=C,E[I+2>>1]=C>>>16,a=a+1|0;while((a|0)!=(h|0))}break}default:}while(!1);if(l=e[p>>2]|0,!!(d[l+32>>0]|0)&&(a=e[l+16>>2]|0,!((s|0)<=0)))for(l=n,t=0;U=l+4|0,k=E[l>>1]|0,E[l>>1]=E[U>>1]|0,E[U>>1]=k,t=t+1|0,(t|0)!=(s|0);)l=l+(a<<1)|0}function Ys(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36364,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s))}function js(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36364,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,!s){a0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s),a0(t)}function Xs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;if(o=t+48|0,!(e[o>>2]|0)){c=t+52|0,Q1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}h=t+4|0,l=n<<1,a=W(l,e[(e[h>>2]|0)+16>>2]|0)|0,c=t+20|0,Q1(t,r,e[c>>2]|0,n,s),r=e[h>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),h=e[o>>2]|0,(Qe[e[(e[h>>2]|0)+48>>2]&63](h,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,3,35648),h=f,f=0,h&1?(h=b()|0,ge(r|0),r0(h|0)):Be(r|0,824,96))}function Ks(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+48>>2]|0,o){Ws(t,o,r,n,s);return}else{o=t+52|0,Nr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Nr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0;h=t+4|0,l=e[h>>2]|0;do if(!(d[l+32>>0]|0))p=r;else{if(a=t+8|0,ii(e[a>>2]|0,r|0,s*6|0)|0,l=e[h>>2]|0,c=e[l+16>>2]|0,(s|0)<=0){p=e[a>>2]|0;break}for(r=e[a>>2]|0,l=r,a=0;p=l+4|0,g=E[l>>1]|0,E[l>>1]=E[p>>1]|0,E[p>>1]=g,a=a+1|0,(a|0)!=(s|0);)l=l+(c<<1)|0;p=r,l=e[h>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:if((e[l+24>>2]|0)==2){if((s|0)<=0)return;l=t+32|0,r=0;do o=e[l>>2]|0,t=q[p+(r*6|0)+2>>1]<>1]<>>o&65535,E[n+(r*6|0)>>1]=((q[p+(r*6|0)>>1]<>>o,E[n+(r*6|0)+2>>1]=(t&65535)>>>o,E[n+(r*6|0)+4>>1]=g,r=r+1|0;while((r|0)!=(s|0));return}else{if(a=(o|0)<(s|0)?o:s,(a|0)<=0)return;c=o<<1,l=e[t+32>>2]|0,r=0;do t=q[p+(r*6|0)+2>>1]<>1]<>>l&65535,E[n+(r<<1)>>1]=((q[p+(r*6|0)>>1]<>>l,E[n+(r+o<<1)>>1]=(t&65535)>>>l,E[n+(r+c<<1)>>1]=g,r=r+1|0;while((r|0)!=(a|0));return}case 4:{if((e[l+24>>2]|0)!=1||(c=(o|0)<(s|0)?o:s,(c|0)<=0))return;h=o<<1,a=o*3|0,l=e[t+32>>2]|0,r=0;do g=E[p+(r<<3)+6>>1]|0,s=q[p+(r<<3)+2>>1]<>1]<>>l&65535,E[n+(r<<1)>>1]=((q[p+(r<<3)>>1]<>>l,E[n+(r+o<<1)>>1]=(s&65535)>>>l,E[n+(r+h<<1)>>1]=t,E[n+(r+a<<1)>>1]=g,r=r+1|0;while((r|0)!=(c|0));return}default:return}}function Ws(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;C=y,y=y+176|0,I=C+152|0,U=C+16|0,k=C,h=t+4|0,l=e[h>>2]|0,g=s<<1,a=W(g,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=Qe[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){p=26;break}else a=a-l|0;if((p|0)==26){l=e[h>>2]|0;break}p=U+56|0,h=U+4|0,e[U>>2]=36160,e[p>>2]=36180,f=0,h0(62,U+56|0,h|0),C=f,f=0,C&1&&(U=b()|0,H0(p),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,h|0),C=f,f=0;do if(C&1)l=b()|0;else{if(e[h>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f=0,h0(63,h|0,I|0),C=f,f=0,C&1){l=b()|0,f0(I),f0(r),ce(h);break}f0(I),f=0,l=L0(28,U|0,49029,57)|0,I=f,f=0,!(I&1)&&(f=0,y0(36,l|0,0)|0,I=f,f=0,!(I&1))&&(c=de(16)|0,f=0,h0(64,k|0,h|0),I=f,f=0,I&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,k|0),I=f,f=0,I&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(k),a||(k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0))),ge(c|0),k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)),k=b()|0,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)}while(!1);U=l,H0(p),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,Nr(t,U,n,s,o),y=C;return}Zi(e[a>>2]|0,W(g,e[l+16>>2]|0)|0),U=e[a>>2]|0,Nr(t,U,n,s,o),y=C}function Q1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;p=t+4|0,l=e[p>>2]|0;e:do switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)<=0)break e;l=t+40|0,t=0;do h=e[l>>2]|0,c=q[r+(t*6|0)+2>>1]<>1]<>>h&65535,E[n+(t*6|0)>>1]=((q[r+(t*6|0)>>1]<>>h,E[n+(t*6|0)+2>>1]=(c&65535)>>>h,E[n+(t*6|0)+4>>1]=o,t=t+1|0;while((t|0)!=(s|0))}else{if(a=(s|0)<(o|0)?s:o,(a|0)<=0)break e;c=o<<1,l=t+40|0,t=0;do g=e[l>>2]|0,C=q[r+(t+o<<1)>>1]<>1]<>>g&65535,E[n+(t*6|0)>>1]=((q[r+(t<<1)>>1]<>>g,E[n+(t*6|0)+2>>1]=(C&65535)>>>g,E[n+(t*6|0)+4>>1]=h,t=t+1|0;while((t|0)!=(a|0))}break}case 4:{if((e[l+24>>2]|0)==1&&(h=(s|0)<(o|0)?s:o,(h|0)>0)){c=o<<1,l=t+40|0,t=o*3|0,a=0;do I=e[l>>2]|0,U=q[r+(a+o<<1)>>1]<>1]<>>I,g=(U+32768+(q[r+(a+c<<1)>>1]<>>I,k=E[r+(a+t<<1)>>1]|0,I=pi((U&65535)>>>I&65535|0,0,16)|0,g=g|I0,k=pi(k&65535|0,0,48)|0,k=I|C&65535|k,g=g&65535|I0,C=n+(a<<3)|0,I=C,E[I>>1]=k,E[I+2>>1]=k>>>16,C=C+4|0,E[C>>1]=g,E[C+2>>1]=g>>>16,a=a+1|0;while((a|0)!=(h|0))}break}default:}while(!1);if(l=e[p>>2]|0,!!(d[l+32>>0]|0)&&(a=e[l+16>>2]|0,!((s|0)<=0)))for(l=n,t=0;U=l+4|0,k=E[l>>1]|0,E[l>>1]=E[U>>1]|0,E[U>>1]=k,t=t+1|0,(t|0)!=(s|0);)l=l+(a<<1)|0}function Vt(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0;if(C=y,y=y+16|0,p=C,g=e[t>>2]|0,!g)return t=0,y=C,t|0;if(I=r,c=s-I|0,h=o+12|0,a=e[h>>2]|0,c=(a|0)>(c|0)?a-c|0:0,a=n,o=a-I|0,(o|0)>0&&(Qe[e[(e[g>>2]|0)+48>>2]&63](g,r,o)|0)!=(o|0))return e[t>>2]=0,I=0,y=C,I|0;do if((c|0)>0){if(a1(p,c,l),f=0,o=L0(e[(e[g>>2]|0)+48>>2]|0,g|0,(d[p>>0]&1?e[p+8>>2]|0:p+1|0)|0,c|0)|0,I=f,f=0,I&1&&(I=b()|0,f0(p),r0(I|0)),(o|0)==(c|0)){f0(p);break}return e[t>>2]=0,f0(p),I=0,y=C,I|0}while(!1);return s=s-a|0,(s|0)>0&&(Qe[e[(e[g>>2]|0)+48>>2]&63](g,n,s)|0)!=(s|0)?(e[t>>2]=0,I=0,y=C,I|0):(e[h>>2]=0,I=g,y=C,I|0)}function Zs(t){t=t|0,e[t>>2]=36236,f0(t+32|0),ce(t)}function Js(t){t=t|0,e[t>>2]=36236,f0(t+32|0),ce(t),a0(t)}function $s(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;if(a=r+44|0,c=e[a>>2]|0,p=r+24|0,g=e[p>>2]|0,c>>>0>>0&&(e[a>>2]=g,c=g),h=c,a=l&24,!a){r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1;return}if((o|0)==1&(a|0)==24){r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1;return}e:do switch(o|0){case 0:{a=0,o=0;break}case 1:if(l&8){o=(e[r+12>>2]|0)-(e[r+8>>2]|0)|0,a=o,o=((o|0)<0)<<31>>31;break e}else{o=g-(e[r+20>>2]|0)|0,a=o,o=((o|0)<0)<<31>>31;break e}case 2:{a=r+32|0,d[a>>0]&1?a=e[r+40>>2]|0:a=a+1|0,o=c-a|0,a=o,o=((o|0)<0)<<31>>31;break}default:{r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1;return}}while(!1);if(o=Li(a|0,o|0,n|0,s|0)|0,n=I0,(n|0)>=0&&(a=r+32|0,d[a>>0]&1?a=e[r+40>>2]|0:a=a+1|0,s=c-a|0,c=((s|0)<0)<<31>>31,!((c|0)<(n|0)|(c|0)==(n|0)&s>>>0>>0))){if(a=l&8,!((o|0)==0&(n|0)==0)){if(a|0&&!(e[r+12>>2]|0)){r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1;return}if((l&16|0)!=0&(g|0)==0){r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1;return}}a&&(e[r+12>>2]=(e[r+8>>2]|0)+o,e[r+16>>2]=h),l&16&&(e[p>>2]=(e[r+20>>2]|0)+o),r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=o,e[r+4>>2]=n;return}r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1}function eo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,n=n+8|0,Bt[e[(e[r>>2]|0)+16>>2]&15](t,r,e[n>>2]|0,e[n+4>>2]|0,0,s)}function io(t){t=t|0;var r=0,n=0,s=0,o=0;return r=t+44|0,n=e[r>>2]|0,s=e[t+24>>2]|0,n>>>0>>0&&(e[r>>2]=s,n=s),!(e[t+48>>2]&8)||(o=t+16|0,r=e[o>>2]|0,s=t+12|0,r>>>0>>0?(s=e[s>>2]|0,e[o>>2]=n,r=n):s=e[s>>2]|0,s>>>0>=r>>>0)?(t=-1,t|0):(t=N[s>>0]|0,t|0)}function to(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;if(s=t+44|0,n=e[s>>2]|0,o=e[t+24>>2]|0,n>>>0>>0&&(e[s>>2]=o,n=o),c=t+8|0,s=e[c>>2]|0,h=t+12|0,l=e[h>>2]|0,a=s,s>>>0>=l>>>0)return t=-1,t|0;if((r|0)==-1)return e[c>>2]=s,e[h>>2]=l+-1,e[t+16>>2]=n,t=0,t|0;if(e[t+48>>2]&16)o=r&255,s=l+-1|0;else if(o=r&255,s=l+-1|0,o<<24>>24!=(d[s>>0]|0))return t=-1,t|0;return e[c>>2]=a,e[h>>2]=s,e[t+16>>2]=n,d[s>>0]=o,t=r,t|0}function ro(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0;if(B=y,y=y+16|0,g=B,(r|0)==-1)return t=0,y=B,t|0;C=t+12|0,I=t+8|0,k=(e[C>>2]|0)-(e[I>>2]|0)|0,U=t+24|0,n=e[U>>2]|0,p=t+28|0,s=e[p>>2]|0;do if((n|0)==(s|0)){if(c=t+48|0,!(e[c>>2]&16))return t=-1,y=B,t|0;if(h=t+20|0,a=e[h>>2]|0,o=n-a|0,l=t+44|0,a=(e[l>>2]|0)-a|0,s=t+32|0,f=0,h0(67,s|0,0),n=f,f=0,!(n&1)&&(d[s>>0]&1?n=(e[s>>2]&-2)+-1|0:n=10,f=0,m0(8,s|0,n|0,0),n=f,f=0,!(n&1))){n=d[s>>0]|0,n&1?(s=e[t+40>>2]|0,n=e[t+36>>2]|0):(s=s+1|0,n=(n&255)>>>1),V=s+n|0,e[h>>2]=s,e[p>>2]=V,h=s+o|0,e[U>>2]=h,n=s+a|0,e[l>>2]=n,s=V;break}return V=b(0)|0,zi(V|0)|0,Wi(),V=-1,y=B,V|0}else V=t+44|0,c=t+48|0,l=V,h=n,n=e[V>>2]|0;while(!1);return a=h+1|0,e[g>>2]=a,o=e[(a>>>0>>0?l:g)>>2]|0,e[l>>2]=o,e[c>>2]&8&&(n=t+32|0,d[n>>0]&1?n=e[t+40>>2]|0:n=n+1|0,e[I>>2]=n,e[C>>2]=n+k,e[t+16>>2]=o),(h|0)==(s|0)?(V=Ni[e[(e[t>>2]|0)+52>>2]&63](t,r&255)|0,y=B,V|0):(e[U>>2]=a,d[h>>0]=r,V=r&255,y=B,V|0)}function no(t){t=t|0;var r=0,n=0;e[t>>2]=36200,r=t+56|0,e[r>>2]=36220,n=t+4|0,e[n>>2]=36236,f0(t+36|0),ce(n),H0(r)}function so(t){t=t|0;var r=0,n=0;e[t>>2]=36200,r=t+56|0,e[r>>2]=36220,n=t+4|0,e[n>>2]=36236,f0(t+36|0),ce(n),H0(r),a0(t)}function oo(t){t=t|0;var r=0,n=0,s=0,o=0;o=e[(e[t>>2]|0)+-12>>2]|0,r=t+o|0,e[r>>2]=36200,n=t+(o+56)|0,e[n>>2]=36220,s=t+(o+4)|0,e[s>>2]=36236,f0(t+(o+36)|0),ce(s),H0(n),a0(r)}function lo(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36388,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s))}function ao(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36388,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,!s){a0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s),a0(t)}function fo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;if(o=t+36|0,!(e[o>>2]|0)){c=t+40|0,z1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}h=t+4|0,l=n<<1,a=W(l,e[(e[h>>2]|0)+16>>2]|0)|0,c=t+20|0,z1(t,r,e[c>>2]|0,n,s),r=e[h>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),h=e[o>>2]|0,(Qe[e[(e[h>>2]|0)+48>>2]&63](h,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,3,35648),h=f,f=0,h&1?(h=b()|0,ge(r|0),r0(h|0)):Be(r|0,824,96))}function uo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){co(t,o,r,n,s);return}else{o=t+40|0,Br(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Br(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0;c=t+4|0,l=e[c>>2]|0;do if(!(d[l+32>>0]|0))h=r;else{if(t=t+8|0,ii(e[t>>2]|0,r|0,s*6|0)|0,l=e[c>>2]|0,a=e[l+16>>2]|0,(s|0)<=0){h=e[t>>2]|0;break}for(t=e[t>>2]|0,l=t,r=0;h=l+4|0,p=E[l>>1]|0,E[l>>1]=E[h>>1]|0,E[h>>1]=p,r=r+1|0,(r|0)!=(s|0);)l=l+(a<<1)|0;h=t,l=e[c>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do c=q[h+(l*6|0)+2>>1]|0,o=32768-c+(q[h+(l*6|0)+4>>1]|0)|0,p=(q[h+(l*6|0)>>1]|0)-c+32768|0,E[n+(l*6|0)>>1]=c+49152+(((o&65535)+(p&65535)|0)>>>2),E[n+(l*6|0)+2>>1]=o,E[n+(l*6|0)+4>>1]=p,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do c=q[h+(r*6|0)+2>>1]|0,s=32768-c+(q[h+(r*6|0)+4>>1]|0)|0,p=(q[h+(r*6|0)>>1]|0)-c+32768|0,E[n+(r<<1)>>1]=c+49152+(((s&65535)+(p&65535)|0)>>>2),E[n+(r+o<<1)>>1]=s,E[n+(r+t<<1)>>1]=p,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do p=E[h+(a<<3)+6>>1]|0,g=q[h+(a<<3)+2>>1]|0,c=32768-g+(q[h+(a<<3)+4>>1]|0)|0,s=(q[h+(a<<3)>>1]|0)-g+32768|0,E[n+(a<<1)>>1]=g+49152+(((c&65535)+(s&65535)|0)>>>2),E[n+(a+o<<1)>>1]=c,E[n+(a+t<<1)>>1]=s,E[n+(a+r<<1)>>1]=p,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function co(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;C=y,y=y+176|0,I=C+152|0,U=C+16|0,k=C,h=t+4|0,l=e[h>>2]|0,g=s<<1,a=W(g,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=Qe[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){p=26;break}else a=a-l|0;if((p|0)==26){l=e[h>>2]|0;break}p=U+56|0,h=U+4|0,e[U>>2]=36160,e[p>>2]=36180,f=0,h0(62,U+56|0,h|0),C=f,f=0,C&1&&(U=b()|0,H0(p),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,h|0),C=f,f=0;do if(C&1)l=b()|0;else{if(e[h>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f=0,h0(63,h|0,I|0),C=f,f=0,C&1){l=b()|0,f0(I),f0(r),ce(h);break}f0(I),f=0,l=L0(28,U|0,49029,57)|0,I=f,f=0,!(I&1)&&(f=0,y0(36,l|0,0)|0,I=f,f=0,!(I&1))&&(c=de(16)|0,f=0,h0(64,k|0,h|0),I=f,f=0,I&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,k|0),I=f,f=0,I&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(k),a||(k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0))),ge(c|0),k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)),k=b()|0,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)}while(!1);U=l,H0(p),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,Br(t,U,n,s,o),y=C;return}Zi(e[a>>2]|0,W(g,e[l+16>>2]|0)|0),U=e[a>>2]|0,Br(t,U,n,s,o),y=C}function z1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;h=t+4|0,t=e[h>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(c=q[r+(t*6|0)+2>>1]|0,a=q[r+(t*6|0)+4>>1]|0,o=(q[r+(t*6|0)>>1]|0)-((a+c|0)>>>2)+16384|0,E[n+(t*6|0)>>1]=a+32768+o,E[n+(t*6|0)+2>>1]=o,E[n+(t*6|0)+4>>1]=c+32768+o,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do p=q[r+(a+o<<1)>>1]|0,g=q[r+(a+l<<1)>>1]|0,c=(q[r+(a<<1)>>1]|0)-((g+p|0)>>>2)+16384|0,E[n+(a*6|0)>>1]=g+32768+c,E[n+(a*6|0)+2>>1]=c,E[n+(a*6|0)+4>>1]=p+32768+c,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do p=q[r+(a+o<<1)>>1]|0,C=q[r+(a+t<<1)>>1]|0,g=(q[r+(a<<1)>>1]|0)-((C+p|0)>>>2)+16384|0,I=E[r+(a+l<<1)>>1]|0,k=pi(g&65535|0,0,16)|0,p=p+32768+g|I0,I=pi(I&65535|0,0,48)|0,I=k|C+32768+g&65535|I,p=p&65535|I0,g=n+(a<<3)|0,C=g,E[C>>1]=I,E[C+2>>1]=I>>>16,g=g+4|0,E[g>>1]=p,E[g+2>>1]=p>>>16,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[h>>2]|0,!!(d[t+32>>0]|0)&&(a=e[t+16>>2]|0,!((s|0)<=0)))for(t=n,l=0;k=t+4|0,I=E[t>>1]|0,E[t>>1]=E[k>>1]|0,E[k>>1]=I,l=l+1|0,(l|0)!=(s|0);)t=t+(a<<1)|0}function ho(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36412,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s))}function mo(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36412,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,!s){a0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s),a0(t)}function go(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;if(o=t+36|0,!(e[o>>2]|0)){c=t+40|0,H1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}h=t+4|0,l=n<<1,a=W(l,e[(e[h>>2]|0)+16>>2]|0)|0,c=t+20|0,H1(t,r,e[c>>2]|0,n,s),r=e[h>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),h=e[o>>2]|0,(Qe[e[(e[h>>2]|0)+48>>2]&63](h,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,3,35648),h=f,f=0,h&1?(h=b()|0,ge(r|0),r0(h|0)):Be(r|0,824,96))}function po(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){Ao(t,o,r,n,s);return}else{o=t+40|0,Vr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Vr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;c=t+4|0,l=e[c>>2]|0;do if(!(d[l+32>>0]|0))h=r;else{if(t=t+8|0,ii(e[t>>2]|0,r|0,s*6|0)|0,l=e[c>>2]|0,a=e[l+16>>2]|0,(s|0)<=0){h=e[t>>2]|0;break}for(t=e[t>>2]|0,l=t,r=0;h=l+4|0,p=E[l>>1]|0,E[l>>1]=E[h>>1]|0,E[h>>1]=p,r=r+1|0,(r|0)!=(s|0);)l=l+(a<<1)|0;h=t,l=e[c>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do a=q[h+(l*6|0)>>1]|0,o=E[h+(l*6|0)+2>>1]|0,c=o&65535,p=(q[h+(l*6|0)+4>>1]|0)+32768-((c+a|0)>>>1)&65535,E[n+(l*6|0)>>1]=a+32768-c,E[n+(l*6|0)+2>>1]=o,E[n+(l*6|0)+4>>1]=p,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do s=E[h+(r*6|0)+2>>1]|0,a=q[h+(r*6|0)>>1]|0,c=s&65535,p=(q[h+(r*6|0)+4>>1]|0)+32768-((c+a|0)>>>1)&65535,E[n+(r<<1)>>1]=a+32768-c,E[n+(r+o<<1)>>1]=s,E[n+(r+t<<1)>>1]=p,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do c=E[h+(a<<3)+2>>1]|0,p=E[h+(a<<3)+6>>1]|0,C=q[h+(a<<3)>>1]|0,g=c&65535,s=(q[h+(a<<3)+4>>1]|0)+32768-((g+C|0)>>>1)&65535,E[n+(a<<1)>>1]=C+32768-g,E[n+(a+o<<1)>>1]=c,E[n+(a+t<<1)>>1]=s,E[n+(a+r<<1)>>1]=p,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function Ao(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;C=y,y=y+176|0,I=C+152|0,U=C+16|0,k=C,h=t+4|0,l=e[h>>2]|0,g=s<<1,a=W(g,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=Qe[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){p=26;break}else a=a-l|0;if((p|0)==26){l=e[h>>2]|0;break}p=U+56|0,h=U+4|0,e[U>>2]=36160,e[p>>2]=36180,f=0,h0(62,U+56|0,h|0),C=f,f=0,C&1&&(U=b()|0,H0(p),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,h|0),C=f,f=0;do if(C&1)l=b()|0;else{if(e[h>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f=0,h0(63,h|0,I|0),C=f,f=0,C&1){l=b()|0,f0(I),f0(r),ce(h);break}f0(I),f=0,l=L0(28,U|0,49029,57)|0,I=f,f=0,!(I&1)&&(f=0,y0(36,l|0,0)|0,I=f,f=0,!(I&1))&&(c=de(16)|0,f=0,h0(64,k|0,h|0),I=f,f=0,I&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,k|0),I=f,f=0,I&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(k),a||(k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0))),ge(c|0),k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)),k=b()|0,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)}while(!1);U=l,H0(p),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,Vr(t,U,n,s,o),y=C;return}Zi(e[a>>2]|0,W(g,e[l+16>>2]|0)|0),U=e[a>>2]|0,Vr(t,U,n,s,o),y=C}function H1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;h=t+4|0,t=e[h>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(c=E[r+(t*6|0)+2>>1]|0,o=c&65535,a=(q[r+(t*6|0)>>1]|0)+32768+o|0,o=(q[r+(t*6|0)+4>>1]|0)+32768+(((a&65535)+o|0)>>>1)&65535,E[n+(t*6|0)>>1]=a,E[n+(t*6|0)+2>>1]=c,E[n+(t*6|0)+4>>1]=o,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do p=E[r+(a+o<<1)>>1]|0,c=p&65535,g=(q[r+(a<<1)>>1]|0)+32768+c|0,c=(q[r+(a+l<<1)>>1]|0)+32768+(((g&65535)+c|0)>>>1)&65535,E[n+(a*6|0)>>1]=g,E[n+(a*6|0)+2>>1]=p,E[n+(a*6|0)+4>>1]=c,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do g=E[r+(a+o<<1)>>1]|0,p=g&65535,C=(q[r+(a<<1)>>1]|0)+32768+p&65535,p=(q[r+(a+t<<1)>>1]|0)+32768+((C+p|0)>>>1)|0,I=E[r+(a+l<<1)>>1]|0,g=pi(g&65535|0,0,16)|0,p=I0|p,I=pi(I&65535|0,0,48)|0,I=C|g|I,p=p&65535|I0,g=n+(a<<3)|0,C=g,E[C>>1]=I,E[C+2>>1]=I>>>16,g=g+4|0,E[g>>1]=p,E[g+2>>1]=p>>>16,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[h>>2]|0,!!(d[t+32>>0]|0)&&(a=e[t+16>>2]|0,!((s|0)<=0)))for(t=n,l=0;I=t+4|0,C=E[t>>1]|0,E[t>>1]=E[I>>1]|0,E[I>>1]=C,l=l+1|0,(l|0)!=(s|0);)t=t+(a<<1)|0}function So(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36436,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s))}function vo(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36436,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,!s){a0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s),a0(t)}function wo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;if(o=t+36|0,!(e[o>>2]|0)){c=t+40|0,Y1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}h=t+4|0,l=n<<1,a=W(l,e[(e[h>>2]|0)+16>>2]|0)|0,c=t+20|0,Y1(t,r,e[c>>2]|0,n,s),r=e[h>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),h=e[o>>2]|0,(Qe[e[(e[h>>2]|0)+48>>2]&63](h,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,3,35648),h=f,f=0,h&1?(h=b()|0,ge(r|0),r0(h|0)):Be(r|0,824,96))}function To(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){Co(t,o,r,n,s);return}else{o=t+40|0,qr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function qr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0;c=t+4|0,l=e[c>>2]|0;do if(!(d[l+32>>0]|0))h=r;else{if(t=t+8|0,ii(e[t>>2]|0,r|0,s*6|0)|0,l=e[c>>2]|0,a=e[l+16>>2]|0,(s|0)<=0){h=e[t>>2]|0;break}for(t=e[t>>2]|0,l=t,r=0;h=l+4|0,p=E[l>>1]|0,E[l>>1]=E[h>>1]|0,E[h>>1]=p,r=r+1|0,(r|0)!=(s|0);)l=l+(a<<1)|0;h=t,l=e[c>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do o=E[h+(l*6|0)+2>>1]|0,c=o&65535,p=32768-c+(q[h+(l*6|0)+4>>1]|0)&65535,E[n+(l*6|0)>>1]=(q[h+(l*6|0)>>1]|0)+32768-c,E[n+(l*6|0)+2>>1]=o,E[n+(l*6|0)+4>>1]=p,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do s=E[h+(r*6|0)+2>>1]|0,c=s&65535,p=32768-c+(q[h+(r*6|0)+4>>1]|0)&65535,E[n+(r<<1)>>1]=(q[h+(r*6|0)>>1]|0)+32768-c,E[n+(r+o<<1)>>1]=s,E[n+(r+t<<1)>>1]=p,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do c=E[h+(a<<3)+2>>1]|0,p=E[h+(a<<3)+6>>1]|0,g=c&65535,s=32768-g+(q[h+(a<<3)+4>>1]|0)&65535,E[n+(a<<1)>>1]=(q[h+(a<<3)>>1]|0)+32768-g,E[n+(a+o<<1)>>1]=c,E[n+(a+t<<1)>>1]=s,E[n+(a+r<<1)>>1]=p,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function Co(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;C=y,y=y+176|0,I=C+152|0,U=C+16|0,k=C,h=t+4|0,l=e[h>>2]|0,g=s<<1,a=W(g,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=Qe[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){p=26;break}else a=a-l|0;if((p|0)==26){l=e[h>>2]|0;break}p=U+56|0,h=U+4|0,e[U>>2]=36160,e[p>>2]=36180,f=0,h0(62,U+56|0,h|0),C=f,f=0,C&1&&(U=b()|0,H0(p),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,h|0),C=f,f=0;do if(C&1)l=b()|0;else{if(e[h>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f=0,h0(63,h|0,I|0),C=f,f=0,C&1){l=b()|0,f0(I),f0(r),ce(h);break}f0(I),f=0,l=L0(28,U|0,49029,57)|0,I=f,f=0,!(I&1)&&(f=0,y0(36,l|0,0)|0,I=f,f=0,!(I&1))&&(c=de(16)|0,f=0,h0(64,k|0,h|0),I=f,f=0,I&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,k|0),I=f,f=0,I&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(k),a||(k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0))),ge(c|0),k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)),k=b()|0,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)}while(!1);U=l,H0(p),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,qr(t,U,n,s,o),y=C;return}Zi(e[a>>2]|0,W(g,e[l+16>>2]|0)|0),U=e[a>>2]|0,qr(t,U,n,s,o),y=C}function Y1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;h=t+4|0,t=e[h>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(c=E[r+(t*6|0)+2>>1]|0,a=c&65535,o=a+32768+(q[r+(t*6|0)+4>>1]|0)&65535,E[n+(t*6|0)>>1]=(q[r+(t*6|0)>>1]|0)+32768+a,E[n+(t*6|0)+2>>1]=c,E[n+(t*6|0)+4>>1]=o,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do p=E[r+(a+o<<1)>>1]|0,g=p&65535,c=g+32768+(q[r+(a+l<<1)>>1]|0)&65535,E[n+(a*6|0)>>1]=(q[r+(a<<1)>>1]|0)+32768+g,E[n+(a*6|0)+2>>1]=p,E[n+(a*6|0)+4>>1]=c,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do g=E[r+(a+o<<1)>>1]|0,p=g&65535,C=(q[r+(a<<1)>>1]|0)+32768+p|0,p=p+32768+(q[r+(a+t<<1)>>1]|0)|0,I=E[r+(a+l<<1)>>1]|0,g=pi(g&65535|0,0,16)|0,p=I0|p,I=pi(I&65535|0,0,48)|0,I=C&65535|g|I,p=p&65535|I0,g=n+(a<<3)|0,C=g,E[C>>1]=I,E[C+2>>1]=I>>>16,g=g+4|0,E[g>>1]=p,E[g+2>>1]=p>>>16,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[h>>2]|0,!!(d[t+32>>0]|0)&&(a=e[t+16>>2]|0,!((s|0)<=0)))for(t=n,l=0;I=t+4|0,C=E[t>>1]|0,E[t>>1]=E[I>>1]|0,E[I>>1]=C,l=l+1|0,(l|0)!=(s|0);)t=t+(a<<1)|0}function xo(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36460,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s))}function yo(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36460,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,!s){a0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s),a0(t)}function Io(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;if(o=t+36|0,!(e[o>>2]|0)){c=t+40|0,j1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}h=t+4|0,l=n<<1,a=W(l,e[(e[h>>2]|0)+16>>2]|0)|0,c=t+20|0,j1(t,r,e[c>>2]|0,n,s),r=e[h>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),h=e[o>>2]|0,(Qe[e[(e[h>>2]|0)+48>>2]&63](h,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,3,35648),h=f,f=0,h&1?(h=b()|0,ge(r|0),r0(h|0)):Be(r|0,824,96))}function Do(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){Eo(t,o,r,n,s);return}else{o=t+40|0,br(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function br(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0;c=t+4|0,l=e[c>>2]|0;do if(!(d[l+32>>0]|0))h=r;else{if(t=t+8|0,ii(e[t>>2]|0,r|0,s*6|0)|0,l=e[c>>2]|0,a=e[l+16>>2]|0,(s|0)<=0){h=e[t>>2]|0;break}for(t=e[t>>2]|0,l=t,r=0;h=l+4|0,p=E[l>>1]|0,E[l>>1]=E[h>>1]|0,E[h>>1]=p,r=r+1|0,(r|0)!=(s|0);)l=l+(a<<1)|0;h=t,l=e[c>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do o=E[h+(l*6|0)+2>>1]|0,p=E[h+(l*6|0)+4>>1]|0,E[n+(l*6|0)>>1]=E[h+(l*6|0)>>1]|0,E[n+(l*6|0)+2>>1]=o,E[n+(l*6|0)+4>>1]=p,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do s=E[h+(r*6|0)+2>>1]|0,p=E[h+(r*6|0)+4>>1]|0,E[n+(r<<1)>>1]=E[h+(r*6|0)>>1]|0,E[n+(r+o<<1)>>1]=s,E[n+(r+t<<1)>>1]=p,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do c=E[h+(a<<3)+2>>1]|0,s=E[h+(a<<3)+4>>1]|0,p=E[h+(a<<3)+6>>1]|0,E[n+(a<<1)>>1]=E[h+(a<<3)>>1]|0,E[n+(a+o<<1)>>1]=c,E[n+(a+t<<1)>>1]=s,E[n+(a+r<<1)>>1]=p,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function Eo(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;C=y,y=y+176|0,I=C+152|0,U=C+16|0,k=C,h=t+4|0,l=e[h>>2]|0,g=s<<1,a=W(g,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=Qe[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){p=26;break}else a=a-l|0;if((p|0)==26){l=e[h>>2]|0;break}p=U+56|0,h=U+4|0,e[U>>2]=36160,e[p>>2]=36180,f=0,h0(62,U+56|0,h|0),C=f,f=0,C&1&&(U=b()|0,H0(p),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,h|0),C=f,f=0;do if(C&1)l=b()|0;else{if(e[h>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f=0,h0(63,h|0,I|0),C=f,f=0,C&1){l=b()|0,f0(I),f0(r),ce(h);break}f0(I),f=0,l=L0(28,U|0,49029,57)|0,I=f,f=0,!(I&1)&&(f=0,y0(36,l|0,0)|0,I=f,f=0,!(I&1))&&(c=de(16)|0,f=0,h0(64,k|0,h|0),I=f,f=0,I&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,k|0),I=f,f=0,I&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(k),a||(k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0))),ge(c|0),k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)),k=b()|0,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)}while(!1);U=l,H0(p),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,br(t,U,n,s,o),y=C;return}Zi(e[a>>2]|0,W(g,e[l+16>>2]|0)|0),U=e[a>>2]|0,br(t,U,n,s,o),y=C}function j1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;h=t+4|0,t=e[h>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(c=E[r+(t*6|0)+2>>1]|0,o=E[r+(t*6|0)+4>>1]|0,E[n+(t*6|0)>>1]=E[r+(t*6|0)>>1]|0,E[n+(t*6|0)+2>>1]=c,E[n+(t*6|0)+4>>1]=o,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do p=E[r+(a+o<<1)>>1]|0,c=E[r+(a+l<<1)>>1]|0,E[n+(a*6|0)>>1]=E[r+(a<<1)>>1]|0,E[n+(a*6|0)+2>>1]=p,E[n+(a*6|0)+4>>1]=c,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do p=E[r+(a<<1)>>1]|0,I=E[r+(a+l<<1)>>1]|0,g=q[r+(a+t<<1)>>1]|0,C=pi(q[r+(a+o<<1)>>1]|0,0,16)|0,g=I0|g,I=pi(I&65535|0,0,48)|0,I=C|p&65535|I,g=g&65535|I0,p=n+(a<<3)|0,C=p,E[C>>1]=I,E[C+2>>1]=I>>>16,p=p+4|0,E[p>>1]=g,E[p+2>>1]=g>>>16,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[h>>2]|0,!!(d[t+32>>0]|0)&&(a=e[t+16>>2]|0,!((s|0)<=0)))for(t=n,l=0;I=t+4|0,C=E[t>>1]|0,E[t>>1]=E[I>>1]|0,E[I>>1]=C,l=l+1|0,(l|0)!=(s|0);)t=t+(a<<1)|0}function ko(t){t=t|0}function Fo(t){t=t|0,a0(t)}function Mo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,n=W(e[t+8>>2]|0,n)|0,t=e[t+4>>2]|0,(Qe[e[(e[t>>2]|0)+48>>2]&63](t,r,n)|0)!=(n|0)&&(s=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,s|0,3,35648),t=f,f=0,t&1?(t=b()|0,ge(s|0),r0(t|0)):Be(s|0,824,96))}function _o(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;g=y,y=y+16|0,p=g,h=t+8|0,o=e[h>>2]|0,s=W(o,n)|0;do if(s){for(a=t+4|0,l=s;o=e[a>>2]|0,o=Qe[e[(e[o>>2]|0)+32>>2]&63](o,r,l)|0,!!o;)if(s=l-o|0,(l|0)==(o|0)){c=11;break}else l=s;if((c|0)==11){o=e[h>>2]|0,l=s;break}s=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,s|0,3,35648),t=f,f=0,t&1?(t=b()|0,ge(s|0),r0(t|0)):Be(s|0,824,96)}else l=0;while(!1);if((o|0)==2&&(Zi(r,n<<1),o=e[h>>2]|0),s=e[t+12>>2]|0,(s|0)<=(W(o,n)|0)){y=g;return}t=e[t+4>>2]|0,Bt[e[(e[t>>2]|0)+16>>2]&15](p,t,s-l|0,0,1,24),y=g}function Ro(t){t=t|0,a0(t)}function Po(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,s=t+4|0,ii(e[s>>2]|0,r|0,W(e[t+8>>2]|0,n)|0)|0,e[s>>2]=(e[s>>2]|0)+(e[t+12>>2]|0)}function Lo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,s=t+4|0,ii(r|0,e[s>>2]|0,W(e[t+8>>2]|0,n)|0)|0,e[s>>2]=(e[s>>2]|0)+(e[t+12>>2]|0)}function Hi(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;e[t+112>>2]=0,e[t+108>>2]=0,p=e[r>>2]|0,o=p;do if(p)if(a=t+92|0,p=t+96|0,c=e[p>>2]|0,h=e[a>>2]|0,n=h,s=c-n|0,s>>>0>=4e4?(s>>>0>4e4&&(l=h+4e4|0,(c|0)!=(l|0))&&(e[p>>2]=l),l=n):(St(a,4e4-s|0),l=e[a>>2]|0,o=e[r>>2]|0),n=t+116|0,e[n>>2]=l,c=t+124|0,e[c>>2]=l,h=t+104|0,e[h>>2]=o,s=o,o){if((e[s+12>>2]|0)==(e[s+16>>2]|0)){if(r=(Se[e[(e[o>>2]|0)+36>>2]&127](s)|0)==-1,s=e[c>>2]|0,r)break;o=e[n>>2]|0}else s=l,o=l;if(a=s-o|0,a>>>0<=64){if(l=t+92|0,(s|0)==(o|0))s=o;else{s=o,o=0;do d[(e[l>>2]|0)+o>>0]=d[s+o>>0]|0,o=o+1|0,s=e[n>>2]|0;while(o>>>0>>0);o=e[c>>2]|0}l=e[l>>2]|0,r=l,g=r-s|0,e[n>>2]=l,s=o+g|0,e[c>>2]=s,l=t+120|0,e[l>>2]=(e[l>>2]|0)+g,h=e[h>>2]|0,s=Qe[e[(e[h>>2]|0)+32>>2]&63](h,s,(e[p>>2]|0)-(r+a)|0)|0,s=(e[c>>2]|0)+s|0,e[c>>2]=s}}else s=l;else e[t+104>>2]=0,s=e[r+4>>2]|0,n=t+116|0,e[n>>2]=s,s=s+(e[r+8>>2]|0)|0,e[t+124>>2]=s;while(!1);if(n=e[n>>2]|0,n>>>0>=s>>>0){p=n,g=t+120|0,e[g>>2]=p,_i(t);return}for(;;){if((d[n>>0]|0)==-1){s=20;break}if(n=n+1|0,n>>>0>=s>>>0){s=20;break}}if((s|0)==20){g=t+120|0,e[g>>2]=n,_i(t);return}}function St(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(h=t+8|0,o=e[h>>2]|0,p=t+4|0,n=e[p>>2]|0,s=n,(o-s|0)>>>0>=r>>>0){do d[n>>0]=0,n=(e[p>>2]|0)+1|0,e[p>>2]=n,r=r+-1|0;while(r|0);return}n=e[t>>2]|0,l=s-n+r|0,(l|0)<0&&(ct(t),o=e[h>>2]|0,n=e[t>>2]|0),s=o-n|0,s>>>0<1073741823?(s=s<<1,s=s>>>0>>0?l:s,n=(e[p>>2]|0)-n|0,s?c=8:(o=0,a=0,l=n)):(s=2147483647,n=(e[p>>2]|0)-n|0,c=8),(c|0)==8&&(o=s,a=G0(s)|0,l=n),n=a+l|0,o=a+o|0,s=n;do d[s>>0]=0,s=n+1|0,n=s,r=r+-1|0;while(r|0);r=e[t>>2]|0,s=(e[p>>2]|0)-r|0,c=a+(l-s)|0,ii(c|0,r|0,s|0)|0,e[t>>2]=c,e[p>>2]=n,e[h>>2]=o,r&&a0(r)}function X1(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;O=y,y=y+32|0,F=O+12|0,V=O,k=t+180|0,U=(e[k>>2]|0)+4|0,(e[t+32>>2]|0)==1?B=e[t+24>>2]|0:B=1,r=W(B<<1,U)|0,e[F>>2]=0,M=F+4|0,e[M>>2]=0,e[F+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,F|0),_=f,f=0,_&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,_=f,f=0,!(_&1))){e[F>>2]=s,_=s+(r<<1)|0,e[F+8>>2]=_,je(s|0,0,n|0)|0,e[M>>2]=_;break}s=b()|0,r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}while(!1);e[V>>2]=0,_=V+4|0,e[_>>2]=0,e[V+8>>2]=0;do if(!B)a=18;else{if(B>>>0>1073741823&&(f=0,n0(178,V|0),I=f,f=0,I&1)||(a=16),(a|0)==16&&(o=B<<2,f=0,l=u0(67,o|0)|0,I=f,f=0,!(I&1))){e[V>>2]=l,a=l+(B<<2)|0,e[V+8>>2]=a,je(l|0,0,o|0)|0,e[_>>2]=a,a=18;break}s=b()|0,r=e[V>>2]|0,n=r,r&&(o=e[_>>2]|0,(o|0)!=(r|0)&&(e[_>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((a|0)==18){l=t+12|0;e:do if((e[l>>2]|0)>0){a=t+4604|0,c=(W(B,U)|0)+1|0,h=t+4608|0,p=t+92|0,g=(B|0)>0,C=t+4600|0,I=0;i:for(;;){if(n=e[F>>2]|0,r=n+2|0,e[a>>2]=r,n=n+(c<<1)|0,e[h>>2]=n,I&1?(e[a>>2]=n,e[h>>2]=r):r=n,o=e[p>>2]|0,f=0,P0(e[(e[o>>2]|0)+12>>2]|0,o|0,r|0,e[k>>2]|0,U|0),o=f,f=0,o&1){a=28;break}if(g){r=e[a>>2]|0,n=e[h>>2]|0,s=e[V>>2]|0,o=0;do{if(e[C>>2]=e[s+(o<<2)>>2],s=e[k>>2]|0,E[r+(s<<1)>>1]=E[r+(s+-1<<1)>>1]|0,E[n+-2>>1]=E[r>>1]|0,f=0,h0(68,t|0,0),s=f,f=0,s&1){a=27;break i}s=e[V>>2]|0,e[s+(o<<2)>>2]=e[C>>2],r=(e[a>>2]|0)+(U<<1)|0,e[a>>2]=r,n=(e[h>>2]|0)+(U<<1)|0,e[h>>2]=n,o=o+1|0}while((o|0)<(B|0))}if(I=I+1|0,(I|0)>=(e[l>>2]|0)){a=40;break e}}if((a|0)==27){s=b()|0;break}else if((a|0)==28){s=b()|0;break}}else a=40;while(!1);do if((a|0)==40){if(f=0,n0(182,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[V>>2]|0,n=r,r&&(s=e[_>>2]|0,(s|0)!=(r|0)&&(e[_>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[F>>2]|0,!r){y=O;return}n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),y=O;return}while(!1);r=e[V>>2]|0,n=r,r&&(o=e[_>>2]|0,(o|0)!=(r|0)&&(e[_>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}function Uo(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=t+4604|0,r=e[C>>2]|0,U=t+180|0,!((e[U>>2]|0)<=0))for(I=t+4608|0,k=t+4612|0,o=r,l=q[r+-2>>1]|0,r=q[r>>1]|0,g=0;p=e[I>>2]|0,h=q[p+(g+-1<<1)>>1]|0,s=g+1|0,n=q[o+(s<<1)>>1]|0,c=e[k>>2]|0,a=r-l|0,o=l-h|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-h>>31,(l^o|0)<0?o=r:o=h+((l^a|0)<0?0:a)|0,p=No(t,c,q[p+(g<<1)>>1]|0,o,0)|0,E[(e[I>>2]|0)+(g<<1)>>1]=p):(s=(Bo(t,g,0)|0)+g|0,n=e[C>>2]|0,r=q[n+(s+-1<<1)>>1]|0,n=q[n+(s<<1)>>1]|0),!((s|0)>=(e[U>>2]|0));)o=e[C>>2]|0,l=r,r=n,g=s}function Oo(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;o=t+104|0,(e[o>>2]|0)>>>0<4&&Jt(t),l=t+100|0,a=t+112|0,c=t+96|0,h=t+108|0,p=t+116|0,r=e[l>>2]|0,s=0;do{if(n=d[a>>0]|0,(r|0)>31)break;r=e[c>>2]|0,n<<24>>24?(d[e[h>>2]>>0]=r>>>25,e[c>>2]=e[c>>2]<<7,r=(e[l>>2]|0)+7|0):(d[e[h>>2]>>0]=r>>>24,e[c>>2]=e[c>>2]<<8,r=(e[l>>2]|0)+8|0),e[l>>2]=r,g=e[h>>2]|0,n=(d[g>>0]|0)==-1&1,d[a>>0]=n,e[h>>2]=g+1,e[o>>2]=(e[o>>2]|0)+-1,e[p>>2]=(e[p>>2]|0)+1,s=s+1|0}while((s|0)<4);n<<24>>24?xe(t,0,(r+-1|0)%8|0):xe(t,0,(r|0)%8|0),(e[o>>2]|0)>>>0<4&&Jt(t),r=e[l>>2]|0,n=0;do{if((r|0)>31)break;r=e[c>>2]|0,d[a>>0]|0?(d[e[h>>2]>>0]=r>>>25,e[c>>2]=e[c>>2]<<7,r=(e[l>>2]|0)+7|0):(d[e[h>>2]>>0]=r>>>24,e[c>>2]=e[c>>2]<<8,r=(e[l>>2]|0)+8|0),e[l>>2]=r,g=e[h>>2]|0,d[a>>0]=(d[g>>0]|0)==-1&1,e[h>>2]=g+1,e[o>>2]=(e[o>>2]|0)+-1,e[p>>2]=(e[p>>2]|0)+1,n=n+1|0}while((n|0)<4);e[t+132>>2]|0&&Jt(t)}function Jt(t){t=t|0;var r=0,n=0,s=0,o=0,l=0;if(r=e[t+132>>2]|0,r||(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,4,35648),t=f,f=0,t&1||Be(r|0,824,96),t=b()|0,ge(r|0),r0(t|0)),n=t+108|0,s=t+120|0,l=e[s>>2]|0,o=(e[n>>2]|0)-l|0,(Qe[e[(e[r>>2]|0)+48>>2]&63](r,l,o)|0)==(o|0)){l=e[s>>2]|0,e[n>>2]=l,e[t+104>>2]=(e[t+124>>2]|0)-l;return}r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,4,35648),l=f,f=0,l&1||Be(r|0,824,96),l=b()|0,ge(r|0),r0(l|0)}function xe(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0;if(p=t+100|0,n=(e[p>>2]|0)-n|0,e[p>>2]=n,(n|0)>-1){g=t+96|0,e[g>>2]=e[g>>2]|r<>2]=e[g>>2]|r>>0-n,h=t+104|0,(e[h>>2]|0)>>>0<4&&(Jt(t),n=e[p>>2]|0),l=t+112|0,a=t+108|0,c=t+116|0,s=0;!((n|0)>31);)if(n=e[g>>2]|0,d[l>>0]|0?(d[e[a>>2]>>0]=n>>>25,e[g>>2]=e[g>>2]<<7,n=(e[p>>2]|0)+7|0):(d[e[a>>2]>>0]=n>>>24,e[g>>2]=e[g>>2]<<8,n=(e[p>>2]|0)+8|0),e[p>>2]=n,C=e[a>>2]|0,d[l>>0]=(d[C>>0]|0)==-1&1,e[a>>2]=C+1,e[h>>2]=(e[h>>2]|0)+-1,e[c>>2]=(e[c>>2]|0)+1,s=s+1|0,(s|0)>=4){o=11;break}e:do if((o|0)==11&&(n|0)<0){e[g>>2]=e[g>>2]|r>>0-n,(e[h>>2]|0)>>>0<4&&(Jt(t),n=e[p>>2]|0),s=0;do{if((n|0)>31)break e;n=e[g>>2]|0,d[l>>0]|0?(d[e[a>>2]>>0]=n>>>25,e[g>>2]=e[g>>2]<<7,n=(e[p>>2]|0)+7|0):(d[e[a>>2]>>0]=n>>>24,e[g>>2]=e[g>>2]<<8,n=(e[p>>2]|0)+8|0),e[p>>2]=n,C=e[a>>2]|0,d[l>>0]=(d[C>>0]|0)==-1&1,e[a>>2]=C+1,e[h>>2]=(e[h>>2]|0)+-1,e[c>>2]=(e[c>>2]|0)+1,s=s+1|0}while((s|0)<4)}while(!1);e[g>>2]=e[g>>2]|r<>31,l=(B^r)-B|0,k=t+196+(l*12|0)+10|0,a=E[k>>1]|0,I=t+196+(l*12|0)|0,o=e[I>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(r=5;(a<>1]^B)-B+s|0,U=t+136|0,s=e[U>>2]|0,(o&s|0)==(o|0)?p=o:p=s&~(o>>31),o=(n-p^B)-B|0,h=t+144|0,s=e[h>>2]|0,(o|0)>0?o=(o+s|0)/(s<<1|1|0)|0:o=(o-s|0)/(s<<1|1|0)|0,C=t+140|0,c=e[C>>2]|0,n=((o|0)<0?c:0)+o|0,c=n-((n|0)<((c+1|0)/2|0|0)?0:c)|0,l=t+196+(l*12|0)+4|0,s|r?o=0:o=(e[l>>2]<<1)+-1+a>>31,s=o^c,W1(t,r,s>>30^s<<1,e[t+156>>2]|0),s=e[t+160>>2]|0,r=(e[I>>2]|0)+((c|0)>-1?c:0-c|0)|0,o=(e[l>>2]|0)+(W(e[h>>2]<<1|1,c)|0)|0,n=E[k>>1]|0,(n|0)==(s|0)&&(r=r>>1,o=o>>1,n=s>>1),e[I>>2]=r,s=n+1|0,E[k>>1]=s,r=s+o|0,(r|0)>=1?(o|0)>0&&(o=o-s|0,k=E[g>>1]|0,E[g>>1]=(k<<16>>16<127&1)+(k&65535),o=(o|0)>0?0:o):(o=E[g>>1]|0,E[g>>1]=(o&65535)-(o<<16>>16>-128&1),o=(r|0)>(~n|0)?r:0-n|0),e[l>>2]=o,s=e[h>>2]|0,n=s<<1|1,r=(W(n,(c^B)-B|0)|0)+p|0,(r|0)>=(0-s|0)?(o=e[U>>2]|0,(o+s|0)<(r|0)&&(r=r-(W(e[C>>2]|0,n)|0)|0)):(r=(W(e[C>>2]|0,n)|0)+r|0,o=e[U>>2]|0),(r&o|0)==(r|0)?(B=r,B=B&65535,B|0):(B=o&~(r>>31),B=B&65535,B|0)}function Bo(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;for(h=(e[t+180>>2]|0)-r|0,p=e[t+4608>>2]|0,g=e[t+4604>>2]|0,o=E[p+(r+-1<<1)>>1]|0,c=o&65535,n=e[t+144>>2]|0,l=0;s=p+(l+r<<1)|0,a=(q[s>>1]|0)-c|0,!((((a|0)>-1?a:0-a|0)|0)>(n|0));)if(E[s>>1]=o,l=l+1|0,(l|0)==(h|0)){l=h;break}if(o=(l|0)==(h|0),a=t+4600|0,s=e[36476+(e[a>>2]<<2)>>2]|0,(1<(l|0))n=l;else{n=l;do xe(t,1,1),s=e[a>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[a>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>1]|0,c,q[g+(h<<1)>>1]|0)|0,E[r>>1]=t,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,t=l+1|0,t|0)}function Vo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;return c=n-s|0,h=t+136|0,a=t+144|0,o=e[a>>2]|0,(((c|0)>-1?c:0-c|0)|0)>(o|0)?(l=s-n>>31|1,r=W(l,r-s|0)|0,(r|0)>0?r=(o+r|0)/(o<<1|1|0)|0:r=(r-o|0)/(o<<1|1|0)|0,c=t+140|0,o=e[c>>2]|0,n=((r|0)<0?o:0)+r|0,o=n-((n|0)<((o+1|0)/2|0|0)?0:o)|0,K1(t,t+4576|0,o),o=W(o,l)|0,l=e[a>>2]|0,a=l<<1|1,o=(W(o,a)|0)+s|0,(o|0)>=(0-l|0)?(r=e[h>>2]|0,(r+l|0)<(o|0)&&(o=o-(W(e[c>>2]|0,a)|0)|0)):(o=(W(e[c>>2]|0,a)|0)+o|0,r=e[h>>2]|0),(o&r|0)==(o|0)?(h=o,h=h&65535,h|0):(h=r&~(o>>31),h=h&65535,h|0)):(r=r-n|0,(r|0)>0?r=(o+r|0)/(o<<1|1|0)|0:r=(r-o|0)/(o<<1|1|0)|0,c=t+140|0,o=e[c>>2]|0,l=((r|0)<0?o:0)+r|0,o=l-((l|0)<((o+1|0)/2|0|0)?0:o)|0,K1(t,t+4588|0,o),l=e[a>>2]|0,a=l<<1|1,o=(W(a,o)|0)+n|0,(o|0)>=(0-l|0)?(r=e[h>>2]|0,(r+l|0)<(o|0)&&(o=o-(W(e[c>>2]|0,a)|0)|0)):(o=(W(e[c>>2]|0,a)|0)+o|0,r=e[h>>2]|0),(o&r|0)==(o|0)?(h=o,h=h&65535,h|0):(h=r&~(o>>31),h=h&65535,h|0))}function K1(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=r+9|0,a=N[g>>0]|0,p=r+4|0,h=e[p>>2]|0,o=(W(a>>>1,h)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-h+(s<<31>>31)|0,W1(t,o,s,(e[t+156>>2]|0)+-1-(e[36476+(e[t+4600>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[p>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[g>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[g>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r}function W1(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=n>>r,l=t+148|0,a=s-(e[l>>2]|0)|0,(o|0)<(a+-1|0)){(o|0)>30&&(s=(o|0)/2|0,xe(t,0,s),o=o-s|0),xe(t,1,o+1|0),xe(t,(1<31?(xe(t,0,31),xe(t,1,s+-31-(e[l>>2]|0)|0)):xe(t,1,a),r=e[l>>2]|0,xe(t,(1<>2]|0,h=t+120|0,r>>>0<((e[h>>2]|0)+-3|0)>>>0){h=t+112|0,a=e[h>>2]|0,t=t+108|0,e[t>>2]=(N[r+1>>0]<<16|N[r>>0]<<24|N[r+2>>0]<<8|N[r+3>>0])>>>a|e[t>>2],t=32-a>>3,e[c>>2]=r+t,e[h>>2]=(t<<3)+a;return}a=t+104|0,n=e[a>>2]|0;do if(n){if((e[n+12>>2]|0)==(e[n+16>>2]|0)){if((Se[e[(e[n>>2]|0)+36>>2]&127](n)|0)==-1)break;r=e[c>>2]|0}if(o=t+124|0,n=e[o>>2]|0,l=n-r|0,l>>>0<=64){if(s=t+92|0,(n|0)==(r|0))n=r;else{n=0;do d[(e[s>>2]|0)+n>>0]=d[r+n>>0]|0,n=n+1|0,r=e[c>>2]|0;while(n>>>0>>0);n=r,r=e[o>>2]|0}g=e[s>>2]|0,s=g,p=s-n|0,e[c>>2]=g,n=r+p|0,e[o>>2]=n,e[h>>2]=(e[h>>2]|0)+p,a=e[a>>2]|0,a=Qe[e[(e[a>>2]|0)+32>>2]&63](a,n,(e[t+96>>2]|0)-(s+l)|0)|0,e[o>>2]=(e[o>>2]|0)+a}}while(!1);for(a=t+112|0,l=t+108|0,t=e[t+124>>2]|0,o=t+-1|0,r=e[c>>2]|0;;){if(r>>>0>=t>>>0){n=14;break}if(s=d[r>>0]|0,n=s&255,s=s<<24>>24==-1,s){if((r|0)==(o|0)){n=25;break}if(r=r+1|0,(d[r>>0]|0)<0){n=25;break}}else r=r+1|0;if(g=e[a>>2]|0,e[l>>2]=n<<24-g|e[l>>2],e[c>>2]=r,g=g+(s?7:8)|0,e[a>>2]=g,(g|0)>=24){n=33;break}}if((n|0)==14){if((e[a>>2]|0)>=1)return;r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,5,35648),g=f,f=0,g&1||Be(r|0,824,96),g=b()|0,ge(r|0),r0(g|0)}else if((n|0)==25){if((e[a>>2]|0)>=1)return;r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,5,35648),g=f,f=0,g&1||Be(r|0,824,96),g=b()|0,ge(r|0),r0(g|0)}else if((n|0)==33){e:do if(r>>>0>>0)do{if((d[r>>0]|0)==-1)break e;r=r+1|0}while(r>>>0>>0);while(!1);e[h>>2]=r;return}}function qo(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;I=y,y=y+32|0,s=I,C=t+144|0;e:do if(e[C>>2]|0)r=t+152|0;else if(n=e[t+136>>2]|0,r=t+152|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+184>>2]|0))&&(e[s+8>>2]|0)==(e[t+188>>2]|0)&&(e[s+12>>2]|0)==(e[t+192>>2]|0))switch(e[r>>2]|0){case 8:{C=e[8900]|0,e[t+4612>>2]=C+(((e[8901]|0)-C|0)>>>1),y=I;return}case 10:{C=e[8903]|0,e[t+4612>>2]=C+(((e[8904]|0)-C|0)>>>1),y=I;return}case 12:{C=e[8906]|0,e[t+4612>>2]=C+(((e[8907]|0)-C|0)>>>1),y=I;return}case 16:{C=e[8909]|0,e[t+4612>>2]=C+(((e[8910]|0)-C|0)>>>1),y=I;return}default:break e}while(!1);if(g=1<>2],n=t+4616|0,s=g<<1,o=t+4620|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),p=t+4612|0,e[p>>2]=r+g,r=0-g|0,(g|0)<=(r|0)){y=I;return}c=t+192|0,h=t+188|0,a=t+184|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[h>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[C>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[p>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(g|0));y=I}function Yi(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(h=t+8|0,o=e[h>>2]|0,p=t+4|0,n=e[p>>2]|0,s=n,(o-s|0)>>>0>=r>>>0){do d[n>>0]=0,n=(e[p>>2]|0)+1|0,e[p>>2]=n,r=r+-1|0;while(r|0);return}n=e[t>>2]|0,l=s-n+r|0,(l|0)<0&&(ct(t),o=e[h>>2]|0,n=e[t>>2]|0),s=o-n|0,s>>>0<1073741823?(s=s<<1,s=s>>>0>>0?l:s,n=(e[p>>2]|0)-n|0,s?c=8:(o=0,a=0,l=n)):(s=2147483647,n=(e[p>>2]|0)-n|0,c=8),(c|0)==8&&(o=s,a=G0(s)|0,l=n),n=a+l|0,o=a+o|0,s=n;do d[s>>0]=0,s=n+1|0,n=s,r=r+-1|0;while(r|0);r=e[t>>2]|0,s=(e[p>>2]|0)-r|0,c=a+(l-s)|0,ii(c|0,r|0,s|0)|0,e[t>>2]=c,e[p>>2]=n,e[h>>2]=o,r&&a0(r)}function bo(t){t=t|0;var r=0,n=0;e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Go(t){t=t|0;var r=0,n=0;if(e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function Qo(t){t=t|0;var r=0,n=0;e[t>>2]=36052,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function zo(t){t=t|0;var r=0,n=0;if(e[t>>2]=36052,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function Ho(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;a=y,y=y+32|0,h=a,hi(h,e[t+136>>2]|0,e[t+144>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[h+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[h+12>>2]|0,n=e[r+16>>2]|0,s=e[h+16>>2]|0,e[t+184>>2]=c|0?c:e[h+4>>2]|0,e[t+188>>2]=l,e[t+192>>2]=o,Zo(t),o=t+140|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+196+(l*12|0)>>2]=r,e[t+196+(l*12|0)+4>>2]=0,E[t+196+(l*12|0)+8>>1]=0,E[t+196+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,h=(n|0?n:s)&255,e[t+4576>>2]=c,e[t+4580>>2]=0,d[t+4584>>0]=h,d[t+4585>>0]=1,d[t+4586>>0]=0,e[t+4588>>2]=c,e[t+4592>>2]=1,d[t+4596>>0]=h,d[t+4597>>0]=1,d[t+4598>>0]=0,e[t+4600>>2]=0,y=a}function Yo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+16|0,h=g,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[h>>2]=0,e[h+4>>2]=s,c=n+8|0,e[h+8>>2]=e[c>>2],s){r=G0(4624)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35828,e[r+128>>2]=e[t+136>>2],e[r+132>>2]=e[t+140>>2],e[r+136>>2]=e[t+144>>2],e[r+140>>2]=e[t+148>>2],e[r+144>>2]=e[t+152>>2],e[r+148>>2]=e[t+156>>2],e[r+152>>2]=e[t+160>>2],o=r+156|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+172>>2]=e[s>>2],e[r+176>>2]=0,e[r+180>>2]=0,e[r+184>>2]=0,o=r+4568|0,s=r+188|0;do e[s>>2]=0,e[s+4>>2]=0,E[s+8>>1]=0,E[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,d[o+10>>0]=0,a=r+4580|0,e[a>>2]=0,e[a+4>>2]=0,E[a+8>>1]=0,d[a+10>>0]=0,a=r+4592|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,h)}return h=t+100|0,e[h>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(p=r+4e3|0,(s|0)!=(p|0))&&(e[c>>2]=p,s=p):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,Z1(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],Z1(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0)}function jo(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(k=t+8|0,B=t+36|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(37,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(38,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(39,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(40,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=6,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=6,e[s+12>>2]=t,M=s,y=O,M|0)}function Z1(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;V=y,y=y+32|0,_=V+12|0,B=V,I=t+180|0,k=(e[I>>2]|0)+4|0,(e[t+32>>2]|0)==1?U=e[t+24>>2]|0:U=1,r=W(U<<1,k)|0,e[_>>2]=0,F=_+4|0,e[F>>2]=0,e[_+8>>2]=0;do if(r){if(r>>>0>715827882&&(f=0,n0(178,_|0),O=f,f=0,O&1)||(a=6),(a|0)==6&&(f=0,n=u0(67,r*6|0)|0,O=f,f=0,!(O&1))){for(e[F>>2]=n,e[_>>2]=n,s=n+(r*6|0)|0,e[_+8>>2]=s;E[n>>1]=0,E[n+2>>1]=0,E[n+4>>1]=0,r=r+-1|0,r;)n=n+6|0;e[F>>2]=s;break}s=b()|0,r=e[_>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),a0(r),r0(s|0)}while(!1);e[B>>2]=0,O=B+4|0,e[O>>2]=0,e[B+8>>2]=0;do if(!U)a=20;else{if(U>>>0>1073741823&&(f=0,n0(178,B|0),C=f,f=0,C&1)||(a=18),(a|0)==18&&(o=U<<2,f=0,l=u0(67,o|0)|0,C=f,f=0,!(C&1))){e[B>>2]=l,a=l+(U<<2)|0,e[B+8>>2]=a,je(l|0,0,o|0)|0,e[O>>2]=a,a=20;break}s=b()|0,r=e[B>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((a|0)==20){o=t+12|0;e:do if((e[o>>2]|0)>0){l=t+4604|0,a=(W(U,k)|0)+1|0,c=t+4608|0,h=t+92|0,p=(U|0)>0,g=t+4600|0,C=0;i:for(;;){if(n=e[_>>2]|0,r=n+6|0,e[l>>2]=r,n=n+(a*6|0)|0,e[c>>2]=n,C&1?(e[l>>2]=n,e[c>>2]=r):r=n,s=e[h>>2]|0,f=0,P0(e[(e[s>>2]|0)+12>>2]|0,s|0,r|0,e[I>>2]|0,k|0),s=f,f=0,s&1){a=30;break}if(p){r=e[B>>2]|0,n=e[l>>2]|0,s=0;do{if(e[g>>2]=e[r+(s<<2)>>2],M=e[I>>2]|0,r=n+(M*6|0)|0,n=n+((M+-1|0)*6|0)|0,E[r>>1]=E[n>>1]|0,E[r+2>>1]=E[n+2>>1]|0,E[r+4>>1]=E[n+4>>1]|0,n=(e[c>>2]|0)+-6|0,r=e[l>>2]|0,E[n>>1]=E[r>>1]|0,E[n+2>>1]=E[r+2>>1]|0,E[n+4>>1]=E[r+4>>1]|0,f=0,h0(69,t|0,0),n=f,f=0,n&1){a=29;break i}r=e[B>>2]|0,e[r+(s<<2)>>2]=e[g>>2],n=(e[l>>2]|0)+(k*6|0)|0,e[l>>2]=n,e[c>>2]=(e[c>>2]|0)+(k*6|0),s=s+1|0}while((s|0)<(U|0))}if(C=C+1|0,(C|0)>=(e[o>>2]|0)){a=42;break e}}if((a|0)==29){s=b()|0;break}else if((a|0)==30){s=b()|0;break}}else a=42;while(!1);do if((a|0)==42){if(f=0,n0(182,t|0),M=f,f=0,M&1){s=b()|0;break}if(r=e[B>>2]|0,n=r,r&&(s=e[O>>2]|0,(s|0)!=(r|0)&&(e[O>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[_>>2]|0,!r){y=V;return}n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),a0(r),y=V;return}while(!1);r=e[B>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[_>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),a0(r),r0(s|0)}function Xo(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0;if(t0=t+180|0,!((e[t0>>2]|0)<=0))for(Z=t+4608|0,s0=t+4604|0,w0=t+4612|0,K=0;F=K+-1|0,l=e[Z>>2]|0,a=e[s0>>2]|0,r=K+1|0,o=q[a+(K*6|0)>>1]|0,X=e[w0>>2]|0,c=q[a+(F*6|0)>>1]|0,h=o-c|0,p=q[l+(F*6|0)>>1]|0,g=c-p|0,C=((((d[X+((q[a+(r*6|0)>>1]|0)-o)>>0]|0)*9|0)+(d[X+h>>0]|0)|0)*9|0)+(d[X+g>>0]|0)|0,s=q[a+(K*6|0)+2>>1]|0,I=q[a+(F*6|0)+2>>1]|0,k=s-I|0,U=q[l+(F*6|0)+2>>1]|0,B=I-U|0,V=((((d[X+((q[a+(r*6|0)+2>>1]|0)-s)>>0]|0)*9|0)+(d[X+k>>0]|0)|0)*9|0)+(d[X+B>>0]|0)|0,n=q[a+(K*6|0)+4>>1]|0,O=q[a+(F*6|0)+4>>1]|0,_=n-O|0,F=q[l+(F*6|0)+4>>1]|0,M=O-F|0,X=((((d[X+((q[a+(r*6|0)+4>>1]|0)-n)>>0]|0)*9|0)+(d[X+_>>0]|0)|0)*9|0)+(d[X+M>>0]|0)|0,V|C|X?(a=q[l+(K*6|0)>>1]|0,l=o-p>>31,(l^g|0)>=0&&((l^h|0)<0?o=p:o=p-c+o|0),a=Gr(t,C,a,o,0)|0,l=q[(e[Z>>2]|0)+(K*6|0)+2>>1]|0,o=s-U>>31,(o^B|0)>=0&&((o^k|0)<0?s=U:s=U-I+s|0),o=Gr(t,V,l,s,0)|0,l=q[(e[Z>>2]|0)+(K*6|0)+4>>1]|0,s=n-F>>31,(s^M|0)>=0&&((s^_|0)<0?n=F:n=F-O+n|0),M=Gr(t,X,l,n,0)|0,X=e[Z>>2]|0,E[X+(K*6|0)>>1]=a,E[X+(K*6|0)+2>>1]=o,E[X+(K*6|0)+4>>1]=M):r=(Ko(t,K,0)|0)+K|0,(r|0)<(e[t0>>2]|0);)K=r}function Ko(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0;for(t0=y,y=y+48|0,k=t0+30|0,I=t0+24|0,C=t0+18|0,U=t0+12|0,F=t0+6|0,M=t0,X=(e[t+180>>2]|0)-r|0,K=e[t+4608>>2]|0,B=e[t+4604>>2]|0,_=r+-1|0,V=E[K+(_*6|0)>>1]|0,O=E[K+(_*6|0)+2>>1]|0,_=E[K+(_*6|0)+4>>1]|0,n=V&65535,s=t+144|0,o=O&65535,l=_&65535,g=0;h=g+r|0,a=K+(h*6|0)|0,c=K+(h*6|0)+2|0,h=K+(h*6|0)+4|0,Z=(q[a>>1]|0)-n|0,p=e[s>>2]|0,!((((Z|0)>-1?Z:0-Z|0)|0)>(p|0)||(Z=(q[c>>1]|0)-o|0,(((Z|0)>-1?Z:0-Z|0)|0)>(p|0))||(Z=(q[h>>1]|0)-l|0,(((Z|0)>-1?Z:0-Z|0)|0)>(p|0)));)if(E[a>>1]=V,E[c>>1]=O,E[h>>1]=_,g=g+1|0,(g|0)==(X|0)){g=X;break}if(o=(g|0)==(X|0),l=t+4600|0,s=e[36476+(e[l>>2]<<2)>>2]|0,(1<(g|0))n=g;else{n=g;do xe(t,1,1),s=e[l>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[l>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>1]=E[Z>>1]|0,E[F+2>>1]=E[Z+2>>1]|0,E[F+4>>1]=E[Z+4>>1]|0,E[M>>1]=V,E[M+2>>1]=O,E[M+4>>1]=_,r=B+(r*6|0)|0,E[C>>1]=E[F>>1]|0,E[C+2>>1]=E[F+2>>1]|0,E[C+4>>1]=E[F+4>>1]|0,E[I>>1]=E[M>>1]|0,E[I+2>>1]=E[M+2>>1]|0,E[I+4>>1]=E[M+4>>1]|0,E[k>>1]=E[r>>1]|0,E[k+2>>1]=E[r+2>>1]|0,E[k+4>>1]=E[r+4>>1]|0,Wo(U,t,C,I,k),E[Z>>1]=E[U>>1]|0,E[Z+2>>1]=E[U+2>>1]|0,E[Z+4>>1]=E[U+4>>1]|0,Z=e[l>>2]|0,e[l>>2]=(Z|0)<1?0:Z+-1|0,Z=g+1|0,y=t0,Z|0)}function Gr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(B=r>>31,l=(B^r)-B|0,k=t+196+(l*12|0)+10|0,a=E[k>>1]|0,I=t+196+(l*12|0)|0,o=e[I>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(r=5;(a<>1]^B)-B+s|0,U=t+136|0,s=e[U>>2]|0,(o&s|0)==(o|0)?p=o:p=s&~(o>>31),o=(n-p^B)-B|0,h=t+144|0,s=e[h>>2]|0,(o|0)>0?o=(o+s|0)/(s<<1|1|0)|0:o=(o-s|0)/(s<<1|1|0)|0,C=t+140|0,c=e[C>>2]|0,n=((o|0)<0?c:0)+o|0,c=n-((n|0)<((c+1|0)/2|0|0)?0:c)|0,l=t+196+(l*12|0)+4|0,s|r?o=0:o=(e[l>>2]<<1)+-1+a>>31,s=o^c,J1(t,r,s>>30^s<<1,e[t+156>>2]|0),s=e[t+160>>2]|0,r=(e[I>>2]|0)+((c|0)>-1?c:0-c|0)|0,o=(e[l>>2]|0)+(W(e[h>>2]<<1|1,c)|0)|0,n=E[k>>1]|0,(n|0)==(s|0)&&(r=r>>1,o=o>>1,n=s>>1),e[I>>2]=r,s=n+1|0,E[k>>1]=s,r=s+o|0,(r|0)>=1?(o|0)>0&&(o=o-s|0,k=E[g>>1]|0,E[g>>1]=(k<<16>>16<127&1)+(k&65535),o=(o|0)>0?0:o):(o=E[g>>1]|0,E[g>>1]=(o&65535)-(o<<16>>16>-128&1),o=(r|0)>(~n|0)?r:0-n|0),e[l>>2]=o,s=e[h>>2]|0,n=s<<1|1,r=(W(n,(c^B)-B|0)|0)+p|0,(r|0)>=(0-s|0)?(o=e[U>>2]|0,(o+s|0)<(r|0)&&(r=r-(W(e[C>>2]|0,n)|0)|0)):(r=(W(e[C>>2]|0,n)|0)+r|0,o=e[U>>2]|0),(r&o|0)==(r|0)?(B=r,B=B&65535,B|0):(B=o&~(r>>31),B=B&65535,B|0)}function J1(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=n>>r,l=t+148|0,a=s-(e[l>>2]|0)|0,(o|0)<(a+-1|0)){(o|0)>30&&(s=(o|0)/2|0,xe(t,0,s),o=o-s|0),xe(t,1,o+1|0),xe(t,(1<31?(xe(t,0,31),xe(t,1,s+-31-(e[l>>2]|0)|0)):xe(t,1,a),r=e[l>>2]|0,xe(t,(1<>1]|0,I=C-(q[s>>1]|0)>>31|1,l=W(I,(q[n>>1]|0)-C|0)|0,p=r+144|0,a=e[p>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,F=r+140|0,h=e[F>>2]|0,c=((l|0)<0?h:0)+l|0,h=c-((c|0)<((h+1|0)/2|0|0)?0:h)|0,c=r+4576|0,Qr(r,c,h),V=q[o+2>>1]|0,O=V-(q[s+2>>1]|0)>>31|1,l=W(O,(q[n+2>>1]|0)-V|0)|0,a=e[p>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,k=e[F>>2]|0,_=((l|0)<0?k:0)+l|0,k=_-((_|0)<((k+1|0)/2|0|0)?0:k)|0,Qr(r,c,k),_=q[o+4>>1]|0,B=_-(q[s+4>>1]|0)>>31|1,l=W(B,(q[n+4>>1]|0)-_|0)|0,a=e[p>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,g=e[F>>2]|0,l=((l|0)<0?g:0)+l|0,g=l-((l|0)<((g+1|0)/2|0|0)?0:g)|0,Qr(r,c,g),c=e[p>>2]|0,p=c<<1|1,l=(W(W(p,h)|0,I)|0)+C|0,n=0-c|0,(l|0)>=(n|0)?(a=e[U>>2]|0,(a+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,p)|0)|0),s=a):(l=(W(e[F>>2]|0,p)|0)+l|0,s=e[U>>2]|0),(l&s|0)!=(l|0)&&(l=s&~(l>>31)),o=l&65535,l=(W(W(p,k)|0,O)|0)+V|0,(l|0)>=(n|0)?(s+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,p)|0)|0):l=(W(e[F>>2]|0,p)|0)+l|0,(l&s|0)!=(l|0)&&(l=s&~(l>>31)),a=l&65535,l=(W(W(p,g)|0,B)|0)+_|0,(l|0)>=(n|0)?(s+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,p)|0)|0):l=(W(e[F>>2]|0,p)|0)+l|0,(l&s|0)==(l|0)){F=l,F=F&65535,E[t>>1]=o,_=t+2|0,E[_>>1]=a,t=t+4|0,E[t>>1]=F;return}F=s&~(l>>31),F=F&65535,E[t>>1]=o,_=t+2|0,E[_>>1]=a,t=t+4|0,E[t>>1]=F}function Qr(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=r+9|0,a=N[g>>0]|0,p=r+4|0,h=e[p>>2]|0,o=(W(a>>>1,h)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-h+(s<<31>>31)|0,J1(t,o,s,(e[t+156>>2]|0)+-1-(e[36476+(e[t+4600>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[p>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[g>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[g>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r}function Zo(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;I=y,y=y+32|0,s=I,C=t+144|0;e:do if(e[C>>2]|0)r=t+152|0;else if(n=e[t+136>>2]|0,r=t+152|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+184>>2]|0))&&(e[s+8>>2]|0)==(e[t+188>>2]|0)&&(e[s+12>>2]|0)==(e[t+192>>2]|0))switch(e[r>>2]|0){case 8:{C=e[8900]|0,e[t+4612>>2]=C+(((e[8901]|0)-C|0)>>>1),y=I;return}case 10:{C=e[8903]|0,e[t+4612>>2]=C+(((e[8904]|0)-C|0)>>>1),y=I;return}case 12:{C=e[8906]|0,e[t+4612>>2]=C+(((e[8907]|0)-C|0)>>>1),y=I;return}case 16:{C=e[8909]|0,e[t+4612>>2]=C+(((e[8910]|0)-C|0)>>>1),y=I;return}default:break e}while(!1);if(g=1<>2],n=t+4616|0,s=g<<1,o=t+4620|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),p=t+4612|0,e[p>>2]=r+g,r=0-g|0,(g|0)<=(r|0)){y=I;return}c=t+192|0,h=t+188|0,a=t+184|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[h>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[C>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[p>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(g|0));y=I}function Jo(t){t=t|0;var r=0,n=0;e[t>>2]=36024,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function $o(t){t=t|0;var r=0,n=0;if(e[t>>2]=36024,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function el(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;a=y,y=y+32|0,h=a,hi(h,e[t+136>>2]|0,e[t+144>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[h+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[h+12>>2]|0,n=e[r+16>>2]|0,s=e[h+16>>2]|0,e[t+184>>2]=c|0?c:e[h+4>>2]|0,e[t+188>>2]=l,e[t+192>>2]=o,_l(t),o=t+140|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+196+(l*12|0)>>2]=r,e[t+196+(l*12|0)+4>>2]=0,E[t+196+(l*12|0)+8>>1]=0,E[t+196+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,h=(n|0?n:s)&255,e[t+4576>>2]=c,e[t+4580>>2]=0,d[t+4584>>0]=h,d[t+4585>>0]=1,d[t+4586>>0]=0,e[t+4588>>2]=c,e[t+4592>>2]=1,d[t+4596>>0]=h,d[t+4597>>0]=1,d[t+4598>>0]=0,e[t+4600>>2]=0,y=a}function il(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+16|0,h=g,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[h>>2]=0,e[h+4>>2]=s,c=n+8|0,e[h+8>>2]=e[c>>2],s){r=G0(4624)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35800,e[r+128>>2]=e[t+136>>2],e[r+132>>2]=e[t+140>>2],e[r+136>>2]=e[t+144>>2],e[r+140>>2]=e[t+148>>2],e[r+144>>2]=e[t+152>>2],e[r+148>>2]=e[t+156>>2],e[r+152>>2]=e[t+160>>2],o=r+156|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+172>>2]=e[s>>2],e[r+176>>2]=0,e[r+180>>2]=0,e[r+184>>2]=0,o=r+4568|0,s=r+188|0;do e[s>>2]=0,e[s+4>>2]=0,E[s+8>>1]=0,E[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,d[o+10>>0]=0,a=r+4580|0,e[a>>2]=0,e[a+4>>2]=0,E[a+8>>1]=0,d[a+10>>0]=0,a=r+4592|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,h)}return h=t+100|0,e[h>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(p=r+4e3|0,(s|0)!=(p|0))&&(e[c>>2]=p,s=p):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,r2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],r2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0)}function tl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(k=t+8|0,B=t+36|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(44,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(45,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(46,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(47,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0)}function rl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0;e[t>>2]=36712,e[t+4>>2]=n,g=t+8|0,s=e[n>>2]|0,h=n+16|0,a=e[h>>2]|0,l=W(a,s)|0,e[g>>2]=0,C=t+12|0,e[C>>2]=0,e[t+16>>2]=0;do if(!l)l=a;else{if((l|0)<0&&(f=0,n0(178,g|0),a=f,f=0,a&1)||(p=4),(p|0)==4&&(f=0,c=u0(67,l|0)|0,a=f,f=0,!(a&1))){e[C>>2]=c,e[g>>2]=c,e[t+16>>2]=c+l,s=c;do d[s>>0]=0,s=(e[C>>2]|0)+1|0,e[C>>2]=s,l=l+-1|0;while(l|0);l=e[h>>2]|0,s=e[n>>2]|0;break}s=b()|0,o=e[g>>2]|0,o&&((e[C>>2]|0)!=(o|0)&&(e[C>>2]=o),a0(o)),C=s,r0(C|0)}while(!1);if(a=t+20|0,s=W(l,s)|0,e[a>>2]=0,l=t+24|0,e[l>>2]=0,e[t+28>>2]=0,!s){C=t+36|0,e[C>>2]=e[r>>2],e[C+4>>2]=e[r+4>>2],e[C+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(p=15),(p|0)==15&&(f=0,o=u0(67,s|0)|0,p=f,f=0,!(p&1))){e[l>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[l>>2]|0)+1|0,e[l>>2]=o,s=s+-1|0;while(s|0);C=t+36|0,e[C>>2]=e[r>>2],e[C+4>>2]=e[r+4>>2],e[C+8>>2]=e[r+8>>2];return}s=b()|0,o=e[a>>2]|0,o&&((e[l>>2]|0)!=(o|0)&&(e[l>>2]=o),a0(o)),o=e[g>>2]|0,o||(C=s,r0(C|0)),(e[C>>2]|0)!=(o|0)&&(e[C>>2]=o),a0(o),C=s,r0(C|0)}function nl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0;e[t>>2]=36688,e[t+4>>2]=n,g=t+8|0,s=e[n>>2]|0,h=n+16|0,a=e[h>>2]|0,l=W(a,s)|0,e[g>>2]=0,C=t+12|0,e[C>>2]=0,e[t+16>>2]=0;do if(!l)l=a;else{if((l|0)<0&&(f=0,n0(178,g|0),a=f,f=0,a&1)||(p=4),(p|0)==4&&(f=0,c=u0(67,l|0)|0,a=f,f=0,!(a&1))){e[C>>2]=c,e[g>>2]=c,e[t+16>>2]=c+l,s=c;do d[s>>0]=0,s=(e[C>>2]|0)+1|0,e[C>>2]=s,l=l+-1|0;while(l|0);l=e[h>>2]|0,s=e[n>>2]|0;break}s=b()|0,o=e[g>>2]|0,o&&((e[C>>2]|0)!=(o|0)&&(e[C>>2]=o),a0(o)),C=s,r0(C|0)}while(!1);if(a=t+20|0,s=W(l,s)|0,e[a>>2]=0,l=t+24|0,e[l>>2]=0,e[t+28>>2]=0,!s){C=t+36|0,e[C>>2]=e[r>>2],e[C+4>>2]=e[r+4>>2],e[C+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(p=15),(p|0)==15&&(f=0,o=u0(67,s|0)|0,p=f,f=0,!(p&1))){e[l>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[l>>2]|0)+1|0,e[l>>2]=o,s=s+-1|0;while(s|0);C=t+36|0,e[C>>2]=e[r>>2],e[C+4>>2]=e[r+4>>2],e[C+8>>2]=e[r+8>>2];return}s=b()|0,o=e[a>>2]|0,o&&((e[l>>2]|0)!=(o|0)&&(e[l>>2]=o),a0(o)),o=e[g>>2]|0,o||(C=s,r0(C|0)),(e[C>>2]|0)!=(o|0)&&(e[C>>2]=o),a0(o),C=s,r0(C|0)}function sl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0;e[t>>2]=36664,e[t+4>>2]=n,g=t+8|0,s=e[n>>2]|0,h=n+16|0,a=e[h>>2]|0,l=W(a,s)|0,e[g>>2]=0,C=t+12|0,e[C>>2]=0,e[t+16>>2]=0;do if(!l)l=a;else{if((l|0)<0&&(f=0,n0(178,g|0),a=f,f=0,a&1)||(p=4),(p|0)==4&&(f=0,c=u0(67,l|0)|0,a=f,f=0,!(a&1))){e[C>>2]=c,e[g>>2]=c,e[t+16>>2]=c+l,s=c;do d[s>>0]=0,s=(e[C>>2]|0)+1|0,e[C>>2]=s,l=l+-1|0;while(l|0);l=e[h>>2]|0,s=e[n>>2]|0;break}s=b()|0,o=e[g>>2]|0,o&&((e[C>>2]|0)!=(o|0)&&(e[C>>2]=o),a0(o)),C=s,r0(C|0)}while(!1);if(a=t+20|0,s=W(l,s)|0,e[a>>2]=0,l=t+24|0,e[l>>2]=0,e[t+28>>2]=0,!s){C=t+36|0,e[C>>2]=e[r>>2],e[C+4>>2]=e[r+4>>2],e[C+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(p=15),(p|0)==15&&(f=0,o=u0(67,s|0)|0,p=f,f=0,!(p&1))){e[l>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[l>>2]|0)+1|0,e[l>>2]=o,s=s+-1|0;while(s|0);C=t+36|0,e[C>>2]=e[r>>2],e[C+4>>2]=e[r+4>>2],e[C+8>>2]=e[r+8>>2];return}s=b()|0,o=e[a>>2]|0,o&&((e[l>>2]|0)!=(o|0)&&(e[l>>2]=o),a0(o)),o=e[g>>2]|0,o||(C=s,r0(C|0)),(e[C>>2]|0)!=(o|0)&&(e[C>>2]=o),a0(o),C=s,r0(C|0)}function ol(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0;e[t>>2]=36640,e[t+4>>2]=n,g=t+8|0,s=e[n>>2]|0,h=n+16|0,a=e[h>>2]|0,l=W(a,s)|0,e[g>>2]=0,C=t+12|0,e[C>>2]=0,e[t+16>>2]=0;do if(!l)l=a;else{if((l|0)<0&&(f=0,n0(178,g|0),a=f,f=0,a&1)||(p=4),(p|0)==4&&(f=0,c=u0(67,l|0)|0,a=f,f=0,!(a&1))){e[C>>2]=c,e[g>>2]=c,e[t+16>>2]=c+l,s=c;do d[s>>0]=0,s=(e[C>>2]|0)+1|0,e[C>>2]=s,l=l+-1|0;while(l|0);l=e[h>>2]|0,s=e[n>>2]|0;break}s=b()|0,o=e[g>>2]|0,o&&((e[C>>2]|0)!=(o|0)&&(e[C>>2]=o),a0(o)),C=s,r0(C|0)}while(!1);if(a=t+20|0,s=W(l,s)|0,e[a>>2]=0,l=t+24|0,e[l>>2]=0,e[t+28>>2]=0,!s){C=t+36|0,e[C>>2]=e[r>>2],e[C+4>>2]=e[r+4>>2],e[C+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(p=15),(p|0)==15&&(f=0,o=u0(67,s|0)|0,p=f,f=0,!(p&1))){e[l>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[l>>2]|0)+1|0,e[l>>2]=o,s=s+-1|0;while(s|0);C=t+36|0,e[C>>2]=e[r>>2],e[C+4>>2]=e[r+4>>2],e[C+8>>2]=e[r+8>>2];return}s=b()|0,o=e[a>>2]|0,o&&((e[l>>2]|0)!=(o|0)&&(e[l>>2]=o),a0(o)),o=e[g>>2]|0,o||(C=s,r0(C|0)),(e[C>>2]|0)!=(o|0)&&(e[C>>2]=o),a0(o),C=s,r0(C|0)}function ll(t){t=t|0;var r=0,n=0;e[t>>2]=36640,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=e[t+8>>2]|0,n&&(r=t+12|0,(e[r>>2]|0)!=(n|0)&&(e[r>>2]=n),a0(n))}function al(t){t=t|0;var r=0,n=0;if(e[t>>2]=36640,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),r=e[t+8>>2]|0,!r){a0(t);return}n=t+12|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r),a0(t)}function ul(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=t+36|0,!(e[o>>2]|0)){o=t+40|0,$1(t,r,e[o>>2]|0,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}l=W(e[(e[t+4>>2]|0)+16>>2]|0,n)|0,a=t+20|0,$1(t,r,e[a>>2]|0,n,s),t=e[o>>2]|0,(Qe[e[(e[t>>2]|0)+48>>2]&63](t,e[a>>2]|0,l)|0)!=(l|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,3,35648),a=f,f=0,a&1?(a=b()|0,ge(o|0),r0(a|0)):Be(o|0,824,96))}function cl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){hl(t,o,r,n,s);return}else{o=t+40|0,zr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function zr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0;if(c=t+4|0,l=e[c>>2]|0,!(d[l+32>>0]|0))c=r;else{if(a=t+8|0,ii(e[a>>2]|0,r|0,s*3|0)|0,l=e[c>>2]|0,r=e[l+16>>2]|0,(s|0)>0){for(l=e[a>>2]|0,t=0;h=l+2|0,p=d[l>>0]|0,d[l>>0]=d[h>>0]|0,d[h>>0]=p,t=t+1|0,(t|0)!=(s|0);)l=l+r|0;l=e[c>>2]|0}c=e[a>>2]|0}switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do a=N[c+(l*3|0)+1>>0]|0,o=128-a+(N[c+(l*3|0)+2>>0]|0)|0,h=(N[c+(l*3|0)>>0]|0)-a+128|0,p=n+(l*3|0)|0,d[p>>0]=a+192+(((o&255)+(h&255)|0)>>>2),d[p+1>>0]=o,d[p+2>>0]=h,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do s=N[c+(r*3|0)+1>>0]|0,h=128-s+(N[c+(r*3|0)+2>>0]|0)|0,p=(N[c+(r*3|0)>>0]|0)-s+128|0,d[n+r>>0]=s+192+(((h&255)+(p&255)|0)>>>2),d[n+(r+o)>>0]=h,d[n+(r+t)>>0]=p,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do p=d[c+(a<<2)+3>>0]|0,g=N[c+(a<<2)+1>>0]|0,s=128-g+(N[c+(a<<2)+2>>0]|0)|0,h=(N[c+(a<<2)>>0]|0)-g+128|0,d[n+a>>0]=g+192+(((s&255)+(h&255)|0)>>>2),d[n+(a+o)>>0]=s,d[n+(a+t)>>0]=h,d[n+(a+r)>>0]=p,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function hl(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(g=y,y=y+176|0,C=g+152|0,k=g+16|0,I=g,a=W(e[(e[t+4>>2]|0)+16>>2]|0,s)|0,h=t+20|0,l=e[h>>2]|0,!a){k=l,zr(t,k,n,s,o),y=g;return}for(;c=Qe[e[(e[r>>2]|0)+32>>2]&63](r,l,a)|0,!!c;)if(l=e[h>>2]|0,(a|0)==(c|0)){p=26;break}else a=a-c|0;if((p|0)==26){zr(t,l,n,s,o),y=g;return}n=k+56|0,h=k+4|0,e[k>>2]=36160,e[n>>2]=36180,f=0,h0(62,k+56|0,h|0),g=f,f=0,g&1&&(k=b()|0,H0(n),r0(k|0)),e[k+128>>2]=0,e[k+132>>2]=-1,e[k>>2]=36200,e[k+56>>2]=36220,f=0,n0(180,h|0),g=f,f=0;do if(g&1)l=b()|0;else{if(e[h>>2]=36236,r=k+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[k+52>>2]=16,e[C>>2]=0,e[C+4>>2]=0,e[C+8>>2]=0,f=0,h0(63,h|0,C|0),g=f,f=0,g&1){l=b()|0,f0(C),f0(r),ce(h);break}f0(C),f=0,l=L0(28,k|0,49029,57)|0,C=f,f=0,!(C&1)&&(f=0,y0(36,l|0,0)|0,C=f,f=0,!(C&1))&&(c=de(16)|0,f=0,h0(64,I|0,h|0),C=f,f=0,C&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,I|0),C=f,f=0,C&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(I),a||(I=l,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0))),ge(c|0),I=l,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0)),I=b()|0,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0)}while(!1);k=l,H0(n),r0(k|0)}function $1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;h=t+4|0,t=e[h>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(a=N[r+(t*3|0)+1>>0]|0,l=N[r+(t*3|0)+2>>0]|0,c=(N[r+(t*3|0)>>0]|0)-((l+a|0)>>>2)+64|0,o=n+(t*3|0)|0,d[o>>0]=l+128+c,d[o+1>>0]=c,d[o+2>>0]=a+128+c,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do g=N[r+(a+o)>>0]|0,C=N[r+(a+l)>>0]|0,p=(N[r+a>>0]|0)-((C+g|0)>>>2)+64|0,c=n+(a*3|0)|0,d[c>>0]=C+128+p,d[c+1>>0]=p,d[c+2>>0]=g+128+p,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do p=N[r+(a+o)>>0]|0,I=N[r+(a+t)>>0]|0,g=(N[r+a>>0]|0)-((I+p|0)>>>2)+64|0,C=n+(a<<2)|0,g=g<<8&65280|N[r+(a+l)>>0]<<24|I+128+g&255|p+128+g<<16&16711680,d[C>>0]=g,d[C+1>>0]=g>>8,d[C+2>>0]=g>>16,d[C+3>>0]=g>>24,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[h>>2]|0,!!(d[t+32>>0]|0)){if(a=e[t+16>>2]|0,(s|0)>0)t=n,l=0;else return;for(;I=t+2|0,C=d[t>>0]|0,d[t>>0]=d[I>>0]|0,d[I>>0]=C,l=l+1|0,(l|0)!=(s|0);)t=t+a|0}}function ml(t){t=t|0;var r=0,n=0;e[t>>2]=36664,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=e[t+8>>2]|0,n&&(r=t+12|0,(e[r>>2]|0)!=(n|0)&&(e[r>>2]=n),a0(n))}function dl(t){t=t|0;var r=0,n=0;if(e[t>>2]=36664,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),r=e[t+8>>2]|0,!r){a0(t);return}n=t+12|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r),a0(t)}function gl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=t+36|0,!(e[o>>2]|0)){o=t+40|0,e2(t,r,e[o>>2]|0,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}l=W(e[(e[t+4>>2]|0)+16>>2]|0,n)|0,a=t+20|0,e2(t,r,e[a>>2]|0,n,s),t=e[o>>2]|0,(Qe[e[(e[t>>2]|0)+48>>2]&63](t,e[a>>2]|0,l)|0)!=(l|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,3,35648),a=f,f=0,a&1?(a=b()|0,ge(o|0),r0(a|0)):Be(o|0,824,96))}function pl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){Al(t,o,r,n,s);return}else{o=t+40|0,Hr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Hr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;if(c=t+4|0,l=e[c>>2]|0,!(d[l+32>>0]|0))c=r;else{if(a=t+8|0,ii(e[a>>2]|0,r|0,s*3|0)|0,l=e[c>>2]|0,r=e[l+16>>2]|0,(s|0)>0){for(l=e[a>>2]|0,t=0;h=l+2|0,p=d[l>>0]|0,d[l>>0]=d[h>>0]|0,d[h>>0]=p,t=t+1|0,(t|0)!=(s|0);)l=l+r|0;l=e[c>>2]|0}c=e[a>>2]|0}switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do r=N[c+(l*3|0)>>0]|0,o=d[c+(l*3|0)+1>>0]|0,a=o&255,h=(N[c+(l*3|0)+2>>0]|0)+128-((a+r|0)>>>1)&255,p=n+(l*3|0)|0,d[p>>0]=r+128-a,d[p+1>>0]=o,d[p+2>>0]=h,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do h=d[c+(r*3|0)+1>>0]|0,a=N[c+(r*3|0)>>0]|0,s=h&255,p=(N[c+(r*3|0)+2>>0]|0)+128-((s+a|0)>>>1)&255,d[n+r>>0]=a+128-s,d[n+(r+o)>>0]=h,d[n+(r+t)>>0]=p,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do s=d[c+(a<<2)+1>>0]|0,p=d[c+(a<<2)+3>>0]|0,C=N[c+(a<<2)>>0]|0,g=s&255,h=(N[c+(a<<2)+2>>0]|0)+128-((g+C|0)>>>1)&255,d[n+a>>0]=C+128-g,d[n+(a+o)>>0]=s,d[n+(a+t)>>0]=h,d[n+(a+r)>>0]=p,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function Al(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(g=y,y=y+176|0,C=g+152|0,k=g+16|0,I=g,a=W(e[(e[t+4>>2]|0)+16>>2]|0,s)|0,h=t+20|0,l=e[h>>2]|0,!a){k=l,Hr(t,k,n,s,o),y=g;return}for(;c=Qe[e[(e[r>>2]|0)+32>>2]&63](r,l,a)|0,!!c;)if(l=e[h>>2]|0,(a|0)==(c|0)){p=26;break}else a=a-c|0;if((p|0)==26){Hr(t,l,n,s,o),y=g;return}n=k+56|0,h=k+4|0,e[k>>2]=36160,e[n>>2]=36180,f=0,h0(62,k+56|0,h|0),g=f,f=0,g&1&&(k=b()|0,H0(n),r0(k|0)),e[k+128>>2]=0,e[k+132>>2]=-1,e[k>>2]=36200,e[k+56>>2]=36220,f=0,n0(180,h|0),g=f,f=0;do if(g&1)l=b()|0;else{if(e[h>>2]=36236,r=k+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[k+52>>2]=16,e[C>>2]=0,e[C+4>>2]=0,e[C+8>>2]=0,f=0,h0(63,h|0,C|0),g=f,f=0,g&1){l=b()|0,f0(C),f0(r),ce(h);break}f0(C),f=0,l=L0(28,k|0,49029,57)|0,C=f,f=0,!(C&1)&&(f=0,y0(36,l|0,0)|0,C=f,f=0,!(C&1))&&(c=de(16)|0,f=0,h0(64,I|0,h|0),C=f,f=0,C&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,I|0),C=f,f=0,C&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(I),a||(I=l,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0))),ge(c|0),I=l,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0)),I=b()|0,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0)}while(!1);k=l,H0(n),r0(k|0)}function e2(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;h=t+4|0,t=e[h>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(a=d[r+(t*3|0)+1>>0]|0,c=a&255,l=(N[r+(t*3|0)>>0]|0)+128+c|0,c=(N[r+(t*3|0)+2>>0]|0)+128+(((l&255)+c|0)>>>1)&255,o=n+(t*3|0)|0,d[o>>0]=l,d[o+1>>0]=a,d[o+2>>0]=c,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do g=d[r+(a+o)>>0]|0,p=g&255,C=(N[r+a>>0]|0)+128+p|0,p=(N[r+(a+l)>>0]|0)+128+(((C&255)+p|0)>>>1)&255,c=n+(a*3|0)|0,d[c>>0]=C,d[c+1>>0]=g,d[c+2>>0]=p,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do g=N[r+(a+o)>>0]|0,p=(N[r+a>>0]|0)+128+g&255,C=n+(a<<2)|0,g=p|g<<8|N[r+(a+l)>>0]<<24|(N[r+(a+t)>>0]|0)+128+((p+g|0)>>>1)<<16&16711680,d[C>>0]=g,d[C+1>>0]=g>>8,d[C+2>>0]=g>>16,d[C+3>>0]=g>>24,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[h>>2]|0,!!(d[t+32>>0]|0)){if(a=e[t+16>>2]|0,(s|0)>0)t=n,l=0;else return;for(;C=t+2|0,g=d[t>>0]|0,d[t>>0]=d[C>>0]|0,d[C>>0]=g,l=l+1|0,(l|0)!=(s|0);)t=t+a|0}}function Sl(t){t=t|0;var r=0,n=0;e[t>>2]=36688,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=e[t+8>>2]|0,n&&(r=t+12|0,(e[r>>2]|0)!=(n|0)&&(e[r>>2]=n),a0(n))}function vl(t){t=t|0;var r=0,n=0;if(e[t>>2]=36688,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),r=e[t+8>>2]|0,!r){a0(t);return}n=t+12|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r),a0(t)}function wl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=t+36|0,!(e[o>>2]|0)){o=t+40|0,i2(t,r,e[o>>2]|0,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}l=W(e[(e[t+4>>2]|0)+16>>2]|0,n)|0,a=t+20|0,i2(t,r,e[a>>2]|0,n,s),t=e[o>>2]|0,(Qe[e[(e[t>>2]|0)+48>>2]&63](t,e[a>>2]|0,l)|0)!=(l|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,3,35648),a=f,f=0,a&1?(a=b()|0,ge(o|0),r0(a|0)):Be(o|0,824,96))}function Tl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){Cl(t,o,r,n,s);return}else{o=t+40|0,Yr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Yr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0;if(c=t+4|0,l=e[c>>2]|0,!(d[l+32>>0]|0))c=r;else{if(a=t+8|0,ii(e[a>>2]|0,r|0,s*3|0)|0,l=e[c>>2]|0,r=e[l+16>>2]|0,(s|0)>0){for(l=e[a>>2]|0,t=0;h=l+2|0,p=d[l>>0]|0,d[l>>0]=d[h>>0]|0,d[h>>0]=p,t=t+1|0,(t|0)!=(s|0);)l=l+r|0;l=e[c>>2]|0}c=e[a>>2]|0}switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do o=d[c+(l*3|0)+1>>0]|0,a=o&255,h=128-a+(N[c+(l*3|0)+2>>0]|0)&255,p=n+(l*3|0)|0,d[p>>0]=(N[c+(l*3|0)>>0]|0)+128-a,d[p+1>>0]=o,d[p+2>>0]=h,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do h=d[c+(r*3|0)+1>>0]|0,s=h&255,p=128-s+(N[c+(r*3|0)+2>>0]|0)&255,d[n+r>>0]=(N[c+(r*3|0)>>0]|0)+128-s,d[n+(r+o)>>0]=h,d[n+(r+t)>>0]=p,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do s=d[c+(a<<2)+1>>0]|0,p=d[c+(a<<2)+3>>0]|0,g=s&255,h=128-g+(N[c+(a<<2)+2>>0]|0)&255,d[n+a>>0]=(N[c+(a<<2)>>0]|0)+128-g,d[n+(a+o)>>0]=s,d[n+(a+t)>>0]=h,d[n+(a+r)>>0]=p,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function Cl(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(g=y,y=y+176|0,C=g+152|0,k=g+16|0,I=g,a=W(e[(e[t+4>>2]|0)+16>>2]|0,s)|0,h=t+20|0,l=e[h>>2]|0,!a){k=l,Yr(t,k,n,s,o),y=g;return}for(;c=Qe[e[(e[r>>2]|0)+32>>2]&63](r,l,a)|0,!!c;)if(l=e[h>>2]|0,(a|0)==(c|0)){p=26;break}else a=a-c|0;if((p|0)==26){Yr(t,l,n,s,o),y=g;return}n=k+56|0,h=k+4|0,e[k>>2]=36160,e[n>>2]=36180,f=0,h0(62,k+56|0,h|0),g=f,f=0,g&1&&(k=b()|0,H0(n),r0(k|0)),e[k+128>>2]=0,e[k+132>>2]=-1,e[k>>2]=36200,e[k+56>>2]=36220,f=0,n0(180,h|0),g=f,f=0;do if(g&1)l=b()|0;else{if(e[h>>2]=36236,r=k+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[k+52>>2]=16,e[C>>2]=0,e[C+4>>2]=0,e[C+8>>2]=0,f=0,h0(63,h|0,C|0),g=f,f=0,g&1){l=b()|0,f0(C),f0(r),ce(h);break}f0(C),f=0,l=L0(28,k|0,49029,57)|0,C=f,f=0,!(C&1)&&(f=0,y0(36,l|0,0)|0,C=f,f=0,!(C&1))&&(c=de(16)|0,f=0,h0(64,I|0,h|0),C=f,f=0,C&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,I|0),C=f,f=0,C&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(I),a||(I=l,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0))),ge(c|0),I=l,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0)),I=b()|0,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0)}while(!1);k=l,H0(n),r0(k|0)}function i2(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;h=t+4|0,t=e[h>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(a=d[r+(t*3|0)+1>>0]|0,l=a&255,c=l+128+(N[r+(t*3|0)+2>>0]|0)&255,o=n+(t*3|0)|0,d[o>>0]=(N[r+(t*3|0)>>0]|0)+128+l,d[o+1>>0]=a,d[o+2>>0]=c,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do g=d[r+(a+o)>>0]|0,C=g&255,p=C+128+(N[r+(a+l)>>0]|0)&255,c=n+(a*3|0)|0,d[c>>0]=(N[r+a>>0]|0)+128+C,d[c+1>>0]=g,d[c+2>>0]=p,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do g=N[r+(a+o)>>0]|0,C=n+(a<<2)|0,g=(N[r+a>>0]|0)+128+g&255|g<<8|N[r+(a+l)>>0]<<24|g+128+(N[r+(a+t)>>0]|0)<<16&16711680,d[C>>0]=g,d[C+1>>0]=g>>8,d[C+2>>0]=g>>16,d[C+3>>0]=g>>24,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[h>>2]|0,!!(d[t+32>>0]|0)){if(a=e[t+16>>2]|0,(s|0)>0)t=n,l=0;else return;for(;C=t+2|0,g=d[t>>0]|0,d[t>>0]=d[C>>0]|0,d[C>>0]=g,l=l+1|0,(l|0)!=(s|0);)t=t+a|0}}function xl(t){t=t|0;var r=0,n=0;e[t>>2]=36712,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=e[t+8>>2]|0,n&&(r=t+12|0,(e[r>>2]|0)!=(n|0)&&(e[r>>2]=n),a0(n))}function yl(t){t=t|0;var r=0,n=0;if(e[t>>2]=36712,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),r=e[t+8>>2]|0,!r){a0(t);return}n=t+12|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r),a0(t)}function Il(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=t+36|0,!(e[o>>2]|0)){o=t+40|0,t2(t,r,e[o>>2]|0,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}l=W(e[(e[t+4>>2]|0)+16>>2]|0,n)|0,a=t+20|0,t2(t,r,e[a>>2]|0,n,s),t=e[o>>2]|0,(Qe[e[(e[t>>2]|0)+48>>2]&63](t,e[a>>2]|0,l)|0)!=(l|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,3,35648),a=f,f=0,a&1?(a=b()|0,ge(o|0),r0(a|0)):Be(o|0,824,96))}function Dl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){El(t,o,r,n,s);return}else{o=t+40|0,jr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function jr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0;if(c=t+4|0,l=e[c>>2]|0,!(d[l+32>>0]|0))c=r;else{if(a=t+8|0,ii(e[a>>2]|0,r|0,s*3|0)|0,l=e[c>>2]|0,r=e[l+16>>2]|0,(s|0)>0){for(l=e[a>>2]|0,t=0;h=l+2|0,p=d[l>>0]|0,d[l>>0]=d[h>>0]|0,d[h>>0]=p,t=t+1|0,(t|0)!=(s|0);)l=l+r|0;l=e[c>>2]|0}c=e[a>>2]|0}switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do o=d[c+(l*3|0)+1>>0]|0,h=d[c+(l*3|0)+2>>0]|0,p=n+(l*3|0)|0,d[p>>0]=d[c+(l*3|0)>>0]|0,d[p+1>>0]=o,d[p+2>>0]=h,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do h=d[c+(r*3|0)+1>>0]|0,p=d[c+(r*3|0)+2>>0]|0,d[n+r>>0]=d[c+(r*3|0)>>0]|0,d[n+(r+o)>>0]=h,d[n+(r+t)>>0]=p,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do s=d[c+(a<<2)+1>>0]|0,h=d[c+(a<<2)+2>>0]|0,p=d[c+(a<<2)+3>>0]|0,d[n+a>>0]=d[c+(a<<2)>>0]|0,d[n+(a+o)>>0]=s,d[n+(a+t)>>0]=h,d[n+(a+r)>>0]=p,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function El(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(g=y,y=y+176|0,C=g+152|0,k=g+16|0,I=g,a=W(e[(e[t+4>>2]|0)+16>>2]|0,s)|0,h=t+20|0,l=e[h>>2]|0,!a){k=l,jr(t,k,n,s,o),y=g;return}for(;c=Qe[e[(e[r>>2]|0)+32>>2]&63](r,l,a)|0,!!c;)if(l=e[h>>2]|0,(a|0)==(c|0)){p=26;break}else a=a-c|0;if((p|0)==26){jr(t,l,n,s,o),y=g;return}n=k+56|0,h=k+4|0,e[k>>2]=36160,e[n>>2]=36180,f=0,h0(62,k+56|0,h|0),g=f,f=0,g&1&&(k=b()|0,H0(n),r0(k|0)),e[k+128>>2]=0,e[k+132>>2]=-1,e[k>>2]=36200,e[k+56>>2]=36220,f=0,n0(180,h|0),g=f,f=0;do if(g&1)l=b()|0;else{if(e[h>>2]=36236,r=k+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[k+52>>2]=16,e[C>>2]=0,e[C+4>>2]=0,e[C+8>>2]=0,f=0,h0(63,h|0,C|0),g=f,f=0,g&1){l=b()|0,f0(C),f0(r),ce(h);break}f0(C),f=0,l=L0(28,k|0,49029,57)|0,C=f,f=0,!(C&1)&&(f=0,y0(36,l|0,0)|0,C=f,f=0,!(C&1))&&(c=de(16)|0,f=0,h0(64,I|0,h|0),C=f,f=0,C&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,I|0),C=f,f=0,C&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(I),a||(I=l,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0))),ge(c|0),I=l,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0)),I=b()|0,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0)}while(!1);k=l,H0(n),r0(k|0)}function t2(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0;h=t+4|0,t=e[h>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(a=d[r+(t*3|0)+1>>0]|0,c=d[r+(t*3|0)+2>>0]|0,o=n+(t*3|0)|0,d[o>>0]=d[r+(t*3|0)>>0]|0,d[o+1>>0]=a,d[o+2>>0]=c,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do g=d[r+(a+o)>>0]|0,p=d[r+(a+l)>>0]|0,c=n+(a*3|0)|0,d[c>>0]=d[r+a>>0]|0,d[c+1>>0]=g,d[c+2>>0]=p,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do g=n+(a<<2)|0,p=N[r+(a+o)>>0]<<8|N[r+a>>0]|N[r+(a+t)>>0]<<16|N[r+(a+l)>>0]<<24,d[g>>0]=p,d[g+1>>0]=p>>8,d[g+2>>0]=p>>16,d[g+3>>0]=p>>24,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[h>>2]|0,!!(d[t+32>>0]|0)){if(a=e[t+16>>2]|0,(s|0)>0)t=n,l=0;else return;for(;g=t+2|0,p=d[t>>0]|0,d[t>>0]=d[g>>0]|0,d[g>>0]=p,l=l+1|0,(l|0)!=(s|0);)t=t+a|0}}function r2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;V=y,y=y+32|0,_=V+12|0,B=V,I=t+180|0,k=(e[I>>2]|0)+4|0,(e[t+32>>2]|0)==1?U=e[t+24>>2]|0:U=1,r=W(U<<1,k)|0,e[_>>2]=0,F=_+4|0,e[F>>2]=0,e[_+8>>2]=0;e:do if(r){if(r>>>0>1431655765&&(f=0,n0(178,_|0),O=f,f=0,O&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r*3|0)|0,O=f,f=0,!(O&1))){for(e[F>>2]=n,e[_>>2]=n,e[_+8>>2]=n+(r*3|0);;)if(d[n>>0]=0,d[n+1>>0]=0,d[n+2>>0]=0,n=(e[F>>2]|0)+3|0,e[F>>2]=n,r=r+-1|0,!r)break e}s=b()|0,r=e[_>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),r0(s|0)}while(!1);e[B>>2]=0,O=B+4|0,e[O>>2]=0,e[B+8>>2]=0;do if(!U)l=19;else{if(U>>>0>1073741823&&(f=0,n0(178,B|0),C=f,f=0,C&1)||(l=17),(l|0)==17&&(s=U<<2,f=0,o=u0(67,s|0)|0,C=f,f=0,!(C&1))){e[B>>2]=o,l=o+(U<<2)|0,e[B+8>>2]=l,je(o|0,0,s|0)|0,e[O>>2]=l,l=19;break}s=b()|0,r=e[B>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((l|0)==19){o=t+12|0;e:do if((e[o>>2]|0)>0){l=t+4604|0,a=(W(U,k)|0)+1|0,c=t+4608|0,h=t+92|0,p=(U|0)>0,g=t+4600|0,C=0;i:for(;;){if(s=e[_>>2]|0,r=s+3|0,e[l>>2]=r,n=s+(a*3|0)|0,e[c>>2]=n,C&1?(e[l>>2]=n,e[c>>2]=r,r=1):r=a,n=e[h>>2]|0,f=0,P0(e[(e[n>>2]|0)+12>>2]|0,n|0,s+(r*3|0)|0,e[I>>2]|0,k|0),s=f,f=0,s&1){l=29;break}if(p){r=e[B>>2]|0,n=e[l>>2]|0,s=0;do{if(e[g>>2]=e[r+(s<<2)>>2],M=e[I>>2]|0,r=n+(M*3|0)|0,n=n+((M+-1|0)*3|0)|0,d[r>>0]=d[n>>0]|0,d[r+1>>0]=d[n+1>>0]|0,d[r+2>>0]=d[n+2>>0]|0,r=e[l>>2]|0,n=(e[c>>2]|0)+-3|0,d[n>>0]=d[r>>0]|0,d[n+1>>0]=d[r+1>>0]|0,d[n+2>>0]=d[r+2>>0]|0,f=0,h0(70,t|0,0),n=f,f=0,n&1){l=28;break i}r=e[B>>2]|0,e[r+(s<<2)>>2]=e[g>>2],n=(e[l>>2]|0)+(k*3|0)|0,e[l>>2]=n,e[c>>2]=(e[c>>2]|0)+(k*3|0),s=s+1|0}while((s|0)<(U|0))}if(C=C+1|0,(C|0)>=(e[o>>2]|0)){l=41;break e}}if((l|0)==28){s=b()|0;break}else if((l|0)==29){s=b()|0;break}}else l=41;while(!1);do if((l|0)==41){if(f=0,n0(182,t|0),M=f,f=0,M&1){s=b()|0;break}if(r=e[B>>2]|0,n=r,r&&(s=e[O>>2]|0,(s|0)!=(r|0)&&(e[O>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[_>>2]|0,!r){y=V;return}n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),y=V;return}while(!1);r=e[B>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[_>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),r0(s|0)}function kl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0;if(t0=t+180|0,!((e[t0>>2]|0)<=0))for(Z=t+4608|0,s0=t+4604|0,w0=t+4612|0,K=0;F=K+-1|0,l=e[Z>>2]|0,a=e[s0>>2]|0,r=K+1|0,o=N[a+(K*3|0)>>0]|0,X=e[w0>>2]|0,c=N[a+(F*3|0)>>0]|0,h=o-c|0,p=N[l+(F*3|0)>>0]|0,g=c-p|0,C=((((d[X+((N[a+(r*3|0)>>0]|0)-o)>>0]|0)*9|0)+(d[X+h>>0]|0)|0)*9|0)+(d[X+g>>0]|0)|0,s=N[a+(K*3|0)+1>>0]|0,I=N[a+(F*3|0)+1>>0]|0,k=s-I|0,U=N[l+(F*3|0)+1>>0]|0,B=I-U|0,V=((((d[X+((N[a+(r*3|0)+1>>0]|0)-s)>>0]|0)*9|0)+(d[X+k>>0]|0)|0)*9|0)+(d[X+B>>0]|0)|0,n=N[a+(K*3|0)+2>>0]|0,O=N[a+(F*3|0)+2>>0]|0,_=n-O|0,F=N[l+(F*3|0)+2>>0]|0,M=O-F|0,X=((((d[X+((N[a+(r*3|0)+2>>0]|0)-n)>>0]|0)*9|0)+(d[X+_>>0]|0)|0)*9|0)+(d[X+M>>0]|0)|0,V|C|X?(a=N[l+(K*3|0)>>0]|0,l=o-p>>31,(l^g|0)>=0&&((l^h|0)<0?o=p:o=p-c+o|0),a=Xr(t,C,a,o,0)|0,l=N[(e[Z>>2]|0)+(K*3|0)+1>>0]|0,o=s-U>>31,(o^B|0)>=0&&((o^k|0)<0?s=U:s=U-I+s|0),o=Xr(t,V,l,s,0)|0,l=N[(e[Z>>2]|0)+(K*3|0)+2>>0]|0,s=n-F>>31,(s^M|0)>=0&&((s^_|0)<0?n=F:n=F-O+n|0),X=Xr(t,X,l,n,0)|0,K=(e[Z>>2]|0)+(K*3|0)|0,d[K>>0]=a,d[K+1>>0]=o,d[K+2>>0]=X):r=(Fl(t,K,0)|0)+K|0,(r|0)<(e[t0>>2]|0);)K=r}function Fl(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0;for(t0=y,y=y+32|0,K=t0+15|0,I=t0+12|0,C=t0+9|0,k=t0+6|0,_=t0+3|0,F=t0,M=(e[t+180>>2]|0)-r|0,X=e[t+4608>>2]|0,U=e[t+4604>>2]|0,O=X+((r+-1|0)*3|0)|0,B=d[O>>0]|0,V=d[O+1>>0]|0,O=d[O+2>>0]|0,n=B&255,s=t+144|0,o=V&255,l=O&255,g=0;a=X+((g+r|0)*3|0)|0,c=a+1|0,h=a+2|0,Z=(N[a>>0]|0)-n|0,p=e[s>>2]|0,!((((Z|0)>-1?Z:0-Z|0)|0)>(p|0)||(Z=(N[c>>0]|0)-o|0,(((Z|0)>-1?Z:0-Z|0)|0)>(p|0))||(Z=(N[h>>0]|0)-l|0,(((Z|0)>-1?Z:0-Z|0)|0)>(p|0)));)if(d[a>>0]=B,d[c>>0]=V,d[h>>0]=O,g=g+1|0,(g|0)==(M|0)){g=M;break}if(o=(g|0)==(M|0),l=t+4600|0,s=e[36476+(e[l>>2]<<2)>>2]|0,(1<(g|0))n=g;else{n=g;do xe(t,1,1),s=e[l>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[l>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>0]=d[Z>>0]|0,d[_+1>>0]=d[Z+1>>0]|0,d[_+2>>0]=d[Z+2>>0]|0,d[F>>0]=B,d[F+1>>0]=V,d[F+2>>0]=O,r=U+(r*3|0)|0,d[C>>0]=d[_>>0]|0,d[C+1>>0]=d[_+1>>0]|0,d[C+2>>0]=d[_+2>>0]|0,d[I>>0]=d[F>>0]|0,d[I+1>>0]=d[F+1>>0]|0,d[I+2>>0]=d[F+2>>0]|0,d[K>>0]=d[r>>0]|0,d[K+1>>0]=d[r+1>>0]|0,d[K+2>>0]=d[r+2>>0]|0,Ml(k,t,C,I,K),d[Z>>0]=d[k>>0]|0,d[Z+1>>0]=d[k+1>>0]|0,d[Z+2>>0]=d[k+2>>0]|0,Z=e[l>>2]|0,e[l>>2]=(Z|0)<1?0:Z+-1|0,Z=g+1|0,y=t0,Z|0)}function Xr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(B=r>>31,l=(B^r)-B|0,k=t+196+(l*12|0)+10|0,a=E[k>>1]|0,I=t+196+(l*12|0)|0,o=e[I>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(r=5;(a<>1]^B)-B+s|0,U=t+136|0,s=e[U>>2]|0,(o&s|0)==(o|0)?p=o:p=s&~(o>>31),o=(n-p^B)-B|0,h=t+144|0,s=e[h>>2]|0,(o|0)>0?o=(o+s|0)/(s<<1|1|0)|0:o=(o-s|0)/(s<<1|1|0)|0,C=t+140|0,c=e[C>>2]|0,n=((o|0)<0?c:0)+o|0,c=n-((n|0)<((c+1|0)/2|0|0)?0:c)|0,l=t+196+(l*12|0)+4|0,s|r?o=0:o=(e[l>>2]<<1)+-1+a>>31,s=o^c,n2(t,r,s>>30^s<<1,e[t+156>>2]|0),s=e[t+160>>2]|0,r=(e[I>>2]|0)+((c|0)>-1?c:0-c|0)|0,o=(e[l>>2]|0)+(W(e[h>>2]<<1|1,c)|0)|0,n=E[k>>1]|0,(n|0)==(s|0)&&(r=r>>1,o=o>>1,n=s>>1),e[I>>2]=r,s=n+1|0,E[k>>1]=s,r=s+o|0,(r|0)>=1?(o|0)>0&&(o=o-s|0,k=E[g>>1]|0,E[g>>1]=(k<<16>>16<127&1)+(k&65535),o=(o|0)>0?0:o):(o=E[g>>1]|0,E[g>>1]=(o&65535)-(o<<16>>16>-128&1),o=(r|0)>(~n|0)?r:0-n|0),e[l>>2]=o,s=e[h>>2]|0,n=s<<1|1,r=(W(n,(c^B)-B|0)|0)+p|0,(r|0)>=(0-s|0)?(o=e[U>>2]|0,(o+s|0)<(r|0)&&(r=r-(W(e[C>>2]|0,n)|0)|0)):(r=(W(e[C>>2]|0,n)|0)+r|0,o=e[U>>2]|0),(r&o|0)==(r|0)?(B=r,B=B&255,B|0):(B=o&~(r>>31),B=B&255,B|0)}function n2(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=n>>r,l=t+148|0,a=s-(e[l>>2]|0)|0,(o|0)<(a+-1|0)){(o|0)>30&&(s=(o|0)/2|0,xe(t,0,s),o=o-s|0),xe(t,1,o+1|0),xe(t,(1<31?(xe(t,0,31),xe(t,1,s+-31-(e[l>>2]|0)|0)):xe(t,1,a),r=e[l>>2]|0,xe(t,(1<>0]|0,I=C-(N[s>>0]|0)>>31|1,l=W(I,(N[n>>0]|0)-C|0)|0,p=r+144|0,a=e[p>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,F=r+140|0,h=e[F>>2]|0,c=((l|0)<0?h:0)+l|0,h=c-((c|0)<((h+1|0)/2|0|0)?0:h)|0,c=r+4576|0,Kr(r,c,h),V=N[o+1>>0]|0,O=V-(N[s+1>>0]|0)>>31|1,l=W(O,(N[n+1>>0]|0)-V|0)|0,a=e[p>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,k=e[F>>2]|0,_=((l|0)<0?k:0)+l|0,k=_-((_|0)<((k+1|0)/2|0|0)?0:k)|0,Kr(r,c,k),_=N[o+2>>0]|0,B=_-(N[s+2>>0]|0)>>31|1,l=W(B,(N[n+2>>0]|0)-_|0)|0,a=e[p>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,g=e[F>>2]|0,l=((l|0)<0?g:0)+l|0,g=l-((l|0)<((g+1|0)/2|0|0)?0:g)|0,Kr(r,c,g),c=e[p>>2]|0,p=c<<1|1,l=(W(W(p,h)|0,I)|0)+C|0,n=0-c|0,(l|0)>=(n|0)?(a=e[U>>2]|0,(a+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,p)|0)|0),s=a):(l=(W(e[F>>2]|0,p)|0)+l|0,s=e[U>>2]|0),(l&s|0)!=(l|0)&&(l=s&~(l>>31)),o=l&255,l=(W(W(p,k)|0,O)|0)+V|0,(l|0)>=(n|0)?(s+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,p)|0)|0):l=(W(e[F>>2]|0,p)|0)+l|0,(l&s|0)!=(l|0)&&(l=s&~(l>>31)),a=l&255,l=(W(W(p,g)|0,B)|0)+_|0,(l|0)>=(n|0)?(s+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,p)|0)|0):l=(W(e[F>>2]|0,p)|0)+l|0,(l&s|0)==(l|0)){F=l,F=F&255,d[t>>0]=o,_=t+1|0,d[_>>0]=a,t=t+2|0,d[t>>0]=F;return}F=s&~(l>>31),F=F&255,d[t>>0]=o,_=t+1|0,d[_>>0]=a,t=t+2|0,d[t>>0]=F}function Kr(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=r+9|0,a=N[g>>0]|0,p=r+4|0,h=e[p>>2]|0,o=(W(a>>>1,h)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-h+(s<<31>>31)|0,n2(t,o,s,(e[t+156>>2]|0)+-1-(e[36476+(e[t+4600>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[p>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[g>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[g>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r}function _l(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;I=y,y=y+32|0,s=I,C=t+144|0;e:do if(e[C>>2]|0)r=t+152|0;else if(n=e[t+136>>2]|0,r=t+152|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+184>>2]|0))&&(e[s+8>>2]|0)==(e[t+188>>2]|0)&&(e[s+12>>2]|0)==(e[t+192>>2]|0))switch(e[r>>2]|0){case 8:{C=e[8900]|0,e[t+4612>>2]=C+(((e[8901]|0)-C|0)>>>1),y=I;return}case 10:{C=e[8903]|0,e[t+4612>>2]=C+(((e[8904]|0)-C|0)>>>1),y=I;return}case 12:{C=e[8906]|0,e[t+4612>>2]=C+(((e[8907]|0)-C|0)>>>1),y=I;return}case 16:{C=e[8909]|0,e[t+4612>>2]=C+(((e[8910]|0)-C|0)>>>1),y=I;return}default:break e}while(!1);if(g=1<>2],n=t+4616|0,s=g<<1,o=t+4620|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),p=t+4612|0,e[p>>2]=r+g,r=0-g|0,(g|0)<=(r|0)){y=I;return}c=t+192|0,h=t+188|0,a=t+184|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[h>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[C>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[p>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(g|0));y=I}function Rl(t){t=t|0;var r=0,n=0;e[t>>2]=35996,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Pl(t){t=t|0;var r=0,n=0;if(e[t>>2]=35996,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function Ll(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,65535,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+160>>2]=a|0?a:e[c+4>>2]|0,e[t+164>>2]=l,e[t+168>>2]=s,bl(t),s=0;do e[t+172+(s*12|0)>>2]=1024,e[t+172+(s*12|0)+4>>2]=0,E[t+172+(s*12|0)+8>>1]=0,E[t+172+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4552>>2]=1024,e[t+4556>>2]=0,d[t+4560>>0]=c,d[t+4561>>0]=1,d[t+4562>>0]=0,e[t+4564>>2]=1024,e[t+4568>>2]=1,d[t+4572>>0]=c,d[t+4573>>0]=1,d[t+4574>>0]=0,e[t+4576>>2]=0,y=o}function Ul(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+16|0,h=g,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[h>>2]=0,e[h+4>>2]=s,c=n+8|0,e[h+8>>2]=e[c>>2],s){r=G0(4600)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35772,o=r+132|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+148>>2]=e[s>>2],e[r+152>>2]=0,e[r+156>>2]=0,e[r+160>>2]=0,o=r+4544|0,s=r+164|0;do e[s>>2]=0,e[s+4>>2]=0,E[s+8>>1]=0,E[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,d[o+10>>0]=0,a=r+4556|0,e[a>>2]=0,e[a+4>>2]=0,E[a+8>>1]=0,d[a+10>>0]=0,a=r+4568|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,h)}return h=t+100|0,e[h>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(p=r+4e3|0,(s|0)!=(p|0))&&(e[c>>2]=p,s=p):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,s2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],s2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0)}function Ol(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(k=t+8|0,B=t+36|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(37,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(38,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(39,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(40,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function s2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;O=y,y=y+32|0,F=O+12|0,V=O,k=t+156|0,U=(e[k>>2]|0)+4|0,(e[t+32>>2]|0)==1?B=e[t+24>>2]|0:B=1,r=W(B<<1,U)|0,e[F>>2]=0,M=F+4|0,e[M>>2]=0,e[F+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,F|0),_=f,f=0,_&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,_=f,f=0,!(_&1))){e[F>>2]=s,_=s+(r<<1)|0,e[F+8>>2]=_,je(s|0,0,n|0)|0,e[M>>2]=_;break}s=b()|0,r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}while(!1);e[V>>2]=0,_=V+4|0,e[_>>2]=0,e[V+8>>2]=0;do if(!B)a=18;else{if(B>>>0>1073741823&&(f=0,n0(178,V|0),I=f,f=0,I&1)||(a=16),(a|0)==16&&(o=B<<2,f=0,l=u0(67,o|0)|0,I=f,f=0,!(I&1))){e[V>>2]=l,a=l+(B<<2)|0,e[V+8>>2]=a,je(l|0,0,o|0)|0,e[_>>2]=a,a=18;break}s=b()|0,r=e[V>>2]|0,n=r,r&&(o=e[_>>2]|0,(o|0)!=(r|0)&&(e[_>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((a|0)==18){l=t+12|0;e:do if((e[l>>2]|0)>0){a=t+4580|0,c=(W(B,U)|0)+1|0,h=t+4584|0,p=t+92|0,g=(B|0)>0,C=t+4576|0,I=0;i:for(;;){if(n=e[F>>2]|0,r=n+2|0,e[a>>2]=r,n=n+(c<<1)|0,e[h>>2]=n,I&1?(e[a>>2]=n,e[h>>2]=r):r=n,o=e[p>>2]|0,f=0,P0(e[(e[o>>2]|0)+12>>2]|0,o|0,r|0,e[k>>2]|0,U|0),o=f,f=0,o&1){a=28;break}if(g){r=e[a>>2]|0,n=e[h>>2]|0,s=e[V>>2]|0,o=0;do{if(e[C>>2]=e[s+(o<<2)>>2],s=e[k>>2]|0,E[r+(s<<1)>>1]=E[r+(s+-1<<1)>>1]|0,E[n+-2>>1]=E[r>>1]|0,f=0,h0(71,t|0,0),s=f,f=0,s&1){a=27;break i}s=e[V>>2]|0,e[s+(o<<2)>>2]=e[C>>2],r=(e[a>>2]|0)+(U<<1)|0,e[a>>2]=r,n=(e[h>>2]|0)+(U<<1)|0,e[h>>2]=n,o=o+1|0}while((o|0)<(B|0))}if(I=I+1|0,(I|0)>=(e[l>>2]|0)){a=40;break e}}if((a|0)==27){s=b()|0;break}else if((a|0)==28){s=b()|0;break}}else a=40;while(!1);do if((a|0)==40){if(f=0,n0(182,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[V>>2]|0,n=r,r&&(s=e[_>>2]|0,(s|0)!=(r|0)&&(e[_>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[F>>2]|0,!r){y=O;return}n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),y=O;return}while(!1);r=e[V>>2]|0,n=r,r&&(o=e[_>>2]|0,(o|0)!=(r|0)&&(e[_>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}function Nl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=t+4580|0,r=e[C>>2]|0,U=t+156|0,!((e[U>>2]|0)<=0))for(I=t+4584|0,k=t+4588|0,o=r,l=q[r+-2>>1]|0,r=q[r>>1]|0,g=0;p=e[I>>2]|0,h=q[p+(g+-1<<1)>>1]|0,s=g+1|0,n=q[o+(s<<1)>>1]|0,c=e[k>>2]|0,a=r-l|0,o=l-h|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-h>>31,(l^o|0)<0?o=r:o=h+((l^a|0)<0?0:a)|0,p=Bl(t,c,q[p+(g<<1)>>1]|0,o,0)|0,E[(e[I>>2]|0)+(g<<1)>>1]=p):(s=(Vl(t,g,0)|0)+g|0,n=e[C>>2]|0,r=q[n+(s+-1<<1)>>1]|0,n=q[n+(s<<1)>>1]|0),!((s|0)>=(e[U>>2]|0));)o=e[C>>2]|0,l=r,r=n,g=s}function Bl(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(U=r>>31,h=(U^r)-U|0,k=t+172+(h*12|0)+10|0,a=E[k>>1]|0,I=t+172+(h*12|0)|0,o=e[I>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(l=5;(a<>1]^U)-U+s|0,(o&65535|0)==(o|0)?g=o:g=o>>31&65535^65535,c=(n-g^U)-U<<16,p=c>>16,l?o=0:o=(e[t+172+(h*12|0)+4>>2]<<1)+-1+a>>31,s=o^p,s=s>>30^s<<1,o=s>>l,(o|0)<47?((o|0)>30&&(a=(o|0)/2|0,xe(t,0,a),o=o-a|0),xe(t,1,o+1|0),xe(t,s&(1<>1]|0,o=a<<16>>16==64,l=o&1,n=(e[s>>2]|0)+p>>l,a=o?32:a<<16>>16,e[I>>2]=(e[I>>2]|0)+((c|0)>-65536?p:0-p|0)>>l,l=a+1|0,E[k>>1]=l,o=l+n|0,(o|0)<1?(k=E[C>>1]|0,E[C>>1]=(k&65535)-(k<<16>>16>-128&1),k=(o|0)>(~a|0)?o:0-a|0,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&65535,r|0):(n|0)<=0?(k=n,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&65535,r|0):(k=n-l|0,I=E[C>>1]|0,E[C>>1]=(I<<16>>16<127&1)+(I&65535),k=(k|0)>0?0:k,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&65535,r|0)}function Vl(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;for(a=(e[t+156>>2]|0)-r|0,c=e[t+4584>>2]|0,p=e[t+4580>>2]|0,o=E[c+(r+-1<<1)>>1]|0,s=0;;){if(n=c+(s+r<<1)|0,(E[n>>1]|0)!=o<<16>>16){g=s;break}if(E[n>>1]=o,s=s+1|0,(s|0)==(a|0)){g=a;break}}if(l=o&65535,o=(g|0)==(a|0),h=t+4576|0,s=e[36476+(e[h>>2]<<2)>>2]|0,(1<(g|0))n=g;else{n=g;do xe(t,1,1),s=e[h>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[h>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>1]|0,n=q[p+(n<<1)>>1]|0,p=l-n|0,(((p|0)>-1?p:0-p|0)|0)<1?(n=s-l<<16>>16,o2(t,t+4564|0,n),n=n+l|0):(p=n-l>>31|1,r=(W(s-n<<16,p)|0)>>16,o2(t,t+4552|0,r),n=(W(r,p)|0)+n|0),E[o>>1]=n,t=e[h>>2]|0,e[h>>2]=(t|0)<1?0:t+-1|0,t=g+1|0,t|0)}function o2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=r+9|0,a=N[g>>0]|0,p=r+4|0,h=e[p>>2]|0,o=(W(a>>>1,h)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-h+(s<<31>>31)|0,ql(t,o,s,63-(e[36476+(e[t+4576>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[p>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[g>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[g>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r}function ql(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(o=n>>r,l=s+-16|0,(o|0)<(s+-17|0)){(o|0)>30&&(s=(o|0)/2|0,xe(t,0,s),o=o-s|0),xe(t,1,o+1|0),xe(t,(1<31?(xe(t,0,31),xe(t,1,s+-47|0)):xe(t,1,l),xe(t,n+65535&65535,16)}function bl(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=y,y=y+32|0,c=p,hi(c,65535,0),h=t+160|0,(e[c+4>>2]|0)==(e[h>>2]|0)&&(e[c+8>>2]|0)==(e[t+164>>2]|0)&&(e[c+12>>2]|0)==(e[t+168>>2]|0)){h=e[8909]|0,e[t+4588>>2]=h+(((e[8910]|0)-h|0)>>>1),y=p;return}for(n=t+4592|0,s=t+4596|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=131072?l>>>0>131072&&(a=r+131072|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,131072-l|0),r=e[n>>2]|0),c=t+4588|0,e[c>>2]=r+65536,a=t+168|0,o=t+164|0,l=-65536;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[h>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==65536)break}y=p}function Gl(t){t=t|0;var r=0,n=0;e[t>>2]=35968,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Ql(t){t=t|0;var r=0,n=0;if(e[t>>2]=35968,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function zl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,4095,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+160>>2]=a|0?a:e[c+4>>2]|0,e[t+164>>2]=l,e[t+168>>2]=s,Zl(t),s=0;do e[t+172+(s*12|0)>>2]=64,e[t+172+(s*12|0)+4>>2]=0,E[t+172+(s*12|0)+8>>1]=0,E[t+172+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4552>>2]=64,e[t+4556>>2]=0,d[t+4560>>0]=c,d[t+4561>>0]=1,d[t+4562>>0]=0,e[t+4564>>2]=64,e[t+4568>>2]=1,d[t+4572>>0]=c,d[t+4573>>0]=1,d[t+4574>>0]=0,e[t+4576>>2]=0,y=o}function Hl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+16|0,h=g,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[h>>2]=0,e[h+4>>2]=s,c=n+8|0,e[h+8>>2]=e[c>>2],s){r=G0(4600)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35744,o=r+132|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+148>>2]=e[s>>2],e[r+152>>2]=0,e[r+156>>2]=0,e[r+160>>2]=0,o=r+4544|0,s=r+164|0;do e[s>>2]=0,e[s+4>>2]=0,E[s+8>>1]=0,E[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,d[o+10>>0]=0,a=r+4556|0,e[a>>2]=0,e[a+4>>2]=0,E[a+8>>1]=0,d[a+10>>0]=0,a=r+4568|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,h)}return h=t+100|0,e[h>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(p=r+4e3|0,(s|0)!=(p|0))&&(e[c>>2]=p,s=p):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,l2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],l2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0)}function Yl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(k=t+8|0,B=t+36|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(37,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(38,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(39,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(40,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function l2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;O=y,y=y+32|0,F=O+12|0,V=O,k=t+156|0,U=(e[k>>2]|0)+4|0,(e[t+32>>2]|0)==1?B=e[t+24>>2]|0:B=1,r=W(B<<1,U)|0,e[F>>2]=0,M=F+4|0,e[M>>2]=0,e[F+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,F|0),_=f,f=0,_&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,_=f,f=0,!(_&1))){e[F>>2]=s,_=s+(r<<1)|0,e[F+8>>2]=_,je(s|0,0,n|0)|0,e[M>>2]=_;break}s=b()|0,r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}while(!1);e[V>>2]=0,_=V+4|0,e[_>>2]=0,e[V+8>>2]=0;do if(!B)a=18;else{if(B>>>0>1073741823&&(f=0,n0(178,V|0),I=f,f=0,I&1)||(a=16),(a|0)==16&&(o=B<<2,f=0,l=u0(67,o|0)|0,I=f,f=0,!(I&1))){e[V>>2]=l,a=l+(B<<2)|0,e[V+8>>2]=a,je(l|0,0,o|0)|0,e[_>>2]=a,a=18;break}s=b()|0,r=e[V>>2]|0,n=r,r&&(o=e[_>>2]|0,(o|0)!=(r|0)&&(e[_>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((a|0)==18){l=t+12|0;e:do if((e[l>>2]|0)>0){a=t+4580|0,c=(W(B,U)|0)+1|0,h=t+4584|0,p=t+92|0,g=(B|0)>0,C=t+4576|0,I=0;i:for(;;){if(n=e[F>>2]|0,r=n+2|0,e[a>>2]=r,n=n+(c<<1)|0,e[h>>2]=n,I&1?(e[a>>2]=n,e[h>>2]=r):r=n,o=e[p>>2]|0,f=0,P0(e[(e[o>>2]|0)+12>>2]|0,o|0,r|0,e[k>>2]|0,U|0),o=f,f=0,o&1){a=28;break}if(g){r=e[a>>2]|0,n=e[h>>2]|0,s=e[V>>2]|0,o=0;do{if(e[C>>2]=e[s+(o<<2)>>2],s=e[k>>2]|0,E[r+(s<<1)>>1]=E[r+(s+-1<<1)>>1]|0,E[n+-2>>1]=E[r>>1]|0,f=0,h0(72,t|0,0),s=f,f=0,s&1){a=27;break i}s=e[V>>2]|0,e[s+(o<<2)>>2]=e[C>>2],r=(e[a>>2]|0)+(U<<1)|0,e[a>>2]=r,n=(e[h>>2]|0)+(U<<1)|0,e[h>>2]=n,o=o+1|0}while((o|0)<(B|0))}if(I=I+1|0,(I|0)>=(e[l>>2]|0)){a=40;break e}}if((a|0)==27){s=b()|0;break}else if((a|0)==28){s=b()|0;break}}else a=40;while(!1);do if((a|0)==40){if(f=0,n0(182,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[V>>2]|0,n=r,r&&(s=e[_>>2]|0,(s|0)!=(r|0)&&(e[_>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[F>>2]|0,!r){y=O;return}n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),y=O;return}while(!1);r=e[V>>2]|0,n=r,r&&(o=e[_>>2]|0,(o|0)!=(r|0)&&(e[_>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}function jl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=t+4580|0,r=e[C>>2]|0,U=t+156|0,!((e[U>>2]|0)<=0))for(I=t+4584|0,k=t+4588|0,o=r,l=q[r+-2>>1]|0,r=q[r>>1]|0,g=0;p=e[I>>2]|0,h=q[p+(g+-1<<1)>>1]|0,s=g+1|0,n=q[o+(s<<1)>>1]|0,c=e[k>>2]|0,a=r-l|0,o=l-h|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-h>>31,(l^o|0)<0?o=r:o=h+((l^a|0)<0?0:a)|0,p=Xl(t,c,q[p+(g<<1)>>1]|0,o,0)|0,E[(e[I>>2]|0)+(g<<1)>>1]=p):(s=(Kl(t,g,0)|0)+g|0,n=e[C>>2]|0,r=q[n+(s+-1<<1)>>1]|0,n=q[n+(s<<1)>>1]|0),!((s|0)>=(e[U>>2]|0));)o=e[C>>2]|0,l=r,r=n,g=s}function Xl(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(U=r>>31,h=(U^r)-U|0,k=t+172+(h*12|0)+10|0,a=E[k>>1]|0,I=t+172+(h*12|0)|0,o=e[I>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(l=5;(a<>1]^U)-U+s|0,(o&4095|0)==(o|0)?g=o:g=o>>31&4095^4095,c=(n-g^U)-U<<20,p=c>>20,l?o=0:o=(e[t+172+(h*12|0)+4>>2]<<1)+-1+a>>31,s=o^p,s=s>>30^s<<1,o=s>>l,(o|0)<35?((o|0)>30&&(a=(o|0)/2|0,xe(t,0,a),o=o-a|0),xe(t,1,o+1|0),xe(t,s&(1<>1]|0,o=a<<16>>16==64,l=o&1,n=(e[s>>2]|0)+p>>l,a=o?32:a<<16>>16,e[I>>2]=(e[I>>2]|0)+((c|0)>-1048576?p:0-p|0)>>l,l=a+1|0,E[k>>1]=l,o=l+n|0,(o|0)<1?(k=E[C>>1]|0,E[C>>1]=(k&65535)-(k<<16>>16>-128&1),k=(o|0)>(~a|0)?o:0-a|0,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&4095,r=r&65535,r|0):(n|0)<=0?(k=n,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&4095,r=r&65535,r|0):(k=n-l|0,I=E[C>>1]|0,E[C>>1]=(I<<16>>16<127&1)+(I&65535),k=(k|0)>0?0:k,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&4095,r=r&65535,r|0)}function Kl(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;for(a=(e[t+156>>2]|0)-r|0,c=e[t+4584>>2]|0,p=e[t+4580>>2]|0,o=E[c+(r+-1<<1)>>1]|0,s=0;;){if(n=c+(s+r<<1)|0,(E[n>>1]|0)!=o<<16>>16){g=s;break}if(E[n>>1]=o,s=s+1|0,(s|0)==(a|0)){g=a;break}}if(l=o&65535,o=(g|0)==(a|0),h=t+4576|0,s=e[36476+(e[h>>2]<<2)>>2]|0,(1<(g|0))n=g;else{n=g;do xe(t,1,1),s=e[h>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[h>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>1]|0,n=q[p+(n<<1)>>1]|0,p=l-n|0,(((p|0)>-1?p:0-p|0)|0)<1?(n=s-l<<20>>20,a2(t,t+4564|0,n),n=n+l|0):(p=n-l>>31|1,r=(W(s-n<<20,p)|0)>>20,a2(t,t+4552|0,r),n=(W(r,p)|0)+n|0),E[o>>1]=n&4095,t=e[h>>2]|0,e[h>>2]=(t|0)<1?0:t+-1|0,t=g+1|0,t|0)}function a2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=r+9|0,a=N[g>>0]|0,p=r+4|0,h=e[p>>2]|0,o=(W(a>>>1,h)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-h+(s<<31>>31)|0,Wl(t,o,s,47-(e[36476+(e[t+4576>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[p>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[g>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[g>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r}function Wl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(o=n>>r,l=s+-12|0,(o|0)<(s+-13|0)){(o|0)>30&&(s=(o|0)/2|0,xe(t,0,s),o=o-s|0),xe(t,1,o+1|0),xe(t,(1<31?(xe(t,0,31),xe(t,1,s+-43|0)):xe(t,1,l),xe(t,n+4095&4095,12)}function Zl(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=y,y=y+32|0,c=p,hi(c,4095,0),h=t+160|0,(e[c+4>>2]|0)==(e[h>>2]|0)&&(e[c+8>>2]|0)==(e[t+164>>2]|0)&&(e[c+12>>2]|0)==(e[t+168>>2]|0)){h=e[8906]|0,e[t+4588>>2]=h+(((e[8907]|0)-h|0)>>>1),y=p;return}for(n=t+4592|0,s=t+4596|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=8192?l>>>0>8192&&(a=r+8192|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,8192-l|0),r=e[n>>2]|0),c=t+4588|0,e[c>>2]=r+4096,a=t+168|0,o=t+164|0,l=-4096;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[h>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==4096)break}y=p}function Jl(t){t=t|0;var r=0,n=0;e[t>>2]=35940,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function $l(t){t=t|0;var r=0,n=0;if(e[t>>2]=35940,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function ea(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,255,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+160>>2]=a|0?a:e[c+4>>2]|0,e[t+164>>2]=l,e[t+168>>2]=s,la(t),s=0;do e[t+172+(s*12|0)>>2]=4,e[t+172+(s*12|0)+4>>2]=0,E[t+172+(s*12|0)+8>>1]=0,E[t+172+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4552>>2]=4,e[t+4556>>2]=0,d[t+4560>>0]=c,d[t+4561>>0]=1,d[t+4562>>0]=0,e[t+4564>>2]=4,e[t+4568>>2]=1,d[t+4572>>0]=c,d[t+4573>>0]=1,d[t+4574>>0]=0,e[t+4576>>2]=0,y=o}function ia(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+16|0,h=g,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[h>>2]=0,e[h+4>>2]=s,c=n+8|0,e[h+8>>2]=e[c>>2],s){r=G0(4600)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35716,o=r+132|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+148>>2]=e[s>>2],e[r+152>>2]=0,e[r+156>>2]=0,e[r+160>>2]=0,o=r+4544|0,s=r+164|0;do e[s>>2]=0,e[s+4>>2]=0,E[s+8>>1]=0,E[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,d[o+10>>0]=0,a=r+4556|0,e[a>>2]=0,e[a+4>>2]=0,E[a+8>>1]=0,d[a+10>>0]=0,a=r+4568|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,h)}return h=t+100|0,e[h>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(p=r+4e3|0,(s|0)!=(p|0))&&(e[c>>2]=p,s=p):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,f2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],f2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0)}function ta(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(k=t+8|0,B=t+36|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(44,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(45,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(46,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(47,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0)}function f2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0;V=y,y=y+32|0,_=V+12|0,B=V,I=t+156|0,k=(e[I>>2]|0)+4|0,(e[t+32>>2]|0)==1?U=e[t+24>>2]|0:U=1,r=W(U<<1,k)|0,e[_>>2]=0,F=_+4|0,e[F>>2]=0,e[_+8>>2]=0;e:do if(r){if((r|0)<0&&(f=0,n0(178,_|0),O=f,f=0,O&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r|0)|0,O=f,f=0,!(O&1))){for(e[F>>2]=n,e[_>>2]=n,e[_+8>>2]=n+r;;)if(d[n>>0]=0,n=(e[F>>2]|0)+1|0,e[F>>2]=n,r=r+-1|0,!r)break e}n=b()|0,r=e[_>>2]|0,r||r0(n|0),(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),a0(r),r0(n|0)}while(!1);e[B>>2]=0,O=B+4|0,e[O>>2]=0,e[B+8>>2]=0;do if(!U)l=19;else{if(U>>>0>1073741823&&(f=0,n0(178,B|0),C=f,f=0,C&1)||(l=17),(l|0)==17&&(s=U<<2,f=0,o=u0(67,s|0)|0,C=f,f=0,!(C&1))){e[B>>2]=o,l=o+(U<<2)|0,e[B+8>>2]=l,je(o|0,0,s|0)|0,e[O>>2]=l,l=19;break}n=b()|0,r=e[B>>2]|0,s=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-s|0)>>>2)<<2)),a0(r))}while(!1);if((l|0)==19){o=t+12|0;e:do if((e[o>>2]|0)>0){l=t+4580|0,a=(W(U,k)|0)+1|0,c=t+4584|0,h=t+92|0,p=(U|0)>0,g=t+4576|0,C=0;i:for(;;){if(n=e[_>>2]|0,r=n+1|0,e[l>>2]=r,n=n+a|0,e[c>>2]=n,C&1?(e[l>>2]=n,e[c>>2]=r):r=n,s=e[h>>2]|0,f=0,P0(e[(e[s>>2]|0)+12>>2]|0,s|0,r|0,e[I>>2]|0,k|0),s=f,f=0,s&1){l=29;break}if(p){r=e[l>>2]|0,n=e[B>>2]|0,s=0;do{if(e[g>>2]=e[n+(s<<2)>>2],n=e[I>>2]|0,d[r+n>>0]=d[r+(n+-1)>>0]|0,d[(e[c>>2]|0)+-1>>0]=d[e[l>>2]>>0]|0,f=0,h0(73,t|0,0),n=f,f=0,n&1){l=28;break i}n=e[B>>2]|0,e[n+(s<<2)>>2]=e[g>>2],r=(e[l>>2]|0)+k|0,e[l>>2]=r,e[c>>2]=(e[c>>2]|0)+k,s=s+1|0}while((s|0)<(U|0))}if(C=C+1|0,(C|0)>=(e[o>>2]|0)){l=41;break e}}if((l|0)==28){n=b()|0;break}else if((l|0)==29){n=b()|0;break}}else l=41;while(!1);do if((l|0)==41){if(f=0,n0(182,t|0),t=f,f=0,t&1){n=b()|0;break}if(r=e[B>>2]|0,n=r,r&&(s=e[O>>2]|0,(s|0)!=(r|0)&&(e[O>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[_>>2]|0,!r){y=V;return}(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),a0(r),y=V;return}while(!1);r=e[B>>2]|0,s=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-s|0)>>>2)<<2)),a0(r))}r=e[_>>2]|0,r||r0(n|0),(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),a0(r),r0(n|0)}function ra(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=t+4580|0,r=e[C>>2]|0,U=t+156|0,!((e[U>>2]|0)<=0))for(I=t+4584|0,k=t+4588|0,o=r,l=N[r+-1>>0]|0,r=N[r>>0]|0,g=0;p=e[I>>2]|0,h=N[p+(g+-1)>>0]|0,s=g+1|0,n=N[o+s>>0]|0,c=e[k>>2]|0,a=r-l|0,o=l-h|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-h>>31,(l^o|0)<0?o=r:o=h+((l^a|0)<0?0:a)|0,p=na(t,c,N[p+g>>0]|0,o,0)|0,d[(e[I>>2]|0)+g>>0]=p):(s=(sa(t,g,0)|0)+g|0,n=e[C>>2]|0,r=N[n+(s+-1)>>0]|0,n=N[n+s>>0]|0),!((s|0)>=(e[U>>2]|0));)o=e[C>>2]|0,l=r,r=n,g=s}function na(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(U=r>>31,h=(U^r)-U|0,k=t+172+(h*12|0)+10|0,a=E[k>>1]|0,I=t+172+(h*12|0)|0,o=e[I>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(l=5;(a<>1]^U)-U+s|0,(o&255|0)==(o|0)?g=o:g=o>>31&255^255,c=(n-g^U)-U<<24,p=c>>24,l?o=0:o=(e[t+172+(h*12|0)+4>>2]<<1)+-1+a>>31,o=o^p,o=o>>30^o<<1,s=o>>l,(s|0)<23?(xe(t,1,s+1|0),xe(t,o&(1<>1]|0,o=a<<16>>16==64,l=o&1,n=(e[s>>2]|0)+p>>l,a=o?32:a<<16>>16,e[I>>2]=(e[I>>2]|0)+((c|0)>-16777216?p:0-p|0)>>l,l=a+1|0,E[k>>1]=l,o=l+n|0,(o|0)<1?(k=E[C>>1]|0,E[C>>1]=(k&65535)-(k<<16>>16>-128&1),k=(o|0)>(~a|0)?o:0-a|0,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&255,r|0):(n|0)<=0?(k=n,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&255,r|0):(k=n-l|0,I=E[C>>1]|0,E[C>>1]=(I<<16>>16<127&1)+(I&65535),k=(k|0)>0?0:k,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&255,r|0)}function sa(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;for(a=(e[t+156>>2]|0)-r|0,c=e[t+4584>>2]|0,p=e[t+4580>>2]|0,o=d[c+(r+-1)>>0]|0,s=0;;){if(n=c+(s+r)|0,(d[n>>0]|0)!=o<<24>>24){g=s;break}if(d[n>>0]=o,s=s+1|0,(s|0)==(a|0)){g=a;break}}if(l=o&255,o=(g|0)==(a|0),h=t+4576|0,s=e[36476+(e[h>>2]<<2)>>2]|0,(1<(g|0))n=g;else{n=g;do xe(t,1,1),s=e[h>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[h>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>0]|0,n=N[p+n>>0]|0,p=l-n|0,(((p|0)>-1?p:0-p|0)|0)<1?(n=s-l<<24>>24,u2(t,t+4564|0,n),n=n+l|0):(p=n-l>>31|1,r=(W(s-n<<24,p)|0)>>24,u2(t,t+4552|0,r),n=(W(r,p)|0)+n|0),d[o>>0]=n,t=e[h>>2]|0,e[h>>2]=(t|0)<1?0:t+-1|0,t=g+1|0,t|0)}function u2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=r+9|0,a=N[g>>0]|0,p=r+4|0,h=e[p>>2]|0,o=(W(a>>>1,h)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-h+(s<<31>>31)|0,oa(t,o,s,31-(e[36476+(e[t+4576>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[p>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[g>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[g>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r}function oa(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(o=n>>r,l=s+-8|0,(o|0)<(s+-9|0)){(o|0)>30&&(s=(o|0)/2|0,xe(t,0,s),o=o-s|0),xe(t,1,o+1|0),xe(t,(1<31?(xe(t,0,31),xe(t,1,s+-39|0)):xe(t,1,l),xe(t,n+255&255,8)}function la(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=y,y=y+32|0,c=p,hi(c,255,0),h=t+160|0,(e[c+4>>2]|0)==(e[h>>2]|0)&&(e[c+8>>2]|0)==(e[t+164>>2]|0)&&(e[c+12>>2]|0)==(e[t+168>>2]|0)){h=e[8900]|0,e[t+4588>>2]=h+(((e[8901]|0)-h|0)>>>1),y=p;return}for(n=t+4592|0,s=t+4596|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=512?l>>>0>512&&(a=r+512|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,512-l|0),r=e[n>>2]|0),c=t+4588|0,e[c>>2]=r+256,a=t+168|0,o=t+164|0,l=-256;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[h>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==256)break}y=p}function aa(t){t=t|0;var r=0,n=0;e[t>>2]=35912,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function fa(t){t=t|0;var r=0,n=0;if(e[t>>2]=35912,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function ua(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,255,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+160>>2]=a|0?a:e[c+4>>2]|0,e[t+164>>2]=l,e[t+168>>2]=s,pa(t),s=0;do e[t+172+(s*12|0)>>2]=4,e[t+172+(s*12|0)+4>>2]=0,E[t+172+(s*12|0)+8>>1]=0,E[t+172+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4552>>2]=4,e[t+4556>>2]=0,d[t+4560>>0]=c,d[t+4561>>0]=1,d[t+4562>>0]=0,e[t+4564>>2]=4,e[t+4568>>2]=1,d[t+4572>>0]=c,d[t+4573>>0]=1,d[t+4574>>0]=0,e[t+4576>>2]=0,y=o}function ca(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+16|0,h=g,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[h>>2]=0,e[h+4>>2]=s,c=n+8|0,e[h+8>>2]=e[c>>2],s){r=G0(4600)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35688,o=r+132|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+148>>2]=e[s>>2],e[r+152>>2]=0,e[r+156>>2]=0,e[r+160>>2]=0,o=r+4544|0,s=r+164|0;do e[s>>2]=0,e[s+4>>2]=0,E[s+8>>1]=0,E[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,d[o+10>>0]=0,a=r+4556|0,e[a>>2]=0,e[a+4>>2]=0,E[a+8>>1]=0,d[a+10>>0]=0,a=r+4568|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,h)}return h=t+100|0,e[h>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(p=r+4e3|0,(s|0)!=(p|0))&&(e[c>>2]=p,s=p):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,c2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],c2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0)}function ha(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(k=t+8|0,B=t+36|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(44,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(45,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(46,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(47,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0)}function c2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;V=y,y=y+32|0,_=V+12|0,B=V,I=t+156|0,k=(e[I>>2]|0)+4|0,(e[t+32>>2]|0)==1?U=e[t+24>>2]|0:U=1,r=W(U<<1,k)|0,e[_>>2]=0,F=_+4|0,e[F>>2]=0,e[_+8>>2]=0;e:do if(r){if(r>>>0>1431655765&&(f=0,n0(178,_|0),O=f,f=0,O&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r*3|0)|0,O=f,f=0,!(O&1))){for(e[F>>2]=n,e[_>>2]=n,e[_+8>>2]=n+(r*3|0);;)if(d[n>>0]=0,d[n+1>>0]=0,d[n+2>>0]=0,n=(e[F>>2]|0)+3|0,e[F>>2]=n,r=r+-1|0,!r)break e}s=b()|0,r=e[_>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),r0(s|0)}while(!1);e[B>>2]=0,O=B+4|0,e[O>>2]=0,e[B+8>>2]=0;do if(!U)l=19;else{if(U>>>0>1073741823&&(f=0,n0(178,B|0),C=f,f=0,C&1)||(l=17),(l|0)==17&&(s=U<<2,f=0,o=u0(67,s|0)|0,C=f,f=0,!(C&1))){e[B>>2]=o,l=o+(U<<2)|0,e[B+8>>2]=l,je(o|0,0,s|0)|0,e[O>>2]=l,l=19;break}s=b()|0,r=e[B>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((l|0)==19){o=t+12|0;e:do if((e[o>>2]|0)>0){l=t+4580|0,a=(W(U,k)|0)+1|0,c=t+4584|0,h=t+92|0,p=(U|0)>0,g=t+4576|0,C=0;i:for(;;){if(s=e[_>>2]|0,r=s+3|0,e[l>>2]=r,n=s+(a*3|0)|0,e[c>>2]=n,C&1?(e[l>>2]=n,e[c>>2]=r,r=1):r=a,n=e[h>>2]|0,f=0,P0(e[(e[n>>2]|0)+12>>2]|0,n|0,s+(r*3|0)|0,e[I>>2]|0,k|0),s=f,f=0,s&1){l=29;break}if(p){r=e[B>>2]|0,n=e[l>>2]|0,s=0;do{if(e[g>>2]=e[r+(s<<2)>>2],M=e[I>>2]|0,r=n+(M*3|0)|0,n=n+((M+-1|0)*3|0)|0,d[r>>0]=d[n>>0]|0,d[r+1>>0]=d[n+1>>0]|0,d[r+2>>0]=d[n+2>>0]|0,r=e[l>>2]|0,n=(e[c>>2]|0)+-3|0,d[n>>0]=d[r>>0]|0,d[n+1>>0]=d[r+1>>0]|0,d[n+2>>0]=d[r+2>>0]|0,f=0,h0(74,t|0,0),n=f,f=0,n&1){l=28;break i}r=e[B>>2]|0,e[r+(s<<2)>>2]=e[g>>2],n=(e[l>>2]|0)+(k*3|0)|0,e[l>>2]=n,e[c>>2]=(e[c>>2]|0)+(k*3|0),s=s+1|0}while((s|0)<(U|0))}if(C=C+1|0,(C|0)>=(e[o>>2]|0)){l=41;break e}}if((l|0)==28){s=b()|0;break}else if((l|0)==29){s=b()|0;break}}else l=41;while(!1);do if((l|0)==41){if(f=0,n0(182,t|0),M=f,f=0,M&1){s=b()|0;break}if(r=e[B>>2]|0,n=r,r&&(s=e[O>>2]|0,(s|0)!=(r|0)&&(e[O>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[_>>2]|0,!r){y=V;return}n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),y=V;return}while(!1);r=e[B>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[_>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),r0(s|0)}function ma(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0;if(t0=t+156|0,!((e[t0>>2]|0)<=0))for(Z=t+4584|0,s0=t+4580|0,w0=t+4588|0,K=0;F=K+-1|0,l=e[Z>>2]|0,a=e[s0>>2]|0,r=K+1|0,o=N[a+(K*3|0)>>0]|0,X=e[w0>>2]|0,c=N[a+(F*3|0)>>0]|0,h=o-c|0,p=N[l+(F*3|0)>>0]|0,g=c-p|0,C=((((d[X+((N[a+(r*3|0)>>0]|0)-o)>>0]|0)*9|0)+(d[X+h>>0]|0)|0)*9|0)+(d[X+g>>0]|0)|0,s=N[a+(K*3|0)+1>>0]|0,I=N[a+(F*3|0)+1>>0]|0,k=s-I|0,U=N[l+(F*3|0)+1>>0]|0,B=I-U|0,V=((((d[X+((N[a+(r*3|0)+1>>0]|0)-s)>>0]|0)*9|0)+(d[X+k>>0]|0)|0)*9|0)+(d[X+B>>0]|0)|0,n=N[a+(K*3|0)+2>>0]|0,O=N[a+(F*3|0)+2>>0]|0,_=n-O|0,F=N[l+(F*3|0)+2>>0]|0,M=O-F|0,X=((((d[X+((N[a+(r*3|0)+2>>0]|0)-n)>>0]|0)*9|0)+(d[X+_>>0]|0)|0)*9|0)+(d[X+M>>0]|0)|0,V|C|X?(a=N[l+(K*3|0)>>0]|0,l=o-p>>31,(l^g|0)>=0&&((l^h|0)<0?o=p:o=p-c+o|0),a=Wr(t,C,a,o,0)|0,l=N[(e[Z>>2]|0)+(K*3|0)+1>>0]|0,o=s-U>>31,(o^B|0)>=0&&((o^k|0)<0?s=U:s=U-I+s|0),o=Wr(t,V,l,s,0)|0,l=N[(e[Z>>2]|0)+(K*3|0)+2>>0]|0,s=n-F>>31,(s^M|0)>=0&&((s^_|0)<0?n=F:n=F-O+n|0),X=Wr(t,X,l,n,0)|0,K=(e[Z>>2]|0)+(K*3|0)|0,d[K>>0]=a,d[K+1>>0]=o,d[K+2>>0]=X):r=(da(t,K,0)|0)+K|0,(r|0)<(e[t0>>2]|0);)K=r}function da(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0;for(p=(e[t+156>>2]|0)-r|0,g=e[t+4584>>2]|0,C=e[t+4580>>2]|0,h=g+((r+-1|0)*3|0)|0,I=d[h>>0]|0,c=d[h+1>>0]|0,h=d[h+2>>0]|0,l=0;n=g+((l+r|0)*3|0)|0,s=n+1|0,o=n+2|0,!!(((d[n>>0]|0)==I<<24>>24?(d[s>>0]|0)==c<<24>>24:0)&(d[o>>0]|0)==h<<24>>24);)if(d[n>>0]=I,d[s>>0]=c,d[o>>0]=h,l=l+1|0,(l|0)==(p|0)){l=p;break}if(o=(l|0)==(p|0),a=t+4576|0,s=e[36476+(e[a>>2]<<2)>>2]|0,(1<(l|0))n=l;else{n=l;do xe(t,1,1),s=e[a>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[a>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>0]|0,r=p+2|0,o=d[r>>0]|0,C=C+(s*3|0)|0,s=d[C+1>>0]|0,V=d[C+2>>0]|0,C=N[C>>0]|0,k=C-(I&255)>>31|1,U=(W((N[p>>0]|0)-C<<24,k)|0)>>24,B=t+4552|0,Zr(t,B,U),I=s&255,s=I-(c&255)>>31|1,n=(W((n&255)-I<<24,s)|0)>>24,Zr(t,B,n),c=V&255,h=c-(h&255)>>31|1,o=(W((o&255)-c<<24,h)|0)>>24,Zr(t,B,o),C=(W(U,k)|0)+C&255,I=(W(n,s)|0)+I&255,t=(W(o,h)|0)+c&255,d[p>>0]=C,d[g>>0]=I,d[r>>0]=t,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,t=l+1|0,t|0)}function Wr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(U=r>>31,h=(U^r)-U|0,k=t+172+(h*12|0)+10|0,a=E[k>>1]|0,I=t+172+(h*12|0)|0,o=e[I>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(l=5;(a<>1]^U)-U+s|0,(o&255|0)==(o|0)?g=o:g=o>>31&255^255,c=(n-g^U)-U<<24,p=c>>24,l?o=0:o=(e[t+172+(h*12|0)+4>>2]<<1)+-1+a>>31,o=o^p,o=o>>30^o<<1,s=o>>l,(s|0)<23?(xe(t,1,s+1|0),xe(t,o&(1<>1]|0,o=a<<16>>16==64,l=o&1,n=(e[s>>2]|0)+p>>l,a=o?32:a<<16>>16,e[I>>2]=(e[I>>2]|0)+((c|0)>-16777216?p:0-p|0)>>l,l=a+1|0,E[k>>1]=l,o=l+n|0,(o|0)<1?(k=E[C>>1]|0,E[C>>1]=(k&65535)-(k<<16>>16>-128&1),k=(o|0)>(~a|0)?o:0-a|0,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&255,r|0):(n|0)<=0?(k=n,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&255,r|0):(k=n-l|0,I=E[C>>1]|0,E[C>>1]=(I<<16>>16<127&1)+(I&65535),k=(k|0)>0?0:k,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&255,r|0)}function Zr(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=r+9|0,a=N[g>>0]|0,p=r+4|0,h=e[p>>2]|0,o=(W(a>>>1,h)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-h+(s<<31>>31)|0,ga(t,o,s,31-(e[36476+(e[t+4576>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[p>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[g>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[g>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r}function ga(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(o=n>>r,l=s+-8|0,(o|0)<(s+-9|0)){(o|0)>30&&(s=(o|0)/2|0,xe(t,0,s),o=o-s|0),xe(t,1,o+1|0),xe(t,(1<31?(xe(t,0,31),xe(t,1,s+-39|0)):xe(t,1,l),xe(t,n+255&255,8)}function pa(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=y,y=y+32|0,c=p,hi(c,255,0),h=t+160|0,(e[c+4>>2]|0)==(e[h>>2]|0)&&(e[c+8>>2]|0)==(e[t+164>>2]|0)&&(e[c+12>>2]|0)==(e[t+168>>2]|0)){h=e[8900]|0,e[t+4588>>2]=h+(((e[8901]|0)-h|0)>>>1),y=p;return}for(n=t+4592|0,s=t+4596|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=512?l>>>0>512&&(a=r+512|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,512-l|0),r=e[n>>2]|0),c=t+4588|0,e[c>>2]=r+256,a=t+168|0,o=t+164|0,l=-256;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[h>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==256)break}y=p}function Aa(t){t=t|0;var r=0,n=0;e[t>>2]=35884,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Sa(t){t=t|0;var r=0,n=0;if(e[t>>2]=35884,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function va(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;a=y,y=y+32|0,h=a,hi(h,e[t+136>>2]|0,e[t+144>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[h+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[h+12>>2]|0,n=e[r+16>>2]|0,s=e[h+16>>2]|0,e[t+184>>2]=c|0?c:e[h+4>>2]|0,e[t+188>>2]=l,e[t+192>>2]=o,Da(t),o=t+140|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+196+(l*12|0)>>2]=r,e[t+196+(l*12|0)+4>>2]=0,E[t+196+(l*12|0)+8>>1]=0,E[t+196+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,h=(n|0?n:s)&255,e[t+4576>>2]=c,e[t+4580>>2]=0,d[t+4584>>0]=h,d[t+4585>>0]=1,d[t+4586>>0]=0,e[t+4588>>2]=c,e[t+4592>>2]=1,d[t+4596>>0]=h,d[t+4597>>0]=1,d[t+4598>>0]=0,e[t+4600>>2]=0,y=a}function wa(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+16|0,h=g,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[h>>2]=0,e[h+4>>2]=s,c=n+8|0,e[h+8>>2]=e[c>>2],s){r=G0(4624)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35660,e[r+128>>2]=e[t+136>>2],e[r+132>>2]=e[t+140>>2],e[r+136>>2]=e[t+144>>2],e[r+140>>2]=e[t+148>>2],e[r+144>>2]=e[t+152>>2],e[r+148>>2]=e[t+156>>2],e[r+152>>2]=e[t+160>>2],o=r+156|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+172>>2]=e[s>>2],e[r+176>>2]=0,e[r+180>>2]=0,e[r+184>>2]=0,o=r+4568|0,s=r+188|0;do e[s>>2]=0,e[s+4>>2]=0,E[s+8>>1]=0,E[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,d[o+10>>0]=0,a=r+4580|0,e[a>>2]=0,e[a+4>>2]=0,E[a+8>>1]=0,d[a+10>>0]=0,a=r+4592|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,h)}return h=t+100|0,e[h>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(p=r+4e3|0,(s|0)!=(p|0))&&(e[c>>2]=p,s=p):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,h2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],h2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0)}function Ta(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(k=t+8|0,B=t+36|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(44,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(45,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(46,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(47,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0)}function h2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0;V=y,y=y+32|0,_=V+12|0,B=V,k=t+180|0,U=(e[k>>2]|0)+4|0,(e[t+32>>2]|0)==1?C=e[t+24>>2]|0:C=1,r=W(C<<1,U)|0,e[_>>2]=0,F=_+4|0,e[F>>2]=0,e[_+8>>2]=0;e:do if(r){if((r|0)<0&&(f=0,n0(178,_|0),O=f,f=0,O&1)||(I=6),(I|0)==6&&(f=0,n=u0(67,r|0)|0,O=f,f=0,!(O&1))){for(e[F>>2]=n,e[_>>2]=n,e[_+8>>2]=n+r;;)if(d[n>>0]=0,n=(e[F>>2]|0)+1|0,e[F>>2]=n,r=r+-1|0,!r)break e}n=b()|0,r=e[_>>2]|0,r||r0(n|0),(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),a0(r),r0(n|0)}while(!1);e[B>>2]=0,O=B+4|0,e[O>>2]=0,e[B+8>>2]=0;do if(!C)I=19;else{if(C>>>0>1073741823&&(f=0,n0(178,B|0),g=f,f=0,g&1)||(I=17),(I|0)==17&&(s=C<<2,f=0,o=u0(67,s|0)|0,g=f,f=0,!(g&1))){e[B>>2]=o,I=o+(C<<2)|0,e[B+8>>2]=I,je(o|0,0,s|0)|0,e[O>>2]=I,I=19;break}n=b()|0,r=e[B>>2]|0,s=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-s|0)>>>2)<<2)),a0(r))}while(!1);if((I|0)==19){a=t+12|0;e:do if((e[a>>2]|0)>0){if(c=t+4604|0,h=(W(C,U)|0)+1|0,p=t+4608|0,g=t+92|0,l=t+4600|0,(C|0)>0)o=0;else{for(s=0;n=e[_>>2]|0,r=n+1|0,e[c>>2]=r,n=n+h|0,e[p>>2]=n,s&1?(e[c>>2]=n,e[p>>2]=r):r=n,C=e[g>>2]|0,f=0,P0(e[(e[C>>2]|0)+12>>2]|0,C|0,r|0,e[k>>2]|0,U|0),C=f,f=0,!(C&1);)if(s=s+1|0,(s|0)>=(e[a>>2]|0)){I=45;break e}n=b()|0;break}i:for(;;){if(n=e[_>>2]|0,r=n+1|0,e[c>>2]=r,n=n+h|0,e[p>>2]=n,o&1?(e[c>>2]=n,e[p>>2]=r):r=n,I=e[g>>2]|0,f=0,P0(e[(e[I>>2]|0)+12>>2]|0,I|0,r|0,e[k>>2]|0,U|0),I=f,f=0,I&1){I=28;break}r=e[B>>2]|0,n=e[c>>2]|0,s=0;do{if(e[l>>2]=e[r+(s<<2)>>2],I=e[k>>2]|0,d[n+I>>0]=d[n+(I+-1)>>0]|0,d[(e[p>>2]|0)+-1>>0]=d[e[c>>2]>>0]|0,f=0,h0(75,t|0,0),I=f,f=0,I&1){I=36;break i}r=e[B>>2]|0,e[r+(s<<2)>>2]=e[l>>2],n=(e[c>>2]|0)+U|0,e[c>>2]=n,e[p>>2]=(e[p>>2]|0)+U,s=s+1|0}while((s|0)<(C|0));if(o=o+1|0,(o|0)>=(e[a>>2]|0)){I=45;break e}}if((I|0)==28){n=b()|0;break}else if((I|0)==36){n=b()|0;break}}else I=45;while(!1);do if((I|0)==45){if(f=0,n0(182,t|0),t=f,f=0,t&1){n=b()|0;break}if(r=e[B>>2]|0,n=r,r&&(s=e[O>>2]|0,(s|0)!=(r|0)&&(e[O>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[_>>2]|0,!r){y=V;return}(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),a0(r),y=V;return}while(!1);r=e[B>>2]|0,s=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-s|0)>>>2)<<2)),a0(r))}r=e[_>>2]|0,r||r0(n|0),(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),a0(r),r0(n|0)}function Ca(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=t+4604|0,r=e[C>>2]|0,U=t+180|0,!((e[U>>2]|0)<=0))for(I=t+4608|0,k=t+4612|0,o=r,l=N[r+-1>>0]|0,r=N[r>>0]|0,g=0;p=e[I>>2]|0,h=N[p+(g+-1)>>0]|0,s=g+1|0,n=N[o+s>>0]|0,c=e[k>>2]|0,a=r-l|0,o=l-h|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-h>>31,(l^o|0)<0?o=r:o=h+((l^a|0)<0?0:a)|0,p=xa(t,c,N[p+g>>0]|0,o,0)|0,d[(e[I>>2]|0)+g>>0]=p):(s=(ya(t,g,0)|0)+g|0,n=e[C>>2]|0,r=N[n+(s+-1)>>0]|0,n=N[n+s>>0]|0),!((s|0)>=(e[U>>2]|0));)o=e[C>>2]|0,l=r,r=n,g=s}function xa(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(B=r>>31,l=(B^r)-B|0,k=t+196+(l*12|0)+10|0,a=E[k>>1]|0,I=t+196+(l*12|0)|0,o=e[I>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(r=5;(a<>1]^B)-B+s|0,U=t+136|0,s=e[U>>2]|0,(o&s|0)==(o|0)?p=o:p=s&~(o>>31),o=(n-p^B)-B|0,h=t+144|0,s=e[h>>2]|0,(o|0)>0?o=(o+s|0)/(s<<1|1|0)|0:o=(o-s|0)/(s<<1|1|0)|0,C=t+140|0,c=e[C>>2]|0,n=((o|0)<0?c:0)+o|0,c=n-((n|0)<((c+1|0)/2|0|0)?0:c)|0,l=t+196+(l*12|0)+4|0,s|r?o=0:o=(e[l>>2]<<1)+-1+a>>31,s=o^c,d2(t,r,s>>30^s<<1,e[t+156>>2]|0),s=e[t+160>>2]|0,r=(e[I>>2]|0)+((c|0)>-1?c:0-c|0)|0,o=(e[l>>2]|0)+(W(e[h>>2]<<1|1,c)|0)|0,n=E[k>>1]|0,(n|0)==(s|0)&&(r=r>>1,o=o>>1,n=s>>1),e[I>>2]=r,s=n+1|0,E[k>>1]=s,r=s+o|0,(r|0)>=1?(o|0)>0&&(o=o-s|0,k=E[g>>1]|0,E[g>>1]=(k<<16>>16<127&1)+(k&65535),o=(o|0)>0?0:o):(o=E[g>>1]|0,E[g>>1]=(o&65535)-(o<<16>>16>-128&1),o=(r|0)>(~n|0)?r:0-n|0),e[l>>2]=o,s=e[h>>2]|0,n=s<<1|1,r=(W(n,(c^B)-B|0)|0)+p|0,(r|0)>=(0-s|0)?(o=e[U>>2]|0,(o+s|0)<(r|0)&&(r=r-(W(e[C>>2]|0,n)|0)|0)):(r=(W(e[C>>2]|0,n)|0)+r|0,o=e[U>>2]|0),(r&o|0)==(r|0)?(B=r,B=B&255,B|0):(B=o&~(r>>31),B=B&255,B|0)}function ya(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;for(h=(e[t+180>>2]|0)-r|0,p=e[t+4608>>2]|0,g=e[t+4604>>2]|0,o=d[p+(r+-1)>>0]|0,c=o&255,n=t+144|0,l=0;s=p+(l+r)|0,a=(N[s>>0]|0)-c|0,!((((a|0)>-1?a:0-a|0)|0)>(e[n>>2]|0));)if(d[s>>0]=o,l=l+1|0,(l|0)==(h|0)){l=h;break}if(o=(l|0)==(h|0),a=t+4600|0,s=e[36476+(e[a>>2]<<2)>>2]|0,(1<(l|0))n=l;else{n=l;do xe(t,1,1),s=e[a>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[a>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>0]|0,c,N[g+h>>0]|0)|0,d[r>>0]=t,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,t=l+1|0,t|0)}function Ia(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;return c=n-s|0,h=t+136|0,a=t+144|0,o=e[a>>2]|0,(((c|0)>-1?c:0-c|0)|0)>(o|0)?(l=s-n>>31|1,r=W(l,r-s|0)|0,(r|0)>0?r=(o+r|0)/(o<<1|1|0)|0:r=(r-o|0)/(o<<1|1|0)|0,c=t+140|0,o=e[c>>2]|0,n=((r|0)<0?o:0)+r|0,o=n-((n|0)<((o+1|0)/2|0|0)?0:o)|0,m2(t,t+4576|0,o),o=W(o,l)|0,l=e[a>>2]|0,a=l<<1|1,o=(W(o,a)|0)+s|0,(o|0)>=(0-l|0)?(r=e[h>>2]|0,(r+l|0)<(o|0)&&(o=o-(W(e[c>>2]|0,a)|0)|0)):(o=(W(e[c>>2]|0,a)|0)+o|0,r=e[h>>2]|0),(o&r|0)==(o|0)?(h=o,h=h&255,h|0):(h=r&~(o>>31),h=h&255,h|0)):(r=r-n|0,(r|0)>0?r=(o+r|0)/(o<<1|1|0)|0:r=(r-o|0)/(o<<1|1|0)|0,c=t+140|0,o=e[c>>2]|0,l=((r|0)<0?o:0)+r|0,o=l-((l|0)<((o+1|0)/2|0|0)?0:o)|0,m2(t,t+4588|0,o),l=e[a>>2]|0,a=l<<1|1,o=(W(a,o)|0)+n|0,(o|0)>=(0-l|0)?(r=e[h>>2]|0,(r+l|0)<(o|0)&&(o=o-(W(e[c>>2]|0,a)|0)|0)):(o=(W(e[c>>2]|0,a)|0)+o|0,r=e[h>>2]|0),(o&r|0)==(o|0)?(h=o,h=h&255,h|0):(h=r&~(o>>31),h=h&255,h|0))}function m2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=r+9|0,a=N[g>>0]|0,p=r+4|0,h=e[p>>2]|0,o=(W(a>>>1,h)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-h+(s<<31>>31)|0,d2(t,o,s,(e[t+156>>2]|0)+-1-(e[36476+(e[t+4600>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[p>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[g>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[g>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r}function d2(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=n>>r,l=t+148|0,a=s-(e[l>>2]|0)|0,(o|0)<(a+-1|0)){(o|0)>30&&(s=(o|0)/2|0,xe(t,0,s),o=o-s|0),xe(t,1,o+1|0),xe(t,(1<31?(xe(t,0,31),xe(t,1,s+-31-(e[l>>2]|0)|0)):xe(t,1,a),r=e[l>>2]|0,xe(t,(1<>2]|0)r=t+152|0;else if(n=e[t+136>>2]|0,r=t+152|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+184>>2]|0))&&(e[s+8>>2]|0)==(e[t+188>>2]|0)&&(e[s+12>>2]|0)==(e[t+192>>2]|0))switch(e[r>>2]|0){case 8:{C=e[8900]|0,e[t+4612>>2]=C+(((e[8901]|0)-C|0)>>>1),y=I;return}case 10:{C=e[8903]|0,e[t+4612>>2]=C+(((e[8904]|0)-C|0)>>>1),y=I;return}case 12:{C=e[8906]|0,e[t+4612>>2]=C+(((e[8907]|0)-C|0)>>>1),y=I;return}case 16:{C=e[8909]|0,e[t+4612>>2]=C+(((e[8910]|0)-C|0)>>>1),y=I;return}default:break e}while(!1);if(g=1<>2],n=t+4616|0,s=g<<1,o=t+4620|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),p=t+4612|0,e[p>>2]=r+g,r=0-g|0,(g|0)<=(r|0)){y=I;return}c=t+192|0,h=t+188|0,a=t+184|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[h>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[C>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[p>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(g|0));y=I}function Ea(t){t=t|0;var r=0,n=0;e[t>>2]=35856,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function ka(t){t=t|0;var r=0,n=0;if(e[t>>2]=35856,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function Fa(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(k=t+4|0,B=t+32|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(37,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(38,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(39,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(40,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function Ma(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;a=y,y=y+32|0,h=a,hi(h,e[t+128>>2]|0,e[t+136>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[h+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[h+12>>2]|0,n=e[r+16>>2]|0,s=e[h+16>>2]|0,e[t+176>>2]=c|0?c:e[h+4>>2]|0,e[t+180>>2]=l,e[t+184>>2]=o,Va(t),o=t+132|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+188+(l*12|0)>>2]=r,e[t+188+(l*12|0)+4>>2]=0,E[t+188+(l*12|0)+8>>1]=0,E[t+188+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,h=(n|0?n:s)&255,e[t+4568>>2]=c,e[t+4572>>2]=0,d[t+4576>>0]=h,d[t+4577>>0]=1,d[t+4578>>0]=0,e[t+4580>>2]=c,e[t+4584>>2]=1,d[t+4588>>0]=h,d[t+4589>>0]=1,d[t+4590>>0]=0,e[t+4592>>2]=0,y=a}function Ra(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4620>>0]=o&1,r=t+156|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),Pa(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function Pa(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;K=y,y=y+32|0,Z=K+12|0,X=K,_=t+172|0,F=(e[_>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[Z>>2]=0,s0=Z+4|0,e[s0>>2]=0,e[Z+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,Z|0),t0=f,f=0,t0&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,t0=f,f=0,!(t0&1))){e[Z>>2]=s,t0=s+(r<<1)|0,e[Z+8>>2]=t0,je(s|0,0,n|0)|0,e[s0>>2]=t0;break}s=b()|0,r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)a=18;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(a=16),(a|0)==16&&(o=M<<2,f=0,l=u0(67,o|0)|0,O=f,f=0,!(O&1))){e[X>>2]=l,a=l+(M<<2)|0,e[X+8>>2]=a,je(l|0,0,o|0)|0,e[t0>>2]=a,a=18;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((a|0)==18){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4596|0,c=W(M,F)|0,h=c+1|0,p=t+4600|0,g=(M|0)>0,C=t+160|0,I=t+168|0,k=t+164|0,U=t+156|0,B=t+88|0,V=t+4592|0,O=0;i:for(;;){if(s=e[Z>>2]|0,n=s+2|0,e[a>>2]=n,s=s+(h<<1)|0,e[p>>2]=s,O&1?(e[a>>2]=s,e[p>>2]=n,r=n,n=s):r=s,g){o=e[X>>2]|0,s=0;do{if(e[V>>2]=e[o+(s<<2)>>2],o=e[_>>2]|0,E[n+(o<<1)>>1]=E[n+(o+-1<<1)>>1]|0,E[r+-2>>1]=E[n>>1]|0,f=0,h0(76,t|0,0),o=f,f=0,o&1){a=29;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[V>>2],n=(e[a>>2]|0)+(F<<1)|0,e[a>>2]=n,r=(e[p>>2]|0)+(F<<1)|0,e[p>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[C>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[I>>2]|0)+o|0)&&(o=e[B>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+((e[U>>2]|0)-c<<1)|0,e[k>>2]|0,F|0),o=f,f=0,o&1)){a=30;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){a=42;break e}}if((a|0)==29){s=b()|0;break}else if((a|0)==30){s=b()|0;break}}else a=42;while(!1);do if((a|0)==42){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[Z>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}function La(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0;if(I=t+4596|0,n=e[I>>2]|0,V=t+172|0,r=e[V>>2]|0,!((r|0)<=0))for(k=t+4600|0,U=t+4604|0,B=t+4592|0,c=n,l=q[n+-2>>1]|0,n=q[n>>1]|0,C=0;p=e[k>>2]|0,a=E[p+(C+-1<<1)>>1]|0,g=a&65535,o=C+1|0,s=q[c+(o<<1)>>1]|0,h=e[U>>2]|0,c=n-l|0,l=l-g|0,h=((((d[h+(s-n)>>0]|0)*9|0)+(d[h+c>>0]|0)|0)*9|0)+(d[h+l>>0]|0)|0,p=p+(C<<1)|0,h?(r=n-g>>31,(r^l|0)<0?r=n:r=g+((r^c|0)<0?0:c)|0,g=Oa(t,h,q[p>>1]|0,r,0)|0,E[(e[k>>2]|0)+(C<<1)>>1]=g):(r=Na(t,a,p,r-C|0)|0,n=r+C|0,(n|0)!=(e[V>>2]|0)&&(g=Ba(t,g,q[(e[I>>2]|0)+(n<<1)>>1]|0)|0,E[(e[k>>2]|0)+(n<<1)>>1]=g,g=e[B>>2]|0,e[B>>2]=(g|0)<1?0:g+-1|0,r=r+1|0),o=r+C|0,s=e[I>>2]|0,n=q[s+(o+-1<<1)>>1]|0,s=q[s+(o<<1)>>1]|0),r=e[V>>2]|0,!((r|0)<=(o|0));)c=e[I>>2]|0,l=n,n=s,C=o}function Ua(t){t=t|0;var r=0,n=0,s=0,o=0;s=t+116|0,n=e[s>>2]|0,(d[n>>0]|0)!=-1?(o=t+112|0,r=e[o>>2]|0,(r|0)<1&&(_i(t),r=e[o>>2]|0,n=e[s>>2]|0),t=t+108|0,s=e[t>>2]|0,e[o>>2]=r+-1,r=s<<1,e[t>>2]=r,(d[n>>0]|0)!=-1&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,6,35648),t=f,f=0,t&1||Be(r|0,824,96),t=b()|0,ge(r|0),r0(t|0))):r=e[t+108>>2]|0,r&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,6,35648),t=f,f=0,t&1||Be(r|0,824,96),t=b()|0,ge(r|0),r0(t|0))}function Oa(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(U=r>>31,h=(U^r)-U|0,I=t+188+(h*12|0)+10|0,n=E[I>>1]|0,C=t+188+(h*12|0)|0,o=e[C>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(r=5;(n<>1]^U)-U+s|0,k=t+128|0,o=e[k>>2]|0,(n&o|0)==(n|0)?p=n:p=o&~(n>>31),n=t+112|0,(e[n>>2]|0)<8&&_i(t),o=t+108|0,s=e[o>>2]|0,l=s>>>24,a=e[2832+(r<<11)+(l<<3)+4>>2]|0,a?(e[n>>2]=(e[n>>2]|0)-a,e[o>>2]=s<>2]|0):(c=e[t+148>>2]|0,o=e[t+140>>2]|0,n=ji(t)|0,(n|0)<(c+-1-o|0)?r&&(n=(ni(t,r)|0)+(n<>31^n>>1,(((n|0)>-1?n:0-n|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),t=f,f=0,t&1?(t=b()|0,ge(n|0),r0(t|0)):Be(n|0,824,96))),c=t+136|0,s=e[c>>2]|0,r?a=n:(s?o=0:o=(e[t+188+(h*12|0)+4>>2]<<1)+-1+(E[I>>1]|0)>>31,a=o^n),r=e[t+152>>2]|0,o=(e[C>>2]|0)+((a|0)>-1?a:0-a|0)|0,l=t+188+(h*12|0)+4|0,n=(e[l>>2]|0)+(W(s<<1|1,a)|0)|0,s=E[I>>1]|0,(s|0)==(r|0)&&(o=o>>1,n=n>>1,s=r>>1),e[C>>2]=o,r=s+1|0,E[I>>1]=r,o=r+n|0,(o|0)>=1?(n|0)>0&&(n=n-r|0,I=E[g>>1]|0,E[g>>1]=(I<<16>>16<127&1)+(I&65535),n=(n|0)>0?0:n):(n=E[g>>1]|0,E[g>>1]=(n&65535)-(n<<16>>16>-128&1),n=(o|0)>(~s|0)?o:0-s|0),e[l>>2]=n,r=e[c>>2]|0,s=r<<1|1,o=(W(s,(a^U)-U|0)|0)+p|0,(o|0)>=(0-r|0)?(n=e[k>>2]|0,(n+r|0)<(o|0)&&(o=o-(W(e[t+132>>2]|0,s)|0)|0)):(o=(W(e[t+132>>2]|0,s)|0)+o|0,n=e[k>>2]|0),(o&n|0)==(o|0)?(t=o,t=t&65535,t|0):(t=n&~(o>>31),t=t&65535,t|0)}function Na(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;for(c=t+112|0,h=t+108|0,p=t+4592|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[h>>2]|0,o=o+-1|0,e[c>>2]=o,e[h>>2]=a<<1,(a|0)>=0){g=8;break}if(a=e[p>>2]|0,C=1<>2],I=s-l|0,I=(C|0)<(I|0)?C:I,l=I+l|0,(I|0)==(C|0)&&(e[p>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((g|0)==8&&((l|0)!=(s|0)?(o=e[p>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,5,35648),I=f,f=0,I&1?(I=b()|0,ge(o|0),r0(I|0)):Be(o|0,824,96))):o=s),(o|0)>0)l=0;else return o|0;do E[n+(l<<1)>>1]=r,l=l+1|0;while((l|0)!=(o|0));return o|0}function Ba(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return l=r-n|0,a=t+128|0,s=t+136|0,(((l|0)>-1?l:0-l|0)|0)>(e[s>>2]|0)?(r=W(g2(t,t+4568|0)|0,n-r>>31|1)|0,o=e[s>>2]|0,l=o<<1|1,r=(W(r,l)|0)+n|0,(r|0)>=(0-o|0)?(s=e[a>>2]|0,(s+o|0)<(r|0)&&(r=r-(W(e[t+132>>2]|0,l)|0)|0)):(r=(W(e[t+132>>2]|0,l)|0)+r|0,s=e[a>>2]|0),(r&s|0)==(r|0)?(t=r,t=t&65535,t|0):(t=s&~(r>>31),t=t&65535,t|0)):(n=g2(t,t+4580|0)|0,l=e[s>>2]|0,o=l<<1|1,r=(W(o,n)|0)+r|0,(r|0)>=(0-l|0)?(s=e[a>>2]|0,(s+l|0)<(r|0)&&(r=r-(W(e[t+132>>2]|0,o)|0)|0)):(r=(W(e[t+132>>2]|0,o)|0)+r|0,s=e[a>>2]|0),(r&s|0)==(r|0)?(t=r,t=t&65535,t|0):(t=s&~(r>>31),t=t&65535,t|0))}function g2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=r+9|0,n=N[p>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;a=e[t+148>>2]|0,c=e[36476+(e[t+4592>>2]<<2)>>2]|0,n=e[t+140>>2]|0,o=ji(t)|0;do if((o|0)<(a+-2-c-n|0))if(s){c=(ni(t,s)|0)+(o<>2]|0,o=c+s|0,a=o&1,n=a,l=1,o=(a+o|0)/2|0;break}else{s=e[l>>2]|0,t=s+o|0,n=t&1,t=(n+t|0)/2|0,h=8;break}else o=(ni(t,n)|0)+1|0,a=e[l>>2]|0,t=o+a|0,n=t&1,t=(n+t|0)/2|0,s?(c=o,l=1,o=t,s=a):(s=a,h=8);while(!1);return(h|0)==8&&(c=o,l=N[r+10>>0]<<1>>>0>=(N[p>>0]|0)>>>0,o=t),o=(n|0)!=0^l?o:0-o|0,(o|0)<0&&(h=r+10|0,d[h>>0]=(N[h>>0]|0)+1),n=(c+1-s>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[p>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(r=s,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r,o|0):(e[r>>2]=n>>1,h=(s&255)>>>1,d[p>>0]=h,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=h,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r,o|0)}function ji(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;if(l=t+112|0,(e[l>>2]|0)<16&&_i(t),a=t+108|0,n=e[a>>2]|0,(n|0)>=0){if(n&1073741824)r=1;else if(n&536870912)r=2;else if(n&268435456)r=3;else if(n&134217728)r=4;else if(n&67108864)r=5;else if(n&33554432)r=6;else if(n&16777216)r=7;else if(n&8388608)r=8;else if(n&4194304)r=9;else if(n&2097152)r=10;else if(n&1048576)r=11;else if(n&524288)r=12;else if(n&262144)r=13;else if(n&131072)r=14;else if(o=n>>>12&16,r=o+-1|0,!o){for(r=(e[l>>2]|0)+-15|0,e[l>>2]=r,s=n<<15,e[a>>2]=s,n=r,r=15;(n|0)<1?(_i(t),o=e[a>>2]|0,n=e[l>>2]|0):o=s,n=n+-1|0,e[l>>2]=n,s=o<<1,e[a>>2]=s,!((o|0)<0);)r=r+1|0;return r|0}}else r=0;return t=r+1|0,e[l>>2]=(e[l>>2]|0)-t,e[a>>2]=n<>2]|0,(n|0)<(r|0)&&(_i(t),n=e[s>>2]|0,(n|0)<(r|0)&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),t=f,f=0,t&1?(t=b()|0,ge(n|0),r0(t|0)):Be(n|0,824,96))),o=t+108|0,t=e[o>>2]|0,e[s>>2]=n-r,e[o>>2]=t<>>(32-r|0)|0}function Va(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;I=y,y=y+32|0,s=I,C=t+136|0;e:do if(e[C>>2]|0)r=t+144|0;else if(n=e[t+128>>2]|0,r=t+144|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+176>>2]|0))&&(e[s+8>>2]|0)==(e[t+180>>2]|0)&&(e[s+12>>2]|0)==(e[t+184>>2]|0))switch(e[r>>2]|0){case 8:{C=e[8900]|0,e[t+4604>>2]=C+(((e[8901]|0)-C|0)>>>1),y=I;return}case 10:{C=e[8903]|0,e[t+4604>>2]=C+(((e[8904]|0)-C|0)>>>1),y=I;return}case 12:{C=e[8906]|0,e[t+4604>>2]=C+(((e[8907]|0)-C|0)>>>1),y=I;return}case 16:{C=e[8909]|0,e[t+4604>>2]=C+(((e[8910]|0)-C|0)>>>1),y=I;return}default:break e}while(!1);if(g=1<>2],n=t+4608|0,s=g<<1,o=t+4612|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),p=t+4604|0,e[p>>2]=r+g,r=0-g|0,(g|0)<=(r|0)){y=I;return}c=t+184|0,h=t+180|0,a=t+176|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[h>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[C>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[p>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(g|0));y=I}function qa(t){t=t|0;var r=0,n=0;e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function ba(t){t=t|0;var r=0,n=0;if(e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function Ga(t){t=t|0;var r=0,n=0;e[t>>2]=35828,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Qa(t){t=t|0;var r=0,n=0;if(e[t>>2]=35828,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function za(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(k=t+4|0,B=t+32|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(37,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(38,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(39,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(40,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=6,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=6,e[s+12>>2]=t,M=s,y=O,M|0)}function Ha(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;a=y,y=y+32|0,h=a,hi(h,e[t+128>>2]|0,e[t+136>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[h+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[h+12>>2]|0,n=e[r+16>>2]|0,s=e[h+16>>2]|0,e[t+176>>2]=c|0?c:e[h+4>>2]|0,e[t+180>>2]=l,e[t+184>>2]=o,Za(t),o=t+132|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+188+(l*12|0)>>2]=r,e[t+188+(l*12|0)+4>>2]=0,E[t+188+(l*12|0)+8>>1]=0,E[t+188+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,h=(n|0?n:s)&255,e[t+4568>>2]=c,e[t+4572>>2]=0,d[t+4576>>0]=h,d[t+4577>>0]=1,d[t+4578>>0]=0,e[t+4580>>2]=c,e[t+4584>>2]=1,d[t+4588>>0]=h,d[t+4589>>0]=1,d[t+4590>>0]=0,e[t+4592>>2]=0,y=a}function Ya(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4620>>0]=o&1,r=t+156|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),ja(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function ja(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;K=y,y=y+32|0,Z=K+12|0,X=K,_=t+172|0,F=(e[_>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[Z>>2]=0,s0=Z+4|0,e[s0>>2]=0,e[Z+8>>2]=0;do if(r){if(r>>>0>715827882&&(f=0,n0(178,Z|0),t0=f,f=0,t0&1)||(a=6),(a|0)==6&&(f=0,n=u0(67,r*6|0)|0,t0=f,f=0,!(t0&1))){for(e[s0>>2]=n,e[Z>>2]=n,s=n+(r*6|0)|0,e[Z+8>>2]=s;E[n>>1]=0,E[n+2>>1]=0,E[n+4>>1]=0,r=r+-1|0,r;)n=n+6|0;e[s0>>2]=s;break}s=b()|0,r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),a0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)a=20;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(a=18),(a|0)==18&&(o=M<<2,f=0,l=u0(67,o|0)|0,O=f,f=0,!(O&1))){e[X>>2]=l,a=l+(M<<2)|0,e[X+8>>2]=a,je(l|0,0,o|0)|0,e[t0>>2]=a,a=20;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((a|0)==20){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4596|0,c=W(M,F)|0,h=c+1|0,p=t+4600|0,g=(M|0)>0,C=t+160|0,I=t+168|0,k=t+164|0,U=t+156|0,B=t+88|0,V=t+4592|0,O=0;i:for(;;){if(s=e[Z>>2]|0,n=s+6|0,e[a>>2]=n,s=s+(h*6|0)|0,e[p>>2]=s,O&1?(e[a>>2]=s,e[p>>2]=n,r=n,n=s):r=s,g){o=e[X>>2]|0,s=0;do{if(e[V>>2]=e[o+(s<<2)>>2],r=e[_>>2]|0,o=n+(r*6|0)|0,n=n+((r+-1|0)*6|0)|0,E[o>>1]=E[n>>1]|0,E[o+2>>1]=E[n+2>>1]|0,E[o+4>>1]=E[n+4>>1]|0,o=(e[p>>2]|0)+-6|0,n=e[a>>2]|0,E[o>>1]=E[n>>1]|0,E[o+2>>1]=E[n+2>>1]|0,E[o+4>>1]=E[n+4>>1]|0,f=0,h0(77,t|0,0),o=f,f=0,o&1){a=31;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[V>>2],n=(e[a>>2]|0)+(F*6|0)|0,e[a>>2]=n,r=(e[p>>2]|0)+(F*6|0)|0,e[p>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[C>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[I>>2]|0)+o|0)&&(o=e[B>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+(((e[U>>2]|0)-c|0)*6|0)|0,e[k>>2]|0,F|0),o=f,f=0,o&1)){a=32;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){a=44;break e}}if((a|0)==31){s=b()|0;break}else if((a|0)==32){s=b()|0;break}}else a=44;while(!1);do if((a|0)==44){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[Z>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),a0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),a0(r),r0(s|0)}function Xa(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,ei=0,We=0,_e=0,le=0;if(_e=y,y=y+32|0,Z=_e+24|0,We=_e+18|0,ei=_e+12|0,s0=_e+6|0,w0=_e,v0=t+172|0,r=e[v0>>2]|0,(r|0)<=0){y=_e;return}for(A0=t+4600|0,Y0=t+4596|0,ze=t+4604|0,Re=t+4592|0,t0=0;s=t0+-1|0,o=e[A0>>2]|0,le=e[Y0>>2]|0,n=t0+1|0,l=q[le+(t0*6|0)>>1]|0,K=e[ze>>2]|0,a=q[le+(s*6|0)>>1]|0,c=l-a|0,h=q[o+(s*6|0)>>1]|0,p=a-h|0,g=((((d[K+((q[le+(n*6|0)>>1]|0)-l)>>0]|0)*9|0)+(d[K+c>>0]|0)|0)*9|0)+(d[K+p>>0]|0)|0,C=q[le+(t0*6|0)+2>>1]|0,I=q[le+(s*6|0)+2>>1]|0,k=C-I|0,U=q[o+(s*6|0)+2>>1]|0,B=I-U|0,V=((((d[K+((q[le+(n*6|0)+2>>1]|0)-C)>>0]|0)*9|0)+(d[K+k>>0]|0)|0)*9|0)+(d[K+B>>0]|0)|0,O=q[le+(t0*6|0)+4>>1]|0,_=q[le+(s*6|0)+4>>1]|0,F=O-_|0,M=q[o+(s*6|0)+4>>1]|0,X=_-M|0,K=((((d[K+((q[le+(n*6|0)+4>>1]|0)-O)>>0]|0)*9|0)+(d[K+F>>0]|0)|0)*9|0)+(d[K+X>>0]|0)|0,V|g|K?(s=q[o+(t0*6|0)>>1]|0,r=l-h>>31,(r^p|0)>=0?(r^c|0)<0?r=h:r=h-a+l|0:r=l,l=Jr(t,g,s,r,0)|0,s=q[(e[A0>>2]|0)+(t0*6|0)+2>>1]|0,r=C-U>>31,(r^B|0)>=0?(r^k|0)<0?r=U:r=U-I+C|0:r=C,s=Jr(t,V,s,r,0)|0,o=q[(e[A0>>2]|0)+(t0*6|0)+4>>1]|0,r=O-M>>31,(r^X|0)>=0?(r^F|0)<0?r=M:r=M-_+O|0:r=O,K=Jr(t,K,o,r,0)|0,le=e[A0>>2]|0,E[le+(t0*6|0)>>1]=l,E[le+(t0*6|0)+2>>1]=s,E[le+(t0*6|0)+4>>1]=K):(n=o+(s*6|0)|0,E[ei>>1]=E[n>>1]|0,E[ei+2>>1]=E[n+2>>1]|0,E[ei+4>>1]=E[n+4>>1]|0,E[Z>>1]=E[n>>1]|0,E[Z+2>>1]=E[n+2>>1]|0,E[Z+4>>1]=E[n+4>>1]|0,r=Ka(t,Z,o+(t0*6|0)|0,r-t0|0)|0,n=r+t0|0,(n|0)!=(e[v0>>2]|0)&&(le=(e[Y0>>2]|0)+(n*6|0)|0,E[w0>>1]=E[le>>1]|0,E[w0+2>>1]=E[le+2>>1]|0,E[w0+4>>1]=E[le+4>>1]|0,le=(e[A0>>2]|0)+(n*6|0)|0,E[We>>1]=E[ei>>1]|0,E[We+2>>1]=E[ei+2>>1]|0,E[We+4>>1]=E[ei+4>>1]|0,E[Z>>1]=E[w0>>1]|0,E[Z+2>>1]=E[w0+2>>1]|0,E[Z+4>>1]=E[w0+4>>1]|0,Wa(s0,t,We,Z),E[le>>1]=E[s0>>1]|0,E[le+2>>1]=E[s0+2>>1]|0,E[le+4>>1]=E[s0+4>>1]|0,le=e[Re>>2]|0,e[Re>>2]=(le|0)<1?0:le+-1|0,r=r+1|0),n=r+t0|0),r=e[v0>>2]|0,!((n|0)>=(r|0));)t0=n;y=_e}function Ka(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;for(c=t+112|0,h=t+108|0,p=t+4592|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[h>>2]|0,o=o+-1|0,e[c>>2]=o,e[h>>2]=a<<1,(a|0)>=0){g=8;break}if(a=e[p>>2]|0,C=1<>2],I=s-l|0,I=(C|0)<(I|0)?C:I,l=I+l|0,(I|0)==(C|0)&&(e[p>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((g|0)==8&&((l|0)!=(s|0)?(o=e[p>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,5,35648),I=f,f=0,I&1?(I=b()|0,ge(o|0),r0(I|0)):Be(o|0,824,96))):o=s),(o|0)<=0)return o|0;l=0;do I=n+(l*6|0)|0,E[I>>1]=E[r>>1]|0,E[I+2>>1]=E[r+2>>1]|0,E[I+4>>1]=E[r+4>>1]|0,l=l+1|0;while((l|0)!=(o|0));return o|0}function Wa(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0;if(h=r+4568|0,C=$r(r,h)|0,a=$r(r,h)|0,h=$r(r,h)|0,l=r+128|0,o=q[s>>1]|0,p=e[r+136>>2]|0,g=p<<1|1,o=(W(W(g,C)|0,o-(q[n>>1]|0)>>31|1)|0)+o|0,C=0-p|0,(o|0)>=(C|0)?(l=e[l>>2]|0,(l+p|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,g)|0)|0)):(o=(W(e[r+132>>2]|0,g)|0)+o|0,l=e[l>>2]|0),(o&l|0)!=(o|0)&&(o=l&~(o>>31)),c=o&65535,o=q[s+2>>1]|0,o=(W(W(g,a)|0,o-(q[n+2>>1]|0)>>31|1)|0)+o|0,(o|0)>=(C|0)?(l+p|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,g)|0)|0):o=(W(e[r+132>>2]|0,g)|0)+o|0,(o&l|0)!=(o|0)&&(o=l&~(o>>31)),a=o&65535,o=q[s+4>>1]|0,o=(W(W(g,h)|0,o-(q[n+4>>1]|0)>>31|1)|0)+o|0,(o|0)>=(C|0)?(l+p|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,g)|0)|0):o=(W(e[r+132>>2]|0,g)|0)+o|0,(o&l|0)==(o|0)){r=o,r=r&65535,E[t>>1]=c,C=t+2|0,E[C>>1]=a,t=t+4|0,E[t>>1]=r;return}r=l&~(o>>31),r=r&65535,E[t>>1]=c,C=t+2|0,E[C>>1]=a,t=t+4|0,E[t>>1]=r}function Jr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(U=r>>31,h=(U^r)-U|0,I=t+188+(h*12|0)+10|0,n=E[I>>1]|0,C=t+188+(h*12|0)|0,o=e[C>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(r=5;(n<>1]^U)-U+s|0,k=t+128|0,o=e[k>>2]|0,(n&o|0)==(n|0)?p=n:p=o&~(n>>31),n=t+112|0,(e[n>>2]|0)<8&&_i(t),o=t+108|0,s=e[o>>2]|0,l=s>>>24,a=e[2832+(r<<11)+(l<<3)+4>>2]|0,a?(e[n>>2]=(e[n>>2]|0)-a,e[o>>2]=s<>2]|0):(c=e[t+148>>2]|0,o=e[t+140>>2]|0,n=ji(t)|0,(n|0)<(c+-1-o|0)?r&&(n=(ni(t,r)|0)+(n<>31^n>>1,(((n|0)>-1?n:0-n|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),t=f,f=0,t&1?(t=b()|0,ge(n|0),r0(t|0)):Be(n|0,824,96))),c=t+136|0,s=e[c>>2]|0,r?a=n:(s?o=0:o=(e[t+188+(h*12|0)+4>>2]<<1)+-1+(E[I>>1]|0)>>31,a=o^n),r=e[t+152>>2]|0,o=(e[C>>2]|0)+((a|0)>-1?a:0-a|0)|0,l=t+188+(h*12|0)+4|0,n=(e[l>>2]|0)+(W(s<<1|1,a)|0)|0,s=E[I>>1]|0,(s|0)==(r|0)&&(o=o>>1,n=n>>1,s=r>>1),e[C>>2]=o,r=s+1|0,E[I>>1]=r,o=r+n|0,(o|0)>=1?(n|0)>0&&(n=n-r|0,I=E[g>>1]|0,E[g>>1]=(I<<16>>16<127&1)+(I&65535),n=(n|0)>0?0:n):(n=E[g>>1]|0,E[g>>1]=(n&65535)-(n<<16>>16>-128&1),n=(o|0)>(~s|0)?o:0-s|0),e[l>>2]=n,r=e[c>>2]|0,s=r<<1|1,o=(W(s,(a^U)-U|0)|0)+p|0,(o|0)>=(0-r|0)?(n=e[k>>2]|0,(n+r|0)<(o|0)&&(o=o-(W(e[t+132>>2]|0,s)|0)|0)):(o=(W(e[t+132>>2]|0,s)|0)+o|0,n=e[k>>2]|0),(o&n|0)==(o|0)?(t=o,t=t&65535,t|0):(t=n&~(o>>31),t=t&65535,t|0)}function $r(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=r+9|0,n=N[p>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;a=e[t+148>>2]|0,c=e[36476+(e[t+4592>>2]<<2)>>2]|0,n=e[t+140>>2]|0,o=ji(t)|0;do if((o|0)<(a+-2-c-n|0))if(s){c=(ni(t,s)|0)+(o<>2]|0,o=c+s|0,a=o&1,n=a,l=1,o=(a+o|0)/2|0;break}else{s=e[l>>2]|0,t=s+o|0,n=t&1,t=(n+t|0)/2|0,h=8;break}else o=(ni(t,n)|0)+1|0,a=e[l>>2]|0,t=o+a|0,n=t&1,t=(n+t|0)/2|0,s?(c=o,l=1,o=t,s=a):(s=a,h=8);while(!1);return(h|0)==8&&(c=o,l=N[r+10>>0]<<1>>>0>=(N[p>>0]|0)>>>0,o=t),o=(n|0)!=0^l?o:0-o|0,(o|0)<0&&(h=r+10|0,d[h>>0]=(N[h>>0]|0)+1),n=(c+1-s>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[p>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(r=s,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r,o|0):(e[r>>2]=n>>1,h=(s&255)>>>1,d[p>>0]=h,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=h,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r,o|0)}function Za(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;I=y,y=y+32|0,s=I,C=t+136|0;e:do if(e[C>>2]|0)r=t+144|0;else if(n=e[t+128>>2]|0,r=t+144|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+176>>2]|0))&&(e[s+8>>2]|0)==(e[t+180>>2]|0)&&(e[s+12>>2]|0)==(e[t+184>>2]|0))switch(e[r>>2]|0){case 8:{C=e[8900]|0,e[t+4604>>2]=C+(((e[8901]|0)-C|0)>>>1),y=I;return}case 10:{C=e[8903]|0,e[t+4604>>2]=C+(((e[8904]|0)-C|0)>>>1),y=I;return}case 12:{C=e[8906]|0,e[t+4604>>2]=C+(((e[8907]|0)-C|0)>>>1),y=I;return}case 16:{C=e[8909]|0,e[t+4604>>2]=C+(((e[8910]|0)-C|0)>>>1),y=I;return}default:break e}while(!1);if(g=1<>2],n=t+4608|0,s=g<<1,o=t+4612|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),p=t+4604|0,e[p>>2]=r+g,r=0-g|0,(g|0)<=(r|0)){y=I;return}c=t+184|0,h=t+180|0,a=t+176|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[h>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[C>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[p>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(g|0));y=I}function Ja(t){t=t|0;var r=0,n=0;e[t>>2]=35800,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function $a(t){t=t|0;var r=0,n=0;if(e[t>>2]=35800,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function ef(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(k=t+4|0,B=t+32|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(44,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(45,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(46,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(47,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0)}function tf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;a=y,y=y+32|0,h=a,hi(h,e[t+128>>2]|0,e[t+136>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[h+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[h+12>>2]|0,n=e[r+16>>2]|0,s=e[h+16>>2]|0,e[t+176>>2]=c|0?c:e[h+4>>2]|0,e[t+180>>2]=l,e[t+184>>2]=o,af(t),o=t+132|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+188+(l*12|0)>>2]=r,e[t+188+(l*12|0)+4>>2]=0,E[t+188+(l*12|0)+8>>1]=0,E[t+188+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,h=(n|0?n:s)&255,e[t+4568>>2]=c,e[t+4572>>2]=0,d[t+4576>>0]=h,d[t+4577>>0]=1,d[t+4578>>0]=0,e[t+4580>>2]=c,e[t+4584>>2]=1,d[t+4588>>0]=h,d[t+4589>>0]=1,d[t+4590>>0]=0,e[t+4592>>2]=0,y=a}function rf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4620>>0]=o&1,r=t+156|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),nf(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function nf(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;K=y,y=y+32|0,Z=K+12|0,X=K,_=t+172|0,F=(e[_>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[Z>>2]=0,s0=Z+4|0,e[s0>>2]=0,e[Z+8>>2]=0;e:do if(r){if(r>>>0>1431655765&&(f=0,n0(178,Z|0),t0=f,f=0,t0&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r*3|0)|0,t0=f,f=0,!(t0&1))){for(e[s0>>2]=n,e[Z>>2]=n,e[Z+8>>2]=n+(r*3|0);;)if(d[n>>0]=0,d[n+1>>0]=0,d[n+2>>0]=0,n=(e[s0>>2]|0)+3|0,e[s0>>2]=n,r=r+-1|0,!r)break e}s=b()|0,r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)l=19;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(l=17),(l|0)==17&&(s=M<<2,f=0,o=u0(67,s|0)|0,O=f,f=0,!(O&1))){e[X>>2]=o,l=o+(M<<2)|0,e[X+8>>2]=l,je(o|0,0,s|0)|0,e[t0>>2]=l,l=19;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((l|0)==19){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4596|0,c=W(M,F)|0,h=c+1|0,p=t+4600|0,g=(M|0)>0,C=t+160|0,I=t+168|0,k=t+164|0,U=t+156|0,B=t+88|0,V=t+4592|0,O=0;i:for(;;){if(s=e[Z>>2]|0,n=s+3|0,e[a>>2]=n,s=s+(h*3|0)|0,e[p>>2]=s,O&1?(e[a>>2]=s,e[p>>2]=n,r=n,n=s):r=s,g){o=e[X>>2]|0,s=0;do{if(e[V>>2]=e[o+(s<<2)>>2],r=e[_>>2]|0,o=n+(r*3|0)|0,n=n+((r+-1|0)*3|0)|0,d[o>>0]=d[n>>0]|0,d[o+1>>0]=d[n+1>>0]|0,d[o+2>>0]=d[n+2>>0]|0,n=e[a>>2]|0,o=(e[p>>2]|0)+-3|0,d[o>>0]=d[n>>0]|0,d[o+1>>0]=d[n+1>>0]|0,d[o+2>>0]=d[n+2>>0]|0,f=0,h0(78,t|0,0),o=f,f=0,o&1){l=30;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[V>>2],n=(e[a>>2]|0)+(F*3|0)|0,e[a>>2]=n,r=(e[p>>2]|0)+(F*3|0)|0,e[p>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[C>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[I>>2]|0)+o|0)&&(o=e[B>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+(((e[U>>2]|0)-c|0)*3|0)|0,e[k>>2]|0,F|0),o=f,f=0,o&1)){l=31;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){l=43;break e}}if((l|0)==30){s=b()|0;break}else if((l|0)==31){s=b()|0;break}}else l=43;while(!1);do if((l|0)==43){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[Z>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),r0(s|0)}function sf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,ei=0,We=0,_e=0,le=0;if(_e=y,y=y+16|0,Z=_e+12|0,We=_e+9|0,ei=_e+6|0,s0=_e+3|0,w0=_e,v0=t+172|0,r=e[v0>>2]|0,(r|0)<=0){y=_e;return}for(A0=t+4600|0,Y0=t+4596|0,ze=t+4604|0,Re=t+4592|0,t0=0;M=t0+-1|0,s=e[A0>>2]|0,o=s+(M*3|0)|0,le=e[Y0>>2]|0,n=t0+1|0,l=N[le+(t0*3|0)>>0]|0,K=e[ze>>2]|0,a=N[le+(M*3|0)>>0]|0,c=l-a|0,h=N[o>>0]|0,p=a-h|0,g=((((d[K+((N[le+(n*3|0)>>0]|0)-l)>>0]|0)*9|0)+(d[K+c>>0]|0)|0)*9|0)+(d[K+p>>0]|0)|0,C=N[le+(t0*3|0)+1>>0]|0,I=N[le+(M*3|0)+1>>0]|0,k=C-I|0,U=N[s+(M*3|0)+1>>0]|0,B=I-U|0,V=((((d[K+((N[le+(n*3|0)+1>>0]|0)-C)>>0]|0)*9|0)+(d[K+k>>0]|0)|0)*9|0)+(d[K+B>>0]|0)|0,O=N[le+(t0*3|0)+2>>0]|0,_=N[le+(M*3|0)+2>>0]|0,F=O-_|0,M=N[s+(M*3|0)+2>>0]|0,X=_-M|0,K=((((d[K+((N[le+(n*3|0)+2>>0]|0)-O)>>0]|0)*9|0)+(d[K+F>>0]|0)|0)*9|0)+(d[K+X>>0]|0)|0,V|g|K?(s=N[s+(t0*3|0)>>0]|0,r=l-h>>31,(r^p|0)>=0?(r^c|0)<0?r=h:r=h-a+l|0:r=l,l=e1(t,g,s,r,0)|0,s=N[(e[A0>>2]|0)+(t0*3|0)+1>>0]|0,r=C-U>>31,(r^B|0)>=0?(r^k|0)<0?r=U:r=U-I+C|0:r=C,s=e1(t,V,s,r,0)|0,o=N[(e[A0>>2]|0)+(t0*3|0)+2>>0]|0,r=O-M>>31,(r^X|0)>=0?(r^F|0)<0?r=M:r=M-_+O|0:r=O,K=e1(t,K,o,r,0)|0,le=(e[A0>>2]|0)+(t0*3|0)|0,d[le>>0]=l,d[le+1>>0]=s,d[le+2>>0]=K):(d[ei>>0]=d[o>>0]|0,d[ei+1>>0]=d[o+1>>0]|0,d[ei+2>>0]=d[o+2>>0]|0,d[Z>>0]=d[o>>0]|0,d[Z+1>>0]=d[o+1>>0]|0,d[Z+2>>0]=d[o+2>>0]|0,r=of(t,Z,s+(t0*3|0)|0,r-t0|0)|0,n=r+t0|0,(n|0)!=(e[v0>>2]|0)&&(le=(e[Y0>>2]|0)+(n*3|0)|0,d[w0>>0]=d[le>>0]|0,d[w0+1>>0]=d[le+1>>0]|0,d[w0+2>>0]=d[le+2>>0]|0,le=e[A0>>2]|0,d[We>>0]=d[ei>>0]|0,d[We+1>>0]=d[ei+1>>0]|0,d[We+2>>0]=d[ei+2>>0]|0,d[Z>>0]=d[w0>>0]|0,d[Z+1>>0]=d[w0+1>>0]|0,d[Z+2>>0]=d[w0+2>>0]|0,lf(s0,t,We,Z),le=le+(n*3|0)|0,d[le>>0]=d[s0>>0]|0,d[le+1>>0]=d[s0+1>>0]|0,d[le+2>>0]=d[s0+2>>0]|0,le=e[Re>>2]|0,e[Re>>2]=(le|0)<1?0:le+-1|0,r=r+1|0),n=r+t0|0),r=e[v0>>2]|0,!((n|0)>=(r|0));)t0=n;y=_e}function of(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;for(c=t+112|0,h=t+108|0,p=t+4592|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[h>>2]|0,o=o+-1|0,e[c>>2]=o,e[h>>2]=a<<1,(a|0)>=0){g=8;break}if(a=e[p>>2]|0,C=1<>2],I=s-l|0,I=(C|0)<(I|0)?C:I,l=I+l|0,(I|0)==(C|0)&&(e[p>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((g|0)==8&&((l|0)!=(s|0)?(o=e[p>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,5,35648),I=f,f=0,I&1?(I=b()|0,ge(o|0),r0(I|0)):Be(o|0,824,96))):o=s),(o|0)<=0)return o|0;l=0;do I=n+(l*3|0)|0,d[I>>0]=d[r>>0]|0,d[I+1>>0]=d[r+1>>0]|0,d[I+2>>0]=d[r+2>>0]|0,l=l+1|0;while((l|0)!=(o|0));return o|0}function lf(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0;if(h=r+4568|0,C=i1(r,h)|0,a=i1(r,h)|0,h=i1(r,h)|0,l=r+128|0,o=N[s>>0]|0,p=e[r+136>>2]|0,g=p<<1|1,o=(W(W(g,C)|0,o-(N[n>>0]|0)>>31|1)|0)+o|0,C=0-p|0,(o|0)>=(C|0)?(l=e[l>>2]|0,(l+p|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,g)|0)|0)):(o=(W(e[r+132>>2]|0,g)|0)+o|0,l=e[l>>2]|0),(o&l|0)!=(o|0)&&(o=l&~(o>>31)),c=o&255,o=N[s+1>>0]|0,o=(W(W(g,a)|0,o-(N[n+1>>0]|0)>>31|1)|0)+o|0,(o|0)>=(C|0)?(l+p|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,g)|0)|0):o=(W(e[r+132>>2]|0,g)|0)+o|0,(o&l|0)!=(o|0)&&(o=l&~(o>>31)),a=o&255,o=N[s+2>>0]|0,o=(W(W(g,h)|0,o-(N[n+2>>0]|0)>>31|1)|0)+o|0,(o|0)>=(C|0)?(l+p|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,g)|0)|0):o=(W(e[r+132>>2]|0,g)|0)+o|0,(o&l|0)==(o|0)){r=o,r=r&255,d[t>>0]=c,C=t+1|0,d[C>>0]=a,t=t+2|0,d[t>>0]=r;return}r=l&~(o>>31),r=r&255,d[t>>0]=c,C=t+1|0,d[C>>0]=a,t=t+2|0,d[t>>0]=r}function e1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(U=r>>31,h=(U^r)-U|0,I=t+188+(h*12|0)+10|0,n=E[I>>1]|0,C=t+188+(h*12|0)|0,o=e[C>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(r=5;(n<>1]^U)-U+s|0,k=t+128|0,o=e[k>>2]|0,(n&o|0)==(n|0)?p=n:p=o&~(n>>31),n=t+112|0,(e[n>>2]|0)<8&&_i(t),o=t+108|0,s=e[o>>2]|0,l=s>>>24,a=e[2832+(r<<11)+(l<<3)+4>>2]|0,a?(e[n>>2]=(e[n>>2]|0)-a,e[o>>2]=s<>2]|0):(c=e[t+148>>2]|0,o=e[t+140>>2]|0,n=ji(t)|0,(n|0)<(c+-1-o|0)?r&&(n=(ni(t,r)|0)+(n<>31^n>>1,(((n|0)>-1?n:0-n|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),t=f,f=0,t&1?(t=b()|0,ge(n|0),r0(t|0)):Be(n|0,824,96))),c=t+136|0,s=e[c>>2]|0,r?a=n:(s?o=0:o=(e[t+188+(h*12|0)+4>>2]<<1)+-1+(E[I>>1]|0)>>31,a=o^n),r=e[t+152>>2]|0,o=(e[C>>2]|0)+((a|0)>-1?a:0-a|0)|0,l=t+188+(h*12|0)+4|0,n=(e[l>>2]|0)+(W(s<<1|1,a)|0)|0,s=E[I>>1]|0,(s|0)==(r|0)&&(o=o>>1,n=n>>1,s=r>>1),e[C>>2]=o,r=s+1|0,E[I>>1]=r,o=r+n|0,(o|0)>=1?(n|0)>0&&(n=n-r|0,I=E[g>>1]|0,E[g>>1]=(I<<16>>16<127&1)+(I&65535),n=(n|0)>0?0:n):(n=E[g>>1]|0,E[g>>1]=(n&65535)-(n<<16>>16>-128&1),n=(o|0)>(~s|0)?o:0-s|0),e[l>>2]=n,r=e[c>>2]|0,s=r<<1|1,o=(W(s,(a^U)-U|0)|0)+p|0,(o|0)>=(0-r|0)?(n=e[k>>2]|0,(n+r|0)<(o|0)&&(o=o-(W(e[t+132>>2]|0,s)|0)|0)):(o=(W(e[t+132>>2]|0,s)|0)+o|0,n=e[k>>2]|0),(o&n|0)==(o|0)?(t=o,t=t&255,t|0):(t=n&~(o>>31),t=t&255,t|0)}function i1(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=r+9|0,n=N[p>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;a=e[t+148>>2]|0,c=e[36476+(e[t+4592>>2]<<2)>>2]|0,n=e[t+140>>2]|0,o=ji(t)|0;do if((o|0)<(a+-2-c-n|0))if(s){c=(ni(t,s)|0)+(o<>2]|0,o=c+s|0,a=o&1,n=a,l=1,o=(a+o|0)/2|0;break}else{s=e[l>>2]|0,t=s+o|0,n=t&1,t=(n+t|0)/2|0,h=8;break}else o=(ni(t,n)|0)+1|0,a=e[l>>2]|0,t=o+a|0,n=t&1,t=(n+t|0)/2|0,s?(c=o,l=1,o=t,s=a):(s=a,h=8);while(!1);return(h|0)==8&&(c=o,l=N[r+10>>0]<<1>>>0>=(N[p>>0]|0)>>>0,o=t),o=(n|0)!=0^l?o:0-o|0,(o|0)<0&&(h=r+10|0,d[h>>0]=(N[h>>0]|0)+1),n=(c+1-s>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[p>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(r=s,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r,o|0):(e[r>>2]=n>>1,h=(s&255)>>>1,d[p>>0]=h,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=h,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r,o|0)}function af(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;I=y,y=y+32|0,s=I,C=t+136|0;e:do if(e[C>>2]|0)r=t+144|0;else if(n=e[t+128>>2]|0,r=t+144|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+176>>2]|0))&&(e[s+8>>2]|0)==(e[t+180>>2]|0)&&(e[s+12>>2]|0)==(e[t+184>>2]|0))switch(e[r>>2]|0){case 8:{C=e[8900]|0,e[t+4604>>2]=C+(((e[8901]|0)-C|0)>>>1),y=I;return}case 10:{C=e[8903]|0,e[t+4604>>2]=C+(((e[8904]|0)-C|0)>>>1),y=I;return}case 12:{C=e[8906]|0,e[t+4604>>2]=C+(((e[8907]|0)-C|0)>>>1),y=I;return}case 16:{C=e[8909]|0,e[t+4604>>2]=C+(((e[8910]|0)-C|0)>>>1),y=I;return}default:break e}while(!1);if(g=1<>2],n=t+4608|0,s=g<<1,o=t+4612|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),p=t+4604|0,e[p>>2]=r+g,r=0-g|0,(g|0)<=(r|0)){y=I;return}c=t+184|0,h=t+180|0,a=t+176|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[h>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[C>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[p>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(g|0));y=I}function ff(t){t=t|0;var r=0,n=0;e[t>>2]=35772,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function uf(t){t=t|0;var r=0,n=0;if(e[t>>2]=35772,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function cf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(k=t+4|0,B=t+32|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(37,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(38,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(39,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(40,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function hf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,65535,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+152>>2]=a|0?a:e[c+4>>2]|0,e[t+156>>2]=l,e[t+160>>2]=s,vf(t),s=0;do e[t+164+(s*12|0)>>2]=1024,e[t+164+(s*12|0)+4>>2]=0,E[t+164+(s*12|0)+8>>1]=0,E[t+164+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4544>>2]=1024,e[t+4548>>2]=0,d[t+4552>>0]=c,d[t+4553>>0]=1,d[t+4554>>0]=0,e[t+4556>>2]=1024,e[t+4560>>2]=1,d[t+4564>>0]=c,d[t+4565>>0]=1,d[t+4566>>0]=0,e[t+4568>>2]=0,y=o}function mf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4596>>0]=o&1,r=t+132|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),df(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function df(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;K=y,y=y+32|0,Z=K+12|0,X=K,_=t+148|0,F=(e[_>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[Z>>2]=0,s0=Z+4|0,e[s0>>2]=0,e[Z+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,Z|0),t0=f,f=0,t0&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,t0=f,f=0,!(t0&1))){e[Z>>2]=s,t0=s+(r<<1)|0,e[Z+8>>2]=t0,je(s|0,0,n|0)|0,e[s0>>2]=t0;break}s=b()|0,r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)a=18;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(a=16),(a|0)==16&&(o=M<<2,f=0,l=u0(67,o|0)|0,O=f,f=0,!(O&1))){e[X>>2]=l,a=l+(M<<2)|0,e[X+8>>2]=a,je(l|0,0,o|0)|0,e[t0>>2]=a,a=18;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((a|0)==18){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4572|0,c=W(M,F)|0,h=c+1|0,p=t+4576|0,g=(M|0)>0,C=t+136|0,I=t+144|0,k=t+140|0,U=t+132|0,B=t+88|0,V=t+4568|0,O=0;i:for(;;){if(s=e[Z>>2]|0,n=s+2|0,e[a>>2]=n,s=s+(h<<1)|0,e[p>>2]=s,O&1?(e[a>>2]=s,e[p>>2]=n,r=n,n=s):r=s,g){o=e[X>>2]|0,s=0;do{if(e[V>>2]=e[o+(s<<2)>>2],o=e[_>>2]|0,E[n+(o<<1)>>1]=E[n+(o+-1<<1)>>1]|0,E[r+-2>>1]=E[n>>1]|0,f=0,h0(79,t|0,0),o=f,f=0,o&1){a=29;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[V>>2],n=(e[a>>2]|0)+(F<<1)|0,e[a>>2]=n,r=(e[p>>2]|0)+(F<<1)|0,e[p>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[C>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[I>>2]|0)+o|0)&&(o=e[B>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+((e[U>>2]|0)-c<<1)|0,e[k>>2]|0,F|0),o=f,f=0,o&1)){a=30;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){a=42;break e}}if((a|0)==29){s=b()|0;break}else if((a|0)==30){s=b()|0;break}}else a=42;while(!1);do if((a|0)==42){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[Z>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}function gf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=t+4572|0,r=e[C>>2]|0,U=t+148|0,!((e[U>>2]|0)<=0))for(I=t+4576|0,k=t+4580|0,o=r,l=q[r+-2>>1]|0,r=q[r>>1]|0,g=0;p=e[I>>2]|0,h=q[p+(g+-1<<1)>>1]|0,s=g+1|0,n=q[o+(s<<1)>>1]|0,c=e[k>>2]|0,a=r-l|0,o=l-h|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-h>>31,(l^o|0)<0?o=r:o=h+((l^a|0)<0?0:a)|0,p=pf(t,c,q[p+(g<<1)>>1]|0,o,0)|0,E[(e[I>>2]|0)+(g<<1)>>1]=p):(s=(Af(t,g,0)|0)+g|0,n=e[C>>2]|0,r=q[n+(s+-1<<1)>>1]|0,n=q[n+(s<<1)>>1]|0),!((s|0)>=(e[U>>2]|0));)o=e[C>>2]|0,l=r,r=n,g=s}function pf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(k=r>>31,p=(k^r)-k|0,I=t+164+(p*12|0)+10|0,n=E[I>>1]|0,C=t+164+(p*12|0)|0,o=e[C>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(l=5;(n<>1]^k)-k+s|0,(n&65535|0)!=(n|0)&&(n=n>>31&65535^65535),o=t+112|0,(e[o>>2]|0)<8&&_i(t),s=t+108|0,a=e[s>>2]|0,c=a>>>24,h=e[2832+(l<<11)+(c<<3)+4>>2]|0,h?(e[o>>2]=(e[o>>2]|0)-h,e[s>>2]=a<>2]|0):(o=ji(t)|0,(o|0)<47?l&&(o=(ni(t,l)|0)+(o<>31^o>>1,(((o|0)>-1?o:0-o|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),r=f,f=0,r&1?(r=b()|0,ge(n|0),r0(r|0)):Be(n|0,824,96))),h=t+164+(p*12|0)+4|0,s=e[h>>2]|0,l?l=E[I>>1]|0:(t=E[I>>1]|0,l=t,o=(s<<1)+-1+(t<<16>>16)>>31^o),a=l<<16>>16==64,t=a&1,c=s+o>>t,a=a?32:l<<16>>16,e[C>>2]=((o|0)>-1?o:0-o|0)+(e[C>>2]|0)>>t,s=a+1|0,E[I>>1]=s,l=s+c|0,(l|0)<1?(I=E[g>>1]|0,E[g>>1]=(I&65535)-(I<<16>>16>-128&1),I=(l|0)>(~a|0)?l:0-a|0,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&65535,r|0):(c|0)<=0?(I=c,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&65535,r|0):(I=c-s|0,C=E[g>>1]|0,E[g>>1]=(C<<16>>16<127&1)+(C&65535),I=(I|0)>0?0:I,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&65535,r|0)}function Af(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return l=t+4576|0,o=e[l>>2]|0,n=E[o+(r+-1<<1)>>1]|0,a=t+148|0,o=Sf(t,n,o+(r<<1)|0,(e[a>>2]|0)-r|0)|0,s=o+r|0,(s|0)==(e[a>>2]|0)?(a=o,a|0):(n=n&65535,r=q[(e[t+4572>>2]|0)+(s<<1)>>1]|0,a=n-r|0,(((a|0)>-1?a:0-a|0)|0)<1?n=(p2(t,t+4556|0)|0)+n|0:n=(W(p2(t,t+4544|0)|0,r-n>>31|1)|0)+r|0,E[(e[l>>2]|0)+(s<<1)>>1]=n,a=t+4568|0,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,a=o+1|0,a|0)}function Sf(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;for(c=t+112|0,h=t+108|0,p=t+4568|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[h>>2]|0,o=o+-1|0,e[c>>2]=o,e[h>>2]=a<<1,(a|0)>=0){g=8;break}if(a=e[p>>2]|0,C=1<>2],I=s-l|0,I=(C|0)<(I|0)?C:I,l=I+l|0,(I|0)==(C|0)&&(e[p>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((g|0)==8&&((l|0)!=(s|0)?(o=e[p>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,5,35648),I=f,f=0,I&1?(I=b()|0,ge(o|0),r0(I|0)):Be(o|0,824,96))):o=s),(o|0)>0)l=0;else return o|0;do E[n+(l<<1)>>1]=r,l=l+1|0;while((l|0)!=(o|0));return o|0}function p2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;if(c=r+9|0,n=N[c>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;o=e[36476+(e[t+4568>>2]<<2)>>2]|0,n=ji(t)|0;do if((n|0)<(46-o|0))if(s){n=(ni(t,s)|0)+(n<>2]|0,o=n+t|0,h=o&1,s=h,l=1,o=(h+o|0)/2|0;break}else{t=e[l>>2]|0,o=t+n|0,s=o&1,o=(s+o|0)/2|0,a=8;break}else n=(ni(t,16)|0)+1|0,t=e[l>>2]|0,o=n+t|0,l=o&1,o=(l+o|0)/2|0,s?(s=l,l=1):(s=l,a=8);while(!1);return(a|0)==8&&(l=N[r+10>>0]<<1>>>0>=(N[c>>0]|0)>>>0),o=(s|0)!=0^l?o:0-o|0,(o|0)<0&&(h=r+10|0,d[h>>0]=(N[h>>0]|0)+1),n=(n+1-t>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[c>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(h=s,h=h&255,h=h+1|0,h=h&255,d[c>>0]=h,o|0):(e[r>>2]=n>>1,h=(s&255)>>>1,d[c>>0]=h,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,h=h&255,h=h+1|0,h=h&255,d[c>>0]=h,o|0)}function vf(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=y,y=y+32|0,c=p,hi(c,65535,0),h=t+152|0,(e[c+4>>2]|0)==(e[h>>2]|0)&&(e[c+8>>2]|0)==(e[t+156>>2]|0)&&(e[c+12>>2]|0)==(e[t+160>>2]|0)){h=e[8909]|0,e[t+4580>>2]=h+(((e[8910]|0)-h|0)>>>1),y=p;return}for(n=t+4584|0,s=t+4588|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=131072?l>>>0>131072&&(a=r+131072|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,131072-l|0),r=e[n>>2]|0),c=t+4580|0,e[c>>2]=r+65536,a=t+160|0,o=t+156|0,l=-65536;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[h>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==65536)break}y=p}function wf(t){t=t|0;var r=0,n=0;e[t>>2]=35744,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Tf(t){t=t|0;var r=0,n=0;if(e[t>>2]=35744,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function Cf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(k=t+4|0,B=t+32|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(37,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(38,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(39,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(40,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function xf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,4095,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+152>>2]=a|0?a:e[c+4>>2]|0,e[t+156>>2]=l,e[t+160>>2]=s,Mf(t),s=0;do e[t+164+(s*12|0)>>2]=64,e[t+164+(s*12|0)+4>>2]=0,E[t+164+(s*12|0)+8>>1]=0,E[t+164+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4544>>2]=64,e[t+4548>>2]=0,d[t+4552>>0]=c,d[t+4553>>0]=1,d[t+4554>>0]=0,e[t+4556>>2]=64,e[t+4560>>2]=1,d[t+4564>>0]=c,d[t+4565>>0]=1,d[t+4566>>0]=0,e[t+4568>>2]=0,y=o}function yf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4596>>0]=o&1,r=t+132|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),If(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function If(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;K=y,y=y+32|0,Z=K+12|0,X=K,_=t+148|0,F=(e[_>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[Z>>2]=0,s0=Z+4|0,e[s0>>2]=0,e[Z+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,Z|0),t0=f,f=0,t0&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,t0=f,f=0,!(t0&1))){e[Z>>2]=s,t0=s+(r<<1)|0,e[Z+8>>2]=t0,je(s|0,0,n|0)|0,e[s0>>2]=t0;break}s=b()|0,r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)a=18;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(a=16),(a|0)==16&&(o=M<<2,f=0,l=u0(67,o|0)|0,O=f,f=0,!(O&1))){e[X>>2]=l,a=l+(M<<2)|0,e[X+8>>2]=a,je(l|0,0,o|0)|0,e[t0>>2]=a,a=18;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((a|0)==18){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4572|0,c=W(M,F)|0,h=c+1|0,p=t+4576|0,g=(M|0)>0,C=t+136|0,I=t+144|0,k=t+140|0,U=t+132|0,B=t+88|0,V=t+4568|0,O=0;i:for(;;){if(s=e[Z>>2]|0,n=s+2|0,e[a>>2]=n,s=s+(h<<1)|0,e[p>>2]=s,O&1?(e[a>>2]=s,e[p>>2]=n,r=n,n=s):r=s,g){o=e[X>>2]|0,s=0;do{if(e[V>>2]=e[o+(s<<2)>>2],o=e[_>>2]|0,E[n+(o<<1)>>1]=E[n+(o+-1<<1)>>1]|0,E[r+-2>>1]=E[n>>1]|0,f=0,h0(80,t|0,0),o=f,f=0,o&1){a=29;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[V>>2],n=(e[a>>2]|0)+(F<<1)|0,e[a>>2]=n,r=(e[p>>2]|0)+(F<<1)|0,e[p>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[C>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[I>>2]|0)+o|0)&&(o=e[B>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+((e[U>>2]|0)-c<<1)|0,e[k>>2]|0,F|0),o=f,f=0,o&1)){a=30;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){a=42;break e}}if((a|0)==29){s=b()|0;break}else if((a|0)==30){s=b()|0;break}}else a=42;while(!1);do if((a|0)==42){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[Z>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}function Df(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=t+4572|0,r=e[C>>2]|0,U=t+148|0,!((e[U>>2]|0)<=0))for(I=t+4576|0,k=t+4580|0,o=r,l=q[r+-2>>1]|0,r=q[r>>1]|0,g=0;p=e[I>>2]|0,h=q[p+(g+-1<<1)>>1]|0,s=g+1|0,n=q[o+(s<<1)>>1]|0,c=e[k>>2]|0,a=r-l|0,o=l-h|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-h>>31,(l^o|0)<0?o=r:o=h+((l^a|0)<0?0:a)|0,p=Ef(t,c,q[p+(g<<1)>>1]|0,o,0)|0,E[(e[I>>2]|0)+(g<<1)>>1]=p):(s=(kf(t,g,0)|0)+g|0,n=e[C>>2]|0,r=q[n+(s+-1<<1)>>1]|0,n=q[n+(s<<1)>>1]|0),!((s|0)>=(e[U>>2]|0));)o=e[C>>2]|0,l=r,r=n,g=s}function Ef(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(k=r>>31,p=(k^r)-k|0,I=t+164+(p*12|0)+10|0,n=E[I>>1]|0,C=t+164+(p*12|0)|0,o=e[C>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(l=5;(n<>1]^k)-k+s|0,(n&4095|0)!=(n|0)&&(n=n>>31&4095^4095),o=t+112|0,(e[o>>2]|0)<8&&_i(t),s=t+108|0,a=e[s>>2]|0,c=a>>>24,h=e[2832+(l<<11)+(c<<3)+4>>2]|0,h?(e[o>>2]=(e[o>>2]|0)-h,e[s>>2]=a<>2]|0):(o=ji(t)|0,(o|0)<35?l&&(o=(ni(t,l)|0)+(o<>31^o>>1,(((o|0)>-1?o:0-o|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),r=f,f=0,r&1?(r=b()|0,ge(n|0),r0(r|0)):Be(n|0,824,96))),h=t+164+(p*12|0)+4|0,s=e[h>>2]|0,l?l=E[I>>1]|0:(t=E[I>>1]|0,l=t,o=(s<<1)+-1+(t<<16>>16)>>31^o),a=l<<16>>16==64,t=a&1,c=s+o>>t,a=a?32:l<<16>>16,e[C>>2]=((o|0)>-1?o:0-o|0)+(e[C>>2]|0)>>t,s=a+1|0,E[I>>1]=s,l=s+c|0,(l|0)<1?(I=E[g>>1]|0,E[g>>1]=(I&65535)-(I<<16>>16>-128&1),I=(l|0)>(~a|0)?l:0-a|0,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&4095,r=r&65535,r|0):(c|0)<=0?(I=c,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&4095,r=r&65535,r|0):(I=c-s|0,C=E[g>>1]|0,E[g>>1]=(C<<16>>16<127&1)+(C&65535),I=(I|0)>0?0:I,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&4095,r=r&65535,r|0)}function kf(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return l=t+4576|0,o=e[l>>2]|0,n=E[o+(r+-1<<1)>>1]|0,a=t+148|0,o=Ff(t,n,o+(r<<1)|0,(e[a>>2]|0)-r|0)|0,s=o+r|0,(s|0)==(e[a>>2]|0)?(a=o,a|0):(n=n&65535,r=q[(e[t+4572>>2]|0)+(s<<1)>>1]|0,a=n-r|0,(((a|0)>-1?a:0-a|0)|0)<1?n=(A2(t,t+4556|0)|0)+n|0:n=(W(A2(t,t+4544|0)|0,r-n>>31|1)|0)+r|0,E[(e[l>>2]|0)+(s<<1)>>1]=n&4095,a=t+4568|0,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,a=o+1|0,a|0)}function Ff(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;for(c=t+112|0,h=t+108|0,p=t+4568|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[h>>2]|0,o=o+-1|0,e[c>>2]=o,e[h>>2]=a<<1,(a|0)>=0){g=8;break}if(a=e[p>>2]|0,C=1<>2],I=s-l|0,I=(C|0)<(I|0)?C:I,l=I+l|0,(I|0)==(C|0)&&(e[p>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((g|0)==8&&((l|0)!=(s|0)?(o=e[p>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,5,35648),I=f,f=0,I&1?(I=b()|0,ge(o|0),r0(I|0)):Be(o|0,824,96))):o=s),(o|0)>0)l=0;else return o|0;do E[n+(l<<1)>>1]=r,l=l+1|0;while((l|0)!=(o|0));return o|0}function A2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;if(c=r+9|0,n=N[c>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;o=e[36476+(e[t+4568>>2]<<2)>>2]|0,n=ji(t)|0;do if((n|0)<(34-o|0))if(s){n=(ni(t,s)|0)+(n<>2]|0,o=n+t|0,h=o&1,s=h,l=1,o=(h+o|0)/2|0;break}else{t=e[l>>2]|0,o=t+n|0,s=o&1,o=(s+o|0)/2|0,a=8;break}else n=(ni(t,12)|0)+1|0,t=e[l>>2]|0,o=n+t|0,l=o&1,o=(l+o|0)/2|0,s?(s=l,l=1):(s=l,a=8);while(!1);return(a|0)==8&&(l=N[r+10>>0]<<1>>>0>=(N[c>>0]|0)>>>0),o=(s|0)!=0^l?o:0-o|0,(o|0)<0&&(h=r+10|0,d[h>>0]=(N[h>>0]|0)+1),n=(n+1-t>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[c>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(h=s,h=h&255,h=h+1|0,h=h&255,d[c>>0]=h,o|0):(e[r>>2]=n>>1,h=(s&255)>>>1,d[c>>0]=h,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,h=h&255,h=h+1|0,h=h&255,d[c>>0]=h,o|0)}function Mf(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=y,y=y+32|0,c=p,hi(c,4095,0),h=t+152|0,(e[c+4>>2]|0)==(e[h>>2]|0)&&(e[c+8>>2]|0)==(e[t+156>>2]|0)&&(e[c+12>>2]|0)==(e[t+160>>2]|0)){h=e[8906]|0,e[t+4580>>2]=h+(((e[8907]|0)-h|0)>>>1),y=p;return}for(n=t+4584|0,s=t+4588|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=8192?l>>>0>8192&&(a=r+8192|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,8192-l|0),r=e[n>>2]|0),c=t+4580|0,e[c>>2]=r+4096,a=t+160|0,o=t+156|0,l=-4096;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[h>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==4096)break}y=p}function _f(t){t=t|0;var r=0,n=0;e[t>>2]=35716,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Rf(t){t=t|0;var r=0,n=0;if(e[t>>2]=35716,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function Pf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(k=t+4|0,B=t+32|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(44,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(45,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(46,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(47,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0)}function Lf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,255,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+152>>2]=a|0?a:e[c+4>>2]|0,e[t+156>>2]=l,e[t+160>>2]=s,bf(t),s=0;do e[t+164+(s*12|0)>>2]=4,e[t+164+(s*12|0)+4>>2]=0,E[t+164+(s*12|0)+8>>1]=0,E[t+164+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4544>>2]=4,e[t+4548>>2]=0,d[t+4552>>0]=c,d[t+4553>>0]=1,d[t+4554>>0]=0,e[t+4556>>2]=4,e[t+4560>>2]=1,d[t+4564>>0]=c,d[t+4565>>0]=1,d[t+4566>>0]=0,e[t+4568>>2]=0,y=o}function Uf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4596>>0]=o&1,r=t+132|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),Of(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function Of(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;K=y,y=y+32|0,Z=K+12|0,X=K,_=t+148|0,F=(e[_>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[Z>>2]=0,s0=Z+4|0,e[s0>>2]=0,e[Z+8>>2]=0;e:do if(r){if((r|0)<0&&(f=0,n0(178,Z|0),t0=f,f=0,t0&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r|0)|0,t0=f,f=0,!(t0&1))){for(e[s0>>2]=n,e[Z>>2]=n,e[Z+8>>2]=n+r;;)if(d[n>>0]=0,n=(e[s0>>2]|0)+1|0,e[s0>>2]=n,r=r+-1|0,!r)break e}n=b()|0,r=e[Z>>2]|0,r||r0(n|0),(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),a0(r),r0(n|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)l=19;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(l=17),(l|0)==17&&(s=M<<2,f=0,o=u0(67,s|0)|0,O=f,f=0,!(O&1))){e[X>>2]=o,l=o+(M<<2)|0,e[X+8>>2]=l,je(o|0,0,s|0)|0,e[t0>>2]=l,l=19;break}n=b()|0,r=e[X>>2]|0,s=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-s|0)>>>2)<<2)),a0(r))}while(!1);if((l|0)==19){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4572|0,c=W(M,F)|0,h=c+1|0,p=t+4576|0,g=(M|0)>0,C=t+136|0,I=t+144|0,k=t+140|0,U=t+132|0,B=t+88|0,V=t+4568|0,O=0;i:for(;;){if(s=e[Z>>2]|0,n=s+1|0,e[a>>2]=n,s=s+h|0,e[p>>2]=s,O&1?(e[a>>2]=s,e[p>>2]=n,r=n,n=s):r=s,g){o=e[X>>2]|0,s=0;do{if(e[V>>2]=e[o+(s<<2)>>2],o=e[_>>2]|0,d[n+o>>0]=d[n+(o+-1)>>0]|0,d[(e[p>>2]|0)+-1>>0]=d[e[a>>2]>>0]|0,f=0,h0(81,t|0,0),o=f,f=0,o&1){l=30;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[V>>2],n=(e[a>>2]|0)+F|0,e[a>>2]=n,r=(e[p>>2]|0)+F|0,e[p>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[C>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[I>>2]|0)+o|0)&&(o=e[B>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+((e[U>>2]|0)-c)|0,e[k>>2]|0,F|0),o=f,f=0,o&1)){l=31;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){l=43;break e}}if((l|0)==30){n=b()|0;break}else if((l|0)==31){n=b()|0;break}}else l=43;while(!1);do if((l|0)==43){if(f=0,n0(183,t|0),t=f,f=0,t&1){n=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[Z>>2]|0,!r){y=K;return}(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),a0(r),y=K;return}while(!1);r=e[X>>2]|0,s=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-s|0)>>>2)<<2)),a0(r))}r=e[Z>>2]|0,r||r0(n|0),(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),a0(r),r0(n|0)}function Nf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=t+4572|0,r=e[C>>2]|0,U=t+148|0,!((e[U>>2]|0)<=0))for(I=t+4576|0,k=t+4580|0,o=r,l=N[r+-1>>0]|0,r=N[r>>0]|0,g=0;p=e[I>>2]|0,h=N[p+(g+-1)>>0]|0,s=g+1|0,n=N[o+s>>0]|0,c=e[k>>2]|0,a=r-l|0,o=l-h|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-h>>31,(l^o|0)<0?o=r:o=h+((l^a|0)<0?0:a)|0,p=Bf(t,c,N[p+g>>0]|0,o,0)|0,d[(e[I>>2]|0)+g>>0]=p):(s=(Vf(t,g,0)|0)+g|0,n=e[C>>2]|0,r=N[n+(s+-1)>>0]|0,n=N[n+s>>0]|0),!((s|0)>=(e[U>>2]|0));)o=e[C>>2]|0,l=r,r=n,g=s}function Bf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(k=r>>31,p=(k^r)-k|0,I=t+164+(p*12|0)+10|0,n=E[I>>1]|0,C=t+164+(p*12|0)|0,o=e[C>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(l=5;(n<>1]^k)-k+s|0,(n&255|0)!=(n|0)&&(n=n>>31&255^255),o=t+112|0,(e[o>>2]|0)<8&&_i(t),s=t+108|0,a=e[s>>2]|0,c=a>>>24,h=e[2832+(l<<11)+(c<<3)+4>>2]|0,h?(e[o>>2]=(e[o>>2]|0)-h,e[s>>2]=a<>2]|0):(o=ji(t)|0,(o|0)<23?l&&(o=(ni(t,l)|0)+(o<>31^o>>1,(((o|0)>-1?o:0-o|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),r=f,f=0,r&1?(r=b()|0,ge(n|0),r0(r|0)):Be(n|0,824,96))),h=t+164+(p*12|0)+4|0,s=e[h>>2]|0,l?l=E[I>>1]|0:(t=E[I>>1]|0,l=t,o=(s<<1)+-1+(t<<16>>16)>>31^o),a=l<<16>>16==64,t=a&1,c=s+o>>t,a=a?32:l<<16>>16,e[C>>2]=((o|0)>-1?o:0-o|0)+(e[C>>2]|0)>>t,s=a+1|0,E[I>>1]=s,l=s+c|0,(l|0)<1?(I=E[g>>1]|0,E[g>>1]=(I&65535)-(I<<16>>16>-128&1),I=(l|0)>(~a|0)?l:0-a|0,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&255,r|0):(c|0)<=0?(I=c,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&255,r|0):(I=c-s|0,C=E[g>>1]|0,E[g>>1]=(C<<16>>16<127&1)+(C&65535),I=(I|0)>0?0:I,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&255,r|0)}function Vf(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return l=t+4576|0,o=e[l>>2]|0,n=d[o+(r+-1)>>0]|0,a=t+148|0,o=qf(t,n,o+r|0,(e[a>>2]|0)-r|0)|0,s=o+r|0,(s|0)==(e[a>>2]|0)?(a=o,a|0):(n=n&255,r=N[(e[t+4572>>2]|0)+s>>0]|0,a=n-r|0,(((a|0)>-1?a:0-a|0)|0)<1?n=(S2(t,t+4556|0)|0)+n|0:n=(W(S2(t,t+4544|0)|0,r-n>>31|1)|0)+r|0,d[(e[l>>2]|0)+s>>0]=n,a=t+4568|0,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,a=o+1|0,a|0)}function qf(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;for(c=t+112|0,h=t+108|0,p=t+4568|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[h>>2]|0,o=o+-1|0,e[c>>2]=o,e[h>>2]=a<<1,(a|0)>=0){g=8;break}if(a=e[p>>2]|0,C=1<>2],I=s-l|0,I=(C|0)<(I|0)?C:I,l=I+l|0,(I|0)==(C|0)&&(e[p>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}return(g|0)==8&&((l|0)!=(s|0)?(o=e[p>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,5,35648),I=f,f=0,I&1?(I=b()|0,ge(o|0),r0(I|0)):Be(o|0,824,96))):o=s),(o|0)<=0||je(n|0,r|0,o|0)|0,o|0}function S2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;if(c=r+9|0,n=N[c>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;o=e[36476+(e[t+4568>>2]<<2)>>2]|0,n=ji(t)|0;do if((n|0)<(22-o|0))if(s){n=(ni(t,s)|0)+(n<>2]|0,o=n+t|0,h=o&1,s=h,l=1,o=(h+o|0)/2|0;break}else{t=e[l>>2]|0,o=t+n|0,s=o&1,o=(s+o|0)/2|0,a=8;break}else n=(ni(t,8)|0)+1|0,t=e[l>>2]|0,o=n+t|0,l=o&1,o=(l+o|0)/2|0,s?(s=l,l=1):(s=l,a=8);while(!1);return(a|0)==8&&(l=N[r+10>>0]<<1>>>0>=(N[c>>0]|0)>>>0),o=(s|0)!=0^l?o:0-o|0,(o|0)<0&&(h=r+10|0,d[h>>0]=(N[h>>0]|0)+1),n=(n+1-t>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[c>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(h=s,h=h&255,h=h+1|0,h=h&255,d[c>>0]=h,o|0):(e[r>>2]=n>>1,h=(s&255)>>>1,d[c>>0]=h,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,h=h&255,h=h+1|0,h=h&255,d[c>>0]=h,o|0)}function bf(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=y,y=y+32|0,c=p,hi(c,255,0),h=t+152|0,(e[c+4>>2]|0)==(e[h>>2]|0)&&(e[c+8>>2]|0)==(e[t+156>>2]|0)&&(e[c+12>>2]|0)==(e[t+160>>2]|0)){h=e[8900]|0,e[t+4580>>2]=h+(((e[8901]|0)-h|0)>>>1),y=p;return}for(n=t+4584|0,s=t+4588|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=512?l>>>0>512&&(a=r+512|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,512-l|0),r=e[n>>2]|0),c=t+4580|0,e[c>>2]=r+256,a=t+160|0,o=t+156|0,l=-256;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[h>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==256)break}y=p}function Gf(t){t=t|0;var r=0,n=0;e[t>>2]=35688,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Qf(t){t=t|0;var r=0,n=0;if(e[t>>2]=35688,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function zf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(k=t+4|0,B=t+32|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(44,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(45,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(46,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(47,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0)}function Hf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,255,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+152>>2]=a|0?a:e[c+4>>2]|0,e[t+156>>2]=l,e[t+160>>2]=s,Ld(t),s=0;do e[t+164+(s*12|0)>>2]=4,e[t+164+(s*12|0)+4>>2]=0,E[t+164+(s*12|0)+8>>1]=0,E[t+164+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4544>>2]=4,e[t+4548>>2]=0,d[t+4552>>0]=c,d[t+4553>>0]=1,d[t+4554>>0]=0,e[t+4556>>2]=4,e[t+4560>>2]=1,d[t+4564>>0]=c,d[t+4565>>0]=1,d[t+4566>>0]=0,e[t+4568>>2]=0,y=o}function Yf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4596>>0]=o&1,r=t+132|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),jf(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function jf(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;K=y,y=y+32|0,Z=K+12|0,X=K,_=t+148|0,F=(e[_>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[Z>>2]=0,s0=Z+4|0,e[s0>>2]=0,e[Z+8>>2]=0;e:do if(r){if(r>>>0>1431655765&&(f=0,n0(178,Z|0),t0=f,f=0,t0&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r*3|0)|0,t0=f,f=0,!(t0&1))){for(e[s0>>2]=n,e[Z>>2]=n,e[Z+8>>2]=n+(r*3|0);;)if(d[n>>0]=0,d[n+1>>0]=0,d[n+2>>0]=0,n=(e[s0>>2]|0)+3|0,e[s0>>2]=n,r=r+-1|0,!r)break e}s=b()|0,r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)l=19;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(l=17),(l|0)==17&&(s=M<<2,f=0,o=u0(67,s|0)|0,O=f,f=0,!(O&1))){e[X>>2]=o,l=o+(M<<2)|0,e[X+8>>2]=l,je(o|0,0,s|0)|0,e[t0>>2]=l,l=19;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((l|0)==19){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4572|0,c=W(M,F)|0,h=c+1|0,p=t+4576|0,g=(M|0)>0,C=t+136|0,I=t+144|0,k=t+140|0,U=t+132|0,B=t+88|0,V=t+4568|0,O=0;i:for(;;){if(s=e[Z>>2]|0,n=s+3|0,e[a>>2]=n,s=s+(h*3|0)|0,e[p>>2]=s,O&1?(e[a>>2]=s,e[p>>2]=n,r=n,n=s):r=s,g){o=e[X>>2]|0,s=0;do{if(e[V>>2]=e[o+(s<<2)>>2],r=e[_>>2]|0,o=n+(r*3|0)|0,n=n+((r+-1|0)*3|0)|0,d[o>>0]=d[n>>0]|0,d[o+1>>0]=d[n+1>>0]|0,d[o+2>>0]=d[n+2>>0]|0,n=e[a>>2]|0,o=(e[p>>2]|0)+-3|0,d[o>>0]=d[n>>0]|0,d[o+1>>0]=d[n+1>>0]|0,d[o+2>>0]=d[n+2>>0]|0,f=0,h0(82,t|0,0),o=f,f=0,o&1){l=30;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[V>>2],n=(e[a>>2]|0)+(F*3|0)|0,e[a>>2]=n,r=(e[p>>2]|0)+(F*3|0)|0,e[p>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[C>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[I>>2]|0)+o|0)&&(o=e[B>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+(((e[U>>2]|0)-c|0)*3|0)|0,e[k>>2]|0,F|0),o=f,f=0,o&1)){l=31;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){l=43;break e}}if((l|0)==30){s=b()|0;break}else if((l|0)==31){s=b()|0;break}}else l=43;while(!1);do if((l|0)==43){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[Z>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),r0(s|0)}function Xf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0;if(t0=t+148|0,!((e[t0>>2]|0)<=0))for(Z=t+4576|0,s0=t+4572|0,w0=t+4580|0,K=0;F=K+-1|0,l=e[Z>>2]|0,a=e[s0>>2]|0,r=K+1|0,o=N[a+(K*3|0)>>0]|0,X=e[w0>>2]|0,c=N[a+(F*3|0)>>0]|0,h=o-c|0,p=N[l+(F*3|0)>>0]|0,g=c-p|0,C=((((d[X+((N[a+(r*3|0)>>0]|0)-o)>>0]|0)*9|0)+(d[X+h>>0]|0)|0)*9|0)+(d[X+g>>0]|0)|0,s=N[a+(K*3|0)+1>>0]|0,I=N[a+(F*3|0)+1>>0]|0,k=s-I|0,U=N[l+(F*3|0)+1>>0]|0,B=I-U|0,V=((((d[X+((N[a+(r*3|0)+1>>0]|0)-s)>>0]|0)*9|0)+(d[X+k>>0]|0)|0)*9|0)+(d[X+B>>0]|0)|0,n=N[a+(K*3|0)+2>>0]|0,O=N[a+(F*3|0)+2>>0]|0,_=n-O|0,F=N[l+(F*3|0)+2>>0]|0,M=O-F|0,X=((((d[X+((N[a+(r*3|0)+2>>0]|0)-n)>>0]|0)*9|0)+(d[X+_>>0]|0)|0)*9|0)+(d[X+M>>0]|0)|0,V|C|X?(a=N[l+(K*3|0)>>0]|0,l=o-p>>31,(l^g|0)>=0&&((l^h|0)<0?o=p:o=p-c+o|0),a=t1(t,C,a,o,0)|0,l=N[(e[Z>>2]|0)+(K*3|0)+1>>0]|0,o=s-U>>31,(o^B|0)>=0&&((o^k|0)<0?s=U:s=U-I+s|0),o=t1(t,V,l,s,0)|0,l=N[(e[Z>>2]|0)+(K*3|0)+2>>0]|0,s=n-F>>31,(s^M|0)>=0&&((s^_|0)<0?n=F:n=F-O+n|0),X=t1(t,X,l,n,0)|0,K=(e[Z>>2]|0)+(K*3|0)|0,d[K>>0]=a,d[K+1>>0]=o,d[K+2>>0]=X):r=(Kf(t,K,0)|0)+K|0,(r|0)<(e[t0>>2]|0);)K=r}function Kf(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;return h=y,y=y+16|0,g=h+3|0,C=h,l=t+4576|0,n=e[l>>2]|0,s=n+((r+-1|0)*3|0)|0,a=d[s>>0]|0,c=d[s+1>>0]|0,s=d[s+2>>0]|0,d[C>>0]=a,d[C+1>>0]=c,d[C+2>>0]=s,p=t+148|0,o=(e[p>>2]|0)-r|0,d[g>>0]=d[C>>0]|0,d[g+1>>0]=d[C+1>>0]|0,d[g+2>>0]=d[C+2>>0]|0,o=Wf(t,g,n+(r*3|0)|0,o)|0,n=o+r|0,(n|0)==(e[p>>2]|0)?(C=o,y=h,C|0):(g=(e[t+4572>>2]|0)+(n*3|0)|0,r=d[g>>0]|0,p=d[g+1>>0]|0,g=d[g+2>>0]|0,C=e[l>>2]|0,l=t+4544|0,k=r1(t,l)|0,I=r1(t,l)|0,r=r&255,r=(W(r-(a&255)>>31|1,k)|0)+r&255,p=p&255,p=(W(p-(c&255)>>31|1,I)|0)+p&255,g=g&255,g=(W(g-(s&255)>>31|1,r1(t,l)|0)|0)+g&255,C=C+(n*3|0)|0,d[C>>0]=r,d[C+1>>0]=p,d[C+2>>0]=g,C=t+4568|0,g=e[C>>2]|0,e[C>>2]=(g|0)<1?0:g+-1|0,C=o+1|0,y=h,C|0)}function t1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(k=r>>31,p=(k^r)-k|0,I=t+164+(p*12|0)+10|0,n=E[I>>1]|0,C=t+164+(p*12|0)|0,o=e[C>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(l=5;(n<>1]^k)-k+s|0,(n&255|0)!=(n|0)&&(n=n>>31&255^255),o=t+112|0,(e[o>>2]|0)<8&&_i(t),s=t+108|0,a=e[s>>2]|0,c=a>>>24,h=e[2832+(l<<11)+(c<<3)+4>>2]|0,h?(e[o>>2]=(e[o>>2]|0)-h,e[s>>2]=a<>2]|0):(o=ji(t)|0,(o|0)<23?l&&(o=(ni(t,l)|0)+(o<>31^o>>1,(((o|0)>-1?o:0-o|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),r=f,f=0,r&1?(r=b()|0,ge(n|0),r0(r|0)):Be(n|0,824,96))),h=t+164+(p*12|0)+4|0,s=e[h>>2]|0,l?l=E[I>>1]|0:(t=E[I>>1]|0,l=t,o=(s<<1)+-1+(t<<16>>16)>>31^o),a=l<<16>>16==64,t=a&1,c=s+o>>t,a=a?32:l<<16>>16,e[C>>2]=((o|0)>-1?o:0-o|0)+(e[C>>2]|0)>>t,s=a+1|0,E[I>>1]=s,l=s+c|0,(l|0)<1?(I=E[g>>1]|0,E[g>>1]=(I&65535)-(I<<16>>16>-128&1),I=(l|0)>(~a|0)?l:0-a|0,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&255,r|0):(c|0)<=0?(I=c,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&255,r|0):(I=c-s|0,C=E[g>>1]|0,E[g>>1]=(C<<16>>16<127&1)+(C&65535),I=(I|0)>0?0:I,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&255,r|0)}function Wf(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;for(c=t+112|0,h=t+108|0,p=t+4568|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[h>>2]|0,o=o+-1|0,e[c>>2]=o,e[h>>2]=a<<1,(a|0)>=0){g=8;break}if(a=e[p>>2]|0,C=1<>2],I=s-l|0,I=(C|0)<(I|0)?C:I,l=I+l|0,(I|0)==(C|0)&&(e[p>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((g|0)==8&&((l|0)!=(s|0)?(o=e[p>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,5,35648),I=f,f=0,I&1?(I=b()|0,ge(o|0),r0(I|0)):Be(o|0,824,96))):o=s),(o|0)<=0)return o|0;l=0;do I=n+(l*3|0)|0,d[I>>0]=d[r>>0]|0,d[I+1>>0]=d[r+1>>0]|0,d[I+2>>0]=d[r+2>>0]|0,l=l+1|0;while((l|0)!=(o|0));return o|0}function r1(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;if(c=r+9|0,n=N[c>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;o=e[36476+(e[t+4568>>2]<<2)>>2]|0,n=ji(t)|0;do if((n|0)<(22-o|0))if(s){n=(ni(t,s)|0)+(n<>2]|0,o=n+t|0,h=o&1,s=h,l=1,o=(h+o|0)/2|0;break}else{t=e[l>>2]|0,o=t+n|0,s=o&1,o=(s+o|0)/2|0,a=8;break}else n=(ni(t,8)|0)+1|0,t=e[l>>2]|0,o=n+t|0,l=o&1,o=(l+o|0)/2|0,s?(s=l,l=1):(s=l,a=8);while(!1);return(a|0)==8&&(l=N[r+10>>0]<<1>>>0>=(N[c>>0]|0)>>>0),o=(s|0)!=0^l?o:0-o|0,(o|0)<0&&(h=r+10|0,d[h>>0]=(N[h>>0]|0)+1),n=(n+1-t>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[c>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(h=s,h=h&255,h=h+1|0,h=h&255,d[c>>0]=h,o|0):(e[r>>2]=n>>1,h=(s&255)>>>1,d[c>>0]=h,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,h=h&255,h=h+1|0,h=h&255,d[c>>0]=h,o|0)}function Zf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(g=y,y=y+128|0,l=g,I=g+116|0,k=g+104|0,c=g+20|0,p=g+16|0,h=g+12|0,C=g+8|0,a=g+4|0,d[I>>0]=d[58887]|0,d[I+1>>0]=d[58888]|0,d[I+2>>0]=d[58889]|0,d[I+3>>0]=d[58890]|0,d[I+4>>0]=d[58891]|0,d[I+5>>0]=d[58892]|0,It(I+1|0,58893,0,e[n+4>>2]|0),t=Ii()|0,e[l>>2]=o,o=k+(qi(k,12,t,I,l)|0)|0,I=it(k,o,n)|0,t=ai(n)|0,e[C>>2]=t,f=0,re(3,k|0,I|0,o|0,c|0,p|0,h|0,C|0),o=f,f=0,o&1)k=b()|0,Ee(t)|0,r0(k|0);else return Ee(t)|0,e[a>>2]=e[r>>2],I=e[p>>2]|0,k=e[h>>2]|0,e[l>>2]=e[a>>2],k=zt(l,c,I,k,n,s)|0,y=g,k|0;return 0}function Jf(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(C=y,y=y+240|0,a=C+8|0,t=C,k=C+204|0,h=C+32|0,g=C+28|0,p=C+24|0,I=C+20|0,c=C+16|0,U=t,e[U>>2]=37,e[U+4>>2]=0,It(t+1|0,58895,0,e[n+4>>2]|0),U=Ii()|0,B=a,e[B>>2]=o,e[B+4>>2]=l,l=k+(qi(k,23,U,t,a)|0)|0,o=it(k,l,n)|0,t=ai(n)|0,e[I>>2]=t,f=0,re(3,k|0,o|0,l|0,h|0,g|0,p|0,I|0),l=f,f=0,l&1)B=b()|0,Ee(t)|0,r0(B|0);else return Ee(t)|0,e[c>>2]=e[r>>2],U=e[g>>2]|0,B=e[p>>2]|0,e[a>>2]=e[c>>2],B=zt(a,h,U,B,n,s)|0,y=C,B|0;return 0}function $f(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=+o;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0;X=y,y=y+352|0,V=X+312|0,I=X+48|0,C=X+32|0,h=X+24|0,l=X+8|0,g=X,U=X+316|0,B=X+80|0,c=X+84|0,M=X+76|0,F=X+72|0,O=X+68|0,_=X+64|0,p=g,e[p>>2]=37,e[p+4>>2]=0,p=hr(g+1|0,58898,e[n+4>>2]|0)|0,e[B>>2]=U,t=Ii()|0,p?(e[l>>2]=e[n+8>>2],H[l+8>>3]=o,l=qi(U,30,t,g,l)|0):(H[h>>3]=o,l=qi(U,30,t,g,h)|0);e:do if((l|0)>29){f=0,t=g0(3)|0,l=f,f=0,l=l&1,p?!l&&(f=0,e[C>>2]=e[n+8>>2],H[C+8>>3]=o,a=k0(17,B|0,t|0,g|0,C|0)|0,k=f,f=0,!(k&1))&&(K=12):!l&&(f=0,e[I>>2]=e[n+8>>2],H[I+8>>3]=o,k=k0(17,B|0,t|0,g|0,I|0)|0,I=f,f=0,!(I&1))&&(a=k,K=12);do if((K|0)==12){if(t=e[B>>2]|0,t)l=t;else{if(f=0,we(6),k=f,f=0,k&1)break;l=e[B>>2]|0}t=l,g=l,K=16;break e}while(!1);t=b()|0}else t=e[B>>2]|0,g=0,a=l,K=16;while(!1);if((K|0)==16){h=t+a|0,p=it(t,h,n)|0;do if((t|0)==(U|0))t=U,l=0,K=22;else{if(a=xi(a<<3)|0,!a){if(f=0,we(6),K=f,f=0,K&1){l=0,K=20;break}t=e[B>>2]|0}l=a,c=a,K=22}while(!1);do if((K|0)==22)if(f=0,a=u0(68,n|0)|0,B=f,f=0,B&1)K=20;else{if(e[O>>2]=a,f=0,re(4,t|0,p|0,h|0,c|0,M|0,F|0,O|0),O=f,f=0,O&1){t=b()|0,Ee(a)|0;break}if(Ee(a)|0,e[_>>2]=e[r>>2],K=e[M>>2]|0,t=e[F>>2]|0,f=0,e[V>>2]=e[_>>2],t=Fe(40,V|0,c|0,K|0,t|0,n|0,s|0)|0,K=f,f=0,K&1)K=20;else return e[r>>2]=t,l&&Ze(l),g&&Ze(g),y=X,t|0}while(!1);(K|0)==20&&(t=b()|0),l&&Ze(l),g&&Ze(g)}return r0(t|0),0}function eu(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0;switch(M=y,y=y+16|0,X=M,F=Pi(a,44212)|0,O=Pi(a,44368)|0,Ke[e[(e[O>>2]|0)+20>>2]&127](X,O),e[l>>2]=s,a=d[t>>0]|0,a<<24>>24){case 43:case 45:{f=0,a=y0(e[(e[F>>2]|0)+44>>2]|0,F|0,a|0)|0,_=f,f=0,_&1?V=8:(p=e[l>>2]|0,e[l>>2]=p+4,e[p>>2]=a,p=t+1|0,V=10);break}default:p=t,V=10}e:do if((V|0)==10){_=n;i:do if((_-p|0)>1&&(d[p>>0]|0)==48){switch(c=p+1|0,d[c>>0]|0){case 88:case 120:break;default:{V=11;break i}}if(f=0,a=y0(e[(e[F>>2]|0)+44>>2]|0,F|0,48)|0,B=f,f=0,B&1){V=8;break e}if(B=e[l>>2]|0,e[l>>2]=B+4,e[B>>2]=a,p=p+2|0,f=0,a=y0(e[(e[F>>2]|0)+44>>2]|0,F|0,d[c>>0]|0)|0,B=f,f=0,B&1){V=8;break e}if(B=e[l>>2]|0,e[l>>2]=B+4,e[B>>2]=a,p>>>0>>0){for(a=p;c=d[a>>0]|0,f=0,h=g0(3)|0,B=f,f=0,!(B&1||(f=0,c=y0(39,c<<24>>24|0,h|0)|0,B=f,f=0,B&1));){if(!c){B=p;break i}if(a=a+1|0,a>>>0>=n>>>0){B=p;break i}}a=b()|0;break e}else B=p,a=p}else V=11;while(!1);i:do if((V|0)==11)if(p>>>0>>0){for(a=p;c=d[a>>0]|0,f=0,h=g0(3)|0,B=f,f=0,!(B&1||(f=0,c=y0(40,c<<24>>24|0,h|0)|0,B=f,f=0,B&1));){if(!c){B=p;break i}if(a=a+1|0,a>>>0>=n>>>0){B=p;break i}}a=b()|0;break e}else B=p,a=p;while(!1);if(k=d[X>>0]|0,U=X+4|0,(k&1?e[U>>2]|0:(k&255)>>>1)|0){if((B|0)!=(a|0)&&(g=a+-1|0,B>>>0>>0)){h=B,c=g;do k=d[h>>0]|0,d[h>>0]=d[c>>0]|0,d[c>>0]=k,h=h+1|0,c=c+-1|0;while(h>>>0>>0)}if(f=0,g=u0(e[(e[O>>2]|0)+16>>2]|0,O|0)|0,k=f,f=0,k&1){V=8;break}C=X+8|0,I=X+1|0;i:do if(B>>>0>>0){for(c=0,h=0,k=B;p=d[(d[X>>0]&1?e[C>>2]|0:I)+h>>0]|0,p<<24>>24>0&(c|0)==(p<<24>>24|0)?(c=e[l>>2]|0,e[l>>2]=c+4,e[c>>2]=g,c=d[X>>0]|0,p=0,h=(h>>>0<((c&1?e[U>>2]|0:(c&255)>>>1)+-1|0)>>>0&1)+h|0):p=c,f=0,c=y0(e[(e[F>>2]|0)+44>>2]|0,F|0,d[k>>0]|0)|0,K=f,f=0,!(K&1);){if(K=e[l>>2]|0,e[l>>2]=K+4,e[K>>2]=c,k=k+1|0,k>>>0>=a>>>0)break i;c=p+1|0}a=b()|0;break e}while(!1);if(c=s+(B-t<<2)|0,p=e[l>>2]|0,(c|0)!=(p|0))if(h=p+-4|0,c>>>0>>0){do K=e[c>>2]|0,e[c>>2]=e[h>>2],e[h>>2]=K,c=c+4|0,h=h+-4|0;while(c>>>0>>0);g=F,c=p}else g=F,c=p;else g=F}else{if(f=0,k0(e[(e[F>>2]|0)+48>>2]|0,F|0,B|0,a|0,e[l>>2]|0)|0,K=f,f=0,K&1){V=8;break}c=(e[l>>2]|0)+(a-B<<2)|0,e[l>>2]=c,g=F}i:do if(a>>>0>>0){for(;;){if(c=d[a>>0]|0,c<<24>>24==46){h=a;break}if(f=0,h=y0(e[(e[g>>2]|0)+44>>2]|0,F|0,c|0)|0,K=f,f=0,K&1){V=4;break}if(K=e[l>>2]|0,c=K+4|0,e[l>>2]=c,e[K>>2]=h,a=a+1|0,a>>>0>=n>>>0)break i}if((V|0)==4){a=b()|0;break e}if(f=0,a=u0(e[(e[O>>2]|0)+12>>2]|0,O|0)|0,K=f,f=0,K&1){V=8;break e}K=e[l>>2]|0,c=K+4|0,e[l>>2]=c,e[K>>2]=a,a=h+1|0}while(!1);if(f=0,k0(e[(e[F>>2]|0)+48>>2]|0,F|0,a|0,n|0,c|0)|0,K=f,f=0,K&1)V=8;else{K=(e[l>>2]|0)+(_-a<<2)|0,e[l>>2]=K,e[o>>2]=(r|0)==(n|0)?K:s+(r-t<<2)|0,f0(X),y=M;return}}while(!1);(V|0)==8&&(a=b()|0),f0(X),r0(a|0)}function iu(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=+o;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0;X=y,y=y+352|0,V=X+304|0,I=X+48|0,C=X+32|0,h=X+24|0,l=X+8|0,g=X,U=X+308|0,B=X+72|0,c=X+76|0,M=X+68|0,F=X+64|0,O=X+60|0,_=X+56|0,p=g,e[p>>2]=37,e[p+4>>2]=0,p=hr(g+1|0,58899,e[n+4>>2]|0)|0,e[B>>2]=U,t=Ii()|0,p?(e[l>>2]=e[n+8>>2],H[l+8>>3]=o,l=qi(U,30,t,g,l)|0):(H[h>>3]=o,l=qi(U,30,t,g,h)|0);e:do if((l|0)>29){f=0,t=g0(3)|0,l=f,f=0,l=l&1,p?!l&&(f=0,e[C>>2]=e[n+8>>2],H[C+8>>3]=o,a=k0(17,B|0,t|0,g|0,C|0)|0,k=f,f=0,!(k&1))&&(K=12):!l&&(f=0,H[I>>3]=o,k=k0(17,B|0,t|0,g|0,I|0)|0,I=f,f=0,!(I&1))&&(a=k,K=12);do if((K|0)==12){if(t=e[B>>2]|0,t)l=t;else{if(f=0,we(6),k=f,f=0,k&1)break;l=e[B>>2]|0}t=l,g=l,K=16;break e}while(!1);t=b()|0}else t=e[B>>2]|0,g=0,a=l,K=16;while(!1);if((K|0)==16){h=t+a|0,p=it(t,h,n)|0;do if((t|0)==(U|0))t=U,l=0,K=22;else{if(a=xi(a<<3)|0,!a){if(f=0,we(6),K=f,f=0,K&1){l=0,K=20;break}t=e[B>>2]|0}l=a,c=a,K=22}while(!1);do if((K|0)==22)if(f=0,a=u0(68,n|0)|0,B=f,f=0,B&1)K=20;else{if(e[O>>2]=a,f=0,re(4,t|0,p|0,h|0,c|0,M|0,F|0,O|0),O=f,f=0,O&1){t=b()|0,Ee(a)|0;break}if(Ee(a)|0,e[_>>2]=e[r>>2],K=e[M>>2]|0,t=e[F>>2]|0,f=0,e[V>>2]=e[_>>2],t=Fe(40,V|0,c|0,K|0,t|0,n|0,s|0)|0,K=f,f=0,K&1)K=20;else return e[r>>2]=t,l&&Ze(l),g&&Ze(g),y=X,t|0}while(!1);(K|0)==20&&(t=b()|0),l&&Ze(l),g&&Ze(g)}return r0(t|0),0}function tu(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(I=y,y=y+192|0,h=I,t=I+180|0,g=I+160|0,C=I+12|0,c=I+8|0,p=I+4|0,d[t>>0]=d[58901]|0,d[t+1>>0]=d[58902]|0,d[t+2>>0]=d[58903]|0,d[t+3>>0]=d[58904]|0,d[t+4>>0]=d[58905]|0,d[t+5>>0]=d[58906]|0,l=Ii()|0,e[h>>2]=o,t=qi(g,20,l,t,h)|0,o=g+t|0,l=it(g,o,n)|0,a=ai(n)|0,e[c>>2]=a,f=0,c=y0(37,c|0,44212)|0,k=f,f=0,k&1)k=b()|0,Ee(a)|0,r0(k|0);else return Ee(a)|0,F1[e[(e[c>>2]|0)+48>>2]&31](c,g,o,C)|0,k=C+(t<<2)|0,e[p>>2]=e[r>>2],e[h>>2]=e[p>>2],k=zt(h,C,(l|0)==(o|0)?k:C+(l-g<<2)|0,k,n,s)|0,y=I,k|0;return 0}function vt(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0;K=y,y=y+32|0,V=K+16|0,B=K+12|0,F=K+8|0,O=K+4|0,_=K,h=ai(s)|0,e[F>>2]=h,f=0,F=y0(37,F|0,44220)|0,U=f,f=0,U&1&&(K=b()|0,Ee(h)|0,r0(K|0)),Ee(h)|0,e[o>>2]=0,U=F+8|0,h=e[r>>2]|0;e:do if((a|0)!=(c|0)){i:for(;;){p=h,h?(e[h+12>>2]|0)==(e[h+16>>2]|0)&&(Se[e[(e[h>>2]|0)+36>>2]&127](h)|0)==-1&&(e[r>>2]=0,h=0,p=0):h=0,I=(h|0)==0,C=e[n>>2]|0,g=C;do if(C){if((e[C+12>>2]|0)==(e[C+16>>2]|0)&&(Se[e[(e[C>>2]|0)+36>>2]&127](C)|0)==-1){e[n>>2]=0,g=0,X=12;break}if(!I){X=13;break i}}else X=12;while(!1);if((X|0)==12)if(X=0,I){X=13;break}else C=0;t:do if((Qe[e[(e[F>>2]|0)+36>>2]&63](F,d[a>>0]|0,0)|0)<<24>>24==37){if(C=a+1|0,(C|0)==(c|0)){X=17;break i}switch(k=Qe[e[(e[F>>2]|0)+36>>2]&63](F,d[C>>0]|0,0)|0,k<<24>>24){case 48:case 69:{if(I=a+2|0,(I|0)==(c|0)){X=20;break i}a=C,C=Qe[e[(e[F>>2]|0)+36>>2]&63](F,d[I>>0]|0,0)|0,h=k;break}default:C=k,h=0}k=e[(e[t>>2]|0)+36>>2]|0,e[O>>2]=p,e[_>>2]=g,e[B>>2]=e[O>>2],e[V>>2]=e[_>>2],k=Ct[k&15](t,B,V,s,o,l,C,h)|0,e[r>>2]=k,a=a+2|0}else{if(p=d[a>>0]|0,p<<24>>24>-1&&(M=e[U>>2]|0,(E[M+(p<<24>>24<<1)>>1]&8192)!=0)){do{if(a=a+1|0,(a|0)==(c|0)){a=c;break}if(p=d[a>>0]|0,p<<24>>24<=-1)break}while(E[M+(p<<24>>24<<1)>>1]&8192);for(p=C;;){h?(e[h+12>>2]|0)==(e[h+16>>2]|0)&&(Se[e[(e[h>>2]|0)+36>>2]&127](h)|0)==-1&&(e[r>>2]=0,h=0):h=0,g=(h|0)==0;do if(C){if((e[C+12>>2]|0)!=(e[C+16>>2]|0))if(g){k=p;break}else break t;if((Se[e[(e[C>>2]|0)+36>>2]&127](C)|0)!=-1)if(g^(p|0)==0){k=p,C=p;break}else break t;else{e[n>>2]=0,p=0,X=39;break}}else X=39;while(!1);if((X|0)==39){if(X=0,g)break t;k=p,C=0}if(g=h+12|0,p=e[g>>2]|0,I=h+16|0,(p|0)==(e[I>>2]|0)?p=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:p=N[p>>0]|0,(p&255)<<24>>24<=-1||!(E[(e[U>>2]|0)+(p<<24>>24<<1)>>1]&8192))break t;if(p=e[g>>2]|0,(p|0)==(e[I>>2]|0)){Se[e[(e[h>>2]|0)+40>>2]&127](h)|0,p=k;continue}else{e[g>>2]=p+1,p=k;continue}}}if(g=h+12|0,p=e[g>>2]|0,C=h+16|0,(p|0)==(e[C>>2]|0)?p=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:p=N[p>>0]|0,k=Ni[e[(e[F>>2]|0)+12>>2]&63](F,p&255)|0,k<<24>>24!=(Ni[e[(e[F>>2]|0)+12>>2]&63](F,d[a>>0]|0)|0)<<24>>24){X=57;break i}p=e[g>>2]|0,(p|0)==(e[C>>2]|0)?Se[e[(e[h>>2]|0)+40>>2]&127](h)|0:e[g>>2]=p+1,a=a+1|0}while(!1);if(h=e[r>>2]|0,!((a|0)!=(c|0)&(e[o>>2]|0)==0))break e}if((X|0)==13){e[o>>2]=4;break}else if((X|0)==17){e[o>>2]=4;break}else if((X|0)==20){e[o>>2]=4;break}else if((X|0)==57){e[o>>2]=4,h=e[r>>2]|0;break}}while(!1);h?(e[h+12>>2]|0)==(e[h+16>>2]|0)&&(Se[e[(e[h>>2]|0)+36>>2]&127](h)|0)==-1&&(e[r>>2]=0,h=0):h=0,a=(h|0)==0,p=e[n>>2]|0;do if(p){if((e[p+12>>2]|0)==(e[p+16>>2]|0)&&(Se[e[(e[p>>2]|0)+36>>2]&127](p)|0)==-1){e[n>>2]=0,X=67;break}a||(X=68)}else X=67;while(!1);return(X|0)==67&&a&&(X=68),(X|0)==68&&(e[o>>2]=e[o>>2]|2),y=K,h|0}function ru(t){t=t|0}function nu(t){t=t|0,a0(t)}function su(t){return t=t|0,2}function ou(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=vt(t,h,c,s,o,l,58907,58915)|0,y=a,t|0}function lu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,C=t+8|0,C=Se[e[(e[C>>2]|0)+20>>2]&127](C)|0,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],n=d[C>>0]|0,I=(n&1)==0,r=I?C+1|0:e[C+8>>2]|0,n=r+(I?(n&255)>>>1:e[C+4>>2]|0)|0,e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=vt(t,h,c,s,o,l,r,n)|0,y=a,t|0}function au(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;if(p=y,y=y+16|0,c=p+8|0,a=p+4|0,h=p,s=ai(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44220)|0,g=f,f=0,g&1)g=b()|0,Ee(s)|0,r0(g|0);else return Ee(s)|0,e[h>>2]=e[n>>2],e[c>>2]=e[h>>2],v2(t,l+24|0,r,c,o,a),y=p,e[r>>2]|0;return 0}function v2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0;a=y,y=y+16|0,c=a+4|0,h=a,t=t+8|0,t=Se[e[e[t>>2]>>2]&127](t)|0,e[h>>2]=e[s>>2],e[c>>2]=e[h>>2],n=(mr(n,c,t,t+168|0,l,o,0)|0)-t|0,(n|0)<168&&(e[r>>2]=((n|0)/12|0|0)%7|0),y=a}function fu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;if(p=y,y=y+16|0,c=p+8|0,a=p+4|0,h=p,s=ai(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44220)|0,g=f,f=0,g&1)g=b()|0,Ee(s)|0,r0(g|0);else return Ee(s)|0,e[h>>2]=e[n>>2],e[c>>2]=e[h>>2],w2(t,l+16|0,r,c,o,a),y=p,e[r>>2]|0;return 0}function w2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0;a=y,y=y+16|0,c=a+4|0,h=a,t=t+8|0,t=Se[e[(e[t>>2]|0)+4>>2]&127](t)|0,e[h>>2]=e[s>>2],e[c>>2]=e[h>>2],n=(mr(n,c,t,t+288|0,l,o,0)|0)-t|0,(n|0)<288&&(e[r>>2]=((n|0)/12|0|0)%12|0),y=a}function uu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;if(p=y,y=y+16|0,c=p+8|0,a=p+4|0,h=p,s=ai(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44220)|0,g=f,f=0,g&1)g=b()|0,Ee(s)|0,r0(g|0);else return Ee(s)|0,e[h>>2]=e[n>>2],e[c>>2]=e[h>>2],T2(t,l+20|0,r,c,o,a),y=p,e[r>>2]|0;return 0}function T2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,4)|0,e[o>>2]&4||((t|0)<69?t=t+2e3|0:t=(t+-69|0)>>>0<31?t+1900|0:t,e[r>>2]=t+-1900),y=a}function cu(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,ei=0,We=0,_e=0,le=0,Ve=0,ne=0,fe=0,vi=0,Ti=0,mi=0,_0=0,he=0,Pe=0;_0=y,y=y+144|0,h=_0+132|0,c=_0+116|0,le=_0+128|0,F=_0+124|0,ze=_0+120|0,Ve=_0+112|0,ne=_0+108|0,fe=_0+104|0,vi=_0+100|0,Ti=_0+96|0,mi=_0+92|0,p=_0+88|0,g=_0+84|0,C=_0+80|0,I=_0+76|0,k=_0+72|0,U=_0+68|0,B=_0+64|0,V=_0+60|0,O=_0+56|0,_=_0+52|0,M=_0+48|0,X=_0+44|0,K=_0+40|0,t0=_0+36|0,Z=_0+32|0,s0=_0+28|0,w0=_0+24|0,v0=_0+20|0,A0=_0+16|0,Y0=_0+12|0,Re=_0+8|0,ei=_0+4|0,We=_0,e[o>>2]=0,_e=ai(s)|0,e[le>>2]=_e,f=0,le=y0(37,le|0,44220)|0,Pe=f,f=0,Pe&1&&(Pe=b()|0,Ee(_e)|0,r0(Pe|0)),Ee(_e)|0;do switch(a<<24>>24|0){case 65:case 97:{e[F>>2]=e[n>>2],e[h>>2]=e[F>>2],v2(t,l+24|0,r,h,o,le),he=28;break}case 104:case 66:case 98:{e[ze>>2]=e[n>>2],e[h>>2]=e[ze>>2],w2(t,l+16|0,r,h,o,le),he=28;break}case 99:{he=t+8|0,he=Se[e[(e[he>>2]|0)+12>>2]&127](he)|0,e[Ve>>2]=e[r>>2],e[ne>>2]=e[n>>2],a=d[he>>0]|0,n=(a&1)==0,Pe=n?he+1|0:e[he+8>>2]|0,he=Pe+(n?(a&255)>>>1:e[he+4>>2]|0)|0,e[c>>2]=e[Ve>>2],e[h>>2]=e[ne>>2],he=vt(t,c,h,s,o,l,Pe,he)|0,e[r>>2]=he,he=28;break}case 101:case 100:{e[fe>>2]=e[n>>2],e[h>>2]=e[fe>>2],hu(t,l+12|0,r,h,o,le),he=28;break}case 68:{e[vi>>2]=e[r>>2],e[Ti>>2]=e[n>>2],e[c>>2]=e[vi>>2],e[h>>2]=e[Ti>>2],he=vt(t,c,h,s,o,l,58915,58923)|0,e[r>>2]=he,he=28;break}case 70:{e[mi>>2]=e[r>>2],e[p>>2]=e[n>>2],e[c>>2]=e[mi>>2],e[h>>2]=e[p>>2],he=vt(t,c,h,s,o,l,58923,58931)|0,e[r>>2]=he,he=28;break}case 72:{e[g>>2]=e[n>>2],e[h>>2]=e[g>>2],mu(t,l+8|0,r,h,o,le),he=28;break}case 73:{e[C>>2]=e[n>>2],e[h>>2]=e[C>>2],du(t,l+8|0,r,h,o,le),he=28;break}case 106:{e[I>>2]=e[n>>2],e[h>>2]=e[I>>2],gu(t,l+28|0,r,h,o,le),he=28;break}case 109:{e[k>>2]=e[n>>2],e[h>>2]=e[k>>2],pu(t,l+16|0,r,h,o,le),he=28;break}case 77:{e[U>>2]=e[n>>2],e[h>>2]=e[U>>2],Au(t,l+4|0,r,h,o,le),he=28;break}case 116:case 110:{e[B>>2]=e[n>>2],e[h>>2]=e[B>>2],Su(t,r,h,o,le),he=28;break}case 112:{e[V>>2]=e[n>>2],e[h>>2]=e[V>>2],vu(t,l+8|0,r,h,o,le),he=28;break}case 114:{e[O>>2]=e[r>>2],e[_>>2]=e[n>>2],e[c>>2]=e[O>>2],e[h>>2]=e[_>>2],he=vt(t,c,h,s,o,l,58931,58942)|0,e[r>>2]=he,he=28;break}case 82:{e[M>>2]=e[r>>2],e[X>>2]=e[n>>2],e[c>>2]=e[M>>2],e[h>>2]=e[X>>2],he=vt(t,c,h,s,o,l,58942,58947)|0,e[r>>2]=he,he=28;break}case 83:{e[K>>2]=e[n>>2],e[h>>2]=e[K>>2],wu(t,l,r,h,o,le),he=28;break}case 84:{e[t0>>2]=e[r>>2],e[Z>>2]=e[n>>2],e[c>>2]=e[t0>>2],e[h>>2]=e[Z>>2],he=vt(t,c,h,s,o,l,58947,58955)|0,e[r>>2]=he,he=28;break}case 119:{e[s0>>2]=e[n>>2],e[h>>2]=e[s0>>2],Tu(t,l+24|0,r,h,o,le),he=28;break}case 120:{Pe=e[(e[t>>2]|0)+20>>2]|0,e[w0>>2]=e[r>>2],e[v0>>2]=e[n>>2],e[c>>2]=e[w0>>2],e[h>>2]=e[v0>>2],c=rr[Pe&63](t,c,h,s,o,l)|0;break}case 88:{he=t+8|0,he=Se[e[(e[he>>2]|0)+24>>2]&127](he)|0,e[A0>>2]=e[r>>2],e[Y0>>2]=e[n>>2],a=d[he>>0]|0,n=(a&1)==0,Pe=n?he+1|0:e[he+8>>2]|0,he=Pe+(n?(a&255)>>>1:e[he+4>>2]|0)|0,e[c>>2]=e[A0>>2],e[h>>2]=e[Y0>>2],he=vt(t,c,h,s,o,l,Pe,he)|0,e[r>>2]=he,he=28;break}case 121:{e[Re>>2]=e[n>>2],e[h>>2]=e[Re>>2],T2(t,l+20|0,r,h,o,le),he=28;break}case 89:{e[ei>>2]=e[n>>2],e[h>>2]=e[ei>>2],Cu(t,l+20|0,r,h,o,le),he=28;break}case 37:{e[We>>2]=e[n>>2],e[h>>2]=e[We>>2],xu(t,r,h,o,le),he=28;break}default:e[o>>2]=e[o>>2]|4,he=28}while(!1);return(he|0)==28&&(c=e[r>>2]|0),y=_0,c|0}function hu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t+-1|0)>>>0<31&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function mu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<24&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function du(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t+-1|0)>>>0<12&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function gu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,3)|0,n=e[o>>2]|0,(t|0)<366&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function pu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<13&(n&4|0)==0?e[r>>2]=t+-1:e[o>>2]=n|4,y=a}function Au(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<60&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Su(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0;a=o+8|0;e:for(;;){o=e[r>>2]|0;do if(o){if((e[o+12>>2]|0)==(e[o+16>>2]|0))if((Se[e[(e[o>>2]|0)+36>>2]&127](o)|0)==-1){e[r>>2]=0,o=0;break}else{o=e[r>>2]|0;break}}else o=0;while(!1);o=(o|0)==0,t=e[n>>2]|0;do if(t){if((e[t+12>>2]|0)!=(e[t+16>>2]|0)){if(o)break;break e}if((Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)!=-1){if(o)break;break e}else{e[n>>2]=0,c=12;break}}else c=12;while(!1);if((c|0)==12)if(c=0,o){t=0;break}else t=0;if(o=e[r>>2]|0,l=e[o+12>>2]|0,(l|0)==(e[o+16>>2]|0)?o=Se[e[(e[o>>2]|0)+36>>2]&127](o)|0:o=N[l>>0]|0,(o&255)<<24>>24<=-1||!(E[(e[a>>2]|0)+(o<<24>>24<<1)>>1]&8192))break;if(o=e[r>>2]|0,t=o+12|0,l=e[t>>2]|0,(l|0)==(e[o+16>>2]|0)){Se[e[(e[o>>2]|0)+40>>2]&127](o)|0;continue}else{e[t>>2]=l+1;continue}}o=e[r>>2]|0;do if(o){if((e[o+12>>2]|0)==(e[o+16>>2]|0))if((Se[e[(e[o>>2]|0)+36>>2]&127](o)|0)==-1){e[r>>2]=0,o=0;break}else{o=e[r>>2]|0;break}}else o=0;while(!1);o=(o|0)==0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)&&(Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1){e[n>>2]=0,c=32;break}o||(c=33)}else c=32;while(!1);(c|0)==32&&o&&(c=33),(c|0)==33&&(e[s>>2]=e[s>>2]|2)}function vu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;g=y,y=y+16|0,c=g+4|0,h=g,p=t+8|0,p=Se[e[(e[p>>2]|0)+8>>2]&127](p)|0,t=d[p>>0]|0,t&1?a=e[p+4>>2]|0:a=(t&255)>>>1,t=d[p+12>>0]|0,t&1?t=e[p+16>>2]|0:t=(t&255)>>>1;do if((a|0)!=(0-t|0)){if(e[h>>2]=e[s>>2],e[c>>2]=e[h>>2],t=mr(n,c,p,p+24|0,l,o,0)|0,a=e[r>>2]|0,(t|0)==(p|0)&(a|0)==12){e[r>>2]=0;break}(a|0)<12&(t-p|0)==12&&(e[r>>2]=a+12)}else e[o>>2]=e[o>>2]|4;while(!1);y=g}function wu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<61&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Tu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,1)|0,n=e[o>>2]|0,(t|0)<7&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Cu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,4)|0,e[o>>2]&4||(e[r>>2]=t+-1900),y=a}function xu(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0;t=e[r>>2]|0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0))if((Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1){e[r>>2]=0,t=0;break}else{t=e[r>>2]|0;break}}else t=0;while(!1);l=(t|0)==0,t=e[n>>2]|0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)&&(Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1){e[n>>2]=0,c=11;break}l?(a=t,c=13):c=12}else c=11;while(!1);(c|0)==11&&(l?c=12:(a=0,c=13));e:do if((c|0)==12)e[s>>2]=e[s>>2]|6;else if((c|0)==13){if(t=e[r>>2]|0,l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=N[l>>0]|0,(Qe[e[(e[o>>2]|0)+36>>2]&63](o,t&255,0)|0)<<24>>24!=37){e[s>>2]=e[s>>2]|4;break}t=e[r>>2]|0,l=t+12|0,o=e[l>>2]|0,(o|0)==(e[t+16>>2]|0)?(Se[e[(e[t>>2]|0)+40>>2]&127](t)|0,t=e[r>>2]|0,t?c=21:t=0):(e[l>>2]=o+1,c=21);do if((c|0)==21&&(e[t+12>>2]|0)==(e[t+16>>2]|0))if((Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1){e[r>>2]=0,t=0;break}else{t=e[r>>2]|0;break}while(!1);t=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)&&(Se[e[(e[a>>2]|0)+36>>2]&127](a)|0)==-1){e[n>>2]=0,c=30;break}if(t)break e}else c=30;while(!1);if((c|0)==30&&!t)break;e[s>>2]=e[s>>2]|2}while(!1)}function wt(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;M=y,y=y+32|0,B=M+16|0,U=M+12|0,_=M+8|0,V=M+4|0,O=M,h=ai(s)|0,e[_>>2]=h,f=0,_=y0(37,_|0,44212)|0,k=f,f=0,k&1&&(M=b()|0,Ee(h)|0,r0(M|0)),Ee(h)|0,e[o>>2]=0,h=e[r>>2]|0;e:do if((a|0)!=(c|0)){i:for(;;){g=h,h?(p=e[h+12>>2]|0,(p|0)==(e[h+16>>2]|0)?p=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:p=e[p>>2]|0,(p|0)==-1?(e[r>>2]=0,h=0,I=1,k=0):(I=0,k=g)):(h=0,I=1,k=g),C=e[n>>2]|0,p=C;do if(C)if(g=e[C+12>>2]|0,(g|0)==(e[C+16>>2]|0)?g=Se[e[(e[C>>2]|0)+36>>2]&127](C)|0:g=e[g>>2]|0,(g|0)!=-1){if(I)break;F=17;break i}else{e[n>>2]=0,p=0,F=15;break}else F=15;while(!1);if((F|0)==15)if(F=0,I){F=17;break}else C=0;t:do if((Qe[e[(e[_>>2]|0)+52>>2]&63](_,e[a>>2]|0,0)|0)<<24>>24==37){if(g=a+4|0,(g|0)==(c|0)){F=21;break i}switch(I=Qe[e[(e[_>>2]|0)+52>>2]&63](_,e[g>>2]|0,0)|0,I<<24>>24){case 48:case 69:{if(C=a+8|0,(C|0)==(c|0)){F=24;break i}a=g,g=Qe[e[(e[_>>2]|0)+52>>2]&63](_,e[C>>2]|0,0)|0,h=I;break}default:g=I,h=0}I=e[(e[t>>2]|0)+36>>2]|0,e[V>>2]=k,e[O>>2]=p,e[U>>2]=e[V>>2],e[B>>2]=e[O>>2],k=Ct[I&15](t,U,B,s,o,l,g,h)|0,e[r>>2]=k,a=a+8|0}else{if(!(Qe[e[(e[_>>2]|0)+12>>2]&63](_,8192,e[a>>2]|0)|0)){if(g=h+12|0,p=e[g>>2]|0,C=h+16|0,(p|0)==(e[C>>2]|0)?p=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:p=e[p>>2]|0,k=Ni[e[(e[_>>2]|0)+28>>2]&63](_,p)|0,(k|0)!=(Ni[e[(e[_>>2]|0)+28>>2]&63](_,e[a>>2]|0)|0)){F=61;break i}p=e[g>>2]|0,(p|0)==(e[C>>2]|0)?Se[e[(e[h>>2]|0)+40>>2]&127](h)|0:e[g>>2]=p+4,a=a+4|0;break}do if(a=a+4|0,(a|0)==(c|0)){a=c;break}while(Qe[e[(e[_>>2]|0)+12>>2]&63](_,8192,e[a>>2]|0)|0);for(p=C,I=C;;){h?(g=e[h+12>>2]|0,(g|0)==(e[h+16>>2]|0)?g=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:g=e[g>>2]|0,(g|0)==-1?(e[r>>2]=0,C=1,h=0):C=0):(C=1,h=0);do if(I)if(g=e[I+12>>2]|0,(g|0)==(e[I+16>>2]|0)?g=Se[e[(e[I>>2]|0)+36>>2]&127](I)|0:g=e[g>>2]|0,(g|0)!=-1)if(C^(p|0)==0){k=p,I=p;break}else break t;else{e[n>>2]=0,p=0,F=44;break}else F=44;while(!1);if((F|0)==44){if(F=0,C)break t;k=p,I=0}if(g=h+12|0,p=e[g>>2]|0,C=h+16|0,(p|0)==(e[C>>2]|0)?p=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:p=e[p>>2]|0,!(Qe[e[(e[_>>2]|0)+12>>2]&63](_,8192,p)|0))break t;if(p=e[g>>2]|0,(p|0)==(e[C>>2]|0)){Se[e[(e[h>>2]|0)+40>>2]&127](h)|0,p=k;continue}else{e[g>>2]=p+4,p=k;continue}}}while(!1);if(h=e[r>>2]|0,!((a|0)!=(c|0)&(e[o>>2]|0)==0))break e}if((F|0)==17){e[o>>2]=4;break}else if((F|0)==21){e[o>>2]=4;break}else if((F|0)==24){e[o>>2]=4;break}else if((F|0)==61){e[o>>2]=4,h=e[r>>2]|0;break}}while(!1);h?(a=e[h+12>>2]|0,(a|0)==(e[h+16>>2]|0)?a=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:a=e[a>>2]|0,(a|0)==-1?(e[r>>2]=0,h=0,g=1):g=0):(h=0,g=1),a=e[n>>2]|0;do if(a)if(p=e[a+12>>2]|0,(p|0)==(e[a+16>>2]|0)?a=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:a=e[p>>2]|0,(a|0)!=-1){if(g)break;F=76;break}else{e[n>>2]=0,F=74;break}else F=74;while(!1);return(F|0)==74&&g&&(F=76),(F|0)==76&&(e[o>>2]=e[o>>2]|2),y=M,h|0}function yu(t){t=t|0}function Iu(t){t=t|0,a0(t)}function Du(t){return t=t|0,2}function Eu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=wt(t,h,c,s,o,l,44788,44820)|0,y=a,t|0}function ku(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,k=t+8|0,k=Se[e[(e[k>>2]|0)+20>>2]&127](k)|0,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],C=d[k>>0]|0,I=(C&1)==0,n=k+4|0,r=I?n:e[k+8>>2]|0,n=r+((I?(C&255)>>>1:e[n>>2]|0)<<2)|0,e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=wt(t,h,c,s,o,l,r,n)|0,y=a,t|0}function Fu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;if(p=y,y=y+16|0,c=p+8|0,a=p+4|0,h=p,s=ai(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44212)|0,g=f,f=0,g&1)g=b()|0,Ee(s)|0,r0(g|0);else return Ee(s)|0,e[h>>2]=e[n>>2],e[c>>2]=e[h>>2],C2(t,l+24|0,r,c,o,a),y=p,e[r>>2]|0;return 0}function C2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0;a=y,y=y+16|0,c=a+4|0,h=a,t=t+8|0,t=Se[e[e[t>>2]>>2]&127](t)|0,e[h>>2]=e[s>>2],e[c>>2]=e[h>>2],n=(dr(n,c,t,t+168|0,l,o,0)|0)-t|0,(n|0)<168&&(e[r>>2]=((n|0)/12|0|0)%7|0),y=a}function Mu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;if(p=y,y=y+16|0,c=p+8|0,a=p+4|0,h=p,s=ai(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44212)|0,g=f,f=0,g&1)g=b()|0,Ee(s)|0,r0(g|0);else return Ee(s)|0,e[h>>2]=e[n>>2],e[c>>2]=e[h>>2],x2(t,l+16|0,r,c,o,a),y=p,e[r>>2]|0;return 0}function x2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0;a=y,y=y+16|0,c=a+4|0,h=a,t=t+8|0,t=Se[e[(e[t>>2]|0)+4>>2]&127](t)|0,e[h>>2]=e[s>>2],e[c>>2]=e[h>>2],n=(dr(n,c,t,t+288|0,l,o,0)|0)-t|0,(n|0)<288&&(e[r>>2]=((n|0)/12|0|0)%12|0),y=a}function _u(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;if(p=y,y=y+16|0,c=p+8|0,a=p+4|0,h=p,s=ai(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44212)|0,g=f,f=0,g&1)g=b()|0,Ee(s)|0,r0(g|0);else return Ee(s)|0,e[h>>2]=e[n>>2],e[c>>2]=e[h>>2],y2(t,l+20|0,r,c,o,a),y=p,e[r>>2]|0;return 0}function y2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,4)|0,e[o>>2]&4||((t|0)<69?t=t+2e3|0:t=(t+-69|0)>>>0<31?t+1900|0:t,e[r>>2]=t+-1900),y=a}function Ru(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,ei=0,We=0,_e=0,le=0,Ve=0,ne=0,fe=0,vi=0,Ti=0,mi=0,_0=0,he=0,Pe=0;_0=y,y=y+144|0,h=_0+132|0,c=_0+116|0,le=_0+128|0,F=_0+124|0,ze=_0+120|0,Ve=_0+112|0,ne=_0+108|0,fe=_0+104|0,vi=_0+100|0,Ti=_0+96|0,mi=_0+92|0,p=_0+88|0,g=_0+84|0,C=_0+80|0,I=_0+76|0,k=_0+72|0,U=_0+68|0,B=_0+64|0,V=_0+60|0,O=_0+56|0,_=_0+52|0,M=_0+48|0,X=_0+44|0,K=_0+40|0,t0=_0+36|0,Z=_0+32|0,s0=_0+28|0,w0=_0+24|0,v0=_0+20|0,A0=_0+16|0,Y0=_0+12|0,Re=_0+8|0,ei=_0+4|0,We=_0,e[o>>2]=0,_e=ai(s)|0,e[le>>2]=_e,f=0,le=y0(37,le|0,44212)|0,Pe=f,f=0,Pe&1&&(Pe=b()|0,Ee(_e)|0,r0(Pe|0)),Ee(_e)|0;do switch(a<<24>>24|0){case 65:case 97:{e[F>>2]=e[n>>2],e[h>>2]=e[F>>2],C2(t,l+24|0,r,h,o,le),he=28;break}case 104:case 66:case 98:{e[ze>>2]=e[n>>2],e[h>>2]=e[ze>>2],x2(t,l+16|0,r,h,o,le),he=28;break}case 99:{Pe=t+8|0,Pe=Se[e[(e[Pe>>2]|0)+12>>2]&127](Pe)|0,e[Ve>>2]=e[r>>2],e[ne>>2]=e[n>>2],a=d[Pe>>0]|0,n=(a&1)==0,he=Pe+4|0,Pe=n?he:e[Pe+8>>2]|0,he=Pe+((n?(a&255)>>>1:e[he>>2]|0)<<2)|0,e[c>>2]=e[Ve>>2],e[h>>2]=e[ne>>2],he=wt(t,c,h,s,o,l,Pe,he)|0,e[r>>2]=he,he=28;break}case 101:case 100:{e[fe>>2]=e[n>>2],e[h>>2]=e[fe>>2],Pu(t,l+12|0,r,h,o,le),he=28;break}case 68:{e[vi>>2]=e[r>>2],e[Ti>>2]=e[n>>2],e[c>>2]=e[vi>>2],e[h>>2]=e[Ti>>2],he=wt(t,c,h,s,o,l,44820,44852)|0,e[r>>2]=he,he=28;break}case 70:{e[mi>>2]=e[r>>2],e[p>>2]=e[n>>2],e[c>>2]=e[mi>>2],e[h>>2]=e[p>>2],he=wt(t,c,h,s,o,l,44852,44884)|0,e[r>>2]=he,he=28;break}case 72:{e[g>>2]=e[n>>2],e[h>>2]=e[g>>2],Lu(t,l+8|0,r,h,o,le),he=28;break}case 73:{e[C>>2]=e[n>>2],e[h>>2]=e[C>>2],Uu(t,l+8|0,r,h,o,le),he=28;break}case 106:{e[I>>2]=e[n>>2],e[h>>2]=e[I>>2],Ou(t,l+28|0,r,h,o,le),he=28;break}case 109:{e[k>>2]=e[n>>2],e[h>>2]=e[k>>2],Nu(t,l+16|0,r,h,o,le),he=28;break}case 77:{e[U>>2]=e[n>>2],e[h>>2]=e[U>>2],Bu(t,l+4|0,r,h,o,le),he=28;break}case 116:case 110:{e[B>>2]=e[n>>2],e[h>>2]=e[B>>2],Vu(t,r,h,o,le),he=28;break}case 112:{e[V>>2]=e[n>>2],e[h>>2]=e[V>>2],qu(t,l+8|0,r,h,o,le),he=28;break}case 114:{e[O>>2]=e[r>>2],e[_>>2]=e[n>>2],e[c>>2]=e[O>>2],e[h>>2]=e[_>>2],he=wt(t,c,h,s,o,l,44884,44928)|0,e[r>>2]=he,he=28;break}case 82:{e[M>>2]=e[r>>2],e[X>>2]=e[n>>2],e[c>>2]=e[M>>2],e[h>>2]=e[X>>2],he=wt(t,c,h,s,o,l,44928,44948)|0,e[r>>2]=he,he=28;break}case 83:{e[K>>2]=e[n>>2],e[h>>2]=e[K>>2],bu(t,l,r,h,o,le),he=28;break}case 84:{e[t0>>2]=e[r>>2],e[Z>>2]=e[n>>2],e[c>>2]=e[t0>>2],e[h>>2]=e[Z>>2],he=wt(t,c,h,s,o,l,44948,44980)|0,e[r>>2]=he,he=28;break}case 119:{e[s0>>2]=e[n>>2],e[h>>2]=e[s0>>2],Gu(t,l+24|0,r,h,o,le),he=28;break}case 120:{Pe=e[(e[t>>2]|0)+20>>2]|0,e[w0>>2]=e[r>>2],e[v0>>2]=e[n>>2],e[c>>2]=e[w0>>2],e[h>>2]=e[v0>>2],c=rr[Pe&63](t,c,h,s,o,l)|0;break}case 88:{Pe=t+8|0,Pe=Se[e[(e[Pe>>2]|0)+24>>2]&127](Pe)|0,e[A0>>2]=e[r>>2],e[Y0>>2]=e[n>>2],a=d[Pe>>0]|0,n=(a&1)==0,he=Pe+4|0,Pe=n?he:e[Pe+8>>2]|0,he=Pe+((n?(a&255)>>>1:e[he>>2]|0)<<2)|0,e[c>>2]=e[A0>>2],e[h>>2]=e[Y0>>2],he=wt(t,c,h,s,o,l,Pe,he)|0,e[r>>2]=he,he=28;break}case 121:{e[Re>>2]=e[n>>2],e[h>>2]=e[Re>>2],y2(t,l+20|0,r,h,o,le),he=28;break}case 89:{e[ei>>2]=e[n>>2],e[h>>2]=e[ei>>2],Qu(t,l+20|0,r,h,o,le),he=28;break}case 37:{e[We>>2]=e[n>>2],e[h>>2]=e[We>>2],zu(t,r,h,o,le),he=28;break}default:e[o>>2]=e[o>>2]|4,he=28}while(!1);return(he|0)==28&&(c=e[r>>2]|0),y=_0,c|0}function Pu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t+-1|0)>>>0<31&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Lu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<24&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Uu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t+-1|0)>>>0<12&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Ou(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,3)|0,n=e[o>>2]|0,(t|0)<366&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Nu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<13&(n&4|0)==0?e[r>>2]=t+-1:e[o>>2]=n|4,y=a}function Bu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<60&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Vu(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0;e:for(;;){t=e[r>>2]|0;do if(t)if(l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,(t|0)==-1){e[r>>2]=0,a=1;break}else{a=(e[r>>2]|0)==0;break}else a=1;while(!1);l=e[n>>2]|0;do if(l)if(t=e[l+12>>2]|0,(t|0)==(e[l+16>>2]|0)?t=Se[e[(e[l>>2]|0)+36>>2]&127](l)|0:t=e[t>>2]|0,(t|0)!=-1)if(a){a=l;break}else{a=l;break e}else{e[n>>2]=0,c=15;break}else c=15;while(!1);if((c|0)==15)if(c=0,a){a=0;break}else a=0;if(t=e[r>>2]|0,l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,!(Qe[e[(e[o>>2]|0)+12>>2]&63](o,8192,t)|0))break;if(t=e[r>>2]|0,l=t+12|0,a=e[l>>2]|0,(a|0)==(e[t+16>>2]|0)){Se[e[(e[t>>2]|0)+40>>2]&127](t)|0;continue}else{e[l>>2]=a+4;continue}}t=e[r>>2]|0;do if(t)if(l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,(t|0)==-1){e[r>>2]=0,l=1;break}else{l=(e[r>>2]|0)==0;break}else l=1;while(!1);do if(a)if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)?t=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:t=e[t>>2]|0,(t|0)!=-1){if(l)break;c=39;break}else{e[n>>2]=0,c=37;break}else c=37;while(!1);(c|0)==37&&l&&(c=39),(c|0)==39&&(e[s>>2]=e[s>>2]|2)}function qu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;g=y,y=y+16|0,c=g+4|0,h=g,p=t+8|0,p=Se[e[(e[p>>2]|0)+8>>2]&127](p)|0,t=d[p>>0]|0,t&1?a=e[p+4>>2]|0:a=(t&255)>>>1,t=d[p+12>>0]|0,t&1?t=e[p+16>>2]|0:t=(t&255)>>>1;do if((a|0)!=(0-t|0)){if(e[h>>2]=e[s>>2],e[c>>2]=e[h>>2],t=dr(n,c,p,p+24|0,l,o,0)|0,a=e[r>>2]|0,(t|0)==(p|0)&(a|0)==12){e[r>>2]=0;break}(a|0)<12&(t-p|0)==12&&(e[r>>2]=a+12)}else e[o>>2]=e[o>>2]|4;while(!1);y=g}function bu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<61&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Gu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,1)|0,n=e[o>>2]|0,(t|0)<7&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Qu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,4)|0,e[o>>2]&4||(e[r>>2]=t+-1900),y=a}function zu(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0;t=e[r>>2]|0;do if(t)if(l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,(t|0)==-1){e[r>>2]=0,a=1;break}else{a=(e[r>>2]|0)==0;break}else a=1;while(!1);l=e[n>>2]|0;do if(l)if(t=e[l+12>>2]|0,(t|0)==(e[l+16>>2]|0)?t=Se[e[(e[l>>2]|0)+36>>2]&127](l)|0:t=e[t>>2]|0,(t|0)!=-1)if(a){c=l,h=17;break}else{h=16;break}else{e[n>>2]=0,h=14;break}else h=14;while(!1);(h|0)==14&&(a?h=16:(c=0,h=17));e:do if((h|0)==16)e[s>>2]=e[s>>2]|6;else if((h|0)==17){if(t=e[r>>2]|0,l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,(Qe[e[(e[o>>2]|0)+52>>2]&63](o,t,0)|0)<<24>>24!=37){e[s>>2]=e[s>>2]|4;break}t=e[r>>2]|0,l=t+12|0,a=e[l>>2]|0,(a|0)==(e[t+16>>2]|0)?(Se[e[(e[t>>2]|0)+40>>2]&127](t)|0,t=e[r>>2]|0,t?h=25:l=1):(e[l>>2]=a+4,h=25);do if((h|0)==25)if(l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,(t|0)==-1){e[r>>2]=0,l=1;break}else{l=(e[r>>2]|0)==0;break}while(!1);do if(c)if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)?t=Se[e[(e[c>>2]|0)+36>>2]&127](c)|0:t=e[t>>2]|0,(t|0)!=-1){if(l)break e;break}else{e[n>>2]=0,h=37;break}else h=37;while(!1);if((h|0)==37&&!l)break;e[s>>2]=e[s>>2]|2}while(!1)}function Hu(t){t=t|0,or(t+8|0)}function or(t){t=t|0;var r=0,n=0,s=0;r=e[t>>2]|0,f=0,n=g0(3)|0,s=f,f=0;do if(!(s&1)){if((r|0)!=(n|0)&&(f=0,n0(188,e[t>>2]|0),s=f,f=0,s&1))break;return}while(!1);s=b(0)|0,Ie(s)}function Yu(t){t=t|0,or(t+8|0),a0(t)}function ju(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0;if(h=y,y=y+112|0,c=h+4|0,n=h,e[n>>2]=c+100,I2(t+8|0,c,n,o,l,a),o=e[n>>2]|0,n=e[r>>2]|0,(c|0)!=(o|0))do{a=d[c>>0]|0;do if(n)if(s=n+24|0,l=e[s>>2]|0,(l|0)==(e[n+28>>2]|0)){r=(Ni[e[(e[n>>2]|0)+52>>2]&63](n,a&255)|0)==-1,n=r?0:n;break}else{e[s>>2]=l+1,d[l>>0]=a;break}else n=0;while(!1);c=c+1|0}while((c|0)!=(o|0));return y=h,n|0}function I2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0;p=y,y=y+16|0,h=p,d[h>>0]=37,a=h+1|0,d[a>>0]=o,c=h+2|0,d[c>>0]=l,d[h+3>>0]=0,l<<24>>24&&(d[a>>0]=l,d[c>>0]=o),t=r+(Vn(r|0,(e[n>>2]|0)-r|0,h|0,s|0,e[t>>2]|0)|0)|0,e[n>>2]=t,y=p}function Xu(t){t=t|0,or(t+8|0)}function Ku(t){t=t|0,or(t+8|0),a0(t)}function Wu(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0;if(c=y,y=y+416|0,s=c+8|0,n=c,e[n>>2]=s+400,Zu(t+8|0,s,n,o,l,a),t=e[n>>2]|0,n=e[r>>2]|0,(s|0)!=(t|0)){o=s;do s=e[o>>2]|0,n?(l=n+24|0,a=e[l>>2]|0,(a|0)==(e[n+28>>2]|0)?s=Ni[e[(e[n>>2]|0)+52>>2]&63](n,s)|0:(e[l>>2]=a+4,e[a>>2]=s),n=(s|0)==-1?0:n):n=0,o=o+4|0;while((o|0)!=(t|0))}return y=c,n|0}function Zu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;if(a=y,y=y+128|0,p=a+16|0,g=a+12|0,c=a,h=a+8|0,e[g>>2]=p+100,I2(t,p,g,s,o,l),o=c,e[o>>2]=0,e[o+4>>2]=0,e[h>>2]=p,o=(e[n>>2]|0)-r>>2,l=nt(e[t>>2]|0)|0,f=0,o=k0(18,r|0,h|0,o|0,c|0)|0,t=f,f=0,t&1&&(o=b()|0,l|0&&(f=0,u0(75,l|0)|0,g=f,f=0,g&1)&&(g=b(0)|0,Ie(g)),r0(o|0)),l|0&&(f=0,u0(75,l|0)|0,g=f,f=0,g&1)&&(g=b(0)|0,Ie(g)),(o|0)==-1)lr(58955);else{e[n>>2]=r+(o<<2),y=a;return}}function Ju(t){t=t|0}function $u(t){t=t|0,a0(t)}function e4(t){return t=t|0,127}function i4(t){return t=t|0,127}function t4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function r4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function n4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function s4(t,r){t=t|0,r=r|0,a1(t,1,45)}function o4(t){return t=t|0,0}function l4(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function a4(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function f4(t){t=t|0}function u4(t){t=t|0,a0(t)}function c4(t){return t=t|0,127}function h4(t){return t=t|0,127}function m4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function d4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function g4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function p4(t,r){t=t|0,r=r|0,a1(t,1,45)}function A4(t){return t=t|0,0}function S4(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function w4(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function T4(t){t=t|0}function C4(t){t=t|0,a0(t)}function x4(t){return t=t|0,2147483647}function y4(t){return t=t|0,2147483647}function I4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function D4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function E4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function k4(t,r){t=t|0,r=r|0,c1(t,1,45)}function F4(t){return t=t|0,0}function M4(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function _4(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function R4(t){t=t|0}function P4(t){t=t|0,a0(t)}function L4(t){return t=t|0,2147483647}function U4(t){return t=t|0,2147483647}function O4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function N4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function B4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function V4(t,r){t=t|0,r=r|0,c1(t,1,45)}function q4(t){return t=t|0,0}function G4(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function Q4(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function z4(t){t=t|0}function H4(t){t=t|0,a0(t)}function Y4(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;if(t0=y,y=y+240|0,X=t0+24|0,K=t0,t=t0+136|0,s0=t0+16|0,M=t0+12|0,Z=t0+8|0,C=t0+134|0,h=t0+4|0,F=t0+124|0,e[s0>>2]=t,w0=s0+4|0,e[w0>>2]=189,p=t+100|0,f=0,c=u0(68,o|0)|0,_=f,f=0,_&1)h=b()|0,e[s0>>2]=0,c=189,A0=45;else{e[Z>>2]=c,f=0,t=y0(37,Z|0,44220)|0,_=f,f=0;e:do if(!(_&1)&&(d[C>>0]=0,e[h>>2]=e[n>>2],g=e[o+4>>2]|0,f=0,e[X>>2]=e[h>>2],g=Me(1,r|0,X|0,s|0,Z|0,g|0,l|0,C|0,t|0,s0|0,M|0,p|0)|0,_=f,f=0,!(_&1))){i:do if(g){if(f=0,k0(e[(e[t>>2]|0)+32>>2]|0,t|0,58976,58986,F|0)|0,_=f,f=0,_&1){A0=10;break e}h=e[M>>2]|0,p=e[s0>>2]|0,t=h-p|0,(t|0)>98?(t=xi(t+2|0)|0,c=t,t?A0=13:(f=0,we(6),_=f,f=0,_&1||(t=0,A0=13))):(c=0,t=X,A0=13);do if((A0|0)==13){if(d[C>>0]|0&&(d[t>>0]=45,t=t+1|0),O=F+10|0,_=F,p>>>0>>0){g=F+1|0,s=g+1|0,o=s+1|0,C=o+1|0,I=C+1|0,k=I+1|0,U=k+1|0,B=U+1|0,V=B+1|0;do{h=d[p>>0]|0;do if((d[F>>0]|0)!=h<<24>>24)if((d[g>>0]|0)!=h<<24>>24)if((d[s>>0]|0)!=h<<24>>24)if((d[o>>0]|0)!=h<<24>>24)if((d[C>>0]|0)==h<<24>>24)h=C;else{if((d[I>>0]|0)==h<<24>>24){h=I;break}if((d[k>>0]|0)==h<<24>>24){h=k;break}if((d[U>>0]|0)==h<<24>>24){h=U;break}if((d[B>>0]|0)==h<<24>>24){h=B;break}h=(d[V>>0]|0)==h<<24>>24?V:O}else h=o;else h=s;else h=g;else h=F;while(!1);d[t>>0]=d[58976+(h-_)>>0]|0,p=p+1|0,t=t+1|0}while(p>>>0<(e[M>>2]|0)>>>0)}if(d[t>>0]=0,e[K>>2]=a,(Mn(X,58987,K)|0)!=1&&(f=0,n0(190,58991),a=f,f=0,a&1))break;c&&Ze(c);break i}while(!1);if(t=b()|0,!c){h=t,c=s0;break e}Ze(c),h=t,c=s0;break e}while(!1);t=e[r>>2]|0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1){A0=10;break e}if((t|0)==-1){e[r>>2]=0,t=0;break}else{t=e[r>>2]|0;break}}}else t=0;while(!1);c=(t|0)==0,t=e[n>>2]|0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1){A0=10;break e}if((t|0)==-1){e[n>>2]=0,A0=37;break}}c||(A0=38)}else A0=37;while(!1);return(A0|0)==37&&c&&(A0=38),(A0|0)==38&&(e[l>>2]=e[l>>2]|2),c=e[r>>2]|0,Ee(e[Z>>2]|0)|0,t=e[s0>>2]|0,e[s0>>2]=0,t|0&&(f=0,n0(e[w0>>2]|0,t|0),A0=f,f=0,A0&1)&&(A0=b(0)|0,Ie(A0)),y=t0,c|0}else A0=10;while(!1);(A0|0)==10&&(h=b()|0,c=s0),Ee(e[Z>>2]|0)|0,t=e[c>>2]|0,e[c>>2]=0,t?(c=e[w0>>2]|0,A0=45):v0=h}return(A0|0)==45&&(f=0,n0(c|0,t|0),A0=f,f=0,A0&1?(A0=b(0)|0,Ie(A0)):v0=h),r0(v0|0),0}function j4(t){t=t|0}function X4(t,r,n,s,o,l,a,c,h,p,g){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0;var C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,ei=0,We=0,_e=0,le=0,Ve=0,ne=0,fe=0,vi=0,Ti=0,mi=0,_0=0,he=0,Pe=0,li=0,ti=0,fi=0,yi=0,gi=0,xt=0,Ei=0;gi=y,y=y+512|0,le=gi+88|0,U=gi+96|0,Ei=gi+80|0,vi=gi+72|0,fe=gi+68|0,Ti=gi+500|0,Ve=gi+497|0,mi=gi+496|0,Pe=gi+56|0,yi=gi+44|0,ti=gi+32|0,li=gi+20|0,fi=gi+8|0,ne=gi+4|0,he=gi,e[le>>2]=g,e[Ei>>2]=U,xt=Ei+4|0,e[xt>>2]=189,e[vi>>2]=U,e[fe>>2]=U+400,e[Pe>>2]=0,e[Pe+4>>2]=0,e[Pe+8>>2]=0,e[yi>>2]=0,e[yi+4>>2]=0,e[yi+8>>2]=0,e[ti>>2]=0,e[ti+4>>2]=0,e[ti+8>>2]=0,e[li>>2]=0,e[li+4>>2]=0,e[li+8>>2]=0,e[fi>>2]=0,e[fi+4>>2]=0,e[fi+8>>2]=0,f=0,Ci(1,n|0,s|0,Ti|0,Ve|0,mi|0,Pe|0,yi|0,ti|0,li|0,ne|0),_e=f,f=0;e:do if(_e&1)c=b()|0;else{e[p>>2]=e[h>>2],A0=c+8|0,Y0=ti+4|0,ze=li+4|0,Re=li+8|0,ei=li+1|0,We=ti+8|0,_e=ti+1|0,F=(o&512|0)!=0,M=yi+8|0,X=yi+1|0,K=yi+4|0,t0=fi+4|0,Z=fi+8|0,s0=fi+1|0,w0=Ti+3|0,v0=Pe+4|0,_=0,k=0;i:for(;;){g=e[t>>2]|0;do if(g){if((e[g+12>>2]|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,O=f,f=0,O&1){_0=24;break i}if((g|0)==-1){e[t>>2]=0,g=0;break}else{g=e[t>>2]|0;break}}}else g=0;while(!1);g=(g|0)==0,c=e[r>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0))if(g){O=c;break}else{_0=235;break i}if(f=0,n=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=24;break i}if((n|0)!=-1)if(g){O=c;break}else{_0=235;break i}else{e[r>>2]=0,_0=15;break}}else _0=15;while(!1);if((_0|0)==15)if(_0=0,g){_0=235;break}else O=0;t:do switch(d[Ti+_>>0]|0){case 1:{if((_|0)!=3){if(g=e[t>>2]|0,c=e[g+12>>2]|0,(c|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,_0=f,f=0,_0&1){_0=24;break i}}else g=N[c>>0]|0;if((g&255)<<24>>24<=-1){_0=40;break i}if(!(E[(e[A0>>2]|0)+(g<<24>>24<<1)>>1]&8192)){_0=40;break i}if(g=e[t>>2]|0,c=g+12|0,n=e[c>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,_0=f,f=0,_0&1){_0=24;break i}}else e[c>>2]=n+1,g=N[n>>0]|0;if(f=0,h0(67,fi|0,g&255|0),_0=f,f=0,_0&1){_0=24;break i}else g=O,s=O,_0=42}break}case 0:{(_|0)!=3&&(g=O,s=O,_0=42);break}case 3:{if(c=d[ti>>0]|0,g=c&1?e[Y0>>2]|0:(c&255)>>>1,n=d[li>>0]|0,s=n&1?e[ze>>2]|0:(n&255)>>>1,(g|0)!=(0-s|0)){if(!g){if(g=e[t>>2]|0,c=e[g+12>>2]|0,(c|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,O=f,f=0,O&1){_0=24;break i}c=d[li>>0]|0}else g=N[c>>0]|0,c=n;if((g&255)<<24>>24!=(d[(c&1?e[Re>>2]|0:ei)>>0]|0))break t;if(g=e[t>>2]|0,c=g+12|0,n=e[c>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,O=f,f=0,O&1){_0=24;break i}}else e[c>>2]=n+1;d[a>>0]=1,O=d[li>>0]|0,k=(O&1?e[ze>>2]|0:(O&255)>>>1)>>>0>1?li:k;break t}if(o=e[t>>2]|0,C=e[o+12>>2]|0,n=e[o+16>>2]|0,g=(C|0)==(n|0),!s){if(g){if(f=0,g=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,O=f,f=0,O&1){_0=24;break i}c=d[ti>>0]|0}else g=N[C>>0]|0;if((g&255)<<24>>24!=(d[(c&1?e[We>>2]|0:_e)>>0]|0)){d[a>>0]=1;break t}if(g=e[t>>2]|0,c=g+12|0,n=e[c>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,O=f,f=0,O&1){_0=24;break i}}else e[c>>2]=n+1;O=d[ti>>0]|0,k=(O&1?e[Y0>>2]|0:(O&255)>>>1)>>>0>1?ti:k;break t}if(g){if(f=0,g=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,O=f,f=0,O&1){_0=24;break i}n=e[t>>2]|0,c=d[ti>>0]|0,o=n,C=e[n+12>>2]|0,n=e[n+16>>2]|0}else g=N[C>>0]|0;if(s=o+12|0,n=(C|0)==(n|0),(g&255)<<24>>24==(d[(c&1?e[We>>2]|0:_e)>>0]|0)){if(n){if(f=0,u0(e[(e[o>>2]|0)+40>>2]|0,o|0)|0,O=f,f=0,O&1){_0=24;break i}}else e[s>>2]=C+1;O=d[ti>>0]|0,k=(O&1?e[Y0>>2]|0:(O&255)>>>1)>>>0>1?ti:k;break t}if(n){if(f=0,g=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,O=f,f=0,O&1){_0=24;break i}}else g=N[C>>0]|0;if((g&255)<<24>>24!=(d[(d[li>>0]&1?e[Re>>2]|0:ei)>>0]|0)){_0=104;break i}if(g=e[t>>2]|0,c=g+12|0,n=e[c>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,O=f,f=0,O&1){_0=24;break i}}else e[c>>2]=n+1;d[a>>0]=1,O=d[li>>0]|0,k=(O&1?e[ze>>2]|0:(O&255)>>>1)>>>0>1?li:k}break}case 2:{if(!(_>>>0<2|(k|0)!=0)&&!(F|(_|0)==2&(d[w0>>0]|0)!=0)){k=0;break t}B=d[yi>>0]|0,g=(B&1)==0,V=e[M>>2]|0,n=g?X:V,I=n;r:do if(_|0&&(N[Ti+(_+-1)>>0]|0)<2){C=g?(B&255)>>>1:e[K>>2]|0,s=n+C|0,o=e[A0>>2]|0;n:do if(!C)c=I;else{C=n,c=I;do{if(g=d[C>>0]|0,g<<24>>24<=-1||!(E[o+(g<<24>>24<<1)>>1]&8192))break n;C=C+1|0,c=C}while((C|0)!=(s|0))}while(!1);if(s=c-I|0,o=d[fi>>0]|0,g=(o&1)==0,o=g?(o&255)>>>1:e[t0>>2]|0,o>>>0>=s>>>0){if(g=g?s0:e[Z>>2]|0,C=g+o|0,(c|0)!=(I|0))for(g=g+(o-s)|0;;){if((d[g>>0]|0)!=(d[n>>0]|0)){c=I;break r}if(g=g+1|0,(g|0)==(C|0))break;n=n+1|0}}else c=I}else c=I;while(!1);g=(B&1)==0,g=(g?X:V)+(g?(B&255)>>>1:e[K>>2]|0)|0;r:do if((c|0)!=(g|0))for(o=O,s=O,g=c;;){c=e[t>>2]|0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,c=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=21;break i}if((c|0)==-1){e[t>>2]=0,c=0;break}else{c=e[t>>2]|0;break}}}else c=0;while(!1);n=(c|0)==0;do if(s){if((e[s+12>>2]|0)!=(e[s+16>>2]|0))if(n){c=o,C=s;break}else break r;if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,O=f,f=0,O&1){_0=21;break i}if((c|0)!=-1)if(n^(o|0)==0){c=o,C=o;break}else break r;else{e[r>>2]=0,c=0,_0=131;break}}else c=o,_0=131;while(!1);if((_0|0)==131){if(_0=0,n)break r;C=0}if(n=e[t>>2]|0,s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,O=f,f=0,O&1){_0=21;break i}}else n=N[s>>0]|0;if((n&255)<<24>>24!=(d[g>>0]|0))break r;if(n=e[t>>2]|0,s=n+12|0,o=e[s>>2]|0,(o|0)==(e[n+16>>2]|0)){if(f=0,u0(e[(e[n>>2]|0)+40>>2]|0,n|0)|0,O=f,f=0,O&1){_0=21;break i}}else e[s>>2]=o+1;if(g=g+1|0,n=d[yi>>0]|0,O=(n&1)==0,n=(O?X:e[M>>2]|0)+(O?(n&255)>>>1:e[K>>2]|0)|0,(g|0)==(n|0)){g=n;break}else o=c,s=C}while(!1);if(F&&(O=d[yi>>0]|0,V=(O&1)==0,(g|0)!=((V?X:e[M>>2]|0)+(V?(O&255)>>>1:e[K>>2]|0)|0))){_0=143;break i}break}case 4:{I=d[mi>>0]|0,c=O,o=O,g=0;r:for(;;){n=e[t>>2]|0;do if(n){if((e[n+12>>2]|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,O=f,f=0,O&1){_0=23;break i}if((n|0)==-1){e[t>>2]=0,n=0;break}else{n=e[t>>2]|0;break}}}else n=0;while(!1);s=(n|0)==0;do if(o){if((e[o+12>>2]|0)!=(e[o+16>>2]|0))if(s){C=c;break}else{s=c;break r}if(f=0,n=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,O=f,f=0,O&1){_0=23;break i}if((n|0)!=-1)if(s^(c|0)==0){C=c,o=c;break}else{s=c;break r}else{e[r>>2]=0,c=0,_0=156;break}}else _0=156;while(!1);if((_0|0)==156)if(_0=0,s){s=c;break}else C=c,o=0;if(c=e[t>>2]|0,n=e[c+12>>2]|0,(n|0)==(e[c+16>>2]|0)){if(f=0,c=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=23;break i}}else c=N[n>>0]|0;if(n=c&255,n<<24>>24>-1&&E[(e[A0>>2]|0)+(c<<24>>24<<1)>>1]&2048){if(c=e[p>>2]|0,(c|0)==(e[le>>2]|0)){if(f=0,m0(12,h|0,p|0,le|0),O=f,f=0,O&1){_0=23;break i}c=e[p>>2]|0}e[p>>2]=c+1,d[c>>0]=n,g=g+1|0}else{if(O=d[Pe>>0]|0,!(n<<24>>24==I<<24>>24&(g|0?((O&1?e[v0>>2]|0:(O&255)>>>1)|0)!=0:0))){s=C;break}if((U|0)==(e[fe>>2]|0)){if(f=0,m0(13,Ei|0,vi|0,fe|0),O=f,f=0,O&1){_0=23;break i}U=e[vi>>2]|0}O=U+4|0,e[vi>>2]=O,e[U>>2]=g,U=O,g=0}if(c=e[t>>2]|0,n=c+12|0,s=e[n>>2]|0,(s|0)==(e[c+16>>2]|0))if(f=0,u0(e[(e[c>>2]|0)+40>>2]|0,c|0)|0,O=f,f=0,O&1){_0=23;break i}else{c=C;continue}else{e[n>>2]=s+1,c=C;continue}}if(g|0&&(e[Ei>>2]|0)!=(U|0)){if((U|0)==(e[fe>>2]|0)){if(f=0,m0(13,Ei|0,vi|0,fe|0),O=f,f=0,O&1){_0=24;break i}U=e[vi>>2]|0}O=U+4|0,e[vi>>2]=O,e[U>>2]=g,U=O}if(C=e[ne>>2]|0,(C|0)>0){g=e[t>>2]|0;do if(g){if((e[g+12>>2]|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,O=f,f=0,O&1){_0=24;break i}if((g|0)==-1){e[t>>2]=0,g=0;break}else{g=e[t>>2]|0;break}}}else g=0;while(!1);g=(g|0)==0;do if(s){if((e[s+12>>2]|0)==(e[s+16>>2]|0)){if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,O=f,f=0,O&1){_0=24;break i}if((c|0)==-1){e[r>>2]=0,_0=193;break}}if(!g){_0=198;break i}}else _0=193;while(!1);if((_0|0)==193)if(_0=0,g){_0=198;break i}else s=0;if(g=e[t>>2]|0,c=e[g+12>>2]|0,(c|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,O=f,f=0,O&1){_0=24;break i}}else g=N[c>>0]|0;if((g&255)<<24>>24!=(d[Ve>>0]|0)){_0=198;break i}if(g=e[t>>2]|0,c=g+12|0,n=e[c>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,O=f,f=0,O&1){_0=24;break i}}else e[c>>2]=n+1;if((C|0)>0)for(o=s,n=s,I=C;;){g=e[t>>2]|0;do if(g){if((e[g+12>>2]|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,O=f,f=0,O&1){_0=22;break i}if((g|0)==-1){e[t>>2]=0,g=0;break}else{g=e[t>>2]|0;break}}}else g=0;while(!1);c=(g|0)==0;do if(n){if((e[n+12>>2]|0)!=(e[n+16>>2]|0))if(c){g=o,C=n;break}else{_0=222;break i}if(f=0,g=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,O=f,f=0,O&1){_0=22;break i}if((g|0)!=-1)if(c^(o|0)==0){g=o,C=o;break}else{_0=222;break i}else{e[r>>2]=0,g=0,_0=215;break}}else g=o,_0=215;while(!1);if((_0|0)==215)if(_0=0,c){_0=222;break i}else C=0;if(c=e[t>>2]|0,n=e[c+12>>2]|0,(n|0)==(e[c+16>>2]|0)){if(f=0,c=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=22;break i}}else c=N[n>>0]|0;if((c&255)<<24>>24<=-1){_0=222;break i}if(!(E[(e[A0>>2]|0)+(c<<24>>24<<1)>>1]&2048)){_0=222;break i}if((e[p>>2]|0)==(e[le>>2]|0)&&(f=0,m0(12,h|0,p|0,le|0),O=f,f=0,O&1)){_0=22;break i}if(c=e[t>>2]|0,n=e[c+12>>2]|0,(n|0)==(e[c+16>>2]|0)){if(f=0,c=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=22;break i}}else c=N[n>>0]|0;if(n=e[p>>2]|0,e[p>>2]=n+1,d[n>>0]=c,c=I,I=I+-1|0,e[ne>>2]=I,n=e[t>>2]|0,s=n+12|0,o=e[s>>2]|0,(o|0)==(e[n+16>>2]|0)){if(f=0,u0(e[(e[n>>2]|0)+40>>2]|0,n|0)|0,O=f,f=0,O&1){_0=22;break i}}else e[s>>2]=o+1;if((c|0)<=1)break;o=g,n=C}}if((e[p>>2]|0)==(e[h>>2]|0)){_0=233;break i}break}default:}while(!1);t:do if((_0|0)==42)for(;;){_0=0,c=e[t>>2]|0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,c=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=20;break i}if((c|0)==-1){e[t>>2]=0,c=0;break}else{c=e[t>>2]|0;break}}}else c=0;while(!1);n=(c|0)==0;do if(s){if((e[s+12>>2]|0)!=(e[s+16>>2]|0))if(n){o=g;break}else break t;if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,O=f,f=0,O&1){_0=20;break i}if((c|0)!=-1)if(n^(g|0)==0){o=g,s=g;break}else break t;else{e[r>>2]=0,g=0,_0=54;break}}else _0=54;while(!1);if((_0|0)==54){if(_0=0,n)break t;o=g,s=0}if(g=e[t>>2]|0,c=e[g+12>>2]|0,(c|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,O=f,f=0,O&1){_0=20;break i}}else g=N[c>>0]|0;if((g&255)<<24>>24<=-1||!(E[(e[A0>>2]|0)+(g<<24>>24<<1)>>1]&8192))break t;if(g=e[t>>2]|0,c=g+12|0,n=e[c>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,_0=f,f=0,_0&1){_0=20;break i}}else e[c>>2]=n+1,g=N[n>>0]|0;if(f=0,h0(67,fi|0,g&255|0),_0=f,f=0,_0&1){_0=20;break i}else g=o,_0=42}while(!1);if(_=_+1|0,_>>>0>=4){_0=235;break}}i:switch(_0|0){case 20:{c=b()|0;break e}case 21:{c=b()|0;break e}case 22:{c=b()|0;break e}case 23:{c=b()|0;break e}case 24:{c=b()|0;break e}case 40:{e[l>>2]=e[l>>2]|4,c=0;break}case 104:{e[l>>2]=e[l>>2]|4,c=0;break}case 143:{e[l>>2]=e[l>>2]|4,c=0;break}case 198:{e[l>>2]=e[l>>2]|4,c=0;break}case 222:{e[l>>2]=e[l>>2]|4,c=0;break}case 233:{e[l>>2]=e[l>>2]|4,c=0;break}case 235:{t:do if(k){o=k+1|0,C=k+8|0,I=k+4|0,n=1;r:for(;;){if(g=d[k>>0]|0,g&1?g=e[I>>2]|0:g=(g&255)>>>1,n>>>0>=g>>>0)break t;g=e[t>>2]|0;do if(g){if((e[g+12>>2]|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,p=f,f=0,p&1){_0=19;break r}if((g|0)==-1){e[t>>2]=0,g=0;break}else{g=e[t>>2]|0;break}}}else g=0;while(!1);c=(g|0)==0,g=e[r>>2]|0;do if(g){if((e[g+12>>2]|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,p=f,f=0,p&1){_0=19;break r}if((g|0)==-1){e[r>>2]=0,_0=253;break}}if(!c){_0=260;break r}}else _0=253;while(!1);if((_0|0)==253&&(_0=0,c)){_0=260;break}if(g=e[t>>2]|0,c=e[g+12>>2]|0,(c|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,p=f,f=0,p&1){_0=19;break}}else g=N[c>>0]|0;if(d[k>>0]&1?c=e[C>>2]|0:c=o,(g&255)<<24>>24!=(d[c+n>>0]|0)){_0=260;break}if(g=n+1|0,c=e[t>>2]|0,n=c+12|0,s=e[n>>2]|0,(s|0)==(e[c+16>>2]|0))if(f=0,u0(e[(e[c>>2]|0)+40>>2]|0,c|0)|0,p=f,f=0,p&1){_0=19;break}else{n=g;continue}else{e[n>>2]=s+1,n=g;continue}}if((_0|0)==19){c=b()|0;break e}else if((_0|0)==260){e[l>>2]=e[l>>2]|4,c=0;break i}}while(!1);g=e[Ei>>2]|0,(g|0)!=(U|0)&&(e[he>>2]=0,Oi(Pe,g,U,he),(e[he>>2]|0)!=0)?(e[l>>2]=e[l>>2]|4,c=0):c=1;break}}return f0(fi),f0(li),f0(ti),f0(yi),f0(Pe),g=e[Ei>>2]|0,e[Ei>>2]=0,g|0&&(f=0,n0(e[xt>>2]|0,g|0),Ei=f,f=0,Ei&1)&&(Ei=b(0)|0,Ie(Ei)),y=gi,c|0}while(!1);return f0(fi),f0(li),f0(ti),f0(yi),f0(Pe),g=e[Ei>>2]|0,e[Ei>>2]=0,g|0&&(f=0,n0(e[xt>>2]|0,g|0),Ei=f,f=0,Ei&1)&&(Ei=b(0)|0,Ie(Ei)),r0(c|0),0}function lr(t){t=t|0;var r=0;r=de(8)|0,f=0,h0(90,r|0,t|0),t=f,f=0,t&1?(t=b()|0,ge(r|0),r0(t|0)):Be(r|0,616,80)}function K4(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0;if(_=y,y=y+144|0,c=_+24|0,t=_+32|0,F=_+16|0,U=_+8|0,C=_+4|0,I=_+28|0,h=_,e[F>>2]=t,K=F+4|0,e[K>>2]=189,p=t+100|0,f=0,O=u0(68,o|0)|0,g=f,f=0,g&1)c=b()|0,e[F>>2]=0,X=36;else{e[C>>2]=O,f=0,g=y0(37,C|0,44220)|0,t=f,f=0;e:do if(!(t&1)&&(d[I>>0]=0,B=e[n>>2]|0,e[h>>2]=B,k=e[o+4>>2]|0,V=B,f=0,e[c>>2]=e[h>>2],k=Me(1,r|0,c|0,s|0,C|0,k|0,l|0,I|0,g|0,F|0,U|0,p|0)|0,o=f,f=0,!(o&1))){if(k){if(d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),d[I>>0]|0&&(f=0,t=y0(e[(e[g>>2]|0)+28>>2]|0,g|0,45)|0,o=f,f=0,o&1||(f=0,h0(67,a|0,t|0),o=f,f=0,o&1))||(f=0,h=y0(e[(e[g>>2]|0)+28>>2]|0,g|0,48)|0,o=f,f=0,o&1))break;t=e[F>>2]|0,p=e[U>>2]|0,c=p+-1|0;i:do if(t>>>0>>0)do{if((d[t>>0]|0)!=h<<24>>24)break i;t=t+1|0}while(t>>>0>>0);while(!1);if(f=0,L0(32,a|0,t|0,p|0)|0,a=f,f=0,a&1)break}t=e[r>>2]|0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1)break e;if((t|0)==-1){e[r>>2]=0,t=0;break}else{t=e[r>>2]|0;break}}}else t=0;while(!1);c=(t|0)==0;do if(B){if((e[V+12>>2]|0)==(e[V+16>>2]|0)){if(f=0,t=u0(e[(e[B>>2]|0)+36>>2]|0,V|0)|0,V=f,f=0,V&1)break e;if((t|0)==-1){e[n>>2]=0,X=29;break}}c||(X=30)}else X=29;while(!1);return(X|0)==29&&c&&(X=30),(X|0)==30&&(e[l>>2]=e[l>>2]|2),c=e[r>>2]|0,Ee(O)|0,t=e[F>>2]|0,e[F>>2]=0,t|0&&(f=0,n0(e[K>>2]|0,t|0),K=f,f=0,K&1)&&(K=b(0)|0,Ie(K)),y=_,c|0}while(!1);c=b()|0,Ee(O)|0,t=e[F>>2]|0,e[F>>2]=0,t?X=36:M=c}return(X|0)==36&&(f=0,n0(e[K>>2]|0,t|0),K=f,f=0,K&1?(K=b(0)|0,Ie(K)):M=c),r0(M|0),0}function W4(t,r,n,s,o,l,a,c,h,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0;var g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0;X=y,y=y+112|0,g=X+100|0,C=X+88|0,I=X+76|0,k=X+64|0,U=X+52|0,B=X+48|0,V=X+36|0,O=X+24|0,_=X+12|0,F=X;do if(t)if(t=Pi(r,43828)|0,Ke[e[(e[t>>2]|0)+44>>2]&127](g,t),F=e[g>>2]|0,d[n>>0]=F,d[n+1>>0]=F>>8,d[n+2>>0]=F>>16,d[n+3>>0]=F>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](C,t),d[h>>0]&1?(d[e[h+8>>2]>>0]=0,e[h+4>>2]=0):(d[h+1>>0]=0,d[h>>0]=0),f=0,h0(91,h|0,0),n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),e[h>>2]=e[C>>2],e[h+4>>2]=e[C+4>>2],e[h+8>>2]=e[C+8>>2],e[C>>2]=0,e[C+4>>2]=0,e[C+8>>2]=0,f0(C),Ke[e[(e[t>>2]|0)+28>>2]&127](I,t),d[c>>0]&1?(d[e[c+8>>2]>>0]=0,e[c+4>>2]=0):(d[c+1>>0]=0,d[c>>0]=0),f=0,h0(91,c|0,0),n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),e[c>>2]=e[I>>2],e[c+4>>2]=e[I+4>>2],e[c+8>>2]=e[I+8>>2],e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f0(I),c=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,d[s>>0]=c,c=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,d[o>>0]=c,Ke[e[(e[t>>2]|0)+20>>2]&127](k,t),d[l>>0]&1?(d[e[l+8>>2]>>0]=0,e[l+4>>2]=0):(d[l+1>>0]=0,d[l>>0]=0),f=0,h0(91,l|0,0),o=f,f=0,o&1&&(o=b(0)|0,Ie(o)),e[l>>2]=e[k>>2],e[l+4>>2]=e[k+4>>2],e[l+8>>2]=e[k+8>>2],e[k>>2]=0,e[k+4>>2]=0,e[k+8>>2]=0,f0(k),Ke[e[(e[t>>2]|0)+24>>2]&127](U,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),o=f,f=0,o&1)o=b(0)|0,Ie(o);else{e[a>>2]=e[U>>2],e[a+4>>2]=e[U+4>>2],e[a+8>>2]=e[U+8>>2],e[U>>2]=0,e[U+4>>2]=0,e[U+8>>2]=0,f0(U),M=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}else if(t=Pi(r,43764)|0,Ke[e[(e[t>>2]|0)+44>>2]&127](B,t),B=e[B>>2]|0,d[n>>0]=B,d[n+1>>0]=B>>8,d[n+2>>0]=B>>16,d[n+3>>0]=B>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](V,t),d[h>>0]&1?(d[e[h+8>>2]>>0]=0,e[h+4>>2]=0):(d[h+1>>0]=0,d[h>>0]=0),f=0,h0(91,h|0,0),n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),e[h>>2]=e[V>>2],e[h+4>>2]=e[V+4>>2],e[h+8>>2]=e[V+8>>2],e[V>>2]=0,e[V+4>>2]=0,e[V+8>>2]=0,f0(V),Ke[e[(e[t>>2]|0)+28>>2]&127](O,t),d[c>>0]&1?(d[e[c+8>>2]>>0]=0,e[c+4>>2]=0):(d[c+1>>0]=0,d[c>>0]=0),f=0,h0(91,c|0,0),n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),e[c>>2]=e[O>>2],e[c+4>>2]=e[O+4>>2],e[c+8>>2]=e[O+8>>2],e[O>>2]=0,e[O+4>>2]=0,e[O+8>>2]=0,f0(O),c=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,d[s>>0]=c,c=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,d[o>>0]=c,Ke[e[(e[t>>2]|0)+20>>2]&127](_,t),d[l>>0]&1?(d[e[l+8>>2]>>0]=0,e[l+4>>2]=0):(d[l+1>>0]=0,d[l>>0]=0),f=0,h0(91,l|0,0),o=f,f=0,o&1&&(o=b(0)|0,Ie(o)),e[l>>2]=e[_>>2],e[l+4>>2]=e[_+4>>2],e[l+8>>2]=e[_+8>>2],e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f0(_),Ke[e[(e[t>>2]|0)+24>>2]&127](F,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),o=f,f=0,o&1)o=b(0)|0,Ie(o);else{e[a>>2]=e[F>>2],e[a+4>>2]=e[F+4>>2],e[a+8>>2]=e[F+8>>2],e[F>>2]=0,e[F+4>>2]=0,e[F+8>>2]=0,f0(F),M=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}while(!1);e[p>>2]=M,y=X}function Oi(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0;o=d[t>>0]|0,a=t+4|0,l=e[a>>2]|0;e:do if((o&1?l:(o&255)>>>1)|0){if((r|0)!=(n|0)){if(o=n+-4|0,o>>>0>r>>>0){l=r;do c=e[l>>2]|0,e[l>>2]=e[o>>2],e[o>>2]=c,l=l+4|0,o=o+-4|0;while(l>>>0>>0)}o=d[t>>0]|0,l=e[a>>2]|0}c=(o&1)==0,a=c?t+1|0:e[t+8>>2]|0,n=n+-4|0,t=a+(c?(o&255)>>>1:l)|0,l=d[a>>0]|0,o=l<<24>>24<1|l<<24>>24==127;i:do if(n>>>0>r>>>0){for(;!(!o&&(l<<24>>24|0)!=(e[r>>2]|0));)if(a=(t-a|0)>1?a+1|0:a,r=r+4|0,l=d[a>>0]|0,o=l<<24>>24<1|l<<24>>24==127,r>>>0>=n>>>0)break i;e[s>>2]=4;break e}while(!1);!o&&((e[n>>2]|0)+-1|0)>>>0>=l<<24>>24>>>0&&(e[s>>2]=4)}while(!1)}function Z4(t){t=t|0}function J4(t){t=t|0,a0(t)}function $4(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;if(t0=y,y=y+576|0,F=t0+424|0,K=t0,t=t0+24|0,s0=t0+16|0,M=t0+12|0,Z=t0+8|0,C=t0+464|0,h=t0+4|0,X=t0+468|0,e[s0>>2]=t,v0=s0+4|0,e[v0>>2]=189,p=t+400|0,f=0,c=u0(68,o|0)|0,_=f,f=0,_&1)h=b()|0,e[s0>>2]=0,c=189,A0=47;else{e[Z>>2]=c,f=0,t=y0(37,Z|0,44212)|0,_=f,f=0;e:do if(!(_&1)&&(d[C>>0]=0,e[h>>2]=e[n>>2],g=e[o+4>>2]|0,f=0,e[F>>2]=e[h>>2],g=Me(2,r|0,F|0,s|0,Z|0,g|0,l|0,C|0,t|0,s0|0,M|0,p|0)|0,_=f,f=0,!(_&1))){i:do if(g){if(f=0,k0(e[(e[t>>2]|0)+48>>2]|0,t|0,59007,59017,F|0)|0,_=f,f=0,_&1){A0=10;break e}h=e[M>>2]|0,p=e[s0>>2]|0,t=h-p|0,(t|0)>392?(t=xi((t>>2)+2|0)|0,c=t,t?A0=13:(f=0,we(6),_=f,f=0,_&1||(t=0,A0=13))):(c=0,t=X,A0=13);do if((A0|0)==13){if(d[C>>0]|0&&(d[t>>0]=45,t=t+1|0),O=F+40|0,_=F,p>>>0>>0){g=F+4|0,s=g+4|0,o=s+4|0,C=o+4|0,I=C+4|0,k=I+4|0,U=k+4|0,B=U+4|0,V=B+4|0;do{h=e[p>>2]|0;do if((e[F>>2]|0)!=(h|0))if((e[g>>2]|0)!=(h|0))if((e[s>>2]|0)!=(h|0))if((e[o>>2]|0)!=(h|0))if((e[C>>2]|0)==(h|0))h=C;else{if((e[I>>2]|0)==(h|0)){h=I;break}if((e[k>>2]|0)==(h|0)){h=k;break}if((e[U>>2]|0)==(h|0)){h=U;break}if((e[B>>2]|0)==(h|0)){h=B;break}h=(e[V>>2]|0)==(h|0)?V:O}else h=o;else h=s;else h=g;else h=F;while(!1);d[t>>0]=d[59007+(h-_>>2)>>0]|0,p=p+4|0,t=t+1|0}while(p>>>0<(e[M>>2]|0)>>>0)}if(d[t>>0]=0,e[K>>2]=a,(Mn(X,58987,K)|0)!=1&&(f=0,n0(190,58991),a=f,f=0,a&1))break;c&&Ze(c);break i}while(!1);if(t=b()|0,!c){h=t,c=s0;break e}Ze(c),h=t,c=s0;break e}while(!1);t=e[r>>2]|0;do if(t){if(c=e[t+12>>2]|0,(c|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1){A0=10;break e}}else t=e[c>>2]|0;if((t|0)==-1){e[r>>2]=0,h=1;break}else{h=(e[r>>2]|0)==0;break}}else h=1;while(!1);t=e[n>>2]|0;do if(t){if(c=e[t+12>>2]|0,(c|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1){A0=10;break e}}else t=e[c>>2]|0;if((t|0)!=-1){if(h)break;A0=40;break}else{e[n>>2]=0,A0=38;break}}else A0=38;while(!1);return(A0|0)==38&&h&&(A0=40),(A0|0)==40&&(e[l>>2]=e[l>>2]|2),c=e[r>>2]|0,Ee(e[Z>>2]|0)|0,t=e[s0>>2]|0,e[s0>>2]=0,t|0&&(f=0,n0(e[v0>>2]|0,t|0),A0=f,f=0,A0&1)&&(A0=b(0)|0,Ie(A0)),y=t0,c|0}else A0=10;while(!1);(A0|0)==10&&(h=b()|0,c=s0),Ee(e[Z>>2]|0)|0,t=e[c>>2]|0,e[c>>2]=0,t?(c=e[v0>>2]|0,A0=47):w0=h}return(A0|0)==47&&(f=0,n0(c|0,t|0),A0=f,f=0,A0&1?(A0=b(0)|0,Ie(A0)):w0=h),r0(w0|0),0}function ic(t,r,n,s,o,l,a,c,h,p,g){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0;var C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,ei=0,We=0,_e=0,le=0,Ve=0,ne=0,fe=0,vi=0,Ti=0,mi=0,_0=0,he=0,Pe=0,li=0,ti=0,fi=0;li=y,y=y+512|0,Re=li+96|0,C=li+104|0,fi=li+88|0,le=li+80|0,_e=li+76|0,Ve=li+504|0,ei=li+72|0,ne=li+68|0,Ti=li+56|0,Pe=li+44|0,_0=li+32|0,mi=li+20|0,he=li+8|0,We=li+4|0,vi=li,e[Re>>2]=g,e[fi>>2]=C,ti=fi+4|0,e[ti>>2]=189,e[le>>2]=C,e[_e>>2]=C+400,e[Ti>>2]=0,e[Ti+4>>2]=0,e[Ti+8>>2]=0,e[Pe>>2]=0,e[Pe+4>>2]=0,e[Pe+8>>2]=0,e[_0>>2]=0,e[_0+4>>2]=0,e[_0+8>>2]=0,e[mi>>2]=0,e[mi+4>>2]=0,e[mi+8>>2]=0,e[he>>2]=0,e[he+4>>2]=0,e[he+8>>2]=0,f=0,Ci(2,n|0,s|0,Ve|0,ei|0,ne|0,Ti|0,Pe|0,_0|0,mi|0,We|0),ze=f,f=0;e:do if(ze&1)n=b()|0;else{e[p>>2]=e[h>>2],v0=_0+4|0,A0=mi+4|0,Y0=mi+8|0,ze=_0+8|0,M=(o&512|0)!=0,X=Pe+8|0,K=Pe+4|0,t0=he+4|0,Z=he+8|0,s0=Ve+3|0,w0=Ti+4|0,F=0,k=0;i:for(;;){g=e[t>>2]|0;do if(g){if(n=e[g+12>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,_=f,f=0,_&1){fe=26;break i}}else g=e[n>>2]|0;if((g|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);n=e[r>>2]|0;do if(n){if(g=e[n+12>>2]|0,(g|0)==(e[n+16>>2]|0)){if(f=0,g=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,_=f,f=0,_&1){fe=26;break i}}else g=e[g>>2]|0;if((g|0)!=-1)if(s){_=n;break}else{U=C,fe=244;break i}else{e[r>>2]=0,fe=16;break}}else fe=16;while(!1);if((fe|0)==16)if(fe=0,s){U=C,fe=244;break}else _=0;t:do switch(d[Ve+F>>0]|0){case 1:{if((F|0)!=3){if(g=e[t>>2]|0,n=e[g+12>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,fe=f,f=0,fe&1){fe=26;break i}}else g=e[n>>2]|0;if(f=0,g=L0(e[(e[c>>2]|0)+12>>2]|0,c|0,8192,g|0)|0,fe=f,f=0,fe&1){fe=26;break i}if(!g){fe=42;break i}if(g=e[t>>2]|0,n=g+12|0,s=e[n>>2]|0,(s|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,fe=f,f=0,fe&1){fe=26;break i}}else e[n>>2]=s+4,g=e[s>>2]|0;if(f=0,h0(92,he|0,g|0),fe=f,f=0,fe&1){fe=26;break i}else g=_,o=_,fe=44}else g=C;break}case 0:{(F|0)==3?g=C:(g=_,o=_,fe=44);break}case 3:{if(n=d[_0>>0]|0,g=n&1?e[v0>>2]|0:(n&255)>>>1,s=d[mi>>0]|0,o=s&1?e[A0>>2]|0:(s&255)>>>1,(g|0)==(0-o|0))g=C;else{if(!g){if(g=e[t>>2]|0,n=e[g+12>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,_=f,f=0,_&1){fe=26;break i}n=d[mi>>0]|0}else g=e[n>>2]|0,n=s;if((g|0)!=(e[(n&1?e[Y0>>2]|0:A0)>>2]|0)){g=C;break t}if(g=e[t>>2]|0,n=g+12|0,s=e[n>>2]|0,(s|0)==(e[g+16>>2]|0)){if(f=0,u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,_=f,f=0,_&1){fe=26;break i}}else e[n>>2]=s+4;d[a>>0]=1,_=d[mi>>0]|0,g=C,k=(_&1?e[A0>>2]|0:(_&255)>>>1)>>>0>1?mi:k;break t}if(I=e[t>>2]|0,U=e[I+12>>2]|0,s=e[I+16>>2]|0,g=(U|0)==(s|0),!o){if(g){if(f=0,g=u0(e[(e[I>>2]|0)+36>>2]|0,I|0)|0,_=f,f=0,_&1){fe=26;break i}n=d[_0>>0]|0}else g=e[U>>2]|0;if((g|0)!=(e[(n&1?e[ze>>2]|0:v0)>>2]|0)){d[a>>0]=1,g=C;break t}if(g=e[t>>2]|0,n=g+12|0,s=e[n>>2]|0,(s|0)==(e[g+16>>2]|0)){if(f=0,u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,_=f,f=0,_&1){fe=26;break i}}else e[n>>2]=s+4;_=d[_0>>0]|0,g=C,k=(_&1?e[v0>>2]|0:(_&255)>>>1)>>>0>1?_0:k;break t}if(g){if(f=0,g=u0(e[(e[I>>2]|0)+36>>2]|0,I|0)|0,_=f,f=0,_&1){fe=26;break i}s=e[t>>2]|0,n=d[_0>>0]|0,I=s,U=e[s+12>>2]|0,s=e[s+16>>2]|0}else g=e[U>>2]|0;if(o=I+12|0,s=(U|0)==(s|0),(g|0)==(e[(n&1?e[ze>>2]|0:v0)>>2]|0)){if(s){if(f=0,u0(e[(e[I>>2]|0)+40>>2]|0,I|0)|0,_=f,f=0,_&1){fe=26;break i}}else e[o>>2]=U+4;_=d[_0>>0]|0,g=C,k=(_&1?e[v0>>2]|0:(_&255)>>>1)>>>0>1?_0:k;break t}if(s){if(f=0,g=u0(e[(e[I>>2]|0)+36>>2]|0,I|0)|0,_=f,f=0,_&1){fe=26;break i}}else g=e[U>>2]|0;if((g|0)!=(e[(d[mi>>0]&1?e[Y0>>2]|0:A0)>>2]|0)){fe=107;break i}if(g=e[t>>2]|0,n=g+12|0,s=e[n>>2]|0,(s|0)==(e[g+16>>2]|0)){if(f=0,u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,_=f,f=0,_&1){fe=26;break i}}else e[n>>2]=s+4;d[a>>0]=1,_=d[mi>>0]|0,g=C,k=(_&1?e[A0>>2]|0:(_&255)>>>1)>>>0>1?mi:k}break}case 2:{if(!(F>>>0<2|(k|0)!=0)&&!(M|(F|0)==2&(d[s0>>0]|0)!=0)){g=C,k=0;break t}o=d[Pe>>0]|0,s=e[X>>2]|0,n=o&1?s:K,g=n;r:do if(F|0&&(N[Ve+(F+-1)>>0]|0)<2){O=(o&1)==0;n:do if((n|0)!=((O?K:s)+((O?(o&255)>>>1:e[K>>2]|0)<<2)|0)){for(o=n;;){if(f=0,n=L0(e[(e[c>>2]|0)+12>>2]|0,c|0,8192,e[o>>2]|0)|0,O=f,f=0,O&1){fe=23;break i}if(!n)break;if(o=o+4|0,g=o,n=d[Pe>>0]|0,s=e[X>>2]|0,O=(n&1)==0,(o|0)==((O?K:s)+((O?(n&255)>>>1:e[K>>2]|0)<<2)|0)){o=n;break n}}o=d[Pe>>0]|0,s=e[X>>2]|0}while(!1);if(U=o&1?s:K,n=U,B=g-n>>2,V=d[he>>0]|0,I=(V&1)==0,V=I?(V&255)>>>1:e[t0>>2]|0,V>>>0>=B>>>0)if(I=I?t0:e[Z>>2]|0,O=I+(V<<2)|0,!B)n=g;else for(I=I+(V-B<<2)|0;;){if((e[I>>2]|0)!=(e[U>>2]|0))break r;if(I=I+4|0,(I|0)==(O|0)){n=g;break}else U=U+4|0}}else n=g;while(!1);g=(o&1)==0,g=(g?K:s)+((g?(o&255)>>>1:e[K>>2]|0)<<2)|0;r:do if((n|0)!=(g|0))for(I=_,o=_,g=n;;){n=e[t>>2]|0;do if(n){if(s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,_=f,f=0,_&1){fe=22;break i}}else n=e[s>>2]|0;if((n|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);do if(o){if(n=e[o+12>>2]|0,(n|0)==(e[o+16>>2]|0)){if(f=0,n=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,_=f,f=0,_&1){fe=22;break i}}else n=e[n>>2]|0;if((n|0)!=-1)if(s^(I|0)==0){n=I,U=I;break}else break r;else{e[r>>2]=0,n=0,fe=136;break}}else n=I,fe=136;while(!1);if((fe|0)==136){if(fe=0,s)break r;U=0}if(s=e[t>>2]|0,o=e[s+12>>2]|0,(o|0)==(e[s+16>>2]|0)){if(f=0,s=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,_=f,f=0,_&1){fe=22;break i}}else s=e[o>>2]|0;if((s|0)!=(e[g>>2]|0))break r;if(s=e[t>>2]|0,o=s+12|0,I=e[o>>2]|0,(I|0)==(e[s+16>>2]|0)){if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,_=f,f=0,_&1){fe=22;break i}}else e[o>>2]=I+4;if(g=g+4|0,s=d[Pe>>0]|0,_=(s&1)==0,s=(_?K:e[X>>2]|0)+((_?(s&255)>>>1:e[K>>2]|0)<<2)|0,(g|0)==(s|0)){g=s;break}else I=n,o=U}while(!1);if(M&&(_=d[Pe>>0]|0,O=(_&1)==0,(g|0)!=((O?K:e[X>>2]|0)+((O?(_&255)>>>1:e[K>>2]|0)<<2)|0))){fe=148;break i}else g=C;break}case 4:{V=e[ne>>2]|0,B=_,I=_,g=C,n=0;r:for(;;){s=e[t>>2]|0;do if(s){if(o=e[s+12>>2]|0,(o|0)==(e[s+16>>2]|0)){if(f=0,s=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,_=f,f=0,_&1){fe=25;break i}}else s=e[o>>2]|0;if((s|0)==-1){e[t>>2]=0,o=1;break}else{o=(e[t>>2]|0)==0;break}}else o=1;while(!1);do if(I){if(s=e[I+12>>2]|0,(s|0)==(e[I+16>>2]|0)){if(f=0,s=u0(e[(e[I>>2]|0)+36>>2]|0,I|0)|0,_=f,f=0,_&1){fe=25;break i}}else s=e[s>>2]|0;if((s|0)!=-1)if(o^(B|0)==0){s=B,U=B;break}else{C=B;break r}else{e[r>>2]=0,s=0,fe=162;break}}else s=B,fe=162;while(!1);if((fe|0)==162)if(fe=0,o){C=s;break}else U=0;if(o=e[t>>2]|0,C=e[o+12>>2]|0,(C|0)==(e[o+16>>2]|0)){if(f=0,o=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,_=f,f=0,_&1){fe=25;break i}}else o=e[C>>2]|0;if(f=0,C=L0(e[(e[c>>2]|0)+12>>2]|0,c|0,2048,o|0)|0,_=f,f=0,_&1){fe=25;break i}if(C){if(C=e[p>>2]|0,(C|0)==(e[Re>>2]|0)){if(f=0,m0(14,h|0,p|0,Re|0),_=f,f=0,_&1){fe=25;break i}C=e[p>>2]|0}e[p>>2]=C+4,e[C>>2]=o,n=n+1|0}else{if(_=d[Ti>>0]|0,!((o|0)==(V|0)&(n|0?((_&1?e[w0>>2]|0:(_&255)>>>1)|0)!=0:0))){C=s;break}if((g|0)==(e[_e>>2]|0)){if(f=0,m0(13,fi|0,le|0,_e|0),_=f,f=0,_&1){fe=25;break i}g=e[le>>2]|0}_=g+4|0,e[le>>2]=_,e[g>>2]=n,g=_,n=0}if(o=e[t>>2]|0,C=o+12|0,I=e[C>>2]|0,(I|0)==(e[o+16>>2]|0))if(f=0,u0(e[(e[o>>2]|0)+40>>2]|0,o|0)|0,_=f,f=0,_&1){fe=25;break i}else{B=s,I=U;continue}else{e[C>>2]=I+4,B=s,I=U;continue}}if(n|0&&(e[fi>>2]|0)!=(g|0)){if((g|0)==(e[_e>>2]|0)){if(f=0,m0(13,fi|0,le|0,_e|0),_=f,f=0,_&1){fe=26;break i}g=e[le>>2]|0}_=g+4|0,e[le>>2]=_,e[g>>2]=n,g=_}if(U=e[We>>2]|0,(U|0)>0){n=e[t>>2]|0;do if(n){if(s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,_=f,f=0,_&1){fe=26;break i}}else n=e[s>>2]|0;if((n|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);do if(C){if(n=e[C+12>>2]|0,(n|0)==(e[C+16>>2]|0)){if(f=0,n=u0(e[(e[C>>2]|0)+36>>2]|0,C|0)|0,_=f,f=0,_&1){fe=26;break i}}else n=e[n>>2]|0;if((n|0)!=-1){if(s)break;fe=206;break i}else{e[r>>2]=0,fe=200;break}}else fe=200;while(!1);if((fe|0)==200)if(fe=0,s){fe=206;break i}else C=0;if(n=e[t>>2]|0,s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,_=f,f=0,_&1){fe=26;break i}}else n=e[s>>2]|0;if((n|0)!=(e[ei>>2]|0)){fe=206;break i}if(n=e[t>>2]|0,s=n+12|0,o=e[s>>2]|0,(o|0)==(e[n+16>>2]|0)){if(f=0,u0(e[(e[n>>2]|0)+40>>2]|0,n|0)|0,_=f,f=0,_&1){fe=26;break i}}else e[s>>2]=o+4;if((U|0)>0)for(I=C,o=C,B=U;;){n=e[t>>2]|0;do if(n){if(s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,_=f,f=0,_&1){fe=24;break i}}else n=e[s>>2]|0;if((n|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);do if(o){if(n=e[o+12>>2]|0,(n|0)==(e[o+16>>2]|0)){if(f=0,n=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,_=f,f=0,_&1){fe=24;break i}}else n=e[n>>2]|0;if((n|0)!=-1)if(s^(I|0)==0){n=I,U=I;break}else{fe=231;break i}else{e[r>>2]=0,n=0,fe=224;break}}else n=I,fe=224;while(!1);if((fe|0)==224)if(fe=0,s){fe=231;break i}else U=0;if(s=e[t>>2]|0,o=e[s+12>>2]|0,(o|0)==(e[s+16>>2]|0)){if(f=0,s=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,_=f,f=0,_&1){fe=24;break i}}else s=e[o>>2]|0;if(f=0,s=L0(e[(e[c>>2]|0)+12>>2]|0,c|0,2048,s|0)|0,_=f,f=0,_&1){fe=24;break i}if(!s){fe=231;break i}if((e[p>>2]|0)==(e[Re>>2]|0)&&(f=0,m0(14,h|0,p|0,Re|0),_=f,f=0,_&1)){fe=24;break i}if(s=e[t>>2]|0,o=e[s+12>>2]|0,(o|0)==(e[s+16>>2]|0)){if(f=0,s=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,_=f,f=0,_&1){fe=24;break i}}else s=e[o>>2]|0;if(o=e[p>>2]|0,e[p>>2]=o+4,e[o>>2]=s,s=B,B=B+-1|0,e[We>>2]=B,o=e[t>>2]|0,C=o+12|0,I=e[C>>2]|0,(I|0)==(e[o+16>>2]|0)){if(f=0,u0(e[(e[o>>2]|0)+40>>2]|0,o|0)|0,_=f,f=0,_&1){fe=24;break i}}else e[C>>2]=I+4;if((s|0)<=1)break;I=n,o=U}}if((e[p>>2]|0)==(e[h>>2]|0)){fe=242;break i}break}default:g=C}while(!1);t:do if((fe|0)==44)for(;;){fe=0,n=e[t>>2]|0;do if(n){if(s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,_=f,f=0,_&1){fe=21;break i}}else n=e[s>>2]|0;if((n|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);do if(o){if(n=e[o+12>>2]|0,(n|0)==(e[o+16>>2]|0)){if(f=0,n=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,_=f,f=0,_&1){fe=21;break i}}else n=e[n>>2]|0;if((n|0)!=-1)if(s^(g|0)==0){I=g,o=g;break}else{g=C;break t}else{e[r>>2]=0,g=0,fe=57;break}}else fe=57;while(!1);if((fe|0)==57)if(fe=0,s){g=C;break t}else I=g,o=0;if(g=e[t>>2]|0,n=e[g+12>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,_=f,f=0,_&1){fe=21;break i}}else g=e[n>>2]|0;if(f=0,g=L0(e[(e[c>>2]|0)+12>>2]|0,c|0,8192,g|0)|0,_=f,f=0,_&1){fe=21;break i}if(!g){g=C;break t}if(g=e[t>>2]|0,n=g+12|0,s=e[n>>2]|0,(s|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,fe=f,f=0,fe&1){fe=21;break i}}else e[n>>2]=s+4,g=e[s>>2]|0;if(f=0,h0(92,he|0,g|0),fe=f,f=0,fe&1){fe=21;break i}else g=I,fe=44}while(!1);if(F=F+1|0,F>>>0>=4){U=g,fe=244;break}else C=g}i:switch(fe|0){case 21:{n=b()|0;break e}case 22:{n=b()|0;break e}case 23:{n=b()|0;break e}case 24:{n=b()|0;break e}case 25:{n=b()|0;break e}case 26:{n=b()|0;break e}case 42:{e[l>>2]=e[l>>2]|4,n=0;break}case 107:{e[l>>2]=e[l>>2]|4,n=0;break}case 148:{e[l>>2]=e[l>>2]|4,n=0;break}case 206:{e[l>>2]=e[l>>2]|4,n=0;break}case 231:{e[l>>2]=e[l>>2]|4,n=0;break}case 242:{e[l>>2]=e[l>>2]|4,n=0;break}case 244:{t:do if(k){C=k+4|0,I=k+8|0,o=1;r:for(;;){if(g=d[k>>0]|0,g&1?g=e[C>>2]|0:g=(g&255)>>>1,o>>>0>=g>>>0)break t;g=e[t>>2]|0;do if(g){if(n=e[g+12>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,p=f,f=0,p&1){fe=20;break r}}else g=e[n>>2]|0;if((g|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);g=e[r>>2]|0;do if(g){if(n=e[g+12>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,p=f,f=0,p&1){fe=20;break r}}else g=e[n>>2]|0;if((g|0)!=-1){if(s)break;fe=271;break r}else{e[r>>2]=0,fe=263;break}}else fe=263;while(!1);if((fe|0)==263&&(fe=0,s)){fe=271;break}if(g=e[t>>2]|0,n=e[g+12>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,p=f,f=0,p&1){fe=20;break}}else g=e[n>>2]|0;if(d[k>>0]&1?n=e[I>>2]|0:n=C,(g|0)!=(e[n+(o<<2)>>2]|0)){fe=271;break}if(g=o+1|0,n=e[t>>2]|0,s=n+12|0,o=e[s>>2]|0,(o|0)==(e[n+16>>2]|0))if(f=0,u0(e[(e[n>>2]|0)+40>>2]|0,n|0)|0,p=f,f=0,p&1){fe=20;break}else{o=g;continue}else{e[s>>2]=o+4,o=g;continue}}if((fe|0)==20){n=b()|0;break e}else if((fe|0)==271){e[l>>2]=e[l>>2]|4,n=0;break i}}while(!1);g=e[fi>>2]|0,(g|0)!=(U|0)&&(e[vi>>2]=0,Oi(Ti,g,U,vi),(e[vi>>2]|0)!=0)?(e[l>>2]=e[l>>2]|4,n=0):n=1;break}}return ye(he),ye(mi),ye(_0),ye(Pe),f0(Ti),g=e[fi>>2]|0,e[fi>>2]=0,g|0&&(f=0,n0(e[ti>>2]|0,g|0),fi=f,f=0,fi&1)&&(fi=b(0)|0,Ie(fi)),y=li,n|0}while(!1);return ye(he),ye(mi),ye(_0),ye(Pe),f0(Ti),g=e[fi>>2]|0,e[fi>>2]=0,g|0&&(f=0,n0(e[ti>>2]|0,g|0),fi=f,f=0,fi&1)&&(fi=b(0)|0,Ie(fi)),r0(n|0),0}function tc(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0;if(_=y,y=y+432|0,c=_+424|0,t=_+24|0,M=_+16|0,U=_+8|0,C=_+4|0,I=_+428|0,h=_,e[M>>2]=t,K=M+4|0,e[K>>2]=189,p=t+400|0,f=0,O=u0(68,o|0)|0,g=f,f=0,g&1)c=b()|0,e[M>>2]=0,X=38;else{e[C>>2]=O,f=0,g=y0(37,C|0,44212)|0,t=f,f=0;e:do if(!(t&1)&&(d[I>>0]=0,B=e[n>>2]|0,e[h>>2]=B,k=e[o+4>>2]|0,V=B,f=0,e[c>>2]=e[h>>2],k=Me(2,r|0,c|0,s|0,C|0,k|0,l|0,I|0,g|0,M|0,U|0,p|0)|0,o=f,f=0,!(o&1))){if(k){if(d[a>>0]&1?e[e[a+8>>2]>>2]=0:d[a>>0]=0,e[a+4>>2]=0,d[I>>0]|0&&(f=0,t=y0(e[(e[g>>2]|0)+44>>2]|0,g|0,45)|0,o=f,f=0,o&1||(f=0,h0(92,a|0,t|0),o=f,f=0,o&1))||(f=0,h=y0(e[(e[g>>2]|0)+44>>2]|0,g|0,48)|0,o=f,f=0,o&1))break;t=e[M>>2]|0,p=e[U>>2]|0,c=p+-4|0;i:do if(t>>>0>>0)do{if((e[t>>2]|0)!=(h|0))break i;t=t+4|0}while(t>>>0>>0);while(!1);if(f=0,L0(33,a|0,t|0,p|0)|0,a=f,f=0,a&1)break}t=e[r>>2]|0;do if(t){if(c=e[t+12>>2]|0,(c|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1)break e}else t=e[c>>2]|0;if((t|0)==-1){e[r>>2]=0,c=1;break}else{c=(e[r>>2]|0)==0;break}}else c=1;while(!1);do if(B){if(t=e[V+12>>2]|0,(t|0)==(e[V+16>>2]|0)){if(f=0,t=u0(e[(e[B>>2]|0)+36>>2]|0,V|0)|0,V=f,f=0,V&1)break e}else t=e[t>>2]|0;if((t|0)!=-1){if(c)break;X=32;break}else{e[n>>2]=0,X=30;break}}else X=30;while(!1);return(X|0)==30&&c&&(X=32),(X|0)==32&&(e[l>>2]=e[l>>2]|2),c=e[r>>2]|0,Ee(O)|0,t=e[M>>2]|0,e[M>>2]=0,t|0&&(f=0,n0(e[K>>2]|0,t|0),K=f,f=0,K&1)&&(K=b(0)|0,Ie(K)),y=_,c|0}while(!1);c=b()|0,Ee(O)|0,t=e[M>>2]|0,e[M>>2]=0,t?X=38:F=c}return(X|0)==38&&(f=0,n0(e[K>>2]|0,t|0),K=f,f=0,K&1?(K=b(0)|0,Ie(K)):F=c),r0(F|0),0}function rc(t,r,n,s,o,l,a,c,h,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0;var g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0;X=y,y=y+112|0,g=X+100|0,C=X+88|0,I=X+76|0,k=X+64|0,U=X+52|0,B=X+48|0,V=X+36|0,O=X+24|0,_=X+12|0,F=X;do if(t)if(t=Pi(r,43956)|0,Ke[e[(e[t>>2]|0)+44>>2]&127](g,t),F=e[g>>2]|0,d[n>>0]=F,d[n+1>>0]=F>>8,d[n+2>>0]=F>>16,d[n+3>>0]=F>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](C,t),d[h>>0]&1?e[e[h+8>>2]>>2]=0:d[h>>0]=0,e[h+4>>2]=0,f=0,h0(93,h|0,0),n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),e[h>>2]=e[C>>2],e[h+4>>2]=e[C+4>>2],e[h+8>>2]=e[C+8>>2],e[C>>2]=0,e[C+4>>2]=0,e[C+8>>2]=0,ye(C),Ke[e[(e[t>>2]|0)+28>>2]&127](I,t),d[c>>0]&1?e[e[c+8>>2]>>2]=0:d[c>>0]=0,e[c+4>>2]=0,f=0,h0(93,c|0,0),n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),e[c>>2]=e[I>>2],e[c+4>>2]=e[I+4>>2],e[c+8>>2]=e[I+8>>2],e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,ye(I),c=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,e[s>>2]=c,c=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,e[o>>2]=c,Ke[e[(e[t>>2]|0)+20>>2]&127](k,t),d[l>>0]&1?(d[e[l+8>>2]>>0]=0,e[l+4>>2]=0):(d[l+1>>0]=0,d[l>>0]=0),f=0,h0(91,l|0,0),o=f,f=0,o&1&&(o=b(0)|0,Ie(o)),e[l>>2]=e[k>>2],e[l+4>>2]=e[k+4>>2],e[l+8>>2]=e[k+8>>2],e[k>>2]=0,e[k+4>>2]=0,e[k+8>>2]=0,f0(k),Ke[e[(e[t>>2]|0)+24>>2]&127](U,t),d[a>>0]&1?e[e[a+8>>2]>>2]=0:d[a>>0]=0,e[a+4>>2]=0,f=0,h0(93,a|0,0),o=f,f=0,o&1)o=b(0)|0,Ie(o);else{e[a>>2]=e[U>>2],e[a+4>>2]=e[U+4>>2],e[a+8>>2]=e[U+8>>2],e[U>>2]=0,e[U+4>>2]=0,e[U+8>>2]=0,ye(U),M=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}else if(t=Pi(r,43892)|0,Ke[e[(e[t>>2]|0)+44>>2]&127](B,t),B=e[B>>2]|0,d[n>>0]=B,d[n+1>>0]=B>>8,d[n+2>>0]=B>>16,d[n+3>>0]=B>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](V,t),d[h>>0]&1?e[e[h+8>>2]>>2]=0:d[h>>0]=0,e[h+4>>2]=0,f=0,h0(93,h|0,0),n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),e[h>>2]=e[V>>2],e[h+4>>2]=e[V+4>>2],e[h+8>>2]=e[V+8>>2],e[V>>2]=0,e[V+4>>2]=0,e[V+8>>2]=0,ye(V),Ke[e[(e[t>>2]|0)+28>>2]&127](O,t),d[c>>0]&1?e[e[c+8>>2]>>2]=0:d[c>>0]=0,e[c+4>>2]=0,f=0,h0(93,c|0,0),n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),e[c>>2]=e[O>>2],e[c+4>>2]=e[O+4>>2],e[c+8>>2]=e[O+8>>2],e[O>>2]=0,e[O+4>>2]=0,e[O+8>>2]=0,ye(O),c=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,e[s>>2]=c,c=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,e[o>>2]=c,Ke[e[(e[t>>2]|0)+20>>2]&127](_,t),d[l>>0]&1?(d[e[l+8>>2]>>0]=0,e[l+4>>2]=0):(d[l+1>>0]=0,d[l>>0]=0),f=0,h0(91,l|0,0),o=f,f=0,o&1&&(o=b(0)|0,Ie(o)),e[l>>2]=e[_>>2],e[l+4>>2]=e[_+4>>2],e[l+8>>2]=e[_+8>>2],e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f0(_),Ke[e[(e[t>>2]|0)+24>>2]&127](F,t),d[a>>0]&1?e[e[a+8>>2]>>2]=0:d[a>>0]=0,e[a+4>>2]=0,f=0,h0(93,a|0,0),o=f,f=0,o&1)o=b(0)|0,Ie(o);else{e[a>>2]=e[F>>2],e[a+4>>2]=e[F+4>>2],e[a+8>>2]=e[F+8>>2],e[F>>2]=0,e[F+4>>2]=0,e[F+8>>2]=0,ye(F),M=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}while(!1);e[p>>2]=M,y=X}function nc(t){t=t|0}function sc(t){t=t|0,a0(t)}function oc(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=+l;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0;Z=y,y=y+384|0,V=Z+8|0,a=Z,h=Z+284|0,p=Z+72|0,c=Z+184|0,w0=Z+68|0,X=Z+80|0,_=Z+77|0,K=Z+76|0,v0=Z+56|0,Y0=Z+44|0,A0=Z+32|0,g=Z+28|0,B=Z+84|0,M=Z+24|0,F=Z+20|0,O=Z+16|0,e[p>>2]=h,H[V>>3]=l,h=Fn(h,100,59018,V)|0;do if(h>>>0>99)if(f=0,t=g0(3)|0,t0=f,f=0,!(t0&1)&&(f=0,H[a>>3]=l,k=k0(17,p|0,t|0,59018,a|0)|0,t0=f,f=0,!(t0&1))){if(t=e[p>>2]|0,!t){if(f=0,we(6),t0=f,f=0,t0&1){t=0,a=0,t0=7;break}t=e[p>>2]|0}c=xi(k)|0,a=c,c?(U=c,t0=10):(f=0,we(6),t0=f,f=0,t0&1?t0=7:(U=0,t0=10))}else t=0,a=0,t0=7;else a=0,t=0,U=c,k=h,t0=10;while(!1);if((t0|0)==10)if(f=0,c=u0(68,s|0)|0,I=f,f=0,I&1)t0=7;else{if(e[w0>>2]=c,f=0,I=y0(37,w0|0,44220)|0,C=f,f=0,!(C&1)&&(C=e[p>>2]|0,f=0,k0(e[(e[I>>2]|0)+32>>2]|0,I|0,C|0,C+k|0,U|0)|0,C=f,f=0,!(C&1))){if(k?C=(d[e[p>>2]>>0]|0)==45:C=0,e[v0>>2]=0,e[v0+4>>2]=0,e[v0+8>>2]=0,e[Y0>>2]=0,e[Y0+4>>2]=0,e[Y0+8>>2]=0,e[A0>>2]=0,e[A0+4>>2]=0,e[A0+8>>2]=0,f=0,Ci(3,n|0,C|0,w0|0,X|0,_|0,K|0,v0|0,Y0|0,A0|0,g|0),n=f,f=0,n&1)h=b()|0;else{if(g=e[g>>2]|0,(k|0)>(g|0)?(n=d[A0>>0]|0,h=d[Y0>>0]|0,h=(k-g<<1|1)+g+(n&1?e[A0+4>>2]|0:(n&255)>>>1)+(h&1?e[Y0+4>>2]|0:(h&255)>>>1)|0):(n=d[A0>>0]|0,h=d[Y0>>0]|0,h=g+2+(n&1?e[A0+4>>2]|0:(n&255)>>>1)+(h&1?e[Y0+4>>2]|0:(h&255)>>>1)|0),h>>>0>100?(h=xi(h)|0,p=h,h?t0=26:(f=0,we(6),B=f,f=0,B&1||(h=0,t0=26))):(p=0,h=B,t0=26),(t0|0)==26&&(f=0,Ye(1,h|0,M|0,F|0,e[s+4>>2]|0,U|0,U+k|0,I|0,C|0,X|0,d[_>>0]|0,d[K>>0]|0,v0|0,Y0|0,A0|0,g|0),K=f,f=0,!(K&1)&&(e[O>>2]=e[r>>2],r=e[M>>2]|0,s0=e[F>>2]|0,f=0,e[V>>2]=e[O>>2],s0=Fe(39,V|0,h|0,r|0,s0|0,s|0,o|0)|0,r=f,f=0,!(r&1))))return p&&(Ze(p),c=e[w0>>2]|0),f0(A0),f0(Y0),f0(v0),Ee(c)|0,a&&Ze(a),t&&Ze(t),y=Z,s0|0;h=b()|0,p&&(Ze(p),c=e[w0>>2]|0)}f0(A0),f0(Y0),f0(v0)}else h=b()|0;Ee(c)|0}return(t0|0)==7&&(h=b()|0),a&&Ze(a),t&&Ze(t),r0(h|0),0}function ac(t,r,n,s,o,l,a,c,h,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0;var g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;s0=y,y=y+112|0,I=s0+108|0,k=s0+96|0,V=s0+92|0,O=s0+80|0,_=s0+68|0,F=s0+56|0,M=s0+52|0,X=s0+40|0,K=s0+36|0,t0=s0+24|0,U=s0+12|0,B=s0;do if(t){t=Pi(n,43828)|0,n=e[t>>2]|0;do if(r)if(Ke[e[n+44>>2]&127](I,t),r=e[I>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](k,t),d[h>>0]&1?(d[e[h+8>>2]>>0]=0,e[h+4>>2]=0):(d[h+1>>0]=0,d[h>>0]=0),f=0,h0(91,h|0,0),s=f,f=0,s&1)h=b(0)|0,Ie(h);else{e[h>>2]=e[k>>2],e[h+4>>2]=e[k+4>>2],e[h+8>>2]=e[k+8>>2],e[k>>2]=0,e[k+4>>2]=0,e[k+8>>2]=0,f0(k),C=t;break}else if(Ke[e[n+40>>2]&127](V,t),r=e[V>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+28>>2]&127](O,t),d[h>>0]&1?(d[e[h+8>>2]>>0]=0,e[h+4>>2]=0):(d[h+1>>0]=0,d[h>>0]=0),f=0,h0(91,h|0,0),s=f,f=0,s&1)h=b(0)|0,Ie(h);else{e[h>>2]=e[O>>2],e[h+4>>2]=e[O+4>>2],e[h+8>>2]=e[O+8>>2],e[O>>2]=0,e[O+4>>2]=0,e[O+8>>2]=0,f0(O),C=t;break}while(!1);if(h=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,d[o>>0]=h,h=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,d[l>>0]=h,Ke[e[(e[C>>2]|0)+20>>2]&127](_,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),l=f,f=0,l&1&&(l=b(0)|0,Ie(l)),e[a>>2]=e[_>>2],e[a+4>>2]=e[_+4>>2],e[a+8>>2]=e[_+8>>2],e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f0(_),Ke[e[(e[C>>2]|0)+24>>2]&127](F,t),d[c>>0]&1?(d[e[c+8>>2]>>0]=0,e[c+4>>2]=0):(d[c+1>>0]=0,d[c>>0]=0),f=0,h0(91,c|0,0),l=f,f=0,l&1)l=b(0)|0,Ie(l);else{e[c>>2]=e[F>>2],e[c+4>>2]=e[F+4>>2],e[c+8>>2]=e[F+8>>2],e[F>>2]=0,e[F+4>>2]=0,e[F+8>>2]=0,f0(F),Z=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}}else{t=Pi(n,43764)|0,n=e[t>>2]|0;do if(r)if(Ke[e[n+44>>2]&127](M,t),r=e[M>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](X,t),d[h>>0]&1?(d[e[h+8>>2]>>0]=0,e[h+4>>2]=0):(d[h+1>>0]=0,d[h>>0]=0),f=0,h0(91,h|0,0),s=f,f=0,s&1)h=b(0)|0,Ie(h);else{e[h>>2]=e[X>>2],e[h+4>>2]=e[X+4>>2],e[h+8>>2]=e[X+8>>2],e[X>>2]=0,e[X+4>>2]=0,e[X+8>>2]=0,f0(X),g=t;break}else if(Ke[e[n+40>>2]&127](K,t),r=e[K>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+28>>2]&127](t0,t),d[h>>0]&1?(d[e[h+8>>2]>>0]=0,e[h+4>>2]=0):(d[h+1>>0]=0,d[h>>0]=0),f=0,h0(91,h|0,0),s=f,f=0,s&1)h=b(0)|0,Ie(h);else{e[h>>2]=e[t0>>2],e[h+4>>2]=e[t0+4>>2],e[h+8>>2]=e[t0+8>>2],e[t0>>2]=0,e[t0+4>>2]=0,e[t0+8>>2]=0,f0(t0),g=t;break}while(!1);if(h=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,d[o>>0]=h,h=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,d[l>>0]=h,Ke[e[(e[g>>2]|0)+20>>2]&127](U,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),l=f,f=0,l&1&&(l=b(0)|0,Ie(l)),e[a>>2]=e[U>>2],e[a+4>>2]=e[U+4>>2],e[a+8>>2]=e[U+8>>2],e[U>>2]=0,e[U+4>>2]=0,e[U+8>>2]=0,f0(U),Ke[e[(e[g>>2]|0)+24>>2]&127](B,t),d[c>>0]&1?(d[e[c+8>>2]>>0]=0,e[c+4>>2]=0):(d[c+1>>0]=0,d[c>>0]=0),f=0,h0(91,c|0,0),l=f,f=0,l&1)l=b(0)|0,Ie(l);else{e[c>>2]=e[B>>2],e[c+4>>2]=e[B+4>>2],e[c+8>>2]=e[B+8>>2],e[B>>2]=0,e[B+4>>2]=0,e[B+8>>2]=0,f0(B),Z=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}}while(!1);e[p>>2]=Z,y=s0}function fc(t,r,n,s,o,l,a,c,h,p,g,C,I,k,U){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,C=C|0,I=I|0,k=k|0,U=U|0;var B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,ei=0,We=0,_e=0,le=0,Ve=0,ne=0,fe=0;e[n>>2]=t,Ve=k+4|0,ne=k+8|0,fe=k+1|0,ze=I+4|0,Re=(s&512|0)==0,ei=I+8|0,We=I+1|0,_e=a+8|0,le=(U|0)>0,t0=C+4|0,Z=C+8|0,s0=C+1|0,w0=U+1|0,A0=-2-U-((U|0)<0?~U:-1)|0,Y0=(U|0)>0,K=0;do{switch(d[h+K>>0]|0){case 0:{e[r>>2]=e[n>>2];break}case 1:{e[r>>2]=e[n>>2],M=Ni[e[(e[a>>2]|0)+28>>2]&63](a,32)|0,X=e[n>>2]|0,e[n>>2]=X+1,d[X>>0]=M;break}case 3:{X=d[k>>0]|0,B=(X&1)==0,(B?(X&255)>>>1:e[Ve>>2]|0)|0&&(M=d[(B?fe:e[ne>>2]|0)>>0]|0,X=e[n>>2]|0,e[n>>2]=X+1,d[X>>0]=M);break}case 2:{if(O=d[I>>0]|0,B=(O&1)==0,O=B?(O&255)>>>1:e[ze>>2]|0,!(Re|(O|0)==0)){if(V=B?We:e[ei>>2]|0,_=V+O|0,B=e[n>>2]|0,O)do d[B>>0]=d[V>>0]|0,V=V+1|0,B=B+1|0;while((V|0)!=(_|0));e[n>>2]=B}break}case 4:{B=e[n>>2]|0,o=c?o+1|0:o,F=o,_=e[_e>>2]|0;e:do if(o>>>0>>0){V=o;do{if(O=d[V>>0]|0,O<<24>>24<=-1||!(E[_+(O<<24>>24<<1)>>1]&2048))break e;V=V+1|0}while(V>>>0>>0)}else V=o;while(!1);if(O=V,le){if(M=-2-O-~(O>>>0>F>>>0?F:O)|0,M=A0>>>0>M>>>0?A0:M,V>>>0>o>>>0&Y0)for(O=V,F=U;O=O+-1|0,X=d[O>>0]|0,_=e[n>>2]|0,e[n>>2]=_+1,d[_>>0]=X,_=(F|0)>1,O>>>0>o>>>0&_;)F=F+-1|0;else _=Y0;if(X=w0+M|0,O=V+(M+1)|0,_?F=Ni[e[(e[a>>2]|0)+28>>2]&63](a,48)|0:F=0,V=e[n>>2]|0,e[n>>2]=V+1,(X|0)>0)for(_=X;d[V>>0]=F,V=e[n>>2]|0,e[n>>2]=V+1,(_|0)>1;)_=_+-1|0;d[V>>0]=p}else O=V;if((O|0)!=(o|0)){if(X=d[C>>0]|0,V=(X&1)==0,(V?(X&255)>>>1:e[t0>>2]|0)|0?V=d[(V?s0:e[Z>>2]|0)>>0]|0:V=-1,(O|0)!=(o|0))for(_=0,F=0;(F|0)==(V|0)&&(X=e[n>>2]|0,e[n>>2]=X+1,d[X>>0]=g,_=_+1|0,X=d[C>>0]|0,V=(X&1)==0,_>>>0<(V?(X&255)>>>1:e[t0>>2]|0)>>>0?(V=d[(V?s0:e[Z>>2]|0)+_>>0]|0,V=V<<24>>24==127?-1:V<<24>>24,F=0):(V=F,F=0)),O=O+-1|0,M=d[O>>0]|0,X=e[n>>2]|0,e[n>>2]=X+1,d[X>>0]=M,(O|0)!=(o|0);)F=F+1|0}else M=Ni[e[(e[a>>2]|0)+28>>2]&63](a,48)|0,X=e[n>>2]|0,e[n>>2]=X+1,d[X>>0]=M;if(V=e[n>>2]|0,(B|0)!=(V|0)&&(v0=V+-1|0,B>>>0>>0)){V=v0;do X=d[B>>0]|0,d[B>>0]=d[V>>0]|0,d[V>>0]=X,B=B+1|0,V=V+-1|0;while(B>>>0>>0)}break}default:}K=K+1|0}while((K|0)!=4);if(V=d[k>>0]|0,o=(V&1)==0,V=o?(V&255)>>>1:e[Ve>>2]|0,V>>>0>1){if(B=o?fe:e[ne>>2]|0,O=B+V|0,o=e[n>>2]|0,(V|0)!=1){B=B+1|0;do d[o>>0]=d[B>>0]|0,o=o+1|0,B=B+1|0;while((B|0)!=(O|0))}e[n>>2]=o}switch(s&176|0){case 32:{e[r>>2]=e[n>>2];break}case 16:break;default:e[r>>2]=t}}function uc(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;X=y,y=y+176|0,k=X+56|0,t0=X+52|0,F=X+64|0,V=X+61|0,M=X+60|0,Z=X+40|0,w0=X+28|0,s0=X+16|0,p=X+12|0,I=X+68|0,_=X+8|0,O=X+4|0,U=X,t=ai(s)|0,e[t0>>2]=t,f=0,B=y0(37,t0|0,44220)|0,C=f,f=0;do if(C&1)v0=13;else{if(g=d[l>>0]|0,a=(g&1)==0,C=l+4|0,!((a?(g&255)>>>1:e[C>>2]|0)|0))g=0;else{if(a=d[(a?l+1|0:e[l+8>>2]|0)>>0]|0,f=0,c=y0(e[(e[B>>2]|0)+28>>2]|0,B|0,45)|0,g=f,f=0,g&1){v0=13;break}g=a<<24>>24==c<<24>>24}if(e[Z>>2]=0,e[Z+4>>2]=0,e[Z+8>>2]=0,e[w0>>2]=0,e[w0+4>>2]=0,e[w0+8>>2]=0,e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,f=0,Ci(3,n|0,g|0,t0|0,F|0,V|0,M|0,Z|0,w0|0,s0|0,p|0),h=f,f=0,h&1)a=b()|0;else{if(h=d[l>>0]|0,n=e[C>>2]|0,a=h&1?n:(h&255)>>>1,p=e[p>>2]|0,(a|0)>(p|0)?(A0=d[s0>>0]|0,c=d[w0>>0]|0,a=(a-p<<1|1)+p+(A0&1?e[s0+4>>2]|0:(A0&255)>>>1)+(c&1?e[w0+4>>2]|0:(c&255)>>>1)|0):(A0=d[s0>>0]|0,a=d[w0>>0]|0,a=p+2+(A0&1?e[s0+4>>2]|0:(A0&255)>>>1)+(a&1?e[w0+4>>2]|0:(a&255)>>>1)|0),a>>>0>100?(a=xi(a)|0,c=a,a?v0=17:(f=0,we(6),A0=f,f=0,A0&1||(h=d[l>>0]|0,n=e[C>>2]|0,a=0,v0=17))):(c=0,a=I,v0=17),(v0|0)==17&&(A0=(h&1)==0,l=A0?l+1|0:e[l+8>>2]|0,f=0,Ye(1,a|0,_|0,O|0,e[s+4>>2]|0,l|0,l+(A0?(h&255)>>>1:n)|0,B|0,g|0,F|0,d[V>>0]|0,d[M>>0]|0,Z|0,w0|0,s0|0,p|0),A0=f,f=0,!(A0&1)&&(e[U>>2]=e[r>>2],A0=e[_>>2]|0,K=e[O>>2]|0,f=0,e[k>>2]=e[U>>2],K=Fe(39,k|0,a|0,A0|0,K|0,s|0,o|0)|0,A0=f,f=0,!(A0&1))))return c&&(Ze(c),t=e[t0>>2]|0),f0(s0),f0(w0),f0(Z),Ee(t)|0,y=X,K|0;a=b()|0,c&&(Ze(c),t=e[t0>>2]|0)}f0(s0),f0(w0),f0(Z)}while(!1);return(v0|0)==13&&(a=b()|0),Ee(t)|0,r0(a|0),0}function cc(t){t=t|0}function hc(t){t=t|0,a0(t)}function mc(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=+l;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0;Z=y,y=y+992|0,V=Z+8|0,a=Z,h=Z+888|0,p=Z+880|0,c=Z+480|0,w0=Z+76|0,X=Z+884|0,_=Z+72|0,K=Z+68|0,v0=Z+56|0,Y0=Z+44|0,A0=Z+32|0,g=Z+28|0,B=Z+80|0,M=Z+24|0,F=Z+20|0,O=Z+16|0,e[p>>2]=h,H[V>>3]=l,h=Fn(h,100,59018,V)|0;do if(h>>>0>99)if(f=0,t=g0(3)|0,t0=f,f=0,!(t0&1)&&(f=0,H[a>>3]=l,k=k0(17,p|0,t|0,59018,a|0)|0,t0=f,f=0,!(t0&1))){if(t=e[p>>2]|0,!t){if(f=0,we(6),t0=f,f=0,t0&1){t=0,a=0,t0=7;break}t=e[p>>2]|0}c=xi(k<<2)|0,a=c,c?(U=c,t0=10):(f=0,we(6),t0=f,f=0,t0&1?t0=7:(U=0,t0=10))}else t=0,a=0,t0=7;else a=0,t=0,U=c,k=h,t0=10;while(!1);if((t0|0)==10)if(f=0,c=u0(68,s|0)|0,I=f,f=0,I&1)t0=7;else{if(e[w0>>2]=c,f=0,I=y0(37,w0|0,44212)|0,C=f,f=0,!(C&1)&&(C=e[p>>2]|0,f=0,k0(e[(e[I>>2]|0)+48>>2]|0,I|0,C|0,C+k|0,U|0)|0,C=f,f=0,!(C&1))){if(k?C=(d[e[p>>2]>>0]|0)==45:C=0,e[v0>>2]=0,e[v0+4>>2]=0,e[v0+8>>2]=0,e[Y0>>2]=0,e[Y0+4>>2]=0,e[Y0+8>>2]=0,e[A0>>2]=0,e[A0+4>>2]=0,e[A0+8>>2]=0,f=0,Ci(4,n|0,C|0,w0|0,X|0,_|0,K|0,v0|0,Y0|0,A0|0,g|0),n=f,f=0,n&1)h=b()|0;else{if(g=e[g>>2]|0,(k|0)>(g|0)?(n=d[A0>>0]|0,h=d[Y0>>0]|0,h=(k-g<<1|1)+g+(n&1?e[A0+4>>2]|0:(n&255)>>>1)+(h&1?e[Y0+4>>2]|0:(h&255)>>>1)|0):(n=d[A0>>0]|0,h=d[Y0>>0]|0,h=g+2+(n&1?e[A0+4>>2]|0:(n&255)>>>1)+(h&1?e[Y0+4>>2]|0:(h&255)>>>1)|0),h>>>0>100?(h=xi(h<<2)|0,p=h,h?t0=26:(f=0,we(6),B=f,f=0,B&1||(h=0,t0=26))):(p=0,h=B,t0=26),(t0|0)==26&&(f=0,Ye(2,h|0,M|0,F|0,e[s+4>>2]|0,U|0,U+(k<<2)|0,I|0,C|0,X|0,e[_>>2]|0,e[K>>2]|0,v0|0,Y0|0,A0|0,g|0),K=f,f=0,!(K&1)&&(e[O>>2]=e[r>>2],r=e[M>>2]|0,s0=e[F>>2]|0,f=0,e[V>>2]=e[O>>2],s0=Fe(40,V|0,h|0,r|0,s0|0,s|0,o|0)|0,r=f,f=0,!(r&1))))return p&&(Ze(p),c=e[w0>>2]|0),ye(A0),ye(Y0),f0(v0),Ee(c)|0,a&&Ze(a),t&&Ze(t),y=Z,s0|0;h=b()|0,p&&(Ze(p),c=e[w0>>2]|0)}ye(A0),ye(Y0),f0(v0)}else h=b()|0;Ee(c)|0}return(t0|0)==7&&(h=b()|0),a&&Ze(a),t&&Ze(t),r0(h|0),0}function dc(t,r,n,s,o,l,a,c,h,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0;var g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0;t0=y,y=y+112|0,g=t0+108|0,C=t0+96|0,U=t0+92|0,B=t0+80|0,V=t0+68|0,O=t0+56|0,_=t0+52|0,F=t0+40|0,M=t0+36|0,X=t0+24|0,I=t0+12|0,k=t0;do if(t){t=Pi(n,43956)|0,n=e[t>>2]|0;do if(r)if(Ke[e[n+44>>2]&127](g,t),r=e[g>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](C,t),d[h>>0]&1?e[e[h+8>>2]>>2]=0:d[h>>0]=0,e[h+4>>2]=0,f=0,h0(93,h|0,0),s=f,f=0,s&1)h=b(0)|0,Ie(h);else{e[h>>2]=e[C>>2],e[h+4>>2]=e[C+4>>2],e[h+8>>2]=e[C+8>>2],e[C>>2]=0,e[C+4>>2]=0,e[C+8>>2]=0,ye(C);break}else if(Ke[e[n+40>>2]&127](U,t),r=e[U>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+28>>2]&127](B,t),d[h>>0]&1?e[e[h+8>>2]>>2]=0:d[h>>0]=0,e[h+4>>2]=0,f=0,h0(93,h|0,0),s=f,f=0,s&1)h=b(0)|0,Ie(h);else{e[h>>2]=e[B>>2],e[h+4>>2]=e[B+4>>2],e[h+8>>2]=e[B+8>>2],e[B>>2]=0,e[B+4>>2]=0,e[B+8>>2]=0,ye(B);break}while(!1);if(h=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,e[o>>2]=h,h=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,e[l>>2]=h,Ke[e[(e[t>>2]|0)+20>>2]&127](V,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),l=f,f=0,l&1&&(l=b(0)|0,Ie(l)),e[a>>2]=e[V>>2],e[a+4>>2]=e[V+4>>2],e[a+8>>2]=e[V+8>>2],e[V>>2]=0,e[V+4>>2]=0,e[V+8>>2]=0,f0(V),Ke[e[(e[t>>2]|0)+24>>2]&127](O,t),d[c>>0]&1?e[e[c+8>>2]>>2]=0:d[c>>0]=0,e[c+4>>2]=0,f=0,h0(93,c|0,0),l=f,f=0,l&1)l=b(0)|0,Ie(l);else{e[c>>2]=e[O>>2],e[c+4>>2]=e[O+4>>2],e[c+8>>2]=e[O+8>>2],e[O>>2]=0,e[O+4>>2]=0,e[O+8>>2]=0,ye(O),K=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}}else{t=Pi(n,43892)|0,n=e[t>>2]|0;do if(r)if(Ke[e[n+44>>2]&127](_,t),r=e[_>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](F,t),d[h>>0]&1?e[e[h+8>>2]>>2]=0:d[h>>0]=0,e[h+4>>2]=0,f=0,h0(93,h|0,0),s=f,f=0,s&1)h=b(0)|0,Ie(h);else{e[h>>2]=e[F>>2],e[h+4>>2]=e[F+4>>2],e[h+8>>2]=e[F+8>>2],e[F>>2]=0,e[F+4>>2]=0,e[F+8>>2]=0,ye(F);break}else if(Ke[e[n+40>>2]&127](M,t),r=e[M>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+28>>2]&127](X,t),d[h>>0]&1?e[e[h+8>>2]>>2]=0:d[h>>0]=0,e[h+4>>2]=0,f=0,h0(93,h|0,0),s=f,f=0,s&1)h=b(0)|0,Ie(h);else{e[h>>2]=e[X>>2],e[h+4>>2]=e[X+4>>2],e[h+8>>2]=e[X+8>>2],e[X>>2]=0,e[X+4>>2]=0,e[X+8>>2]=0,ye(X);break}while(!1);if(h=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,e[o>>2]=h,h=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,e[l>>2]=h,Ke[e[(e[t>>2]|0)+20>>2]&127](I,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),l=f,f=0,l&1&&(l=b(0)|0,Ie(l)),e[a>>2]=e[I>>2],e[a+4>>2]=e[I+4>>2],e[a+8>>2]=e[I+8>>2],e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f0(I),Ke[e[(e[t>>2]|0)+24>>2]&127](k,t),d[c>>0]&1?e[e[c+8>>2]>>2]=0:d[c>>0]=0,e[c+4>>2]=0,f=0,h0(93,c|0,0),l=f,f=0,l&1)l=b(0)|0,Ie(l);else{e[c>>2]=e[k>>2],e[c+4>>2]=e[k+4>>2],e[c+8>>2]=e[k+8>>2],e[k>>2]=0,e[k+4>>2]=0,e[k+8>>2]=0,ye(k),K=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}}while(!1);e[p>>2]=K,y=t0}function gc(t,r,n,s,o,l,a,c,h,p,g,C,I,k,U){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,C=C|0,I=I|0,k=k|0,U=U|0;var B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,ei=0,We=0,_e=0;e[n>>2]=t,We=k+4|0,_e=k+8|0,w0=I+4|0,v0=(s&512|0)==0,A0=I+8|0,Y0=(U|0)>0,ze=C+4|0,Re=C+8|0,ei=C+1|0,Z=(U|0)>0,t0=0;do{switch(d[h+t0>>0]|0){case 0:{e[r>>2]=e[n>>2];break}case 1:{e[r>>2]=e[n>>2],X=Ni[e[(e[a>>2]|0)+44>>2]&63](a,32)|0,K=e[n>>2]|0,e[n>>2]=K+4,e[K>>2]=X;break}case 3:{K=d[k>>0]|0,B=(K&1)==0,(B?(K&255)>>>1:e[We>>2]|0)|0&&(X=e[(B?We:e[_e>>2]|0)>>2]|0,K=e[n>>2]|0,e[n>>2]=K+4,e[K>>2]=X);break}case 2:{if(F=d[I>>0]|0,B=(F&1)==0,F=B?(F&255)>>>1:e[w0>>2]|0,!(v0|(F|0)==0)){if(B=B?w0:e[A0>>2]|0,O=B+(F<<2)|0,_=e[n>>2]|0,F)for(V=_;e[V>>2]=e[B>>2],B=B+4|0,(B|0)!=(O|0);)V=V+4|0;e[n>>2]=_+(F<<2)}break}case 4:{B=e[n>>2]|0,o=c?o+4|0:o;e:do if(o>>>0>>0){V=o;do{if(!(Qe[e[(e[a>>2]|0)+12>>2]&63](a,2048,e[V>>2]|0)|0))break e;V=V+4|0}while(V>>>0>>0)}else V=o;while(!1);if(Y0){if(V>>>0>o>>>0&Z){for(F=e[n>>2]|0,_=U;;)if(V=V+-4|0,O=F+4|0,e[F>>2]=e[V>>2],M=_+-1|0,_=(_|0)>1,V>>>0>o>>>0&_)F=O,_=M;else{F=M;break}e[n>>2]=O,O=F}else _=Z,O=U;if(_?M=Ni[e[(e[a>>2]|0)+44>>2]&63](a,48)|0:M=0,X=e[n>>2]|0,_=O+((O|0)<0?~O:-1)|0,(O|0)>0)for(F=X;e[F>>2]=M,(O|0)>1;)F=F+4|0,O=O+-1|0;e[n>>2]=X+(_+2<<2),e[X+(_+1<<2)>>2]=p}if((V|0)==(o|0))X=Ni[e[(e[a>>2]|0)+44>>2]&63](a,48)|0,K=e[n>>2]|0,V=K+4|0,e[n>>2]=V,e[K>>2]=X;else{if(X=d[C>>0]|0,O=(X&1)==0,K=e[ze>>2]|0,(O?(X&255)>>>1:K)|0?O=d[(O?ei:e[Re>>2]|0)>>0]|0:O=-1,(V|0)!=(o|0))for(M=0,X=0;_=e[n>>2]|0,(X|0)==(O|0)?(F=_+4|0,e[n>>2]=F,e[_>>2]=g,M=M+1|0,_=d[C>>0]|0,O=(_&1)==0,M>>>0<(O?(_&255)>>>1:K)>>>0?(O=d[(O?ei:e[Re>>2]|0)+M>>0]|0,_=F,O=O<<24>>24==127?-1:O<<24>>24,F=0):(_=F,O=X,F=0)):F=X,V=V+-4|0,X=e[V>>2]|0,e[n>>2]=_+4,e[_>>2]=X,(V|0)!=(o|0);)X=F+1|0;V=e[n>>2]|0}if((B|0)!=(V|0)&&(s0=V+-4|0,B>>>0>>0)){V=s0;do K=e[B>>2]|0,e[B>>2]=e[V>>2],e[V>>2]=K,B=B+4|0,V=V+-4|0;while(B>>>0>>0)}break}default:}t0=t0+1|0}while((t0|0)!=4);if(B=d[k>>0]|0,o=(B&1)==0,B=o?(B&255)>>>1:e[We>>2]|0,B>>>0>1){if(V=o?We:e[_e>>2]|0,o=V+4|0,V=V+(B<<2)|0,O=e[n>>2]|0,_=V-o|0,(B|0)!=1)for(B=O;e[B>>2]=e[o>>2],o=o+4|0,(o|0)!=(V|0);)B=B+4|0;e[n>>2]=O+(_>>>2<<2)}switch(s&176|0){case 32:{e[r>>2]=e[n>>2];break}case 16:break;default:e[r>>2]=t}}function pc(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;X=y,y=y+480|0,I=X+468|0,t0=X+464|0,F=X+472|0,V=X+56|0,M=X+52|0,Z=X+40|0,w0=X+28|0,s0=X+16|0,p=X+12|0,C=X+64|0,_=X+8|0,O=X+4|0,k=X,t=ai(s)|0,e[t0>>2]=t,f=0,U=y0(37,t0|0,44212)|0,B=f,f=0;do if(B&1)v0=13;else{if(g=d[l>>0]|0,a=(g&1)==0,B=l+4|0,!((a?(g&255)>>>1:e[B>>2]|0)|0))g=0;else{if(a=e[(a?B:e[l+8>>2]|0)>>2]|0,f=0,c=y0(e[(e[U>>2]|0)+44>>2]|0,U|0,45)|0,g=f,f=0,g&1){v0=13;break}g=(a|0)==(c|0)}if(e[Z>>2]=0,e[Z+4>>2]=0,e[Z+8>>2]=0,e[w0>>2]=0,e[w0+4>>2]=0,e[w0+8>>2]=0,e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,f=0,Ci(4,n|0,g|0,t0|0,F|0,V|0,M|0,Z|0,w0|0,s0|0,p|0),h=f,f=0,h&1)a=b()|0;else{if(h=d[l>>0]|0,n=e[B>>2]|0,a=h&1?n:(h&255)>>>1,p=e[p>>2]|0,(a|0)>(p|0)?(A0=d[s0>>0]|0,c=d[w0>>0]|0,a=(a-p<<1|1)+p+(A0&1?e[s0+4>>2]|0:(A0&255)>>>1)+(c&1?e[w0+4>>2]|0:(c&255)>>>1)|0):(A0=d[s0>>0]|0,a=d[w0>>0]|0,a=p+2+(A0&1?e[s0+4>>2]|0:(A0&255)>>>1)+(a&1?e[w0+4>>2]|0:(a&255)>>>1)|0),a>>>0>100?(a=xi(a<<2)|0,c=a,a?v0=17:(f=0,we(6),A0=f,f=0,A0&1||(h=d[l>>0]|0,n=e[B>>2]|0,a=0,v0=17))):(c=0,a=C,v0=17),(v0|0)==17&&(A0=(h&1)==0,l=A0?B:e[l+8>>2]|0,f=0,Ye(2,a|0,_|0,O|0,e[s+4>>2]|0,l|0,l+((A0?(h&255)>>>1:n)<<2)|0,U|0,g|0,F|0,e[V>>2]|0,e[M>>2]|0,Z|0,w0|0,s0|0,p|0),A0=f,f=0,!(A0&1)&&(e[k>>2]=e[r>>2],A0=e[_>>2]|0,K=e[O>>2]|0,f=0,e[I>>2]=e[k>>2],K=Fe(40,I|0,a|0,A0|0,K|0,s|0,o|0)|0,A0=f,f=0,!(A0&1))))return c&&(Ze(c),t=e[t0>>2]|0),ye(s0),ye(w0),f0(Z),Ee(t)|0,y=X,K|0;a=b()|0,c&&(Ze(c),t=e[t0>>2]|0)}ye(s0),ye(w0),f0(Z)}while(!1);return(v0|0)==13&&(a=b()|0),Ee(t)|0,r0(a|0),0}function Ac(t){t=t|0}function Sc(t){t=t|0,a0(t)}function vc(t,r,n){return t=t|0,r=r|0,n=n|0,t=Sn(d[r>>0]&1?e[r+8>>2]|0:r+1|0,1)|0,t>>>((t|0)!=-1&1)|0}function wc(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0;c=y,y=y+16|0,h=c,e[h>>2]=0,e[h+4>>2]=0,e[h+8>>2]=0,a=d[l>>0]|0,p=(a&1)==0,r=p?l+1|0:e[l+8>>2]|0,a=p?(a&255)>>>1:e[l+4>>2]|0,l=r+a|0;e:do if((a|0)>0){for(;f=0,h0(67,h|0,d[r>>0]|0),p=f,f=0,!(p&1);)if(r=r+1|0,r>>>0>=l>>>0){a=4;break e}r=b()|0,a=7}else a=4;while(!1);e:do if((a|0)==4){if(f=0,r=k0(19,((n|0)==-1?-1:n<<1)|0,s|0,o|0,(d[h>>0]&1?e[h+8>>2]|0:h+1|0)|0)|0,p=f,f=0,p&1){r=b()|0,a=7;break}e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,p=Ot(r)|0,l=r+p|0;i:do if((p|0)>0){for(;f=0,h0(67,t|0,d[r>>0]|0),p=f,f=0,!(p&1);)if(r=r+1|0,r>>>0>=l>>>0)break i;r=b()|0,f0(t);break e}while(!1);f0(h),y=c;return}while(!1);f0(h),r0(r|0)}function Tc(t,r){t=t|0,r=r|0}function Cc(t){t=t|0}function xc(t){t=t|0,a0(t)}function yc(t,r,n){return t=t|0,r=r|0,n=n|0,t=Sn(d[r>>0]&1?e[r+8>>2]|0:r+1|0,1)|0,t>>>((t|0)!=-1&1)|0}function Ic(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;_=y,y=y+224|0,C=_+184|0,g=_+192|0,p=_+180|0,I=_+176|0,V=_+168|0,B=_+40|0,U=_+32|0,O=_+28|0,F=_+16|0,h=_+8|0,k=_,e[F>>2]=0,e[F+4>>2]=0,e[F+8>>2]=0,e[h+4>>2]=0,e[h>>2]=44696,c=d[l>>0]|0,M=(c&1)==0,a=l+4|0,r=M?a:e[l+8>>2]|0,l=M?(c&255)>>>1:e[a>>2]|0,a=r+(l<<2)|0,c=g+32|0;e:do if((l|0)>0){i:for(;;){if(e[I>>2]=r,f=0,l=He(e[(e[h>>2]|0)+12>>2]|0,h|0,C|0,r|0,a|0,I|0,g|0,c|0,p|0)|0,M=f,f=0,M&1){l=12;break}if((l|0)==2||(e[I>>2]|0)==(r|0)){l=5;break}if(g>>>0<(e[p>>2]|0)>>>0){r=g;do{if(f=0,h0(67,F|0,d[r>>0]|0),M=f,f=0,M&1){l=11;break i}r=r+1|0}while(r>>>0<(e[p>>2]|0)>>>0)}if(r=e[I>>2]|0,!((l|0)!=2&r>>>0>>0)){l=9;break e}}(l|0)==5?(f=0,n0(190,58955),f=0,r=b()|0):((l|0)==11||(l|0)==12)&&(r=b()|0)}else l=9;while(!1);e:do if((l|0)==9){if(f=0,r=k0(19,((n|0)==-1?-1:n<<1)|0,s|0,o|0,(d[F>>0]&1?e[F+8>>2]|0:F+1|0)|0)|0,M=f,f=0,M&1){r=b()|0;break}e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[k+4>>2]=0,e[k>>2]=44744,M=Ot(r)|0,a=r+M|0,c=a,h=B+128|0;i:do if((M|0)>0){t:for(;;){if(e[O>>2]=r,f=0,l=He(e[(e[k>>2]|0)+16>>2]|0,k|0,V|0,r|0,((c-r|0)>32?r+32|0:a)|0,O|0,B|0,h|0,U|0)|0,M=f,f=0,M&1){l=24;break}if((l|0)==2||(e[O>>2]|0)==(r|0)){l=18;break}if(B>>>0<(e[U>>2]|0)>>>0){r=B;do{if(f=0,h0(92,t|0,e[r>>2]|0),M=f,f=0,M&1){l=23;break t}r=r+4|0}while(r>>>0<(e[U>>2]|0)>>>0)}if(r=e[O>>2]|0,!((l|0)!=2&r>>>0>>0))break i}(l|0)==18?(f=0,n0(190,58955),f=0,r=b()|0):((l|0)==23||(l|0)==24)&&(r=b()|0),ye(t);break e}while(!1);f0(F),y=_;return}while(!1);f0(F),r0(r|0)}function Dc(t,r){t=t|0,r=r|0}function Ec(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0;if(e[t+4>>2]=r+-1,e[t>>2]=44196,l=t+8|0,f=0,h0(94,l|0,28),o=f,f=0,o&1)r=b()|0;else{if(o=t+144|0,f=0,m0(5,o|0,58885,1),s=f,f=0,s&1)r=b()|0;else{if(n=e[l>>2]|0,s=t+12|0,r=e[s>>2]|0,(r|0)!=(n|0)){do r=r+-4|0;while((r|0)!=(n|0));e[s>>2]=r}e[495]=0,e[494]=43124,f=0,h0(95,t|0,1976),s=f,f=0;do if(!(s&1)&&(e[497]=0,e[496]=43164,f=0,h0(96,t|0,1984),s=f,f=0,!(s&1))&&(e[499]=0,e[498]=44236,e[500]=0,d[2004]=0,s=er()|0,e[500]=s,f=0,h0(97,t|0,1992),s=f,f=0,!(s&1))&&(e[503]=0,e[502]=44484,f=0,h0(98,t|0,2008),s=f,f=0,!(s&1))&&(e[505]=0,e[504]=44552,f=0,h0(99,t|0,2016),s=f,f=0,!(s&1))&&(f=0,h0(100,2024,1),s=f,f=0,!(s&1))&&(f=0,h0(101,t|0,2024),s=f,f=0,!(s&1))&&(e[511]=0,e[510]=44600,f=0,h0(102,t|0,2040),s=f,f=0,!(s&1))&&(e[513]=0,e[512]=44648,f=0,h0(103,t|0,2048),s=f,f=0,!(s&1))&&(j6(2056,1),f=0,h0(104,t|0,2056),s=f,f=0,!(s&1))&&(X6(2080,1),f=0,h0(105,t|0,2080),s=f,f=0,!(s&1))&&(e[529]=0,e[528]=43204,f=0,h0(106,t|0,2112),s=f,f=0,!(s&1))&&(e[531]=0,e[530]=43276,f=0,h0(107,t|0,2120),s=f,f=0,!(s&1))&&(e[533]=0,e[532]=43348,f=0,h0(108,t|0,2128),s=f,f=0,!(s&1))){if(e[535]=0,e[534]=43408,f=0,h0(109,t|0,2136),s=f,f=0,s&1){a=42;break}if(e[537]=0,e[536]=43716,f=0,h0(110,t|0,2144),s=f,f=0,s&1){a=42;break}if(e[539]=0,e[538]=43780,f=0,h0(111,t|0,2152),s=f,f=0,s&1){a=42;break}if(e[541]=0,e[540]=43844,f=0,h0(112,t|0,2160),s=f,f=0,s&1){a=42;break}if(e[543]=0,e[542]=43908,f=0,h0(113,t|0,2168),s=f,f=0,s&1){a=42;break}if(e[545]=0,e[544]=43972,f=0,h0(114,t|0,2176),s=f,f=0,s&1){a=42;break}if(e[547]=0,e[546]=44008,f=0,h0(115,t|0,2184),s=f,f=0,s&1){a=42;break}if(e[549]=0,e[548]=44044,f=0,h0(116,t|0,2192),s=f,f=0,s&1){a=42;break}if(e[551]=0,e[550]=44080,f=0,h0(117,t|0,2200),s=f,f=0,s&1){a=42;break}if(e[553]=0,e[552]=43468,e[554]=43516,f=0,h0(118,t|0,2208),s=f,f=0,s&1){a=42;break}if(e[557]=0,e[556]=43560,e[558]=43608,f=0,h0(119,t|0,2224),s=f,f=0,s&1){a=42;break}if(e[561]=0,e[560]=44464,f=0,r=g0(3)|0,s=f,f=0,s&1){r=b()|0;break}if(e[562]=r,e[560]=43652,f=0,h0(120,t|0,2240),s=f,f=0,s&1){a=42;break}if(e[565]=0,e[564]=44464,f=0,r=g0(3)|0,s=f,f=0,s&1){r=b()|0;break}if(e[566]=r,e[564]=43684,f=0,h0(121,t|0,2256),a=f,f=0,a&1){a=42;break}if(e[569]=0,e[568]=44116,f=0,h0(122,t|0,2272),a=f,f=0,a&1){a=42;break}if(e[571]=0,e[570]=44156,f=0,h0(123,t|0,2280),a=f,f=0,a&1){a=42;break}return}else a=42;while(!1);(a|0)==42&&(r=b()|0),f0(o)}A1(l)}r0(r|0)}function kc(){var t=0;do if(!(d[2288]|0)&&Ae(2288)|0)if(f=0,g0(4)|0,t=f,f=0,t&1)t=b()|0,bi(2288),r0(t|0);else{e[11246]=44980,ve(2288);break}while(!1);return e[11246]|0}function Si(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;ur(r),o=t+8|0,s=e[o>>2]|0;do if((e[t+12>>2]|0)-s>>2>>>0<=n>>>0){if(f=0,h0(124,o|0,n+1|0),t=f,f=0,!(t&1)){s=e[o>>2]|0;break}s=b()|0,r&&Ee(r)|0,r0(s|0)}while(!1);t=e[s+(n<<2)>>2]|0,t&&(Ee(t)|0,s=e[o>>2]|0),e[s+(n<<2)>>2]=r}function D2(t){t=t|0;var r=0,n=0,s=0,o=0;if(e[t>>2]=44196,s=t+8|0,o=t+12|0,r=e[s>>2]|0,(e[o>>2]|0)!=(r|0)){n=0;do r=e[r+(n<<2)>>2]|0,r&&Ee(r)|0,n=n+1|0,r=e[s>>2]|0;while(n>>>0<(e[o>>2]|0)-r>>2>>>0)}f0(t+144|0),A1(s)}function Fc(t){t=t|0,D2(t),a0(t)}function Mc(t,r){return t=t|0,r=r|0,x8(t,r)|0?e[(e[t+8>>2]|0)+(r<<2)>>2]|0:(t=de(4)|0,Fg(t),Be(t|0,640,82),0)}function _c(){return Ec(2296,1),e[11245]=2296,44980}function Rc(){var t=0;return t=kc()|0,t=e[t>>2]|0,e[11247]=t,ur(t),44988}function Pc(){var t=0;do if(!(d[2456]|0)&&Ae(2456)|0)if(f=0,g0(5)|0,t=f,f=0,t&1)t=b()|0,bi(2456),r0(t|0);else{e[11248]=44988,ve(2456);break}while(!1);return e[11248]|0}function n1(t){t=t|0;var r=0,n=0;if(f=0,r=g0(6)|0,n=f,f=0,n&1)n=b(0)|0,Ie(n);else{n=e[r>>2]|0,e[t>>2]=n,ur(n);return}}function $t(t,r){t=t|0,r=r|0,r=e[r>>2]|0,e[t>>2]=r,ur(r)}function Mi(t){t=t|0,Ee(e[t>>2]|0)|0}function Ai(t){t=t|0;var r=0,n=0;return n=y,y=y+16|0,r=n,(e[t>>2]|0)!=-1&&(e[r>>2]=t,e[r+4>>2]=191,e[r+8>>2]=0,l5(t,r,192)),y=n,(e[t+4>>2]|0)+-1|0}function Pi(t,r){return t=t|0,r=r|0,t=e[t>>2]|0,Mc(t,Ai(r)|0)|0}function Lc(t){t=t|0,a0(t)}function Uc(t){t=t|0,t&&Ce[e[(e[t>>2]|0)+4>>2]&255](t)}function Oc(t){t=t|0;var r=0;r=e[11052]|0,e[11052]=r+1,e[t+4>>2]=r+1}function Nc(t){t=t|0,a0(t)}function Bc(t,r,n){return t=t|0,r=r|0,n=n|0,n>>>0<128?(n=(er()|0)+(n<<1)|0,n=(E[n>>1]&r)<<16>>16!=0):n=0,n|0}function er(){var t=0,r=0;if(f=0,t=g0(7)|0,r=f,f=0,r&1)r=b(0)|0,Ie(r);else return e[t>>2]|0;return 0}function Vc(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(l=(n-r|0)>>>2,(r|0)!=(n|0))for(o=r;t=e[o>>2]|0,t>>>0<128?(t=(er()|0)+(t<<1)|0,t=q[t>>1]|0):t=0,E[s>>1]=t,o=o+4|0,(o|0)!=(n|0);)s=s+2|0;return r+(l<<2)|0}function qc(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;e:do if((n|0)==(s|0))n=s;else for(;;){if(t=e[n>>2]|0,t>>>0<128&&(t=(er()|0)+(t<<1)|0,(E[t>>1]&r)<<16>>16!=0))break e;if(n=n+4|0,(n|0)==(s|0)){n=s;break}}while(!1);return n|0}function bc(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;e:do if((n|0)==(s|0))n=s;else for(;;){if(t=e[n>>2]|0,t>>>0>=128||(t=(er()|0)+(t<<1)|0,!((E[t>>1]&r)<<16>>16)))break e;if(n=n+4|0,(n|0)==(s|0)){n=s;break}}while(!1);return n|0}function Gc(t,r){return t=t|0,r=r|0,r>>>0<128&&(r=(ar()|0)+(r<<2)|0,r=e[r>>2]|0),r|0}function ar(){var t=0,r=0;if(f=0,t=g0(8)|0,r=f,f=0,r&1)r=b(0)|0,Ie(r);else return e[t>>2]|0;return 0}function Qc(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;if(o=(n-r|0)>>>2,(r|0)!=(n|0)){s=r;do t=e[s>>2]|0,t>>>0<128&&(t=(ar()|0)+(t<<2)|0,t=e[t>>2]|0),e[s>>2]=t,s=s+4|0;while((s|0)!=(n|0))}return r+(o<<2)|0}function zc(t,r){return t=t|0,r=r|0,r>>>0<128&&(r=(fr()|0)+(r<<2)|0,r=e[r>>2]|0),r|0}function fr(){var t=0,r=0;if(f=0,t=g0(9)|0,r=f,f=0,r&1)r=b(0)|0,Ie(r);else return e[t>>2]|0;return 0}function Hc(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;if(o=(n-r|0)>>>2,(r|0)!=(n|0)){s=r;do t=e[s>>2]|0,t>>>0<128&&(t=(fr()|0)+(t<<2)|0,t=e[t>>2]|0),e[s>>2]=t,s=s+4|0;while((s|0)!=(n|0))}return r+(o<<2)|0}function Yc(t,r){return t=t|0,r=r|0,r<<24>>24|0}function jc(t,r,n,s){if(t=t|0,r=r|0,n=n|0,s=s|0,(r|0)!=(n|0))for(;e[s>>2]=d[r>>0],r=r+1|0,(r|0)!=(n|0);)s=s+4|0;return n|0}function Xc(t,r,n){return t=t|0,r=r|0,n=n|0,(r>>>0<128?r&255:n)|0}function Kc(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;if(a=(n-r|0)>>>2,(r|0)!=(n|0))for(l=r,t=o;o=e[l>>2]|0,d[t>>0]=o>>>0<128?o&255:s,l=l+4|0,(l|0)!=(n|0);)t=t+1|0;return r+(a<<2)|0}function E2(t){t=t|0;var r=0;e[t>>2]=44236,r=e[t+8>>2]|0,r|0&&d[t+12>>0]|0&&wg(r)}function Wc(t){t=t|0,E2(t),a0(t)}function Zc(t,r){return t=t|0,r=r|0,r<<24>>24>-1&&(r=(ar()|0)+((r&255)<<2)|0,r=e[r>>2]&255),r|0}function Jc(t,r,n){if(t=t|0,r=r|0,n=n|0,(r|0)!=(n|0)){t=r;do r=d[t>>0]|0,r<<24>>24>-1&&(r=(ar()|0)+(r<<24>>24<<2)|0,r=e[r>>2]&255),d[t>>0]=r,t=t+1|0;while((t|0)!=(n|0))}return n|0}function $c(t,r){return t=t|0,r=r|0,r<<24>>24>-1&&(r=(fr()|0)+(r<<24>>24<<2)|0,r=e[r>>2]&255),r|0}function eh(t,r,n){if(t=t|0,r=r|0,n=n|0,(r|0)!=(n|0)){t=r;do r=d[t>>0]|0,r<<24>>24>-1&&(r=(fr()|0)+(r<<24>>24<<2)|0,r=e[r>>2]&255),d[t>>0]=r,t=t+1|0;while((t|0)!=(n|0))}return n|0}function ih(t,r){return t=t|0,r=r|0,r|0}function th(t,r,n,s){if(t=t|0,r=r|0,n=n|0,s=s|0,(r|0)!=(n|0))for(;d[s>>0]=d[r>>0]|0,r=r+1|0,(r|0)!=(n|0);)s=s+1|0;return n|0}function rh(t,r,n){return t=t|0,r=r|0,n=n|0,(r<<24>>24>-1?r:n)|0}function nh(t,r,n,s,o){if(t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,(r|0)!=(n|0))for(;t=d[r>>0]|0,d[o>>0]=t<<24>>24>-1?t:s,r=r+1|0,(r|0)!=(n|0);)o=o+1|0;return n|0}function sh(t){t=t|0,a0(t)}function oh(t,r,n,s,o,l,a,c){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,e[o>>2]=n,e[c>>2]=l,3}function lh(t,r,n,s,o,l,a,c){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,e[o>>2]=n,e[c>>2]=l,3}function ah(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,e[o>>2]=n,3}function fh(t){return t=t|0,1}function uh(t){return t=t|0,1}function hh(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,t=s-n|0,(t>>>0>>0?t:o)|0}function mh(t){return t=t|0,1}function dh(t,r){t=t|0,r=r|0;var n=0;if(e[t+4>>2]=r+-1,e[t>>2]=44304,f=0,r=g0(3)|0,n=f,f=0,n&1)n=b()|0,r0(n|0);else{e[t+8>>2]=r;return}}function gh(t){t=t|0,Z2(t),a0(t)}function s1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,ei=0,We=0,_e=0,le=0,Ve=0,ne=0,fe=0,vi=0,Ti=0,mi=0,_0=0,he=0,Pe=0,li=0,ti=0,fi=0,yi=0,gi=0,xt=0,Ei=0,gt=0;gt=y,y=y+624|0,fi=gt+24|0,gi=gt+16|0,yi=gt+588|0,_0=gt+576|0,ti=gt,vi=gt+536|0,Ei=gt+8|0,xt=gt+528|0,ze=(t|0)!=0,Re=vi+40|0,fe=Re,vi=vi+39|0,Ti=Ei+4|0,mi=_0+12|0,_0=_0+11|0,he=yi,Pe=mi,li=Pe-he|0,ei=-2-he|0,We=Pe+2|0,_e=fi+288|0,le=yi+9|0,Ve=le,ne=yi+8|0,l=0,B=r,a=0,r=0;e:for(;;){do if((l|0)>-1)if((a|0)>(2147483647-l|0)){l=di()|0,e[l>>2]=75,l=-1;break}else{l=a+l|0;break}while(!1);if(a=d[B>>0]|0,a<<24>>24)c=B;else{Y0=245;break}i:for(;;){switch(a<<24>>24){case 37:{a=c,Y0=9;break i}case 0:{a=c;break i}default:}A0=c+1|0,a=d[A0>>0]|0,c=A0}i:do if((Y0|0)==9)for(;;){if(Y0=0,(d[a+1>>0]|0)!=37)break i;if(c=c+1|0,a=a+2|0,(d[a>>0]|0)==37)Y0=9;else break}while(!1);if(O=c-B|0,ze&&!(e[t>>2]&32|0)&&Ui(B,O,t)|0,(c|0)!=(B|0)){B=a,a=O;continue}g=a+1|0,c=d[g>>0]|0,h=(c<<24>>24)+-48|0,h>>>0<10?(A0=(d[a+2>>0]|0)==36,g=A0?a+3|0:g,c=d[g>>0]|0,k=A0?h:-1,r=A0?1:r):k=-1,a=c<<24>>24;i:do if((a&-32|0)==32)for(h=0;;){if(!(1<>24)+-32|h,g=g+1|0,c=d[g>>0]|0,a=c<<24>>24,(a&-32|0)!=32){C=h,a=g;break}}else C=0,a=g;while(!1);do if(c<<24>>24==42){if(h=a+1|0,c=(d[h>>0]|0)+-48|0,c>>>0<10&&(d[a+2>>0]|0)==36)e[o+(c<<2)>>2]=10,r=1,a=a+3|0,c=e[s+((d[h>>0]|0)+-48<<3)>>2]|0;else{if(r){l=-1;break e}if(!ze){V=C,a=h,r=0,A0=0;break}r=(e[n>>2]|0)+3&-4,c=e[r>>2]|0,e[n>>2]=r+4,r=0,a=h}(c|0)<0?(V=C|8192,A0=0-c|0):(V=C,A0=c)}else if(h=(c<<24>>24)+-48|0,h>>>0<10){c=0;do c=(c*10|0)+h|0,a=a+1|0,h=(d[a>>0]|0)+-48|0;while(h>>>0<10);if((c|0)<0){l=-1;break e}else V=C,A0=c}else V=C,A0=0;while(!1);i:do if((d[a>>0]|0)==46){if(h=a+1|0,c=d[h>>0]|0,c<<24>>24!=42){if(g=(c<<24>>24)+-48|0,g>>>0<10)a=h,c=0;else{a=h,g=0;break}for(;;)if(c=(c*10|0)+g|0,a=a+1|0,g=(d[a>>0]|0)+-48|0,g>>>0>=10){g=c;break i}}if(h=a+2|0,c=(d[h>>0]|0)+-48|0,c>>>0<10&&(d[a+3>>0]|0)==36){e[o+(c<<2)>>2]=10,a=a+4|0,g=e[s+((d[h>>0]|0)+-48<<3)>>2]|0;break}if(r){l=-1;break e}ze?(a=(e[n>>2]|0)+3&-4,g=e[a>>2]|0,e[n>>2]=a+4,a=h):(a=h,g=0)}else g=-1;while(!1);for(I=0;;){if(c=(d[a>>0]|0)+-65|0,c>>>0>57){l=-1;break e}if(h=a+1|0,c=d[56223+(I*58|0)+c>>0]|0,C=c&255,(C+-1|0)>>>0<8)a=h,I=C;else{v0=h;break}}if(!(c<<24>>24)){l=-1;break}h=(k|0)>-1;do if(c<<24>>24==19)if(h){l=-1;break e}else Y0=52;else{if(h){e[o+(k<<2)>>2]=C,s0=s+(k<<3)|0,w0=e[s0+4>>2]|0,Y0=ti,e[Y0>>2]=e[s0>>2],e[Y0+4>>2]=w0,Y0=52;break}if(!ze){l=0;break e}F2(ti,C,n)}while(!1);if((Y0|0)==52&&(Y0=0,!ze)){B=v0,a=O;continue}k=d[a>>0]|0,k=(I|0)!=0&(k&15|0)==3?k&-33:k,h=V&-65537,w0=V&8192|0?h:V;i:do switch(k|0){case 110:switch(I|0){case 0:{e[e[ti>>2]>>2]=l,B=v0,a=O;continue e}case 1:{e[e[ti>>2]>>2]=l,B=v0,a=O;continue e}case 2:{B=e[ti>>2]|0,e[B>>2]=l,e[B+4>>2]=((l|0)<0)<<31>>31,B=v0,a=O;continue e}case 3:{E[e[ti>>2]>>1]=l,B=v0,a=O;continue e}case 4:{d[e[ti>>2]>>0]=l,B=v0,a=O;continue e}case 6:{e[e[ti>>2]>>2]=l,B=v0,a=O;continue e}case 7:{B=e[ti>>2]|0,e[B>>2]=l,e[B+4>>2]=((l|0)<0)<<31>>31,B=v0,a=O;continue e}default:{B=v0,a=O;continue e}}case 112:{I=w0|8,g=g>>>0>8?g:8,k=120,Y0=64;break}case 88:case 120:{I=w0,Y0=64;break}case 111:{if(h=ti,c=e[h>>2]|0,h=e[h+4>>2]|0,(c|0)==0&(h|0)==0)a=Re;else{a=Re;do a=a+-1|0,d[a>>0]=c&7|48,c=Dt(c|0,h|0,3)|0,h=I0;while(!((c|0)==0&(h|0)==0))}w0&8?(I=fe-a+1|0,c=w0,g=(g|0)<(I|0)?I:g,I=0,C=56703,Y0=77):(c=w0,I=0,C=56703,Y0=77);break}case 105:case 100:{if(c=ti,a=e[c>>2]|0,c=e[c+4>>2]|0,(c|0)<0){a=Ji(0,0,a|0,c|0)|0,c=I0,h=ti,e[h>>2]=a,e[h+4>>2]=c,h=1,C=56703,Y0=76;break i}w0&2048?(h=1,C=56704,Y0=76):(C=w0&1,h=C,C=C|0?56705:56703,Y0=76);break}case 117:{c=ti,a=e[c>>2]|0,c=e[c+4>>2]|0,h=0,C=56703,Y0=76;break}case 99:{d[vi>>0]=e[ti>>2],B=vi,c=1,I=0,k=56703,a=Re;break}case 109:{a=di()|0,a=gn(e[a>>2]|0)|0,Y0=82;break}case 115:{a=e[ti>>2]|0,a=a|0?a:56713,Y0=82;break}case 67:{e[Ei>>2]=e[ti>>2],e[Ti>>2]=0,e[ti>>2]=Ei,g=-1,Y0=86;break}case 83:{g?Y0=86:(Bi(t,32,A0,0,w0),a=0,Y0=98);break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{p=+H[ti>>3],e[gi>>2]=0,H[G>>3]=p,(e[G+4>>2]|0)>=0?w0&2048?(Z=1,s0=56723):(s0=w0&1,Z=s0,s0=s0|0?56726:56721):(p=-p,Z=1,s0=56720),H[G>>3]=p,t0=e[G+4>>2]&2146435072;do if(t0>>>0<2146435072|(t0|0)==2146435072&!1){if(U=+hp(p,gi)*2,c=U!=0,c&&(e[gi>>2]=(e[gi>>2]|0)+-1),X=k|32,(X|0)==97){B=k&32,O=B|0?s0+9|0:s0,V=Z|2,a=12-g|0;do if(g>>>0>11|(a|0)==0)p=U;else{p=8;do a=a+-1|0,p=p*16;while(a|0);if((d[O>>0]|0)==45){p=-(p+(-U-p));break}else{p=U+p-p;break}}while(!1);for(c=e[gi>>2]|0,a=(c|0)<0?0-c|0:c,a=qt(a,((a|0)<0)<<31>>31,mi)|0,(a|0)==(mi|0)&&(d[_0>>0]=48,a=_0),d[a+-1>>0]=(c>>31&2)+43,I=a+-2|0,d[I>>0]=k+15,C=(g|0)<1,h=(w0&8|0)==0,c=yi;;){s0=~~p,a=c+1|0,d[c>>0]=N[56687+s0>>0]|B,p=(p-+(s0|0))*16;do if((a-he|0)==1){if(h&(C&p==0))break;d[a>>0]=46,a=c+2|0}while(!1);if(p==0)break;c=a}g=(g|0)!=0&(ei+a|0)<(g|0)?We+g-I|0:li-I+a|0,h=g+V|0,Bi(t,32,A0,h,w0),e[t>>2]&32||Ui(O,V,t)|0,Bi(t,48,A0,h,w0^65536),a=a-he|0,e[t>>2]&32||Ui(yi,a,t)|0,c=Pe-I|0,Bi(t,48,g-(a+c)|0,0,0),e[t>>2]&32||Ui(I,c,t)|0,Bi(t,32,A0,h,w0^8192),a=(h|0)<(A0|0)?A0:h;break}a=(g|0)<0?6:g,c?(c=(e[gi>>2]|0)+-28|0,e[gi>>2]=c,p=U*268435456):(p=U,c=e[gi>>2]|0),t0=(c|0)<0?fi:_e,K=t0,c=t0;do M=~~p>>>0,e[c>>2]=M,c=c+4|0,p=(p-+(M>>>0))*1e9;while(p!=0);if(h=c,c=e[gi>>2]|0,(c|0)>0)for(C=t0;;){I=(c|0)>29?29:c,g=h+-4|0;do if(g>>>0>>0)g=C;else{c=0;do M=pi(e[g>>2]|0,0,I|0)|0,M=Li(M|0,I0|0,c|0,0)|0,c=I0,F=S1(M|0,c|0,1e9,0)|0,e[g>>2]=F,c=pr(M|0,c|0,1e9,0)|0,g=g+-4|0;while(g>>>0>=C>>>0);if(!c){g=C;break}g=C+-4|0,e[g>>2]=c}while(!1);for(;!(h>>>0<=g>>>0);)if(c=h+-4|0,!(e[c>>2]|0))h=c;else break;if(c=(e[gi>>2]|0)-I|0,e[gi>>2]=c,(c|0)>0)C=g;else break}else g=t0;if((c|0)<0)for(O=((a+25|0)/9|0)+1|0,_=(X|0)==102,B=g;;){V=0-c|0,V=(V|0)>9?9:V;do if(B>>>0>>0){c=(1<>>V,g=0,I=B;do M=e[I>>2]|0,e[I>>2]=(M>>>V)+g,g=W(M&c,C)|0,I=I+4|0;while(I>>>0>>0);if(c=e[B>>2]|0?B:B+4|0,!g){g=c;break}e[h>>2]=g,g=c,h=h+4|0}else g=e[B>>2]|0?B:B+4|0;while(!1);if(c=_?t0:g,h=(h-c>>2|0)>(O|0)?c+(O<<2)|0:h,c=(e[gi>>2]|0)+V|0,e[gi>>2]=c,(c|0)>=0){B=g;break}else B=g}else B=g;do if(B>>>0>>0){if(c=(K-B>>2)*9|0,C=e[B>>2]|0,C>>>0<10)break;g=10;do g=g*10|0,c=c+1|0;while(C>>>0>=g>>>0)}else c=0;while(!1);if(F=(X|0)==103,M=(a|0)!=0,g=a-((X|0)!=102?c:0)+((M&F)<<31>>31)|0,(g|0)<(((h-K>>2)*9|0)+-9|0)){if(I=g+9216|0,_=(I|0)/9|0,g=t0+(_+-1023<<2)|0,I=((I|0)%9|0)+1|0,(I|0)<9){C=10;do C=C*10|0,I=I+1|0;while((I|0)!=9)}else C=10;V=e[g>>2]|0,O=(V>>>0)%(C>>>0)|0,!(O|0)&&(t0+(_+-1022<<2)|0)==(h|0)?C=B:Y0=163;do if((Y0|0)==163){Y0=0,U=((V>>>0)/(C>>>0)|0)&1|0?9007199254740994:9007199254740992,I=(C|0)/2|0;do if(O>>>0>>0)p=.5;else{if((O|0)==(I|0)&&(t0+(_+-1022<<2)|0)==(h|0)){p=1;break}p=1.5}while(!1);do if(Z){if((d[s0>>0]|0)!=45)break;U=-U,p=-p}while(!1);if(I=V-O|0,e[g>>2]=I,U+p==U){C=B;break}if(X=I+C|0,e[g>>2]=X,X>>>0>999999999)for(c=B;;)if(C=g+-4|0,e[g>>2]=0,C>>>0>>0&&(c=c+-4|0,e[c>>2]=0),X=(e[C>>2]|0)+1|0,e[C>>2]=X,X>>>0>999999999)g=C;else{B=c,g=C;break}if(c=(K-B>>2)*9|0,I=e[B>>2]|0,I>>>0<10){C=B;break}else C=10;do C=C*10|0,c=c+1|0;while(I>>>0>=C>>>0);C=B}while(!1);X=g+4|0,B=C,h=h>>>0>X>>>0?X:h}for(O=0-c|0;;){if(h>>>0<=B>>>0){_=0,X=h;break}if(g=h+-4|0,!(e[g>>2]|0))h=g;else{_=1,X=h;break}}do if(F){if(a=(M&1^1)+a|0,(a|0)>(c|0)&(c|0)>-5?(k=k+-1|0,a=a+-1-c|0):(k=k+-2|0,a=a+-1|0),h=w0&8,h)break;do if(_){if(h=e[X+-4>>2]|0,!h){g=9;break}if(!((h>>>0)%10|0))C=10,g=0;else{g=0;break}do C=C*10|0,g=g+1|0;while(!((h>>>0)%(C>>>0)|0|0))}else g=9;while(!1);if(h=((X-K>>2)*9|0)+-9|0,(k|32|0)==102){h=h-g|0,h=(h|0)<0?0:h,a=(a|0)<(h|0)?a:h,h=0;break}else{h=h+c-g|0,h=(h|0)<0?0:h,a=(a|0)<(h|0)?a:h,h=0;break}}else h=w0&8;while(!1);if(V=a|h,C=(V|0)!=0&1,I=(k|32|0)==102,I)c=(c|0)>0?c:0,k=0;else{if(g=(c|0)<0?O:c,g=qt(g,((g|0)<0)<<31>>31,mi)|0,(Pe-g|0)<2)do g=g+-1|0,d[g>>0]=48;while((Pe-g|0)<2);d[g+-1>>0]=(c>>31&2)+43,K=g+-2|0,d[K>>0]=k,c=Pe-K|0,k=K}O=Z+1+a+C+c|0,Bi(t,32,A0,O,w0),e[t>>2]&32||Ui(s0,Z,t)|0,Bi(t,48,A0,O,w0^65536);do if(I){g=B>>>0>t0>>>0?t0:B,c=g;do{h=qt(e[c>>2]|0,0,le)|0;do if((c|0)==(g|0)){if((h|0)!=(le|0))break;d[ne>>0]=48,h=ne}else{if(h>>>0<=yi>>>0)break;do h=h+-1|0,d[h>>0]=48;while(h>>>0>yi>>>0)}while(!1);e[t>>2]&32||Ui(h,Ve-h|0,t)|0,c=c+4|0}while(c>>>0<=t0>>>0);do if(V){if(e[t>>2]&32)break;Ui(56755,1,t)|0}while(!1);if((a|0)>0&c>>>0>>0)for(h=c;;){if(c=qt(e[h>>2]|0,0,le)|0,c>>>0>yi>>>0)do c=c+-1|0,d[c>>0]=48;while(c>>>0>yi>>>0);if(e[t>>2]&32||Ui(c,(a|0)>9?9:a,t)|0,h=h+4|0,c=a+-9|0,(a|0)>9&h>>>0>>0)a=c;else{a=c;break}}Bi(t,48,a+9|0,9,0)}else{if(I=_?X:B+4|0,(a|0)>-1){C=(h|0)==0,g=B;do{c=qt(e[g>>2]|0,0,le)|0,(c|0)==(le|0)&&(d[ne>>0]=48,c=ne);do if((g|0)==(B|0)){if(h=c+1|0,e[t>>2]&32||Ui(c,1,t)|0,C&(a|0)<1){c=h;break}if(e[t>>2]&32){c=h;break}Ui(56755,1,t)|0,c=h}else{if(c>>>0<=yi>>>0)break;do c=c+-1|0,d[c>>0]=48;while(c>>>0>yi>>>0)}while(!1);h=Ve-c|0,e[t>>2]&32||Ui(c,(a|0)>(h|0)?h:a,t)|0,a=a-h|0,g=g+4|0}while(g>>>0>>0&(a|0)>-1)}if(Bi(t,48,a+18|0,18,0),e[t>>2]&32)break;Ui(k,Pe-k|0,t)|0}while(!1);Bi(t,32,A0,O,w0^8192),a=(O|0)<(A0|0)?A0:O}else I=(k&32|0)!=0,C=p!=p|!1,c=C?0:Z,g=c+3|0,Bi(t,32,A0,g,h),a=e[t>>2]|0,a&32||(Ui(s0,c,t)|0,a=e[t>>2]|0),a&32||Ui(C?I?56747:56751:I?56739:56743,3,t)|0,Bi(t,32,A0,g,w0^8192),a=(g|0)<(A0|0)?A0:g;while(!1);B=v0;continue e}default:h=w0,c=g,I=0,k=56703,a=Re}while(!1);i:do if((Y0|0)==64)if(h=ti,c=e[h>>2]|0,h=e[h+4>>2]|0,C=k&32,(c|0)==0&(h|0)==0)a=Re,c=I,I=0,C=56703,Y0=77;else{a=Re;do a=a+-1|0,d[a>>0]=N[56687+(c&15)>>0]|C,c=Dt(c|0,h|0,4)|0,h=I0;while(!((c|0)==0&(h|0)==0));Y0=ti,(I&8|0)==0|(e[Y0>>2]|0)==0&(e[Y0+4>>2]|0)==0?(c=I,I=0,C=56703,Y0=77):(c=I,I=2,C=56703+(k>>4)|0,Y0=77)}else if((Y0|0)==76)a=qt(a,c,Re)|0,c=w0,I=h,Y0=77;else if((Y0|0)==82)Y0=0,w0=Pn(a,0,g)|0,s0=(w0|0)==0,B=a,c=s0?g:w0-a|0,I=0,k=56703,a=s0?a+g|0:w0;else if((Y0|0)==86){for(Y0=0,c=0,a=0,C=e[ti>>2]|0;h=e[C>>2]|0,!(!h||(a=yn(xt,h)|0,(a|0)<0|a>>>0>(g-c|0)>>>0));)if(c=a+c|0,g>>>0>c>>>0)C=C+4|0;else break;if((a|0)<0){l=-1;break e}if(Bi(t,32,A0,c,w0),!c)a=0,Y0=98;else for(h=0,g=e[ti>>2]|0;;){if(a=e[g>>2]|0,!a){a=c,Y0=98;break i}if(a=yn(xt,a)|0,h=a+h|0,(h|0)>(c|0)){a=c,Y0=98;break i}if(e[t>>2]&32||Ui(xt,a,t)|0,h>>>0>=c>>>0){a=c,Y0=98;break}else g=g+4|0}}while(!1);if((Y0|0)==98){Y0=0,Bi(t,32,A0,a,w0^8192),B=v0,a=(A0|0)>(a|0)?A0:a;continue}(Y0|0)==77&&(Y0=0,h=(g|0)>-1?c&-65537:c,c=ti,c=(e[c>>2]|0)!=0|(e[c+4>>2]|0)!=0,(g|0)!=0|c?(c=(c&1^1)+(fe-a)|0,B=a,c=(g|0)>(c|0)?g:c,k=C,a=Re):(B=Re,c=0,k=C,a=Re)),C=a-B|0,c=(c|0)<(C|0)?C:c,g=I+c|0,a=(A0|0)<(g|0)?g:A0,Bi(t,32,a,g,h),e[t>>2]&32||Ui(k,I,t)|0,Bi(t,48,a,g,h^65536),Bi(t,48,c,C,0),e[t>>2]&32||Ui(B,C,t)|0,Bi(t,32,a,g,h^8192),B=v0}e:do if((Y0|0)==245&&!t)if(r){for(l=1;r=e[o+(l<<2)>>2]|0,!!r;)if(F2(s+(l<<3)|0,r,n),l=l+1|0,(l|0)>=10){l=1;break e}if((l|0)<10)for(;;){if(e[o+(l<<2)>>2]|0){l=-1;break e}if(l=l+1|0,(l|0)>=10){l=1;break}}else l=1}else l=0;while(!1);return y=gt,l|0}function ph(t,r,n){return t=t|0,r=r|0,n=n|0,xp(t,r,n)|0}function Ah(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;c=y,y=y+112|0,a=c,o=a,l=o+112|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(l|0));return o=a+4|0,e[o>>2]=t,l=a+8|0,e[l>>2]=-1,e[a+44>>2]=t,e[a+76>>2]=-1,rt(a,0),s=+pn(a,n,1),n=(e[o>>2]|0)-(e[l>>2]|0)+(e[a+108>>2]|0)|0,r&&(e[r>>2]=n|0?t+n|0:t),y=c,+s}function k2(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0;return h=y,y=y+112|0,c=h,e[c>>2]=0,l=c+4|0,e[l>>2]=t,e[c+44>>2]=t,a=c+8|0,e[a>>2]=(t|0)<0?-1:t+2147483647|0,e[c+76>>2]=-1,rt(c,0),s=An(c,n,1,s,o)|0,r&&(e[r>>2]=t+((e[l>>2]|0)+(e[c+108>>2]|0)-(e[a>>2]|0))),y=h,s|0}function Sh(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;return s=t+20|0,o=e[s>>2]|0,t=(e[t+16>>2]|0)-o|0,t=t>>>0>n>>>0?n:t,ii(o|0,r|0,t|0)|0,e[s>>2]=(e[s>>2]|0)+t,n|0}function F2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;e:do if(r>>>0<=20)do switch(r|0){case 9:{s=(e[n>>2]|0)+3&-4,r=e[s>>2]|0,e[n>>2]=s+4,e[t>>2]=r;break e}case 10:{s=(e[n>>2]|0)+3&-4,r=e[s>>2]|0,e[n>>2]=s+4,s=t,e[s>>2]=r,e[s+4>>2]=((r|0)<0)<<31>>31;break e}case 11:{s=(e[n>>2]|0)+3&-4,r=e[s>>2]|0,e[n>>2]=s+4,s=t,e[s>>2]=r,e[s+4>>2]=0;break e}case 12:{s=(e[n>>2]|0)+7&-8,r=s,o=e[r>>2]|0,r=e[r+4>>2]|0,e[n>>2]=s+8,s=t,e[s>>2]=o,e[s+4>>2]=r;break e}case 13:{o=(e[n>>2]|0)+3&-4,s=e[o>>2]|0,e[n>>2]=o+4,s=(s&65535)<<16>>16,o=t,e[o>>2]=s,e[o+4>>2]=((s|0)<0)<<31>>31;break e}case 14:{o=(e[n>>2]|0)+3&-4,s=e[o>>2]|0,e[n>>2]=o+4,o=t,e[o>>2]=s&65535,e[o+4>>2]=0;break e}case 15:{o=(e[n>>2]|0)+3&-4,s=e[o>>2]|0,e[n>>2]=o+4,s=(s&255)<<24>>24,o=t,e[o>>2]=s,e[o+4>>2]=((s|0)<0)<<31>>31;break e}case 16:{o=(e[n>>2]|0)+3&-4,s=e[o>>2]|0,e[n>>2]=o+4,o=t,e[o>>2]=s&255,e[o+4>>2]=0;break e}case 17:{o=(e[n>>2]|0)+7&-8,l=+H[o>>3],e[n>>2]=o+8,H[t>>3]=l;break e}case 18:{o=(e[n>>2]|0)+7&-8,l=+H[o>>3],e[n>>2]=o+8,H[t>>3]=l;break e}default:break e}while(!1);while(!1)}function qt(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if(r>>>0>0|(r|0)==0&t>>>0>4294967295)for(;;)if(s=S1(t|0,r|0,10,0)|0,n=n+-1|0,d[n>>0]=s|48,s=pr(t|0,r|0,10,0)|0,r>>>0>9|(r|0)==9&t>>>0>4294967295)t=s,r=I0;else{t=s;break}if(t)for(;n=n+-1|0,d[n>>0]=(t>>>0)%10|0|48,!(t>>>0<10);)t=(t>>>0)/10|0;return n|0}function Bi(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0;c=y,y=y+256|0,a=c;do if((n|0)>(s|0)&(o&73728|0)==0){if(o=n-s|0,je(a|0,r|0,(o>>>0>256?256:o)|0)|0,r=e[t>>2]|0,l=(r&32|0)==0,o>>>0>255){s=n-s|0;do l&&(Ui(a,256,t)|0,r=e[t>>2]|0),o=o+-256|0,l=(r&32|0)==0;while(o>>>0>255);if(l)o=s&255;else break}else if(!l)break;Ui(a,o,t)|0}while(!1);y=c}function xi(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,ei=0,We=0,_e=0,le=0,Ve=0,ne=0;do if(t>>>0<245){if(k=t>>>0<11?16:t+11&-8,t=k>>>3,c=e[10218]|0,n=c>>>t,n&3){t=(n&1^1)+t|0,s=t<<1,n=40912+(s<<2)|0,s=40912+(s+2<<2)|0,o=e[s>>2]|0,l=o+8|0,a=e[l>>2]|0;do if((n|0)!=(a|0))if(a>>>0<(e[10222]|0)>>>0&&ae(),r=a+12|0,(e[r>>2]|0)==(o|0)){e[r>>2]=n,e[s>>2]=a;break}else ae();else e[10218]=c&~(1<>2]=ne|3,ne=o+(ne|4)|0,e[ne>>2]=e[ne>>2]|1,ne=l,ne|0}if(a=e[10220]|0,k>>>0>a>>>0){if(n){s=2<>>12&16,s=s>>>h,o=s>>>5&8,s=s>>>o,l=s>>>2&4,s=s>>>l,n=s>>>1&2,s=s>>>n,t=s>>>1&1,t=(o|h|l|n|t)+(s>>>t)|0,s=t<<1,n=40912+(s<<2)|0,s=40912+(s+2<<2)|0,l=e[s>>2]|0,h=l+8|0,o=e[h>>2]|0;do if((n|0)!=(o|0))if(o>>>0<(e[10222]|0)>>>0&&ae(),r=o+12|0,(e[r>>2]|0)==(l|0)){e[r>>2]=n,e[s>>2]=o,p=e[10220]|0;break}else ae();else e[10218]=c&~(1<>2]=k|3,c=l+k|0,e[l+(k|4)>>2]=a|1,e[l+ne>>2]=a,p&&(o=e[10223]|0,n=p>>>3,r=n<<1,s=40912+(r<<2)|0,t=e[10218]|0,n=1<>2]|0,r>>>0<(e[10222]|0)>>>0?ae():(g=t,C=r)):(e[10218]=t|n,g=40912+(r+2<<2)|0,C=s),e[g>>2]=o,e[C+12>>2]=o,e[o+8>>2]=C,e[o+12>>2]=s),e[10220]=a,e[10223]=c,ne=h,ne|0}if(t=e[10219]|0,t){for(n=(t&0-t)+-1|0,Ve=n>>>12&16,n=n>>>Ve,le=n>>>5&8,n=n>>>le,ne=n>>>2&4,n=n>>>ne,t=n>>>1&2,n=n>>>t,s=n>>>1&1,s=e[41176+((le|Ve|ne|t|s)+(n>>>s)<<2)>>2]|0,n=(e[s+4>>2]&-8)-k|0,t=s;;){if(r=e[t+16>>2]|0,!r&&(r=e[t+20>>2]|0,!r)){h=n;break}t=(e[r+4>>2]&-8)-k|0,ne=t>>>0>>0,n=ne?t:n,t=r,s=ne?r:s}l=e[10222]|0,s>>>0>>0&&ae(),c=s+k|0,s>>>0>=c>>>0&&ae(),a=e[s+24>>2]|0,n=e[s+12>>2]|0;do if((n|0)==(s|0)){if(t=s+20|0,r=e[t>>2]|0,!r&&(t=s+16|0,r=e[t>>2]|0,!r)){I=0;break}for(;;){if(n=r+20|0,o=e[n>>2]|0,o){r=o,t=n;continue}if(n=r+16|0,o=e[n>>2]|0,o)r=o,t=n;else break}if(t>>>0>>0)ae();else{e[t>>2]=0,I=r;break}}else if(o=e[s+8>>2]|0,o>>>0>>0&&ae(),r=o+12|0,(e[r>>2]|0)!=(s|0)&&ae(),t=n+8|0,(e[t>>2]|0)==(s|0)){e[r>>2]=n,e[t>>2]=o,I=n;break}else ae();while(!1);do if(a){if(r=e[s+28>>2]|0,t=41176+(r<<2)|0,(s|0)==(e[t>>2]|0)){if(e[t>>2]=I,!I){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),r=a+16|0,(e[r>>2]|0)==(s|0)?e[r>>2]=I:e[a+20>>2]=I,!I)break;t=e[10222]|0,I>>>0>>0&&ae(),e[I+24>>2]=a,r=e[s+16>>2]|0;do if(r)if(r>>>0>>0)ae();else{e[I+16>>2]=r,e[r+24>>2]=I;break}while(!1);if(r=e[s+20>>2]|0,r)if(r>>>0<(e[10222]|0)>>>0)ae();else{e[I+20>>2]=r,e[r+24>>2]=I;break}}while(!1);return h>>>0<16?(ne=h+k|0,e[s+4>>2]=ne|3,ne=s+(ne+4)|0,e[ne>>2]=e[ne>>2]|1):(e[s+4>>2]=k|3,e[s+(k|4)>>2]=h|1,e[s+(h+k)>>2]=h,r=e[10220]|0,r&&(l=e[10223]|0,n=r>>>3,r=n<<1,o=40912+(r<<2)|0,t=e[10218]|0,n=1<>2]|0,t>>>0<(e[10222]|0)>>>0?ae():(U=r,B=t)):(e[10218]=t|n,U=40912+(r+2<<2)|0,B=o),e[U>>2]=l,e[B+12>>2]=l,e[l+8>>2]=B,e[l+12>>2]=o),e[10220]=h,e[10223]=c),ne=s+8|0,ne|0}else B=k}else B=k}else if(t>>>0<=4294967231)if(t=t+11|0,C=t&-8,g=e[10219]|0,g){n=0-C|0,t=t>>>8,t?C>>>0>16777215?p=31:(B=(t+1048320|0)>>>16&8,M=t<>>16&4,M=M<>>16&2,p=14-(U|B|p)+(M<

>>0?p:h,h=h>>>0<11?11:h+16&-16):h=-17,p=G0(h)|0,o&&ii(p|0,g|0,o|0)|0,a&&ii(p+o|0,c|0,a|0)|0,n=s-l|0,(n|0)!=(o|0)&&ii(p+(a+o)|0,g+(l+o)|0,n-o|0)|0,(r|0)!=10&&a0(g),e[t+8>>2]=p,e[t>>2]=h|1,r=n+a|0,e[t+4>>2]=r,d[p+r>>0]=0}function f1(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0;(-17-r|0)>>>0>>0&&tt(t),d[t>>0]&1?p=e[t+8>>2]|0:p=t+1|0,r>>>0<2147483623?(c=n+r|0,h=r<<1,c=c>>>0>>0?h:c,c=c>>>0<11?11:c+16&-16):c=-17,h=G0(c)|0,o&&ii(h|0,p|0,o|0)|0,n=s-l|0,(n|0)!=(o|0)&&ii(h+(a+o)|0,p+(l+o)|0,n-o|0)|0,(r|0)!=10&&a0(p),e[t+8>>2]=h,e[t>>2]=c|1}function u1(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;n>>>0>1073741807&&tt(t),n>>>0<2?(d[t>>0]=n<<1,t=t+4|0):(o=n+4&-4,s=G0(o<<2)|0,e[t+8>>2]=s,e[t>>2]=o|1,e[t+4>>2]=n,t=s),Nt(t,r,n)|0,e[t+(n<<2)>>2]=0}function c1(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;r>>>0>1073741807&&tt(t),r>>>0<2?(d[t>>0]=r<<1,t=t+4|0):(o=r+4&-4,s=G0(o<<2)|0,e[t+8>>2]=s,e[t>>2]=o|1,e[t+4>>2]=r,t=s),Rp(t,n,r)|0,e[t+(r<<2)>>2]=0}function ye(t){t=t|0,d[t>>0]&1&&a0(e[t+8>>2]|0)}function d5(t,r){return t=t|0,r=r|0,g5(t,r,Mr(r)|0)|0}function g5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;s=d[t>>0]|0,s&1?(s=e[t>>2]|0,l=(s&-2)+-1|0,s=s&255):l=1,o=(s&1)==0;do if(l>>>0>=n>>>0)if(o?s=t+4|0:s=e[t+8>>2]|0,_p(s,r,n)|0,e[s+(n<<2)>>2]=0,d[t>>0]&1){e[t+4>>2]=n;break}else{d[t>>0]=n<<1;break}else o?s=(s&255)>>>1:s=e[t+4>>2]|0,S5(t,l,n-l|0,s,0,s,n,r);while(!1);return t|0}function p5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;r>>>0>1073741807&&tt(t),n=d[t>>0]|0,n&1?(n=e[t>>2]|0,s=(n&-2)+-1|0,n=n&255):s=1,n&1?c=e[t+4>>2]|0:c=(n&255)>>>1,r=c>>>0>r>>>0?c:r,r>>>0<2?a=1:a=(r+4&-4)+-1|0;e:do if((a|0)!=(s|0)){do if((a|0)!=1){if(r=(a<<2)+4|0,a>>>0<=s>>>0){if(f=0,r=u0(67,r|0)|0,l=f,f=0,l&1){t=b(0)|0,zi(t|0)|0,Wi();break e}}else r=G0(r)|0;if(n&1){s=1,o=e[t+8>>2]|0,l=1;break}else{s=1,o=t+4|0,l=0;break}}else r=t+4|0,s=0,o=e[t+8>>2]|0,l=1;while(!1);if(n&1?n=e[t+4>>2]|0:n=(n&255)>>>1,Nt(r,o,n+1|0)|0,l&&a0(o),s){e[t>>2]=a+1|1,e[t+4>>2]=c,e[t+8>>2]=r;break}else{d[t>>0]=c<<1;break}}while(!1)}function A5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;n=d[t>>0]|0,s=(n&1)!=0,s?(o=(e[t>>2]&-2)+-1|0,l=e[t+4>>2]|0):(o=1,l=(n&255)>>>1),(l|0)==(o|0)?(V2(t,o,1,o,o,0,0),d[t>>0]&1?o=8:o=7):s?o=8:o=7,(o|0)==7?(d[t>>0]=(l<<1)+2,n=t+4|0,s=l+1|0):(o|0)==8&&(n=e[t+8>>2]|0,s=l+1|0,e[t+4>>2]=s),e[n+(l<<2)>>2]=r,e[n+(s<<2)>>2]=0}function S5(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0;(1073741806-r|0)>>>0>>0&&tt(t),d[t>>0]&1?g=e[t+8>>2]|0:g=t+4|0,r>>>0<536870887?(h=n+r|0,p=r<<1,h=h>>>0

>>0?p:h,h=h>>>0<2?2:h+4&-4):h=1073741807,p=G0(h<<2)|0,o&&Nt(p,g,o)|0,a&&Nt(p+(o<<2)|0,c,a)|0,n=s-l|0,(n|0)!=(o|0)&&Nt(p+(a+o<<2)|0,g+(l+o<<2)|0,n-o|0)|0,(r|0)!=1&&a0(g),e[t+8>>2]=p,e[t>>2]=h|1,r=n+a|0,e[t+4>>2]=r,e[p+(r<<2)>>2]=0}function V2(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0;(1073741807-r|0)>>>0>>0&&tt(t),d[t>>0]&1?p=e[t+8>>2]|0:p=t+4|0,r>>>0<536870887?(c=n+r|0,h=r<<1,c=c>>>0>>0?h:c,c=c>>>0<2?2:c+4&-4):c=1073741807,h=G0(c<<2)|0,o&&Nt(h,p,o)|0,n=s-l|0,(n|0)!=(o|0)&&Nt(h+(a+o<<2)|0,p+(l+o<<2)|0,n-o|0)|0,(r|0)!=1&&a0(p),e[t+8>>2]=h,e[t>>2]=c|1}function v5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;if(o=r,s=n-o|0,s>>>0>4294967279&&tt(t),s>>>0<11?(d[t>>0]=s<<1,l=t+1|0):(a=s+16&-16,l=G0(a)|0,e[t+8>>2]=l,e[t>>2]=a|1,e[t+4>>2]=s),t=n-o|0,(r|0)!=(n|0))for(s=l;d[s>>0]=d[r>>0]|0,r=r+1|0,(r|0)!=(n|0);)s=s+1|0;d[l+t>>0]=0}function w5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;if(l=r,s=n-l|0,o=s>>2,o>>>0>1073741807&&tt(t),o>>>0<2?(d[t>>0]=s>>>1,t=t+4|0):(a=o+4&-4,s=G0(a<<2)|0,e[t+8>>2]=s,e[t>>2]=a|1,e[t+4>>2]=o,t=s),o=(n-l|0)>>>2,(r|0)!=(n|0))for(s=t;e[s>>2]=e[r>>2],r=r+4|0,(r|0)!=(n|0);)s=s+4|0;e[t+(o<<2)>>2]=0}function T5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;if(n=y,y=y+16|0,s=n,o=(e[t+24>>2]|0)==0,e[t+16>>2]=o&1|r,!((o&1|r)&e[t+20>>2])){y=n;return}r=de(16)|0,g3()|0,e[s>>2]=1,e[s+4>>2]=43112,f=0,m0(11,r|0,57437,s|0),o=f,f=0,o&1?(o=b()|0,ge(r|0),r0(o|0)):Be(r|0,864,112)}function Vi(t){t=t|0;var r=0;if(e[t>>2]=43068,f=0,h0(88,t|0,0),r=f,f=0,r&1)r=b(0)|0,Ie(r);else{Mi(t+28|0),Ze(e[t+32>>2]|0),Ze(e[t+36>>2]|0),Ze(e[t+48>>2]|0),Ze(e[t+60>>2]|0);return}}function H0(t){t=t|0,Vi(t)}function nA(t){t=t|0,Vi(t),a0(t)}function C5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;if(n=e[t+40>>2]|0,s=t+32|0,o=t+36|0,n)do n=n+-1|0,Rr[e[(e[s>>2]|0)+(n<<2)>>2]&15](r,t,e[(e[o>>2]|0)+(n<<2)>>2]|0);while(n|0)}function ai(t){t=t|0;var r=0,n=0;return n=y,y=y+16|0,r=n,$t(r,t+28|0),y=n,e[r>>2]|0}function x5(t,r){t=t|0,r=r|0;var n=0;e[t+24>>2]=r,e[t+16>>2]=(r|0)==0&1,e[t+20>>2]=0,e[t+4>>2]=4098,e[t+12>>2]=0,e[t+8>>2]=6,n=t+28|0,r=t+32|0,t=r+40|0;do e[r>>2]=0,r=r+4|0;while((r|0)<(t|0));n1(n)}function cr(t){t=t|0,Vi(t)}function sA(t){t=t|0,Vi(t),a0(t)}function ce(t){t=t|0,e[t>>2]=42760,Mi(t+4|0)}function y5(t){t=t|0,e[t>>2]=42760,Mi(t+4|0),a0(t)}function h1(t){t=t|0,e[t>>2]=42760,n1(t+4|0),t=t+8|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[t+20>>2]=0}function I5(t,r){t=t|0,r=r|0}function D5(t,r,n){return t=t|0,r=r|0,n=n|0,t|0}function E5(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1}function k5(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1}function F5(t){return t=t|0,0}function M5(t){return t=t|0,0}function _5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;l=t+12|0,a=t+16|0;e:do if((n|0)>0)for(o=r,r=0;;){if(s=e[l>>2]|0,s>>>0<(e[a>>2]|0)>>>0)e[l>>2]=s+1,s=d[s>>0]|0;else{if(s=Se[e[(e[t>>2]|0)+40>>2]&127](t)|0,(s|0)==-1)break e;s=s&255}if(d[o>>0]=s,r=r+1|0,(r|0)<(n|0))o=o+1|0;else break}else r=0;while(!1);return r|0}function R5(t){return t=t|0,-1}function P5(t){t=t|0;var r=0;return(Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1?t=-1:(r=t+12|0,t=e[r>>2]|0,e[r>>2]=t+1,t=N[t>>0]|0),t|0}function L5(t,r){return t=t|0,r=r|0,-1}function U5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;l=t+24|0,a=t+28|0;e:do if((n|0)>0)for(o=r,r=0;;){if(s=e[l>>2]|0,s>>>0>=(e[a>>2]|0)>>>0){if((Ni[e[(e[t>>2]|0)+52>>2]&63](t,N[o>>0]|0)|0)==-1)break e}else c=d[o>>0]|0,e[l>>2]=s+1,d[s>>0]=c;if(r=r+1|0,(r|0)<(n|0))o=o+1|0;else break}else r=0;while(!1);return r|0}function O5(t,r){return t=t|0,r=r|0,-1}function ir(t){t=t|0,e[t>>2]=42824,Mi(t+4|0)}function N5(t){t=t|0,e[t>>2]=42824,Mi(t+4|0),a0(t)}function q2(t){t=t|0,e[t>>2]=42824,n1(t+4|0),t=t+8|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[t+20>>2]=0}function B5(t,r){t=t|0,r=r|0}function V5(t,r,n){return t=t|0,r=r|0,n=n|0,t|0}function q5(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1}function b5(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1}function G5(t){return t=t|0,0}function Q5(t){return t=t|0,0}function z5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;l=t+12|0,a=t+16|0;e:do if((n|0)>0)for(o=r,r=0;;){if(s=e[l>>2]|0,s>>>0>=(e[a>>2]|0)>>>0){if(s=Se[e[(e[t>>2]|0)+40>>2]&127](t)|0,(s|0)==-1)break e}else e[l>>2]=s+4,s=e[s>>2]|0;if(e[o>>2]=s,r=r+1|0,(r|0)<(n|0))o=o+4|0;else break}else r=0;while(!1);return r|0}function H5(t){return t=t|0,-1}function Y5(t){t=t|0;var r=0;return(Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1?t=-1:(r=t+12|0,t=e[r>>2]|0,e[r>>2]=t+4,t=e[t>>2]|0),t|0}function j5(t,r){return t=t|0,r=r|0,-1}function X5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;l=t+24|0,a=t+28|0;e:do if((n|0)>0)for(o=r,r=0;;){if(s=e[l>>2]|0,s>>>0>=(e[a>>2]|0)>>>0){if((Ni[e[(e[t>>2]|0)+52>>2]&63](t,e[o>>2]|0)|0)==-1)break e}else c=e[o>>2]|0,e[l>>2]=s+4,e[s>>2]=c;if(r=r+1|0,(r|0)<(n|0))o=o+4|0;else break}else r=0;while(!1);return r|0}function K5(t,r){return t=t|0,r=r|0,-1}function W5(t){t=t|0,Vi(t+8|0)}function Z5(t){t=t|0,Vi(t+((e[(e[t>>2]|0)+-12>>2]|0)+8)|0)}function G2(t){t=t|0,Vi(t+8|0),a0(t)}function J5(t){t=t|0,G2(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)}function Q2(t){t=t|0;var r=0,n=0,s=0,o=0;s=y,y=y+16|0,n=s;e:do if(e[t+((e[(e[t>>2]|0)+-12>>2]|0)+24)>>2]|0){f=0,h0(65,n|0,t|0),r=f,f=0;i:do if(r&1)r=b(0)|0;else{do if(d[n>>0]|0){if(r=e[t+((e[(e[t>>2]|0)+-12>>2]|0)+24)>>2]|0,f=0,r=u0(e[(e[r>>2]|0)+24>>2]|0,r|0)|0,o=f,f=0,!(o&1)&&((r|0)!=-1||(o=e[(e[t>>2]|0)+-12>>2]|0,f=0,h0(66,t+o|0,e[t+(o+16)>>2]|1|0),o=f,f=0,!(o&1))))break;r=b(0)|0,yt(n);break i}while(!1);yt(n);break e}while(!1);if(zi(r|0)|0,f=0,n0(181,t+(e[(e[t>>2]|0)+-12>>2]|0)|0),o=f,f=0,!(o&1)){Wi();break}r=b()|0,f=0,we(3),o=f,f=0,o&1?(o=b(0)|0,Ie(o)):r0(r|0)}while(!1);return y=s,t|0}function $5(t){t=t|0;var r=0;if(r=t+16|0,e[r>>2]=e[r>>2]|1,e[t+20>>2]&1)O1();else return}function e3(t){t=t|0,Vi(t+8|0)}function i3(t){t=t|0,Vi(t+((e[(e[t>>2]|0)+-12>>2]|0)+8)|0)}function z2(t){t=t|0,Vi(t+8|0),a0(t)}function t3(t){t=t|0,z2(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)}function H2(t){t=t|0;var r=0,n=0,s=0,o=0;s=y,y=y+16|0,n=s;e:do if(e[t+((e[(e[t>>2]|0)+-12>>2]|0)+24)>>2]|0){f=0,h0(89,n|0,t|0),r=f,f=0;i:do if(r&1)r=b(0)|0;else{do if(d[n>>0]|0){if(r=e[t+((e[(e[t>>2]|0)+-12>>2]|0)+24)>>2]|0,f=0,r=u0(e[(e[r>>2]|0)+24>>2]|0,r|0)|0,o=f,f=0,!(o&1)&&((r|0)!=-1||(o=e[(e[t>>2]|0)+-12>>2]|0,f=0,h0(66,t+o|0,e[t+(o+16)>>2]|1|0),o=f,f=0,!(o&1))))break;r=b(0)|0,X2(n);break i}while(!1);X2(n);break e}while(!1);if(zi(r|0)|0,f=0,n0(181,t+(e[(e[t>>2]|0)+-12>>2]|0)|0),o=f,f=0,!(o&1)){Wi();break}r=b()|0,f=0,we(3),o=f,f=0,o&1?(o=b(0)|0,Ie(o)):r0(r|0)}while(!1);return y=s,t|0}function oA(t,r){t=t|0,r=r|0}function r3(t){t=t|0,Vi(t+4|0)}function n3(t){t=t|0,Vi(t+((e[(e[t>>2]|0)+-12>>2]|0)+4)|0)}function Y2(t){t=t|0,Vi(t+4|0),a0(t)}function s3(t){t=t|0,Y2(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)}function o3(t,r){t=t|0,r=r|0;var n=0;d[t>>0]=0,e[t+4>>2]=r,n=e[(e[r>>2]|0)+-12>>2]|0,e[r+(n+16)>>2]|0||(n=e[r+(n+72)>>2]|0,n&&Q2(n)|0,d[t>>0]=1)}function yt(t){t=t|0;var r=0,n=0;t=t+4|0,n=e[t>>2]|0,r=e[(e[n>>2]|0)+-12>>2]|0;do if(e[n+(r+24)>>2]|0&&!(e[n+(r+16)>>2]|0)&&e[n+(r+4)>>2]&8192|0&&!(R1()|0)){if(r=e[t>>2]|0,r=e[r+((e[(e[r>>2]|0)+-12>>2]|0)+24)>>2]|0,f=0,r=u0(e[(e[r>>2]|0)+24>>2]|0,r|0)|0,n=f,f=0,!(n&1)&&((r|0)!=-1||(r=e[t>>2]|0,n=e[(e[r>>2]|0)+-12>>2]|0,f=0,h0(66,r+n|0,e[r+(n+16)>>2]|1|0),n=f,f=0,!(n&1))))break;n=b(0)|0,zi(n|0)|0,f=0,we(3),n=f,f=0,n&1&&(n=b(0)|0,Ie(n))}while(!1)}function l3(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;I=y,y=y+32|0,c=I+20|0,h=I+16|0,g=I+8|0,n=I,f=0,h0(65,g|0,t|0),p=f,f=0;e:do if(p&1)n=b(0)|0,s=t,o=t,C=19;else{do if(d[g>>0]|0){if(p=ai(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)|0,e[n>>2]=p,f=0,p=y0(37,n|0,43392)|0,a=f,f=0,a&1)C=b(0)|0,Mi(n),n=C;else{Mi(n),o=e[(e[t>>2]|0)+-12>>2]|0,a=e[t+(o+24)>>2]|0,s=t+o|0,o=t+(o+76)|0,n=e[o>>2]|0;do if((n|0)==-1){if(n=ai(s)|0,e[c>>2]=n,f=0,n=y0(37,c|0,44220)|0,k=f,f=0,!(k&1)&&(f=0,l=y0(e[(e[n>>2]|0)+28>>2]|0,n|0,32)|0,k=f,f=0,!(k&1))){Mi(c),n=l<<24>>24,e[o>>2]=n,C=10;break}n=b(0)|0,Mi(c)}else C=10;while(!1);if((C|0)==10){if(k=e[(e[p>>2]|0)+16>>2]|0,e[h>>2]=a,f=0,e[c>>2]=e[h>>2],n=$(k|0,p|0,c|0,s|0,n&255|0,r|0)|0,k=f,f=0,!(k&1)&&(n||(k=e[(e[t>>2]|0)+-12>>2]|0,f=0,h0(66,t+k|0,e[t+(k+16)>>2]|5|0),k=f,f=0,!(k&1))))break;n=b(0)|0}}yt(g),s=t,o=t,C=19;break e}while(!1);yt(g)}while(!1);do if((C|0)==19){if(zi(n|0)|0,f=0,n0(181,s+(e[(e[o>>2]|0)+-12>>2]|0)|0),k=f,f=0,!(k&1)){Wi();break}n=b()|0,f=0,we(3),k=f,f=0,k&1?(k=b(0)|0,Ie(k)):r0(n|0)}while(!1);return y=I,t|0}function a3(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;I=y,y=y+32|0,c=I+20|0,h=I+16|0,g=I+8|0,n=I,f=0,h0(65,g|0,t|0),p=f,f=0;e:do if(p&1)n=b(0)|0,s=t,o=t,C=19;else{do if(d[g>>0]|0){if(p=ai(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)|0,e[n>>2]=p,f=0,p=y0(37,n|0,43392)|0,a=f,f=0,a&1)C=b(0)|0,Mi(n),n=C;else{Mi(n),o=e[(e[t>>2]|0)+-12>>2]|0,a=e[t+(o+24)>>2]|0,s=t+o|0,o=t+(o+76)|0,n=e[o>>2]|0;do if((n|0)==-1){if(n=ai(s)|0,e[c>>2]=n,f=0,n=y0(37,c|0,44220)|0,k=f,f=0,!(k&1)&&(f=0,l=y0(e[(e[n>>2]|0)+28>>2]|0,n|0,32)|0,k=f,f=0,!(k&1))){Mi(c),n=l<<24>>24,e[o>>2]=n,C=10;break}n=b(0)|0,Mi(c)}else C=10;while(!1);if((C|0)==10){if(k=e[(e[p>>2]|0)+24>>2]|0,e[h>>2]=a,f=0,e[c>>2]=e[h>>2],n=$(k|0,p|0,c|0,s|0,n&255|0,r|0)|0,k=f,f=0,!(k&1)&&(n||(k=e[(e[t>>2]|0)+-12>>2]|0,f=0,h0(66,t+k|0,e[t+(k+16)>>2]|5|0),k=f,f=0,!(k&1))))break;n=b(0)|0}}yt(g),s=t,o=t,C=19;break e}while(!1);yt(g)}while(!1);do if((C|0)==19){if(zi(n|0)|0,f=0,n0(181,s+(e[(e[o>>2]|0)+-12>>2]|0)|0),k=f,f=0,!(k&1)){Wi();break}n=b()|0,f=0,we(3),k=f,f=0,k&1?(k=b(0)|0,Ie(k)):r0(n|0)}while(!1);return y=I,t|0}function f3(t){t=t|0,Vi(t+4|0)}function u3(t){t=t|0,Vi(t+((e[(e[t>>2]|0)+-12>>2]|0)+4)|0)}function j2(t){t=t|0,Vi(t+4|0),a0(t)}function c3(t){t=t|0,j2(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)}function h3(t,r){t=t|0,r=r|0;var n=0;d[t>>0]=0,e[t+4>>2]=r,n=e[(e[r>>2]|0)+-12>>2]|0,e[r+(n+16)>>2]|0||(n=e[r+(n+72)>>2]|0,n&&H2(n)|0,d[t>>0]=1)}function X2(t){t=t|0;var r=0,n=0;t=t+4|0,n=e[t>>2]|0,r=e[(e[n>>2]|0)+-12>>2]|0;do if(e[n+(r+24)>>2]|0&&!(e[n+(r+16)>>2]|0)&&e[n+(r+4)>>2]&8192|0&&!(R1()|0)){if(r=e[t>>2]|0,r=e[r+((e[(e[r>>2]|0)+-12>>2]|0)+24)>>2]|0,f=0,r=u0(e[(e[r>>2]|0)+24>>2]|0,r|0)|0,n=f,f=0,!(n&1)&&((r|0)!=-1||(r=e[t>>2]|0,n=e[(e[r>>2]|0)+-12>>2]|0,f=0,h0(66,r+n|0,e[r+(n+16)>>2]|1|0),n=f,f=0,!(n&1))))break;n=b(0)|0,zi(n|0)|0,f=0,we(3),n=f,f=0,n&1&&(n=b(0)|0,Ie(n))}while(!1)}function m3(t){return t=t|0,57453}function d3(t,r,n){t=t|0,r=r|0,n=n|0,(n|0)!=1&(n|0)<257?e5(t,r,n):Tt(t,57462,35)}function g3(){return!(d[1048]|0)&&Ae(1048)|0&&(e[10778]=43084,Te(72,43112,Q|0)|0,ve(1048)),43112}function p3(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;s=y,y=y+16|0,o=s+8|0,l=s,c=n,a=e[c+4>>2]|0,n=l,e[n>>2]=e[c>>2],e[n+4>>2]=a,e[o>>2]=e[l>>2],e[o+4>>2]=e[l+4>>2],t5(t,o,r),e[t>>2]=43048,y=s}function A3(t){t=t|0,o1(t)}function S3(t){t=t|0,o1(t),a0(t)}function v3(t){t=t|0,Vi(t),a0(t)}function w3(t){t=t|0,a0(t)}function T3(t){t=t|0}function C3(t){t=t|0}function x3(t){t=t|0,a0(t)}function y3(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;e:do if((s|0)==(o|0))a=6;else for(;;){if((r|0)==(n|0)){r=-1;break e}if(t=d[r>>0]|0,l=d[s>>0]|0,t<<24>>24>24){r=-1;break e}if(l<<24>>24>24){r=1;break e}if(r=r+1|0,s=s+1|0,(s|0)==(o|0)){a=6;break}}while(!1);return(a|0)==6&&(r=(r|0)!=(n|0)&1),r|0}function I3(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,v5(t,n,s)}function D3(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if((r|0)==(n|0))t=0;else{t=0;do t=(d[r>>0]|0)+(t<<4)|0,s=t&-268435456,t=(s>>>24|s)^t,r=r+1|0;while((r|0)!=(n|0))}return t|0}function E3(t){t=t|0}function k3(t){t=t|0,a0(t)}function F3(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;e:do if((s|0)==(o|0))a=6;else for(;;){if((r|0)==(n|0)){r=-1;break e}if(t=e[r>>2]|0,l=e[s>>2]|0,(t|0)<(l|0)){r=-1;break e}if((l|0)<(t|0)){r=1;break e}if(r=r+4|0,s=s+4|0,(s|0)==(o|0)){a=6;break}}while(!1);return(a|0)==6&&(r=(r|0)!=(n|0)&1),r|0}function M3(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,w5(t,n,s)}function _3(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if((r|0)==(n|0))t=0;else{t=0;do t=(e[r>>2]|0)+(t<<4)|0,s=t&-268435456,t=(s>>>24|s)^t,r=r+4|0;while((r|0)!=(n|0))}return t|0}function R3(t){t=t|0}function P3(t){t=t|0,a0(t)}function L3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;U=y,y=y+64|0,I=U+56|0,a=U+52|0,g=U+48|0,c=U+44|0,h=U+40|0,p=U+36|0,C=U+32|0,B=U+8|0,k=U;e:do if(e[s+4>>2]&1){a=ai(s)|0,e[p>>2]=a,f=0,t=y0(37,p|0,44220)|0,g=f,f=0;do if(g&1)B=b()|0,Ee(a)|0,a=B;else{if(Ee(a)|0,a=ai(s)|0,e[C>>2]=a,f=0,h=y0(37,C|0,44360)|0,C=f,f=0,C&1){B=b()|0,Ee(a)|0,a=B;break}if(Ee(a)|0,f=0,h0(e[(e[h>>2]|0)+24>>2]|0,B|0,h|0),C=f,f=0,C&1)c=B;else if(c=B+12|0,f=0,h0(e[(e[h>>2]|0)+28>>2]|0,c|0,h|0),C=f,f=0,!(C&1))if(e[k>>2]=e[n>>2],f=0,e[I>>2]=e[k>>2],a=ue(7,r|0,I|0,B|0,B+24|0,t|0,o|0,1)|0,o=f,f=0,o&1){a=b()|0,f0(B+12|0),f0(B);break}else{d[l>>0]=(a|0)==(B|0)&1,a=e[r>>2]|0,f0(B+12|0),f0(B);break e}if(a=b()|0,h=I0,(B|0)!=(c|0))do c=c+-12|0,f0(c);while((c|0)!=(B|0))}while(!1);r0(a|0)}else switch(e[g>>2]=-1,B=e[(e[t>>2]|0)+16>>2]|0,e[c>>2]=e[r>>2],e[h>>2]=e[n>>2],e[a>>2]=e[c>>2],e[I>>2]=e[h>>2],a=rr[B&63](t,a,I,s,o,g)|0,e[r>>2]=a,e[g>>2]|0){case 0:{d[l>>0]=0;break e}case 1:{d[l>>0]=1;break e}default:{d[l>>0]=1,e[o>>2]=4;break e}}while(!1);return y=U,a|0}function U3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Tm(t,h,c,s,o,l)|0,y=a,t|0}function O3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Cm(t,h,c,s,o,l)|0,y=a,t|0}function N3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=xm(t,h,c,s,o,l)|0,y=a,t|0}function B3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=ym(t,h,c,s,o,l)|0,y=a,t|0}function V3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Im(t,h,c,s,o,l)|0,y=a,t|0}function q3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Dm(t,h,c,s,o,l)|0,y=a,t|0}function b3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Em(t,h,c,s,o,l)|0,y=a,t|0}function G3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=km(t,h,c,s,o,l)|0,y=a,t|0}function Q3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Fm(t,h,c,s,o,l)|0,y=a,t|0}function z3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0;t0=y,y=y+240|0,_=t0,k=t0+208|0,s0=t0+32|0,t=t0+28|0,Z=t0+16|0,O=t0+12|0,B=t0+48|0,V=t0+8|0,U=t0+4|0,e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,f=0,s=u0(68,s|0)|0,I=f,f=0;do if(I&1)t=b()|0;else{if(e[t>>2]=s,f=0,t=y0(37,t|0,44220)|0,I=f,f=0,!(I&1)&&(f=0,k0(e[(e[t>>2]|0)+32>>2]|0,t|0,57498,57524,k|0)|0,I=f,f=0,!(I&1))){Ee(s)|0,e[Z>>2]=0,e[Z+4>>2]=0,e[Z+8>>2]=0,d[Z>>0]&1?t=(e[Z>>2]&-2)+-1|0:t=10,f=0,m0(8,Z|0,t|0,0),I=f,f=0;e:do if(I&1)w0=30;else{C=Z+8|0,I=Z+1|0,s=d[Z>>0]&1?e[C>>2]|0:I,e[O>>2]=s,e[V>>2]=B,e[U>>2]=0,g=Z+4|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,p=f,f=0,p&1){w0=29;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;c=(t|0)==0,a=e[n>>2]|0;do if(a){if((e[a+12>>2]|0)!=(e[a+16>>2]|0)){if(c)break;break i}if(f=0,h=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){w0=29;break i}if((h|0)!=-1){if(c)break;break i}else{e[n>>2]=0,w0=19;break}}else w0=19;while(!1);if((w0|0)==19)if(w0=0,c){a=0;break}else a=0;if(c=d[Z>>0]|0,c=c&1?e[g>>2]|0:(c&255)>>>1,(e[O>>2]|0)==(s+c|0)){if(f=0,m0(8,Z|0,c<<1|0,0),p=f,f=0,p&1){w0=29;break}if(d[Z>>0]&1?s=(e[Z>>2]&-2)+-1|0:s=10,f=0,m0(8,Z|0,s|0,0),p=f,f=0,p&1){w0=29;break}s=d[Z>>0]&1?e[C>>2]|0:I,e[O>>2]=s+c}if(h=t+12|0,c=e[h>>2]|0,p=t+16|0,(c|0)==(e[p>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,v0=f,f=0,v0&1){w0=29;break}}else c=N[c>>0]|0;if(Rt(c&255,16,s,O,U,0,s0,B,V,k)|0)break;if(a=e[h>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,v0=f,f=0,v0&1){w0=29;break}else continue;else{e[h>>2]=a+1;continue}}if((w0|0)==29){t=b()|0;break}if(f=0,m0(8,Z|0,(e[O>>2]|0)-s|0,0),v0=f,f=0,!(v0&1)&&(F=d[Z>>0]|0,M=e[C>>2]|0,f=0,X=g0(3)|0,v0=f,f=0,!(v0&1))&&(f=0,e[_>>2]=l,K=k0(16,(F&1?M:I)|0,X|0,58882,_|0)|0,v0=f,f=0,!(v0&1))){if((K|0)!=1&&(e[o>>2]=4),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,v0=f,f=0,v0&1){w0=30;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,v0=f,f=0,v0&1){w0=30;break e}if((t|0)==-1){e[n>>2]=0,w0=55;break}}s||(w0=56)}else w0=55;while(!1);return(w0|0)==55&&s&&(w0=56),(w0|0)==56&&(e[o>>2]=e[o>>2]|2),v0=e[r>>2]|0,f0(Z),f0(s0),y=t0,v0|0}else w0=30}while(!1);(w0|0)==30&&(t=b()|0),f0(Z);break}t=b()|0,Ee(s)|0}while(!1);return f0(s0),r0(t|0),0}function Rt(t,r,n,s,o,l,a,c,h,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0;var g=0,C=0,I=0,k=0;I=e[s>>2]|0,k=(I|0)==(n|0);do if(k){if(g=(d[p+24>>0]|0)==t<<24>>24,!g&&(d[p+25>>0]|0)!=t<<24>>24){C=5;break}e[s>>2]=n+1,d[n>>0]=g?43:45,e[o>>2]=0,g=0}else C=5;while(!1);e:do if((C|0)==5){if(C=d[a>>0]|0,t<<24>>24==l<<24>>24&&(C&1?e[a+4>>2]|0:(C&255)>>>1)|0){if(g=e[h>>2]|0,(g-c|0)>=160){g=0;break}r=e[o>>2]|0,e[h>>2]=g+4,e[g>>2]=r,e[o>>2]=0,g=0;break}for(a=p+26|0,g=p;(d[g>>0]|0)!=t<<24>>24;)if(g=g+1|0,(g|0)==(a|0)){g=a;break}if(g=g-p|0,(g|0)>23)g=-1;else{switch(r|0){case 10:case 8:{if((g|0)>=(r|0)){g=-1;break e}break}case 16:{if((g|0)>=22){if(k){g=-1;break e}if((I-n|0)>=3){g=-1;break e}if((d[I+-1>>0]|0)!=48){g=-1;break e}e[o>>2]=0,g=d[57498+g>>0]|0,e[s>>2]=I+1,d[I>>0]=g,g=0;break e}break}default:}g=d[57498+g>>0]|0,e[s>>2]=I+1,d[I>>0]=g,e[o>>2]=(e[o>>2]|0)+1,g=0}}while(!1);return g|0}function Ii(){var t=0,r=0;do if(!(d[1968]|0)&&Ae(1968)|0)if(f=0,t=L0(31,2147483647,58885,0)|0,r=f,f=0,r&1)r=b()|0,bi(1968),r0(r|0);else{e[11196]=t,ve(1968);break}while(!1);return e[11196]|0}function H3(t){t=t|0}function Y3(t){t=t|0,a0(t)}function j3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;U=y,y=y+64|0,I=U+56|0,a=U+52|0,g=U+48|0,c=U+44|0,h=U+40|0,p=U+36|0,C=U+32|0,B=U+8|0,k=U;e:do if(e[s+4>>2]&1){a=ai(s)|0,e[p>>2]=a,f=0,t=y0(37,p|0,44212)|0,g=f,f=0;do if(g&1)B=b()|0,Ee(a)|0,a=B;else{if(Ee(a)|0,a=ai(s)|0,e[C>>2]=a,f=0,h=y0(37,C|0,44368)|0,C=f,f=0,C&1){B=b()|0,Ee(a)|0,a=B;break}if(Ee(a)|0,f=0,h0(e[(e[h>>2]|0)+24>>2]|0,B|0,h|0),C=f,f=0,C&1)c=B;else if(c=B+12|0,f=0,h0(e[(e[h>>2]|0)+28>>2]|0,c|0,h|0),C=f,f=0,!(C&1))if(e[k>>2]=e[n>>2],f=0,e[I>>2]=e[k>>2],a=ue(8,r|0,I|0,B|0,B+24|0,t|0,o|0,1)|0,o=f,f=0,o&1){a=b()|0,ye(B+12|0),ye(B);break}else{d[l>>0]=(a|0)==(B|0)&1,a=e[r>>2]|0,ye(B+12|0),ye(B);break e}if(a=b()|0,h=I0,(B|0)!=(c|0))do c=c+-12|0,ye(c);while((c|0)!=(B|0))}while(!1);r0(a|0)}else switch(e[g>>2]=-1,B=e[(e[t>>2]|0)+16>>2]|0,e[c>>2]=e[r>>2],e[h>>2]=e[n>>2],e[a>>2]=e[c>>2],e[I>>2]=e[h>>2],a=rr[B&63](t,a,I,s,o,g)|0,e[r>>2]=a,e[g>>2]|0){case 0:{d[l>>0]=0;break e}case 1:{d[l>>0]=1;break e}default:{d[l>>0]=1,e[o>>2]=4;break e}}while(!1);return y=U,a|0}function X3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=_m(t,h,c,s,o,l)|0,y=a,t|0}function K3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Rm(t,h,c,s,o,l)|0,y=a,t|0}function W3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Pm(t,h,c,s,o,l)|0,y=a,t|0}function Z3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Lm(t,h,c,s,o,l)|0,y=a,t|0}function J3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Um(t,h,c,s,o,l)|0,y=a,t|0}function $3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Om(t,h,c,s,o,l)|0,y=a,t|0}function e6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Nm(t,h,c,s,o,l)|0,y=a,t|0}function i6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Bm(t,h,c,s,o,l)|0,y=a,t|0}function t6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Vm(t,h,c,s,o,l)|0,y=a,t|0}function r6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0;t0=y,y=y+320|0,_=t0,k=t0+208|0,s0=t0+32|0,t=t0+28|0,Z=t0+16|0,O=t0+12|0,B=t0+48|0,V=t0+8|0,U=t0+4|0,e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,f=0,s=u0(68,s|0)|0,I=f,f=0;do if(I&1)t=b()|0;else{if(e[t>>2]=s,f=0,t=y0(37,t|0,44212)|0,I=f,f=0,!(I&1)&&(f=0,k0(e[(e[t>>2]|0)+48>>2]|0,t|0,57498,57524,k|0)|0,I=f,f=0,!(I&1))){Ee(s)|0,e[Z>>2]=0,e[Z+4>>2]=0,e[Z+8>>2]=0,d[Z>>0]&1?t=(e[Z>>2]&-2)+-1|0:t=10,f=0,m0(8,Z|0,t|0,0),I=f,f=0;e:do if(I&1)w0=31;else{C=Z+8|0,I=Z+1|0,t=d[Z>>0]&1?e[C>>2]|0:I,e[O>>2]=t,e[V>>2]=B,e[U>>2]=0,g=Z+4|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){w0=30;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,s=0,c=1):(s=a,c=0)}else s=0,c=1;h=e[n>>2]|0;do if(h){if(a=e[h+12>>2]|0,(a|0)==(e[h+16>>2]|0)){if(f=0,a=u0(e[(e[h>>2]|0)+36>>2]|0,h|0)|0,p=f,f=0,p&1){w0=30;break i}}else a=e[a>>2]|0;if((a|0)!=-1)if(c){a=h;break}else{a=h;break i}else{e[n>>2]=0,w0=20;break}}else w0=20;while(!1);if((w0|0)==20)if(w0=0,c){a=0;break}else a=0;if(c=d[Z>>0]|0,c=c&1?e[g>>2]|0:(c&255)>>>1,(e[O>>2]|0)==(t+c|0)){if(f=0,m0(8,Z|0,c<<1|0,0),p=f,f=0,p&1){w0=30;break}if(d[Z>>0]&1?t=(e[Z>>2]&-2)+-1|0:t=10,f=0,m0(8,Z|0,t|0,0),p=f,f=0,p&1){w0=30;break}t=d[Z>>0]&1?e[C>>2]|0:I,e[O>>2]=t+c}if(h=s+12|0,c=e[h>>2]|0,p=s+16|0,(c|0)==(e[p>>2]|0)){if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,v0=f,f=0,v0&1){w0=30;break}}else c=e[c>>2]|0;if(Pt(c,16,t,O,U,0,s0,B,V,k)|0)break;if(a=e[h>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,v0=f,f=0,v0&1){w0=30;break}else{a=s;continue}else{e[h>>2]=a+4,a=s;continue}}if((w0|0)==30){t=b()|0;break}if(f=0,m0(8,Z|0,(e[O>>2]|0)-t|0,0),v0=f,f=0,!(v0&1)&&(F=d[Z>>0]|0,M=e[C>>2]|0,f=0,X=g0(3)|0,v0=f,f=0,!(v0&1))&&(f=0,e[_>>2]=l,K=k0(16,(F&1?M:I)|0,X|0,58882,_|0)|0,v0=f,f=0,!(v0&1))){if((K|0)!=1&&(e[o>>2]=4),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,v0=f,f=0,v0&1){w0=31;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,v0=f,f=0,v0&1){w0=31;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;w0=59;break}else{e[n>>2]=0,w0=57;break}}else w0=57;while(!1);return(w0|0)==57&&s&&(w0=59),(w0|0)==59&&(e[o>>2]=e[o>>2]|2),v0=e[r>>2]|0,f0(Z),f0(s0),y=t0,v0|0}else w0=31}while(!1);(w0|0)==31&&(t=b()|0),f0(Z);break}t=b()|0,Ee(s)|0}while(!1);return f0(s0),r0(t|0),0}function Pt(t,r,n,s,o,l,a,c,h,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0;var g=0,C=0,I=0,k=0;I=e[s>>2]|0,k=(I|0)==(n|0);do if(k){if(g=(e[p+96>>2]|0)==(t|0),!g&&(e[p+100>>2]|0)!=(t|0)){C=5;break}e[s>>2]=n+1,d[n>>0]=g?43:45,e[o>>2]=0,g=0}else C=5;while(!1);e:do if((C|0)==5){if(C=d[a>>0]|0,(t|0)==(l|0)&&(C&1?e[a+4>>2]|0:(C&255)>>>1)|0){if(g=e[h>>2]|0,(g-c|0)>=160){g=0;break}r=e[o>>2]|0,e[h>>2]=g+4,e[g>>2]=r,e[o>>2]=0,g=0;break}for(a=p+104|0,g=p;(e[g>>2]|0)!=(t|0);)if(g=g+4|0,(g|0)==(a|0)){g=a;break}if(g=g-p|0,a=g>>2,(g|0)>92)g=-1;else{switch(r|0){case 10:case 8:{if((a|0)>=(r|0)){g=-1;break e}break}case 16:{if((g|0)>=88){if(k){g=-1;break e}if((I-n|0)>=3){g=-1;break e}if((d[I+-1>>0]|0)!=48){g=-1;break e}e[o>>2]=0,g=d[57498+a>>0]|0,e[s>>2]=I+1,d[I>>0]=g,g=0;break e}break}default:}g=d[57498+a>>0]|0,e[s>>2]=I+1,d[I>>0]=g,e[o>>2]=(e[o>>2]|0)+1,g=0}}while(!1);return g|0}function Gt(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0;if(h=y,y=y+16|0,c=h,r=ai(r)|0,e[c>>2]=r,f=0,o=y0(37,c|0,44220)|0,p=f,f=0,!(p&1)&&(f=0,k0(e[(e[o>>2]|0)+32>>2]|0,o|0,57498,57524,n|0)|0,p=f,f=0,!(p&1))&&(f=0,a=y0(37,c|0,44360)|0,p=f,f=0,!(p&1))&&(f=0,l=u0(e[(e[a>>2]|0)+16>>2]|0,a|0)|0,p=f,f=0,!(p&1))&&(d[s>>0]=l,f=0,h0(e[(e[a>>2]|0)+20>>2]|0,t|0,a|0),p=f,f=0,!(p&1))){Ee(r)|0,y=h;return}p=b()|0,Ee(r)|0,r0(p|0)}function m1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;if(g=y,y=y+16|0,p=g,r=ai(r)|0,e[p>>2]=r,f=0,l=y0(37,p|0,44220)|0,C=f,f=0,!(C&1)&&(f=0,k0(e[(e[l>>2]|0)+32>>2]|0,l|0,57498,57530,n|0)|0,C=f,f=0,!(C&1))&&(f=0,h=y0(37,p|0,44360)|0,C=f,f=0,!(C&1))&&(f=0,a=u0(e[(e[h>>2]|0)+12>>2]|0,h|0)|0,C=f,f=0,!(C&1))&&(d[s>>0]=a,f=0,c=u0(e[(e[h>>2]|0)+16>>2]|0,h|0)|0,C=f,f=0,!(C&1))&&(d[o>>0]=c,f=0,h0(e[(e[h>>2]|0)+20>>2]|0,t|0,h|0),C=f,f=0,!(C&1))){Ee(r)|0,y=g;return}C=b()|0,Ee(r)|0,r0(C|0)}function d1(t,r,n,s,o,l,a,c,h,p,g,C){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,C=C|0;var I=0,k=0;e:do if(t<<24>>24==l<<24>>24)d[r>>0]|0?(d[r>>0]=0,n=e[o>>2]|0,e[o>>2]=n+1,d[n>>0]=46,n=d[c>>0]|0,(n&1?e[c+4>>2]|0:(n&255)>>>1)|0&&(I=e[p>>2]|0,(I-h|0)<160)&&(h=e[g>>2]|0,e[p>>2]=I+4,e[I>>2]=h),I=0):I=-1;else{if(t<<24>>24==a<<24>>24&&(a=d[c>>0]|0,((a&1?e[c+4>>2]|0:(a&255)>>>1)|0)!=0)){if(!(d[r>>0]|0)){I=-1;break}if(I=e[p>>2]|0,(I-h|0)>=160){I=0;break}h=e[g>>2]|0,e[p>>2]=I+4,e[I>>2]=h,e[g>>2]=0,I=0;break}for(l=C+32|0,I=C;(d[I>>0]|0)!=t<<24>>24;)if(I=I+1|0,(I|0)==(l|0)){I=l;break}if(l=I-C|0,(l|0)>31)I=-1;else switch(a=d[57498+l>>0]|0,l|0){case 24:case 25:{if(I=e[o>>2]|0,(I|0)!=(s|0)&&(N[I+-1>>0]&95|0)!=(N[n>>0]&127|0)){I=-1;break e}e[o>>2]=I+1,d[I>>0]=a,I=0;break e}case 23:case 22:{d[n>>0]=80,I=e[o>>2]|0,e[o>>2]=I+1,d[I>>0]=a,I=0;break e}default:{if(I=a&95,(I|0)==(d[n>>0]|0)&&(d[n>>0]=I|128,(d[r>>0]|0)!=0)&&(d[r>>0]=0,n=d[c>>0]|0,((n&1?e[c+4>>2]|0:(n&255)>>>1)|0)!=0)&&(k=e[p>>2]|0,(k-h|0)<160)&&(h=e[g>>2]|0,e[p>>2]=k+4,e[k>>2]=h),p=e[o>>2]|0,e[o>>2]=p+1,d[p>>0]=a,(l|0)>21){I=0;break e}e[g>>2]=(e[g>>2]|0)+1,I=0;break e}}}while(!1);return I|0}function Qt(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0;if(h=y,y=y+16|0,c=h,r=ai(r)|0,e[c>>2]=r,f=0,o=y0(37,c|0,44212)|0,p=f,f=0,!(p&1)&&(f=0,k0(e[(e[o>>2]|0)+48>>2]|0,o|0,57498,57524,n|0)|0,p=f,f=0,!(p&1))&&(f=0,a=y0(37,c|0,44368)|0,p=f,f=0,!(p&1))&&(f=0,l=u0(e[(e[a>>2]|0)+16>>2]|0,a|0)|0,p=f,f=0,!(p&1))&&(e[s>>2]=l,f=0,h0(e[(e[a>>2]|0)+20>>2]|0,t|0,a|0),p=f,f=0,!(p&1))){Ee(r)|0,y=h;return}p=b()|0,Ee(r)|0,r0(p|0)}function g1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;if(g=y,y=y+16|0,p=g,r=ai(r)|0,e[p>>2]=r,f=0,l=y0(37,p|0,44212)|0,C=f,f=0,!(C&1)&&(f=0,k0(e[(e[l>>2]|0)+48>>2]|0,l|0,57498,57530,n|0)|0,C=f,f=0,!(C&1))&&(f=0,h=y0(37,p|0,44368)|0,C=f,f=0,!(C&1))&&(f=0,a=u0(e[(e[h>>2]|0)+12>>2]|0,h|0)|0,C=f,f=0,!(C&1))&&(e[s>>2]=a,f=0,c=u0(e[(e[h>>2]|0)+16>>2]|0,h|0)|0,C=f,f=0,!(C&1))&&(e[o>>2]=c,f=0,h0(e[(e[h>>2]|0)+20>>2]|0,t|0,h|0),C=f,f=0,!(C&1))){Ee(r)|0,y=g;return}C=b()|0,Ee(r)|0,r0(C|0)}function p1(t,r,n,s,o,l,a,c,h,p,g,C){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,C=C|0;var I=0,k=0;e:do if((t|0)==(l|0))d[r>>0]|0?(d[r>>0]=0,n=e[o>>2]|0,e[o>>2]=n+1,d[n>>0]=46,n=d[c>>0]|0,(n&1?e[c+4>>2]|0:(n&255)>>>1)|0&&(I=e[p>>2]|0,(I-h|0)<160)&&(h=e[g>>2]|0,e[p>>2]=I+4,e[I>>2]=h),I=0):I=-1;else{if((t|0)==(a|0)&&(a=d[c>>0]|0,((a&1?e[c+4>>2]|0:(a&255)>>>1)|0)!=0)){if(!(d[r>>0]|0)){I=-1;break}if(I=e[p>>2]|0,(I-h|0)>=160){I=0;break}h=e[g>>2]|0,e[p>>2]=I+4,e[I>>2]=h,e[g>>2]=0,I=0;break}for(l=C+128|0,I=C;(e[I>>2]|0)!=(t|0);)if(I=I+4|0,(I|0)==(l|0)){I=l;break}if(l=I-C|0,I=l>>2,(l|0)<=124){switch(a=d[57498+I>>0]|0,I|0){case 24:case 25:{if(I=e[o>>2]|0,(I|0)!=(s|0)&&(N[I+-1>>0]&95|0)!=(N[n>>0]&127|0)){I=-1;break e}e[o>>2]=I+1,d[I>>0]=a,I=0;break e}case 23:case 22:{d[n>>0]=80;break}default:I=a&95,(I|0)==(d[n>>0]|0)&&(d[n>>0]=I|128,(d[r>>0]|0)!=0)&&(d[r>>0]=0,n=d[c>>0]|0,((n&1?e[c+4>>2]|0:(n&255)>>>1)|0)!=0)&&(k=e[p>>2]|0,(k-h|0)<160)&&(h=e[g>>2]|0,e[p>>2]=k+4,e[k>>2]=h)}p=e[o>>2]|0,e[o>>2]=p+1,d[p>>0]=a,(l|0)>84||(e[g>>2]=(e[g>>2]|0)+1),I=0}else I=-1}while(!1);return I|0}function n6(t){t=t|0}function s6(t){t=t|0,a0(t)}function o6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0;g=y,y=y+32|0,l=g+20|0,a=g+16|0,c=g+12|0,p=g;e:do if(!(e[n+4>>2]&1))p=e[(e[t>>2]|0)+24>>2]|0,e[a>>2]=e[r>>2],e[l>>2]=e[a>>2],l=nr[p&31](t,l,n,s,o&1)|0;else{l=ai(n)|0,e[c>>2]=l,f=0,a=y0(37,c|0,44360)|0,h=f,f=0;i:do if(h&1)g=b()|0,Ee(l)|0,l=g;else{Ee(l)|0,l=e[a>>2]|0,o?Ke[e[l+24>>2]&127](p,a):Ke[e[l+28>>2]&127](p,a),t=d[p>>0]|0,h=(t&1)==0,l=p+1|0,o=p+8|0,c=h?l:p+1|0,l=h?l:e[p+8>>2]|0,h=p+4|0,n=(t&1)==0;t:do if((l|0)!=((n?c:e[o>>2]|0)+(n?(t&255)>>>1:e[h>>2]|0)|0)){r:for(;;){a=d[l>>0]|0,s=e[r>>2]|0;do if(s){if(n=s+24|0,t=e[n>>2]|0,(t|0)!=(e[s+28>>2]|0)){e[n>>2]=t+1,d[t>>0]=a;break}if(f=0,a=y0(e[(e[s>>2]|0)+52>>2]|0,s|0,a&255|0)|0,t=f,f=0,t&1)break r;(a|0)==-1&&(e[r>>2]=0)}while(!1);if(l=l+1|0,t=d[p>>0]|0,n=(t&1)==0,(l|0)==((n?c:e[o>>2]|0)+(n?(t&255)>>>1:e[h>>2]|0)|0))break t}l=b()|0,f0(p);break i}while(!1);l=e[r>>2]|0,f0(p);break e}while(!1);r0(l|0)}while(!1);return y=g,l|0}function l6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(g=y,y=y+64|0,l=g,I=g+56|0,k=g+44|0,c=g+20|0,p=g+16|0,h=g+12|0,C=g+8|0,a=g+4|0,d[I>>0]=d[58887]|0,d[I+1>>0]=d[58888]|0,d[I+2>>0]=d[58889]|0,d[I+3>>0]=d[58890]|0,d[I+4>>0]=d[58891]|0,d[I+5>>0]=d[58892]|0,It(I+1|0,58893,1,e[n+4>>2]|0),t=Ii()|0,e[l>>2]=o,o=k+(qi(k,12,t,I,l)|0)|0,I=it(k,o,n)|0,t=ai(n)|0,e[C>>2]=t,f=0,re(1,k|0,I|0,o|0,c|0,p|0,h|0,C|0),o=f,f=0,o&1)k=b()|0,Ee(t)|0,r0(k|0);else return Ee(t)|0,e[a>>2]=e[r>>2],I=e[p>>2]|0,k=e[h>>2]|0,e[l>>2]=e[a>>2],k=Vt(l,c,I,k,n,s)|0,y=g,k|0;return 0}function It(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(s&2048&&(d[t>>0]=43,t=t+1|0),s&512&&(d[t>>0]=35,t=t+1|0),o=d[r>>0]|0,o<<24>>24)for(l=r;;)if(l=l+1|0,r=t+1|0,d[t>>0]=o,o=d[l>>0]|0,o<<24>>24)t=r;else{t=r;break}e:do switch(s&74|0){case 64:{d[t>>0]=111;break}case 8:if(s&16384){d[t>>0]=88;break e}else{d[t>>0]=120;break e}default:if(n){d[t>>0]=100;break e}else{d[t>>0]=117;break e}}while(!1)}function it(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;e:do switch(e[n+4>>2]&176|0){case 16:{switch(n=d[t>>0]|0,n<<24>>24){case 43:case 45:{t=t+1|0;break e}default:}if((r-t|0)>1&n<<24>>24==48){switch(d[t+1>>0]|0){case 88:case 120:break;default:{s=7;break e}}t=t+2|0}else s=7;break}case 32:{t=r;break}default:s=7}while(!1);return t|0}function a6(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0;O=y,y=y+16|0,_=O,B=Pi(a,44220)|0,p=Pi(a,44360)|0,Ke[e[(e[p>>2]|0)+20>>2]&127](_,p),k=d[_>>0]|0,U=_+4|0;e:do if(!((k&1?e[U>>2]|0:(k&255)>>>1)|0))f=0,k0(e[(e[B>>2]|0)+32>>2]|0,B|0,t|0,n|0,s|0)|0,V=f,f=0,V&1?V=5:(a=s+(n-t)|0,e[l>>2]=a,V=29);else{switch(e[l>>2]=s,a=d[t>>0]|0,a<<24>>24){case 43:case 45:{if(f=0,a=y0(e[(e[B>>2]|0)+28>>2]|0,B|0,a|0)|0,k=f,f=0,k&1){V=5;break e}h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=a,h=t+1|0;break}default:h=t}i:do if((n-h|0)>1&&(d[h>>0]|0)==48){switch(a=h+1|0,d[a>>0]|0){case 88:case 120:break;default:break i}if(f=0,c=y0(e[(e[B>>2]|0)+28>>2]|0,B|0,48)|0,k=f,f=0,k&1){V=5;break e}if(k=e[l>>2]|0,e[l>>2]=k+1,d[k>>0]=c,f=0,a=y0(e[(e[B>>2]|0)+28>>2]|0,B|0,d[a>>0]|0)|0,k=f,f=0,k&1){V=5;break e}k=e[l>>2]|0,e[l>>2]=k+1,d[k>>0]=a,h=h+2|0}while(!1);if((h|0)!=(n|0)&&(g=n+-1|0,h>>>0>>0)){c=h,a=g;do k=d[c>>0]|0,d[c>>0]=d[a>>0]|0,d[a>>0]=k,c=c+1|0,a=a+-1|0;while(c>>>0>>0)}if(f=0,g=u0(e[(e[p>>2]|0)+16>>2]|0,p|0)|0,k=f,f=0,k&1)V=5;else{C=_+8|0,I=_+1|0;i:do if(h>>>0>>0){for(a=0,c=0,k=h;p=d[(d[_>>0]&1?e[C>>2]|0:I)+c>>0]|0,p<<24>>24!=0&(a|0)==(p<<24>>24|0)?(a=e[l>>2]|0,e[l>>2]=a+1,d[a>>0]=g,a=d[_>>0]|0,p=0,c=(c>>>0<((a&1?e[U>>2]|0:(a&255)>>>1)+-1|0)>>>0&1)+c|0):p=a,f=0,a=y0(e[(e[B>>2]|0)+28>>2]|0,B|0,d[k>>0]|0)|0,F=f,f=0,!(F&1);){if(F=e[l>>2]|0,e[l>>2]=F+1,d[F>>0]=a,k=k+1|0,k>>>0>=n>>>0)break i;a=p+1|0}a=b()|0;break e}while(!1);if(c=t,a=s+(h-c)|0,t=e[l>>2]|0,(a|0)==(t|0))t=c,V=29;else{if(t=t+-1|0,a>>>0>>0)do F=d[a>>0]|0,d[a>>0]=d[t>>0]|0,d[t>>0]=F,a=a+1|0,t=t+-1|0;while(a>>>0>>0);t=c,a=e[l>>2]|0,V=29}}}while(!1);if((V|0)==5)a=b()|0;else if((V|0)==29){e[o>>2]=(r|0)==(n|0)?a:s+(r-t)|0,f0(_),y=O;return}f0(_),r0(a|0)}function f6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(C=y,y=y+96|0,a=C+8|0,t=C,k=C+74|0,h=C+32|0,g=C+28|0,p=C+24|0,I=C+20|0,c=C+16|0,U=t,e[U>>2]=37,e[U+4>>2]=0,It(t+1|0,58895,1,e[n+4>>2]|0),U=Ii()|0,B=a,e[B>>2]=o,e[B+4>>2]=l,l=k+(qi(k,22,U,t,a)|0)|0,o=it(k,l,n)|0,t=ai(n)|0,e[I>>2]=t,f=0,re(1,k|0,o|0,l|0,h|0,g|0,p|0,I|0),l=f,f=0,l&1)B=b()|0,Ee(t)|0,r0(B|0);else return Ee(t)|0,e[c>>2]=e[r>>2],U=e[g>>2]|0,B=e[p>>2]|0,e[a>>2]=e[c>>2],B=Vt(a,h,U,B,n,s)|0,y=C,B|0;return 0}function u6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(g=y,y=y+64|0,l=g,I=g+56|0,k=g+44|0,c=g+20|0,p=g+16|0,h=g+12|0,C=g+8|0,a=g+4|0,d[I>>0]=d[58887]|0,d[I+1>>0]=d[58888]|0,d[I+2>>0]=d[58889]|0,d[I+3>>0]=d[58890]|0,d[I+4>>0]=d[58891]|0,d[I+5>>0]=d[58892]|0,It(I+1|0,58893,0,e[n+4>>2]|0),t=Ii()|0,e[l>>2]=o,o=k+(qi(k,12,t,I,l)|0)|0,I=it(k,o,n)|0,t=ai(n)|0,e[C>>2]=t,f=0,re(1,k|0,I|0,o|0,c|0,p|0,h|0,C|0),o=f,f=0,o&1)k=b()|0,Ee(t)|0,r0(k|0);else return Ee(t)|0,e[a>>2]=e[r>>2],I=e[p>>2]|0,k=e[h>>2]|0,e[l>>2]=e[a>>2],k=Vt(l,c,I,k,n,s)|0,y=g,k|0;return 0}function c6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(C=y,y=y+112|0,a=C+8|0,t=C,k=C+75|0,h=C+32|0,g=C+28|0,p=C+24|0,I=C+20|0,c=C+16|0,U=t,e[U>>2]=37,e[U+4>>2]=0,It(t+1|0,58895,0,e[n+4>>2]|0),U=Ii()|0,B=a,e[B>>2]=o,e[B+4>>2]=l,l=k+(qi(k,23,U,t,a)|0)|0,o=it(k,l,n)|0,t=ai(n)|0,e[I>>2]=t,f=0,re(1,k|0,o|0,l|0,h|0,g|0,p|0,I|0),l=f,f=0,l&1)B=b()|0,Ee(t)|0,r0(B|0);else return Ee(t)|0,e[c>>2]=e[r>>2],U=e[g>>2]|0,B=e[p>>2]|0,e[a>>2]=e[c>>2],B=Vt(a,h,U,B,n,s)|0,y=C,B|0;return 0}function h6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=+o;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0;X=y,y=y+176|0,V=X+84|0,I=X+48|0,C=X+32|0,h=X+24|0,l=X+8|0,g=X,U=X+88|0,B=X+80|0,c=X+118|0,M=X+76|0,F=X+72|0,O=X+68|0,_=X+64|0,p=g,e[p>>2]=37,e[p+4>>2]=0,p=hr(g+1|0,58898,e[n+4>>2]|0)|0,e[B>>2]=U,t=Ii()|0,p?(e[l>>2]=e[n+8>>2],H[l+8>>3]=o,l=qi(U,30,t,g,l)|0):(H[h>>3]=o,l=qi(U,30,t,g,h)|0);e:do if((l|0)>29){f=0,t=g0(3)|0,l=f,f=0,l=l&1,p?!l&&(f=0,e[C>>2]=e[n+8>>2],H[C+8>>3]=o,a=k0(17,B|0,t|0,g|0,C|0)|0,k=f,f=0,!(k&1))&&(K=12):!l&&(f=0,e[I>>2]=e[n+8>>2],H[I+8>>3]=o,k=k0(17,B|0,t|0,g|0,I|0)|0,I=f,f=0,!(I&1))&&(a=k,K=12);do if((K|0)==12){if(t=e[B>>2]|0,t)l=t;else{if(f=0,we(6),k=f,f=0,k&1)break;l=e[B>>2]|0}t=l,g=l,K=16;break e}while(!1);t=b()|0}else t=e[B>>2]|0,g=0,a=l,K=16;while(!1);if((K|0)==16){h=t+a|0,p=it(t,h,n)|0;do if((t|0)==(U|0))t=U,l=0,K=22;else{if(a=xi(a<<1)|0,!a){if(f=0,we(6),K=f,f=0,K&1){l=0,K=20;break}t=e[B>>2]|0}l=a,c=a,K=22}while(!1);do if((K|0)==22)if(f=0,a=u0(68,n|0)|0,B=f,f=0,B&1)K=20;else{if(e[O>>2]=a,f=0,re(2,t|0,p|0,h|0,c|0,M|0,F|0,O|0),O=f,f=0,O&1){t=b()|0,Ee(a)|0;break}if(Ee(a)|0,e[_>>2]=e[r>>2],K=e[M>>2]|0,t=e[F>>2]|0,f=0,e[V>>2]=e[_>>2],t=Fe(39,V|0,c|0,K|0,t|0,n|0,s|0)|0,K=f,f=0,K&1)K=20;else return e[r>>2]=t,l&&Ze(l),g&&Ze(g),y=X,t|0}while(!1);(K|0)==20&&(t=b()|0),l&&Ze(l),g&&Ze(g)}return r0(t|0),0}function hr(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;if(n&2048&&(d[t>>0]=43,t=t+1|0),n&1024&&(d[t>>0]=35,t=t+1|0),a=n&260,o=n>>>14,c=(a|0)==260,c?l=0:(d[t>>0]=46,d[t+1>>0]=42,t=t+2|0,l=1),n=d[r>>0]|0,n<<24>>24)for(s=t;r=r+1|0,t=s+1|0,d[s>>0]=n,n=d[r>>0]|0,n<<24>>24;)s=t;e:do switch(a|0){case 4:if(o&1){d[t>>0]=70;break e}else{d[t>>0]=102;break e}case 256:if(o&1){d[t>>0]=69;break e}else{d[t>>0]=101;break e}default:if(n=(o&1|0)!=0,c)if(n){d[t>>0]=65;break e}else{d[t>>0]=97;break e}else if(n){d[t>>0]=71;break e}else{d[t>>0]=103;break e}}while(!1);return l|0}function m6(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0;switch(X=y,y=y+16|0,K=X,M=Pi(a,44220)|0,_=Pi(a,44360)|0,Ke[e[(e[_>>2]|0)+20>>2]&127](K,_),e[l>>2]=s,a=d[t>>0]|0,a<<24>>24){case 43:case 45:{f=0,a=y0(e[(e[M>>2]|0)+28>>2]|0,M|0,a|0)|0,F=f,f=0,F&1?O=8:(g=e[l>>2]|0,e[l>>2]=g+1,d[g>>0]=a,g=t+1|0,O=10);break}default:g=t,O=10}e:do if((O|0)==10){F=n;i:do if((F-g|0)>1&&(d[g>>0]|0)==48){switch(h=g+1|0,d[h>>0]|0){case 88:case 120:break;default:{O=11;break i}}if(f=0,a=y0(e[(e[M>>2]|0)+28>>2]|0,M|0,48)|0,V=f,f=0,V&1){O=8;break e}if(V=e[l>>2]|0,e[l>>2]=V+1,d[V>>0]=a,g=g+2|0,f=0,a=y0(e[(e[M>>2]|0)+28>>2]|0,M|0,d[h>>0]|0)|0,V=f,f=0,V&1){O=8;break e}if(V=e[l>>2]|0,e[l>>2]=V+1,d[V>>0]=a,g>>>0>>0){for(a=g;h=d[a>>0]|0,f=0,p=g0(3)|0,V=f,f=0,!(V&1||(f=0,h=y0(39,h<<24>>24|0,p|0)|0,V=f,f=0,V&1));){if(!h){V=g;break i}if(a=a+1|0,a>>>0>=n>>>0){V=g;break i}}a=b()|0;break e}else V=g,a=g}else O=11;while(!1);i:do if((O|0)==11)if(g>>>0>>0){for(a=g;h=d[a>>0]|0,f=0,p=g0(3)|0,V=f,f=0,!(V&1||(f=0,h=y0(40,h<<24>>24|0,p|0)|0,V=f,f=0,V&1));){if(!h){V=g;break i}if(a=a+1|0,a>>>0>=n>>>0){V=g;break i}}a=b()|0;break e}else V=g,a=g;while(!1);if(U=d[K>>0]|0,B=K+4|0,(U&1?e[B>>2]|0:(U&255)>>>1)|0){if((V|0)!=(a|0)&&(C=a+-1|0,V>>>0>>0)){p=V,h=C;do U=d[p>>0]|0,d[p>>0]=d[h>>0]|0,d[h>>0]=U,p=p+1|0,h=h+-1|0;while(p>>>0>>0)}if(f=0,C=u0(e[(e[_>>2]|0)+16>>2]|0,_|0)|0,U=f,f=0,U&1){O=8;break}I=K+8|0,k=K+1|0;i:do if(V>>>0>>0){for(h=0,p=0,U=V;g=d[(d[K>>0]&1?e[I>>2]|0:k)+p>>0]|0,g<<24>>24>0&(h|0)==(g<<24>>24|0)?(h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=C,h=d[K>>0]|0,g=0,p=(p>>>0<((h&1?e[B>>2]|0:(h&255)>>>1)+-1|0)>>>0&1)+p|0):g=h,f=0,h=y0(e[(e[M>>2]|0)+28>>2]|0,M|0,d[U>>0]|0)|0,t0=f,f=0,!(t0&1);){if(t0=e[l>>2]|0,e[l>>2]=t0+1,d[t0>>0]=h,U=U+1|0,U>>>0>=a>>>0)break i;h=g+1|0}a=b()|0;break e}while(!1);if(h=s+(V-t)|0,p=e[l>>2]|0,(h|0)!=(p|0)&&(c=p+-1|0,h>>>0>>0)){do t0=d[h>>0]|0,d[h>>0]=d[c>>0]|0,d[c>>0]=t0,h=h+1|0,c=c+-1|0;while(h>>>0>>0);h=M}else h=M}else{if(f=0,k0(e[(e[M>>2]|0)+32>>2]|0,M|0,V|0,a|0,e[l>>2]|0)|0,t0=f,f=0,t0&1){O=8;break}e[l>>2]=(e[l>>2]|0)+(a-V),h=M}i:do if(a>>>0>>0){for(;c=d[a>>0]|0,c<<24>>24!=46;){if(f=0,c=y0(e[(e[h>>2]|0)+28>>2]|0,M|0,c|0)|0,t0=f,f=0,t0&1){O=4;break}if(t0=e[l>>2]|0,e[l>>2]=t0+1,d[t0>>0]=c,a=a+1|0,a>>>0>=n>>>0)break i}if((O|0)==4){a=b()|0;break e}if(f=0,c=u0(e[(e[_>>2]|0)+12>>2]|0,_|0)|0,t0=f,f=0,t0&1){O=8;break e}t0=e[l>>2]|0,e[l>>2]=t0+1,d[t0>>0]=c,a=a+1|0}while(!1);if(f=0,k0(e[(e[M>>2]|0)+32>>2]|0,M|0,a|0,n|0,e[l>>2]|0)|0,t0=f,f=0,t0&1)O=8;else{t0=(e[l>>2]|0)+(F-a)|0,e[l>>2]=t0,e[o>>2]=(r|0)==(n|0)?t0:s+(r-t)|0,f0(K),y=X;return}}while(!1);(O|0)==8&&(a=b()|0),f0(K),r0(a|0)}function d6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=+o;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0;X=y,y=y+176|0,V=X+76|0,I=X+48|0,C=X+32|0,h=X+24|0,l=X+8|0,g=X,U=X+80|0,B=X+72|0,c=X+110|0,M=X+68|0,F=X+64|0,O=X+60|0,_=X+56|0,p=g,e[p>>2]=37,e[p+4>>2]=0,p=hr(g+1|0,58899,e[n+4>>2]|0)|0,e[B>>2]=U,t=Ii()|0,p?(e[l>>2]=e[n+8>>2],H[l+8>>3]=o,l=qi(U,30,t,g,l)|0):(H[h>>3]=o,l=qi(U,30,t,g,h)|0);e:do if((l|0)>29){f=0,t=g0(3)|0,l=f,f=0,l=l&1,p?!l&&(f=0,e[C>>2]=e[n+8>>2],H[C+8>>3]=o,a=k0(17,B|0,t|0,g|0,C|0)|0,k=f,f=0,!(k&1))&&(K=12):!l&&(f=0,H[I>>3]=o,k=k0(17,B|0,t|0,g|0,I|0)|0,I=f,f=0,!(I&1))&&(a=k,K=12);do if((K|0)==12){if(t=e[B>>2]|0,t)l=t;else{if(f=0,we(6),k=f,f=0,k&1)break;l=e[B>>2]|0}t=l,g=l,K=16;break e}while(!1);t=b()|0}else t=e[B>>2]|0,g=0,a=l,K=16;while(!1);if((K|0)==16){h=t+a|0,p=it(t,h,n)|0;do if((t|0)==(U|0))t=U,l=0,K=22;else{if(a=xi(a<<1)|0,!a){if(f=0,we(6),K=f,f=0,K&1){l=0,K=20;break}t=e[B>>2]|0}l=a,c=a,K=22}while(!1);do if((K|0)==22)if(f=0,a=u0(68,n|0)|0,B=f,f=0,B&1)K=20;else{if(e[O>>2]=a,f=0,re(2,t|0,p|0,h|0,c|0,M|0,F|0,O|0),O=f,f=0,O&1){t=b()|0,Ee(a)|0;break}if(Ee(a)|0,e[_>>2]=e[r>>2],K=e[M>>2]|0,t=e[F>>2]|0,f=0,e[V>>2]=e[_>>2],t=Fe(39,V|0,c|0,K|0,t|0,n|0,s|0)|0,K=f,f=0,K&1)K=20;else return e[r>>2]=t,l&&Ze(l),g&&Ze(g),y=X,t|0}while(!1);(K|0)==20&&(t=b()|0),l&&Ze(l),g&&Ze(g)}return r0(t|0),0}function g6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(I=y,y=y+80|0,h=I,t=I+70|0,g=I+12|0,C=I+32|0,c=I+8|0,p=I+4|0,d[t>>0]=d[58901]|0,d[t+1>>0]=d[58902]|0,d[t+2>>0]=d[58903]|0,d[t+3>>0]=d[58904]|0,d[t+4>>0]=d[58905]|0,d[t+5>>0]=d[58906]|0,l=Ii()|0,e[h>>2]=o,t=qi(g,20,l,t,h)|0,o=g+t|0,l=it(g,o,n)|0,a=ai(n)|0,e[c>>2]=a,f=0,c=y0(37,c|0,44220)|0,k=f,f=0,k&1)k=b()|0,Ee(a)|0,r0(k|0);else return Ee(a)|0,F1[e[(e[c>>2]|0)+32>>2]&31](c,g,o,C)|0,k=C+t|0,e[p>>2]=e[r>>2],e[h>>2]=e[p>>2],k=Vt(h,C,(l|0)==(o|0)?k:C+(l-g)|0,k,n,s)|0,y=I,k|0;return 0}function p6(t){t=t|0}function A6(t){t=t|0,a0(t)}function S6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0;p=y,y=y+32|0,l=p+20|0,a=p+16|0,c=p+12|0,h=p;e:do if(!(e[n+4>>2]&1))h=e[(e[t>>2]|0)+24>>2]|0,e[a>>2]=e[r>>2],e[l>>2]=e[a>>2],l=nr[h&31](t,l,n,s,o&1)|0;else{l=ai(n)|0,e[c>>2]=l,f=0,a=y0(37,c|0,44368)|0,c=f,f=0;i:do if(c&1)p=b()|0,Ee(l)|0,l=p;else{Ee(l)|0,l=e[a>>2]|0,o?Ke[e[l+24>>2]&127](h,a):Ke[e[l+28>>2]&127](h,a),t=d[h>>0]|0,n=(t&1)==0,l=h+4|0,o=h+8|0,c=n?l:h+4|0,l=n?l:e[h+8>>2]|0,n=(t&1)==0;t:do if((l|0)!=((n?c:e[o>>2]|0)+((n?(t&255)>>>1:e[c>>2]|0)<<2)|0)){for(;;){if(a=e[l>>2]|0,s=e[r>>2]|0,s){if(n=s+24|0,t=e[n>>2]|0,(t|0)==(e[s+28>>2]|0)){if(f=0,a=y0(e[(e[s>>2]|0)+52>>2]|0,s|0,a|0)|0,t=f,f=0,t&1)break}else e[n>>2]=t+4,e[t>>2]=a;(a|0)==-1&&(e[r>>2]=0)}if(l=l+4|0,t=d[h>>0]|0,n=(t&1)==0,(l|0)==((n?c:e[o>>2]|0)+((n?(t&255)>>>1:e[c>>2]|0)<<2)|0))break t}l=b()|0,ye(h);break i}while(!1);l=e[r>>2]|0,ye(h);break e}while(!1);r0(l|0)}while(!1);return y=p,l|0}function v6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(g=y,y=y+128|0,l=g,I=g+116|0,k=g+104|0,c=g+20|0,p=g+16|0,h=g+12|0,C=g+8|0,a=g+4|0,d[I>>0]=d[58887]|0,d[I+1>>0]=d[58888]|0,d[I+2>>0]=d[58889]|0,d[I+3>>0]=d[58890]|0,d[I+4>>0]=d[58891]|0,d[I+5>>0]=d[58892]|0,It(I+1|0,58893,1,e[n+4>>2]|0),t=Ii()|0,e[l>>2]=o,o=k+(qi(k,12,t,I,l)|0)|0,I=it(k,o,n)|0,t=ai(n)|0,e[C>>2]=t,f=0,re(3,k|0,I|0,o|0,c|0,p|0,h|0,C|0),o=f,f=0,o&1)k=b()|0,Ee(t)|0,r0(k|0);else return Ee(t)|0,e[a>>2]=e[r>>2],I=e[p>>2]|0,k=e[h>>2]|0,e[l>>2]=e[a>>2],k=zt(l,c,I,k,n,s)|0,y=g,k|0;return 0}function w6(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0;O=y,y=y+16|0,_=O,B=Pi(a,44212)|0,p=Pi(a,44368)|0,Ke[e[(e[p>>2]|0)+20>>2]&127](_,p),k=d[_>>0]|0,U=_+4|0;e:do if(!((k&1?e[U>>2]|0:(k&255)>>>1)|0))f=0,k0(e[(e[B>>2]|0)+48>>2]|0,B|0,t|0,n|0,s|0)|0,V=f,f=0,V&1?V=5:(a=s+(n-t<<2)|0,e[l>>2]=a,V=28);else{switch(e[l>>2]=s,a=d[t>>0]|0,a<<24>>24){case 43:case 45:{if(f=0,a=y0(e[(e[B>>2]|0)+44>>2]|0,B|0,a|0)|0,k=f,f=0,k&1){V=5;break e}h=e[l>>2]|0,e[l>>2]=h+4,e[h>>2]=a,h=t+1|0;break}default:h=t}i:do if((n-h|0)>1&&(d[h>>0]|0)==48){switch(a=h+1|0,d[a>>0]|0){case 88:case 120:break;default:{k=h;break i}}if(f=0,c=y0(e[(e[B>>2]|0)+44>>2]|0,B|0,48)|0,k=f,f=0,k&1){V=5;break e}if(k=e[l>>2]|0,e[l>>2]=k+4,e[k>>2]=c,f=0,a=y0(e[(e[B>>2]|0)+44>>2]|0,B|0,d[a>>0]|0)|0,k=f,f=0,k&1){V=5;break e}k=e[l>>2]|0,e[l>>2]=k+4,e[k>>2]=a,k=h+2|0}else k=h;while(!1);if((k|0)!=(n|0)&&(g=n+-1|0,k>>>0>>0)){c=k,a=g;do I=d[c>>0]|0,d[c>>0]=d[a>>0]|0,d[a>>0]=I,c=c+1|0,a=a+-1|0;while(c>>>0>>0)}if(f=0,p=u0(e[(e[p>>2]|0)+16>>2]|0,p|0)|0,I=f,f=0,I&1)V=5;else{g=_+8|0,C=_+1|0;i:do if(k>>>0>>0){for(a=0,c=0,I=k;h=d[(d[_>>0]&1?e[g>>2]|0:C)+c>>0]|0,h<<24>>24!=0&(a|0)==(h<<24>>24|0)?(a=e[l>>2]|0,e[l>>2]=a+4,e[a>>2]=p,a=d[_>>0]|0,h=0,c=(c>>>0<((a&1?e[U>>2]|0:(a&255)>>>1)+-1|0)>>>0&1)+c|0):h=a,f=0,a=y0(e[(e[B>>2]|0)+44>>2]|0,B|0,d[I>>0]|0)|0,F=f,f=0,!(F&1);){if(F=e[l>>2]|0,e[l>>2]=F+4,e[F>>2]=a,I=I+1|0,I>>>0>=n>>>0)break i;a=h+1|0}a=b()|0;break e}while(!1);if(h=t,a=s+(k-h<<2)|0,c=e[l>>2]|0,(a|0)!=(c|0))if(t=c+-4|0,a>>>0>>0){do F=e[a>>2]|0,e[a>>2]=e[t>>2],e[t>>2]=F,a=a+4|0,t=t+-4|0;while(a>>>0>>0);t=h,a=c,V=28}else t=h,a=c,V=28;else t=h,V=28}}while(!1);if((V|0)==5)a=b()|0;else if((V|0)==28){e[o>>2]=(r|0)==(n|0)?a:s+(r-t<<2)|0,f0(_),y=O;return}f0(_),r0(a|0)}function T6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(C=y,y=y+224|0,a=C+8|0,t=C,k=C+196|0,h=C+32|0,g=C+28|0,p=C+24|0,I=C+20|0,c=C+16|0,U=t,e[U>>2]=37,e[U+4>>2]=0,It(t+1|0,58895,1,e[n+4>>2]|0),U=Ii()|0,B=a,e[B>>2]=o,e[B+4>>2]=l,l=k+(qi(k,22,U,t,a)|0)|0,o=it(k,l,n)|0,t=ai(n)|0,e[I>>2]=t,f=0,re(3,k|0,o|0,l|0,h|0,g|0,p|0,I|0),l=f,f=0,l&1)B=b()|0,Ee(t)|0,r0(B|0);else return Ee(t)|0,e[c>>2]=e[r>>2],U=e[g>>2]|0,B=e[p>>2]|0,e[a>>2]=e[c>>2],B=zt(a,h,U,B,n,s)|0,y=C,B|0;return 0}function C6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0;V=y,y=y+16|0,U=V,I=V+8|0;e:do if((n|0)==(s|0))h=s;else for(h=n;;){if(!(e[h>>2]|0))break e;if(h=h+4|0,(h|0)==(s|0)){h=s;break}}while(!1);e[c>>2]=l,e[o>>2]=n,g=a,k=t+8|0;e:do if((l|0)==(a|0)|(n|0)==(s|0))O=47;else{t=l,p=h;i:for(;;){if(_=r,l=e[_+4>>2]|0,h=U,e[h>>2]=e[_>>2],e[h+4>>2]=l,h=nt(e[k>>2]|0)|0,f=0,l=$(21,t|0,o|0,p-n>>2|0,g-t|0,r|0)|0,_=f,f=0,_&1){O=9;break}if(h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)){O=8;break}switch(l|0){case 0:{C=1;break e}case-1:{h=t,O=14;break i}default:}if(h=(e[c>>2]|0)+l|0,e[c>>2]=h,(h|0)==(a|0)){O=27;break}if((p|0)==(s|0))n=e[o>>2]|0,t=h,h=s;else{if(h=nt(e[k>>2]|0)|0,f=0,n=L0(34,I|0,0,r|0)|0,_=f,f=0,_&1){O=35;break}if(h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)){O=34;break}if((n|0)==-1){C=2;break e}if(n>>>0>(g-(e[c>>2]|0)|0)>>>0){C=1;break e}if(n)for(h=I;p=d[h>>0]|0,_=e[c>>2]|0,e[c>>2]=_+1,d[_>>0]=p,n=n+-1|0,n;)h=h+1|0;n=(e[o>>2]|0)+4|0,e[o>>2]=n;t:do if((n|0)==(s|0))h=s;else for(h=n;;){if(!(e[h>>2]|0))break t;if(h=h+4|0,(h|0)==(s|0)){h=s;break}}while(!1);t=e[c>>2]|0}if((t|0)==(a|0)|(n|0)==(s|0)){O=47;break e}else p=h}if((O|0)==8)_=b(0)|0,Ie(_);else if((O|0)==9)n=b()|0,h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)&&(_=b(0)|0,Ie(_)),r0(n|0);else if((O|0)==14){e[c>>2]=h;i:do if((n|0)!=(e[o>>2]|0)){for(;;){if(_=e[n>>2]|0,t=nt(e[k>>2]|0)|0,f=0,h=L0(34,h|0,_|0,U|0)|0,_=f,f=0,_&1){B=t;break}if(t|0&&(f=0,u0(75,t|0)|0,_=f,f=0,_&1)){O=18;break}if((h|0)==-1||(h=(e[c>>2]|0)+h|0,e[c>>2]=h,n=n+4|0,(n|0)==(e[o>>2]|0)))break i}(O|0)==18&&(_=b(0)|0,Ie(_)),n=b()|0,B|0&&(f=0,u0(75,B|0)|0,_=f,f=0,_&1)&&(_=b(0)|0,Ie(_)),r0(n|0)}while(!1);e[o>>2]=n,C=2;break}else if((O|0)==27){n=e[o>>2]|0,O=47;break}else(O|0)==34?(_=b(0)|0,Ie(_)):(O|0)==35&&(n=b()|0,h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)&&(_=b(0)|0,Ie(_)),r0(n|0))}while(!1);return(O|0)==47&&(C=(n|0)!=(s|0)&1),y=V,C|0}function x6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0;V=y,y=y+16|0,B=V;e:do if((n|0)==(s|0))h=s;else for(h=n;;){if(!(d[h>>0]|0))break e;if(h=h+1|0,(h|0)==(s|0)){h=s;break}}while(!1);e[c>>2]=l,e[o>>2]=n,C=a,k=t+8|0;e:do if((l|0)==(a|0)|(n|0)==(s|0))O=47;else{t=l,g=h;i:for(;;){if(p=r,h=e[p+4>>2]|0,l=B,e[l>>2]=e[p>>2],e[l+4>>2]=h,l=g,h=nt(e[k>>2]|0)|0,f=0,p=$(22,t|0,o|0,l-n|0,C-t>>2|0,r|0)|0,_=f,f=0,_&1){O=9;break}if(h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)){O=8;break}switch(p|0){case 0:{I=2;break e}case-1:{h=t,O=14;break i}default:}if(t=(e[c>>2]|0)+(p<<2)|0,e[c>>2]=t,(t|0)==(a|0)){O=31;break}if(n=e[o>>2]|0,(g|0)==(s|0))h=s;else{if(h=nt(e[k>>2]|0)|0,f=0,n=k0(20,t|0,n|0,1,r|0)|0,_=f,f=0,_&1){O=38;break}if(h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)){O=37;break}if(n){I=2;break e}e[c>>2]=(e[c>>2]|0)+4,n=(e[o>>2]|0)+1|0,e[o>>2]=n;t:do if((n|0)==(s|0))h=s;else for(h=n;;){if(!(d[h>>0]|0))break t;if(h=h+1|0,(h|0)==(s|0)){h=s;break}}while(!1);t=e[c>>2]|0}if((t|0)==(a|0)|(n|0)==(s|0)){O=47;break e}else g=h}if((O|0)==8)_=b(0)|0,Ie(_);else if((O|0)==9)n=b()|0,h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)&&(_=b(0)|0,Ie(_)),r0(n|0);else if((O|0)==14){e[c>>2]=h;i:do if((n|0)!=(e[o>>2]|0)){t=h;t:for(;;){if(h=nt(e[k>>2]|0)|0,f=0,t=k0(20,t|0,n|0,l-n|0,B|0)|0,_=f,f=0,_&1){O=19;break}if(h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)){O=18;break}switch(t|0){case-1:{O=25;break t}case-2:{O=26;break t}case 0:{n=n+1|0;break}default:n=n+t|0}if(t=(e[c>>2]|0)+4|0,e[c>>2]=t,(n|0)==(e[o>>2]|0)){U=n;break i}}if((O|0)==18)_=b(0)|0,Ie(_);else if((O|0)==19)n=b()|0,h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)&&(_=b(0)|0,Ie(_)),r0(n|0);else if((O|0)==25){e[o>>2]=n,I=2;break e}else if((O|0)==26){e[o>>2]=n,I=1;break e}}else U=n;while(!1);e[o>>2]=U,I=(U|0)!=(s|0)&1;break}else if((O|0)==31){n=e[o>>2]|0,O=47;break}else(O|0)==37?(_=b(0)|0,Ie(_)):(O|0)==38&&(n=b()|0,h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)&&(_=b(0)|0,Ie(_)),r0(n|0))}while(!1);return(O|0)==47&&(I=(n|0)!=(s|0)&1),y=V,I|0}function y6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;switch(a=y,y=y+16|0,l=a,e[o>>2]=n,n=nt(e[t+8>>2]|0)|0,f=0,t=L0(34,l|0,0,r|0)|0,r=f,f=0,r&1&&(l=b()|0,n|0&&(f=0,u0(75,n|0)|0,a=f,f=0,a&1)&&(a=b(0)|0,Ie(a)),r0(l|0)),n|0&&(f=0,u0(75,n|0)|0,r=f,f=0,r&1)&&(r=b(0)|0,Ie(r)),t|0){case 0:case-1:{l=2;break}default:if(t=t+-1|0,t>>>0<=(s-(e[o>>2]|0)|0)>>>0)if(!t)l=0;else for(;;)if(r=d[l>>0]|0,s=e[o>>2]|0,e[o>>2]=s+1,d[s>>0]=r,t=t+-1|0,t)l=l+1|0;else{l=0;break}else l=1}return y=a,l|0}function I6(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;r=t+8|0,f=0,n=u0(75,e[r>>2]|0)|0,s=f,f=0;do if(s&1)o=16;else{if(f=0,s=L0(35,0,0,4)|0,t=f,f=0,t&1){if(t=b(0)|0,!n||(f=0,u0(75,n|0)|0,a=f,f=0,!(a&1)))break;a=b(0)|0,Ie(a)}if(n|0&&(f=0,u0(75,n|0)|0,a=f,f=0,a&1)&&(a=b(0)|0,Ie(a)),s)l=-1;else if(t=e[r>>2]|0,t){if(f=0,t=u0(75,t|0)|0,a=f,f=0,a&1){o=16;break}t|0&&(f=0,u0(75,t|0)|0,a=f,f=0,a&1)?(a=b(0)|0,Ie(a)):l=0}else l=1;return l|0}while(!1);return(o|0)==16&&(t=b(0)|0),Ie(t),0}function D6(t){return t=t|0,0}function E6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;p=s,h=t+8|0;e:do if((n|0)==(s|0)|(o|0)==0)t=0;else{for(t=0,c=0;;){if(a=nt(e[h>>2]|0)|0,f=0,l=L0(36,n|0,p-n|0,r|0)|0,I=f,f=0,I&1){C=a;break}if(a|0&&(f=0,u0(75,a|0)|0,I=f,f=0,I&1)){g=5;break}switch(l|0){case-2:case-1:break e;case 0:{n=n+1|0,l=1;break}default:n=n+l|0}if(t=l+t|0,c=c+1|0,(n|0)==(s|0)|c>>>0>=o>>>0)break e}(g|0)==5&&(I=b(0)|0,Ie(I)),t=b()|0,C|0&&(f=0,u0(75,C|0)|0,I=f,f=0,I&1)&&(I=b(0)|0,Ie(I)),r0(t|0)}while(!1);return t|0}function k6(t){t=t|0;var r=0,n=0;return t=e[t+8>>2]|0,t?(f=0,t=u0(75,t|0)|0,n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),t|0&&(f=0,u0(75,t|0)|0,n=f,f=0,n&1)?(n=b(0)|0,Ie(n)):r=4):r=1,r|0}function F6(t){t=t|0,a0(t)}function M6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0;return t=y,y=y+16|0,h=t+4|0,r=t,e[h>>2]=n,e[r>>2]=l,a=I8(n,s,h,l,a,r,1114111,0)|0,e[o>>2]=e[h>>2],e[c>>2]=e[r>>2],y=t,a|0}function _6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0;return t=y,y=y+16|0,h=t+4|0,r=t,e[h>>2]=n,e[r>>2]=l,a=D8(n,s,h,l,a,r,1114111,0)|0,e[o>>2]=e[h>>2],e[c>>2]=e[r>>2],y=t,a|0}function R6(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,e[o>>2]=n,3}function P6(t){return t=t|0,0}function L6(t){return t=t|0,0}function U6(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,E8(n,s,o,1114111,0)|0}function O6(t){return t=t|0,4}function N6(t){t=t|0,a0(t)}function B6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0;return t=y,y=y+16|0,h=t+4|0,r=t,e[h>>2]=n,e[r>>2]=l,a=k8(n,s,h,l,a,r,1114111,0)|0,e[o>>2]=e[h>>2],e[c>>2]=e[r>>2],y=t,a|0}function V6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0;return t=y,y=y+16|0,h=t+4|0,r=t,e[h>>2]=n,e[r>>2]=l,a=F8(n,s,h,l,a,r,1114111,0)|0,e[o>>2]=e[h>>2],e[c>>2]=e[r>>2],y=t,a|0}function q6(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,e[o>>2]=n,3}function b6(t){return t=t|0,0}function G6(t){return t=t|0,0}function Q6(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,M8(n,s,o,1114111,0)|0}function z6(t){return t=t|0,4}function H6(t){t=t|0,a0(t)}function Y6(t){t=t|0,a0(t)}function j6(t,r){t=t|0,r=r|0,e[t+4>>2]=r+-1,e[t>>2]=44384,d[t+8>>0]=46,d[t+9>>0]=44,t=t+12|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function X6(t,r){t=t|0,r=r|0,e[t+4>>2]=r+-1,e[t>>2]=44424,e[t+8>>2]=46,e[t+12>>2]=44,t=t+16|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function K2(t){t=t|0,e[t>>2]=44384,f0(t+12|0)}function K6(t){t=t|0,K2(t),a0(t)}function W2(t){t=t|0,e[t>>2]=44424,f0(t+16|0)}function W6(t){t=t|0,W2(t),a0(t)}function Z6(t){return t=t|0,d[t+8>>0]|0}function J6(t){return t=t|0,e[t+8>>2]|0}function $6(t){return t=t|0,d[t+9>>0]|0}function em(t){return t=t|0,e[t+12>>2]|0}function im(t,r){t=t|0,r=r|0,l1(t,r+12|0)}function tm(t,r){t=t|0,r=r|0,l1(t,r+16|0)}function rm(t,r){t=t|0,r=r|0,Tt(t,59024,4)}function nm(t,r){t=t|0,r=r|0,u1(t,44996,Mr(44996)|0)}function sm(t,r){t=t|0,r=r|0,Tt(t,59029,5)}function om(t,r){t=t|0,r=r|0,u1(t,45016,Mr(45016)|0)}function st(t){switch(t=t|0,e[t+4>>2]&74|0){case 64:{t=8;break}case 8:{t=16;break}case 0:{t=0;break}default:t=10}return t|0}function lm(t){t=t|0;do if(!(d[2464]|0)&&Ae(2464)|0){if(!(d[2472]|0)&&Ae(2472)|0){t=45040;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=45208);Te(193,0,Q|0)|0,ve(2472)}if(f=0,y0(41,45040,59035)|0,t=f,f=0,!(t&1)&&(f=0,y0(41,45052,59042)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45064,59049)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45076,59057)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45088,59067)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45100,59076)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45112,59083)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45124,59092)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45136,59096)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45148,59100)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45160,59104)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45172,59108)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45184,59112)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45196,59116)|0,t=f,f=0,!(t&1))){e[11302]=45040,ve(2464);break}t=b()|0,bi(2464),r0(t|0)}while(!1);return e[11302]|0}function am(t){t=t|0;do if(!(d[2480]|0)&&Ae(2480)|0){if(!(d[2488]|0)&&Ae(2488)|0){t=45212;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=45380);Te(194,0,Q|0)|0,ve(2488)}if(f=0,y0(42,45212,45380)|0,t=f,f=0,!(t&1)&&(f=0,y0(42,45224,45408)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45236,45436)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45248,45468)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45260,45508)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45272,45544)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45284,45572)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45296,45608)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45308,45624)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45320,45640)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45332,45656)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45344,45672)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45356,45688)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45368,45704)|0,t=f,f=0,!(t&1))){e[11430]=45212,ve(2480);break}t=b()|0,bi(2480),r0(t|0)}while(!1);return e[11430]|0}function fm(t){t=t|0;e:do if(!(d[2496]|0)&&Ae(2496)|0){if(!(d[2504]|0)&&Ae(2504)|0){t=45724;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=46012);Te(195,0,Q|0)|0,ve(2504)}f=0,y0(41,45724,59120)|0,t=f,f=0;do if(!(t&1)&&(f=0,y0(41,45736,59128)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45748,59137)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45760,59143)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45772,59149)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45784,59153)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45796,59158)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45808,59163)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45820,59170)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45832,59180)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45844,59188)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45856,59197)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45868,59206)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45880,59210)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45892,59214)|0,t=f,f=0,!(t&1))){if(f=0,y0(41,45904,59218)|0,t=f,f=0,t&1||(f=0,y0(41,45916,59149)|0,t=f,f=0,t&1)||(f=0,y0(41,45928,59222)|0,t=f,f=0,t&1)||(f=0,y0(41,45940,59226)|0,t=f,f=0,t&1)||(f=0,y0(41,45952,59230)|0,t=f,f=0,t&1)||(f=0,y0(41,45964,59234)|0,t=f,f=0,t&1)||(f=0,y0(41,45976,59238)|0,t=f,f=0,t&1)||(f=0,y0(41,45988,59242)|0,t=f,f=0,t&1)||(f=0,y0(41,46e3,59246)|0,t=f,f=0,t&1))break;e[11503]=45724,ve(2496);break e}while(!1);t=b()|0,bi(2496),r0(t|0)}while(!1);return e[11503]|0}function um(t){t=t|0;e:do if(!(d[2512]|0)&&Ae(2512)|0){if(!(d[2520]|0)&&Ae(2520)|0){t=46016;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=46304);Te(196,0,Q|0)|0,ve(2520)}f=0,y0(42,46016,46304)|0,t=f,f=0;do if(!(t&1)&&(f=0,y0(42,46028,46336)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46040,46372)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46052,46396)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46064,46420)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46076,46436)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46088,46456)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46100,46476)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46112,46504)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46124,46544)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46136,46576)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46148,46612)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46160,46648)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46172,46664)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46184,46680)|0,t=f,f=0,!(t&1))){if(f=0,y0(42,46196,46696)|0,t=f,f=0,t&1||(f=0,y0(42,46208,46420)|0,t=f,f=0,t&1)||(f=0,y0(42,46220,46712)|0,t=f,f=0,t&1)||(f=0,y0(42,46232,46728)|0,t=f,f=0,t&1)||(f=0,y0(42,46244,46744)|0,t=f,f=0,t&1)||(f=0,y0(42,46256,46760)|0,t=f,f=0,t&1)||(f=0,y0(42,46268,46776)|0,t=f,f=0,t&1)||(f=0,y0(42,46280,46792)|0,t=f,f=0,t&1)||(f=0,y0(42,46292,46808)|0,t=f,f=0,t&1))break;e[11706]=46016,ve(2512);break e}while(!1);t=b()|0,bi(2512),r0(t|0)}while(!1);return e[11706]|0}function cm(t){t=t|0;do if(!(d[2528]|0)&&Ae(2528)|0){if(!(d[2536]|0)&&Ae(2536)|0){t=46828;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=47116);Te(197,0,Q|0)|0,ve(2536)}if(f=0,y0(41,46828,59250)|0,t=f,f=0,!(t&1)&&(f=0,y0(41,46840,59253)|0,t=f,f=0,!(t&1))){e[11779]=46828,ve(2528);break}t=b()|0,bi(2528),r0(t|0)}while(!1);return e[11779]|0}function hm(t){t=t|0;do if(!(d[2544]|0)&&Ae(2544)|0){if(!(d[2552]|0)&&Ae(2552)|0){t=47120;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=47408);Te(198,0,Q|0)|0,ve(2552)}if(f=0,y0(42,47120,47408)|0,t=f,f=0,!(t&1)&&(f=0,y0(42,47132,47420)|0,t=f,f=0,!(t&1))){e[11858]=47120,ve(2544);break}t=b()|0,bi(2544),r0(t|0)}while(!1);return e[11858]|0}function mm(t){t=t|0;do if(!(d[2560]|0)&&Ae(2560)|0)if(f=0,m0(5,47436,59256,8),t=f,f=0,t&1)t=b()|0,bi(2560),r0(t|0);else{Te(199,47436,Q|0)|0,ve(2560);break}while(!1);return 47436}function dm(t){t=t|0;var r=0;do if(!(d[2568]|0)&&Ae(2568)|0){if(f=0,t=u0(76,47448)|0,r=f,f=0,!(r&1)&&(f=0,m0(15,47484,47448,t|0),r=f,f=0,!(r&1))){Te(200,47484,Q|0)|0,ve(2568);break}r=b()|0,bi(2568),r0(r|0)}while(!1);return 47484}function gm(t){t=t|0;do if(!(d[2576]|0)&&Ae(2576)|0)if(f=0,m0(5,47496,59265,8),t=f,f=0,t&1)t=b()|0,bi(2576),r0(t|0);else{Te(199,47496,Q|0)|0,ve(2576);break}while(!1);return 47496}function pm(t){t=t|0;var r=0;do if(!(d[2584]|0)&&Ae(2584)|0){if(f=0,t=u0(76,47508)|0,r=f,f=0,!(r&1)&&(f=0,m0(15,47544,47508,t|0),r=f,f=0,!(r&1))){Te(200,47544,Q|0)|0,ve(2584);break}r=b()|0,bi(2584),r0(r|0)}while(!1);return 47544}function Am(t){t=t|0;do if(!(d[2592]|0)&&Ae(2592)|0)if(f=0,m0(5,47556,59274,20),t=f,f=0,t&1)t=b()|0,bi(2592),r0(t|0);else{Te(199,47556,Q|0)|0,ve(2592);break}while(!1);return 47556}function Sm(t){t=t|0;var r=0;do if(!(d[2600]|0)&&Ae(2600)|0){if(f=0,t=u0(76,47568)|0,r=f,f=0,!(r&1)&&(f=0,m0(15,47652,47568,t|0),r=f,f=0,!(r&1))){Te(200,47652,Q|0)|0,ve(2600);break}r=b()|0,bi(2600),r0(r|0)}while(!1);return 47652}function vm(t){t=t|0;do if(!(d[2608]|0)&&Ae(2608)|0)if(f=0,m0(5,47664,59295,11),t=f,f=0,t&1)t=b()|0,bi(2608),r0(t|0);else{Te(199,47664,Q|0)|0,ve(2608);break}while(!1);return 47664}function wm(t){t=t|0;var r=0;do if(!(d[2616]|0)&&Ae(2616)|0){if(f=0,t=u0(76,47676)|0,r=f,f=0,!(r&1)&&(f=0,m0(15,47724,47676,t|0),r=f,f=0,!(r&1))){Te(200,47724,Q|0)|0,ve(2616);break}r=b()|0,bi(2616),r0(r|0)}while(!1);return 47724}function Z2(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=44304,t=t+8|0,r=e[t>>2]|0,f=0,n=g0(3)|0,s=f,f=0;do if(!(s&1)){if((r|0)!=(n|0)&&(f=0,n0(188,e[t>>2]|0),s=f,f=0,s&1))break;return}while(!1);s=b(0)|0,Ie(s)}function mr(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0;M=y,y=y+112|0,h=M,g=(s-n|0)/12|0;do if(g>>>0>100){if(h=xi(g)|0,!(h|0)&&(f=0,we(6),F=f,f=0,F&1)){c=0,k=6;break}c=h,k=11}else c=0,k=11;while(!1);e:do if((k|0)==11){if((n|0)==(s|0))p=0;else for(k=n,C=0,I=h;p=d[k>>0]|0,p&1?p=e[k+4>>2]|0:p=(p&255)>>>1,p?(d[I>>0]=1,p=C):(d[I>>0]=2,p=C+1|0,g=g+-1|0),k=k+12|0,(k|0)!=(s|0);)C=p,I=I+1|0;_=(n|0)==(s|0),F=(n|0)==(s|0),O=0,U=p;i:for(;;){p=e[t>>2]|0;do if(p){if((e[p+12>>2]|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,V=f,f=0,V&1){k=5;break i}if((p|0)==-1){e[t>>2]=0,p=0;break}else{p=e[t>>2]|0;break}}}else p=0;while(!1);if(k=(p|0)==0,C=e[r>>2]|0,C){if((e[C+12>>2]|0)==(e[C+16>>2]|0)){if(f=0,p=u0(e[(e[C>>2]|0)+36>>2]|0,C|0)|0,V=f,f=0,V&1){k=5;break}(p|0)==-1&&(e[r>>2]=0,C=0)}}else C=0;if(I=(C|0)==0,p=e[t>>2]|0,!((g|0)!=0&(k^I))){k=64;break}if(C=e[p+12>>2]|0,(C|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,V=f,f=0,V&1){k=5;break}}else p=N[C>>0]|0;if(p=p&255,!a&&(f=0,p=y0(e[(e[o>>2]|0)+12>>2]|0,o|0,p|0)|0,V=f,f=0,V&1)){k=5;break}if(V=O+1|0,_)p=0,k=U;else for(I=0,B=n,k=U,U=h;;){do if((d[U>>0]|0)==1){if(d[B>>0]&1?C=e[B+8>>2]|0:C=B+1|0,C=d[C+O>>0]|0,!a&&(f=0,C=y0(e[(e[o>>2]|0)+12>>2]|0,o|0,C|0)|0,X=f,f=0,X&1)){k=4;break i}if(p<<24>>24!=C<<24>>24){d[U>>0]=0,C=I,g=g+-1|0;break}C=d[B>>0]|0,C&1?C=e[B+4>>2]|0:C=(C&255)>>>1,(C|0)==(V|0)?(d[U>>0]=2,C=1,k=k+1|0,g=g+-1|0):C=1}else C=I;while(!1);if(B=B+12|0,(B|0)==(s|0)){p=C;break}else I=C,U=U+1|0}if(!p){O=V,U=k;continue}if(p=e[t>>2]|0,C=p+12|0,I=e[C>>2]|0,(I|0)==(e[p+16>>2]|0)){if(f=0,u0(e[(e[p>>2]|0)+40>>2]|0,p|0)|0,X=f,f=0,X&1){k=5;break}}else e[C>>2]=I+1;if((k+g|0)>>>0<2|F){O=V,U=k;continue}else p=n,I=k,k=h;for(;;)if((d[k>>0]|0)==2&&(C=d[p>>0]|0,C&1?C=e[p+4>>2]|0:C=(C&255)>>>1,(C|0)!=(V|0)&&(d[k>>0]=0,I=I+-1|0)),p=p+12|0,(p|0)==(s|0)){O=V,U=I;continue i}else k=k+1|0}if((k|0)==4){n=b()|0;break}else if((k|0)==5){n=b()|0;break}else if((k|0)==64){do if(p){if((e[p+12>>2]|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,X=f,f=0,X&1){k=6;break e}if((p|0)==-1){e[t>>2]=0,p=0;break}else{p=e[t>>2]|0;break}}}else p=0;while(!1);g=(p|0)==0;do if(I)k=76;else{if((e[C+12>>2]|0)==(e[C+16>>2]|0)){if(f=0,p=u0(e[(e[C>>2]|0)+36>>2]|0,C|0)|0,X=f,f=0,X&1){k=6;break e}if((p|0)==-1){e[r>>2]=0,k=76;break}}g||(k=77)}while(!1);(k|0)==76&&g&&(k=77),(k|0)==77&&(e[l>>2]=e[l>>2]|2);i:do if((n|0)==(s|0))k=81;else for(;;){if((d[h>>0]|0)==2)break i;if(n=n+12|0,(n|0)==(s|0)){k=81;break}else h=h+1|0}while(!1);return(k|0)==81&&(e[l>>2]=e[l>>2]|4,n=s),c&&Ze(c),y=M,n|0}}while(!1);return(k|0)==6&&(n=b()|0),c&&Ze(c),r0(n|0),0}function Tm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=25;else{C=K+8|0,I=K+1|0,s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,p=f,f=0,p&1){Z=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;c=(t|0)==0,a=e[n>>2]|0;do if(a){if((e[a+12>>2]|0)!=(e[a+16>>2]|0)){if(c)break;break i}if(f=0,h=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=24;break i}if((h|0)!=-1){if(c)break;break i}else{e[n>>2]=0,Z=16;break}}else Z=16;while(!1);if((Z|0)==16)if(Z=0,c){a=0;break}else a=0;if(c=d[K>>0]|0,c=c&1?e[k>>2]|0:(c&255)>>>1,(e[V>>2]|0)==(s+c|0)){if(f=0,m0(8,K|0,c<<1|0,0),p=f,f=0,p&1){Z=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,m0(8,K|0,s|0,0),p=f,f=0,p&1){Z=24;break}s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s+c}if(h=t+12|0,c=e[h>>2]|0,p=t+16|0,(c|0)==(e[p>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}}else c=N[c>>0]|0;if(Rt(c&255,B,s,V,O,g,t0,F,M,U)|0)break;if(a=e[h>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}else continue;else{e[h>>2]=a+1;continue}}if((Z|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,s=k0(21,s|0,e[V>>2]|0,o|0,B|0)|0,s0=f,f=0,s0&1)Z=25;else{if(e[l>>2]=s,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=25;break e}if((t|0)==-1){e[n>>2]=0,Z=49;break}}s||(Z=50)}else Z=49;while(!1);return(Z|0)==49&&s&&(Z=50),(Z|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==25&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Cm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=25;else{C=K+8|0,I=K+1|0,s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,p=f,f=0,p&1){Z=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;a=(t|0)==0,c=e[n>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0)){if(a)break;break i}if(f=0,h=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,p=f,f=0,p&1){Z=24;break i}if((h|0)!=-1){if(a)break;break i}else{e[n>>2]=0,Z=16;break}}else Z=16;while(!1);if((Z|0)==16)if(Z=0,a){c=0;break}else c=0;if(a=d[K>>0]|0,a=a&1?e[k>>2]|0:(a&255)>>>1,(e[V>>2]|0)==(s+a|0)){if(f=0,m0(8,K|0,a<<1|0,0),p=f,f=0,p&1){Z=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,m0(8,K|0,s|0,0),p=f,f=0,p&1){Z=24;break}s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s+a}if(h=t+12|0,a=e[h>>2]|0,p=t+16|0,(a|0)==(e[p>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}}else a=N[a>>0]|0;if(Rt(a&255,B,s,V,O,g,t0,F,M,U)|0)break;if(a=e[h>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}else continue;else{e[h>>2]=a+1;continue}}if((Z|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,s=k0(22,s|0,e[V>>2]|0,o|0,B|0)|0,a=I0,s0=f,f=0,s0&1)Z=25;else{if(s0=l,e[s0>>2]=s,e[s0+4>>2]=a,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,s0=f,f=0,s0&1){Z=25;break e}if((t|0)==-1){e[n>>2]=0,Z=49;break}}s||(Z=50)}else Z=49;while(!1);return(Z|0)==49&&s&&(Z=50),(Z|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==25&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function xm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=25;else{C=K+8|0,I=K+1|0,s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,p=f,f=0,p&1){Z=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;c=(t|0)==0,a=e[n>>2]|0;do if(a){if((e[a+12>>2]|0)!=(e[a+16>>2]|0)){if(c)break;break i}if(f=0,h=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=24;break i}if((h|0)!=-1){if(c)break;break i}else{e[n>>2]=0,Z=16;break}}else Z=16;while(!1);if((Z|0)==16)if(Z=0,c){a=0;break}else a=0;if(c=d[K>>0]|0,c=c&1?e[k>>2]|0:(c&255)>>>1,(e[V>>2]|0)==(s+c|0)){if(f=0,m0(8,K|0,c<<1|0,0),p=f,f=0,p&1){Z=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,m0(8,K|0,s|0,0),p=f,f=0,p&1){Z=24;break}s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s+c}if(h=t+12|0,c=e[h>>2]|0,p=t+16|0,(c|0)==(e[p>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}}else c=N[c>>0]|0;if(Rt(c&255,B,s,V,O,g,t0,F,M,U)|0)break;if(a=e[h>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}else continue;else{e[h>>2]=a+1;continue}}if((Z|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,s=k0(23,s|0,e[V>>2]|0,o|0,B|0)|0,s0=f,f=0,s0&1)Z=25;else{if(E[l>>1]=s,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=25;break e}if((t|0)==-1){e[n>>2]=0,Z=49;break}}s||(Z=50)}else Z=49;while(!1);return(Z|0)==49&&s&&(Z=50),(Z|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==25&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function ym(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=25;else{C=K+8|0,I=K+1|0,s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,p=f,f=0,p&1){Z=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;c=(t|0)==0,a=e[n>>2]|0;do if(a){if((e[a+12>>2]|0)!=(e[a+16>>2]|0)){if(c)break;break i}if(f=0,h=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=24;break i}if((h|0)!=-1){if(c)break;break i}else{e[n>>2]=0,Z=16;break}}else Z=16;while(!1);if((Z|0)==16)if(Z=0,c){a=0;break}else a=0;if(c=d[K>>0]|0,c=c&1?e[k>>2]|0:(c&255)>>>1,(e[V>>2]|0)==(s+c|0)){if(f=0,m0(8,K|0,c<<1|0,0),p=f,f=0,p&1){Z=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,m0(8,K|0,s|0,0),p=f,f=0,p&1){Z=24;break}s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s+c}if(h=t+12|0,c=e[h>>2]|0,p=t+16|0,(c|0)==(e[p>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}}else c=N[c>>0]|0;if(Rt(c&255,B,s,V,O,g,t0,F,M,U)|0)break;if(a=e[h>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}else continue;else{e[h>>2]=a+1;continue}}if((Z|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,s=k0(24,s|0,e[V>>2]|0,o|0,B|0)|0,s0=f,f=0,s0&1)Z=25;else{if(e[l>>2]=s,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=25;break e}if((t|0)==-1){e[n>>2]=0,Z=49;break}}s||(Z=50)}else Z=49;while(!1);return(Z|0)==49&&s&&(Z=50),(Z|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==25&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Im(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=25;else{C=K+8|0,I=K+1|0,s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,p=f,f=0,p&1){Z=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;c=(t|0)==0,a=e[n>>2]|0;do if(a){if((e[a+12>>2]|0)!=(e[a+16>>2]|0)){if(c)break;break i}if(f=0,h=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=24;break i}if((h|0)!=-1){if(c)break;break i}else{e[n>>2]=0,Z=16;break}}else Z=16;while(!1);if((Z|0)==16)if(Z=0,c){a=0;break}else a=0;if(c=d[K>>0]|0,c=c&1?e[k>>2]|0:(c&255)>>>1,(e[V>>2]|0)==(s+c|0)){if(f=0,m0(8,K|0,c<<1|0,0),p=f,f=0,p&1){Z=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,m0(8,K|0,s|0,0),p=f,f=0,p&1){Z=24;break}s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s+c}if(h=t+12|0,c=e[h>>2]|0,p=t+16|0,(c|0)==(e[p>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}}else c=N[c>>0]|0;if(Rt(c&255,B,s,V,O,g,t0,F,M,U)|0)break;if(a=e[h>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}else continue;else{e[h>>2]=a+1;continue}}if((Z|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,s=k0(25,s|0,e[V>>2]|0,o|0,B|0)|0,s0=f,f=0,s0&1)Z=25;else{if(e[l>>2]=s,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=25;break e}if((t|0)==-1){e[n>>2]=0,Z=49;break}}s||(Z=50)}else Z=49;while(!1);return(Z|0)==49&&s&&(Z=50),(Z|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==25&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Dm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=25;else{C=K+8|0,I=K+1|0,s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,p=f,f=0,p&1){Z=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;a=(t|0)==0,c=e[n>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0)){if(a)break;break i}if(f=0,h=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,p=f,f=0,p&1){Z=24;break i}if((h|0)!=-1){if(a)break;break i}else{e[n>>2]=0,Z=16;break}}else Z=16;while(!1);if((Z|0)==16)if(Z=0,a){c=0;break}else c=0;if(a=d[K>>0]|0,a=a&1?e[k>>2]|0:(a&255)>>>1,(e[V>>2]|0)==(s+a|0)){if(f=0,m0(8,K|0,a<<1|0,0),p=f,f=0,p&1){Z=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,m0(8,K|0,s|0,0),p=f,f=0,p&1){Z=24;break}s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s+a}if(h=t+12|0,a=e[h>>2]|0,p=t+16|0,(a|0)==(e[p>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}}else a=N[a>>0]|0;if(Rt(a&255,B,s,V,O,g,t0,F,M,U)|0)break;if(a=e[h>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}else continue;else{e[h>>2]=a+1;continue}}if((Z|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,s=k0(26,s|0,e[V>>2]|0,o|0,B|0)|0,a=I0,s0=f,f=0,s0&1)Z=25;else{if(s0=l,e[s0>>2]=s,e[s0+4>>2]=a,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,s0=f,f=0,s0&1){Z=25;break e}if((t|0)==-1){e[n>>2]=0,Z=49;break}}s||(Z=50)}else Z=49;while(!1);return(Z|0)==49&&s&&(Z=50),(Z|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==25&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Em(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;Z=y,y=y+240|0,V=Z+208|0,c=Z+203|0,h=Z+202|0,w0=Z+24|0,s0=Z+12|0,_=Z+8|0,K=Z+40|0,t0=Z+4|0,F=Z,M=Z+201|0,O=Z+200|0,m1(w0,s,V,c,h),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),B=f,f=0;e:do if(B&1)v0=25;else{k=s0+8|0,U=s0+1|0,s=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=s,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,B=s0+4|0,I=d[c>>0]|0,C=d[h>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,g=f,f=0,g&1){v0=24;break}(c|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;h=(t|0)==0,c=e[n>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0)){if(h)break;break i}if(f=0,p=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,g=f,f=0,g&1){v0=24;break i}if((p|0)!=-1){if(h)break;break i}else{e[n>>2]=0,v0=16;break}}else v0=16;while(!1);if((v0|0)==16)if(v0=0,h){c=0;break}else c=0;if(h=d[s0>>0]|0,h=h&1?e[B>>2]|0:(h&255)>>>1,(e[_>>2]|0)==(s+h|0)){if(f=0,m0(8,s0|0,h<<1|0,0),g=f,f=0,g&1){v0=24;break}if(d[s0>>0]&1?s=(e[s0>>2]&-2)+-1|0:s=10,f=0,m0(8,s0|0,s|0,0),g=f,f=0,g&1){v0=24;break}s=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=s+h}if(p=t+12|0,h=e[p>>2]|0,g=t+16|0,(h|0)==(e[g>>2]|0)){if(f=0,h=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=24;break}}else h=N[h>>0]|0;if(d1(h&255,M,O,s,_,I,C,w0,K,t0,F,V)|0)break;if(c=e[p>>2]|0,(c|0)==(e[g>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=24;break}else continue;else{e[p>>2]=c+1;continue}}if((v0|0)==24){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+Z0(1,s|0,e[_>>2]|0,o|0),A0=f,f=0,A0&1)v0=25;else{if(e0[l>>2]=a,Oi(w0,K,e[t0>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){v0=25;break e}if((t|0)==-1){e[n>>2]=0,v0=49;break}}s||(v0=50)}else v0=49;while(!1);return(v0|0)==49&&s&&(v0=50),(v0|0)==50&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,f0(s0),f0(w0),y=Z,A0|0}}while(!1);return(v0|0)==25&&(t=b()|0),f0(s0),f0(w0),r0(t|0),0}function km(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;Z=y,y=y+240|0,V=Z+208|0,c=Z+203|0,h=Z+202|0,w0=Z+24|0,s0=Z+12|0,_=Z+8|0,K=Z+40|0,t0=Z+4|0,F=Z,M=Z+201|0,O=Z+200|0,m1(w0,s,V,c,h),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),B=f,f=0;e:do if(B&1)v0=25;else{k=s0+8|0,U=s0+1|0,s=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=s,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,B=s0+4|0,I=d[c>>0]|0,C=d[h>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,g=f,f=0,g&1){v0=24;break}(c|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;h=(t|0)==0,c=e[n>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0)){if(h)break;break i}if(f=0,p=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,g=f,f=0,g&1){v0=24;break i}if((p|0)!=-1){if(h)break;break i}else{e[n>>2]=0,v0=16;break}}else v0=16;while(!1);if((v0|0)==16)if(v0=0,h){c=0;break}else c=0;if(h=d[s0>>0]|0,h=h&1?e[B>>2]|0:(h&255)>>>1,(e[_>>2]|0)==(s+h|0)){if(f=0,m0(8,s0|0,h<<1|0,0),g=f,f=0,g&1){v0=24;break}if(d[s0>>0]&1?s=(e[s0>>2]&-2)+-1|0:s=10,f=0,m0(8,s0|0,s|0,0),g=f,f=0,g&1){v0=24;break}s=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=s+h}if(p=t+12|0,h=e[p>>2]|0,g=t+16|0,(h|0)==(e[g>>2]|0)){if(f=0,h=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=24;break}}else h=N[h>>0]|0;if(d1(h&255,M,O,s,_,I,C,w0,K,t0,F,V)|0)break;if(c=e[p>>2]|0,(c|0)==(e[g>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=24;break}else continue;else{e[p>>2]=c+1;continue}}if((v0|0)==24){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+Z0(2,s|0,e[_>>2]|0,o|0),A0=f,f=0,A0&1)v0=25;else{if(H[l>>3]=a,Oi(w0,K,e[t0>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){v0=25;break e}if((t|0)==-1){e[n>>2]=0,v0=49;break}}s||(v0=50)}else v0=49;while(!1);return(v0|0)==49&&s&&(v0=50),(v0|0)==50&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,f0(s0),f0(w0),y=Z,A0|0}}while(!1);return(v0|0)==25&&(t=b()|0),f0(s0),f0(w0),r0(t|0),0}function Fm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;Z=y,y=y+240|0,V=Z+208|0,c=Z+203|0,h=Z+202|0,w0=Z+24|0,s0=Z+12|0,_=Z+8|0,K=Z+40|0,t0=Z+4|0,F=Z,M=Z+201|0,O=Z+200|0,m1(w0,s,V,c,h),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),B=f,f=0;e:do if(B&1)v0=25;else{k=s0+8|0,U=s0+1|0,s=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=s,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,B=s0+4|0,I=d[c>>0]|0,C=d[h>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,g=f,f=0,g&1){v0=24;break}(c|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;h=(t|0)==0,c=e[n>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0)){if(h)break;break i}if(f=0,p=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,g=f,f=0,g&1){v0=24;break i}if((p|0)!=-1){if(h)break;break i}else{e[n>>2]=0,v0=16;break}}else v0=16;while(!1);if((v0|0)==16)if(v0=0,h){c=0;break}else c=0;if(h=d[s0>>0]|0,h=h&1?e[B>>2]|0:(h&255)>>>1,(e[_>>2]|0)==(s+h|0)){if(f=0,m0(8,s0|0,h<<1|0,0),g=f,f=0,g&1){v0=24;break}if(d[s0>>0]&1?s=(e[s0>>2]&-2)+-1|0:s=10,f=0,m0(8,s0|0,s|0,0),g=f,f=0,g&1){v0=24;break}s=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=s+h}if(p=t+12|0,h=e[p>>2]|0,g=t+16|0,(h|0)==(e[g>>2]|0)){if(f=0,h=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=24;break}}else h=N[h>>0]|0;if(d1(h&255,M,O,s,_,I,C,w0,K,t0,F,V)|0)break;if(c=e[p>>2]|0,(c|0)==(e[g>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=24;break}else continue;else{e[p>>2]=c+1;continue}}if((v0|0)==24){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+Z0(3,s|0,e[_>>2]|0,o|0),A0=f,f=0,A0&1)v0=25;else{if(H[l>>3]=a,Oi(w0,K,e[t0>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){v0=25;break e}if((t|0)==-1){e[n>>2]=0,v0=49;break}}s||(v0=50)}else v0=49;while(!1);return(v0|0)==49&&s&&(v0=50),(v0|0)==50&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,f0(s0),f0(w0),y=Z,A0|0}}while(!1);return(v0|0)==25&&(t=b()|0),f0(s0),f0(w0),r0(t|0),0}function Mm(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;return o=y,y=y+16|0,l=o,e[l>>2]=s,s=nt(r)|0,r=Rn(t,n,l)|0,s|0&&(f=0,u0(75,s|0)|0,l=f,f=0,l&1)&&(l=b(0)|0,Ie(l)),y=o,r|0}function dr(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0;M=y,y=y+112|0,h=M,g=(s-n|0)/12|0;do if(g>>>0>100){if(h=xi(g)|0,!(h|0)&&(f=0,we(6),F=f,f=0,F&1)){c=0,I=6;break}c=h,I=11}else c=0,I=11;while(!1);e:do if((I|0)==11){if((n|0)==(s|0))p=0;else for(k=n,C=0,I=h;p=d[k>>0]|0,p&1?p=e[k+4>>2]|0:p=(p&255)>>>1,p?(d[I>>0]=1,p=C):(d[I>>0]=2,p=C+1|0,g=g+-1|0),k=k+12|0,(k|0)!=(s|0);)C=p,I=I+1|0;_=(n|0)==(s|0),F=(n|0)==(s|0),O=0,U=g;i:for(;;){g=e[t>>2]|0;do if(g){if(C=e[g+12>>2]|0,(C|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,V=f,f=0,V&1){I=5;break i}}else g=e[C>>2]|0;if((g|0)==-1){e[t>>2]=0,k=1;break}else{k=(e[t>>2]|0)==0;break}}else k=1;while(!1);if(C=e[r>>2]|0,C){if(g=e[C+12>>2]|0,(g|0)==(e[C+16>>2]|0)){if(f=0,g=u0(e[(e[C>>2]|0)+36>>2]|0,C|0)|0,V=f,f=0,V&1){I=5;break}}else g=e[g>>2]|0;(g|0)==-1?(e[r>>2]=0,C=0,I=1):I=0}else C=0,I=1;if(g=e[t>>2]|0,!((U|0)!=0&(k^I))){I=66;break}if(C=e[g+12>>2]|0,(C|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,V=f,f=0,V&1){I=5;break}}else g=e[C>>2]|0;if(!a&&(f=0,g=y0(e[(e[o>>2]|0)+28>>2]|0,o|0,g|0)|0,V=f,f=0,V&1)){I=5;break}if(V=O+1|0,_)g=0,k=U;else for(k=0,B=n,I=U,U=h;;){do if((d[U>>0]|0)==1){if(d[B>>0]&1?C=e[B+8>>2]|0:C=B+4|0,C=e[C+(O<<2)>>2]|0,!a&&(f=0,C=y0(e[(e[o>>2]|0)+28>>2]|0,o|0,C|0)|0,X=f,f=0,X&1)){I=4;break i}if((g|0)!=(C|0)){d[U>>0]=0,C=k,I=I+-1|0;break}C=d[B>>0]|0,C&1?C=e[B+4>>2]|0:C=(C&255)>>>1,(C|0)==(V|0)?(d[U>>0]=2,C=1,p=p+1|0,I=I+-1|0):C=1}else C=k;while(!1);if(B=B+12|0,(B|0)==(s|0)){g=C,k=I;break}else k=C,U=U+1|0}if(!g){O=V,U=k;continue}if(g=e[t>>2]|0,C=g+12|0,I=e[C>>2]|0,(I|0)==(e[g+16>>2]|0)){if(f=0,u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,X=f,f=0,X&1){I=5;break}}else e[C>>2]=I+4;if((p+k|0)>>>0<2|F){O=V,U=k;continue}else g=n,I=h;for(;;)if((d[I>>0]|0)==2&&(C=d[g>>0]|0,C&1?C=e[g+4>>2]|0:C=(C&255)>>>1,(C|0)!=(V|0)&&(d[I>>0]=0,p=p+-1|0)),g=g+12|0,(g|0)==(s|0)){O=V,U=k;continue i}else I=I+1|0}if((I|0)==4){n=b()|0;break}else if((I|0)==5){n=b()|0;break}else if((I|0)==66){do if(g){if(p=e[g+12>>2]|0,(p|0)==(e[g+16>>2]|0)){if(f=0,p=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,X=f,f=0,X&1){I=6;break e}}else p=e[p>>2]|0;if((p|0)==-1){e[t>>2]=0,g=1;break}else{g=(e[t>>2]|0)==0;break}}else g=1;while(!1);do if(C){if(p=e[C+12>>2]|0,(p|0)==(e[C+16>>2]|0)){if(f=0,p=u0(e[(e[C>>2]|0)+36>>2]|0,C|0)|0,X=f,f=0,X&1){I=6;break e}}else p=e[p>>2]|0;if((p|0)!=-1){if(g)break;I=81;break}else{e[r>>2]=0,I=79;break}}else I=79;while(!1);(I|0)==79&&g&&(I=81),(I|0)==81&&(e[l>>2]=e[l>>2]|2);i:do if((n|0)==(s|0))I=85;else for(;;){if((d[h>>0]|0)==2)break i;if(n=n+12|0,(n|0)==(s|0)){I=85;break}else h=h+1|0}while(!1);return(I|0)==85&&(e[l>>2]=e[l>>2]|4,n=s),c&&Ze(c),y=M,n|0}}while(!1);return(I|0)==6&&(n=b()|0),c&&Ze(c),r0(n|0),0}function _m(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Qt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=26;else{C=K+8|0,I=K+1|0,t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,s=0,c=1):(s=a,c=0)}else s=0,c=1;h=e[n>>2]|0;do if(h){if(a=e[h+12>>2]|0,(a|0)==(e[h+16>>2]|0)){if(f=0,a=u0(e[(e[h>>2]|0)+36>>2]|0,h|0)|0,p=f,f=0,p&1){Z=25;break i}}else a=e[a>>2]|0;if((a|0)!=-1){if(c)break;a=h;break i}else{e[n>>2]=0,Z=17;break}}else Z=17;while(!1);if((Z|0)==17)if(Z=0,c){a=0;break}else h=0;if(a=d[K>>0]|0,a=a&1?e[k>>2]|0:(a&255)>>>1,(e[V>>2]|0)==(t+a|0)){if(f=0,m0(8,K|0,a<<1|0,0),p=f,f=0,p&1){Z=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),p=f,f=0,p&1){Z=25;break}t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t+a}if(c=s+12|0,a=e[c>>2]|0,p=s+16|0,(a|0)==(e[p>>2]|0)){if(f=0,a=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=25;break}}else a=e[a>>2]|0;if(Pt(a,B,t,V,O,g,t0,F,M,U)|0){a=h;break}if(a=e[c>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=25;break}else{a=s;continue}else{e[c>>2]=a+4,a=s;continue}}if((Z|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,t=k0(21,t|0,e[V>>2]|0,o|0,B|0)|0,s0=f,f=0,s0&1)Z=26;else{if(e[l>>2]=t,Oi(t0,F,e[M>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;Z=53;break}else{e[n>>2]=0,Z=51;break}}else Z=51;while(!1);return(Z|0)==51&&s&&(Z=53),(Z|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==26&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Rm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Qt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=26;else{C=K+8|0,I=K+1|0,t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,a=0,h=1):h=0}else a=0,h=1;c=e[n>>2]|0;do if(c){if(s=e[c+12>>2]|0,(s|0)==(e[c+16>>2]|0)){if(f=0,s=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,p=f,f=0,p&1){Z=25;break i}}else s=e[s>>2]|0;if((s|0)!=-1){if(h)break;break i}else{e[n>>2]=0,Z=17;break}}else Z=17;while(!1);if((Z|0)==17)if(Z=0,h){c=0;break}else c=0;if(s=d[K>>0]|0,s=s&1?e[k>>2]|0:(s&255)>>>1,(e[V>>2]|0)==(t+s|0)){if(f=0,m0(8,K|0,s<<1|0,0),p=f,f=0,p&1){Z=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),p=f,f=0,p&1){Z=25;break}t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t+s}if(h=a+12|0,s=e[h>>2]|0,p=a+16|0,(s|0)==(e[p>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=25;break}}else s=e[s>>2]|0;if(Pt(s,B,t,V,O,g,t0,F,M,U)|0)break;if(s=e[h>>2]|0,(s|0)==(e[p>>2]|0))if(f=0,u0(e[(e[a>>2]|0)+40>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=25;break}else continue;else{e[h>>2]=s+4;continue}}if((Z|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,t=k0(22,t|0,e[V>>2]|0,o|0,B|0)|0,s=I0,s0=f,f=0,s0&1)Z=26;else{if(s0=l,e[s0>>2]=t,e[s0+4>>2]=s,Oi(t0,F,e[M>>2]|0,o),a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(c){if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,s0=f,f=0,s0&1){Z=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;Z=53;break}else{e[n>>2]=0,Z=51;break}}else Z=51;while(!1);return(Z|0)==51&&s&&(Z=53),(Z|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==26&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Pm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Qt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=26;else{C=K+8|0,I=K+1|0,t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,s=0,c=1):(s=a,c=0)}else s=0,c=1;h=e[n>>2]|0;do if(h){if(a=e[h+12>>2]|0,(a|0)==(e[h+16>>2]|0)){if(f=0,a=u0(e[(e[h>>2]|0)+36>>2]|0,h|0)|0,p=f,f=0,p&1){Z=25;break i}}else a=e[a>>2]|0;if((a|0)!=-1){if(c)break;a=h;break i}else{e[n>>2]=0,Z=17;break}}else Z=17;while(!1);if((Z|0)==17)if(Z=0,c){a=0;break}else h=0;if(a=d[K>>0]|0,a=a&1?e[k>>2]|0:(a&255)>>>1,(e[V>>2]|0)==(t+a|0)){if(f=0,m0(8,K|0,a<<1|0,0),p=f,f=0,p&1){Z=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),p=f,f=0,p&1){Z=25;break}t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t+a}if(c=s+12|0,a=e[c>>2]|0,p=s+16|0,(a|0)==(e[p>>2]|0)){if(f=0,a=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=25;break}}else a=e[a>>2]|0;if(Pt(a,B,t,V,O,g,t0,F,M,U)|0){a=h;break}if(a=e[c>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=25;break}else{a=s;continue}else{e[c>>2]=a+4,a=s;continue}}if((Z|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,t=k0(23,t|0,e[V>>2]|0,o|0,B|0)|0,s0=f,f=0,s0&1)Z=26;else{if(E[l>>1]=t,Oi(t0,F,e[M>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;Z=53;break}else{e[n>>2]=0,Z=51;break}}else Z=51;while(!1);return(Z|0)==51&&s&&(Z=53),(Z|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==26&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Lm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Qt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=26;else{C=K+8|0,I=K+1|0,t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,s=0,c=1):(s=a,c=0)}else s=0,c=1;h=e[n>>2]|0;do if(h){if(a=e[h+12>>2]|0,(a|0)==(e[h+16>>2]|0)){if(f=0,a=u0(e[(e[h>>2]|0)+36>>2]|0,h|0)|0,p=f,f=0,p&1){Z=25;break i}}else a=e[a>>2]|0;if((a|0)!=-1){if(c)break;a=h;break i}else{e[n>>2]=0,Z=17;break}}else Z=17;while(!1);if((Z|0)==17)if(Z=0,c){a=0;break}else h=0;if(a=d[K>>0]|0,a=a&1?e[k>>2]|0:(a&255)>>>1,(e[V>>2]|0)==(t+a|0)){if(f=0,m0(8,K|0,a<<1|0,0),p=f,f=0,p&1){Z=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),p=f,f=0,p&1){Z=25;break}t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t+a}if(c=s+12|0,a=e[c>>2]|0,p=s+16|0,(a|0)==(e[p>>2]|0)){if(f=0,a=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=25;break}}else a=e[a>>2]|0;if(Pt(a,B,t,V,O,g,t0,F,M,U)|0){a=h;break}if(a=e[c>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=25;break}else{a=s;continue}else{e[c>>2]=a+4,a=s;continue}}if((Z|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,t=k0(24,t|0,e[V>>2]|0,o|0,B|0)|0,s0=f,f=0,s0&1)Z=26;else{if(e[l>>2]=t,Oi(t0,F,e[M>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;Z=53;break}else{e[n>>2]=0,Z=51;break}}else Z=51;while(!1);return(Z|0)==51&&s&&(Z=53),(Z|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==26&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Um(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Qt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=26;else{C=K+8|0,I=K+1|0,t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,s=0,c=1):(s=a,c=0)}else s=0,c=1;h=e[n>>2]|0;do if(h){if(a=e[h+12>>2]|0,(a|0)==(e[h+16>>2]|0)){if(f=0,a=u0(e[(e[h>>2]|0)+36>>2]|0,h|0)|0,p=f,f=0,p&1){Z=25;break i}}else a=e[a>>2]|0;if((a|0)!=-1){if(c)break;a=h;break i}else{e[n>>2]=0,Z=17;break}}else Z=17;while(!1);if((Z|0)==17)if(Z=0,c){a=0;break}else h=0;if(a=d[K>>0]|0,a=a&1?e[k>>2]|0:(a&255)>>>1,(e[V>>2]|0)==(t+a|0)){if(f=0,m0(8,K|0,a<<1|0,0),p=f,f=0,p&1){Z=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),p=f,f=0,p&1){Z=25;break}t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t+a}if(c=s+12|0,a=e[c>>2]|0,p=s+16|0,(a|0)==(e[p>>2]|0)){if(f=0,a=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=25;break}}else a=e[a>>2]|0;if(Pt(a,B,t,V,O,g,t0,F,M,U)|0){a=h;break}if(a=e[c>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=25;break}else{a=s;continue}else{e[c>>2]=a+4,a=s;continue}}if((Z|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,t=k0(25,t|0,e[V>>2]|0,o|0,B|0)|0,s0=f,f=0,s0&1)Z=26;else{if(e[l>>2]=t,Oi(t0,F,e[M>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;Z=53;break}else{e[n>>2]=0,Z=51;break}}else Z=51;while(!1);return(Z|0)==51&&s&&(Z=53),(Z|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==26&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Om(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Qt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=26;else{C=K+8|0,I=K+1|0,t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,a=0,h=1):h=0}else a=0,h=1;c=e[n>>2]|0;do if(c){if(s=e[c+12>>2]|0,(s|0)==(e[c+16>>2]|0)){if(f=0,s=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,p=f,f=0,p&1){Z=25;break i}}else s=e[s>>2]|0;if((s|0)!=-1){if(h)break;break i}else{e[n>>2]=0,Z=17;break}}else Z=17;while(!1);if((Z|0)==17)if(Z=0,h){c=0;break}else c=0;if(s=d[K>>0]|0,s=s&1?e[k>>2]|0:(s&255)>>>1,(e[V>>2]|0)==(t+s|0)){if(f=0,m0(8,K|0,s<<1|0,0),p=f,f=0,p&1){Z=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),p=f,f=0,p&1){Z=25;break}t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t+s}if(h=a+12|0,s=e[h>>2]|0,p=a+16|0,(s|0)==(e[p>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=25;break}}else s=e[s>>2]|0;if(Pt(s,B,t,V,O,g,t0,F,M,U)|0)break;if(s=e[h>>2]|0,(s|0)==(e[p>>2]|0))if(f=0,u0(e[(e[a>>2]|0)+40>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=25;break}else continue;else{e[h>>2]=s+4;continue}}if((Z|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,t=k0(26,t|0,e[V>>2]|0,o|0,B|0)|0,s=I0,s0=f,f=0,s0&1)Z=26;else{if(s0=l,e[s0>>2]=t,e[s0+4>>2]=s,Oi(t0,F,e[M>>2]|0,o),a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(c){if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,s0=f,f=0,s0&1){Z=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;Z=53;break}else{e[n>>2]=0,Z=51;break}}else Z=51;while(!1);return(Z|0)==51&&s&&(Z=53),(Z|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==26&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Nm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;Z=y,y=y+352|0,V=Z+208|0,c=Z+40|0,h=Z+36|0,w0=Z+24|0,s0=Z+12|0,_=Z+8|0,K=Z+48|0,t0=Z+4|0,F=Z,M=Z+337|0,O=Z+336|0,g1(w0,s,V,c,h),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),B=f,f=0;e:do if(B&1)v0=26;else{k=s0+8|0,U=s0+1|0,t=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=t,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,B=s0+4|0,I=e[c>>2]|0,C=e[h>>2]|0,s=e[r>>2]|0;i:for(;;){if(s){if(c=e[s+12>>2]|0,(c|0)==(e[s+16>>2]|0)){if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,g=f,f=0,g&1){v0=25;break}}else c=e[c>>2]|0;(c|0)==-1?(e[r>>2]=0,s=0,p=1):p=0}else s=0,p=1;c=e[n>>2]|0;do if(c){if(h=e[c+12>>2]|0,(h|0)==(e[c+16>>2]|0)){if(f=0,h=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,g=f,f=0,g&1){v0=25;break i}}else h=e[h>>2]|0;if((h|0)!=-1){if(p)break;break i}else{e[n>>2]=0,v0=17;break}}else v0=17;while(!1);if((v0|0)==17)if(v0=0,p){c=0;break}else c=0;if(h=d[s0>>0]|0,h=h&1?e[B>>2]|0:(h&255)>>>1,(e[_>>2]|0)==(t+h|0)){if(f=0,m0(8,s0|0,h<<1|0,0),g=f,f=0,g&1){v0=25;break}if(d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),g=f,f=0,g&1){v0=25;break}t=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=t+h}if(p=s+12|0,h=e[p>>2]|0,g=s+16|0,(h|0)==(e[g>>2]|0)){if(f=0,h=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=25;break}}else h=e[h>>2]|0;if(p1(h,M,O,t,_,I,C,w0,K,t0,F,V)|0)break;if(c=e[p>>2]|0,(c|0)==(e[g>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=25;break}else continue;else{e[p>>2]=c+4;continue}}if((v0|0)==25){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+Z0(1,t|0,e[_>>2]|0,o|0),A0=f,f=0,A0&1)v0=26;else{if(e0[l>>2]=a,Oi(w0,K,e[t0>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(c){if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){v0=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;v0=53;break}else{e[n>>2]=0,v0=51;break}}else v0=51;while(!1);return(v0|0)==51&&s&&(v0=53),(v0|0)==53&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,f0(s0),f0(w0),y=Z,A0|0}}while(!1);return(v0|0)==26&&(t=b()|0),f0(s0),f0(w0),r0(t|0),0}function Bm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;Z=y,y=y+352|0,V=Z+208|0,c=Z+40|0,h=Z+36|0,w0=Z+24|0,s0=Z+12|0,_=Z+8|0,K=Z+48|0,t0=Z+4|0,F=Z,M=Z+337|0,O=Z+336|0,g1(w0,s,V,c,h),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),B=f,f=0;e:do if(B&1)v0=26;else{k=s0+8|0,U=s0+1|0,t=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=t,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,B=s0+4|0,I=e[c>>2]|0,C=e[h>>2]|0,s=e[r>>2]|0;i:for(;;){if(s){if(c=e[s+12>>2]|0,(c|0)==(e[s+16>>2]|0)){if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,g=f,f=0,g&1){v0=25;break}}else c=e[c>>2]|0;(c|0)==-1?(e[r>>2]=0,s=0,p=1):p=0}else s=0,p=1;c=e[n>>2]|0;do if(c){if(h=e[c+12>>2]|0,(h|0)==(e[c+16>>2]|0)){if(f=0,h=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,g=f,f=0,g&1){v0=25;break i}}else h=e[h>>2]|0;if((h|0)!=-1){if(p)break;break i}else{e[n>>2]=0,v0=17;break}}else v0=17;while(!1);if((v0|0)==17)if(v0=0,p){c=0;break}else c=0;if(h=d[s0>>0]|0,h=h&1?e[B>>2]|0:(h&255)>>>1,(e[_>>2]|0)==(t+h|0)){if(f=0,m0(8,s0|0,h<<1|0,0),g=f,f=0,g&1){v0=25;break}if(d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),g=f,f=0,g&1){v0=25;break}t=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=t+h}if(p=s+12|0,h=e[p>>2]|0,g=s+16|0,(h|0)==(e[g>>2]|0)){if(f=0,h=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=25;break}}else h=e[h>>2]|0;if(p1(h,M,O,t,_,I,C,w0,K,t0,F,V)|0)break;if(c=e[p>>2]|0,(c|0)==(e[g>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=25;break}else continue;else{e[p>>2]=c+4;continue}}if((v0|0)==25){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+Z0(2,t|0,e[_>>2]|0,o|0),A0=f,f=0,A0&1)v0=26;else{if(H[l>>3]=a,Oi(w0,K,e[t0>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(c){if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){v0=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;v0=53;break}else{e[n>>2]=0,v0=51;break}}else v0=51;while(!1);return(v0|0)==51&&s&&(v0=53),(v0|0)==53&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,f0(s0),f0(w0),y=Z,A0|0}}while(!1);return(v0|0)==26&&(t=b()|0),f0(s0),f0(w0),r0(t|0),0}function Vm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;Z=y,y=y+352|0,V=Z+208|0,c=Z+40|0,h=Z+36|0,w0=Z+24|0,s0=Z+12|0,_=Z+8|0,K=Z+48|0,t0=Z+4|0,F=Z,M=Z+337|0,O=Z+336|0,g1(w0,s,V,c,h),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),B=f,f=0;e:do if(B&1)v0=26;else{k=s0+8|0,U=s0+1|0,t=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=t,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,B=s0+4|0,I=e[c>>2]|0,C=e[h>>2]|0,s=e[r>>2]|0;i:for(;;){if(s){if(c=e[s+12>>2]|0,(c|0)==(e[s+16>>2]|0)){if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,g=f,f=0,g&1){v0=25;break}}else c=e[c>>2]|0;(c|0)==-1?(e[r>>2]=0,s=0,p=1):p=0}else s=0,p=1;c=e[n>>2]|0;do if(c){if(h=e[c+12>>2]|0,(h|0)==(e[c+16>>2]|0)){if(f=0,h=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,g=f,f=0,g&1){v0=25;break i}}else h=e[h>>2]|0;if((h|0)!=-1){if(p)break;break i}else{e[n>>2]=0,v0=17;break}}else v0=17;while(!1);if((v0|0)==17)if(v0=0,p){c=0;break}else c=0;if(h=d[s0>>0]|0,h=h&1?e[B>>2]|0:(h&255)>>>1,(e[_>>2]|0)==(t+h|0)){if(f=0,m0(8,s0|0,h<<1|0,0),g=f,f=0,g&1){v0=25;break}if(d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),g=f,f=0,g&1){v0=25;break}t=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=t+h}if(p=s+12|0,h=e[p>>2]|0,g=s+16|0,(h|0)==(e[g>>2]|0)){if(f=0,h=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=25;break}}else h=e[h>>2]|0;if(p1(h,M,O,t,_,I,C,w0,K,t0,F,V)|0)break;if(c=e[p>>2]|0,(c|0)==(e[g>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=25;break}else continue;else{e[p>>2]=c+4;continue}}if((v0|0)==25){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+Z0(3,t|0,e[_>>2]|0,o|0),A0=f,f=0,A0&1)v0=26;else{if(H[l>>3]=a,Oi(w0,K,e[t0>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(c){if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){v0=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;v0=53;break}else{e[n>>2]=0,v0=51;break}}else v0=51;while(!1);return(v0|0)==51&&s&&(v0=53),(v0|0)==53&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,f0(s0),f0(w0),y=Z,A0|0}}while(!1);return(v0|0)==26&&(t=b()|0),f0(s0),f0(w0),r0(t|0),0}function qi(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;return l=y,y=y+16|0,a=l,e[a>>2]=o,o=nt(n)|0,n=Fr(t,r,s,a)|0,o|0&&(f=0,u0(75,o|0)|0,a=f,f=0,a&1)&&(a=b(0)|0,Ie(a)),y=l,n|0}function qm(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(o=y,y=y+16|0,l=o,e[l>>2]=s,s=nt(r)|0,f=0,r=L0(37,t|0,n|0,l|0)|0,t=f,f=0,t&1)r=b()|0,s|0&&(f=0,u0(75,s|0)|0,l=f,f=0,l&1)&&(l=b(0)|0,Ie(l)),r0(r|0);else return s|0&&(f=0,u0(75,s|0)|0,l=f,f=0,l&1)&&(l=b(0)|0,Ie(l)),y=o,r|0;return 0}function zt(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0;C=y,y=y+16|0,g=C,a=e[t>>2]|0;e:do if(!a)a=0;else{if(I=r,h=s-I>>2,p=o+12|0,c=e[p>>2]|0,h=(c|0)>(h|0)?c-h|0:0,c=n,I=c-I|0,o=I>>2,(I|0)>0&&(Qe[e[(e[a>>2]|0)+48>>2]&63](a,r,o)|0)!=(o|0)){e[t>>2]=0,a=0;break}do if((h|0)>0)if(c1(g,h,l),f=0,o=L0(e[(e[a>>2]|0)+48>>2]|0,a|0,(d[g>>0]&1?e[g+8>>2]|0:g+4|0)|0,h|0)|0,I=f,f=0,I&1&&(I=b()|0,ye(g),r0(I|0)),(o|0)==(h|0)){ye(g);break}else{e[t>>2]=0,ye(g),a=0;break e}while(!1);if(I=s-c|0,s=I>>2,(I|0)>0&&(Qe[e[(e[a>>2]|0)+48>>2]&63](a,n,s)|0)!=(s|0)){e[t>>2]=0,a=0;break}e[p>>2]=0}while(!1);return y=C,a|0}function at(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;l=e[t>>2]|0;do if(l){if((e[l+12>>2]|0)==(e[l+16>>2]|0))if((Se[e[(e[l>>2]|0)+36>>2]&127](l)|0)==-1){e[t>>2]=0,l=0;break}else{l=e[t>>2]|0;break}}else l=0;while(!1);a=(l|0)==0,l=e[r>>2]|0;do if(l){if((e[l+12>>2]|0)==(e[l+16>>2]|0)&&(Se[e[(e[l>>2]|0)+36>>2]&127](l)|0)==-1){e[r>>2]=0,U=11;break}a?U=13:U=12}else U=11;while(!1);(U|0)==11&&(a?U=12:(l=0,U=13));e:do if((U|0)==12)e[n>>2]=e[n>>2]|6,l=0;else if((U|0)==13){if(a=e[t>>2]|0,c=e[a+12>>2]|0,(c|0)==(e[a+16>>2]|0)?a=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:a=N[c>>0]|0,c=a&255,c<<24>>24>-1&&(k=s+8|0,(E[(e[k>>2]|0)+(a<<24>>24<<1)>>1]&2048)!=0)){for(p=(Qe[e[(e[s>>2]|0)+36>>2]&63](s,c,0)|0)<<24>>24,a=e[t>>2]|0,c=a+12|0,h=e[c>>2]|0,(h|0)==(e[a+16>>2]|0)?(Se[e[(e[a>>2]|0)+40>>2]&127](a)|0,C=o,g=l,o=l,l=p):(e[c>>2]=h+1,C=o,g=l,o=l,l=p);;){l=l+-48|0,I=C+-1|0,a=e[t>>2]|0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0))if((Se[e[(e[a>>2]|0)+36>>2]&127](a)|0)==-1){e[t>>2]=0,a=0;break}else{a=e[t>>2]|0;break}}else a=0;while(!1);if(h=(a|0)==0,o?(e[o+12>>2]|0)==(e[o+16>>2]|0)?(Se[e[(e[o>>2]|0)+36>>2]&127](o)|0)==-1?(e[r>>2]=0,c=0,o=0):(c=g,o=g):c=g:(c=g,o=0),a=e[t>>2]|0,!((C|0)>1&(h^(o|0)==0)))break;if(h=e[a+12>>2]|0,(h|0)==(e[a+16>>2]|0)?a=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:a=N[h>>0]|0,h=a&255,h<<24>>24<=-1||!(E[(e[k>>2]|0)+(a<<24>>24<<1)>>1]&2048))break e;if(l=((Qe[e[(e[s>>2]|0)+36>>2]&63](s,h,0)|0)<<24>>24)+(l*10|0)|0,a=e[t>>2]|0,h=a+12|0,p=e[h>>2]|0,(p|0)==(e[a+16>>2]|0)){Se[e[(e[a>>2]|0)+40>>2]&127](a)|0,C=I,g=c;continue}else{e[h>>2]=p+1,C=I,g=c;continue}}do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0))if((Se[e[(e[a>>2]|0)+36>>2]&127](a)|0)==-1){e[t>>2]=0,a=0;break}else{a=e[t>>2]|0;break}}else a=0;while(!1);a=(a|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)&&(Se[e[(e[c>>2]|0)+36>>2]&127](c)|0)==-1){e[r>>2]=0,U=50;break}if(a)break e}else U=50;while(!1);if((U|0)==50&&!a)break;e[n>>2]=e[n>>2]|2;break}e[n>>2]=e[n>>2]|4,l=0}while(!1);return l|0}function ft(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;l=e[t>>2]|0;do if(l)if(a=e[l+12>>2]|0,(a|0)==(e[l+16>>2]|0)?l=Se[e[(e[l>>2]|0)+36>>2]&127](l)|0:l=e[a>>2]|0,(l|0)==-1){e[t>>2]=0,c=1;break}else{c=(e[t>>2]|0)==0;break}else c=1;while(!1);a=e[r>>2]|0;do if(a)if(l=e[a+12>>2]|0,(l|0)==(e[a+16>>2]|0)?l=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:l=e[l>>2]|0,(l|0)!=-1)if(c){k=17;break}else{k=16;break}else{e[r>>2]=0,k=14;break}else k=14;while(!1);(k|0)==14&&(c?k=16:(a=0,k=17));e:do if((k|0)==16)e[n>>2]=e[n>>2]|6,l=0;else if((k|0)==17){if(l=e[t>>2]|0,c=e[l+12>>2]|0,(c|0)==(e[l+16>>2]|0)?l=Se[e[(e[l>>2]|0)+36>>2]&127](l)|0:l=e[c>>2]|0,!(Qe[e[(e[s>>2]|0)+12>>2]&63](s,2048,l)|0)){e[n>>2]=e[n>>2]|4,l=0;break}for(l=(Qe[e[(e[s>>2]|0)+52>>2]&63](s,l,0)|0)<<24>>24,c=e[t>>2]|0,h=c+12|0,p=e[h>>2]|0,(p|0)==(e[c+16>>2]|0)?(Se[e[(e[c>>2]|0)+40>>2]&127](c)|0,C=o,g=a,h=a):(e[h>>2]=p+4,C=o,g=a,h=a);;){l=l+-48|0,I=C+-1|0,a=e[t>>2]|0;do if(a)if(c=e[a+12>>2]|0,(c|0)==(e[a+16>>2]|0)?a=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:a=e[c>>2]|0,(a|0)==-1){e[t>>2]=0,p=1;break}else{p=(e[t>>2]|0)==0;break}else p=1;while(!1);do if(h)if(a=e[h+12>>2]|0,(a|0)==(e[h+16>>2]|0)?a=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:a=e[a>>2]|0,(a|0)==-1){e[r>>2]=0,h=0,o=0,a=1;break}else{h=g,o=g,a=(g|0)==0;break}else h=g,o=0,a=1;while(!1);if(c=e[t>>2]|0,!((C|0)>1&(p^a)))break;if(a=e[c+12>>2]|0,(a|0)==(e[c+16>>2]|0)?a=Se[e[(e[c>>2]|0)+36>>2]&127](c)|0:a=e[a>>2]|0,!(Qe[e[(e[s>>2]|0)+12>>2]&63](s,2048,a)|0))break e;if(l=((Qe[e[(e[s>>2]|0)+52>>2]&63](s,a,0)|0)<<24>>24)+(l*10|0)|0,a=e[t>>2]|0,c=a+12|0,p=e[c>>2]|0,(p|0)==(e[a+16>>2]|0)){Se[e[(e[a>>2]|0)+40>>2]&127](a)|0,C=I,g=h,h=o;continue}else{e[c>>2]=p+4,C=I,g=h,h=o;continue}}do if(c)if(a=e[c+12>>2]|0,(a|0)==(e[c+16>>2]|0)?a=Se[e[(e[c>>2]|0)+36>>2]&127](c)|0:a=e[a>>2]|0,(a|0)==-1){e[t>>2]=0,c=1;break}else{c=(e[t>>2]|0)==0;break}else c=1;while(!1);do if(h)if(a=e[h+12>>2]|0,(a|0)==(e[h+16>>2]|0)?a=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:a=e[a>>2]|0,(a|0)!=-1){if(c)break e;break}else{e[r>>2]=0,k=60;break}else k=60;while(!1);if((k|0)==60&&!c)break;e[n>>2]=e[n>>2]|2}while(!1);return l|0}function bm(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0;l=t+4|0,s=(e[l>>2]|0)!=189,c=e[t>>2]|0,a=c,o=(e[n>>2]|0)-a|0,o=o>>>0<2147483647?o<<1:-1,a=(e[r>>2]|0)-a|0,c=bt(s?c:0,o)|0,c||xr();do if(s)e[t>>2]=c,h=c;else if(s=e[t>>2]|0,e[t>>2]=c,s)if(f=0,n0(e[l>>2]|0,s|0),c=f,f=0,c&1)c=b(0)|0,Ie(c);else{h=e[t>>2]|0;break}else h=c;while(!1);e[l>>2]=201,e[r>>2]=h+a,e[n>>2]=(e[t>>2]|0)+o}function Gm(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0;l=t+4|0,s=(e[l>>2]|0)!=189,c=e[t>>2]|0,a=c,o=(e[n>>2]|0)-a|0,o=o>>>0<2147483647?o<<1:-1,a=(e[r>>2]|0)-a>>2,c=bt(s?c:0,o)|0,c||xr();do if(s)e[t>>2]=c,h=c;else if(s=e[t>>2]|0,e[t>>2]=c,s)if(f=0,n0(e[l>>2]|0,s|0),c=f,f=0,c&1)c=b(0)|0,Ie(c);else{h=e[t>>2]|0;break}else h=c;while(!1);e[l>>2]=201,e[r>>2]=h+(a<<2),e[n>>2]=(e[t>>2]|0)+(o>>>2<<2)}function Qm(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0;l=r,s=d[t>>0]|0,s&1?(s=e[t>>2]|0,o=(s&-2)+-1|0,h=e[t+4>>2]|0,s=s&255):(o=10,h=(s&255)>>>1),c=n-l|0;do if((n|0)!=(r|0)){if((o-h|0)>>>0>>0&&(f1(t,o,h+c-o|0,h,h,0,0),s=d[t>>0]|0),s&1?a=e[t+8>>2]|0:a=t+1|0,l=n+(h-l)|0,(r|0)!=(n|0))for(s=r,o=a+h|0;d[o>>0]=d[s>>0]|0,s=s+1|0,(s|0)!=(n|0);)o=o+1|0;if(d[a+l>>0]=0,s=h+c|0,d[t>>0]&1){e[t+4>>2]=s;break}else{d[t>>0]=s<<1;break}}while(!1);return t|0}function zm(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0;l=t+4|0,s=(e[l>>2]|0)!=189,c=e[t>>2]|0,a=c,o=(e[n>>2]|0)-a|0,o=o>>>0<2147483647?o<<1:-1,a=(e[r>>2]|0)-a>>2,c=bt(s?c:0,o)|0,c||xr();do if(s)e[t>>2]=c,h=c;else if(s=e[t>>2]|0,e[t>>2]=c,s)if(f=0,n0(e[l>>2]|0,s|0),c=f,f=0,c&1)c=b(0)|0,Ie(c);else{h=e[t>>2]|0;break}else h=c;while(!1);e[l>>2]=201,e[r>>2]=h+(a<<2),e[n>>2]=(e[t>>2]|0)+(o>>>2<<2)}function Hm(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0;l=r,s=d[t>>0]|0,s&1?(s=e[t>>2]|0,o=(s&-2)+-1|0,h=e[t+4>>2]|0,s=s&255):(o=1,h=(s&255)>>>1),c=n-l>>2;do if(c){if((o-h|0)>>>0>>0&&(V2(t,o,h+c-o|0,h,h,0,0),s=d[t>>0]|0),s&1?a=e[t+8>>2]|0:a=t+4|0,l=h+((n-l|0)>>>2)|0,(r|0)!=(n|0))for(s=r,o=a+(h<<2)|0;e[o>>2]=e[s>>2],s=s+4|0,(s|0)!=(n|0);)o=o+4|0;if(e[a+(l<<2)>>2]=0,s=h+c|0,d[t>>0]&1){e[t+4>>2]=s;break}else{d[t>>0]=s<<1;break}}while(!1);return t|0}function Ym(t,r){t=t|0,r=r|0;var n=0;e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,d[t+128>>0]=0;do if(r)if(f=0,h0(125,t|0,r|0),n=f,f=0,n&1)n=b()|0,A1(t),r0(n|0);else{J2(t,r);break}while(!1)}function jm(t,r){t=t|0,r=r|0,Si(t,r,Ai(43148)|0)}function Xm(t,r){t=t|0,r=r|0,Si(t,r,Ai(43188)|0)}function Km(t,r){t=t|0,r=r|0,Si(t,r,Ai(44220)|0)}function Wm(t,r){t=t|0,r=r|0,Si(t,r,Ai(44212)|0)}function Zm(t,r){t=t|0,r=r|0,Si(t,r,Ai(44280)|0)}function Jm(t,r){t=t|0,r=r|0,Si(t,r,Ai(44288)|0)}function $m(t,r){t=t|0,r=r|0,Si(t,r,Ai(44344)|0)}function e8(t,r){t=t|0,r=r|0,Si(t,r,Ai(44352)|0)}function i8(t,r){t=t|0,r=r|0,Si(t,r,Ai(44360)|0)}function t8(t,r){t=t|0,r=r|0,Si(t,r,Ai(44368)|0)}function r8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43260)|0)}function n8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43332)|0)}function s8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43392)|0)}function o8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43452)|0)}function l8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43764)|0)}function a8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43828)|0)}function f8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43892)|0)}function c8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43956)|0)}function h8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43992)|0)}function m8(t,r){t=t|0,r=r|0,Si(t,r,Ai(44028)|0)}function d8(t,r){t=t|0,r=r|0,Si(t,r,Ai(44064)|0)}function g8(t,r){t=t|0,r=r|0,Si(t,r,Ai(44100)|0)}function p8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43544)|0)}function A8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43636)|0)}function S8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43668)|0)}function v8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43700)|0)}function w8(t,r){t=t|0,r=r|0,Si(t,r,Ai(44140)|0)}function T8(t,r){t=t|0,r=r|0,Si(t,r,Ai(44180)|0)}function A1(t){t=t|0;var r=0,n=0,s=0;n=e[t>>2]|0;do if(n){if(s=t+4|0,r=e[s>>2]|0,(r|0)!=(n|0)){do r=r+-4|0;while((r|0)!=(n|0));e[s>>2]=r}if((t+16|0)==(n|0)){d[t+128>>0]=0;break}else{a0(n);break}}while(!1)}function C8(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0;if(a=t+4|0,n=e[a>>2]|0,s=e[t>>2]|0,o=n-s>>2,o>>>0>=r>>>0){if(o>>>0>r>>>0&&(l=s+(r<<2)|0,(n|0)!=(l|0))){do n=n+-4|0;while((n|0)!=(l|0));e[a>>2]=n}}else N8(t,r-o|0)}function x8(t,r){t=t|0,r=r|0;var n=0;return n=e[t+8>>2]|0,(e[t+12>>2]|0)-n>>2>>>0>r>>>0?n=(e[n+(r<<2)>>2]|0)!=0:n=0,n|0}function y8(t){t=t|0;var r=0,n=0;n=t+4|0,r=e[n>>2]|0,n=e[n+4>>2]|0,t=(e[t>>2]|0)+(n>>1)|0,n&1&&(r=e[(e[t>>2]|0)+r>>2]|0),Ce[r&255](t)}function I8(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0;e[n>>2]=t,e[l>>2]=s,c&2?(o-s|0)<3?t=1:(e[l>>2]=s+1,d[s>>0]=-17,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=-69,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=-65,h=4):h=4;e:do if((h|0)==4)if(p=r,t=e[n>>2]|0,t>>>0>>0)for(;;){if(c=E[t>>1]|0,h=c&65535,h>>>0>a>>>0){t=2;break e}do if((c&65535)<128){if(t=e[l>>2]|0,(o-t|0)<1){t=1;break e}e[l>>2]=t+1,d[t>>0]=c}else{if((c&65535)<2048){if(t=e[l>>2]|0,(o-t|0)<2){t=1;break e}e[l>>2]=t+1,d[t>>0]=h>>>6|192,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=h&63|128;break}if((c&65535)<55296){if(t=e[l>>2]|0,(o-t|0)<3){t=1;break e}e[l>>2]=t+1,d[t>>0]=h>>>12|224,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=h>>>6&63|128,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=h&63|128;break}if((c&65535)>=56320){if((c&65535)<57344){t=2;break e}if(t=e[l>>2]|0,(o-t|0)<3){t=1;break e}e[l>>2]=t+1,d[t>>0]=h>>>12|224,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=h>>>6&63|128,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=h&63|128;break}if((p-t|0)<4){t=1;break e}if(t=t+2|0,c=q[t>>1]|0,(c&64512|0)!=56320){t=2;break e}if((o-(e[l>>2]|0)|0)<4){t=1;break e}if(s=h&960,((s<<10)+65536|h<<10&64512|c&1023)>>>0>a>>>0){t=2;break e}e[n>>2]=t,t=(s>>>6)+1|0,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=t>>>2|240,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=h>>>2&15|t<<4&48|128,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=h<<4&48|c>>>6&15|128,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=c&63|128}while(!1);if(t=(e[n>>2]|0)+2|0,e[n>>2]=t,t>>>0>=r>>>0){t=0;break}}else t=0;while(!1);return t|0}function D8(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0,C=0,I=0,k=0;e[n>>2]=t,e[l>>2]=s,c&4?(t=e[n>>2]|0,c=r,(c-t|0)>2&&(d[t>>0]|0)==-17&&(d[t+1>>0]|0)==-69&&(d[t+2>>0]|0)==-65?(e[n>>2]=t+3,h=e[l>>2]|0):h=s):(h=s,c=r),I=o,s=e[n>>2]|0,t=s>>>0>>0;e:do if(t&h>>>0>>0)for(;;){if(t=d[s>>0]|0,g=t&255,g>>>0>a>>>0){t=2;break e}do if(t<<24>>24>-1)E[h>>1]=t&255,e[n>>2]=s+1;else{if((t&255)<194){t=2;break e}if((t&255)<224){if((c-s|0)<2){t=1;break e}if(t=N[s+1>>0]|0,(t&192|0)!=128){t=2;break e}if(t=t&63|g<<6&1984,t>>>0>a>>>0){t=2;break e}E[h>>1]=t,e[n>>2]=s+2;break}if((t&255)<240){if((c-s|0)<3){t=1;break e}switch(p=d[s+1>>0]|0,t=d[s+2>>0]|0,g|0){case 224:{if((p&-32)<<24>>24!=-96){t=2;break e}break}case 237:{if((p&-32)<<24>>24!=-128){t=2;break e}break}default:if((p&-64)<<24>>24!=-128){t=2;break e}}if(t=t&255,(t&192|0)!=128){t=2;break e}if(t=(p&255)<<6&4032|g<<12|t&63,(t&65535)>>>0>a>>>0){t=2;break e}E[h>>1]=t,e[n>>2]=s+3;break}if((t&255)>=245){t=2;break e}if((c-s|0)<4){t=1;break e}switch(p=d[s+1>>0]|0,t=d[s+2>>0]|0,s=d[s+3>>0]|0,g|0){case 240:{if((p+112&255)>=48){t=2;break e}break}case 244:{if((p&-16)<<24>>24!=-128){t=2;break e}break}default:if((p&-64)<<24>>24!=-128){t=2;break e}}if(C=t&255,(C&192|0)!=128){t=2;break e}if(t=s&255,(t&192|0)!=128){t=2;break e}if((I-h|0)<4){t=1;break e}if(g=g&7,s=p&255,p=C<<6,t=t&63,(s<<12&258048|g<<18|p&4032|t)>>>0>a>>>0){t=2;break e}E[h>>1]=s<<2&60|C>>>4&3|((s>>>4&3|g<<2)<<6)+16320|55296,C=h+2|0,e[l>>2]=C,E[C>>1]=t|p&960|56320,e[n>>2]=(e[n>>2]|0)+4}while(!1);if(h=(e[l>>2]|0)+2|0,e[l>>2]=h,s=e[n>>2]|0,t=s>>>0>>0,!(t&h>>>0>>0)){k=39;break}}else k=39;while(!1);return(k|0)==39&&(t=t&1),t|0}function E8(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;C=r,o&4|0&&(C-t|0)>2&&(d[t>>0]|0)==-17&&(d[t+1>>0]|0)==-69?o=(d[t+2>>0]|0)==-65?t+3|0:t:o=t;e:do if((n|0)!=0&o>>>0>>0){g=o,l=0;i:for(;;){if(o=d[g>>0]|0,p=o&255,p>>>0>s>>>0){o=g,l=42;break e}do if(o<<24>>24>-1)o=g+1|0;else{if((o&255)<194){o=g,l=42;break e}if((o&255)<224){if((C-g|0)<2){o=g,l=42;break e}if(o=N[g+1>>0]|0,(o&192|0)!=128){o=g,l=42;break e}if((o&63|p<<6&1984)>>>0>s>>>0){o=g,l=42;break e}o=g+2|0;break}if((o&255)<240){if(o=g,(C-o|0)<3){o=g,l=42;break e}switch(c=d[g+1>>0]|0,a=d[g+2>>0]|0,p|0){case 224:{if((c&-32)<<24>>24!=-96){l=20;break i}break}case 237:{if((c&-32)<<24>>24!=-128){l=22;break i}break}default:if((c&-64)<<24>>24!=-128){l=24;break i}}if(o=a&255,(o&192|0)!=128){o=g,l=42;break e}if(((c&255)<<6&4032|p<<12&61440|o&63)>>>0>s>>>0){o=g,l=42;break e}o=g+3|0;break}if((o&255)>=245){o=g,l=42;break e}if(o=g,(n-l|0)>>>0<2|(C-o|0)<4){o=g,l=42;break e}switch(h=d[g+1>>0]|0,a=d[g+2>>0]|0,c=d[g+3>>0]|0,p|0){case 240:{if((h+112&255)>=48){l=32;break i}break}case 244:{if((h&-16)<<24>>24!=-128){l=34;break i}break}default:if((h&-64)<<24>>24!=-128){l=36;break i}}if(a=a&255,(a&192|0)!=128){o=g,l=42;break e}if(o=c&255,(o&192|0)!=128){o=g,l=42;break e}if(((h&255)<<12&258048|p<<18&1835008|a<<6&4032|o&63)>>>0>s>>>0){o=g,l=42;break e}o=g+4|0,l=l+1|0}while(!1);if(l=l+1|0,l>>>0>>0&o>>>0>>0)g=o;else{l=42;break e}}if((l|0)==20){o=o-t|0;break}else if((l|0)==22){o=o-t|0;break}else if((l|0)==24){o=o-t|0;break}else if((l|0)==32){o=o-t|0;break}else if((l|0)==34){o=o-t|0;break}else if((l|0)==36){o=o-t|0;break}}else l=42;while(!1);return(l|0)==42&&(o=o-t|0),o|0}function k8(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0;e[n>>2]=t,e[l>>2]=s,p=o,c&2?(p-s|0)<3?t=1:(e[l>>2]=s+1,d[s>>0]=-17,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=-69,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=-65,h=4):h=4;e:do if((h|0)==4)if(t=e[n>>2]|0,t>>>0>>0)for(;;){if(c=e[t>>2]|0,c>>>0>a>>>0|(c&-2048|0)==55296){t=2;break e}do if(c>>>0>=128){if(c>>>0<2048){if(t=e[l>>2]|0,(p-t|0)<2){t=1;break e}e[l>>2]=t+1,d[t>>0]=c>>>6|192,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=c&63|128;break}if(t=e[l>>2]|0,o=p-t|0,c>>>0<65536){if((o|0)<3){t=1;break e}e[l>>2]=t+1,d[t>>0]=c>>>12|224,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=c>>>6&63|128,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=c&63|128;break}else{if((o|0)<4){t=1;break e}e[l>>2]=t+1,d[t>>0]=c>>>18|240,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=c>>>12&63|128,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=c>>>6&63|128,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=c&63|128;break}}else{if(t=e[l>>2]|0,(p-t|0)<1){t=1;break e}e[l>>2]=t+1,d[t>>0]=c}while(!1);if(t=(e[n>>2]|0)+4|0,e[n>>2]=t,t>>>0>=r>>>0){t=0;break}}else t=0;while(!1);return t|0}function F8(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0,C=0,I=0,k=0;e[n>>2]=t,e[l>>2]=s,c&4?(t=e[n>>2]|0,c=r,(c-t|0)>2&&(d[t>>0]|0)==-17&&(d[t+1>>0]|0)==-69&&(d[t+2>>0]|0)==-65&&(e[n>>2]=t+3,s=e[l>>2]|0),I=c):I=r,c=e[n>>2]|0,t=c>>>0>>0;e:do if(t&s>>>0>>0)for(;;){t=d[c>>0]|0,C=t&255;do if(t<<24>>24>-1){if(C>>>0>a>>>0){t=2;break e}e[s>>2]=C,e[n>>2]=c+1}else{if((t&255)<194){t=2;break e}if((t&255)<224){if((I-c|0)<2){t=1;break e}if(t=N[c+1>>0]|0,(t&192|0)!=128){t=2;break e}if(t=t&63|C<<6&1984,t>>>0>a>>>0){t=2;break e}e[s>>2]=t,e[n>>2]=c+2;break}if((t&255)<240){if((I-c|0)<3){t=1;break e}switch(h=d[c+1>>0]|0,t=d[c+2>>0]|0,C|0){case 224:{if((h&-32)<<24>>24!=-96){t=2;break e}break}case 237:{if((h&-32)<<24>>24!=-128){t=2;break e}break}default:if((h&-64)<<24>>24!=-128){t=2;break e}}if(t=t&255,(t&192|0)!=128){t=2;break e}if(t=(h&255)<<6&4032|C<<12&61440|t&63,t>>>0>a>>>0){t=2;break e}e[s>>2]=t,e[n>>2]=c+3;break}if((t&255)>=245){t=2;break e}if((I-c|0)<4){t=1;break e}switch(g=d[c+1>>0]|0,t=d[c+2>>0]|0,h=d[c+3>>0]|0,C|0){case 240:{if((g+112&255)>=48){t=2;break e}break}case 244:{if((g&-16)<<24>>24!=-128){t=2;break e}break}default:if((g&-64)<<24>>24!=-128){t=2;break e}}if(p=t&255,(p&192|0)!=128){t=2;break e}if(t=h&255,(t&192|0)!=128){t=2;break e}if(t=(g&255)<<12&258048|C<<18&1835008|p<<6&4032|t&63,t>>>0>a>>>0){t=2;break e}e[s>>2]=t,e[n>>2]=c+4}while(!1);if(s=(e[l>>2]|0)+4|0,e[l>>2]=s,c=e[n>>2]|0,t=c>>>0>>0,!(t&s>>>0>>0)){k=38;break}}else k=38;while(!1);return(k|0)==38&&(t=t&1),t|0}function M8(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;C=r,o&4|0&&(C-t|0)>2&&(d[t>>0]|0)==-17&&(d[t+1>>0]|0)==-69?o=(d[t+2>>0]|0)==-65?t+3|0:t:o=t;e:do if((n|0)!=0&o>>>0>>0){p=o,g=0;i:for(;;){o=d[p>>0]|0,h=o&255;do if(o<<24>>24>-1){if(h>>>0>s>>>0){o=p,l=42;break e}o=p+1|0}else{if((o&255)<194){o=p,l=42;break e}if((o&255)<224){if((C-p|0)<2){o=p,l=42;break e}if(o=N[p+1>>0]|0,(o&192|0)!=128){o=p,l=42;break e}if((o&63|h<<6&1984)>>>0>s>>>0){o=p,l=42;break e}o=p+2|0;break}if((o&255)<240){if(o=p,(C-o|0)<3){o=p,l=42;break e}switch(a=d[p+1>>0]|0,l=d[p+2>>0]|0,h|0){case 224:{if((a&-32)<<24>>24!=-96){l=20;break i}break}case 237:{if((a&-32)<<24>>24!=-128){l=22;break i}break}default:if((a&-64)<<24>>24!=-128){l=24;break i}}if(o=l&255,(o&192|0)!=128){o=p,l=42;break e}if(((a&255)<<6&4032|h<<12&61440|o&63)>>>0>s>>>0){o=p,l=42;break e}o=p+3|0;break}if((o&255)>=245){o=p,l=42;break e}if(o=p,(C-o|0)<4){o=p,l=42;break e}switch(c=d[p+1>>0]|0,l=d[p+2>>0]|0,a=d[p+3>>0]|0,h|0){case 240:{if((c+112&255)>=48){l=32;break i}break}case 244:{if((c&-16)<<24>>24!=-128){l=34;break i}break}default:if((c&-64)<<24>>24!=-128){l=36;break i}}if(l=l&255,(l&192|0)!=128){o=p,l=42;break e}if(o=a&255,(o&192|0)!=128){o=p,l=42;break e}if(((c&255)<<12&258048|h<<18&1835008|l<<6&4032|o&63)>>>0>s>>>0){o=p,l=42;break e}o=p+4|0}while(!1);if(g=g+1|0,g>>>0>>0&o>>>0>>0)p=o;else{l=42;break e}}if((l|0)==20){o=o-t|0;break}else if((l|0)==22){o=o-t|0;break}else if((l|0)==24){o=o-t|0;break}else if((l|0)==32){o=o-t|0;break}else if((l|0)==34){o=o-t|0;break}else if((l|0)==36){o=o-t|0;break}}else l=42;while(!1);return(l|0)==42&&(o=o-t|0),o|0}function _8(t){t=t|0,f0(45196),f0(45184),f0(45172),f0(45160),f0(45148),f0(45136),f0(45124),f0(45112),f0(45100),f0(45088),f0(45076),f0(45064),f0(45052),f0(45040)}function R8(t){t=t|0,ye(45368),ye(45356),ye(45344),ye(45332),ye(45320),ye(45308),ye(45296),ye(45284),ye(45272),ye(45260),ye(45248),ye(45236),ye(45224),ye(45212)}function P8(t){t=t|0,f0(46e3),f0(45988),f0(45976),f0(45964),f0(45952),f0(45940),f0(45928),f0(45916),f0(45904),f0(45892),f0(45880),f0(45868),f0(45856),f0(45844),f0(45832),f0(45820),f0(45808),f0(45796),f0(45784),f0(45772),f0(45760),f0(45748),f0(45736),f0(45724)}function L8(t){t=t|0,ye(46292),ye(46280),ye(46268),ye(46256),ye(46244),ye(46232),ye(46220),ye(46208),ye(46196),ye(46184),ye(46172),ye(46160),ye(46148),ye(46136),ye(46124),ye(46112),ye(46100),ye(46088),ye(46076),ye(46064),ye(46052),ye(46040),ye(46028),ye(46016)}function U8(t){t=t|0,f0(47104),f0(47092),f0(47080),f0(47068),f0(47056),f0(47044),f0(47032),f0(47020),f0(47008),f0(46996),f0(46984),f0(46972),f0(46960),f0(46948),f0(46936),f0(46924),f0(46912),f0(46900),f0(46888),f0(46876),f0(46864),f0(46852),f0(46840),f0(46828)}function O8(t){t=t|0,ye(47396),ye(47384),ye(47372),ye(47360),ye(47348),ye(47336),ye(47324),ye(47312),ye(47300),ye(47288),ye(47276),ye(47264),ye(47252),ye(47240),ye(47228),ye(47216),ye(47204),ye(47192),ye(47180),ye(47168),ye(47156),ye(47144),ye(47132),ye(47120)}function N8(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;h=y,y=y+32|0,c=h,l=e[t+8>>2]|0,n=e[t+4>>2]|0,l-n>>2>>>0>>0?(s=e[t>>2]|0,a=n-s>>2,o=a+r|0,o>>>0>1073741823&&ct(t),n=l-s|0,n>>2>>>0<536870911?(n=n>>1,n=n>>>0>>0?o:n):n=1073741823,B8(c,n,a,t+16|0),a=c+8|0,l=e[a>>2]|0,je(l|0,0,r<<2|0)|0,e[a>>2]=l+(r<<2),V8(t,c),q8(c)):J2(t,r),y=h}function J2(t,r){t=t|0,r=r|0;var n=0;n=t+4|0,t=r,r=e[n>>2]|0;do e[r>>2]=0,r=(e[n>>2]|0)+4|0,e[n>>2]=r,t=t+-1|0;while(t|0)}function B8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;e[t+12>>2]=0,e[t+16>>2]=s;do if(r)if(o=s+112|0,r>>>0<29&(d[o>>0]|0)==0){d[o>>0]=1;break}else{s=G0(r<<2)|0;break}else s=0;while(!1);e[t>>2]=s,n=s+(n<<2)|0,e[t+8>>2]=n,e[t+4>>2]=n,e[t+12>>2]=s+(r<<2)}function V8(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0;s=e[t>>2]|0,l=t+4|0,n=r+4|0,o=(e[l>>2]|0)-s|0,a=(e[n>>2]|0)+(0-(o>>2)<<2)|0,e[n>>2]=a,ii(a|0,s|0,o|0)|0,o=e[t>>2]|0,e[t>>2]=e[n>>2],e[n>>2]=o,o=r+8|0,s=e[l>>2]|0,e[l>>2]=e[o>>2],e[o>>2]=s,o=t+8|0,t=r+12|0,s=e[o>>2]|0,e[o>>2]=e[t>>2],e[t>>2]=s,e[r>>2]=e[n>>2]}function q8(t){t=t|0;var r=0,n=0,s=0;if(n=e[t+4>>2]|0,s=t+8|0,r=e[s>>2]|0,(r|0)!=(n|0)){do r=r+-4|0;while((r|0)!=(n|0));e[s>>2]=r}n=e[t>>2]|0;do if(n)if(r=e[t+16>>2]|0,(r|0)==(n|0)){d[r+112>>0]=0;break}else{a0(n);break}while(!1)}function G8(t,r){t=t|0,r=r|0;var n=0;r>>>0>1073741823&&ct(t),n=t+128|0,r>>>0<29&(d[n>>0]|0)==0?(d[n>>0]=1,n=t+16|0):n=G0(r<<2)|0,e[t+4>>2]=n,e[t>>2]=n,e[t+8>>2]=n+(r<<2)}function Q8(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;c=y,y=y+16|0,a=c;do if((t|0)!=(r|0)){if(o=di()|0,l=e[o>>2]|0,e[o>>2]=0,s=+D1(t,a,Ii()|0),t=e[o>>2]|0,t||(e[o>>2]=l),(e[a>>2]|0)!=(r|0)){e[n>>2]=4,s=0;break}(t|0)==34&&(e[n>>2]=4)}else e[n>>2]=4,s=0;while(!1);return y=c,+s}function z8(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;c=y,y=y+16|0,a=c;do if((t|0)!=(r|0)){if(o=di()|0,l=e[o>>2]|0,e[o>>2]=0,s=+D1(t,a,Ii()|0),t=e[o>>2]|0,t||(e[o>>2]=l),(e[a>>2]|0)!=(r|0)){e[n>>2]=4,s=0;break}(t|0)==34&&(e[n>>2]=4)}else e[n>>2]=4,s=0;while(!1);return y=c,+s}function H8(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;c=y,y=y+16|0,a=c;do if((t|0)==(r|0))e[n>>2]=4,s=0;else{if(o=di()|0,l=e[o>>2]|0,e[o>>2]=0,s=+D1(t,a,Ii()|0),t=e[o>>2]|0,t||(e[o>>2]=l),(e[a>>2]|0)!=(r|0)){e[n>>2]=4,s=0;break}(t|0)==34&&(e[n>>2]=4)}while(!1);return y=c,+s}function Y8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0;c=y,y=y+16|0,a=c;do if((t|0)!=(r|0)){if((d[t>>0]|0)==45){e[n>>2]=4,s=0,t=0;break}if(o=di()|0,l=e[o>>2]|0,e[o>>2]=0,t=yr(t,a,s,Ii()|0)|0,s=e[o>>2]|0,s||(e[o>>2]=l),(e[a>>2]|0)!=(r|0)){e[n>>2]=4,s=0,t=0;break}(s|0)==34?(e[n>>2]=4,s=-1,t=-1):s=I0}else e[n>>2]=4,s=0,t=0;while(!1);return I0=s,y=c,t|0}function j8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;h=y,y=y+16|0,c=h;do if((t|0)!=(r|0)){if((d[t>>0]|0)==45){e[n>>2]=4,t=0;break}if(l=di()|0,a=e[l>>2]|0,e[l>>2]=0,t=yr(t,c,s,Ii()|0)|0,s=I0,o=e[l>>2]|0,o||(e[l>>2]=a),(e[c>>2]|0)!=(r|0)){e[n>>2]=4,t=0;break}if(s>>>0>0|(s|0)==0&t>>>0>4294967295|(o|0)==34){e[n>>2]=4,t=-1;break}else break}else e[n>>2]=4,t=0;while(!1);return y=h,t|0}function X8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;h=y,y=y+16|0,c=h;do if((t|0)!=(r|0)){if((d[t>>0]|0)==45){e[n>>2]=4,t=0;break}if(l=di()|0,a=e[l>>2]|0,e[l>>2]=0,t=yr(t,c,s,Ii()|0)|0,s=I0,o=e[l>>2]|0,o||(e[l>>2]=a),(e[c>>2]|0)!=(r|0)){e[n>>2]=4,t=0;break}if(s>>>0>0|(s|0)==0&t>>>0>4294967295|(o|0)==34){e[n>>2]=4,t=-1;break}else break}else e[n>>2]=4,t=0;while(!1);return y=h,t|0}function K8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;h=y,y=y+16|0,c=h;do if((t|0)!=(r|0)){if((d[t>>0]|0)==45){e[n>>2]=4,t=0;break}if(l=di()|0,a=e[l>>2]|0,e[l>>2]=0,t=yr(t,c,s,Ii()|0)|0,s=I0,o=e[l>>2]|0,o||(e[l>>2]=a),(e[c>>2]|0)!=(r|0)){e[n>>2]=4,t=0;break}if(s>>>0>0|(s|0)==0&t>>>0>65535|(o|0)==34){e[n>>2]=4,t=-1;break}else{t=t&65535;break}}else e[n>>2]=4,t=0;while(!1);return y=h,t|0}function W8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;h=y,y=y+16|0,c=h;do if((t|0)!=(r|0)){if(l=di()|0,a=e[l>>2]|0,e[l>>2]=0,t=dn(t,c,s,Ii()|0)|0,s=I0,o=e[l>>2]|0,o||(e[l>>2]=a),(e[c>>2]|0)!=(r|0)){e[n>>2]=4,s=0,t=0;break}if((o|0)==34)return e[n>>2]=4,c=(s|0)>0|(s|0)==0&t>>>0>0,I0=c?2147483647:-2147483648,y=h,(c?-1:0)|0}else e[n>>2]=4,s=0,t=0;while(!1);return I0=s,y=h,t|0}function Z8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;h=y,y=y+16|0,c=h;e:do if((t|0)==(r|0))e[n>>2]=4,t=0;else{if(l=di()|0,a=e[l>>2]|0,e[l>>2]=0,t=dn(t,c,s,Ii()|0)|0,s=I0,o=e[l>>2]|0,o||(e[l>>2]=a),(e[c>>2]|0)!=(r|0)){e[n>>2]=4,t=0;break}do if((o|0)==34){if(e[n>>2]=4,(s|0)>0|(s|0)==0&t>>>0>0){t=2147483647;break e}}else{if((s|0)<-1|(s|0)==-1&t>>>0<2147483648){e[n>>2]=4;break}if((s|0)>0|(s|0)==0&t>>>0>2147483647){e[n>>2]=4,t=2147483647;break e}else break e}while(!1);t=-2147483648}while(!1);return y=h,t|0}function J8(){}function Ji(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,s=r-s-(n>>>0>t>>>0|0)>>>0,I0=s,t-n>>>0|0|0}function je(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;if(s=t+n|0,(n|0)>=20){if(r=r&255,l=t&3,a=r|r<<8|r<<16|r<<24,o=s&-4,l)for(l=t+4-l|0;(t|0)<(l|0);)d[t>>0]=r,t=t+1|0;for(;(t|0)<(o|0);)e[t>>2]=a,t=t+4|0}for(;(t|0)<(s|0);)d[t>>0]=r,t=t+1|0;return t-n|0}function Li(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,n=t+n>>>0,I0=r+s+(n>>>0>>0|0)>>>0,n|0|0}function Dt(t,r,n){return t=t|0,r=r|0,n=n|0,(n|0)<32?(I0=r>>>n,t>>>n|(r&(1<>>n-32|0)}function ii(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if((n|0)>=4096)return qn(t|0,r|0,n|0)|0;if(s=t|0,(t&3)==(r&3)){for(;t&3;){if(!n)return s|0;d[t>>0]=d[r>>0]|0,t=t+1|0,r=r+1|0,n=n-1|0}for(;(n|0)>=4;)e[t>>2]=e[r>>2],t=t+4|0,r=r+4|0,n=n-4|0}for(;(n|0)>0;)d[t>>0]=d[r>>0]|0,t=t+1|0,r=r+1|0,n=n-1|0;return s|0}function pi(t,r,n){return t=t|0,r=r|0,n=n|0,(n|0)<32?(I0=r<>>32-n,t<0;)t=t-1|0,r=r-1|0,n=n-1|0,d[t>>0]=d[r>>0]|0;t=s}else ii(t,r,n)|0;return t|0}function lA(t,r,n){return t=t|0,r=r|0,n=n|0,(n|0)<32?(I0=r>>n,t>>>n|(r&(1<>n-32|0)}function $2(t){t=t|0;var r=0;return r=d[i0+(t&255)>>0]|0,(r|0)<8?r|0:(r=d[i0+(t>>8&255)>>0]|0,(r|0)<8?r+8|0:(r=d[i0+(t>>16&255)>>0]|0,(r|0)<8?r+16|0:(d[i0+(t>>>24)>>0]|0)+24|0))}function $8(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;return l=t&65535,o=r&65535,n=W(o,l)|0,s=t>>>16,t=(n>>>16)+(W(o,s)|0)|0,o=r>>>16,r=W(o,l)|0,I0=(t>>>16)+(W(o,s)|0)+(((t&65535)+r|0)>>>16)|0,t+r<<16|n&65535|0|0}function aA(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0;return p=r>>31|((r|0)<0?-1:0)<<1,h=((r|0)<0?-1:0)>>31|((r|0)<0?-1:0)<<1,l=s>>31|((s|0)<0?-1:0)<<1,o=((s|0)<0?-1:0)>>31|((s|0)<0?-1:0)<<1,c=Ji(p^t,h^r,p,h)|0,a=I0,t=l^p,r=o^h,Ji((Ar(c,a,Ji(l^n,o^s,l,o)|0,I0,0)|0)^t,I0^r,t,r)|0}function fA(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0;return o=y,y=y+16|0,c=o|0,a=r>>31|((r|0)<0?-1:0)<<1,l=((r|0)<0?-1:0)>>31|((r|0)<0?-1:0)<<1,p=s>>31|((s|0)<0?-1:0)<<1,h=((s|0)<0?-1:0)>>31|((s|0)<0?-1:0)<<1,t=Ji(a^t,l^r,a,l)|0,r=I0,Ar(t,r,Ji(p^n,h^s,p,h)|0,I0,c)|0,s=Ji(e[c>>2]^a,e[c+4>>2]^l,a,l)|0,n=I0,y=o,I0=n,s|0}function Ht(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;return o=t,l=n,n=$8(o,l)|0,t=I0,I0=(W(r,l)|0)+(W(s,o)|0)+t|t&0,n|0|0|0}function pr(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,Ar(t,r,n,s,0)|0}function S1(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;return l=y,y=y+16|0,o=l|0,Ar(t,r,n,s,o)|0,y=l,I0=e[o+4>>2]|0,e[o>>2]|0|0}function Ar(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(g=t,h=r,p=h,a=n,I=s,c=I,!p)return l=(o|0)!=0,c?l?(e[o>>2]=t|0,e[o+4>>2]=r&0,I=0,o=0,I0=I,o|0):(I=0,o=0,I0=I,o|0):(l&&(e[o>>2]=(g>>>0)%(a>>>0),e[o+4>>2]=0),I=0,o=(g>>>0)/(a>>>0)>>>0,I0=I,o|0);l=(c|0)==0;do if(a){if(!l){if(l=(X0(c|0)|0)-(X0(p|0)|0)|0,l>>>0<=31){C=l+1|0,c=31-l|0,r=l-31>>31,a=C,t=g>>>(C>>>0)&r|p<>>(C>>>0)&r,l=0,c=g<>2]=t|0,e[o+4>>2]=h|r&0,I=0,o=0,I0=I,o|0):(I=0,o=0,I0=I,o|0)}if(l=a-1|0,l&a){c=(X0(a|0)|0)+33-(X0(p|0)|0)|0,U=64-c|0,C=32-c|0,h=C>>31,k=c-32|0,r=k>>31,a=c,t=C-1>>31&p>>>(k>>>0)|(p<>>(c>>>0))&r,r=r&p>>>(c>>>0),l=g<>>(k>>>0))&h|g<>31;break}return o&&(e[o>>2]=l&g,e[o+4>>2]=0),(a|0)==1?(k=h|r&0,U=t|0|0,I0=k,U|0):(U=$2(a|0)|0,k=p>>>(U>>>0)|0,U=p<<32-U|g>>>(U>>>0)|0,I0=k,U|0)}else{if(l)return o&&(e[o>>2]=(p>>>0)%(a>>>0),e[o+4>>2]=0),k=0,U=(p>>>0)/(a>>>0)>>>0,I0=k,U|0;if(!g)return o&&(e[o>>2]=0,e[o+4>>2]=(p>>>0)%(c>>>0)),k=0,U=(p>>>0)/(c>>>0)>>>0,I0=k,U|0;if(l=c-1|0,!(l&c))return o&&(e[o>>2]=t|0,e[o+4>>2]=l&p|r&0),k=0,U=p>>>(($2(c|0)|0)>>>0),I0=k,U|0;if(l=(X0(c|0)|0)-(X0(p|0)|0)|0,l>>>0<=30){r=l+1|0,c=31-l|0,a=r,t=p<>>(r>>>0),r=p>>>(r>>>0),l=0,c=g<>2]=t|0,e[o+4>>2]=h|r&0,k=0,U=0,I0=k,U|0):(k=0,U=0,I0=k,U|0)}while(!1);if(!a)p=c,h=0,c=0;else{C=n|0|0,g=I|s&0,p=Li(C|0,g|0,-1,-1)|0,n=I0,h=c,c=0;do s=h,h=l>>>31|h<<1,l=c|l<<1,s=t<<1|s>>>31|0,I=t>>>31|r<<1|0,Ji(p,n,s,I)|0,U=I0,k=U>>31|((U|0)<0?-1:0)<<1,c=k&1,t=Ji(s,I,k&C,(((U|0)<0?-1:0)>>31|((U|0)<0?-1:0)<<1)&g)|0,r=I0,a=a-1|0;while(a|0);p=h,h=0}return a=0,o&&(e[o>>2]=t,e[o+4>>2]=r),k=(l|0)>>>31|(p|a)<<1|(a<<1|l>>>31)&0|h,U=(l<<1|0)&-2|c,I0=k,U|0}function ed(t,r,n,s,o,l,a,c){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,Up[t&15](r|0,n|0,s|0,o|0,l|0,a|0,c|0)|0}function id(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,_r[t&15](r|0,n|0,s|0,o|0,l|0)}function rd(t,r,n,s,o,l,a){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=+a,Op[t&3](r|0,n|0,s|0,o|0,l|0,+a)|0}function nd(t,r){t=t|0,r=r|0,Ce[t&255](r|0)}function sd(t,r,n){t=t|0,r=r|0,n=n|0,Ke[t&127](r|0,n|0)}function od(t,r,n,s,o,l,a){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,rr[t&63](r|0,n|0,s|0,o|0,l|0,a|0)|0}function ld(t,r){return t=t|0,r=r|0,Se[t&127](r|0)|0}function ad(t,r,n,s,o,l,a,c,h,p,g,C){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,C=C|0,Np[t&3](r|0,n|0,s|0,o|0,l|0,a|0,c|0,h|0,p|0,g|0,C|0)|0}function ud(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,Qe[t&63](r|0,n|0,s|0)|0}function cd(t,r,n,s,o,l,a,c,h,p,g,C,I,k,U,B){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,C=C|0,I=I|0,k=k|0,U=U|0,B=B|0,Bp[t&3](r|0,n|0,s|0,o|0,l|0,a|0,c|0,h|0,p|0,g|0,C|0,I|0,k|0,U|0,B|0)}function hd(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,Bt[t&15](r|0,n|0,s|0,o|0,l|0,a|0)}function md(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,Vp[t&7](r|0,n|0,s|0,o|0,l|0,a|0,c|0)}function dd(t,r,n,s,o,l,a,c,h,p,g){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,qp[t&7](r|0,n|0,s|0,o|0,l|0,a|0,c|0,h|0,p|0,g|0)}function gd(t,r,n){return t=t|0,r=r|0,n=n|0,Ni[t&63](r|0,n|0)|0}function pd(t,r,n,s,o,l){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,nr[t&31](r|0,n|0,s|0,o|0,l|0)|0}function Ad(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,+bp[t&3](r|0,n|0,s|0)}function Sd(t){return t=t|0,Gp[t&15]()|0}function vd(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,F1[t&31](r|0,n|0,s|0,o|0)|0}function wd(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,Rr[t&15](r|0,n|0,s|0)}function Td(t){t=t|0,On[t&7]()}function Cd(t,r,n,s,o,l,a,c,h){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,Ct[t&15](r|0,n|0,s|0,o|0,l|0,a|0,c|0,h|0)|0}function xd(t,r,n,s,o,l){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=+l,Qp[t&7](r|0,n|0,s|0,o|0,+l)|0}function yd(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,Pr[t&63](r|0,n|0,s|0,o|0)}function Et(t,r,n,s,o,l,a){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,Q0(0),0}function tr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,Q0(1)}function en(t,r,n,s,o,l){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=+l,Q0(2),0}function Xe(t){t=t|0,Q0(3)}function v1(t,r){t=t|0,r=r|0,Q0(4)}function Di(t,r,n,s,o,l){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,Q0(5),0}function Je(t){return t=t|0,Q0(6),0}function Id(t){return t=t|0,L1(t|0)|0}function Dd(t){return t=t|0,B1(t|0)|0}function Ed(t){return t=t|0,Yn(t|0)|0}function tn(t,r,n,s,o,l,a,c,h,p,g){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,Q0(7),0}function wi(t,r,n){return t=t|0,r=r|0,n=n|0,Q0(8),0}function rn(t,r,n,s,o,l,a,c,h,p,g,C,I,k,U){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,C=C|0,I=I|0,k=k|0,U=U|0,Q0(9)}function kt(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,Q0(10)}function Sr(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,Q0(11)}function vr(t,r,n,s,o,l,a,c,h,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,Q0(12)}function Ri(t,r){return t=t|0,r=r|0,Q0(13),0}function ut(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,Q0(14),0}function kd(t,r,n){return t=t|0,r=r|0,n=n|0,Q0(15),0}function Lt(){return Q0(16),0}function Yt(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,Q0(17),0}function Fd(t,r,n){t=t|0,r=r|0,n=n|0,Q0(18)}function Md(t,r,n){t=t|0,r=r|0,n=n|0,Be(t|0,r|0,n|0)}function nn(){Q0(19)}function _d(){Kn()}function Rd(){Wi()}function Pd(){O1()}function jt(t,r,n,s,o,l,a,c){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,Q0(20),0}function wr(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=+o,Q0(21),0}function Gi(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,Q0(22)}function Ld(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=y,y=y+32|0,c=p,hi(c,255,0),h=t+152|0,(e[c+4>>2]|0)==(e[h>>2]|0)&&(e[c+8>>2]|0)==(e[t+156>>2]|0)&&(e[c+12>>2]|0)==(e[t+160>>2]|0)){h=e[8900]|0,e[t+4580>>2]=h+(((e[8901]|0)-h|0)>>>1),y=p;return}for(n=t+4584|0,s=t+4588|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=512?l>>>0>512&&(a=r+512|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,512-l|0),r=e[n>>2]|0),c=t+4580|0,e[c>>2]=r+256,a=t+160|0,o=t+156|0,l=-256;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[h>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==256)break}y=p}function Ud(t){t=t|0;var r=0,n=0;e[t>>2]=35660,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Od(t){t=t|0;var r=0,n=0;if(e[t>>2]=35660,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function Nd(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(k=t+4|0,B=t+32|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(44,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(45,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(46,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(47,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0)}function Bd(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;a=y,y=y+32|0,h=a,hi(h,e[t+128>>2]|0,e[t+136>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[h+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[h+12>>2]|0,n=e[r+16>>2]|0,s=e[h+16>>2]|0,e[t+176>>2]=c|0?c:e[h+4>>2]|0,e[t+180>>2]=l,e[t+184>>2]=o,Hd(t),o=t+132|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+188+(l*12|0)>>2]=r,e[t+188+(l*12|0)+4>>2]=0,E[t+188+(l*12|0)+8>>1]=0,E[t+188+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,h=(n|0?n:s)&255,e[t+4568>>2]=c,e[t+4572>>2]=0,d[t+4576>>0]=h,d[t+4577>>0]=1,d[t+4578>>0]=0,e[t+4580>>2]=c,e[t+4584>>2]=1,d[t+4588>>0]=h,d[t+4589>>0]=1,d[t+4590>>0]=0,e[t+4592>>2]=0,y=a}function Vd(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4620>>0]=o&1,r=t+156|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),qd(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function qd(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;K=y,y=y+32|0,Z=K+12|0,X=K,c=t+172|0,M=(e[c>>2]|0)+4|0,(e[t+28>>2]|0)==1?h=e[t+20>>2]|0:h=1,r=W(h<<1,M)|0,e[Z>>2]=0,s0=Z+4|0,e[s0>>2]=0,e[Z+8>>2]=0;e:do if(r){if((r|0)<0&&(f=0,n0(178,Z|0),t0=f,f=0,t0&1)||(F=6),(F|0)==6&&(f=0,n=u0(67,r|0)|0,t0=f,f=0,!(t0&1))){for(e[s0>>2]=n,e[Z>>2]=n,e[Z+8>>2]=n+r;;)if(d[n>>0]=0,n=(e[s0>>2]|0)+1|0,e[s0>>2]=n,r=r+-1|0,!r)break e}n=b()|0,r=e[Z>>2]|0,r||r0(n|0),(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),a0(r),r0(n|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!h)F=19;else{if(h>>>0>1073741823&&(f=0,n0(178,X|0),_=f,f=0,_&1)||(F=17),(F|0)==17&&(s=h<<2,f=0,o=u0(67,s|0)|0,_=f,f=0,!(_&1))){e[X>>2]=o,F=o+(h<<2)|0,e[X+8>>2]=F,je(o|0,0,s|0)|0,e[t0>>2]=F,F=19;break}n=b()|0,r=e[X>>2]|0,s=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-s|0)>>>2)<<2)),a0(r))}while(!1);if((F|0)==19){p=t+8|0,r=e[p>>2]|0;e:do if((r|0)>0){if(g=t+4596|0,C=W(h,M)|0,I=C+1|0,k=t+4600|0,U=t+160|0,B=t+168|0,V=t+164|0,O=t+156|0,_=t+88|0,a=t+4592|0,(h|0)>0)l=0;else{for(l=0;;){if(o=e[Z>>2]|0,n=o+1|0,e[g>>2]=n,s=o+I|0,e[k>>2]=s,l&1?(e[g>>2]=s,e[k>>2]=n,n=1):n=I,h=e[U>>2]|0,(h|0)<=(l|0)&&(l|0)<((e[B>>2]|0)+h|0)){if(h=e[_>>2]|0,f=0,P0(e[(e[h>>2]|0)+8>>2]|0,h|0,o+(n+((e[O>>2]|0)-C))|0,e[V>>2]|0,M|0),h=f,f=0,h&1)break;r=e[p>>2]|0}if(l=l+1|0,(l|0)>=(r|0)){F=50;break e}}n=b()|0;break}i:for(;;){n=e[Z>>2]|0,r=n+1|0,e[g>>2]=r,n=n+I|0,e[k>>2]=n,l&1&&(e[g>>2]=n,e[k>>2]=r,r=n),o=e[X>>2]|0,n=r,s=0;do{if(e[a>>2]=e[o+(s<<2)>>2],F=e[c>>2]|0,d[n+F>>0]=d[n+(F+-1)>>0]|0,d[(e[k>>2]|0)+-1>>0]=d[e[g>>2]>>0]|0,f=0,h0(83,t|0,0),F=f,f=0,F&1){F=38;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[a>>2],n=(e[g>>2]|0)+M|0,e[g>>2]=n,r=e[k>>2]|0,e[k>>2]=r+M,s=s+1|0}while((s|0)<(h|0));if(F=e[U>>2]|0,(F|0)<=(l|0)&&(l|0)<((e[B>>2]|0)+F|0)&&(F=e[_>>2]|0,f=0,P0(e[(e[F>>2]|0)+8>>2]|0,F|0,r+(M+((e[O>>2]|0)-C))|0,e[V>>2]|0,M|0),F=f,f=0,F&1)){F=30;break}if(l=l+1|0,(l|0)>=(e[p>>2]|0)){F=50;break e}}if((F|0)==30){n=b()|0;break}else if((F|0)==38){n=b()|0;break}}else F=50;while(!1);do if((F|0)==50){if(f=0,n0(183,t|0),t=f,f=0,t&1){n=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[Z>>2]|0,!r){y=K;return}(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),a0(r),y=K;return}while(!1);r=e[X>>2]|0,s=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-s|0)>>>2)<<2)),a0(r))}r=e[Z>>2]|0,r||r0(n|0),(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),a0(r),r0(n|0)}function bd(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0;if(I=t+4596|0,n=e[I>>2]|0,V=t+172|0,r=e[V>>2]|0,!((r|0)<=0))for(k=t+4600|0,U=t+4604|0,B=t+4592|0,c=n,l=N[n+-1>>0]|0,n=N[n>>0]|0,C=0;p=e[k>>2]|0,a=d[p+(C+-1)>>0]|0,g=a&255,o=C+1|0,s=N[c+o>>0]|0,h=e[U>>2]|0,c=n-l|0,l=l-g|0,h=((((d[h+(s-n)>>0]|0)*9|0)+(d[h+c>>0]|0)|0)*9|0)+(d[h+l>>0]|0)|0,p=p+C|0,h?(r=n-g>>31,(r^l|0)<0?r=n:r=g+((r^c|0)<0?0:c)|0,g=Gd(t,h,N[p>>0]|0,r,0)|0,d[(e[k>>2]|0)+C>>0]=g):(r=Qd(t,a,p,r-C|0)|0,n=r+C|0,(n|0)!=(e[V>>2]|0)&&(g=zd(t,g,N[(e[I>>2]|0)+n>>0]|0)|0,d[(e[k>>2]|0)+n>>0]=g,g=e[B>>2]|0,e[B>>2]=(g|0)<1?0:g+-1|0,r=r+1|0),o=r+C|0,s=e[I>>2]|0,n=N[s+(o+-1)>>0]|0,s=N[s+o>>0]|0),r=e[V>>2]|0,!((r|0)<=(o|0));)c=e[I>>2]|0,l=n,n=s,C=o}function Gd(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(U=r>>31,h=(U^r)-U|0,I=t+188+(h*12|0)+10|0,n=E[I>>1]|0,C=t+188+(h*12|0)|0,o=e[C>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(r=5;(n<>1]^U)-U+s|0,k=t+128|0,o=e[k>>2]|0,(n&o|0)==(n|0)?p=n:p=o&~(n>>31),n=t+112|0,(e[n>>2]|0)<8&&_i(t),o=t+108|0,s=e[o>>2]|0,l=s>>>24,a=e[2832+(r<<11)+(l<<3)+4>>2]|0,a?(e[n>>2]=(e[n>>2]|0)-a,e[o>>2]=s<>2]|0):(c=e[t+148>>2]|0,o=e[t+140>>2]|0,n=ji(t)|0,(n|0)<(c+-1-o|0)?r&&(n=(ni(t,r)|0)+(n<>31^n>>1,(((n|0)>-1?n:0-n|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),t=f,f=0,t&1?(t=b()|0,ge(n|0),r0(t|0)):Be(n|0,824,96))),c=t+136|0,s=e[c>>2]|0,r?a=n:(s?o=0:o=(e[t+188+(h*12|0)+4>>2]<<1)+-1+(E[I>>1]|0)>>31,a=o^n),r=e[t+152>>2]|0,o=(e[C>>2]|0)+((a|0)>-1?a:0-a|0)|0,l=t+188+(h*12|0)+4|0,n=(e[l>>2]|0)+(W(s<<1|1,a)|0)|0,s=E[I>>1]|0,(s|0)==(r|0)&&(o=o>>1,n=n>>1,s=r>>1),e[C>>2]=o,r=s+1|0,E[I>>1]=r,o=r+n|0,(o|0)>=1?(n|0)>0&&(n=n-r|0,I=E[g>>1]|0,E[g>>1]=(I<<16>>16<127&1)+(I&65535),n=(n|0)>0?0:n):(n=E[g>>1]|0,E[g>>1]=(n&65535)-(n<<16>>16>-128&1),n=(o|0)>(~s|0)?o:0-s|0),e[l>>2]=n,r=e[c>>2]|0,s=r<<1|1,o=(W(s,(a^U)-U|0)|0)+p|0,(o|0)>=(0-r|0)?(n=e[k>>2]|0,(n+r|0)<(o|0)&&(o=o-(W(e[t+132>>2]|0,s)|0)|0)):(o=(W(e[t+132>>2]|0,s)|0)+o|0,n=e[k>>2]|0),(o&n|0)==(o|0)?(t=o,t=t&255,t|0):(t=n&~(o>>31),t=t&255,t|0)}function Qd(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;for(c=t+112|0,h=t+108|0,p=t+4592|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[h>>2]|0,o=o+-1|0,e[c>>2]=o,e[h>>2]=a<<1,(a|0)>=0){g=8;break}if(a=e[p>>2]|0,C=1<>2],I=s-l|0,I=(C|0)<(I|0)?C:I,l=I+l|0,(I|0)==(C|0)&&(e[p>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}return(g|0)==8&&((l|0)!=(s|0)?(o=e[p>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,5,35648),I=f,f=0,I&1?(I=b()|0,ge(o|0),r0(I|0)):Be(o|0,824,96))):o=s),(o|0)<=0||je(n|0,r|0,o|0)|0,o|0}function zd(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return l=r-n|0,a=t+128|0,s=t+136|0,(((l|0)>-1?l:0-l|0)|0)>(e[s>>2]|0)?(r=W(sn(t,t+4568|0)|0,n-r>>31|1)|0,o=e[s>>2]|0,l=o<<1|1,r=(W(r,l)|0)+n|0,(r|0)>=(0-o|0)?(s=e[a>>2]|0,(s+o|0)<(r|0)&&(r=r-(W(e[t+132>>2]|0,l)|0)|0)):(r=(W(e[t+132>>2]|0,l)|0)+r|0,s=e[a>>2]|0),(r&s|0)==(r|0)?(t=r,t=t&255,t|0):(t=s&~(r>>31),t=t&255,t|0)):(n=sn(t,t+4580|0)|0,l=e[s>>2]|0,o=l<<1|1,r=(W(o,n)|0)+r|0,(r|0)>=(0-l|0)?(s=e[a>>2]|0,(s+l|0)<(r|0)&&(r=r-(W(e[t+132>>2]|0,o)|0)|0)):(r=(W(e[t+132>>2]|0,o)|0)+r|0,s=e[a>>2]|0),(r&s|0)==(r|0)?(t=r,t=t&255,t|0):(t=s&~(r>>31),t=t&255,t|0))}function sn(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=r+9|0,n=N[p>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;a=e[t+148>>2]|0,c=e[36476+(e[t+4592>>2]<<2)>>2]|0,n=e[t+140>>2]|0,o=ji(t)|0;do if((o|0)<(a+-2-c-n|0))if(s){c=(ni(t,s)|0)+(o<>2]|0,o=c+s|0,a=o&1,n=a,l=1,o=(a+o|0)/2|0;break}else{s=e[l>>2]|0,t=s+o|0,n=t&1,t=(n+t|0)/2|0,h=8;break}else o=(ni(t,n)|0)+1|0,a=e[l>>2]|0,t=o+a|0,n=t&1,t=(n+t|0)/2|0,s?(c=o,l=1,o=t,s=a):(s=a,h=8);while(!1);return(h|0)==8&&(c=o,l=N[r+10>>0]<<1>>>0>=(N[p>>0]|0)>>>0,o=t),o=(n|0)!=0^l?o:0-o|0,(o|0)<0&&(h=r+10|0,d[h>>0]=(N[h>>0]|0)+1),n=(c+1-s>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[p>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(r=s,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r,o|0):(e[r>>2]=n>>1,h=(s&255)>>>1,d[p>>0]=h,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=h,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r,o|0)}function Hd(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;I=y,y=y+32|0,s=I,C=t+136|0;e:do if(e[C>>2]|0)r=t+144|0;else if(n=e[t+128>>2]|0,r=t+144|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+176>>2]|0))&&(e[s+8>>2]|0)==(e[t+180>>2]|0)&&(e[s+12>>2]|0)==(e[t+184>>2]|0))switch(e[r>>2]|0){case 8:{C=e[8900]|0,e[t+4604>>2]=C+(((e[8901]|0)-C|0)>>>1),y=I;return}case 10:{C=e[8903]|0,e[t+4604>>2]=C+(((e[8904]|0)-C|0)>>>1),y=I;return}case 12:{C=e[8906]|0,e[t+4604>>2]=C+(((e[8907]|0)-C|0)>>>1),y=I;return}case 16:{C=e[8909]|0,e[t+4604>>2]=C+(((e[8910]|0)-C|0)>>>1),y=I;return}default:break e}while(!1);if(g=1<>2],n=t+4608|0,s=g<<1,o=t+4612|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),p=t+4604|0,e[p>>2]=r+g,r=0-g|0,(g|0)<=(r|0)){y=I;return}c=t+184|0,h=t+180|0,a=t+176|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[h>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[C>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[p>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(g|0));y=I}function Yd(t){t=t|0,a0(t)}function jd(t){return t=t|0,50767}function Xd(t,r,n){t=t|0,r=r|0,n=n|0,Tt(t,50754,12)}function Kd(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0;U=y,y=y+16|0,B=U,e[B>>2]=0,V=B+4|0,e[V>>2]=0,e[B+8>>2]=0,I=B+8|0,f=0,o=u0(67,1)|0,C=f,f=0;e:do if(!(C&1)&&(C=o+1|0,d[o>>0]=n,e[B>>2]=o,e[V>>2]=C,e[I>>2]=C,f=0,h0(84,B|0,r&65535|0),C=f,f=0,!(C&1))&&(f=0,h0(84,B|0,t&65535|0),C=f,f=0,!(C&1))){if(p=s&255,o=e[V>>2]|0,n=e[I>>2]|0,o>>>0>=n>>>0){if(r=e[B>>2]|0,t=r,a=o-t+1|0,(a|0)<0){if(f=0,n0(178,B|0),C=f,f=0,C&1){k=52;break}t=e[B>>2]|0,n=e[I>>2]|0,r=t}if(h=r,o=n-h|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,n=e[V>>2]|0,c=n-h|0,o?k=12:(o=0,a=0)):(c=e[V>>2]|0,o=2147483647,n=c,c=c-h|0,k=12),(k|0)==12&&(f=0,a=u0(67,o|0)|0,C=f,f=0,C&1)){k=52;break}d[a+c>>0]=p,g=n-h|0,C=a+(c-g)|0,ii(C|0,r|0,g|0)|0,e[B>>2]=C,e[V>>2]=a+(c+1),e[I>>2]=a+o,t&&a0(t)}else d[o>>0]=p,e[V>>2]=(e[V>>2]|0)+1;i:do if((s|0)>0){for(C=0;;){if(C=C+1|0,g=C&255,o=e[V>>2]|0,r=e[I>>2]|0,o>>>0>=r>>>0){if(t=e[B>>2]|0,n=t,a=o-n+1|0,(a|0)<0){if(f=0,n0(178,B|0),p=f,f=0,p&1)break;t=e[B>>2]|0,n=t,r=e[I>>2]|0}if(p=t,o=r-p|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,r=e[V>>2]|0,c=r-p|0,o?k=25:(h=0,a=0)):(c=e[V>>2]|0,o=2147483647,r=c,c=c-p|0,k=25),(k|0)==25){if(k=0,f=0,a=u0(67,o|0)|0,h=f,f=0,h&1)break;h=o}d[a+c>>0]=g,o=a+(c+1)|0,p=r-p|0,g=a+(c-p)|0,ii(g|0,t|0,p|0)|0,e[B>>2]=g,e[V>>2]=o,e[I>>2]=a+h,n&&(a0(n),o=e[V>>2]|0)}else d[o>>0]=g,o=(e[V>>2]|0)+1|0,e[V>>2]=o;if(n=e[I>>2]|0,o>>>0>=n>>>0){if(r=e[B>>2]|0,t=r,a=o-t+1|0,(a|0)<0){if(f=0,n0(178,B|0),g=f,f=0,g&1)break;t=e[B>>2]|0,n=e[I>>2]|0,r=t}if(p=r,o=n-p|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,a=e[V>>2]|0,c=a-p|0,o?k=36:(h=0,n=0)):(c=e[V>>2]|0,o=2147483647,a=c,c=c-p|0,k=36),(k|0)==36){if(k=0,f=0,n=u0(67,o|0)|0,g=f,f=0,g&1)break;h=o}d[n+c>>0]=17,o=n+(c+1)|0,p=a-p|0,g=n+(c-p)|0,ii(g|0,r|0,p|0)|0,e[B>>2]=g,e[V>>2]=o,e[I>>2]=n+h,t&&(a0(t),o=e[V>>2]|0)}else d[o>>0]=17,o=(e[V>>2]|0)+1|0,e[V>>2]=o;if(n=e[I>>2]|0,o>>>0>=n>>>0){if(r=e[B>>2]|0,t=r,a=o-t+1|0,(a|0)<0){if(f=0,n0(178,B|0),g=f,f=0,g&1)break;t=e[B>>2]|0,n=e[I>>2]|0,r=t}if(h=r,o=n-h|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,n=e[V>>2]|0,c=n-h|0,o?k=48:(o=0,a=0)):(c=e[V>>2]|0,o=2147483647,n=c,c=c-h|0,k=48),(k|0)==48&&(k=0,f=0,a=u0(67,o|0)|0,g=f,f=0,g&1))break;d[a+c>>0]=0,p=n-h|0,g=a+(c-p)|0,ii(g|0,r|0,p|0)|0,e[B>>2]=g,e[V>>2]=a+(c+1),e[I>>2]=a+o,t&&a0(t)}else d[o>>0]=0,e[V>>2]=(e[V>>2]|0)+1;if((C|0)>=(s|0))break i}l=b()|0;break e}while(!1);if(f=0,c=u0(67,20)|0,s=f,f=0,s&1)k=52;else{e[c>>2]=36800,d[c+4>>0]=-9,t=c+8|0,e[t>>2]=0,a=c+12|0,e[a>>2]=0,n=c+16|0,e[n>>2]=0,o=e[V>>2]|0,s=e[B>>2]|0,r=o-s|0;do if((o|0)!=(s|0)){if((r|0)<0&&(f=0,n0(178,t|0),s=f,f=0,s&1)||(k=62),(k|0)==62&&(f=0,l=u0(67,r|0)|0,s=f,f=0,!(s&1))){if(e[a>>2]=l,e[t>>2]=l,e[n>>2]=l+r,o=e[B>>2]|0,n=e[V>>2]|0,(o|0)==(n|0))break;do d[l>>0]=d[o>>0]|0,l=(e[a>>2]|0)+1|0,e[a>>2]=l,o=o+1|0;while((o|0)!=(n|0));o=e[B>>2]|0;break}l=b()|0,o=e[t>>2]|0,o&&((e[a>>2]|0)!=(o|0)&&(e[a>>2]=o),a0(o)),a0(c);break e}while(!1);return o?((e[V>>2]|0)!=(o|0)&&(e[V>>2]=o),a0(o),y=U,c|0):(y=U,c|0)}}else k=52;while(!1);return(k|0)==52&&(l=b()|0),o=e[B>>2]|0,o||r0(l|0),(e[V>>2]|0)!=(o|0)&&(e[V>>2]=o),a0(o),r0(l|0),0}function Wd(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;V=y,y=y+32|0,k=V+28|0,_=V+16|0,B=V+4|0,U=V,e[_>>2]=0,F=_+4|0,e[F>>2]=0,e[_+8>>2]=0,C=G0(5)|0,e[_>>2]=C,I=_+8|0,e[I>>2]=C+5,d[C>>0]=74,d[C+1>>0]=70,d[C+2>>0]=73,d[C+3>>0]=70,d[C+4>>0]=0,e[F>>2]=C+5,f=0,h0(84,_|0,e[t>>2]&65535|0),C=f,f=0;e:do if(C&1)O=43;else{if(p=e[t+4>>2]&255,r=e[F>>2]|0,s=e[I>>2]|0,r>>>0>=s>>>0){if(o=e[_>>2]|0,l=o,a=r-l+1|0,(a|0)<0){if(f=0,n0(178,_|0),C=f,f=0,C&1){O=43;break}l=e[_>>2]|0,s=e[I>>2]|0,o=l}if(h=o,r=s-h|0,r>>>0<1073741823?(r=r<<1,r=r>>>0>>0?a:r,s=e[F>>2]|0,c=s-h|0,r?O=10:(r=0,a=0)):(c=e[F>>2]|0,r=2147483647,s=c,c=c-h|0,O=10),(O|0)==10&&(f=0,a=u0(67,r|0)|0,C=f,f=0,C&1)){O=43;break}d[a+c>>0]=p,g=s-h|0,C=a+(c-g)|0,ii(C|0,o|0,g|0)|0,e[_>>2]=C,e[F>>2]=a+(c+1),e[I>>2]=a+r,l&&a0(l)}else d[r>>0]=p,e[F>>2]=(e[F>>2]|0)+1;if(f=0,h0(84,_|0,e[t+8>>2]&65535|0),C=f,f=0,!(C&1)&&(f=0,h0(84,_|0,e[t+12>>2]&65535|0),C=f,f=0,!(C&1))){if(C=t+16|0,g=e[C>>2]&255,r=e[F>>2]|0,o=e[I>>2]|0,r>>>0>=o>>>0){if(l=e[_>>2]|0,s=l,a=r-s+1|0,(a|0)<0){if(f=0,n0(178,_|0),p=f,f=0,p&1){O=43;break}l=e[_>>2]|0,s=l,o=e[I>>2]|0}if(p=l,r=o-p|0,r>>>0<1073741823?(r=r<<1,r=r>>>0>>0?a:r,a=e[F>>2]|0,c=a-p|0,r?O=23:(h=0,o=0)):(c=e[F>>2]|0,r=2147483647,a=c,c=c-p|0,O=23),(O|0)==23)if(f=0,o=u0(67,r|0)|0,h=f,f=0,h&1){O=43;break}else h=r;d[o+c>>0]=g,r=o+(c+1)|0,p=a-p|0,g=o+(c-p)|0,ii(g|0,l|0,p|0)|0,e[_>>2]=g,e[F>>2]=r,e[I>>2]=o+h,s&&(a0(s),r=e[F>>2]|0)}else d[r>>0]=g,r=(e[F>>2]|0)+1|0,e[F>>2]=r;if(g=t+20|0,p=e[g>>2]&255,s=e[I>>2]|0,r>>>0>=s>>>0){if(o=e[_>>2]|0,l=o,a=r-l+1|0,(a|0)<0){if(f=0,n0(178,_|0),h=f,f=0,h&1){O=43;break}l=e[_>>2]|0,s=e[I>>2]|0,o=l}if(h=o,r=s-h|0,r>>>0<1073741823?(r=r<<1,r=r>>>0>>0?a:r,s=e[F>>2]|0,c=s-h|0,r?O=34:(r=0,a=0)):(c=e[F>>2]|0,r=2147483647,s=c,c=c-h|0,O=34),(O|0)==34&&(f=0,a=u0(67,r|0)|0,M=f,f=0,M&1)){O=43;break}d[a+c>>0]=p,p=s-h|0,M=a+(c-p)|0,ii(M|0,o|0,p|0)|0,e[_>>2]=M,e[F>>2]=a+(c+1),e[I>>2]=a+r,l&&a0(l)}else d[r>>0]=p,e[F>>2]=(e[F>>2]|0)+1;r=e[C>>2]|0;do if((r|0)>0){if(!(e[t+24>>2]|0))if(e[U>>2]=e[F>>2],M=0+(W(r*3|0,e[g>>2]|0)|0)|0,f=0,e[k>>2]=e[U>>2],k0(15,_|0,k|0,0,M|0)|0,M=f,f=0,M&1){O=43;break e}else break;if(s=de(16)|0,f=0,m0(5,B|0,50792,57),M=f,f=0,M&1)r=b()|0;else if(f=0,r=g0(1)|0,M=f,f=0,!(M&1)&&(f=0,P0(36,s|0,1,r|0,B|0),M=f,f=0,!(M&1))?(f=0,m0(6,s|0,824,96),f=0,n=0):n=1,r=b()|0,f0(B),!n){n=r;break e}ge(s|0),n=r;break e}while(!1);if(f=0,c=u0(67,20)|0,M=f,f=0,M&1)O=43;else{e[c>>2]=36800,d[c+4>>0]=-32,l=c+8|0,e[l>>2]=0,a=c+12|0,e[a>>2]=0,s=c+16|0,e[s>>2]=0,r=e[F>>2]|0,M=e[_>>2]|0,o=r-M|0;do if((r|0)!=(M|0)){if((o|0)<0&&(f=0,n0(178,l|0),M=f,f=0,M&1)||(O=53),(O|0)==53&&(f=0,n=u0(67,o|0)|0,M=f,f=0,!(M&1))){if(e[a>>2]=n,e[l>>2]=n,e[s>>2]=n+o,r=e[_>>2]|0,s=e[F>>2]|0,(r|0)==(s|0))break;do d[n>>0]=d[r>>0]|0,n=(e[a>>2]|0)+1|0,e[a>>2]=n,r=r+1|0;while((r|0)!=(s|0));r=e[_>>2]|0;break}r=b()|0,n=e[l>>2]|0,n&&((e[a>>2]|0)!=(n|0)&&(e[a>>2]=n),a0(n)),a0(c),O=44;break e}while(!1);return r?((e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),a0(r),y=V,c|0):(y=V,c|0)}}else O=43}while(!1);return(O|0)==43&&(r=b()|0,O=44),(O|0)==44&&(n=r),r=e[_>>2]|0,r||r0(n|0),(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),a0(r),r0(n|0),0}function on(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0;c=y,y=y+16|0,p=c,e[p>>2]=0,g=p+4|0,e[g>>2]=0,e[p+8>>2]=0,f=0,r=u0(67,1)|0,a=f,f=0;e:do if(!(a&1)&&(a=r+1|0,d[r>>0]=1,e[p>>2]=r,e[g>>2]=a,e[p+8>>2]=a,f=0,h0(84,p|0,e[t>>2]&65535|0),a=f,f=0,!(a&1))&&(f=0,h0(84,p|0,e[t+4>>2]&65535|0),a=f,f=0,!(a&1))&&(f=0,h0(84,p|0,e[t+8>>2]&65535|0),a=f,f=0,!(a&1))&&(f=0,h0(84,p|0,e[t+12>>2]&65535|0),a=f,f=0,!(a&1))&&(f=0,h0(84,p|0,e[t+16>>2]&65535|0),a=f,f=0,!(a&1))&&(f=0,h=u0(67,20)|0,a=f,f=0,!(a&1))){e[h>>2]=36800,d[h+4>>0]=-8,o=h+8|0,e[o>>2]=0,a=h+12|0,e[a>>2]=0,t=h+16|0,e[t>>2]=0,r=e[g>>2]|0,C=e[p>>2]|0,s=r-C|0;do if((r|0)!=(C|0)){if((s|0)<0&&(f=0,n0(178,o|0),C=f,f=0,C&1)||(l=11),(l|0)==11&&(f=0,n=u0(67,s|0)|0,C=f,f=0,!(C&1))){if(e[a>>2]=n,e[o>>2]=n,e[t>>2]=n+s,r=e[p>>2]|0,t=e[g>>2]|0,(r|0)==(t|0))break;do d[n>>0]=d[r>>0]|0,n=(e[a>>2]|0)+1|0,e[a>>2]=n,r=r+1|0;while((r|0)!=(t|0));r=e[p>>2]|0;break}n=b()|0,r=e[o>>2]|0,r&&((e[a>>2]|0)!=(r|0)&&(e[a>>2]=r),a0(r)),a0(h);break e}while(!1);return r?((e[g>>2]|0)!=(r|0)&&(e[g>>2]=r),a0(r),y=c,h|0):(y=c,h|0)}else l=25;while(!1);return(l|0)==25&&(n=b()|0),r=e[p>>2]|0,r||r0(n|0),(e[g>>2]|0)!=(r|0)&&(e[g>>2]=r),a0(r),r0(n|0),0}function Zd(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;return l=G0(5)|0,d[l>>0]=109,d[l+1>>0]=114,d[l+2>>0]=102,d[l+3>>0]=120,d[l+4>>0]=t,f=0,o=u0(67,20)|0,s=f,f=0,s&1&&(o=b()|0,a0(l),r0(o|0)),e[o>>2]=36800,d[o+4>>0]=-24,t=o+8|0,e[t>>2]=0,r=o+12|0,e[r>>2]=0,n=o+16|0,e[n>>2]=0,f=0,s=u0(67,5)|0,a=f,f=0,a&1?(a=b()|0,a0(o),a0(l),r0(a|0),0):(e[r>>2]=s,e[t>>2]=s,e[n>>2]=s+5,d[s>>0]=109,a=(e[r>>2]|0)+1|0,e[r>>2]=a,s=l+1|0,d[a>>0]=d[s>>0]|0,a=(e[r>>2]|0)+1|0,e[r>>2]=a,s=s+1|0,d[a>>0]=d[s>>0]|0,a=(e[r>>2]|0)+1|0,e[r>>2]=a,s=s+1|0,d[a>>0]=d[s>>0]|0,a=(e[r>>2]|0)+1|0,e[r>>2]=a,d[a>>0]=d[s+1>>0]|0,e[r>>2]=(e[r>>2]|0)+1,a0(l),o|0)}function Jd(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0;O=y,y=y+16|0,_=O,e[_>>2]=0,F=_+4|0,e[F>>2]=0,e[_+8>>2]=0,B=_+8|0,f=0,o=u0(67,1)|0,U=f,f=0;e:do if(U&1)V=29;else{if(c=o+1|0,U=c,d[o>>0]=r,e[_>>2]=o,e[F>>2]=U,e[B>>2]=U,(r|0)>0){a=c,U=0;do{if(k=U+t&255,a>>>0>=c>>>0){if(o=e[_>>2]|0,h=o,a=a-h+1|0,(a|0)<0){if(f=0,n0(178,_|0),I=f,f=0,I&1){V=28;break}h=e[_>>2]|0,c=e[B>>2]|0,I=h}else I=o;if(C=I,o=c-C|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,c=e[F>>2]|0,p=c-C|0,o?V=13:(g=0,a=0)):(p=e[F>>2]|0,o=2147483647,c=p,p=p-C|0,V=13),(V|0)==13)if(V=0,f=0,a=u0(67,o|0)|0,g=f,f=0,g&1){V=28;break}else g=o;d[a+p>>0]=k,o=a+(p+1)|0,C=c-C|0,k=a+(p-C)|0,ii(k|0,I|0,C|0)|0,e[_>>2]=k,e[F>>2]=o,e[B>>2]=a+g,h&&(a0(h),o=e[F>>2]|0)}else d[a>>0]=k,o=(e[F>>2]|0)+1|0,e[F>>2]=o;if(c=e[B>>2]|0,o>>>0>=c>>>0){if(h=e[_>>2]|0,a=h,p=o-a+1|0,(p|0)<0){if(f=0,n0(178,_|0),k=f,f=0,k&1){V=28;break}h=e[_>>2]|0,a=h,c=e[B>>2]|0}if(C=h,o=c-C|0,o>>>0<1073741823?(o=o<<1,o=o>>>0

>>0?p:o,p=e[F>>2]|0,c=p-C|0,o?V=24:(o=0,g=0)):(c=e[F>>2]|0,o=2147483647,p=c,c=c-C|0,V=24),(V|0)==24&&(V=0,f=0,g=u0(67,o|0)|0,k=f,f=0,k&1)){V=28;break}d[g+c>>0]=0,I=p-C|0,k=g+(c-I)|0,ii(k|0,h|0,I|0)|0,e[_>>2]=k,e[F>>2]=g+(c+1),e[B>>2]=g+o,a&&a0(a)}else d[o>>0]=0,e[F>>2]=(e[F>>2]|0)+1;U=U+1|0,a=e[F>>2]|0,c=e[B>>2]|0}while((U|0)<(r|0));if((V|0)==28){l=b()|0;break}o=n&255,a>>>0>>0?(d[a>>0]=o,a=(e[F>>2]|0)+1|0,e[F>>2]=a):V=37}else a=c,o=n&255,V=37;if((V|0)==37){if(h=e[_>>2]|0,p=h,g=a-p+1|0,(g|0)<0){if(f=0,n0(178,_|0),n=f,f=0,n&1){V=29;break}p=e[_>>2]|0,c=e[B>>2]|0,h=p}if(k=h,a=c-k|0,a>>>0<1073741823?(a=a<<1,a=a>>>0>>0?g:a,g=e[F>>2]|0,C=g-k|0,a?V=43:(I=0,c=0)):(C=e[F>>2]|0,a=2147483647,g=C,C=C-k|0,V=43),(V|0)==43)if(f=0,c=u0(67,a|0)|0,n=f,f=0,n&1){V=29;break}else I=a;d[c+C>>0]=o,a=c+(C+1)|0,t=g-k|0,n=c+(C-t)|0,ii(n|0,h|0,t|0)|0,e[_>>2]=n,e[F>>2]=a,e[B>>2]=c+I,p&&(a0(p),a=e[F>>2]|0)}if(k=s&255,o=e[B>>2]|0,a>>>0>=o>>>0){if(c=e[_>>2]|0,h=c,a=a-h+1|0,(a|0)<0){if(f=0,n0(178,_|0),s=f,f=0,s&1){V=29;break}h=e[_>>2]|0,o=e[B>>2]|0,c=h}if(I=c,o=o-I|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,p=e[F>>2]|0,g=p-I|0,o?V=54:(C=0,a=0)):(g=e[F>>2]|0,o=2147483647,p=g,g=g-I|0,V=54),(V|0)==54)if(f=0,a=u0(67,o|0)|0,s=f,f=0,s&1){V=29;break}else C=o;d[a+g>>0]=k,o=a+(g+1)|0,n=p-I|0,s=a+(g-n)|0,ii(s|0,c|0,n|0)|0,e[_>>2]=s,e[F>>2]=o,e[B>>2]=a+C,h&&(a0(h),o=e[F>>2]|0)}else d[a>>0]=k,o=(e[F>>2]|0)+1|0,e[F>>2]=o;if(a=e[B>>2]|0,o>>>0>=a>>>0){if(c=e[_>>2]|0,h=c,p=o-h+1|0,(p|0)<0){if(f=0,n0(178,_|0),s=f,f=0,s&1){V=29;break}h=e[_>>2]|0,a=e[B>>2]|0,c=h}if(C=c,o=a-C|0,o>>>0<1073741823?(o=o<<1,o=o>>>0

>>0?p:o,a=e[F>>2]|0,g=a-C|0,o?V=65:(o=0,p=0)):(g=e[F>>2]|0,o=2147483647,a=g,g=g-C|0,V=65),(V|0)==65&&(f=0,p=u0(67,o|0)|0,s=f,f=0,s&1)){V=29;break}d[p+g>>0]=0,n=a-C|0,s=p+(g-n)|0,ii(s|0,c|0,n|0)|0,e[_>>2]=s,e[F>>2]=p+(g+1),e[B>>2]=p+o,h&&a0(h)}else d[o>>0]=0,e[F>>2]=(e[F>>2]|0)+1;if(f=0,g=u0(67,20)|0,B=f,f=0,B&1)V=29;else{e[g>>2]=36800,d[g+4>>0]=-38,h=g+8|0,e[h>>2]=0,p=g+12|0,e[p>>2]=0,a=g+16|0,e[a>>2]=0,o=e[F>>2]|0,B=e[_>>2]|0,c=o-B|0;do if((o|0)!=(B|0)){if((c|0)<0&&(f=0,n0(178,h|0),B=f,f=0,B&1)||(V=72),(V|0)==72&&(f=0,l=u0(67,c|0)|0,B=f,f=0,!(B&1))){if(e[p>>2]=l,e[h>>2]=l,e[a>>2]=l+c,o=e[_>>2]|0,a=e[F>>2]|0,(o|0)==(a|0))break;do d[l>>0]=d[o>>0]|0,l=(e[p>>2]|0)+1|0,e[p>>2]=l,o=o+1|0;while((o|0)!=(a|0));o=e[_>>2]|0;break}l=b()|0,o=e[h>>2]|0,o&&((e[p>>2]|0)!=(o|0)&&(e[p>>2]=o),a0(o)),a0(g);break e}while(!1);return o?((e[F>>2]|0)!=(o|0)&&(e[F>>2]=o),a0(o),y=O,g|0):(y=O,g|0)}}while(!1);return(V|0)==29&&(l=b()|0),o=e[_>>2]|0,o||r0(l|0),(e[F>>2]|0)!=(o|0)&&(e[F>>2]=o),a0(o),r0(l|0),0}function $d(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=(r&65535)>>>8&255,I=t+4|0,n=e[I>>2]|0,k=t+8|0,s=e[k>>2]|0,n>>>0>=s>>>0?(o=e[t>>2]|0,l=o,a=n-l+1|0,(a|0)<0&&(ct(t),l=e[t>>2]|0,s=e[k>>2]|0,o=l),g=o,n=s-g|0,n>>>0<1073741823?(n=n<<1,n=n>>>0>>0?a:n,a=e[I>>2]|0,s=a-g|0,n?U=8:(p=0,h=0,c=s,n=a)):(s=e[I>>2]|0,n=2147483647,a=s,s=s-g|0,U=8),(U|0)==8&&(p=n,h=G0(n)|0,c=s,n=a),d[h+c>>0]=C,s=h+(c+1)|0,g=n-g|0,C=h+(c-g)|0,ii(C|0,o|0,g|0)|0,e[t>>2]=C,e[I>>2]=s,e[k>>2]=h+p,l&&(a0(l),s=e[I>>2]|0)):(d[n>>0]=C,s=(e[I>>2]|0)+1|0,e[I>>2]=s),g=r&255,n=e[k>>2]|0,s>>>0>>0){d[s>>0]=g,e[I>>2]=(e[I>>2]|0)+1;return}o=e[t>>2]|0,l=o,s=s-l+1|0,(s|0)<0&&(ct(t),l=e[t>>2]|0,n=e[k>>2]|0,o=l),p=o,n=n-p|0,n>>>0<1073741823?(n=n<<1,n=n>>>0>>0?s:n,a=e[I>>2]|0,s=a-p|0,n?U=18:(h=0,c=0,n=a)):(s=e[I>>2]|0,n=2147483647,a=s,s=s-p|0,U=18),(U|0)==18&&(h=n,c=G0(n)|0,n=a),d[c+s>>0]=g,r=n-p|0,U=c+(s-r)|0,ii(U|0,o|0,r|0)|0,e[t>>2]=U,e[I>>2]=c+(s+1),e[k>>2]=c+h,l&&a0(l)}function eg(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(o=e[t>>2]|0,U=e[r>>2]|0,k=U,h=o,C=n,p=s-C|0,(p|0)<=0)return B=U,B|0;if(I=t+8|0,r=e[I>>2]|0,B=t+4|0,g=e[B>>2]|0,l=g,(p|0)<=(r-l|0)){if(c=l-k|0,(p|0)>(c|0)){if(a=n+c|0,(a|0)==(s|0))r=g;else{l=a,r=g;do d[r>>0]=d[l>>0]|0,r=(e[B>>2]|0)+1|0,e[B>>2]=r,l=l+1|0;while((l|0)!=(s|0))}if((c|0)>0)c=r;else return B=U,B|0}else c=g,a=s;if(o=c-(o+(p-h+k))|0,r=U+o|0,r>>>0>>0){l=c;do d[l>>0]=d[r>>0]|0,r=r+1|0,l=(e[B>>2]|0)+1|0,e[B>>2]=l;while((r|0)!=(g|0))}return gr(c+(0-o)|0,U|0,o|0)|0,gr(U|0,n|0,a-C|0)|0,B=U,B|0}if(l=l-h+p|0,(l|0)<0&&(ct(t),r=e[I>>2]|0,o=e[t>>2]|0),a=o,r=r-a|0,r>>>0<1073741823?(r=r<<1,r=r>>>0>>0?l:r,l=k-a|0,r?c=15:(a=0,p=0)):(r=2147483647,l=k-a|0,c=15),(c|0)==15&&(a=r,p=G0(r)|0),h=p+l|0,r=h,c=p+a|0,(n|0)!=(s|0)){o=n,a=h;do d[a>>0]=d[o>>0]|0,a=r+1|0,r=a,o=o+1|0;while((o|0)!=(s|0));o=e[t>>2]|0}return n=k-o|0,s=p+(l-n)|0,ii(s|0,o|0,n|0)|0,k=(e[B>>2]|0)-k|0,n=r,ii(n|0,U|0,k|0)|0,r=e[t>>2]|0,e[t>>2]=s,e[B>>2]=n+k,e[I>>2]=c,r?(a0(r),B=h,B|0):(B=h,B|0)}function ig(t){t=t|0;var r=0;e[t>>2]=36800,r=e[t+8>>2]|0,r&&(t=t+12|0,(e[t>>2]|0)!=(r|0)&&(e[t>>2]=r),a0(r))}function tg(t){t=t|0;var r=0,n=0;if(e[t>>2]=36800,r=e[t+8>>2]|0,!r){a0(t);return}n=t+12|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r),a0(t)}function rg(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;if(ot(r,-1),ot(r,d[t+4>>0]|0),o=t+12|0,s=t+8|0,t=(e[o>>2]|0)-(e[s>>2]|0)+2|0,ot(r,(t&65535)>>>8&255),ot(r,t&255),t=e[s>>2]|0,(e[o>>2]|0)!=(t|0)){n=0;do ot(r,d[t+n>>0]|0),n=n+1|0,t=e[s>>2]|0;while(n>>>0<((e[o>>2]|0)-t|0)>>>0)}}function ot(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;if(o=e[t+4>>2]|0,o)if(n=o+24|0,s=e[n>>2]|0,(s|0)==(e[o+28>>2]|0)){Ni[e[(e[o>>2]|0)+52>>2]&63](o,r&255)|0;return}else{e[n>>2]=s+1,d[s>>0]=r;return}if(n=t+16|0,s=e[n>>2]|0,s>>>0<(e[t+12>>2]|0)>>>0){e[n>>2]=s+1,d[(e[t+8>>2]|0)+s>>0]=r;return}n=de(16)|0,f=0,s=g0(1)|0,r=f,f=0,r&1&&(r=b()|0,ge(n|0),r0(r|0)),f=0,m0(7,n|0,4,s|0),r=f,f=0,r&1?(r=b()|0,ge(n|0),r0(r|0)):Be(n|0,824,96)}function hi(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,o=(r|0)<4095?(r+128|0)/256|0:16,l=(n*3|0)+2+o|0,s=n+1|0,l=(l|0)<(s|0)|(l|0)>(r|0)?s:l,e[t+4>>2]=l,s=(o<<2|3)+(n*5|0)|0,s=(s|0)>(r|0)|(s|0)<(l|0)?l:s,e[t+8>>2]=s,n=(n*7|0)+4+(o*17|0)|0,e[t+12>>2]=(n|0)>(r|0)|(n|0)<(s|0)?s:n,e[t>>2]=r,e[t+16>>2]=64}function ng(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;p=y,y=y+128|0,c=p+100|0,s=p+16|0,n=p+112|0,h=p+4|0,g=p,o=s,l=t+20|0,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));e[s+16>>2]=e[t+4>>2],l=As(n,s,t+56|0)|0,n=e[(e[l>>2]|0)+16>>2]|0,t=t+8|0,f=0,e[c>>2]=e[t>>2],e[c+4>>2]=e[t+4>>2],e[c+8>>2]=e[t+8>>2],n=y0(n|0,l|0,c|0)|0,t=f,f=0;do if(t&1)n=b()|0;else{if(o=r+4|0,e[h>>2]=e[o>>2],e[h+4>>2]=e[o+4>>2],e[h+8>>2]=e[o+8>>2],o=r+16|0,t=e[o>>2]|0,c=h+8|0,e[c>>2]=(e[c>>2]|0)-t,c=h+4|0,e[c>>2]=(e[c>>2]|0)+t,c=e[(e[l>>2]|0)+12>>2]|0,e[g>>2]=n,f=0,n=k0(c|0,l|0,g|0,h|0,(d[r>>0]|0?(e[r+8>>2]|0)+t|0:0)|0)|0,h=f,f=0,h&1){if(n=b()|0,s=e[g>>2]|0,e[g>>2]=0,!s)break;Ce[e[(e[s>>2]|0)+4>>2]&255](s);break}if(s=e[g>>2]|0,e[g>>2]=0,s&&Ce[e[(e[s>>2]|0)+4>>2]&255](s),e[r+4>>2]|0||(e[o>>2]=(e[o>>2]|0)+n),!l){y=p;return}Ce[e[(e[l>>2]|0)+4>>2]&255](l),y=p;return}while(!1);l||r0(n|0),Ce[e[(e[l>>2]|0)+4>>2]&255](l),r0(n|0)}function sg(t,r){t=t|0,r=r|0,e[t>>2]=e[r>>2],e[t+4>>2]=e[r+4>>2],e[t+8>>2]=e[r+8>>2],d[t+12>>0]=0,r=t+16|0,t=r+100|0;do e[r>>2]=0,r=r+4|0;while((r|0)<(t|0))}function og(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0;O=y,y=y+32|0,V=O+4|0,I=O+16|0,_=O,an(t),k=t+16|0,o=e[t+24>>2]|0;e:do if((o+-2|0)>>>0<=14)if(U=t+40|0,n=e[U>>2]|0,n>>>0>2)n=5;else{switch(B=t+32|0,l=e[B>>2]|0,l|0){case 0:{n=1;break e}case 4:{if((n|0)==2){n=2;break e}break}case 3:break;default:if(n){n=2;break e}}if(C=t+100|0,n=t+108|0,s=e[n>>2]|0,(s|0)<1?(s=e[k>>2]|0,e[n>>2]=s,n=e[t+20>>2]|0,e[t+112>>2]=n):n=e[t+112>>2]|0,h=Ht(n|0,((n|0)<0)<<31>>31|0,s|0,((s|0)<0)<<31>>31|0)|0,c=(o+7|0)/8|0,c=Ht(h|0,I0|0,c|0,((c|0)<0)<<31>>31|0)|0,h=r+4|0,n=e[h>>2]|0,a=r+8|0,n|0&&(p=e[a>>2]|0,g=Ht(l|0,((l|0)<0)<<31>>31|0,c|0,I0|0)|0,o=I0,0<(o|0)|(o|0)==0&p>>>0>>0)&&(n=de(16)|0,f=0,s=g0(1)|0,_=f,f=0,!(_&1)&&(f=0,m0(7,n|0,3,s|0),_=f,f=0,!(_&1))&&Be(n|0,824,96),_=b()|0,ge(n|0),r0(_|0)),p=t+52|0,g=t+12|0,(l|0)>0)l=0;else{y=O;return}for(;;){if(fn(t,(l|0)==0),s=gs(I,k,p)|0,o=e[(e[s>>2]|0)+8>>2]|0,f=0,e[V>>2]=e[r>>2],e[V+4>>2]=e[r+4>>2],e[V+8>>2]=e[r+8>>2],o=y0(o|0,s|0,V|0)|0,F=f,f=0,F&1){o=32;break}if(F=e[(e[s>>2]|0)+16>>2]|0,e[_>>2]=o,f=0,D0(F|0,s|0,_|0,C|0,t|0,(d[g>>0]|0)!=0|0),F=f,f=0,F&1){o=30;break}if(o=e[_>>2]|0,e[_>>2]=0,o&&Ce[e[(e[o>>2]|0)+4>>2]&255](o),n?(n=n+c|0,e[h>>2]=n,e[a>>2]=(e[a>>2]|0)-c):n=0,o=(e[U>>2]|0)==0,l=(o&1)+l|0,s&&Ce[e[(e[s>>2]|0)+4>>2]&255](s),!o){o=34;break}if((l|0)>=(e[B>>2]|0)){o=34;break}}if((o|0)==30)n=b()|0,o=e[_>>2]|0,e[_>>2]=0,o&&Ce[e[(e[o>>2]|0)+4>>2]&255](o);else if((o|0)==32)n=b()|0,s||(F=n,r0(F|0));else if((o|0)==34){y=O;return}Ce[e[(e[s>>2]|0)+4>>2]&255](s),F=n,r0(F|0)}else n=2;while(!1);s=de(16)|0,f=0,o=g0(1)|0,F=f,f=0,!(F&1)&&(f=0,m0(7,s|0,n|0,o|0),F=f,f=0,!(F&1))&&Be(s|0,824,96),F=b()|0,ge(s|0),r0(F|0)}function an(t){t=t|0;var r=0,n=0,s=0,o=0;if((w1(t)|0)<<24>>24!=-40&&(r=de(16)|0,f=0,n=g0(1)|0,o=f,f=0,!(o&1)&&(f=0,m0(7,r|0,5,n|0),o=f,f=0,!(o&1))&&Be(r|0,824,96),o=b()|0,ge(r|0),r0(o|0)),r=w1(t)|0,r<<24>>24!=-38){for(;s=((ui(t)|0)&255)<<8,s=s|(ui(t)|0)&255,r=ag(t,r)|0,n=-2-r+s|0,!((n|0)<0);){if((n|0)>0){r=s+-2-r|0,n=0;do ui(t)|0,n=n+1|0;while((n|0)!=(r|0))}if(r=w1(t)|0,r<<24>>24==-38){o=8;break}}(o|0)!=8&&(r=de(16)|0,f=0,n=g0(1)|0,o=f,f=0,!(o&1)&&(f=0,m0(7,r|0,5,n|0),o=f,f=0,!(o&1))&&Be(r|0,824,96),o=b()|0,ge(r|0),r0(o|0))}}function fn(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;r||((ui(t)|0)<<24>>24!=-1&&(r=de(16)|0,f=0,n=g0(1)|0,t=f,f=0,!(t&1)&&(f=0,m0(7,r|0,12,n|0),t=f,f=0,!(t&1))&&Be(r|0,824,96),t=b()|0,ge(r|0),r0(t|0)),(ui(t)|0)<<24>>24!=-38&&(r=de(16)|0,f=0,n=g0(1)|0,t=f,f=0,!(t&1)&&(f=0,m0(7,r|0,5,n|0),t=f,f=0,!(t&1))&&Be(r|0,824,96),t=b()|0,ge(r|0),r0(t|0))),ui(t)|0,ui(t)|0,n=ui(t)|0,s=n&255;do if(n<<24>>24==1)ui(t)|0,n=0,o=20;else{if((s|0)==(e[t+32>>2]|0))if(r=ui(t)|0,n<<24>>24){n=0,o=20;break}else break;r=de(16)|0,f=0,n=g0(1)|0,t=f,f=0,!(t&1)&&(f=0,m0(7,r|0,2,n|0),t=f,f=0,!(t&1))&&Be(r|0,824,96),t=b()|0,ge(r|0),r0(t|0)}while(!1);if((o|0)==20)for(;ui(t)|0,n=n+1|0,r=ui(t)|0,(n|0)!=(s|0);)o=20;e[t+36>>2]=r&255,o=ui(t)|0,n=t+40|0,e[n>>2]=o&255,(o&255)>=3&&(r=de(16)|0,f=0,n=g0(1)|0,t=f,f=0,!(t&1)&&(f=0,m0(7,r|0,5,n|0),t=f,f=0,!(t&1))&&Be(r|0,824,96),t=b()|0,ge(r|0),r0(t|0)),(ui(t)|0)<<24>>24&&(r=de(16)|0,f=0,n=g0(1)|0,t=f,f=0,!(t&1)&&(f=0,m0(7,r|0,5,n|0),t=f,f=0,!(t&1))&&Be(r|0,824,96),t=b()|0,ge(r|0),r0(t|0)),s=t+28|0,!(e[s>>2]|0)&&(r=e[t+108>>2]|0,r||(r=e[t+16>>2]|0),e[n>>2]|0?n=e[t+32>>2]|0:n=1,o=W(n,r)|0,t=W(o,((e[t+24>>2]|0)+7|0)/8|0)|0,e[s>>2]=t)}function lg(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(!((n|0)<=0)){C=r+4|0,I=r+8|0,U=0;do k=ui(t)|0,s=e[C>>2]|0,o=e[I>>2]|0,s>>>0>=o>>>0?(l=e[r>>2]|0,a=l,c=s-a+1|0,(c|0)<0&&(ct(r),a=e[r>>2]|0,o=e[I>>2]|0,l=a),g=l,s=o-g|0,s>>>0<1073741823?(s=s<<1,s=s>>>0>>0?c:s,c=e[C>>2]|0,o=c-g|0,s?B=10:(p=0,h=0,s=c)):(o=e[C>>2]|0,s=2147483647,c=o,o=o-g|0,B=10),(B|0)==10&&(B=0,p=s,h=G0(s)|0,s=c),d[h+o>>0]=k,g=s-g|0,k=h+(o-g)|0,ii(k|0,l|0,g|0)|0,e[r>>2]=k,e[C>>2]=h+(o+1),e[I>>2]=h+p,a&&a0(a)):(d[s>>0]=k,e[C>>2]=(e[C>>2]|0)+1),U=U+1|0;while((U|0)!=(n|0))}}function ui(t){t=t|0;var r=0,n=0,s=0,o=0;return n=e[t>>2]|0,n?(t=n+12|0,r=e[t>>2]|0,(r|0)==(e[n+16>>2]|0)?t=Se[e[(e[n>>2]|0)+40>>2]&127](n)|0:(e[t>>2]=r+1,t=N[r>>0]|0),o=t&255,o|0):(s=t+8|0,o=e[s>>2]|0,o?(t=t+4|0,r=e[t>>2]|0,n=d[r>>0]|0,r?(e[t>>2]=r+1,e[s>>2]=o+-1,o=n,o|0):(o=n,o|0)):(t=de(16)|0,f=0,r=g0(1)|0,o=f,f=0,o&1&&(o=b()|0,ge(t|0),r0(o|0)),f=0,m0(7,t|0,4,r|0),o=f,f=0,o&1?(o=b()|0,ge(t|0),r0(o|0)):Be(t|0,824,96),0))}function w1(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0;if(n=y,y=y+176|0,r=n+152|0,h=n+16|0,a=n,c=ui(t)|0,s=c&255,c<<24>>24==-1){do r=ui(t)|0;while(r<<24>>24==-1);return y=n,r|0}c=h+56|0,l=h+4|0,e[h>>2]=36160,e[c>>2]=36180,f=0,h0(62,h+56|0,l|0),o=f,f=0,o&1&&(h=b()|0,H0(c),r0(h|0)),e[h+128>>2]=0,e[h+132>>2]=-1,e[h>>2]=36200,e[h+56>>2]=36220,f=0,n0(180,l|0),o=f,f=0;do if(o&1)r=b()|0;else{if(e[l>>2]=36236,o=h+36|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[h+52>>2]=16,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,f=0,h0(63,l|0,r|0),n=f,f=0,n&1){h=b()|0,f0(r),f0(o),ce(l),r=h;break}f0(r),e[h+((e[(e[h>>2]|0)+-12>>2]|0)+76)>>2]=48,f=0,r=L0(28,h|0,50907,62)|0,n=f,f=0,!(n&1)&&(n=r+((e[(e[r>>2]|0)+-12>>2]|0)+4)|0,e[n>>2]=e[n>>2]&-75|8,n=r+((e[(e[r>>2]|0)+-12>>2]|0)+4)|0,e[n>>2]=e[n>>2]|16384,e[r+((e[(e[r>>2]|0)+-12>>2]|0)+12)>>2]=2,f=0,y0(38,r|0,s|0)|0,s=f,f=0,!(s&1))&&(n=de(16)|0,f=0,h0(64,a|0,l|0),s=f,f=0,s&1?r=b()|0:(f=0,r=g0(1)|0,s=f,f=0,!(s&1)&&(f=0,P0(36,n|0,12,r|0,a|0),s=f,f=0,!(s&1))?(f=0,m0(6,n|0,824,96),f=0,t=0):t=1,r=b()|0,f0(a),t||(a=r,e[h>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,f0(o),ce(l),H0(c),r0(a|0))),ge(n|0),a=r,e[h>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,f0(o),ce(l),H0(c),r0(a|0)),a=b()|0,e[h>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,f0(o),ce(l),H0(c),r0(a|0)}while(!1);return h=r,H0(c),r0(h|0),0}function ag(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;switch(n=y,y=y+320|0,c=n+300|0,g=n+152|0,h=n+288|0,C=n+16|0,p=n,r<<24>>24){case-9:return I=(ui(t)|0)&255,e[t+24>>2]=I,I=((ui(t)|0)&255)<<8|(ui(t)|0)&255,C=((ui(t)|0)&255)<<8|(ui(t)|0)&255,e[t+16>>2]=C,e[t+20>>2]=I,I=(ui(t)|0)&255,e[t+32>>2]=I,I=6,y=n,I|0;case-8:return I=fg(t)|0,y=n,I|0;case-24:return I=ug(t)|0,y=n,I|0;case-53:case-54:case-55:case-57:case-58:case-59:case-61:case-62:case-63:case-64:{a=g+56|0,o=g+4|0,e[g>>2]=36160,e[a>>2]=36180,f=0,h0(62,g+56|0,o|0),C=f,f=0,C&1&&(I=b()|0,H0(a),r0(I|0)),e[g+128>>2]=0,e[g+132>>2]=-1,e[g>>2]=36200,e[g+56>>2]=36220,f=0,n0(180,o|0),C=f,f=0;do if(C&1)t=b()|0;else{if(e[o>>2]=36236,l=g+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[g+52>>2]=16,e[c>>2]=0,e[c+4>>2]=0,e[c+8>>2]=0,f=0,h0(63,o|0,c|0),C=f,f=0,C&1){t=b()|0,f0(c),f0(l),ce(o);break}f0(c),f=0,t=L0(28,g|0,50970,26)|0,C=f,f=0;do if(!(C&1)&&(f=0,s=y0(38,t|0,r&255|0)|0,C=f,f=0,!(C&1))&&(f=0,L0(28,s|0,50997,18)|0,C=f,f=0,!(C&1))){if(s=de(16)|0,f=0,h0(64,h|0,o|0),C=f,f=0,C&1)t=b()|0;else if(f=0,t=g0(1)|0,C=f,f=0,!(C&1)&&(f=0,P0(36,s|0,10,t|0,h|0),C=f,f=0,!(C&1))?(f=0,m0(6,s|0,824,96),f=0,n=0):n=1,t=b()|0,f0(h),!n)break;ge(s|0)}else I=20;while(!1);(I|0)==20&&(t=b()|0),e[g>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),I=t,r0(I|0)}while(!1);I=t,H0(a),r0(I|0)}case-25:case-32:case-2:return I=0,y=n,I|0;default:{h=C+56|0,l=C+4|0,e[C>>2]=36160,e[h>>2]=36180,f=0,h0(62,C+56|0,l|0),g=f,f=0,g&1&&(I=b()|0,H0(h),r0(I|0)),e[C+128>>2]=0,e[C+132>>2]=-1,e[C>>2]=36200,e[C+56>>2]=36220,f=0,n0(180,l|0),g=f,f=0;do if(g&1)t=b()|0;else{if(e[l>>2]=36236,a=C+36|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[C+52>>2]=16,e[c>>2]=0,e[c+4>>2]=0,e[c+8>>2]=0,f=0,h0(63,l|0,c|0),g=f,f=0,g&1){t=b()|0,f0(c),f0(a),ce(l);break}f0(c),f=0,t=L0(28,C|0,51016,20)|0,g=f,f=0;do if(!(g&1)&&(f=0,o=y0(38,t|0,r&255|0)|0,g=f,f=0,!(g&1))&&(f=0,L0(28,o|0,51037,13)|0,g=f,f=0,!(g&1))){if(s=de(16)|0,f=0,h0(64,p|0,l|0),g=f,f=0,g&1)t=b()|0;else if(f=0,t=g0(1)|0,g=f,f=0,!(g&1)&&(f=0,P0(36,s|0,11,t|0,p|0),g=f,f=0,!(g&1))?(f=0,m0(6,s|0,824,96),f=0,n=0):n=1,t=b()|0,f0(p),!n)break;ge(s|0)}else I=40;while(!1);(I|0)==40&&(t=b()|0),e[C>>2]=36200,e[h>>2]=36220,e[l>>2]=36236,f0(a),ce(l),H0(h),I=t,r0(I|0)}while(!1);I=t,H0(h),r0(I|0)}}return 0}function fg(t){t=t|0;var r=0;return(ui(t)|0)<<24>>24!=1?(t=1,t|0):(r=((ui(t)|0)&255)<<8,r=r|(ui(t)|0)&255,e[t+52>>2]=r,r=((ui(t)|0)&255)<<8,r=r|(ui(t)|0)&255,e[t+56>>2]=r,r=((ui(t)|0)&255)<<8,r=r|(ui(t)|0)&255,e[t+60>>2]=r,r=((ui(t)|0)&255)<<8,r=r|(ui(t)|0)&255,e[t+64>>2]=r,r=((ui(t)|0)&255)<<8,r=r|(ui(t)|0)&255,e[t+68>>2]=r,t=11,t|0)}function ug(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;n=y,y=y+16|0,o=n,e[o>>2]=0,l=o+4|0,e[l>>2]=0,e[o+8>>2]=0,f=0,m0(9,t|0,o|0,4),r=f,f=0;e:do if(r&1)s=3;else{r=e[o>>2]|0;i:do if(Mp(r,51051,4)|0)t=4;else{if(f=0,r=u0(69,t|0)|0,a=f,f=0,a&1){s=3;break e}switch(r=r&255,r|0){case 3:case 2:case 1:case 0:{e[t+44>>2]=r,t=5,r=e[o>>2]|0;break i}case 5:case 4:{if(r=de(16)|0,f=0,t=g0(1)|0,a=f,f=0,!(a&1)&&(f=0,m0(7,r|0,7,t|0),a=f,f=0,!(a&1))){f=0,m0(6,r|0,824,96),f=0,s=3;break e}t=b()|0,ge(r|0);break e}default:{if(r=de(16)|0,f=0,t=g0(1)|0,a=f,f=0,!(a&1)&&(f=0,m0(7,r|0,5,t|0),a=f,f=0,!(a&1))){f=0,m0(6,r|0,824,96),f=0,s=3;break e}t=b()|0,ge(r|0);break e}}}while(!1);return r?((e[l>>2]|0)!=(r|0)&&(e[l>>2]=r),a0(r),y=n,t|0):(y=n,t|0)}while(!1);return(s|0)==3&&(t=b()|0),r=e[o>>2]|0,r||r0(t|0),(e[l>>2]|0)!=(r|0)&&(e[l>>2]=r),a0(r),r0(t|0),0}function cg(t){t=t|0;var r=0,n=0,s=0;s=e[(e[t>>2]|0)+-12>>2]|0,e[t+s>>2]=36200,r=t+(s+56)|0,e[r>>2]=36220,n=t+(s+4)|0,e[n>>2]=36236,f0(t+(s+36)|0),ce(n),H0(r)}function hg(t){t=t|0}function mg(t){t=t|0,a0(t)}function dg(t){t=t|0,d[t>>0]=0,t=t+4|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[t+20>>2]=0,e[t+24>>2]=0,e[t+28>>2]=0}function gg(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;if(o=y,y=y+16|0,l=o,r=Zd(r)|0,e[l>>2]=r,n=t+28|0,s=e[n>>2]|0,s>>>0<(e[t+32>>2]|0)>>>0){e[s>>2]=r,e[n>>2]=s+4,e[l>>2]=0,y=o;return}if(f=0,h0(57,t+24|0,l|0),t=f,f=0,t&1)r=b()|0,n=e[l>>2]|0,e[l>>2]=0,n||r0(r|0),Ce[e[(e[n>>2]|0)+4>>2]&255](n),r0(r|0);else{if(r=e[l>>2]|0,e[l>>2]=0,!r){y=o;return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),y=o;return}}function pg(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;if(s=t+4|0,e[s>>2]=e[r>>2],e[s+4>>2]=e[r+4>>2],e[s+8>>2]=e[r+8>>2],ot(t,-1),ot(t,-40),s=t+28|0,o=t+24|0,r=e[o>>2]|0,(e[s>>2]|0)==(r|0))return ot(t,-1),ot(t,-39),t=t+16|0,t=e[t>>2]|0,t|0;n=0;do l=e[r+(n<<2)>>2]|0,Ke[e[(e[l>>2]|0)+8>>2]&127](l,t),n=n+1|0,r=e[o>>2]|0;while(n>>>0<(e[s>>2]|0)-r>>2>>>0);return ot(t,-1),ot(t,-39),l=t+16|0,l=e[l>>2]|0,l|0}function Ag(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;C=y,y=y+48|0,c=C+32|0,o=C+12|0,h=C+8|0,g=C+4|0,I=C,s=n+36|0;do if(!(e[s>>2]|0)&&!(e[n+40>>2]|0)&&!(e[n+44>>2]|0)&&!(e[n+48>>2]|0)&&!(e[n+52>>2]|0)){if(s=e[n+8>>2]|0,(s|0)<=12){l=t+28|0,a=t+32|0;break}if(hi(o,(1<>2]|0),s=on(o)|0,e[h>>2]=s,l=t+28|0,o=e[l>>2]|0,a=t+32|0,o>>>0<(e[a>>2]|0)>>>0){e[o>>2]=s,e[l>>2]=o+4,e[h>>2]=0;break}if(f=0,h0(57,t+24|0,h|0),c=f,f=0,!(c&1)){if(s=e[h>>2]|0,e[h>>2]=0,!s)break;Ce[e[(e[s>>2]|0)+4>>2]&255](s);break}n=b()|0,s=e[h>>2]|0,e[h>>2]=0,s||(I=n,r0(I|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),I=n,r0(I|0)}else p=6;while(!1);do if((p|0)==6){if(s=on(s)|0,e[c>>2]=s,l=t+28|0,o=e[l>>2]|0,a=t+32|0,o>>>0<(e[a>>2]|0)>>>0){e[o>>2]=s,e[l>>2]=o+4,e[c>>2]=0;break}if(f=0,h0(57,t+24|0,c|0),p=f,f=0,!(p&1)){if(s=e[c>>2]|0,e[c>>2]=0,!s)break;Ce[e[(e[s>>2]|0)+4>>2]&255](s);break}n=b()|0,s=e[c>>2]|0,e[c>>2]=0,s||(I=n,r0(I|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),I=n,r0(I|0)}while(!1);s=t+20|0,o=(e[s>>2]|0)+1|0,e[s>>2]=o,s=e[n+24>>2]|0,c=s|0?e[n+16>>2]|0:1,s=Jd(o,c,e[n+20>>2]|0,s)|0,e[g>>2]=s,o=e[l>>2]|0;do if(o>>>0<(e[a>>2]|0)>>>0)e[o>>2]=s,e[l>>2]=o+4,e[g>>2]=0;else{if(f=0,h0(57,t+24|0,g|0),p=f,f=0,!(p&1)){if(s=e[g>>2]|0,e[g>>2]=0,!s)break;Ce[e[(e[s>>2]|0)+4>>2]&255](s);break}n=b()|0,s=e[g>>2]|0,e[g>>2]=0,s||(I=n,r0(I|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),I=n,r0(I|0)}while(!1);h=G0(104)|0,e[h>>2]=36820,e[h+4>>2]=c,o=h+8|0,e[o>>2]=e[r>>2],e[o+4>>2]=e[r+4>>2],e[o+8>>2]=e[r+8>>2],o=h+20|0,s=o+84|0;do e[o>>2]=e[n>>2],o=o+4|0,n=n+4|0;while((o|0)<(s|0));if(e[I>>2]=h,n=e[l>>2]|0,n>>>0<(e[a>>2]|0)>>>0){e[n>>2]=h,e[l>>2]=n+4,e[I>>2]=0,y=C;return}if(f=0,h0(57,t+24|0,I|0),t=f,f=0,t&1)n=b()|0,s=e[I>>2]|0,e[I>>2]=0,s||(I=n,r0(I|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),I=n,r0(I|0);else{if(n=e[I>>2]|0,e[I>>2]=0,!n){y=C;return}Ce[e[(e[n>>2]|0)+4>>2]&255](n),y=C;return}}function Sg(t,r,n,s,o,l,a,c,h,p,g){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0;var C=0,I=0,k=0,U=0,B=0,V=0,O=0;return k=y,y=y+96|0,I=k,C=cs(t,r,I,0)|0,C?(o=C,y=k,o|0):(d[I+32>>0]=0,B=e[I+8>>2]|0,O=e[I>>2]|0,V=e[I+4>>2]|0,C=W(V,O)|0,U=e[I+16>>2]|0,C=W(W(C,(B|0)<9?1:2)|0,U)|0,e[s>>2]=C,C=xi(C)|0,e[n>>2]=C,e[o>>2]=O,e[l>>2]=V,e[a>>2]=B,e[c>>2]=e[I+12>>2],e[h>>2]=U,e[p>>2]=e[I+20>>2],e[g>>2]=e[I+24>>2],o=hs(C,e[s>>2]|0,t,r,0,0)|0,y=k,o|0)}function vg(t,r,n,s,o,l,a,c,h){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0;var p=0,g=0,C=0,I=0;C=y,y=y+96|0,p=C+4|0,a=C,g=p,I=g+84|0;do e[g>>2]=0,g=g+4|0;while((g|0)<(I|0));return e[p+16>>2]=l,e[p+8>>2]=o,e[p>>2]=n,e[p+4>>2]=s,n=xi(r)|0,e[c>>2]=n,e[a>>2]=0,n=us(c,r,a,t,r,p,0)|0,e[h>>2]=e[a>>2],y=C,n|0}function Ft(t,r){t=t|0,r=r|0;var n=0;n=y,y=y+16|0,e[n>>2]=r,r=e[9320]|0,_n(r,t,n)|0,yp(10,r)|0,ae()}function tt(t){t=t|0,_1(51337,51366,1164,51442)}function ct(t){t=t|0,_1(51463,51486,303,51442)}function un(){var t=0,r=0;if(t=y,y=y+16|0,Qn(37024,4)|0)Ft(51562,t);else return r=Gn(e[9255]|0)|0,y=t,r|0;return 0}function G0(t){t=t|0;var r=0;r=t|0?t:1,t=xi(r)|0;e:do if(!t){for(;t=Dg()|0,!!t;)if(On[t&7](),t=xi(r)|0,t)break e;r=de(4)|0,e[r>>2]=36844,Be(r|0,592,78)}while(!1);return t|0}function a0(t){t=t|0,Ze(t)}function wg(t){t=t|0,a0(t)}function Tg(t){t=t|0,e[t>>2]=36844}function Cg(t){t=t|0}function xg(t){t=t|0,a0(t)}function yg(t){return t=t|0,51611}function cn(t){t=t|0;var r=0;r=y,y=y+16|0,f=0,we(t|0),t=f,f=0,t&1||(f=0,h0(85,51626,r|0),f=0),t=b(0)|0,zi(t|0)|0,f=0,h0(85,51666,r+8|0),f=0,t=b(0)|0,f=0,we(3),r=f,f=0,r&1?(r=b(0)|0,Ie(r)):Ie(t)}function Ig(){var t=0,r=0,n=0;f=0,t=g0(2)|0,n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),t|0&&(r=e[t>>2]|0,(r|0)!=0)&&(n=r+48|0,(e[n>>2]&-256|0)==1126902528?(e[n+4>>2]|0)==1129074247:0)&&cn(e[r+12>>2]|0),n=e[9208]|0,e[9208]=n+0,cn(n)}function Dg(){var t=0;return t=e[9214]|0,e[9214]=t+0,t|0}function uA(t){t=t|0}function Tr(t){t=t|0,e[t>>2]=36868,$g(t+4|0)}function Eg(t){t=t|0,Tr(t),a0(t)}function kg(t){return t=t|0,e[t+4>>2]|0}function cA(t){t=t|0}function Fg(t){t=t|0,e[t>>2]=36888}function Mg(t){t=t|0}function _g(t){t=t|0,a0(t)}function Rg(t){return t=t|0,51716}function Pg(t){t=t|0}function Lg(t){t=t|0}function Ug(t){t=t|0}function Og(t){t=t|0,a0(t)}function Ng(t){t=t|0,a0(t)}function Bg(t){t=t|0,a0(t)}function Vg(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;if(a=y,y=y+64|0,l=a,(t|0)!=(r|0))if(r|0&&(o=mn(r,656,672,0)|0,(o|0)!=0)){r=l,s=r+56|0;do e[r>>2]=0,r=r+4|0;while((r|0)<(s|0));e[l>>2]=o,e[l+8>>2]=t,e[l+12>>2]=-1,e[l+48>>2]=1,Pr[e[(e[o>>2]|0)+28>>2]&63](o,l,e[n>>2]|0,1),(e[l+24>>2]|0)==1?(e[n>>2]=e[l+16>>2],r=1):r=0}else r=0;else r=1;return y=a,r|0}function T1(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;t=r+16|0,o=e[t>>2]|0;do if(o){if((o|0)!=(n|0)){s=r+36|0,e[s>>2]=(e[s>>2]|0)+1,e[r+24>>2]=2,d[r+54>>0]=1;break}t=r+24|0,(e[t>>2]|0)==2&&(e[t>>2]=s)}else e[t>>2]=n,e[r+24>>2]=s,e[r+36>>2]=1;while(!1)}function qg(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,(t|0)==(e[r+8>>2]|0)&&T1(0,r,n,s)}function bg(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,(t|0)==(e[r+8>>2]|0)?T1(0,r,n,s):(t=e[t+8>>2]|0,Pr[e[(e[t>>2]|0)+28>>2]&63](t,r,n,s))}function hn(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;l=e[t+4>>2]|0,o=l>>8,l&1&&(o=e[(e[n>>2]|0)+o>>2]|0),t=e[t>>2]|0,Pr[e[(e[t>>2]|0)+28>>2]&63](t,r,n+o|0,l&2|0?s:2)}function Gg(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;e:do if((t|0)!=(e[r+8>>2]|0)){if(l=e[t+12>>2]|0,o=t+16+(l<<3)|0,hn(t+16|0,r,n,s),(l|0)>1){l=r+54|0,t=t+24|0;do{if(hn(t,r,n,s),d[l>>0]|0)break e;t=t+8|0}while(t>>>0>>0)}}else T1(0,r,n,s);while(!1)}function mn(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;k=y,y=y+64|0,I=k,C=e[t>>2]|0,g=t+(e[C+-8>>2]|0)|0,C=e[C+-4>>2]|0,e[I>>2]=n,e[I+4>>2]=t,e[I+8>>2]=r,e[I+12>>2]=s,s=I+16|0,t=I+20|0,r=I+24|0,o=I+28|0,l=I+32|0,a=I+40|0,c=(C|0)==(n|0),h=s,p=h+36|0;do e[h>>2]=0,h=h+4|0;while((h|0)<(p|0));E[s+36>>1]=0,d[s+38>>0]=0;e:do if(c)e[I+48>>2]=1,Bt[e[(e[n>>2]|0)+20>>2]&15](n,I,g,g,1,0),s=(e[r>>2]|0)==1?g:0;else{switch(_r[e[(e[C>>2]|0)+24>>2]&15](C,I,g,1,0),e[I+36>>2]|0){case 0:{s=(e[a>>2]|0)==1&(e[o>>2]|0)==1&(e[l>>2]|0)==1?e[t>>2]|0:0;break e}case 1:break;default:{s=0;break e}}if((e[r>>2]|0)!=1&&!((e[a>>2]|0)==0&(e[o>>2]|0)==1&(e[l>>2]|0)==1)){s=0;break}s=e[s>>2]|0}while(!1);return y=k,s|0}function C1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,d[r+53>>0]=1;do if((e[r+4>>2]|0)==(s|0)){if(d[r+52>>0]=1,s=r+16|0,t=e[s>>2]|0,!t){if(e[s>>2]=n,e[r+24>>2]=o,e[r+36>>2]=1,!((o|0)==1&&(e[r+48>>2]|0)==1))break;d[r+54>>0]=1;break}if((t|0)!=(n|0)){o=r+36|0,e[o>>2]=(e[o>>2]|0)+1,d[r+54>>0]=1;break}t=r+24|0,s=e[t>>2]|0,(s|0)==2&&(e[t>>2]=o,s=o),(s|0)==1&&(e[r+48>>2]|0)==1&&(d[r+54>>0]=1)}while(!1)}function Qg(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;e:do if((t|0)==(e[r+8>>2]|0))(e[r+4>>2]|0)==(n|0)&&(l=r+28|0,(e[l>>2]|0)!=1)&&(e[l>>2]=s);else{if((t|0)!=(e[r>>2]|0)){if(U=e[t+12>>2]|0,c=t+16+(U<<3)|0,Cr(t+16|0,r,n,s,o),l=t+24|0,(U|0)<=1)break;if(a=e[t+8>>2]|0,!(a&2|0)&&(h=r+36|0,(e[h>>2]|0)!=1)){if(!(a&1)){for(a=r+54|0;;)if(d[a>>0]|0||(e[h>>2]|0)==1||(Cr(l,r,n,s,o),l=l+8|0,l>>>0>=c>>>0))break e}for(a=r+24|0,t=r+54|0;;)if(d[t>>0]|0||(e[h>>2]|0)==1&&(e[a>>2]|0)==1||(Cr(l,r,n,s,o),l=l+8|0,l>>>0>=c>>>0))break e}for(a=r+54|0;;)if(d[a>>0]|0||(Cr(l,r,n,s,o),l=l+8|0,l>>>0>=c>>>0))break e}if((e[r+16>>2]|0)!=(n|0)&&(k=r+20|0,(e[k>>2]|0)!=(n|0))){if(e[r+32>>2]=s,g=r+44|0,(e[g>>2]|0)==4)break;a=e[t+12>>2]|0,c=t+16+(a<<3)|0,h=r+52|0,s=r+53|0,C=r+54|0,p=t+8|0,I=r+24|0;i:do if((a|0)>0)for(a=0,l=0,t=t+16|0;;){if(d[h>>0]=0,d[s>>0]=0,x1(t,r,n,n,1,o),d[C>>0]|0){U=20;break i}do if(d[s>>0]|0){if(!(d[h>>0]|0))if(e[p>>2]&1){l=1;break}else{l=1,U=20;break i}if((e[I>>2]|0)==1)break i;if(e[p>>2]&2)a=1,l=1;else break i}while(!1);if(t=t+8|0,t>>>0>=c>>>0){U=20;break}}else a=0,l=0,U=20;while(!1);do if((U|0)==20){if(!a&&(e[k>>2]=n,n=r+40|0,e[n>>2]=(e[n>>2]|0)+1,(e[r+36>>2]|0)==1)&&(e[I>>2]|0)==2){if(d[C>>0]=1,l)break}else U=24;if((U|0)==24&&l)break;e[g>>2]=4;break e}while(!1);e[g>>2]=3;break}(s|0)==1&&(e[r+32>>2]=1)}while(!1)}function x1(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;c=e[t+4>>2]|0,a=c>>8,c&1&&(a=e[(e[s>>2]|0)+a>>2]|0),t=e[t>>2]|0,Bt[e[(e[t>>2]|0)+20>>2]&15](t,r,n,s+a|0,c&2|0?o:2,l)}function Cr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;a=e[t+4>>2]|0,l=a>>8,a&1&&(l=e[(e[n>>2]|0)+l>>2]|0),t=e[t>>2]|0,_r[e[(e[t>>2]|0)+24>>2]&15](t,r,n+l|0,a&2|0?s:2,o)}function zg(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0;e:do if((t|0)==(e[r+8>>2]|0))(e[r+4>>2]|0)==(n|0)&&(l=r+28|0,(e[l>>2]|0)!=1)&&(e[l>>2]=s);else{if((t|0)!=(e[r>>2]|0)){c=e[t+8>>2]|0,_r[e[(e[c>>2]|0)+24>>2]&15](c,r,n,s,o);break}if((e[r+16>>2]|0)!=(n|0)&&(a=r+20|0,(e[a>>2]|0)!=(n|0))){if(e[r+32>>2]=s,s=r+44|0,(e[s>>2]|0)==4)break;l=r+52|0,d[l>>0]=0,h=r+53|0,d[h>>0]=0,t=e[t+8>>2]|0,Bt[e[(e[t>>2]|0)+20>>2]&15](t,r,n,n,1,o),d[h>>0]|0?d[l>>0]|0||(l=1,c=13):(l=0,c=13);do if((c|0)==13){if(e[a>>2]=n,h=r+40|0,e[h>>2]=(e[h>>2]|0)+1,(e[r+36>>2]|0)==1&&(e[r+24>>2]|0)==2){if(d[r+54>>0]=1,l)break}else c=16;if((c|0)==16&&l)break;e[s>>2]=4;break e}while(!1);e[s>>2]=3;break}(s|0)==1&&(e[r+32>>2]=1)}while(!1)}function Hg(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;do if((t|0)==(e[r+8>>2]|0))(e[r+4>>2]|0)==(n|0)&&(a=r+28|0,(e[a>>2]|0)!=1)&&(e[a>>2]=s);else if((t|0)==(e[r>>2]|0)){if((e[r+16>>2]|0)!=(n|0)&&(l=r+20|0,(e[l>>2]|0)!=(n|0))){e[r+32>>2]=s,e[l>>2]=n,o=r+40|0,e[o>>2]=(e[o>>2]|0)+1,(e[r+36>>2]|0)==1&&(e[r+24>>2]|0)==2&&(d[r+54>>0]=1),e[r+44>>2]=4;break}(s|0)==1&&(e[r+32>>2]=1)}while(!1)}function Yg(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if((t|0)==(e[r+8>>2]|0))C1(0,r,n,s,o);else{g=r+52|0,C=d[g>>0]|0,I=r+53|0,k=d[I>>0]|0,p=e[t+12>>2]|0,a=t+16+(p<<3)|0,d[g>>0]=0,d[I>>0]=0,x1(t+16|0,r,n,s,o,l);e:do if((p|0)>1){c=r+24|0,h=t+8|0,p=r+54|0,t=t+24|0;do{if(d[p>>0]|0)break e;if(d[g>>0]|0){if((e[c>>2]|0)==1||!(e[h>>2]&2))break e}else if(d[I>>0]|0&&!(e[h>>2]&1|0))break e;d[g>>0]=0,d[I>>0]=0,x1(t,r,n,s,o,l),t=t+8|0}while(t>>>0>>0)}while(!1);d[g>>0]=C,d[I>>0]=k}}function jg(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,(t|0)==(e[r+8>>2]|0)?C1(0,r,n,s,o):(t=e[t+8>>2]|0,Bt[e[(e[t>>2]|0)+20>>2]&15](t,r,n,s,o,l))}function Xg(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,(t|0)==(e[r+8>>2]|0)&&C1(0,r,n,s,o)}function Kg(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;return o=y,y=y+16|0,s=o,e[s>>2]=e[n>>2],t=Qe[e[(e[t>>2]|0)+16>>2]&63](t,r,s)|0,t&&(e[n>>2]=e[s>>2]),y=o,t&1|0}function Wg(t){return t=t|0,t?t=(mn(t,656,704,0)|0)!=0:t=0,t&1|0}function xr(){var t=0;t=de(4)|0,Tg(t),Be(t|0,592,78)}function Zg(){var t=0,r=0,n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+48|0,a=o+32|0,n=o+24|0,c=o+16|0,l=o,o=o+36|0,t=un()|0,t|0&&(s=e[t>>2]|0,(s|0)!=0)&&(t=s+48|0,r=e[t>>2]|0,t=e[t+4>>2]|0,(r&-256|0)==1126902528&(t|0)==1129074247||(e[n>>2]=e[9257],Ft(51919,n)),(r|0)==1126902529&(t|0)==1129074247?t=e[s+44>>2]|0:t=s+80|0,e[o>>2]=t,s=e[s>>2]|0,t=e[s+4>>2]|0,Qe[e[(e[152]|0)+16>>2]&63](608,s,o)|0?(c=e[o>>2]|0,o=e[9257]|0,c=Se[e[(e[c>>2]|0)+8>>2]&127](c)|0,e[l>>2]=o,e[l+4>>2]=t,e[l+8>>2]=c,Ft(51833,l)):(e[c>>2]=e[9257],e[c+4>>2]=t,Ft(51878,c))),Ft(51957,a)}function Jg(){var t=0;if(t=y,y=y+16|0,$i(37020,184)|0)Ft(51730,t);else{y=t;return}}function $g(t){t=t|0;var r=0,n=0;n=(e[t>>2]|0)+-4|0,r=e[n>>2]|0,e[n>>2]=r+-1,(r+-1|0)<0&&a0((e[t>>2]|0)+-12|0)}function ep(t){t=t|0;var r=0;if(r=y,y=y+16|0,Ze(t),jn(e[9255]|0,0)|0)Ft(51780,r);else{y=r;return}}function yr(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,t=Ep(t,r,n)|0,t|0}function dn(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,t=kp(t,r,n)|0,t|0}function ip(){return 37296}function tp(){return 37300}function rp(){return 37304}function Xt(t){return t=t|0,((t|0)==32|(t+-9|0)>>>0<5)&1|0}function np(t){return t=t|0,(t+-48|0)>>>0<10?t=1:t=((t|32)+-97|0)>>>0<6,t&1|0}function di(){var t=0;return e[9258]|0?(t=(P1()|0)+60|0,t=e[t>>2]|0):t=37308,t|0}function gn(t){t=t|0;var r=0,n=0;for(r=0;;){if((N[51978+r>>0]|0)==(t|0)){n=2;break}if(r=r+1|0,(r|0)==87){r=87,t=52066,n=5;break}}if((n|0)==2&&(r?(t=52066,n=5):t=52066),(n|0)==5)for(;;){for(n=t;t=n+1|0,d[n>>0]|0;)n=t;if(r=r+-1|0,r)n=5;else break}return t|0}function pn(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0;switch(ze=y,y=y+512|0,w0=ze,r|0){case 0:{Y0=24,A0=-149,M=4;break}case 1:{Y0=53,A0=-1074,M=4;break}case 2:{Y0=53,A0=-1074,M=4;break}default:s=0}e:do if((M|0)==4){t0=t+4|0,K=t+100|0;do r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0;while(Xt(r)|0);i:do switch(r|0){case 43:case 45:if(o=1-(((r|0)==45&1)<<1)|0,r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=r+1,r=N[r>>0]|0,v0=o;break i}else{r=si(t)|0,v0=o;break i}default:v0=1}while(!1);o=r,r=0;do{if((o|32|0)!=(d[53870+r>>0]|0))break;do if(r>>>0<7)if(o=e[t0>>2]|0,o>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=o+1,o=N[o>>0]|0;break}else{o=si(t)|0;break}while(!1);r=r+1|0}while(r>>>0<8);i:do switch(r|0){case 8:break;case 3:{M=23;break}default:{if(a=(n|0)!=0,a&r>>>0>3){if((r|0)==8)break i;M=23;break i}t:do if(!r){r=0;do{if((o|32|0)!=(d[56747+r>>0]|0))break t;do if(r>>>0<2)if(o=e[t0>>2]|0,o>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=o+1,o=N[o>>0]|0;break}else{o=si(t)|0;break}while(!1);r=r+1|0}while(r>>>0<3)}while(!1);switch(r|0){case 3:{if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,(r|0)==40)r=1;else{if(!(e[K>>2]|0)){s=d0;break e}e[t0>>2]=(e[t0>>2]|0)+-1,s=d0;break e}for(;o=e[t0>>2]|0,o>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=o+1,o=N[o>>0]|0):o=si(t)|0,!(!((o+-48|0)>>>0<10|(o+-65|0)>>>0<26)&&!((o|0)==95|(o+-97|0)>>>0<26));)r=r+1|0;if((o|0)==41){s=d0;break e}if(o=(e[K>>2]|0)==0,o||(e[t0>>2]=(e[t0>>2]|0)+-1),!a){Y0=di()|0,e[Y0>>2]=22,rt(t,0),s=0;break e}if(!r){s=d0;break e}for(;;)if(r=r+-1|0,o||(e[t0>>2]=(e[t0>>2]|0)+-1),!r){s=d0;break e}}case 0:{do if((o|0)==48){if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,(r|32|0)!=120){if(!(e[K>>2]|0)){r=48;break}e[t0>>2]=(e[t0>>2]|0)+-1,r=48;break}r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0,a=0):(r=si(t)|0,a=0);t:for(;;){switch(r|0){case 46:{M=74;break t}case 48:break;default:{_=0,c=0,O=0,o=0,p=a,g=0,V=0,h=1,a=0,s=0;break t}}if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=r+1,r=N[r>>0]|0,a=1;continue}else{r=si(t)|0,a=1;continue}}if((M|0)==74)if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,(r|0)==48){a=0,o=0;do r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,a=Li(a|0,o|0,-1,-1)|0,o=I0;while((r|0)==48);_=0,c=0,O=a,p=1,g=1,V=0,h=1,a=0,s=0}else _=0,c=0,O=0,o=0,p=a,g=1,V=0,h=1,a=0,s=0;for(;;){if(U=r+-48|0,C=r|32,U>>>0>=10){if(B=(r|0)==46,!(B|(C+-97|0)>>>0<6)){C=O,U=_;break}if(B)if(!g)B=c,o=_,U=_,g=1,C=V,l=h;else{C=O,U=_,r=46;break}else M=86}else M=86;if((M|0)==86){M=0,r=(r|0)>57?C+-87|0:U;do if((_|0)<0|(_|0)==0&c>>>0<8)C=V,l=h,a=r+(a<<4)|0;else{if((_|0)<0|(_|0)==0&c>>>0<14){k=h*.0625,C=V,l=k,s=s+k*+(r|0);break}(V|0)!=0|(r|0)==0?(C=V,l=h):(C=1,l=h,s=s+h*.5)}while(!1);c=Li(c|0,_|0,1,0)|0,B=O,U=I0,p=1}if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=r+1,_=U,O=B,r=N[r>>0]|0,V=C,h=l;continue}else{_=U,O=B,r=si(t)|0,V=C,h=l;continue}}if(!p){r=(e[K>>2]|0)==0,r||(e[t0>>2]=(e[t0>>2]|0)+-1),n?!r&&(F=e[t0>>2]|0,e[t0>>2]=F+-1,(g|0)!=0)&&(e[t0>>2]=F+-2):rt(t,0),s=+(v0|0)*0;break e}if(p=(g|0)==0,g=p?c:C,p=p?U:o,(U|0)<0|(U|0)==0&c>>>0<8){o=U;do a=a<<4,c=Li(c|0,o|0,1,0)|0,o=I0;while((o|0)<0|(o|0)==0&c>>>0<8)}if((r|32|0)==112){if(o=Un(t,n)|0,r=I0,(o|0)==0&(r|0)==-2147483648){if(!n){rt(t,0),s=0;break e}e[K>>2]|0?(e[t0>>2]=(e[t0>>2]|0)+-1,o=0,r=0):(o=0,r=0)}}else e[K>>2]|0?(e[t0>>2]=(e[t0>>2]|0)+-1,o=0,r=0):(o=0,r=0);if(w0=pi(g|0,p|0,2)|0,w0=Li(w0|0,I0|0,-32,-1)|0,r=Li(w0|0,I0|0,o|0,r|0)|0,o=I0,!a){s=+(v0|0)*0;break e}if((o|0)>0|(o|0)==0&r>>>0>(0-A0|0)>>>0){Y0=di()|0,e[Y0>>2]=34,s=+(v0|0)*17976931348623157e292*17976931348623157e292;break e}if(w0=A0+-106|0,s0=((w0|0)<0)<<31>>31,(o|0)<(s0|0)|(o|0)==(s0|0)&r>>>0>>0){Y0=di()|0,e[Y0>>2]=34,s=+(v0|0)*22250738585072014e-324*22250738585072014e-324;break e}if((a|0)>-1){do s0=!(s>=.5),w0=s0&1|a<<1,a=w0^1,s=s+(s0?s:s+-1),r=Li(r|0,o|0,-1,-1)|0,o=I0;while((w0|0)>-1);c=r,h=s}else c=r,h=s;r=Ji(32,0,A0|0,((A0|0)<0)<<31>>31|0)|0,r=Li(c|0,o|0,r|0,I0|0)|0,A0=I0,0>(A0|0)|(A0|0)==0&Y0>>>0>r>>>0?(r|0)<0?(r=0,M=127):M=125:(r=Y0,M=125),(M|0)==125&&((r|0)<53?M=127:(o=r,l=+(v0|0),s=0)),(M|0)==127&&(s=+(v0|0),o=r,l=s,s=+vn(+Ir(1,84-r|0),s)),Y0=(a&1|0)==0&(h!=0&(o|0)<32),s=l*(Y0?0:h)+(s+l*+(((Y0&1)+a|0)>>>0))-s,s==0&&(Y0=di()|0,e[Y0>>2]=34),s=+Cn(s,c);break e}else r=o;while(!1);Z=A0+Y0|0,s0=0-Z|0,a=0;t:for(;;){switch(r|0){case 46:{M=138;break t}case 48:break;default:{o=0,C=0,g=0;break t}}if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=r+1,r=N[r>>0]|0,a=1;continue}else{r=si(t)|0,a=1;continue}}if((M|0)==138)if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,(r|0)==48)for(o=0,r=0;;)if(o=Li(o|0,r|0,-1,-1)|0,a=I0,r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,(r|0)==48)r=a;else{C=a,a=1,g=1;break}else o=0,C=0,g=1;e[w0>>2]=0,p=r+-48|0,c=(r|0)==46;t:do if(c|p>>>0<10){X=w0+496|0,_=0,B=0,V=c,M=C,U=a,F=g,a=0,c=0,g=0;r:for(;;){do if(V)if(!F)o=_,C=B,F=1;else{C=M,r=_,p=B;break r}else{if(V=Li(_|0,B|0,1,0)|0,B=I0,O=(r|0)!=48,(c|0)>=125){if(!O){C=M,_=V;break}e[X>>2]=e[X>>2]|1,C=M,_=V;break}C=w0+(c<<2)|0,a&&(p=r+-48+((e[C>>2]|0)*10|0)|0),e[C>>2]=p,a=a+1|0,p=(a|0)==9,C=M,_=V,U=1,a=p?0:a,c=(p&1)+c|0,g=O?V:g}while(!1);if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,p=r+-48|0,V=(r|0)==46,V|p>>>0<10)M=C;else{p=F,M=161;break t}}U=(U|0)!=0,M=169}else _=0,B=0,U=a,p=g,a=0,c=0,g=0,M=161;while(!1);do if((M|0)==161){if(X=(p|0)==0,o=X?_:o,C=X?B:C,U=(U|0)!=0,!((r|32|0)==101&U))if((r|0)>-1){r=_,p=B,M=169;break}else{r=_,p=B,M=171;break}if(p=Un(t,n)|0,r=I0,(p|0)==0&(r|0)==-2147483648){if(!n){rt(t,0),s=0;break}e[K>>2]|0?(e[t0>>2]=(e[t0>>2]|0)+-1,p=0,r=0):(p=0,r=0)}o=Li(p|0,r|0,o|0,C|0)|0,U=_,C=I0,p=B,M=173}while(!1);(M|0)==169&&(e[K>>2]|0?(e[t0>>2]=(e[t0>>2]|0)+-1,U?(U=r,M=173):M=172):M=171),(M|0)==171&&(U?(U=r,M=173):M=172);do if((M|0)==172)Y0=di()|0,e[Y0>>2]=22,rt(t,0),s=0;else if((M|0)==173){if(r=e[w0>>2]|0,!r){s=+(v0|0)*0;break}if(((p|0)<0|(p|0)==0&U>>>0<10)&((o|0)==(U|0)&(C|0)==(p|0))&&Y0>>>0>30|(r>>>Y0|0)==0){s=+(v0|0)*+(r>>>0);break}if(t=(A0|0)/-2|0,t0=((t|0)<0)<<31>>31,(C|0)>(t0|0)|(C|0)==(t0|0)&o>>>0>t>>>0){Y0=di()|0,e[Y0>>2]=34,s=+(v0|0)*17976931348623157e292*17976931348623157e292;break}if(t=A0+-106|0,t0=((t|0)<0)<<31>>31,(C|0)<(t0|0)|(C|0)==(t0|0)&o>>>0>>0){Y0=di()|0,e[Y0>>2]=34,s=+(v0|0)*22250738585072014e-324*22250738585072014e-324;break}if(a){if((a|0)<9){p=w0+(c<<2)|0,r=e[p>>2]|0;do r=r*10|0,a=a+1|0;while((a|0)!=9);e[p>>2]=r}c=c+1|0}if((g|0)<9&&(g|0)<=(o|0)&(o|0)<18){if((o|0)==9){s=+(v0|0)*+((e[w0>>2]|0)>>>0);break}if((o|0)<9){s=+(v0|0)*+((e[w0>>2]|0)>>>0)/+(e[37312+(8-o<<2)>>2]|0);break}if(t=Y0+27+(W(o,-3)|0)|0,r=e[w0>>2]|0,(t|0)>30|(r>>>t|0)==0){s=+(v0|0)*+(r>>>0)*+(e[37312+(o+-10<<2)>>2]|0);break}}if(r=(o|0)%9|0,!r)a=0,r=0;else{if(U=(o|0)>-1?r:r+9|0,p=e[37312+(8-U<<2)>>2]|0,c){g=1e9/(p|0)|0,a=0,r=0,C=0;do K=w0+(C<<2)|0,t0=e[K>>2]|0,t=((t0>>>0)/(p>>>0)|0)+r|0,e[K>>2]=t,r=W((t0>>>0)%(p>>>0)|0,g)|0,t=(C|0)==(a|0)&(t|0)==0,C=C+1|0,o=t?o+-9|0:o,a=t?C&127:a;while((C|0)!=(c|0));r&&(e[w0+(c<<2)>>2]=r,c=c+1|0)}else a=0,c=0;r=0,o=9-U+o|0}t:for(;;){B=(o|0)<18,V=(o|0)==18,O=w0+(a<<2)|0;do{if(!B){if(!V)break t;if((e[O>>2]|0)>>>0>=9007199){o=18;break t}}for(p=0,g=c+127|0;U=g&127,C=w0+(U<<2)|0,g=pi(e[C>>2]|0,0,29)|0,g=Li(g|0,I0|0,p|0,0)|0,p=I0,p>>>0>0|(p|0)==0&g>>>0>1e9?(t=pr(g|0,p|0,1e9,0)|0,g=S1(g|0,p|0,1e9,0)|0,p=t):p=0,e[C>>2]=g,t=(U|0)==(a|0),c=(U|0)!=(c+127&127|0)|t||g|0?c:U,!t;)g=U+-1|0;r=r+-29|0}while(!(p|0));a=a+127&127,(a|0)==(c|0)&&(t=c+127&127,c=w0+((c+126&127)<<2)|0,e[c>>2]=e[c>>2]|e[w0+(t<<2)>>2],c=t),e[w0+(a<<2)>>2]=p,o=o+9|0}t:for(;;){for(_=c+1&127,O=w0+((c+127&127)<<2)|0;;){for(B=(o|0)==18,V=(o|0)>27?9:1,U=B^1;;){g=a&127,C=(g|0)==(c|0);do if(C)M=219;else{if(p=e[w0+(g<<2)>>2]|0,p>>>0<9007199){M=219;break}if(p>>>0>9007199)break;if(p=a+1&127,(p|0)==(c|0)){M=219;break}if(p=e[w0+(p<<2)>>2]|0,p>>>0<254740991){M=219;break}if(!(p>>>0>254740991|U)){o=g;break t}}while(!1);if((M|0)==219&&(M=0,B)){M=220;break t}if(r=r+V|0,(a|0)==(c|0))a=c;else break}for(U=(1<>>V,g=a,p=0,C=a;t0=w0+(C<<2)|0,t=e[t0>>2]|0,a=(t>>>V)+p|0,e[t0>>2]=a,p=W(t&U,B)|0,a=(C|0)==(g|0)&(a|0)==0,C=C+1&127,o=a?o+-9|0:o,a=a?C:g,(C|0)!=(c|0);)g=a;if(p){if((_|0)!=(a|0))break;e[O>>2]=e[O>>2]|1}}e[w0+(c<<2)>>2]=p,c=_}(M|0)==220&&(C?(e[w0+(_+-1<<2)>>2]=0,o=c,c=_):o=g),s=+((e[w0+(o<<2)>>2]|0)>>>0),o=a+1&127,(o|0)==(c|0)&&(c=a+2&127,e[w0+(c+-1<<2)>>2]=0),k=+(v0|0),l=k*(s*1e9+ +((e[w0+(o<<2)>>2]|0)>>>0)),B=r+53|0,C=B-A0|0,U=(C|0)<(Y0|0),o=U&1,g=U?(C|0)<0?0:C:Y0,(g|0)<53?(Re=+vn(+Ir(1,105-g|0),l),h=+wn(l,+Ir(1,53-g|0)),I=Re,s=h,h=Re+(l-h)):(I=0,s=0,h=l),p=a+2&127;do if((p|0)==(c|0))l=s;else{p=e[w0+(p<<2)>>2]|0;do if(p>>>0>=5e8){if(p>>>0>5e8){s=k*.75+s;break}if((a+3&127|0)==(c|0)){s=k*.5+s;break}else{s=k*.75+s;break}}else{if(!(p|0)&&(a+3&127|0)==(c|0))break;s=k*.25+s}while(!1);if((53-g|0)<=1){l=s;break}if(+wn(s,1)!=0){l=s;break}l=s+1}while(!1);s=h+l-I;do if((B&2147483647|0)>(-2-Z|0)){if(+x0(+s)>=9007199254740992&&(o=U&(g|0)==(C|0)?0:o,r=r+1|0,s=s*.5),(r+50|0)<=(s0|0)&&!(l!=0&(o|0)!=0))break;Y0=di()|0,e[Y0>>2]=34}while(!1);s=+Cn(s,r)}while(!1);break e}default:{e[K>>2]|0&&(e[t0>>2]=(e[t0>>2]|0)+-1),Y0=di()|0,e[Y0>>2]=22,rt(t,0),s=0;break e}}}}while(!1);if((M|0)==23&&(o=(e[K>>2]|0)==0,o||(e[t0>>2]=(e[t0>>2]|0)+-1),(n|0)!=0&r>>>0>3))do o||(e[t0>>2]=(e[t0>>2]|0)+-1),r=r+-1|0;while(r>>>0>3);s=+(v0|0)*S0}while(!1);return y=ze,+s}function An(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;e:do if(r>>>0>36)o=di()|0,e[o>>2]=22,o=0,s=0;else{U=t+4|0,k=t+100|0;do l=e[U>>2]|0,l>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0;while(Xt(l)|0);i:do switch(l|0){case 43:case 45:if(a=((l|0)==45)<<31>>31,l=e[U>>2]|0,l>>>0<(e[k>>2]|0)>>>0){e[U>>2]=l+1,l=N[l>>0]|0,I=a;break i}else{l=si(t)|0,I=a;break i}default:I=0}while(!1);a=(r|0)==0;do if((r&-17|0)==0&(l|0)==48){if(l=e[U>>2]|0,l>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,(l|32|0)!=120)if(a){r=8,g=46;break}else{g=32;break}if(r=e[U>>2]|0,r>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=r+1,l=N[r>>0]|0):l=si(t)|0,(N[53879+(l+1)>>0]|0)>15){if(s=(e[k>>2]|0)==0,s||(e[U>>2]=(e[U>>2]|0)+-1),!n){rt(t,0),o=0,s=0;break e}if(s){o=0,s=0;break e}e[U>>2]=(e[U>>2]|0)+-1,o=0,s=0;break e}else r=16,g=46}else if(r=a?10:r,(N[53879+(l+1)>>0]|0)>>>0>>0)g=32;else{e[k>>2]|0&&(e[U>>2]=(e[U>>2]|0)+-1),rt(t,0),o=di()|0,e[o>>2]=22,o=0,s=0;break e}while(!1);if((g|0)==32)if((r|0)==10){if(r=l+-48|0,r>>>0<10){for(l=0;;)if(a=(l*10|0)+r|0,r=e[U>>2]|0,r>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=r+1,l=N[r>>0]|0):l=si(t)|0,r=l+-48|0,r>>>0<10&a>>>0<429496729)l=a;else{r=a;break}a=0}else r=0,a=0;if(n=l+-48|0,n>>>0<10){for(;;){if(c=Ht(r|0,a|0,10,0)|0,h=I0,p=((n|0)<0)<<31>>31,C=~p,h>>>0>C>>>0|(h|0)==(C|0)&c>>>0>~n>>>0){c=r;break}if(r=Li(c|0,h|0,n|0,p|0)|0,a=I0,l=e[U>>2]|0,l>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,n=l+-48|0,!(n>>>0<10&(a>>>0<429496729|(a|0)==429496729&r>>>0<2576980378))){c=r;break}}n>>>0>9?(l=c,r=I):(r=10,g=72)}else l=r,r=I}else g=46;i:do if((g|0)==46){if(!(r+-1&r)){if(g=d[54136+((r*23|0)>>>5&7)>>0]|0,a=d[53879+(l+1)>>0]|0,n=a&255,n>>>0>>0){for(l=0;c=n|l<>2]|0,l>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,a=d[53879+(l+1)>>0]|0,n=a&255,c>>>0<134217728&n>>>0>>0;)l=c;n=0}else n=0,c=0;if(h=Dt(-1,-1,g|0)|0,p=I0,(a&255)>>>0>=r>>>0|(n>>>0>p>>>0|(n|0)==(p|0)&c>>>0>h>>>0)){a=n,g=72;break}else l=n;for(;;)if(c=pi(c|0,l|0,g|0)|0,n=I0,c=a&255|c,l=e[U>>2]|0,l>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,a=d[53879+(l+1)>>0]|0,(a&255)>>>0>=r>>>0|(n>>>0>p>>>0|(n|0)==(p|0)&c>>>0>h>>>0)){a=n,g=72;break i}else l=n}if(a=d[53879+(l+1)>>0]|0,n=a&255,n>>>0>>0){for(l=0;c=n+(W(l,r)|0)|0,l=e[U>>2]|0,l>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,a=d[53879+(l+1)>>0]|0,n=a&255,c>>>0<119304647&n>>>0>>0;)l=c;n=0}else c=0,n=0;if((a&255)>>>0>>0)for(g=pr(-1,-1,r|0,0)|0,C=I0,p=n;;){if(p>>>0>C>>>0|(p|0)==(C|0)&c>>>0>g>>>0){a=p,g=72;break i}if(n=Ht(c|0,p|0,r|0,0)|0,h=I0,a=a&255,h>>>0>4294967295|(h|0)==-1&n>>>0>~a>>>0){a=p,g=72;break i}if(c=Li(a|0,0,n|0,h|0)|0,n=I0,l=e[U>>2]|0,l>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,a=d[53879+(l+1)>>0]|0,(a&255)>>>0>=r>>>0){a=n,g=72;break}else p=n}else a=n,g=72}while(!1);if((g|0)==72)if((N[53879+(l+1)>>0]|0)>>>0>>0){do l=e[U>>2]|0,l>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0;while((N[53879+(l+1)>>0]|0)>>>0>>0);a=di()|0,e[a>>2]=34,a=o,l=s,r=(s&1|0)==0&!0?I:0}else l=c,r=I;if(e[k>>2]|0&&(e[U>>2]=(e[U>>2]|0)+-1),!(a>>>0>>0|(a|0)==(o|0)&l>>>0>>0)){if(!((s&1|0)!=0|!1|(r|0)!=0)){U=di()|0,e[U>>2]=34,s=Li(s|0,o|0,-1,-1)|0,o=I0;break}if(a>>>0>o>>>0|(a|0)==(o|0)&l>>>0>s>>>0){U=di()|0,e[U>>2]=34;break}}s=((r|0)<0)<<31>>31,s=Ji(l^r|0,a^s|0,r|0,s|0)|0,o=I0}while(!1);return I0=o,s|0}function rt(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;e[t+104>>2]=r,n=e[t+4>>2]|0,s=e[t+8>>2]|0,o=s-n|0,e[t+108>>2]=o,(r|0)!=0&(o|0)>(r|0)?e[t+100>>2]=n+r:e[t+100>>2]=s}function si(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;return n=t+104|0,l=e[n>>2]|0,l|0&&(e[t+108>>2]|0)>=(l|0)?a=4:(r=y1(t)|0,(r|0)>=0?(o=e[n>>2]|0,n=t+8|0,o?(s=e[n>>2]|0,l=e[t+4>>2]|0,n=s,o=o-(e[t+108>>2]|0)+-1|0,(n-l|0)>(o|0)?e[t+100>>2]=l+o:a=9):(s=e[n>>2]|0,n=s,a=9),(a|0)==9&&(e[t+100>>2]=n),n=e[t+4>>2]|0,s&&(t=t+108|0,e[t>>2]=s+1-n+(e[t>>2]|0)),n=n+-1|0,(N[n>>0]|0|0)!=(r|0)&&(d[n>>0]=r)):a=4),(a|0)==4&&(e[t+100>>2]=0,r=-1),r|0}function Kt(t){t=t|0;var r=0;return t>>>0>4294963200&&(r=di()|0,e[r>>2]=0-t,t=-1),t|0}function hA(t){return t=t|0,0}function sp(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,s|0}function Sn(t,r){return t=t|0,r=r|0,-1}function op(t){t=t|0,Ze(t)}function lp(t,r){return t=t|0,r=r|0,(t+-48|0)>>>0<10|0}function ap(t,r){return t=t|0,r=r|0,np(t)|0}function fp(t,r,n){return t=t|0,r=r|0,n=n|0,d[r>>0]|0&&Ln(r,58885)|0&&Ln(r,54145)|0?n=0:n||(n=vh(1,4)|0),n|0}function nt(t){t=t|0;var r=0,n=0;return r=(P1()|0)+176|0,n=e[r>>2]|0,t&&(e[r>>2]=t),n|0}function up(t,r){t=+t,r=+r;var n=0,s=0;return H[G>>3]=t,s=e[G>>2]|0,n=e[G+4>>2]|0,H[G>>3]=r,n=e[G+4>>2]&-2147483648|n&2147483647,e[G>>2]=s,e[G+4>>2]=n,+ +H[G>>3]}function vn(t,r){return t=+t,r=+r,+ +up(t,r)}function cp(t,r){t=+t,r=+r;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;H[G>>3]=t,n=e[G>>2]|0,p=e[G+4>>2]|0,H[G>>3]=r,g=e[G>>2]|0,C=e[G+4>>2]|0,s=Dt(n|0,p|0,52)|0,s=s&2047,c=Dt(g|0,C|0,52)|0,c=c&2047,I=p&-2147483648,a=pi(g|0,C|0,1)|0,h=I0;e:do if(!((a|0)==0&(h|0)==0)&&(l=C&2147483647,!(l>>>0>2146435072|(l|0)==2146435072&g>>>0>0|(s|0)==2047))){if(o=pi(n|0,p|0,1)|0,l=I0,!(l>>>0>h>>>0|(l|0)==(h|0)&o>>>0>a>>>0))return+((o|0)==(a|0)&(l|0)==(h|0)?t*0:t);if(s)o=p&1048575|1048576;else{if(s=pi(n|0,p|0,12)|0,o=I0,(o|0)>-1|(o|0)==-1&s>>>0>4294967295){l=s,s=0;do s=s+-1|0,l=pi(l|0,o|0,1)|0,o=I0;while((o|0)>-1|(o|0)==-1&l>>>0>4294967295)}else s=0;n=pi(n|0,p|0,1-s|0)|0,o=I0}if(c)p=C&1048575|1048576;else{if(l=pi(g|0,C|0,12)|0,a=I0,(a|0)>-1|(a|0)==-1&l>>>0>4294967295){c=0;do c=c+-1|0,l=pi(l|0,a|0,1)|0,a=I0;while((a|0)>-1|(a|0)==-1&l>>>0>4294967295)}else c=0;g=pi(g|0,C|0,1-c|0)|0,p=I0}h=Ji(n|0,o|0,g|0,p|0)|0,a=I0,l=(a|0)>-1|(a|0)==-1&h>>>0>4294967295;i:do if((s|0)>(c|0)){for(;;){if(l){if((n|0)==(g|0)&(o|0)==(p|0))break;n=h,o=a}if(n=pi(n|0,o|0,1)|0,o=I0,s=s+-1|0,h=Ji(n|0,o|0,g|0,p|0)|0,a=I0,l=(a|0)>-1|(a|0)==-1&h>>>0>4294967295,(s|0)<=(c|0))break i}r=t*0;break e}while(!1);if(l)if((n|0)==(g|0)&(o|0)==(p|0)){r=t*0;break}else o=a,n=h;if(o>>>0<1048576|(o|0)==1048576&n>>>0<0)do n=pi(n|0,o|0,1)|0,o=I0,s=s+-1|0;while(o>>>0<1048576|(o|0)==1048576&n>>>0<0);(s|0)>0?(C=Li(n|0,o|0,0,-1048576)|0,n=I0,s=pi(s|0,0,52)|0,n=n|I0,s=C|s):(s=Dt(n|0,o|0,1-s|0)|0,n=I0),e[G>>2]=s,e[G+4>>2]=n|I,r=+H[G>>3]}else k=3;while(!1);return(k|0)==3&&(r=t*r,r=r/r),+r}function wn(t,r){return t=+t,r=+r,+ +cp(t,r)}function Tn(t,r){t=+t,r=r|0;var n=0,s=0,o=0;switch(H[G>>3]=t,n=e[G>>2]|0,s=e[G+4>>2]|0,o=Dt(n|0,s|0,52)|0,o=o&2047,o|0){case 0:{t!=0?(t=+Tn(t*18446744073709552e3,r),n=(e[r>>2]|0)+-64|0):n=0,e[r>>2]=n;break}case 2047:break;default:e[r>>2]=o+-1022,e[G>>2]=n,e[G+4>>2]=s&-2146435073|1071644672,t=+H[G>>3]}return+t}function hp(t,r){return t=+t,r=r|0,+ +Tn(t,r)}function Ir(t,r){t=+t,r=r|0;var n=0;return(r|0)>1023?(t=t*898846567431158e293,n=r+-1023|0,(n|0)>1023&&(n=r+-2046|0,n=(n|0)>1023?1023:n,t=t*898846567431158e293)):(r|0)<-1022?(t=t*22250738585072014e-324,n=r+1022|0,(n|0)<-1022&&(n=r+2044|0,n=(n|0)<-1022?-1022:n,t=t*22250738585072014e-324)):n=r,n=pi(n+1023|0,0,52)|0,r=I0,e[G>>2]=n,e[G+4>>2]=r,+(t*+H[G>>3])}function Cn(t,r){return t=+t,r=r|0,+ +Ir(t,r)}function mp(t,r,n){return t=t|0,r=r|0,n=n|0,Dr(0,t,r,n|0?n:37344)|0}function Dr(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0;h=y,y=y+16|0,o=h,a=s|0?s:37348,s=e[a>>2]|0;e:do if(!r)s?c=15:s=0;else if(l=t|0?t:o,!n)s=-2;else{if(s)o=n,c=9;else{if(s=d[r>>0]|0,o=s&255,s<<24>>24>-1){e[l>>2]=o,s=s<<24>>24!=0&1;break}if(s=o+-194|0,s>>>0>50){c=15;break}s=e[37076+(s<<2)>>2]|0,o=n+-1|0,o&&(r=r+1|0,c=9)}i:do if((c|0)==9){if(t=d[r>>0]|0,p=(t&255)>>>3,(p+-16|p+(s>>26))>>>0>7){c=15;break e}for(;r=r+1|0,s=(t&255)+-128|s<<6,o=o+-1|0,!((s|0)>=0);){if(!o)break i;if(t=d[r>>0]|0,(t&-64)<<24>>24!=-128){c=15;break e}}e[a>>2]=0,e[l>>2]=s,s=n-o|0;break e}while(!1);e[a>>2]=s,s=-2}while(!1);return(c|0)==15&&(e[a>>2]=0,s=di()|0,e[s>>2]=84,s=-1),y=h,s|0}function dp(t){return t=t|0,t?t=(e[t>>2]|0)==0:t=1,t&1|0}function gp(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;I=y,y=y+1040|0,p=I+8|0,C=I,h=e[r>>2]|0,e[C>>2]=h,g=(t|0)!=0,s=g?s:256,t=g?t:p,l=h;e:do if((s|0)!=0&(h|0)!=0){for(c=s,h=l,s=0;;){if(l=n>>>2,a=l>>>0>=c>>>0,!(n>>>0>131|a)){l=h;break e}if(l=a?c:l,n=n-l|0,l=xn(t,C,l,o)|0,(l|0)==-1){s=n;break}if(k=(t|0)==(p|0),h=k?0:l,a=c-h|0,t=k?t:t+(l<<2)|0,s=l+s|0,l=e[C>>2]|0,(c|0)!=(h|0)&(l|0)!=0)c=a,h=l;else{c=a;break e}}n=s,c=0,l=e[C>>2]|0,s=-1}else c=s,s=0;while(!1);e:do if(l|0&&(c|0)!=0&(n|0)!=0){for(a=l,l=t;t=Dr(l,a,n,o)|0,!((t+2|0)>>>0<3);)if(a=(e[C>>2]|0)+t|0,e[C>>2]=a,c=c+-1|0,s=s+1|0,(c|0)!=0&(n|0)!=(t|0))n=n-t|0,l=l+4|0;else break e;switch(t|0){case-1:{s=-1;break e}case 0:{e[C>>2]=0;break e}default:{e[o>>2]=0;break e}}}while(!1);return g&&(e[r>>2]=e[C>>2]),y=I,s|0}function xn(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0;o=e[r>>2]|0,s|0&&(l=e[s>>2]|0,(l|0)!=0)?t?(e[s>>2]=0,h=t,s=n,c=l,p=37):(s=n,a=o,p=16):t?(l=t,s=n,p=6):(s=n,p=7);e:for(;;)if((p|0)==6){if(s)t=l;else{p=26;break}for(;;){l=d[o>>0]|0;do if(((l&255)+-1|0)>>>0<127&&s>>>0>4&(o&3|0)==0){for(a=o;;){if(o=e[a>>2]|0,(o+-16843009|o)&-2139062144){l=o,o=a,p=32;break}if(e[t>>2]=o&255,e[t+4>>2]=N[a+1>>0],e[t+8>>2]=N[a+2>>0],o=a+4|0,l=t+16|0,e[t+12>>2]=N[a+3>>0],s=s+-4|0,s>>>0>4)t=l,a=o;else{p=31;break}}if((p|0)==31){t=l,l=d[o>>0]|0;break}else if((p|0)==32){l=l&255;break}}while(!1);if(l=l&255,(l+-1|0)>>>0>=127)break;if(o=o+1|0,e[t>>2]=l,s=s+-1|0,s)t=t+4|0;else{p=26;break e}}if(l=l+-194|0,l>>>0>50){p=48;break}h=t,c=e[37076+(l<<2)>>2]|0,o=o+1|0,p=37;continue}else if((p|0)==7){if(l=d[o>>0]|0,((l&255)+-1|0)>>>0<127&&!(o&3|0)){if(l=e[o>>2]|0,!((l+-16843009|l)&-2139062144))do o=o+4|0,s=s+-4|0,l=e[o>>2]|0;while(!((l+-16843009|l)&-2139062144|0));l=l&255}if(l=l&255,(l+-1|0)>>>0<127){s=s+-1|0,o=o+1|0,p=7;continue}if(l=l+-194|0,l>>>0>50){p=48;break}l=e[37076+(l<<2)>>2]|0,a=o+1|0,p=16;continue}else if((p|0)==16){if(p=(N[a>>0]|0)>>>3,(p+-16|p+(l>>26))>>>0>7){p=17;break}if(o=a+1|0,l&33554432){if((d[o>>0]&-64)<<24>>24!=-128){p=20;break}if(o=a+2|0,l&524288){if((d[o>>0]&-64)<<24>>24!=-128){p=23;break}o=a+3|0}}s=s+-1|0,p=7;continue}else if((p|0)==37){if(l=N[o>>0]|0,p=l>>>3,(p+-16|p+(c>>26))>>>0>7){p=38;break}if(a=o+1|0,t=l+-128|c<<6,(t|0)<0){if(l=N[a>>0]|0,(l&192|0)!=128){p=41;break}if(a=o+2|0,t=l+-128|t<<6,(t|0)<0){if(l=N[a>>0]|0,(l&192|0)!=128){p=44;break}t=l+-128|t<<6,o=o+3|0}else o=a}else o=a;e[h>>2]=t,l=h+4|0,s=s+-1|0,p=6;continue}return(p|0)==17||(p|0)==20||(p|0)==23?(o=a+-1|0,p=47):(p|0)==26?e[r>>2]=o:(p|0)==38?(t=h,l=c,o=o+-1|0,p=47):((p|0)==41||(p|0)==44)&&(s=h,n=o+-1|0,p=52),(p|0)==47&&(l?(s=t,n=o,p=52):p=48),(p|0)==48&&(d[o>>0]|0?(s=t,n=o,p=52):(t&&(e[t>>2]=0,e[r>>2]=0),n=n-s|0)),(p|0)==52&&(p=di()|0,e[p>>2]=84,s&&(e[r>>2]=n),n=-1),n|0}function pp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;a=y,y=y+16|0,s=a;e:do if(!r)s=0;else{do if(n){if(l=t|0?t:s,s=d[r>>0]|0,t=s&255,s<<24>>24>-1){e[l>>2]=t,s=s<<24>>24!=0&1;break e}if(s=t+-194|0,s>>>0<=50){if(t=r+1|0,o=e[37076+(s<<2)>>2]|0,n>>>0<4&&o&-2147483648>>>((n*6|0)+-6|0)|0)break;if(s=N[t>>0]|0,n=s>>>3,(n+-16|n+(o>>26))>>>0<=7){if(s=s+-128|o<<6,(s|0)>=0){e[l>>2]=s,s=2;break e}if(t=N[r+2>>0]|0,(t&192|0)==128){if(t=t+-128|s<<6,(t|0)>=0){e[l>>2]=t,s=3;break e}if(s=N[r+3>>0]|0,(s&192|0)==128){e[l>>2]=s+-128|t<<6,s=4;break e}}}}}while(!1);s=di()|0,e[s>>2]=84,s=-1}while(!1);return y=a,s|0}function Ut(t,r,n){t=t|0,r=r|0,n=n|0;do if(t){if(r>>>0<128){d[t>>0]=r,t=1;break}if(r>>>0<2048){d[t>>0]=r>>>6|192,d[t+1>>0]=r&63|128,t=2;break}if(r>>>0<55296|(r&-8192|0)==57344){d[t>>0]=r>>>12|224,d[t+1>>0]=r>>>6&63|128,d[t+2>>0]=r&63|128,t=3;break}if((r+-65536|0)>>>0<1048576){d[t>>0]=r>>>18|240,d[t+1>>0]=r>>>12&63|128,d[t+2>>0]=r>>>6&63|128,d[t+3>>0]=r&63|128,t=4;break}else{t=di()|0,e[t>>2]=84,t=-1;break}}else t=1;while(!1);return t|0}function Ap(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;g=y,y=y+272|0,c=g+8|0,p=g,a=e[r>>2]|0,e[p>>2]=a,h=(t|0)!=0,o=h?s:256,s=h?t:c,t=a;e:do if((o|0)!=0&(a|0)!=0){for(a=o,l=t,o=0;;){if(t=n>>>0>=a>>>0,!(t|n>>>0>32)){t=l;break e}if(t=t?a:n,n=n-t|0,t=Sp(s,p,t,0)|0,(t|0)==-1){o=n;break}if(I=(s|0)==(c|0),C=I?0:t,l=a-C|0,s=I?s:s+t|0,o=t+o|0,t=e[p>>2]|0,(a|0)!=(C|0)&(t|0)!=0)a=l,l=t;else{a=l;break e}}n=o,a=0,t=e[p>>2]|0,o=-1}else a=o,o=0;while(!1);e:do if(t|0&&(a|0)!=0&(n|0)!=0){for(l=t,t=s;s=Ut(t,e[l>>2]|0,0)|0,!((s+1|0)>>>0<2);)if(l=(e[p>>2]|0)+4|0,e[p>>2]=l,n=n+-1|0,o=o+1|0,(a|0)!=(s|0)&(n|0)!=0)a=a-s|0,t=t+s|0;else break e;s?o=-1:e[p>>2]=0}while(!1);return h&&(e[r>>2]=e[p>>2]),y=g,o|0}function Sp(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0;c=y,y=y+16|0,a=c;e:do if(t){i:do if(n>>>0>3){for(s=n,o=e[r>>2]|0;;){if(l=e[o>>2]|0,(l+-1|0)>>>0>126){if(!l)break;if(l=Ut(t,l,0)|0,(l|0)==-1){n=-1;break e}t=t+l|0,s=s-l|0}else d[t>>0]=l,t=t+1|0,s=s+-1|0,o=e[r>>2]|0;if(o=o+4|0,e[r>>2]=o,s>>>0<=3)break i}d[t>>0]=0,e[r>>2]=0,n=n-s|0;break e}else s=n;while(!1);if(s){for(o=e[r>>2]|0;;){if(l=e[o>>2]|0,(l+-1|0)>>>0>126){if(!l){o=19;break}if(l=Ut(a,l,0)|0,(l|0)==-1){n=-1;break e}if(s>>>0>>0){o=22;break}Ut(t,e[o>>2]|0,0)|0,t=t+l|0,s=s-l|0}else d[t>>0]=l,t=t+1|0,s=s+-1|0,o=e[r>>2]|0;if(o=o+4|0,e[r>>2]=o,!s)break e}if((o|0)==19){d[t>>0]=0,e[r>>2]=0,n=n-s|0;break}else if((o|0)==22){n=n-s|0;break}}}else if(t=e[r>>2]|0,s=e[t>>2]|0,!s)n=0;else{n=0;do{if(s>>>0>127){if(s=Ut(a,s,0)|0,(s|0)==-1){n=-1;break e}}else s=1;n=s+n|0,t=t+4|0,s=e[t>>2]|0}while(s|0)}while(!1);return y=c,n|0}function yn(t,r){return t=t|0,r=r|0,t?t=Ut(t,r,0)|0:t=0,t|0}function Mt(t){return t=t|0,0}function ht(t){t=t|0}function In(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;h=y,y=y+16|0,c=h,a=r&255,d[c>>0]=a,s=t+16|0,o=e[s>>2]|0,o?l=4:kn(t)|0?n=-1:(o=e[s>>2]|0,l=4);do if((l|0)==4){if(s=t+20|0,l=e[s>>2]|0,l>>>0>>0&&(n=r&255,(n|0)!=(d[t+75>>0]|0))){e[s>>2]=l+1,d[l>>0]=a;break}(Qe[e[t+36>>2]&63](t,c,1)|0)==1?n=N[c>>0]|0:n=-1}while(!1);return y=h,n|0}function vp(t){t=t|0;var r=0,n=0;return r=y,y=y+16|0,n=r,e[n>>2]=e[t+60>>2],t=Kt(Xn(6,n|0)|0)|0,y=r,t|0}function wp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;return p=y,y=y+48|0,l=p+16|0,o=p,s=p+32|0,e[s>>2]=r,a=s+4|0,h=t+48|0,g=e[h>>2]|0,e[a>>2]=n-((g|0)!=0&1),c=t+44|0,e[s+8>>2]=e[c>>2],e[s+12>>2]=g,e[9258]|0?(N1(185,t|0),e[o>>2]=e[t+60>>2],e[o+4>>2]=s,e[o+8>>2]=2,s=Kt(V1(145,o|0)|0)|0,U1(0)):(e[l>>2]=e[t+60>>2],e[l+4>>2]=s,e[l+8>>2]=2,s=Kt(V1(145,l|0)|0)|0),(s|0)>=1?(a=e[a>>2]|0,s>>>0>a>>>0&&(l=e[c>>2]|0,o=t+4|0,e[o>>2]=l,e[t+8>>2]=l+(s-a),e[h>>2]|0&&(e[o>>2]=l+1,d[r+(n+-1)>>0]=d[l>>0]|0),s=n)):(e[t>>2]=e[t>>2]|s&48^16,e[t+8>>2]=0,e[t+4>>2]=0),y=p,s|0}function Tp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;return o=y,y=y+32|0,l=o,s=o+20|0,e[l>>2]=e[t+60>>2],e[l+4>>2]=0,e[l+8>>2]=r,e[l+12>>2]=s,e[l+16>>2]=n,(Kt(Zn(140,l|0)|0)|0)<0?(e[s>>2]=-1,t=-1):t=e[s>>2]|0,y=o,t|0}function Dn(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;for(U=y,y=y+48|0,C=U+16|0,g=U,s=U+32|0,I=t+28|0,o=e[I>>2]|0,e[s>>2]=o,k=t+20|0,o=(e[k>>2]|0)-o|0,e[s+4>>2]=o,e[s+8>>2]=r,e[s+12>>2]=n,h=t+60|0,p=t+44|0,r=2,o=o+n|0;;){if(e[9258]|0?(N1(186,t|0),e[g>>2]=e[h>>2],e[g+4>>2]=s,e[g+8>>2]=r,a=Kt(q1(146,g|0)|0)|0,U1(0)):(e[C>>2]=e[h>>2],e[C+4>>2]=s,e[C+8>>2]=r,a=Kt(q1(146,C|0)|0)|0),(o|0)==(a|0)){o=6;break}if((a|0)<0){o=8;break}o=o-a|0,l=e[s+4>>2]|0,a>>>0<=l>>>0?(r|0)==2?(e[I>>2]=(e[I>>2]|0)+a,c=l,r=2):c=l:(c=e[p>>2]|0,e[I>>2]=c,e[k>>2]=c,c=e[s+12>>2]|0,a=a-l|0,s=s+8|0,r=r+-1|0),e[s>>2]=(e[s>>2]|0)+a,e[s+4>>2]=c-a}return(o|0)==6?(C=e[p>>2]|0,e[t+16>>2]=C+(e[t+48>>2]|0),t=C,e[I>>2]=t,e[k>>2]=t):(o|0)==8&&(e[t+16>>2]=0,e[I>>2]=0,e[k>>2]=0,e[t>>2]=e[t>>2]|32,(r|0)==2?n=0:n=n-(e[s+4>>2]|0)|0),y=U,n|0}function Cp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;return o=y,y=y+80|0,s=o,e[t+36>>2]=8,!(e[t>>2]&64|0)&&(e[s>>2]=e[t+60>>2],e[s+4>>2]=21505,e[s+8>>2]=o+12,(zn(54,s|0)|0)!=0)&&(d[t+75>>0]=-1),s=Dn(t,r,n)|0,y=o,s|0}function xp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return s=t+84|0,l=e[s>>2]|0,a=n+256|0,o=Pn(l,0,a)|0,o=o|0?o-l|0:a,n=o>>>0>>0?o:n,ii(r|0,l|0,n|0)|0,e[t+4>>2]=l+n,r=l+o|0,e[t+8>>2]=r,e[s>>2]=r,n|0}function En(t){t=t|0;var r=0,n=0;return r=t+74|0,n=d[r>>0]|0,d[r>>0]=n+255|n,r=t+20|0,n=t+44|0,(e[r>>2]|0)>>>0>(e[n>>2]|0)>>>0&&Qe[e[t+36>>2]&63](t,0,0)|0,e[t+16>>2]=0,e[t+28>>2]=0,e[r>>2]=0,r=e[t>>2]|0,r&20?(r&4&&(e[t>>2]=r|32),r=-1):(r=e[n>>2]|0,e[t+8>>2]=r,e[t+4>>2]=r,r=0),r|0}function kn(t){t=t|0;var r=0,n=0;return r=t+74|0,n=d[r>>0]|0,d[r>>0]=n+255|n,r=e[t>>2]|0,r&8?(e[t>>2]=r|32,r=-1):(e[t+8>>2]=0,e[t+4>>2]=0,r=e[t+44>>2]|0,e[t+28>>2]=r,e[t+20>>2]=r,e[t+16>>2]=r+(e[t+48>>2]|0),r=0),r|0}function y1(t){t=t|0;var r=0,n=0;return n=y,y=y+16|0,r=n,!(e[t+8>>2]|0)&&En(t)|0?r=-1:(Qe[e[t+32>>2]&63](t,r,1)|0)==1?r=N[r>>0]|0:r=-1,y=n,r|0}function I1(t){t=t|0;var r=0,n=0;do if(t){if((e[t+76>>2]|0)<=-1){r=k1(t)|0;break}n=(Mt(t)|0)==0,r=k1(t)|0,n||ht(t)}else{if(e[9323]|0?r=I1(e[9323]|0)|0:r=0,Fi(37060),t=e[9264]|0,t)do(e[t+76>>2]|0)>-1?n=Mt(t)|0:n=0,(e[t+20>>2]|0)>>>0>(e[t+28>>2]|0)>>>0&&(r=k1(t)|0|r),n&&ht(t),t=e[t+56>>2]|0;while(t|0);Hn(37060)}while(!1);return r|0}function yp(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0;(e[r+76>>2]|0)>=0&&Mt(r)|0?((d[r+75>>0]|0)!=(t|0)&&(s=r+20|0,o=e[s>>2]|0,o>>>0<(e[r+16>>2]|0)>>>0)?(e[s>>2]=o+1,d[o>>0]=t,n=t&255):n=In(r,t)|0,ht(r)):a=3;do if((a|0)==3){if((d[r+75>>0]|0)!=(t|0)&&(l=r+20|0,n=e[l>>2]|0,n>>>0<(e[r+16>>2]|0)>>>0)){e[l>>2]=n+1,d[n>>0]=t,n=t&255;break}n=In(r,t)|0}while(!1);return n|0}function Ui(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;s=n+16|0,o=e[s>>2]|0,o?l=4:kn(n)|0?s=0:(o=e[s>>2]|0,l=4);e:do if((l|0)==4){if(a=n+20|0,l=e[a>>2]|0,(o-l|0)>>>0>>0){s=Qe[e[n+36>>2]&63](n,t,r)|0;break}i:do if((d[n+75>>0]|0)>-1){for(s=r;;){if(!s){o=l,s=0;break i}if(o=s+-1|0,(d[t+o>>0]|0)==10)break;s=o}if((Qe[e[n+36>>2]&63](n,t,s)|0)>>>0>>0)break e;r=r-s|0,t=t+s|0,o=e[a>>2]|0}else o=l,s=0;while(!1);ii(o|0,t|0,r|0)|0,e[a>>2]=(e[a>>2]|0)+r,s=s+r|0}while(!1);return s|0}function dt(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;return o=W(n,r)|0,(e[s+76>>2]|0)>-1?(l=(Mt(s)|0)==0,t=Ui(t,o,s)|0,l||ht(s)):t=Ui(t,o,s)|0,(t|0)!=(o|0)&&(n=(t>>>0)/(r>>>0)|0),n|0}function Er(t){t=t|0;var r=0,n=0,s=0;(e[t+76>>2]|0)>=0&&Mt(t)|0?(r=t+4|0,n=e[r>>2]|0,n>>>0<(e[t+8>>2]|0)>>>0?(e[r>>2]=n+1,r=N[n>>0]|0):r=y1(t)|0):s=3;do if((s|0)==3)if(r=t+4|0,n=e[r>>2]|0,n>>>0<(e[t+8>>2]|0)>>>0){e[r>>2]=n+1,r=N[n>>0]|0;break}else{r=y1(t)|0;break}while(!1);return r|0}function Fn(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;return o=y,y=y+16|0,l=o,e[l>>2]=s,s=Fr(t,r,n,l)|0,y=o,s|0}function Mn(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;return s=y,y=y+16|0,o=s,e[o>>2]=n,n=Rn(t,r,o)|0,y=s,n|0}function kr(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;do if((t|0)!=-1){if((e[r+76>>2]|0)>-1?o=Mt(r)|0:o=0,!(e[r+8>>2]|0)&&En(r)|0||(l=6),(l|0)==6&&(n=r+4|0,s=e[n>>2]|0,s>>>0>((e[r+44>>2]|0)+-8|0)>>>0)){if(l=s+-1|0,e[n>>2]=l,d[l>>0]=t,e[r>>2]=e[r>>2]&-17,!o)break;ht(r);break}o&&ht(r),t=-1}else t=-1;while(!1);return t|0}function Ip(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;c=y,y=y+16|0,s=c,o=xi(240)|0;do if(o){if(e[s>>2]=e[n>>2],s=Fr(o,240,r,s)|0,s>>>0<240){r=bt(o,s+1|0)|0,e[t>>2]=r|0?r:o;break}Ze(o),(s|0)>=0&&(a=s+1|0,l=xi(a)|0,e[t>>2]=l,(l|0)!=0)?s=Fr(l,a,r,n)|0:s=-1}else s=-1;while(!1);return y=c,s|0}function _n(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;B=y,y=y+224|0,C=B+80|0,U=B+96|0,k=B,I=B+136|0,s=U,o=s+40|0;do e[s>>2]=0,s=s+4|0;while((s|0)<(o|0));return e[C>>2]=e[n>>2],(s1(0,r,C,k,U)|0)<0?n=-1:((e[t+76>>2]|0)>-1?p=Mt(t)|0:p=0,n=e[t>>2]|0,g=n&32,(d[t+74>>0]|0)<1&&(e[t>>2]=n&-33),n=t+48|0,e[n>>2]|0?s=s1(t,r,C,k,U)|0:(o=t+44|0,l=e[o>>2]|0,e[o>>2]=I,a=t+28|0,e[a>>2]=I,c=t+20|0,e[c>>2]=I,e[n>>2]=80,h=t+16|0,e[h>>2]=I+80,s=s1(t,r,C,k,U)|0,l&&(Qe[e[t+36>>2]&63](t,0,0)|0,s=e[c>>2]|0?s:-1,e[o>>2]=l,e[n>>2]=0,e[h>>2]=0,e[a>>2]=0,e[c>>2]=0)),n=e[t>>2]|0,e[t>>2]=n|g,p&&ht(t),n=n&32|0?-1:s),y=B,n|0}function Dp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,ei=0,We=0,_e=0;We=y,y=y+304|0,s0=We+16|0,v0=We+8|0,w0=We+33|0,A0=We,O=We+32|0,(e[t+76>>2]|0)>-1?ei=Mt(t)|0:ei=0,s=d[r>>0]|0;e:do if(s<<24>>24){Y0=t+4|0,ze=t+100|0,Z=t+108|0,_=t+8|0,F=w0+10|0,M=w0+33|0,X=v0+4|0,K=w0+46|0,t0=w0+94|0,l=s,s=0,a=r,C=0,o=0,r=0;i:for(;;){t:do if(Xt(l&255)|0){for(;l=a+1|0,Xt(N[l>>0]|0)|0;)a=l;rt(t,0);do l=e[Y0>>2]|0,l>>>0<(e[ze>>2]|0)>>>0?(e[Y0>>2]=l+1,l=N[l>>0]|0):l=si(t)|0;while(Xt(l)|0);l=e[Y0>>2]|0,e[ze>>2]|0&&(l=l+-1|0,e[Y0>>2]=l),c=(e[Z>>2]|0)+C+l-(e[_>>2]|0)|0}else{l=(d[a>>0]|0)==37;r:do if(l){p=a+1|0,c=d[p>>0]|0;n:do switch(c<<24>>24){case 37:break r;case 42:{V=0,c=a+2|0;break}default:{if(c=(c&255)+-48|0,c>>>0<10&&(d[a+2>>0]|0)==36){for(e[s0>>2]=e[n>>2];V=(e[s0>>2]|0)+3&-4,l=e[V>>2]|0,e[s0>>2]=V+4,c>>>0>1;)c=c+-1|0;V=l,c=a+3|0;break n}c=(e[n>>2]|0)+3&-4,V=e[c>>2]|0,e[n>>2]=c+4,c=p}}while(!1);if(l=d[c>>0]|0,a=l&255,(a+-48|0)>>>0<10)for(l=0;p=(l*10|0)+-48+a|0,c=c+1|0,l=d[c>>0]|0,a=l&255,!((a+-48|0)>>>0>=10);)l=p;else p=0;switch(l<<24>>24==109?(c=c+1|0,g=d[c>>0]|0,l=(V|0)!=0&1,o=0,r=0):(g=l,l=0),a=c+1|0,g&255|0){case 104:{B=(d[a>>0]|0)==104,a=B?c+2|0:a,c=B?-2:-1;break}case 108:{B=(d[a>>0]|0)==108,a=B?c+2|0:a,c=B?3:1;break}case 106:{c=3;break}case 116:case 122:{c=1;break}case 76:{c=2;break}case 110:case 112:case 67:case 83:case 91:case 99:case 115:case 88:case 71:case 70:case 69:case 65:case 103:case 102:case 101:case 97:case 120:case 117:case 111:case 105:case 100:{a=c,c=0;break}default:{Re=152;break i}}switch(g=N[a>>0]|0,I=(g&47|0)==3,g=I?g|32:g,I=I?1:c,g|0){case 99:{B=C,U=(p|0)<1?1:p;break}case 91:{B=C,U=p;break}case 110:{if(!V){c=C;break t}switch(I|0){case-2:{d[V>>0]=C,c=C;break t}case-1:{E[V>>1]=C,c=C;break t}case 0:{e[V>>2]=C,c=C;break t}case 1:{e[V>>2]=C,c=C;break t}case 3:{c=V,e[c>>2]=C,e[c+4>>2]=((C|0)<0)<<31>>31,c=C;break t}default:{c=C;break t}}}default:{rt(t,0);do c=e[Y0>>2]|0,c>>>0<(e[ze>>2]|0)>>>0?(e[Y0>>2]=c+1,c=N[c>>0]|0):c=si(t)|0;while(Xt(c)|0);c=e[Y0>>2]|0,e[ze>>2]|0&&(c=c+-1|0,e[Y0>>2]=c),B=(e[Z>>2]|0)+C+c-(e[_>>2]|0)|0,U=p}}if(rt(t,U),c=e[Y0>>2]|0,p=e[ze>>2]|0,c>>>0

>>0)e[Y0>>2]=c+1;else{if((si(t)|0)<0){Re=152;break i}p=e[ze>>2]|0}p&&(e[Y0>>2]=(e[Y0>>2]|0)+-1);n:do switch(g|0){case 91:case 99:case 115:{k=(g|0)==99;s:do if((g&239|0)==99)je(w0|0,-1,257)|0,d[w0>>0]=0,(g|0)==115&&(d[M>>0]=0,d[F>>0]=0,d[F+1>>0]=0,d[F+2>>0]=0,d[F+3>>0]=0,d[F+4>>0]=0);else{switch(_e=a+1|0,C=(d[_e>>0]|0)==94,c=C&1,g=C?_e:a,a=C?a+2|0:_e,je(w0|0,C&1|0,257)|0,d[w0>>0]=0,d[a>>0]|0){case 45:{C=(c^1)&255,d[K>>0]=C,a=g+2|0;break}case 93:{C=(c^1)&255,d[t0>>0]=C,a=g+2|0;break}default:C=(c^1)&255}for(;;){c=d[a>>0]|0;o:do switch(c<<24>>24){case 0:{Re=152;break i}case 93:break s;case 45:{switch(g=a+1|0,c=d[g>>0]|0,c<<24>>24){case 93:case 0:{c=45;break o}default:}if(a=d[a+-1>>0]|0,(a&255)<(c&255)){a=a&255;do a=a+1|0,d[w0+a>>0]=C,c=d[g>>0]|0;while((a|0)<(c&255|0));a=g}else a=g;break}default:}while(!1);d[w0+((c&255)+1)>>0]=C,a=a+1|0}}while(!1);g=k?U+1|0:31,C=(I|0)==1,I=(l|0)!=0;s:do if(C){if(I){if(r=xi(g<<2)|0,!r){o=0,Re=152;break i}}else r=V;e[v0>>2]=0,e[X>>2]=0,o=0;o:for(;;){p=(r|0)==0;do{l:for(;;){if(c=e[Y0>>2]|0,c>>>0<(e[ze>>2]|0)>>>0?(e[Y0>>2]=c+1,c=N[c>>0]|0):c=si(t)|0,!(d[w0+(c+1)>>0]|0))break o;switch(d[O>>0]=c,Dr(A0,O,1,v0)|0){case-1:{o=0,Re=152;break i}case-2:break;default:break l}}p||(e[r+(o<<2)>>2]=e[A0>>2],o=o+1|0)}while(!(I&(o|0)==(g|0)));if(o=g<<1|1,c=bt(r,o<<2)|0,!c){o=0,Re=152;break i}_e=g,g=o,r=c,o=_e}if(dp(v0)|0)p=o,o=0;else{o=0,Re=152;break i}}else{if(I){if(o=xi(g)|0,o)c=0;else{o=0,r=0,Re=152;break i}for(;;){do{if(r=e[Y0>>2]|0,r>>>0<(e[ze>>2]|0)>>>0?(e[Y0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,!(d[w0+(r+1)>>0]|0)){p=c,r=0;break s}d[o+c>>0]=r,c=c+1|0}while((c|0)!=(g|0));if(r=g<<1|1,c=bt(o,r)|0,c)_e=g,g=r,o=c,c=_e;else{r=0,Re=152;break i}}}if(V)for(o=0;;){if(r=e[Y0>>2]|0,r>>>0

>>0?(e[Y0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,!(d[w0+(r+1)>>0]|0)){p=o,o=V,r=0;break s}d[V+o>>0]=r,p=e[ze>>2]|0,o=o+1|0}else for(o=p;;){if(r=e[Y0>>2]|0,r>>>0>>0?(e[Y0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,!(d[w0+(r+1)>>0]|0)){p=0,o=0,r=0;break s}o=e[ze>>2]|0}}while(!1);if(c=e[Y0>>2]|0,e[ze>>2]|0&&(c=c+-1|0,e[Y0>>2]=c),c=c-(e[_>>2]|0)+(e[Z>>2]|0)|0,!c||!((c|0)==(U|0)|k^1))break i;do if(I)if(C){e[V>>2]=r;break}else{e[V>>2]=o;break}while(!1);if(!k){if(r&&(e[r+(p<<2)>>2]=0),!o){o=0;break n}d[o+p>>0]=0}break}case 120:case 88:case 112:{c=16,Re=134;break}case 111:{c=8,Re=134;break}case 117:case 100:{c=10,Re=134;break}case 105:{c=0,Re=134;break}case 71:case 103:case 70:case 102:case 69:case 101:case 65:case 97:{if(h=+pn(t,I,0),(e[Z>>2]|0)==((e[_>>2]|0)-(e[Y0>>2]|0)|0))break i;if(V)switch(I|0){case 0:{e0[V>>2]=h;break n}case 1:{H[V>>3]=h;break n}case 2:{H[V>>3]=h;break n}default:break n}break}default:}while(!1);n:do if((Re|0)==134){if(Re=0,c=An(t,c,0,-1,-1)|0,(e[Z>>2]|0)==((e[_>>2]|0)-(e[Y0>>2]|0)|0))break i;if((V|0)!=0&(g|0)==112){e[V>>2]=c;break}if(V)switch(I|0){case-2:{d[V>>0]=c;break n}case-1:{E[V>>1]=c;break n}case 0:{e[V>>2]=c;break n}case 1:{e[V>>2]=c;break n}case 3:{_e=V,e[_e>>2]=c,e[_e+4>>2]=I0;break n}default:break n}}while(!1);s=((V|0)!=0&1)+s|0,c=(e[Z>>2]|0)+B+(e[Y0>>2]|0)-(e[_>>2]|0)|0;break t}while(!1);if(a=a+(l&1)|0,rt(t,0),l=e[Y0>>2]|0,l>>>0<(e[ze>>2]|0)>>>0?(e[Y0>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,(l|0)!=(N[a>>0]|0)){Re=21;break i}c=C+1|0}while(!1);if(a=a+1|0,l=d[a>>0]|0,l<<24>>24)C=c;else break e}if((Re|0)==21){if(e[ze>>2]|0&&(e[Y0>>2]=(e[Y0>>2]|0)+-1),(s|0)!=0|(l|0)>-1)break;s=0,Re=153}else(Re|0)==152&&(s||(s=l,Re=153));(Re|0)==153&&(l=s,s=-1),l&&(Ze(o),Ze(r))}else s=0;while(!1);return ei&&ht(t),y=We,s|0}function Fr(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;g=y,y=y+128|0,o=g+112|0,p=g,l=p,a=37352,c=l+112|0;do e[l>>2]=e[a>>2],l=l+4|0,a=a+4|0;while((l|0)<(c|0));return(r+-1|0)>>>0>2147483646?r?(r=di()|0,e[r>>2]=75,r=-1):(r=1,h=4):(o=t,h=4),(h|0)==4&&(h=-2-o|0,h=r>>>0>h>>>0?h:r,e[p+48>>2]=h,t=p+20|0,e[t>>2]=o,e[p+44>>2]=o,r=o+h|0,o=p+16|0,e[o>>2]=r,e[p+28>>2]=r,r=_n(p,n,s)|0,h&&(n=e[t>>2]|0,d[n+(((n|0)==(e[o>>2]|0))<<31>>31)>>0]=0)),y=g,r|0}function Rn(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;l=y,y=y+112|0,s=l,o=s,a=o+112|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));return e[s+32>>2]=29,e[s+44>>2]=t,e[s+76>>2]=-1,e[s+84>>2]=t,a=Dp(s,r,n)|0,y=l,a|0}function D1(t,r,n){return t=t|0,r=r|0,n=n|0,+ +Ah(t,r,2)}function Ep(t,r,n){return t=t|0,r=r|0,n=n|0,t=k2(t,r,n,-1,-1)|0,t|0}function kp(t,r,n){return t=t|0,r=r|0,n=n|0,t=k2(t,r,n,0,-2147483648)|0,t|0}function Pn(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;l=r&255,s=(n|0)!=0;e:do if(s&(t&3|0)!=0)for(o=r&255;;){if((d[t>>0]|0)==o<<24>>24){a=6;break e}if(t=t+1|0,n=n+-1|0,s=(n|0)!=0,!(s&(t&3|0)!=0)){a=5;break}}else a=5;while(!1);(a|0)==5&&(s?a=6:n=0);e:do if((a|0)==6&&(o=r&255,(d[t>>0]|0)!=o<<24>>24)){s=W(l,16843009)|0;i:do if(n>>>0>3){for(;l=e[t>>2]^s,!((l&-2139062144^-2139062144)&l+-16843009);)if(t=t+4|0,n=n+-4|0,n>>>0<=3){a=11;break i}}else a=11;while(!1);if((a|0)==11&&!n){n=0;break}for(;;){if((d[t>>0]|0)==o<<24>>24)break e;if(t=t+1|0,n=n+-1|0,!n){n=0;break}}}while(!1);return(n|0?t:0)|0}function Fp(t,r){t=t|0,r=r|0;var n=0,s=0;n=r;e:do if((n^t)&3)s=8;else{if(n&3)do{if(n=d[r>>0]|0,d[t>>0]=n,!(n<<24>>24))break e;r=r+1|0,t=t+1|0}while(r&3|0);if(n=e[r>>2]|0,!((n&-2139062144^-2139062144)&n+-16843009))for(s=t;r=r+4|0,t=s+4|0,e[s>>2]=n,n=e[r>>2]|0,!((n&-2139062144^-2139062144)&n+-16843009);)s=t;s=8}while(!1);if((s|0)==8&&(s=d[r>>0]|0,d[t>>0]=s,s<<24>>24))do r=r+1|0,t=t+1|0,s=d[r>>0]|0,d[t>>0]=s;while(s<<24>>24);return t|0}function Ln(t,r){t=t|0,r=r|0;var n=0,s=0;if(s=d[t>>0]|0,n=d[r>>0]|0,!(s<<24>>24)||s<<24>>24!=n<<24>>24)r=s;else{do t=t+1|0,r=r+1|0,s=d[t>>0]|0,n=d[r>>0]|0;while(!(!(s<<24>>24)||s<<24>>24!=n<<24>>24));r=s}return(r&255)-(n&255)|0}function E1(t,r){return t=t|0,r=r|0,Fp(t,r)|0,t|0}function Ot(t){t=t|0;var r=0,n=0,s=0;s=t;e:do if(!(s&3))n=4;else for(r=t,t=s;;){if(!(d[r>>0]|0))break e;if(r=r+1|0,t=r,!(t&3)){t=r,n=4;break}}while(!1);if((n|0)==4){for(;r=e[t>>2]|0,!((r&-2139062144^-2139062144)&r+-16843009);)t=t+4|0;if((r&255)<<24>>24)do t=t+1|0;while(d[t>>0]|0)}return t-s|0}function Mp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;if(!n)r=0;else{s=d[t>>0]|0;e:do if(!(s<<24>>24))s=0;else for(;;){if(n=n+-1|0,o=d[r>>0]|0,!(s<<24>>24==o<<24>>24&((n|0)!=0&o<<24>>24!=0)))break e;if(t=t+1|0,r=r+1|0,s=d[t>>0]|0,!(s<<24>>24)){s=0;break}}while(!1);r=(s&255)-(N[r>>0]|0)|0}return r|0}function Mr(t){t=t|0;var r=0;for(r=t;e[r>>2]|0;)r=r+4|0;return r-t>>2|0}function Nt(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if(n)for(s=t;n=n+-1|0,e[s>>2]=e[r>>2],n;)r=r+4|0,s=s+4|0;return t|0}function _p(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if(s=(n|0)==0,t-r>>2>>>0>>0){if(!s)do n=n+-1|0,e[t+(n<<2)>>2]=e[r+(n<<2)>>2];while(n|0)}else if(!s)for(s=r,r=t;n=n+-1|0,e[r>>2]=e[s>>2],n;)s=s+4|0,r=r+4|0;return t|0}function Rp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if(n)for(s=t;n=n+-1|0,e[s>>2]=r,n;)s=s+4|0;return t|0}function Un(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;switch(a=t+4|0,n=e[a>>2]|0,c=t+100|0,n>>>0<(e[c>>2]|0)>>>0?(e[a>>2]=n+1,n=N[n>>0]|0):n=si(t)|0,n|0){case 43:case 45:{s=(n|0)==45&1,n=e[a>>2]|0,n>>>0<(e[c>>2]|0)>>>0?(e[a>>2]=n+1,n=N[n>>0]|0):n=si(t)|0,(r|0)!=0&(n+-48|0)>>>0>9&&e[c>>2]|0&&(e[a>>2]=(e[a>>2]|0)+-1),l=s;break}default:l=0}if((n+-48|0)>>>0>9)e[c>>2]|0?(e[a>>2]=(e[a>>2]|0)+-1,s=-2147483648,n=0):(s=-2147483648,n=0);else{s=0;do s=n+-48+(s*10|0)|0,n=e[a>>2]|0,n>>>0<(e[c>>2]|0)>>>0?(e[a>>2]=n+1,n=N[n>>0]|0):n=si(t)|0;while((n+-48|0)>>>0<10&(s|0)<214748364);if(r=((s|0)<0)<<31>>31,(n+-48|0)>>>0<10){do r=Ht(s|0,r|0,10,0)|0,s=I0,n=Li(n|0,((n|0)<0)<<31>>31|0,-48,-1)|0,s=Li(n|0,I0|0,r|0,s|0)|0,r=I0,n=e[a>>2]|0,n>>>0<(e[c>>2]|0)>>>0?(e[a>>2]=n+1,n=N[n>>0]|0):n=si(t)|0;while((n+-48|0)>>>0<10&((r|0)<21474836|(r|0)==21474836&s>>>0<2061584302));o=s}else o=s;if((n+-48|0)>>>0<10)do n=e[a>>2]|0,n>>>0<(e[c>>2]|0)>>>0?(e[a>>2]=n+1,n=N[n>>0]|0):n=si(t)|0;while((n+-48|0)>>>0<10);e[c>>2]|0&&(e[a>>2]=(e[a>>2]|0)+-1),t=(l|0)!=0,n=Ji(0,0,o|0,r|0)|0,s=t?I0:r,n=t?n:o}return I0=s,n|0}function Pp(t){t=t|0,e[t+68>>2]|0||ht(t)}function Lp(t){t=t|0,e[t+68>>2]|0||ht(t)}function k1(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;return r=t+20|0,l=t+28|0,(e[r>>2]|0)>>>0>(e[l>>2]|0)>>>0&&(Qe[e[t+36>>2]&63](t,0,0)|0,(e[r>>2]|0)==0)?r=-1:(a=t+4|0,n=e[a>>2]|0,s=t+8|0,o=e[s>>2]|0,n>>>0>>0&&Qe[e[t+40>>2]&63](t,n-o|0,1)|0,e[t+16>>2]=0,e[l>>2]=0,e[r>>2]=0,e[s>>2]=0,e[a>>2]=0,r=0),r|0}var Up=[Et,ju,Wu,Y4,K4,$4,tc,mr,dr,Et,Et,Et,Et,Et,Et,Et],_r=[tr,Vd,Yf,Uf,yf,mf,rf,Ya,Ra,Hg,zg,Qg,tr,tr,tr,tr],Op=[en,oc,mc,en],Ce=[Xe,Ud,Od,Gf,Qf,_f,Rf,wf,Tf,ff,uf,Ja,$a,Ga,Qa,Ea,ka,Aa,Sa,aa,fa,Jl,$l,Gl,Ql,Rl,Pl,Jo,$o,Qo,zo,Ts,Cs,ko,Ro,Fo,r3,Y2,n3,s3,no,so,cg,oo,Zs,Js,Os,Ns,bs,Gs,Ys,js,lo,ao,ho,mo,So,vo,xo,yo,bo,Go,ll,al,ml,dl,Sl,vl,xl,yl,qa,ba,o5,Yd,ig,tg,hg,mg,Cg,xg,Tr,Eg,Mg,_g,Pg,Og,Lg,Ug,Ng,Bg,ir,Eh,Ph,ce,Nh,Qh,o1,s5,y5,N5,W5,G2,Z5,J5,e3,z2,i3,t3,f3,j2,u3,c3,A3,S3,Vi,v3,w3,T3,x3,Uc,E3,k3,R3,P3,H3,Y3,n6,s6,p6,A6,ru,nu,yu,Iu,Hu,Yu,Xu,Ku,Ju,$u,f4,u4,T4,C4,R4,P4,z4,H4,Z4,J4,nc,sc,cc,hc,Ac,Sc,Cc,xc,D2,Fc,E2,Wc,Z2,gh,K2,K6,W2,W6,C3,Lc,Nc,sh,F6,N6,H6,Y6,dg,an,ct,ws,h1,$5,Oo,Ua,ep,Pp,Lp,Ch,op,j4,lr,Oc,y8,_8,R8,P8,L8,U8,O8,f0,ye,Ze,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe],Ke=[v1,Bd,Hf,Lf,xf,hf,tf,Ha,Ma,va,ua,ea,zl,Ll,el,Ho,xs,I5,rg,ng,kh,Rh,Bh,Gh,B5,t4,r4,n4,s4,l4,a4,m4,d4,g4,p4,S4,w4,I4,D4,E4,k4,M4,_4,O4,N4,B4,V4,G4,Q4,Tc,Dc,im,rm,sm,tm,nm,om,ms,gg,sg,og,fn,x5,Ms,Rs,o3,T5,m5,Uo,Xo,kl,Nl,jl,ra,ma,Ca,La,Xa,sf,gf,Df,Nf,Xf,bd,$d,Ft,Wh,Xh,C5,h3,Kh,c5,A5,p5,Ym,jm,Xm,Km,Wm,Zm,dh,Jm,$m,e8,i8,t8,r8,n8,s8,o8,l8,a8,f8,c8,h8,m8,d8,g8,p8,A8,S8,v8,w8,T8,C8,G8,v1,v1],rr=[Di,L3,U3,O3,N3,B3,V3,q3,b3,G3,Q3,z3,j3,X3,K3,W3,Z3,J3,$3,e6,i6,t6,r6,f6,c6,T6,Jf,ou,lu,au,fu,uu,Eu,ku,Fu,Mu,_u,uc,pc,Vt,zt,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di],Se=[Je,F5,M5,io,P5,jd,yg,kg,Rg,vp,Fh,Q5,H5,Y5,G5,Lh,Uh,Vh,R5,Hh,Yh,m3,su,lm,fm,cm,Am,vm,mm,gm,Du,am,um,hm,Sm,wm,dm,pm,e4,i4,o4,c4,h4,A4,x4,y4,F4,L4,U4,q4,I6,D6,k6,Z6,$6,J6,em,fh,uh,mh,P6,L6,O6,b6,G6,z6,Wd,G0,ai,ui,Q2,H2,Id,Dd,Ed,nt,Mr,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je],Np=[tn,X4,ic,tn],Qe=[wi,D5,_5,U5,Jh,$h,Vg,Sh,Dn,Tp,wp,Cp,V5,z5,Mh,X5,qh,D3,_3,vc,yc,Jc,eh,rh,Bc,Qc,Hc,Xc,_s,ph,N2,fp,Qm,Hm,Ut,pp,mp,Ip,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi],Bp=[rn,fc,gc,rn],Bt=[kt,$s,Xg,jg,Yg,q5,E5,wc,Ic,kt,kt,kt,kt,kt,kt,kt],Vp=[Sr,a6,m6,w6,eu,Sr,Sr,Sr],qp=[vr,W4,rc,ac,dc,vr,vr,vr],Ni=[Ri,Nd,zf,Pf,Cf,cf,ef,za,Fa,Ta,ha,ta,Yl,Ol,tl,jo,Is,to,ro,j5,_h,Oh,K5,L5,bh,jh,O5,Zc,$c,ih,Gc,zc,Yc,pg,ps,Ss,l3,Pi,a3,ap,lp,f5,d5,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri],nr=[ut,y3,F3,o6,l6,u6,g6,S6,v6,Zf,tu,nh,y6,E6,Kc,ah,hh,R6,U6,q6,Q6,Ap,gp,ut,ut,ut,ut,ut,ut,ut,ut,ut],bp=[kd,H8,z8,Q8],Gp=[Lt,ds,un,Ii,_c,Rc,Pc,ip,rp,tp,Lt,Lt,Lt,Lt,Lt,Lt],F1=[Yt,wa,ca,ia,Hl,Ul,il,Yo,ys,th,Vc,qc,bc,jc,Kd,eg,Mm,qm,xn,sp,Dr,Z8,W8,K8,X8,j8,Y8,Yt,Yt,Yt,Yt,Yt],Rr=[Fd,Zh,Xd,d3,Ag,Tt,Md,n5,O2,lg,i5,p3,bm,Gm,zm,u1],On=[nn,_d,Zg,Rd,Jg,Pd,xr,nn],Ct=[jt,cu,Ru,C6,x6,oh,lh,M6,_6,B6,V6,jt,jt,jt,jt,jt],Qp=[wr,h6,d6,$f,iu,wr,wr,wr],Pr=[Gi,Po,Lo,Mo,_o,eo,Bs,Vs,Qs,zs,Xs,Ks,fo,uo,go,po,wo,To,Io,Do,ul,cl,gl,pl,wl,Tl,Il,Dl,qg,bg,Gg,b5,k5,I3,M3,ls,r5,Ds,Es,ks,Fs,Ps,Ls,Us,rl,nl,sl,ol,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi];return{_jpegls_encode:vg,___cxa_can_catch:Kg,_free:Ze,_jpegls_decode:Sg,___cxa_is_pointer_type:Wg,_i64Add:Li,_memmove:gr,_i64Subtract:Ji,_memset:je,_malloc:xi,_memcpy:ii,_bitshift64Lshr:Dt,_bitshift64Shl:pi,__GLOBAL__I_000101:xh,__GLOBAL__sub_I_jpegls_cpp:vs,__GLOBAL__sub_I_iostream_cpp:yh,runPostSets:J8,_emscripten_replace_memory:Jn,stackAlloc:$n,stackSave:es,stackRestore:is,establishStackSpace:ts,setThrew:rs,setTempRet0:ns,getTempRet0:ss,dynCall_iiiiiiii:ed,dynCall_viiiii:id,dynCall_iiiiiid:rd,dynCall_vi:nd,dynCall_vii:sd,dynCall_iiiiiii:od,dynCall_ii:ld,dynCall_iiiiiiiiiiii:ad,dynCall_iiii:ud,dynCall_viiiiiiiiiiiiiii:cd,dynCall_viiiiii:hd,dynCall_viiiiiii:md,dynCall_viiiiiiiiii:dd,dynCall_iii:gd,dynCall_iiiiii:pd,dynCall_diii:Ad,dynCall_i:Sd,dynCall_iiiii:vd,dynCall_viii:wd,dynCall_v:Td,dynCall_iiiiiiiii:Cd,dynCall_iiiiid:xd,dynCall_viiii:yd}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer);Module._jpegls_encode=asm._jpegls_encode,Module.___cxa_can_catch=asm.___cxa_can_catch;var _free=Module._free=asm._free;Module._jpegls_decode=asm._jpegls_decode,Module.___cxa_is_pointer_type=asm.___cxa_is_pointer_type;var _i64Add=Module._i64Add=asm._i64Add,_memmove=Module._memmove=asm._memmove,_i64Subtract=Module._i64Subtract=asm._i64Subtract,_memset=Module._memset=asm._memset,_malloc=Module._malloc=asm._malloc,_memcpy=Module._memcpy=asm._memcpy,_emscripten_replace_memory=Module._emscripten_replace_memory=asm._emscripten_replace_memory;Module.runPostSets=asm.runPostSets,Module.__GLOBAL__sub_I_iostream_cpp=asm.__GLOBAL__sub_I_iostream_cpp;var _bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,__GLOBAL__sub_I_jpegls_cpp=Module.__GLOBAL__sub_I_jpegls_cpp=asm.__GLOBAL__sub_I_jpegls_cpp,__GLOBAL__I_000101=Module.__GLOBAL__I_000101=asm.__GLOBAL__I_000101,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl;Module.dynCall_iiiiiiii=asm.dynCall_iiiiiiii,Module.dynCall_viiiii=asm.dynCall_viiiii,Module.dynCall_iiiiiid=asm.dynCall_iiiiiid,Module.dynCall_vi=asm.dynCall_vi,Module.dynCall_vii=asm.dynCall_vii,Module.dynCall_iiiiiii=asm.dynCall_iiiiiii,Module.dynCall_ii=asm.dynCall_ii,Module.dynCall_iiiiiiiiiiii=asm.dynCall_iiiiiiiiiiii,Module.dynCall_iiii=asm.dynCall_iiii,Module.dynCall_viiiiiiiiiiiiiii=asm.dynCall_viiiiiiiiiiiiiii,Module.dynCall_viiiiii=asm.dynCall_viiiiii,Module.dynCall_viiiiiii=asm.dynCall_viiiiiii,Module.dynCall_viiiiiiiiii=asm.dynCall_viiiiiiiiii,Module.dynCall_iii=asm.dynCall_iii,Module.dynCall_iiiiii=asm.dynCall_iiiiii,Module.dynCall_diii=asm.dynCall_diii,Module.dynCall_i=asm.dynCall_i,Module.dynCall_iiiii=asm.dynCall_iiiii,Module.dynCall_viii=asm.dynCall_viii,Module.dynCall_v=asm.dynCall_v,Module.dynCall_iiiiiiiii=asm.dynCall_iiiiiiiii,Module.dynCall_iiiiid=asm.dynCall_iiiiid,Module.dynCall_viiii=asm.dynCall_viiii,Runtime.stackAlloc=asm.stackAlloc,Runtime.stackSave=asm.stackSave,Runtime.stackRestore=asm.stackRestore,Runtime.establishStackSpace=asm.establishStackSpace,Runtime.setTempRet0=asm.setTempRet0,Runtime.getTempRet0=asm.getTempRet0;function ExitStatus(T){this.name="ExitStatus",this.message="Program terminated with exit("+T+")",this.status=T}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;dependenciesFulfilled=function T(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=T)},Module.callMain=Module.callMain=function T(u){assert(runDependencies==0,"cannot call main when async dependencies remain! (listen on __ATMAIN__)"),assert(__ATPRERUN__.length==0,"cannot call main when preRun functions remain to be called"),u=u||[],ensureInitRuntime();var m=u.length+1;function A(){for(var D=0;D<3;D++)S.push(0)}var S=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];A();for(var v=0;v0||(preRun(),runDependencies>0)||Module.calledRun)return;function u(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(T),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),u()},1)):u()}Module.run=Module.run=run;function exit(T,u){if(!(u&&Module.noExitRuntime))throw Module.noExitRuntime||(ABORT=!0,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(T)),ENVIRONMENT_IS_NODE?(process.stdout.once("drain",function(){process.exit(T)}),console.log(" "),setTimeout(function(){process.exit(T)},500)):ENVIRONMENT_IS_SHELL&&typeof quit=="function"&&quit(T),new ExitStatus(T)}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(T){T!==void 0?(Module.print(T),Module.printErr(T),T=JSON.stringify(T)):T="",ABORT=!0;var u=` -If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,m="abort("+T+") at "+stackTrace()+u;throw abortDecorators&&abortDecorators.forEach(function(A){m=A(m,T)}),m}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;return Module.noInitialRun&&(shouldRunNow=!1),run(),Module};module.exports&&(module.exports=CharLS)}(charLSDynamicMemoryBrowser)),charLSDynamicMemoryBrowser.exports}var hasRequiredJpegLs;function requireJpegLs(){return hasRequiredJpegLs||(hasRequiredJpegLs=1,function(T){var u=u||(typeof commonjsRequire<"u"?requireCharLSDynamicMemoryBrowser():null),m=function(){var A;function S(){}S.prototype={decodeJPEGLS:function(R,L){return D(R,L)}};function v(R,L){var P=A._malloc(R.length);A.writeArrayToMemory(R,P);var d=A._malloc(4),E=A._malloc(4),e=A._malloc(4),N=A._malloc(4),q=A._malloc(4),z=A._malloc(4),e0=A._malloc(4),H=A._malloc(4),j=A._malloc(4),y=A.ccall("jpegls_decode","number",["number","number","number","number","number","number","number","number","number","number","number"],[P,R.length,d,E,e,N,q,z,H,e0,j]),Y={result:y,width:A.getValue(e,"i32"),height:A.getValue(N,"i32"),bitsPerSample:A.getValue(q,"i32"),stride:A.getValue(z,"i32"),components:A.getValue(H,"i32"),allowedLossyError:A.getValue(e0,"i32"),interleaveMode:A.getValue(j,"i32"),pixelData:void 0},G=A.getValue(d,"*");return Y.bitsPerSample<=8?(Y.pixelData=new Uint8Array(Y.width*Y.height*Y.components),Y.pixelData.set(new Uint8Array(A.HEAP8.buffer,G,Y.pixelData.length))):L?(Y.pixelData=new Int16Array(Y.width*Y.height*Y.components),Y.pixelData.set(new Int16Array(A.HEAP16.buffer,G,Y.pixelData.length))):(Y.pixelData=new Uint16Array(Y.width*Y.height*Y.components),Y.pixelData.set(new Uint16Array(A.HEAP16.buffer,G,Y.pixelData.length))),A._free(P),A._free(G),A._free(d),A._free(E),A._free(e),A._free(N),A._free(q),A._free(z),A._free(H),A._free(j),Y}function w(){if(typeof u>"u")throw"No JPEG-LS decoder loaded";if(!A&&(A=u(),!A||!A._jpegls_decode))throw"JPEG-LS failed to initialize"}function D(R,L){w();var P=v(R,L);if(P.result!==0&&P.result!==6)throw"JPEG-LS decoder failed to decode frame (error code "+P.result+")";var d={};return d.columns=P.width,d.rows=P.height,d.pixelData=P.pixelData,d}return S}();T.exports&&(T.exports=m)}(jpegLs)),jpegLs.exports}var parser={exports:{}},pako={},deflate$1={},deflate={},trees={},hasRequiredTrees;function requireTrees(){if(hasRequiredTrees)return trees;hasRequiredTrees=1;const T=4,u=0,m=1,A=2;function S(W){let U0=W.length;for(;--U0>=0;)W[U0]=0}const v=0,w=1,D=2,R=3,L=258,P=29,d=256,E=d+1+P,e=30,N=19,q=2*E+1,z=15,e0=16,H=7,j=256,y=16,Y=17,G=18,J=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),i0=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Q=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),f=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),l0=512,o0=new Array((E+2)*2);S(o0);const c0=new Array(e*2);S(c0);const d0=new Array(l0);S(d0);const S0=new Array(L-R+1);S(S0);const p0=new Array(P);S(p0);const T0=new Array(e);S(T0);function C0(W,U0,X0,Q0,oe){this.static_tree=W,this.extra_bits=U0,this.extra_base=X0,this.elems=Q0,this.max_length=oe,this.has_stree=W&&W.length}let F0,ee,ie;function ke(W,U0){this.dyn_tree=W,this.max_code=0,this.stat_desc=U0}const Le=W=>W<256?d0[W]:d0[256+(W>>>7)],De=(W,U0)=>{W.pending_buf[W.pending++]=U0&255,W.pending_buf[W.pending++]=U0>>>8&255},I0=(W,U0,X0)=>{W.bi_valid>e0-X0?(W.bi_buf|=U0<>e0-W.bi_valid,W.bi_valid+=X0-e0):(W.bi_buf|=U0<{I0(W,X0[U0*2],X0[U0*2+1])},qe=(W,U0)=>{let X0=0;do X0|=W&1,W>>>=1,X0<<=1;while(--U0>0);return X0>>>1},$e=W=>{W.bi_valid===16?(De(W,W.bi_buf),W.bi_buf=0,W.bi_valid=0):W.bi_valid>=8&&(W.pending_buf[W.pending++]=W.bi_buf&255,W.bi_buf>>=8,W.bi_valid-=8)},oi=(W,U0)=>{const X0=U0.dyn_tree,Q0=U0.max_code,oe=U0.stat_desc.static_tree,ue=U0.stat_desc.has_stree,D0=U0.stat_desc.extra_bits,b0=U0.stat_desc.extra_base,n0=U0.stat_desc.max_length;let h0,Fe,u0,Me,L0,Ye,W0=0;for(Me=0;Me<=z;Me++)W.bl_count[Me]=0;for(X0[W.heap[W.heap_max]*2+1]=0,h0=W.heap_max+1;h0n0&&(Me=n0,W0++),X0[Fe*2+1]=Me,!(Fe>Q0)&&(W.bl_count[Me]++,L0=0,Fe>=b0&&(L0=D0[Fe-b0]),Ye=X0[Fe*2],W.opt_len+=Ye*(Me+L0),ue&&(W.static_len+=Ye*(oe[Fe*2+1]+L0)));if(W0!==0){do{for(Me=n0-1;W.bl_count[Me]===0;)Me--;W.bl_count[Me]--,W.bl_count[Me+1]+=2,W.bl_count[n0]--,W0-=2}while(W0>0);for(Me=n0;Me!==0;Me--)for(Fe=W.bl_count[Me];Fe!==0;)u0=W.heap[--h0],!(u0>Q0)&&(X0[u0*2+1]!==Me&&(W.opt_len+=(Me-X0[u0*2+1])*X0[u0*2],X0[u0*2+1]=Me),Fe--)}},ri=(W,U0,X0)=>{const Q0=new Array(z+1);let oe=0,ue,D0;for(ue=1;ue<=z;ue++)oe=oe+X0[ue-1]<<1,Q0[ue]=oe;for(D0=0;D0<=U0;D0++){let b0=W[D0*2+1];b0!==0&&(W[D0*2]=qe(Q0[b0]++,b0))}},be=()=>{let W,U0,X0,Q0,oe;const ue=new Array(z+1);for(X0=0,Q0=0;Q0>=7;Q0{let U0;for(U0=0;U0{W.bi_valid>8?De(W,W.bi_buf):W.bi_valid>0&&(W.pending_buf[W.pending++]=W.bi_buf),W.bi_buf=0,W.bi_valid=0},M0=(W,U0,X0,Q0)=>{const oe=U0*2,ue=X0*2;return W[oe]{const Q0=W.heap[X0];let oe=X0<<1;for(;oe<=W.heap_len&&(oe{let Q0,oe,ue=0,D0,b0;if(W.sym_next!==0)do Q0=W.pending_buf[W.sym_buf+ue++]&255,Q0+=(W.pending_buf[W.sym_buf+ue++]&255)<<8,oe=W.pending_buf[W.sym_buf+ue++],Q0===0?Ue(W,oe,U0):(D0=S0[oe],Ue(W,D0+d+1,U0),b0=J[D0],b0!==0&&(oe-=p0[D0],I0(W,oe,b0)),Q0--,D0=Le(Q0),Ue(W,D0,X0),b0=i0[D0],b0!==0&&(Q0-=T0[D0],I0(W,Q0,b0)));while(ue{const X0=U0.dyn_tree,Q0=U0.stat_desc.static_tree,oe=U0.stat_desc.has_stree,ue=U0.stat_desc.elems;let D0,b0,n0=-1,h0;for(W.heap_len=0,W.heap_max=q,D0=0;D0>1;D0>=1;D0--)se(W,X0,D0);h0=ue;do D0=W.heap[1],W.heap[1]=W.heap[W.heap_len--],se(W,X0,1),b0=W.heap[1],W.heap[--W.heap_max]=D0,W.heap[--W.heap_max]=b0,X0[h0*2]=X0[D0*2]+X0[b0*2],W.depth[h0]=(W.depth[D0]>=W.depth[b0]?W.depth[D0]:W.depth[b0])+1,X0[D0*2+1]=X0[b0*2+1]=h0,W.heap[1]=h0++,se(W,X0,1);while(W.heap_len>=2);W.heap[--W.heap_max]=W.heap[1],oi(W,U0),ri(X0,n0,W.bl_count)},me=(W,U0,X0)=>{let Q0,oe=-1,ue,D0=U0[0*2+1],b0=0,n0=7,h0=4;for(D0===0&&(n0=138,h0=3),U0[(X0+1)*2+1]=65535,Q0=0;Q0<=X0;Q0++)ue=D0,D0=U0[(Q0+1)*2+1],!(++b0{let Q0,oe=-1,ue,D0=U0[0*2+1],b0=0,n0=7,h0=4;for(D0===0&&(n0=138,h0=3),Q0=0;Q0<=X0;Q0++)if(ue=D0,D0=U0[(Q0+1)*2+1],!(++b0{let U0;for(me(W,W.dyn_ltree,W.l_desc.max_code),me(W,W.dyn_dtree,W.d_desc.max_code),R0(W,W.bl_desc),U0=N-1;U0>=3&&W.bl_tree[f[U0]*2+1]===0;U0--);return W.opt_len+=3*(U0+1)+5+5+4,U0},B0=(W,U0,X0,Q0)=>{let oe;for(I0(W,U0-257,5),I0(W,X0-1,5),I0(W,Q0-4,4),oe=0;oe{let U0=4093624447,X0;for(X0=0;X0<=31;X0++,U0>>>=1)if(U0&1&&W.dyn_ltree[X0*2]!==0)return u;if(W.dyn_ltree[9*2]!==0||W.dyn_ltree[10*2]!==0||W.dyn_ltree[13*2]!==0)return m;for(X0=32;X0{j0||(be(),j0=!0),W.l_desc=new ke(W.dyn_ltree,F0),W.d_desc=new ke(W.dyn_dtree,ee),W.bl_desc=new ke(W.bl_tree,ie),W.bi_buf=0,W.bi_valid=0,Ge(W)},V0=(W,U0,X0,Q0)=>{I0(W,(v<<1)+(Q0?1:0),3),J0(W),De(W,X0),De(W,~X0),X0&&W.pending_buf.set(W.window.subarray(U0,U0+X0),W.pending),W.pending+=X0},pe=W=>{I0(W,w<<1,3),Ue(W,j,o0),$e(W)},q0=(W,U0,X0,Q0)=>{let oe,ue,D0=0;W.level>0?(W.strm.data_type===A&&(W.strm.data_type=E0(W)),R0(W,W.l_desc),R0(W,W.d_desc),D0=O0(W),oe=W.opt_len+3+7>>>3,ue=W.static_len+3+7>>>3,ue<=oe&&(oe=ue)):oe=ue=X0+5,X0+4<=oe&&U0!==-1?V0(W,U0,X0,Q0):W.strategy===T||ue===oe?(I0(W,(w<<1)+(Q0?1:0),3),x0(W,o0,c0)):(I0(W,(D<<1)+(Q0?1:0),3),B0(W,W.l_desc.max_code+1,W.d_desc.max_code+1,D0+1),x0(W,W.dyn_ltree,W.dyn_dtree)),Ge(W),Q0&&J0(W)},K0=(W,U0,X0)=>(W.pending_buf[W.sym_buf+W.sym_next++]=U0,W.pending_buf[W.sym_buf+W.sym_next++]=U0>>8,W.pending_buf[W.sym_buf+W.sym_next++]=X0,U0===0?W.dyn_ltree[X0*2]++:(W.matches++,U0--,W.dyn_ltree[(S0[X0]+d+1)*2]++,W.dyn_dtree[Le(U0)*2]++),W.sym_next===W.sym_end);return trees._tr_init=z0,trees._tr_stored_block=V0,trees._tr_flush_block=q0,trees._tr_tally=K0,trees._tr_align=pe,trees}var adler32_1,hasRequiredAdler32;function requireAdler32(){return hasRequiredAdler32||(hasRequiredAdler32=1,adler32_1=(u,m,A,S)=>{let v=u&65535|0,w=u>>>16&65535|0,D=0;for(;A!==0;){D=A>2e3?2e3:A,A-=D;do v=v+m[S++]|0,w=w+v|0;while(--D);v%=65521,w%=65521}return v|w<<16|0}),adler32_1}var crc32_1,hasRequiredCrc32;function requireCrc32(){if(hasRequiredCrc32)return crc32_1;hasRequiredCrc32=1;const T=()=>{let A,S=[];for(var v=0;v<256;v++){A=v;for(var w=0;w<8;w++)A=A&1?3988292384^A>>>1:A>>>1;S[v]=A}return S},u=new Uint32Array(T());return crc32_1=(A,S,v,w)=>{const D=u,R=w+v;A^=-1;for(let L=w;L>>8^D[(A^S[L])&255];return A^-1},crc32_1}var messages,hasRequiredMessages;function requireMessages(){return hasRequiredMessages||(hasRequiredMessages=1,messages={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}),messages}var constants,hasRequiredConstants;function requireConstants(){return hasRequiredConstants||(hasRequiredConstants=1,constants={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}),constants}var hasRequiredDeflate$1;function requireDeflate$1(){if(hasRequiredDeflate$1)return deflate;hasRequiredDeflate$1=1;const{_tr_init:T,_tr_stored_block:u,_tr_flush_block:m,_tr_tally:A,_tr_align:S}=requireTrees(),v=requireAdler32(),w=requireCrc32(),D=requireMessages(),{Z_NO_FLUSH:R,Z_PARTIAL_FLUSH:L,Z_FULL_FLUSH:P,Z_FINISH:d,Z_BLOCK:E,Z_OK:e,Z_STREAM_END:N,Z_STREAM_ERROR:q,Z_DATA_ERROR:z,Z_BUF_ERROR:e0,Z_DEFAULT_COMPRESSION:H,Z_FILTERED:j,Z_HUFFMAN_ONLY:y,Z_RLE:Y,Z_FIXED:G,Z_DEFAULT_STRATEGY:J,Z_UNKNOWN:i0,Z_DEFLATED:Q}=requireConstants(),f=9,l0=15,o0=8,S0=256+1+29,p0=30,T0=19,C0=2*S0+1,F0=15,ee=3,ie=258,ke=ie+ee+1,Le=32,De=42,I0=57,Ue=69,qe=73,$e=91,oi=103,ri=113,be=666,Ge=1,J0=2,M0=3,se=4,x0=3,R0=($,Z0)=>($.msg=D[Z0],Z0),me=$=>$*2-($>4?9:0),N0=$=>{let Z0=$.length;for(;--Z0>=0;)$[Z0]=0},O0=$=>{let Z0,g0,k0,m0=$.w_size;Z0=$.hash_size,k0=Z0;do g0=$.head[--k0],$.head[k0]=g0>=m0?g0-m0:0;while(--Z0);Z0=m0,k0=Z0;do g0=$.prev[--k0],$.prev[k0]=g0>=m0?g0-m0:0;while(--Z0)};let E0=($,Z0,g0)=>(Z0<<$.hash_shift^g0)&$.hash_mask;const j0=$=>{const Z0=$.state;let g0=Z0.pending;g0>$.avail_out&&(g0=$.avail_out),g0!==0&&($.output.set(Z0.pending_buf.subarray(Z0.pending_out,Z0.pending_out+g0),$.next_out),$.next_out+=g0,Z0.pending_out+=g0,$.total_out+=g0,$.avail_out-=g0,Z0.pending-=g0,Z0.pending===0&&(Z0.pending_out=0))},z0=($,Z0)=>{m($,$.block_start>=0?$.block_start:-1,$.strstart-$.block_start,Z0),$.block_start=$.strstart,j0($.strm)},V0=($,Z0)=>{$.pending_buf[$.pending++]=Z0},pe=($,Z0)=>{$.pending_buf[$.pending++]=Z0>>>8&255,$.pending_buf[$.pending++]=Z0&255},q0=($,Z0,g0,k0)=>{let m0=$.avail_in;return m0>k0&&(m0=k0),m0===0?0:($.avail_in-=m0,Z0.set($.input.subarray($.next_in,$.next_in+m0),g0),$.state.wrap===1?$.adler=v($.adler,Z0,m0,g0):$.state.wrap===2&&($.adler=w($.adler,Z0,m0,g0)),$.next_in+=m0,$.total_in+=m0,m0)},K0=($,Z0)=>{let g0=$.max_chain_length,k0=$.strstart,m0,we,He=$.prev_length,Oe=$.nice_match;const P0=$.strstart>$.w_size-ke?$.strstart-($.w_size-ke):0,ci=$.window,ki=$.w_mask,Qi=$.prev,Fi=$.strstart+ie;let $i=ci[k0+He-1],ae=ci[k0+He];$.prev_length>=$.good_match&&(g0>>=2),Oe>$.lookahead&&(Oe=$.lookahead);do if(m0=Z0,!(ci[m0+He]!==ae||ci[m0+He-1]!==$i||ci[m0]!==ci[k0]||ci[++m0]!==ci[k0+1])){k0+=2,m0++;do;while(ci[++k0]===ci[++m0]&&ci[++k0]===ci[++m0]&&ci[++k0]===ci[++m0]&&ci[++k0]===ci[++m0]&&ci[++k0]===ci[++m0]&&ci[++k0]===ci[++m0]&&ci[++k0]===ci[++m0]&&ci[++k0]===ci[++m0]&&k0He){if($.match_start=Z0,He=we,we>=Oe)break;$i=ci[k0+He-1],ae=ci[k0+He]}}while((Z0=Qi[Z0&ki])>P0&&--g0!==0);return He<=$.lookahead?He:$.lookahead},W=$=>{const Z0=$.w_size;let g0,k0,m0;do{if(k0=$.window_size-$.lookahead-$.strstart,$.strstart>=Z0+(Z0-ke)&&($.window.set($.window.subarray(Z0,Z0+Z0-k0),0),$.match_start-=Z0,$.strstart-=Z0,$.block_start-=Z0,$.insert>$.strstart&&($.insert=$.strstart),O0($),k0+=Z0),$.strm.avail_in===0)break;if(g0=q0($.strm,$.window,$.strstart+$.lookahead,k0),$.lookahead+=g0,$.lookahead+$.insert>=ee)for(m0=$.strstart-$.insert,$.ins_h=$.window[m0],$.ins_h=E0($,$.ins_h,$.window[m0+1]);$.insert&&($.ins_h=E0($,$.ins_h,$.window[m0+ee-1]),$.prev[m0&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=m0,m0++,$.insert--,!($.lookahead+$.insert{let g0=$.pending_buf_size-5>$.w_size?$.w_size:$.pending_buf_size-5,k0,m0,we,He=0,Oe=$.strm.avail_in;do{if(k0=65535,we=$.bi_valid+42>>3,$.strm.avail_outm0+$.strm.avail_in&&(k0=m0+$.strm.avail_in),k0>we&&(k0=we),k0>8,$.pending_buf[$.pending-2]=~k0,$.pending_buf[$.pending-1]=~k0>>8,j0($.strm),m0&&(m0>k0&&(m0=k0),$.strm.output.set($.window.subarray($.block_start,$.block_start+m0),$.strm.next_out),$.strm.next_out+=m0,$.strm.avail_out-=m0,$.strm.total_out+=m0,$.block_start+=m0,k0-=m0),k0&&(q0($.strm,$.strm.output,$.strm.next_out,k0),$.strm.next_out+=k0,$.strm.avail_out-=k0,$.strm.total_out+=k0)}while(He===0);return Oe-=$.strm.avail_in,Oe&&(Oe>=$.w_size?($.matches=2,$.window.set($.strm.input.subarray($.strm.next_in-$.w_size,$.strm.next_in),0),$.strstart=$.w_size,$.insert=$.strstart):($.window_size-$.strstart<=Oe&&($.strstart-=$.w_size,$.window.set($.window.subarray($.w_size,$.w_size+$.strstart),0),$.matches<2&&$.matches++,$.insert>$.strstart&&($.insert=$.strstart)),$.window.set($.strm.input.subarray($.strm.next_in-Oe,$.strm.next_in),$.strstart),$.strstart+=Oe,$.insert+=Oe>$.w_size-$.insert?$.w_size-$.insert:Oe),$.block_start=$.strstart),$.high_water<$.strstart&&($.high_water=$.strstart),He?se:Z0!==R&&Z0!==d&&$.strm.avail_in===0&&$.strstart===$.block_start?J0:(we=$.window_size-$.strstart,$.strm.avail_in>we&&$.block_start>=$.w_size&&($.block_start-=$.w_size,$.strstart-=$.w_size,$.window.set($.window.subarray($.w_size,$.w_size+$.strstart),0),$.matches<2&&$.matches++,we+=$.w_size,$.insert>$.strstart&&($.insert=$.strstart)),we>$.strm.avail_in&&(we=$.strm.avail_in),we&&(q0($.strm,$.window,$.strstart,we),$.strstart+=we,$.insert+=we>$.w_size-$.insert?$.w_size-$.insert:we),$.high_water<$.strstart&&($.high_water=$.strstart),we=$.bi_valid+42>>3,we=$.pending_buf_size-we>65535?65535:$.pending_buf_size-we,g0=we>$.w_size?$.w_size:we,m0=$.strstart-$.block_start,(m0>=g0||(m0||Z0===d)&&Z0!==R&&$.strm.avail_in===0&&m0<=we)&&(k0=m0>we?we:m0,He=Z0===d&&$.strm.avail_in===0&&k0===m0?1:0,u($,$.block_start,k0,He),$.block_start+=k0,j0($.strm)),He?M0:Ge)},X0=($,Z0)=>{let g0,k0;for(;;){if($.lookahead=ee&&($.ins_h=E0($,$.ins_h,$.window[$.strstart+ee-1]),g0=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart),g0!==0&&$.strstart-g0<=$.w_size-ke&&($.match_length=K0($,g0)),$.match_length>=ee)if(k0=A($,$.strstart-$.match_start,$.match_length-ee),$.lookahead-=$.match_length,$.match_length<=$.max_lazy_match&&$.lookahead>=ee){$.match_length--;do $.strstart++,$.ins_h=E0($,$.ins_h,$.window[$.strstart+ee-1]),g0=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;while(--$.match_length!==0);$.strstart++}else $.strstart+=$.match_length,$.match_length=0,$.ins_h=$.window[$.strstart],$.ins_h=E0($,$.ins_h,$.window[$.strstart+1]);else k0=A($,0,$.window[$.strstart]),$.lookahead--,$.strstart++;if(k0&&(z0($,!1),$.strm.avail_out===0))return Ge}return $.insert=$.strstart{let g0,k0,m0;for(;;){if($.lookahead=ee&&($.ins_h=E0($,$.ins_h,$.window[$.strstart+ee-1]),g0=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart),$.prev_length=$.match_length,$.prev_match=$.match_start,$.match_length=ee-1,g0!==0&&$.prev_length<$.max_lazy_match&&$.strstart-g0<=$.w_size-ke&&($.match_length=K0($,g0),$.match_length<=5&&($.strategy===j||$.match_length===ee&&$.strstart-$.match_start>4096)&&($.match_length=ee-1)),$.prev_length>=ee&&$.match_length<=$.prev_length){m0=$.strstart+$.lookahead-ee,k0=A($,$.strstart-1-$.prev_match,$.prev_length-ee),$.lookahead-=$.prev_length-1,$.prev_length-=2;do++$.strstart<=m0&&($.ins_h=E0($,$.ins_h,$.window[$.strstart+ee-1]),g0=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart);while(--$.prev_length!==0);if($.match_available=0,$.match_length=ee-1,$.strstart++,k0&&(z0($,!1),$.strm.avail_out===0))return Ge}else if($.match_available){if(k0=A($,0,$.window[$.strstart-1]),k0&&z0($,!1),$.strstart++,$.lookahead--,$.strm.avail_out===0)return Ge}else $.match_available=1,$.strstart++,$.lookahead--}return $.match_available&&(k0=A($,0,$.window[$.strstart-1]),$.match_available=0),$.insert=$.strstart{let g0,k0,m0,we;const He=$.window;for(;;){if($.lookahead<=ie){if(W($),$.lookahead<=ie&&Z0===R)return Ge;if($.lookahead===0)break}if($.match_length=0,$.lookahead>=ee&&$.strstart>0&&(m0=$.strstart-1,k0=He[m0],k0===He[++m0]&&k0===He[++m0]&&k0===He[++m0])){we=$.strstart+ie;do;while(k0===He[++m0]&&k0===He[++m0]&&k0===He[++m0]&&k0===He[++m0]&&k0===He[++m0]&&k0===He[++m0]&&k0===He[++m0]&&k0===He[++m0]&&m0$.lookahead&&($.match_length=$.lookahead)}if($.match_length>=ee?(g0=A($,1,$.match_length-ee),$.lookahead-=$.match_length,$.strstart+=$.match_length,$.match_length=0):(g0=A($,0,$.window[$.strstart]),$.lookahead--,$.strstart++),g0&&(z0($,!1),$.strm.avail_out===0))return Ge}return $.insert=0,Z0===d?(z0($,!0),$.strm.avail_out===0?M0:se):$.sym_next&&(z0($,!1),$.strm.avail_out===0)?Ge:J0},ue=($,Z0)=>{let g0;for(;;){if($.lookahead===0&&(W($),$.lookahead===0)){if(Z0===R)return Ge;break}if($.match_length=0,g0=A($,0,$.window[$.strstart]),$.lookahead--,$.strstart++,g0&&(z0($,!1),$.strm.avail_out===0))return Ge}return $.insert=0,Z0===d?(z0($,!0),$.strm.avail_out===0?M0:se):$.sym_next&&(z0($,!1),$.strm.avail_out===0)?Ge:J0};function D0($,Z0,g0,k0,m0){this.good_length=$,this.max_lazy=Z0,this.nice_length=g0,this.max_chain=k0,this.func=m0}const b0=[new D0(0,0,0,0,U0),new D0(4,4,8,4,X0),new D0(4,5,16,8,X0),new D0(4,6,32,32,X0),new D0(4,4,16,16,Q0),new D0(8,16,32,32,Q0),new D0(8,16,128,128,Q0),new D0(8,32,128,256,Q0),new D0(32,128,258,1024,Q0),new D0(32,258,258,4096,Q0)],n0=$=>{$.window_size=2*$.w_size,N0($.head),$.max_lazy_match=b0[$.level].max_lazy,$.good_match=b0[$.level].good_length,$.nice_match=b0[$.level].nice_length,$.max_chain_length=b0[$.level].max_chain,$.strstart=0,$.block_start=0,$.lookahead=0,$.insert=0,$.match_length=$.prev_length=ee-1,$.match_available=0,$.ins_h=0};function h0(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Q,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(C0*2),this.dyn_dtree=new Uint16Array((2*p0+1)*2),this.bl_tree=new Uint16Array((2*T0+1)*2),N0(this.dyn_ltree),N0(this.dyn_dtree),N0(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(F0+1),this.heap=new Uint16Array(2*S0+1),N0(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*S0+1),N0(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Fe=$=>{if(!$)return 1;const Z0=$.state;return!Z0||Z0.strm!==$||Z0.status!==De&&Z0.status!==I0&&Z0.status!==Ue&&Z0.status!==qe&&Z0.status!==$e&&Z0.status!==oi&&Z0.status!==ri&&Z0.status!==be?1:0},u0=$=>{if(Fe($))return R0($,q);$.total_in=$.total_out=0,$.data_type=i0;const Z0=$.state;return Z0.pending=0,Z0.pending_out=0,Z0.wrap<0&&(Z0.wrap=-Z0.wrap),Z0.status=Z0.wrap===2?I0:Z0.wrap?De:ri,$.adler=Z0.wrap===2?0:1,Z0.last_flush=-2,T(Z0),e},Me=$=>{const Z0=u0($);return Z0===e&&n0($.state),Z0},L0=($,Z0)=>Fe($)||$.state.wrap!==2?q:($.state.gzhead=Z0,e),Ye=($,Z0,g0,k0,m0,we)=>{if(!$)return q;let He=1;if(Z0===H&&(Z0=6),k0<0?(He=0,k0=-k0):k0>15&&(He=2,k0-=16),m0<1||m0>f||g0!==Q||k0<8||k0>15||Z0<0||Z0>9||we<0||we>G||k0===8&&He!==1)return R0($,q);k0===8&&(k0=9);const Oe=new h0;return $.state=Oe,Oe.strm=$,Oe.status=De,Oe.wrap=He,Oe.gzhead=null,Oe.w_bits=k0,Oe.w_size=1<Ye($,Z0,Q,l0,o0,J),re=($,Z0)=>{if(Fe($)||Z0>E||Z0<0)return $?R0($,q):q;const g0=$.state;if(!$.output||$.avail_in!==0&&!$.input||g0.status===be&&Z0!==d)return R0($,$.avail_out===0?e0:q);const k0=g0.last_flush;if(g0.last_flush=Z0,g0.pending!==0){if(j0($),$.avail_out===0)return g0.last_flush=-1,e}else if($.avail_in===0&&me(Z0)<=me(k0)&&Z0!==d)return R0($,e0);if(g0.status===be&&$.avail_in!==0)return R0($,e0);if(g0.status===De&&g0.wrap===0&&(g0.status=ri),g0.status===De){let m0=Q+(g0.w_bits-8<<4)<<8,we=-1;if(g0.strategy>=y||g0.level<2?we=0:g0.level<6?we=1:g0.level===6?we=2:we=3,m0|=we<<6,g0.strstart!==0&&(m0|=Le),m0+=31-m0%31,pe(g0,m0),g0.strstart!==0&&(pe(g0,$.adler>>>16),pe(g0,$.adler&65535)),$.adler=1,g0.status=ri,j0($),g0.pending!==0)return g0.last_flush=-1,e}if(g0.status===I0){if($.adler=0,V0(g0,31),V0(g0,139),V0(g0,8),g0.gzhead)V0(g0,(g0.gzhead.text?1:0)+(g0.gzhead.hcrc?2:0)+(g0.gzhead.extra?4:0)+(g0.gzhead.name?8:0)+(g0.gzhead.comment?16:0)),V0(g0,g0.gzhead.time&255),V0(g0,g0.gzhead.time>>8&255),V0(g0,g0.gzhead.time>>16&255),V0(g0,g0.gzhead.time>>24&255),V0(g0,g0.level===9?2:g0.strategy>=y||g0.level<2?4:0),V0(g0,g0.gzhead.os&255),g0.gzhead.extra&&g0.gzhead.extra.length&&(V0(g0,g0.gzhead.extra.length&255),V0(g0,g0.gzhead.extra.length>>8&255)),g0.gzhead.hcrc&&($.adler=w($.adler,g0.pending_buf,g0.pending,0)),g0.gzindex=0,g0.status=Ue;else if(V0(g0,0),V0(g0,0),V0(g0,0),V0(g0,0),V0(g0,0),V0(g0,g0.level===9?2:g0.strategy>=y||g0.level<2?4:0),V0(g0,x0),g0.status=ri,j0($),g0.pending!==0)return g0.last_flush=-1,e}if(g0.status===Ue){if(g0.gzhead.extra){let m0=g0.pending,we=(g0.gzhead.extra.length&65535)-g0.gzindex;for(;g0.pending+we>g0.pending_buf_size;){let Oe=g0.pending_buf_size-g0.pending;if(g0.pending_buf.set(g0.gzhead.extra.subarray(g0.gzindex,g0.gzindex+Oe),g0.pending),g0.pending=g0.pending_buf_size,g0.gzhead.hcrc&&g0.pending>m0&&($.adler=w($.adler,g0.pending_buf,g0.pending-m0,m0)),g0.gzindex+=Oe,j0($),g0.pending!==0)return g0.last_flush=-1,e;m0=0,we-=Oe}let He=new Uint8Array(g0.gzhead.extra);g0.pending_buf.set(He.subarray(g0.gzindex,g0.gzindex+we),g0.pending),g0.pending+=we,g0.gzhead.hcrc&&g0.pending>m0&&($.adler=w($.adler,g0.pending_buf,g0.pending-m0,m0)),g0.gzindex=0}g0.status=qe}if(g0.status===qe){if(g0.gzhead.name){let m0=g0.pending,we;do{if(g0.pending===g0.pending_buf_size){if(g0.gzhead.hcrc&&g0.pending>m0&&($.adler=w($.adler,g0.pending_buf,g0.pending-m0,m0)),j0($),g0.pending!==0)return g0.last_flush=-1,e;m0=0}g0.gzindexm0&&($.adler=w($.adler,g0.pending_buf,g0.pending-m0,m0)),g0.gzindex=0}g0.status=$e}if(g0.status===$e){if(g0.gzhead.comment){let m0=g0.pending,we;do{if(g0.pending===g0.pending_buf_size){if(g0.gzhead.hcrc&&g0.pending>m0&&($.adler=w($.adler,g0.pending_buf,g0.pending-m0,m0)),j0($),g0.pending!==0)return g0.last_flush=-1,e;m0=0}g0.gzindexm0&&($.adler=w($.adler,g0.pending_buf,g0.pending-m0,m0))}g0.status=oi}if(g0.status===oi){if(g0.gzhead.hcrc){if(g0.pending+2>g0.pending_buf_size&&(j0($),g0.pending!==0))return g0.last_flush=-1,e;V0(g0,$.adler&255),V0(g0,$.adler>>8&255),$.adler=0}if(g0.status=ri,j0($),g0.pending!==0)return g0.last_flush=-1,e}if($.avail_in!==0||g0.lookahead!==0||Z0!==R&&g0.status!==be){let m0=g0.level===0?U0(g0,Z0):g0.strategy===y?ue(g0,Z0):g0.strategy===Y?oe(g0,Z0):b0[g0.level].func(g0,Z0);if((m0===M0||m0===se)&&(g0.status=be),m0===Ge||m0===M0)return $.avail_out===0&&(g0.last_flush=-1),e;if(m0===J0&&(Z0===L?S(g0):Z0!==E&&(u(g0,0,0,!1),Z0===P&&(N0(g0.head),g0.lookahead===0&&(g0.strstart=0,g0.block_start=0,g0.insert=0))),j0($),$.avail_out===0))return g0.last_flush=-1,e}return Z0!==d?e:g0.wrap<=0?N:(g0.wrap===2?(V0(g0,$.adler&255),V0(g0,$.adler>>8&255),V0(g0,$.adler>>16&255),V0(g0,$.adler>>24&255),V0(g0,$.total_in&255),V0(g0,$.total_in>>8&255),V0(g0,$.total_in>>16&255),V0(g0,$.total_in>>24&255)):(pe(g0,$.adler>>>16),pe(g0,$.adler&65535)),j0($),g0.wrap>0&&(g0.wrap=-g0.wrap),g0.pending!==0?e:N)},Ci=$=>{if(Fe($))return q;const Z0=$.state.status;return $.state=null,Z0===ri?R0($,z):e},y0=($,Z0)=>{let g0=Z0.length;if(Fe($))return q;const k0=$.state,m0=k0.wrap;if(m0===2||m0===1&&k0.status!==De||k0.lookahead)return q;if(m0===1&&($.adler=v($.adler,Z0,g0,0)),k0.wrap=0,g0>=k0.w_size){m0===0&&(N0(k0.head),k0.strstart=0,k0.block_start=0,k0.insert=0);let P0=new Uint8Array(k0.w_size);P0.set(Z0.subarray(g0-k0.w_size,g0),0),Z0=P0,g0=k0.w_size}const we=$.avail_in,He=$.next_in,Oe=$.input;for($.avail_in=g0,$.next_in=0,$.input=Z0,W(k0);k0.lookahead>=ee;){let P0=k0.strstart,ci=k0.lookahead-(ee-1);do k0.ins_h=E0(k0,k0.ins_h,k0.window[P0+ee-1]),k0.prev[P0&k0.w_mask]=k0.head[k0.ins_h],k0.head[k0.ins_h]=P0,P0++;while(--ci);k0.strstart=P0,k0.lookahead=ee-1,W(k0)}return k0.strstart+=k0.lookahead,k0.block_start=k0.strstart,k0.insert=k0.lookahead,k0.lookahead=0,k0.match_length=k0.prev_length=ee-1,k0.match_available=0,$.next_in=He,$.input=Oe,$.avail_in=we,k0.wrap=m0,e};return deflate.deflateInit=W0,deflate.deflateInit2=Ye,deflate.deflateReset=Me,deflate.deflateResetKeep=u0,deflate.deflateSetHeader=L0,deflate.deflate=re,deflate.deflateEnd=Ci,deflate.deflateSetDictionary=y0,deflate.deflateInfo="pako deflate (from Nodeca project)",deflate}var common={},hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common;hasRequiredCommon=1;const T=(u,m)=>Object.prototype.hasOwnProperty.call(u,m);return common.assign=function(u){const m=Array.prototype.slice.call(arguments,1);for(;m.length;){const A=m.shift();if(A){if(typeof A!="object")throw new TypeError(A+"must be non-object");for(const S in A)T(A,S)&&(u[S]=A[S])}}return u},common.flattenChunks=u=>{let m=0;for(let S=0,v=u.length;S=252?6:A>=248?5:A>=240?4:A>=224?3:A>=192?2:1;u[254]=u[254]=1,strings.string2buf=A=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(A);let S,v,w,D,R,L=A.length,P=0;for(D=0;D>>6,S[R++]=128|v&63):v<65536?(S[R++]=224|v>>>12,S[R++]=128|v>>>6&63,S[R++]=128|v&63):(S[R++]=240|v>>>18,S[R++]=128|v>>>12&63,S[R++]=128|v>>>6&63,S[R++]=128|v&63);return S};const m=(A,S)=>{if(S<65534&&A.subarray&&T)return String.fromCharCode.apply(null,A.length===S?A:A.subarray(0,S));let v="";for(let w=0;w{const v=S||A.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(A.subarray(0,S));let w,D;const R=new Array(v*2);for(D=0,w=0;w4){R[D++]=65533,w+=P-1;continue}for(L&=P===2?31:P===3?15:7;P>1&&w1){R[D++]=65533;continue}L<65536?R[D++]=L:(L-=65536,R[D++]=55296|L>>10&1023,R[D++]=56320|L&1023)}return m(R,D)},strings.utf8border=(A,S)=>{S=S||A.length,S>A.length&&(S=A.length);let v=S-1;for(;v>=0&&(A[v]&192)===128;)v--;return v<0||v===0?S:v+u[A[v]]>S?v:S},strings}var zstream,hasRequiredZstream;function requireZstream(){if(hasRequiredZstream)return zstream;hasRequiredZstream=1;function T(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}return zstream=T,zstream}var hasRequiredDeflate;function requireDeflate(){if(hasRequiredDeflate)return deflate$1;hasRequiredDeflate=1;const T=requireDeflate$1(),u=requireCommon(),m=requireStrings(),A=requireMessages(),S=requireZstream(),v=Object.prototype.toString,{Z_NO_FLUSH:w,Z_SYNC_FLUSH:D,Z_FULL_FLUSH:R,Z_FINISH:L,Z_OK:P,Z_STREAM_END:d,Z_DEFAULT_COMPRESSION:E,Z_DEFAULT_STRATEGY:e,Z_DEFLATED:N}=requireConstants();function q(j){this.options=u.assign({level:E,method:N,chunkSize:16384,windowBits:15,memLevel:8,strategy:e},j||{});let y=this.options;y.raw&&y.windowBits>0?y.windowBits=-y.windowBits:y.gzip&&y.windowBits>0&&y.windowBits<16&&(y.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new S,this.strm.avail_out=0;let Y=T.deflateInit2(this.strm,y.level,y.method,y.windowBits,y.memLevel,y.strategy);if(Y!==P)throw new Error(A[Y]);if(y.header&&T.deflateSetHeader(this.strm,y.header),y.dictionary){let G;if(typeof y.dictionary=="string"?G=m.string2buf(y.dictionary):v.call(y.dictionary)==="[object ArrayBuffer]"?G=new Uint8Array(y.dictionary):G=y.dictionary,Y=T.deflateSetDictionary(this.strm,G),Y!==P)throw new Error(A[Y]);this._dict_set=!0}}q.prototype.push=function(j,y){const Y=this.strm,G=this.options.chunkSize;let J,i0;if(this.ended)return!1;for(y===~~y?i0=y:i0=y===!0?L:w,typeof j=="string"?Y.input=m.string2buf(j):v.call(j)==="[object ArrayBuffer]"?Y.input=new Uint8Array(j):Y.input=j,Y.next_in=0,Y.avail_in=Y.input.length;;){if(Y.avail_out===0&&(Y.output=new Uint8Array(G),Y.next_out=0,Y.avail_out=G),(i0===D||i0===R)&&Y.avail_out<=6){this.onData(Y.output.subarray(0,Y.next_out)),Y.avail_out=0;continue}if(J=T.deflate(Y,i0),J===d)return Y.next_out>0&&this.onData(Y.output.subarray(0,Y.next_out)),J=T.deflateEnd(this.strm),this.onEnd(J),this.ended=!0,J===P;if(Y.avail_out===0){this.onData(Y.output);continue}if(i0>0&&Y.next_out>0){this.onData(Y.output.subarray(0,Y.next_out)),Y.avail_out=0;continue}if(Y.avail_in===0)break}return!0},q.prototype.onData=function(j){this.chunks.push(j)},q.prototype.onEnd=function(j){j===P&&(this.result=u.flattenChunks(this.chunks)),this.chunks=[],this.err=j,this.msg=this.strm.msg};function z(j,y){const Y=new q(y);if(Y.push(j,!0),Y.err)throw Y.msg||A[Y.err];return Y.result}function e0(j,y){return y=y||{},y.raw=!0,z(j,y)}function H(j,y){return y=y||{},y.gzip=!0,z(j,y)}return deflate$1.Deflate=q,deflate$1.deflate=z,deflate$1.deflateRaw=e0,deflate$1.gzip=H,deflate$1.constants=requireConstants(),deflate$1}var inflate$1={},inflate={},inffast,hasRequiredInffast;function requireInffast(){if(hasRequiredInffast)return inffast;hasRequiredInffast=1;const T=16209,u=16191;return inffast=function(A,S){let v,w,D,R,L,P,d,E,e,N,q,z,e0,H,j,y,Y,G,J,i0,Q,f,l0,o0;const c0=A.state;v=A.next_in,l0=A.input,w=v+(A.avail_in-5),D=A.next_out,o0=A.output,R=D-(S-A.avail_out),L=D+(A.avail_out-257),P=c0.dmax,d=c0.wsize,E=c0.whave,e=c0.wnext,N=c0.window,q=c0.hold,z=c0.bits,e0=c0.lencode,H=c0.distcode,j=(1<>>24,q>>>=G,z-=G,G=Y>>>16&255,G===0)o0[D++]=Y&65535;else if(G&16){J=Y&65535,G&=15,G&&(z>>=G,z-=G),z<15&&(q+=l0[v++]<>>24,q>>>=G,z-=G,G=Y>>>16&255,G&16){if(i0=Y&65535,G&=15,zP){A.msg="invalid distance too far back",c0.mode=T;break e}if(q>>>=G,z-=G,G=D-R,i0>G){if(G=i0-G,G>E&&c0.sane){A.msg="invalid distance too far back",c0.mode=T;break e}if(Q=0,f=N,e===0){if(Q+=d-G,G2;)o0[D++]=f[Q++],o0[D++]=f[Q++],o0[D++]=f[Q++],J-=3;J&&(o0[D++]=f[Q++],J>1&&(o0[D++]=f[Q++]))}else{Q=D-i0;do o0[D++]=o0[Q++],o0[D++]=o0[Q++],o0[D++]=o0[Q++],J-=3;while(J>2);J&&(o0[D++]=o0[Q++],J>1&&(o0[D++]=o0[Q++]))}}else if(G&64){A.msg="invalid distance code",c0.mode=T;break e}else{Y=H[(Y&65535)+(q&(1<>3,v-=J,z-=J<<3,q&=(1<{const j=H.bits;let y=0,Y=0,G=0,J=0,i0=0,Q=0,f=0,l0=0,o0=0,c0=0,d0,S0,p0,T0,C0,F0=null,ee;const ie=new Uint16Array(T+1),ke=new Uint16Array(T+1);let Le=null,De,I0,Ue;for(y=0;y<=T;y++)ie[y]=0;for(Y=0;Y=1&&ie[J]===0;J--);if(i0>J&&(i0=J),J===0)return q[z++]=1<<24|64<<16|0,q[z++]=1<<24|64<<16|0,H.bits=1,0;for(G=1;G0&&(d===A||J!==1))return-1;for(ke[1]=0,y=1;yu||d===v&&o0>m)return 1;for(;;){De=y-f,e0[Y]+1=ee?(I0=Le[e0[Y]-ee],Ue=F0[e0[Y]-ee]):(I0=96,Ue=0),d0=1<>f)+S0]=De<<24|I0<<16|Ue|0;while(S0!==0);for(d0=1<>=1;if(d0!==0?(c0&=d0-1,c0+=d0):c0=0,Y++,--ie[y]===0){if(y===J)break;y=E[e+e0[Y]]}if(y>i0&&(c0&T0)!==p0){for(f===0&&(f=i0),C0+=G,Q=y-f,l0=1<u||d===v&&o0>m)return 1;p0=c0&T0,q[p0]=i0<<24|Q<<16|C0-z|0}}return c0!==0&&(q[C0+c0]=y-f<<24|64<<16|0),H.bits=i0,0},inftrees}var hasRequiredInflate$1;function requireInflate$1(){if(hasRequiredInflate$1)return inflate;hasRequiredInflate$1=1;const T=requireAdler32(),u=requireCrc32(),m=requireInffast(),A=requireInftrees(),S=0,v=1,w=2,{Z_FINISH:D,Z_BLOCK:R,Z_TREES:L,Z_OK:P,Z_STREAM_END:d,Z_NEED_DICT:E,Z_STREAM_ERROR:e,Z_DATA_ERROR:N,Z_MEM_ERROR:q,Z_BUF_ERROR:z,Z_DEFLATED:e0}=requireConstants(),H=16180,j=16181,y=16182,Y=16183,G=16184,J=16185,i0=16186,Q=16187,f=16188,l0=16189,o0=16190,c0=16191,d0=16192,S0=16193,p0=16194,T0=16195,C0=16196,F0=16197,ee=16198,ie=16199,ke=16200,Le=16201,De=16202,I0=16203,Ue=16204,qe=16205,$e=16206,oi=16207,ri=16208,be=16209,Ge=16210,J0=16211,M0=852,se=592,R0=15,me=D0=>(D0>>>24&255)+(D0>>>8&65280)+((D0&65280)<<8)+((D0&255)<<24);function N0(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const O0=D0=>{if(!D0)return 1;const b0=D0.state;return!b0||b0.strm!==D0||b0.modeJ0?1:0},B0=D0=>{if(O0(D0))return e;const b0=D0.state;return D0.total_in=D0.total_out=b0.total=0,D0.msg="",b0.wrap&&(D0.adler=b0.wrap&1),b0.mode=H,b0.last=0,b0.havedict=0,b0.flags=-1,b0.dmax=32768,b0.head=null,b0.hold=0,b0.bits=0,b0.lencode=b0.lendyn=new Int32Array(M0),b0.distcode=b0.distdyn=new Int32Array(se),b0.sane=1,b0.back=-1,P},E0=D0=>{if(O0(D0))return e;const b0=D0.state;return b0.wsize=0,b0.whave=0,b0.wnext=0,B0(D0)},j0=(D0,b0)=>{let n0;if(O0(D0))return e;const h0=D0.state;return b0<0?(n0=0,b0=-b0):(n0=(b0>>4)+5,b0<48&&(b0&=15)),b0&&(b0<8||b0>15)?e:(h0.window!==null&&h0.wbits!==b0&&(h0.window=null),h0.wrap=n0,h0.wbits=b0,E0(D0))},z0=(D0,b0)=>{if(!D0)return e;const n0=new N0;D0.state=n0,n0.strm=D0,n0.window=null,n0.mode=H;const h0=j0(D0,b0);return h0!==P&&(D0.state=null),h0},V0=D0=>z0(D0,R0);let pe=!0,q0,K0;const W=D0=>{if(pe){q0=new Int32Array(512),K0=new Int32Array(32);let b0=0;for(;b0<144;)D0.lens[b0++]=8;for(;b0<256;)D0.lens[b0++]=9;for(;b0<280;)D0.lens[b0++]=7;for(;b0<288;)D0.lens[b0++]=8;for(A(v,D0.lens,0,288,q0,0,D0.work,{bits:9}),b0=0;b0<32;)D0.lens[b0++]=5;A(w,D0.lens,0,32,K0,0,D0.work,{bits:5}),pe=!1}D0.lencode=q0,D0.lenbits=9,D0.distcode=K0,D0.distbits=5},U0=(D0,b0,n0,h0)=>{let Fe;const u0=D0.state;return u0.window===null&&(u0.wsize=1<=u0.wsize?(u0.window.set(b0.subarray(n0-u0.wsize,n0),0),u0.wnext=0,u0.whave=u0.wsize):(Fe=u0.wsize-u0.wnext,Fe>h0&&(Fe=h0),u0.window.set(b0.subarray(n0-h0,n0-h0+Fe),u0.wnext),h0-=Fe,h0?(u0.window.set(b0.subarray(n0-h0,n0),0),u0.wnext=h0,u0.whave=u0.wsize):(u0.wnext+=Fe,u0.wnext===u0.wsize&&(u0.wnext=0),u0.whave{let n0,h0,Fe,u0,Me,L0,Ye,W0,re,Ci,y0,$,Z0,g0,k0=0,m0,we,He,Oe,P0,ci,ki,Qi;const Fi=new Uint8Array(4);let $i,ae;const Ae=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(O0(D0)||!D0.output||!D0.input&&D0.avail_in!==0)return e;n0=D0.state,n0.mode===c0&&(n0.mode=d0),Me=D0.next_out,Fe=D0.output,Ye=D0.avail_out,u0=D0.next_in,h0=D0.input,L0=D0.avail_in,W0=n0.hold,re=n0.bits,Ci=L0,y0=Ye,Qi=P;e:for(;;)switch(n0.mode){case H:if(n0.wrap===0){n0.mode=d0;break}for(;re<16;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>8&255,n0.check=u(n0.check,Fi,2,0),W0=0,re=0,n0.mode=j;break}if(n0.head&&(n0.head.done=!1),!(n0.wrap&1)||(((W0&255)<<8)+(W0>>8))%31){D0.msg="incorrect header check",n0.mode=be;break}if((W0&15)!==e0){D0.msg="unknown compression method",n0.mode=be;break}if(W0>>>=4,re-=4,ki=(W0&15)+8,n0.wbits===0&&(n0.wbits=ki),ki>15||ki>n0.wbits){D0.msg="invalid window size",n0.mode=be;break}n0.dmax=1<>8&1),n0.flags&512&&n0.wrap&4&&(Fi[0]=W0&255,Fi[1]=W0>>>8&255,n0.check=u(n0.check,Fi,2,0)),W0=0,re=0,n0.mode=y;case y:for(;re<32;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>8&255,Fi[2]=W0>>>16&255,Fi[3]=W0>>>24&255,n0.check=u(n0.check,Fi,4,0)),W0=0,re=0,n0.mode=Y;case Y:for(;re<16;){if(L0===0)break e;L0--,W0+=h0[u0++]<>8),n0.flags&512&&n0.wrap&4&&(Fi[0]=W0&255,Fi[1]=W0>>>8&255,n0.check=u(n0.check,Fi,2,0)),W0=0,re=0,n0.mode=G;case G:if(n0.flags&1024){for(;re<16;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>8&255,n0.check=u(n0.check,Fi,2,0)),W0=0,re=0}else n0.head&&(n0.head.extra=null);n0.mode=J;case J:if(n0.flags&1024&&($=n0.length,$>L0&&($=L0),$&&(n0.head&&(ki=n0.head.extra_len-n0.length,n0.head.extra||(n0.head.extra=new Uint8Array(n0.head.extra_len)),n0.head.extra.set(h0.subarray(u0,u0+$),ki)),n0.flags&512&&n0.wrap&4&&(n0.check=u(n0.check,h0,$,u0)),L0-=$,u0+=$,n0.length-=$),n0.length))break e;n0.length=0,n0.mode=i0;case i0:if(n0.flags&2048){if(L0===0)break e;$=0;do ki=h0[u0+$++],n0.head&&ki&&n0.length<65536&&(n0.head.name+=String.fromCharCode(ki));while(ki&&$>9&1,n0.head.done=!0),D0.adler=n0.check=0,n0.mode=c0;break;case l0:for(;re<32;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=re&7,re-=re&7,n0.mode=$e;break}for(;re<3;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=1,re-=1,W0&3){case 0:n0.mode=S0;break;case 1:if(W(n0),n0.mode=ie,b0===L){W0>>>=2,re-=2;break e}break;case 2:n0.mode=C0;break;case 3:D0.msg="invalid block type",n0.mode=be}W0>>>=2,re-=2;break;case S0:for(W0>>>=re&7,re-=re&7;re<32;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>16^65535)){D0.msg="invalid stored block lengths",n0.mode=be;break}if(n0.length=W0&65535,W0=0,re=0,n0.mode=p0,b0===L)break e;case p0:n0.mode=T0;case T0:if($=n0.length,$){if($>L0&&($=L0),$>Ye&&($=Ye),$===0)break e;Fe.set(h0.subarray(u0,u0+$),Me),L0-=$,u0+=$,Ye-=$,Me+=$,n0.length-=$;break}n0.mode=c0;break;case C0:for(;re<14;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=5,re-=5,n0.ndist=(W0&31)+1,W0>>>=5,re-=5,n0.ncode=(W0&15)+4,W0>>>=4,re-=4,n0.nlen>286||n0.ndist>30){D0.msg="too many length or distance symbols",n0.mode=be;break}n0.have=0,n0.mode=F0;case F0:for(;n0.have>>=3,re-=3}for(;n0.have<19;)n0.lens[Ae[n0.have++]]=0;if(n0.lencode=n0.lendyn,n0.lenbits=7,$i={bits:n0.lenbits},Qi=A(S,n0.lens,0,19,n0.lencode,0,n0.work,$i),n0.lenbits=$i.bits,Qi){D0.msg="invalid code lengths set",n0.mode=be;break}n0.have=0,n0.mode=ee;case ee:for(;n0.have>>24,we=k0>>>16&255,He=k0&65535,!(m0<=re);){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=m0,re-=m0,n0.lens[n0.have++]=He;else{if(He===16){for(ae=m0+2;re>>=m0,re-=m0,n0.have===0){D0.msg="invalid bit length repeat",n0.mode=be;break}ki=n0.lens[n0.have-1],$=3+(W0&3),W0>>>=2,re-=2}else if(He===17){for(ae=m0+3;re>>=m0,re-=m0,ki=0,$=3+(W0&7),W0>>>=3,re-=3}else{for(ae=m0+7;re>>=m0,re-=m0,ki=0,$=11+(W0&127),W0>>>=7,re-=7}if(n0.have+$>n0.nlen+n0.ndist){D0.msg="invalid bit length repeat",n0.mode=be;break}for(;$--;)n0.lens[n0.have++]=ki}}if(n0.mode===be)break;if(n0.lens[256]===0){D0.msg="invalid code -- missing end-of-block",n0.mode=be;break}if(n0.lenbits=9,$i={bits:n0.lenbits},Qi=A(v,n0.lens,0,n0.nlen,n0.lencode,0,n0.work,$i),n0.lenbits=$i.bits,Qi){D0.msg="invalid literal/lengths set",n0.mode=be;break}if(n0.distbits=6,n0.distcode=n0.distdyn,$i={bits:n0.distbits},Qi=A(w,n0.lens,n0.nlen,n0.ndist,n0.distcode,0,n0.work,$i),n0.distbits=$i.bits,Qi){D0.msg="invalid distances set",n0.mode=be;break}if(n0.mode=ie,b0===L)break e;case ie:n0.mode=ke;case ke:if(L0>=6&&Ye>=258){D0.next_out=Me,D0.avail_out=Ye,D0.next_in=u0,D0.avail_in=L0,n0.hold=W0,n0.bits=re,m(D0,y0),Me=D0.next_out,Fe=D0.output,Ye=D0.avail_out,u0=D0.next_in,h0=D0.input,L0=D0.avail_in,W0=n0.hold,re=n0.bits,n0.mode===c0&&(n0.back=-1);break}for(n0.back=0;k0=n0.lencode[W0&(1<>>24,we=k0>>>16&255,He=k0&65535,!(m0<=re);){if(L0===0)break e;L0--,W0+=h0[u0++]<>Oe)],m0=k0>>>24,we=k0>>>16&255,He=k0&65535,!(Oe+m0<=re);){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=Oe,re-=Oe,n0.back+=Oe}if(W0>>>=m0,re-=m0,n0.back+=m0,n0.length=He,we===0){n0.mode=qe;break}if(we&32){n0.back=-1,n0.mode=c0;break}if(we&64){D0.msg="invalid literal/length code",n0.mode=be;break}n0.extra=we&15,n0.mode=Le;case Le:if(n0.extra){for(ae=n0.extra;re>>=n0.extra,re-=n0.extra,n0.back+=n0.extra}n0.was=n0.length,n0.mode=De;case De:for(;k0=n0.distcode[W0&(1<>>24,we=k0>>>16&255,He=k0&65535,!(m0<=re);){if(L0===0)break e;L0--,W0+=h0[u0++]<>Oe)],m0=k0>>>24,we=k0>>>16&255,He=k0&65535,!(Oe+m0<=re);){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=Oe,re-=Oe,n0.back+=Oe}if(W0>>>=m0,re-=m0,n0.back+=m0,we&64){D0.msg="invalid distance code",n0.mode=be;break}n0.offset=He,n0.extra=we&15,n0.mode=I0;case I0:if(n0.extra){for(ae=n0.extra;re>>=n0.extra,re-=n0.extra,n0.back+=n0.extra}if(n0.offset>n0.dmax){D0.msg="invalid distance too far back",n0.mode=be;break}n0.mode=Ue;case Ue:if(Ye===0)break e;if($=y0-Ye,n0.offset>$){if($=n0.offset-$,$>n0.whave&&n0.sane){D0.msg="invalid distance too far back",n0.mode=be;break}$>n0.wnext?($-=n0.wnext,Z0=n0.wsize-$):Z0=n0.wnext-$,$>n0.length&&($=n0.length),g0=n0.window}else g0=Fe,Z0=Me-n0.offset,$=n0.length;$>Ye&&($=Ye),Ye-=$,n0.length-=$;do Fe[Me++]=g0[Z0++];while(--$);n0.length===0&&(n0.mode=ke);break;case qe:if(Ye===0)break e;Fe[Me++]=n0.length,Ye--,n0.mode=ke;break;case $e:if(n0.wrap){for(;re<32;){if(L0===0)break e;L0--,W0|=h0[u0++]<{if(O0(D0))return e;let b0=D0.state;return b0.window&&(b0.window=null),D0.state=null,P},oe=(D0,b0)=>{if(O0(D0))return e;const n0=D0.state;return n0.wrap&2?(n0.head=b0,b0.done=!1,P):e},ue=(D0,b0)=>{const n0=b0.length;let h0,Fe,u0;return O0(D0)||(h0=D0.state,h0.wrap!==0&&h0.mode!==o0)?e:h0.mode===o0&&(Fe=1,Fe=T(Fe,b0,n0,0),Fe!==h0.check)?N:(u0=U0(D0,b0,n0,n0),u0?(h0.mode=Ge,q):(h0.havedict=1,P))};return inflate.inflateReset=E0,inflate.inflateReset2=j0,inflate.inflateResetKeep=B0,inflate.inflateInit=V0,inflate.inflateInit2=z0,inflate.inflate=X0,inflate.inflateEnd=Q0,inflate.inflateGetHeader=oe,inflate.inflateSetDictionary=ue,inflate.inflateInfo="pako inflate (from Nodeca project)",inflate}var gzheader,hasRequiredGzheader;function requireGzheader(){if(hasRequiredGzheader)return gzheader;hasRequiredGzheader=1;function T(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}return gzheader=T,gzheader}var hasRequiredInflate;function requireInflate(){if(hasRequiredInflate)return inflate$1;hasRequiredInflate=1;const T=requireInflate$1(),u=requireCommon(),m=requireStrings(),A=requireMessages(),S=requireZstream(),v=requireGzheader(),w=Object.prototype.toString,{Z_NO_FLUSH:D,Z_FINISH:R,Z_OK:L,Z_STREAM_END:P,Z_NEED_DICT:d,Z_STREAM_ERROR:E,Z_DATA_ERROR:e,Z_MEM_ERROR:N}=requireConstants();function q(H){this.options=u.assign({chunkSize:1024*64,windowBits:15,to:""},H||{});const j=this.options;j.raw&&j.windowBits>=0&&j.windowBits<16&&(j.windowBits=-j.windowBits,j.windowBits===0&&(j.windowBits=-15)),j.windowBits>=0&&j.windowBits<16&&!(H&&H.windowBits)&&(j.windowBits+=32),j.windowBits>15&&j.windowBits<48&&(j.windowBits&15||(j.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new S,this.strm.avail_out=0;let y=T.inflateInit2(this.strm,j.windowBits);if(y!==L)throw new Error(A[y]);if(this.header=new v,T.inflateGetHeader(this.strm,this.header),j.dictionary&&(typeof j.dictionary=="string"?j.dictionary=m.string2buf(j.dictionary):w.call(j.dictionary)==="[object ArrayBuffer]"&&(j.dictionary=new Uint8Array(j.dictionary)),j.raw&&(y=T.inflateSetDictionary(this.strm,j.dictionary),y!==L)))throw new Error(A[y])}q.prototype.push=function(H,j){const y=this.strm,Y=this.options.chunkSize,G=this.options.dictionary;let J,i0,Q;if(this.ended)return!1;for(j===~~j?i0=j:i0=j===!0?R:D,w.call(H)==="[object ArrayBuffer]"?y.input=new Uint8Array(H):y.input=H,y.next_in=0,y.avail_in=y.input.length;;){for(y.avail_out===0&&(y.output=new Uint8Array(Y),y.next_out=0,y.avail_out=Y),J=T.inflate(y,i0),J===d&&G&&(J=T.inflateSetDictionary(y,G),J===L?J=T.inflate(y,i0):J===e&&(J=d));y.avail_in>0&&J===P&&y.state.wrap>0&&H[y.next_in]!==0;)T.inflateReset(y),J=T.inflate(y,i0);switch(J){case E:case e:case d:case N:return this.onEnd(J),this.ended=!0,!1}if(Q=y.avail_out,y.next_out&&(y.avail_out===0||J===P))if(this.options.to==="string"){let f=m.utf8border(y.output,y.next_out),l0=y.next_out-f,o0=m.buf2string(y.output,f);y.next_out=l0,y.avail_out=Y-l0,l0&&y.output.set(y.output.subarray(f,f+l0),0),this.onData(o0)}else this.onData(y.output.length===y.next_out?y.output:y.output.subarray(0,y.next_out));if(!(J===L&&Q===0)){if(J===P)return J=T.inflateEnd(this.strm),this.onEnd(J),this.ended=!0,!0;if(y.avail_in===0)break}}return!0},q.prototype.onData=function(H){this.chunks.push(H)},q.prototype.onEnd=function(H){H===L&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=u.flattenChunks(this.chunks)),this.chunks=[],this.err=H,this.msg=this.strm.msg};function z(H,j){const y=new q(j);if(y.push(H),y.err)throw y.msg||A[y.err];return y.result}function e0(H,j){return j=j||{},j.raw=!0,z(H,j)}return inflate$1.Inflate=q,inflate$1.inflate=z,inflate$1.inflateRaw=e0,inflate$1.ungzip=z,inflate$1.constants=requireConstants(),inflate$1}var hasRequiredPako;function requirePako(){if(hasRequiredPako)return pako;hasRequiredPako=1;const{Deflate:T,deflate:u,deflateRaw:m,gzip:A}=requireDeflate(),{Inflate:S,inflate:v,inflateRaw:w,ungzip:D}=requireInflate(),R=requireConstants();return pako.Deflate=T,pako.deflate=u,pako.deflateRaw=m,pako.gzip=A,pako.Inflate=S,pako.inflate=v,pako.inflateRaw=w,pako.ungzip=D,pako.constants=R,pako}var hasRequiredParser;function requireParser(){return hasRequiredParser||(hasRequiredParser=1,function(T){var u=u||{};u.Tag=u.Tag||(typeof commonjsRequire<"u"?requireTag():null),u.Utils=u.Utils||(typeof commonjsRequire<"u"?requireUtilities():null),u.Dictionary=u.Dictionary||(typeof commonjsRequire<"u"?requireDictionary():null),u.Image=u.Image||(typeof commonjsRequire<"u"?requireImage():null);var m=m||(typeof commonjsRequire<"u"?requirePako():null);u.Parser=u.Parser||function(){this.littleEndian=!0,this.explicit=!0,this.metaFound=!1,this.metaFinished=!1,this.metaFinishedOffset=-1,this.needsDeflate=!1,this.inflated=null,this.encapsulation=!1,this.level=0,this.error=null},u.Parser.verbose=!1,u.Parser.MAGIC_COOKIE_OFFSET=128,u.Parser.MAGIC_COOKIE=[68,73,67,77],u.Parser.VRS=["AE","AS","AT","CS","DA","DS","DT","FL","FD","IS","LO","LT","OB","OD","OF","OW","PN","SH","SL","SS","ST","TM","UI","UL","UN","US","UT","UC"],u.Parser.DATA_VRS=["OB","OW","OF","SQ","UT","UN","UC"],u.Parser.RAW_DATA_VRS=["OB","OD","OF","OW","UN"],u.Parser.TRANSFER_SYNTAX_IMPLICIT_LITTLE="1.2.840.10008.1.2",u.Parser.TRANSFER_SYNTAX_EXPLICIT_LITTLE="1.2.840.10008.1.2.1",u.Parser.TRANSFER_SYNTAX_EXPLICIT_BIG="1.2.840.10008.1.2.2",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG="1.2.840.10008.1.2.4",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LOSSLESS="1.2.840.10008.1.2.4.57",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LOSSLESS_SEL1="1.2.840.10008.1.2.4.70",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_BASELINE_8BIT="1.2.840.10008.1.2.4.50",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_BASELINE_12BIT="1.2.840.10008.1.2.4.51",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LS_LOSSLESS="1.2.840.10008.1.2.4.80",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LS="1.2.840.10008.1.2.4.81",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_2000_LOSSLESS="1.2.840.10008.1.2.4.90",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_2000="1.2.840.10008.1.2.4.91",u.Parser.TRANSFER_SYNTAX_COMPRESSION_RLE="1.2.840.10008.1.2.5",u.Parser.TRANSFER_SYNTAX_COMPRESSION_DEFLATE="1.2.840.10008.1.2.1.99",u.Parser.UNDEFINED_LENGTH=4294967295,u.Parser.isMagicCookieFound=function(A){var S=u.Parser.MAGIC_COOKIE_OFFSET,v=u.Parser.MAGIC_COOKIE.length,w;for(w=0;w=this.metaFinishedOffset&&(this.needsDeflate=!1,D=A.buffer.slice(0,w.offsetEnd),R=A.buffer.slice(w.offsetEnd),this.inflated=u.Utils.concatArrayBuffers(D,m.inflateRaw(R)),A=new DataView(this.inflated)),w=this.getNextTag(A,w.offsetEnd)}catch(L){this.error=L}return S!==null&&(S.littleEndian=this.littleEndian),S},u.Parser.prototype.parseEncapsulated=function(A){var S=0,v,w=[];this.encapsulation=!0;try{for(v=this.getNextTag(A,S);v!==null;)v.isSublistItem()&&w.push(v),u.Parser.verbose&&console.log(v.toString()),v=this.getNextTag(A,v.offsetEnd)}catch(D){this.error=D}return w},u.Parser.prototype.testForValidTag=function(A){var S,v=null;try{S=this.findFirstTagOffset(A),v=this.getNextTag(A,S,!1)}catch(w){this.error=w}return v},u.Parser.prototype.getNextTag=function(A,S,v){var w=0,D,R=null,L=S,P,d=0,E=!0,e=null,N;if(S>=A.byteLength)return null;this.metaFinished?(E=this.littleEndian,w=A.getUint16(S,E)):(w=A.getUint16(S,!0),this.metaFinishedOffset!==-1&&S>=this.metaFinishedOffset||w!==2?(this.metaFinished=!0,E=this.littleEndian,w=A.getUint16(S,E)):E=!0),!this.metaFound&&w===2&&(this.metaFound=!0),S+=2,D=A.getUint16(S,E),S+=2,this.explicit||!this.metaFinished?(e=u.Utils.getStringAt(A,S,2),!this.metaFound&&this.metaFinished&&u.Parser.VRS.indexOf(e)===-1?(e=u.Dictionary.getVR(w,D),d=A.getUint32(S,E),S+=4,this.explicit=!1):(S+=2,u.Parser.DATA_VRS.indexOf(e)!==-1?(S+=2,d=A.getUint32(S,E),S+=4):(d=A.getUint16(S,E),S+=2))):(e=u.Dictionary.getVR(w,D),d=A.getUint32(S,E),d===u.Parser.UNDEFINED_LENGTH&&(e="SQ"),S+=4),P=S;var q=w===u.Tag.TAG_PIXEL_DATA[0]&&D===u.Tag.TAG_PIXEL_DATA[1],z=w===40&&D>=4609&&D<4864;if(e==="SQ"||!z&&!q&&!this.encapsulation&&u.Parser.DATA_VRS.indexOf(e)!==-1&&e!=="UC"?(R=this.parseSublist(A,S,d,e!=="SQ"),d===u.Parser.UNDEFINED_LENGTH&&(d=R[R.length-1].offsetEnd-S)):d>0&&!v&&(d===u.Parser.UNDEFINED_LENGTH&&q&&(d=A.byteLength-S),R=A.buffer.slice(S,S+d)),S+=d,N=new u.Tag(w,D,e,R,L,P,S,this.littleEndian,this.charset),N.value){if(N.isTransformSyntax())this.transformSyntaxAlreadyExist=!0,N.value[0]===u.Parser.TRANSFER_SYNTAX_IMPLICIT_LITTLE?(this.explicit=!1,this.littleEndian=!0):N.value[0]===u.Parser.TRANSFER_SYNTAX_EXPLICIT_BIG?(this.explicit=!0,this.littleEndian=!1):N.value[0]===u.Parser.TRANSFER_SYNTAX_COMPRESSION_DEFLATE?(this.needsDeflate=!0,this.explicit=!0,this.littleEndian=!0):(this.explicit=!0,this.littleEndian=!0);else if(N.isMetaLength())this.metaFinishedOffset=N.value[0]+S;else if(N.isCharset()){var e0=N.value;e0.length==2?e0=(e0[0]||"ISO 2022 IR 6")+"\\"+e0[1]:e0.length==1&&(e0=e0[0]),this.charset=e0}}return N},u.Parser.prototype.parseSublist=function(A,S,v,w){var D,R=S+v,L=[];if(this.level++,v===u.Parser.UNDEFINED_LENGTH){for(D=this.parseSublistItem(A,S,w);!D.isSequenceDelim();)L.push(D),S=D.offsetEnd,D=this.parseSublistItem(A,S,w);L.push(D)}else for(;Su.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&e>N&&e>q?L=P:N>u.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&N>e&&N>q?L=d:q>u.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&q>e&&q>N?L=E:L=null,L},u.Image.prototype.getCols=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_COLS[0],u.Tag.TAG_COLS[1]),0)},u.Image.prototype.getRows=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_ROWS[0],u.Tag.TAG_ROWS[1]),0)},u.Image.prototype.getSeriesDescription=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SERIES_DESCRIPTION[0],u.Tag.TAG_SERIES_DESCRIPTION[1]),0)},u.Image.prototype.getSeriesInstanceUID=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SERIES_INSTANCE_UID[0],u.Tag.TAG_SERIES_INSTANCE_UID[1]),0)},u.Image.prototype.getSeriesNumber=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SERIES_NUMBER[0],u.Tag.TAG_SERIES_NUMBER[1]),0)},u.Image.prototype.getEchoNumber=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_ECHO_NUMBER[0],u.Tag.TAG_ECHO_NUMBER[1]),0)},u.Image.prototype.getImagePosition=function(){return u.Image.getValueSafely(this.getTag(u.Tag.TAG_IMAGE_POSITION[0],u.Tag.TAG_IMAGE_POSITION[1]))},u.Image.prototype.getImageDirections=function(){return u.Image.getValueSafely(this.getTag(u.Tag.TAG_IMAGE_ORIENTATION[0],u.Tag.TAG_IMAGE_ORIENTATION[1]))},u.Image.prototype.getImagePositionSliceDir=function(w){var D=u.Image.getValueSafely(this.getTag(u.Tag.TAG_IMAGE_POSITION[0],u.Tag.TAG_IMAGE_POSITION[1]));return D&&w>=0?D[w]:0},u.Image.prototype.getModality=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_MODALITY[0],u.Tag.TAG_MODALITY[1]),0)},u.Image.prototype.getSliceLocation=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SLICE_LOCATION[0],u.Tag.TAG_SLICE_LOCATION[1]),0)},u.Image.prototype.getSliceLocationVector=function(){return u.Image.getValueSafely(this.getTag(u.Tag.TAG_SLICE_LOCATION_VECTOR[0],u.Tag.TAG_SLICE_LOCATION_VECTOR[1]))},u.Image.prototype.getImageNumber=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_IMAGE_NUM[0],u.Tag.TAG_IMAGE_NUM[1]),0)},u.Image.prototype.getTemporalPosition=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_TEMPORAL_POSITION[0],u.Tag.TAG_TEMPORAL_POSITION[1]),0)},u.Image.prototype.getTemporalNumber=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_NUMBER_TEMPORAL_POSITIONS[0],u.Tag.TAG_NUMBER_TEMPORAL_POSITIONS[1]),0)},u.Image.prototype.getSliceGap=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SLICE_GAP[0],u.Tag.TAG_SLICE_GAP[1]),0)},u.Image.prototype.getSliceThickness=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SLICE_THICKNESS[0],u.Tag.TAG_SLICE_THICKNESS[1]),0)},u.Image.prototype.getImageMax=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_IMAGE_MAX[0],u.Tag.TAG_IMAGE_MAX[1]),0)},u.Image.prototype.getImageMin=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_IMAGE_MIN[0],u.Tag.TAG_IMAGE_MIN[1]),0)},u.Image.prototype.getDataScaleSlope=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_DATA_SCALE_SLOPE[0],u.Tag.TAG_DATA_SCALE_SLOPE[1]),0)},u.Image.prototype.getDataScaleIntercept=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_DATA_SCALE_INTERCEPT[0],u.Tag.TAG_DATA_SCALE_INTERCEPT[1]),0)},u.Image.prototype.getDataScaleElscint=function(){var w=u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_DATA_SCALE_ELSCINT[0],u.Tag.TAG_DATA_SCALE_ELSCINT[1]),0);w||(w=1);var D=this.getPixelBandwidth();return w=Math.sqrt(D)/(10*w),w<=0&&(w=1),w},u.Image.prototype.getWindowWidth=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_WINDOW_WIDTH[0],u.Tag.TAG_WINDOW_WIDTH[1]),0)},u.Image.prototype.getWindowCenter=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_WINDOW_CENTER[0],u.Tag.TAG_WINDOW_CENTER[1]),0)},u.Image.prototype.getPixelBandwidth=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_PIXEL_BANDWIDTH[0],u.Tag.TAG_PIXEL_BANDWIDTH[1]),0)},u.Image.prototype.getSeriesId=function(){var w=this.getSeriesDescription(),D=this.getSeriesInstanceUID(),R=this.getSeriesNumber(),L=this.getEchoNumber(),P=this.getOrientation(),d=this.getCols(),E=this.getRows(),e="";return w!==null&&(e+=" "+w),D!==null&&(e+=" "+D),R!==null&&(e+=" "+R),L!==null&&(e+=" "+L),P!==null&&(e+=" "+P),e+=" ("+d+" x "+E+")",e},u.Image.prototype.getPixelSpacing=function(){return u.Image.getValueSafely(this.getTag(u.Tag.TAG_PIXEL_SPACING[0],u.Tag.TAG_PIXEL_SPACING[1]))},u.Image.prototype.getImageType=function(){return u.Image.getValueSafely(this.getTag(u.Tag.TAG_IMAGE_TYPE[0],u.Tag.TAG_IMAGE_TYPE[1]))},u.Image.prototype.getBitsStored=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_BITS_STORED[0],u.Tag.TAG_BITS_STORED[1]),0)},u.Image.prototype.getBitsAllocated=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_BITS_ALLOCATED[0],u.Tag.TAG_BITS_ALLOCATED[1]),0)},u.Image.prototype.getFrameTime=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_FRAME_TIME[0],u.Tag.TAG_FRAME_TIME[1]),0)},u.Image.prototype.getAcquisitionMatrix=function(){var w,D,R,L,P;return w=[0,0],w[0]=u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_ACQUISITION_MATRIX[0],u.Tag.TAG_ACQUISITION_MATRIX[1]),0),this.privateDataAll===null&&(this.privateDataAll=this.getAllInterpretedPrivateData()),this.privateDataAll!==null&&this.privateDataAll.length>0&&(R=this.privateDataAll.indexOf("AcquisitionMatrixText"),R!==-1&&(L=this.privateDataAll.indexOf(` -`,R),L!==-1&&(P=this.privateDataAll.substring(R,L),D=P.match(/\d+/g),D!==null&&D.length===2?(w[0]=D[0],w[1]=D[1]):D!==null&&D.length===1&&(w[0]=D[0])))),w[1]===0&&(w[1]=w[0]),w},u.Image.prototype.getTR=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_TR,u.Tag.TAG_TR[1]),0)},u.Image.prototype.putTag=function(w){this.tags[w.id]&&this.tags[w.id].value[0]!==w.value[0]||(this.tags[w.id]=w,this.putFlattenedTag(this.tagsFlat,w))},u.Image.prototype.putFlattenedTag=function(w,D){var R;if(D.sublist)for(R=0;Rj&&(j=y,G=d0);return D?{data:e,min:H,minIndex:Y,max:j,maxIndex:G,numCols:this.getCols(),numRows:this.getRows()}:e},u.Image.prototype.convertPalette=function(){var w,D,R,L,P,d,E,e,N,q,z,e0;if(w=this.tags[u.Tag.createId(u.Tag.TAG_PIXEL_DATA[0],u.Tag.TAG_PIXEL_DATA[1])].value,D=this.getPalleteValues(u.Tag.TAG_PALETTE_RED),R=this.getPalleteValues(u.Tag.TAG_PALETTE_GREEN),L=this.getPalleteValues(u.Tag.TAG_PALETTE_BLUE),D!==null&&D.length>0&&R!==null&&R.length>0&&L!==null&&L.length>0&&!this.convertedPalette){if(P=new DataView(new ArrayBuffer(this.getRows()*this.getCols()*this.getNumberOfFrames()*3)),d=parseInt(Math.ceil(this.getBitsAllocated()/8)),E=w.byteLength/d,d===1)for(e=0;eN&&(N=Math.abs(D[R]),E=R);for(N=0;R<6;R+=1)Math.abs(D[R])>N&&(N=Math.abs(D[R]),e=R);switch(E){case 0:q+="X",e===4?q+="YZ":q+="ZY";break;case 1:q+="Y",e===3?q+="XZ":q+="ZX";break;case 2:q+="Z",e===3?q+="XY":q+="YX";break}switch(E){case 0:D[E]>0?q+="-":q+="+",e===4?D[e]>0?q+="-":q+="+":D[e]>0?q+="+":q+="-";break;case 1:D[E]>0?q+="-":q+="+",e===3?D[e]>0?q+="-":q+="+":D[e]>0?q+="+":q+="-";break;case 2:D[E]>0?q+="+":q+="-",D[e]>0?q+="-":q+="+";break}if(P===0)q+="+",w=q;else{if(d)switch(q.charAt(2)){case"X":P>0?q+="-":q+="+";break;case"Y":case"Z":P>0?q+="+":q+="-";break}else switch(q.charAt(2)){case"X":P>0?q+="+":q+="-";break;case"Y":case"Z":P>0?q+="-":q+="+";break}w=q}return w},u.Image.prototype.isMosaic=function(){var w,D=!1,R,L,P;if(w=this.getImageType(),w!==null){for(L=0;L0&&(P[0]1?d[R]=u.Utils.concatArrayBuffers2(P[R]):d[R]=P[R][0],P[R]=null;return d},u.Image.prototype.getRLE=function(){var w,D,R,L=[];if(w=this.getEncapsulatedData(),w)for(D=w.length,R=1;R");return L=L.replace(/\n\s*\n/g,` +`},"%p":function(H){return H.tm_hour>0&&H.tm_hour<13?"AM":"PM"},"%S":function(H){return E(H.tm_sec,2)},"%t":function(){return" "},"%u":function(H){var j=new Date(H.tm_year+1900,H.tm_mon+1,H.tm_mday,0,0,0,0);return j.getDay()||7},"%U":function(H){var j=new Date(H.tm_year+1900,0,1),y=j.getDay()===0?j:__addDays(j,7-j.getDay()),Y=new Date(H.tm_year+1900,H.tm_mon,H.tm_mday);if(e(y,Y)<0){var G=__arraySum(__isLeapYear(Y.getFullYear())?__MONTH_DAYS_LEAP:__MONTH_DAYS_REGULAR,Y.getMonth()-1)-31,J=31-y.getDate(),i0=J+G+Y.getDate();return E(Math.ceil(i0/7),2)}return e(y,j)===0?"01":"00"},"%V":function(H){var j=new Date(H.tm_year+1900,0,4),y=new Date(H.tm_year+1901,0,4),Y=N(j),G=N(y),J=__addDays(new Date(H.tm_year+1900,0,1),H.tm_yday);if(e(J,Y)<0)return"53";if(e(G,J)<=0)return"01";var i0;return Y.getFullYear()=0;return j=Math.abs(j)/60,j=j/60*100+j%60,(y?"+":"-")+("0000"+j).slice(-4)},"%Z":function(H){return H.tm_zone},"%%":function(){return"%"}};for(var R in z)w.indexOf(R)>=0&&(w=w.replace(new RegExp(R,"g"),z[R](v)));var e0=intArrayFromString(w,!1);return e0.length>u?0:(writeArrayToMemory(e0,T),e0.length-1)}function _strftime_l(T,u,m,A){return _strftime(T,u,m,A)}function _abort(){Module.abort()}function _free(){}Module._free=_free;function ___cxa_free_exception(T){try{return _free(T)}catch{}}function ___cxa_end_catch(){if(___cxa_end_catch.rethrown){___cxa_end_catch.rethrown=!1;return}asm.setThrew(0);var T=EXCEPTIONS.caught.pop();T&&(EXCEPTIONS.decRef(EXCEPTIONS.deAdjust(T)),EXCEPTIONS.last=0)}function _pthread_once(T,u){_pthread_once.seen||(_pthread_once.seen={}),!(T in _pthread_once.seen)&&(Runtime.dynCall("v",u),_pthread_once.seen[T]=1)}function ___lock(){}function ___unlock(){}var PTHREAD_SPECIFIC={};function _pthread_getspecific(T){return PTHREAD_SPECIFIC[T]||0}function ___setErrNo(T){return Module.___errno_location&&(HEAP32[Module.___errno_location()>>2]=T),T}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};function _sysconf(T){switch(T){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 typeof navigator=="object"&&navigator.hardwareConcurrency||1}return ___setErrNo(ERRNO_CODES.EINVAL),-1}var _fabs=Math_abs,PTHREAD_SPECIFIC_NEXT_KEY=1;function _pthread_key_create(T,u){return T==0?ERRNO_CODES.EINVAL:(HEAP32[T>>2]=PTHREAD_SPECIFIC_NEXT_KEY,PTHREAD_SPECIFIC[PTHREAD_SPECIFIC_NEXT_KEY]=0,PTHREAD_SPECIFIC_NEXT_KEY++,0)}function _emscripten_set_main_loop_timing(T,u){if(Browser.mainLoop.timingMode=T,Browser.mainLoop.timingValue=u,!Browser.mainLoop.func)return 1;if(T==0)Browser.mainLoop.scheduler=function(){setTimeout(Browser.mainLoop.runner,u)},Browser.mainLoop.method="timeout";else if(T==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(T==2){if(!window.setImmediate){let v=function(w){w.source===window&&w.data===A&&(w.stopPropagation(),m.shift()())};var S=v,m=[],A="__emcc";window.addEventListener("message",v,!0),window.setImmediate=function(D){m.push(D),window.postMessage(A,"*")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0}function _emscripten_set_main_loop(T,u,m,A,S){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=T,Browser.mainLoop.arg=A;var v=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var D=Date.now(),R=Browser.mainLoop.queue.shift();if(R.func(R.arg),Browser.mainLoop.remainingBlockers){var L=Browser.mainLoop.remainingBlockers,P=L%1==0?L-1:Math.floor(L);R.counted?Browser.mainLoop.remainingBlockers=P:(P=P+.5,Browser.mainLoop.remainingBlockers=(8*L+P)/9)}console.log('main loop blocker "'+R.name+'" took '+(Date.now()-D)+" ms"),Browser.mainLoop.updateStatus(),setTimeout(Browser.mainLoop.runner,0);return}if(!(v1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}Browser.mainLoop.method==="timeout"&&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(){typeof A<"u"?Runtime.dynCall("vi",T,[A]):Runtime.dynCall("v",T)}),!(v0?_emscripten_set_main_loop_timing(0,1e3/u):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),m)throw"SimulateInfiniteLoop"}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 T=Browser.mainLoop.timingMode,u=Browser.mainLoop.timingValue,m=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(m,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(T,u),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var T=Module.statusMessage||"Please wait...",u=Browser.mainLoop.remainingBlockers,m=Browser.mainLoop.expectedBlockers;u?u"u"&&(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(v){return!Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(v)},T.handle=function(v,w,D,R){var L=null;if(Browser.hasBlobConstructor)try{L=new Blob([v],{type:Browser.getMimetype(w)}),L.size!==v.length&&(L=new Blob([new Uint8Array(v).buffer],{type:Browser.getMimetype(w)}))}catch(e){Runtime.warnOnce("Blob constructor present but fails: "+e+"; falling back to blob builder")}if(!L){var P=new Browser.BlobBuilder;P.append(new Uint8Array(v).buffer),L=P.getBlob()}var d=Browser.URLObject.createObjectURL(L),E=new Image;E.onload=function(){assert(E.complete,"Image "+w+" could not be decoded");var N=document.createElement("canvas");N.width=E.width,N.height=E.height;var q=N.getContext("2d");q.drawImage(E,0,0),Module.preloadedImages[w]=N,Browser.URLObject.revokeObjectURL(d),D&&D(v)},E.onerror=function(N){console.log("Image "+d+" could not be decoded"),R&&R()},E.src=d},Module.preloadPlugins.push(T);var u={};u.canHandle=function(v){return!Module.noAudioDecoding&&v.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},u.handle=function(v,w,D,R){var L=!1;function P(q){L||(L=!0,Module.preloadedAudios[w]=q,D&&D(v))}function d(){L||(L=!0,Module.preloadedAudios[w]=new Audio,R&&R())}if(Browser.hasBlobConstructor){try{var E=new Blob([v],{type:Browser.getMimetype(w)})}catch{return d()}var e=Browser.URLObject.createObjectURL(E),N=new Audio;N.addEventListener("canplaythrough",function(){P(N)},!1),N.onerror=function(z){if(L)return;console.log("warning: browser could not fully decode audio "+w+", trying slower base64 approach");function e0(H){for(var j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",y="=",Y="",G=0,J=0,i0=0;i0=6;){var Q=G>>J-6&63;J-=6,Y+=j[Q]}return J==2?(Y+=j[(G&3)<<4],Y+=y+y):J==4&&(Y+=j[(G&15)<<2],Y+=y),Y}N.src="data:audio/x-"+w.substr(-3)+";base64,"+e0(v),P(N)},N.src=e,Browser.safeSetTimeout(function(){P(N)},1e4)}else return d()},Module.preloadPlugins.push(u);var m=Module.canvas;function A(){Browser.pointerLock=document.pointerLockElement===m||document.mozPointerLockElement===m||document.webkitPointerLockElement===m||document.msPointerLockElement===m}m&&(m.requestPointerLock=m.requestPointerLock||m.mozRequestPointerLock||m.webkitRequestPointerLock||m.msRequestPointerLock||function(){},m.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},m.exitPointerLock=m.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",A,!1),document.addEventListener("mozpointerlockchange",A,!1),document.addEventListener("webkitpointerlockchange",A,!1),document.addEventListener("mspointerlockchange",A,!1),Module.elementPointerLock&&m.addEventListener("click",function(S){!Browser.pointerLock&&m.requestPointerLock&&(m.requestPointerLock(),S.preventDefault())},!1))},createContext:function(T,u,m,A){if(u&&Module.ctx&&T==Module.canvas)return Module.ctx;var S,v;if(u){var w={antialias:!1,alpha:!1};if(A)for(var D in A)w[D]=A[D];v=GL.createContext(T,w),v&&(S=GL.getContext(v).GLctx),T.style.backgroundColor="black"}else S=T.getContext("2d");return S?(m&&(u||assert(typeof GLctx>"u","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=S,u&&GL.makeContextCurrent(v),Module.useWebGL=u,Browser.moduleContextCreatedCallbacks.forEach(function(R){R()}),Browser.init()),S):null},destroyContext:function(T,u,m){},fullScreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullScreen:function(T,u,m){Browser.lockPointer=T,Browser.resizeCanvas=u,Browser.vrDevice=m,typeof Browser.lockPointer>"u"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas>"u"&&(Browser.resizeCanvas=!1),typeof Browser.vrDevice>"u"&&(Browser.vrDevice=null);var A=Module.canvas;function S(){Browser.isFullScreen=!1;var w=A.parentNode;(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement||document.msFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement)===w?(A.cancelFullScreen=document.cancelFullScreen||document.mozCancelFullScreen||document.webkitCancelFullScreen||document.msExitFullscreen||document.exitFullscreen||function(){},A.cancelFullScreen=A.cancelFullScreen.bind(document),Browser.lockPointer&&A.requestPointerLock(),Browser.isFullScreen=!0,Browser.resizeCanvas&&Browser.setFullScreenCanvasSize()):(w.parentNode.insertBefore(A,w),w.parentNode.removeChild(w),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullScreen),Browser.updateCanvasDimensions(A)}Browser.fullScreenHandlersInstalled||(Browser.fullScreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",S,!1),document.addEventListener("mozfullscreenchange",S,!1),document.addEventListener("webkitfullscreenchange",S,!1),document.addEventListener("MSFullscreenChange",S,!1));var v=document.createElement("div");A.parentNode.insertBefore(v,A),v.appendChild(A),v.requestFullScreen=v.requestFullScreen||v.mozRequestFullScreen||v.msRequestFullscreen||(v.webkitRequestFullScreen?function(){v.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),m?v.requestFullScreen({vrDisplay:m}):v.requestFullScreen()},nextRAF:0,fakeRequestAnimationFrame:function(T){var u=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=u+1e3/60;else for(;u+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var m=Math.max(Browser.nextRAF-u,0);setTimeout(T,m)},requestAnimationFrame:function T(u){typeof window>"u"?Browser.fakeRequestAnimationFrame(u):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(u))},safeCallback:function(T){return function(){if(!ABORT)return T.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var T=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],T.forEach(function(u){u()})}},safeRequestAnimationFrame:function(T){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?T():Browser.queuedAsyncCallbacks.push(T))})},safeSetTimeout:function(T,u){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?T():Browser.queuedAsyncCallbacks.push(T))},u)},safeSetInterval:function(T,u){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&T()},u)},getMimetype:function(T){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[T.substr(T.lastIndexOf(".")+1)]},getUserMedia:function(T){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(T)},getMovementX:function(T){return T.movementX||T.mozMovementX||T.webkitMovementX||0},getMovementY:function(T){return T.movementY||T.mozMovementY||T.webkitMovementY||0},getMouseWheelDelta:function(T){var u=0;switch(T.type){case"DOMMouseScroll":u=T.detail;break;case"mousewheel":u=T.wheelDelta;break;case"wheel":u=T.deltaY;break;default:throw"unrecognized mouse wheel event: "+T.type}return u},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(T){if(Browser.pointerLock)T.type!="mousemove"&&"mozMovementX"in T?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(T),Browser.mouseMovementY=Browser.getMovementY(T)),typeof SDL<"u"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var u=Module.canvas.getBoundingClientRect(),m=Module.canvas.width,A=Module.canvas.height,S=typeof window.scrollX<"u"?window.scrollX:window.pageXOffset,v=typeof window.scrollY<"u"?window.scrollY:window.pageYOffset;if(T.type==="touchstart"||T.type==="touchend"||T.type==="touchmove"){var w=T.touch;if(w===void 0)return;var D=w.pageX-(S+u.left),R=w.pageY-(v+u.top);D=D*(m/u.width),R=R*(A/u.height);var L={x:D,y:R};if(T.type==="touchstart")Browser.lastTouches[w.identifier]=L,Browser.touches[w.identifier]=L;else if(T.type==="touchend"||T.type==="touchmove"){var P=Browser.touches[w.identifier];P||(P=L),Browser.lastTouches[w.identifier]=P,Browser.touches[w.identifier]=L}return}var d=T.pageX-(S+u.left),E=T.pageY-(v+u.top);d=d*(m/u.width),E=E*(A/u.height),Browser.mouseMovementX=d-Browser.mouseX,Browser.mouseMovementY=E-Browser.mouseY,Browser.mouseX=d,Browser.mouseY=E}},xhrLoad:function(T,u,m){var A=new XMLHttpRequest;A.open("GET",T,!0),A.responseType="arraybuffer",A.onload=function(){A.status==200||A.status==0&&A.response?u(A.response):m()},A.onerror=m,A.send(null)},asyncLoad:function(T,u,m,A){Browser.xhrLoad(T,function(S){assert(S,'Loading data file "'+T+'" failed (no arrayBuffer).'),u(new Uint8Array(S)),A||removeRunDependency()},function(S){if(m)m();else throw'Loading data file "'+T+'" failed.'}),A||addRunDependency()},resizeListeners:[],updateResizeListeners:function(){var T=Module.canvas;Browser.resizeListeners.forEach(function(u){u(T.width,T.height)})},setCanvasSize:function(T,u,m){var A=Module.canvas;Browser.updateCanvasDimensions(A,T,u),m||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullScreenCanvasSize:function(){if(typeof SDL<"u"){var T=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];T=T|8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=T}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL<"u"){var T=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];T=T&-8388609,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=T}Browser.updateResizeListeners()},updateCanvasDimensions:function(T,u,m){u&&m?(T.widthNative=u,T.heightNative=m):(u=T.widthNative,m=T.heightNative);var A=u,S=m;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(A/S>2];return u},getStr:function(){var T=Pointer_stringify(SYSCALLS.get());return T},get64:function(){var T=SYSCALLS.get(),u=SYSCALLS.get();return T>=0?assert(u===0):assert(u===-1),T},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall54(T,u){SYSCALLS.varargs=u;try{return 0}catch(m){return(typeof FS>"u"||!(m instanceof FS.ErrnoError))&&abort(m),-m.errno}}Module._i64Add=_i64Add,Module._bitshift64Lshr=_bitshift64Lshr;function ___cxa_pure_virtual(){throw ABORT=!0,"Pure virtual function called!"}function _pthread_cleanup_push(T,u){__ATEXIT__.push(function(){Runtime.dynCall("vi",T,[u])}),_pthread_cleanup_push.level=__ATEXIT__.length}function _pthread_cond_broadcast(){return 0}function ___cxa_guard_acquire(T){return HEAP8[T>>0]?0:(HEAP8[T>>0]=1,1)}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 ___cxa_guard_release(){}function ___cxa_begin_catch(T){return __ZSt18uncaught_exceptionv.uncaught_exception--,EXCEPTIONS.caught.push(T),EXCEPTIONS.addRef(EXCEPTIONS.deAdjust(T)),T}function _llvm_eh_typeid_for(T){return T}function _emscripten_memcpy_big(T,u,m){return HEAPU8.set(HEAPU8.subarray(u,u+m),T),T}Module._memcpy=_memcpy;function ___syscall6(T,u){SYSCALLS.varargs=u;try{var m=SYSCALLS.getStreamFromFD();return FS.close(m),0}catch(A){return(typeof FS>"u"||!(A instanceof FS.ErrnoError))&&abort(A),-A.errno}}function _pthread_mutex_lock(){}function _sbrk(T){var u=_sbrk;u.called||(DYNAMICTOP=alignMemoryPage(DYNAMICTOP),u.called=!0,assert(Runtime.dynamicAlloc),u.alloc=Runtime.dynamicAlloc,Runtime.dynamicAlloc=function(){abort("cannot dynamically allocate, sbrk now has control")});var m=DYNAMICTOP;if(T!=0){var A=u.alloc(T);if(!A)return 4294967295}return m}Module._bitshift64Shl=_bitshift64Shl;function ___cxa_guard_abort(){}Module._memmove=_memmove;function _pthread_cond_wait(){return 0}function ___cxa_rethrow(){___cxa_end_catch.rethrown=!0;var T=EXCEPTIONS.caught.pop();throw EXCEPTIONS.last=T,T}function _pthread_mutex_unlock(){}function _time(T){var u=Date.now()/1e3|0;return T&&(HEAP32[T>>2]=u),u}function _pthread_self(){return 0}function ___syscall140(T,u){SYSCALLS.varargs=u;try{var m=SYSCALLS.getStreamFromFD(),A=SYSCALLS.get(),S=SYSCALLS.get(),v=SYSCALLS.get(),w=SYSCALLS.get(),D=S;return assert(A===0),FS.llseek(m,D,w),HEAP32[v>>2]=m.position,m.getdents&&D===0&&w===0&&(m.getdents=null),0}catch(R){return(typeof FS>"u"||!(R instanceof FS.ErrnoError))&&abort(R),-R.errno}}function ___syscall146(T,u){SYSCALLS.varargs=u;try{var m=SYSCALLS.get(),A=SYSCALLS.get(),S=SYSCALLS.get(),v=0;___syscall146.buffer||(___syscall146.buffer=[]);for(var w=___syscall146.buffer,D=0;D>2],L=HEAP32[A+(D*8+4)>>2],P=0;P"u"||!(E instanceof FS.ErrnoError))&&abort(E),-E.errno}}function ___syscall145(T,u){SYSCALLS.varargs=u;try{var m=SYSCALLS.getStreamFromFD(),A=SYSCALLS.get(),S=SYSCALLS.get();return SYSCALLS.doReadv(m,A,S)}catch(v){return(typeof FS>"u"||!(v instanceof FS.ErrnoError))&&abort(v),-v.errno}}var ___dso_handle=allocate(1,"i32*",ALLOC_STATIC);Module.requestFullScreen=function T(u,m,A){Browser.requestFullScreen(u,m,A)},Module.requestAnimationFrame=function T(u){Browser.requestAnimationFrame(u)},Module.setCanvasSize=function T(u,m,A){Browser.setCanvasSize(u,m,A)},Module.pauseMainLoop=function T(){Browser.mainLoop.pause()},Module.resumeMainLoop=function T(){Browser.mainLoop.resume()},Module.getUserMedia=function T(){Browser.getUserMedia()},Module.createContext=function T(u,m,A,S){return Browser.createContext(u,m,A,S)},STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP),staticSealed=!0,STACK_MAX=STACK_BASE+TOTAL_STACK,DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX),assert(DYNAMIC_BASE2147483648?!1:(d=new A(t),E=new S(t),e=new v(t),N=new w(t),q=new D(t),z=new R(t),e0=new L(t),H=new P(t),m=t,!0)}function $n(t){t=t|0;var r=0;return r=y,y=y+t|0,y=y+15&-16,r|0}function es(){return y|0}function is(t){t=t|0,y=t}function ts(t,r){t=t|0,r=r|0,y=t,Y=r}function rs(t,r){t=t|0,r=r|0,f||(f=t,o0=r)}function iA(t){t=t|0,d[G>>0]=d[t>>0],d[G+1>>0]=d[t+1>>0],d[G+2>>0]=d[t+2>>0],d[G+3>>0]=d[t+3>>0]}function tA(t){t=t|0,d[G>>0]=d[t>>0],d[G+1>>0]=d[t+1>>0],d[G+2>>0]=d[t+2>>0],d[G+3>>0]=d[t+3>>0],d[G+4>>0]=d[t+4>>0],d[G+5>>0]=d[t+5>>0],d[G+6>>0]=d[t+6>>0],d[G+7>>0]=d[t+7>>0]}function ns(t){t=t|0,I0=t}function ss(){return I0|0}function os(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0;if(_=y,y=y+128|0,C=_+44|0,U=_+8|0,h=_+4|0,g=_,I=n+4|0,k=n+8|0,f=0,P0(35,e[n>>2]|0,e[I>>2]|0,e[k>>2]|0,s|0),p=f,f=0,p&1)B=5;else{a=C,l=a+84|0;do e[a>>2]=e[s>>2],a=a+4|0,s=s+4|0;while((a|0)<(l|0));if(s=C+12|0,!(e[s>>2]|0)&&(c=W(((e[C+8>>2]|0)+7|0)/8|0,e[C>>2]|0)|0,e[s>>2]=c,(e[C+24>>2]|0)!=0)&&(p=W(e[C+16>>2]|0,c)|0,e[s>>2]=p),f=0,n0(176,U|0),p=f,f=0,p&1)B=5;else{s=C+56|0;do if(e[s>>2]|0)if(f=0,s=u0(66,s|0)|0,p=f,f=0,p&1)B=15;else{if(e[h>>2]=s,l=U+28|0,a=e[l>>2]|0,a>>>0<(e[U+32>>2]|0)>>>0){e[a>>2]=s,e[l>>2]=a+4,e[h>>2]=0,B=19;break}if(f=0,h0(57,U+24|0,h|0),p=f,f=0,p&1){if(l=b(824,0)|0,s=I0,a=e[h>>2]|0,e[h>>2]=0,!a)break;Ce[e[(e[a>>2]|0)+4>>2]&255](a);break}else{if(s=e[h>>2]|0,e[h>>2]=0,!s){B=19;break}Ce[e[(e[s>>2]|0)+4>>2]&255](s),B=19;break}}else B=19;while(!1);e:do if((B|0)==19)if(a=C+4|0,c=C+8|0,h=C+16|0,f=0,s=k0(14,e[C>>2]|0,e[a>>2]|0,e[c>>2]|0,e[h>>2]|0)|0,p=f,f=0,p&1)B=15;else{e[g>>2]=s,p=U+28|0,l=e[p>>2]|0;do if(l>>>0>=(e[U+32>>2]|0)>>>0)if(f=0,h0(57,U+24|0,g|0),l=f,f=0,l&1){if(l=b(824,0)|0,s=I0,a=e[g>>2]|0,e[g>>2]=0,!a)break e;Ce[e[(e[a>>2]|0)+4>>2]&255](a);break e}else{if(s=e[g>>2]|0,e[g>>2]=0,!s)break;Ce[e[(e[s>>2]|0)+4>>2]&255](s);break}else e[l>>2]=s,e[p>>2]=l+4,e[g>>2]=0;while(!1);if(s=e[C+28>>2]|0,s|0&&(f=0,h0(58,U|0,s|0),B=f,f=0,B&1)){B=15;break}i:do if(e[C+24>>2]|0){if(f=0,m0(4,U|0,n|0,C|0),B=f,f=0,B&1){B=15;break e}}else if(s=W(e[a>>2]|0,e[C>>2]|0)|0,s=W(s,((e[c>>2]|0)+7|0)/8|0)|0,(e[h>>2]|0)>0){for(a=0;f=0,m0(4,U|0,n|0,C|0),B=f,f=0,!(B&1);)if(l=e[I>>2]|0,l&&(e[I>>2]=l+s,e[k>>2]=(e[k>>2]|0)-s),a=a+1|0,(a|0)>=(e[h>>2]|0))break i;l=b(824,0)|0,s=I0,B=16;break e}while(!1);if(f=0,y0(33,U|0,t|0)|0,B=f,f=0,B&1)B=15;else{if(e[r>>2]=e[U+16>>2],o&&(d[o>>0]=0),a=U+24|0,s=e[a>>2]|0,s){if(l=e[p>>2]|0,(l|0)!=(s|0)){do o=l+-4|0,e[p>>2]=o,l=e[o>>2]|0,e[o>>2]=0,l&&Ce[e[(e[l>>2]|0)+4>>2]&255](l),l=e[p>>2]|0;while((l|0)!=(s|0));s=e[a>>2]|0}a0(s)}return o=0,y=_,o|0}}while(!1);if((B|0)==15&&(l=b(824,0)|0,s=I0,B=16),p=U+24|0,a=e[p>>2]|0,a){if(h=U+28|0,c=e[h>>2]|0,(c|0)!=(a|0)){do U=c+-4|0,e[h>>2]=U,c=e[U>>2]|0,e[U>>2]=0,c&&Ce[e[(e[c>>2]|0)+4>>2]&255](c),c=e[h>>2]|0;while((c|0)!=(a|0));a=e[p>>2]|0}a0(a)}}}if((B|0)==5&&(l=b(824,0)|0,s=I0),U=(s|0)==(Lr(824)|0),c=zi(l|0)|0,s=(o|0)==0,!U)return s||(d[o>>0]=0),Wi(),o=14,y=_,o|0;a=c+12|0;do if(s)B=60;else if(s=e[a>>2]|0,f=0,l=p0(1)|0,U=f,f=0,!(U&1))if((s|0)==(l|0)){E1(o,Se[e[(e[c>>2]|0)+8>>2]&127](c)|0)|0,B=60;break}else{d[o>>0]=0,B=60;break}while(!1);return(B|0)==60&&(V=e[a>>2]|0,f=0,O=p0(1)|0,o=f,f=0,!(o&1))?(o=(V|0)==(O|0)?e[c+8>>2]|0:13,Wi(),y=_,o|0):(s=b()|0,f=0,we(3),_=f,f=0,_&1?(_=b(0)|0,Ie(_)):r0(s|0),0)}function ls(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0;switch(p=y,y=y+112|0,l=p+96|0,h=p+84|0,g=p+72|0,C=p+60|0,I=p+48|0,k=p+36|0,U=p+24|0,B=p+12|0,V=p,c=(r|0)==0,(t|0)==0&c&&(o=de(16)|0,f=0,m0(5,l|0,48504,52),V=f,f=0,V&1?r=b()|0:(f=0,r=p0(1)|0,V=f,f=0,!(V&1)&&(f=0,P0(36,o|0,1,r|0,l|0),V=f,f=0,!(V&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(l),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)),a=e[s>>2]|0,(a+-1|0)>>>0>65534&&(o=de(16)|0,f=0,m0(5,h|0,48557,41),V=f,f=0,V&1?r=b()|0:(f=0,r=p0(1)|0,V=f,f=0,!(V&1)&&(f=0,P0(36,o|0,1,r|0,h|0),V=f,f=0,!(V&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(h),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)),l=e[s+4>>2]|0,(l+-1|0)>>>0>65534&&(o=de(16)|0,f=0,m0(5,g|0,48599,42),V=f,f=0,V&1?r=b()|0:(f=0,r=p0(1)|0,V=f,f=0,!(V&1)&&(f=0,P0(36,o|0,1,r|0,g|0),V=f,f=0,!(V&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(g),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)),o=e[s+8>>2]|0,(o+-2|0)>>>0>14&&(o=de(16)|0,f=0,m0(5,C|0,48642,46),V=f,f=0,V&1?r=b()|0:(f=0,r=p0(1)|0,V=f,f=0,!(V&1)&&(f=0,P0(36,o|0,1,r|0,C|0),V=f,f=0,!(V&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(C),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)),t=e[s+24>>2]|0,t>>>0>=3&&(o=de(16)|0,f=0,m0(5,I|0,48689,65),V=f,f=0,V&1?r=b()|0:(f=0,r=p0(1)|0,V=f,f=0,!(V&1)&&(f=0,P0(36,o|0,1,r|0,I|0),V=f,f=0,!(V&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(I),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)),r=e[s+16>>2]|0,(r+-1|0)>>>0>254&&(o=de(16)|0,f=0,m0(5,k|0,48755,44),V=f,f=0,V&1?r=b()|0:(f=0,r=p0(1)|0,V=f,f=0,!(V&1)&&(f=0,P0(36,o|0,1,r|0,k|0),V=f,f=0,!(V&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(k),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)),!c&&(k=W(l,a)|0,(W(W(k,(o|0)>8?2:1)|0,r)|0)>>>0>n>>>0)&&(o=de(16)|0,f=0,m0(5,U|0,48800,58),V=f,f=0,V&1?r=b()|0:(f=0,r=p0(1)|0,V=f,f=0,!(V&1)&&(f=0,P0(36,o|0,1,r|0,U|0),V=f,f=0,!(V&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(U),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)),r|0){case 4:{if((t|0)!=2){y=p;return}o=de(16)|0,f=0,m0(5,B|0,48859,73),V=f,f=0,V&1?r=b()|0:(f=0,r=p0(1)|0,V=f,f=0,!(V&1)&&(f=0,P0(36,o|0,1,r|0,B|0),V=f,f=0,!(V&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(B),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)}case 3:{y=p;return}default:{if(!t){y=p;return}o=de(16)|0,f=0,m0(5,V|0,48933,73),B=f,f=0,B&1?r=b()|0:(f=0,r=p0(1)|0,B=f,f=0,!(B&1)&&(f=0,P0(36,o|0,1,r|0,V|0),B=f,f=0,!(B&1))?(f=0,m0(6,o|0,824,96),f=0,t=0):t=1,r=b()|0,f0(V),t||(V=r,r0(V|0))),ge(o|0),V=r,r0(V|0)}}}function Ie(t){t=t|0,zi(t|0)|0,Ig()}function as(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+128|0,l=g+116|0,a=g,f=0,e[l>>2]=e[r>>2],e[l+4>>2]=e[r+4>>2],e[l+8>>2]=e[r+8>>2],h0(59,a|0,l|0),o=f,f=0,!(o&1)){if(n){o=a+16|0,r=o+84|0;do e[o>>2]=e[n>>2],o=o+4|0,n=n+4|0;while((o|0)<(r|0))}if(f=0,e[l>>2]=e[t>>2],e[l+4>>2]=e[t+4>>2],e[l+8>>2]=e[t+8>>2],h0(60,a|0,l|0),a=f,f=0,!(a&1))return s&&(d[s>>0]=0),p=0,y=g,p|0}if(t=b(824,0)|0,a=I0,a=(a|0)==(Lr(824)|0),t=zi(t|0)|0,r=(s|0)==0,!a)return r||(d[s>>0]=0),Wi(),p=14,y=g,p|0;o=t+12|0;do if(r)p=10;else if(r=e[o>>2]|0,f=0,n=p0(1)|0,a=f,f=0,!(a&1))if((r|0)==(n|0)){E1(s,Se[e[(e[t>>2]|0)+8>>2]&127](t)|0)|0,p=10;break}else{d[s>>0]=0,p=10;break}while(!1);return(p|0)==10&&(c=e[o>>2]|0,f=0,h=p0(1)|0,p=f,f=0,!(p&1))?(p=(c|0)==(h|0)?e[t+8>>2]|0:13,Wi(),y=g,p|0):(r=b()|0,f=0,we(3),g=f,f=0,g&1?(g=b(0)|0,Ie(g)):r0(r|0),0)}function fs(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(h=y,y=y+128|0,o=h+116|0,s=h,f=0,e[o>>2]=e[t>>2],e[o+4>>2]=e[t+4>>2],e[o+8>>2]=e[t+8>>2],h0(59,s|0,o|0),o=f,f=0,!(o&1)&&(f=0,n0(177,s|0),o=f,f=0,!(o&1))&&(f=0,h0(61,s|0,1),o=f,f=0,!(o&1))){t=s+16|0,s=r+84|0;do e[r>>2]=e[t>>2],r=r+4|0,t=t+4|0;while((r|0)<(s|0));return n&&(d[n>>0]=0),n=0,y=h,n|0}if(o=b(824,0)|0,r=I0,r=(r|0)==(Lr(824)|0),o=zi(o|0)|0,t=(n|0)==0,!r)return t||(d[n>>0]=0),Wi(),n=14,y=h,n|0;r=o+12|0;do if(t)c=13;else if(t=e[r>>2]|0,f=0,s=p0(1)|0,p=f,f=0,!(p&1))if((t|0)==(s|0)){E1(n,Se[e[(e[o>>2]|0)+8>>2]&127](o)|0)|0,c=13;break}else{d[n>>0]=0,c=13;break}while(!1);return(c|0)==13&&(l=e[r>>2]|0,f=0,a=p0(1)|0,p=f,f=0,!(p&1))?(p=(l|0)==(a|0)?e[o+8>>2]|0:13,Wi(),y=h,p|0):(t=b()|0,f=0,we(3),p=f,f=0,p&1?(p=b(0)|0,Ie(p)):r0(t|0),0)}function us(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0;return C=y,y=y+48|0,h=C+36|0,c=C+24|0,p=C+12|0,g=C,(t|0)!=0&(n|0)!=0&(s|0)!=0&(l|0)!=0?(e[p>>2]=0,e[p+4>>2]=t,e[p+8>>2]=r,e[g>>2]=0,e[g+4>>2]=s,e[g+8>>2]=o,e[c>>2]=e[p>>2],e[c+4>>2]=e[p+4>>2],e[c+8>>2]=e[p+8>>2],e[h>>2]=e[g>>2],e[h+4>>2]=e[g+4>>2],e[h+8>>2]=e[g+8>>2],o=os(c,n,h,l,a)|0,y=C,o|0):(o=1,y=C,o|0)}function cs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0;return o=y,y=y+32|0,l=o+12|0,a=o,c=a,e[c>>2]=0,e[c+4>>2]=0,e[a+4>>2]=t,e[a+8>>2]=r,e[l>>2]=e[a>>2],e[l+4>>2]=e[a+4>>2],e[l+8>>2]=e[a+8>>2],n=fs(l,n,s)|0,y=o,n|0}function hs(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+48|0,c=a+36|0,h=a+24|0,g=a+12|0,p=a,e[g>>2]=0,e[g+4>>2]=t,e[g+8>>2]=r,e[p>>2]=0,e[p+4>>2]=n,e[p+8>>2]=s,e[h>>2]=e[g>>2],e[h+4>>2]=e[g+4>>2],e[h+8>>2]=e[g+8>>2],e[c>>2]=e[p>>2],e[c+4>>2]=e[p+4>>2],e[c+8>>2]=e[p+8>>2],s=as(h,c,o,l)|0,y=a,s|0}function ms(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(p=t+4|0,n=e[t>>2]|0,o=((e[p>>2]|0)-n>>2)+1|0,o>>>0>1073741823&&(ct(t),n=e[t>>2]|0),g=t+8|0,s=(e[g>>2]|0)-n|0,s>>2>>>0<536870911?(s=s>>1,s=s>>>0>>0?o:s,n=(e[p>>2]|0)-n>>2,s?c=6:(l=0,a=0)):(s=1073741823,n=(e[p>>2]|0)-n>>2,c=6),(c|0)==6&&(l=s,a=G0(s<<2)|0),o=a+(n<<2)|0,s=o,h=a+(l<<2)|0,c=e[r>>2]|0,e[r>>2]=0,e[o>>2]=c,c=a+(n+1<<2)|0,a=e[t>>2]|0,n=e[p>>2]|0,(n|0)==(a|0))o=t,l=p;else{do n=n+-4|0,r=e[n>>2]|0,e[n>>2]=0,e[o+-4>>2]=r,o=s+-4|0,s=o;while((n|0)!=(a|0));n=s,o=t,l=p,s=n,a=e[t>>2]|0,n=e[p>>2]|0}if(e[o>>2]=s,e[l>>2]=c,e[g>>2]=h,o=a,(n|0)!=(o|0))do n=n+-4|0,s=e[n>>2]|0,e[n>>2]=0,s&&Ce[e[(e[s>>2]|0)+4>>2]&255](s);while((n|0)!=(o|0));a&&a0(a)}function ds(){return d[8]|0||!(Ae(8)|0)||(Te(72,35648,Q|0)|0,ve(8)),35648}function sr(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;g=y,y=y+32|0,h=g,hi(h,(1<>2]|0,p=l+1|0,n=p<<1,e[t>>2]=0,a=t+4|0,e[a>>2]=0,e[t+8>>2]=0;e:do if(p){if((l|0)<-1&&(f=0,n0(178,t|0),c=f,f=0,c&1)||(s=4),(s|0)==4&&(f=0,o=u0(67,n|0)|0,c=f,f=0,!(c&1))){for(e[a>>2]=o,e[t>>2]=o,e[t+8>>2]=o+n,r=o;;)if(d[r>>0]=0,r=(e[a>>2]|0)+1|0,e[a>>2]=r,n=n+-1|0,!n)break e}n=b()|0,r=e[t>>2]|0,r||r0(n|0),(e[a>>2]|0)!=(r|0)&&(e[a>>2]=r),a0(r),r0(n|0)}while(!1);if(r=~l,(l|0)<(r|0)){y=g;return}a=h+12|0,c=h+8|0,l=h+4|0,o=r;do r=e[a>>2]|0,(o|0)>(0-r|0)?(n=e[c>>2]|0,(o|0)>(0-n|0)?(s=e[l>>2]|0,(o|0)>(0-s|0)?(o|0)>=0?(o|0)>0?(s|0)<=(o|0)?(n|0)>(o|0)?r=2:r=(r|0)>(o|0)?3:4:r=1:r=0:r=-1:r=-2):r=-3):r=-4,d[(e[t>>2]|0)+(o+p)>>0]=r,o=o+1|0;while((o|0)<(p|0));y=g}function gs(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;switch(I=e[n+16>>2]|0,I|0){case 64:case 0:{f=0,t=y0(34,t|0,r|0)|0,r=f,f=0,r&1?k=16:s=t;break}default:{for(o=(1<>2])+-1|0,C=e[r+20>>2]|0,g=C<<1,g=((g+o|0)/(g|1|0)|0)+1|0,t=0;(1<>2]|0,f=0,s=u0(67,4624)|0,p=f,f=0,p&1)k=16;else{l=((a|0)<8?8:a)+a<<1,c=s+4|0,h=r,p=c+84|0;do e[c>>2]=e[h>>2],c=c+4|0,h=h+4|0;while((c|0)<(p|0));c=s+88|0,p=c+40|0;do e[c>>2]=0,c=c+4|0;while((c|0)<(p|0));e[s>>2]=35660,e[s+128>>2]=o,e[s+132>>2]=g,e[s+136>>2]=C,e[s+140>>2]=t,e[s+144>>2]=a,e[s+148>>2]=l,e[s+152>>2]=I,t=s+156|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+172>>2]=e[r>>2],e[s+176>>2]=0,e[s+180>>2]=0,e[s+184>>2]=0,t=s+4568|0,o=s+188|0;do e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,E[o+10>>1]=1,o=o+12|0;while((o|0)!=(t|0));e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4580|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4592|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+28>>2]|0||(e[s+20>>2]=1)}}}return(k|0)==16&&(k=b()|0,r0(k|0)),!s||(f=0,h0(e[(e[s>>2]|0)+12>>2]|0,s|0,n|0),k=f,f=0,!(k&1))?s|0:(t=b()|0,s||(k=t,r0(k|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),k=t,r0(k|0),0)}function ps(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(n=(e[r+24>>2]|0)==2,n&&(e[r+16>>2]|0)!=3)return r=0,r|0;g=e[r+20>>2]|0,t=e[r+8>>2]|0;e:do if(!g){if(n){if((t|0)!=8)break;s=G0(4600)|0,a=s+4|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));a=s+88|0,h=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(h|0));e[s>>2]=35688,t=s+132|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+148>>2]=e[r>>2],e[s+152>>2]=0,e[s+156>>2]=0,e[s+160>>2]=0,t=s+4544|0,n=s+164|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4556|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4568|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+28>>2]|0||(e[s+20>>2]=1),r=s,r|0}switch(t|0){case 8:{s=G0(4600)|0,a=s+4|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));a=s+88|0,h=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(h|0));e[s>>2]=35716,t=s+132|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+148>>2]=e[r>>2],e[s+152>>2]=0,e[s+156>>2]=0,e[s+160>>2]=0,t=s+4544|0,n=s+164|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4556|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4568|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+28>>2]|0||(e[s+20>>2]=1),r=s,r|0}case 12:{s=G0(4600)|0,a=s+4|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));a=s+88|0,h=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(h|0));e[s>>2]=35744,t=s+132|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+148>>2]=e[r>>2],e[s+152>>2]=0,e[s+156>>2]=0,e[s+160>>2]=0,t=s+4544|0,n=s+164|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4556|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4568|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+28>>2]|0||(e[s+20>>2]=1),r=s,r|0}case 16:{s=G0(4600)|0,a=s+4|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));a=s+88|0,h=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(h|0));e[s>>2]=35772,t=s+132|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+148>>2]=e[r>>2],e[s+152>>2]=0,e[s+156>>2]=0,e[s+160>>2]=0,t=s+4544|0,n=s+164|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4556|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4568|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+28>>2]|0||(e[s+20>>2]=1),r=s,r|0}default:break e}}while(!1);if(p=(1<>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));a=o+88|0,h=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(h|0));e[o>>2]=35800,e[o+128>>2]=p,e[o+132>>2]=l,e[o+136>>2]=g,e[o+140>>2]=t,e[o+144>>2]=n,e[o+148>>2]=s,e[o+152>>2]=64,t=o+156|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+172>>2]=e[r>>2],e[o+176>>2]=0,e[o+180>>2]=0,e[o+184>>2]=0,t=o+4568|0,n=o+188|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=o+4580|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=o+4592|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+28>>2]|0||(e[o+20>>2]=1),r=o,r|0}else{for(t=0;(1<>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));a=o+88|0,h=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(h|0));e[o>>2]=35660,e[o+128>>2]=p,e[o+132>>2]=l,e[o+136>>2]=g,e[o+140>>2]=t,e[o+144>>2]=n,e[o+148>>2]=s,e[o+152>>2]=64,t=o+156|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+172>>2]=e[r>>2],e[o+176>>2]=0,e[o+180>>2]=0,e[o+184>>2]=0,t=o+4568|0,n=o+188|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=o+4580|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=o+4592|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+28>>2]|0||(e[o+20>>2]=1),r=o,r|0}if((t|0)>=17)return r=0,r|0;if(l=g<<1,l=((l+p|0)/(l|1|0)|0)+1|0,n){for(t=0;(1<>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));a=o+88|0,h=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(h|0));e[o>>2]=35828,e[o+128>>2]=p,e[o+132>>2]=l,e[o+136>>2]=g,e[o+140>>2]=t,e[o+144>>2]=n,e[o+148>>2]=s,e[o+152>>2]=64,t=o+156|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+172>>2]=e[r>>2],e[o+176>>2]=0,e[o+180>>2]=0,e[o+184>>2]=0,t=o+4568|0,n=o+188|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=o+4580|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=o+4592|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+28>>2]|0||(e[o+20>>2]=1),r=o,r|0}else{for(t=0;(1<>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));a=o+88|0,h=a+40|0;do e[a>>2]=0,a=a+4|0;while((a|0)<(h|0));e[o>>2]=35856,e[o+128>>2]=p,e[o+132>>2]=l,e[o+136>>2]=g,e[o+140>>2]=t,e[o+144>>2]=n,e[o+148>>2]=s,e[o+152>>2]=64,t=o+156|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+172>>2]=e[r>>2],e[o+176>>2]=0,e[o+180>>2]=0,e[o+184>>2]=0,t=o+4568|0,n=o+188|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=o+4580|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=o+4592|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+28>>2]|0||(e[o+20>>2]=1),r=o,r|0}return 0}function As(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;switch(I=e[n+16>>2]|0,I|0){case 64:case 0:{f=0,t=y0(35,t|0,r|0)|0,r=f,f=0,r&1?k=16:s=t;break}default:{for(o=(1<>2])+-1|0,C=e[r+20>>2]|0,g=C<<1,g=((g+o|0)/(g|1|0)|0)+1|0,t=0;(1<>2]|0,f=0,s=u0(67,4632)|0,p=f,f=0,p&1)k=16;else{l=((a|0)<8?8:a)+a<<1,e[s+4>>2]=0,c=s+8|0,h=r,p=c+84|0;do e[c>>2]=e[h>>2],c=c+4|0,h=h+4|0;while((c|0)<(p|0));e[s+92>>2]=0,e[s+96>>2]=0,e[s+100>>2]=32,e[s+104>>2]=0,e[s+108>>2]=0,d[s+112>>0]=0,p=s+116|0,e[p>>2]=0,e[p+4>>2]=0,e[p+8>>2]=0,e[p+12>>2]=0,e[p+16>>2]=0,e[s>>2]=35884,e[s+136>>2]=o,e[s+140>>2]=g,e[s+144>>2]=C,e[s+148>>2]=t,e[s+152>>2]=a,e[s+156>>2]=l,e[s+160>>2]=I,t=s+164|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+180>>2]=e[r>>2],e[s+184>>2]=0,e[s+188>>2]=0,e[s+192>>2]=0,t=s+4576|0,o=s+196|0;do e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,E[o+10>>1]=1,o=o+12|0;while((o|0)!=(t|0));e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4588|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4600|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+32>>2]|0||(e[s+24>>2]=1)}}}return(k|0)==16&&(k=b()|0,r0(k|0)),!s||(f=0,h0(e[(e[s>>2]|0)+8>>2]|0,s|0,n|0),k=f,f=0,!(k&1))?s|0:(t=b()|0,s||(k=t,r0(k|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),k=t,r0(k|0),0)}function Ss(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(n=(e[r+24>>2]|0)==2,n&&(e[r+16>>2]|0)!=3)return r=0,r|0;g=e[r+20>>2]|0,t=e[r+8>>2]|0;e:do if(!g){if(n){if((t|0)!=8)break;s=G0(4608)|0,e[s+4>>2]=0,a=s+8|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));e[s+92>>2]=0,e[s+96>>2]=0,e[s+100>>2]=32,e[s+104>>2]=0,e[s+108>>2]=0,d[s+112>>0]=0,t=s+116|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[s>>2]=35912,t=s+140|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+156>>2]=e[r>>2],e[s+160>>2]=0,e[s+164>>2]=0,e[s+168>>2]=0,t=s+4552|0,n=s+172|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4564|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4576|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+32>>2]|0||(e[s+24>>2]=1),r=s,r|0}switch(t|0){case 8:{s=G0(4608)|0,e[s+4>>2]=0,a=s+8|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));e[s+92>>2]=0,e[s+96>>2]=0,e[s+100>>2]=32,e[s+104>>2]=0,e[s+108>>2]=0,d[s+112>>0]=0,t=s+116|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[s>>2]=35940,t=s+140|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+156>>2]=e[r>>2],e[s+160>>2]=0,e[s+164>>2]=0,e[s+168>>2]=0,t=s+4552|0,n=s+172|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4564|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4576|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+32>>2]|0||(e[s+24>>2]=1),r=s,r|0}case 12:{s=G0(4608)|0,e[s+4>>2]=0,a=s+8|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));e[s+92>>2]=0,e[s+96>>2]=0,e[s+100>>2]=32,e[s+104>>2]=0,e[s+108>>2]=0,d[s+112>>0]=0,t=s+116|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[s>>2]=35968,t=s+140|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+156>>2]=e[r>>2],e[s+160>>2]=0,e[s+164>>2]=0,e[s+168>>2]=0,t=s+4552|0,n=s+172|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4564|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4576|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+32>>2]|0||(e[s+24>>2]=1),r=s,r|0}case 16:{s=G0(4608)|0,e[s+4>>2]=0,a=s+8|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));e[s+92>>2]=0,e[s+96>>2]=0,e[s+100>>2]=32,e[s+104>>2]=0,e[s+108>>2]=0,d[s+112>>0]=0,t=s+116|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[s>>2]=35996,t=s+140|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[s+156>>2]=e[r>>2],e[s+160>>2]=0,e[s+164>>2]=0,e[s+168>>2]=0,t=s+4552|0,n=s+172|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=s+4564|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=s+4576|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[s+32>>2]|0||(e[s+24>>2]=1),r=s,r|0}default:break e}}while(!1);if(p=(1<>2]=0,a=o+8|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));e[o+92>>2]=0,e[o+96>>2]=0,e[o+100>>2]=32,e[o+104>>2]=0,e[o+108>>2]=0,d[o+112>>0]=0,h=o+116|0,e[h>>2]=0,e[h+4>>2]=0,e[h+8>>2]=0,e[h+12>>2]=0,e[h+16>>2]=0,e[o>>2]=36024,e[o+136>>2]=p,e[o+140>>2]=l,e[o+144>>2]=g,e[o+148>>2]=t,e[o+152>>2]=n,e[o+156>>2]=s,e[o+160>>2]=64,t=o+164|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+180>>2]=e[r>>2],e[o+184>>2]=0,e[o+188>>2]=0,e[o+192>>2]=0,t=o+4576|0,n=o+196|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=o+4588|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=o+4600|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+32>>2]|0||(e[o+24>>2]=1),r=o,r|0}else{for(t=0;(1<>2]=0,a=o+8|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));e[o+92>>2]=0,e[o+96>>2]=0,e[o+100>>2]=32,e[o+104>>2]=0,e[o+108>>2]=0,d[o+112>>0]=0,h=o+116|0,e[h>>2]=0,e[h+4>>2]=0,e[h+8>>2]=0,e[h+12>>2]=0,e[h+16>>2]=0,e[o>>2]=35884,e[o+136>>2]=p,e[o+140>>2]=l,e[o+144>>2]=g,e[o+148>>2]=t,e[o+152>>2]=n,e[o+156>>2]=s,e[o+160>>2]=64,t=o+164|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+180>>2]=e[r>>2],e[o+184>>2]=0,e[o+188>>2]=0,e[o+192>>2]=0,t=o+4576|0,n=o+196|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=o+4588|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=o+4600|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+32>>2]|0||(e[o+24>>2]=1),r=o,r|0}if((t|0)>=17)return r=0,r|0;if(l=g<<1,l=((l+p|0)/(l|1|0)|0)+1|0,n){for(t=0;(1<>2]=0,a=o+8|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));e[o+92>>2]=0,e[o+96>>2]=0,e[o+100>>2]=32,e[o+104>>2]=0,e[o+108>>2]=0,d[o+112>>0]=0,h=o+116|0,e[h>>2]=0,e[h+4>>2]=0,e[h+8>>2]=0,e[h+12>>2]=0,e[h+16>>2]=0,e[o>>2]=36052,e[o+136>>2]=p,e[o+140>>2]=l,e[o+144>>2]=g,e[o+148>>2]=t,e[o+152>>2]=n,e[o+156>>2]=s,e[o+160>>2]=64,t=o+164|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+180>>2]=e[r>>2],e[o+184>>2]=0,e[o+188>>2]=0,e[o+192>>2]=0,t=o+4576|0,n=o+196|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=o+4588|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=o+4600|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+32>>2]|0||(e[o+24>>2]=1),r=o,r|0}else{for(t=0;(1<>2]=0,a=o+8|0,c=r,h=a+84|0;do e[a>>2]=e[c>>2],a=a+4|0,c=c+4|0;while((a|0)<(h|0));e[o+92>>2]=0,e[o+96>>2]=0,e[o+100>>2]=32,e[o+104>>2]=0,e[o+108>>2]=0,d[o+112>>0]=0,h=o+116|0,e[h>>2]=0,e[h+4>>2]=0,e[h+8>>2]=0,e[h+12>>2]=0,e[h+16>>2]=0,e[o>>2]=36080,e[o+136>>2]=p,e[o+140>>2]=l,e[o+144>>2]=g,e[o+148>>2]=t,e[o+152>>2]=n,e[o+156>>2]=s,e[o+160>>2]=64,t=o+164|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[o+180>>2]=e[r>>2],e[o+184>>2]=0,e[o+188>>2]=0,e[o+192>>2]=0,t=o+4576|0,n=o+196|0;do e[n>>2]=0,e[n+4>>2]=0,E[n+8>>1]=0,E[n+10>>1]=1,n=n+12|0;while((n|0)!=(t|0));return e[t>>2]=0,e[t+4>>2]=0,E[t+8>>1]=0,d[t+10>>0]=0,r=o+4588|0,e[r>>2]=0,e[r+4>>2]=0,E[r+8>>1]=0,d[r+10>>0]=0,r=o+4600|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[r+16>>2]=0,e[r+20>>2]=0,e[r+24>>2]=0,d[r+28>>0]=0,e[o+32>>2]|0||(e[o+24>>2]=1),r=o,r|0}return 0}function vs(){var t=0,r=0,n=0,s=0,o=0,l=0,a=0;t=2832;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=4880);je(2832,0,2048)|0,t=0;do a=2832+(t+128<<3)|0,e[a>>2]=0,e[a+4>>2]=1,t=t+1|0;while((t|0)!=128);t=3088,e[t>>2]=1,e[t+4>>2]=3,t=3096,e[t>>2]=1,e[t+4>>2]=3,t=3104,e[t>>2]=1,e[t+4>>2]=3,t=3112,e[t>>2]=1,e[t+4>>2]=3,t=3120,e[t>>2]=1,e[t+4>>2]=3,t=3128,e[t>>2]=1,e[t+4>>2]=3,t=3136,e[t>>2]=1,e[t+4>>2]=3,t=3144,e[t>>2]=1,e[t+4>>2]=3,t=3152,e[t>>2]=1,e[t+4>>2]=3,t=3160,e[t>>2]=1,e[t+4>>2]=3,t=3168,e[t>>2]=1,e[t+4>>2]=3,t=3176,e[t>>2]=1,e[t+4>>2]=3,t=3184,e[t>>2]=1,e[t+4>>2]=3,t=3192,e[t>>2]=1,e[t+4>>2]=3,t=3200,e[t>>2]=1,e[t+4>>2]=3,t=3208,e[t>>2]=1,e[t+4>>2]=3,t=3216,e[t>>2]=1,e[t+4>>2]=3,t=3224,e[t>>2]=1,e[t+4>>2]=3,t=3232,e[t>>2]=1,e[t+4>>2]=3,t=3240,e[t>>2]=1,e[t+4>>2]=3,t=3248,e[t>>2]=1,e[t+4>>2]=3,t=3256,e[t>>2]=1,e[t+4>>2]=3,t=3264,e[t>>2]=1,e[t+4>>2]=3,t=3272,e[t>>2]=1,e[t+4>>2]=3,t=3280,e[t>>2]=1,e[t+4>>2]=3,t=3288,e[t>>2]=1,e[t+4>>2]=3,t=3296,e[t>>2]=1,e[t+4>>2]=3,t=3304,e[t>>2]=1,e[t+4>>2]=3,t=3312,e[t>>2]=1,e[t+4>>2]=3,t=3320,e[t>>2]=1,e[t+4>>2]=3,t=3328,e[t>>2]=1,e[t+4>>2]=3,t=3336,e[t>>2]=1,e[t+4>>2]=3,t=2896,e[t>>2]=2,e[t+4>>2]=5,t=2904,e[t>>2]=2,e[t+4>>2]=5,t=2912,e[t>>2]=2,e[t+4>>2]=5,t=2920,e[t>>2]=2,e[t+4>>2]=5,t=2928,e[t>>2]=2,e[t+4>>2]=5,t=2936,e[t>>2]=2,e[t+4>>2]=5,t=2944,e[t>>2]=2,e[t+4>>2]=5,t=2952,e[t>>2]=2,e[t+4>>2]=5,t=2848,e[t>>2]=3,e[t+4>>2]=7,t=2856,e[t>>2]=3,e[t+4>>2]=7,t=0;do a=2832+(t+64<<3)|0,e[a>>2]=-1,e[a+4>>2]=2,t=t+1|0;while((t|0)!=64);t=2960,e[t>>2]=-2,e[t+4>>2]=4,t=2968,e[t>>2]=-2,e[t+4>>2]=4,t=2976,e[t>>2]=-2,e[t+4>>2]=4,t=2984,e[t>>2]=-2,e[t+4>>2]=4,t=2992,e[t>>2]=-2,e[t+4>>2]=4,t=3e3,e[t>>2]=-2,e[t+4>>2]=4,t=3008,e[t>>2]=-2,e[t+4>>2]=4,t=3016,e[t>>2]=-2,e[t+4>>2]=4,t=3024,e[t>>2]=-2,e[t+4>>2]=4,t=3032,e[t>>2]=-2,e[t+4>>2]=4,t=3040,e[t>>2]=-2,e[t+4>>2]=4,t=3048,e[t>>2]=-2,e[t+4>>2]=4,t=3056,e[t>>2]=-2,e[t+4>>2]=4,t=3064,e[t>>2]=-2,e[t+4>>2]=4,t=3072,e[t>>2]=-2,e[t+4>>2]=4,t=3080,e[t>>2]=-2,e[t+4>>2]=4,t=2864,e[t>>2]=-3,e[t+4>>2]=6,t=2872,e[t>>2]=-3,e[t+4>>2]=6,t=2880,e[t>>2]=-3,e[t+4>>2]=6,t=2888,e[t>>2]=-3,e[t+4>>2]=6,t=2840,e[t>>2]=-4,e[t+4>>2]=8,t=4880;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=6928);for(je(4880,0,2048)|0,n=2,t=0,o=0,l=0;;){if(n=n<<16>>16,r=8-n|0,s=1<>2]=o,e[a+4>>2]=n,r=r+1|0;while((r|0)<(s|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==7){r=2,o=1,l=-1,a=-1;break}else n=(t>>1)+2|0,o=r>>16}for(;;){if(n=r<<16>>16,t=8-n|0,s=1<>2]=l,e[o+4>>2]=n,r=r+1|0;while((r|0)<(s|0))}if(t=(a<<16)+-65536|0,o=t>>31^t>>15,r=(o>>1)+2|0,(r|0)>8){t=6928;break}else l=t>>16,a=a+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=8976);for(je(6928,0,2048)|0,o=3,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==12){o=3,r=1,s=-1,l=-1;break}else o=(t>>2)+3|0,s=r>>16}for(;;){if(t=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(t=(l<<16)+-65536|0,r=t>>31^t>>15,o=(r>>2)+3|0,(o|0)>8){t=8976;break}else s=t>>16,l=l+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=11024);for(je(8976,0,2048)|0,o=4,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==20){o=4,r=1,s=-1,l=-1;break}else o=(t>>3)+4|0,s=r>>16}for(;;){if(t=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(t=(l<<16)+-65536|0,r=t>>31^t>>15,o=(r>>3)+4|0,(o|0)>8){t=11024;break}else s=t>>16,l=l+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=13072);for(je(11024,0,2048)|0,o=5,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==32){o=5,r=1,s=-1,l=-1;break}else o=(t>>4)+5|0,s=r>>16}for(;;){if(t=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(t=(l<<16)+-65536|0,r=t>>31^t>>15,o=(r>>4)+5|0,(o|0)>8){t=13072;break}else s=t>>16,l=l+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=15120);for(je(13072,0,2048)|0,o=6,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==48){o=6,r=1,s=-1,l=-1;break}else o=(t>>5)+6|0,s=r>>16}for(;;){if(t=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(t=(l<<16)+-65536|0,r=t>>31^t>>15,o=(r>>5)+6|0,(o|0)>8){t=15120;break}else s=t>>16,l=l+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=17168);for(je(15120,0,2048)|0,o=7,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==64){o=7,r=1,s=-1,l=-1;break}else o=(t>>6)+7|0,s=r>>16}for(;;){if(t=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(t=(l<<16)+-65536|0,r=t>>31^t>>15,o=(r>>6)+7|0,(o|0)>8){t=17168;break}else s=t>>16,l=l+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=19216);for(je(17168,0,2048)|0,o=8,t=0,s=0,l=0;;){if(r=8-o|0,n=1<>2]=s,e[a+4>>2]=o,r=r+1|0;while((r|0)<(n|0))}if(r=(l<<16)+65536|0,t=r>>31^r>>15,l=l+1|0,(l|0)==64){l=8,s=1,o=-1,a=-1;break}else o=(t>>7)+8|0,s=r>>16}for(;;){if(t=8-l|0,n=1<>2]=o,e[s+4>>2]=l,r=r+1|0;while((r|0)<(n|0))}if(r=(a<<16)+-65536|0,s=r>>31^r>>15,t=s>>7,(t|0)>0){t=19216;break}else l=t+8|0,o=r>>16,a=a+-1|0}do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=21264);je(19216,0,2048)|0,t=21264;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=23312);je(21264,0,2048)|0,t=23312;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=25360);je(23312,0,2048)|0,t=25360;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=27408);je(25360,0,2048)|0,t=27408;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=29456);je(27408,0,2048)|0,t=29456;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=31504);je(29456,0,2048)|0,t=31504;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=33552);je(31504,0,2048)|0,t=33552;do e[t>>2]=0,e[t+4>>2]=0,t=t+8|0;while((t|0)!=35600);je(33552,0,2048)|0,sr(35600,8),Te(179,35600,Q|0)|0,sr(35612,10),Te(179,35612,Q|0)|0,sr(35624,12),Te(179,35624,Q|0)|0,sr(35636,16),Te(179,35636,Q|0)|0}function ws(t){t=t|0;var r=0;r=e[t>>2]|0,r&&(t=t+4|0,(e[t>>2]|0)!=(r|0)&&(e[t>>2]=r),a0(r))}function Ts(t){t=t|0;var r=0,n=0;e[t>>2]=36080,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Cs(t){t=t|0;var r=0,n=0;if(e[t>>2]=36080,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function xs(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;a=y,y=y+32|0,h=a,hi(h,e[t+136>>2]|0,e[t+144>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[h+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[h+12>>2]|0,n=e[r+16>>2]|0,s=e[h+16>>2]|0,e[t+184>>2]=c|0?c:e[h+4>>2]|0,e[t+188>>2]=l,e[t+192>>2]=o,qo(t),o=t+140|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+196+(l*12|0)>>2]=r,e[t+196+(l*12|0)+4>>2]=0,E[t+196+(l*12|0)+8>>1]=0,E[t+196+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,h=(n|0?n:s)&255,e[t+4576>>2]=c,e[t+4580>>2]=0,d[t+4584>>0]=h,d[t+4585>>0]=1,d[t+4586>>0]=0,e[t+4588>>2]=c,e[t+4592>>2]=1,d[t+4596>>0]=h,d[t+4597>>0]=1,d[t+4598>>0]=0,e[t+4600>>2]=0,y=a}function ys(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+16|0,h=g,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[h>>2]=0,e[h+4>>2]=s,c=n+8|0,e[h+8>>2]=e[c>>2],s){r=G0(4624)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35856,e[r+128>>2]=e[t+136>>2],e[r+132>>2]=e[t+140>>2],e[r+136>>2]=e[t+144>>2],e[r+140>>2]=e[t+148>>2],e[r+144>>2]=e[t+152>>2],e[r+148>>2]=e[t+156>>2],e[r+152>>2]=e[t+160>>2],o=r+156|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+172>>2]=e[s>>2],e[r+176>>2]=0,e[r+180>>2]=0,e[r+184>>2]=0,o=r+4568|0,s=r+188|0;do e[s>>2]=0,e[s+4>>2]=0,E[s+8>>1]=0,E[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,d[o+10>>0]=0,a=r+4580|0,e[a>>2]=0,e[a+4>>2]=0,E[a+8>>1]=0,d[a+10>>0]=0,a=r+4592|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,h)}return h=t+100|0,e[h>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(p=r+4e3|0,(s|0)!=(p|0))&&(e[c>>2]=p,s=p):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,X1(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],X1(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0)}function Is(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(k=t+8|0,B=t+36|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(37,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(38,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(39,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(40,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function Ds(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;e[t>>2]=36460,e[t+4>>2]=n,C=t+8|0,l=e[n>>2]|0,p=n+16|0,s=e[p>>2]|0,a=W(s,l)|0,e[C>>2]=0,I=t+12|0,e[I>>2]=0,e[t+16>>2]=0;do if(a){if((a|0)<0&&(f=0,n0(178,C|0),l=f,f=0,l&1)||(g=4),(g|0)==4&&(c=a<<1,f=0,h=u0(67,c|0)|0,l=f,f=0,!(l&1))){e[C>>2]=h,l=h+(a<<1)|0,e[t+16>>2]=l,je(h|0,0,c|0)|0,e[I>>2]=l,l=e[n>>2]|0,s=e[p>>2]|0;break}a=b()|0,o=e[C>>2]|0,s=o,o&&(l=e[I>>2]|0,(l|0)!=(o|0)&&(e[I>>2]=l+(~((l+-2-s|0)>>>1)<<1)),a0(o)),I=a,r0(I|0)}while(!1);if(a=t+20|0,s=W(l<<1,s)|0,e[a>>2]=0,c=t+24|0,e[c>>2]=0,e[t+28>>2]=0,!s){I=t+36|0,e[I>>2]=e[r>>2],e[I+4>>2]=e[r+4>>2],e[I+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(g=13),(g|0)==13&&(f=0,o=u0(67,s|0)|0,g=f,f=0,!(g&1))){e[c>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[c>>2]|0)+1|0,e[c>>2]=o,s=s+-1|0;while(s|0);I=t+36|0,e[I>>2]=e[r>>2],e[I+4>>2]=e[r+4>>2],e[I+8>>2]=e[r+8>>2];return}l=b()|0,o=e[a>>2]|0,o&&((e[c>>2]|0)!=(o|0)&&(e[c>>2]=o),a0(o)),o=e[C>>2]|0,o||(I=l,r0(I|0)),s=e[I>>2]|0,(s|0)!=(o|0)&&(e[I>>2]=s+(~((s+-2-o|0)>>>1)<<1)),a0(o),I=l,r0(I|0)}function Es(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;e[t>>2]=36436,e[t+4>>2]=n,C=t+8|0,l=e[n>>2]|0,p=n+16|0,s=e[p>>2]|0,a=W(s,l)|0,e[C>>2]=0,I=t+12|0,e[I>>2]=0,e[t+16>>2]=0;do if(a){if((a|0)<0&&(f=0,n0(178,C|0),l=f,f=0,l&1)||(g=4),(g|0)==4&&(c=a<<1,f=0,h=u0(67,c|0)|0,l=f,f=0,!(l&1))){e[C>>2]=h,l=h+(a<<1)|0,e[t+16>>2]=l,je(h|0,0,c|0)|0,e[I>>2]=l,l=e[n>>2]|0,s=e[p>>2]|0;break}a=b()|0,o=e[C>>2]|0,s=o,o&&(l=e[I>>2]|0,(l|0)!=(o|0)&&(e[I>>2]=l+(~((l+-2-s|0)>>>1)<<1)),a0(o)),I=a,r0(I|0)}while(!1);if(a=t+20|0,s=W(l<<1,s)|0,e[a>>2]=0,c=t+24|0,e[c>>2]=0,e[t+28>>2]=0,!s){I=t+36|0,e[I>>2]=e[r>>2],e[I+4>>2]=e[r+4>>2],e[I+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(g=13),(g|0)==13&&(f=0,o=u0(67,s|0)|0,g=f,f=0,!(g&1))){e[c>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[c>>2]|0)+1|0,e[c>>2]=o,s=s+-1|0;while(s|0);I=t+36|0,e[I>>2]=e[r>>2],e[I+4>>2]=e[r+4>>2],e[I+8>>2]=e[r+8>>2];return}l=b()|0,o=e[a>>2]|0,o&&((e[c>>2]|0)!=(o|0)&&(e[c>>2]=o),a0(o)),o=e[C>>2]|0,o||(I=l,r0(I|0)),s=e[I>>2]|0,(s|0)!=(o|0)&&(e[I>>2]=s+(~((s+-2-o|0)>>>1)<<1)),a0(o),I=l,r0(I|0)}function ks(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;e[t>>2]=36412,e[t+4>>2]=n,C=t+8|0,l=e[n>>2]|0,p=n+16|0,s=e[p>>2]|0,a=W(s,l)|0,e[C>>2]=0,I=t+12|0,e[I>>2]=0,e[t+16>>2]=0;do if(a){if((a|0)<0&&(f=0,n0(178,C|0),l=f,f=0,l&1)||(g=4),(g|0)==4&&(c=a<<1,f=0,h=u0(67,c|0)|0,l=f,f=0,!(l&1))){e[C>>2]=h,l=h+(a<<1)|0,e[t+16>>2]=l,je(h|0,0,c|0)|0,e[I>>2]=l,l=e[n>>2]|0,s=e[p>>2]|0;break}a=b()|0,o=e[C>>2]|0,s=o,o&&(l=e[I>>2]|0,(l|0)!=(o|0)&&(e[I>>2]=l+(~((l+-2-s|0)>>>1)<<1)),a0(o)),I=a,r0(I|0)}while(!1);if(a=t+20|0,s=W(l<<1,s)|0,e[a>>2]=0,c=t+24|0,e[c>>2]=0,e[t+28>>2]=0,!s){I=t+36|0,e[I>>2]=e[r>>2],e[I+4>>2]=e[r+4>>2],e[I+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(g=13),(g|0)==13&&(f=0,o=u0(67,s|0)|0,g=f,f=0,!(g&1))){e[c>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[c>>2]|0)+1|0,e[c>>2]=o,s=s+-1|0;while(s|0);I=t+36|0,e[I>>2]=e[r>>2],e[I+4>>2]=e[r+4>>2],e[I+8>>2]=e[r+8>>2];return}l=b()|0,o=e[a>>2]|0,o&&((e[c>>2]|0)!=(o|0)&&(e[c>>2]=o),a0(o)),o=e[C>>2]|0,o||(I=l,r0(I|0)),s=e[I>>2]|0,(s|0)!=(o|0)&&(e[I>>2]=s+(~((s+-2-o|0)>>>1)<<1)),a0(o),I=l,r0(I|0)}function Fs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;e[t>>2]=36388,e[t+4>>2]=n,C=t+8|0,l=e[n>>2]|0,p=n+16|0,s=e[p>>2]|0,a=W(s,l)|0,e[C>>2]=0,I=t+12|0,e[I>>2]=0,e[t+16>>2]=0;do if(a){if((a|0)<0&&(f=0,n0(178,C|0),l=f,f=0,l&1)||(g=4),(g|0)==4&&(c=a<<1,f=0,h=u0(67,c|0)|0,l=f,f=0,!(l&1))){e[C>>2]=h,l=h+(a<<1)|0,e[t+16>>2]=l,je(h|0,0,c|0)|0,e[I>>2]=l,l=e[n>>2]|0,s=e[p>>2]|0;break}a=b()|0,o=e[C>>2]|0,s=o,o&&(l=e[I>>2]|0,(l|0)!=(o|0)&&(e[I>>2]=l+(~((l+-2-s|0)>>>1)<<1)),a0(o)),I=a,r0(I|0)}while(!1);if(a=t+20|0,s=W(l<<1,s)|0,e[a>>2]=0,c=t+24|0,e[c>>2]=0,e[t+28>>2]=0,!s){I=t+36|0,e[I>>2]=e[r>>2],e[I+4>>2]=e[r+4>>2],e[I+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(g=13),(g|0)==13&&(f=0,o=u0(67,s|0)|0,g=f,f=0,!(g&1))){e[c>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[c>>2]|0)+1|0,e[c>>2]=o,s=s+-1|0;while(s|0);I=t+36|0,e[I>>2]=e[r>>2],e[I+4>>2]=e[r+4>>2],e[I+8>>2]=e[r+8>>2];return}l=b()|0,o=e[a>>2]|0,o&&((e[c>>2]|0)!=(o|0)&&(e[c>>2]=o),a0(o)),o=e[C>>2]|0,o||(I=l,r0(I|0)),s=e[I>>2]|0,(s|0)!=(o|0)&&(e[I>>2]=s+(~((s+-2-o|0)>>>1)<<1)),a0(o),I=l,r0(I|0)}function Ms(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;a=t+32|0,a5(a,r)|0,l=t+44|0,e[l>>2]=0,c=t+48|0,o=e[c>>2]|0,o&8&&(r=d[a>>0]|0,r&1?(r=(e[t+40>>2]|0)+(e[t+36>>2]|0)|0,e[l>>2]=r,s=e[t+40>>2]|0,n=s):(r=((r&255)>>>1)+(a+1)|0,e[l>>2]=r,n=a+1|0,s=a+1|0),e[t+8>>2]=n,e[t+12>>2]=s,e[t+16>>2]=r),o&16&&(r=d[a>>0]|0,r&1?(o=e[t+36>>2]|0,e[l>>2]=(e[t+40>>2]|0)+o,r=(e[a>>2]&-2)+-1|0,l=o):(o=(r&255)>>>1,e[l>>2]=a+1+o,r=10,l=o),O2(a,r,0),r=d[a>>0]|0,r&1?(n=e[t+40>>2]|0,o=n,s=e[t+36>>2]|0):(o=a+1|0,s=(r&255)>>>1,n=a+1|0),r=t+24|0,e[r>>2]=n,e[t+20>>2]=n,e[t+28>>2]=o+s,e[c>>2]&3&&(e[r>>2]=n+l))}function _s(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;I=y,y=y+32|0,a=I+16|0,C=I+8|0,c=I,f=0,h0(65,C|0,t|0),p=f,f=0;e:do if(p&1)n=b(0)|0,s=t,o=t;else{do if(d[C>>0]|0){s=e[(e[t>>2]|0)+-12>>2]|0,e[c>>2]=e[t+(s+24)>>2],h=t+s|0,p=e[t+(s+4)>>2]|0,o=r+n|0,s=t+(s+76)|0,n=e[s>>2]|0;do if((n|0)==-1)if(f=0,n=u0(68,h|0)|0,k=f,f=0,k&1)g=13;else{if(e[a>>2]=n,f=0,n=y0(37,a|0,44220)|0,k=f,f=0,!(k&1)&&(f=0,l=y0(e[(e[n>>2]|0)+28>>2]|0,n|0,32)|0,k=f,f=0,!(k&1))){Mi(a),n=l<<24>>24,e[s>>2]=n,g=9;break}n=b(0)|0,Mi(a)}else g=9;while(!1);if((g|0)==9)if(f=0,e[a>>2]=e[c>>2],n=Fe(39,a|0,r|0,((p&176|0)==32?o:r)|0,o|0,h|0,n&255|0)|0,k=f,f=0,k&1)g=13;else{if(n)break;if(k=e[(e[t>>2]|0)+-12>>2]|0,f=0,h0(66,t+k|0,e[t+(k+16)>>2]|5|0),k=f,f=0,k&1)g=13;else break}(g|0)==13&&(n=b(0)|0),yt(C),s=t,o=t;break e}while(!1);return yt(C),y=I,t|0}while(!1);return zi(n|0)|0,f=0,n0(181,s+(e[(e[o>>2]|0)+-12>>2]|0)|0),k=f,f=0,k&1?(n=b()|0,f=0,we(3),k=f,f=0,k&1?(k=b(0)|0,Ie(k)):r0(n|0),0):(Wi(),y=I,t|0)}function Rs(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;if(n=e[r+48>>2]|0,n&16){if(n=r+44|0,s=e[n>>2]|0,o=e[r+24>>2]|0,s>>>0>>0?e[n>>2]=o:o=s,s=e[r+20>>2]|0,l=o-s|0,l>>>0>4294967279&&tt(t),l>>>0<11?(d[t>>0]=l<<1,n=t+1|0):(r=l+16&-16,n=G0(r)|0,e[t+8>>2]=n,e[t>>2]=r|1,e[t+4>>2]=l),(s|0)!=(o|0)){for(r=n;d[r>>0]=d[s>>0]|0,s=s+1|0,(s|0)!=(o|0);)r=r+1|0;n=n+l|0}d[n>>0]=0;return}if(!(n&8)){e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0;return}if(s=e[r+8>>2]|0,r=e[r+16>>2]|0,l=r-s|0,l>>>0>4294967279&&tt(t),l>>>0<11?(d[t>>0]=l<<1,n=t+1|0):(o=l+16&-16,n=G0(o)|0,e[t+8>>2]=n,e[t>>2]=o|1,e[t+4>>2]=l),(s|0)!=(r|0)){for(o=n;d[o>>0]=d[s>>0]|0,s=s+1|0,(s|0)!=(r|0);)o=o+1|0;n=n+l|0}d[n>>0]=0}function Ps(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;e[t>>2]=36364,e[t+4>>2]=n,I=t+8|0,a=e[n>>2]|0,g=n+16|0,l=e[g>>2]|0,p=W(l,a)|0,e[I>>2]=0,k=t+12|0,e[k>>2]=0,e[t+16>>2]=0;do if(p){if((p|0)<0&&(f=0,n0(178,I|0),a=f,f=0,a&1)||(C=4),(C|0)==4&&(c=p<<1,f=0,h=u0(67,c|0)|0,a=f,f=0,!(a&1))){e[I>>2]=h,a=h+(p<<1)|0,e[t+16>>2]=a,je(h|0,0,c|0)|0,e[k>>2]=a,a=e[n>>2]|0,l=e[g>>2]|0;break}c=b()|0,o=e[I>>2]|0,l=o,o&&(a=e[k>>2]|0,(a|0)!=(o|0)&&(e[k>>2]=a+(~((a+-2-l|0)>>>1)<<1)),a0(o)),k=c,r0(k|0)}while(!1);if(c=t+20|0,l=W(a<<1,l)|0,e[c>>2]=0,h=t+24|0,e[h>>2]=0,e[t+28>>2]=0,!l){k=t+32|0,I=s,I=e[I>>2]|0,s=s+4|0,s=e[s>>2]|0,C=k,e[C>>2]=I,k=k+4|0,e[k>>2]=s,k=t+40|0,e[k>>2]=I,k=t+48|0,e[k>>2]=e[r>>2],e[k+4>>2]=e[r+4>>2],e[k+8>>2]=e[r+8>>2];return}if((l|0)<0&&(f=0,n0(178,c|0),g=f,f=0,g&1)||(C=13),(C|0)==13&&(f=0,o=u0(67,l|0)|0,C=f,f=0,!(C&1))){e[h>>2]=o,e[c>>2]=o,e[t+28>>2]=o+l;do d[o>>0]=0,o=(e[h>>2]|0)+1|0,e[h>>2]=o,l=l+-1|0;while(l|0);k=t+32|0,I=s,I=e[I>>2]|0,s=s+4|0,s=e[s>>2]|0,C=k,e[C>>2]=I,k=k+4|0,e[k>>2]=s,k=t+40|0,e[k>>2]=I,k=t+48|0,e[k>>2]=e[r>>2],e[k+4>>2]=e[r+4>>2],e[k+8>>2]=e[r+8>>2];return}a=b()|0,o=e[c>>2]|0,o&&((e[h>>2]|0)!=(o|0)&&(e[h>>2]=o),a0(o)),o=e[I>>2]|0,o||(k=a,r0(k|0)),l=e[k>>2]|0,(l|0)!=(o|0)&&(e[k>>2]=l+(~((l+-2-o|0)>>>1)<<1)),a0(o),k=a,r0(k|0)}function Ls(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;e[t>>2]=36340,e[t+4>>2]=n,I=t+8|0,a=e[n>>2]|0,g=n+16|0,l=e[g>>2]|0,p=W(l,a)|0,e[I>>2]=0,k=t+12|0,e[k>>2]=0,e[t+16>>2]=0;do if(p){if((p|0)<0&&(f=0,n0(178,I|0),a=f,f=0,a&1)||(C=4),(C|0)==4&&(c=p<<1,f=0,h=u0(67,c|0)|0,a=f,f=0,!(a&1))){e[I>>2]=h,a=h+(p<<1)|0,e[t+16>>2]=a,je(h|0,0,c|0)|0,e[k>>2]=a,a=e[n>>2]|0,l=e[g>>2]|0;break}c=b()|0,o=e[I>>2]|0,l=o,o&&(a=e[k>>2]|0,(a|0)!=(o|0)&&(e[k>>2]=a+(~((a+-2-l|0)>>>1)<<1)),a0(o)),k=c,r0(k|0)}while(!1);if(c=t+20|0,l=W(a<<1,l)|0,e[c>>2]=0,h=t+24|0,e[h>>2]=0,e[t+28>>2]=0,!l){k=t+32|0,I=s,I=e[I>>2]|0,s=s+4|0,s=e[s>>2]|0,C=k,e[C>>2]=I,k=k+4|0,e[k>>2]=s,k=t+40|0,e[k>>2]=I,k=t+48|0,e[k>>2]=e[r>>2],e[k+4>>2]=e[r+4>>2],e[k+8>>2]=e[r+8>>2];return}if((l|0)<0&&(f=0,n0(178,c|0),g=f,f=0,g&1)||(C=13),(C|0)==13&&(f=0,o=u0(67,l|0)|0,C=f,f=0,!(C&1))){e[h>>2]=o,e[c>>2]=o,e[t+28>>2]=o+l;do d[o>>0]=0,o=(e[h>>2]|0)+1|0,e[h>>2]=o,l=l+-1|0;while(l|0);k=t+32|0,I=s,I=e[I>>2]|0,s=s+4|0,s=e[s>>2]|0,C=k,e[C>>2]=I,k=k+4|0,e[k>>2]=s,k=t+40|0,e[k>>2]=I,k=t+48|0,e[k>>2]=e[r>>2],e[k+4>>2]=e[r+4>>2],e[k+8>>2]=e[r+8>>2];return}a=b()|0,o=e[c>>2]|0,o&&((e[h>>2]|0)!=(o|0)&&(e[h>>2]=o),a0(o)),o=e[I>>2]|0,o||(k=a,r0(k|0)),l=e[k>>2]|0,(l|0)!=(o|0)&&(e[k>>2]=l+(~((l+-2-o|0)>>>1)<<1)),a0(o),k=a,r0(k|0)}function Us(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;e[t>>2]=36316,e[t+4>>2]=n,I=t+8|0,a=e[n>>2]|0,g=n+16|0,l=e[g>>2]|0,p=W(l,a)|0,e[I>>2]=0,k=t+12|0,e[k>>2]=0,e[t+16>>2]=0;do if(p){if((p|0)<0&&(f=0,n0(178,I|0),a=f,f=0,a&1)||(C=4),(C|0)==4&&(c=p<<1,f=0,h=u0(67,c|0)|0,a=f,f=0,!(a&1))){e[I>>2]=h,a=h+(p<<1)|0,e[t+16>>2]=a,je(h|0,0,c|0)|0,e[k>>2]=a,a=e[n>>2]|0,l=e[g>>2]|0;break}c=b()|0,o=e[I>>2]|0,l=o,o&&(a=e[k>>2]|0,(a|0)!=(o|0)&&(e[k>>2]=a+(~((a+-2-l|0)>>>1)<<1)),a0(o)),k=c,r0(k|0)}while(!1);if(c=t+20|0,l=W(a<<1,l)|0,e[c>>2]=0,h=t+24|0,e[h>>2]=0,e[t+28>>2]=0,!l){k=t+32|0,I=s,I=e[I>>2]|0,s=s+4|0,s=e[s>>2]|0,C=k,e[C>>2]=I,k=k+4|0,e[k>>2]=s,k=t+40|0,e[k>>2]=I,k=t+48|0,e[k>>2]=e[r>>2],e[k+4>>2]=e[r+4>>2],e[k+8>>2]=e[r+8>>2];return}if((l|0)<0&&(f=0,n0(178,c|0),g=f,f=0,g&1)||(C=13),(C|0)==13&&(f=0,o=u0(67,l|0)|0,C=f,f=0,!(C&1))){e[h>>2]=o,e[c>>2]=o,e[t+28>>2]=o+l;do d[o>>0]=0,o=(e[h>>2]|0)+1|0,e[h>>2]=o,l=l+-1|0;while(l|0);k=t+32|0,I=s,I=e[I>>2]|0,s=s+4|0,s=e[s>>2]|0,C=k,e[C>>2]=I,k=k+4|0,e[k>>2]=s,k=t+40|0,e[k>>2]=I,k=t+48|0,e[k>>2]=e[r>>2],e[k+4>>2]=e[r+4>>2],e[k+8>>2]=e[r+8>>2];return}a=b()|0,o=e[c>>2]|0,o&&((e[h>>2]|0)!=(o|0)&&(e[h>>2]=o),a0(o)),o=e[I>>2]|0,o||(k=a,r0(k|0)),l=e[k>>2]|0,(l|0)!=(o|0)&&(e[k>>2]=l+(~((l+-2-o|0)>>>1)<<1)),a0(o),k=a,r0(k|0)}function Os(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36316,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s))}function Ns(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36316,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,!s){a0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s),a0(t)}function Bs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;if(o=t+48|0,!(e[o>>2]|0)){c=t+52|0,b1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}h=t+4|0,l=n<<1,a=W(l,e[(e[h>>2]|0)+16>>2]|0)|0,c=t+20|0,b1(t,r,e[c>>2]|0,n,s),r=e[h>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),h=e[o>>2]|0,(Qe[e[(e[h>>2]|0)+48>>2]&63](h,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,3,35648),h=f,f=0,h&1?(h=b()|0,ge(r|0),r0(h|0)):Be(r|0,824,96))}function Vs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+48>>2]|0,o){qs(t,o,r,n,s);return}else{o=t+52|0,Ur(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Ur(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;h=t+4|0,l=e[h>>2]|0;do if(!(d[l+32>>0]|0))p=r;else{if(a=t+8|0,ti(e[a>>2]|0,r|0,s*6|0)|0,l=e[h>>2]|0,c=e[l+16>>2]|0,(s|0)<=0){p=e[a>>2]|0;break}for(r=e[a>>2]|0,l=r,a=0;p=l+4|0,g=E[l>>1]|0,E[l>>1]=E[p>>1]|0,E[p>>1]=g,a=a+1|0,(a|0)!=(s|0);)l=l+(c<<1)|0;p=r,l=e[h>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:if((e[l+24>>2]|0)==2){if((s|0)<=0)return;l=t+32|0,r=0;do g=e[l>>2]|0,h=q[p+(r*6|0)+2>>1]<>1]<>1]<>1]=(h+49152+((t+o|0)>>>2)&65535)>>>g,E[n+(r*6|0)+2>>1]=t>>>g,E[n+(r*6|0)+4>>1]=o>>>g,r=r+1|0;while((r|0)!=(s|0));return}else{if(a=(o|0)<(s|0)?o:s,(a|0)<=0)return;c=o<<1,l=e[t+32>>2]|0,r=0;do s=q[p+(r*6|0)+2>>1]<>1]<>1]<>1]=(s+49152+((t+g|0)>>>2)&65535)>>>l,E[n+(r+o<<1)>>1]=t>>>l,E[n+(r+c<<1)>>1]=g>>>l,r=r+1|0;while((r|0)!=(a|0));return}case 4:{if((e[l+24>>2]|0)!=1||(a=(o|0)<(s|0)?o:s,(a|0)<=0))return;c=o<<1,h=o*3|0,l=e[t+32>>2]|0,r=0;do g=E[p+(r<<3)+6>>1]|0,C=q[p+(r<<3)+2>>1]<>1]<>1]<>1]=(C+49152+((s+t|0)>>>2)&65535)>>>l,E[n+(r+o<<1)>>1]=s>>>l,E[n+(r+c<<1)>>1]=t>>>l,E[n+(r+h<<1)>>1]=g,r=r+1|0;while((r|0)!=(a|0));return}default:return}}function qs(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;C=y,y=y+176|0,I=C+152|0,U=C+16|0,k=C,h=t+4|0,l=e[h>>2]|0,g=s<<1,a=W(g,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=Qe[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){p=26;break}else a=a-l|0;if((p|0)==26){l=e[h>>2]|0;break}p=U+56|0,h=U+4|0,e[U>>2]=36160,e[p>>2]=36180,f=0,h0(62,U+56|0,h|0),C=f,f=0,C&1&&(U=b()|0,H0(p),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,h|0),C=f,f=0;do if(C&1)l=b()|0;else{if(e[h>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f=0,h0(63,h|0,I|0),C=f,f=0,C&1){l=b()|0,f0(I),f0(r),ce(h);break}f0(I),f=0,l=L0(28,U|0,49029,57)|0,I=f,f=0,!(I&1)&&(f=0,y0(36,l|0,0)|0,I=f,f=0,!(I&1))&&(c=de(16)|0,f=0,h0(64,k|0,h|0),I=f,f=0,I&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,k|0),I=f,f=0,I&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(k),a||(k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0))),ge(c|0),k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)),k=b()|0,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)}while(!1);U=l,H0(p),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,Ur(t,U,n,s,o),y=C;return}Zi(e[a>>2]|0,W(g,e[l+16>>2]|0)|0),U=e[a>>2]|0,Ur(t,U,n,s,o),y=C}function Zi(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;if(o=y,y=y+176|0,n=o+152|0,h=o+16|0,a=o,!(r&1)){if(n=(r|0)/4|0,(r|0)>3){s=0;do h=t+(s<<2)|0,c=e[h>>2]|0,e[h>>2]=c>>>8&16711935|c<<8&-16711936,s=s+1|0;while((s|0)<(n|0))}if(!(r&3)){y=o;return}a=t+(r+-2)|0,h=t+(r+-1)|0,c=d[a>>0]|0,d[a>>0]=d[h>>0]|0,d[h>>0]=c,y=o;return}c=h+56|0,l=h+4|0,e[h>>2]=36160,e[c>>2]=36180,f=0,h0(62,h+56|0,l|0),o=f,f=0,o&1&&(h=b()|0,H0(c),r0(h|0)),e[h+128>>2]=0,e[h+132>>2]=-1,e[h>>2]=36200,e[h+56>>2]=36220,f=0,n0(180,l|0),o=f,f=0;do if(o&1)n=b()|0;else{if(e[l>>2]=36236,o=h+36|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[h+52>>2]=16,e[n>>2]=0,e[n+4>>2]=0,e[n+8>>2]=0,f=0,h0(63,l|0,n|0),t=f,f=0,t&1){h=b()|0,f0(n),f0(o),ce(l),n=h;break}f0(n),f=0,n=L0(28,h|0,49087,24)|0,t=f,f=0,!(t&1)&&(f=0,s=y0(36,n|0,r|0)|0,r=f,f=0,!(r&1))&&(f=0,L0(28,s|0,49112,20)|0,r=f,f=0,!(r&1))&&(t=de(16)|0,f=0,h0(64,a|0,l|0),r=f,f=0,r&1?n=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,t|0,1,35648,a|0),r=f,f=0,r&1?s=1:(f=0,m0(6,t|0,824,96),f=0,s=0),n=b()|0,f0(a),s||(a=n,e[h>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,f0(o),ce(l),H0(c),r0(a|0))),ge(t|0),a=n,e[h>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,f0(o),ce(l),H0(c),r0(a|0)),a=b()|0,e[h>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,f0(o),ce(l),H0(c),r0(a|0)}while(!1);h=n,H0(c),r0(h|0)}function b1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;p=t+4|0,l=e[p>>2]|0;e:do switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)<=0)break e;l=t+40|0,t=0;do o=e[l>>2]|0,c=q[r+(t*6|0)+2>>1]<>1]<>1]<>2)+16384|0,E[n+(t*6|0)>>1]=(a+32768+h&65535)>>>o,E[n+(t*6|0)+2>>1]=(h&65535)>>>o,E[n+(t*6|0)+4>>1]=(c+32768+h&65535)>>>o,t=t+1|0;while((t|0)!=(s|0))}else{if(a=(s|0)<(o|0)?s:o,(a|0)<=0)break e;c=o<<1,l=t+40|0,t=0;do h=e[l>>2]|0,C=q[r+(t+o<<1)>>1]<>1]<>1]<>2)+16384|0,E[n+(t*6|0)>>1]=(I+32768+g&65535)>>>h,E[n+(t*6|0)+2>>1]=(g&65535)>>>h,E[n+(t*6|0)+4>>1]=(C+32768+g&65535)>>>h,t=t+1|0;while((t|0)!=(a|0))}break}case 4:{if((e[l+24>>2]|0)==1&&(h=(s|0)<(o|0)?s:o,(h|0)>0)){c=o<<1,l=t+40|0,t=o*3|0,a=0;do I=e[l>>2]|0,C=q[r+(a+o<<1)>>1]<>1]<>1]<>2)+16384|0,k=E[r+(a+t<<1)>>1]|0,B=pi((g&65535)>>>I&65535|0,0,16)|0,C=(C+32768+g&65535)>>>I|I0,k=pi(k&65535|0,0,48)|0,k=B|(U+32768+g&65535)>>>I&65535|k,C=C&65535|I0,I=n+(a<<3)|0,g=I,E[g>>1]=k,E[g+2>>1]=k>>>16,I=I+4|0,E[I>>1]=C,E[I+2>>1]=C>>>16,a=a+1|0;while((a|0)!=(h|0))}break}default:}while(!1);if(l=e[p>>2]|0,!!(d[l+32>>0]|0)&&(a=e[l+16>>2]|0,!((s|0)<=0)))for(l=n,t=0;B=l+4|0,U=E[l>>1]|0,E[l>>1]=E[B>>1]|0,E[B>>1]=U,t=t+1|0,(t|0)!=(s|0);)l=l+(a<<1)|0}function bs(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36340,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s))}function Gs(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36340,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,!s){a0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s),a0(t)}function Qs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;if(o=t+48|0,!(e[o>>2]|0)){c=t+52|0,G1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}h=t+4|0,l=n<<1,a=W(l,e[(e[h>>2]|0)+16>>2]|0)|0,c=t+20|0,G1(t,r,e[c>>2]|0,n,s),r=e[h>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),h=e[o>>2]|0,(Qe[e[(e[h>>2]|0)+48>>2]&63](h,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,3,35648),h=f,f=0,h&1?(h=b()|0,ge(r|0),r0(h|0)):Be(r|0,824,96))}function zs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+48>>2]|0,o){Hs(t,o,r,n,s);return}else{o=t+52|0,Or(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Or(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;h=t+4|0,l=e[h>>2]|0;do if(!(d[l+32>>0]|0))p=r;else{if(a=t+8|0,ti(e[a>>2]|0,r|0,s*6|0)|0,l=e[h>>2]|0,c=e[l+16>>2]|0,(s|0)<=0){p=e[a>>2]|0;break}for(r=e[a>>2]|0,l=r,a=0;p=l+4|0,g=E[l>>1]|0,E[l>>1]=E[p>>1]|0,E[p>>1]=g,a=a+1|0,(a|0)!=(s|0);)l=l+(c<<1)|0;p=r,l=e[h>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:if((e[l+24>>2]|0)==2){if((s|0)<=0)return;l=t+32|0,r=0;do o=e[l>>2]|0,h=q[p+(r*6|0)>>1]<>1]<>1]<>>1)&65535)>>>o&65535,E[n+(r*6|0)>>1]=(h+32768-t&65535)>>>o,E[n+(r*6|0)+2>>1]=(t&65535)>>>o,E[n+(r*6|0)+4>>1]=g,r=r+1|0;while((r|0)!=(s|0));return}else{if(a=(o|0)<(s|0)?o:s,(a|0)<=0)return;c=o<<1,l=e[t+32>>2]|0,r=0;do s=q[p+(r*6|0)>>1]<>1]<>1]<>>1)&65535)>>>l&65535,E[n+(r<<1)>>1]=(s+32768-t&65535)>>>l,E[n+(r+o<<1)>>1]=(t&65535)>>>l,E[n+(r+c<<1)>>1]=g,r=r+1|0;while((r|0)!=(a|0));return}case 4:{if((e[l+24>>2]|0)!=1||(a=(o|0)<(s|0)?o:s,(a|0)<=0))return;c=o<<1,h=o*3|0,l=e[t+32>>2]|0,r=0;do g=E[p+(r<<3)+6>>1]|0,C=q[p+(r<<3)>>1]<>1]<>1]<>>1)&65535)>>>l&65535,E[n+(r<<1)>>1]=(C+32768-s&65535)>>>l,E[n+(r+o<<1)>>1]=(s&65535)>>>l,E[n+(r+c<<1)>>1]=t,E[n+(r+h<<1)>>1]=g,r=r+1|0;while((r|0)!=(a|0));return}default:return}}function Hs(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;C=y,y=y+176|0,I=C+152|0,U=C+16|0,k=C,h=t+4|0,l=e[h>>2]|0,g=s<<1,a=W(g,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=Qe[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){p=26;break}else a=a-l|0;if((p|0)==26){l=e[h>>2]|0;break}p=U+56|0,h=U+4|0,e[U>>2]=36160,e[p>>2]=36180,f=0,h0(62,U+56|0,h|0),C=f,f=0,C&1&&(U=b()|0,H0(p),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,h|0),C=f,f=0;do if(C&1)l=b()|0;else{if(e[h>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f=0,h0(63,h|0,I|0),C=f,f=0,C&1){l=b()|0,f0(I),f0(r),ce(h);break}f0(I),f=0,l=L0(28,U|0,49029,57)|0,I=f,f=0,!(I&1)&&(f=0,y0(36,l|0,0)|0,I=f,f=0,!(I&1))&&(c=de(16)|0,f=0,h0(64,k|0,h|0),I=f,f=0,I&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,k|0),I=f,f=0,I&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(k),a||(k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0))),ge(c|0),k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)),k=b()|0,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)}while(!1);U=l,H0(p),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,Or(t,U,n,s,o),y=C;return}Zi(e[a>>2]|0,W(g,e[l+16>>2]|0)|0),U=e[a>>2]|0,Or(t,U,n,s,o),y=C}function G1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;p=t+4|0,l=e[p>>2]|0;e:do switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)<=0)break e;l=t+40|0,t=0;do h=e[l>>2]|0,c=q[r+(t*6|0)+2>>1]<>1]<>1]<>>1)&65535)>>>h&65535,E[n+(t*6|0)>>1]=a>>>h,E[n+(t*6|0)+2>>1]=c>>>h,E[n+(t*6|0)+4>>1]=o,t=t+1|0;while((t|0)!=(s|0))}else{if(a=(s|0)<(o|0)?s:o,(a|0)<=0)break e;c=o<<1,l=t+40|0,t=0;do g=e[l>>2]|0,C=q[r+(t+o<<1)>>1]<>1]<>1]<>>1)&65535)>>>g&65535,E[n+(t*6|0)>>1]=I>>>g,E[n+(t*6|0)+2>>1]=C>>>g,E[n+(t*6|0)+4>>1]=h,t=t+1|0;while((t|0)!=(a|0))}break}case 4:{if((e[l+24>>2]|0)==1&&(h=(s|0)<(o|0)?s:o,(h|0)>0)){c=o<<1,l=t+40|0,t=o*3|0,a=0;do g=e[l>>2]|0,I=q[r+(a+o<<1)>>1]<>1]<>1]<>>1)&65535)>>>g,k=E[r+(a+t<<1)>>1]|0,I=pi(I>>>g&65535|0,0,16)|0,C=I0|C,k=pi(k&65535|0,0,48)|0,k=U>>>g&65535|I|k,C=C&65535|I0,I=n+(a<<3)|0,g=I,E[g>>1]=k,E[g+2>>1]=k>>>16,I=I+4|0,E[I>>1]=C,E[I+2>>1]=C>>>16,a=a+1|0;while((a|0)!=(h|0))}break}default:}while(!1);if(l=e[p>>2]|0,!!(d[l+32>>0]|0)&&(a=e[l+16>>2]|0,!((s|0)<=0)))for(l=n,t=0;U=l+4|0,k=E[l>>1]|0,E[l>>1]=E[U>>1]|0,E[U>>1]=k,t=t+1|0,(t|0)!=(s|0);)l=l+(a<<1)|0}function Ys(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36364,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s))}function js(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36364,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,!s){a0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s),a0(t)}function Xs(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;if(o=t+48|0,!(e[o>>2]|0)){c=t+52|0,Q1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}h=t+4|0,l=n<<1,a=W(l,e[(e[h>>2]|0)+16>>2]|0)|0,c=t+20|0,Q1(t,r,e[c>>2]|0,n,s),r=e[h>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),h=e[o>>2]|0,(Qe[e[(e[h>>2]|0)+48>>2]&63](h,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,3,35648),h=f,f=0,h&1?(h=b()|0,ge(r|0),r0(h|0)):Be(r|0,824,96))}function Ks(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+48>>2]|0,o){Ws(t,o,r,n,s);return}else{o=t+52|0,Nr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Nr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0;h=t+4|0,l=e[h>>2]|0;do if(!(d[l+32>>0]|0))p=r;else{if(a=t+8|0,ti(e[a>>2]|0,r|0,s*6|0)|0,l=e[h>>2]|0,c=e[l+16>>2]|0,(s|0)<=0){p=e[a>>2]|0;break}for(r=e[a>>2]|0,l=r,a=0;p=l+4|0,g=E[l>>1]|0,E[l>>1]=E[p>>1]|0,E[p>>1]=g,a=a+1|0,(a|0)!=(s|0);)l=l+(c<<1)|0;p=r,l=e[h>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:if((e[l+24>>2]|0)==2){if((s|0)<=0)return;l=t+32|0,r=0;do o=e[l>>2]|0,t=q[p+(r*6|0)+2>>1]<>1]<>>o&65535,E[n+(r*6|0)>>1]=((q[p+(r*6|0)>>1]<>>o,E[n+(r*6|0)+2>>1]=(t&65535)>>>o,E[n+(r*6|0)+4>>1]=g,r=r+1|0;while((r|0)!=(s|0));return}else{if(a=(o|0)<(s|0)?o:s,(a|0)<=0)return;c=o<<1,l=e[t+32>>2]|0,r=0;do t=q[p+(r*6|0)+2>>1]<>1]<>>l&65535,E[n+(r<<1)>>1]=((q[p+(r*6|0)>>1]<>>l,E[n+(r+o<<1)>>1]=(t&65535)>>>l,E[n+(r+c<<1)>>1]=g,r=r+1|0;while((r|0)!=(a|0));return}case 4:{if((e[l+24>>2]|0)!=1||(c=(o|0)<(s|0)?o:s,(c|0)<=0))return;h=o<<1,a=o*3|0,l=e[t+32>>2]|0,r=0;do g=E[p+(r<<3)+6>>1]|0,s=q[p+(r<<3)+2>>1]<>1]<>>l&65535,E[n+(r<<1)>>1]=((q[p+(r<<3)>>1]<>>l,E[n+(r+o<<1)>>1]=(s&65535)>>>l,E[n+(r+h<<1)>>1]=t,E[n+(r+a<<1)>>1]=g,r=r+1|0;while((r|0)!=(c|0));return}default:return}}function Ws(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;C=y,y=y+176|0,I=C+152|0,U=C+16|0,k=C,h=t+4|0,l=e[h>>2]|0,g=s<<1,a=W(g,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=Qe[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){p=26;break}else a=a-l|0;if((p|0)==26){l=e[h>>2]|0;break}p=U+56|0,h=U+4|0,e[U>>2]=36160,e[p>>2]=36180,f=0,h0(62,U+56|0,h|0),C=f,f=0,C&1&&(U=b()|0,H0(p),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,h|0),C=f,f=0;do if(C&1)l=b()|0;else{if(e[h>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f=0,h0(63,h|0,I|0),C=f,f=0,C&1){l=b()|0,f0(I),f0(r),ce(h);break}f0(I),f=0,l=L0(28,U|0,49029,57)|0,I=f,f=0,!(I&1)&&(f=0,y0(36,l|0,0)|0,I=f,f=0,!(I&1))&&(c=de(16)|0,f=0,h0(64,k|0,h|0),I=f,f=0,I&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,k|0),I=f,f=0,I&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(k),a||(k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0))),ge(c|0),k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)),k=b()|0,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)}while(!1);U=l,H0(p),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,Nr(t,U,n,s,o),y=C;return}Zi(e[a>>2]|0,W(g,e[l+16>>2]|0)|0),U=e[a>>2]|0,Nr(t,U,n,s,o),y=C}function Q1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;p=t+4|0,l=e[p>>2]|0;e:do switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)<=0)break e;l=t+40|0,t=0;do h=e[l>>2]|0,c=q[r+(t*6|0)+2>>1]<>1]<>>h&65535,E[n+(t*6|0)>>1]=((q[r+(t*6|0)>>1]<>>h,E[n+(t*6|0)+2>>1]=(c&65535)>>>h,E[n+(t*6|0)+4>>1]=o,t=t+1|0;while((t|0)!=(s|0))}else{if(a=(s|0)<(o|0)?s:o,(a|0)<=0)break e;c=o<<1,l=t+40|0,t=0;do g=e[l>>2]|0,C=q[r+(t+o<<1)>>1]<>1]<>>g&65535,E[n+(t*6|0)>>1]=((q[r+(t<<1)>>1]<>>g,E[n+(t*6|0)+2>>1]=(C&65535)>>>g,E[n+(t*6|0)+4>>1]=h,t=t+1|0;while((t|0)!=(a|0))}break}case 4:{if((e[l+24>>2]|0)==1&&(h=(s|0)<(o|0)?s:o,(h|0)>0)){c=o<<1,l=t+40|0,t=o*3|0,a=0;do I=e[l>>2]|0,U=q[r+(a+o<<1)>>1]<>1]<>>I,g=(U+32768+(q[r+(a+c<<1)>>1]<>>I,k=E[r+(a+t<<1)>>1]|0,I=pi((U&65535)>>>I&65535|0,0,16)|0,g=g|I0,k=pi(k&65535|0,0,48)|0,k=I|C&65535|k,g=g&65535|I0,C=n+(a<<3)|0,I=C,E[I>>1]=k,E[I+2>>1]=k>>>16,C=C+4|0,E[C>>1]=g,E[C+2>>1]=g>>>16,a=a+1|0;while((a|0)!=(h|0))}break}default:}while(!1);if(l=e[p>>2]|0,!!(d[l+32>>0]|0)&&(a=e[l+16>>2]|0,!((s|0)<=0)))for(l=n,t=0;U=l+4|0,k=E[l>>1]|0,E[l>>1]=E[U>>1]|0,E[U>>1]=k,t=t+1|0,(t|0)!=(s|0);)l=l+(a<<1)|0}function Vt(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0;if(C=y,y=y+16|0,p=C,g=e[t>>2]|0,!g)return t=0,y=C,t|0;if(I=r,c=s-I|0,h=o+12|0,a=e[h>>2]|0,c=(a|0)>(c|0)?a-c|0:0,a=n,o=a-I|0,(o|0)>0&&(Qe[e[(e[g>>2]|0)+48>>2]&63](g,r,o)|0)!=(o|0))return e[t>>2]=0,I=0,y=C,I|0;do if((c|0)>0){if(a1(p,c,l),f=0,o=L0(e[(e[g>>2]|0)+48>>2]|0,g|0,(d[p>>0]&1?e[p+8>>2]|0:p+1|0)|0,c|0)|0,I=f,f=0,I&1&&(I=b()|0,f0(p),r0(I|0)),(o|0)==(c|0)){f0(p);break}return e[t>>2]=0,f0(p),I=0,y=C,I|0}while(!1);return s=s-a|0,(s|0)>0&&(Qe[e[(e[g>>2]|0)+48>>2]&63](g,n,s)|0)!=(s|0)?(e[t>>2]=0,I=0,y=C,I|0):(e[h>>2]=0,I=g,y=C,I|0)}function Zs(t){t=t|0,e[t>>2]=36236,f0(t+32|0),ce(t)}function Js(t){t=t|0,e[t>>2]=36236,f0(t+32|0),ce(t),a0(t)}function $s(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;if(a=r+44|0,c=e[a>>2]|0,p=r+24|0,g=e[p>>2]|0,c>>>0>>0&&(e[a>>2]=g,c=g),h=c,a=l&24,!a){r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1;return}if((o|0)==1&(a|0)==24){r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1;return}e:do switch(o|0){case 0:{a=0,o=0;break}case 1:if(l&8){o=(e[r+12>>2]|0)-(e[r+8>>2]|0)|0,a=o,o=((o|0)<0)<<31>>31;break e}else{o=g-(e[r+20>>2]|0)|0,a=o,o=((o|0)<0)<<31>>31;break e}case 2:{a=r+32|0,d[a>>0]&1?a=e[r+40>>2]|0:a=a+1|0,o=c-a|0,a=o,o=((o|0)<0)<<31>>31;break}default:{r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1;return}}while(!1);if(o=Li(a|0,o|0,n|0,s|0)|0,n=I0,(n|0)>=0&&(a=r+32|0,d[a>>0]&1?a=e[r+40>>2]|0:a=a+1|0,s=c-a|0,c=((s|0)<0)<<31>>31,!((c|0)<(n|0)|(c|0)==(n|0)&s>>>0>>0))){if(a=l&8,!((o|0)==0&(n|0)==0)){if(a|0&&!(e[r+12>>2]|0)){r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1;return}if((l&16|0)!=0&(g|0)==0){r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1;return}}a&&(e[r+12>>2]=(e[r+8>>2]|0)+o,e[r+16>>2]=h),l&16&&(e[p>>2]=(e[r+20>>2]|0)+o),r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=o,e[r+4>>2]=n;return}r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1}function eo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,n=n+8|0,Bt[e[(e[r>>2]|0)+16>>2]&15](t,r,e[n>>2]|0,e[n+4>>2]|0,0,s)}function io(t){t=t|0;var r=0,n=0,s=0,o=0;return r=t+44|0,n=e[r>>2]|0,s=e[t+24>>2]|0,n>>>0>>0&&(e[r>>2]=s,n=s),!(e[t+48>>2]&8)||(o=t+16|0,r=e[o>>2]|0,s=t+12|0,r>>>0>>0?(s=e[s>>2]|0,e[o>>2]=n,r=n):s=e[s>>2]|0,s>>>0>=r>>>0)?(t=-1,t|0):(t=N[s>>0]|0,t|0)}function to(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;if(s=t+44|0,n=e[s>>2]|0,o=e[t+24>>2]|0,n>>>0>>0&&(e[s>>2]=o,n=o),c=t+8|0,s=e[c>>2]|0,h=t+12|0,l=e[h>>2]|0,a=s,s>>>0>=l>>>0)return t=-1,t|0;if((r|0)==-1)return e[c>>2]=s,e[h>>2]=l+-1,e[t+16>>2]=n,t=0,t|0;if(e[t+48>>2]&16)o=r&255,s=l+-1|0;else if(o=r&255,s=l+-1|0,o<<24>>24!=(d[s>>0]|0))return t=-1,t|0;return e[c>>2]=a,e[h>>2]=s,e[t+16>>2]=n,d[s>>0]=o,t=r,t|0}function ro(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0;if(B=y,y=y+16|0,g=B,(r|0)==-1)return t=0,y=B,t|0;C=t+12|0,I=t+8|0,k=(e[C>>2]|0)-(e[I>>2]|0)|0,U=t+24|0,n=e[U>>2]|0,p=t+28|0,s=e[p>>2]|0;do if((n|0)==(s|0)){if(c=t+48|0,!(e[c>>2]&16))return t=-1,y=B,t|0;if(h=t+20|0,a=e[h>>2]|0,o=n-a|0,l=t+44|0,a=(e[l>>2]|0)-a|0,s=t+32|0,f=0,h0(67,s|0,0),n=f,f=0,!(n&1)&&(d[s>>0]&1?n=(e[s>>2]&-2)+-1|0:n=10,f=0,m0(8,s|0,n|0,0),n=f,f=0,!(n&1))){n=d[s>>0]|0,n&1?(s=e[t+40>>2]|0,n=e[t+36>>2]|0):(s=s+1|0,n=(n&255)>>>1),V=s+n|0,e[h>>2]=s,e[p>>2]=V,h=s+o|0,e[U>>2]=h,n=s+a|0,e[l>>2]=n,s=V;break}return V=b(0)|0,zi(V|0)|0,Wi(),V=-1,y=B,V|0}else V=t+44|0,c=t+48|0,l=V,h=n,n=e[V>>2]|0;while(!1);return a=h+1|0,e[g>>2]=a,o=e[(a>>>0>>0?l:g)>>2]|0,e[l>>2]=o,e[c>>2]&8&&(n=t+32|0,d[n>>0]&1?n=e[t+40>>2]|0:n=n+1|0,e[I>>2]=n,e[C>>2]=n+k,e[t+16>>2]=o),(h|0)==(s|0)?(V=Ni[e[(e[t>>2]|0)+52>>2]&63](t,r&255)|0,y=B,V|0):(e[U>>2]=a,d[h>>0]=r,V=r&255,y=B,V|0)}function no(t){t=t|0;var r=0,n=0;e[t>>2]=36200,r=t+56|0,e[r>>2]=36220,n=t+4|0,e[n>>2]=36236,f0(t+36|0),ce(n),H0(r)}function so(t){t=t|0;var r=0,n=0;e[t>>2]=36200,r=t+56|0,e[r>>2]=36220,n=t+4|0,e[n>>2]=36236,f0(t+36|0),ce(n),H0(r),a0(t)}function oo(t){t=t|0;var r=0,n=0,s=0,o=0;o=e[(e[t>>2]|0)+-12>>2]|0,r=t+o|0,e[r>>2]=36200,n=t+(o+56)|0,e[n>>2]=36220,s=t+(o+4)|0,e[s>>2]=36236,f0(t+(o+36)|0),ce(s),H0(n),a0(r)}function lo(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36388,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s))}function ao(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36388,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,!s){a0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s),a0(t)}function fo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;if(o=t+36|0,!(e[o>>2]|0)){c=t+40|0,z1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}h=t+4|0,l=n<<1,a=W(l,e[(e[h>>2]|0)+16>>2]|0)|0,c=t+20|0,z1(t,r,e[c>>2]|0,n,s),r=e[h>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),h=e[o>>2]|0,(Qe[e[(e[h>>2]|0)+48>>2]&63](h,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,3,35648),h=f,f=0,h&1?(h=b()|0,ge(r|0),r0(h|0)):Be(r|0,824,96))}function uo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){co(t,o,r,n,s);return}else{o=t+40|0,Br(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Br(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0;c=t+4|0,l=e[c>>2]|0;do if(!(d[l+32>>0]|0))h=r;else{if(t=t+8|0,ti(e[t>>2]|0,r|0,s*6|0)|0,l=e[c>>2]|0,a=e[l+16>>2]|0,(s|0)<=0){h=e[t>>2]|0;break}for(t=e[t>>2]|0,l=t,r=0;h=l+4|0,p=E[l>>1]|0,E[l>>1]=E[h>>1]|0,E[h>>1]=p,r=r+1|0,(r|0)!=(s|0);)l=l+(a<<1)|0;h=t,l=e[c>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do c=q[h+(l*6|0)+2>>1]|0,o=32768-c+(q[h+(l*6|0)+4>>1]|0)|0,p=(q[h+(l*6|0)>>1]|0)-c+32768|0,E[n+(l*6|0)>>1]=c+49152+(((o&65535)+(p&65535)|0)>>>2),E[n+(l*6|0)+2>>1]=o,E[n+(l*6|0)+4>>1]=p,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do c=q[h+(r*6|0)+2>>1]|0,s=32768-c+(q[h+(r*6|0)+4>>1]|0)|0,p=(q[h+(r*6|0)>>1]|0)-c+32768|0,E[n+(r<<1)>>1]=c+49152+(((s&65535)+(p&65535)|0)>>>2),E[n+(r+o<<1)>>1]=s,E[n+(r+t<<1)>>1]=p,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do p=E[h+(a<<3)+6>>1]|0,g=q[h+(a<<3)+2>>1]|0,c=32768-g+(q[h+(a<<3)+4>>1]|0)|0,s=(q[h+(a<<3)>>1]|0)-g+32768|0,E[n+(a<<1)>>1]=g+49152+(((c&65535)+(s&65535)|0)>>>2),E[n+(a+o<<1)>>1]=c,E[n+(a+t<<1)>>1]=s,E[n+(a+r<<1)>>1]=p,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function co(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;C=y,y=y+176|0,I=C+152|0,U=C+16|0,k=C,h=t+4|0,l=e[h>>2]|0,g=s<<1,a=W(g,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=Qe[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){p=26;break}else a=a-l|0;if((p|0)==26){l=e[h>>2]|0;break}p=U+56|0,h=U+4|0,e[U>>2]=36160,e[p>>2]=36180,f=0,h0(62,U+56|0,h|0),C=f,f=0,C&1&&(U=b()|0,H0(p),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,h|0),C=f,f=0;do if(C&1)l=b()|0;else{if(e[h>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f=0,h0(63,h|0,I|0),C=f,f=0,C&1){l=b()|0,f0(I),f0(r),ce(h);break}f0(I),f=0,l=L0(28,U|0,49029,57)|0,I=f,f=0,!(I&1)&&(f=0,y0(36,l|0,0)|0,I=f,f=0,!(I&1))&&(c=de(16)|0,f=0,h0(64,k|0,h|0),I=f,f=0,I&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,k|0),I=f,f=0,I&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(k),a||(k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0))),ge(c|0),k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)),k=b()|0,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)}while(!1);U=l,H0(p),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,Br(t,U,n,s,o),y=C;return}Zi(e[a>>2]|0,W(g,e[l+16>>2]|0)|0),U=e[a>>2]|0,Br(t,U,n,s,o),y=C}function z1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;h=t+4|0,t=e[h>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(c=q[r+(t*6|0)+2>>1]|0,a=q[r+(t*6|0)+4>>1]|0,o=(q[r+(t*6|0)>>1]|0)-((a+c|0)>>>2)+16384|0,E[n+(t*6|0)>>1]=a+32768+o,E[n+(t*6|0)+2>>1]=o,E[n+(t*6|0)+4>>1]=c+32768+o,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do p=q[r+(a+o<<1)>>1]|0,g=q[r+(a+l<<1)>>1]|0,c=(q[r+(a<<1)>>1]|0)-((g+p|0)>>>2)+16384|0,E[n+(a*6|0)>>1]=g+32768+c,E[n+(a*6|0)+2>>1]=c,E[n+(a*6|0)+4>>1]=p+32768+c,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do p=q[r+(a+o<<1)>>1]|0,C=q[r+(a+t<<1)>>1]|0,g=(q[r+(a<<1)>>1]|0)-((C+p|0)>>>2)+16384|0,I=E[r+(a+l<<1)>>1]|0,k=pi(g&65535|0,0,16)|0,p=p+32768+g|I0,I=pi(I&65535|0,0,48)|0,I=k|C+32768+g&65535|I,p=p&65535|I0,g=n+(a<<3)|0,C=g,E[C>>1]=I,E[C+2>>1]=I>>>16,g=g+4|0,E[g>>1]=p,E[g+2>>1]=p>>>16,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[h>>2]|0,!!(d[t+32>>0]|0)&&(a=e[t+16>>2]|0,!((s|0)<=0)))for(t=n,l=0;k=t+4|0,I=E[t>>1]|0,E[t>>1]=E[k>>1]|0,E[k>>1]=I,l=l+1|0,(l|0)!=(s|0);)t=t+(a<<1)|0}function ho(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36412,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s))}function mo(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36412,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,!s){a0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s),a0(t)}function go(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;if(o=t+36|0,!(e[o>>2]|0)){c=t+40|0,H1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}h=t+4|0,l=n<<1,a=W(l,e[(e[h>>2]|0)+16>>2]|0)|0,c=t+20|0,H1(t,r,e[c>>2]|0,n,s),r=e[h>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),h=e[o>>2]|0,(Qe[e[(e[h>>2]|0)+48>>2]&63](h,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,3,35648),h=f,f=0,h&1?(h=b()|0,ge(r|0),r0(h|0)):Be(r|0,824,96))}function po(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){Ao(t,o,r,n,s);return}else{o=t+40|0,Vr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Vr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;c=t+4|0,l=e[c>>2]|0;do if(!(d[l+32>>0]|0))h=r;else{if(t=t+8|0,ti(e[t>>2]|0,r|0,s*6|0)|0,l=e[c>>2]|0,a=e[l+16>>2]|0,(s|0)<=0){h=e[t>>2]|0;break}for(t=e[t>>2]|0,l=t,r=0;h=l+4|0,p=E[l>>1]|0,E[l>>1]=E[h>>1]|0,E[h>>1]=p,r=r+1|0,(r|0)!=(s|0);)l=l+(a<<1)|0;h=t,l=e[c>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do a=q[h+(l*6|0)>>1]|0,o=E[h+(l*6|0)+2>>1]|0,c=o&65535,p=(q[h+(l*6|0)+4>>1]|0)+32768-((c+a|0)>>>1)&65535,E[n+(l*6|0)>>1]=a+32768-c,E[n+(l*6|0)+2>>1]=o,E[n+(l*6|0)+4>>1]=p,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do s=E[h+(r*6|0)+2>>1]|0,a=q[h+(r*6|0)>>1]|0,c=s&65535,p=(q[h+(r*6|0)+4>>1]|0)+32768-((c+a|0)>>>1)&65535,E[n+(r<<1)>>1]=a+32768-c,E[n+(r+o<<1)>>1]=s,E[n+(r+t<<1)>>1]=p,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do c=E[h+(a<<3)+2>>1]|0,p=E[h+(a<<3)+6>>1]|0,C=q[h+(a<<3)>>1]|0,g=c&65535,s=(q[h+(a<<3)+4>>1]|0)+32768-((g+C|0)>>>1)&65535,E[n+(a<<1)>>1]=C+32768-g,E[n+(a+o<<1)>>1]=c,E[n+(a+t<<1)>>1]=s,E[n+(a+r<<1)>>1]=p,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function Ao(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;C=y,y=y+176|0,I=C+152|0,U=C+16|0,k=C,h=t+4|0,l=e[h>>2]|0,g=s<<1,a=W(g,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=Qe[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){p=26;break}else a=a-l|0;if((p|0)==26){l=e[h>>2]|0;break}p=U+56|0,h=U+4|0,e[U>>2]=36160,e[p>>2]=36180,f=0,h0(62,U+56|0,h|0),C=f,f=0,C&1&&(U=b()|0,H0(p),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,h|0),C=f,f=0;do if(C&1)l=b()|0;else{if(e[h>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f=0,h0(63,h|0,I|0),C=f,f=0,C&1){l=b()|0,f0(I),f0(r),ce(h);break}f0(I),f=0,l=L0(28,U|0,49029,57)|0,I=f,f=0,!(I&1)&&(f=0,y0(36,l|0,0)|0,I=f,f=0,!(I&1))&&(c=de(16)|0,f=0,h0(64,k|0,h|0),I=f,f=0,I&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,k|0),I=f,f=0,I&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(k),a||(k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0))),ge(c|0),k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)),k=b()|0,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)}while(!1);U=l,H0(p),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,Vr(t,U,n,s,o),y=C;return}Zi(e[a>>2]|0,W(g,e[l+16>>2]|0)|0),U=e[a>>2]|0,Vr(t,U,n,s,o),y=C}function H1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;h=t+4|0,t=e[h>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(c=E[r+(t*6|0)+2>>1]|0,o=c&65535,a=(q[r+(t*6|0)>>1]|0)+32768+o|0,o=(q[r+(t*6|0)+4>>1]|0)+32768+(((a&65535)+o|0)>>>1)&65535,E[n+(t*6|0)>>1]=a,E[n+(t*6|0)+2>>1]=c,E[n+(t*6|0)+4>>1]=o,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do p=E[r+(a+o<<1)>>1]|0,c=p&65535,g=(q[r+(a<<1)>>1]|0)+32768+c|0,c=(q[r+(a+l<<1)>>1]|0)+32768+(((g&65535)+c|0)>>>1)&65535,E[n+(a*6|0)>>1]=g,E[n+(a*6|0)+2>>1]=p,E[n+(a*6|0)+4>>1]=c,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do g=E[r+(a+o<<1)>>1]|0,p=g&65535,C=(q[r+(a<<1)>>1]|0)+32768+p&65535,p=(q[r+(a+t<<1)>>1]|0)+32768+((C+p|0)>>>1)|0,I=E[r+(a+l<<1)>>1]|0,g=pi(g&65535|0,0,16)|0,p=I0|p,I=pi(I&65535|0,0,48)|0,I=C|g|I,p=p&65535|I0,g=n+(a<<3)|0,C=g,E[C>>1]=I,E[C+2>>1]=I>>>16,g=g+4|0,E[g>>1]=p,E[g+2>>1]=p>>>16,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[h>>2]|0,!!(d[t+32>>0]|0)&&(a=e[t+16>>2]|0,!((s|0)<=0)))for(t=n,l=0;I=t+4|0,C=E[t>>1]|0,E[t>>1]=E[I>>1]|0,E[I>>1]=C,l=l+1|0,(l|0)!=(s|0);)t=t+(a<<1)|0}function So(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36436,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s))}function vo(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36436,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,!s){a0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s),a0(t)}function wo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;if(o=t+36|0,!(e[o>>2]|0)){c=t+40|0,Y1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}h=t+4|0,l=n<<1,a=W(l,e[(e[h>>2]|0)+16>>2]|0)|0,c=t+20|0,Y1(t,r,e[c>>2]|0,n,s),r=e[h>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),h=e[o>>2]|0,(Qe[e[(e[h>>2]|0)+48>>2]&63](h,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,3,35648),h=f,f=0,h&1?(h=b()|0,ge(r|0),r0(h|0)):Be(r|0,824,96))}function To(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){Co(t,o,r,n,s);return}else{o=t+40|0,qr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function qr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0;c=t+4|0,l=e[c>>2]|0;do if(!(d[l+32>>0]|0))h=r;else{if(t=t+8|0,ti(e[t>>2]|0,r|0,s*6|0)|0,l=e[c>>2]|0,a=e[l+16>>2]|0,(s|0)<=0){h=e[t>>2]|0;break}for(t=e[t>>2]|0,l=t,r=0;h=l+4|0,p=E[l>>1]|0,E[l>>1]=E[h>>1]|0,E[h>>1]=p,r=r+1|0,(r|0)!=(s|0);)l=l+(a<<1)|0;h=t,l=e[c>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do o=E[h+(l*6|0)+2>>1]|0,c=o&65535,p=32768-c+(q[h+(l*6|0)+4>>1]|0)&65535,E[n+(l*6|0)>>1]=(q[h+(l*6|0)>>1]|0)+32768-c,E[n+(l*6|0)+2>>1]=o,E[n+(l*6|0)+4>>1]=p,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do s=E[h+(r*6|0)+2>>1]|0,c=s&65535,p=32768-c+(q[h+(r*6|0)+4>>1]|0)&65535,E[n+(r<<1)>>1]=(q[h+(r*6|0)>>1]|0)+32768-c,E[n+(r+o<<1)>>1]=s,E[n+(r+t<<1)>>1]=p,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do c=E[h+(a<<3)+2>>1]|0,p=E[h+(a<<3)+6>>1]|0,g=c&65535,s=32768-g+(q[h+(a<<3)+4>>1]|0)&65535,E[n+(a<<1)>>1]=(q[h+(a<<3)>>1]|0)+32768-g,E[n+(a+o<<1)>>1]=c,E[n+(a+t<<1)>>1]=s,E[n+(a+r<<1)>>1]=p,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function Co(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;C=y,y=y+176|0,I=C+152|0,U=C+16|0,k=C,h=t+4|0,l=e[h>>2]|0,g=s<<1,a=W(g,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=Qe[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){p=26;break}else a=a-l|0;if((p|0)==26){l=e[h>>2]|0;break}p=U+56|0,h=U+4|0,e[U>>2]=36160,e[p>>2]=36180,f=0,h0(62,U+56|0,h|0),C=f,f=0,C&1&&(U=b()|0,H0(p),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,h|0),C=f,f=0;do if(C&1)l=b()|0;else{if(e[h>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f=0,h0(63,h|0,I|0),C=f,f=0,C&1){l=b()|0,f0(I),f0(r),ce(h);break}f0(I),f=0,l=L0(28,U|0,49029,57)|0,I=f,f=0,!(I&1)&&(f=0,y0(36,l|0,0)|0,I=f,f=0,!(I&1))&&(c=de(16)|0,f=0,h0(64,k|0,h|0),I=f,f=0,I&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,k|0),I=f,f=0,I&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(k),a||(k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0))),ge(c|0),k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)),k=b()|0,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)}while(!1);U=l,H0(p),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,qr(t,U,n,s,o),y=C;return}Zi(e[a>>2]|0,W(g,e[l+16>>2]|0)|0),U=e[a>>2]|0,qr(t,U,n,s,o),y=C}function Y1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;h=t+4|0,t=e[h>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(c=E[r+(t*6|0)+2>>1]|0,a=c&65535,o=a+32768+(q[r+(t*6|0)+4>>1]|0)&65535,E[n+(t*6|0)>>1]=(q[r+(t*6|0)>>1]|0)+32768+a,E[n+(t*6|0)+2>>1]=c,E[n+(t*6|0)+4>>1]=o,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do p=E[r+(a+o<<1)>>1]|0,g=p&65535,c=g+32768+(q[r+(a+l<<1)>>1]|0)&65535,E[n+(a*6|0)>>1]=(q[r+(a<<1)>>1]|0)+32768+g,E[n+(a*6|0)+2>>1]=p,E[n+(a*6|0)+4>>1]=c,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do g=E[r+(a+o<<1)>>1]|0,p=g&65535,C=(q[r+(a<<1)>>1]|0)+32768+p|0,p=p+32768+(q[r+(a+t<<1)>>1]|0)|0,I=E[r+(a+l<<1)>>1]|0,g=pi(g&65535|0,0,16)|0,p=I0|p,I=pi(I&65535|0,0,48)|0,I=C&65535|g|I,p=p&65535|I0,g=n+(a<<3)|0,C=g,E[C>>1]=I,E[C+2>>1]=I>>>16,g=g+4|0,E[g>>1]=p,E[g+2>>1]=p>>>16,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[h>>2]|0,!!(d[t+32>>0]|0)&&(a=e[t+16>>2]|0,!((s|0)<=0)))for(t=n,l=0;I=t+4|0,C=E[t>>1]|0,E[t>>1]=E[I>>1]|0,E[I>>1]=C,l=l+1|0,(l|0)!=(s|0);)t=t+(a<<1)|0}function xo(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=36460,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,s&&(r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s))}function yo(t){t=t|0;var r=0,n=0,s=0;if(e[t>>2]=36460,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),s=e[t+8>>2]|0,!s){a0(t);return}r=t+12|0,n=e[r>>2]|0,(n|0)!=(s|0)&&(e[r>>2]=n+(~((n+-2-s|0)>>>1)<<1)),a0(s),a0(t)}function Io(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;if(o=t+36|0,!(e[o>>2]|0)){c=t+40|0,j1(t,r,e[c>>2]|0,n,s),e[c>>2]=(e[c>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}h=t+4|0,l=n<<1,a=W(l,e[(e[h>>2]|0)+16>>2]|0)|0,c=t+20|0,j1(t,r,e[c>>2]|0,n,s),r=e[h>>2]|0,(e[r+28>>2]|0)==536870912&&Zi(e[c>>2]|0,W(l,e[r+16>>2]|0)|0),h=e[o>>2]|0,(Qe[e[(e[h>>2]|0)+48>>2]&63](h,e[c>>2]|0,a)|0)!=(a|0)&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,3,35648),h=f,f=0,h&1?(h=b()|0,ge(r|0),r0(h|0)):Be(r|0,824,96))}function Do(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){Eo(t,o,r,n,s);return}else{o=t+40|0,br(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function br(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0;c=t+4|0,l=e[c>>2]|0;do if(!(d[l+32>>0]|0))h=r;else{if(t=t+8|0,ti(e[t>>2]|0,r|0,s*6|0)|0,l=e[c>>2]|0,a=e[l+16>>2]|0,(s|0)<=0){h=e[t>>2]|0;break}for(t=e[t>>2]|0,l=t,r=0;h=l+4|0,p=E[l>>1]|0,E[l>>1]=E[h>>1]|0,E[h>>1]=p,r=r+1|0,(r|0)!=(s|0);)l=l+(a<<1)|0;h=t,l=e[c>>2]|0}while(!1);switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do o=E[h+(l*6|0)+2>>1]|0,p=E[h+(l*6|0)+4>>1]|0,E[n+(l*6|0)>>1]=E[h+(l*6|0)>>1]|0,E[n+(l*6|0)+2>>1]=o,E[n+(l*6|0)+4>>1]=p,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do s=E[h+(r*6|0)+2>>1]|0,p=E[h+(r*6|0)+4>>1]|0,E[n+(r<<1)>>1]=E[h+(r*6|0)>>1]|0,E[n+(r+o<<1)>>1]=s,E[n+(r+t<<1)>>1]=p,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do c=E[h+(a<<3)+2>>1]|0,s=E[h+(a<<3)+4>>1]|0,p=E[h+(a<<3)+6>>1]|0,E[n+(a<<1)>>1]=E[h+(a<<3)>>1]|0,E[n+(a+o<<1)>>1]=c,E[n+(a+t<<1)>>1]=s,E[n+(a+r<<1)>>1]=p,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function Eo(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;C=y,y=y+176|0,I=C+152|0,U=C+16|0,k=C,h=t+4|0,l=e[h>>2]|0,g=s<<1,a=W(g,e[l+16>>2]|0)|0;do if(a){for(c=t+20|0;l=Qe[e[(e[r>>2]|0)+32>>2]&63](r,e[c>>2]|0,a)|0,!!l;)if((a|0)==(l|0)){p=26;break}else a=a-l|0;if((p|0)==26){l=e[h>>2]|0;break}p=U+56|0,h=U+4|0,e[U>>2]=36160,e[p>>2]=36180,f=0,h0(62,U+56|0,h|0),C=f,f=0,C&1&&(U=b()|0,H0(p),r0(U|0)),e[U+128>>2]=0,e[U+132>>2]=-1,e[U>>2]=36200,e[U+56>>2]=36220,f=0,n0(180,h|0),C=f,f=0;do if(C&1)l=b()|0;else{if(e[h>>2]=36236,r=U+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[U+52>>2]=16,e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f=0,h0(63,h|0,I|0),C=f,f=0,C&1){l=b()|0,f0(I),f0(r),ce(h);break}f0(I),f=0,l=L0(28,U|0,49029,57)|0,I=f,f=0,!(I&1)&&(f=0,y0(36,l|0,0)|0,I=f,f=0,!(I&1))&&(c=de(16)|0,f=0,h0(64,k|0,h|0),I=f,f=0,I&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,k|0),I=f,f=0,I&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(k),a||(k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0))),ge(c|0),k=l,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)),k=b()|0,e[U>>2]=36200,e[p>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(p),r0(k|0)}while(!1);U=l,H0(p),r0(U|0)}while(!1);if(a=t+20|0,(e[l+28>>2]|0)!=536870912){U=e[a>>2]|0,br(t,U,n,s,o),y=C;return}Zi(e[a>>2]|0,W(g,e[l+16>>2]|0)|0),U=e[a>>2]|0,br(t,U,n,s,o),y=C}function j1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;h=t+4|0,t=e[h>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(c=E[r+(t*6|0)+2>>1]|0,o=E[r+(t*6|0)+4>>1]|0,E[n+(t*6|0)>>1]=E[r+(t*6|0)>>1]|0,E[n+(t*6|0)+2>>1]=c,E[n+(t*6|0)+4>>1]=o,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do p=E[r+(a+o<<1)>>1]|0,c=E[r+(a+l<<1)>>1]|0,E[n+(a*6|0)>>1]=E[r+(a<<1)>>1]|0,E[n+(a*6|0)+2>>1]=p,E[n+(a*6|0)+4>>1]=c,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do p=E[r+(a<<1)>>1]|0,I=E[r+(a+l<<1)>>1]|0,g=q[r+(a+t<<1)>>1]|0,C=pi(q[r+(a+o<<1)>>1]|0,0,16)|0,g=I0|g,I=pi(I&65535|0,0,48)|0,I=C|p&65535|I,g=g&65535|I0,p=n+(a<<3)|0,C=p,E[C>>1]=I,E[C+2>>1]=I>>>16,p=p+4|0,E[p>>1]=g,E[p+2>>1]=g>>>16,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[h>>2]|0,!!(d[t+32>>0]|0)&&(a=e[t+16>>2]|0,!((s|0)<=0)))for(t=n,l=0;I=t+4|0,C=E[t>>1]|0,E[t>>1]=E[I>>1]|0,E[I>>1]=C,l=l+1|0,(l|0)!=(s|0);)t=t+(a<<1)|0}function ko(t){t=t|0}function Fo(t){t=t|0,a0(t)}function Mo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,n=W(e[t+8>>2]|0,n)|0,t=e[t+4>>2]|0,(Qe[e[(e[t>>2]|0)+48>>2]&63](t,r,n)|0)!=(n|0)&&(s=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,s|0,3,35648),t=f,f=0,t&1?(t=b()|0,ge(s|0),r0(t|0)):Be(s|0,824,96))}function _o(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;g=y,y=y+16|0,p=g,h=t+8|0,o=e[h>>2]|0,s=W(o,n)|0;do if(s){for(a=t+4|0,l=s;o=e[a>>2]|0,o=Qe[e[(e[o>>2]|0)+32>>2]&63](o,r,l)|0,!!o;)if(s=l-o|0,(l|0)==(o|0)){c=11;break}else l=s;if((c|0)==11){o=e[h>>2]|0,l=s;break}s=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,s|0,3,35648),t=f,f=0,t&1?(t=b()|0,ge(s|0),r0(t|0)):Be(s|0,824,96)}else l=0;while(!1);if((o|0)==2&&(Zi(r,n<<1),o=e[h>>2]|0),s=e[t+12>>2]|0,(s|0)<=(W(o,n)|0)){y=g;return}t=e[t+4>>2]|0,Bt[e[(e[t>>2]|0)+16>>2]&15](p,t,s-l|0,0,1,24),y=g}function Ro(t){t=t|0,a0(t)}function Po(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,s=t+4|0,ti(e[s>>2]|0,r|0,W(e[t+8>>2]|0,n)|0)|0,e[s>>2]=(e[s>>2]|0)+(e[t+12>>2]|0)}function Lo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,s=t+4|0,ti(r|0,e[s>>2]|0,W(e[t+8>>2]|0,n)|0)|0,e[s>>2]=(e[s>>2]|0)+(e[t+12>>2]|0)}function Hi(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;e[t+112>>2]=0,e[t+108>>2]=0,p=e[r>>2]|0,o=p;do if(p)if(a=t+92|0,p=t+96|0,c=e[p>>2]|0,h=e[a>>2]|0,n=h,s=c-n|0,s>>>0>=4e4?(s>>>0>4e4&&(l=h+4e4|0,(c|0)!=(l|0))&&(e[p>>2]=l),l=n):(St(a,4e4-s|0),l=e[a>>2]|0,o=e[r>>2]|0),n=t+116|0,e[n>>2]=l,c=t+124|0,e[c>>2]=l,h=t+104|0,e[h>>2]=o,s=o,o){if((e[s+12>>2]|0)==(e[s+16>>2]|0)){if(r=(Se[e[(e[o>>2]|0)+36>>2]&127](s)|0)==-1,s=e[c>>2]|0,r)break;o=e[n>>2]|0}else s=l,o=l;if(a=s-o|0,a>>>0<=64){if(l=t+92|0,(s|0)==(o|0))s=o;else{s=o,o=0;do d[(e[l>>2]|0)+o>>0]=d[s+o>>0]|0,o=o+1|0,s=e[n>>2]|0;while(o>>>0>>0);o=e[c>>2]|0}l=e[l>>2]|0,r=l,g=r-s|0,e[n>>2]=l,s=o+g|0,e[c>>2]=s,l=t+120|0,e[l>>2]=(e[l>>2]|0)+g,h=e[h>>2]|0,s=Qe[e[(e[h>>2]|0)+32>>2]&63](h,s,(e[p>>2]|0)-(r+a)|0)|0,s=(e[c>>2]|0)+s|0,e[c>>2]=s}}else s=l;else e[t+104>>2]=0,s=e[r+4>>2]|0,n=t+116|0,e[n>>2]=s,s=s+(e[r+8>>2]|0)|0,e[t+124>>2]=s;while(!1);if(n=e[n>>2]|0,n>>>0>=s>>>0){p=n,g=t+120|0,e[g>>2]=p,_i(t);return}for(;;){if((d[n>>0]|0)==-1){s=20;break}if(n=n+1|0,n>>>0>=s>>>0){s=20;break}}if((s|0)==20){g=t+120|0,e[g>>2]=n,_i(t);return}}function St(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(h=t+8|0,o=e[h>>2]|0,p=t+4|0,n=e[p>>2]|0,s=n,(o-s|0)>>>0>=r>>>0){do d[n>>0]=0,n=(e[p>>2]|0)+1|0,e[p>>2]=n,r=r+-1|0;while(r|0);return}n=e[t>>2]|0,l=s-n+r|0,(l|0)<0&&(ct(t),o=e[h>>2]|0,n=e[t>>2]|0),s=o-n|0,s>>>0<1073741823?(s=s<<1,s=s>>>0>>0?l:s,n=(e[p>>2]|0)-n|0,s?c=8:(o=0,a=0,l=n)):(s=2147483647,n=(e[p>>2]|0)-n|0,c=8),(c|0)==8&&(o=s,a=G0(s)|0,l=n),n=a+l|0,o=a+o|0,s=n;do d[s>>0]=0,s=n+1|0,n=s,r=r+-1|0;while(r|0);r=e[t>>2]|0,s=(e[p>>2]|0)-r|0,c=a+(l-s)|0,ti(c|0,r|0,s|0)|0,e[t>>2]=c,e[p>>2]=n,e[h>>2]=o,r&&a0(r)}function X1(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;O=y,y=y+32|0,F=O+12|0,V=O,k=t+180|0,U=(e[k>>2]|0)+4|0,(e[t+32>>2]|0)==1?B=e[t+24>>2]|0:B=1,r=W(B<<1,U)|0,e[F>>2]=0,M=F+4|0,e[M>>2]=0,e[F+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,F|0),_=f,f=0,_&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,_=f,f=0,!(_&1))){e[F>>2]=s,_=s+(r<<1)|0,e[F+8>>2]=_,je(s|0,0,n|0)|0,e[M>>2]=_;break}s=b()|0,r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}while(!1);e[V>>2]=0,_=V+4|0,e[_>>2]=0,e[V+8>>2]=0;do if(!B)a=18;else{if(B>>>0>1073741823&&(f=0,n0(178,V|0),I=f,f=0,I&1)||(a=16),(a|0)==16&&(o=B<<2,f=0,l=u0(67,o|0)|0,I=f,f=0,!(I&1))){e[V>>2]=l,a=l+(B<<2)|0,e[V+8>>2]=a,je(l|0,0,o|0)|0,e[_>>2]=a,a=18;break}s=b()|0,r=e[V>>2]|0,n=r,r&&(o=e[_>>2]|0,(o|0)!=(r|0)&&(e[_>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((a|0)==18){l=t+12|0;e:do if((e[l>>2]|0)>0){a=t+4604|0,c=(W(B,U)|0)+1|0,h=t+4608|0,p=t+92|0,g=(B|0)>0,C=t+4600|0,I=0;i:for(;;){if(n=e[F>>2]|0,r=n+2|0,e[a>>2]=r,n=n+(c<<1)|0,e[h>>2]=n,I&1?(e[a>>2]=n,e[h>>2]=r):r=n,o=e[p>>2]|0,f=0,P0(e[(e[o>>2]|0)+12>>2]|0,o|0,r|0,e[k>>2]|0,U|0),o=f,f=0,o&1){a=28;break}if(g){r=e[a>>2]|0,n=e[h>>2]|0,s=e[V>>2]|0,o=0;do{if(e[C>>2]=e[s+(o<<2)>>2],s=e[k>>2]|0,E[r+(s<<1)>>1]=E[r+(s+-1<<1)>>1]|0,E[n+-2>>1]=E[r>>1]|0,f=0,h0(68,t|0,0),s=f,f=0,s&1){a=27;break i}s=e[V>>2]|0,e[s+(o<<2)>>2]=e[C>>2],r=(e[a>>2]|0)+(U<<1)|0,e[a>>2]=r,n=(e[h>>2]|0)+(U<<1)|0,e[h>>2]=n,o=o+1|0}while((o|0)<(B|0))}if(I=I+1|0,(I|0)>=(e[l>>2]|0)){a=40;break e}}if((a|0)==27){s=b()|0;break}else if((a|0)==28){s=b()|0;break}}else a=40;while(!1);do if((a|0)==40){if(f=0,n0(182,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[V>>2]|0,n=r,r&&(s=e[_>>2]|0,(s|0)!=(r|0)&&(e[_>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[F>>2]|0,!r){y=O;return}n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),y=O;return}while(!1);r=e[V>>2]|0,n=r,r&&(o=e[_>>2]|0,(o|0)!=(r|0)&&(e[_>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}function Uo(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=t+4604|0,r=e[C>>2]|0,U=t+180|0,!((e[U>>2]|0)<=0))for(I=t+4608|0,k=t+4612|0,o=r,l=q[r+-2>>1]|0,r=q[r>>1]|0,g=0;p=e[I>>2]|0,h=q[p+(g+-1<<1)>>1]|0,s=g+1|0,n=q[o+(s<<1)>>1]|0,c=e[k>>2]|0,a=r-l|0,o=l-h|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-h>>31,(l^o|0)<0?o=r:o=h+((l^a|0)<0?0:a)|0,p=No(t,c,q[p+(g<<1)>>1]|0,o,0)|0,E[(e[I>>2]|0)+(g<<1)>>1]=p):(s=(Bo(t,g,0)|0)+g|0,n=e[C>>2]|0,r=q[n+(s+-1<<1)>>1]|0,n=q[n+(s<<1)>>1]|0),!((s|0)>=(e[U>>2]|0));)o=e[C>>2]|0,l=r,r=n,g=s}function Oo(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;o=t+104|0,(e[o>>2]|0)>>>0<4&&Jt(t),l=t+100|0,a=t+112|0,c=t+96|0,h=t+108|0,p=t+116|0,r=e[l>>2]|0,s=0;do{if(n=d[a>>0]|0,(r|0)>31)break;r=e[c>>2]|0,n<<24>>24?(d[e[h>>2]>>0]=r>>>25,e[c>>2]=e[c>>2]<<7,r=(e[l>>2]|0)+7|0):(d[e[h>>2]>>0]=r>>>24,e[c>>2]=e[c>>2]<<8,r=(e[l>>2]|0)+8|0),e[l>>2]=r,g=e[h>>2]|0,n=(d[g>>0]|0)==-1&1,d[a>>0]=n,e[h>>2]=g+1,e[o>>2]=(e[o>>2]|0)+-1,e[p>>2]=(e[p>>2]|0)+1,s=s+1|0}while((s|0)<4);n<<24>>24?xe(t,0,(r+-1|0)%8|0):xe(t,0,(r|0)%8|0),(e[o>>2]|0)>>>0<4&&Jt(t),r=e[l>>2]|0,n=0;do{if((r|0)>31)break;r=e[c>>2]|0,d[a>>0]|0?(d[e[h>>2]>>0]=r>>>25,e[c>>2]=e[c>>2]<<7,r=(e[l>>2]|0)+7|0):(d[e[h>>2]>>0]=r>>>24,e[c>>2]=e[c>>2]<<8,r=(e[l>>2]|0)+8|0),e[l>>2]=r,g=e[h>>2]|0,d[a>>0]=(d[g>>0]|0)==-1&1,e[h>>2]=g+1,e[o>>2]=(e[o>>2]|0)+-1,e[p>>2]=(e[p>>2]|0)+1,n=n+1|0}while((n|0)<4);e[t+132>>2]|0&&Jt(t)}function Jt(t){t=t|0;var r=0,n=0,s=0,o=0,l=0;if(r=e[t+132>>2]|0,r||(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,4,35648),t=f,f=0,t&1||Be(r|0,824,96),t=b()|0,ge(r|0),r0(t|0)),n=t+108|0,s=t+120|0,l=e[s>>2]|0,o=(e[n>>2]|0)-l|0,(Qe[e[(e[r>>2]|0)+48>>2]&63](r,l,o)|0)==(o|0)){l=e[s>>2]|0,e[n>>2]=l,e[t+104>>2]=(e[t+124>>2]|0)-l;return}r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,4,35648),l=f,f=0,l&1||Be(r|0,824,96),l=b()|0,ge(r|0),r0(l|0)}function xe(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0;if(p=t+100|0,n=(e[p>>2]|0)-n|0,e[p>>2]=n,(n|0)>-1){g=t+96|0,e[g>>2]=e[g>>2]|r<>2]=e[g>>2]|r>>0-n,h=t+104|0,(e[h>>2]|0)>>>0<4&&(Jt(t),n=e[p>>2]|0),l=t+112|0,a=t+108|0,c=t+116|0,s=0;!((n|0)>31);)if(n=e[g>>2]|0,d[l>>0]|0?(d[e[a>>2]>>0]=n>>>25,e[g>>2]=e[g>>2]<<7,n=(e[p>>2]|0)+7|0):(d[e[a>>2]>>0]=n>>>24,e[g>>2]=e[g>>2]<<8,n=(e[p>>2]|0)+8|0),e[p>>2]=n,C=e[a>>2]|0,d[l>>0]=(d[C>>0]|0)==-1&1,e[a>>2]=C+1,e[h>>2]=(e[h>>2]|0)+-1,e[c>>2]=(e[c>>2]|0)+1,s=s+1|0,(s|0)>=4){o=11;break}e:do if((o|0)==11&&(n|0)<0){e[g>>2]=e[g>>2]|r>>0-n,(e[h>>2]|0)>>>0<4&&(Jt(t),n=e[p>>2]|0),s=0;do{if((n|0)>31)break e;n=e[g>>2]|0,d[l>>0]|0?(d[e[a>>2]>>0]=n>>>25,e[g>>2]=e[g>>2]<<7,n=(e[p>>2]|0)+7|0):(d[e[a>>2]>>0]=n>>>24,e[g>>2]=e[g>>2]<<8,n=(e[p>>2]|0)+8|0),e[p>>2]=n,C=e[a>>2]|0,d[l>>0]=(d[C>>0]|0)==-1&1,e[a>>2]=C+1,e[h>>2]=(e[h>>2]|0)+-1,e[c>>2]=(e[c>>2]|0)+1,s=s+1|0}while((s|0)<4)}while(!1);e[g>>2]=e[g>>2]|r<>31,l=(B^r)-B|0,k=t+196+(l*12|0)+10|0,a=E[k>>1]|0,I=t+196+(l*12|0)|0,o=e[I>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(r=5;(a<>1]^B)-B+s|0,U=t+136|0,s=e[U>>2]|0,(o&s|0)==(o|0)?p=o:p=s&~(o>>31),o=(n-p^B)-B|0,h=t+144|0,s=e[h>>2]|0,(o|0)>0?o=(o+s|0)/(s<<1|1|0)|0:o=(o-s|0)/(s<<1|1|0)|0,C=t+140|0,c=e[C>>2]|0,n=((o|0)<0?c:0)+o|0,c=n-((n|0)<((c+1|0)/2|0|0)?0:c)|0,l=t+196+(l*12|0)+4|0,s|r?o=0:o=(e[l>>2]<<1)+-1+a>>31,s=o^c,W1(t,r,s>>30^s<<1,e[t+156>>2]|0),s=e[t+160>>2]|0,r=(e[I>>2]|0)+((c|0)>-1?c:0-c|0)|0,o=(e[l>>2]|0)+(W(e[h>>2]<<1|1,c)|0)|0,n=E[k>>1]|0,(n|0)==(s|0)&&(r=r>>1,o=o>>1,n=s>>1),e[I>>2]=r,s=n+1|0,E[k>>1]=s,r=s+o|0,(r|0)>=1?(o|0)>0&&(o=o-s|0,k=E[g>>1]|0,E[g>>1]=(k<<16>>16<127&1)+(k&65535),o=(o|0)>0?0:o):(o=E[g>>1]|0,E[g>>1]=(o&65535)-(o<<16>>16>-128&1),o=(r|0)>(~n|0)?r:0-n|0),e[l>>2]=o,s=e[h>>2]|0,n=s<<1|1,r=(W(n,(c^B)-B|0)|0)+p|0,(r|0)>=(0-s|0)?(o=e[U>>2]|0,(o+s|0)<(r|0)&&(r=r-(W(e[C>>2]|0,n)|0)|0)):(r=(W(e[C>>2]|0,n)|0)+r|0,o=e[U>>2]|0),(r&o|0)==(r|0)?(B=r,B=B&65535,B|0):(B=o&~(r>>31),B=B&65535,B|0)}function Bo(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;for(h=(e[t+180>>2]|0)-r|0,p=e[t+4608>>2]|0,g=e[t+4604>>2]|0,o=E[p+(r+-1<<1)>>1]|0,c=o&65535,n=e[t+144>>2]|0,l=0;s=p+(l+r<<1)|0,a=(q[s>>1]|0)-c|0,!((((a|0)>-1?a:0-a|0)|0)>(n|0));)if(E[s>>1]=o,l=l+1|0,(l|0)==(h|0)){l=h;break}if(o=(l|0)==(h|0),a=t+4600|0,s=e[36476+(e[a>>2]<<2)>>2]|0,(1<(l|0))n=l;else{n=l;do xe(t,1,1),s=e[a>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[a>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>1]|0,c,q[g+(h<<1)>>1]|0)|0,E[r>>1]=t,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,t=l+1|0,t|0)}function Vo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;return c=n-s|0,h=t+136|0,a=t+144|0,o=e[a>>2]|0,(((c|0)>-1?c:0-c|0)|0)>(o|0)?(l=s-n>>31|1,r=W(l,r-s|0)|0,(r|0)>0?r=(o+r|0)/(o<<1|1|0)|0:r=(r-o|0)/(o<<1|1|0)|0,c=t+140|0,o=e[c>>2]|0,n=((r|0)<0?o:0)+r|0,o=n-((n|0)<((o+1|0)/2|0|0)?0:o)|0,K1(t,t+4576|0,o),o=W(o,l)|0,l=e[a>>2]|0,a=l<<1|1,o=(W(o,a)|0)+s|0,(o|0)>=(0-l|0)?(r=e[h>>2]|0,(r+l|0)<(o|0)&&(o=o-(W(e[c>>2]|0,a)|0)|0)):(o=(W(e[c>>2]|0,a)|0)+o|0,r=e[h>>2]|0),(o&r|0)==(o|0)?(h=o,h=h&65535,h|0):(h=r&~(o>>31),h=h&65535,h|0)):(r=r-n|0,(r|0)>0?r=(o+r|0)/(o<<1|1|0)|0:r=(r-o|0)/(o<<1|1|0)|0,c=t+140|0,o=e[c>>2]|0,l=((r|0)<0?o:0)+r|0,o=l-((l|0)<((o+1|0)/2|0|0)?0:o)|0,K1(t,t+4588|0,o),l=e[a>>2]|0,a=l<<1|1,o=(W(a,o)|0)+n|0,(o|0)>=(0-l|0)?(r=e[h>>2]|0,(r+l|0)<(o|0)&&(o=o-(W(e[c>>2]|0,a)|0)|0)):(o=(W(e[c>>2]|0,a)|0)+o|0,r=e[h>>2]|0),(o&r|0)==(o|0)?(h=o,h=h&65535,h|0):(h=r&~(o>>31),h=h&65535,h|0))}function K1(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=r+9|0,a=N[g>>0]|0,p=r+4|0,h=e[p>>2]|0,o=(W(a>>>1,h)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-h+(s<<31>>31)|0,W1(t,o,s,(e[t+156>>2]|0)+-1-(e[36476+(e[t+4600>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[p>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[g>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[g>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r}function W1(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=n>>r,l=t+148|0,a=s-(e[l>>2]|0)|0,(o|0)<(a+-1|0)){(o|0)>30&&(s=(o|0)/2|0,xe(t,0,s),o=o-s|0),xe(t,1,o+1|0),xe(t,(1<31?(xe(t,0,31),xe(t,1,s+-31-(e[l>>2]|0)|0)):xe(t,1,a),r=e[l>>2]|0,xe(t,(1<>2]|0,h=t+120|0,r>>>0<((e[h>>2]|0)+-3|0)>>>0){h=t+112|0,a=e[h>>2]|0,t=t+108|0,e[t>>2]=(N[r+1>>0]<<16|N[r>>0]<<24|N[r+2>>0]<<8|N[r+3>>0])>>>a|e[t>>2],t=32-a>>3,e[c>>2]=r+t,e[h>>2]=(t<<3)+a;return}a=t+104|0,n=e[a>>2]|0;do if(n){if((e[n+12>>2]|0)==(e[n+16>>2]|0)){if((Se[e[(e[n>>2]|0)+36>>2]&127](n)|0)==-1)break;r=e[c>>2]|0}if(o=t+124|0,n=e[o>>2]|0,l=n-r|0,l>>>0<=64){if(s=t+92|0,(n|0)==(r|0))n=r;else{n=0;do d[(e[s>>2]|0)+n>>0]=d[r+n>>0]|0,n=n+1|0,r=e[c>>2]|0;while(n>>>0>>0);n=r,r=e[o>>2]|0}g=e[s>>2]|0,s=g,p=s-n|0,e[c>>2]=g,n=r+p|0,e[o>>2]=n,e[h>>2]=(e[h>>2]|0)+p,a=e[a>>2]|0,a=Qe[e[(e[a>>2]|0)+32>>2]&63](a,n,(e[t+96>>2]|0)-(s+l)|0)|0,e[o>>2]=(e[o>>2]|0)+a}}while(!1);for(a=t+112|0,l=t+108|0,t=e[t+124>>2]|0,o=t+-1|0,r=e[c>>2]|0;;){if(r>>>0>=t>>>0){n=14;break}if(s=d[r>>0]|0,n=s&255,s=s<<24>>24==-1,s){if((r|0)==(o|0)){n=25;break}if(r=r+1|0,(d[r>>0]|0)<0){n=25;break}}else r=r+1|0;if(g=e[a>>2]|0,e[l>>2]=n<<24-g|e[l>>2],e[c>>2]=r,g=g+(s?7:8)|0,e[a>>2]=g,(g|0)>=24){n=33;break}}if((n|0)==14){if((e[a>>2]|0)>=1)return;r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,5,35648),g=f,f=0,g&1||Be(r|0,824,96),g=b()|0,ge(r|0),r0(g|0)}else if((n|0)==25){if((e[a>>2]|0)>=1)return;r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,5,35648),g=f,f=0,g&1||Be(r|0,824,96),g=b()|0,ge(r|0),r0(g|0)}else if((n|0)==33){e:do if(r>>>0>>0)do{if((d[r>>0]|0)==-1)break e;r=r+1|0}while(r>>>0>>0);while(!1);e[h>>2]=r;return}}function qo(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;I=y,y=y+32|0,s=I,C=t+144|0;e:do if(e[C>>2]|0)r=t+152|0;else if(n=e[t+136>>2]|0,r=t+152|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+184>>2]|0))&&(e[s+8>>2]|0)==(e[t+188>>2]|0)&&(e[s+12>>2]|0)==(e[t+192>>2]|0))switch(e[r>>2]|0){case 8:{C=e[8900]|0,e[t+4612>>2]=C+(((e[8901]|0)-C|0)>>>1),y=I;return}case 10:{C=e[8903]|0,e[t+4612>>2]=C+(((e[8904]|0)-C|0)>>>1),y=I;return}case 12:{C=e[8906]|0,e[t+4612>>2]=C+(((e[8907]|0)-C|0)>>>1),y=I;return}case 16:{C=e[8909]|0,e[t+4612>>2]=C+(((e[8910]|0)-C|0)>>>1),y=I;return}default:break e}while(!1);if(g=1<>2],n=t+4616|0,s=g<<1,o=t+4620|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),p=t+4612|0,e[p>>2]=r+g,r=0-g|0,(g|0)<=(r|0)){y=I;return}c=t+192|0,h=t+188|0,a=t+184|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[h>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[C>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[p>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(g|0));y=I}function Yi(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(h=t+8|0,o=e[h>>2]|0,p=t+4|0,n=e[p>>2]|0,s=n,(o-s|0)>>>0>=r>>>0){do d[n>>0]=0,n=(e[p>>2]|0)+1|0,e[p>>2]=n,r=r+-1|0;while(r|0);return}n=e[t>>2]|0,l=s-n+r|0,(l|0)<0&&(ct(t),o=e[h>>2]|0,n=e[t>>2]|0),s=o-n|0,s>>>0<1073741823?(s=s<<1,s=s>>>0>>0?l:s,n=(e[p>>2]|0)-n|0,s?c=8:(o=0,a=0,l=n)):(s=2147483647,n=(e[p>>2]|0)-n|0,c=8),(c|0)==8&&(o=s,a=G0(s)|0,l=n),n=a+l|0,o=a+o|0,s=n;do d[s>>0]=0,s=n+1|0,n=s,r=r+-1|0;while(r|0);r=e[t>>2]|0,s=(e[p>>2]|0)-r|0,c=a+(l-s)|0,ti(c|0,r|0,s|0)|0,e[t>>2]=c,e[p>>2]=n,e[h>>2]=o,r&&a0(r)}function bo(t){t=t|0;var r=0,n=0;e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Go(t){t=t|0;var r=0,n=0;if(e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function Qo(t){t=t|0;var r=0,n=0;e[t>>2]=36052,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function zo(t){t=t|0;var r=0,n=0;if(e[t>>2]=36052,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function Ho(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;a=y,y=y+32|0,h=a,hi(h,e[t+136>>2]|0,e[t+144>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[h+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[h+12>>2]|0,n=e[r+16>>2]|0,s=e[h+16>>2]|0,e[t+184>>2]=c|0?c:e[h+4>>2]|0,e[t+188>>2]=l,e[t+192>>2]=o,Zo(t),o=t+140|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+196+(l*12|0)>>2]=r,e[t+196+(l*12|0)+4>>2]=0,E[t+196+(l*12|0)+8>>1]=0,E[t+196+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,h=(n|0?n:s)&255,e[t+4576>>2]=c,e[t+4580>>2]=0,d[t+4584>>0]=h,d[t+4585>>0]=1,d[t+4586>>0]=0,e[t+4588>>2]=c,e[t+4592>>2]=1,d[t+4596>>0]=h,d[t+4597>>0]=1,d[t+4598>>0]=0,e[t+4600>>2]=0,y=a}function Yo(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+16|0,h=g,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[h>>2]=0,e[h+4>>2]=s,c=n+8|0,e[h+8>>2]=e[c>>2],s){r=G0(4624)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35828,e[r+128>>2]=e[t+136>>2],e[r+132>>2]=e[t+140>>2],e[r+136>>2]=e[t+144>>2],e[r+140>>2]=e[t+148>>2],e[r+144>>2]=e[t+152>>2],e[r+148>>2]=e[t+156>>2],e[r+152>>2]=e[t+160>>2],o=r+156|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+172>>2]=e[s>>2],e[r+176>>2]=0,e[r+180>>2]=0,e[r+184>>2]=0,o=r+4568|0,s=r+188|0;do e[s>>2]=0,e[s+4>>2]=0,E[s+8>>1]=0,E[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,d[o+10>>0]=0,a=r+4580|0,e[a>>2]=0,e[a+4>>2]=0,E[a+8>>1]=0,d[a+10>>0]=0,a=r+4592|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,h)}return h=t+100|0,e[h>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(p=r+4e3|0,(s|0)!=(p|0))&&(e[c>>2]=p,s=p):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,Z1(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],Z1(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0)}function jo(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(k=t+8|0,B=t+36|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(37,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(38,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(39,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(40,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=6,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=6,e[s+12>>2]=t,M=s,y=O,M|0)}function Z1(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;V=y,y=y+32|0,_=V+12|0,B=V,I=t+180|0,k=(e[I>>2]|0)+4|0,(e[t+32>>2]|0)==1?U=e[t+24>>2]|0:U=1,r=W(U<<1,k)|0,e[_>>2]=0,F=_+4|0,e[F>>2]=0,e[_+8>>2]=0;do if(r){if(r>>>0>715827882&&(f=0,n0(178,_|0),O=f,f=0,O&1)||(a=6),(a|0)==6&&(f=0,n=u0(67,r*6|0)|0,O=f,f=0,!(O&1))){for(e[F>>2]=n,e[_>>2]=n,s=n+(r*6|0)|0,e[_+8>>2]=s;E[n>>1]=0,E[n+2>>1]=0,E[n+4>>1]=0,r=r+-1|0,r;)n=n+6|0;e[F>>2]=s;break}s=b()|0,r=e[_>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),a0(r),r0(s|0)}while(!1);e[B>>2]=0,O=B+4|0,e[O>>2]=0,e[B+8>>2]=0;do if(!U)a=20;else{if(U>>>0>1073741823&&(f=0,n0(178,B|0),C=f,f=0,C&1)||(a=18),(a|0)==18&&(o=U<<2,f=0,l=u0(67,o|0)|0,C=f,f=0,!(C&1))){e[B>>2]=l,a=l+(U<<2)|0,e[B+8>>2]=a,je(l|0,0,o|0)|0,e[O>>2]=a,a=20;break}s=b()|0,r=e[B>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((a|0)==20){o=t+12|0;e:do if((e[o>>2]|0)>0){l=t+4604|0,a=(W(U,k)|0)+1|0,c=t+4608|0,h=t+92|0,p=(U|0)>0,g=t+4600|0,C=0;i:for(;;){if(n=e[_>>2]|0,r=n+6|0,e[l>>2]=r,n=n+(a*6|0)|0,e[c>>2]=n,C&1?(e[l>>2]=n,e[c>>2]=r):r=n,s=e[h>>2]|0,f=0,P0(e[(e[s>>2]|0)+12>>2]|0,s|0,r|0,e[I>>2]|0,k|0),s=f,f=0,s&1){a=30;break}if(p){r=e[B>>2]|0,n=e[l>>2]|0,s=0;do{if(e[g>>2]=e[r+(s<<2)>>2],M=e[I>>2]|0,r=n+(M*6|0)|0,n=n+((M+-1|0)*6|0)|0,E[r>>1]=E[n>>1]|0,E[r+2>>1]=E[n+2>>1]|0,E[r+4>>1]=E[n+4>>1]|0,n=(e[c>>2]|0)+-6|0,r=e[l>>2]|0,E[n>>1]=E[r>>1]|0,E[n+2>>1]=E[r+2>>1]|0,E[n+4>>1]=E[r+4>>1]|0,f=0,h0(69,t|0,0),n=f,f=0,n&1){a=29;break i}r=e[B>>2]|0,e[r+(s<<2)>>2]=e[g>>2],n=(e[l>>2]|0)+(k*6|0)|0,e[l>>2]=n,e[c>>2]=(e[c>>2]|0)+(k*6|0),s=s+1|0}while((s|0)<(U|0))}if(C=C+1|0,(C|0)>=(e[o>>2]|0)){a=42;break e}}if((a|0)==29){s=b()|0;break}else if((a|0)==30){s=b()|0;break}}else a=42;while(!1);do if((a|0)==42){if(f=0,n0(182,t|0),M=f,f=0,M&1){s=b()|0;break}if(r=e[B>>2]|0,n=r,r&&(s=e[O>>2]|0,(s|0)!=(r|0)&&(e[O>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[_>>2]|0,!r){y=V;return}n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),a0(r),y=V;return}while(!1);r=e[B>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[_>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),a0(r),r0(s|0)}function Xo(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0;if(t0=t+180|0,!((e[t0>>2]|0)<=0))for(Z=t+4608|0,s0=t+4604|0,w0=t+4612|0,K=0;F=K+-1|0,l=e[Z>>2]|0,a=e[s0>>2]|0,r=K+1|0,o=q[a+(K*6|0)>>1]|0,X=e[w0>>2]|0,c=q[a+(F*6|0)>>1]|0,h=o-c|0,p=q[l+(F*6|0)>>1]|0,g=c-p|0,C=((((d[X+((q[a+(r*6|0)>>1]|0)-o)>>0]|0)*9|0)+(d[X+h>>0]|0)|0)*9|0)+(d[X+g>>0]|0)|0,s=q[a+(K*6|0)+2>>1]|0,I=q[a+(F*6|0)+2>>1]|0,k=s-I|0,U=q[l+(F*6|0)+2>>1]|0,B=I-U|0,V=((((d[X+((q[a+(r*6|0)+2>>1]|0)-s)>>0]|0)*9|0)+(d[X+k>>0]|0)|0)*9|0)+(d[X+B>>0]|0)|0,n=q[a+(K*6|0)+4>>1]|0,O=q[a+(F*6|0)+4>>1]|0,_=n-O|0,F=q[l+(F*6|0)+4>>1]|0,M=O-F|0,X=((((d[X+((q[a+(r*6|0)+4>>1]|0)-n)>>0]|0)*9|0)+(d[X+_>>0]|0)|0)*9|0)+(d[X+M>>0]|0)|0,V|C|X?(a=q[l+(K*6|0)>>1]|0,l=o-p>>31,(l^g|0)>=0&&((l^h|0)<0?o=p:o=p-c+o|0),a=Gr(t,C,a,o,0)|0,l=q[(e[Z>>2]|0)+(K*6|0)+2>>1]|0,o=s-U>>31,(o^B|0)>=0&&((o^k|0)<0?s=U:s=U-I+s|0),o=Gr(t,V,l,s,0)|0,l=q[(e[Z>>2]|0)+(K*6|0)+4>>1]|0,s=n-F>>31,(s^M|0)>=0&&((s^_|0)<0?n=F:n=F-O+n|0),M=Gr(t,X,l,n,0)|0,X=e[Z>>2]|0,E[X+(K*6|0)>>1]=a,E[X+(K*6|0)+2>>1]=o,E[X+(K*6|0)+4>>1]=M):r=(Ko(t,K,0)|0)+K|0,(r|0)<(e[t0>>2]|0);)K=r}function Ko(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0;for(t0=y,y=y+48|0,k=t0+30|0,I=t0+24|0,C=t0+18|0,U=t0+12|0,F=t0+6|0,M=t0,X=(e[t+180>>2]|0)-r|0,K=e[t+4608>>2]|0,B=e[t+4604>>2]|0,_=r+-1|0,V=E[K+(_*6|0)>>1]|0,O=E[K+(_*6|0)+2>>1]|0,_=E[K+(_*6|0)+4>>1]|0,n=V&65535,s=t+144|0,o=O&65535,l=_&65535,g=0;h=g+r|0,a=K+(h*6|0)|0,c=K+(h*6|0)+2|0,h=K+(h*6|0)+4|0,Z=(q[a>>1]|0)-n|0,p=e[s>>2]|0,!((((Z|0)>-1?Z:0-Z|0)|0)>(p|0)||(Z=(q[c>>1]|0)-o|0,(((Z|0)>-1?Z:0-Z|0)|0)>(p|0))||(Z=(q[h>>1]|0)-l|0,(((Z|0)>-1?Z:0-Z|0)|0)>(p|0)));)if(E[a>>1]=V,E[c>>1]=O,E[h>>1]=_,g=g+1|0,(g|0)==(X|0)){g=X;break}if(o=(g|0)==(X|0),l=t+4600|0,s=e[36476+(e[l>>2]<<2)>>2]|0,(1<(g|0))n=g;else{n=g;do xe(t,1,1),s=e[l>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[l>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>1]=E[Z>>1]|0,E[F+2>>1]=E[Z+2>>1]|0,E[F+4>>1]=E[Z+4>>1]|0,E[M>>1]=V,E[M+2>>1]=O,E[M+4>>1]=_,r=B+(r*6|0)|0,E[C>>1]=E[F>>1]|0,E[C+2>>1]=E[F+2>>1]|0,E[C+4>>1]=E[F+4>>1]|0,E[I>>1]=E[M>>1]|0,E[I+2>>1]=E[M+2>>1]|0,E[I+4>>1]=E[M+4>>1]|0,E[k>>1]=E[r>>1]|0,E[k+2>>1]=E[r+2>>1]|0,E[k+4>>1]=E[r+4>>1]|0,Wo(U,t,C,I,k),E[Z>>1]=E[U>>1]|0,E[Z+2>>1]=E[U+2>>1]|0,E[Z+4>>1]=E[U+4>>1]|0,Z=e[l>>2]|0,e[l>>2]=(Z|0)<1?0:Z+-1|0,Z=g+1|0,y=t0,Z|0)}function Gr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(B=r>>31,l=(B^r)-B|0,k=t+196+(l*12|0)+10|0,a=E[k>>1]|0,I=t+196+(l*12|0)|0,o=e[I>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(r=5;(a<>1]^B)-B+s|0,U=t+136|0,s=e[U>>2]|0,(o&s|0)==(o|0)?p=o:p=s&~(o>>31),o=(n-p^B)-B|0,h=t+144|0,s=e[h>>2]|0,(o|0)>0?o=(o+s|0)/(s<<1|1|0)|0:o=(o-s|0)/(s<<1|1|0)|0,C=t+140|0,c=e[C>>2]|0,n=((o|0)<0?c:0)+o|0,c=n-((n|0)<((c+1|0)/2|0|0)?0:c)|0,l=t+196+(l*12|0)+4|0,s|r?o=0:o=(e[l>>2]<<1)+-1+a>>31,s=o^c,J1(t,r,s>>30^s<<1,e[t+156>>2]|0),s=e[t+160>>2]|0,r=(e[I>>2]|0)+((c|0)>-1?c:0-c|0)|0,o=(e[l>>2]|0)+(W(e[h>>2]<<1|1,c)|0)|0,n=E[k>>1]|0,(n|0)==(s|0)&&(r=r>>1,o=o>>1,n=s>>1),e[I>>2]=r,s=n+1|0,E[k>>1]=s,r=s+o|0,(r|0)>=1?(o|0)>0&&(o=o-s|0,k=E[g>>1]|0,E[g>>1]=(k<<16>>16<127&1)+(k&65535),o=(o|0)>0?0:o):(o=E[g>>1]|0,E[g>>1]=(o&65535)-(o<<16>>16>-128&1),o=(r|0)>(~n|0)?r:0-n|0),e[l>>2]=o,s=e[h>>2]|0,n=s<<1|1,r=(W(n,(c^B)-B|0)|0)+p|0,(r|0)>=(0-s|0)?(o=e[U>>2]|0,(o+s|0)<(r|0)&&(r=r-(W(e[C>>2]|0,n)|0)|0)):(r=(W(e[C>>2]|0,n)|0)+r|0,o=e[U>>2]|0),(r&o|0)==(r|0)?(B=r,B=B&65535,B|0):(B=o&~(r>>31),B=B&65535,B|0)}function J1(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=n>>r,l=t+148|0,a=s-(e[l>>2]|0)|0,(o|0)<(a+-1|0)){(o|0)>30&&(s=(o|0)/2|0,xe(t,0,s),o=o-s|0),xe(t,1,o+1|0),xe(t,(1<31?(xe(t,0,31),xe(t,1,s+-31-(e[l>>2]|0)|0)):xe(t,1,a),r=e[l>>2]|0,xe(t,(1<>1]|0,I=C-(q[s>>1]|0)>>31|1,l=W(I,(q[n>>1]|0)-C|0)|0,p=r+144|0,a=e[p>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,F=r+140|0,h=e[F>>2]|0,c=((l|0)<0?h:0)+l|0,h=c-((c|0)<((h+1|0)/2|0|0)?0:h)|0,c=r+4576|0,Qr(r,c,h),V=q[o+2>>1]|0,O=V-(q[s+2>>1]|0)>>31|1,l=W(O,(q[n+2>>1]|0)-V|0)|0,a=e[p>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,k=e[F>>2]|0,_=((l|0)<0?k:0)+l|0,k=_-((_|0)<((k+1|0)/2|0|0)?0:k)|0,Qr(r,c,k),_=q[o+4>>1]|0,B=_-(q[s+4>>1]|0)>>31|1,l=W(B,(q[n+4>>1]|0)-_|0)|0,a=e[p>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,g=e[F>>2]|0,l=((l|0)<0?g:0)+l|0,g=l-((l|0)<((g+1|0)/2|0|0)?0:g)|0,Qr(r,c,g),c=e[p>>2]|0,p=c<<1|1,l=(W(W(p,h)|0,I)|0)+C|0,n=0-c|0,(l|0)>=(n|0)?(a=e[U>>2]|0,(a+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,p)|0)|0),s=a):(l=(W(e[F>>2]|0,p)|0)+l|0,s=e[U>>2]|0),(l&s|0)!=(l|0)&&(l=s&~(l>>31)),o=l&65535,l=(W(W(p,k)|0,O)|0)+V|0,(l|0)>=(n|0)?(s+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,p)|0)|0):l=(W(e[F>>2]|0,p)|0)+l|0,(l&s|0)!=(l|0)&&(l=s&~(l>>31)),a=l&65535,l=(W(W(p,g)|0,B)|0)+_|0,(l|0)>=(n|0)?(s+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,p)|0)|0):l=(W(e[F>>2]|0,p)|0)+l|0,(l&s|0)==(l|0)){F=l,F=F&65535,E[t>>1]=o,_=t+2|0,E[_>>1]=a,t=t+4|0,E[t>>1]=F;return}F=s&~(l>>31),F=F&65535,E[t>>1]=o,_=t+2|0,E[_>>1]=a,t=t+4|0,E[t>>1]=F}function Qr(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=r+9|0,a=N[g>>0]|0,p=r+4|0,h=e[p>>2]|0,o=(W(a>>>1,h)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-h+(s<<31>>31)|0,J1(t,o,s,(e[t+156>>2]|0)+-1-(e[36476+(e[t+4600>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[p>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[g>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[g>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r}function Zo(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;I=y,y=y+32|0,s=I,C=t+144|0;e:do if(e[C>>2]|0)r=t+152|0;else if(n=e[t+136>>2]|0,r=t+152|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+184>>2]|0))&&(e[s+8>>2]|0)==(e[t+188>>2]|0)&&(e[s+12>>2]|0)==(e[t+192>>2]|0))switch(e[r>>2]|0){case 8:{C=e[8900]|0,e[t+4612>>2]=C+(((e[8901]|0)-C|0)>>>1),y=I;return}case 10:{C=e[8903]|0,e[t+4612>>2]=C+(((e[8904]|0)-C|0)>>>1),y=I;return}case 12:{C=e[8906]|0,e[t+4612>>2]=C+(((e[8907]|0)-C|0)>>>1),y=I;return}case 16:{C=e[8909]|0,e[t+4612>>2]=C+(((e[8910]|0)-C|0)>>>1),y=I;return}default:break e}while(!1);if(g=1<>2],n=t+4616|0,s=g<<1,o=t+4620|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),p=t+4612|0,e[p>>2]=r+g,r=0-g|0,(g|0)<=(r|0)){y=I;return}c=t+192|0,h=t+188|0,a=t+184|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[h>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[C>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[p>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(g|0));y=I}function Jo(t){t=t|0;var r=0,n=0;e[t>>2]=36024,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function $o(t){t=t|0;var r=0,n=0;if(e[t>>2]=36024,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function el(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;a=y,y=y+32|0,h=a,hi(h,e[t+136>>2]|0,e[t+144>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[h+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[h+12>>2]|0,n=e[r+16>>2]|0,s=e[h+16>>2]|0,e[t+184>>2]=c|0?c:e[h+4>>2]|0,e[t+188>>2]=l,e[t+192>>2]=o,_l(t),o=t+140|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+196+(l*12|0)>>2]=r,e[t+196+(l*12|0)+4>>2]=0,E[t+196+(l*12|0)+8>>1]=0,E[t+196+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,h=(n|0?n:s)&255,e[t+4576>>2]=c,e[t+4580>>2]=0,d[t+4584>>0]=h,d[t+4585>>0]=1,d[t+4586>>0]=0,e[t+4588>>2]=c,e[t+4592>>2]=1,d[t+4596>>0]=h,d[t+4597>>0]=1,d[t+4598>>0]=0,e[t+4600>>2]=0,y=a}function il(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+16|0,h=g,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[h>>2]=0,e[h+4>>2]=s,c=n+8|0,e[h+8>>2]=e[c>>2],s){r=G0(4624)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35800,e[r+128>>2]=e[t+136>>2],e[r+132>>2]=e[t+140>>2],e[r+136>>2]=e[t+144>>2],e[r+140>>2]=e[t+148>>2],e[r+144>>2]=e[t+152>>2],e[r+148>>2]=e[t+156>>2],e[r+152>>2]=e[t+160>>2],o=r+156|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+172>>2]=e[s>>2],e[r+176>>2]=0,e[r+180>>2]=0,e[r+184>>2]=0,o=r+4568|0,s=r+188|0;do e[s>>2]=0,e[s+4>>2]=0,E[s+8>>1]=0,E[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,d[o+10>>0]=0,a=r+4580|0,e[a>>2]=0,e[a+4>>2]=0,E[a+8>>1]=0,d[a+10>>0]=0,a=r+4592|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,h)}return h=t+100|0,e[h>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(p=r+4e3|0,(s|0)!=(p|0))&&(e[c>>2]=p,s=p):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,r2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],r2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0)}function tl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(k=t+8|0,B=t+36|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(44,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(45,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(46,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(47,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0)}function rl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0;e[t>>2]=36712,e[t+4>>2]=n,g=t+8|0,s=e[n>>2]|0,h=n+16|0,a=e[h>>2]|0,l=W(a,s)|0,e[g>>2]=0,C=t+12|0,e[C>>2]=0,e[t+16>>2]=0;do if(!l)l=a;else{if((l|0)<0&&(f=0,n0(178,g|0),a=f,f=0,a&1)||(p=4),(p|0)==4&&(f=0,c=u0(67,l|0)|0,a=f,f=0,!(a&1))){e[C>>2]=c,e[g>>2]=c,e[t+16>>2]=c+l,s=c;do d[s>>0]=0,s=(e[C>>2]|0)+1|0,e[C>>2]=s,l=l+-1|0;while(l|0);l=e[h>>2]|0,s=e[n>>2]|0;break}s=b()|0,o=e[g>>2]|0,o&&((e[C>>2]|0)!=(o|0)&&(e[C>>2]=o),a0(o)),C=s,r0(C|0)}while(!1);if(a=t+20|0,s=W(l,s)|0,e[a>>2]=0,l=t+24|0,e[l>>2]=0,e[t+28>>2]=0,!s){C=t+36|0,e[C>>2]=e[r>>2],e[C+4>>2]=e[r+4>>2],e[C+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(p=15),(p|0)==15&&(f=0,o=u0(67,s|0)|0,p=f,f=0,!(p&1))){e[l>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[l>>2]|0)+1|0,e[l>>2]=o,s=s+-1|0;while(s|0);C=t+36|0,e[C>>2]=e[r>>2],e[C+4>>2]=e[r+4>>2],e[C+8>>2]=e[r+8>>2];return}s=b()|0,o=e[a>>2]|0,o&&((e[l>>2]|0)!=(o|0)&&(e[l>>2]=o),a0(o)),o=e[g>>2]|0,o||(C=s,r0(C|0)),(e[C>>2]|0)!=(o|0)&&(e[C>>2]=o),a0(o),C=s,r0(C|0)}function nl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0;e[t>>2]=36688,e[t+4>>2]=n,g=t+8|0,s=e[n>>2]|0,h=n+16|0,a=e[h>>2]|0,l=W(a,s)|0,e[g>>2]=0,C=t+12|0,e[C>>2]=0,e[t+16>>2]=0;do if(!l)l=a;else{if((l|0)<0&&(f=0,n0(178,g|0),a=f,f=0,a&1)||(p=4),(p|0)==4&&(f=0,c=u0(67,l|0)|0,a=f,f=0,!(a&1))){e[C>>2]=c,e[g>>2]=c,e[t+16>>2]=c+l,s=c;do d[s>>0]=0,s=(e[C>>2]|0)+1|0,e[C>>2]=s,l=l+-1|0;while(l|0);l=e[h>>2]|0,s=e[n>>2]|0;break}s=b()|0,o=e[g>>2]|0,o&&((e[C>>2]|0)!=(o|0)&&(e[C>>2]=o),a0(o)),C=s,r0(C|0)}while(!1);if(a=t+20|0,s=W(l,s)|0,e[a>>2]=0,l=t+24|0,e[l>>2]=0,e[t+28>>2]=0,!s){C=t+36|0,e[C>>2]=e[r>>2],e[C+4>>2]=e[r+4>>2],e[C+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(p=15),(p|0)==15&&(f=0,o=u0(67,s|0)|0,p=f,f=0,!(p&1))){e[l>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[l>>2]|0)+1|0,e[l>>2]=o,s=s+-1|0;while(s|0);C=t+36|0,e[C>>2]=e[r>>2],e[C+4>>2]=e[r+4>>2],e[C+8>>2]=e[r+8>>2];return}s=b()|0,o=e[a>>2]|0,o&&((e[l>>2]|0)!=(o|0)&&(e[l>>2]=o),a0(o)),o=e[g>>2]|0,o||(C=s,r0(C|0)),(e[C>>2]|0)!=(o|0)&&(e[C>>2]=o),a0(o),C=s,r0(C|0)}function sl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0;e[t>>2]=36664,e[t+4>>2]=n,g=t+8|0,s=e[n>>2]|0,h=n+16|0,a=e[h>>2]|0,l=W(a,s)|0,e[g>>2]=0,C=t+12|0,e[C>>2]=0,e[t+16>>2]=0;do if(!l)l=a;else{if((l|0)<0&&(f=0,n0(178,g|0),a=f,f=0,a&1)||(p=4),(p|0)==4&&(f=0,c=u0(67,l|0)|0,a=f,f=0,!(a&1))){e[C>>2]=c,e[g>>2]=c,e[t+16>>2]=c+l,s=c;do d[s>>0]=0,s=(e[C>>2]|0)+1|0,e[C>>2]=s,l=l+-1|0;while(l|0);l=e[h>>2]|0,s=e[n>>2]|0;break}s=b()|0,o=e[g>>2]|0,o&&((e[C>>2]|0)!=(o|0)&&(e[C>>2]=o),a0(o)),C=s,r0(C|0)}while(!1);if(a=t+20|0,s=W(l,s)|0,e[a>>2]=0,l=t+24|0,e[l>>2]=0,e[t+28>>2]=0,!s){C=t+36|0,e[C>>2]=e[r>>2],e[C+4>>2]=e[r+4>>2],e[C+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(p=15),(p|0)==15&&(f=0,o=u0(67,s|0)|0,p=f,f=0,!(p&1))){e[l>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[l>>2]|0)+1|0,e[l>>2]=o,s=s+-1|0;while(s|0);C=t+36|0,e[C>>2]=e[r>>2],e[C+4>>2]=e[r+4>>2],e[C+8>>2]=e[r+8>>2];return}s=b()|0,o=e[a>>2]|0,o&&((e[l>>2]|0)!=(o|0)&&(e[l>>2]=o),a0(o)),o=e[g>>2]|0,o||(C=s,r0(C|0)),(e[C>>2]|0)!=(o|0)&&(e[C>>2]=o),a0(o),C=s,r0(C|0)}function ol(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0;e[t>>2]=36640,e[t+4>>2]=n,g=t+8|0,s=e[n>>2]|0,h=n+16|0,a=e[h>>2]|0,l=W(a,s)|0,e[g>>2]=0,C=t+12|0,e[C>>2]=0,e[t+16>>2]=0;do if(!l)l=a;else{if((l|0)<0&&(f=0,n0(178,g|0),a=f,f=0,a&1)||(p=4),(p|0)==4&&(f=0,c=u0(67,l|0)|0,a=f,f=0,!(a&1))){e[C>>2]=c,e[g>>2]=c,e[t+16>>2]=c+l,s=c;do d[s>>0]=0,s=(e[C>>2]|0)+1|0,e[C>>2]=s,l=l+-1|0;while(l|0);l=e[h>>2]|0,s=e[n>>2]|0;break}s=b()|0,o=e[g>>2]|0,o&&((e[C>>2]|0)!=(o|0)&&(e[C>>2]=o),a0(o)),C=s,r0(C|0)}while(!1);if(a=t+20|0,s=W(l,s)|0,e[a>>2]=0,l=t+24|0,e[l>>2]=0,e[t+28>>2]=0,!s){C=t+36|0,e[C>>2]=e[r>>2],e[C+4>>2]=e[r+4>>2],e[C+8>>2]=e[r+8>>2];return}if((s|0)<0&&(f=0,n0(178,a|0),n=f,f=0,n&1)||(p=15),(p|0)==15&&(f=0,o=u0(67,s|0)|0,p=f,f=0,!(p&1))){e[l>>2]=o,e[a>>2]=o,e[t+28>>2]=o+s;do d[o>>0]=0,o=(e[l>>2]|0)+1|0,e[l>>2]=o,s=s+-1|0;while(s|0);C=t+36|0,e[C>>2]=e[r>>2],e[C+4>>2]=e[r+4>>2],e[C+8>>2]=e[r+8>>2];return}s=b()|0,o=e[a>>2]|0,o&&((e[l>>2]|0)!=(o|0)&&(e[l>>2]=o),a0(o)),o=e[g>>2]|0,o||(C=s,r0(C|0)),(e[C>>2]|0)!=(o|0)&&(e[C>>2]=o),a0(o),C=s,r0(C|0)}function ll(t){t=t|0;var r=0,n=0;e[t>>2]=36640,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=e[t+8>>2]|0,n&&(r=t+12|0,(e[r>>2]|0)!=(n|0)&&(e[r>>2]=n),a0(n))}function al(t){t=t|0;var r=0,n=0;if(e[t>>2]=36640,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),r=e[t+8>>2]|0,!r){a0(t);return}n=t+12|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r),a0(t)}function ul(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=t+36|0,!(e[o>>2]|0)){o=t+40|0,$1(t,r,e[o>>2]|0,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}l=W(e[(e[t+4>>2]|0)+16>>2]|0,n)|0,a=t+20|0,$1(t,r,e[a>>2]|0,n,s),t=e[o>>2]|0,(Qe[e[(e[t>>2]|0)+48>>2]&63](t,e[a>>2]|0,l)|0)!=(l|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,3,35648),a=f,f=0,a&1?(a=b()|0,ge(o|0),r0(a|0)):Be(o|0,824,96))}function cl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){hl(t,o,r,n,s);return}else{o=t+40|0,zr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function zr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0;if(c=t+4|0,l=e[c>>2]|0,!(d[l+32>>0]|0))c=r;else{if(a=t+8|0,ti(e[a>>2]|0,r|0,s*3|0)|0,l=e[c>>2]|0,r=e[l+16>>2]|0,(s|0)>0){for(l=e[a>>2]|0,t=0;h=l+2|0,p=d[l>>0]|0,d[l>>0]=d[h>>0]|0,d[h>>0]=p,t=t+1|0,(t|0)!=(s|0);)l=l+r|0;l=e[c>>2]|0}c=e[a>>2]|0}switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do a=N[c+(l*3|0)+1>>0]|0,o=128-a+(N[c+(l*3|0)+2>>0]|0)|0,h=(N[c+(l*3|0)>>0]|0)-a+128|0,p=n+(l*3|0)|0,d[p>>0]=a+192+(((o&255)+(h&255)|0)>>>2),d[p+1>>0]=o,d[p+2>>0]=h,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do s=N[c+(r*3|0)+1>>0]|0,h=128-s+(N[c+(r*3|0)+2>>0]|0)|0,p=(N[c+(r*3|0)>>0]|0)-s+128|0,d[n+r>>0]=s+192+(((h&255)+(p&255)|0)>>>2),d[n+(r+o)>>0]=h,d[n+(r+t)>>0]=p,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do p=d[c+(a<<2)+3>>0]|0,g=N[c+(a<<2)+1>>0]|0,s=128-g+(N[c+(a<<2)+2>>0]|0)|0,h=(N[c+(a<<2)>>0]|0)-g+128|0,d[n+a>>0]=g+192+(((s&255)+(h&255)|0)>>>2),d[n+(a+o)>>0]=s,d[n+(a+t)>>0]=h,d[n+(a+r)>>0]=p,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function hl(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(g=y,y=y+176|0,C=g+152|0,k=g+16|0,I=g,a=W(e[(e[t+4>>2]|0)+16>>2]|0,s)|0,h=t+20|0,l=e[h>>2]|0,!a){k=l,zr(t,k,n,s,o),y=g;return}for(;c=Qe[e[(e[r>>2]|0)+32>>2]&63](r,l,a)|0,!!c;)if(l=e[h>>2]|0,(a|0)==(c|0)){p=26;break}else a=a-c|0;if((p|0)==26){zr(t,l,n,s,o),y=g;return}n=k+56|0,h=k+4|0,e[k>>2]=36160,e[n>>2]=36180,f=0,h0(62,k+56|0,h|0),g=f,f=0,g&1&&(k=b()|0,H0(n),r0(k|0)),e[k+128>>2]=0,e[k+132>>2]=-1,e[k>>2]=36200,e[k+56>>2]=36220,f=0,n0(180,h|0),g=f,f=0;do if(g&1)l=b()|0;else{if(e[h>>2]=36236,r=k+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[k+52>>2]=16,e[C>>2]=0,e[C+4>>2]=0,e[C+8>>2]=0,f=0,h0(63,h|0,C|0),g=f,f=0,g&1){l=b()|0,f0(C),f0(r),ce(h);break}f0(C),f=0,l=L0(28,k|0,49029,57)|0,C=f,f=0,!(C&1)&&(f=0,y0(36,l|0,0)|0,C=f,f=0,!(C&1))&&(c=de(16)|0,f=0,h0(64,I|0,h|0),C=f,f=0,C&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,I|0),C=f,f=0,C&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(I),a||(I=l,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0))),ge(c|0),I=l,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0)),I=b()|0,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0)}while(!1);k=l,H0(n),r0(k|0)}function $1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;h=t+4|0,t=e[h>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(a=N[r+(t*3|0)+1>>0]|0,l=N[r+(t*3|0)+2>>0]|0,c=(N[r+(t*3|0)>>0]|0)-((l+a|0)>>>2)+64|0,o=n+(t*3|0)|0,d[o>>0]=l+128+c,d[o+1>>0]=c,d[o+2>>0]=a+128+c,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do g=N[r+(a+o)>>0]|0,C=N[r+(a+l)>>0]|0,p=(N[r+a>>0]|0)-((C+g|0)>>>2)+64|0,c=n+(a*3|0)|0,d[c>>0]=C+128+p,d[c+1>>0]=p,d[c+2>>0]=g+128+p,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do p=N[r+(a+o)>>0]|0,I=N[r+(a+t)>>0]|0,g=(N[r+a>>0]|0)-((I+p|0)>>>2)+64|0,C=n+(a<<2)|0,g=g<<8&65280|N[r+(a+l)>>0]<<24|I+128+g&255|p+128+g<<16&16711680,d[C>>0]=g,d[C+1>>0]=g>>8,d[C+2>>0]=g>>16,d[C+3>>0]=g>>24,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[h>>2]|0,!!(d[t+32>>0]|0)){if(a=e[t+16>>2]|0,(s|0)>0)t=n,l=0;else return;for(;I=t+2|0,C=d[t>>0]|0,d[t>>0]=d[I>>0]|0,d[I>>0]=C,l=l+1|0,(l|0)!=(s|0);)t=t+a|0}}function ml(t){t=t|0;var r=0,n=0;e[t>>2]=36664,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=e[t+8>>2]|0,n&&(r=t+12|0,(e[r>>2]|0)!=(n|0)&&(e[r>>2]=n),a0(n))}function dl(t){t=t|0;var r=0,n=0;if(e[t>>2]=36664,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),r=e[t+8>>2]|0,!r){a0(t);return}n=t+12|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r),a0(t)}function gl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=t+36|0,!(e[o>>2]|0)){o=t+40|0,e2(t,r,e[o>>2]|0,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}l=W(e[(e[t+4>>2]|0)+16>>2]|0,n)|0,a=t+20|0,e2(t,r,e[a>>2]|0,n,s),t=e[o>>2]|0,(Qe[e[(e[t>>2]|0)+48>>2]&63](t,e[a>>2]|0,l)|0)!=(l|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,3,35648),a=f,f=0,a&1?(a=b()|0,ge(o|0),r0(a|0)):Be(o|0,824,96))}function pl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){Al(t,o,r,n,s);return}else{o=t+40|0,Hr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Hr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;if(c=t+4|0,l=e[c>>2]|0,!(d[l+32>>0]|0))c=r;else{if(a=t+8|0,ti(e[a>>2]|0,r|0,s*3|0)|0,l=e[c>>2]|0,r=e[l+16>>2]|0,(s|0)>0){for(l=e[a>>2]|0,t=0;h=l+2|0,p=d[l>>0]|0,d[l>>0]=d[h>>0]|0,d[h>>0]=p,t=t+1|0,(t|0)!=(s|0);)l=l+r|0;l=e[c>>2]|0}c=e[a>>2]|0}switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do r=N[c+(l*3|0)>>0]|0,o=d[c+(l*3|0)+1>>0]|0,a=o&255,h=(N[c+(l*3|0)+2>>0]|0)+128-((a+r|0)>>>1)&255,p=n+(l*3|0)|0,d[p>>0]=r+128-a,d[p+1>>0]=o,d[p+2>>0]=h,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do h=d[c+(r*3|0)+1>>0]|0,a=N[c+(r*3|0)>>0]|0,s=h&255,p=(N[c+(r*3|0)+2>>0]|0)+128-((s+a|0)>>>1)&255,d[n+r>>0]=a+128-s,d[n+(r+o)>>0]=h,d[n+(r+t)>>0]=p,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do s=d[c+(a<<2)+1>>0]|0,p=d[c+(a<<2)+3>>0]|0,C=N[c+(a<<2)>>0]|0,g=s&255,h=(N[c+(a<<2)+2>>0]|0)+128-((g+C|0)>>>1)&255,d[n+a>>0]=C+128-g,d[n+(a+o)>>0]=s,d[n+(a+t)>>0]=h,d[n+(a+r)>>0]=p,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function Al(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(g=y,y=y+176|0,C=g+152|0,k=g+16|0,I=g,a=W(e[(e[t+4>>2]|0)+16>>2]|0,s)|0,h=t+20|0,l=e[h>>2]|0,!a){k=l,Hr(t,k,n,s,o),y=g;return}for(;c=Qe[e[(e[r>>2]|0)+32>>2]&63](r,l,a)|0,!!c;)if(l=e[h>>2]|0,(a|0)==(c|0)){p=26;break}else a=a-c|0;if((p|0)==26){Hr(t,l,n,s,o),y=g;return}n=k+56|0,h=k+4|0,e[k>>2]=36160,e[n>>2]=36180,f=0,h0(62,k+56|0,h|0),g=f,f=0,g&1&&(k=b()|0,H0(n),r0(k|0)),e[k+128>>2]=0,e[k+132>>2]=-1,e[k>>2]=36200,e[k+56>>2]=36220,f=0,n0(180,h|0),g=f,f=0;do if(g&1)l=b()|0;else{if(e[h>>2]=36236,r=k+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[k+52>>2]=16,e[C>>2]=0,e[C+4>>2]=0,e[C+8>>2]=0,f=0,h0(63,h|0,C|0),g=f,f=0,g&1){l=b()|0,f0(C),f0(r),ce(h);break}f0(C),f=0,l=L0(28,k|0,49029,57)|0,C=f,f=0,!(C&1)&&(f=0,y0(36,l|0,0)|0,C=f,f=0,!(C&1))&&(c=de(16)|0,f=0,h0(64,I|0,h|0),C=f,f=0,C&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,I|0),C=f,f=0,C&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(I),a||(I=l,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0))),ge(c|0),I=l,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0)),I=b()|0,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0)}while(!1);k=l,H0(n),r0(k|0)}function e2(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;h=t+4|0,t=e[h>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(a=d[r+(t*3|0)+1>>0]|0,c=a&255,l=(N[r+(t*3|0)>>0]|0)+128+c|0,c=(N[r+(t*3|0)+2>>0]|0)+128+(((l&255)+c|0)>>>1)&255,o=n+(t*3|0)|0,d[o>>0]=l,d[o+1>>0]=a,d[o+2>>0]=c,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do g=d[r+(a+o)>>0]|0,p=g&255,C=(N[r+a>>0]|0)+128+p|0,p=(N[r+(a+l)>>0]|0)+128+(((C&255)+p|0)>>>1)&255,c=n+(a*3|0)|0,d[c>>0]=C,d[c+1>>0]=g,d[c+2>>0]=p,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do g=N[r+(a+o)>>0]|0,p=(N[r+a>>0]|0)+128+g&255,C=n+(a<<2)|0,g=p|g<<8|N[r+(a+l)>>0]<<24|(N[r+(a+t)>>0]|0)+128+((p+g|0)>>>1)<<16&16711680,d[C>>0]=g,d[C+1>>0]=g>>8,d[C+2>>0]=g>>16,d[C+3>>0]=g>>24,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[h>>2]|0,!!(d[t+32>>0]|0)){if(a=e[t+16>>2]|0,(s|0)>0)t=n,l=0;else return;for(;C=t+2|0,g=d[t>>0]|0,d[t>>0]=d[C>>0]|0,d[C>>0]=g,l=l+1|0,(l|0)!=(s|0);)t=t+a|0}}function Sl(t){t=t|0;var r=0,n=0;e[t>>2]=36688,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=e[t+8>>2]|0,n&&(r=t+12|0,(e[r>>2]|0)!=(n|0)&&(e[r>>2]=n),a0(n))}function vl(t){t=t|0;var r=0,n=0;if(e[t>>2]=36688,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),r=e[t+8>>2]|0,!r){a0(t);return}n=t+12|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r),a0(t)}function wl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=t+36|0,!(e[o>>2]|0)){o=t+40|0,i2(t,r,e[o>>2]|0,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}l=W(e[(e[t+4>>2]|0)+16>>2]|0,n)|0,a=t+20|0,i2(t,r,e[a>>2]|0,n,s),t=e[o>>2]|0,(Qe[e[(e[t>>2]|0)+48>>2]&63](t,e[a>>2]|0,l)|0)!=(l|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,3,35648),a=f,f=0,a&1?(a=b()|0,ge(o|0),r0(a|0)):Be(o|0,824,96))}function Tl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){Cl(t,o,r,n,s);return}else{o=t+40|0,Yr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function Yr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0;if(c=t+4|0,l=e[c>>2]|0,!(d[l+32>>0]|0))c=r;else{if(a=t+8|0,ti(e[a>>2]|0,r|0,s*3|0)|0,l=e[c>>2]|0,r=e[l+16>>2]|0,(s|0)>0){for(l=e[a>>2]|0,t=0;h=l+2|0,p=d[l>>0]|0,d[l>>0]=d[h>>0]|0,d[h>>0]=p,t=t+1|0,(t|0)!=(s|0);)l=l+r|0;l=e[c>>2]|0}c=e[a>>2]|0}switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do o=d[c+(l*3|0)+1>>0]|0,a=o&255,h=128-a+(N[c+(l*3|0)+2>>0]|0)&255,p=n+(l*3|0)|0,d[p>>0]=(N[c+(l*3|0)>>0]|0)+128-a,d[p+1>>0]=o,d[p+2>>0]=h,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do h=d[c+(r*3|0)+1>>0]|0,s=h&255,p=128-s+(N[c+(r*3|0)+2>>0]|0)&255,d[n+r>>0]=(N[c+(r*3|0)>>0]|0)+128-s,d[n+(r+o)>>0]=h,d[n+(r+t)>>0]=p,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do s=d[c+(a<<2)+1>>0]|0,p=d[c+(a<<2)+3>>0]|0,g=s&255,h=128-g+(N[c+(a<<2)+2>>0]|0)&255,d[n+a>>0]=(N[c+(a<<2)>>0]|0)+128-g,d[n+(a+o)>>0]=s,d[n+(a+t)>>0]=h,d[n+(a+r)>>0]=p,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function Cl(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(g=y,y=y+176|0,C=g+152|0,k=g+16|0,I=g,a=W(e[(e[t+4>>2]|0)+16>>2]|0,s)|0,h=t+20|0,l=e[h>>2]|0,!a){k=l,Yr(t,k,n,s,o),y=g;return}for(;c=Qe[e[(e[r>>2]|0)+32>>2]&63](r,l,a)|0,!!c;)if(l=e[h>>2]|0,(a|0)==(c|0)){p=26;break}else a=a-c|0;if((p|0)==26){Yr(t,l,n,s,o),y=g;return}n=k+56|0,h=k+4|0,e[k>>2]=36160,e[n>>2]=36180,f=0,h0(62,k+56|0,h|0),g=f,f=0,g&1&&(k=b()|0,H0(n),r0(k|0)),e[k+128>>2]=0,e[k+132>>2]=-1,e[k>>2]=36200,e[k+56>>2]=36220,f=0,n0(180,h|0),g=f,f=0;do if(g&1)l=b()|0;else{if(e[h>>2]=36236,r=k+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[k+52>>2]=16,e[C>>2]=0,e[C+4>>2]=0,e[C+8>>2]=0,f=0,h0(63,h|0,C|0),g=f,f=0,g&1){l=b()|0,f0(C),f0(r),ce(h);break}f0(C),f=0,l=L0(28,k|0,49029,57)|0,C=f,f=0,!(C&1)&&(f=0,y0(36,l|0,0)|0,C=f,f=0,!(C&1))&&(c=de(16)|0,f=0,h0(64,I|0,h|0),C=f,f=0,C&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,I|0),C=f,f=0,C&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(I),a||(I=l,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0))),ge(c|0),I=l,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0)),I=b()|0,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0)}while(!1);k=l,H0(n),r0(k|0)}function i2(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;h=t+4|0,t=e[h>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(a=d[r+(t*3|0)+1>>0]|0,l=a&255,c=l+128+(N[r+(t*3|0)+2>>0]|0)&255,o=n+(t*3|0)|0,d[o>>0]=(N[r+(t*3|0)>>0]|0)+128+l,d[o+1>>0]=a,d[o+2>>0]=c,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do g=d[r+(a+o)>>0]|0,C=g&255,p=C+128+(N[r+(a+l)>>0]|0)&255,c=n+(a*3|0)|0,d[c>>0]=(N[r+a>>0]|0)+128+C,d[c+1>>0]=g,d[c+2>>0]=p,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do g=N[r+(a+o)>>0]|0,C=n+(a<<2)|0,g=(N[r+a>>0]|0)+128+g&255|g<<8|N[r+(a+l)>>0]<<24|g+128+(N[r+(a+t)>>0]|0)<<16&16711680,d[C>>0]=g,d[C+1>>0]=g>>8,d[C+2>>0]=g>>16,d[C+3>>0]=g>>24,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[h>>2]|0,!!(d[t+32>>0]|0)){if(a=e[t+16>>2]|0,(s|0)>0)t=n,l=0;else return;for(;C=t+2|0,g=d[t>>0]|0,d[t>>0]=d[C>>0]|0,d[C>>0]=g,l=l+1|0,(l|0)!=(s|0);)t=t+a|0}}function xl(t){t=t|0;var r=0,n=0;e[t>>2]=36712,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=e[t+8>>2]|0,n&&(r=t+12|0,(e[r>>2]|0)!=(n|0)&&(e[r>>2]=n),a0(n))}function yl(t){t=t|0;var r=0,n=0;if(e[t>>2]=36712,r=e[t+20>>2]|0,r&&(n=t+24|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),r=e[t+8>>2]|0,!r){a0(t);return}n=t+12|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r),a0(t)}function Il(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=t+36|0,!(e[o>>2]|0)){o=t+40|0,t2(t,r,e[o>>2]|0,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}l=W(e[(e[t+4>>2]|0)+16>>2]|0,n)|0,a=t+20|0,t2(t,r,e[a>>2]|0,n,s),t=e[o>>2]|0,(Qe[e[(e[t>>2]|0)+48>>2]&63](t,e[a>>2]|0,l)|0)!=(l|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,3,35648),a=f,f=0,a&1?(a=b()|0,ge(o|0),r0(a|0)):Be(o|0,824,96))}function Dl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;if(o=e[t+36>>2]|0,o){El(t,o,r,n,s);return}else{o=t+40|0,jr(t,e[o>>2]|0,r,n,s),e[o>>2]=(e[o>>2]|0)+(e[(e[t+4>>2]|0)+12>>2]|0);return}}function jr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0;if(c=t+4|0,l=e[c>>2]|0,!(d[l+32>>0]|0))c=r;else{if(a=t+8|0,ti(e[a>>2]|0,r|0,s*3|0)|0,l=e[c>>2]|0,r=e[l+16>>2]|0,(s|0)>0){for(l=e[a>>2]|0,t=0;h=l+2|0,p=d[l>>0]|0,d[l>>0]=d[h>>0]|0,d[h>>0]=p,t=t+1|0,(t|0)!=(s|0);)l=l+r|0;l=e[c>>2]|0}c=e[a>>2]|0}switch(e[l+16>>2]|0){case 3:{if((e[l+24>>2]|0)==2){if((s|0)>0)l=0;else return;do o=d[c+(l*3|0)+1>>0]|0,h=d[c+(l*3|0)+2>>0]|0,p=n+(l*3|0)|0,d[p>>0]=d[c+(l*3|0)>>0]|0,d[p+1>>0]=o,d[p+2>>0]=h,l=l+1|0;while((l|0)!=(s|0));return}if(l=(o|0)<(s|0)?o:s,(l|0)<=0)return;t=o<<1,r=0;do h=d[c+(r*3|0)+1>>0]|0,p=d[c+(r*3|0)+2>>0]|0,d[n+r>>0]=d[c+(r*3|0)>>0]|0,d[n+(r+o)>>0]=h,d[n+(r+t)>>0]=p,r=r+1|0;while((r|0)!=(l|0));return}case 4:{if((e[l+24>>2]|0)!=1||(l=(o|0)<(s|0)?o:s,(l|0)<=0))return;t=o<<1,r=o*3|0,a=0;do s=d[c+(a<<2)+1>>0]|0,h=d[c+(a<<2)+2>>0]|0,p=d[c+(a<<2)+3>>0]|0,d[n+a>>0]=d[c+(a<<2)>>0]|0,d[n+(a+o)>>0]=s,d[n+(a+t)>>0]=h,d[n+(a+r)>>0]=p,a=a+1|0;while((a|0)!=(l|0));return}default:return}}function El(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(g=y,y=y+176|0,C=g+152|0,k=g+16|0,I=g,a=W(e[(e[t+4>>2]|0)+16>>2]|0,s)|0,h=t+20|0,l=e[h>>2]|0,!a){k=l,jr(t,k,n,s,o),y=g;return}for(;c=Qe[e[(e[r>>2]|0)+32>>2]&63](r,l,a)|0,!!c;)if(l=e[h>>2]|0,(a|0)==(c|0)){p=26;break}else a=a-c|0;if((p|0)==26){jr(t,l,n,s,o),y=g;return}n=k+56|0,h=k+4|0,e[k>>2]=36160,e[n>>2]=36180,f=0,h0(62,k+56|0,h|0),g=f,f=0,g&1&&(k=b()|0,H0(n),r0(k|0)),e[k+128>>2]=0,e[k+132>>2]=-1,e[k>>2]=36200,e[k+56>>2]=36220,f=0,n0(180,h|0),g=f,f=0;do if(g&1)l=b()|0;else{if(e[h>>2]=36236,r=k+36|0,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,e[r+12>>2]=0,e[k+52>>2]=16,e[C>>2]=0,e[C+4>>2]=0,e[C+8>>2]=0,f=0,h0(63,h|0,C|0),g=f,f=0,g&1){l=b()|0,f0(C),f0(r),ce(h);break}f0(C),f=0,l=L0(28,k|0,49029,57)|0,C=f,f=0,!(C&1)&&(f=0,y0(36,l|0,0)|0,C=f,f=0,!(C&1))&&(c=de(16)|0,f=0,h0(64,I|0,h|0),C=f,f=0,C&1?l=b()|0:(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,c|0,3,35648,I|0),C=f,f=0,C&1?a=1:(f=0,m0(6,c|0,824,96),f=0,a=0),l=b()|0,f0(I),a||(I=l,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0))),ge(c|0),I=l,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0)),I=b()|0,e[k>>2]=36200,e[n>>2]=36220,e[h>>2]=36236,f0(r),ce(h),H0(n),r0(I|0)}while(!1);k=l,H0(n),r0(k|0)}function t2(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0;h=t+4|0,t=e[h>>2]|0;e:do switch(e[t+16>>2]|0){case 3:{if((e[t+24>>2]|0)==2){if((s|0)>0)t=0;else break e;for(;;)if(a=d[r+(t*3|0)+1>>0]|0,c=d[r+(t*3|0)+2>>0]|0,o=n+(t*3|0)|0,d[o>>0]=d[r+(t*3|0)>>0]|0,d[o+1>>0]=a,d[o+2>>0]=c,t=t+1|0,(t|0)==(s|0))break e}if(t=(s|0)<(o|0)?s:o,(t|0)>0){l=o<<1,a=0;do g=d[r+(a+o)>>0]|0,p=d[r+(a+l)>>0]|0,c=n+(a*3|0)|0,d[c>>0]=d[r+a>>0]|0,d[c+1>>0]=g,d[c+2>>0]=p,a=a+1|0;while((a|0)!=(t|0))}break}case 4:{if((e[t+24>>2]|0)==1&&(c=(s|0)<(o|0)?s:o,(c|0)>0)){t=o<<1,l=o*3|0,a=0;do g=n+(a<<2)|0,p=N[r+(a+o)>>0]<<8|N[r+a>>0]|N[r+(a+t)>>0]<<16|N[r+(a+l)>>0]<<24,d[g>>0]=p,d[g+1>>0]=p>>8,d[g+2>>0]=p>>16,d[g+3>>0]=p>>24,a=a+1|0;while((a|0)!=(c|0))}break}default:}while(!1);if(t=e[h>>2]|0,!!(d[t+32>>0]|0)){if(a=e[t+16>>2]|0,(s|0)>0)t=n,l=0;else return;for(;g=t+2|0,p=d[t>>0]|0,d[t>>0]=d[g>>0]|0,d[g>>0]=p,l=l+1|0,(l|0)!=(s|0);)t=t+a|0}}function r2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;V=y,y=y+32|0,_=V+12|0,B=V,I=t+180|0,k=(e[I>>2]|0)+4|0,(e[t+32>>2]|0)==1?U=e[t+24>>2]|0:U=1,r=W(U<<1,k)|0,e[_>>2]=0,F=_+4|0,e[F>>2]=0,e[_+8>>2]=0;e:do if(r){if(r>>>0>1431655765&&(f=0,n0(178,_|0),O=f,f=0,O&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r*3|0)|0,O=f,f=0,!(O&1))){for(e[F>>2]=n,e[_>>2]=n,e[_+8>>2]=n+(r*3|0);;)if(d[n>>0]=0,d[n+1>>0]=0,d[n+2>>0]=0,n=(e[F>>2]|0)+3|0,e[F>>2]=n,r=r+-1|0,!r)break e}s=b()|0,r=e[_>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),r0(s|0)}while(!1);e[B>>2]=0,O=B+4|0,e[O>>2]=0,e[B+8>>2]=0;do if(!U)l=19;else{if(U>>>0>1073741823&&(f=0,n0(178,B|0),C=f,f=0,C&1)||(l=17),(l|0)==17&&(s=U<<2,f=0,o=u0(67,s|0)|0,C=f,f=0,!(C&1))){e[B>>2]=o,l=o+(U<<2)|0,e[B+8>>2]=l,je(o|0,0,s|0)|0,e[O>>2]=l,l=19;break}s=b()|0,r=e[B>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((l|0)==19){o=t+12|0;e:do if((e[o>>2]|0)>0){l=t+4604|0,a=(W(U,k)|0)+1|0,c=t+4608|0,h=t+92|0,p=(U|0)>0,g=t+4600|0,C=0;i:for(;;){if(s=e[_>>2]|0,r=s+3|0,e[l>>2]=r,n=s+(a*3|0)|0,e[c>>2]=n,C&1?(e[l>>2]=n,e[c>>2]=r,r=1):r=a,n=e[h>>2]|0,f=0,P0(e[(e[n>>2]|0)+12>>2]|0,n|0,s+(r*3|0)|0,e[I>>2]|0,k|0),s=f,f=0,s&1){l=29;break}if(p){r=e[B>>2]|0,n=e[l>>2]|0,s=0;do{if(e[g>>2]=e[r+(s<<2)>>2],M=e[I>>2]|0,r=n+(M*3|0)|0,n=n+((M+-1|0)*3|0)|0,d[r>>0]=d[n>>0]|0,d[r+1>>0]=d[n+1>>0]|0,d[r+2>>0]=d[n+2>>0]|0,r=e[l>>2]|0,n=(e[c>>2]|0)+-3|0,d[n>>0]=d[r>>0]|0,d[n+1>>0]=d[r+1>>0]|0,d[n+2>>0]=d[r+2>>0]|0,f=0,h0(70,t|0,0),n=f,f=0,n&1){l=28;break i}r=e[B>>2]|0,e[r+(s<<2)>>2]=e[g>>2],n=(e[l>>2]|0)+(k*3|0)|0,e[l>>2]=n,e[c>>2]=(e[c>>2]|0)+(k*3|0),s=s+1|0}while((s|0)<(U|0))}if(C=C+1|0,(C|0)>=(e[o>>2]|0)){l=41;break e}}if((l|0)==28){s=b()|0;break}else if((l|0)==29){s=b()|0;break}}else l=41;while(!1);do if((l|0)==41){if(f=0,n0(182,t|0),M=f,f=0,M&1){s=b()|0;break}if(r=e[B>>2]|0,n=r,r&&(s=e[O>>2]|0,(s|0)!=(r|0)&&(e[O>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[_>>2]|0,!r){y=V;return}n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),y=V;return}while(!1);r=e[B>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[_>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),r0(s|0)}function kl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0;if(t0=t+180|0,!((e[t0>>2]|0)<=0))for(Z=t+4608|0,s0=t+4604|0,w0=t+4612|0,K=0;F=K+-1|0,l=e[Z>>2]|0,a=e[s0>>2]|0,r=K+1|0,o=N[a+(K*3|0)>>0]|0,X=e[w0>>2]|0,c=N[a+(F*3|0)>>0]|0,h=o-c|0,p=N[l+(F*3|0)>>0]|0,g=c-p|0,C=((((d[X+((N[a+(r*3|0)>>0]|0)-o)>>0]|0)*9|0)+(d[X+h>>0]|0)|0)*9|0)+(d[X+g>>0]|0)|0,s=N[a+(K*3|0)+1>>0]|0,I=N[a+(F*3|0)+1>>0]|0,k=s-I|0,U=N[l+(F*3|0)+1>>0]|0,B=I-U|0,V=((((d[X+((N[a+(r*3|0)+1>>0]|0)-s)>>0]|0)*9|0)+(d[X+k>>0]|0)|0)*9|0)+(d[X+B>>0]|0)|0,n=N[a+(K*3|0)+2>>0]|0,O=N[a+(F*3|0)+2>>0]|0,_=n-O|0,F=N[l+(F*3|0)+2>>0]|0,M=O-F|0,X=((((d[X+((N[a+(r*3|0)+2>>0]|0)-n)>>0]|0)*9|0)+(d[X+_>>0]|0)|0)*9|0)+(d[X+M>>0]|0)|0,V|C|X?(a=N[l+(K*3|0)>>0]|0,l=o-p>>31,(l^g|0)>=0&&((l^h|0)<0?o=p:o=p-c+o|0),a=Xr(t,C,a,o,0)|0,l=N[(e[Z>>2]|0)+(K*3|0)+1>>0]|0,o=s-U>>31,(o^B|0)>=0&&((o^k|0)<0?s=U:s=U-I+s|0),o=Xr(t,V,l,s,0)|0,l=N[(e[Z>>2]|0)+(K*3|0)+2>>0]|0,s=n-F>>31,(s^M|0)>=0&&((s^_|0)<0?n=F:n=F-O+n|0),X=Xr(t,X,l,n,0)|0,K=(e[Z>>2]|0)+(K*3|0)|0,d[K>>0]=a,d[K+1>>0]=o,d[K+2>>0]=X):r=(Fl(t,K,0)|0)+K|0,(r|0)<(e[t0>>2]|0);)K=r}function Fl(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0;for(t0=y,y=y+32|0,K=t0+15|0,I=t0+12|0,C=t0+9|0,k=t0+6|0,_=t0+3|0,F=t0,M=(e[t+180>>2]|0)-r|0,X=e[t+4608>>2]|0,U=e[t+4604>>2]|0,O=X+((r+-1|0)*3|0)|0,B=d[O>>0]|0,V=d[O+1>>0]|0,O=d[O+2>>0]|0,n=B&255,s=t+144|0,o=V&255,l=O&255,g=0;a=X+((g+r|0)*3|0)|0,c=a+1|0,h=a+2|0,Z=(N[a>>0]|0)-n|0,p=e[s>>2]|0,!((((Z|0)>-1?Z:0-Z|0)|0)>(p|0)||(Z=(N[c>>0]|0)-o|0,(((Z|0)>-1?Z:0-Z|0)|0)>(p|0))||(Z=(N[h>>0]|0)-l|0,(((Z|0)>-1?Z:0-Z|0)|0)>(p|0)));)if(d[a>>0]=B,d[c>>0]=V,d[h>>0]=O,g=g+1|0,(g|0)==(M|0)){g=M;break}if(o=(g|0)==(M|0),l=t+4600|0,s=e[36476+(e[l>>2]<<2)>>2]|0,(1<(g|0))n=g;else{n=g;do xe(t,1,1),s=e[l>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[l>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>0]=d[Z>>0]|0,d[_+1>>0]=d[Z+1>>0]|0,d[_+2>>0]=d[Z+2>>0]|0,d[F>>0]=B,d[F+1>>0]=V,d[F+2>>0]=O,r=U+(r*3|0)|0,d[C>>0]=d[_>>0]|0,d[C+1>>0]=d[_+1>>0]|0,d[C+2>>0]=d[_+2>>0]|0,d[I>>0]=d[F>>0]|0,d[I+1>>0]=d[F+1>>0]|0,d[I+2>>0]=d[F+2>>0]|0,d[K>>0]=d[r>>0]|0,d[K+1>>0]=d[r+1>>0]|0,d[K+2>>0]=d[r+2>>0]|0,Ml(k,t,C,I,K),d[Z>>0]=d[k>>0]|0,d[Z+1>>0]=d[k+1>>0]|0,d[Z+2>>0]=d[k+2>>0]|0,Z=e[l>>2]|0,e[l>>2]=(Z|0)<1?0:Z+-1|0,Z=g+1|0,y=t0,Z|0)}function Xr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(B=r>>31,l=(B^r)-B|0,k=t+196+(l*12|0)+10|0,a=E[k>>1]|0,I=t+196+(l*12|0)|0,o=e[I>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(r=5;(a<>1]^B)-B+s|0,U=t+136|0,s=e[U>>2]|0,(o&s|0)==(o|0)?p=o:p=s&~(o>>31),o=(n-p^B)-B|0,h=t+144|0,s=e[h>>2]|0,(o|0)>0?o=(o+s|0)/(s<<1|1|0)|0:o=(o-s|0)/(s<<1|1|0)|0,C=t+140|0,c=e[C>>2]|0,n=((o|0)<0?c:0)+o|0,c=n-((n|0)<((c+1|0)/2|0|0)?0:c)|0,l=t+196+(l*12|0)+4|0,s|r?o=0:o=(e[l>>2]<<1)+-1+a>>31,s=o^c,n2(t,r,s>>30^s<<1,e[t+156>>2]|0),s=e[t+160>>2]|0,r=(e[I>>2]|0)+((c|0)>-1?c:0-c|0)|0,o=(e[l>>2]|0)+(W(e[h>>2]<<1|1,c)|0)|0,n=E[k>>1]|0,(n|0)==(s|0)&&(r=r>>1,o=o>>1,n=s>>1),e[I>>2]=r,s=n+1|0,E[k>>1]=s,r=s+o|0,(r|0)>=1?(o|0)>0&&(o=o-s|0,k=E[g>>1]|0,E[g>>1]=(k<<16>>16<127&1)+(k&65535),o=(o|0)>0?0:o):(o=E[g>>1]|0,E[g>>1]=(o&65535)-(o<<16>>16>-128&1),o=(r|0)>(~n|0)?r:0-n|0),e[l>>2]=o,s=e[h>>2]|0,n=s<<1|1,r=(W(n,(c^B)-B|0)|0)+p|0,(r|0)>=(0-s|0)?(o=e[U>>2]|0,(o+s|0)<(r|0)&&(r=r-(W(e[C>>2]|0,n)|0)|0)):(r=(W(e[C>>2]|0,n)|0)+r|0,o=e[U>>2]|0),(r&o|0)==(r|0)?(B=r,B=B&255,B|0):(B=o&~(r>>31),B=B&255,B|0)}function n2(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=n>>r,l=t+148|0,a=s-(e[l>>2]|0)|0,(o|0)<(a+-1|0)){(o|0)>30&&(s=(o|0)/2|0,xe(t,0,s),o=o-s|0),xe(t,1,o+1|0),xe(t,(1<31?(xe(t,0,31),xe(t,1,s+-31-(e[l>>2]|0)|0)):xe(t,1,a),r=e[l>>2]|0,xe(t,(1<>0]|0,I=C-(N[s>>0]|0)>>31|1,l=W(I,(N[n>>0]|0)-C|0)|0,p=r+144|0,a=e[p>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,F=r+140|0,h=e[F>>2]|0,c=((l|0)<0?h:0)+l|0,h=c-((c|0)<((h+1|0)/2|0|0)?0:h)|0,c=r+4576|0,Kr(r,c,h),V=N[o+1>>0]|0,O=V-(N[s+1>>0]|0)>>31|1,l=W(O,(N[n+1>>0]|0)-V|0)|0,a=e[p>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,k=e[F>>2]|0,_=((l|0)<0?k:0)+l|0,k=_-((_|0)<((k+1|0)/2|0|0)?0:k)|0,Kr(r,c,k),_=N[o+2>>0]|0,B=_-(N[s+2>>0]|0)>>31|1,l=W(B,(N[n+2>>0]|0)-_|0)|0,a=e[p>>2]|0,(l|0)>0?l=(l+a|0)/(a<<1|1|0)|0:l=(l-a|0)/(a<<1|1|0)|0,g=e[F>>2]|0,l=((l|0)<0?g:0)+l|0,g=l-((l|0)<((g+1|0)/2|0|0)?0:g)|0,Kr(r,c,g),c=e[p>>2]|0,p=c<<1|1,l=(W(W(p,h)|0,I)|0)+C|0,n=0-c|0,(l|0)>=(n|0)?(a=e[U>>2]|0,(a+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,p)|0)|0),s=a):(l=(W(e[F>>2]|0,p)|0)+l|0,s=e[U>>2]|0),(l&s|0)!=(l|0)&&(l=s&~(l>>31)),o=l&255,l=(W(W(p,k)|0,O)|0)+V|0,(l|0)>=(n|0)?(s+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,p)|0)|0):l=(W(e[F>>2]|0,p)|0)+l|0,(l&s|0)!=(l|0)&&(l=s&~(l>>31)),a=l&255,l=(W(W(p,g)|0,B)|0)+_|0,(l|0)>=(n|0)?(s+c|0)<(l|0)&&(l=l-(W(e[F>>2]|0,p)|0)|0):l=(W(e[F>>2]|0,p)|0)+l|0,(l&s|0)==(l|0)){F=l,F=F&255,d[t>>0]=o,_=t+1|0,d[_>>0]=a,t=t+2|0,d[t>>0]=F;return}F=s&~(l>>31),F=F&255,d[t>>0]=o,_=t+1|0,d[_>>0]=a,t=t+2|0,d[t>>0]=F}function Kr(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=r+9|0,a=N[g>>0]|0,p=r+4|0,h=e[p>>2]|0,o=(W(a>>>1,h)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-h+(s<<31>>31)|0,n2(t,o,s,(e[t+156>>2]|0)+-1-(e[36476+(e[t+4600>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[p>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[g>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[g>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r}function _l(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;I=y,y=y+32|0,s=I,C=t+144|0;e:do if(e[C>>2]|0)r=t+152|0;else if(n=e[t+136>>2]|0,r=t+152|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+184>>2]|0))&&(e[s+8>>2]|0)==(e[t+188>>2]|0)&&(e[s+12>>2]|0)==(e[t+192>>2]|0))switch(e[r>>2]|0){case 8:{C=e[8900]|0,e[t+4612>>2]=C+(((e[8901]|0)-C|0)>>>1),y=I;return}case 10:{C=e[8903]|0,e[t+4612>>2]=C+(((e[8904]|0)-C|0)>>>1),y=I;return}case 12:{C=e[8906]|0,e[t+4612>>2]=C+(((e[8907]|0)-C|0)>>>1),y=I;return}case 16:{C=e[8909]|0,e[t+4612>>2]=C+(((e[8910]|0)-C|0)>>>1),y=I;return}default:break e}while(!1);if(g=1<>2],n=t+4616|0,s=g<<1,o=t+4620|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),p=t+4612|0,e[p>>2]=r+g,r=0-g|0,(g|0)<=(r|0)){y=I;return}c=t+192|0,h=t+188|0,a=t+184|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[h>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[C>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[p>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(g|0));y=I}function Rl(t){t=t|0;var r=0,n=0;e[t>>2]=35996,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Pl(t){t=t|0;var r=0,n=0;if(e[t>>2]=35996,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function Ll(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,65535,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+160>>2]=a|0?a:e[c+4>>2]|0,e[t+164>>2]=l,e[t+168>>2]=s,bl(t),s=0;do e[t+172+(s*12|0)>>2]=1024,e[t+172+(s*12|0)+4>>2]=0,E[t+172+(s*12|0)+8>>1]=0,E[t+172+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4552>>2]=1024,e[t+4556>>2]=0,d[t+4560>>0]=c,d[t+4561>>0]=1,d[t+4562>>0]=0,e[t+4564>>2]=1024,e[t+4568>>2]=1,d[t+4572>>0]=c,d[t+4573>>0]=1,d[t+4574>>0]=0,e[t+4576>>2]=0,y=o}function Ul(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+16|0,h=g,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[h>>2]=0,e[h+4>>2]=s,c=n+8|0,e[h+8>>2]=e[c>>2],s){r=G0(4600)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35772,o=r+132|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+148>>2]=e[s>>2],e[r+152>>2]=0,e[r+156>>2]=0,e[r+160>>2]=0,o=r+4544|0,s=r+164|0;do e[s>>2]=0,e[s+4>>2]=0,E[s+8>>1]=0,E[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,d[o+10>>0]=0,a=r+4556|0,e[a>>2]=0,e[a+4>>2]=0,E[a+8>>1]=0,d[a+10>>0]=0,a=r+4568|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,h)}return h=t+100|0,e[h>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(p=r+4e3|0,(s|0)!=(p|0))&&(e[c>>2]=p,s=p):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,s2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],s2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0)}function Ol(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(k=t+8|0,B=t+36|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(37,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(38,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(39,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(40,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function s2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;O=y,y=y+32|0,F=O+12|0,V=O,k=t+156|0,U=(e[k>>2]|0)+4|0,(e[t+32>>2]|0)==1?B=e[t+24>>2]|0:B=1,r=W(B<<1,U)|0,e[F>>2]=0,M=F+4|0,e[M>>2]=0,e[F+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,F|0),_=f,f=0,_&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,_=f,f=0,!(_&1))){e[F>>2]=s,_=s+(r<<1)|0,e[F+8>>2]=_,je(s|0,0,n|0)|0,e[M>>2]=_;break}s=b()|0,r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}while(!1);e[V>>2]=0,_=V+4|0,e[_>>2]=0,e[V+8>>2]=0;do if(!B)a=18;else{if(B>>>0>1073741823&&(f=0,n0(178,V|0),I=f,f=0,I&1)||(a=16),(a|0)==16&&(o=B<<2,f=0,l=u0(67,o|0)|0,I=f,f=0,!(I&1))){e[V>>2]=l,a=l+(B<<2)|0,e[V+8>>2]=a,je(l|0,0,o|0)|0,e[_>>2]=a,a=18;break}s=b()|0,r=e[V>>2]|0,n=r,r&&(o=e[_>>2]|0,(o|0)!=(r|0)&&(e[_>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((a|0)==18){l=t+12|0;e:do if((e[l>>2]|0)>0){a=t+4580|0,c=(W(B,U)|0)+1|0,h=t+4584|0,p=t+92|0,g=(B|0)>0,C=t+4576|0,I=0;i:for(;;){if(n=e[F>>2]|0,r=n+2|0,e[a>>2]=r,n=n+(c<<1)|0,e[h>>2]=n,I&1?(e[a>>2]=n,e[h>>2]=r):r=n,o=e[p>>2]|0,f=0,P0(e[(e[o>>2]|0)+12>>2]|0,o|0,r|0,e[k>>2]|0,U|0),o=f,f=0,o&1){a=28;break}if(g){r=e[a>>2]|0,n=e[h>>2]|0,s=e[V>>2]|0,o=0;do{if(e[C>>2]=e[s+(o<<2)>>2],s=e[k>>2]|0,E[r+(s<<1)>>1]=E[r+(s+-1<<1)>>1]|0,E[n+-2>>1]=E[r>>1]|0,f=0,h0(71,t|0,0),s=f,f=0,s&1){a=27;break i}s=e[V>>2]|0,e[s+(o<<2)>>2]=e[C>>2],r=(e[a>>2]|0)+(U<<1)|0,e[a>>2]=r,n=(e[h>>2]|0)+(U<<1)|0,e[h>>2]=n,o=o+1|0}while((o|0)<(B|0))}if(I=I+1|0,(I|0)>=(e[l>>2]|0)){a=40;break e}}if((a|0)==27){s=b()|0;break}else if((a|0)==28){s=b()|0;break}}else a=40;while(!1);do if((a|0)==40){if(f=0,n0(182,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[V>>2]|0,n=r,r&&(s=e[_>>2]|0,(s|0)!=(r|0)&&(e[_>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[F>>2]|0,!r){y=O;return}n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),y=O;return}while(!1);r=e[V>>2]|0,n=r,r&&(o=e[_>>2]|0,(o|0)!=(r|0)&&(e[_>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}function Nl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=t+4580|0,r=e[C>>2]|0,U=t+156|0,!((e[U>>2]|0)<=0))for(I=t+4584|0,k=t+4588|0,o=r,l=q[r+-2>>1]|0,r=q[r>>1]|0,g=0;p=e[I>>2]|0,h=q[p+(g+-1<<1)>>1]|0,s=g+1|0,n=q[o+(s<<1)>>1]|0,c=e[k>>2]|0,a=r-l|0,o=l-h|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-h>>31,(l^o|0)<0?o=r:o=h+((l^a|0)<0?0:a)|0,p=Bl(t,c,q[p+(g<<1)>>1]|0,o,0)|0,E[(e[I>>2]|0)+(g<<1)>>1]=p):(s=(Vl(t,g,0)|0)+g|0,n=e[C>>2]|0,r=q[n+(s+-1<<1)>>1]|0,n=q[n+(s<<1)>>1]|0),!((s|0)>=(e[U>>2]|0));)o=e[C>>2]|0,l=r,r=n,g=s}function Bl(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(U=r>>31,h=(U^r)-U|0,k=t+172+(h*12|0)+10|0,a=E[k>>1]|0,I=t+172+(h*12|0)|0,o=e[I>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(l=5;(a<>1]^U)-U+s|0,(o&65535|0)==(o|0)?g=o:g=o>>31&65535^65535,c=(n-g^U)-U<<16,p=c>>16,l?o=0:o=(e[t+172+(h*12|0)+4>>2]<<1)+-1+a>>31,s=o^p,s=s>>30^s<<1,o=s>>l,(o|0)<47?((o|0)>30&&(a=(o|0)/2|0,xe(t,0,a),o=o-a|0),xe(t,1,o+1|0),xe(t,s&(1<>1]|0,o=a<<16>>16==64,l=o&1,n=(e[s>>2]|0)+p>>l,a=o?32:a<<16>>16,e[I>>2]=(e[I>>2]|0)+((c|0)>-65536?p:0-p|0)>>l,l=a+1|0,E[k>>1]=l,o=l+n|0,(o|0)<1?(k=E[C>>1]|0,E[C>>1]=(k&65535)-(k<<16>>16>-128&1),k=(o|0)>(~a|0)?o:0-a|0,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&65535,r|0):(n|0)<=0?(k=n,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&65535,r|0):(k=n-l|0,I=E[C>>1]|0,E[C>>1]=(I<<16>>16<127&1)+(I&65535),k=(k|0)>0?0:k,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&65535,r|0)}function Vl(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;for(a=(e[t+156>>2]|0)-r|0,c=e[t+4584>>2]|0,p=e[t+4580>>2]|0,o=E[c+(r+-1<<1)>>1]|0,s=0;;){if(n=c+(s+r<<1)|0,(E[n>>1]|0)!=o<<16>>16){g=s;break}if(E[n>>1]=o,s=s+1|0,(s|0)==(a|0)){g=a;break}}if(l=o&65535,o=(g|0)==(a|0),h=t+4576|0,s=e[36476+(e[h>>2]<<2)>>2]|0,(1<(g|0))n=g;else{n=g;do xe(t,1,1),s=e[h>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[h>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>1]|0,n=q[p+(n<<1)>>1]|0,p=l-n|0,(((p|0)>-1?p:0-p|0)|0)<1?(n=s-l<<16>>16,o2(t,t+4564|0,n),n=n+l|0):(p=n-l>>31|1,r=(W(s-n<<16,p)|0)>>16,o2(t,t+4552|0,r),n=(W(r,p)|0)+n|0),E[o>>1]=n,t=e[h>>2]|0,e[h>>2]=(t|0)<1?0:t+-1|0,t=g+1|0,t|0)}function o2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=r+9|0,a=N[g>>0]|0,p=r+4|0,h=e[p>>2]|0,o=(W(a>>>1,h)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-h+(s<<31>>31)|0,ql(t,o,s,63-(e[36476+(e[t+4576>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[p>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[g>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[g>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r}function ql(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(o=n>>r,l=s+-16|0,(o|0)<(s+-17|0)){(o|0)>30&&(s=(o|0)/2|0,xe(t,0,s),o=o-s|0),xe(t,1,o+1|0),xe(t,(1<31?(xe(t,0,31),xe(t,1,s+-47|0)):xe(t,1,l),xe(t,n+65535&65535,16)}function bl(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=y,y=y+32|0,c=p,hi(c,65535,0),h=t+160|0,(e[c+4>>2]|0)==(e[h>>2]|0)&&(e[c+8>>2]|0)==(e[t+164>>2]|0)&&(e[c+12>>2]|0)==(e[t+168>>2]|0)){h=e[8909]|0,e[t+4588>>2]=h+(((e[8910]|0)-h|0)>>>1),y=p;return}for(n=t+4592|0,s=t+4596|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=131072?l>>>0>131072&&(a=r+131072|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,131072-l|0),r=e[n>>2]|0),c=t+4588|0,e[c>>2]=r+65536,a=t+168|0,o=t+164|0,l=-65536;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[h>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==65536)break}y=p}function Gl(t){t=t|0;var r=0,n=0;e[t>>2]=35968,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Ql(t){t=t|0;var r=0,n=0;if(e[t>>2]=35968,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function zl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,4095,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+160>>2]=a|0?a:e[c+4>>2]|0,e[t+164>>2]=l,e[t+168>>2]=s,Zl(t),s=0;do e[t+172+(s*12|0)>>2]=64,e[t+172+(s*12|0)+4>>2]=0,E[t+172+(s*12|0)+8>>1]=0,E[t+172+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4552>>2]=64,e[t+4556>>2]=0,d[t+4560>>0]=c,d[t+4561>>0]=1,d[t+4562>>0]=0,e[t+4564>>2]=64,e[t+4568>>2]=1,d[t+4572>>0]=c,d[t+4573>>0]=1,d[t+4574>>0]=0,e[t+4576>>2]=0,y=o}function Hl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+16|0,h=g,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[h>>2]=0,e[h+4>>2]=s,c=n+8|0,e[h+8>>2]=e[c>>2],s){r=G0(4600)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35744,o=r+132|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+148>>2]=e[s>>2],e[r+152>>2]=0,e[r+156>>2]=0,e[r+160>>2]=0,o=r+4544|0,s=r+164|0;do e[s>>2]=0,e[s+4>>2]=0,E[s+8>>1]=0,E[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,d[o+10>>0]=0,a=r+4556|0,e[a>>2]=0,e[a+4>>2]=0,E[a+8>>1]=0,d[a+10>>0]=0,a=r+4568|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,h)}return h=t+100|0,e[h>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(p=r+4e3|0,(s|0)!=(p|0))&&(e[c>>2]=p,s=p):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,l2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],l2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0)}function Yl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(k=t+8|0,B=t+36|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(37,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(38,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(39,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(40,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function l2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;O=y,y=y+32|0,F=O+12|0,V=O,k=t+156|0,U=(e[k>>2]|0)+4|0,(e[t+32>>2]|0)==1?B=e[t+24>>2]|0:B=1,r=W(B<<1,U)|0,e[F>>2]=0,M=F+4|0,e[M>>2]=0,e[F+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,F|0),_=f,f=0,_&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,_=f,f=0,!(_&1))){e[F>>2]=s,_=s+(r<<1)|0,e[F+8>>2]=_,je(s|0,0,n|0)|0,e[M>>2]=_;break}s=b()|0,r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}while(!1);e[V>>2]=0,_=V+4|0,e[_>>2]=0,e[V+8>>2]=0;do if(!B)a=18;else{if(B>>>0>1073741823&&(f=0,n0(178,V|0),I=f,f=0,I&1)||(a=16),(a|0)==16&&(o=B<<2,f=0,l=u0(67,o|0)|0,I=f,f=0,!(I&1))){e[V>>2]=l,a=l+(B<<2)|0,e[V+8>>2]=a,je(l|0,0,o|0)|0,e[_>>2]=a,a=18;break}s=b()|0,r=e[V>>2]|0,n=r,r&&(o=e[_>>2]|0,(o|0)!=(r|0)&&(e[_>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((a|0)==18){l=t+12|0;e:do if((e[l>>2]|0)>0){a=t+4580|0,c=(W(B,U)|0)+1|0,h=t+4584|0,p=t+92|0,g=(B|0)>0,C=t+4576|0,I=0;i:for(;;){if(n=e[F>>2]|0,r=n+2|0,e[a>>2]=r,n=n+(c<<1)|0,e[h>>2]=n,I&1?(e[a>>2]=n,e[h>>2]=r):r=n,o=e[p>>2]|0,f=0,P0(e[(e[o>>2]|0)+12>>2]|0,o|0,r|0,e[k>>2]|0,U|0),o=f,f=0,o&1){a=28;break}if(g){r=e[a>>2]|0,n=e[h>>2]|0,s=e[V>>2]|0,o=0;do{if(e[C>>2]=e[s+(o<<2)>>2],s=e[k>>2]|0,E[r+(s<<1)>>1]=E[r+(s+-1<<1)>>1]|0,E[n+-2>>1]=E[r>>1]|0,f=0,h0(72,t|0,0),s=f,f=0,s&1){a=27;break i}s=e[V>>2]|0,e[s+(o<<2)>>2]=e[C>>2],r=(e[a>>2]|0)+(U<<1)|0,e[a>>2]=r,n=(e[h>>2]|0)+(U<<1)|0,e[h>>2]=n,o=o+1|0}while((o|0)<(B|0))}if(I=I+1|0,(I|0)>=(e[l>>2]|0)){a=40;break e}}if((a|0)==27){s=b()|0;break}else if((a|0)==28){s=b()|0;break}}else a=40;while(!1);do if((a|0)==40){if(f=0,n0(182,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[V>>2]|0,n=r,r&&(s=e[_>>2]|0,(s|0)!=(r|0)&&(e[_>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[F>>2]|0,!r){y=O;return}n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),y=O;return}while(!1);r=e[V>>2]|0,n=r,r&&(o=e[_>>2]|0,(o|0)!=(r|0)&&(e[_>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[F>>2]|0,r||r0(s|0),n=e[M>>2]|0,(n|0)!=(r|0)&&(e[M>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}function jl(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=t+4580|0,r=e[C>>2]|0,U=t+156|0,!((e[U>>2]|0)<=0))for(I=t+4584|0,k=t+4588|0,o=r,l=q[r+-2>>1]|0,r=q[r>>1]|0,g=0;p=e[I>>2]|0,h=q[p+(g+-1<<1)>>1]|0,s=g+1|0,n=q[o+(s<<1)>>1]|0,c=e[k>>2]|0,a=r-l|0,o=l-h|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-h>>31,(l^o|0)<0?o=r:o=h+((l^a|0)<0?0:a)|0,p=Xl(t,c,q[p+(g<<1)>>1]|0,o,0)|0,E[(e[I>>2]|0)+(g<<1)>>1]=p):(s=(Kl(t,g,0)|0)+g|0,n=e[C>>2]|0,r=q[n+(s+-1<<1)>>1]|0,n=q[n+(s<<1)>>1]|0),!((s|0)>=(e[U>>2]|0));)o=e[C>>2]|0,l=r,r=n,g=s}function Xl(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(U=r>>31,h=(U^r)-U|0,k=t+172+(h*12|0)+10|0,a=E[k>>1]|0,I=t+172+(h*12|0)|0,o=e[I>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(l=5;(a<>1]^U)-U+s|0,(o&4095|0)==(o|0)?g=o:g=o>>31&4095^4095,c=(n-g^U)-U<<20,p=c>>20,l?o=0:o=(e[t+172+(h*12|0)+4>>2]<<1)+-1+a>>31,s=o^p,s=s>>30^s<<1,o=s>>l,(o|0)<35?((o|0)>30&&(a=(o|0)/2|0,xe(t,0,a),o=o-a|0),xe(t,1,o+1|0),xe(t,s&(1<>1]|0,o=a<<16>>16==64,l=o&1,n=(e[s>>2]|0)+p>>l,a=o?32:a<<16>>16,e[I>>2]=(e[I>>2]|0)+((c|0)>-1048576?p:0-p|0)>>l,l=a+1|0,E[k>>1]=l,o=l+n|0,(o|0)<1?(k=E[C>>1]|0,E[C>>1]=(k&65535)-(k<<16>>16>-128&1),k=(o|0)>(~a|0)?o:0-a|0,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&4095,r=r&65535,r|0):(n|0)<=0?(k=n,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&4095,r=r&65535,r|0):(k=n-l|0,I=E[C>>1]|0,E[C>>1]=(I<<16>>16<127&1)+(I&65535),k=(k|0)>0?0:k,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&4095,r=r&65535,r|0)}function Kl(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;for(a=(e[t+156>>2]|0)-r|0,c=e[t+4584>>2]|0,p=e[t+4580>>2]|0,o=E[c+(r+-1<<1)>>1]|0,s=0;;){if(n=c+(s+r<<1)|0,(E[n>>1]|0)!=o<<16>>16){g=s;break}if(E[n>>1]=o,s=s+1|0,(s|0)==(a|0)){g=a;break}}if(l=o&65535,o=(g|0)==(a|0),h=t+4576|0,s=e[36476+(e[h>>2]<<2)>>2]|0,(1<(g|0))n=g;else{n=g;do xe(t,1,1),s=e[h>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[h>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>1]|0,n=q[p+(n<<1)>>1]|0,p=l-n|0,(((p|0)>-1?p:0-p|0)|0)<1?(n=s-l<<20>>20,a2(t,t+4564|0,n),n=n+l|0):(p=n-l>>31|1,r=(W(s-n<<20,p)|0)>>20,a2(t,t+4552|0,r),n=(W(r,p)|0)+n|0),E[o>>1]=n&4095,t=e[h>>2]|0,e[h>>2]=(t|0)<1?0:t+-1|0,t=g+1|0,t|0)}function a2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=r+9|0,a=N[g>>0]|0,p=r+4|0,h=e[p>>2]|0,o=(W(a>>>1,h)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-h+(s<<31>>31)|0,Wl(t,o,s,47-(e[36476+(e[t+4576>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[p>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[g>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[g>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r}function Wl(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(o=n>>r,l=s+-12|0,(o|0)<(s+-13|0)){(o|0)>30&&(s=(o|0)/2|0,xe(t,0,s),o=o-s|0),xe(t,1,o+1|0),xe(t,(1<31?(xe(t,0,31),xe(t,1,s+-43|0)):xe(t,1,l),xe(t,n+4095&4095,12)}function Zl(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=y,y=y+32|0,c=p,hi(c,4095,0),h=t+160|0,(e[c+4>>2]|0)==(e[h>>2]|0)&&(e[c+8>>2]|0)==(e[t+164>>2]|0)&&(e[c+12>>2]|0)==(e[t+168>>2]|0)){h=e[8906]|0,e[t+4588>>2]=h+(((e[8907]|0)-h|0)>>>1),y=p;return}for(n=t+4592|0,s=t+4596|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=8192?l>>>0>8192&&(a=r+8192|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,8192-l|0),r=e[n>>2]|0),c=t+4588|0,e[c>>2]=r+4096,a=t+168|0,o=t+164|0,l=-4096;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[h>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==4096)break}y=p}function Jl(t){t=t|0;var r=0,n=0;e[t>>2]=35940,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function $l(t){t=t|0;var r=0,n=0;if(e[t>>2]=35940,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function ea(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,255,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+160>>2]=a|0?a:e[c+4>>2]|0,e[t+164>>2]=l,e[t+168>>2]=s,la(t),s=0;do e[t+172+(s*12|0)>>2]=4,e[t+172+(s*12|0)+4>>2]=0,E[t+172+(s*12|0)+8>>1]=0,E[t+172+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4552>>2]=4,e[t+4556>>2]=0,d[t+4560>>0]=c,d[t+4561>>0]=1,d[t+4562>>0]=0,e[t+4564>>2]=4,e[t+4568>>2]=1,d[t+4572>>0]=c,d[t+4573>>0]=1,d[t+4574>>0]=0,e[t+4576>>2]=0,y=o}function ia(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+16|0,h=g,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[h>>2]=0,e[h+4>>2]=s,c=n+8|0,e[h+8>>2]=e[c>>2],s){r=G0(4600)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35716,o=r+132|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+148>>2]=e[s>>2],e[r+152>>2]=0,e[r+156>>2]=0,e[r+160>>2]=0,o=r+4544|0,s=r+164|0;do e[s>>2]=0,e[s+4>>2]=0,E[s+8>>1]=0,E[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,d[o+10>>0]=0,a=r+4556|0,e[a>>2]=0,e[a+4>>2]=0,E[a+8>>1]=0,d[a+10>>0]=0,a=r+4568|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,h)}return h=t+100|0,e[h>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(p=r+4e3|0,(s|0)!=(p|0))&&(e[c>>2]=p,s=p):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,f2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],f2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0)}function ta(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(k=t+8|0,B=t+36|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(44,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(45,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(46,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(47,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0)}function f2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0;V=y,y=y+32|0,_=V+12|0,B=V,I=t+156|0,k=(e[I>>2]|0)+4|0,(e[t+32>>2]|0)==1?U=e[t+24>>2]|0:U=1,r=W(U<<1,k)|0,e[_>>2]=0,F=_+4|0,e[F>>2]=0,e[_+8>>2]=0;e:do if(r){if((r|0)<0&&(f=0,n0(178,_|0),O=f,f=0,O&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r|0)|0,O=f,f=0,!(O&1))){for(e[F>>2]=n,e[_>>2]=n,e[_+8>>2]=n+r;;)if(d[n>>0]=0,n=(e[F>>2]|0)+1|0,e[F>>2]=n,r=r+-1|0,!r)break e}n=b()|0,r=e[_>>2]|0,r||r0(n|0),(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),a0(r),r0(n|0)}while(!1);e[B>>2]=0,O=B+4|0,e[O>>2]=0,e[B+8>>2]=0;do if(!U)l=19;else{if(U>>>0>1073741823&&(f=0,n0(178,B|0),C=f,f=0,C&1)||(l=17),(l|0)==17&&(s=U<<2,f=0,o=u0(67,s|0)|0,C=f,f=0,!(C&1))){e[B>>2]=o,l=o+(U<<2)|0,e[B+8>>2]=l,je(o|0,0,s|0)|0,e[O>>2]=l,l=19;break}n=b()|0,r=e[B>>2]|0,s=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-s|0)>>>2)<<2)),a0(r))}while(!1);if((l|0)==19){o=t+12|0;e:do if((e[o>>2]|0)>0){l=t+4580|0,a=(W(U,k)|0)+1|0,c=t+4584|0,h=t+92|0,p=(U|0)>0,g=t+4576|0,C=0;i:for(;;){if(n=e[_>>2]|0,r=n+1|0,e[l>>2]=r,n=n+a|0,e[c>>2]=n,C&1?(e[l>>2]=n,e[c>>2]=r):r=n,s=e[h>>2]|0,f=0,P0(e[(e[s>>2]|0)+12>>2]|0,s|0,r|0,e[I>>2]|0,k|0),s=f,f=0,s&1){l=29;break}if(p){r=e[l>>2]|0,n=e[B>>2]|0,s=0;do{if(e[g>>2]=e[n+(s<<2)>>2],n=e[I>>2]|0,d[r+n>>0]=d[r+(n+-1)>>0]|0,d[(e[c>>2]|0)+-1>>0]=d[e[l>>2]>>0]|0,f=0,h0(73,t|0,0),n=f,f=0,n&1){l=28;break i}n=e[B>>2]|0,e[n+(s<<2)>>2]=e[g>>2],r=(e[l>>2]|0)+k|0,e[l>>2]=r,e[c>>2]=(e[c>>2]|0)+k,s=s+1|0}while((s|0)<(U|0))}if(C=C+1|0,(C|0)>=(e[o>>2]|0)){l=41;break e}}if((l|0)==28){n=b()|0;break}else if((l|0)==29){n=b()|0;break}}else l=41;while(!1);do if((l|0)==41){if(f=0,n0(182,t|0),t=f,f=0,t&1){n=b()|0;break}if(r=e[B>>2]|0,n=r,r&&(s=e[O>>2]|0,(s|0)!=(r|0)&&(e[O>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[_>>2]|0,!r){y=V;return}(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),a0(r),y=V;return}while(!1);r=e[B>>2]|0,s=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-s|0)>>>2)<<2)),a0(r))}r=e[_>>2]|0,r||r0(n|0),(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),a0(r),r0(n|0)}function ra(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=t+4580|0,r=e[C>>2]|0,U=t+156|0,!((e[U>>2]|0)<=0))for(I=t+4584|0,k=t+4588|0,o=r,l=N[r+-1>>0]|0,r=N[r>>0]|0,g=0;p=e[I>>2]|0,h=N[p+(g+-1)>>0]|0,s=g+1|0,n=N[o+s>>0]|0,c=e[k>>2]|0,a=r-l|0,o=l-h|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-h>>31,(l^o|0)<0?o=r:o=h+((l^a|0)<0?0:a)|0,p=na(t,c,N[p+g>>0]|0,o,0)|0,d[(e[I>>2]|0)+g>>0]=p):(s=(sa(t,g,0)|0)+g|0,n=e[C>>2]|0,r=N[n+(s+-1)>>0]|0,n=N[n+s>>0]|0),!((s|0)>=(e[U>>2]|0));)o=e[C>>2]|0,l=r,r=n,g=s}function na(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(U=r>>31,h=(U^r)-U|0,k=t+172+(h*12|0)+10|0,a=E[k>>1]|0,I=t+172+(h*12|0)|0,o=e[I>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(l=5;(a<>1]^U)-U+s|0,(o&255|0)==(o|0)?g=o:g=o>>31&255^255,c=(n-g^U)-U<<24,p=c>>24,l?o=0:o=(e[t+172+(h*12|0)+4>>2]<<1)+-1+a>>31,o=o^p,o=o>>30^o<<1,s=o>>l,(s|0)<23?(xe(t,1,s+1|0),xe(t,o&(1<>1]|0,o=a<<16>>16==64,l=o&1,n=(e[s>>2]|0)+p>>l,a=o?32:a<<16>>16,e[I>>2]=(e[I>>2]|0)+((c|0)>-16777216?p:0-p|0)>>l,l=a+1|0,E[k>>1]=l,o=l+n|0,(o|0)<1?(k=E[C>>1]|0,E[C>>1]=(k&65535)-(k<<16>>16>-128&1),k=(o|0)>(~a|0)?o:0-a|0,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&255,r|0):(n|0)<=0?(k=n,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&255,r|0):(k=n-l|0,I=E[C>>1]|0,E[C>>1]=(I<<16>>16<127&1)+(I&65535),k=(k|0)>0?0:k,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&255,r|0)}function sa(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;for(a=(e[t+156>>2]|0)-r|0,c=e[t+4584>>2]|0,p=e[t+4580>>2]|0,o=d[c+(r+-1)>>0]|0,s=0;;){if(n=c+(s+r)|0,(d[n>>0]|0)!=o<<24>>24){g=s;break}if(d[n>>0]=o,s=s+1|0,(s|0)==(a|0)){g=a;break}}if(l=o&255,o=(g|0)==(a|0),h=t+4576|0,s=e[36476+(e[h>>2]<<2)>>2]|0,(1<(g|0))n=g;else{n=g;do xe(t,1,1),s=e[h>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[h>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>0]|0,n=N[p+n>>0]|0,p=l-n|0,(((p|0)>-1?p:0-p|0)|0)<1?(n=s-l<<24>>24,u2(t,t+4564|0,n),n=n+l|0):(p=n-l>>31|1,r=(W(s-n<<24,p)|0)>>24,u2(t,t+4552|0,r),n=(W(r,p)|0)+n|0),d[o>>0]=n,t=e[h>>2]|0,e[h>>2]=(t|0)<1?0:t+-1|0,t=g+1|0,t|0)}function u2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=r+9|0,a=N[g>>0]|0,p=r+4|0,h=e[p>>2]|0,o=(W(a>>>1,h)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-h+(s<<31>>31)|0,oa(t,o,s,31-(e[36476+(e[t+4576>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[p>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[g>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[g>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r}function oa(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(o=n>>r,l=s+-8|0,(o|0)<(s+-9|0)){(o|0)>30&&(s=(o|0)/2|0,xe(t,0,s),o=o-s|0),xe(t,1,o+1|0),xe(t,(1<31?(xe(t,0,31),xe(t,1,s+-39|0)):xe(t,1,l),xe(t,n+255&255,8)}function la(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=y,y=y+32|0,c=p,hi(c,255,0),h=t+160|0,(e[c+4>>2]|0)==(e[h>>2]|0)&&(e[c+8>>2]|0)==(e[t+164>>2]|0)&&(e[c+12>>2]|0)==(e[t+168>>2]|0)){h=e[8900]|0,e[t+4588>>2]=h+(((e[8901]|0)-h|0)>>>1),y=p;return}for(n=t+4592|0,s=t+4596|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=512?l>>>0>512&&(a=r+512|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,512-l|0),r=e[n>>2]|0),c=t+4588|0,e[c>>2]=r+256,a=t+168|0,o=t+164|0,l=-256;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[h>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==256)break}y=p}function aa(t){t=t|0;var r=0,n=0;e[t>>2]=35912,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function fa(t){t=t|0;var r=0,n=0;if(e[t>>2]=35912,r=e[t+4592>>2]|0,r&&(n=t+4596|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function ua(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,255,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+160>>2]=a|0?a:e[c+4>>2]|0,e[t+164>>2]=l,e[t+168>>2]=s,pa(t),s=0;do e[t+172+(s*12|0)>>2]=4,e[t+172+(s*12|0)+4>>2]=0,E[t+172+(s*12|0)+8>>1]=0,E[t+172+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4552>>2]=4,e[t+4556>>2]=0,d[t+4560>>0]=c,d[t+4561>>0]=1,d[t+4562>>0]=0,e[t+4564>>2]=4,e[t+4568>>2]=1,d[t+4572>>0]=c,d[t+4573>>0]=1,d[t+4574>>0]=0,e[t+4576>>2]=0,y=o}function ca(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+16|0,h=g,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[h>>2]=0,e[h+4>>2]=s,c=n+8|0,e[h+8>>2]=e[c>>2],s){r=G0(4600)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35688,o=r+132|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+148>>2]=e[s>>2],e[r+152>>2]=0,e[r+156>>2]=0,e[r+160>>2]=0,o=r+4544|0,s=r+164|0;do e[s>>2]=0,e[s+4>>2]=0,E[s+8>>1]=0,E[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,d[o+10>>0]=0,a=r+4556|0,e[a>>2]=0,e[a+4>>2]=0,E[a+8>>1]=0,d[a+10>>0]=0,a=r+4568|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,h)}return h=t+100|0,e[h>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(p=r+4e3|0,(s|0)!=(p|0))&&(e[c>>2]=p,s=p):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,c2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],c2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0)}function ha(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(k=t+8|0,B=t+36|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(44,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(45,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(46,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(47,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0)}function c2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;V=y,y=y+32|0,_=V+12|0,B=V,I=t+156|0,k=(e[I>>2]|0)+4|0,(e[t+32>>2]|0)==1?U=e[t+24>>2]|0:U=1,r=W(U<<1,k)|0,e[_>>2]=0,F=_+4|0,e[F>>2]=0,e[_+8>>2]=0;e:do if(r){if(r>>>0>1431655765&&(f=0,n0(178,_|0),O=f,f=0,O&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r*3|0)|0,O=f,f=0,!(O&1))){for(e[F>>2]=n,e[_>>2]=n,e[_+8>>2]=n+(r*3|0);;)if(d[n>>0]=0,d[n+1>>0]=0,d[n+2>>0]=0,n=(e[F>>2]|0)+3|0,e[F>>2]=n,r=r+-1|0,!r)break e}s=b()|0,r=e[_>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),r0(s|0)}while(!1);e[B>>2]=0,O=B+4|0,e[O>>2]=0,e[B+8>>2]=0;do if(!U)l=19;else{if(U>>>0>1073741823&&(f=0,n0(178,B|0),C=f,f=0,C&1)||(l=17),(l|0)==17&&(s=U<<2,f=0,o=u0(67,s|0)|0,C=f,f=0,!(C&1))){e[B>>2]=o,l=o+(U<<2)|0,e[B+8>>2]=l,je(o|0,0,s|0)|0,e[O>>2]=l,l=19;break}s=b()|0,r=e[B>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((l|0)==19){o=t+12|0;e:do if((e[o>>2]|0)>0){l=t+4580|0,a=(W(U,k)|0)+1|0,c=t+4584|0,h=t+92|0,p=(U|0)>0,g=t+4576|0,C=0;i:for(;;){if(s=e[_>>2]|0,r=s+3|0,e[l>>2]=r,n=s+(a*3|0)|0,e[c>>2]=n,C&1?(e[l>>2]=n,e[c>>2]=r,r=1):r=a,n=e[h>>2]|0,f=0,P0(e[(e[n>>2]|0)+12>>2]|0,n|0,s+(r*3|0)|0,e[I>>2]|0,k|0),s=f,f=0,s&1){l=29;break}if(p){r=e[B>>2]|0,n=e[l>>2]|0,s=0;do{if(e[g>>2]=e[r+(s<<2)>>2],M=e[I>>2]|0,r=n+(M*3|0)|0,n=n+((M+-1|0)*3|0)|0,d[r>>0]=d[n>>0]|0,d[r+1>>0]=d[n+1>>0]|0,d[r+2>>0]=d[n+2>>0]|0,r=e[l>>2]|0,n=(e[c>>2]|0)+-3|0,d[n>>0]=d[r>>0]|0,d[n+1>>0]=d[r+1>>0]|0,d[n+2>>0]=d[r+2>>0]|0,f=0,h0(74,t|0,0),n=f,f=0,n&1){l=28;break i}r=e[B>>2]|0,e[r+(s<<2)>>2]=e[g>>2],n=(e[l>>2]|0)+(k*3|0)|0,e[l>>2]=n,e[c>>2]=(e[c>>2]|0)+(k*3|0),s=s+1|0}while((s|0)<(U|0))}if(C=C+1|0,(C|0)>=(e[o>>2]|0)){l=41;break e}}if((l|0)==28){s=b()|0;break}else if((l|0)==29){s=b()|0;break}}else l=41;while(!1);do if((l|0)==41){if(f=0,n0(182,t|0),M=f,f=0,M&1){s=b()|0;break}if(r=e[B>>2]|0,n=r,r&&(s=e[O>>2]|0,(s|0)!=(r|0)&&(e[O>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[_>>2]|0,!r){y=V;return}n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),y=V;return}while(!1);r=e[B>>2]|0,n=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[_>>2]|0,r||r0(s|0),n=e[F>>2]|0,(n|0)!=(r|0)&&(e[F>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),r0(s|0)}function ma(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0;if(t0=t+156|0,!((e[t0>>2]|0)<=0))for(Z=t+4584|0,s0=t+4580|0,w0=t+4588|0,K=0;F=K+-1|0,l=e[Z>>2]|0,a=e[s0>>2]|0,r=K+1|0,o=N[a+(K*3|0)>>0]|0,X=e[w0>>2]|0,c=N[a+(F*3|0)>>0]|0,h=o-c|0,p=N[l+(F*3|0)>>0]|0,g=c-p|0,C=((((d[X+((N[a+(r*3|0)>>0]|0)-o)>>0]|0)*9|0)+(d[X+h>>0]|0)|0)*9|0)+(d[X+g>>0]|0)|0,s=N[a+(K*3|0)+1>>0]|0,I=N[a+(F*3|0)+1>>0]|0,k=s-I|0,U=N[l+(F*3|0)+1>>0]|0,B=I-U|0,V=((((d[X+((N[a+(r*3|0)+1>>0]|0)-s)>>0]|0)*9|0)+(d[X+k>>0]|0)|0)*9|0)+(d[X+B>>0]|0)|0,n=N[a+(K*3|0)+2>>0]|0,O=N[a+(F*3|0)+2>>0]|0,_=n-O|0,F=N[l+(F*3|0)+2>>0]|0,M=O-F|0,X=((((d[X+((N[a+(r*3|0)+2>>0]|0)-n)>>0]|0)*9|0)+(d[X+_>>0]|0)|0)*9|0)+(d[X+M>>0]|0)|0,V|C|X?(a=N[l+(K*3|0)>>0]|0,l=o-p>>31,(l^g|0)>=0&&((l^h|0)<0?o=p:o=p-c+o|0),a=Wr(t,C,a,o,0)|0,l=N[(e[Z>>2]|0)+(K*3|0)+1>>0]|0,o=s-U>>31,(o^B|0)>=0&&((o^k|0)<0?s=U:s=U-I+s|0),o=Wr(t,V,l,s,0)|0,l=N[(e[Z>>2]|0)+(K*3|0)+2>>0]|0,s=n-F>>31,(s^M|0)>=0&&((s^_|0)<0?n=F:n=F-O+n|0),X=Wr(t,X,l,n,0)|0,K=(e[Z>>2]|0)+(K*3|0)|0,d[K>>0]=a,d[K+1>>0]=o,d[K+2>>0]=X):r=(da(t,K,0)|0)+K|0,(r|0)<(e[t0>>2]|0);)K=r}function da(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0;for(p=(e[t+156>>2]|0)-r|0,g=e[t+4584>>2]|0,C=e[t+4580>>2]|0,h=g+((r+-1|0)*3|0)|0,I=d[h>>0]|0,c=d[h+1>>0]|0,h=d[h+2>>0]|0,l=0;n=g+((l+r|0)*3|0)|0,s=n+1|0,o=n+2|0,!!(((d[n>>0]|0)==I<<24>>24?(d[s>>0]|0)==c<<24>>24:0)&(d[o>>0]|0)==h<<24>>24);)if(d[n>>0]=I,d[s>>0]=c,d[o>>0]=h,l=l+1|0,(l|0)==(p|0)){l=p;break}if(o=(l|0)==(p|0),a=t+4576|0,s=e[36476+(e[a>>2]<<2)>>2]|0,(1<(l|0))n=l;else{n=l;do xe(t,1,1),s=e[a>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[a>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>0]|0,r=p+2|0,o=d[r>>0]|0,C=C+(s*3|0)|0,s=d[C+1>>0]|0,V=d[C+2>>0]|0,C=N[C>>0]|0,k=C-(I&255)>>31|1,U=(W((N[p>>0]|0)-C<<24,k)|0)>>24,B=t+4552|0,Zr(t,B,U),I=s&255,s=I-(c&255)>>31|1,n=(W((n&255)-I<<24,s)|0)>>24,Zr(t,B,n),c=V&255,h=c-(h&255)>>31|1,o=(W((o&255)-c<<24,h)|0)>>24,Zr(t,B,o),C=(W(U,k)|0)+C&255,I=(W(n,s)|0)+I&255,t=(W(o,h)|0)+c&255,d[p>>0]=C,d[g>>0]=I,d[r>>0]=t,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,t=l+1|0,t|0)}function Wr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(U=r>>31,h=(U^r)-U|0,k=t+172+(h*12|0)+10|0,a=E[k>>1]|0,I=t+172+(h*12|0)|0,o=e[I>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(l=5;(a<>1]^U)-U+s|0,(o&255|0)==(o|0)?g=o:g=o>>31&255^255,c=(n-g^U)-U<<24,p=c>>24,l?o=0:o=(e[t+172+(h*12|0)+4>>2]<<1)+-1+a>>31,o=o^p,o=o>>30^o<<1,s=o>>l,(s|0)<23?(xe(t,1,s+1|0),xe(t,o&(1<>1]|0,o=a<<16>>16==64,l=o&1,n=(e[s>>2]|0)+p>>l,a=o?32:a<<16>>16,e[I>>2]=(e[I>>2]|0)+((c|0)>-16777216?p:0-p|0)>>l,l=a+1|0,E[k>>1]=l,o=l+n|0,(o|0)<1?(k=E[C>>1]|0,E[C>>1]=(k&65535)-(k<<16>>16>-128&1),k=(o|0)>(~a|0)?o:0-a|0,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&255,r|0):(n|0)<=0?(k=n,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&255,r|0):(k=n-l|0,I=E[C>>1]|0,E[C>>1]=(I<<16>>16<127&1)+(I&65535),k=(k|0)>0?0:k,e[s>>2]=k,U=p^U,r=r>>>31,r=g+r|0,r=r+U|0,r=r&255,r|0)}function Zr(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=r+9|0,a=N[g>>0]|0,p=r+4|0,h=e[p>>2]|0,o=(W(a>>>1,h)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-h+(s<<31>>31)|0,ga(t,o,s,31-(e[36476+(e[t+4576>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[p>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[g>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[g>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r}function ga(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(o=n>>r,l=s+-8|0,(o|0)<(s+-9|0)){(o|0)>30&&(s=(o|0)/2|0,xe(t,0,s),o=o-s|0),xe(t,1,o+1|0),xe(t,(1<31?(xe(t,0,31),xe(t,1,s+-39|0)):xe(t,1,l),xe(t,n+255&255,8)}function pa(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=y,y=y+32|0,c=p,hi(c,255,0),h=t+160|0,(e[c+4>>2]|0)==(e[h>>2]|0)&&(e[c+8>>2]|0)==(e[t+164>>2]|0)&&(e[c+12>>2]|0)==(e[t+168>>2]|0)){h=e[8900]|0,e[t+4588>>2]=h+(((e[8901]|0)-h|0)>>>1),y=p;return}for(n=t+4592|0,s=t+4596|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=512?l>>>0>512&&(a=r+512|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,512-l|0),r=e[n>>2]|0),c=t+4588|0,e[c>>2]=r+256,a=t+168|0,o=t+164|0,l=-256;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[h>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==256)break}y=p}function Aa(t){t=t|0;var r=0,n=0;e[t>>2]=35884,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),t=t+4|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Sa(t){t=t|0;var r=0,n=0;if(e[t>>2]=35884,r=e[t+4616>>2]|0,r&&(n=t+4620|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36612,r=e[t+120>>2]|0,r&&(n=t+124|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+92|0,r=e[n>>2]|0,e[n>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),n=t+4|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function va(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;a=y,y=y+32|0,h=a,hi(h,e[t+136>>2]|0,e[t+144>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[h+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[h+12>>2]|0,n=e[r+16>>2]|0,s=e[h+16>>2]|0,e[t+184>>2]=c|0?c:e[h+4>>2]|0,e[t+188>>2]=l,e[t+192>>2]=o,Da(t),o=t+140|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+196+(l*12|0)>>2]=r,e[t+196+(l*12|0)+4>>2]=0,E[t+196+(l*12|0)+8>>1]=0,E[t+196+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,h=(n|0?n:s)&255,e[t+4576>>2]=c,e[t+4580>>2]=0,d[t+4584>>0]=h,d[t+4585>>0]=1,d[t+4586>>0]=0,e[t+4588>>2]=c,e[t+4592>>2]=1,d[t+4596>>0]=h,d[t+4597>>0]=1,d[t+4598>>0]=0,e[t+4600>>2]=0,y=a}function wa(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=y,y=y+16|0,h=g,c=t+92|0,a=e[r>>2]|0,e[r>>2]=0,r=e[c>>2]|0,e[c>>2]=a,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),e[h>>2]=0,e[h+4>>2]=s,c=n+8|0,e[h+8>>2]=e[c>>2],s){r=G0(4624)|0,s=t+8|0,o=r+4|0,l=s,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));o=r+88|0,a=o+40|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));e[r>>2]=35660,e[r+128>>2]=e[t+136>>2],e[r+132>>2]=e[t+140>>2],e[r+136>>2]=e[t+144>>2],e[r+140>>2]=e[t+148>>2],e[r+144>>2]=e[t+152>>2],e[r+148>>2]=e[t+156>>2],e[r+152>>2]=e[t+160>>2],o=r+156|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[r+172>>2]=e[s>>2],e[r+176>>2]=0,e[r+180>>2]=0,e[r+184>>2]=0,o=r+4568|0,s=r+188|0;do e[s>>2]=0,e[s+4>>2]=0,E[s+8>>1]=0,E[s+10>>1]=1,s=s+12|0;while((s|0)!=(o|0));l=t+4|0,e[o>>2]=0,e[o+4>>2]=0,E[o+8>>1]=0,d[o+10>>0]=0,a=r+4580|0,e[a>>2]=0,e[a+4>>2]=0,E[a+8>>1]=0,d[a+10>>0]=0,a=r+4592|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[a+16>>2]=0,e[a+20>>2]=0,e[a+24>>2]=0,d[a+28>>0]=0,e[r+28>>2]|0||(e[r+20>>2]=1),s=e[l>>2]|0,e[l>>2]=r,s&&(Ce[e[(e[s>>2]|0)+4>>2]&255](s),r=e[l>>2]|0),Hi(r,h)}return h=t+100|0,e[h>>2]=32,e[t+96>>2]=0,r=e[n>>2]|0,r?(e[t+132>>2]=r,o=t+120|0,c=t+124|0,s=e[c>>2]|0,r=e[o>>2]|0,l=r,a=s-l|0,a>>>0>=4e3?a>>>0>4e3&&(p=r+4e3|0,(s|0)!=(p|0))&&(e[c>>2]=p,s=p):(St(o,4e3-a|0),r=e[o>>2]|0,l=r,s=e[c>>2]|0),e[t+108>>2]=l,e[t+104>>2]=s-r,h2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0):(e[t+108>>2]=e[n+4>>2],e[t+104>>2]=e[c>>2],h2(t),p=t+116|0,p=e[p>>2]|0,t=e[h>>2]|0,t=t+-32|0,t=(t|0)/8|0,t=p-t|0,y=g,t|0)}function Ta(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+32>>2]|0&&(e[t+24>>2]|0)!=1){if(k=t+8|0,B=t+36|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(44,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+16>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(45,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(46,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(47,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+20>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0)}function h2(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0;V=y,y=y+32|0,_=V+12|0,B=V,k=t+180|0,U=(e[k>>2]|0)+4|0,(e[t+32>>2]|0)==1?C=e[t+24>>2]|0:C=1,r=W(C<<1,U)|0,e[_>>2]=0,F=_+4|0,e[F>>2]=0,e[_+8>>2]=0;e:do if(r){if((r|0)<0&&(f=0,n0(178,_|0),O=f,f=0,O&1)||(I=6),(I|0)==6&&(f=0,n=u0(67,r|0)|0,O=f,f=0,!(O&1))){for(e[F>>2]=n,e[_>>2]=n,e[_+8>>2]=n+r;;)if(d[n>>0]=0,n=(e[F>>2]|0)+1|0,e[F>>2]=n,r=r+-1|0,!r)break e}n=b()|0,r=e[_>>2]|0,r||r0(n|0),(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),a0(r),r0(n|0)}while(!1);e[B>>2]=0,O=B+4|0,e[O>>2]=0,e[B+8>>2]=0;do if(!C)I=19;else{if(C>>>0>1073741823&&(f=0,n0(178,B|0),g=f,f=0,g&1)||(I=17),(I|0)==17&&(s=C<<2,f=0,o=u0(67,s|0)|0,g=f,f=0,!(g&1))){e[B>>2]=o,I=o+(C<<2)|0,e[B+8>>2]=I,je(o|0,0,s|0)|0,e[O>>2]=I,I=19;break}n=b()|0,r=e[B>>2]|0,s=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-s|0)>>>2)<<2)),a0(r))}while(!1);if((I|0)==19){a=t+12|0;e:do if((e[a>>2]|0)>0){if(c=t+4604|0,h=(W(C,U)|0)+1|0,p=t+4608|0,g=t+92|0,l=t+4600|0,(C|0)>0)o=0;else{for(s=0;n=e[_>>2]|0,r=n+1|0,e[c>>2]=r,n=n+h|0,e[p>>2]=n,s&1?(e[c>>2]=n,e[p>>2]=r):r=n,C=e[g>>2]|0,f=0,P0(e[(e[C>>2]|0)+12>>2]|0,C|0,r|0,e[k>>2]|0,U|0),C=f,f=0,!(C&1);)if(s=s+1|0,(s|0)>=(e[a>>2]|0)){I=45;break e}n=b()|0;break}i:for(;;){if(n=e[_>>2]|0,r=n+1|0,e[c>>2]=r,n=n+h|0,e[p>>2]=n,o&1?(e[c>>2]=n,e[p>>2]=r):r=n,I=e[g>>2]|0,f=0,P0(e[(e[I>>2]|0)+12>>2]|0,I|0,r|0,e[k>>2]|0,U|0),I=f,f=0,I&1){I=28;break}r=e[B>>2]|0,n=e[c>>2]|0,s=0;do{if(e[l>>2]=e[r+(s<<2)>>2],I=e[k>>2]|0,d[n+I>>0]=d[n+(I+-1)>>0]|0,d[(e[p>>2]|0)+-1>>0]=d[e[c>>2]>>0]|0,f=0,h0(75,t|0,0),I=f,f=0,I&1){I=36;break i}r=e[B>>2]|0,e[r+(s<<2)>>2]=e[l>>2],n=(e[c>>2]|0)+U|0,e[c>>2]=n,e[p>>2]=(e[p>>2]|0)+U,s=s+1|0}while((s|0)<(C|0));if(o=o+1|0,(o|0)>=(e[a>>2]|0)){I=45;break e}}if((I|0)==28){n=b()|0;break}else if((I|0)==36){n=b()|0;break}}else I=45;while(!1);do if((I|0)==45){if(f=0,n0(182,t|0),t=f,f=0,t&1){n=b()|0;break}if(r=e[B>>2]|0,n=r,r&&(s=e[O>>2]|0,(s|0)!=(r|0)&&(e[O>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[_>>2]|0,!r){y=V;return}(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),a0(r),y=V;return}while(!1);r=e[B>>2]|0,s=r,r&&(o=e[O>>2]|0,(o|0)!=(r|0)&&(e[O>>2]=o+(~((o+-4-s|0)>>>2)<<2)),a0(r))}r=e[_>>2]|0,r||r0(n|0),(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),a0(r),r0(n|0)}function Ca(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=t+4604|0,r=e[C>>2]|0,U=t+180|0,!((e[U>>2]|0)<=0))for(I=t+4608|0,k=t+4612|0,o=r,l=N[r+-1>>0]|0,r=N[r>>0]|0,g=0;p=e[I>>2]|0,h=N[p+(g+-1)>>0]|0,s=g+1|0,n=N[o+s>>0]|0,c=e[k>>2]|0,a=r-l|0,o=l-h|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-h>>31,(l^o|0)<0?o=r:o=h+((l^a|0)<0?0:a)|0,p=xa(t,c,N[p+g>>0]|0,o,0)|0,d[(e[I>>2]|0)+g>>0]=p):(s=(ya(t,g,0)|0)+g|0,n=e[C>>2]|0,r=N[n+(s+-1)>>0]|0,n=N[n+s>>0]|0),!((s|0)>=(e[U>>2]|0));)o=e[C>>2]|0,l=r,r=n,g=s}function xa(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(B=r>>31,l=(B^r)-B|0,k=t+196+(l*12|0)+10|0,a=E[k>>1]|0,I=t+196+(l*12|0)|0,o=e[I>>2]|0,(a|0)<(o|0))if((a<<1|0)<(o|0))if((a<<2|0)<(o|0))if((a<<3|0)<(o|0))if((a<<4|0)<(o|0))for(r=5;(a<>1]^B)-B+s|0,U=t+136|0,s=e[U>>2]|0,(o&s|0)==(o|0)?p=o:p=s&~(o>>31),o=(n-p^B)-B|0,h=t+144|0,s=e[h>>2]|0,(o|0)>0?o=(o+s|0)/(s<<1|1|0)|0:o=(o-s|0)/(s<<1|1|0)|0,C=t+140|0,c=e[C>>2]|0,n=((o|0)<0?c:0)+o|0,c=n-((n|0)<((c+1|0)/2|0|0)?0:c)|0,l=t+196+(l*12|0)+4|0,s|r?o=0:o=(e[l>>2]<<1)+-1+a>>31,s=o^c,d2(t,r,s>>30^s<<1,e[t+156>>2]|0),s=e[t+160>>2]|0,r=(e[I>>2]|0)+((c|0)>-1?c:0-c|0)|0,o=(e[l>>2]|0)+(W(e[h>>2]<<1|1,c)|0)|0,n=E[k>>1]|0,(n|0)==(s|0)&&(r=r>>1,o=o>>1,n=s>>1),e[I>>2]=r,s=n+1|0,E[k>>1]=s,r=s+o|0,(r|0)>=1?(o|0)>0&&(o=o-s|0,k=E[g>>1]|0,E[g>>1]=(k<<16>>16<127&1)+(k&65535),o=(o|0)>0?0:o):(o=E[g>>1]|0,E[g>>1]=(o&65535)-(o<<16>>16>-128&1),o=(r|0)>(~n|0)?r:0-n|0),e[l>>2]=o,s=e[h>>2]|0,n=s<<1|1,r=(W(n,(c^B)-B|0)|0)+p|0,(r|0)>=(0-s|0)?(o=e[U>>2]|0,(o+s|0)<(r|0)&&(r=r-(W(e[C>>2]|0,n)|0)|0)):(r=(W(e[C>>2]|0,n)|0)+r|0,o=e[U>>2]|0),(r&o|0)==(r|0)?(B=r,B=B&255,B|0):(B=o&~(r>>31),B=B&255,B|0)}function ya(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;for(h=(e[t+180>>2]|0)-r|0,p=e[t+4608>>2]|0,g=e[t+4604>>2]|0,o=d[p+(r+-1)>>0]|0,c=o&255,n=t+144|0,l=0;s=p+(l+r)|0,a=(N[s>>0]|0)-c|0,!((((a|0)>-1?a:0-a|0)|0)>(e[n>>2]|0));)if(d[s>>0]=o,l=l+1|0,(l|0)==(h|0)){l=h;break}if(o=(l|0)==(h|0),a=t+4600|0,s=e[36476+(e[a>>2]<<2)>>2]|0,(1<(l|0))n=l;else{n=l;do xe(t,1,1),s=e[a>>2]|0,n=n-(1<>2])|0,s=(s|0)>30?31:s+1|0,e[a>>2]=s,s=e[36476+(s<<2)>>2]|0;while((n|0)>=(1<>0]|0,c,N[g+h>>0]|0)|0,d[r>>0]=t,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,t=l+1|0,t|0)}function Ia(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;return c=n-s|0,h=t+136|0,a=t+144|0,o=e[a>>2]|0,(((c|0)>-1?c:0-c|0)|0)>(o|0)?(l=s-n>>31|1,r=W(l,r-s|0)|0,(r|0)>0?r=(o+r|0)/(o<<1|1|0)|0:r=(r-o|0)/(o<<1|1|0)|0,c=t+140|0,o=e[c>>2]|0,n=((r|0)<0?o:0)+r|0,o=n-((n|0)<((o+1|0)/2|0|0)?0:o)|0,m2(t,t+4576|0,o),o=W(o,l)|0,l=e[a>>2]|0,a=l<<1|1,o=(W(o,a)|0)+s|0,(o|0)>=(0-l|0)?(r=e[h>>2]|0,(r+l|0)<(o|0)&&(o=o-(W(e[c>>2]|0,a)|0)|0)):(o=(W(e[c>>2]|0,a)|0)+o|0,r=e[h>>2]|0),(o&r|0)==(o|0)?(h=o,h=h&255,h|0):(h=r&~(o>>31),h=h&255,h|0)):(r=r-n|0,(r|0)>0?r=(o+r|0)/(o<<1|1|0)|0:r=(r-o|0)/(o<<1|1|0)|0,c=t+140|0,o=e[c>>2]|0,l=((r|0)<0?o:0)+r|0,o=l-((l|0)<((o+1|0)/2|0|0)?0:o)|0,m2(t,t+4588|0,o),l=e[a>>2]|0,a=l<<1|1,o=(W(a,o)|0)+n|0,(o|0)>=(0-l|0)?(r=e[h>>2]|0,(r+l|0)<(o|0)&&(o=o-(W(e[c>>2]|0,a)|0)|0)):(o=(W(e[c>>2]|0,a)|0)+o|0,r=e[h>>2]|0),(o&r|0)==(o|0)?(h=o,h=h&255,h|0):(h=r&~(o>>31),h=h&255,h|0))}function m2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;if(g=r+9|0,a=N[g>>0]|0,p=r+4|0,h=e[p>>2]|0,o=(W(a>>>1,h)|0)+(e[r>>2]|0)|0,(a|0)<(o|0)){l=a,s=0;do l=l<<1,s=s+1|0;while((l|0)<(o|0));o=s}else o=0;(n|0)>0&(o|0)==0&&N[r+10>>0]<<1>>>0>>0?s=1:c=5;do if((c|0)==5){if(s=(n|0)<0,s&&N[r+10>>0]<<1>>>0>=a>>>0){s=1;break}s=s&(o|0)!=0}while(!1);if(s=(((n|0)>-1?n:0-n|0)<<1)-h+(s<<31>>31)|0,d2(t,o,s,(e[t+156>>2]|0)+-1-(e[36476+(e[t+4600>>2]<<2)>>2]|0)|0),(n|0)<0&&(t=r+10|0,d[t>>0]=(N[t>>0]|0)+1),s=(s+1-(e[p>>2]|0)>>1)+(e[r>>2]|0)|0,e[r>>2]=s,o=d[g>>0]|0,o<<24>>24!=(d[r+8>>0]|0)){r=o,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r;return}e[r>>2]=s>>1,t=(o&255)>>>1,d[g>>0]=t,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=t,r=r&255,r=r+1|0,r=r&255,d[g>>0]=r}function d2(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0;if(o=n>>r,l=t+148|0,a=s-(e[l>>2]|0)|0,(o|0)<(a+-1|0)){(o|0)>30&&(s=(o|0)/2|0,xe(t,0,s),o=o-s|0),xe(t,1,o+1|0),xe(t,(1<31?(xe(t,0,31),xe(t,1,s+-31-(e[l>>2]|0)|0)):xe(t,1,a),r=e[l>>2]|0,xe(t,(1<>2]|0)r=t+152|0;else if(n=e[t+136>>2]|0,r=t+152|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+184>>2]|0))&&(e[s+8>>2]|0)==(e[t+188>>2]|0)&&(e[s+12>>2]|0)==(e[t+192>>2]|0))switch(e[r>>2]|0){case 8:{C=e[8900]|0,e[t+4612>>2]=C+(((e[8901]|0)-C|0)>>>1),y=I;return}case 10:{C=e[8903]|0,e[t+4612>>2]=C+(((e[8904]|0)-C|0)>>>1),y=I;return}case 12:{C=e[8906]|0,e[t+4612>>2]=C+(((e[8907]|0)-C|0)>>>1),y=I;return}case 16:{C=e[8909]|0,e[t+4612>>2]=C+(((e[8910]|0)-C|0)>>>1),y=I;return}default:break e}while(!1);if(g=1<>2],n=t+4616|0,s=g<<1,o=t+4620|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),p=t+4612|0,e[p>>2]=r+g,r=0-g|0,(g|0)<=(r|0)){y=I;return}c=t+192|0,h=t+188|0,a=t+184|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[h>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[C>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[p>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(g|0));y=I}function Ea(t){t=t|0;var r=0,n=0;e[t>>2]=35856,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function ka(t){t=t|0;var r=0,n=0;if(e[t>>2]=35856,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function Fa(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(k=t+4|0,B=t+32|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(37,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(38,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(39,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(40,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function Ma(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;a=y,y=y+32|0,h=a,hi(h,e[t+128>>2]|0,e[t+136>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[h+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[h+12>>2]|0,n=e[r+16>>2]|0,s=e[h+16>>2]|0,e[t+176>>2]=c|0?c:e[h+4>>2]|0,e[t+180>>2]=l,e[t+184>>2]=o,Va(t),o=t+132|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+188+(l*12|0)>>2]=r,e[t+188+(l*12|0)+4>>2]=0,E[t+188+(l*12|0)+8>>1]=0,E[t+188+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,h=(n|0?n:s)&255,e[t+4568>>2]=c,e[t+4572>>2]=0,d[t+4576>>0]=h,d[t+4577>>0]=1,d[t+4578>>0]=0,e[t+4580>>2]=c,e[t+4584>>2]=1,d[t+4588>>0]=h,d[t+4589>>0]=1,d[t+4590>>0]=0,e[t+4592>>2]=0,y=a}function Ra(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4620>>0]=o&1,r=t+156|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),Pa(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function Pa(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;K=y,y=y+32|0,Z=K+12|0,X=K,_=t+172|0,F=(e[_>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[Z>>2]=0,s0=Z+4|0,e[s0>>2]=0,e[Z+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,Z|0),t0=f,f=0,t0&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,t0=f,f=0,!(t0&1))){e[Z>>2]=s,t0=s+(r<<1)|0,e[Z+8>>2]=t0,je(s|0,0,n|0)|0,e[s0>>2]=t0;break}s=b()|0,r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)a=18;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(a=16),(a|0)==16&&(o=M<<2,f=0,l=u0(67,o|0)|0,O=f,f=0,!(O&1))){e[X>>2]=l,a=l+(M<<2)|0,e[X+8>>2]=a,je(l|0,0,o|0)|0,e[t0>>2]=a,a=18;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((a|0)==18){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4596|0,c=W(M,F)|0,h=c+1|0,p=t+4600|0,g=(M|0)>0,C=t+160|0,I=t+168|0,k=t+164|0,U=t+156|0,B=t+88|0,V=t+4592|0,O=0;i:for(;;){if(s=e[Z>>2]|0,n=s+2|0,e[a>>2]=n,s=s+(h<<1)|0,e[p>>2]=s,O&1?(e[a>>2]=s,e[p>>2]=n,r=n,n=s):r=s,g){o=e[X>>2]|0,s=0;do{if(e[V>>2]=e[o+(s<<2)>>2],o=e[_>>2]|0,E[n+(o<<1)>>1]=E[n+(o+-1<<1)>>1]|0,E[r+-2>>1]=E[n>>1]|0,f=0,h0(76,t|0,0),o=f,f=0,o&1){a=29;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[V>>2],n=(e[a>>2]|0)+(F<<1)|0,e[a>>2]=n,r=(e[p>>2]|0)+(F<<1)|0,e[p>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[C>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[I>>2]|0)+o|0)&&(o=e[B>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+((e[U>>2]|0)-c<<1)|0,e[k>>2]|0,F|0),o=f,f=0,o&1)){a=30;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){a=42;break e}}if((a|0)==29){s=b()|0;break}else if((a|0)==30){s=b()|0;break}}else a=42;while(!1);do if((a|0)==42){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[Z>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}function La(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0;if(I=t+4596|0,n=e[I>>2]|0,V=t+172|0,r=e[V>>2]|0,!((r|0)<=0))for(k=t+4600|0,U=t+4604|0,B=t+4592|0,c=n,l=q[n+-2>>1]|0,n=q[n>>1]|0,C=0;p=e[k>>2]|0,a=E[p+(C+-1<<1)>>1]|0,g=a&65535,o=C+1|0,s=q[c+(o<<1)>>1]|0,h=e[U>>2]|0,c=n-l|0,l=l-g|0,h=((((d[h+(s-n)>>0]|0)*9|0)+(d[h+c>>0]|0)|0)*9|0)+(d[h+l>>0]|0)|0,p=p+(C<<1)|0,h?(r=n-g>>31,(r^l|0)<0?r=n:r=g+((r^c|0)<0?0:c)|0,g=Oa(t,h,q[p>>1]|0,r,0)|0,E[(e[k>>2]|0)+(C<<1)>>1]=g):(r=Na(t,a,p,r-C|0)|0,n=r+C|0,(n|0)!=(e[V>>2]|0)&&(g=Ba(t,g,q[(e[I>>2]|0)+(n<<1)>>1]|0)|0,E[(e[k>>2]|0)+(n<<1)>>1]=g,g=e[B>>2]|0,e[B>>2]=(g|0)<1?0:g+-1|0,r=r+1|0),o=r+C|0,s=e[I>>2]|0,n=q[s+(o+-1<<1)>>1]|0,s=q[s+(o<<1)>>1]|0),r=e[V>>2]|0,!((r|0)<=(o|0));)c=e[I>>2]|0,l=n,n=s,C=o}function Ua(t){t=t|0;var r=0,n=0,s=0,o=0;s=t+116|0,n=e[s>>2]|0,(d[n>>0]|0)!=-1?(o=t+112|0,r=e[o>>2]|0,(r|0)<1&&(_i(t),r=e[o>>2]|0,n=e[s>>2]|0),t=t+108|0,s=e[t>>2]|0,e[o>>2]=r+-1,r=s<<1,e[t>>2]=r,(d[n>>0]|0)!=-1&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,6,35648),t=f,f=0,t&1||Be(r|0,824,96),t=b()|0,ge(r|0),r0(t|0))):r=e[t+108>>2]|0,r&&(r=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,r|0,6,35648),t=f,f=0,t&1||Be(r|0,824,96),t=b()|0,ge(r|0),r0(t|0))}function Oa(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(U=r>>31,h=(U^r)-U|0,I=t+188+(h*12|0)+10|0,n=E[I>>1]|0,C=t+188+(h*12|0)|0,o=e[C>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(r=5;(n<>1]^U)-U+s|0,k=t+128|0,o=e[k>>2]|0,(n&o|0)==(n|0)?p=n:p=o&~(n>>31),n=t+112|0,(e[n>>2]|0)<8&&_i(t),o=t+108|0,s=e[o>>2]|0,l=s>>>24,a=e[2832+(r<<11)+(l<<3)+4>>2]|0,a?(e[n>>2]=(e[n>>2]|0)-a,e[o>>2]=s<>2]|0):(c=e[t+148>>2]|0,o=e[t+140>>2]|0,n=ji(t)|0,(n|0)<(c+-1-o|0)?r&&(n=(ni(t,r)|0)+(n<>31^n>>1,(((n|0)>-1?n:0-n|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),t=f,f=0,t&1?(t=b()|0,ge(n|0),r0(t|0)):Be(n|0,824,96))),c=t+136|0,s=e[c>>2]|0,r?a=n:(s?o=0:o=(e[t+188+(h*12|0)+4>>2]<<1)+-1+(E[I>>1]|0)>>31,a=o^n),r=e[t+152>>2]|0,o=(e[C>>2]|0)+((a|0)>-1?a:0-a|0)|0,l=t+188+(h*12|0)+4|0,n=(e[l>>2]|0)+(W(s<<1|1,a)|0)|0,s=E[I>>1]|0,(s|0)==(r|0)&&(o=o>>1,n=n>>1,s=r>>1),e[C>>2]=o,r=s+1|0,E[I>>1]=r,o=r+n|0,(o|0)>=1?(n|0)>0&&(n=n-r|0,I=E[g>>1]|0,E[g>>1]=(I<<16>>16<127&1)+(I&65535),n=(n|0)>0?0:n):(n=E[g>>1]|0,E[g>>1]=(n&65535)-(n<<16>>16>-128&1),n=(o|0)>(~s|0)?o:0-s|0),e[l>>2]=n,r=e[c>>2]|0,s=r<<1|1,o=(W(s,(a^U)-U|0)|0)+p|0,(o|0)>=(0-r|0)?(n=e[k>>2]|0,(n+r|0)<(o|0)&&(o=o-(W(e[t+132>>2]|0,s)|0)|0)):(o=(W(e[t+132>>2]|0,s)|0)+o|0,n=e[k>>2]|0),(o&n|0)==(o|0)?(t=o,t=t&65535,t|0):(t=n&~(o>>31),t=t&65535,t|0)}function Na(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;for(c=t+112|0,h=t+108|0,p=t+4592|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[h>>2]|0,o=o+-1|0,e[c>>2]=o,e[h>>2]=a<<1,(a|0)>=0){g=8;break}if(a=e[p>>2]|0,C=1<>2],I=s-l|0,I=(C|0)<(I|0)?C:I,l=I+l|0,(I|0)==(C|0)&&(e[p>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((g|0)==8&&((l|0)!=(s|0)?(o=e[p>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,5,35648),I=f,f=0,I&1?(I=b()|0,ge(o|0),r0(I|0)):Be(o|0,824,96))):o=s),(o|0)>0)l=0;else return o|0;do E[n+(l<<1)>>1]=r,l=l+1|0;while((l|0)!=(o|0));return o|0}function Ba(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return l=r-n|0,a=t+128|0,s=t+136|0,(((l|0)>-1?l:0-l|0)|0)>(e[s>>2]|0)?(r=W(g2(t,t+4568|0)|0,n-r>>31|1)|0,o=e[s>>2]|0,l=o<<1|1,r=(W(r,l)|0)+n|0,(r|0)>=(0-o|0)?(s=e[a>>2]|0,(s+o|0)<(r|0)&&(r=r-(W(e[t+132>>2]|0,l)|0)|0)):(r=(W(e[t+132>>2]|0,l)|0)+r|0,s=e[a>>2]|0),(r&s|0)==(r|0)?(t=r,t=t&65535,t|0):(t=s&~(r>>31),t=t&65535,t|0)):(n=g2(t,t+4580|0)|0,l=e[s>>2]|0,o=l<<1|1,r=(W(o,n)|0)+r|0,(r|0)>=(0-l|0)?(s=e[a>>2]|0,(s+l|0)<(r|0)&&(r=r-(W(e[t+132>>2]|0,o)|0)|0)):(r=(W(e[t+132>>2]|0,o)|0)+r|0,s=e[a>>2]|0),(r&s|0)==(r|0)?(t=r,t=t&65535,t|0):(t=s&~(r>>31),t=t&65535,t|0))}function g2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=r+9|0,n=N[p>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;a=e[t+148>>2]|0,c=e[36476+(e[t+4592>>2]<<2)>>2]|0,n=e[t+140>>2]|0,o=ji(t)|0;do if((o|0)<(a+-2-c-n|0))if(s){c=(ni(t,s)|0)+(o<>2]|0,o=c+s|0,a=o&1,n=a,l=1,o=(a+o|0)/2|0;break}else{s=e[l>>2]|0,t=s+o|0,n=t&1,t=(n+t|0)/2|0,h=8;break}else o=(ni(t,n)|0)+1|0,a=e[l>>2]|0,t=o+a|0,n=t&1,t=(n+t|0)/2|0,s?(c=o,l=1,o=t,s=a):(s=a,h=8);while(!1);return(h|0)==8&&(c=o,l=N[r+10>>0]<<1>>>0>=(N[p>>0]|0)>>>0,o=t),o=(n|0)!=0^l?o:0-o|0,(o|0)<0&&(h=r+10|0,d[h>>0]=(N[h>>0]|0)+1),n=(c+1-s>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[p>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(r=s,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r,o|0):(e[r>>2]=n>>1,h=(s&255)>>>1,d[p>>0]=h,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=h,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r,o|0)}function ji(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;if(l=t+112|0,(e[l>>2]|0)<16&&_i(t),a=t+108|0,n=e[a>>2]|0,(n|0)>=0){if(n&1073741824)r=1;else if(n&536870912)r=2;else if(n&268435456)r=3;else if(n&134217728)r=4;else if(n&67108864)r=5;else if(n&33554432)r=6;else if(n&16777216)r=7;else if(n&8388608)r=8;else if(n&4194304)r=9;else if(n&2097152)r=10;else if(n&1048576)r=11;else if(n&524288)r=12;else if(n&262144)r=13;else if(n&131072)r=14;else if(o=n>>>12&16,r=o+-1|0,!o){for(r=(e[l>>2]|0)+-15|0,e[l>>2]=r,s=n<<15,e[a>>2]=s,n=r,r=15;(n|0)<1?(_i(t),o=e[a>>2]|0,n=e[l>>2]|0):o=s,n=n+-1|0,e[l>>2]=n,s=o<<1,e[a>>2]=s,!((o|0)<0);)r=r+1|0;return r|0}}else r=0;return t=r+1|0,e[l>>2]=(e[l>>2]|0)-t,e[a>>2]=n<>2]|0,(n|0)<(r|0)&&(_i(t),n=e[s>>2]|0,(n|0)<(r|0)&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),t=f,f=0,t&1?(t=b()|0,ge(n|0),r0(t|0)):Be(n|0,824,96))),o=t+108|0,t=e[o>>2]|0,e[s>>2]=n-r,e[o>>2]=t<>>(32-r|0)|0}function Va(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;I=y,y=y+32|0,s=I,C=t+136|0;e:do if(e[C>>2]|0)r=t+144|0;else if(n=e[t+128>>2]|0,r=t+144|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+176>>2]|0))&&(e[s+8>>2]|0)==(e[t+180>>2]|0)&&(e[s+12>>2]|0)==(e[t+184>>2]|0))switch(e[r>>2]|0){case 8:{C=e[8900]|0,e[t+4604>>2]=C+(((e[8901]|0)-C|0)>>>1),y=I;return}case 10:{C=e[8903]|0,e[t+4604>>2]=C+(((e[8904]|0)-C|0)>>>1),y=I;return}case 12:{C=e[8906]|0,e[t+4604>>2]=C+(((e[8907]|0)-C|0)>>>1),y=I;return}case 16:{C=e[8909]|0,e[t+4604>>2]=C+(((e[8910]|0)-C|0)>>>1),y=I;return}default:break e}while(!1);if(g=1<>2],n=t+4608|0,s=g<<1,o=t+4612|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),p=t+4604|0,e[p>>2]=r+g,r=0-g|0,(g|0)<=(r|0)){y=I;return}c=t+184|0,h=t+180|0,a=t+176|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[h>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[C>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[p>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(g|0));y=I}function qa(t){t=t|0;var r=0,n=0;e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function ba(t){t=t|0;var r=0,n=0;if(e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function Ga(t){t=t|0;var r=0,n=0;e[t>>2]=35828,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Qa(t){t=t|0;var r=0,n=0;if(e[t>>2]=35828,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function za(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(k=t+4|0,B=t+32|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(37,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(38,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(39,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(40,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=6,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=6,e[s+12>>2]=t,M=s,y=O,M|0)}function Ha(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;a=y,y=y+32|0,h=a,hi(h,e[t+128>>2]|0,e[t+136>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[h+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[h+12>>2]|0,n=e[r+16>>2]|0,s=e[h+16>>2]|0,e[t+176>>2]=c|0?c:e[h+4>>2]|0,e[t+180>>2]=l,e[t+184>>2]=o,Za(t),o=t+132|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+188+(l*12|0)>>2]=r,e[t+188+(l*12|0)+4>>2]=0,E[t+188+(l*12|0)+8>>1]=0,E[t+188+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,h=(n|0?n:s)&255,e[t+4568>>2]=c,e[t+4572>>2]=0,d[t+4576>>0]=h,d[t+4577>>0]=1,d[t+4578>>0]=0,e[t+4580>>2]=c,e[t+4584>>2]=1,d[t+4588>>0]=h,d[t+4589>>0]=1,d[t+4590>>0]=0,e[t+4592>>2]=0,y=a}function Ya(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4620>>0]=o&1,r=t+156|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),ja(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function ja(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;K=y,y=y+32|0,Z=K+12|0,X=K,_=t+172|0,F=(e[_>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[Z>>2]=0,s0=Z+4|0,e[s0>>2]=0,e[Z+8>>2]=0;do if(r){if(r>>>0>715827882&&(f=0,n0(178,Z|0),t0=f,f=0,t0&1)||(a=6),(a|0)==6&&(f=0,n=u0(67,r*6|0)|0,t0=f,f=0,!(t0&1))){for(e[s0>>2]=n,e[Z>>2]=n,s=n+(r*6|0)|0,e[Z+8>>2]=s;E[n>>1]=0,E[n+2>>1]=0,E[n+4>>1]=0,r=r+-1|0,r;)n=n+6|0;e[s0>>2]=s;break}s=b()|0,r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),a0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)a=20;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(a=18),(a|0)==18&&(o=M<<2,f=0,l=u0(67,o|0)|0,O=f,f=0,!(O&1))){e[X>>2]=l,a=l+(M<<2)|0,e[X+8>>2]=a,je(l|0,0,o|0)|0,e[t0>>2]=a,a=20;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((a|0)==20){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4596|0,c=W(M,F)|0,h=c+1|0,p=t+4600|0,g=(M|0)>0,C=t+160|0,I=t+168|0,k=t+164|0,U=t+156|0,B=t+88|0,V=t+4592|0,O=0;i:for(;;){if(s=e[Z>>2]|0,n=s+6|0,e[a>>2]=n,s=s+(h*6|0)|0,e[p>>2]=s,O&1?(e[a>>2]=s,e[p>>2]=n,r=n,n=s):r=s,g){o=e[X>>2]|0,s=0;do{if(e[V>>2]=e[o+(s<<2)>>2],r=e[_>>2]|0,o=n+(r*6|0)|0,n=n+((r+-1|0)*6|0)|0,E[o>>1]=E[n>>1]|0,E[o+2>>1]=E[n+2>>1]|0,E[o+4>>1]=E[n+4>>1]|0,o=(e[p>>2]|0)+-6|0,n=e[a>>2]|0,E[o>>1]=E[n>>1]|0,E[o+2>>1]=E[n+2>>1]|0,E[o+4>>1]=E[n+4>>1]|0,f=0,h0(77,t|0,0),o=f,f=0,o&1){a=31;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[V>>2],n=(e[a>>2]|0)+(F*6|0)|0,e[a>>2]=n,r=(e[p>>2]|0)+(F*6|0)|0,e[p>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[C>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[I>>2]|0)+o|0)&&(o=e[B>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+(((e[U>>2]|0)-c|0)*6|0)|0,e[k>>2]|0,F|0),o=f,f=0,o&1)){a=32;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){a=44;break e}}if((a|0)==31){s=b()|0;break}else if((a|0)==32){s=b()|0;break}}else a=44;while(!1);do if((a|0)==44){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[Z>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),a0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-6-r|0)>>>0)/6|0)*6|0)),a0(r),r0(s|0)}function Xa(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,$e=0,We=0,_e=0,le=0;if(_e=y,y=y+32|0,Z=_e+24|0,We=_e+18|0,$e=_e+12|0,s0=_e+6|0,w0=_e,v0=t+172|0,r=e[v0>>2]|0,(r|0)<=0){y=_e;return}for(A0=t+4600|0,Y0=t+4596|0,ze=t+4604|0,Re=t+4592|0,t0=0;s=t0+-1|0,o=e[A0>>2]|0,le=e[Y0>>2]|0,n=t0+1|0,l=q[le+(t0*6|0)>>1]|0,K=e[ze>>2]|0,a=q[le+(s*6|0)>>1]|0,c=l-a|0,h=q[o+(s*6|0)>>1]|0,p=a-h|0,g=((((d[K+((q[le+(n*6|0)>>1]|0)-l)>>0]|0)*9|0)+(d[K+c>>0]|0)|0)*9|0)+(d[K+p>>0]|0)|0,C=q[le+(t0*6|0)+2>>1]|0,I=q[le+(s*6|0)+2>>1]|0,k=C-I|0,U=q[o+(s*6|0)+2>>1]|0,B=I-U|0,V=((((d[K+((q[le+(n*6|0)+2>>1]|0)-C)>>0]|0)*9|0)+(d[K+k>>0]|0)|0)*9|0)+(d[K+B>>0]|0)|0,O=q[le+(t0*6|0)+4>>1]|0,_=q[le+(s*6|0)+4>>1]|0,F=O-_|0,M=q[o+(s*6|0)+4>>1]|0,X=_-M|0,K=((((d[K+((q[le+(n*6|0)+4>>1]|0)-O)>>0]|0)*9|0)+(d[K+F>>0]|0)|0)*9|0)+(d[K+X>>0]|0)|0,V|g|K?(s=q[o+(t0*6|0)>>1]|0,r=l-h>>31,(r^p|0)>=0?(r^c|0)<0?r=h:r=h-a+l|0:r=l,l=Jr(t,g,s,r,0)|0,s=q[(e[A0>>2]|0)+(t0*6|0)+2>>1]|0,r=C-U>>31,(r^B|0)>=0?(r^k|0)<0?r=U:r=U-I+C|0:r=C,s=Jr(t,V,s,r,0)|0,o=q[(e[A0>>2]|0)+(t0*6|0)+4>>1]|0,r=O-M>>31,(r^X|0)>=0?(r^F|0)<0?r=M:r=M-_+O|0:r=O,K=Jr(t,K,o,r,0)|0,le=e[A0>>2]|0,E[le+(t0*6|0)>>1]=l,E[le+(t0*6|0)+2>>1]=s,E[le+(t0*6|0)+4>>1]=K):(n=o+(s*6|0)|0,E[$e>>1]=E[n>>1]|0,E[$e+2>>1]=E[n+2>>1]|0,E[$e+4>>1]=E[n+4>>1]|0,E[Z>>1]=E[n>>1]|0,E[Z+2>>1]=E[n+2>>1]|0,E[Z+4>>1]=E[n+4>>1]|0,r=Ka(t,Z,o+(t0*6|0)|0,r-t0|0)|0,n=r+t0|0,(n|0)!=(e[v0>>2]|0)&&(le=(e[Y0>>2]|0)+(n*6|0)|0,E[w0>>1]=E[le>>1]|0,E[w0+2>>1]=E[le+2>>1]|0,E[w0+4>>1]=E[le+4>>1]|0,le=(e[A0>>2]|0)+(n*6|0)|0,E[We>>1]=E[$e>>1]|0,E[We+2>>1]=E[$e+2>>1]|0,E[We+4>>1]=E[$e+4>>1]|0,E[Z>>1]=E[w0>>1]|0,E[Z+2>>1]=E[w0+2>>1]|0,E[Z+4>>1]=E[w0+4>>1]|0,Wa(s0,t,We,Z),E[le>>1]=E[s0>>1]|0,E[le+2>>1]=E[s0+2>>1]|0,E[le+4>>1]=E[s0+4>>1]|0,le=e[Re>>2]|0,e[Re>>2]=(le|0)<1?0:le+-1|0,r=r+1|0),n=r+t0|0),r=e[v0>>2]|0,!((n|0)>=(r|0));)t0=n;y=_e}function Ka(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;for(c=t+112|0,h=t+108|0,p=t+4592|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[h>>2]|0,o=o+-1|0,e[c>>2]=o,e[h>>2]=a<<1,(a|0)>=0){g=8;break}if(a=e[p>>2]|0,C=1<>2],I=s-l|0,I=(C|0)<(I|0)?C:I,l=I+l|0,(I|0)==(C|0)&&(e[p>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((g|0)==8&&((l|0)!=(s|0)?(o=e[p>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,5,35648),I=f,f=0,I&1?(I=b()|0,ge(o|0),r0(I|0)):Be(o|0,824,96))):o=s),(o|0)<=0)return o|0;l=0;do I=n+(l*6|0)|0,E[I>>1]=E[r>>1]|0,E[I+2>>1]=E[r+2>>1]|0,E[I+4>>1]=E[r+4>>1]|0,l=l+1|0;while((l|0)!=(o|0));return o|0}function Wa(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0;if(h=r+4568|0,C=$r(r,h)|0,a=$r(r,h)|0,h=$r(r,h)|0,l=r+128|0,o=q[s>>1]|0,p=e[r+136>>2]|0,g=p<<1|1,o=(W(W(g,C)|0,o-(q[n>>1]|0)>>31|1)|0)+o|0,C=0-p|0,(o|0)>=(C|0)?(l=e[l>>2]|0,(l+p|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,g)|0)|0)):(o=(W(e[r+132>>2]|0,g)|0)+o|0,l=e[l>>2]|0),(o&l|0)!=(o|0)&&(o=l&~(o>>31)),c=o&65535,o=q[s+2>>1]|0,o=(W(W(g,a)|0,o-(q[n+2>>1]|0)>>31|1)|0)+o|0,(o|0)>=(C|0)?(l+p|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,g)|0)|0):o=(W(e[r+132>>2]|0,g)|0)+o|0,(o&l|0)!=(o|0)&&(o=l&~(o>>31)),a=o&65535,o=q[s+4>>1]|0,o=(W(W(g,h)|0,o-(q[n+4>>1]|0)>>31|1)|0)+o|0,(o|0)>=(C|0)?(l+p|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,g)|0)|0):o=(W(e[r+132>>2]|0,g)|0)+o|0,(o&l|0)==(o|0)){r=o,r=r&65535,E[t>>1]=c,C=t+2|0,E[C>>1]=a,t=t+4|0,E[t>>1]=r;return}r=l&~(o>>31),r=r&65535,E[t>>1]=c,C=t+2|0,E[C>>1]=a,t=t+4|0,E[t>>1]=r}function Jr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(U=r>>31,h=(U^r)-U|0,I=t+188+(h*12|0)+10|0,n=E[I>>1]|0,C=t+188+(h*12|0)|0,o=e[C>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(r=5;(n<>1]^U)-U+s|0,k=t+128|0,o=e[k>>2]|0,(n&o|0)==(n|0)?p=n:p=o&~(n>>31),n=t+112|0,(e[n>>2]|0)<8&&_i(t),o=t+108|0,s=e[o>>2]|0,l=s>>>24,a=e[2832+(r<<11)+(l<<3)+4>>2]|0,a?(e[n>>2]=(e[n>>2]|0)-a,e[o>>2]=s<>2]|0):(c=e[t+148>>2]|0,o=e[t+140>>2]|0,n=ji(t)|0,(n|0)<(c+-1-o|0)?r&&(n=(ni(t,r)|0)+(n<>31^n>>1,(((n|0)>-1?n:0-n|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),t=f,f=0,t&1?(t=b()|0,ge(n|0),r0(t|0)):Be(n|0,824,96))),c=t+136|0,s=e[c>>2]|0,r?a=n:(s?o=0:o=(e[t+188+(h*12|0)+4>>2]<<1)+-1+(E[I>>1]|0)>>31,a=o^n),r=e[t+152>>2]|0,o=(e[C>>2]|0)+((a|0)>-1?a:0-a|0)|0,l=t+188+(h*12|0)+4|0,n=(e[l>>2]|0)+(W(s<<1|1,a)|0)|0,s=E[I>>1]|0,(s|0)==(r|0)&&(o=o>>1,n=n>>1,s=r>>1),e[C>>2]=o,r=s+1|0,E[I>>1]=r,o=r+n|0,(o|0)>=1?(n|0)>0&&(n=n-r|0,I=E[g>>1]|0,E[g>>1]=(I<<16>>16<127&1)+(I&65535),n=(n|0)>0?0:n):(n=E[g>>1]|0,E[g>>1]=(n&65535)-(n<<16>>16>-128&1),n=(o|0)>(~s|0)?o:0-s|0),e[l>>2]=n,r=e[c>>2]|0,s=r<<1|1,o=(W(s,(a^U)-U|0)|0)+p|0,(o|0)>=(0-r|0)?(n=e[k>>2]|0,(n+r|0)<(o|0)&&(o=o-(W(e[t+132>>2]|0,s)|0)|0)):(o=(W(e[t+132>>2]|0,s)|0)+o|0,n=e[k>>2]|0),(o&n|0)==(o|0)?(t=o,t=t&65535,t|0):(t=n&~(o>>31),t=t&65535,t|0)}function $r(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=r+9|0,n=N[p>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;a=e[t+148>>2]|0,c=e[36476+(e[t+4592>>2]<<2)>>2]|0,n=e[t+140>>2]|0,o=ji(t)|0;do if((o|0)<(a+-2-c-n|0))if(s){c=(ni(t,s)|0)+(o<>2]|0,o=c+s|0,a=o&1,n=a,l=1,o=(a+o|0)/2|0;break}else{s=e[l>>2]|0,t=s+o|0,n=t&1,t=(n+t|0)/2|0,h=8;break}else o=(ni(t,n)|0)+1|0,a=e[l>>2]|0,t=o+a|0,n=t&1,t=(n+t|0)/2|0,s?(c=o,l=1,o=t,s=a):(s=a,h=8);while(!1);return(h|0)==8&&(c=o,l=N[r+10>>0]<<1>>>0>=(N[p>>0]|0)>>>0,o=t),o=(n|0)!=0^l?o:0-o|0,(o|0)<0&&(h=r+10|0,d[h>>0]=(N[h>>0]|0)+1),n=(c+1-s>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[p>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(r=s,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r,o|0):(e[r>>2]=n>>1,h=(s&255)>>>1,d[p>>0]=h,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=h,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r,o|0)}function Za(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;I=y,y=y+32|0,s=I,C=t+136|0;e:do if(e[C>>2]|0)r=t+144|0;else if(n=e[t+128>>2]|0,r=t+144|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+176>>2]|0))&&(e[s+8>>2]|0)==(e[t+180>>2]|0)&&(e[s+12>>2]|0)==(e[t+184>>2]|0))switch(e[r>>2]|0){case 8:{C=e[8900]|0,e[t+4604>>2]=C+(((e[8901]|0)-C|0)>>>1),y=I;return}case 10:{C=e[8903]|0,e[t+4604>>2]=C+(((e[8904]|0)-C|0)>>>1),y=I;return}case 12:{C=e[8906]|0,e[t+4604>>2]=C+(((e[8907]|0)-C|0)>>>1),y=I;return}case 16:{C=e[8909]|0,e[t+4604>>2]=C+(((e[8910]|0)-C|0)>>>1),y=I;return}default:break e}while(!1);if(g=1<>2],n=t+4608|0,s=g<<1,o=t+4612|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),p=t+4604|0,e[p>>2]=r+g,r=0-g|0,(g|0)<=(r|0)){y=I;return}c=t+184|0,h=t+180|0,a=t+176|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[h>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[C>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[p>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(g|0));y=I}function Ja(t){t=t|0;var r=0,n=0;e[t>>2]=35800,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function $a(t){t=t|0;var r=0,n=0;if(e[t>>2]=35800,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function ef(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(k=t+4|0,B=t+32|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(44,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(45,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(46,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(47,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0)}function tf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;a=y,y=y+32|0,h=a,hi(h,e[t+128>>2]|0,e[t+136>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[h+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[h+12>>2]|0,n=e[r+16>>2]|0,s=e[h+16>>2]|0,e[t+176>>2]=c|0?c:e[h+4>>2]|0,e[t+180>>2]=l,e[t+184>>2]=o,af(t),o=t+132|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+188+(l*12|0)>>2]=r,e[t+188+(l*12|0)+4>>2]=0,E[t+188+(l*12|0)+8>>1]=0,E[t+188+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,h=(n|0?n:s)&255,e[t+4568>>2]=c,e[t+4572>>2]=0,d[t+4576>>0]=h,d[t+4577>>0]=1,d[t+4578>>0]=0,e[t+4580>>2]=c,e[t+4584>>2]=1,d[t+4588>>0]=h,d[t+4589>>0]=1,d[t+4590>>0]=0,e[t+4592>>2]=0,y=a}function rf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4620>>0]=o&1,r=t+156|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),nf(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function nf(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;K=y,y=y+32|0,Z=K+12|0,X=K,_=t+172|0,F=(e[_>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[Z>>2]=0,s0=Z+4|0,e[s0>>2]=0,e[Z+8>>2]=0;e:do if(r){if(r>>>0>1431655765&&(f=0,n0(178,Z|0),t0=f,f=0,t0&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r*3|0)|0,t0=f,f=0,!(t0&1))){for(e[s0>>2]=n,e[Z>>2]=n,e[Z+8>>2]=n+(r*3|0);;)if(d[n>>0]=0,d[n+1>>0]=0,d[n+2>>0]=0,n=(e[s0>>2]|0)+3|0,e[s0>>2]=n,r=r+-1|0,!r)break e}s=b()|0,r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)l=19;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(l=17),(l|0)==17&&(s=M<<2,f=0,o=u0(67,s|0)|0,O=f,f=0,!(O&1))){e[X>>2]=o,l=o+(M<<2)|0,e[X+8>>2]=l,je(o|0,0,s|0)|0,e[t0>>2]=l,l=19;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((l|0)==19){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4596|0,c=W(M,F)|0,h=c+1|0,p=t+4600|0,g=(M|0)>0,C=t+160|0,I=t+168|0,k=t+164|0,U=t+156|0,B=t+88|0,V=t+4592|0,O=0;i:for(;;){if(s=e[Z>>2]|0,n=s+3|0,e[a>>2]=n,s=s+(h*3|0)|0,e[p>>2]=s,O&1?(e[a>>2]=s,e[p>>2]=n,r=n,n=s):r=s,g){o=e[X>>2]|0,s=0;do{if(e[V>>2]=e[o+(s<<2)>>2],r=e[_>>2]|0,o=n+(r*3|0)|0,n=n+((r+-1|0)*3|0)|0,d[o>>0]=d[n>>0]|0,d[o+1>>0]=d[n+1>>0]|0,d[o+2>>0]=d[n+2>>0]|0,n=e[a>>2]|0,o=(e[p>>2]|0)+-3|0,d[o>>0]=d[n>>0]|0,d[o+1>>0]=d[n+1>>0]|0,d[o+2>>0]=d[n+2>>0]|0,f=0,h0(78,t|0,0),o=f,f=0,o&1){l=30;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[V>>2],n=(e[a>>2]|0)+(F*3|0)|0,e[a>>2]=n,r=(e[p>>2]|0)+(F*3|0)|0,e[p>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[C>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[I>>2]|0)+o|0)&&(o=e[B>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+(((e[U>>2]|0)-c|0)*3|0)|0,e[k>>2]|0,F|0),o=f,f=0,o&1)){l=31;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){l=43;break e}}if((l|0)==30){s=b()|0;break}else if((l|0)==31){s=b()|0;break}}else l=43;while(!1);do if((l|0)==43){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[Z>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),r0(s|0)}function sf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,$e=0,We=0,_e=0,le=0;if(_e=y,y=y+16|0,Z=_e+12|0,We=_e+9|0,$e=_e+6|0,s0=_e+3|0,w0=_e,v0=t+172|0,r=e[v0>>2]|0,(r|0)<=0){y=_e;return}for(A0=t+4600|0,Y0=t+4596|0,ze=t+4604|0,Re=t+4592|0,t0=0;M=t0+-1|0,s=e[A0>>2]|0,o=s+(M*3|0)|0,le=e[Y0>>2]|0,n=t0+1|0,l=N[le+(t0*3|0)>>0]|0,K=e[ze>>2]|0,a=N[le+(M*3|0)>>0]|0,c=l-a|0,h=N[o>>0]|0,p=a-h|0,g=((((d[K+((N[le+(n*3|0)>>0]|0)-l)>>0]|0)*9|0)+(d[K+c>>0]|0)|0)*9|0)+(d[K+p>>0]|0)|0,C=N[le+(t0*3|0)+1>>0]|0,I=N[le+(M*3|0)+1>>0]|0,k=C-I|0,U=N[s+(M*3|0)+1>>0]|0,B=I-U|0,V=((((d[K+((N[le+(n*3|0)+1>>0]|0)-C)>>0]|0)*9|0)+(d[K+k>>0]|0)|0)*9|0)+(d[K+B>>0]|0)|0,O=N[le+(t0*3|0)+2>>0]|0,_=N[le+(M*3|0)+2>>0]|0,F=O-_|0,M=N[s+(M*3|0)+2>>0]|0,X=_-M|0,K=((((d[K+((N[le+(n*3|0)+2>>0]|0)-O)>>0]|0)*9|0)+(d[K+F>>0]|0)|0)*9|0)+(d[K+X>>0]|0)|0,V|g|K?(s=N[s+(t0*3|0)>>0]|0,r=l-h>>31,(r^p|0)>=0?(r^c|0)<0?r=h:r=h-a+l|0:r=l,l=e1(t,g,s,r,0)|0,s=N[(e[A0>>2]|0)+(t0*3|0)+1>>0]|0,r=C-U>>31,(r^B|0)>=0?(r^k|0)<0?r=U:r=U-I+C|0:r=C,s=e1(t,V,s,r,0)|0,o=N[(e[A0>>2]|0)+(t0*3|0)+2>>0]|0,r=O-M>>31,(r^X|0)>=0?(r^F|0)<0?r=M:r=M-_+O|0:r=O,K=e1(t,K,o,r,0)|0,le=(e[A0>>2]|0)+(t0*3|0)|0,d[le>>0]=l,d[le+1>>0]=s,d[le+2>>0]=K):(d[$e>>0]=d[o>>0]|0,d[$e+1>>0]=d[o+1>>0]|0,d[$e+2>>0]=d[o+2>>0]|0,d[Z>>0]=d[o>>0]|0,d[Z+1>>0]=d[o+1>>0]|0,d[Z+2>>0]=d[o+2>>0]|0,r=of(t,Z,s+(t0*3|0)|0,r-t0|0)|0,n=r+t0|0,(n|0)!=(e[v0>>2]|0)&&(le=(e[Y0>>2]|0)+(n*3|0)|0,d[w0>>0]=d[le>>0]|0,d[w0+1>>0]=d[le+1>>0]|0,d[w0+2>>0]=d[le+2>>0]|0,le=e[A0>>2]|0,d[We>>0]=d[$e>>0]|0,d[We+1>>0]=d[$e+1>>0]|0,d[We+2>>0]=d[$e+2>>0]|0,d[Z>>0]=d[w0>>0]|0,d[Z+1>>0]=d[w0+1>>0]|0,d[Z+2>>0]=d[w0+2>>0]|0,lf(s0,t,We,Z),le=le+(n*3|0)|0,d[le>>0]=d[s0>>0]|0,d[le+1>>0]=d[s0+1>>0]|0,d[le+2>>0]=d[s0+2>>0]|0,le=e[Re>>2]|0,e[Re>>2]=(le|0)<1?0:le+-1|0,r=r+1|0),n=r+t0|0),r=e[v0>>2]|0,!((n|0)>=(r|0));)t0=n;y=_e}function of(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;for(c=t+112|0,h=t+108|0,p=t+4592|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[h>>2]|0,o=o+-1|0,e[c>>2]=o,e[h>>2]=a<<1,(a|0)>=0){g=8;break}if(a=e[p>>2]|0,C=1<>2],I=s-l|0,I=(C|0)<(I|0)?C:I,l=I+l|0,(I|0)==(C|0)&&(e[p>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((g|0)==8&&((l|0)!=(s|0)?(o=e[p>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,5,35648),I=f,f=0,I&1?(I=b()|0,ge(o|0),r0(I|0)):Be(o|0,824,96))):o=s),(o|0)<=0)return o|0;l=0;do I=n+(l*3|0)|0,d[I>>0]=d[r>>0]|0,d[I+1>>0]=d[r+1>>0]|0,d[I+2>>0]=d[r+2>>0]|0,l=l+1|0;while((l|0)!=(o|0));return o|0}function lf(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0;if(h=r+4568|0,C=i1(r,h)|0,a=i1(r,h)|0,h=i1(r,h)|0,l=r+128|0,o=N[s>>0]|0,p=e[r+136>>2]|0,g=p<<1|1,o=(W(W(g,C)|0,o-(N[n>>0]|0)>>31|1)|0)+o|0,C=0-p|0,(o|0)>=(C|0)?(l=e[l>>2]|0,(l+p|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,g)|0)|0)):(o=(W(e[r+132>>2]|0,g)|0)+o|0,l=e[l>>2]|0),(o&l|0)!=(o|0)&&(o=l&~(o>>31)),c=o&255,o=N[s+1>>0]|0,o=(W(W(g,a)|0,o-(N[n+1>>0]|0)>>31|1)|0)+o|0,(o|0)>=(C|0)?(l+p|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,g)|0)|0):o=(W(e[r+132>>2]|0,g)|0)+o|0,(o&l|0)!=(o|0)&&(o=l&~(o>>31)),a=o&255,o=N[s+2>>0]|0,o=(W(W(g,h)|0,o-(N[n+2>>0]|0)>>31|1)|0)+o|0,(o|0)>=(C|0)?(l+p|0)<(o|0)&&(o=o-(W(e[r+132>>2]|0,g)|0)|0):o=(W(e[r+132>>2]|0,g)|0)+o|0,(o&l|0)==(o|0)){r=o,r=r&255,d[t>>0]=c,C=t+1|0,d[C>>0]=a,t=t+2|0,d[t>>0]=r;return}r=l&~(o>>31),r=r&255,d[t>>0]=c,C=t+1|0,d[C>>0]=a,t=t+2|0,d[t>>0]=r}function e1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(U=r>>31,h=(U^r)-U|0,I=t+188+(h*12|0)+10|0,n=E[I>>1]|0,C=t+188+(h*12|0)|0,o=e[C>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(r=5;(n<>1]^U)-U+s|0,k=t+128|0,o=e[k>>2]|0,(n&o|0)==(n|0)?p=n:p=o&~(n>>31),n=t+112|0,(e[n>>2]|0)<8&&_i(t),o=t+108|0,s=e[o>>2]|0,l=s>>>24,a=e[2832+(r<<11)+(l<<3)+4>>2]|0,a?(e[n>>2]=(e[n>>2]|0)-a,e[o>>2]=s<>2]|0):(c=e[t+148>>2]|0,o=e[t+140>>2]|0,n=ji(t)|0,(n|0)<(c+-1-o|0)?r&&(n=(ni(t,r)|0)+(n<>31^n>>1,(((n|0)>-1?n:0-n|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),t=f,f=0,t&1?(t=b()|0,ge(n|0),r0(t|0)):Be(n|0,824,96))),c=t+136|0,s=e[c>>2]|0,r?a=n:(s?o=0:o=(e[t+188+(h*12|0)+4>>2]<<1)+-1+(E[I>>1]|0)>>31,a=o^n),r=e[t+152>>2]|0,o=(e[C>>2]|0)+((a|0)>-1?a:0-a|0)|0,l=t+188+(h*12|0)+4|0,n=(e[l>>2]|0)+(W(s<<1|1,a)|0)|0,s=E[I>>1]|0,(s|0)==(r|0)&&(o=o>>1,n=n>>1,s=r>>1),e[C>>2]=o,r=s+1|0,E[I>>1]=r,o=r+n|0,(o|0)>=1?(n|0)>0&&(n=n-r|0,I=E[g>>1]|0,E[g>>1]=(I<<16>>16<127&1)+(I&65535),n=(n|0)>0?0:n):(n=E[g>>1]|0,E[g>>1]=(n&65535)-(n<<16>>16>-128&1),n=(o|0)>(~s|0)?o:0-s|0),e[l>>2]=n,r=e[c>>2]|0,s=r<<1|1,o=(W(s,(a^U)-U|0)|0)+p|0,(o|0)>=(0-r|0)?(n=e[k>>2]|0,(n+r|0)<(o|0)&&(o=o-(W(e[t+132>>2]|0,s)|0)|0)):(o=(W(e[t+132>>2]|0,s)|0)+o|0,n=e[k>>2]|0),(o&n|0)==(o|0)?(t=o,t=t&255,t|0):(t=n&~(o>>31),t=t&255,t|0)}function i1(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=r+9|0,n=N[p>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;a=e[t+148>>2]|0,c=e[36476+(e[t+4592>>2]<<2)>>2]|0,n=e[t+140>>2]|0,o=ji(t)|0;do if((o|0)<(a+-2-c-n|0))if(s){c=(ni(t,s)|0)+(o<>2]|0,o=c+s|0,a=o&1,n=a,l=1,o=(a+o|0)/2|0;break}else{s=e[l>>2]|0,t=s+o|0,n=t&1,t=(n+t|0)/2|0,h=8;break}else o=(ni(t,n)|0)+1|0,a=e[l>>2]|0,t=o+a|0,n=t&1,t=(n+t|0)/2|0,s?(c=o,l=1,o=t,s=a):(s=a,h=8);while(!1);return(h|0)==8&&(c=o,l=N[r+10>>0]<<1>>>0>=(N[p>>0]|0)>>>0,o=t),o=(n|0)!=0^l?o:0-o|0,(o|0)<0&&(h=r+10|0,d[h>>0]=(N[h>>0]|0)+1),n=(c+1-s>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[p>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(r=s,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r,o|0):(e[r>>2]=n>>1,h=(s&255)>>>1,d[p>>0]=h,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=h,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r,o|0)}function af(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;I=y,y=y+32|0,s=I,C=t+136|0;e:do if(e[C>>2]|0)r=t+144|0;else if(n=e[t+128>>2]|0,r=t+144|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+176>>2]|0))&&(e[s+8>>2]|0)==(e[t+180>>2]|0)&&(e[s+12>>2]|0)==(e[t+184>>2]|0))switch(e[r>>2]|0){case 8:{C=e[8900]|0,e[t+4604>>2]=C+(((e[8901]|0)-C|0)>>>1),y=I;return}case 10:{C=e[8903]|0,e[t+4604>>2]=C+(((e[8904]|0)-C|0)>>>1),y=I;return}case 12:{C=e[8906]|0,e[t+4604>>2]=C+(((e[8907]|0)-C|0)>>>1),y=I;return}case 16:{C=e[8909]|0,e[t+4604>>2]=C+(((e[8910]|0)-C|0)>>>1),y=I;return}default:break e}while(!1);if(g=1<>2],n=t+4608|0,s=g<<1,o=t+4612|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),p=t+4604|0,e[p>>2]=r+g,r=0-g|0,(g|0)<=(r|0)){y=I;return}c=t+184|0,h=t+180|0,a=t+176|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[h>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[C>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[p>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(g|0));y=I}function ff(t){t=t|0;var r=0,n=0;e[t>>2]=35772,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function uf(t){t=t|0;var r=0,n=0;if(e[t>>2]=35772,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function cf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(k=t+4|0,B=t+32|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(37,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(38,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(39,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(40,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function hf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,65535,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+152>>2]=a|0?a:e[c+4>>2]|0,e[t+156>>2]=l,e[t+160>>2]=s,vf(t),s=0;do e[t+164+(s*12|0)>>2]=1024,e[t+164+(s*12|0)+4>>2]=0,E[t+164+(s*12|0)+8>>1]=0,E[t+164+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4544>>2]=1024,e[t+4548>>2]=0,d[t+4552>>0]=c,d[t+4553>>0]=1,d[t+4554>>0]=0,e[t+4556>>2]=1024,e[t+4560>>2]=1,d[t+4564>>0]=c,d[t+4565>>0]=1,d[t+4566>>0]=0,e[t+4568>>2]=0,y=o}function mf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4596>>0]=o&1,r=t+132|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),df(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function df(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;K=y,y=y+32|0,Z=K+12|0,X=K,_=t+148|0,F=(e[_>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[Z>>2]=0,s0=Z+4|0,e[s0>>2]=0,e[Z+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,Z|0),t0=f,f=0,t0&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,t0=f,f=0,!(t0&1))){e[Z>>2]=s,t0=s+(r<<1)|0,e[Z+8>>2]=t0,je(s|0,0,n|0)|0,e[s0>>2]=t0;break}s=b()|0,r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)a=18;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(a=16),(a|0)==16&&(o=M<<2,f=0,l=u0(67,o|0)|0,O=f,f=0,!(O&1))){e[X>>2]=l,a=l+(M<<2)|0,e[X+8>>2]=a,je(l|0,0,o|0)|0,e[t0>>2]=a,a=18;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((a|0)==18){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4572|0,c=W(M,F)|0,h=c+1|0,p=t+4576|0,g=(M|0)>0,C=t+136|0,I=t+144|0,k=t+140|0,U=t+132|0,B=t+88|0,V=t+4568|0,O=0;i:for(;;){if(s=e[Z>>2]|0,n=s+2|0,e[a>>2]=n,s=s+(h<<1)|0,e[p>>2]=s,O&1?(e[a>>2]=s,e[p>>2]=n,r=n,n=s):r=s,g){o=e[X>>2]|0,s=0;do{if(e[V>>2]=e[o+(s<<2)>>2],o=e[_>>2]|0,E[n+(o<<1)>>1]=E[n+(o+-1<<1)>>1]|0,E[r+-2>>1]=E[n>>1]|0,f=0,h0(79,t|0,0),o=f,f=0,o&1){a=29;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[V>>2],n=(e[a>>2]|0)+(F<<1)|0,e[a>>2]=n,r=(e[p>>2]|0)+(F<<1)|0,e[p>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[C>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[I>>2]|0)+o|0)&&(o=e[B>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+((e[U>>2]|0)-c<<1)|0,e[k>>2]|0,F|0),o=f,f=0,o&1)){a=30;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){a=42;break e}}if((a|0)==29){s=b()|0;break}else if((a|0)==30){s=b()|0;break}}else a=42;while(!1);do if((a|0)==42){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[Z>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}function gf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=t+4572|0,r=e[C>>2]|0,U=t+148|0,!((e[U>>2]|0)<=0))for(I=t+4576|0,k=t+4580|0,o=r,l=q[r+-2>>1]|0,r=q[r>>1]|0,g=0;p=e[I>>2]|0,h=q[p+(g+-1<<1)>>1]|0,s=g+1|0,n=q[o+(s<<1)>>1]|0,c=e[k>>2]|0,a=r-l|0,o=l-h|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-h>>31,(l^o|0)<0?o=r:o=h+((l^a|0)<0?0:a)|0,p=pf(t,c,q[p+(g<<1)>>1]|0,o,0)|0,E[(e[I>>2]|0)+(g<<1)>>1]=p):(s=(Af(t,g,0)|0)+g|0,n=e[C>>2]|0,r=q[n+(s+-1<<1)>>1]|0,n=q[n+(s<<1)>>1]|0),!((s|0)>=(e[U>>2]|0));)o=e[C>>2]|0,l=r,r=n,g=s}function pf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(k=r>>31,p=(k^r)-k|0,I=t+164+(p*12|0)+10|0,n=E[I>>1]|0,C=t+164+(p*12|0)|0,o=e[C>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(l=5;(n<>1]^k)-k+s|0,(n&65535|0)!=(n|0)&&(n=n>>31&65535^65535),o=t+112|0,(e[o>>2]|0)<8&&_i(t),s=t+108|0,a=e[s>>2]|0,c=a>>>24,h=e[2832+(l<<11)+(c<<3)+4>>2]|0,h?(e[o>>2]=(e[o>>2]|0)-h,e[s>>2]=a<>2]|0):(o=ji(t)|0,(o|0)<47?l&&(o=(ni(t,l)|0)+(o<>31^o>>1,(((o|0)>-1?o:0-o|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),r=f,f=0,r&1?(r=b()|0,ge(n|0),r0(r|0)):Be(n|0,824,96))),h=t+164+(p*12|0)+4|0,s=e[h>>2]|0,l?l=E[I>>1]|0:(t=E[I>>1]|0,l=t,o=(s<<1)+-1+(t<<16>>16)>>31^o),a=l<<16>>16==64,t=a&1,c=s+o>>t,a=a?32:l<<16>>16,e[C>>2]=((o|0)>-1?o:0-o|0)+(e[C>>2]|0)>>t,s=a+1|0,E[I>>1]=s,l=s+c|0,(l|0)<1?(I=E[g>>1]|0,E[g>>1]=(I&65535)-(I<<16>>16>-128&1),I=(l|0)>(~a|0)?l:0-a|0,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&65535,r|0):(c|0)<=0?(I=c,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&65535,r|0):(I=c-s|0,C=E[g>>1]|0,E[g>>1]=(C<<16>>16<127&1)+(C&65535),I=(I|0)>0?0:I,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&65535,r|0)}function Af(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return l=t+4576|0,o=e[l>>2]|0,n=E[o+(r+-1<<1)>>1]|0,a=t+148|0,o=Sf(t,n,o+(r<<1)|0,(e[a>>2]|0)-r|0)|0,s=o+r|0,(s|0)==(e[a>>2]|0)?(a=o,a|0):(n=n&65535,r=q[(e[t+4572>>2]|0)+(s<<1)>>1]|0,a=n-r|0,(((a|0)>-1?a:0-a|0)|0)<1?n=(p2(t,t+4556|0)|0)+n|0:n=(W(p2(t,t+4544|0)|0,r-n>>31|1)|0)+r|0,E[(e[l>>2]|0)+(s<<1)>>1]=n,a=t+4568|0,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,a=o+1|0,a|0)}function Sf(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;for(c=t+112|0,h=t+108|0,p=t+4568|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[h>>2]|0,o=o+-1|0,e[c>>2]=o,e[h>>2]=a<<1,(a|0)>=0){g=8;break}if(a=e[p>>2]|0,C=1<>2],I=s-l|0,I=(C|0)<(I|0)?C:I,l=I+l|0,(I|0)==(C|0)&&(e[p>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((g|0)==8&&((l|0)!=(s|0)?(o=e[p>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,5,35648),I=f,f=0,I&1?(I=b()|0,ge(o|0),r0(I|0)):Be(o|0,824,96))):o=s),(o|0)>0)l=0;else return o|0;do E[n+(l<<1)>>1]=r,l=l+1|0;while((l|0)!=(o|0));return o|0}function p2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;if(c=r+9|0,n=N[c>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;o=e[36476+(e[t+4568>>2]<<2)>>2]|0,n=ji(t)|0;do if((n|0)<(46-o|0))if(s){n=(ni(t,s)|0)+(n<>2]|0,o=n+t|0,h=o&1,s=h,l=1,o=(h+o|0)/2|0;break}else{t=e[l>>2]|0,o=t+n|0,s=o&1,o=(s+o|0)/2|0,a=8;break}else n=(ni(t,16)|0)+1|0,t=e[l>>2]|0,o=n+t|0,l=o&1,o=(l+o|0)/2|0,s?(s=l,l=1):(s=l,a=8);while(!1);return(a|0)==8&&(l=N[r+10>>0]<<1>>>0>=(N[c>>0]|0)>>>0),o=(s|0)!=0^l?o:0-o|0,(o|0)<0&&(h=r+10|0,d[h>>0]=(N[h>>0]|0)+1),n=(n+1-t>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[c>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(h=s,h=h&255,h=h+1|0,h=h&255,d[c>>0]=h,o|0):(e[r>>2]=n>>1,h=(s&255)>>>1,d[c>>0]=h,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,h=h&255,h=h+1|0,h=h&255,d[c>>0]=h,o|0)}function vf(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=y,y=y+32|0,c=p,hi(c,65535,0),h=t+152|0,(e[c+4>>2]|0)==(e[h>>2]|0)&&(e[c+8>>2]|0)==(e[t+156>>2]|0)&&(e[c+12>>2]|0)==(e[t+160>>2]|0)){h=e[8909]|0,e[t+4580>>2]=h+(((e[8910]|0)-h|0)>>>1),y=p;return}for(n=t+4584|0,s=t+4588|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=131072?l>>>0>131072&&(a=r+131072|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,131072-l|0),r=e[n>>2]|0),c=t+4580|0,e[c>>2]=r+65536,a=t+160|0,o=t+156|0,l=-65536;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[h>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==65536)break}y=p}function wf(t){t=t|0;var r=0,n=0;e[t>>2]=35744,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Tf(t){t=t|0;var r=0,n=0;if(e[t>>2]=35744,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function Cf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(k=t+4|0,B=t+32|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(37,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==16)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(38,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(39,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(40,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=2,e[s+12>>2]=t,M=s,y=O,M|0)}function xf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,4095,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+152>>2]=a|0?a:e[c+4>>2]|0,e[t+156>>2]=l,e[t+160>>2]=s,Mf(t),s=0;do e[t+164+(s*12|0)>>2]=64,e[t+164+(s*12|0)+4>>2]=0,E[t+164+(s*12|0)+8>>1]=0,E[t+164+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4544>>2]=64,e[t+4548>>2]=0,d[t+4552>>0]=c,d[t+4553>>0]=1,d[t+4554>>0]=0,e[t+4556>>2]=64,e[t+4560>>2]=1,d[t+4564>>0]=c,d[t+4565>>0]=1,d[t+4566>>0]=0,e[t+4568>>2]=0,y=o}function yf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4596>>0]=o&1,r=t+132|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),If(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function If(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;K=y,y=y+32|0,Z=K+12|0,X=K,_=t+148|0,F=(e[_>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[Z>>2]=0,s0=Z+4|0,e[s0>>2]=0,e[Z+8>>2]=0;do if(r){if((r|0)<0&&(f=0,n0(178,Z|0),t0=f,f=0,t0&1)||(a=6),(a|0)==6&&(n=r<<1,f=0,s=u0(67,n|0)|0,t0=f,f=0,!(t0&1))){e[Z>>2]=s,t0=s+(r<<1)|0,e[Z+8>>2]=t0,je(s|0,0,n|0)|0,e[s0>>2]=t0;break}s=b()|0,r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)a=18;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(a=16),(a|0)==16&&(o=M<<2,f=0,l=u0(67,o|0)|0,O=f,f=0,!(O&1))){e[X>>2]=l,a=l+(M<<2)|0,e[X+8>>2]=a,je(l|0,0,o|0)|0,e[t0>>2]=a,a=18;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((a|0)==18){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4572|0,c=W(M,F)|0,h=c+1|0,p=t+4576|0,g=(M|0)>0,C=t+136|0,I=t+144|0,k=t+140|0,U=t+132|0,B=t+88|0,V=t+4568|0,O=0;i:for(;;){if(s=e[Z>>2]|0,n=s+2|0,e[a>>2]=n,s=s+(h<<1)|0,e[p>>2]=s,O&1?(e[a>>2]=s,e[p>>2]=n,r=n,n=s):r=s,g){o=e[X>>2]|0,s=0;do{if(e[V>>2]=e[o+(s<<2)>>2],o=e[_>>2]|0,E[n+(o<<1)>>1]=E[n+(o+-1<<1)>>1]|0,E[r+-2>>1]=E[n>>1]|0,f=0,h0(80,t|0,0),o=f,f=0,o&1){a=29;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[V>>2],n=(e[a>>2]|0)+(F<<1)|0,e[a>>2]=n,r=(e[p>>2]|0)+(F<<1)|0,e[p>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[C>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[I>>2]|0)+o|0)&&(o=e[B>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+((e[U>>2]|0)-c<<1)|0,e[k>>2]|0,F|0),o=f,f=0,o&1)){a=30;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){a=42;break e}}if((a|0)==29){s=b()|0;break}else if((a|0)==30){s=b()|0;break}}else a=42;while(!1);do if((a|0)==42){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[Z>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~((n+-2-r|0)>>>1)<<1)),a0(r),r0(s|0)}function Df(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=t+4572|0,r=e[C>>2]|0,U=t+148|0,!((e[U>>2]|0)<=0))for(I=t+4576|0,k=t+4580|0,o=r,l=q[r+-2>>1]|0,r=q[r>>1]|0,g=0;p=e[I>>2]|0,h=q[p+(g+-1<<1)>>1]|0,s=g+1|0,n=q[o+(s<<1)>>1]|0,c=e[k>>2]|0,a=r-l|0,o=l-h|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-h>>31,(l^o|0)<0?o=r:o=h+((l^a|0)<0?0:a)|0,p=Ef(t,c,q[p+(g<<1)>>1]|0,o,0)|0,E[(e[I>>2]|0)+(g<<1)>>1]=p):(s=(kf(t,g,0)|0)+g|0,n=e[C>>2]|0,r=q[n+(s+-1<<1)>>1]|0,n=q[n+(s<<1)>>1]|0),!((s|0)>=(e[U>>2]|0));)o=e[C>>2]|0,l=r,r=n,g=s}function Ef(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(k=r>>31,p=(k^r)-k|0,I=t+164+(p*12|0)+10|0,n=E[I>>1]|0,C=t+164+(p*12|0)|0,o=e[C>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(l=5;(n<>1]^k)-k+s|0,(n&4095|0)!=(n|0)&&(n=n>>31&4095^4095),o=t+112|0,(e[o>>2]|0)<8&&_i(t),s=t+108|0,a=e[s>>2]|0,c=a>>>24,h=e[2832+(l<<11)+(c<<3)+4>>2]|0,h?(e[o>>2]=(e[o>>2]|0)-h,e[s>>2]=a<>2]|0):(o=ji(t)|0,(o|0)<35?l&&(o=(ni(t,l)|0)+(o<>31^o>>1,(((o|0)>-1?o:0-o|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),r=f,f=0,r&1?(r=b()|0,ge(n|0),r0(r|0)):Be(n|0,824,96))),h=t+164+(p*12|0)+4|0,s=e[h>>2]|0,l?l=E[I>>1]|0:(t=E[I>>1]|0,l=t,o=(s<<1)+-1+(t<<16>>16)>>31^o),a=l<<16>>16==64,t=a&1,c=s+o>>t,a=a?32:l<<16>>16,e[C>>2]=((o|0)>-1?o:0-o|0)+(e[C>>2]|0)>>t,s=a+1|0,E[I>>1]=s,l=s+c|0,(l|0)<1?(I=E[g>>1]|0,E[g>>1]=(I&65535)-(I<<16>>16>-128&1),I=(l|0)>(~a|0)?l:0-a|0,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&4095,r=r&65535,r|0):(c|0)<=0?(I=c,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&4095,r=r&65535,r|0):(I=c-s|0,C=E[g>>1]|0,E[g>>1]=(C<<16>>16<127&1)+(C&65535),I=(I|0)>0?0:I,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&4095,r=r&65535,r|0)}function kf(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return l=t+4576|0,o=e[l>>2]|0,n=E[o+(r+-1<<1)>>1]|0,a=t+148|0,o=Ff(t,n,o+(r<<1)|0,(e[a>>2]|0)-r|0)|0,s=o+r|0,(s|0)==(e[a>>2]|0)?(a=o,a|0):(n=n&65535,r=q[(e[t+4572>>2]|0)+(s<<1)>>1]|0,a=n-r|0,(((a|0)>-1?a:0-a|0)|0)<1?n=(A2(t,t+4556|0)|0)+n|0:n=(W(A2(t,t+4544|0)|0,r-n>>31|1)|0)+r|0,E[(e[l>>2]|0)+(s<<1)>>1]=n&4095,a=t+4568|0,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,a=o+1|0,a|0)}function Ff(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;for(c=t+112|0,h=t+108|0,p=t+4568|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[h>>2]|0,o=o+-1|0,e[c>>2]=o,e[h>>2]=a<<1,(a|0)>=0){g=8;break}if(a=e[p>>2]|0,C=1<>2],I=s-l|0,I=(C|0)<(I|0)?C:I,l=I+l|0,(I|0)==(C|0)&&(e[p>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((g|0)==8&&((l|0)!=(s|0)?(o=e[p>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,5,35648),I=f,f=0,I&1?(I=b()|0,ge(o|0),r0(I|0)):Be(o|0,824,96))):o=s),(o|0)>0)l=0;else return o|0;do E[n+(l<<1)>>1]=r,l=l+1|0;while((l|0)!=(o|0));return o|0}function A2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;if(c=r+9|0,n=N[c>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;o=e[36476+(e[t+4568>>2]<<2)>>2]|0,n=ji(t)|0;do if((n|0)<(34-o|0))if(s){n=(ni(t,s)|0)+(n<>2]|0,o=n+t|0,h=o&1,s=h,l=1,o=(h+o|0)/2|0;break}else{t=e[l>>2]|0,o=t+n|0,s=o&1,o=(s+o|0)/2|0,a=8;break}else n=(ni(t,12)|0)+1|0,t=e[l>>2]|0,o=n+t|0,l=o&1,o=(l+o|0)/2|0,s?(s=l,l=1):(s=l,a=8);while(!1);return(a|0)==8&&(l=N[r+10>>0]<<1>>>0>=(N[c>>0]|0)>>>0),o=(s|0)!=0^l?o:0-o|0,(o|0)<0&&(h=r+10|0,d[h>>0]=(N[h>>0]|0)+1),n=(n+1-t>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[c>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(h=s,h=h&255,h=h+1|0,h=h&255,d[c>>0]=h,o|0):(e[r>>2]=n>>1,h=(s&255)>>>1,d[c>>0]=h,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,h=h&255,h=h+1|0,h=h&255,d[c>>0]=h,o|0)}function Mf(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=y,y=y+32|0,c=p,hi(c,4095,0),h=t+152|0,(e[c+4>>2]|0)==(e[h>>2]|0)&&(e[c+8>>2]|0)==(e[t+156>>2]|0)&&(e[c+12>>2]|0)==(e[t+160>>2]|0)){h=e[8906]|0,e[t+4580>>2]=h+(((e[8907]|0)-h|0)>>>1),y=p;return}for(n=t+4584|0,s=t+4588|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=8192?l>>>0>8192&&(a=r+8192|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,8192-l|0),r=e[n>>2]|0),c=t+4580|0,e[c>>2]=r+4096,a=t+160|0,o=t+156|0,l=-4096;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[h>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==4096)break}y=p}function _f(t){t=t|0;var r=0,n=0;e[t>>2]=35716,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Rf(t){t=t|0;var r=0,n=0;if(e[t>>2]=35716,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function Pf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(k=t+4|0,B=t+32|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(44,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(45,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(46,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(47,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0)}function Lf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,255,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+152>>2]=a|0?a:e[c+4>>2]|0,e[t+156>>2]=l,e[t+160>>2]=s,bf(t),s=0;do e[t+164+(s*12|0)>>2]=4,e[t+164+(s*12|0)+4>>2]=0,E[t+164+(s*12|0)+8>>1]=0,E[t+164+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4544>>2]=4,e[t+4548>>2]=0,d[t+4552>>0]=c,d[t+4553>>0]=1,d[t+4554>>0]=0,e[t+4556>>2]=4,e[t+4560>>2]=1,d[t+4564>>0]=c,d[t+4565>>0]=1,d[t+4566>>0]=0,e[t+4568>>2]=0,y=o}function Uf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4596>>0]=o&1,r=t+132|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),Of(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function Of(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;K=y,y=y+32|0,Z=K+12|0,X=K,_=t+148|0,F=(e[_>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[Z>>2]=0,s0=Z+4|0,e[s0>>2]=0,e[Z+8>>2]=0;e:do if(r){if((r|0)<0&&(f=0,n0(178,Z|0),t0=f,f=0,t0&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r|0)|0,t0=f,f=0,!(t0&1))){for(e[s0>>2]=n,e[Z>>2]=n,e[Z+8>>2]=n+r;;)if(d[n>>0]=0,n=(e[s0>>2]|0)+1|0,e[s0>>2]=n,r=r+-1|0,!r)break e}n=b()|0,r=e[Z>>2]|0,r||r0(n|0),(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),a0(r),r0(n|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)l=19;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(l=17),(l|0)==17&&(s=M<<2,f=0,o=u0(67,s|0)|0,O=f,f=0,!(O&1))){e[X>>2]=o,l=o+(M<<2)|0,e[X+8>>2]=l,je(o|0,0,s|0)|0,e[t0>>2]=l,l=19;break}n=b()|0,r=e[X>>2]|0,s=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-s|0)>>>2)<<2)),a0(r))}while(!1);if((l|0)==19){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4572|0,c=W(M,F)|0,h=c+1|0,p=t+4576|0,g=(M|0)>0,C=t+136|0,I=t+144|0,k=t+140|0,U=t+132|0,B=t+88|0,V=t+4568|0,O=0;i:for(;;){if(s=e[Z>>2]|0,n=s+1|0,e[a>>2]=n,s=s+h|0,e[p>>2]=s,O&1?(e[a>>2]=s,e[p>>2]=n,r=n,n=s):r=s,g){o=e[X>>2]|0,s=0;do{if(e[V>>2]=e[o+(s<<2)>>2],o=e[_>>2]|0,d[n+o>>0]=d[n+(o+-1)>>0]|0,d[(e[p>>2]|0)+-1>>0]=d[e[a>>2]>>0]|0,f=0,h0(81,t|0,0),o=f,f=0,o&1){l=30;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[V>>2],n=(e[a>>2]|0)+F|0,e[a>>2]=n,r=(e[p>>2]|0)+F|0,e[p>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[C>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[I>>2]|0)+o|0)&&(o=e[B>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+((e[U>>2]|0)-c)|0,e[k>>2]|0,F|0),o=f,f=0,o&1)){l=31;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){l=43;break e}}if((l|0)==30){n=b()|0;break}else if((l|0)==31){n=b()|0;break}}else l=43;while(!1);do if((l|0)==43){if(f=0,n0(183,t|0),t=f,f=0,t&1){n=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[Z>>2]|0,!r){y=K;return}(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),a0(r),y=K;return}while(!1);r=e[X>>2]|0,s=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-s|0)>>>2)<<2)),a0(r))}r=e[Z>>2]|0,r||r0(n|0),(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),a0(r),r0(n|0)}function Nf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=t+4572|0,r=e[C>>2]|0,U=t+148|0,!((e[U>>2]|0)<=0))for(I=t+4576|0,k=t+4580|0,o=r,l=N[r+-1>>0]|0,r=N[r>>0]|0,g=0;p=e[I>>2]|0,h=N[p+(g+-1)>>0]|0,s=g+1|0,n=N[o+s>>0]|0,c=e[k>>2]|0,a=r-l|0,o=l-h|0,c=((((d[c+(n-r)>>0]|0)*9|0)+(d[c+a>>0]|0)|0)*9|0)+(d[c+o>>0]|0)|0,c?(l=r-h>>31,(l^o|0)<0?o=r:o=h+((l^a|0)<0?0:a)|0,p=Bf(t,c,N[p+g>>0]|0,o,0)|0,d[(e[I>>2]|0)+g>>0]=p):(s=(Vf(t,g,0)|0)+g|0,n=e[C>>2]|0,r=N[n+(s+-1)>>0]|0,n=N[n+s>>0]|0),!((s|0)>=(e[U>>2]|0));)o=e[C>>2]|0,l=r,r=n,g=s}function Bf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(k=r>>31,p=(k^r)-k|0,I=t+164+(p*12|0)+10|0,n=E[I>>1]|0,C=t+164+(p*12|0)|0,o=e[C>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(l=5;(n<>1]^k)-k+s|0,(n&255|0)!=(n|0)&&(n=n>>31&255^255),o=t+112|0,(e[o>>2]|0)<8&&_i(t),s=t+108|0,a=e[s>>2]|0,c=a>>>24,h=e[2832+(l<<11)+(c<<3)+4>>2]|0,h?(e[o>>2]=(e[o>>2]|0)-h,e[s>>2]=a<>2]|0):(o=ji(t)|0,(o|0)<23?l&&(o=(ni(t,l)|0)+(o<>31^o>>1,(((o|0)>-1?o:0-o|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),r=f,f=0,r&1?(r=b()|0,ge(n|0),r0(r|0)):Be(n|0,824,96))),h=t+164+(p*12|0)+4|0,s=e[h>>2]|0,l?l=E[I>>1]|0:(t=E[I>>1]|0,l=t,o=(s<<1)+-1+(t<<16>>16)>>31^o),a=l<<16>>16==64,t=a&1,c=s+o>>t,a=a?32:l<<16>>16,e[C>>2]=((o|0)>-1?o:0-o|0)+(e[C>>2]|0)>>t,s=a+1|0,E[I>>1]=s,l=s+c|0,(l|0)<1?(I=E[g>>1]|0,E[g>>1]=(I&65535)-(I<<16>>16>-128&1),I=(l|0)>(~a|0)?l:0-a|0,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&255,r|0):(c|0)<=0?(I=c,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&255,r|0):(I=c-s|0,C=E[g>>1]|0,E[g>>1]=(C<<16>>16<127&1)+(C&65535),I=(I|0)>0?0:I,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&255,r|0)}function Vf(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return l=t+4576|0,o=e[l>>2]|0,n=d[o+(r+-1)>>0]|0,a=t+148|0,o=qf(t,n,o+r|0,(e[a>>2]|0)-r|0)|0,s=o+r|0,(s|0)==(e[a>>2]|0)?(a=o,a|0):(n=n&255,r=N[(e[t+4572>>2]|0)+s>>0]|0,a=n-r|0,(((a|0)>-1?a:0-a|0)|0)<1?n=(S2(t,t+4556|0)|0)+n|0:n=(W(S2(t,t+4544|0)|0,r-n>>31|1)|0)+r|0,d[(e[l>>2]|0)+s>>0]=n,a=t+4568|0,t=e[a>>2]|0,e[a>>2]=(t|0)<1?0:t+-1|0,a=o+1|0,a|0)}function qf(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;for(c=t+112|0,h=t+108|0,p=t+4568|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[h>>2]|0,o=o+-1|0,e[c>>2]=o,e[h>>2]=a<<1,(a|0)>=0){g=8;break}if(a=e[p>>2]|0,C=1<>2],I=s-l|0,I=(C|0)<(I|0)?C:I,l=I+l|0,(I|0)==(C|0)&&(e[p>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}return(g|0)==8&&((l|0)!=(s|0)?(o=e[p>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,5,35648),I=f,f=0,I&1?(I=b()|0,ge(o|0),r0(I|0)):Be(o|0,824,96))):o=s),(o|0)<=0||je(n|0,r|0,o|0)|0,o|0}function S2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;if(c=r+9|0,n=N[c>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;o=e[36476+(e[t+4568>>2]<<2)>>2]|0,n=ji(t)|0;do if((n|0)<(22-o|0))if(s){n=(ni(t,s)|0)+(n<>2]|0,o=n+t|0,h=o&1,s=h,l=1,o=(h+o|0)/2|0;break}else{t=e[l>>2]|0,o=t+n|0,s=o&1,o=(s+o|0)/2|0,a=8;break}else n=(ni(t,8)|0)+1|0,t=e[l>>2]|0,o=n+t|0,l=o&1,o=(l+o|0)/2|0,s?(s=l,l=1):(s=l,a=8);while(!1);return(a|0)==8&&(l=N[r+10>>0]<<1>>>0>=(N[c>>0]|0)>>>0),o=(s|0)!=0^l?o:0-o|0,(o|0)<0&&(h=r+10|0,d[h>>0]=(N[h>>0]|0)+1),n=(n+1-t>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[c>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(h=s,h=h&255,h=h+1|0,h=h&255,d[c>>0]=h,o|0):(e[r>>2]=n>>1,h=(s&255)>>>1,d[c>>0]=h,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,h=h&255,h=h+1|0,h=h&255,d[c>>0]=h,o|0)}function bf(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=y,y=y+32|0,c=p,hi(c,255,0),h=t+152|0,(e[c+4>>2]|0)==(e[h>>2]|0)&&(e[c+8>>2]|0)==(e[t+156>>2]|0)&&(e[c+12>>2]|0)==(e[t+160>>2]|0)){h=e[8900]|0,e[t+4580>>2]=h+(((e[8901]|0)-h|0)>>>1),y=p;return}for(n=t+4584|0,s=t+4588|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=512?l>>>0>512&&(a=r+512|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,512-l|0),r=e[n>>2]|0),c=t+4580|0,e[c>>2]=r+256,a=t+160|0,o=t+156|0,l=-256;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[h>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==256)break}y=p}function Gf(t){t=t|0;var r=0,n=0;e[t>>2]=35688,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Qf(t){t=t|0;var r=0,n=0;if(e[t>>2]=35688,r=e[t+4584>>2]|0,r&&(n=t+4588|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function zf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(k=t+4|0,B=t+32|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(44,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(45,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(46,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(47,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=3,e[s+12>>2]=t,M=s,y=O,M|0)}function Hf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+32|0,c=o,hi(c,255,0),a=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[c+8>>2]|0,s=e[r+12>>2]|0,s=s|0?s:e[c+12>>2]|0,r=e[r+16>>2]|0,n=e[c+16>>2]|0,e[t+152>>2]=a|0?a:e[c+4>>2]|0,e[t+156>>2]=l,e[t+160>>2]=s,Ld(t),s=0;do e[t+164+(s*12|0)>>2]=4,e[t+164+(s*12|0)+4>>2]=0,E[t+164+(s*12|0)+8>>1]=0,E[t+164+(s*12|0)+10>>1]=1,s=s+1|0;while((s|0)!=365);c=(r|0?r:n)&255,e[t+4544>>2]=4,e[t+4548>>2]=0,d[t+4552>>0]=c,d[t+4553>>0]=1,d[t+4554>>0]=0,e[t+4556>>2]=4,e[t+4560>>2]=1,d[t+4564>>0]=c,d[t+4565>>0]=1,d[t+4566>>0]=0,e[t+4568>>2]=0,y=o}function Yf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4596>>0]=o&1,r=t+132|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),jf(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function jf(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;K=y,y=y+32|0,Z=K+12|0,X=K,_=t+148|0,F=(e[_>>2]|0)+4|0,(e[t+28>>2]|0)==1?M=e[t+20>>2]|0:M=1,r=W(M<<1,F)|0,e[Z>>2]=0,s0=Z+4|0,e[s0>>2]=0,e[Z+8>>2]=0;e:do if(r){if(r>>>0>1431655765&&(f=0,n0(178,Z|0),t0=f,f=0,t0&1)||(l=6),(l|0)==6&&(f=0,n=u0(67,r*3|0)|0,t0=f,f=0,!(t0&1))){for(e[s0>>2]=n,e[Z>>2]=n,e[Z+8>>2]=n+(r*3|0);;)if(d[n>>0]=0,d[n+1>>0]=0,d[n+2>>0]=0,n=(e[s0>>2]|0)+3|0,e[s0>>2]=n,r=r+-1|0,!r)break e}s=b()|0,r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),r0(s|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!M)l=19;else{if(M>>>0>1073741823&&(f=0,n0(178,X|0),O=f,f=0,O&1)||(l=17),(l|0)==17&&(s=M<<2,f=0,o=u0(67,s|0)|0,O=f,f=0,!(O&1))){e[X>>2]=o,l=o+(M<<2)|0,e[X+8>>2]=l,je(o|0,0,s|0)|0,e[t0>>2]=l,l=19;break}s=b()|0,r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}while(!1);if((l|0)==19){l=t+8|0;e:do if((e[l>>2]|0)>0){a=t+4572|0,c=W(M,F)|0,h=c+1|0,p=t+4576|0,g=(M|0)>0,C=t+136|0,I=t+144|0,k=t+140|0,U=t+132|0,B=t+88|0,V=t+4568|0,O=0;i:for(;;){if(s=e[Z>>2]|0,n=s+3|0,e[a>>2]=n,s=s+(h*3|0)|0,e[p>>2]=s,O&1?(e[a>>2]=s,e[p>>2]=n,r=n,n=s):r=s,g){o=e[X>>2]|0,s=0;do{if(e[V>>2]=e[o+(s<<2)>>2],r=e[_>>2]|0,o=n+(r*3|0)|0,n=n+((r+-1|0)*3|0)|0,d[o>>0]=d[n>>0]|0,d[o+1>>0]=d[n+1>>0]|0,d[o+2>>0]=d[n+2>>0]|0,n=e[a>>2]|0,o=(e[p>>2]|0)+-3|0,d[o>>0]=d[n>>0]|0,d[o+1>>0]=d[n+1>>0]|0,d[o+2>>0]=d[n+2>>0]|0,f=0,h0(82,t|0,0),o=f,f=0,o&1){l=30;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[V>>2],n=(e[a>>2]|0)+(F*3|0)|0,e[a>>2]=n,r=(e[p>>2]|0)+(F*3|0)|0,e[p>>2]=r,s=s+1|0}while((s|0)<(M|0))}if(o=e[C>>2]|0,(o|0)<=(O|0)&&(O|0)<((e[I>>2]|0)+o|0)&&(o=e[B>>2]|0,f=0,P0(e[(e[o>>2]|0)+8>>2]|0,o|0,r+(((e[U>>2]|0)-c|0)*3|0)|0,e[k>>2]|0,F|0),o=f,f=0,o&1)){l=31;break}if(O=O+1|0,(O|0)>=(e[l>>2]|0)){l=43;break e}}if((l|0)==30){s=b()|0;break}else if((l|0)==31){s=b()|0;break}}else l=43;while(!1);do if((l|0)==43){if(f=0,n0(183,t|0),t=f,f=0,t&1){s=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[Z>>2]|0,!r){y=K;return}n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),y=K;return}while(!1);r=e[X>>2]|0,n=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-n|0)>>>2)<<2)),a0(r))}r=e[Z>>2]|0,r||r0(s|0),n=e[s0>>2]|0,(n|0)!=(r|0)&&(e[s0>>2]=n+(~(((n+-3-r|0)>>>0)/3|0)*3|0)),a0(r),r0(s|0)}function Xf(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0;if(t0=t+148|0,!((e[t0>>2]|0)<=0))for(Z=t+4576|0,s0=t+4572|0,w0=t+4580|0,K=0;F=K+-1|0,l=e[Z>>2]|0,a=e[s0>>2]|0,r=K+1|0,o=N[a+(K*3|0)>>0]|0,X=e[w0>>2]|0,c=N[a+(F*3|0)>>0]|0,h=o-c|0,p=N[l+(F*3|0)>>0]|0,g=c-p|0,C=((((d[X+((N[a+(r*3|0)>>0]|0)-o)>>0]|0)*9|0)+(d[X+h>>0]|0)|0)*9|0)+(d[X+g>>0]|0)|0,s=N[a+(K*3|0)+1>>0]|0,I=N[a+(F*3|0)+1>>0]|0,k=s-I|0,U=N[l+(F*3|0)+1>>0]|0,B=I-U|0,V=((((d[X+((N[a+(r*3|0)+1>>0]|0)-s)>>0]|0)*9|0)+(d[X+k>>0]|0)|0)*9|0)+(d[X+B>>0]|0)|0,n=N[a+(K*3|0)+2>>0]|0,O=N[a+(F*3|0)+2>>0]|0,_=n-O|0,F=N[l+(F*3|0)+2>>0]|0,M=O-F|0,X=((((d[X+((N[a+(r*3|0)+2>>0]|0)-n)>>0]|0)*9|0)+(d[X+_>>0]|0)|0)*9|0)+(d[X+M>>0]|0)|0,V|C|X?(a=N[l+(K*3|0)>>0]|0,l=o-p>>31,(l^g|0)>=0&&((l^h|0)<0?o=p:o=p-c+o|0),a=t1(t,C,a,o,0)|0,l=N[(e[Z>>2]|0)+(K*3|0)+1>>0]|0,o=s-U>>31,(o^B|0)>=0&&((o^k|0)<0?s=U:s=U-I+s|0),o=t1(t,V,l,s,0)|0,l=N[(e[Z>>2]|0)+(K*3|0)+2>>0]|0,s=n-F>>31,(s^M|0)>=0&&((s^_|0)<0?n=F:n=F-O+n|0),X=t1(t,X,l,n,0)|0,K=(e[Z>>2]|0)+(K*3|0)|0,d[K>>0]=a,d[K+1>>0]=o,d[K+2>>0]=X):r=(Kf(t,K,0)|0)+K|0,(r|0)<(e[t0>>2]|0);)K=r}function Kf(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;return h=y,y=y+16|0,g=h+3|0,C=h,l=t+4576|0,n=e[l>>2]|0,s=n+((r+-1|0)*3|0)|0,a=d[s>>0]|0,c=d[s+1>>0]|0,s=d[s+2>>0]|0,d[C>>0]=a,d[C+1>>0]=c,d[C+2>>0]=s,p=t+148|0,o=(e[p>>2]|0)-r|0,d[g>>0]=d[C>>0]|0,d[g+1>>0]=d[C+1>>0]|0,d[g+2>>0]=d[C+2>>0]|0,o=Wf(t,g,n+(r*3|0)|0,o)|0,n=o+r|0,(n|0)==(e[p>>2]|0)?(C=o,y=h,C|0):(g=(e[t+4572>>2]|0)+(n*3|0)|0,r=d[g>>0]|0,p=d[g+1>>0]|0,g=d[g+2>>0]|0,C=e[l>>2]|0,l=t+4544|0,k=r1(t,l)|0,I=r1(t,l)|0,r=r&255,r=(W(r-(a&255)>>31|1,k)|0)+r&255,p=p&255,p=(W(p-(c&255)>>31|1,I)|0)+p&255,g=g&255,g=(W(g-(s&255)>>31|1,r1(t,l)|0)|0)+g&255,C=C+(n*3|0)|0,d[C>>0]=r,d[C+1>>0]=p,d[C+2>>0]=g,C=t+4568|0,g=e[C>>2]|0,e[C>>2]=(g|0)<1?0:g+-1|0,C=o+1|0,y=h,C|0)}function t1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(k=r>>31,p=(k^r)-k|0,I=t+164+(p*12|0)+10|0,n=E[I>>1]|0,C=t+164+(p*12|0)|0,o=e[C>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(l=5;(n<>1]^k)-k+s|0,(n&255|0)!=(n|0)&&(n=n>>31&255^255),o=t+112|0,(e[o>>2]|0)<8&&_i(t),s=t+108|0,a=e[s>>2]|0,c=a>>>24,h=e[2832+(l<<11)+(c<<3)+4>>2]|0,h?(e[o>>2]=(e[o>>2]|0)-h,e[s>>2]=a<>2]|0):(o=ji(t)|0,(o|0)<23?l&&(o=(ni(t,l)|0)+(o<>31^o>>1,(((o|0)>-1?o:0-o|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),r=f,f=0,r&1?(r=b()|0,ge(n|0),r0(r|0)):Be(n|0,824,96))),h=t+164+(p*12|0)+4|0,s=e[h>>2]|0,l?l=E[I>>1]|0:(t=E[I>>1]|0,l=t,o=(s<<1)+-1+(t<<16>>16)>>31^o),a=l<<16>>16==64,t=a&1,c=s+o>>t,a=a?32:l<<16>>16,e[C>>2]=((o|0)>-1?o:0-o|0)+(e[C>>2]|0)>>t,s=a+1|0,E[I>>1]=s,l=s+c|0,(l|0)<1?(I=E[g>>1]|0,E[g>>1]=(I&65535)-(I<<16>>16>-128&1),I=(l|0)>(~a|0)?l:0-a|0,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&255,r|0):(c|0)<=0?(I=c,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&255,r|0):(I=c-s|0,C=E[g>>1]|0,E[g>>1]=(C<<16>>16<127&1)+(C&65535),I=(I|0)>0?0:I,e[h>>2]=I,k=o^k,r=r>>>31,r=n+r|0,r=r+k|0,r=r&255,r|0)}function Wf(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;for(c=t+112|0,h=t+108|0,p=t+4568|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[h>>2]|0,o=o+-1|0,e[c>>2]=o,e[h>>2]=a<<1,(a|0)>=0){g=8;break}if(a=e[p>>2]|0,C=1<>2],I=s-l|0,I=(C|0)<(I|0)?C:I,l=I+l|0,(I|0)==(C|0)&&(e[p>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}if((g|0)==8&&((l|0)!=(s|0)?(o=e[p>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,5,35648),I=f,f=0,I&1?(I=b()|0,ge(o|0),r0(I|0)):Be(o|0,824,96))):o=s),(o|0)<=0)return o|0;l=0;do I=n+(l*3|0)|0,d[I>>0]=d[r>>0]|0,d[I+1>>0]=d[r+1>>0]|0,d[I+2>>0]=d[r+2>>0]|0,l=l+1|0;while((l|0)!=(o|0));return o|0}function r1(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;if(c=r+9|0,n=N[c>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;o=e[36476+(e[t+4568>>2]<<2)>>2]|0,n=ji(t)|0;do if((n|0)<(22-o|0))if(s){n=(ni(t,s)|0)+(n<>2]|0,o=n+t|0,h=o&1,s=h,l=1,o=(h+o|0)/2|0;break}else{t=e[l>>2]|0,o=t+n|0,s=o&1,o=(s+o|0)/2|0,a=8;break}else n=(ni(t,8)|0)+1|0,t=e[l>>2]|0,o=n+t|0,l=o&1,o=(l+o|0)/2|0,s?(s=l,l=1):(s=l,a=8);while(!1);return(a|0)==8&&(l=N[r+10>>0]<<1>>>0>=(N[c>>0]|0)>>>0),o=(s|0)!=0^l?o:0-o|0,(o|0)<0&&(h=r+10|0,d[h>>0]=(N[h>>0]|0)+1),n=(n+1-t>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[c>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(h=s,h=h&255,h=h+1|0,h=h&255,d[c>>0]=h,o|0):(e[r>>2]=n>>1,h=(s&255)>>>1,d[c>>0]=h,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,h=h&255,h=h+1|0,h=h&255,d[c>>0]=h,o|0)}function Zf(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(g=y,y=y+128|0,l=g,I=g+116|0,k=g+104|0,c=g+20|0,p=g+16|0,h=g+12|0,C=g+8|0,a=g+4|0,d[I>>0]=d[58887]|0,d[I+1>>0]=d[58888]|0,d[I+2>>0]=d[58889]|0,d[I+3>>0]=d[58890]|0,d[I+4>>0]=d[58891]|0,d[I+5>>0]=d[58892]|0,It(I+1|0,58893,0,e[n+4>>2]|0),t=Ii()|0,e[l>>2]=o,o=k+(qi(k,12,t,I,l)|0)|0,I=it(k,o,n)|0,t=ai(n)|0,e[C>>2]=t,f=0,re(3,k|0,I|0,o|0,c|0,p|0,h|0,C|0),o=f,f=0,o&1)k=b()|0,Ee(t)|0,r0(k|0);else return Ee(t)|0,e[a>>2]=e[r>>2],I=e[p>>2]|0,k=e[h>>2]|0,e[l>>2]=e[a>>2],k=zt(l,c,I,k,n,s)|0,y=g,k|0;return 0}function Jf(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(C=y,y=y+240|0,a=C+8|0,t=C,k=C+204|0,h=C+32|0,g=C+28|0,p=C+24|0,I=C+20|0,c=C+16|0,U=t,e[U>>2]=37,e[U+4>>2]=0,It(t+1|0,58895,0,e[n+4>>2]|0),U=Ii()|0,B=a,e[B>>2]=o,e[B+4>>2]=l,l=k+(qi(k,23,U,t,a)|0)|0,o=it(k,l,n)|0,t=ai(n)|0,e[I>>2]=t,f=0,re(3,k|0,o|0,l|0,h|0,g|0,p|0,I|0),l=f,f=0,l&1)B=b()|0,Ee(t)|0,r0(B|0);else return Ee(t)|0,e[c>>2]=e[r>>2],U=e[g>>2]|0,B=e[p>>2]|0,e[a>>2]=e[c>>2],B=zt(a,h,U,B,n,s)|0,y=C,B|0;return 0}function $f(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=+o;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0;X=y,y=y+352|0,V=X+312|0,I=X+48|0,C=X+32|0,h=X+24|0,l=X+8|0,g=X,U=X+316|0,B=X+80|0,c=X+84|0,M=X+76|0,F=X+72|0,O=X+68|0,_=X+64|0,p=g,e[p>>2]=37,e[p+4>>2]=0,p=hr(g+1|0,58898,e[n+4>>2]|0)|0,e[B>>2]=U,t=Ii()|0,p?(e[l>>2]=e[n+8>>2],H[l+8>>3]=o,l=qi(U,30,t,g,l)|0):(H[h>>3]=o,l=qi(U,30,t,g,h)|0);e:do if((l|0)>29){f=0,t=p0(3)|0,l=f,f=0,l=l&1,p?!l&&(f=0,e[C>>2]=e[n+8>>2],H[C+8>>3]=o,a=k0(17,B|0,t|0,g|0,C|0)|0,k=f,f=0,!(k&1))&&(K=12):!l&&(f=0,e[I>>2]=e[n+8>>2],H[I+8>>3]=o,k=k0(17,B|0,t|0,g|0,I|0)|0,I=f,f=0,!(I&1))&&(a=k,K=12);do if((K|0)==12){if(t=e[B>>2]|0,t)l=t;else{if(f=0,we(6),k=f,f=0,k&1)break;l=e[B>>2]|0}t=l,g=l,K=16;break e}while(!1);t=b()|0}else t=e[B>>2]|0,g=0,a=l,K=16;while(!1);if((K|0)==16){h=t+a|0,p=it(t,h,n)|0;do if((t|0)==(U|0))t=U,l=0,K=22;else{if(a=xi(a<<3)|0,!a){if(f=0,we(6),K=f,f=0,K&1){l=0,K=20;break}t=e[B>>2]|0}l=a,c=a,K=22}while(!1);do if((K|0)==22)if(f=0,a=u0(68,n|0)|0,B=f,f=0,B&1)K=20;else{if(e[O>>2]=a,f=0,re(4,t|0,p|0,h|0,c|0,M|0,F|0,O|0),O=f,f=0,O&1){t=b()|0,Ee(a)|0;break}if(Ee(a)|0,e[_>>2]=e[r>>2],K=e[M>>2]|0,t=e[F>>2]|0,f=0,e[V>>2]=e[_>>2],t=Fe(40,V|0,c|0,K|0,t|0,n|0,s|0)|0,K=f,f=0,K&1)K=20;else return e[r>>2]=t,l&&Ze(l),g&&Ze(g),y=X,t|0}while(!1);(K|0)==20&&(t=b()|0),l&&Ze(l),g&&Ze(g)}return r0(t|0),0}function eu(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0;switch(M=y,y=y+16|0,X=M,F=Pi(a,44212)|0,O=Pi(a,44368)|0,Ke[e[(e[O>>2]|0)+20>>2]&127](X,O),e[l>>2]=s,a=d[t>>0]|0,a<<24>>24){case 43:case 45:{f=0,a=y0(e[(e[F>>2]|0)+44>>2]|0,F|0,a|0)|0,_=f,f=0,_&1?V=8:(p=e[l>>2]|0,e[l>>2]=p+4,e[p>>2]=a,p=t+1|0,V=10);break}default:p=t,V=10}e:do if((V|0)==10){_=n;i:do if((_-p|0)>1&&(d[p>>0]|0)==48){switch(c=p+1|0,d[c>>0]|0){case 88:case 120:break;default:{V=11;break i}}if(f=0,a=y0(e[(e[F>>2]|0)+44>>2]|0,F|0,48)|0,B=f,f=0,B&1){V=8;break e}if(B=e[l>>2]|0,e[l>>2]=B+4,e[B>>2]=a,p=p+2|0,f=0,a=y0(e[(e[F>>2]|0)+44>>2]|0,F|0,d[c>>0]|0)|0,B=f,f=0,B&1){V=8;break e}if(B=e[l>>2]|0,e[l>>2]=B+4,e[B>>2]=a,p>>>0>>0){for(a=p;c=d[a>>0]|0,f=0,h=p0(3)|0,B=f,f=0,!(B&1||(f=0,c=y0(39,c<<24>>24|0,h|0)|0,B=f,f=0,B&1));){if(!c){B=p;break i}if(a=a+1|0,a>>>0>=n>>>0){B=p;break i}}a=b()|0;break e}else B=p,a=p}else V=11;while(!1);i:do if((V|0)==11)if(p>>>0>>0){for(a=p;c=d[a>>0]|0,f=0,h=p0(3)|0,B=f,f=0,!(B&1||(f=0,c=y0(40,c<<24>>24|0,h|0)|0,B=f,f=0,B&1));){if(!c){B=p;break i}if(a=a+1|0,a>>>0>=n>>>0){B=p;break i}}a=b()|0;break e}else B=p,a=p;while(!1);if(k=d[X>>0]|0,U=X+4|0,(k&1?e[U>>2]|0:(k&255)>>>1)|0){if((B|0)!=(a|0)&&(g=a+-1|0,B>>>0>>0)){h=B,c=g;do k=d[h>>0]|0,d[h>>0]=d[c>>0]|0,d[c>>0]=k,h=h+1|0,c=c+-1|0;while(h>>>0>>0)}if(f=0,g=u0(e[(e[O>>2]|0)+16>>2]|0,O|0)|0,k=f,f=0,k&1){V=8;break}C=X+8|0,I=X+1|0;i:do if(B>>>0>>0){for(c=0,h=0,k=B;p=d[(d[X>>0]&1?e[C>>2]|0:I)+h>>0]|0,p<<24>>24>0&(c|0)==(p<<24>>24|0)?(c=e[l>>2]|0,e[l>>2]=c+4,e[c>>2]=g,c=d[X>>0]|0,p=0,h=(h>>>0<((c&1?e[U>>2]|0:(c&255)>>>1)+-1|0)>>>0&1)+h|0):p=c,f=0,c=y0(e[(e[F>>2]|0)+44>>2]|0,F|0,d[k>>0]|0)|0,K=f,f=0,!(K&1);){if(K=e[l>>2]|0,e[l>>2]=K+4,e[K>>2]=c,k=k+1|0,k>>>0>=a>>>0)break i;c=p+1|0}a=b()|0;break e}while(!1);if(c=s+(B-t<<2)|0,p=e[l>>2]|0,(c|0)!=(p|0))if(h=p+-4|0,c>>>0>>0){do K=e[c>>2]|0,e[c>>2]=e[h>>2],e[h>>2]=K,c=c+4|0,h=h+-4|0;while(c>>>0>>0);g=F,c=p}else g=F,c=p;else g=F}else{if(f=0,k0(e[(e[F>>2]|0)+48>>2]|0,F|0,B|0,a|0,e[l>>2]|0)|0,K=f,f=0,K&1){V=8;break}c=(e[l>>2]|0)+(a-B<<2)|0,e[l>>2]=c,g=F}i:do if(a>>>0>>0){for(;;){if(c=d[a>>0]|0,c<<24>>24==46){h=a;break}if(f=0,h=y0(e[(e[g>>2]|0)+44>>2]|0,F|0,c|0)|0,K=f,f=0,K&1){V=4;break}if(K=e[l>>2]|0,c=K+4|0,e[l>>2]=c,e[K>>2]=h,a=a+1|0,a>>>0>=n>>>0)break i}if((V|0)==4){a=b()|0;break e}if(f=0,a=u0(e[(e[O>>2]|0)+12>>2]|0,O|0)|0,K=f,f=0,K&1){V=8;break e}K=e[l>>2]|0,c=K+4|0,e[l>>2]=c,e[K>>2]=a,a=h+1|0}while(!1);if(f=0,k0(e[(e[F>>2]|0)+48>>2]|0,F|0,a|0,n|0,c|0)|0,K=f,f=0,K&1)V=8;else{K=(e[l>>2]|0)+(_-a<<2)|0,e[l>>2]=K,e[o>>2]=(r|0)==(n|0)?K:s+(r-t<<2)|0,f0(X),y=M;return}}while(!1);(V|0)==8&&(a=b()|0),f0(X),r0(a|0)}function iu(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=+o;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0;X=y,y=y+352|0,V=X+304|0,I=X+48|0,C=X+32|0,h=X+24|0,l=X+8|0,g=X,U=X+308|0,B=X+72|0,c=X+76|0,M=X+68|0,F=X+64|0,O=X+60|0,_=X+56|0,p=g,e[p>>2]=37,e[p+4>>2]=0,p=hr(g+1|0,58899,e[n+4>>2]|0)|0,e[B>>2]=U,t=Ii()|0,p?(e[l>>2]=e[n+8>>2],H[l+8>>3]=o,l=qi(U,30,t,g,l)|0):(H[h>>3]=o,l=qi(U,30,t,g,h)|0);e:do if((l|0)>29){f=0,t=p0(3)|0,l=f,f=0,l=l&1,p?!l&&(f=0,e[C>>2]=e[n+8>>2],H[C+8>>3]=o,a=k0(17,B|0,t|0,g|0,C|0)|0,k=f,f=0,!(k&1))&&(K=12):!l&&(f=0,H[I>>3]=o,k=k0(17,B|0,t|0,g|0,I|0)|0,I=f,f=0,!(I&1))&&(a=k,K=12);do if((K|0)==12){if(t=e[B>>2]|0,t)l=t;else{if(f=0,we(6),k=f,f=0,k&1)break;l=e[B>>2]|0}t=l,g=l,K=16;break e}while(!1);t=b()|0}else t=e[B>>2]|0,g=0,a=l,K=16;while(!1);if((K|0)==16){h=t+a|0,p=it(t,h,n)|0;do if((t|0)==(U|0))t=U,l=0,K=22;else{if(a=xi(a<<3)|0,!a){if(f=0,we(6),K=f,f=0,K&1){l=0,K=20;break}t=e[B>>2]|0}l=a,c=a,K=22}while(!1);do if((K|0)==22)if(f=0,a=u0(68,n|0)|0,B=f,f=0,B&1)K=20;else{if(e[O>>2]=a,f=0,re(4,t|0,p|0,h|0,c|0,M|0,F|0,O|0),O=f,f=0,O&1){t=b()|0,Ee(a)|0;break}if(Ee(a)|0,e[_>>2]=e[r>>2],K=e[M>>2]|0,t=e[F>>2]|0,f=0,e[V>>2]=e[_>>2],t=Fe(40,V|0,c|0,K|0,t|0,n|0,s|0)|0,K=f,f=0,K&1)K=20;else return e[r>>2]=t,l&&Ze(l),g&&Ze(g),y=X,t|0}while(!1);(K|0)==20&&(t=b()|0),l&&Ze(l),g&&Ze(g)}return r0(t|0),0}function tu(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(I=y,y=y+192|0,h=I,t=I+180|0,g=I+160|0,C=I+12|0,c=I+8|0,p=I+4|0,d[t>>0]=d[58901]|0,d[t+1>>0]=d[58902]|0,d[t+2>>0]=d[58903]|0,d[t+3>>0]=d[58904]|0,d[t+4>>0]=d[58905]|0,d[t+5>>0]=d[58906]|0,l=Ii()|0,e[h>>2]=o,t=qi(g,20,l,t,h)|0,o=g+t|0,l=it(g,o,n)|0,a=ai(n)|0,e[c>>2]=a,f=0,c=y0(37,c|0,44212)|0,k=f,f=0,k&1)k=b()|0,Ee(a)|0,r0(k|0);else return Ee(a)|0,F1[e[(e[c>>2]|0)+48>>2]&31](c,g,o,C)|0,k=C+(t<<2)|0,e[p>>2]=e[r>>2],e[h>>2]=e[p>>2],k=zt(h,C,(l|0)==(o|0)?k:C+(l-g<<2)|0,k,n,s)|0,y=I,k|0;return 0}function vt(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0;K=y,y=y+32|0,V=K+16|0,B=K+12|0,F=K+8|0,O=K+4|0,_=K,h=ai(s)|0,e[F>>2]=h,f=0,F=y0(37,F|0,44220)|0,U=f,f=0,U&1&&(K=b()|0,Ee(h)|0,r0(K|0)),Ee(h)|0,e[o>>2]=0,U=F+8|0,h=e[r>>2]|0;e:do if((a|0)!=(c|0)){i:for(;;){p=h,h?(e[h+12>>2]|0)==(e[h+16>>2]|0)&&(Se[e[(e[h>>2]|0)+36>>2]&127](h)|0)==-1&&(e[r>>2]=0,h=0,p=0):h=0,I=(h|0)==0,C=e[n>>2]|0,g=C;do if(C){if((e[C+12>>2]|0)==(e[C+16>>2]|0)&&(Se[e[(e[C>>2]|0)+36>>2]&127](C)|0)==-1){e[n>>2]=0,g=0,X=12;break}if(!I){X=13;break i}}else X=12;while(!1);if((X|0)==12)if(X=0,I){X=13;break}else C=0;t:do if((Qe[e[(e[F>>2]|0)+36>>2]&63](F,d[a>>0]|0,0)|0)<<24>>24==37){if(C=a+1|0,(C|0)==(c|0)){X=17;break i}switch(k=Qe[e[(e[F>>2]|0)+36>>2]&63](F,d[C>>0]|0,0)|0,k<<24>>24){case 48:case 69:{if(I=a+2|0,(I|0)==(c|0)){X=20;break i}a=C,C=Qe[e[(e[F>>2]|0)+36>>2]&63](F,d[I>>0]|0,0)|0,h=k;break}default:C=k,h=0}k=e[(e[t>>2]|0)+36>>2]|0,e[O>>2]=p,e[_>>2]=g,e[B>>2]=e[O>>2],e[V>>2]=e[_>>2],k=Ct[k&15](t,B,V,s,o,l,C,h)|0,e[r>>2]=k,a=a+2|0}else{if(p=d[a>>0]|0,p<<24>>24>-1&&(M=e[U>>2]|0,(E[M+(p<<24>>24<<1)>>1]&8192)!=0)){do{if(a=a+1|0,(a|0)==(c|0)){a=c;break}if(p=d[a>>0]|0,p<<24>>24<=-1)break}while(E[M+(p<<24>>24<<1)>>1]&8192);for(p=C;;){h?(e[h+12>>2]|0)==(e[h+16>>2]|0)&&(Se[e[(e[h>>2]|0)+36>>2]&127](h)|0)==-1&&(e[r>>2]=0,h=0):h=0,g=(h|0)==0;do if(C){if((e[C+12>>2]|0)!=(e[C+16>>2]|0))if(g){k=p;break}else break t;if((Se[e[(e[C>>2]|0)+36>>2]&127](C)|0)!=-1)if(g^(p|0)==0){k=p,C=p;break}else break t;else{e[n>>2]=0,p=0,X=39;break}}else X=39;while(!1);if((X|0)==39){if(X=0,g)break t;k=p,C=0}if(g=h+12|0,p=e[g>>2]|0,I=h+16|0,(p|0)==(e[I>>2]|0)?p=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:p=N[p>>0]|0,(p&255)<<24>>24<=-1||!(E[(e[U>>2]|0)+(p<<24>>24<<1)>>1]&8192))break t;if(p=e[g>>2]|0,(p|0)==(e[I>>2]|0)){Se[e[(e[h>>2]|0)+40>>2]&127](h)|0,p=k;continue}else{e[g>>2]=p+1,p=k;continue}}}if(g=h+12|0,p=e[g>>2]|0,C=h+16|0,(p|0)==(e[C>>2]|0)?p=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:p=N[p>>0]|0,k=Ni[e[(e[F>>2]|0)+12>>2]&63](F,p&255)|0,k<<24>>24!=(Ni[e[(e[F>>2]|0)+12>>2]&63](F,d[a>>0]|0)|0)<<24>>24){X=57;break i}p=e[g>>2]|0,(p|0)==(e[C>>2]|0)?Se[e[(e[h>>2]|0)+40>>2]&127](h)|0:e[g>>2]=p+1,a=a+1|0}while(!1);if(h=e[r>>2]|0,!((a|0)!=(c|0)&(e[o>>2]|0)==0))break e}if((X|0)==13){e[o>>2]=4;break}else if((X|0)==17){e[o>>2]=4;break}else if((X|0)==20){e[o>>2]=4;break}else if((X|0)==57){e[o>>2]=4,h=e[r>>2]|0;break}}while(!1);h?(e[h+12>>2]|0)==(e[h+16>>2]|0)&&(Se[e[(e[h>>2]|0)+36>>2]&127](h)|0)==-1&&(e[r>>2]=0,h=0):h=0,a=(h|0)==0,p=e[n>>2]|0;do if(p){if((e[p+12>>2]|0)==(e[p+16>>2]|0)&&(Se[e[(e[p>>2]|0)+36>>2]&127](p)|0)==-1){e[n>>2]=0,X=67;break}a||(X=68)}else X=67;while(!1);return(X|0)==67&&a&&(X=68),(X|0)==68&&(e[o>>2]=e[o>>2]|2),y=K,h|0}function ru(t){t=t|0}function nu(t){t=t|0,a0(t)}function su(t){return t=t|0,2}function ou(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=vt(t,h,c,s,o,l,58907,58915)|0,y=a,t|0}function lu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,C=t+8|0,C=Se[e[(e[C>>2]|0)+20>>2]&127](C)|0,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],n=d[C>>0]|0,I=(n&1)==0,r=I?C+1|0:e[C+8>>2]|0,n=r+(I?(n&255)>>>1:e[C+4>>2]|0)|0,e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=vt(t,h,c,s,o,l,r,n)|0,y=a,t|0}function au(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;if(p=y,y=y+16|0,c=p+8|0,a=p+4|0,h=p,s=ai(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44220)|0,g=f,f=0,g&1)g=b()|0,Ee(s)|0,r0(g|0);else return Ee(s)|0,e[h>>2]=e[n>>2],e[c>>2]=e[h>>2],v2(t,l+24|0,r,c,o,a),y=p,e[r>>2]|0;return 0}function v2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0;a=y,y=y+16|0,c=a+4|0,h=a,t=t+8|0,t=Se[e[e[t>>2]>>2]&127](t)|0,e[h>>2]=e[s>>2],e[c>>2]=e[h>>2],n=(mr(n,c,t,t+168|0,l,o,0)|0)-t|0,(n|0)<168&&(e[r>>2]=((n|0)/12|0|0)%7|0),y=a}function fu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;if(p=y,y=y+16|0,c=p+8|0,a=p+4|0,h=p,s=ai(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44220)|0,g=f,f=0,g&1)g=b()|0,Ee(s)|0,r0(g|0);else return Ee(s)|0,e[h>>2]=e[n>>2],e[c>>2]=e[h>>2],w2(t,l+16|0,r,c,o,a),y=p,e[r>>2]|0;return 0}function w2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0;a=y,y=y+16|0,c=a+4|0,h=a,t=t+8|0,t=Se[e[(e[t>>2]|0)+4>>2]&127](t)|0,e[h>>2]=e[s>>2],e[c>>2]=e[h>>2],n=(mr(n,c,t,t+288|0,l,o,0)|0)-t|0,(n|0)<288&&(e[r>>2]=((n|0)/12|0|0)%12|0),y=a}function uu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;if(p=y,y=y+16|0,c=p+8|0,a=p+4|0,h=p,s=ai(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44220)|0,g=f,f=0,g&1)g=b()|0,Ee(s)|0,r0(g|0);else return Ee(s)|0,e[h>>2]=e[n>>2],e[c>>2]=e[h>>2],T2(t,l+20|0,r,c,o,a),y=p,e[r>>2]|0;return 0}function T2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,4)|0,e[o>>2]&4||((t|0)<69?t=t+2e3|0:t=(t+-69|0)>>>0<31?t+1900|0:t,e[r>>2]=t+-1900),y=a}function cu(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,$e=0,We=0,_e=0,le=0,be=0,ne=0,fe=0,vi=0,Ti=0,mi=0,_0=0,he=0,Pe=0;_0=y,y=y+144|0,h=_0+132|0,c=_0+116|0,le=_0+128|0,F=_0+124|0,ze=_0+120|0,be=_0+112|0,ne=_0+108|0,fe=_0+104|0,vi=_0+100|0,Ti=_0+96|0,mi=_0+92|0,p=_0+88|0,g=_0+84|0,C=_0+80|0,I=_0+76|0,k=_0+72|0,U=_0+68|0,B=_0+64|0,V=_0+60|0,O=_0+56|0,_=_0+52|0,M=_0+48|0,X=_0+44|0,K=_0+40|0,t0=_0+36|0,Z=_0+32|0,s0=_0+28|0,w0=_0+24|0,v0=_0+20|0,A0=_0+16|0,Y0=_0+12|0,Re=_0+8|0,$e=_0+4|0,We=_0,e[o>>2]=0,_e=ai(s)|0,e[le>>2]=_e,f=0,le=y0(37,le|0,44220)|0,Pe=f,f=0,Pe&1&&(Pe=b()|0,Ee(_e)|0,r0(Pe|0)),Ee(_e)|0;do switch(a<<24>>24|0){case 65:case 97:{e[F>>2]=e[n>>2],e[h>>2]=e[F>>2],v2(t,l+24|0,r,h,o,le),he=28;break}case 104:case 66:case 98:{e[ze>>2]=e[n>>2],e[h>>2]=e[ze>>2],w2(t,l+16|0,r,h,o,le),he=28;break}case 99:{he=t+8|0,he=Se[e[(e[he>>2]|0)+12>>2]&127](he)|0,e[be>>2]=e[r>>2],e[ne>>2]=e[n>>2],a=d[he>>0]|0,n=(a&1)==0,Pe=n?he+1|0:e[he+8>>2]|0,he=Pe+(n?(a&255)>>>1:e[he+4>>2]|0)|0,e[c>>2]=e[be>>2],e[h>>2]=e[ne>>2],he=vt(t,c,h,s,o,l,Pe,he)|0,e[r>>2]=he,he=28;break}case 101:case 100:{e[fe>>2]=e[n>>2],e[h>>2]=e[fe>>2],hu(t,l+12|0,r,h,o,le),he=28;break}case 68:{e[vi>>2]=e[r>>2],e[Ti>>2]=e[n>>2],e[c>>2]=e[vi>>2],e[h>>2]=e[Ti>>2],he=vt(t,c,h,s,o,l,58915,58923)|0,e[r>>2]=he,he=28;break}case 70:{e[mi>>2]=e[r>>2],e[p>>2]=e[n>>2],e[c>>2]=e[mi>>2],e[h>>2]=e[p>>2],he=vt(t,c,h,s,o,l,58923,58931)|0,e[r>>2]=he,he=28;break}case 72:{e[g>>2]=e[n>>2],e[h>>2]=e[g>>2],mu(t,l+8|0,r,h,o,le),he=28;break}case 73:{e[C>>2]=e[n>>2],e[h>>2]=e[C>>2],du(t,l+8|0,r,h,o,le),he=28;break}case 106:{e[I>>2]=e[n>>2],e[h>>2]=e[I>>2],gu(t,l+28|0,r,h,o,le),he=28;break}case 109:{e[k>>2]=e[n>>2],e[h>>2]=e[k>>2],pu(t,l+16|0,r,h,o,le),he=28;break}case 77:{e[U>>2]=e[n>>2],e[h>>2]=e[U>>2],Au(t,l+4|0,r,h,o,le),he=28;break}case 116:case 110:{e[B>>2]=e[n>>2],e[h>>2]=e[B>>2],Su(t,r,h,o,le),he=28;break}case 112:{e[V>>2]=e[n>>2],e[h>>2]=e[V>>2],vu(t,l+8|0,r,h,o,le),he=28;break}case 114:{e[O>>2]=e[r>>2],e[_>>2]=e[n>>2],e[c>>2]=e[O>>2],e[h>>2]=e[_>>2],he=vt(t,c,h,s,o,l,58931,58942)|0,e[r>>2]=he,he=28;break}case 82:{e[M>>2]=e[r>>2],e[X>>2]=e[n>>2],e[c>>2]=e[M>>2],e[h>>2]=e[X>>2],he=vt(t,c,h,s,o,l,58942,58947)|0,e[r>>2]=he,he=28;break}case 83:{e[K>>2]=e[n>>2],e[h>>2]=e[K>>2],wu(t,l,r,h,o,le),he=28;break}case 84:{e[t0>>2]=e[r>>2],e[Z>>2]=e[n>>2],e[c>>2]=e[t0>>2],e[h>>2]=e[Z>>2],he=vt(t,c,h,s,o,l,58947,58955)|0,e[r>>2]=he,he=28;break}case 119:{e[s0>>2]=e[n>>2],e[h>>2]=e[s0>>2],Tu(t,l+24|0,r,h,o,le),he=28;break}case 120:{Pe=e[(e[t>>2]|0)+20>>2]|0,e[w0>>2]=e[r>>2],e[v0>>2]=e[n>>2],e[c>>2]=e[w0>>2],e[h>>2]=e[v0>>2],c=rr[Pe&63](t,c,h,s,o,l)|0;break}case 88:{he=t+8|0,he=Se[e[(e[he>>2]|0)+24>>2]&127](he)|0,e[A0>>2]=e[r>>2],e[Y0>>2]=e[n>>2],a=d[he>>0]|0,n=(a&1)==0,Pe=n?he+1|0:e[he+8>>2]|0,he=Pe+(n?(a&255)>>>1:e[he+4>>2]|0)|0,e[c>>2]=e[A0>>2],e[h>>2]=e[Y0>>2],he=vt(t,c,h,s,o,l,Pe,he)|0,e[r>>2]=he,he=28;break}case 121:{e[Re>>2]=e[n>>2],e[h>>2]=e[Re>>2],T2(t,l+20|0,r,h,o,le),he=28;break}case 89:{e[$e>>2]=e[n>>2],e[h>>2]=e[$e>>2],Cu(t,l+20|0,r,h,o,le),he=28;break}case 37:{e[We>>2]=e[n>>2],e[h>>2]=e[We>>2],xu(t,r,h,o,le),he=28;break}default:e[o>>2]=e[o>>2]|4,he=28}while(!1);return(he|0)==28&&(c=e[r>>2]|0),y=_0,c|0}function hu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t+-1|0)>>>0<31&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function mu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<24&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function du(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t+-1|0)>>>0<12&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function gu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,3)|0,n=e[o>>2]|0,(t|0)<366&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function pu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<13&(n&4|0)==0?e[r>>2]=t+-1:e[o>>2]=n|4,y=a}function Au(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<60&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Su(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0;a=o+8|0;e:for(;;){o=e[r>>2]|0;do if(o){if((e[o+12>>2]|0)==(e[o+16>>2]|0))if((Se[e[(e[o>>2]|0)+36>>2]&127](o)|0)==-1){e[r>>2]=0,o=0;break}else{o=e[r>>2]|0;break}}else o=0;while(!1);o=(o|0)==0,t=e[n>>2]|0;do if(t){if((e[t+12>>2]|0)!=(e[t+16>>2]|0)){if(o)break;break e}if((Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)!=-1){if(o)break;break e}else{e[n>>2]=0,c=12;break}}else c=12;while(!1);if((c|0)==12)if(c=0,o){t=0;break}else t=0;if(o=e[r>>2]|0,l=e[o+12>>2]|0,(l|0)==(e[o+16>>2]|0)?o=Se[e[(e[o>>2]|0)+36>>2]&127](o)|0:o=N[l>>0]|0,(o&255)<<24>>24<=-1||!(E[(e[a>>2]|0)+(o<<24>>24<<1)>>1]&8192))break;if(o=e[r>>2]|0,t=o+12|0,l=e[t>>2]|0,(l|0)==(e[o+16>>2]|0)){Se[e[(e[o>>2]|0)+40>>2]&127](o)|0;continue}else{e[t>>2]=l+1;continue}}o=e[r>>2]|0;do if(o){if((e[o+12>>2]|0)==(e[o+16>>2]|0))if((Se[e[(e[o>>2]|0)+36>>2]&127](o)|0)==-1){e[r>>2]=0,o=0;break}else{o=e[r>>2]|0;break}}else o=0;while(!1);o=(o|0)==0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)&&(Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1){e[n>>2]=0,c=32;break}o||(c=33)}else c=32;while(!1);(c|0)==32&&o&&(c=33),(c|0)==33&&(e[s>>2]=e[s>>2]|2)}function vu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;g=y,y=y+16|0,c=g+4|0,h=g,p=t+8|0,p=Se[e[(e[p>>2]|0)+8>>2]&127](p)|0,t=d[p>>0]|0,t&1?a=e[p+4>>2]|0:a=(t&255)>>>1,t=d[p+12>>0]|0,t&1?t=e[p+16>>2]|0:t=(t&255)>>>1;do if((a|0)!=(0-t|0)){if(e[h>>2]=e[s>>2],e[c>>2]=e[h>>2],t=mr(n,c,p,p+24|0,l,o,0)|0,a=e[r>>2]|0,(t|0)==(p|0)&(a|0)==12){e[r>>2]=0;break}(a|0)<12&(t-p|0)==12&&(e[r>>2]=a+12)}else e[o>>2]=e[o>>2]|4;while(!1);y=g}function wu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<61&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Tu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,1)|0,n=e[o>>2]|0,(t|0)<7&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Cu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=at(n,t,o,l,4)|0,e[o>>2]&4||(e[r>>2]=t+-1900),y=a}function xu(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0;t=e[r>>2]|0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0))if((Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1){e[r>>2]=0,t=0;break}else{t=e[r>>2]|0;break}}else t=0;while(!1);l=(t|0)==0,t=e[n>>2]|0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)&&(Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1){e[n>>2]=0,c=11;break}l?(a=t,c=13):c=12}else c=11;while(!1);(c|0)==11&&(l?c=12:(a=0,c=13));e:do if((c|0)==12)e[s>>2]=e[s>>2]|6;else if((c|0)==13){if(t=e[r>>2]|0,l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=N[l>>0]|0,(Qe[e[(e[o>>2]|0)+36>>2]&63](o,t&255,0)|0)<<24>>24!=37){e[s>>2]=e[s>>2]|4;break}t=e[r>>2]|0,l=t+12|0,o=e[l>>2]|0,(o|0)==(e[t+16>>2]|0)?(Se[e[(e[t>>2]|0)+40>>2]&127](t)|0,t=e[r>>2]|0,t?c=21:t=0):(e[l>>2]=o+1,c=21);do if((c|0)==21&&(e[t+12>>2]|0)==(e[t+16>>2]|0))if((Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1){e[r>>2]=0,t=0;break}else{t=e[r>>2]|0;break}while(!1);t=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)&&(Se[e[(e[a>>2]|0)+36>>2]&127](a)|0)==-1){e[n>>2]=0,c=30;break}if(t)break e}else c=30;while(!1);if((c|0)==30&&!t)break;e[s>>2]=e[s>>2]|2}while(!1)}function wt(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;M=y,y=y+32|0,B=M+16|0,U=M+12|0,_=M+8|0,V=M+4|0,O=M,h=ai(s)|0,e[_>>2]=h,f=0,_=y0(37,_|0,44212)|0,k=f,f=0,k&1&&(M=b()|0,Ee(h)|0,r0(M|0)),Ee(h)|0,e[o>>2]=0,h=e[r>>2]|0;e:do if((a|0)!=(c|0)){i:for(;;){g=h,h?(p=e[h+12>>2]|0,(p|0)==(e[h+16>>2]|0)?p=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:p=e[p>>2]|0,(p|0)==-1?(e[r>>2]=0,h=0,I=1,k=0):(I=0,k=g)):(h=0,I=1,k=g),C=e[n>>2]|0,p=C;do if(C)if(g=e[C+12>>2]|0,(g|0)==(e[C+16>>2]|0)?g=Se[e[(e[C>>2]|0)+36>>2]&127](C)|0:g=e[g>>2]|0,(g|0)!=-1){if(I)break;F=17;break i}else{e[n>>2]=0,p=0,F=15;break}else F=15;while(!1);if((F|0)==15)if(F=0,I){F=17;break}else C=0;t:do if((Qe[e[(e[_>>2]|0)+52>>2]&63](_,e[a>>2]|0,0)|0)<<24>>24==37){if(g=a+4|0,(g|0)==(c|0)){F=21;break i}switch(I=Qe[e[(e[_>>2]|0)+52>>2]&63](_,e[g>>2]|0,0)|0,I<<24>>24){case 48:case 69:{if(C=a+8|0,(C|0)==(c|0)){F=24;break i}a=g,g=Qe[e[(e[_>>2]|0)+52>>2]&63](_,e[C>>2]|0,0)|0,h=I;break}default:g=I,h=0}I=e[(e[t>>2]|0)+36>>2]|0,e[V>>2]=k,e[O>>2]=p,e[U>>2]=e[V>>2],e[B>>2]=e[O>>2],k=Ct[I&15](t,U,B,s,o,l,g,h)|0,e[r>>2]=k,a=a+8|0}else{if(!(Qe[e[(e[_>>2]|0)+12>>2]&63](_,8192,e[a>>2]|0)|0)){if(g=h+12|0,p=e[g>>2]|0,C=h+16|0,(p|0)==(e[C>>2]|0)?p=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:p=e[p>>2]|0,k=Ni[e[(e[_>>2]|0)+28>>2]&63](_,p)|0,(k|0)!=(Ni[e[(e[_>>2]|0)+28>>2]&63](_,e[a>>2]|0)|0)){F=61;break i}p=e[g>>2]|0,(p|0)==(e[C>>2]|0)?Se[e[(e[h>>2]|0)+40>>2]&127](h)|0:e[g>>2]=p+4,a=a+4|0;break}do if(a=a+4|0,(a|0)==(c|0)){a=c;break}while(Qe[e[(e[_>>2]|0)+12>>2]&63](_,8192,e[a>>2]|0)|0);for(p=C,I=C;;){h?(g=e[h+12>>2]|0,(g|0)==(e[h+16>>2]|0)?g=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:g=e[g>>2]|0,(g|0)==-1?(e[r>>2]=0,C=1,h=0):C=0):(C=1,h=0);do if(I)if(g=e[I+12>>2]|0,(g|0)==(e[I+16>>2]|0)?g=Se[e[(e[I>>2]|0)+36>>2]&127](I)|0:g=e[g>>2]|0,(g|0)!=-1)if(C^(p|0)==0){k=p,I=p;break}else break t;else{e[n>>2]=0,p=0,F=44;break}else F=44;while(!1);if((F|0)==44){if(F=0,C)break t;k=p,I=0}if(g=h+12|0,p=e[g>>2]|0,C=h+16|0,(p|0)==(e[C>>2]|0)?p=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:p=e[p>>2]|0,!(Qe[e[(e[_>>2]|0)+12>>2]&63](_,8192,p)|0))break t;if(p=e[g>>2]|0,(p|0)==(e[C>>2]|0)){Se[e[(e[h>>2]|0)+40>>2]&127](h)|0,p=k;continue}else{e[g>>2]=p+4,p=k;continue}}}while(!1);if(h=e[r>>2]|0,!((a|0)!=(c|0)&(e[o>>2]|0)==0))break e}if((F|0)==17){e[o>>2]=4;break}else if((F|0)==21){e[o>>2]=4;break}else if((F|0)==24){e[o>>2]=4;break}else if((F|0)==61){e[o>>2]=4,h=e[r>>2]|0;break}}while(!1);h?(a=e[h+12>>2]|0,(a|0)==(e[h+16>>2]|0)?a=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:a=e[a>>2]|0,(a|0)==-1?(e[r>>2]=0,h=0,g=1):g=0):(h=0,g=1),a=e[n>>2]|0;do if(a)if(p=e[a+12>>2]|0,(p|0)==(e[a+16>>2]|0)?a=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:a=e[p>>2]|0,(a|0)!=-1){if(g)break;F=76;break}else{e[n>>2]=0,F=74;break}else F=74;while(!1);return(F|0)==74&&g&&(F=76),(F|0)==76&&(e[o>>2]=e[o>>2]|2),y=M,h|0}function yu(t){t=t|0}function Iu(t){t=t|0,a0(t)}function Du(t){return t=t|0,2}function Eu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=wt(t,h,c,s,o,l,44788,44820)|0,y=a,t|0}function ku(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,k=t+8|0,k=Se[e[(e[k>>2]|0)+20>>2]&127](k)|0,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],C=d[k>>0]|0,I=(C&1)==0,n=k+4|0,r=I?n:e[k+8>>2]|0,n=r+((I?(C&255)>>>1:e[n>>2]|0)<<2)|0,e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=wt(t,h,c,s,o,l,r,n)|0,y=a,t|0}function Fu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;if(p=y,y=y+16|0,c=p+8|0,a=p+4|0,h=p,s=ai(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44212)|0,g=f,f=0,g&1)g=b()|0,Ee(s)|0,r0(g|0);else return Ee(s)|0,e[h>>2]=e[n>>2],e[c>>2]=e[h>>2],C2(t,l+24|0,r,c,o,a),y=p,e[r>>2]|0;return 0}function C2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0;a=y,y=y+16|0,c=a+4|0,h=a,t=t+8|0,t=Se[e[e[t>>2]>>2]&127](t)|0,e[h>>2]=e[s>>2],e[c>>2]=e[h>>2],n=(dr(n,c,t,t+168|0,l,o,0)|0)-t|0,(n|0)<168&&(e[r>>2]=((n|0)/12|0|0)%7|0),y=a}function Mu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;if(p=y,y=y+16|0,c=p+8|0,a=p+4|0,h=p,s=ai(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44212)|0,g=f,f=0,g&1)g=b()|0,Ee(s)|0,r0(g|0);else return Ee(s)|0,e[h>>2]=e[n>>2],e[c>>2]=e[h>>2],x2(t,l+16|0,r,c,o,a),y=p,e[r>>2]|0;return 0}function x2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0;a=y,y=y+16|0,c=a+4|0,h=a,t=t+8|0,t=Se[e[(e[t>>2]|0)+4>>2]&127](t)|0,e[h>>2]=e[s>>2],e[c>>2]=e[h>>2],n=(dr(n,c,t,t+288|0,l,o,0)|0)-t|0,(n|0)<288&&(e[r>>2]=((n|0)/12|0|0)%12|0),y=a}function _u(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;if(p=y,y=y+16|0,c=p+8|0,a=p+4|0,h=p,s=ai(s)|0,e[a>>2]=s,f=0,a=y0(37,a|0,44212)|0,g=f,f=0,g&1)g=b()|0,Ee(s)|0,r0(g|0);else return Ee(s)|0,e[h>>2]=e[n>>2],e[c>>2]=e[h>>2],y2(t,l+20|0,r,c,o,a),y=p,e[r>>2]|0;return 0}function y2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,4)|0,e[o>>2]&4||((t|0)<69?t=t+2e3|0:t=(t+-69|0)>>>0<31?t+1900|0:t,e[r>>2]=t+-1900),y=a}function Ru(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,$e=0,We=0,_e=0,le=0,be=0,ne=0,fe=0,vi=0,Ti=0,mi=0,_0=0,he=0,Pe=0;_0=y,y=y+144|0,h=_0+132|0,c=_0+116|0,le=_0+128|0,F=_0+124|0,ze=_0+120|0,be=_0+112|0,ne=_0+108|0,fe=_0+104|0,vi=_0+100|0,Ti=_0+96|0,mi=_0+92|0,p=_0+88|0,g=_0+84|0,C=_0+80|0,I=_0+76|0,k=_0+72|0,U=_0+68|0,B=_0+64|0,V=_0+60|0,O=_0+56|0,_=_0+52|0,M=_0+48|0,X=_0+44|0,K=_0+40|0,t0=_0+36|0,Z=_0+32|0,s0=_0+28|0,w0=_0+24|0,v0=_0+20|0,A0=_0+16|0,Y0=_0+12|0,Re=_0+8|0,$e=_0+4|0,We=_0,e[o>>2]=0,_e=ai(s)|0,e[le>>2]=_e,f=0,le=y0(37,le|0,44212)|0,Pe=f,f=0,Pe&1&&(Pe=b()|0,Ee(_e)|0,r0(Pe|0)),Ee(_e)|0;do switch(a<<24>>24|0){case 65:case 97:{e[F>>2]=e[n>>2],e[h>>2]=e[F>>2],C2(t,l+24|0,r,h,o,le),he=28;break}case 104:case 66:case 98:{e[ze>>2]=e[n>>2],e[h>>2]=e[ze>>2],x2(t,l+16|0,r,h,o,le),he=28;break}case 99:{Pe=t+8|0,Pe=Se[e[(e[Pe>>2]|0)+12>>2]&127](Pe)|0,e[be>>2]=e[r>>2],e[ne>>2]=e[n>>2],a=d[Pe>>0]|0,n=(a&1)==0,he=Pe+4|0,Pe=n?he:e[Pe+8>>2]|0,he=Pe+((n?(a&255)>>>1:e[he>>2]|0)<<2)|0,e[c>>2]=e[be>>2],e[h>>2]=e[ne>>2],he=wt(t,c,h,s,o,l,Pe,he)|0,e[r>>2]=he,he=28;break}case 101:case 100:{e[fe>>2]=e[n>>2],e[h>>2]=e[fe>>2],Pu(t,l+12|0,r,h,o,le),he=28;break}case 68:{e[vi>>2]=e[r>>2],e[Ti>>2]=e[n>>2],e[c>>2]=e[vi>>2],e[h>>2]=e[Ti>>2],he=wt(t,c,h,s,o,l,44820,44852)|0,e[r>>2]=he,he=28;break}case 70:{e[mi>>2]=e[r>>2],e[p>>2]=e[n>>2],e[c>>2]=e[mi>>2],e[h>>2]=e[p>>2],he=wt(t,c,h,s,o,l,44852,44884)|0,e[r>>2]=he,he=28;break}case 72:{e[g>>2]=e[n>>2],e[h>>2]=e[g>>2],Lu(t,l+8|0,r,h,o,le),he=28;break}case 73:{e[C>>2]=e[n>>2],e[h>>2]=e[C>>2],Uu(t,l+8|0,r,h,o,le),he=28;break}case 106:{e[I>>2]=e[n>>2],e[h>>2]=e[I>>2],Ou(t,l+28|0,r,h,o,le),he=28;break}case 109:{e[k>>2]=e[n>>2],e[h>>2]=e[k>>2],Nu(t,l+16|0,r,h,o,le),he=28;break}case 77:{e[U>>2]=e[n>>2],e[h>>2]=e[U>>2],Bu(t,l+4|0,r,h,o,le),he=28;break}case 116:case 110:{e[B>>2]=e[n>>2],e[h>>2]=e[B>>2],Vu(t,r,h,o,le),he=28;break}case 112:{e[V>>2]=e[n>>2],e[h>>2]=e[V>>2],qu(t,l+8|0,r,h,o,le),he=28;break}case 114:{e[O>>2]=e[r>>2],e[_>>2]=e[n>>2],e[c>>2]=e[O>>2],e[h>>2]=e[_>>2],he=wt(t,c,h,s,o,l,44884,44928)|0,e[r>>2]=he,he=28;break}case 82:{e[M>>2]=e[r>>2],e[X>>2]=e[n>>2],e[c>>2]=e[M>>2],e[h>>2]=e[X>>2],he=wt(t,c,h,s,o,l,44928,44948)|0,e[r>>2]=he,he=28;break}case 83:{e[K>>2]=e[n>>2],e[h>>2]=e[K>>2],bu(t,l,r,h,o,le),he=28;break}case 84:{e[t0>>2]=e[r>>2],e[Z>>2]=e[n>>2],e[c>>2]=e[t0>>2],e[h>>2]=e[Z>>2],he=wt(t,c,h,s,o,l,44948,44980)|0,e[r>>2]=he,he=28;break}case 119:{e[s0>>2]=e[n>>2],e[h>>2]=e[s0>>2],Gu(t,l+24|0,r,h,o,le),he=28;break}case 120:{Pe=e[(e[t>>2]|0)+20>>2]|0,e[w0>>2]=e[r>>2],e[v0>>2]=e[n>>2],e[c>>2]=e[w0>>2],e[h>>2]=e[v0>>2],c=rr[Pe&63](t,c,h,s,o,l)|0;break}case 88:{Pe=t+8|0,Pe=Se[e[(e[Pe>>2]|0)+24>>2]&127](Pe)|0,e[A0>>2]=e[r>>2],e[Y0>>2]=e[n>>2],a=d[Pe>>0]|0,n=(a&1)==0,he=Pe+4|0,Pe=n?he:e[Pe+8>>2]|0,he=Pe+((n?(a&255)>>>1:e[he>>2]|0)<<2)|0,e[c>>2]=e[A0>>2],e[h>>2]=e[Y0>>2],he=wt(t,c,h,s,o,l,Pe,he)|0,e[r>>2]=he,he=28;break}case 121:{e[Re>>2]=e[n>>2],e[h>>2]=e[Re>>2],y2(t,l+20|0,r,h,o,le),he=28;break}case 89:{e[$e>>2]=e[n>>2],e[h>>2]=e[$e>>2],Qu(t,l+20|0,r,h,o,le),he=28;break}case 37:{e[We>>2]=e[n>>2],e[h>>2]=e[We>>2],zu(t,r,h,o,le),he=28;break}default:e[o>>2]=e[o>>2]|4,he=28}while(!1);return(he|0)==28&&(c=e[r>>2]|0),y=_0,c|0}function Pu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t+-1|0)>>>0<31&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Lu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<24&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Uu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t+-1|0)>>>0<12&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Ou(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,3)|0,n=e[o>>2]|0,(t|0)<366&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Nu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<13&(n&4|0)==0?e[r>>2]=t+-1:e[o>>2]=n|4,y=a}function Bu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<60&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Vu(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0;e:for(;;){t=e[r>>2]|0;do if(t)if(l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,(t|0)==-1){e[r>>2]=0,a=1;break}else{a=(e[r>>2]|0)==0;break}else a=1;while(!1);l=e[n>>2]|0;do if(l)if(t=e[l+12>>2]|0,(t|0)==(e[l+16>>2]|0)?t=Se[e[(e[l>>2]|0)+36>>2]&127](l)|0:t=e[t>>2]|0,(t|0)!=-1)if(a){a=l;break}else{a=l;break e}else{e[n>>2]=0,c=15;break}else c=15;while(!1);if((c|0)==15)if(c=0,a){a=0;break}else a=0;if(t=e[r>>2]|0,l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,!(Qe[e[(e[o>>2]|0)+12>>2]&63](o,8192,t)|0))break;if(t=e[r>>2]|0,l=t+12|0,a=e[l>>2]|0,(a|0)==(e[t+16>>2]|0)){Se[e[(e[t>>2]|0)+40>>2]&127](t)|0;continue}else{e[l>>2]=a+4;continue}}t=e[r>>2]|0;do if(t)if(l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,(t|0)==-1){e[r>>2]=0,l=1;break}else{l=(e[r>>2]|0)==0;break}else l=1;while(!1);do if(a)if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)?t=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:t=e[t>>2]|0,(t|0)!=-1){if(l)break;c=39;break}else{e[n>>2]=0,c=37;break}else c=37;while(!1);(c|0)==37&&l&&(c=39),(c|0)==39&&(e[s>>2]=e[s>>2]|2)}function qu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;g=y,y=y+16|0,c=g+4|0,h=g,p=t+8|0,p=Se[e[(e[p>>2]|0)+8>>2]&127](p)|0,t=d[p>>0]|0,t&1?a=e[p+4>>2]|0:a=(t&255)>>>1,t=d[p+12>>0]|0,t&1?t=e[p+16>>2]|0:t=(t&255)>>>1;do if((a|0)!=(0-t|0)){if(e[h>>2]=e[s>>2],e[c>>2]=e[h>>2],t=dr(n,c,p,p+24|0,l,o,0)|0,a=e[r>>2]|0,(t|0)==(p|0)&(a|0)==12){e[r>>2]=0;break}(a|0)<12&(t-p|0)==12&&(e[r>>2]=a+12)}else e[o>>2]=e[o>>2]|4;while(!1);y=g}function bu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,2)|0,n=e[o>>2]|0,(t|0)<61&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Gu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,1)|0,n=e[o>>2]|0,(t|0)<7&(n&4|0)==0?e[r>>2]=t:e[o>>2]=n|4,y=a}function Qu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;a=y,y=y+16|0,t=a+4|0,c=a,e[c>>2]=e[s>>2],e[t>>2]=e[c>>2],t=ft(n,t,o,l,4)|0,e[o>>2]&4||(e[r>>2]=t+-1900),y=a}function zu(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0;t=e[r>>2]|0;do if(t)if(l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,(t|0)==-1){e[r>>2]=0,a=1;break}else{a=(e[r>>2]|0)==0;break}else a=1;while(!1);l=e[n>>2]|0;do if(l)if(t=e[l+12>>2]|0,(t|0)==(e[l+16>>2]|0)?t=Se[e[(e[l>>2]|0)+36>>2]&127](l)|0:t=e[t>>2]|0,(t|0)!=-1)if(a){c=l,h=17;break}else{h=16;break}else{e[n>>2]=0,h=14;break}else h=14;while(!1);(h|0)==14&&(a?h=16:(c=0,h=17));e:do if((h|0)==16)e[s>>2]=e[s>>2]|6;else if((h|0)==17){if(t=e[r>>2]|0,l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,(Qe[e[(e[o>>2]|0)+52>>2]&63](o,t,0)|0)<<24>>24!=37){e[s>>2]=e[s>>2]|4;break}t=e[r>>2]|0,l=t+12|0,a=e[l>>2]|0,(a|0)==(e[t+16>>2]|0)?(Se[e[(e[t>>2]|0)+40>>2]&127](t)|0,t=e[r>>2]|0,t?h=25:l=1):(e[l>>2]=a+4,h=25);do if((h|0)==25)if(l=e[t+12>>2]|0,(l|0)==(e[t+16>>2]|0)?t=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0:t=e[l>>2]|0,(t|0)==-1){e[r>>2]=0,l=1;break}else{l=(e[r>>2]|0)==0;break}while(!1);do if(c)if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)?t=Se[e[(e[c>>2]|0)+36>>2]&127](c)|0:t=e[t>>2]|0,(t|0)!=-1){if(l)break e;break}else{e[n>>2]=0,h=37;break}else h=37;while(!1);if((h|0)==37&&!l)break;e[s>>2]=e[s>>2]|2}while(!1)}function Hu(t){t=t|0,or(t+8|0)}function or(t){t=t|0;var r=0,n=0,s=0;r=e[t>>2]|0,f=0,n=p0(3)|0,s=f,f=0;do if(!(s&1)){if((r|0)!=(n|0)&&(f=0,n0(188,e[t>>2]|0),s=f,f=0,s&1))break;return}while(!1);s=b(0)|0,Ie(s)}function Yu(t){t=t|0,or(t+8|0),a0(t)}function ju(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0;if(h=y,y=y+112|0,c=h+4|0,n=h,e[n>>2]=c+100,I2(t+8|0,c,n,o,l,a),o=e[n>>2]|0,n=e[r>>2]|0,(c|0)!=(o|0))do{a=d[c>>0]|0;do if(n)if(s=n+24|0,l=e[s>>2]|0,(l|0)==(e[n+28>>2]|0)){r=(Ni[e[(e[n>>2]|0)+52>>2]&63](n,a&255)|0)==-1,n=r?0:n;break}else{e[s>>2]=l+1,d[l>>0]=a;break}else n=0;while(!1);c=c+1|0}while((c|0)!=(o|0));return y=h,n|0}function I2(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0;p=y,y=y+16|0,h=p,d[h>>0]=37,a=h+1|0,d[a>>0]=o,c=h+2|0,d[c>>0]=l,d[h+3>>0]=0,l<<24>>24&&(d[a>>0]=l,d[c>>0]=o),t=r+(Vn(r|0,(e[n>>2]|0)-r|0,h|0,s|0,e[t>>2]|0)|0)|0,e[n>>2]=t,y=p}function Xu(t){t=t|0,or(t+8|0)}function Ku(t){t=t|0,or(t+8|0),a0(t)}function Wu(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0;if(c=y,y=y+416|0,s=c+8|0,n=c,e[n>>2]=s+400,Zu(t+8|0,s,n,o,l,a),t=e[n>>2]|0,n=e[r>>2]|0,(s|0)!=(t|0)){o=s;do s=e[o>>2]|0,n?(l=n+24|0,a=e[l>>2]|0,(a|0)==(e[n+28>>2]|0)?s=Ni[e[(e[n>>2]|0)+52>>2]&63](n,s)|0:(e[l>>2]=a+4,e[a>>2]=s),n=(s|0)==-1?0:n):n=0,o=o+4|0;while((o|0)!=(t|0))}return y=c,n|0}function Zu(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;if(a=y,y=y+128|0,p=a+16|0,g=a+12|0,c=a,h=a+8|0,e[g>>2]=p+100,I2(t,p,g,s,o,l),o=c,e[o>>2]=0,e[o+4>>2]=0,e[h>>2]=p,o=(e[n>>2]|0)-r>>2,l=nt(e[t>>2]|0)|0,f=0,o=k0(18,r|0,h|0,o|0,c|0)|0,t=f,f=0,t&1&&(o=b()|0,l|0&&(f=0,u0(75,l|0)|0,g=f,f=0,g&1)&&(g=b(0)|0,Ie(g)),r0(o|0)),l|0&&(f=0,u0(75,l|0)|0,g=f,f=0,g&1)&&(g=b(0)|0,Ie(g)),(o|0)==-1)lr(58955);else{e[n>>2]=r+(o<<2),y=a;return}}function Ju(t){t=t|0}function $u(t){t=t|0,a0(t)}function e4(t){return t=t|0,127}function i4(t){return t=t|0,127}function t4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function r4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function n4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function s4(t,r){t=t|0,r=r|0,a1(t,1,45)}function o4(t){return t=t|0,0}function l4(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function a4(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function f4(t){t=t|0}function u4(t){t=t|0,a0(t)}function c4(t){return t=t|0,127}function h4(t){return t=t|0,127}function m4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function d4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function g4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function p4(t,r){t=t|0,r=r|0,a1(t,1,45)}function A4(t){return t=t|0,0}function S4(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function w4(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function T4(t){t=t|0}function C4(t){t=t|0,a0(t)}function x4(t){return t=t|0,2147483647}function y4(t){return t=t|0,2147483647}function I4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function D4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function E4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function k4(t,r){t=t|0,r=r|0,c1(t,1,45)}function F4(t){return t=t|0,0}function M4(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function _4(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function R4(t){t=t|0}function P4(t){t=t|0,a0(t)}function L4(t){return t=t|0,2147483647}function U4(t){return t=t|0,2147483647}function O4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function N4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function B4(t,r){t=t|0,r=r|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function V4(t,r){t=t|0,r=r|0,c1(t,1,45)}function q4(t){return t=t|0,0}function G4(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function Q4(t,r){t=t|0,r=r|0,d[t>>0]=2,d[t+1>>0]=3,d[t+2>>0]=0,d[t+3>>0]=4}function z4(t){t=t|0}function H4(t){t=t|0,a0(t)}function Y4(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;if(t0=y,y=y+240|0,X=t0+24|0,K=t0,t=t0+136|0,s0=t0+16|0,M=t0+12|0,Z=t0+8|0,C=t0+134|0,h=t0+4|0,F=t0+124|0,e[s0>>2]=t,w0=s0+4|0,e[w0>>2]=189,p=t+100|0,f=0,c=u0(68,o|0)|0,_=f,f=0,_&1)h=b()|0,e[s0>>2]=0,c=189,A0=45;else{e[Z>>2]=c,f=0,t=y0(37,Z|0,44220)|0,_=f,f=0;e:do if(!(_&1)&&(d[C>>0]=0,e[h>>2]=e[n>>2],g=e[o+4>>2]|0,f=0,e[X>>2]=e[h>>2],g=Me(1,r|0,X|0,s|0,Z|0,g|0,l|0,C|0,t|0,s0|0,M|0,p|0)|0,_=f,f=0,!(_&1))){i:do if(g){if(f=0,k0(e[(e[t>>2]|0)+32>>2]|0,t|0,58976,58986,F|0)|0,_=f,f=0,_&1){A0=10;break e}h=e[M>>2]|0,p=e[s0>>2]|0,t=h-p|0,(t|0)>98?(t=xi(t+2|0)|0,c=t,t?A0=13:(f=0,we(6),_=f,f=0,_&1||(t=0,A0=13))):(c=0,t=X,A0=13);do if((A0|0)==13){if(d[C>>0]|0&&(d[t>>0]=45,t=t+1|0),O=F+10|0,_=F,p>>>0>>0){g=F+1|0,s=g+1|0,o=s+1|0,C=o+1|0,I=C+1|0,k=I+1|0,U=k+1|0,B=U+1|0,V=B+1|0;do{h=d[p>>0]|0;do if((d[F>>0]|0)!=h<<24>>24)if((d[g>>0]|0)!=h<<24>>24)if((d[s>>0]|0)!=h<<24>>24)if((d[o>>0]|0)!=h<<24>>24)if((d[C>>0]|0)==h<<24>>24)h=C;else{if((d[I>>0]|0)==h<<24>>24){h=I;break}if((d[k>>0]|0)==h<<24>>24){h=k;break}if((d[U>>0]|0)==h<<24>>24){h=U;break}if((d[B>>0]|0)==h<<24>>24){h=B;break}h=(d[V>>0]|0)==h<<24>>24?V:O}else h=o;else h=s;else h=g;else h=F;while(!1);d[t>>0]=d[58976+(h-_)>>0]|0,p=p+1|0,t=t+1|0}while(p>>>0<(e[M>>2]|0)>>>0)}if(d[t>>0]=0,e[K>>2]=a,(Mn(X,58987,K)|0)!=1&&(f=0,n0(190,58991),a=f,f=0,a&1))break;c&&Ze(c);break i}while(!1);if(t=b()|0,!c){h=t,c=s0;break e}Ze(c),h=t,c=s0;break e}while(!1);t=e[r>>2]|0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1){A0=10;break e}if((t|0)==-1){e[r>>2]=0,t=0;break}else{t=e[r>>2]|0;break}}}else t=0;while(!1);c=(t|0)==0,t=e[n>>2]|0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1){A0=10;break e}if((t|0)==-1){e[n>>2]=0,A0=37;break}}c||(A0=38)}else A0=37;while(!1);return(A0|0)==37&&c&&(A0=38),(A0|0)==38&&(e[l>>2]=e[l>>2]|2),c=e[r>>2]|0,Ee(e[Z>>2]|0)|0,t=e[s0>>2]|0,e[s0>>2]=0,t|0&&(f=0,n0(e[w0>>2]|0,t|0),A0=f,f=0,A0&1)&&(A0=b(0)|0,Ie(A0)),y=t0,c|0}else A0=10;while(!1);(A0|0)==10&&(h=b()|0,c=s0),Ee(e[Z>>2]|0)|0,t=e[c>>2]|0,e[c>>2]=0,t?(c=e[w0>>2]|0,A0=45):v0=h}return(A0|0)==45&&(f=0,n0(c|0,t|0),A0=f,f=0,A0&1?(A0=b(0)|0,Ie(A0)):v0=h),r0(v0|0),0}function j4(t){t=t|0}function X4(t,r,n,s,o,l,a,c,h,p,g){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0;var C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,$e=0,We=0,_e=0,le=0,be=0,ne=0,fe=0,vi=0,Ti=0,mi=0,_0=0,he=0,Pe=0,li=0,ri=0,fi=0,yi=0,gi=0,xt=0,Ei=0;gi=y,y=y+512|0,le=gi+88|0,U=gi+96|0,Ei=gi+80|0,vi=gi+72|0,fe=gi+68|0,Ti=gi+500|0,be=gi+497|0,mi=gi+496|0,Pe=gi+56|0,yi=gi+44|0,ri=gi+32|0,li=gi+20|0,fi=gi+8|0,ne=gi+4|0,he=gi,e[le>>2]=g,e[Ei>>2]=U,xt=Ei+4|0,e[xt>>2]=189,e[vi>>2]=U,e[fe>>2]=U+400,e[Pe>>2]=0,e[Pe+4>>2]=0,e[Pe+8>>2]=0,e[yi>>2]=0,e[yi+4>>2]=0,e[yi+8>>2]=0,e[ri>>2]=0,e[ri+4>>2]=0,e[ri+8>>2]=0,e[li>>2]=0,e[li+4>>2]=0,e[li+8>>2]=0,e[fi>>2]=0,e[fi+4>>2]=0,e[fi+8>>2]=0,f=0,Ci(1,n|0,s|0,Ti|0,be|0,mi|0,Pe|0,yi|0,ri|0,li|0,ne|0),_e=f,f=0;e:do if(_e&1)c=b()|0;else{e[p>>2]=e[h>>2],A0=c+8|0,Y0=ri+4|0,ze=li+4|0,Re=li+8|0,$e=li+1|0,We=ri+8|0,_e=ri+1|0,F=(o&512|0)!=0,M=yi+8|0,X=yi+1|0,K=yi+4|0,t0=fi+4|0,Z=fi+8|0,s0=fi+1|0,w0=Ti+3|0,v0=Pe+4|0,_=0,k=0;i:for(;;){g=e[t>>2]|0;do if(g){if((e[g+12>>2]|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,O=f,f=0,O&1){_0=24;break i}if((g|0)==-1){e[t>>2]=0,g=0;break}else{g=e[t>>2]|0;break}}}else g=0;while(!1);g=(g|0)==0,c=e[r>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0))if(g){O=c;break}else{_0=235;break i}if(f=0,n=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=24;break i}if((n|0)!=-1)if(g){O=c;break}else{_0=235;break i}else{e[r>>2]=0,_0=15;break}}else _0=15;while(!1);if((_0|0)==15)if(_0=0,g){_0=235;break}else O=0;t:do switch(d[Ti+_>>0]|0){case 1:{if((_|0)!=3){if(g=e[t>>2]|0,c=e[g+12>>2]|0,(c|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,_0=f,f=0,_0&1){_0=24;break i}}else g=N[c>>0]|0;if((g&255)<<24>>24<=-1){_0=40;break i}if(!(E[(e[A0>>2]|0)+(g<<24>>24<<1)>>1]&8192)){_0=40;break i}if(g=e[t>>2]|0,c=g+12|0,n=e[c>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,_0=f,f=0,_0&1){_0=24;break i}}else e[c>>2]=n+1,g=N[n>>0]|0;if(f=0,h0(67,fi|0,g&255|0),_0=f,f=0,_0&1){_0=24;break i}else g=O,s=O,_0=42}break}case 0:{(_|0)!=3&&(g=O,s=O,_0=42);break}case 3:{if(c=d[ri>>0]|0,g=c&1?e[Y0>>2]|0:(c&255)>>>1,n=d[li>>0]|0,s=n&1?e[ze>>2]|0:(n&255)>>>1,(g|0)!=(0-s|0)){if(!g){if(g=e[t>>2]|0,c=e[g+12>>2]|0,(c|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,O=f,f=0,O&1){_0=24;break i}c=d[li>>0]|0}else g=N[c>>0]|0,c=n;if((g&255)<<24>>24!=(d[(c&1?e[Re>>2]|0:$e)>>0]|0))break t;if(g=e[t>>2]|0,c=g+12|0,n=e[c>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,O=f,f=0,O&1){_0=24;break i}}else e[c>>2]=n+1;d[a>>0]=1,O=d[li>>0]|0,k=(O&1?e[ze>>2]|0:(O&255)>>>1)>>>0>1?li:k;break t}if(o=e[t>>2]|0,C=e[o+12>>2]|0,n=e[o+16>>2]|0,g=(C|0)==(n|0),!s){if(g){if(f=0,g=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,O=f,f=0,O&1){_0=24;break i}c=d[ri>>0]|0}else g=N[C>>0]|0;if((g&255)<<24>>24!=(d[(c&1?e[We>>2]|0:_e)>>0]|0)){d[a>>0]=1;break t}if(g=e[t>>2]|0,c=g+12|0,n=e[c>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,O=f,f=0,O&1){_0=24;break i}}else e[c>>2]=n+1;O=d[ri>>0]|0,k=(O&1?e[Y0>>2]|0:(O&255)>>>1)>>>0>1?ri:k;break t}if(g){if(f=0,g=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,O=f,f=0,O&1){_0=24;break i}n=e[t>>2]|0,c=d[ri>>0]|0,o=n,C=e[n+12>>2]|0,n=e[n+16>>2]|0}else g=N[C>>0]|0;if(s=o+12|0,n=(C|0)==(n|0),(g&255)<<24>>24==(d[(c&1?e[We>>2]|0:_e)>>0]|0)){if(n){if(f=0,u0(e[(e[o>>2]|0)+40>>2]|0,o|0)|0,O=f,f=0,O&1){_0=24;break i}}else e[s>>2]=C+1;O=d[ri>>0]|0,k=(O&1?e[Y0>>2]|0:(O&255)>>>1)>>>0>1?ri:k;break t}if(n){if(f=0,g=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,O=f,f=0,O&1){_0=24;break i}}else g=N[C>>0]|0;if((g&255)<<24>>24!=(d[(d[li>>0]&1?e[Re>>2]|0:$e)>>0]|0)){_0=104;break i}if(g=e[t>>2]|0,c=g+12|0,n=e[c>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,O=f,f=0,O&1){_0=24;break i}}else e[c>>2]=n+1;d[a>>0]=1,O=d[li>>0]|0,k=(O&1?e[ze>>2]|0:(O&255)>>>1)>>>0>1?li:k}break}case 2:{if(!(_>>>0<2|(k|0)!=0)&&!(F|(_|0)==2&(d[w0>>0]|0)!=0)){k=0;break t}B=d[yi>>0]|0,g=(B&1)==0,V=e[M>>2]|0,n=g?X:V,I=n;r:do if(_|0&&(N[Ti+(_+-1)>>0]|0)<2){C=g?(B&255)>>>1:e[K>>2]|0,s=n+C|0,o=e[A0>>2]|0;n:do if(!C)c=I;else{C=n,c=I;do{if(g=d[C>>0]|0,g<<24>>24<=-1||!(E[o+(g<<24>>24<<1)>>1]&8192))break n;C=C+1|0,c=C}while((C|0)!=(s|0))}while(!1);if(s=c-I|0,o=d[fi>>0]|0,g=(o&1)==0,o=g?(o&255)>>>1:e[t0>>2]|0,o>>>0>=s>>>0){if(g=g?s0:e[Z>>2]|0,C=g+o|0,(c|0)!=(I|0))for(g=g+(o-s)|0;;){if((d[g>>0]|0)!=(d[n>>0]|0)){c=I;break r}if(g=g+1|0,(g|0)==(C|0))break;n=n+1|0}}else c=I}else c=I;while(!1);g=(B&1)==0,g=(g?X:V)+(g?(B&255)>>>1:e[K>>2]|0)|0;r:do if((c|0)!=(g|0))for(o=O,s=O,g=c;;){c=e[t>>2]|0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,c=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=21;break i}if((c|0)==-1){e[t>>2]=0,c=0;break}else{c=e[t>>2]|0;break}}}else c=0;while(!1);n=(c|0)==0;do if(s){if((e[s+12>>2]|0)!=(e[s+16>>2]|0))if(n){c=o,C=s;break}else break r;if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,O=f,f=0,O&1){_0=21;break i}if((c|0)!=-1)if(n^(o|0)==0){c=o,C=o;break}else break r;else{e[r>>2]=0,c=0,_0=131;break}}else c=o,_0=131;while(!1);if((_0|0)==131){if(_0=0,n)break r;C=0}if(n=e[t>>2]|0,s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,O=f,f=0,O&1){_0=21;break i}}else n=N[s>>0]|0;if((n&255)<<24>>24!=(d[g>>0]|0))break r;if(n=e[t>>2]|0,s=n+12|0,o=e[s>>2]|0,(o|0)==(e[n+16>>2]|0)){if(f=0,u0(e[(e[n>>2]|0)+40>>2]|0,n|0)|0,O=f,f=0,O&1){_0=21;break i}}else e[s>>2]=o+1;if(g=g+1|0,n=d[yi>>0]|0,O=(n&1)==0,n=(O?X:e[M>>2]|0)+(O?(n&255)>>>1:e[K>>2]|0)|0,(g|0)==(n|0)){g=n;break}else o=c,s=C}while(!1);if(F&&(O=d[yi>>0]|0,V=(O&1)==0,(g|0)!=((V?X:e[M>>2]|0)+(V?(O&255)>>>1:e[K>>2]|0)|0))){_0=143;break i}break}case 4:{I=d[mi>>0]|0,c=O,o=O,g=0;r:for(;;){n=e[t>>2]|0;do if(n){if((e[n+12>>2]|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,O=f,f=0,O&1){_0=23;break i}if((n|0)==-1){e[t>>2]=0,n=0;break}else{n=e[t>>2]|0;break}}}else n=0;while(!1);s=(n|0)==0;do if(o){if((e[o+12>>2]|0)!=(e[o+16>>2]|0))if(s){C=c;break}else{s=c;break r}if(f=0,n=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,O=f,f=0,O&1){_0=23;break i}if((n|0)!=-1)if(s^(c|0)==0){C=c,o=c;break}else{s=c;break r}else{e[r>>2]=0,c=0,_0=156;break}}else _0=156;while(!1);if((_0|0)==156)if(_0=0,s){s=c;break}else C=c,o=0;if(c=e[t>>2]|0,n=e[c+12>>2]|0,(n|0)==(e[c+16>>2]|0)){if(f=0,c=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=23;break i}}else c=N[n>>0]|0;if(n=c&255,n<<24>>24>-1&&E[(e[A0>>2]|0)+(c<<24>>24<<1)>>1]&2048){if(c=e[p>>2]|0,(c|0)==(e[le>>2]|0)){if(f=0,m0(12,h|0,p|0,le|0),O=f,f=0,O&1){_0=23;break i}c=e[p>>2]|0}e[p>>2]=c+1,d[c>>0]=n,g=g+1|0}else{if(O=d[Pe>>0]|0,!(n<<24>>24==I<<24>>24&(g|0?((O&1?e[v0>>2]|0:(O&255)>>>1)|0)!=0:0))){s=C;break}if((U|0)==(e[fe>>2]|0)){if(f=0,m0(13,Ei|0,vi|0,fe|0),O=f,f=0,O&1){_0=23;break i}U=e[vi>>2]|0}O=U+4|0,e[vi>>2]=O,e[U>>2]=g,U=O,g=0}if(c=e[t>>2]|0,n=c+12|0,s=e[n>>2]|0,(s|0)==(e[c+16>>2]|0))if(f=0,u0(e[(e[c>>2]|0)+40>>2]|0,c|0)|0,O=f,f=0,O&1){_0=23;break i}else{c=C;continue}else{e[n>>2]=s+1,c=C;continue}}if(g|0&&(e[Ei>>2]|0)!=(U|0)){if((U|0)==(e[fe>>2]|0)){if(f=0,m0(13,Ei|0,vi|0,fe|0),O=f,f=0,O&1){_0=24;break i}U=e[vi>>2]|0}O=U+4|0,e[vi>>2]=O,e[U>>2]=g,U=O}if(C=e[ne>>2]|0,(C|0)>0){g=e[t>>2]|0;do if(g){if((e[g+12>>2]|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,O=f,f=0,O&1){_0=24;break i}if((g|0)==-1){e[t>>2]=0,g=0;break}else{g=e[t>>2]|0;break}}}else g=0;while(!1);g=(g|0)==0;do if(s){if((e[s+12>>2]|0)==(e[s+16>>2]|0)){if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,O=f,f=0,O&1){_0=24;break i}if((c|0)==-1){e[r>>2]=0,_0=193;break}}if(!g){_0=198;break i}}else _0=193;while(!1);if((_0|0)==193)if(_0=0,g){_0=198;break i}else s=0;if(g=e[t>>2]|0,c=e[g+12>>2]|0,(c|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,O=f,f=0,O&1){_0=24;break i}}else g=N[c>>0]|0;if((g&255)<<24>>24!=(d[be>>0]|0)){_0=198;break i}if(g=e[t>>2]|0,c=g+12|0,n=e[c>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,O=f,f=0,O&1){_0=24;break i}}else e[c>>2]=n+1;if((C|0)>0)for(o=s,n=s,I=C;;){g=e[t>>2]|0;do if(g){if((e[g+12>>2]|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,O=f,f=0,O&1){_0=22;break i}if((g|0)==-1){e[t>>2]=0,g=0;break}else{g=e[t>>2]|0;break}}}else g=0;while(!1);c=(g|0)==0;do if(n){if((e[n+12>>2]|0)!=(e[n+16>>2]|0))if(c){g=o,C=n;break}else{_0=222;break i}if(f=0,g=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,O=f,f=0,O&1){_0=22;break i}if((g|0)!=-1)if(c^(o|0)==0){g=o,C=o;break}else{_0=222;break i}else{e[r>>2]=0,g=0,_0=215;break}}else g=o,_0=215;while(!1);if((_0|0)==215)if(_0=0,c){_0=222;break i}else C=0;if(c=e[t>>2]|0,n=e[c+12>>2]|0,(n|0)==(e[c+16>>2]|0)){if(f=0,c=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=22;break i}}else c=N[n>>0]|0;if((c&255)<<24>>24<=-1){_0=222;break i}if(!(E[(e[A0>>2]|0)+(c<<24>>24<<1)>>1]&2048)){_0=222;break i}if((e[p>>2]|0)==(e[le>>2]|0)&&(f=0,m0(12,h|0,p|0,le|0),O=f,f=0,O&1)){_0=22;break i}if(c=e[t>>2]|0,n=e[c+12>>2]|0,(n|0)==(e[c+16>>2]|0)){if(f=0,c=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=22;break i}}else c=N[n>>0]|0;if(n=e[p>>2]|0,e[p>>2]=n+1,d[n>>0]=c,c=I,I=I+-1|0,e[ne>>2]=I,n=e[t>>2]|0,s=n+12|0,o=e[s>>2]|0,(o|0)==(e[n+16>>2]|0)){if(f=0,u0(e[(e[n>>2]|0)+40>>2]|0,n|0)|0,O=f,f=0,O&1){_0=22;break i}}else e[s>>2]=o+1;if((c|0)<=1)break;o=g,n=C}}if((e[p>>2]|0)==(e[h>>2]|0)){_0=233;break i}break}default:}while(!1);t:do if((_0|0)==42)for(;;){_0=0,c=e[t>>2]|0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,c=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,O=f,f=0,O&1){_0=20;break i}if((c|0)==-1){e[t>>2]=0,c=0;break}else{c=e[t>>2]|0;break}}}else c=0;while(!1);n=(c|0)==0;do if(s){if((e[s+12>>2]|0)!=(e[s+16>>2]|0))if(n){o=g;break}else break t;if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,O=f,f=0,O&1){_0=20;break i}if((c|0)!=-1)if(n^(g|0)==0){o=g,s=g;break}else break t;else{e[r>>2]=0,g=0,_0=54;break}}else _0=54;while(!1);if((_0|0)==54){if(_0=0,n)break t;o=g,s=0}if(g=e[t>>2]|0,c=e[g+12>>2]|0,(c|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,O=f,f=0,O&1){_0=20;break i}}else g=N[c>>0]|0;if((g&255)<<24>>24<=-1||!(E[(e[A0>>2]|0)+(g<<24>>24<<1)>>1]&8192))break t;if(g=e[t>>2]|0,c=g+12|0,n=e[c>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,_0=f,f=0,_0&1){_0=20;break i}}else e[c>>2]=n+1,g=N[n>>0]|0;if(f=0,h0(67,fi|0,g&255|0),_0=f,f=0,_0&1){_0=20;break i}else g=o,_0=42}while(!1);if(_=_+1|0,_>>>0>=4){_0=235;break}}i:switch(_0|0){case 20:{c=b()|0;break e}case 21:{c=b()|0;break e}case 22:{c=b()|0;break e}case 23:{c=b()|0;break e}case 24:{c=b()|0;break e}case 40:{e[l>>2]=e[l>>2]|4,c=0;break}case 104:{e[l>>2]=e[l>>2]|4,c=0;break}case 143:{e[l>>2]=e[l>>2]|4,c=0;break}case 198:{e[l>>2]=e[l>>2]|4,c=0;break}case 222:{e[l>>2]=e[l>>2]|4,c=0;break}case 233:{e[l>>2]=e[l>>2]|4,c=0;break}case 235:{t:do if(k){o=k+1|0,C=k+8|0,I=k+4|0,n=1;r:for(;;){if(g=d[k>>0]|0,g&1?g=e[I>>2]|0:g=(g&255)>>>1,n>>>0>=g>>>0)break t;g=e[t>>2]|0;do if(g){if((e[g+12>>2]|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,p=f,f=0,p&1){_0=19;break r}if((g|0)==-1){e[t>>2]=0,g=0;break}else{g=e[t>>2]|0;break}}}else g=0;while(!1);c=(g|0)==0,g=e[r>>2]|0;do if(g){if((e[g+12>>2]|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,p=f,f=0,p&1){_0=19;break r}if((g|0)==-1){e[r>>2]=0,_0=253;break}}if(!c){_0=260;break r}}else _0=253;while(!1);if((_0|0)==253&&(_0=0,c)){_0=260;break}if(g=e[t>>2]|0,c=e[g+12>>2]|0,(c|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,p=f,f=0,p&1){_0=19;break}}else g=N[c>>0]|0;if(d[k>>0]&1?c=e[C>>2]|0:c=o,(g&255)<<24>>24!=(d[c+n>>0]|0)){_0=260;break}if(g=n+1|0,c=e[t>>2]|0,n=c+12|0,s=e[n>>2]|0,(s|0)==(e[c+16>>2]|0))if(f=0,u0(e[(e[c>>2]|0)+40>>2]|0,c|0)|0,p=f,f=0,p&1){_0=19;break}else{n=g;continue}else{e[n>>2]=s+1,n=g;continue}}if((_0|0)==19){c=b()|0;break e}else if((_0|0)==260){e[l>>2]=e[l>>2]|4,c=0;break i}}while(!1);g=e[Ei>>2]|0,(g|0)!=(U|0)&&(e[he>>2]=0,Oi(Pe,g,U,he),(e[he>>2]|0)!=0)?(e[l>>2]=e[l>>2]|4,c=0):c=1;break}}return f0(fi),f0(li),f0(ri),f0(yi),f0(Pe),g=e[Ei>>2]|0,e[Ei>>2]=0,g|0&&(f=0,n0(e[xt>>2]|0,g|0),Ei=f,f=0,Ei&1)&&(Ei=b(0)|0,Ie(Ei)),y=gi,c|0}while(!1);return f0(fi),f0(li),f0(ri),f0(yi),f0(Pe),g=e[Ei>>2]|0,e[Ei>>2]=0,g|0&&(f=0,n0(e[xt>>2]|0,g|0),Ei=f,f=0,Ei&1)&&(Ei=b(0)|0,Ie(Ei)),r0(c|0),0}function lr(t){t=t|0;var r=0;r=de(8)|0,f=0,h0(90,r|0,t|0),t=f,f=0,t&1?(t=b()|0,ge(r|0),r0(t|0)):Be(r|0,616,80)}function K4(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0;if(_=y,y=y+144|0,c=_+24|0,t=_+32|0,F=_+16|0,U=_+8|0,C=_+4|0,I=_+28|0,h=_,e[F>>2]=t,K=F+4|0,e[K>>2]=189,p=t+100|0,f=0,O=u0(68,o|0)|0,g=f,f=0,g&1)c=b()|0,e[F>>2]=0,X=36;else{e[C>>2]=O,f=0,g=y0(37,C|0,44220)|0,t=f,f=0;e:do if(!(t&1)&&(d[I>>0]=0,B=e[n>>2]|0,e[h>>2]=B,k=e[o+4>>2]|0,V=B,f=0,e[c>>2]=e[h>>2],k=Me(1,r|0,c|0,s|0,C|0,k|0,l|0,I|0,g|0,F|0,U|0,p|0)|0,o=f,f=0,!(o&1))){if(k){if(d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),d[I>>0]|0&&(f=0,t=y0(e[(e[g>>2]|0)+28>>2]|0,g|0,45)|0,o=f,f=0,o&1||(f=0,h0(67,a|0,t|0),o=f,f=0,o&1))||(f=0,h=y0(e[(e[g>>2]|0)+28>>2]|0,g|0,48)|0,o=f,f=0,o&1))break;t=e[F>>2]|0,p=e[U>>2]|0,c=p+-1|0;i:do if(t>>>0>>0)do{if((d[t>>0]|0)!=h<<24>>24)break i;t=t+1|0}while(t>>>0>>0);while(!1);if(f=0,L0(32,a|0,t|0,p|0)|0,a=f,f=0,a&1)break}t=e[r>>2]|0;do if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1)break e;if((t|0)==-1){e[r>>2]=0,t=0;break}else{t=e[r>>2]|0;break}}}else t=0;while(!1);c=(t|0)==0;do if(B){if((e[V+12>>2]|0)==(e[V+16>>2]|0)){if(f=0,t=u0(e[(e[B>>2]|0)+36>>2]|0,V|0)|0,V=f,f=0,V&1)break e;if((t|0)==-1){e[n>>2]=0,X=29;break}}c||(X=30)}else X=29;while(!1);return(X|0)==29&&c&&(X=30),(X|0)==30&&(e[l>>2]=e[l>>2]|2),c=e[r>>2]|0,Ee(O)|0,t=e[F>>2]|0,e[F>>2]=0,t|0&&(f=0,n0(e[K>>2]|0,t|0),K=f,f=0,K&1)&&(K=b(0)|0,Ie(K)),y=_,c|0}while(!1);c=b()|0,Ee(O)|0,t=e[F>>2]|0,e[F>>2]=0,t?X=36:M=c}return(X|0)==36&&(f=0,n0(e[K>>2]|0,t|0),K=f,f=0,K&1?(K=b(0)|0,Ie(K)):M=c),r0(M|0),0}function W4(t,r,n,s,o,l,a,c,h,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0;var g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0;X=y,y=y+112|0,g=X+100|0,C=X+88|0,I=X+76|0,k=X+64|0,U=X+52|0,B=X+48|0,V=X+36|0,O=X+24|0,_=X+12|0,F=X;do if(t)if(t=Pi(r,43828)|0,Ke[e[(e[t>>2]|0)+44>>2]&127](g,t),F=e[g>>2]|0,d[n>>0]=F,d[n+1>>0]=F>>8,d[n+2>>0]=F>>16,d[n+3>>0]=F>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](C,t),d[h>>0]&1?(d[e[h+8>>2]>>0]=0,e[h+4>>2]=0):(d[h+1>>0]=0,d[h>>0]=0),f=0,h0(91,h|0,0),n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),e[h>>2]=e[C>>2],e[h+4>>2]=e[C+4>>2],e[h+8>>2]=e[C+8>>2],e[C>>2]=0,e[C+4>>2]=0,e[C+8>>2]=0,f0(C),Ke[e[(e[t>>2]|0)+28>>2]&127](I,t),d[c>>0]&1?(d[e[c+8>>2]>>0]=0,e[c+4>>2]=0):(d[c+1>>0]=0,d[c>>0]=0),f=0,h0(91,c|0,0),n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),e[c>>2]=e[I>>2],e[c+4>>2]=e[I+4>>2],e[c+8>>2]=e[I+8>>2],e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f0(I),c=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,d[s>>0]=c,c=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,d[o>>0]=c,Ke[e[(e[t>>2]|0)+20>>2]&127](k,t),d[l>>0]&1?(d[e[l+8>>2]>>0]=0,e[l+4>>2]=0):(d[l+1>>0]=0,d[l>>0]=0),f=0,h0(91,l|0,0),o=f,f=0,o&1&&(o=b(0)|0,Ie(o)),e[l>>2]=e[k>>2],e[l+4>>2]=e[k+4>>2],e[l+8>>2]=e[k+8>>2],e[k>>2]=0,e[k+4>>2]=0,e[k+8>>2]=0,f0(k),Ke[e[(e[t>>2]|0)+24>>2]&127](U,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),o=f,f=0,o&1)o=b(0)|0,Ie(o);else{e[a>>2]=e[U>>2],e[a+4>>2]=e[U+4>>2],e[a+8>>2]=e[U+8>>2],e[U>>2]=0,e[U+4>>2]=0,e[U+8>>2]=0,f0(U),M=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}else if(t=Pi(r,43764)|0,Ke[e[(e[t>>2]|0)+44>>2]&127](B,t),B=e[B>>2]|0,d[n>>0]=B,d[n+1>>0]=B>>8,d[n+2>>0]=B>>16,d[n+3>>0]=B>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](V,t),d[h>>0]&1?(d[e[h+8>>2]>>0]=0,e[h+4>>2]=0):(d[h+1>>0]=0,d[h>>0]=0),f=0,h0(91,h|0,0),n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),e[h>>2]=e[V>>2],e[h+4>>2]=e[V+4>>2],e[h+8>>2]=e[V+8>>2],e[V>>2]=0,e[V+4>>2]=0,e[V+8>>2]=0,f0(V),Ke[e[(e[t>>2]|0)+28>>2]&127](O,t),d[c>>0]&1?(d[e[c+8>>2]>>0]=0,e[c+4>>2]=0):(d[c+1>>0]=0,d[c>>0]=0),f=0,h0(91,c|0,0),n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),e[c>>2]=e[O>>2],e[c+4>>2]=e[O+4>>2],e[c+8>>2]=e[O+8>>2],e[O>>2]=0,e[O+4>>2]=0,e[O+8>>2]=0,f0(O),c=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,d[s>>0]=c,c=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,d[o>>0]=c,Ke[e[(e[t>>2]|0)+20>>2]&127](_,t),d[l>>0]&1?(d[e[l+8>>2]>>0]=0,e[l+4>>2]=0):(d[l+1>>0]=0,d[l>>0]=0),f=0,h0(91,l|0,0),o=f,f=0,o&1&&(o=b(0)|0,Ie(o)),e[l>>2]=e[_>>2],e[l+4>>2]=e[_+4>>2],e[l+8>>2]=e[_+8>>2],e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f0(_),Ke[e[(e[t>>2]|0)+24>>2]&127](F,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),o=f,f=0,o&1)o=b(0)|0,Ie(o);else{e[a>>2]=e[F>>2],e[a+4>>2]=e[F+4>>2],e[a+8>>2]=e[F+8>>2],e[F>>2]=0,e[F+4>>2]=0,e[F+8>>2]=0,f0(F),M=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}while(!1);e[p>>2]=M,y=X}function Oi(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0;o=d[t>>0]|0,a=t+4|0,l=e[a>>2]|0;e:do if((o&1?l:(o&255)>>>1)|0){if((r|0)!=(n|0)){if(o=n+-4|0,o>>>0>r>>>0){l=r;do c=e[l>>2]|0,e[l>>2]=e[o>>2],e[o>>2]=c,l=l+4|0,o=o+-4|0;while(l>>>0>>0)}o=d[t>>0]|0,l=e[a>>2]|0}c=(o&1)==0,a=c?t+1|0:e[t+8>>2]|0,n=n+-4|0,t=a+(c?(o&255)>>>1:l)|0,l=d[a>>0]|0,o=l<<24>>24<1|l<<24>>24==127;i:do if(n>>>0>r>>>0){for(;!(!o&&(l<<24>>24|0)!=(e[r>>2]|0));)if(a=(t-a|0)>1?a+1|0:a,r=r+4|0,l=d[a>>0]|0,o=l<<24>>24<1|l<<24>>24==127,r>>>0>=n>>>0)break i;e[s>>2]=4;break e}while(!1);!o&&((e[n>>2]|0)+-1|0)>>>0>=l<<24>>24>>>0&&(e[s>>2]=4)}while(!1)}function Z4(t){t=t|0}function J4(t){t=t|0,a0(t)}function $4(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;if(t0=y,y=y+576|0,F=t0+424|0,K=t0,t=t0+24|0,s0=t0+16|0,M=t0+12|0,Z=t0+8|0,C=t0+464|0,h=t0+4|0,X=t0+468|0,e[s0>>2]=t,v0=s0+4|0,e[v0>>2]=189,p=t+400|0,f=0,c=u0(68,o|0)|0,_=f,f=0,_&1)h=b()|0,e[s0>>2]=0,c=189,A0=47;else{e[Z>>2]=c,f=0,t=y0(37,Z|0,44212)|0,_=f,f=0;e:do if(!(_&1)&&(d[C>>0]=0,e[h>>2]=e[n>>2],g=e[o+4>>2]|0,f=0,e[F>>2]=e[h>>2],g=Me(2,r|0,F|0,s|0,Z|0,g|0,l|0,C|0,t|0,s0|0,M|0,p|0)|0,_=f,f=0,!(_&1))){i:do if(g){if(f=0,k0(e[(e[t>>2]|0)+48>>2]|0,t|0,59007,59017,F|0)|0,_=f,f=0,_&1){A0=10;break e}h=e[M>>2]|0,p=e[s0>>2]|0,t=h-p|0,(t|0)>392?(t=xi((t>>2)+2|0)|0,c=t,t?A0=13:(f=0,we(6),_=f,f=0,_&1||(t=0,A0=13))):(c=0,t=X,A0=13);do if((A0|0)==13){if(d[C>>0]|0&&(d[t>>0]=45,t=t+1|0),O=F+40|0,_=F,p>>>0>>0){g=F+4|0,s=g+4|0,o=s+4|0,C=o+4|0,I=C+4|0,k=I+4|0,U=k+4|0,B=U+4|0,V=B+4|0;do{h=e[p>>2]|0;do if((e[F>>2]|0)!=(h|0))if((e[g>>2]|0)!=(h|0))if((e[s>>2]|0)!=(h|0))if((e[o>>2]|0)!=(h|0))if((e[C>>2]|0)==(h|0))h=C;else{if((e[I>>2]|0)==(h|0)){h=I;break}if((e[k>>2]|0)==(h|0)){h=k;break}if((e[U>>2]|0)==(h|0)){h=U;break}if((e[B>>2]|0)==(h|0)){h=B;break}h=(e[V>>2]|0)==(h|0)?V:O}else h=o;else h=s;else h=g;else h=F;while(!1);d[t>>0]=d[59007+(h-_>>2)>>0]|0,p=p+4|0,t=t+1|0}while(p>>>0<(e[M>>2]|0)>>>0)}if(d[t>>0]=0,e[K>>2]=a,(Mn(X,58987,K)|0)!=1&&(f=0,n0(190,58991),a=f,f=0,a&1))break;c&&Ze(c);break i}while(!1);if(t=b()|0,!c){h=t,c=s0;break e}Ze(c),h=t,c=s0;break e}while(!1);t=e[r>>2]|0;do if(t){if(c=e[t+12>>2]|0,(c|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1){A0=10;break e}}else t=e[c>>2]|0;if((t|0)==-1){e[r>>2]=0,h=1;break}else{h=(e[r>>2]|0)==0;break}}else h=1;while(!1);t=e[n>>2]|0;do if(t){if(c=e[t+12>>2]|0,(c|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1){A0=10;break e}}else t=e[c>>2]|0;if((t|0)!=-1){if(h)break;A0=40;break}else{e[n>>2]=0,A0=38;break}}else A0=38;while(!1);return(A0|0)==38&&h&&(A0=40),(A0|0)==40&&(e[l>>2]=e[l>>2]|2),c=e[r>>2]|0,Ee(e[Z>>2]|0)|0,t=e[s0>>2]|0,e[s0>>2]=0,t|0&&(f=0,n0(e[v0>>2]|0,t|0),A0=f,f=0,A0&1)&&(A0=b(0)|0,Ie(A0)),y=t0,c|0}else A0=10;while(!1);(A0|0)==10&&(h=b()|0,c=s0),Ee(e[Z>>2]|0)|0,t=e[c>>2]|0,e[c>>2]=0,t?(c=e[v0>>2]|0,A0=47):w0=h}return(A0|0)==47&&(f=0,n0(c|0,t|0),A0=f,f=0,A0&1?(A0=b(0)|0,Ie(A0)):w0=h),r0(w0|0),0}function ic(t,r,n,s,o,l,a,c,h,p,g){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0;var C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,$e=0,We=0,_e=0,le=0,be=0,ne=0,fe=0,vi=0,Ti=0,mi=0,_0=0,he=0,Pe=0,li=0,ri=0,fi=0;li=y,y=y+512|0,Re=li+96|0,C=li+104|0,fi=li+88|0,le=li+80|0,_e=li+76|0,be=li+504|0,$e=li+72|0,ne=li+68|0,Ti=li+56|0,Pe=li+44|0,_0=li+32|0,mi=li+20|0,he=li+8|0,We=li+4|0,vi=li,e[Re>>2]=g,e[fi>>2]=C,ri=fi+4|0,e[ri>>2]=189,e[le>>2]=C,e[_e>>2]=C+400,e[Ti>>2]=0,e[Ti+4>>2]=0,e[Ti+8>>2]=0,e[Pe>>2]=0,e[Pe+4>>2]=0,e[Pe+8>>2]=0,e[_0>>2]=0,e[_0+4>>2]=0,e[_0+8>>2]=0,e[mi>>2]=0,e[mi+4>>2]=0,e[mi+8>>2]=0,e[he>>2]=0,e[he+4>>2]=0,e[he+8>>2]=0,f=0,Ci(2,n|0,s|0,be|0,$e|0,ne|0,Ti|0,Pe|0,_0|0,mi|0,We|0),ze=f,f=0;e:do if(ze&1)n=b()|0;else{e[p>>2]=e[h>>2],v0=_0+4|0,A0=mi+4|0,Y0=mi+8|0,ze=_0+8|0,M=(o&512|0)!=0,X=Pe+8|0,K=Pe+4|0,t0=he+4|0,Z=he+8|0,s0=be+3|0,w0=Ti+4|0,F=0,k=0;i:for(;;){g=e[t>>2]|0;do if(g){if(n=e[g+12>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,_=f,f=0,_&1){fe=26;break i}}else g=e[n>>2]|0;if((g|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);n=e[r>>2]|0;do if(n){if(g=e[n+12>>2]|0,(g|0)==(e[n+16>>2]|0)){if(f=0,g=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,_=f,f=0,_&1){fe=26;break i}}else g=e[g>>2]|0;if((g|0)!=-1)if(s){_=n;break}else{U=C,fe=244;break i}else{e[r>>2]=0,fe=16;break}}else fe=16;while(!1);if((fe|0)==16)if(fe=0,s){U=C,fe=244;break}else _=0;t:do switch(d[be+F>>0]|0){case 1:{if((F|0)!=3){if(g=e[t>>2]|0,n=e[g+12>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,fe=f,f=0,fe&1){fe=26;break i}}else g=e[n>>2]|0;if(f=0,g=L0(e[(e[c>>2]|0)+12>>2]|0,c|0,8192,g|0)|0,fe=f,f=0,fe&1){fe=26;break i}if(!g){fe=42;break i}if(g=e[t>>2]|0,n=g+12|0,s=e[n>>2]|0,(s|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,fe=f,f=0,fe&1){fe=26;break i}}else e[n>>2]=s+4,g=e[s>>2]|0;if(f=0,h0(92,he|0,g|0),fe=f,f=0,fe&1){fe=26;break i}else g=_,o=_,fe=44}else g=C;break}case 0:{(F|0)==3?g=C:(g=_,o=_,fe=44);break}case 3:{if(n=d[_0>>0]|0,g=n&1?e[v0>>2]|0:(n&255)>>>1,s=d[mi>>0]|0,o=s&1?e[A0>>2]|0:(s&255)>>>1,(g|0)==(0-o|0))g=C;else{if(!g){if(g=e[t>>2]|0,n=e[g+12>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,_=f,f=0,_&1){fe=26;break i}n=d[mi>>0]|0}else g=e[n>>2]|0,n=s;if((g|0)!=(e[(n&1?e[Y0>>2]|0:A0)>>2]|0)){g=C;break t}if(g=e[t>>2]|0,n=g+12|0,s=e[n>>2]|0,(s|0)==(e[g+16>>2]|0)){if(f=0,u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,_=f,f=0,_&1){fe=26;break i}}else e[n>>2]=s+4;d[a>>0]=1,_=d[mi>>0]|0,g=C,k=(_&1?e[A0>>2]|0:(_&255)>>>1)>>>0>1?mi:k;break t}if(I=e[t>>2]|0,U=e[I+12>>2]|0,s=e[I+16>>2]|0,g=(U|0)==(s|0),!o){if(g){if(f=0,g=u0(e[(e[I>>2]|0)+36>>2]|0,I|0)|0,_=f,f=0,_&1){fe=26;break i}n=d[_0>>0]|0}else g=e[U>>2]|0;if((g|0)!=(e[(n&1?e[ze>>2]|0:v0)>>2]|0)){d[a>>0]=1,g=C;break t}if(g=e[t>>2]|0,n=g+12|0,s=e[n>>2]|0,(s|0)==(e[g+16>>2]|0)){if(f=0,u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,_=f,f=0,_&1){fe=26;break i}}else e[n>>2]=s+4;_=d[_0>>0]|0,g=C,k=(_&1?e[v0>>2]|0:(_&255)>>>1)>>>0>1?_0:k;break t}if(g){if(f=0,g=u0(e[(e[I>>2]|0)+36>>2]|0,I|0)|0,_=f,f=0,_&1){fe=26;break i}s=e[t>>2]|0,n=d[_0>>0]|0,I=s,U=e[s+12>>2]|0,s=e[s+16>>2]|0}else g=e[U>>2]|0;if(o=I+12|0,s=(U|0)==(s|0),(g|0)==(e[(n&1?e[ze>>2]|0:v0)>>2]|0)){if(s){if(f=0,u0(e[(e[I>>2]|0)+40>>2]|0,I|0)|0,_=f,f=0,_&1){fe=26;break i}}else e[o>>2]=U+4;_=d[_0>>0]|0,g=C,k=(_&1?e[v0>>2]|0:(_&255)>>>1)>>>0>1?_0:k;break t}if(s){if(f=0,g=u0(e[(e[I>>2]|0)+36>>2]|0,I|0)|0,_=f,f=0,_&1){fe=26;break i}}else g=e[U>>2]|0;if((g|0)!=(e[(d[mi>>0]&1?e[Y0>>2]|0:A0)>>2]|0)){fe=107;break i}if(g=e[t>>2]|0,n=g+12|0,s=e[n>>2]|0,(s|0)==(e[g+16>>2]|0)){if(f=0,u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,_=f,f=0,_&1){fe=26;break i}}else e[n>>2]=s+4;d[a>>0]=1,_=d[mi>>0]|0,g=C,k=(_&1?e[A0>>2]|0:(_&255)>>>1)>>>0>1?mi:k}break}case 2:{if(!(F>>>0<2|(k|0)!=0)&&!(M|(F|0)==2&(d[s0>>0]|0)!=0)){g=C,k=0;break t}o=d[Pe>>0]|0,s=e[X>>2]|0,n=o&1?s:K,g=n;r:do if(F|0&&(N[be+(F+-1)>>0]|0)<2){O=(o&1)==0;n:do if((n|0)!=((O?K:s)+((O?(o&255)>>>1:e[K>>2]|0)<<2)|0)){for(o=n;;){if(f=0,n=L0(e[(e[c>>2]|0)+12>>2]|0,c|0,8192,e[o>>2]|0)|0,O=f,f=0,O&1){fe=23;break i}if(!n)break;if(o=o+4|0,g=o,n=d[Pe>>0]|0,s=e[X>>2]|0,O=(n&1)==0,(o|0)==((O?K:s)+((O?(n&255)>>>1:e[K>>2]|0)<<2)|0)){o=n;break n}}o=d[Pe>>0]|0,s=e[X>>2]|0}while(!1);if(U=o&1?s:K,n=U,B=g-n>>2,V=d[he>>0]|0,I=(V&1)==0,V=I?(V&255)>>>1:e[t0>>2]|0,V>>>0>=B>>>0)if(I=I?t0:e[Z>>2]|0,O=I+(V<<2)|0,!B)n=g;else for(I=I+(V-B<<2)|0;;){if((e[I>>2]|0)!=(e[U>>2]|0))break r;if(I=I+4|0,(I|0)==(O|0)){n=g;break}else U=U+4|0}}else n=g;while(!1);g=(o&1)==0,g=(g?K:s)+((g?(o&255)>>>1:e[K>>2]|0)<<2)|0;r:do if((n|0)!=(g|0))for(I=_,o=_,g=n;;){n=e[t>>2]|0;do if(n){if(s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,_=f,f=0,_&1){fe=22;break i}}else n=e[s>>2]|0;if((n|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);do if(o){if(n=e[o+12>>2]|0,(n|0)==(e[o+16>>2]|0)){if(f=0,n=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,_=f,f=0,_&1){fe=22;break i}}else n=e[n>>2]|0;if((n|0)!=-1)if(s^(I|0)==0){n=I,U=I;break}else break r;else{e[r>>2]=0,n=0,fe=136;break}}else n=I,fe=136;while(!1);if((fe|0)==136){if(fe=0,s)break r;U=0}if(s=e[t>>2]|0,o=e[s+12>>2]|0,(o|0)==(e[s+16>>2]|0)){if(f=0,s=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,_=f,f=0,_&1){fe=22;break i}}else s=e[o>>2]|0;if((s|0)!=(e[g>>2]|0))break r;if(s=e[t>>2]|0,o=s+12|0,I=e[o>>2]|0,(I|0)==(e[s+16>>2]|0)){if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,_=f,f=0,_&1){fe=22;break i}}else e[o>>2]=I+4;if(g=g+4|0,s=d[Pe>>0]|0,_=(s&1)==0,s=(_?K:e[X>>2]|0)+((_?(s&255)>>>1:e[K>>2]|0)<<2)|0,(g|0)==(s|0)){g=s;break}else I=n,o=U}while(!1);if(M&&(_=d[Pe>>0]|0,O=(_&1)==0,(g|0)!=((O?K:e[X>>2]|0)+((O?(_&255)>>>1:e[K>>2]|0)<<2)|0))){fe=148;break i}else g=C;break}case 4:{V=e[ne>>2]|0,B=_,I=_,g=C,n=0;r:for(;;){s=e[t>>2]|0;do if(s){if(o=e[s+12>>2]|0,(o|0)==(e[s+16>>2]|0)){if(f=0,s=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,_=f,f=0,_&1){fe=25;break i}}else s=e[o>>2]|0;if((s|0)==-1){e[t>>2]=0,o=1;break}else{o=(e[t>>2]|0)==0;break}}else o=1;while(!1);do if(I){if(s=e[I+12>>2]|0,(s|0)==(e[I+16>>2]|0)){if(f=0,s=u0(e[(e[I>>2]|0)+36>>2]|0,I|0)|0,_=f,f=0,_&1){fe=25;break i}}else s=e[s>>2]|0;if((s|0)!=-1)if(o^(B|0)==0){s=B,U=B;break}else{C=B;break r}else{e[r>>2]=0,s=0,fe=162;break}}else s=B,fe=162;while(!1);if((fe|0)==162)if(fe=0,o){C=s;break}else U=0;if(o=e[t>>2]|0,C=e[o+12>>2]|0,(C|0)==(e[o+16>>2]|0)){if(f=0,o=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,_=f,f=0,_&1){fe=25;break i}}else o=e[C>>2]|0;if(f=0,C=L0(e[(e[c>>2]|0)+12>>2]|0,c|0,2048,o|0)|0,_=f,f=0,_&1){fe=25;break i}if(C){if(C=e[p>>2]|0,(C|0)==(e[Re>>2]|0)){if(f=0,m0(14,h|0,p|0,Re|0),_=f,f=0,_&1){fe=25;break i}C=e[p>>2]|0}e[p>>2]=C+4,e[C>>2]=o,n=n+1|0}else{if(_=d[Ti>>0]|0,!((o|0)==(V|0)&(n|0?((_&1?e[w0>>2]|0:(_&255)>>>1)|0)!=0:0))){C=s;break}if((g|0)==(e[_e>>2]|0)){if(f=0,m0(13,fi|0,le|0,_e|0),_=f,f=0,_&1){fe=25;break i}g=e[le>>2]|0}_=g+4|0,e[le>>2]=_,e[g>>2]=n,g=_,n=0}if(o=e[t>>2]|0,C=o+12|0,I=e[C>>2]|0,(I|0)==(e[o+16>>2]|0))if(f=0,u0(e[(e[o>>2]|0)+40>>2]|0,o|0)|0,_=f,f=0,_&1){fe=25;break i}else{B=s,I=U;continue}else{e[C>>2]=I+4,B=s,I=U;continue}}if(n|0&&(e[fi>>2]|0)!=(g|0)){if((g|0)==(e[_e>>2]|0)){if(f=0,m0(13,fi|0,le|0,_e|0),_=f,f=0,_&1){fe=26;break i}g=e[le>>2]|0}_=g+4|0,e[le>>2]=_,e[g>>2]=n,g=_}if(U=e[We>>2]|0,(U|0)>0){n=e[t>>2]|0;do if(n){if(s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,_=f,f=0,_&1){fe=26;break i}}else n=e[s>>2]|0;if((n|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);do if(C){if(n=e[C+12>>2]|0,(n|0)==(e[C+16>>2]|0)){if(f=0,n=u0(e[(e[C>>2]|0)+36>>2]|0,C|0)|0,_=f,f=0,_&1){fe=26;break i}}else n=e[n>>2]|0;if((n|0)!=-1){if(s)break;fe=206;break i}else{e[r>>2]=0,fe=200;break}}else fe=200;while(!1);if((fe|0)==200)if(fe=0,s){fe=206;break i}else C=0;if(n=e[t>>2]|0,s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,_=f,f=0,_&1){fe=26;break i}}else n=e[s>>2]|0;if((n|0)!=(e[$e>>2]|0)){fe=206;break i}if(n=e[t>>2]|0,s=n+12|0,o=e[s>>2]|0,(o|0)==(e[n+16>>2]|0)){if(f=0,u0(e[(e[n>>2]|0)+40>>2]|0,n|0)|0,_=f,f=0,_&1){fe=26;break i}}else e[s>>2]=o+4;if((U|0)>0)for(I=C,o=C,B=U;;){n=e[t>>2]|0;do if(n){if(s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,_=f,f=0,_&1){fe=24;break i}}else n=e[s>>2]|0;if((n|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);do if(o){if(n=e[o+12>>2]|0,(n|0)==(e[o+16>>2]|0)){if(f=0,n=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,_=f,f=0,_&1){fe=24;break i}}else n=e[n>>2]|0;if((n|0)!=-1)if(s^(I|0)==0){n=I,U=I;break}else{fe=231;break i}else{e[r>>2]=0,n=0,fe=224;break}}else n=I,fe=224;while(!1);if((fe|0)==224)if(fe=0,s){fe=231;break i}else U=0;if(s=e[t>>2]|0,o=e[s+12>>2]|0,(o|0)==(e[s+16>>2]|0)){if(f=0,s=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,_=f,f=0,_&1){fe=24;break i}}else s=e[o>>2]|0;if(f=0,s=L0(e[(e[c>>2]|0)+12>>2]|0,c|0,2048,s|0)|0,_=f,f=0,_&1){fe=24;break i}if(!s){fe=231;break i}if((e[p>>2]|0)==(e[Re>>2]|0)&&(f=0,m0(14,h|0,p|0,Re|0),_=f,f=0,_&1)){fe=24;break i}if(s=e[t>>2]|0,o=e[s+12>>2]|0,(o|0)==(e[s+16>>2]|0)){if(f=0,s=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,_=f,f=0,_&1){fe=24;break i}}else s=e[o>>2]|0;if(o=e[p>>2]|0,e[p>>2]=o+4,e[o>>2]=s,s=B,B=B+-1|0,e[We>>2]=B,o=e[t>>2]|0,C=o+12|0,I=e[C>>2]|0,(I|0)==(e[o+16>>2]|0)){if(f=0,u0(e[(e[o>>2]|0)+40>>2]|0,o|0)|0,_=f,f=0,_&1){fe=24;break i}}else e[C>>2]=I+4;if((s|0)<=1)break;I=n,o=U}}if((e[p>>2]|0)==(e[h>>2]|0)){fe=242;break i}break}default:g=C}while(!1);t:do if((fe|0)==44)for(;;){fe=0,n=e[t>>2]|0;do if(n){if(s=e[n+12>>2]|0,(s|0)==(e[n+16>>2]|0)){if(f=0,n=u0(e[(e[n>>2]|0)+36>>2]|0,n|0)|0,_=f,f=0,_&1){fe=21;break i}}else n=e[s>>2]|0;if((n|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);do if(o){if(n=e[o+12>>2]|0,(n|0)==(e[o+16>>2]|0)){if(f=0,n=u0(e[(e[o>>2]|0)+36>>2]|0,o|0)|0,_=f,f=0,_&1){fe=21;break i}}else n=e[n>>2]|0;if((n|0)!=-1)if(s^(g|0)==0){I=g,o=g;break}else{g=C;break t}else{e[r>>2]=0,g=0,fe=57;break}}else fe=57;while(!1);if((fe|0)==57)if(fe=0,s){g=C;break t}else I=g,o=0;if(g=e[t>>2]|0,n=e[g+12>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,_=f,f=0,_&1){fe=21;break i}}else g=e[n>>2]|0;if(f=0,g=L0(e[(e[c>>2]|0)+12>>2]|0,c|0,8192,g|0)|0,_=f,f=0,_&1){fe=21;break i}if(!g){g=C;break t}if(g=e[t>>2]|0,n=g+12|0,s=e[n>>2]|0,(s|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,fe=f,f=0,fe&1){fe=21;break i}}else e[n>>2]=s+4,g=e[s>>2]|0;if(f=0,h0(92,he|0,g|0),fe=f,f=0,fe&1){fe=21;break i}else g=I,fe=44}while(!1);if(F=F+1|0,F>>>0>=4){U=g,fe=244;break}else C=g}i:switch(fe|0){case 21:{n=b()|0;break e}case 22:{n=b()|0;break e}case 23:{n=b()|0;break e}case 24:{n=b()|0;break e}case 25:{n=b()|0;break e}case 26:{n=b()|0;break e}case 42:{e[l>>2]=e[l>>2]|4,n=0;break}case 107:{e[l>>2]=e[l>>2]|4,n=0;break}case 148:{e[l>>2]=e[l>>2]|4,n=0;break}case 206:{e[l>>2]=e[l>>2]|4,n=0;break}case 231:{e[l>>2]=e[l>>2]|4,n=0;break}case 242:{e[l>>2]=e[l>>2]|4,n=0;break}case 244:{t:do if(k){C=k+4|0,I=k+8|0,o=1;r:for(;;){if(g=d[k>>0]|0,g&1?g=e[C>>2]|0:g=(g&255)>>>1,o>>>0>=g>>>0)break t;g=e[t>>2]|0;do if(g){if(n=e[g+12>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,p=f,f=0,p&1){fe=20;break r}}else g=e[n>>2]|0;if((g|0)==-1){e[t>>2]=0,s=1;break}else{s=(e[t>>2]|0)==0;break}}else s=1;while(!1);g=e[r>>2]|0;do if(g){if(n=e[g+12>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,p=f,f=0,p&1){fe=20;break r}}else g=e[n>>2]|0;if((g|0)!=-1){if(s)break;fe=271;break r}else{e[r>>2]=0,fe=263;break}}else fe=263;while(!1);if((fe|0)==263&&(fe=0,s)){fe=271;break}if(g=e[t>>2]|0,n=e[g+12>>2]|0,(n|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,p=f,f=0,p&1){fe=20;break}}else g=e[n>>2]|0;if(d[k>>0]&1?n=e[I>>2]|0:n=C,(g|0)!=(e[n+(o<<2)>>2]|0)){fe=271;break}if(g=o+1|0,n=e[t>>2]|0,s=n+12|0,o=e[s>>2]|0,(o|0)==(e[n+16>>2]|0))if(f=0,u0(e[(e[n>>2]|0)+40>>2]|0,n|0)|0,p=f,f=0,p&1){fe=20;break}else{o=g;continue}else{e[s>>2]=o+4,o=g;continue}}if((fe|0)==20){n=b()|0;break e}else if((fe|0)==271){e[l>>2]=e[l>>2]|4,n=0;break i}}while(!1);g=e[fi>>2]|0,(g|0)!=(U|0)&&(e[vi>>2]=0,Oi(Ti,g,U,vi),(e[vi>>2]|0)!=0)?(e[l>>2]=e[l>>2]|4,n=0):n=1;break}}return ye(he),ye(mi),ye(_0),ye(Pe),f0(Ti),g=e[fi>>2]|0,e[fi>>2]=0,g|0&&(f=0,n0(e[ri>>2]|0,g|0),fi=f,f=0,fi&1)&&(fi=b(0)|0,Ie(fi)),y=li,n|0}while(!1);return ye(he),ye(mi),ye(_0),ye(Pe),f0(Ti),g=e[fi>>2]|0,e[fi>>2]=0,g|0&&(f=0,n0(e[ri>>2]|0,g|0),fi=f,f=0,fi&1)&&(fi=b(0)|0,Ie(fi)),r0(n|0),0}function tc(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0;if(_=y,y=y+432|0,c=_+424|0,t=_+24|0,M=_+16|0,U=_+8|0,C=_+4|0,I=_+428|0,h=_,e[M>>2]=t,K=M+4|0,e[K>>2]=189,p=t+400|0,f=0,O=u0(68,o|0)|0,g=f,f=0,g&1)c=b()|0,e[M>>2]=0,X=38;else{e[C>>2]=O,f=0,g=y0(37,C|0,44212)|0,t=f,f=0;e:do if(!(t&1)&&(d[I>>0]=0,B=e[n>>2]|0,e[h>>2]=B,k=e[o+4>>2]|0,V=B,f=0,e[c>>2]=e[h>>2],k=Me(2,r|0,c|0,s|0,C|0,k|0,l|0,I|0,g|0,M|0,U|0,p|0)|0,o=f,f=0,!(o&1))){if(k){if(d[a>>0]&1?e[e[a+8>>2]>>2]=0:d[a>>0]=0,e[a+4>>2]=0,d[I>>0]|0&&(f=0,t=y0(e[(e[g>>2]|0)+44>>2]|0,g|0,45)|0,o=f,f=0,o&1||(f=0,h0(92,a|0,t|0),o=f,f=0,o&1))||(f=0,h=y0(e[(e[g>>2]|0)+44>>2]|0,g|0,48)|0,o=f,f=0,o&1))break;t=e[M>>2]|0,p=e[U>>2]|0,c=p+-4|0;i:do if(t>>>0>>0)do{if((e[t>>2]|0)!=(h|0))break i;t=t+4|0}while(t>>>0>>0);while(!1);if(f=0,L0(33,a|0,t|0,p|0)|0,a=f,f=0,a&1)break}t=e[r>>2]|0;do if(t){if(c=e[t+12>>2]|0,(c|0)==(e[t+16>>2]|0)){if(f=0,t=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,a=f,f=0,a&1)break e}else t=e[c>>2]|0;if((t|0)==-1){e[r>>2]=0,c=1;break}else{c=(e[r>>2]|0)==0;break}}else c=1;while(!1);do if(B){if(t=e[V+12>>2]|0,(t|0)==(e[V+16>>2]|0)){if(f=0,t=u0(e[(e[B>>2]|0)+36>>2]|0,V|0)|0,V=f,f=0,V&1)break e}else t=e[t>>2]|0;if((t|0)!=-1){if(c)break;X=32;break}else{e[n>>2]=0,X=30;break}}else X=30;while(!1);return(X|0)==30&&c&&(X=32),(X|0)==32&&(e[l>>2]=e[l>>2]|2),c=e[r>>2]|0,Ee(O)|0,t=e[M>>2]|0,e[M>>2]=0,t|0&&(f=0,n0(e[K>>2]|0,t|0),K=f,f=0,K&1)&&(K=b(0)|0,Ie(K)),y=_,c|0}while(!1);c=b()|0,Ee(O)|0,t=e[M>>2]|0,e[M>>2]=0,t?X=38:F=c}return(X|0)==38&&(f=0,n0(e[K>>2]|0,t|0),K=f,f=0,K&1?(K=b(0)|0,Ie(K)):F=c),r0(F|0),0}function rc(t,r,n,s,o,l,a,c,h,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0;var g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0;X=y,y=y+112|0,g=X+100|0,C=X+88|0,I=X+76|0,k=X+64|0,U=X+52|0,B=X+48|0,V=X+36|0,O=X+24|0,_=X+12|0,F=X;do if(t)if(t=Pi(r,43956)|0,Ke[e[(e[t>>2]|0)+44>>2]&127](g,t),F=e[g>>2]|0,d[n>>0]=F,d[n+1>>0]=F>>8,d[n+2>>0]=F>>16,d[n+3>>0]=F>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](C,t),d[h>>0]&1?e[e[h+8>>2]>>2]=0:d[h>>0]=0,e[h+4>>2]=0,f=0,h0(93,h|0,0),n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),e[h>>2]=e[C>>2],e[h+4>>2]=e[C+4>>2],e[h+8>>2]=e[C+8>>2],e[C>>2]=0,e[C+4>>2]=0,e[C+8>>2]=0,ye(C),Ke[e[(e[t>>2]|0)+28>>2]&127](I,t),d[c>>0]&1?e[e[c+8>>2]>>2]=0:d[c>>0]=0,e[c+4>>2]=0,f=0,h0(93,c|0,0),n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),e[c>>2]=e[I>>2],e[c+4>>2]=e[I+4>>2],e[c+8>>2]=e[I+8>>2],e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,ye(I),c=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,e[s>>2]=c,c=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,e[o>>2]=c,Ke[e[(e[t>>2]|0)+20>>2]&127](k,t),d[l>>0]&1?(d[e[l+8>>2]>>0]=0,e[l+4>>2]=0):(d[l+1>>0]=0,d[l>>0]=0),f=0,h0(91,l|0,0),o=f,f=0,o&1&&(o=b(0)|0,Ie(o)),e[l>>2]=e[k>>2],e[l+4>>2]=e[k+4>>2],e[l+8>>2]=e[k+8>>2],e[k>>2]=0,e[k+4>>2]=0,e[k+8>>2]=0,f0(k),Ke[e[(e[t>>2]|0)+24>>2]&127](U,t),d[a>>0]&1?e[e[a+8>>2]>>2]=0:d[a>>0]=0,e[a+4>>2]=0,f=0,h0(93,a|0,0),o=f,f=0,o&1)o=b(0)|0,Ie(o);else{e[a>>2]=e[U>>2],e[a+4>>2]=e[U+4>>2],e[a+8>>2]=e[U+8>>2],e[U>>2]=0,e[U+4>>2]=0,e[U+8>>2]=0,ye(U),M=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}else if(t=Pi(r,43892)|0,Ke[e[(e[t>>2]|0)+44>>2]&127](B,t),B=e[B>>2]|0,d[n>>0]=B,d[n+1>>0]=B>>8,d[n+2>>0]=B>>16,d[n+3>>0]=B>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](V,t),d[h>>0]&1?e[e[h+8>>2]>>2]=0:d[h>>0]=0,e[h+4>>2]=0,f=0,h0(93,h|0,0),n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),e[h>>2]=e[V>>2],e[h+4>>2]=e[V+4>>2],e[h+8>>2]=e[V+8>>2],e[V>>2]=0,e[V+4>>2]=0,e[V+8>>2]=0,ye(V),Ke[e[(e[t>>2]|0)+28>>2]&127](O,t),d[c>>0]&1?e[e[c+8>>2]>>2]=0:d[c>>0]=0,e[c+4>>2]=0,f=0,h0(93,c|0,0),n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),e[c>>2]=e[O>>2],e[c+4>>2]=e[O+4>>2],e[c+8>>2]=e[O+8>>2],e[O>>2]=0,e[O+4>>2]=0,e[O+8>>2]=0,ye(O),c=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,e[s>>2]=c,c=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,e[o>>2]=c,Ke[e[(e[t>>2]|0)+20>>2]&127](_,t),d[l>>0]&1?(d[e[l+8>>2]>>0]=0,e[l+4>>2]=0):(d[l+1>>0]=0,d[l>>0]=0),f=0,h0(91,l|0,0),o=f,f=0,o&1&&(o=b(0)|0,Ie(o)),e[l>>2]=e[_>>2],e[l+4>>2]=e[_+4>>2],e[l+8>>2]=e[_+8>>2],e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f0(_),Ke[e[(e[t>>2]|0)+24>>2]&127](F,t),d[a>>0]&1?e[e[a+8>>2]>>2]=0:d[a>>0]=0,e[a+4>>2]=0,f=0,h0(93,a|0,0),o=f,f=0,o&1)o=b(0)|0,Ie(o);else{e[a>>2]=e[F>>2],e[a+4>>2]=e[F+4>>2],e[a+8>>2]=e[F+8>>2],e[F>>2]=0,e[F+4>>2]=0,e[F+8>>2]=0,ye(F),M=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}while(!1);e[p>>2]=M,y=X}function nc(t){t=t|0}function sc(t){t=t|0,a0(t)}function oc(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=+l;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0;Z=y,y=y+384|0,V=Z+8|0,a=Z,h=Z+284|0,p=Z+72|0,c=Z+184|0,w0=Z+68|0,X=Z+80|0,_=Z+77|0,K=Z+76|0,v0=Z+56|0,Y0=Z+44|0,A0=Z+32|0,g=Z+28|0,B=Z+84|0,M=Z+24|0,F=Z+20|0,O=Z+16|0,e[p>>2]=h,H[V>>3]=l,h=Fn(h,100,59018,V)|0;do if(h>>>0>99)if(f=0,t=p0(3)|0,t0=f,f=0,!(t0&1)&&(f=0,H[a>>3]=l,k=k0(17,p|0,t|0,59018,a|0)|0,t0=f,f=0,!(t0&1))){if(t=e[p>>2]|0,!t){if(f=0,we(6),t0=f,f=0,t0&1){t=0,a=0,t0=7;break}t=e[p>>2]|0}c=xi(k)|0,a=c,c?(U=c,t0=10):(f=0,we(6),t0=f,f=0,t0&1?t0=7:(U=0,t0=10))}else t=0,a=0,t0=7;else a=0,t=0,U=c,k=h,t0=10;while(!1);if((t0|0)==10)if(f=0,c=u0(68,s|0)|0,I=f,f=0,I&1)t0=7;else{if(e[w0>>2]=c,f=0,I=y0(37,w0|0,44220)|0,C=f,f=0,!(C&1)&&(C=e[p>>2]|0,f=0,k0(e[(e[I>>2]|0)+32>>2]|0,I|0,C|0,C+k|0,U|0)|0,C=f,f=0,!(C&1))){if(k?C=(d[e[p>>2]>>0]|0)==45:C=0,e[v0>>2]=0,e[v0+4>>2]=0,e[v0+8>>2]=0,e[Y0>>2]=0,e[Y0+4>>2]=0,e[Y0+8>>2]=0,e[A0>>2]=0,e[A0+4>>2]=0,e[A0+8>>2]=0,f=0,Ci(3,n|0,C|0,w0|0,X|0,_|0,K|0,v0|0,Y0|0,A0|0,g|0),n=f,f=0,n&1)h=b()|0;else{if(g=e[g>>2]|0,(k|0)>(g|0)?(n=d[A0>>0]|0,h=d[Y0>>0]|0,h=(k-g<<1|1)+g+(n&1?e[A0+4>>2]|0:(n&255)>>>1)+(h&1?e[Y0+4>>2]|0:(h&255)>>>1)|0):(n=d[A0>>0]|0,h=d[Y0>>0]|0,h=g+2+(n&1?e[A0+4>>2]|0:(n&255)>>>1)+(h&1?e[Y0+4>>2]|0:(h&255)>>>1)|0),h>>>0>100?(h=xi(h)|0,p=h,h?t0=26:(f=0,we(6),B=f,f=0,B&1||(h=0,t0=26))):(p=0,h=B,t0=26),(t0|0)==26&&(f=0,Ye(1,h|0,M|0,F|0,e[s+4>>2]|0,U|0,U+k|0,I|0,C|0,X|0,d[_>>0]|0,d[K>>0]|0,v0|0,Y0|0,A0|0,g|0),K=f,f=0,!(K&1)&&(e[O>>2]=e[r>>2],r=e[M>>2]|0,s0=e[F>>2]|0,f=0,e[V>>2]=e[O>>2],s0=Fe(39,V|0,h|0,r|0,s0|0,s|0,o|0)|0,r=f,f=0,!(r&1))))return p&&(Ze(p),c=e[w0>>2]|0),f0(A0),f0(Y0),f0(v0),Ee(c)|0,a&&Ze(a),t&&Ze(t),y=Z,s0|0;h=b()|0,p&&(Ze(p),c=e[w0>>2]|0)}f0(A0),f0(Y0),f0(v0)}else h=b()|0;Ee(c)|0}return(t0|0)==7&&(h=b()|0),a&&Ze(a),t&&Ze(t),r0(h|0),0}function ac(t,r,n,s,o,l,a,c,h,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0;var g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;s0=y,y=y+112|0,I=s0+108|0,k=s0+96|0,V=s0+92|0,O=s0+80|0,_=s0+68|0,F=s0+56|0,M=s0+52|0,X=s0+40|0,K=s0+36|0,t0=s0+24|0,U=s0+12|0,B=s0;do if(t){t=Pi(n,43828)|0,n=e[t>>2]|0;do if(r)if(Ke[e[n+44>>2]&127](I,t),r=e[I>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](k,t),d[h>>0]&1?(d[e[h+8>>2]>>0]=0,e[h+4>>2]=0):(d[h+1>>0]=0,d[h>>0]=0),f=0,h0(91,h|0,0),s=f,f=0,s&1)h=b(0)|0,Ie(h);else{e[h>>2]=e[k>>2],e[h+4>>2]=e[k+4>>2],e[h+8>>2]=e[k+8>>2],e[k>>2]=0,e[k+4>>2]=0,e[k+8>>2]=0,f0(k),C=t;break}else if(Ke[e[n+40>>2]&127](V,t),r=e[V>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+28>>2]&127](O,t),d[h>>0]&1?(d[e[h+8>>2]>>0]=0,e[h+4>>2]=0):(d[h+1>>0]=0,d[h>>0]=0),f=0,h0(91,h|0,0),s=f,f=0,s&1)h=b(0)|0,Ie(h);else{e[h>>2]=e[O>>2],e[h+4>>2]=e[O+4>>2],e[h+8>>2]=e[O+8>>2],e[O>>2]=0,e[O+4>>2]=0,e[O+8>>2]=0,f0(O),C=t;break}while(!1);if(h=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,d[o>>0]=h,h=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,d[l>>0]=h,Ke[e[(e[C>>2]|0)+20>>2]&127](_,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),l=f,f=0,l&1&&(l=b(0)|0,Ie(l)),e[a>>2]=e[_>>2],e[a+4>>2]=e[_+4>>2],e[a+8>>2]=e[_+8>>2],e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f0(_),Ke[e[(e[C>>2]|0)+24>>2]&127](F,t),d[c>>0]&1?(d[e[c+8>>2]>>0]=0,e[c+4>>2]=0):(d[c+1>>0]=0,d[c>>0]=0),f=0,h0(91,c|0,0),l=f,f=0,l&1)l=b(0)|0,Ie(l);else{e[c>>2]=e[F>>2],e[c+4>>2]=e[F+4>>2],e[c+8>>2]=e[F+8>>2],e[F>>2]=0,e[F+4>>2]=0,e[F+8>>2]=0,f0(F),Z=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}}else{t=Pi(n,43764)|0,n=e[t>>2]|0;do if(r)if(Ke[e[n+44>>2]&127](M,t),r=e[M>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](X,t),d[h>>0]&1?(d[e[h+8>>2]>>0]=0,e[h+4>>2]=0):(d[h+1>>0]=0,d[h>>0]=0),f=0,h0(91,h|0,0),s=f,f=0,s&1)h=b(0)|0,Ie(h);else{e[h>>2]=e[X>>2],e[h+4>>2]=e[X+4>>2],e[h+8>>2]=e[X+8>>2],e[X>>2]=0,e[X+4>>2]=0,e[X+8>>2]=0,f0(X),g=t;break}else if(Ke[e[n+40>>2]&127](K,t),r=e[K>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+28>>2]&127](t0,t),d[h>>0]&1?(d[e[h+8>>2]>>0]=0,e[h+4>>2]=0):(d[h+1>>0]=0,d[h>>0]=0),f=0,h0(91,h|0,0),s=f,f=0,s&1)h=b(0)|0,Ie(h);else{e[h>>2]=e[t0>>2],e[h+4>>2]=e[t0+4>>2],e[h+8>>2]=e[t0+8>>2],e[t0>>2]=0,e[t0+4>>2]=0,e[t0+8>>2]=0,f0(t0),g=t;break}while(!1);if(h=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,d[o>>0]=h,h=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,d[l>>0]=h,Ke[e[(e[g>>2]|0)+20>>2]&127](U,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),l=f,f=0,l&1&&(l=b(0)|0,Ie(l)),e[a>>2]=e[U>>2],e[a+4>>2]=e[U+4>>2],e[a+8>>2]=e[U+8>>2],e[U>>2]=0,e[U+4>>2]=0,e[U+8>>2]=0,f0(U),Ke[e[(e[g>>2]|0)+24>>2]&127](B,t),d[c>>0]&1?(d[e[c+8>>2]>>0]=0,e[c+4>>2]=0):(d[c+1>>0]=0,d[c>>0]=0),f=0,h0(91,c|0,0),l=f,f=0,l&1)l=b(0)|0,Ie(l);else{e[c>>2]=e[B>>2],e[c+4>>2]=e[B+4>>2],e[c+8>>2]=e[B+8>>2],e[B>>2]=0,e[B+4>>2]=0,e[B+8>>2]=0,f0(B),Z=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}}while(!1);e[p>>2]=Z,y=s0}function fc(t,r,n,s,o,l,a,c,h,p,g,C,I,k,U){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,C=C|0,I=I|0,k=k|0,U=U|0;var B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,$e=0,We=0,_e=0,le=0,be=0,ne=0,fe=0;e[n>>2]=t,be=k+4|0,ne=k+8|0,fe=k+1|0,ze=I+4|0,Re=(s&512|0)==0,$e=I+8|0,We=I+1|0,_e=a+8|0,le=(U|0)>0,t0=C+4|0,Z=C+8|0,s0=C+1|0,w0=U+1|0,A0=-2-U-((U|0)<0?~U:-1)|0,Y0=(U|0)>0,K=0;do{switch(d[h+K>>0]|0){case 0:{e[r>>2]=e[n>>2];break}case 1:{e[r>>2]=e[n>>2],M=Ni[e[(e[a>>2]|0)+28>>2]&63](a,32)|0,X=e[n>>2]|0,e[n>>2]=X+1,d[X>>0]=M;break}case 3:{X=d[k>>0]|0,B=(X&1)==0,(B?(X&255)>>>1:e[be>>2]|0)|0&&(M=d[(B?fe:e[ne>>2]|0)>>0]|0,X=e[n>>2]|0,e[n>>2]=X+1,d[X>>0]=M);break}case 2:{if(O=d[I>>0]|0,B=(O&1)==0,O=B?(O&255)>>>1:e[ze>>2]|0,!(Re|(O|0)==0)){if(V=B?We:e[$e>>2]|0,_=V+O|0,B=e[n>>2]|0,O)do d[B>>0]=d[V>>0]|0,V=V+1|0,B=B+1|0;while((V|0)!=(_|0));e[n>>2]=B}break}case 4:{B=e[n>>2]|0,o=c?o+1|0:o,F=o,_=e[_e>>2]|0;e:do if(o>>>0>>0){V=o;do{if(O=d[V>>0]|0,O<<24>>24<=-1||!(E[_+(O<<24>>24<<1)>>1]&2048))break e;V=V+1|0}while(V>>>0>>0)}else V=o;while(!1);if(O=V,le){if(M=-2-O-~(O>>>0>F>>>0?F:O)|0,M=A0>>>0>M>>>0?A0:M,V>>>0>o>>>0&Y0)for(O=V,F=U;O=O+-1|0,X=d[O>>0]|0,_=e[n>>2]|0,e[n>>2]=_+1,d[_>>0]=X,_=(F|0)>1,O>>>0>o>>>0&_;)F=F+-1|0;else _=Y0;if(X=w0+M|0,O=V+(M+1)|0,_?F=Ni[e[(e[a>>2]|0)+28>>2]&63](a,48)|0:F=0,V=e[n>>2]|0,e[n>>2]=V+1,(X|0)>0)for(_=X;d[V>>0]=F,V=e[n>>2]|0,e[n>>2]=V+1,(_|0)>1;)_=_+-1|0;d[V>>0]=p}else O=V;if((O|0)!=(o|0)){if(X=d[C>>0]|0,V=(X&1)==0,(V?(X&255)>>>1:e[t0>>2]|0)|0?V=d[(V?s0:e[Z>>2]|0)>>0]|0:V=-1,(O|0)!=(o|0))for(_=0,F=0;(F|0)==(V|0)&&(X=e[n>>2]|0,e[n>>2]=X+1,d[X>>0]=g,_=_+1|0,X=d[C>>0]|0,V=(X&1)==0,_>>>0<(V?(X&255)>>>1:e[t0>>2]|0)>>>0?(V=d[(V?s0:e[Z>>2]|0)+_>>0]|0,V=V<<24>>24==127?-1:V<<24>>24,F=0):(V=F,F=0)),O=O+-1|0,M=d[O>>0]|0,X=e[n>>2]|0,e[n>>2]=X+1,d[X>>0]=M,(O|0)!=(o|0);)F=F+1|0}else M=Ni[e[(e[a>>2]|0)+28>>2]&63](a,48)|0,X=e[n>>2]|0,e[n>>2]=X+1,d[X>>0]=M;if(V=e[n>>2]|0,(B|0)!=(V|0)&&(v0=V+-1|0,B>>>0>>0)){V=v0;do X=d[B>>0]|0,d[B>>0]=d[V>>0]|0,d[V>>0]=X,B=B+1|0,V=V+-1|0;while(B>>>0>>0)}break}default:}K=K+1|0}while((K|0)!=4);if(V=d[k>>0]|0,o=(V&1)==0,V=o?(V&255)>>>1:e[be>>2]|0,V>>>0>1){if(B=o?fe:e[ne>>2]|0,O=B+V|0,o=e[n>>2]|0,(V|0)!=1){B=B+1|0;do d[o>>0]=d[B>>0]|0,o=o+1|0,B=B+1|0;while((B|0)!=(O|0))}e[n>>2]=o}switch(s&176|0){case 32:{e[r>>2]=e[n>>2];break}case 16:break;default:e[r>>2]=t}}function uc(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;X=y,y=y+176|0,k=X+56|0,t0=X+52|0,F=X+64|0,V=X+61|0,M=X+60|0,Z=X+40|0,w0=X+28|0,s0=X+16|0,p=X+12|0,I=X+68|0,_=X+8|0,O=X+4|0,U=X,t=ai(s)|0,e[t0>>2]=t,f=0,B=y0(37,t0|0,44220)|0,C=f,f=0;do if(C&1)v0=13;else{if(g=d[l>>0]|0,a=(g&1)==0,C=l+4|0,!((a?(g&255)>>>1:e[C>>2]|0)|0))g=0;else{if(a=d[(a?l+1|0:e[l+8>>2]|0)>>0]|0,f=0,c=y0(e[(e[B>>2]|0)+28>>2]|0,B|0,45)|0,g=f,f=0,g&1){v0=13;break}g=a<<24>>24==c<<24>>24}if(e[Z>>2]=0,e[Z+4>>2]=0,e[Z+8>>2]=0,e[w0>>2]=0,e[w0+4>>2]=0,e[w0+8>>2]=0,e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,f=0,Ci(3,n|0,g|0,t0|0,F|0,V|0,M|0,Z|0,w0|0,s0|0,p|0),h=f,f=0,h&1)a=b()|0;else{if(h=d[l>>0]|0,n=e[C>>2]|0,a=h&1?n:(h&255)>>>1,p=e[p>>2]|0,(a|0)>(p|0)?(A0=d[s0>>0]|0,c=d[w0>>0]|0,a=(a-p<<1|1)+p+(A0&1?e[s0+4>>2]|0:(A0&255)>>>1)+(c&1?e[w0+4>>2]|0:(c&255)>>>1)|0):(A0=d[s0>>0]|0,a=d[w0>>0]|0,a=p+2+(A0&1?e[s0+4>>2]|0:(A0&255)>>>1)+(a&1?e[w0+4>>2]|0:(a&255)>>>1)|0),a>>>0>100?(a=xi(a)|0,c=a,a?v0=17:(f=0,we(6),A0=f,f=0,A0&1||(h=d[l>>0]|0,n=e[C>>2]|0,a=0,v0=17))):(c=0,a=I,v0=17),(v0|0)==17&&(A0=(h&1)==0,l=A0?l+1|0:e[l+8>>2]|0,f=0,Ye(1,a|0,_|0,O|0,e[s+4>>2]|0,l|0,l+(A0?(h&255)>>>1:n)|0,B|0,g|0,F|0,d[V>>0]|0,d[M>>0]|0,Z|0,w0|0,s0|0,p|0),A0=f,f=0,!(A0&1)&&(e[U>>2]=e[r>>2],A0=e[_>>2]|0,K=e[O>>2]|0,f=0,e[k>>2]=e[U>>2],K=Fe(39,k|0,a|0,A0|0,K|0,s|0,o|0)|0,A0=f,f=0,!(A0&1))))return c&&(Ze(c),t=e[t0>>2]|0),f0(s0),f0(w0),f0(Z),Ee(t)|0,y=X,K|0;a=b()|0,c&&(Ze(c),t=e[t0>>2]|0)}f0(s0),f0(w0),f0(Z)}while(!1);return(v0|0)==13&&(a=b()|0),Ee(t)|0,r0(a|0),0}function cc(t){t=t|0}function hc(t){t=t|0,a0(t)}function mc(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=+l;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0;Z=y,y=y+992|0,V=Z+8|0,a=Z,h=Z+888|0,p=Z+880|0,c=Z+480|0,w0=Z+76|0,X=Z+884|0,_=Z+72|0,K=Z+68|0,v0=Z+56|0,Y0=Z+44|0,A0=Z+32|0,g=Z+28|0,B=Z+80|0,M=Z+24|0,F=Z+20|0,O=Z+16|0,e[p>>2]=h,H[V>>3]=l,h=Fn(h,100,59018,V)|0;do if(h>>>0>99)if(f=0,t=p0(3)|0,t0=f,f=0,!(t0&1)&&(f=0,H[a>>3]=l,k=k0(17,p|0,t|0,59018,a|0)|0,t0=f,f=0,!(t0&1))){if(t=e[p>>2]|0,!t){if(f=0,we(6),t0=f,f=0,t0&1){t=0,a=0,t0=7;break}t=e[p>>2]|0}c=xi(k<<2)|0,a=c,c?(U=c,t0=10):(f=0,we(6),t0=f,f=0,t0&1?t0=7:(U=0,t0=10))}else t=0,a=0,t0=7;else a=0,t=0,U=c,k=h,t0=10;while(!1);if((t0|0)==10)if(f=0,c=u0(68,s|0)|0,I=f,f=0,I&1)t0=7;else{if(e[w0>>2]=c,f=0,I=y0(37,w0|0,44212)|0,C=f,f=0,!(C&1)&&(C=e[p>>2]|0,f=0,k0(e[(e[I>>2]|0)+48>>2]|0,I|0,C|0,C+k|0,U|0)|0,C=f,f=0,!(C&1))){if(k?C=(d[e[p>>2]>>0]|0)==45:C=0,e[v0>>2]=0,e[v0+4>>2]=0,e[v0+8>>2]=0,e[Y0>>2]=0,e[Y0+4>>2]=0,e[Y0+8>>2]=0,e[A0>>2]=0,e[A0+4>>2]=0,e[A0+8>>2]=0,f=0,Ci(4,n|0,C|0,w0|0,X|0,_|0,K|0,v0|0,Y0|0,A0|0,g|0),n=f,f=0,n&1)h=b()|0;else{if(g=e[g>>2]|0,(k|0)>(g|0)?(n=d[A0>>0]|0,h=d[Y0>>0]|0,h=(k-g<<1|1)+g+(n&1?e[A0+4>>2]|0:(n&255)>>>1)+(h&1?e[Y0+4>>2]|0:(h&255)>>>1)|0):(n=d[A0>>0]|0,h=d[Y0>>0]|0,h=g+2+(n&1?e[A0+4>>2]|0:(n&255)>>>1)+(h&1?e[Y0+4>>2]|0:(h&255)>>>1)|0),h>>>0>100?(h=xi(h<<2)|0,p=h,h?t0=26:(f=0,we(6),B=f,f=0,B&1||(h=0,t0=26))):(p=0,h=B,t0=26),(t0|0)==26&&(f=0,Ye(2,h|0,M|0,F|0,e[s+4>>2]|0,U|0,U+(k<<2)|0,I|0,C|0,X|0,e[_>>2]|0,e[K>>2]|0,v0|0,Y0|0,A0|0,g|0),K=f,f=0,!(K&1)&&(e[O>>2]=e[r>>2],r=e[M>>2]|0,s0=e[F>>2]|0,f=0,e[V>>2]=e[O>>2],s0=Fe(40,V|0,h|0,r|0,s0|0,s|0,o|0)|0,r=f,f=0,!(r&1))))return p&&(Ze(p),c=e[w0>>2]|0),ye(A0),ye(Y0),f0(v0),Ee(c)|0,a&&Ze(a),t&&Ze(t),y=Z,s0|0;h=b()|0,p&&(Ze(p),c=e[w0>>2]|0)}ye(A0),ye(Y0),f0(v0)}else h=b()|0;Ee(c)|0}return(t0|0)==7&&(h=b()|0),a&&Ze(a),t&&Ze(t),r0(h|0),0}function dc(t,r,n,s,o,l,a,c,h,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0;var g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0;t0=y,y=y+112|0,g=t0+108|0,C=t0+96|0,U=t0+92|0,B=t0+80|0,V=t0+68|0,O=t0+56|0,_=t0+52|0,F=t0+40|0,M=t0+36|0,X=t0+24|0,I=t0+12|0,k=t0;do if(t){t=Pi(n,43956)|0,n=e[t>>2]|0;do if(r)if(Ke[e[n+44>>2]&127](g,t),r=e[g>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](C,t),d[h>>0]&1?e[e[h+8>>2]>>2]=0:d[h>>0]=0,e[h+4>>2]=0,f=0,h0(93,h|0,0),s=f,f=0,s&1)h=b(0)|0,Ie(h);else{e[h>>2]=e[C>>2],e[h+4>>2]=e[C+4>>2],e[h+8>>2]=e[C+8>>2],e[C>>2]=0,e[C+4>>2]=0,e[C+8>>2]=0,ye(C);break}else if(Ke[e[n+40>>2]&127](U,t),r=e[U>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+28>>2]&127](B,t),d[h>>0]&1?e[e[h+8>>2]>>2]=0:d[h>>0]=0,e[h+4>>2]=0,f=0,h0(93,h|0,0),s=f,f=0,s&1)h=b(0)|0,Ie(h);else{e[h>>2]=e[B>>2],e[h+4>>2]=e[B+4>>2],e[h+8>>2]=e[B+8>>2],e[B>>2]=0,e[B+4>>2]=0,e[B+8>>2]=0,ye(B);break}while(!1);if(h=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,e[o>>2]=h,h=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,e[l>>2]=h,Ke[e[(e[t>>2]|0)+20>>2]&127](V,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),l=f,f=0,l&1&&(l=b(0)|0,Ie(l)),e[a>>2]=e[V>>2],e[a+4>>2]=e[V+4>>2],e[a+8>>2]=e[V+8>>2],e[V>>2]=0,e[V+4>>2]=0,e[V+8>>2]=0,f0(V),Ke[e[(e[t>>2]|0)+24>>2]&127](O,t),d[c>>0]&1?e[e[c+8>>2]>>2]=0:d[c>>0]=0,e[c+4>>2]=0,f=0,h0(93,c|0,0),l=f,f=0,l&1)l=b(0)|0,Ie(l);else{e[c>>2]=e[O>>2],e[c+4>>2]=e[O+4>>2],e[c+8>>2]=e[O+8>>2],e[O>>2]=0,e[O+4>>2]=0,e[O+8>>2]=0,ye(O),K=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}}else{t=Pi(n,43892)|0,n=e[t>>2]|0;do if(r)if(Ke[e[n+44>>2]&127](_,t),r=e[_>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+32>>2]&127](F,t),d[h>>0]&1?e[e[h+8>>2]>>2]=0:d[h>>0]=0,e[h+4>>2]=0,f=0,h0(93,h|0,0),s=f,f=0,s&1)h=b(0)|0,Ie(h);else{e[h>>2]=e[F>>2],e[h+4>>2]=e[F+4>>2],e[h+8>>2]=e[F+8>>2],e[F>>2]=0,e[F+4>>2]=0,e[F+8>>2]=0,ye(F);break}else if(Ke[e[n+40>>2]&127](M,t),r=e[M>>2]|0,d[s>>0]=r,d[s+1>>0]=r>>8,d[s+2>>0]=r>>16,d[s+3>>0]=r>>24,Ke[e[(e[t>>2]|0)+28>>2]&127](X,t),d[h>>0]&1?e[e[h+8>>2]>>2]=0:d[h>>0]=0,e[h+4>>2]=0,f=0,h0(93,h|0,0),s=f,f=0,s&1)h=b(0)|0,Ie(h);else{e[h>>2]=e[X>>2],e[h+4>>2]=e[X+4>>2],e[h+8>>2]=e[X+8>>2],e[X>>2]=0,e[X+4>>2]=0,e[X+8>>2]=0,ye(X);break}while(!1);if(h=Se[e[(e[t>>2]|0)+12>>2]&127](t)|0,e[o>>2]=h,h=Se[e[(e[t>>2]|0)+16>>2]&127](t)|0,e[l>>2]=h,Ke[e[(e[t>>2]|0)+20>>2]&127](I,t),d[a>>0]&1?(d[e[a+8>>2]>>0]=0,e[a+4>>2]=0):(d[a+1>>0]=0,d[a>>0]=0),f=0,h0(91,a|0,0),l=f,f=0,l&1&&(l=b(0)|0,Ie(l)),e[a>>2]=e[I>>2],e[a+4>>2]=e[I+4>>2],e[a+8>>2]=e[I+8>>2],e[I>>2]=0,e[I+4>>2]=0,e[I+8>>2]=0,f0(I),Ke[e[(e[t>>2]|0)+24>>2]&127](k,t),d[c>>0]&1?e[e[c+8>>2]>>2]=0:d[c>>0]=0,e[c+4>>2]=0,f=0,h0(93,c|0,0),l=f,f=0,l&1)l=b(0)|0,Ie(l);else{e[c>>2]=e[k>>2],e[c+4>>2]=e[k+4>>2],e[c+8>>2]=e[k+8>>2],e[k>>2]=0,e[k+4>>2]=0,e[k+8>>2]=0,ye(k),K=Se[e[(e[t>>2]|0)+36>>2]&127](t)|0;break}}while(!1);e[p>>2]=K,y=t0}function gc(t,r,n,s,o,l,a,c,h,p,g,C,I,k,U){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,C=C|0,I=I|0,k=k|0,U=U|0;var B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,$e=0,We=0,_e=0;e[n>>2]=t,We=k+4|0,_e=k+8|0,w0=I+4|0,v0=(s&512|0)==0,A0=I+8|0,Y0=(U|0)>0,ze=C+4|0,Re=C+8|0,$e=C+1|0,Z=(U|0)>0,t0=0;do{switch(d[h+t0>>0]|0){case 0:{e[r>>2]=e[n>>2];break}case 1:{e[r>>2]=e[n>>2],X=Ni[e[(e[a>>2]|0)+44>>2]&63](a,32)|0,K=e[n>>2]|0,e[n>>2]=K+4,e[K>>2]=X;break}case 3:{K=d[k>>0]|0,B=(K&1)==0,(B?(K&255)>>>1:e[We>>2]|0)|0&&(X=e[(B?We:e[_e>>2]|0)>>2]|0,K=e[n>>2]|0,e[n>>2]=K+4,e[K>>2]=X);break}case 2:{if(F=d[I>>0]|0,B=(F&1)==0,F=B?(F&255)>>>1:e[w0>>2]|0,!(v0|(F|0)==0)){if(B=B?w0:e[A0>>2]|0,O=B+(F<<2)|0,_=e[n>>2]|0,F)for(V=_;e[V>>2]=e[B>>2],B=B+4|0,(B|0)!=(O|0);)V=V+4|0;e[n>>2]=_+(F<<2)}break}case 4:{B=e[n>>2]|0,o=c?o+4|0:o;e:do if(o>>>0>>0){V=o;do{if(!(Qe[e[(e[a>>2]|0)+12>>2]&63](a,2048,e[V>>2]|0)|0))break e;V=V+4|0}while(V>>>0>>0)}else V=o;while(!1);if(Y0){if(V>>>0>o>>>0&Z){for(F=e[n>>2]|0,_=U;;)if(V=V+-4|0,O=F+4|0,e[F>>2]=e[V>>2],M=_+-1|0,_=(_|0)>1,V>>>0>o>>>0&_)F=O,_=M;else{F=M;break}e[n>>2]=O,O=F}else _=Z,O=U;if(_?M=Ni[e[(e[a>>2]|0)+44>>2]&63](a,48)|0:M=0,X=e[n>>2]|0,_=O+((O|0)<0?~O:-1)|0,(O|0)>0)for(F=X;e[F>>2]=M,(O|0)>1;)F=F+4|0,O=O+-1|0;e[n>>2]=X+(_+2<<2),e[X+(_+1<<2)>>2]=p}if((V|0)==(o|0))X=Ni[e[(e[a>>2]|0)+44>>2]&63](a,48)|0,K=e[n>>2]|0,V=K+4|0,e[n>>2]=V,e[K>>2]=X;else{if(X=d[C>>0]|0,O=(X&1)==0,K=e[ze>>2]|0,(O?(X&255)>>>1:K)|0?O=d[(O?$e:e[Re>>2]|0)>>0]|0:O=-1,(V|0)!=(o|0))for(M=0,X=0;_=e[n>>2]|0,(X|0)==(O|0)?(F=_+4|0,e[n>>2]=F,e[_>>2]=g,M=M+1|0,_=d[C>>0]|0,O=(_&1)==0,M>>>0<(O?(_&255)>>>1:K)>>>0?(O=d[(O?$e:e[Re>>2]|0)+M>>0]|0,_=F,O=O<<24>>24==127?-1:O<<24>>24,F=0):(_=F,O=X,F=0)):F=X,V=V+-4|0,X=e[V>>2]|0,e[n>>2]=_+4,e[_>>2]=X,(V|0)!=(o|0);)X=F+1|0;V=e[n>>2]|0}if((B|0)!=(V|0)&&(s0=V+-4|0,B>>>0>>0)){V=s0;do K=e[B>>2]|0,e[B>>2]=e[V>>2],e[V>>2]=K,B=B+4|0,V=V+-4|0;while(B>>>0>>0)}break}default:}t0=t0+1|0}while((t0|0)!=4);if(B=d[k>>0]|0,o=(B&1)==0,B=o?(B&255)>>>1:e[We>>2]|0,B>>>0>1){if(V=o?We:e[_e>>2]|0,o=V+4|0,V=V+(B<<2)|0,O=e[n>>2]|0,_=V-o|0,(B|0)!=1)for(B=O;e[B>>2]=e[o>>2],o=o+4|0,(o|0)!=(V|0);)B=B+4|0;e[n>>2]=O+(_>>>2<<2)}switch(s&176|0){case 32:{e[r>>2]=e[n>>2];break}case 16:break;default:e[r>>2]=t}}function pc(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;X=y,y=y+480|0,I=X+468|0,t0=X+464|0,F=X+472|0,V=X+56|0,M=X+52|0,Z=X+40|0,w0=X+28|0,s0=X+16|0,p=X+12|0,C=X+64|0,_=X+8|0,O=X+4|0,k=X,t=ai(s)|0,e[t0>>2]=t,f=0,U=y0(37,t0|0,44212)|0,B=f,f=0;do if(B&1)v0=13;else{if(g=d[l>>0]|0,a=(g&1)==0,B=l+4|0,!((a?(g&255)>>>1:e[B>>2]|0)|0))g=0;else{if(a=e[(a?B:e[l+8>>2]|0)>>2]|0,f=0,c=y0(e[(e[U>>2]|0)+44>>2]|0,U|0,45)|0,g=f,f=0,g&1){v0=13;break}g=(a|0)==(c|0)}if(e[Z>>2]=0,e[Z+4>>2]=0,e[Z+8>>2]=0,e[w0>>2]=0,e[w0+4>>2]=0,e[w0+8>>2]=0,e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,f=0,Ci(4,n|0,g|0,t0|0,F|0,V|0,M|0,Z|0,w0|0,s0|0,p|0),h=f,f=0,h&1)a=b()|0;else{if(h=d[l>>0]|0,n=e[B>>2]|0,a=h&1?n:(h&255)>>>1,p=e[p>>2]|0,(a|0)>(p|0)?(A0=d[s0>>0]|0,c=d[w0>>0]|0,a=(a-p<<1|1)+p+(A0&1?e[s0+4>>2]|0:(A0&255)>>>1)+(c&1?e[w0+4>>2]|0:(c&255)>>>1)|0):(A0=d[s0>>0]|0,a=d[w0>>0]|0,a=p+2+(A0&1?e[s0+4>>2]|0:(A0&255)>>>1)+(a&1?e[w0+4>>2]|0:(a&255)>>>1)|0),a>>>0>100?(a=xi(a<<2)|0,c=a,a?v0=17:(f=0,we(6),A0=f,f=0,A0&1||(h=d[l>>0]|0,n=e[B>>2]|0,a=0,v0=17))):(c=0,a=C,v0=17),(v0|0)==17&&(A0=(h&1)==0,l=A0?B:e[l+8>>2]|0,f=0,Ye(2,a|0,_|0,O|0,e[s+4>>2]|0,l|0,l+((A0?(h&255)>>>1:n)<<2)|0,U|0,g|0,F|0,e[V>>2]|0,e[M>>2]|0,Z|0,w0|0,s0|0,p|0),A0=f,f=0,!(A0&1)&&(e[k>>2]=e[r>>2],A0=e[_>>2]|0,K=e[O>>2]|0,f=0,e[I>>2]=e[k>>2],K=Fe(40,I|0,a|0,A0|0,K|0,s|0,o|0)|0,A0=f,f=0,!(A0&1))))return c&&(Ze(c),t=e[t0>>2]|0),ye(s0),ye(w0),f0(Z),Ee(t)|0,y=X,K|0;a=b()|0,c&&(Ze(c),t=e[t0>>2]|0)}ye(s0),ye(w0),f0(Z)}while(!1);return(v0|0)==13&&(a=b()|0),Ee(t)|0,r0(a|0),0}function Ac(t){t=t|0}function Sc(t){t=t|0,a0(t)}function vc(t,r,n){return t=t|0,r=r|0,n=n|0,t=Sn(d[r>>0]&1?e[r+8>>2]|0:r+1|0,1)|0,t>>>((t|0)!=-1&1)|0}function wc(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0;c=y,y=y+16|0,h=c,e[h>>2]=0,e[h+4>>2]=0,e[h+8>>2]=0,a=d[l>>0]|0,p=(a&1)==0,r=p?l+1|0:e[l+8>>2]|0,a=p?(a&255)>>>1:e[l+4>>2]|0,l=r+a|0;e:do if((a|0)>0){for(;f=0,h0(67,h|0,d[r>>0]|0),p=f,f=0,!(p&1);)if(r=r+1|0,r>>>0>=l>>>0){a=4;break e}r=b()|0,a=7}else a=4;while(!1);e:do if((a|0)==4){if(f=0,r=k0(19,((n|0)==-1?-1:n<<1)|0,s|0,o|0,(d[h>>0]&1?e[h+8>>2]|0:h+1|0)|0)|0,p=f,f=0,p&1){r=b()|0,a=7;break}e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,p=Ot(r)|0,l=r+p|0;i:do if((p|0)>0){for(;f=0,h0(67,t|0,d[r>>0]|0),p=f,f=0,!(p&1);)if(r=r+1|0,r>>>0>=l>>>0)break i;r=b()|0,f0(t);break e}while(!1);f0(h),y=c;return}while(!1);f0(h),r0(r|0)}function Tc(t,r){t=t|0,r=r|0}function Cc(t){t=t|0}function xc(t){t=t|0,a0(t)}function yc(t,r,n){return t=t|0,r=r|0,n=n|0,t=Sn(d[r>>0]&1?e[r+8>>2]|0:r+1|0,1)|0,t>>>((t|0)!=-1&1)|0}function Ic(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;_=y,y=y+224|0,C=_+184|0,g=_+192|0,p=_+180|0,I=_+176|0,V=_+168|0,B=_+40|0,U=_+32|0,O=_+28|0,F=_+16|0,h=_+8|0,k=_,e[F>>2]=0,e[F+4>>2]=0,e[F+8>>2]=0,e[h+4>>2]=0,e[h>>2]=44696,c=d[l>>0]|0,M=(c&1)==0,a=l+4|0,r=M?a:e[l+8>>2]|0,l=M?(c&255)>>>1:e[a>>2]|0,a=r+(l<<2)|0,c=g+32|0;e:do if((l|0)>0){i:for(;;){if(e[I>>2]=r,f=0,l=He(e[(e[h>>2]|0)+12>>2]|0,h|0,C|0,r|0,a|0,I|0,g|0,c|0,p|0)|0,M=f,f=0,M&1){l=12;break}if((l|0)==2||(e[I>>2]|0)==(r|0)){l=5;break}if(g>>>0<(e[p>>2]|0)>>>0){r=g;do{if(f=0,h0(67,F|0,d[r>>0]|0),M=f,f=0,M&1){l=11;break i}r=r+1|0}while(r>>>0<(e[p>>2]|0)>>>0)}if(r=e[I>>2]|0,!((l|0)!=2&r>>>0>>0)){l=9;break e}}(l|0)==5?(f=0,n0(190,58955),f=0,r=b()|0):((l|0)==11||(l|0)==12)&&(r=b()|0)}else l=9;while(!1);e:do if((l|0)==9){if(f=0,r=k0(19,((n|0)==-1?-1:n<<1)|0,s|0,o|0,(d[F>>0]&1?e[F+8>>2]|0:F+1|0)|0)|0,M=f,f=0,M&1){r=b()|0;break}e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[k+4>>2]=0,e[k>>2]=44744,M=Ot(r)|0,a=r+M|0,c=a,h=B+128|0;i:do if((M|0)>0){t:for(;;){if(e[O>>2]=r,f=0,l=He(e[(e[k>>2]|0)+16>>2]|0,k|0,V|0,r|0,((c-r|0)>32?r+32|0:a)|0,O|0,B|0,h|0,U|0)|0,M=f,f=0,M&1){l=24;break}if((l|0)==2||(e[O>>2]|0)==(r|0)){l=18;break}if(B>>>0<(e[U>>2]|0)>>>0){r=B;do{if(f=0,h0(92,t|0,e[r>>2]|0),M=f,f=0,M&1){l=23;break t}r=r+4|0}while(r>>>0<(e[U>>2]|0)>>>0)}if(r=e[O>>2]|0,!((l|0)!=2&r>>>0>>0))break i}(l|0)==18?(f=0,n0(190,58955),f=0,r=b()|0):((l|0)==23||(l|0)==24)&&(r=b()|0),ye(t);break e}while(!1);f0(F),y=_;return}while(!1);f0(F),r0(r|0)}function Dc(t,r){t=t|0,r=r|0}function Ec(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0;if(e[t+4>>2]=r+-1,e[t>>2]=44196,l=t+8|0,f=0,h0(94,l|0,28),o=f,f=0,o&1)r=b()|0;else{if(o=t+144|0,f=0,m0(5,o|0,58885,1),s=f,f=0,s&1)r=b()|0;else{if(n=e[l>>2]|0,s=t+12|0,r=e[s>>2]|0,(r|0)!=(n|0)){do r=r+-4|0;while((r|0)!=(n|0));e[s>>2]=r}e[495]=0,e[494]=43124,f=0,h0(95,t|0,1976),s=f,f=0;do if(!(s&1)&&(e[497]=0,e[496]=43164,f=0,h0(96,t|0,1984),s=f,f=0,!(s&1))&&(e[499]=0,e[498]=44236,e[500]=0,d[2004]=0,s=er()|0,e[500]=s,f=0,h0(97,t|0,1992),s=f,f=0,!(s&1))&&(e[503]=0,e[502]=44484,f=0,h0(98,t|0,2008),s=f,f=0,!(s&1))&&(e[505]=0,e[504]=44552,f=0,h0(99,t|0,2016),s=f,f=0,!(s&1))&&(f=0,h0(100,2024,1),s=f,f=0,!(s&1))&&(f=0,h0(101,t|0,2024),s=f,f=0,!(s&1))&&(e[511]=0,e[510]=44600,f=0,h0(102,t|0,2040),s=f,f=0,!(s&1))&&(e[513]=0,e[512]=44648,f=0,h0(103,t|0,2048),s=f,f=0,!(s&1))&&(j6(2056,1),f=0,h0(104,t|0,2056),s=f,f=0,!(s&1))&&(X6(2080,1),f=0,h0(105,t|0,2080),s=f,f=0,!(s&1))&&(e[529]=0,e[528]=43204,f=0,h0(106,t|0,2112),s=f,f=0,!(s&1))&&(e[531]=0,e[530]=43276,f=0,h0(107,t|0,2120),s=f,f=0,!(s&1))&&(e[533]=0,e[532]=43348,f=0,h0(108,t|0,2128),s=f,f=0,!(s&1))){if(e[535]=0,e[534]=43408,f=0,h0(109,t|0,2136),s=f,f=0,s&1){a=42;break}if(e[537]=0,e[536]=43716,f=0,h0(110,t|0,2144),s=f,f=0,s&1){a=42;break}if(e[539]=0,e[538]=43780,f=0,h0(111,t|0,2152),s=f,f=0,s&1){a=42;break}if(e[541]=0,e[540]=43844,f=0,h0(112,t|0,2160),s=f,f=0,s&1){a=42;break}if(e[543]=0,e[542]=43908,f=0,h0(113,t|0,2168),s=f,f=0,s&1){a=42;break}if(e[545]=0,e[544]=43972,f=0,h0(114,t|0,2176),s=f,f=0,s&1){a=42;break}if(e[547]=0,e[546]=44008,f=0,h0(115,t|0,2184),s=f,f=0,s&1){a=42;break}if(e[549]=0,e[548]=44044,f=0,h0(116,t|0,2192),s=f,f=0,s&1){a=42;break}if(e[551]=0,e[550]=44080,f=0,h0(117,t|0,2200),s=f,f=0,s&1){a=42;break}if(e[553]=0,e[552]=43468,e[554]=43516,f=0,h0(118,t|0,2208),s=f,f=0,s&1){a=42;break}if(e[557]=0,e[556]=43560,e[558]=43608,f=0,h0(119,t|0,2224),s=f,f=0,s&1){a=42;break}if(e[561]=0,e[560]=44464,f=0,r=p0(3)|0,s=f,f=0,s&1){r=b()|0;break}if(e[562]=r,e[560]=43652,f=0,h0(120,t|0,2240),s=f,f=0,s&1){a=42;break}if(e[565]=0,e[564]=44464,f=0,r=p0(3)|0,s=f,f=0,s&1){r=b()|0;break}if(e[566]=r,e[564]=43684,f=0,h0(121,t|0,2256),a=f,f=0,a&1){a=42;break}if(e[569]=0,e[568]=44116,f=0,h0(122,t|0,2272),a=f,f=0,a&1){a=42;break}if(e[571]=0,e[570]=44156,f=0,h0(123,t|0,2280),a=f,f=0,a&1){a=42;break}return}else a=42;while(!1);(a|0)==42&&(r=b()|0),f0(o)}A1(l)}r0(r|0)}function kc(){var t=0;do if(!(d[2288]|0)&&Ae(2288)|0)if(f=0,p0(4)|0,t=f,f=0,t&1)t=b()|0,bi(2288),r0(t|0);else{e[11246]=44980,ve(2288);break}while(!1);return e[11246]|0}function Si(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;ur(r),o=t+8|0,s=e[o>>2]|0;do if((e[t+12>>2]|0)-s>>2>>>0<=n>>>0){if(f=0,h0(124,o|0,n+1|0),t=f,f=0,!(t&1)){s=e[o>>2]|0;break}s=b()|0,r&&Ee(r)|0,r0(s|0)}while(!1);t=e[s+(n<<2)>>2]|0,t&&(Ee(t)|0,s=e[o>>2]|0),e[s+(n<<2)>>2]=r}function D2(t){t=t|0;var r=0,n=0,s=0,o=0;if(e[t>>2]=44196,s=t+8|0,o=t+12|0,r=e[s>>2]|0,(e[o>>2]|0)!=(r|0)){n=0;do r=e[r+(n<<2)>>2]|0,r&&Ee(r)|0,n=n+1|0,r=e[s>>2]|0;while(n>>>0<(e[o>>2]|0)-r>>2>>>0)}f0(t+144|0),A1(s)}function Fc(t){t=t|0,D2(t),a0(t)}function Mc(t,r){return t=t|0,r=r|0,x8(t,r)|0?e[(e[t+8>>2]|0)+(r<<2)>>2]|0:(t=de(4)|0,Fg(t),Be(t|0,640,82),0)}function _c(){return Ec(2296,1),e[11245]=2296,44980}function Rc(){var t=0;return t=kc()|0,t=e[t>>2]|0,e[11247]=t,ur(t),44988}function Pc(){var t=0;do if(!(d[2456]|0)&&Ae(2456)|0)if(f=0,p0(5)|0,t=f,f=0,t&1)t=b()|0,bi(2456),r0(t|0);else{e[11248]=44988,ve(2456);break}while(!1);return e[11248]|0}function n1(t){t=t|0;var r=0,n=0;if(f=0,r=p0(6)|0,n=f,f=0,n&1)n=b(0)|0,Ie(n);else{n=e[r>>2]|0,e[t>>2]=n,ur(n);return}}function $t(t,r){t=t|0,r=r|0,r=e[r>>2]|0,e[t>>2]=r,ur(r)}function Mi(t){t=t|0,Ee(e[t>>2]|0)|0}function Ai(t){t=t|0;var r=0,n=0;return n=y,y=y+16|0,r=n,(e[t>>2]|0)!=-1&&(e[r>>2]=t,e[r+4>>2]=191,e[r+8>>2]=0,l5(t,r,192)),y=n,(e[t+4>>2]|0)+-1|0}function Pi(t,r){return t=t|0,r=r|0,t=e[t>>2]|0,Mc(t,Ai(r)|0)|0}function Lc(t){t=t|0,a0(t)}function Uc(t){t=t|0,t&&Ce[e[(e[t>>2]|0)+4>>2]&255](t)}function Oc(t){t=t|0;var r=0;r=e[11052]|0,e[11052]=r+1,e[t+4>>2]=r+1}function Nc(t){t=t|0,a0(t)}function Bc(t,r,n){return t=t|0,r=r|0,n=n|0,n>>>0<128?(n=(er()|0)+(n<<1)|0,n=(E[n>>1]&r)<<16>>16!=0):n=0,n|0}function er(){var t=0,r=0;if(f=0,t=p0(7)|0,r=f,f=0,r&1)r=b(0)|0,Ie(r);else return e[t>>2]|0;return 0}function Vc(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(l=(n-r|0)>>>2,(r|0)!=(n|0))for(o=r;t=e[o>>2]|0,t>>>0<128?(t=(er()|0)+(t<<1)|0,t=q[t>>1]|0):t=0,E[s>>1]=t,o=o+4|0,(o|0)!=(n|0);)s=s+2|0;return r+(l<<2)|0}function qc(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;e:do if((n|0)==(s|0))n=s;else for(;;){if(t=e[n>>2]|0,t>>>0<128&&(t=(er()|0)+(t<<1)|0,(E[t>>1]&r)<<16>>16!=0))break e;if(n=n+4|0,(n|0)==(s|0)){n=s;break}}while(!1);return n|0}function bc(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;e:do if((n|0)==(s|0))n=s;else for(;;){if(t=e[n>>2]|0,t>>>0>=128||(t=(er()|0)+(t<<1)|0,!((E[t>>1]&r)<<16>>16)))break e;if(n=n+4|0,(n|0)==(s|0)){n=s;break}}while(!1);return n|0}function Gc(t,r){return t=t|0,r=r|0,r>>>0<128&&(r=(ar()|0)+(r<<2)|0,r=e[r>>2]|0),r|0}function ar(){var t=0,r=0;if(f=0,t=p0(8)|0,r=f,f=0,r&1)r=b(0)|0,Ie(r);else return e[t>>2]|0;return 0}function Qc(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;if(o=(n-r|0)>>>2,(r|0)!=(n|0)){s=r;do t=e[s>>2]|0,t>>>0<128&&(t=(ar()|0)+(t<<2)|0,t=e[t>>2]|0),e[s>>2]=t,s=s+4|0;while((s|0)!=(n|0))}return r+(o<<2)|0}function zc(t,r){return t=t|0,r=r|0,r>>>0<128&&(r=(fr()|0)+(r<<2)|0,r=e[r>>2]|0),r|0}function fr(){var t=0,r=0;if(f=0,t=p0(9)|0,r=f,f=0,r&1)r=b(0)|0,Ie(r);else return e[t>>2]|0;return 0}function Hc(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;if(o=(n-r|0)>>>2,(r|0)!=(n|0)){s=r;do t=e[s>>2]|0,t>>>0<128&&(t=(fr()|0)+(t<<2)|0,t=e[t>>2]|0),e[s>>2]=t,s=s+4|0;while((s|0)!=(n|0))}return r+(o<<2)|0}function Yc(t,r){return t=t|0,r=r|0,r<<24>>24|0}function jc(t,r,n,s){if(t=t|0,r=r|0,n=n|0,s=s|0,(r|0)!=(n|0))for(;e[s>>2]=d[r>>0],r=r+1|0,(r|0)!=(n|0);)s=s+4|0;return n|0}function Xc(t,r,n){return t=t|0,r=r|0,n=n|0,(r>>>0<128?r&255:n)|0}function Kc(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;if(a=(n-r|0)>>>2,(r|0)!=(n|0))for(l=r,t=o;o=e[l>>2]|0,d[t>>0]=o>>>0<128?o&255:s,l=l+4|0,(l|0)!=(n|0);)t=t+1|0;return r+(a<<2)|0}function E2(t){t=t|0;var r=0;e[t>>2]=44236,r=e[t+8>>2]|0,r|0&&d[t+12>>0]|0&&wg(r)}function Wc(t){t=t|0,E2(t),a0(t)}function Zc(t,r){return t=t|0,r=r|0,r<<24>>24>-1&&(r=(ar()|0)+((r&255)<<2)|0,r=e[r>>2]&255),r|0}function Jc(t,r,n){if(t=t|0,r=r|0,n=n|0,(r|0)!=(n|0)){t=r;do r=d[t>>0]|0,r<<24>>24>-1&&(r=(ar()|0)+(r<<24>>24<<2)|0,r=e[r>>2]&255),d[t>>0]=r,t=t+1|0;while((t|0)!=(n|0))}return n|0}function $c(t,r){return t=t|0,r=r|0,r<<24>>24>-1&&(r=(fr()|0)+(r<<24>>24<<2)|0,r=e[r>>2]&255),r|0}function eh(t,r,n){if(t=t|0,r=r|0,n=n|0,(r|0)!=(n|0)){t=r;do r=d[t>>0]|0,r<<24>>24>-1&&(r=(fr()|0)+(r<<24>>24<<2)|0,r=e[r>>2]&255),d[t>>0]=r,t=t+1|0;while((t|0)!=(n|0))}return n|0}function ih(t,r){return t=t|0,r=r|0,r|0}function th(t,r,n,s){if(t=t|0,r=r|0,n=n|0,s=s|0,(r|0)!=(n|0))for(;d[s>>0]=d[r>>0]|0,r=r+1|0,(r|0)!=(n|0);)s=s+1|0;return n|0}function rh(t,r,n){return t=t|0,r=r|0,n=n|0,(r<<24>>24>-1?r:n)|0}function nh(t,r,n,s,o){if(t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,(r|0)!=(n|0))for(;t=d[r>>0]|0,d[o>>0]=t<<24>>24>-1?t:s,r=r+1|0,(r|0)!=(n|0);)o=o+1|0;return n|0}function sh(t){t=t|0,a0(t)}function oh(t,r,n,s,o,l,a,c){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,e[o>>2]=n,e[c>>2]=l,3}function lh(t,r,n,s,o,l,a,c){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,e[o>>2]=n,e[c>>2]=l,3}function ah(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,e[o>>2]=n,3}function fh(t){return t=t|0,1}function uh(t){return t=t|0,1}function hh(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,t=s-n|0,(t>>>0>>0?t:o)|0}function mh(t){return t=t|0,1}function dh(t,r){t=t|0,r=r|0;var n=0;if(e[t+4>>2]=r+-1,e[t>>2]=44304,f=0,r=p0(3)|0,n=f,f=0,n&1)n=b()|0,r0(n|0);else{e[t+8>>2]=r;return}}function gh(t){t=t|0,Z2(t),a0(t)}function s1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,$e=0,We=0,_e=0,le=0,be=0,ne=0,fe=0,vi=0,Ti=0,mi=0,_0=0,he=0,Pe=0,li=0,ri=0,fi=0,yi=0,gi=0,xt=0,Ei=0,gt=0;gt=y,y=y+624|0,fi=gt+24|0,gi=gt+16|0,yi=gt+588|0,_0=gt+576|0,ri=gt,vi=gt+536|0,Ei=gt+8|0,xt=gt+528|0,ze=(t|0)!=0,Re=vi+40|0,fe=Re,vi=vi+39|0,Ti=Ei+4|0,mi=_0+12|0,_0=_0+11|0,he=yi,Pe=mi,li=Pe-he|0,$e=-2-he|0,We=Pe+2|0,_e=fi+288|0,le=yi+9|0,be=le,ne=yi+8|0,l=0,B=r,a=0,r=0;e:for(;;){do if((l|0)>-1)if((a|0)>(2147483647-l|0)){l=di()|0,e[l>>2]=75,l=-1;break}else{l=a+l|0;break}while(!1);if(a=d[B>>0]|0,a<<24>>24)c=B;else{Y0=245;break}i:for(;;){switch(a<<24>>24){case 37:{a=c,Y0=9;break i}case 0:{a=c;break i}default:}A0=c+1|0,a=d[A0>>0]|0,c=A0}i:do if((Y0|0)==9)for(;;){if(Y0=0,(d[a+1>>0]|0)!=37)break i;if(c=c+1|0,a=a+2|0,(d[a>>0]|0)==37)Y0=9;else break}while(!1);if(O=c-B|0,ze&&!(e[t>>2]&32|0)&&Ui(B,O,t)|0,(c|0)!=(B|0)){B=a,a=O;continue}g=a+1|0,c=d[g>>0]|0,h=(c<<24>>24)+-48|0,h>>>0<10?(A0=(d[a+2>>0]|0)==36,g=A0?a+3|0:g,c=d[g>>0]|0,k=A0?h:-1,r=A0?1:r):k=-1,a=c<<24>>24;i:do if((a&-32|0)==32)for(h=0;;){if(!(1<>24)+-32|h,g=g+1|0,c=d[g>>0]|0,a=c<<24>>24,(a&-32|0)!=32){C=h,a=g;break}}else C=0,a=g;while(!1);do if(c<<24>>24==42){if(h=a+1|0,c=(d[h>>0]|0)+-48|0,c>>>0<10&&(d[a+2>>0]|0)==36)e[o+(c<<2)>>2]=10,r=1,a=a+3|0,c=e[s+((d[h>>0]|0)+-48<<3)>>2]|0;else{if(r){l=-1;break e}if(!ze){V=C,a=h,r=0,A0=0;break}r=(e[n>>2]|0)+3&-4,c=e[r>>2]|0,e[n>>2]=r+4,r=0,a=h}(c|0)<0?(V=C|8192,A0=0-c|0):(V=C,A0=c)}else if(h=(c<<24>>24)+-48|0,h>>>0<10){c=0;do c=(c*10|0)+h|0,a=a+1|0,h=(d[a>>0]|0)+-48|0;while(h>>>0<10);if((c|0)<0){l=-1;break e}else V=C,A0=c}else V=C,A0=0;while(!1);i:do if((d[a>>0]|0)==46){if(h=a+1|0,c=d[h>>0]|0,c<<24>>24!=42){if(g=(c<<24>>24)+-48|0,g>>>0<10)a=h,c=0;else{a=h,g=0;break}for(;;)if(c=(c*10|0)+g|0,a=a+1|0,g=(d[a>>0]|0)+-48|0,g>>>0>=10){g=c;break i}}if(h=a+2|0,c=(d[h>>0]|0)+-48|0,c>>>0<10&&(d[a+3>>0]|0)==36){e[o+(c<<2)>>2]=10,a=a+4|0,g=e[s+((d[h>>0]|0)+-48<<3)>>2]|0;break}if(r){l=-1;break e}ze?(a=(e[n>>2]|0)+3&-4,g=e[a>>2]|0,e[n>>2]=a+4,a=h):(a=h,g=0)}else g=-1;while(!1);for(I=0;;){if(c=(d[a>>0]|0)+-65|0,c>>>0>57){l=-1;break e}if(h=a+1|0,c=d[56223+(I*58|0)+c>>0]|0,C=c&255,(C+-1|0)>>>0<8)a=h,I=C;else{v0=h;break}}if(!(c<<24>>24)){l=-1;break}h=(k|0)>-1;do if(c<<24>>24==19)if(h){l=-1;break e}else Y0=52;else{if(h){e[o+(k<<2)>>2]=C,s0=s+(k<<3)|0,w0=e[s0+4>>2]|0,Y0=ri,e[Y0>>2]=e[s0>>2],e[Y0+4>>2]=w0,Y0=52;break}if(!ze){l=0;break e}F2(ri,C,n)}while(!1);if((Y0|0)==52&&(Y0=0,!ze)){B=v0,a=O;continue}k=d[a>>0]|0,k=(I|0)!=0&(k&15|0)==3?k&-33:k,h=V&-65537,w0=V&8192|0?h:V;i:do switch(k|0){case 110:switch(I|0){case 0:{e[e[ri>>2]>>2]=l,B=v0,a=O;continue e}case 1:{e[e[ri>>2]>>2]=l,B=v0,a=O;continue e}case 2:{B=e[ri>>2]|0,e[B>>2]=l,e[B+4>>2]=((l|0)<0)<<31>>31,B=v0,a=O;continue e}case 3:{E[e[ri>>2]>>1]=l,B=v0,a=O;continue e}case 4:{d[e[ri>>2]>>0]=l,B=v0,a=O;continue e}case 6:{e[e[ri>>2]>>2]=l,B=v0,a=O;continue e}case 7:{B=e[ri>>2]|0,e[B>>2]=l,e[B+4>>2]=((l|0)<0)<<31>>31,B=v0,a=O;continue e}default:{B=v0,a=O;continue e}}case 112:{I=w0|8,g=g>>>0>8?g:8,k=120,Y0=64;break}case 88:case 120:{I=w0,Y0=64;break}case 111:{if(h=ri,c=e[h>>2]|0,h=e[h+4>>2]|0,(c|0)==0&(h|0)==0)a=Re;else{a=Re;do a=a+-1|0,d[a>>0]=c&7|48,c=Dt(c|0,h|0,3)|0,h=I0;while(!((c|0)==0&(h|0)==0))}w0&8?(I=fe-a+1|0,c=w0,g=(g|0)<(I|0)?I:g,I=0,C=56703,Y0=77):(c=w0,I=0,C=56703,Y0=77);break}case 105:case 100:{if(c=ri,a=e[c>>2]|0,c=e[c+4>>2]|0,(c|0)<0){a=Ji(0,0,a|0,c|0)|0,c=I0,h=ri,e[h>>2]=a,e[h+4>>2]=c,h=1,C=56703,Y0=76;break i}w0&2048?(h=1,C=56704,Y0=76):(C=w0&1,h=C,C=C|0?56705:56703,Y0=76);break}case 117:{c=ri,a=e[c>>2]|0,c=e[c+4>>2]|0,h=0,C=56703,Y0=76;break}case 99:{d[vi>>0]=e[ri>>2],B=vi,c=1,I=0,k=56703,a=Re;break}case 109:{a=di()|0,a=gn(e[a>>2]|0)|0,Y0=82;break}case 115:{a=e[ri>>2]|0,a=a|0?a:56713,Y0=82;break}case 67:{e[Ei>>2]=e[ri>>2],e[Ti>>2]=0,e[ri>>2]=Ei,g=-1,Y0=86;break}case 83:{g?Y0=86:(Bi(t,32,A0,0,w0),a=0,Y0=98);break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{p=+H[ri>>3],e[gi>>2]=0,H[G>>3]=p,(e[G+4>>2]|0)>=0?w0&2048?(Z=1,s0=56723):(s0=w0&1,Z=s0,s0=s0|0?56726:56721):(p=-p,Z=1,s0=56720),H[G>>3]=p,t0=e[G+4>>2]&2146435072;do if(t0>>>0<2146435072|(t0|0)==2146435072&!1){if(U=+hp(p,gi)*2,c=U!=0,c&&(e[gi>>2]=(e[gi>>2]|0)+-1),X=k|32,(X|0)==97){B=k&32,O=B|0?s0+9|0:s0,V=Z|2,a=12-g|0;do if(g>>>0>11|(a|0)==0)p=U;else{p=8;do a=a+-1|0,p=p*16;while(a|0);if((d[O>>0]|0)==45){p=-(p+(-U-p));break}else{p=U+p-p;break}}while(!1);for(c=e[gi>>2]|0,a=(c|0)<0?0-c|0:c,a=qt(a,((a|0)<0)<<31>>31,mi)|0,(a|0)==(mi|0)&&(d[_0>>0]=48,a=_0),d[a+-1>>0]=(c>>31&2)+43,I=a+-2|0,d[I>>0]=k+15,C=(g|0)<1,h=(w0&8|0)==0,c=yi;;){s0=~~p,a=c+1|0,d[c>>0]=N[56687+s0>>0]|B,p=(p-+(s0|0))*16;do if((a-he|0)==1){if(h&(C&p==0))break;d[a>>0]=46,a=c+2|0}while(!1);if(p==0)break;c=a}g=(g|0)!=0&($e+a|0)<(g|0)?We+g-I|0:li-I+a|0,h=g+V|0,Bi(t,32,A0,h,w0),e[t>>2]&32||Ui(O,V,t)|0,Bi(t,48,A0,h,w0^65536),a=a-he|0,e[t>>2]&32||Ui(yi,a,t)|0,c=Pe-I|0,Bi(t,48,g-(a+c)|0,0,0),e[t>>2]&32||Ui(I,c,t)|0,Bi(t,32,A0,h,w0^8192),a=(h|0)<(A0|0)?A0:h;break}a=(g|0)<0?6:g,c?(c=(e[gi>>2]|0)+-28|0,e[gi>>2]=c,p=U*268435456):(p=U,c=e[gi>>2]|0),t0=(c|0)<0?fi:_e,K=t0,c=t0;do M=~~p>>>0,e[c>>2]=M,c=c+4|0,p=(p-+(M>>>0))*1e9;while(p!=0);if(h=c,c=e[gi>>2]|0,(c|0)>0)for(C=t0;;){I=(c|0)>29?29:c,g=h+-4|0;do if(g>>>0>>0)g=C;else{c=0;do M=pi(e[g>>2]|0,0,I|0)|0,M=Li(M|0,I0|0,c|0,0)|0,c=I0,F=S1(M|0,c|0,1e9,0)|0,e[g>>2]=F,c=pr(M|0,c|0,1e9,0)|0,g=g+-4|0;while(g>>>0>=C>>>0);if(!c){g=C;break}g=C+-4|0,e[g>>2]=c}while(!1);for(;!(h>>>0<=g>>>0);)if(c=h+-4|0,!(e[c>>2]|0))h=c;else break;if(c=(e[gi>>2]|0)-I|0,e[gi>>2]=c,(c|0)>0)C=g;else break}else g=t0;if((c|0)<0)for(O=((a+25|0)/9|0)+1|0,_=(X|0)==102,B=g;;){V=0-c|0,V=(V|0)>9?9:V;do if(B>>>0>>0){c=(1<>>V,g=0,I=B;do M=e[I>>2]|0,e[I>>2]=(M>>>V)+g,g=W(M&c,C)|0,I=I+4|0;while(I>>>0>>0);if(c=e[B>>2]|0?B:B+4|0,!g){g=c;break}e[h>>2]=g,g=c,h=h+4|0}else g=e[B>>2]|0?B:B+4|0;while(!1);if(c=_?t0:g,h=(h-c>>2|0)>(O|0)?c+(O<<2)|0:h,c=(e[gi>>2]|0)+V|0,e[gi>>2]=c,(c|0)>=0){B=g;break}else B=g}else B=g;do if(B>>>0>>0){if(c=(K-B>>2)*9|0,C=e[B>>2]|0,C>>>0<10)break;g=10;do g=g*10|0,c=c+1|0;while(C>>>0>=g>>>0)}else c=0;while(!1);if(F=(X|0)==103,M=(a|0)!=0,g=a-((X|0)!=102?c:0)+((M&F)<<31>>31)|0,(g|0)<(((h-K>>2)*9|0)+-9|0)){if(I=g+9216|0,_=(I|0)/9|0,g=t0+(_+-1023<<2)|0,I=((I|0)%9|0)+1|0,(I|0)<9){C=10;do C=C*10|0,I=I+1|0;while((I|0)!=9)}else C=10;V=e[g>>2]|0,O=(V>>>0)%(C>>>0)|0,!(O|0)&&(t0+(_+-1022<<2)|0)==(h|0)?C=B:Y0=163;do if((Y0|0)==163){Y0=0,U=((V>>>0)/(C>>>0)|0)&1|0?9007199254740994:9007199254740992,I=(C|0)/2|0;do if(O>>>0>>0)p=.5;else{if((O|0)==(I|0)&&(t0+(_+-1022<<2)|0)==(h|0)){p=1;break}p=1.5}while(!1);do if(Z){if((d[s0>>0]|0)!=45)break;U=-U,p=-p}while(!1);if(I=V-O|0,e[g>>2]=I,U+p==U){C=B;break}if(X=I+C|0,e[g>>2]=X,X>>>0>999999999)for(c=B;;)if(C=g+-4|0,e[g>>2]=0,C>>>0>>0&&(c=c+-4|0,e[c>>2]=0),X=(e[C>>2]|0)+1|0,e[C>>2]=X,X>>>0>999999999)g=C;else{B=c,g=C;break}if(c=(K-B>>2)*9|0,I=e[B>>2]|0,I>>>0<10){C=B;break}else C=10;do C=C*10|0,c=c+1|0;while(I>>>0>=C>>>0);C=B}while(!1);X=g+4|0,B=C,h=h>>>0>X>>>0?X:h}for(O=0-c|0;;){if(h>>>0<=B>>>0){_=0,X=h;break}if(g=h+-4|0,!(e[g>>2]|0))h=g;else{_=1,X=h;break}}do if(F){if(a=(M&1^1)+a|0,(a|0)>(c|0)&(c|0)>-5?(k=k+-1|0,a=a+-1-c|0):(k=k+-2|0,a=a+-1|0),h=w0&8,h)break;do if(_){if(h=e[X+-4>>2]|0,!h){g=9;break}if(!((h>>>0)%10|0))C=10,g=0;else{g=0;break}do C=C*10|0,g=g+1|0;while(!((h>>>0)%(C>>>0)|0|0))}else g=9;while(!1);if(h=((X-K>>2)*9|0)+-9|0,(k|32|0)==102){h=h-g|0,h=(h|0)<0?0:h,a=(a|0)<(h|0)?a:h,h=0;break}else{h=h+c-g|0,h=(h|0)<0?0:h,a=(a|0)<(h|0)?a:h,h=0;break}}else h=w0&8;while(!1);if(V=a|h,C=(V|0)!=0&1,I=(k|32|0)==102,I)c=(c|0)>0?c:0,k=0;else{if(g=(c|0)<0?O:c,g=qt(g,((g|0)<0)<<31>>31,mi)|0,(Pe-g|0)<2)do g=g+-1|0,d[g>>0]=48;while((Pe-g|0)<2);d[g+-1>>0]=(c>>31&2)+43,K=g+-2|0,d[K>>0]=k,c=Pe-K|0,k=K}O=Z+1+a+C+c|0,Bi(t,32,A0,O,w0),e[t>>2]&32||Ui(s0,Z,t)|0,Bi(t,48,A0,O,w0^65536);do if(I){g=B>>>0>t0>>>0?t0:B,c=g;do{h=qt(e[c>>2]|0,0,le)|0;do if((c|0)==(g|0)){if((h|0)!=(le|0))break;d[ne>>0]=48,h=ne}else{if(h>>>0<=yi>>>0)break;do h=h+-1|0,d[h>>0]=48;while(h>>>0>yi>>>0)}while(!1);e[t>>2]&32||Ui(h,be-h|0,t)|0,c=c+4|0}while(c>>>0<=t0>>>0);do if(V){if(e[t>>2]&32)break;Ui(56755,1,t)|0}while(!1);if((a|0)>0&c>>>0>>0)for(h=c;;){if(c=qt(e[h>>2]|0,0,le)|0,c>>>0>yi>>>0)do c=c+-1|0,d[c>>0]=48;while(c>>>0>yi>>>0);if(e[t>>2]&32||Ui(c,(a|0)>9?9:a,t)|0,h=h+4|0,c=a+-9|0,(a|0)>9&h>>>0>>0)a=c;else{a=c;break}}Bi(t,48,a+9|0,9,0)}else{if(I=_?X:B+4|0,(a|0)>-1){C=(h|0)==0,g=B;do{c=qt(e[g>>2]|0,0,le)|0,(c|0)==(le|0)&&(d[ne>>0]=48,c=ne);do if((g|0)==(B|0)){if(h=c+1|0,e[t>>2]&32||Ui(c,1,t)|0,C&(a|0)<1){c=h;break}if(e[t>>2]&32){c=h;break}Ui(56755,1,t)|0,c=h}else{if(c>>>0<=yi>>>0)break;do c=c+-1|0,d[c>>0]=48;while(c>>>0>yi>>>0)}while(!1);h=be-c|0,e[t>>2]&32||Ui(c,(a|0)>(h|0)?h:a,t)|0,a=a-h|0,g=g+4|0}while(g>>>0>>0&(a|0)>-1)}if(Bi(t,48,a+18|0,18,0),e[t>>2]&32)break;Ui(k,Pe-k|0,t)|0}while(!1);Bi(t,32,A0,O,w0^8192),a=(O|0)<(A0|0)?A0:O}else I=(k&32|0)!=0,C=p!=p|!1,c=C?0:Z,g=c+3|0,Bi(t,32,A0,g,h),a=e[t>>2]|0,a&32||(Ui(s0,c,t)|0,a=e[t>>2]|0),a&32||Ui(C?I?56747:56751:I?56739:56743,3,t)|0,Bi(t,32,A0,g,w0^8192),a=(g|0)<(A0|0)?A0:g;while(!1);B=v0;continue e}default:h=w0,c=g,I=0,k=56703,a=Re}while(!1);i:do if((Y0|0)==64)if(h=ri,c=e[h>>2]|0,h=e[h+4>>2]|0,C=k&32,(c|0)==0&(h|0)==0)a=Re,c=I,I=0,C=56703,Y0=77;else{a=Re;do a=a+-1|0,d[a>>0]=N[56687+(c&15)>>0]|C,c=Dt(c|0,h|0,4)|0,h=I0;while(!((c|0)==0&(h|0)==0));Y0=ri,(I&8|0)==0|(e[Y0>>2]|0)==0&(e[Y0+4>>2]|0)==0?(c=I,I=0,C=56703,Y0=77):(c=I,I=2,C=56703+(k>>4)|0,Y0=77)}else if((Y0|0)==76)a=qt(a,c,Re)|0,c=w0,I=h,Y0=77;else if((Y0|0)==82)Y0=0,w0=Pn(a,0,g)|0,s0=(w0|0)==0,B=a,c=s0?g:w0-a|0,I=0,k=56703,a=s0?a+g|0:w0;else if((Y0|0)==86){for(Y0=0,c=0,a=0,C=e[ri>>2]|0;h=e[C>>2]|0,!(!h||(a=yn(xt,h)|0,(a|0)<0|a>>>0>(g-c|0)>>>0));)if(c=a+c|0,g>>>0>c>>>0)C=C+4|0;else break;if((a|0)<0){l=-1;break e}if(Bi(t,32,A0,c,w0),!c)a=0,Y0=98;else for(h=0,g=e[ri>>2]|0;;){if(a=e[g>>2]|0,!a){a=c,Y0=98;break i}if(a=yn(xt,a)|0,h=a+h|0,(h|0)>(c|0)){a=c,Y0=98;break i}if(e[t>>2]&32||Ui(xt,a,t)|0,h>>>0>=c>>>0){a=c,Y0=98;break}else g=g+4|0}}while(!1);if((Y0|0)==98){Y0=0,Bi(t,32,A0,a,w0^8192),B=v0,a=(A0|0)>(a|0)?A0:a;continue}(Y0|0)==77&&(Y0=0,h=(g|0)>-1?c&-65537:c,c=ri,c=(e[c>>2]|0)!=0|(e[c+4>>2]|0)!=0,(g|0)!=0|c?(c=(c&1^1)+(fe-a)|0,B=a,c=(g|0)>(c|0)?g:c,k=C,a=Re):(B=Re,c=0,k=C,a=Re)),C=a-B|0,c=(c|0)<(C|0)?C:c,g=I+c|0,a=(A0|0)<(g|0)?g:A0,Bi(t,32,a,g,h),e[t>>2]&32||Ui(k,I,t)|0,Bi(t,48,a,g,h^65536),Bi(t,48,c,C,0),e[t>>2]&32||Ui(B,C,t)|0,Bi(t,32,a,g,h^8192),B=v0}e:do if((Y0|0)==245&&!t)if(r){for(l=1;r=e[o+(l<<2)>>2]|0,!!r;)if(F2(s+(l<<3)|0,r,n),l=l+1|0,(l|0)>=10){l=1;break e}if((l|0)<10)for(;;){if(e[o+(l<<2)>>2]|0){l=-1;break e}if(l=l+1|0,(l|0)>=10){l=1;break}}else l=1}else l=0;while(!1);return y=gt,l|0}function ph(t,r,n){return t=t|0,r=r|0,n=n|0,xp(t,r,n)|0}function Ah(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;c=y,y=y+112|0,a=c,o=a,l=o+112|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(l|0));return o=a+4|0,e[o>>2]=t,l=a+8|0,e[l>>2]=-1,e[a+44>>2]=t,e[a+76>>2]=-1,rt(a,0),s=+pn(a,n,1),n=(e[o>>2]|0)-(e[l>>2]|0)+(e[a+108>>2]|0)|0,r&&(e[r>>2]=n|0?t+n|0:t),y=c,+s}function k2(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0;return h=y,y=y+112|0,c=h,e[c>>2]=0,l=c+4|0,e[l>>2]=t,e[c+44>>2]=t,a=c+8|0,e[a>>2]=(t|0)<0?-1:t+2147483647|0,e[c+76>>2]=-1,rt(c,0),s=An(c,n,1,s,o)|0,r&&(e[r>>2]=t+((e[l>>2]|0)+(e[c+108>>2]|0)-(e[a>>2]|0))),y=h,s|0}function Sh(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;return s=t+20|0,o=e[s>>2]|0,t=(e[t+16>>2]|0)-o|0,t=t>>>0>n>>>0?n:t,ti(o|0,r|0,t|0)|0,e[s>>2]=(e[s>>2]|0)+t,n|0}function F2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;e:do if(r>>>0<=20)do switch(r|0){case 9:{s=(e[n>>2]|0)+3&-4,r=e[s>>2]|0,e[n>>2]=s+4,e[t>>2]=r;break e}case 10:{s=(e[n>>2]|0)+3&-4,r=e[s>>2]|0,e[n>>2]=s+4,s=t,e[s>>2]=r,e[s+4>>2]=((r|0)<0)<<31>>31;break e}case 11:{s=(e[n>>2]|0)+3&-4,r=e[s>>2]|0,e[n>>2]=s+4,s=t,e[s>>2]=r,e[s+4>>2]=0;break e}case 12:{s=(e[n>>2]|0)+7&-8,r=s,o=e[r>>2]|0,r=e[r+4>>2]|0,e[n>>2]=s+8,s=t,e[s>>2]=o,e[s+4>>2]=r;break e}case 13:{o=(e[n>>2]|0)+3&-4,s=e[o>>2]|0,e[n>>2]=o+4,s=(s&65535)<<16>>16,o=t,e[o>>2]=s,e[o+4>>2]=((s|0)<0)<<31>>31;break e}case 14:{o=(e[n>>2]|0)+3&-4,s=e[o>>2]|0,e[n>>2]=o+4,o=t,e[o>>2]=s&65535,e[o+4>>2]=0;break e}case 15:{o=(e[n>>2]|0)+3&-4,s=e[o>>2]|0,e[n>>2]=o+4,s=(s&255)<<24>>24,o=t,e[o>>2]=s,e[o+4>>2]=((s|0)<0)<<31>>31;break e}case 16:{o=(e[n>>2]|0)+3&-4,s=e[o>>2]|0,e[n>>2]=o+4,o=t,e[o>>2]=s&255,e[o+4>>2]=0;break e}case 17:{o=(e[n>>2]|0)+7&-8,l=+H[o>>3],e[n>>2]=o+8,H[t>>3]=l;break e}case 18:{o=(e[n>>2]|0)+7&-8,l=+H[o>>3],e[n>>2]=o+8,H[t>>3]=l;break e}default:break e}while(!1);while(!1)}function qt(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if(r>>>0>0|(r|0)==0&t>>>0>4294967295)for(;;)if(s=S1(t|0,r|0,10,0)|0,n=n+-1|0,d[n>>0]=s|48,s=pr(t|0,r|0,10,0)|0,r>>>0>9|(r|0)==9&t>>>0>4294967295)t=s,r=I0;else{t=s;break}if(t)for(;n=n+-1|0,d[n>>0]=(t>>>0)%10|0|48,!(t>>>0<10);)t=(t>>>0)/10|0;return n|0}function Bi(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0;c=y,y=y+256|0,a=c;do if((n|0)>(s|0)&(o&73728|0)==0){if(o=n-s|0,je(a|0,r|0,(o>>>0>256?256:o)|0)|0,r=e[t>>2]|0,l=(r&32|0)==0,o>>>0>255){s=n-s|0;do l&&(Ui(a,256,t)|0,r=e[t>>2]|0),o=o+-256|0,l=(r&32|0)==0;while(o>>>0>255);if(l)o=s&255;else break}else if(!l)break;Ui(a,o,t)|0}while(!1);y=c}function xi(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,$e=0,We=0,_e=0,le=0,be=0,ne=0;do if(t>>>0<245){if(k=t>>>0<11?16:t+11&-8,t=k>>>3,c=e[10218]|0,n=c>>>t,n&3){t=(n&1^1)+t|0,s=t<<1,n=40912+(s<<2)|0,s=40912+(s+2<<2)|0,o=e[s>>2]|0,l=o+8|0,a=e[l>>2]|0;do if((n|0)!=(a|0))if(a>>>0<(e[10222]|0)>>>0&&ae(),r=a+12|0,(e[r>>2]|0)==(o|0)){e[r>>2]=n,e[s>>2]=a;break}else ae();else e[10218]=c&~(1<>2]=ne|3,ne=o+(ne|4)|0,e[ne>>2]=e[ne>>2]|1,ne=l,ne|0}if(a=e[10220]|0,k>>>0>a>>>0){if(n){s=2<>>12&16,s=s>>>h,o=s>>>5&8,s=s>>>o,l=s>>>2&4,s=s>>>l,n=s>>>1&2,s=s>>>n,t=s>>>1&1,t=(o|h|l|n|t)+(s>>>t)|0,s=t<<1,n=40912+(s<<2)|0,s=40912+(s+2<<2)|0,l=e[s>>2]|0,h=l+8|0,o=e[h>>2]|0;do if((n|0)!=(o|0))if(o>>>0<(e[10222]|0)>>>0&&ae(),r=o+12|0,(e[r>>2]|0)==(l|0)){e[r>>2]=n,e[s>>2]=o,p=e[10220]|0;break}else ae();else e[10218]=c&~(1<>2]=k|3,c=l+k|0,e[l+(k|4)>>2]=a|1,e[l+ne>>2]=a,p&&(o=e[10223]|0,n=p>>>3,r=n<<1,s=40912+(r<<2)|0,t=e[10218]|0,n=1<>2]|0,r>>>0<(e[10222]|0)>>>0?ae():(g=t,C=r)):(e[10218]=t|n,g=40912+(r+2<<2)|0,C=s),e[g>>2]=o,e[C+12>>2]=o,e[o+8>>2]=C,e[o+12>>2]=s),e[10220]=a,e[10223]=c,ne=h,ne|0}if(t=e[10219]|0,t){for(n=(t&0-t)+-1|0,be=n>>>12&16,n=n>>>be,le=n>>>5&8,n=n>>>le,ne=n>>>2&4,n=n>>>ne,t=n>>>1&2,n=n>>>t,s=n>>>1&1,s=e[41176+((le|be|ne|t|s)+(n>>>s)<<2)>>2]|0,n=(e[s+4>>2]&-8)-k|0,t=s;;){if(r=e[t+16>>2]|0,!r&&(r=e[t+20>>2]|0,!r)){h=n;break}t=(e[r+4>>2]&-8)-k|0,ne=t>>>0>>0,n=ne?t:n,t=r,s=ne?r:s}l=e[10222]|0,s>>>0>>0&&ae(),c=s+k|0,s>>>0>=c>>>0&&ae(),a=e[s+24>>2]|0,n=e[s+12>>2]|0;do if((n|0)==(s|0)){if(t=s+20|0,r=e[t>>2]|0,!r&&(t=s+16|0,r=e[t>>2]|0,!r)){I=0;break}for(;;){if(n=r+20|0,o=e[n>>2]|0,o){r=o,t=n;continue}if(n=r+16|0,o=e[n>>2]|0,o)r=o,t=n;else break}if(t>>>0>>0)ae();else{e[t>>2]=0,I=r;break}}else if(o=e[s+8>>2]|0,o>>>0>>0&&ae(),r=o+12|0,(e[r>>2]|0)!=(s|0)&&ae(),t=n+8|0,(e[t>>2]|0)==(s|0)){e[r>>2]=n,e[t>>2]=o,I=n;break}else ae();while(!1);do if(a){if(r=e[s+28>>2]|0,t=41176+(r<<2)|0,(s|0)==(e[t>>2]|0)){if(e[t>>2]=I,!I){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),r=a+16|0,(e[r>>2]|0)==(s|0)?e[r>>2]=I:e[a+20>>2]=I,!I)break;t=e[10222]|0,I>>>0>>0&&ae(),e[I+24>>2]=a,r=e[s+16>>2]|0;do if(r)if(r>>>0>>0)ae();else{e[I+16>>2]=r,e[r+24>>2]=I;break}while(!1);if(r=e[s+20>>2]|0,r)if(r>>>0<(e[10222]|0)>>>0)ae();else{e[I+20>>2]=r,e[r+24>>2]=I;break}}while(!1);return h>>>0<16?(ne=h+k|0,e[s+4>>2]=ne|3,ne=s+(ne+4)|0,e[ne>>2]=e[ne>>2]|1):(e[s+4>>2]=k|3,e[s+(k|4)>>2]=h|1,e[s+(h+k)>>2]=h,r=e[10220]|0,r&&(l=e[10223]|0,n=r>>>3,r=n<<1,o=40912+(r<<2)|0,t=e[10218]|0,n=1<>2]|0,t>>>0<(e[10222]|0)>>>0?ae():(U=r,B=t)):(e[10218]=t|n,U=40912+(r+2<<2)|0,B=o),e[U>>2]=l,e[B+12>>2]=l,e[l+8>>2]=B,e[l+12>>2]=o),e[10220]=h,e[10223]=c),ne=s+8|0,ne|0}else B=k}else B=k}else if(t>>>0<=4294967231)if(t=t+11|0,C=t&-8,g=e[10219]|0,g){n=0-C|0,t=t>>>8,t?C>>>0>16777215?p=31:(B=(t+1048320|0)>>>16&8,M=t<>>16&4,M=M<>>16&2,p=14-(U|B|p)+(M<

>>15)|0,p=C>>>(p+7|0)&1|p<<1):p=0,t=e[41176+(p<<2)>>2]|0;e:do if(!t)o=0,t=0,M=86;else for(a=n,o=0,c=C<<((p|0)==31?0:25-(p>>>1)|0),h=t,t=0;;){if(l=e[h+4>>2]&-8,n=l-C|0,n>>>0>>0)if((l|0)==(C|0)){l=h,t=h,M=90;break e}else t=h;else n=a;if(M=e[h+20>>2]|0,h=e[h+16+(c>>>31<<2)>>2]|0,o=(M|0)==0|(M|0)==(h|0)?o:M,h)a=n,c=c<<1;else{M=86;break}}while(!1);if((M|0)==86){if((o|0)==0&(t|0)==0){if(t=2<>>12&16,t=t>>>I,g=t>>>5&8,t=t>>>g,U=t>>>2&4,t=t>>>U,B=t>>>1&2,t=t>>>B,o=t>>>1&1,o=e[41176+((g|I|U|B|o)+(t>>>o)<<2)>>2]|0,t=0}o?(l=o,M=90):(c=n,h=t)}if((M|0)==90)for(;;){if(M=0,B=(e[l+4>>2]&-8)-C|0,o=B>>>0>>0,n=o?B:n,t=o?l:t,o=e[l+16>>2]|0,o){l=o,M=90;continue}if(l=e[l+20>>2]|0,l)M=90;else{c=n,h=t;break}}if(h|0&&c>>>0<((e[10220]|0)-C|0)>>>0){o=e[10222]|0,h>>>0>>0&&ae(),a=h+C|0,h>>>0>=a>>>0&&ae(),l=e[h+24>>2]|0,n=e[h+12>>2]|0;do if((n|0)==(h|0)){if(t=h+20|0,r=e[t>>2]|0,!r&&(t=h+16|0,r=e[t>>2]|0,!r)){k=0;break}for(;;){if(n=r+20|0,s=e[n>>2]|0,s){r=s,t=n;continue}if(n=r+16|0,s=e[n>>2]|0,s)r=s,t=n;else break}if(t>>>0>>0)ae();else{e[t>>2]=0,k=r;break}}else if(s=e[h+8>>2]|0,s>>>0>>0&&ae(),r=s+12|0,(e[r>>2]|0)!=(h|0)&&ae(),t=n+8|0,(e[t>>2]|0)==(h|0)){e[r>>2]=n,e[t>>2]=s,k=n;break}else ae();while(!1);do if(l){if(r=e[h+28>>2]|0,t=41176+(r<<2)|0,(h|0)==(e[t>>2]|0)){if(e[t>>2]=k,!k){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),r=l+16|0,(e[r>>2]|0)==(h|0)?e[r>>2]=k:e[l+20>>2]=k,!k)break;t=e[10222]|0,k>>>0>>0&&ae(),e[k+24>>2]=l,r=e[h+16>>2]|0;do if(r)if(r>>>0>>0)ae();else{e[k+16>>2]=r,e[r+24>>2]=k;break}while(!1);if(r=e[h+20>>2]|0,r)if(r>>>0<(e[10222]|0)>>>0)ae();else{e[k+20>>2]=r,e[r+24>>2]=k;break}}while(!1);e:do if(c>>>0>=16){if(e[h+4>>2]=C|3,e[h+(C|4)>>2]=c|1,e[h+(c+C)>>2]=c,r=c>>>3,c>>>0<256){t=r<<1,s=40912+(t<<2)|0,n=e[10218]|0,r=1<>2]|0,t>>>0<(e[10222]|0)>>>0?ae():(O=r,_=t)):(e[10218]=n|r,O=40912+(t+2<<2)|0,_=s),e[O>>2]=a,e[_+12>>2]=a,e[h+(C+8)>>2]=_,e[h+(C+12)>>2]=s;break}if(r=c>>>8,r?c>>>0>16777215?s=31:(be=(r+1048320|0)>>>16&8,ne=r<>>16&4,ne=ne<>>16&2,s=14-(le|be|s)+(ne<>>15)|0,s=c>>>(s+7|0)&1|s<<1):s=0,r=41176+(s<<2)|0,e[h+(C+28)>>2]=s,e[h+(C+20)>>2]=0,e[h+(C+16)>>2]=0,t=e[10219]|0,n=1<>2]=a,e[h+(C+24)>>2]=r,e[h+(C+12)>>2]=a,e[h+(C+8)>>2]=a;break}r=e[r>>2]|0;i:do if((e[r+4>>2]&-8|0)!=(c|0)){for(s=c<<((s|0)==31?0:25-(s>>>1)|0);t=r+16+(s>>>31<<2)|0,n=e[t>>2]|0,!!n;)if((e[n+4>>2]&-8|0)==(c|0)){t0=n;break i}else s=s<<1,r=n;if(t>>>0<(e[10222]|0)>>>0)ae();else{e[t>>2]=a,e[h+(C+24)>>2]=r,e[h+(C+12)>>2]=a,e[h+(C+8)>>2]=a;break e}}else t0=r;while(!1);if(r=t0+8|0,t=e[r>>2]|0,ne=e[10222]|0,t>>>0>=ne>>>0&t0>>>0>=ne>>>0){e[t+12>>2]=a,e[r>>2]=a,e[h+(C+8)>>2]=t,e[h+(C+12)>>2]=t0,e[h+(C+24)>>2]=0;break}else ae()}else ne=c+C|0,e[h+4>>2]=ne|3,ne=h+(ne+4)|0,e[ne>>2]=e[ne>>2]|1;while(!1);return ne=h+8|0,ne|0}else B=C}else B=C;else B=-1;while(!1);if(n=e[10220]|0,n>>>0>=B>>>0)return r=n-B|0,t=e[10223]|0,r>>>0>15?(e[10223]=t+B,e[10220]=r,e[t+(B+4)>>2]=r|1,e[t+n>>2]=r,e[t+4>>2]=B|3):(e[10220]=0,e[10223]=0,e[t+4>>2]=n|3,ne=t+(n+4)|0,e[ne>>2]=e[ne>>2]|1),ne=t+8|0,ne|0;if(t=e[10221]|0,t>>>0>B>>>0)return be=t-B|0,e[10221]=be,ne=e[10224]|0,e[10224]=ne+B,e[ne+(B+4)>>2]=be|1,e[ne+4>>2]=B|3,ne=ne+8|0,ne|0;do if(!(e[10336]|0))if(t=bn(30)|0,t+-1&t)ae();else{e[10338]=t,e[10337]=t,e[10339]=-1,e[10340]=-1,e[10341]=0,e[10329]=0,t0=(Wn(0)|0)&-16^1431655768,e[10336]=t0;break}while(!1);if(h=B+48|0,c=e[10338]|0,p=B+47|0,a=c+p|0,c=0-c|0,g=a&c,g>>>0<=B>>>0||(t=e[10328]|0,t|0&&(_=e[10326]|0,t0=_+g|0,t0>>>0<=_>>>0|t0>>>0>t>>>0)))return ne=0,ne|0;e:do if(e[10329]&4)t=0,M=191;else{t=e[10224]|0;i:do if(t){for(o=41320;;){if(n=e[o>>2]|0,n>>>0<=t>>>0&&(V=o+4|0,(n+(e[V>>2]|0)|0)>>>0>t>>>0)){l=o,t=V;break}if(o=e[o+8>>2]|0,!o){M=174;break i}}if(n=a-(e[10221]|0)&c,n>>>0<2147483647)if(o=_t(n|0)|0,t0=(o|0)==((e[l>>2]|0)+(e[t>>2]|0)|0),t=t0?n:0,t0){if((o|0)!=-1){X=o,U=t,M=194;break e}}else M=184;else t=0}else M=174;while(!1);do if((M|0)==174)if(l=_t(0)|0,(l|0)!=-1)if(t=l,n=e[10337]|0,o=n+-1|0,o&t?n=g-t+(o+t&0-n)|0:n=g,t=e[10326]|0,o=t+n|0,n>>>0>B>>>0&n>>>0<2147483647){if(t0=e[10328]|0,t0|0&&o>>>0<=t>>>0|o>>>0>t0>>>0){t=0;break}if(o=_t(n|0)|0,t0=(o|0)==(l|0),t=t0?n:0,t0){X=l,U=t,M=194;break e}else M=184}else t=0;else t=0;while(!1);i:do if((M|0)==184){l=0-n|0;do if(h>>>0>n>>>0&(n>>>0<2147483647&(o|0)!=-1)&&(F=e[10338]|0,F=p-n+F&0-F,F>>>0<2147483647))if((_t(F|0)|0)==-1){_t(l|0)|0;break i}else{n=F+n|0;break}while(!1);if((o|0)!=-1){X=o,U=n,M=194;break e}}while(!1);e[10329]=e[10329]|4,M=191}while(!1);if((M|0)==191&&g>>>0<2147483647&&(X=_t(g|0)|0,K=_t(0)|0,X>>>0>>0&((X|0)!=-1&(K|0)!=-1))&&(Z=K-X|0,s0=Z>>>0>(B+40|0)>>>0,s0)&&(U=s0?Z:t,M=194),(M|0)==194){t=(e[10326]|0)+U|0,e[10326]=t,t>>>0>(e[10327]|0)>>>0&&(e[10327]=t),a=e[10224]|0;e:do if(a){l=41320;do{if(t=e[l>>2]|0,n=l+4|0,o=e[n>>2]|0,(X|0)==(t+o|0)){w0=t,v0=n,A0=o,Y0=l,M=204;break}l=e[l+8>>2]|0}while(l|0);if((M|0)==204&&!(e[Y0+12>>2]&8|0)&&a>>>0>>0&a>>>0>=w0>>>0){e[v0>>2]=A0+U,ne=(e[10221]|0)+U|0,be=a+8|0,be=be&7|0?0-be&7:0,le=ne-be|0,e[10224]=a+be,e[10221]=le,e[a+(be+4)>>2]=le|1,e[a+(ne+4)>>2]=40,e[10225]=e[10340];break}for(t=e[10222]|0,X>>>0>>0&&(e[10222]=X,t=X),n=X+U|0,l=41320;;){if((e[l>>2]|0)==(n|0)){o=l,n=l,M=212;break}if(l=e[l+8>>2]|0,!l){n=41320;break}}if((M|0)==212)if(e[n+12>>2]&8)n=41320;else{e[o>>2]=X,I=n+4|0,e[I>>2]=(e[I>>2]|0)+U,I=X+8|0,I=I&7|0?0-I&7:0,p=X+(U+8)|0,p=p&7|0?0-p&7:0,r=X+(p+U)|0,C=I+B|0,k=X+C|0,g=r-(X+I)-B|0,e[X+(I+4)>>2]=B|3;i:do if((r|0)!=(a|0)){if((r|0)==(e[10223]|0)){ne=(e[10220]|0)+g|0,e[10220]=ne,e[10223]=k,e[X+(C+4)>>2]=ne|1,e[X+(ne+C)>>2]=ne;break}if(c=U+4|0,n=e[X+(c+p)>>2]|0,(n&3|0)==1){h=n&-8,l=n>>>3;t:do if(n>>>0>=256){a=e[X+((p|24)+U)>>2]|0,s=e[X+(U+12+p)>>2]|0;do if((s|0)==(r|0)){if(o=p|16,s=X+(c+o)|0,n=e[s>>2]|0,!n&&(s=X+(o+U)|0,n=e[s>>2]|0,!n)){_e=0;break}for(;;){if(o=n+20|0,l=e[o>>2]|0,l){n=l,s=o;continue}if(o=n+16|0,l=e[o>>2]|0,l)n=l,s=o;else break}if(s>>>0>>0)ae();else{e[s>>2]=0,_e=n;break}}else if(o=e[X+((p|8)+U)>>2]|0,o>>>0>>0&&ae(),t=o+12|0,(e[t>>2]|0)!=(r|0)&&ae(),n=s+8|0,(e[n>>2]|0)==(r|0)){e[t>>2]=s,e[n>>2]=o,_e=s;break}else ae();while(!1);if(!a)break;t=e[X+(U+28+p)>>2]|0,n=41176+(t<<2)|0;do if((r|0)!=(e[n>>2]|0)){if(a>>>0<(e[10222]|0)>>>0&&ae(),t=a+16|0,(e[t>>2]|0)==(r|0)?e[t>>2]=_e:e[a+20>>2]=_e,!_e)break t}else{if(e[n>>2]=_e,_e)break;e[10219]=e[10219]&~(1<>>0>>0&&ae(),e[_e+24>>2]=a,r=p|16,t=e[X+(r+U)>>2]|0;do if(t)if(t>>>0>>0)ae();else{e[_e+16>>2]=t,e[t+24>>2]=_e;break}while(!1);if(r=e[X+(c+r)>>2]|0,!r)break;if(r>>>0<(e[10222]|0)>>>0)ae();else{e[_e+20>>2]=r,e[r+24>>2]=_e;break}}else{s=e[X+((p|8)+U)>>2]|0,o=e[X+(U+12+p)>>2]|0,n=40912+(l<<1<<2)|0;do if((s|0)!=(n|0)){if(s>>>0>>0&&ae(),(e[s+12>>2]|0)==(r|0))break;ae()}while(!1);if((o|0)==(s|0)){e[10218]=e[10218]&~(1<>>0>>0&&ae(),t=o+8|0,(e[t>>2]|0)==(r|0)){ze=t;break}ae()}while(!1);e[s+12>>2]=o,e[ze>>2]=s}while(!1);r=X+((h|p)+U)|0,o=h+g|0}else o=g;if(r=r+4|0,e[r>>2]=e[r>>2]&-2,e[X+(C+4)>>2]=o|1,e[X+(o+C)>>2]=o,r=o>>>3,o>>>0<256){t=r<<1,s=40912+(t<<2)|0,n=e[10218]|0,r=1<>2]|0,t>>>0>=(e[10222]|0)>>>0){le=r,be=t;break}ae()}while(!1);e[le>>2]=k,e[be+12>>2]=k,e[X+(C+8)>>2]=be,e[X+(C+12)>>2]=s;break}r=o>>>8;do if(!r)s=0;else{if(o>>>0>16777215){s=31;break}le=(r+1048320|0)>>>16&8,be=r<>>16&4,be=be<<_e,s=(be+245760|0)>>>16&2,s=14-(_e|le|s)+(be<>>15)|0,s=o>>>(s+7|0)&1|s<<1}while(!1);if(r=41176+(s<<2)|0,e[X+(C+28)>>2]=s,e[X+(C+20)>>2]=0,e[X+(C+16)>>2]=0,t=e[10219]|0,n=1<>2]=k,e[X+(C+24)>>2]=r,e[X+(C+12)>>2]=k,e[X+(C+8)>>2]=k;break}r=e[r>>2]|0;t:do if((e[r+4>>2]&-8|0)!=(o|0)){for(s=o<<((s|0)==31?0:25-(s>>>1)|0);t=r+16+(s>>>31<<2)|0,n=e[t>>2]|0,!!n;)if((e[n+4>>2]&-8|0)==(o|0)){ne=n;break t}else s=s<<1,r=n;if(t>>>0<(e[10222]|0)>>>0)ae();else{e[t>>2]=k,e[X+(C+24)>>2]=r,e[X+(C+12)>>2]=k,e[X+(C+8)>>2]=k;break i}}else ne=r;while(!1);if(r=ne+8|0,t=e[r>>2]|0,be=e[10222]|0,t>>>0>=be>>>0&ne>>>0>=be>>>0){e[t+12>>2]=k,e[r>>2]=k,e[X+(C+8)>>2]=t,e[X+(C+12)>>2]=ne,e[X+(C+24)>>2]=0;break}else ae()}else ne=(e[10221]|0)+g|0,e[10221]=ne,e[10224]=k,e[X+(C+4)>>2]=ne|1;while(!1);return ne=X+(I|8)|0,ne|0}for(;t=e[n>>2]|0,!(t>>>0<=a>>>0&&(r=e[n+4>>2]|0,s=t+r|0,s>>>0>a>>>0));)n=e[n+8>>2]|0;if(o=t+(r+-39)|0,t=t+(r+-47+(o&7|0?0-o&7:0))|0,o=a+16|0,t=t>>>0>>0?a:t,r=t+8|0,n=X+8|0,n=n&7|0?0-n&7:0,ne=U+-40-n|0,e[10224]=X+n,e[10221]=ne,e[X+(n+4)>>2]=ne|1,e[X+(U+-36)>>2]=40,e[10225]=e[10340],n=t+4|0,e[n>>2]=27,e[r>>2]=e[10330],e[r+4>>2]=e[10331],e[r+8>>2]=e[10332],e[r+12>>2]=e[10333],e[10330]=X,e[10331]=U,e[10333]=0,e[10332]=r,r=t+28|0,e[r>>2]=7,(t+32|0)>>>0>>0)do ne=r,r=r+4|0,e[r>>2]=7;while((ne+8|0)>>>0>>0);if((t|0)!=(a|0)){if(l=t-a|0,e[n>>2]=e[n>>2]&-2,e[a+4>>2]=l|1,e[t>>2]=l,r=l>>>3,l>>>0<256){t=r<<1,s=40912+(t<<2)|0,n=e[10218]|0,r=1<>2]|0,t>>>0<(e[10222]|0)>>>0?ae():(Re=r,$e=t)):(e[10218]=n|r,Re=40912+(t+2<<2)|0,$e=s),e[Re>>2]=a,e[$e+12>>2]=a,e[a+8>>2]=$e,e[a+12>>2]=s;break}if(r=l>>>8,r?l>>>0>16777215?s=31:(be=(r+1048320|0)>>>16&8,ne=r<>>16&4,ne=ne<>>16&2,s=14-(le|be|s)+(ne<>>15)|0,s=l>>>(s+7|0)&1|s<<1):s=0,n=41176+(s<<2)|0,e[a+28>>2]=s,e[a+20>>2]=0,e[o>>2]=0,r=e[10219]|0,t=1<>2]=a,e[a+24>>2]=n,e[a+12>>2]=a,e[a+8>>2]=a;break}r=e[n>>2]|0;i:do if((e[r+4>>2]&-8|0)!=(l|0)){for(s=l<<((s|0)==31?0:25-(s>>>1)|0);t=r+16+(s>>>31<<2)|0,n=e[t>>2]|0,!!n;)if((e[n+4>>2]&-8|0)==(l|0)){We=n;break i}else s=s<<1,r=n;if(t>>>0<(e[10222]|0)>>>0)ae();else{e[t>>2]=a,e[a+24>>2]=r,e[a+12>>2]=a,e[a+8>>2]=a;break e}}else We=r;while(!1);if(r=We+8|0,t=e[r>>2]|0,ne=e[10222]|0,t>>>0>=ne>>>0&We>>>0>=ne>>>0){e[t+12>>2]=a,e[r>>2]=a,e[a+8>>2]=t,e[a+12>>2]=We,e[a+24>>2]=0;break}else ae()}}else{ne=e[10222]|0,(ne|0)==0|X>>>0>>0&&(e[10222]=X),e[10330]=X,e[10331]=U,e[10333]=0,e[10227]=e[10336],e[10226]=-1,r=0;do ne=r<<1,be=40912+(ne<<2)|0,e[40912+(ne+3<<2)>>2]=be,e[40912+(ne+2<<2)>>2]=be,r=r+1|0;while((r|0)!=32);ne=X+8|0,ne=ne&7|0?0-ne&7:0,be=U+-40-ne|0,e[10224]=X+ne,e[10221]=be,e[X+(ne+4)>>2]=be|1,e[X+(U+-36)>>2]=40,e[10225]=e[10340]}while(!1);if(r=e[10221]|0,r>>>0>B>>>0)return be=r-B|0,e[10221]=be,ne=e[10224]|0,e[10224]=ne+B,e[ne+(B+4)>>2]=be|1,e[ne+4>>2]=B|3,ne=ne+8|0,ne|0}return ne=di()|0,e[ne>>2]=12,ne=0,ne|0}function Ze(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0;if(t){r=t+-8|0,c=e[10222]|0,r>>>0>>0&&ae(),n=e[t+-4>>2]|0,s=n&3,(s|0)==1&&ae(),k=n&-8,B=t+(k+-8)|0;do if(n&1)F=r,l=k;else{if(r=e[r>>2]|0,!s)return;if(h=-8-r|0,g=t+h|0,C=r+k|0,g>>>0>>0&&ae(),(g|0)==(e[10223]|0)){if(r=t+(k+-4)|0,n=e[r>>2]|0,(n&3|0)!=3){F=g,l=C;break}e[10220]=C,e[r>>2]=n&-2,e[t+(h+4)>>2]=C|1,e[B>>2]=C;return}if(o=r>>>3,r>>>0<256){if(s=e[t+(h+8)>>2]|0,n=e[t+(h+12)>>2]|0,r=40912+(o<<1<<2)|0,(s|0)!=(r|0)&&(s>>>0>>0&&ae(),(e[s+12>>2]|0)!=(g|0)&&ae()),(n|0)==(s|0)){e[10218]=e[10218]&~(1<>>0>>0&&ae(),r=n+8|0,(e[r>>2]|0)==(g|0)?a=r:ae()):a=n+8|0,e[s+12>>2]=n,e[a>>2]=s,F=g,l=C;break}a=e[t+(h+24)>>2]|0,s=e[t+(h+12)>>2]|0;do if((s|0)==(g|0)){if(n=t+(h+20)|0,r=e[n>>2]|0,!r&&(n=t+(h+16)|0,r=e[n>>2]|0,!r)){p=0;break}for(;;){if(s=r+20|0,o=e[s>>2]|0,o){r=o,n=s;continue}if(s=r+16|0,o=e[s>>2]|0,o)r=o,n=s;else break}if(n>>>0>>0)ae();else{e[n>>2]=0,p=r;break}}else if(o=e[t+(h+8)>>2]|0,o>>>0>>0&&ae(),r=o+12|0,(e[r>>2]|0)!=(g|0)&&ae(),n=s+8|0,(e[n>>2]|0)==(g|0)){e[r>>2]=s,e[n>>2]=o,p=s;break}else ae();while(!1);if(a){if(r=e[t+(h+28)>>2]|0,n=41176+(r<<2)|0,(g|0)==(e[n>>2]|0)){if(e[n>>2]=p,!p){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),r=a+16|0,(e[r>>2]|0)==(g|0)?e[r>>2]=p:e[a+20>>2]=p,!p){F=g,l=C;break}n=e[10222]|0,p>>>0>>0&&ae(),e[p+24>>2]=a,r=e[t+(h+16)>>2]|0;do if(r)if(r>>>0>>0)ae();else{e[p+16>>2]=r,e[r+24>>2]=p;break}while(!1);if(r=e[t+(h+20)>>2]|0,r)if(r>>>0<(e[10222]|0)>>>0)ae();else{e[p+20>>2]=r,e[r+24>>2]=p,F=g,l=C;break}else F=g,l=C}else F=g,l=C}while(!1);if(F>>>0>=B>>>0&&ae(),r=t+(k+-4)|0,n=e[r>>2]|0,n&1||ae(),n&2)e[r>>2]=n&-2,e[F+4>>2]=l|1,e[F+l>>2]=l;else{if((B|0)==(e[10224]|0)){if(_=(e[10221]|0)+l|0,e[10221]=_,e[10224]=F,e[F+4>>2]=_|1,(F|0)!=(e[10223]|0))return;e[10223]=0,e[10220]=0;return}if((B|0)==(e[10223]|0)){_=(e[10220]|0)+l|0,e[10220]=_,e[10223]=F,e[F+4>>2]=_|1,e[F+_>>2]=_;return}l=(n&-8)+l|0,o=n>>>3;do if(n>>>0>=256){a=e[t+(k+16)>>2]|0,r=e[t+(k|4)>>2]|0;do if((r|0)==(B|0)){if(n=t+(k+12)|0,r=e[n>>2]|0,!r&&(n=t+(k+8)|0,r=e[n>>2]|0,!r)){U=0;break}for(;;){if(s=r+20|0,o=e[s>>2]|0,o){r=o,n=s;continue}if(s=r+16|0,o=e[s>>2]|0,o)r=o,n=s;else break}if(n>>>0<(e[10222]|0)>>>0)ae();else{e[n>>2]=0,U=r;break}}else if(n=e[t+k>>2]|0,n>>>0<(e[10222]|0)>>>0&&ae(),s=n+12|0,(e[s>>2]|0)!=(B|0)&&ae(),o=r+8|0,(e[o>>2]|0)==(B|0)){e[s>>2]=r,e[o>>2]=n,U=r;break}else ae();while(!1);if(a){if(r=e[t+(k+20)>>2]|0,n=41176+(r<<2)|0,(B|0)==(e[n>>2]|0)){if(e[n>>2]=U,!U){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),r=a+16|0,(e[r>>2]|0)==(B|0)?e[r>>2]=U:e[a+20>>2]=U,!U)break;n=e[10222]|0,U>>>0>>0&&ae(),e[U+24>>2]=a,r=e[t+(k+8)>>2]|0;do if(r)if(r>>>0>>0)ae();else{e[U+16>>2]=r,e[r+24>>2]=U;break}while(!1);if(r=e[t+(k+12)>>2]|0,r)if(r>>>0<(e[10222]|0)>>>0)ae();else{e[U+20>>2]=r,e[r+24>>2]=U;break}}}else{if(s=e[t+k>>2]|0,n=e[t+(k|4)>>2]|0,r=40912+(o<<1<<2)|0,(s|0)!=(r|0)&&(s>>>0<(e[10222]|0)>>>0&&ae(),(e[s+12>>2]|0)!=(B|0)&&ae()),(n|0)==(s|0)){e[10218]=e[10218]&~(1<>>0<(e[10222]|0)>>>0&&ae(),r=n+8|0,(e[r>>2]|0)==(B|0)?I=r:ae()):I=n+8|0,e[s+12>>2]=n,e[I>>2]=s}while(!1);if(e[F+4>>2]=l|1,e[F+l>>2]=l,(F|0)==(e[10223]|0)){e[10220]=l;return}}if(r=l>>>3,l>>>0<256){n=r<<1,o=40912+(n<<2)|0,s=e[10218]|0,r=1<>2]|0,n>>>0<(e[10222]|0)>>>0?ae():(V=r,O=n)):(e[10218]=s|r,V=40912+(n+2<<2)|0,O=o),e[V>>2]=F,e[O+12>>2]=F,e[F+8>>2]=O,e[F+12>>2]=o;return}r=l>>>8,r?l>>>0>16777215?o=31:(V=(r+1048320|0)>>>16&8,O=r<>>16&4,O=O<>>16&2,o=14-(B|V|o)+(O<>>15)|0,o=l>>>(o+7|0)&1|o<<1):o=0,r=41176+(o<<2)|0,e[F+28>>2]=o,e[F+20>>2]=0,e[F+16>>2]=0,n=e[10219]|0,s=1<>2]|0;i:do if((e[r+4>>2]&-8|0)!=(l|0)){for(o=l<<((o|0)==31?0:25-(o>>>1)|0);n=r+16+(o>>>31<<2)|0,s=e[n>>2]|0,!!s;)if((e[s+4>>2]&-8|0)==(l|0)){_=s;break i}else o=o<<1,r=s;if(n>>>0<(e[10222]|0)>>>0)ae();else{e[n>>2]=F,e[F+24>>2]=r,e[F+12>>2]=F,e[F+8>>2]=F;break e}}else _=r;while(!1);if(r=_+8|0,n=e[r>>2]|0,O=e[10222]|0,n>>>0>=O>>>0&_>>>0>=O>>>0){e[n+12>>2]=F,e[r>>2]=F,e[F+8>>2]=n,e[F+12>>2]=_,e[F+24>>2]=0;break}else ae()}else e[10219]=n|s,e[r>>2]=F,e[F+24>>2]=r,e[F+12>>2]=F,e[F+8>>2]=F;while(!1);if(F=(e[10226]|0)+-1|0,e[10226]=F,!F)r=41328;else return;for(;r=e[r>>2]|0,r;)r=r+8|0;e[10226]=-1}}function vh(t,r){t=t|0,r=r|0;var n=0;return t?(n=W(r,t)|0,(r|t)>>>0>65535&&(n=((n>>>0)/(t>>>0)|0|0)==(r|0)?n:-1)):n=0,r=xi(n)|0,!r||!(e[r+-4>>2]&3)||je(r|0,0,n|0)|0,r|0}function bt(t,r){t=t|0,r=r|0;var n=0,s=0;return t?r>>>0>4294967231?(t=di()|0,e[t>>2]=12,t=0,t|0):(n=wh(t+-8|0,r>>>0<11?16:r+11&-8)|0,n?(t=n+8|0,t|0):(n=xi(r)|0,n?(s=e[t+-4>>2]|0,s=(s&-8)-(s&3|0?4:8)|0,ti(n|0,t|0,(s>>>0>>0?s:r)|0)|0,Ze(t),t=n,t|0):(t=0,t|0))):(t=xi(r)|0,t|0)}function wh(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(k=t+4|0,U=e[k>>2]|0,h=U&-8,g=t+h|0,c=e[10222]|0,n=U&3,(n|0)!=1&t>>>0>=c>>>0&t>>>0>>0||ae(),s=t+(h|4)|0,o=e[s>>2]|0,o&1||ae(),!n)return r>>>0<256?(t=0,t|0):(h>>>0>=(r+4|0)>>>0&&(h-r|0)>>>0<=e[10338]<<1>>>0||(t=0),t|0);if(h>>>0>=r>>>0)return n=h-r|0,n>>>0<=15||(e[k>>2]=U&1|r|2,e[t+(r+4)>>2]=n|3,e[s>>2]=e[s>>2]|1,M2(t+r|0,n)),t|0;if((g|0)==(e[10224]|0))return n=(e[10221]|0)+h|0,n>>>0<=r>>>0?(t=0,t|0):(I=n-r|0,e[k>>2]=U&1|r|2,e[t+(r+4)>>2]=I|1,e[10224]=t+r,e[10221]=I,t|0);if((g|0)==(e[10223]|0))return s=(e[10220]|0)+h|0,s>>>0>>0?(t=0,t|0):(n=s-r|0,n>>>0>15?(e[k>>2]=U&1|r|2,e[t+(r+4)>>2]=n|1,e[t+s>>2]=n,s=t+(s+4)|0,e[s>>2]=e[s>>2]&-2,s=t+r|0):(e[k>>2]=U&1|s|2,s=t+(s+4)|0,e[s>>2]=e[s>>2]|1,s=0,n=0),e[10220]=n,e[10223]=s,t|0);if(o&2||(C=(o&-8)+h|0,C>>>0>>0))return t=0,t|0;I=C-r|0,l=o>>>3;do if(o>>>0>=256){a=e[t+(h+24)>>2]|0,l=e[t+(h+12)>>2]|0;do if((l|0)==(g|0)){if(s=t+(h+20)|0,n=e[s>>2]|0,!n&&(s=t+(h+16)|0,n=e[s>>2]|0,!n)){p=0;break}for(;;){if(o=n+20|0,l=e[o>>2]|0,l){n=l,s=o;continue}if(o=n+16|0,l=e[o>>2]|0,l)n=l,s=o;else break}if(s>>>0>>0)ae();else{e[s>>2]=0,p=n;break}}else if(o=e[t+(h+8)>>2]|0,o>>>0>>0&&ae(),n=o+12|0,(e[n>>2]|0)!=(g|0)&&ae(),s=l+8|0,(e[s>>2]|0)==(g|0)){e[n>>2]=l,e[s>>2]=o,p=l;break}else ae();while(!1);if(a){if(n=e[t+(h+28)>>2]|0,s=41176+(n<<2)|0,(g|0)==(e[s>>2]|0)){if(e[s>>2]=p,!p){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),n=a+16|0,(e[n>>2]|0)==(g|0)?e[n>>2]=p:e[a+20>>2]=p,!p)break;s=e[10222]|0,p>>>0>>0&&ae(),e[p+24>>2]=a,n=e[t+(h+16)>>2]|0;do if(n)if(n>>>0>>0)ae();else{e[p+16>>2]=n,e[n+24>>2]=p;break}while(!1);if(n=e[t+(h+20)>>2]|0,n)if(n>>>0<(e[10222]|0)>>>0)ae();else{e[p+20>>2]=n,e[n+24>>2]=p;break}}}else{if(o=e[t+(h+8)>>2]|0,s=e[t+(h+12)>>2]|0,n=40912+(l<<1<<2)|0,(o|0)!=(n|0)&&(o>>>0>>0&&ae(),(e[o+12>>2]|0)!=(g|0)&&ae()),(s|0)==(o|0)){e[10218]=e[10218]&~(1<>>0>>0&&ae(),n=s+8|0,(e[n>>2]|0)==(g|0)?a=n:ae()):a=s+8|0,e[o+12>>2]=s,e[a>>2]=o}while(!1);return I>>>0<16?(e[k>>2]=C|U&1|2,r=t+(C|4)|0,e[r>>2]=e[r>>2]|1,t|0):(e[k>>2]=U&1|r|2,e[t+(r+4)>>2]=I|3,U=t+(C|4)|0,e[U>>2]=e[U>>2]|1,M2(t+r|0,I),t|0)}function M2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0;B=t+r|0,n=e[t+4>>2]|0;do if(n&1)_=t,a=r;else{if(p=e[t>>2]|0,!(n&3))return;if(I=t+(0-p)|0,C=p+r|0,h=e[10222]|0,I>>>0>>0&&ae(),(I|0)==(e[10223]|0)){if(s=t+(r+4)|0,n=e[s>>2]|0,(n&3|0)!=3){_=I,a=C;break}e[10220]=C,e[s>>2]=n&-2,e[t+(4-p)>>2]=C|1,e[B>>2]=C;return}if(l=p>>>3,p>>>0<256){if(o=e[t+(8-p)>>2]|0,s=e[t+(12-p)>>2]|0,n=40912+(l<<1<<2)|0,(o|0)!=(n|0)&&(o>>>0>>0&&ae(),(e[o+12>>2]|0)!=(I|0)&&ae()),(s|0)==(o|0)){e[10218]=e[10218]&~(1<>>0>>0&&ae(),n=s+8|0,(e[n>>2]|0)==(I|0)?c=n:ae()):c=s+8|0,e[o+12>>2]=s,e[c>>2]=o,_=I,a=C;break}c=e[t+(24-p)>>2]|0,o=e[t+(12-p)>>2]|0;do if((o|0)==(I|0)){if(o=16-p|0,s=t+(o+4)|0,n=e[s>>2]|0,!n&&(s=t+o|0,n=e[s>>2]|0,!n)){g=0;break}for(;;){if(o=n+20|0,l=e[o>>2]|0,l){n=l,s=o;continue}if(o=n+16|0,l=e[o>>2]|0,l)n=l,s=o;else break}if(s>>>0>>0)ae();else{e[s>>2]=0,g=n;break}}else if(l=e[t+(8-p)>>2]|0,l>>>0>>0&&ae(),n=l+12|0,(e[n>>2]|0)!=(I|0)&&ae(),s=o+8|0,(e[s>>2]|0)==(I|0)){e[n>>2]=o,e[s>>2]=l,g=o;break}else ae();while(!1);if(c){if(n=e[t+(28-p)>>2]|0,s=41176+(n<<2)|0,(I|0)==(e[s>>2]|0)){if(e[s>>2]=g,!g){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),n=c+16|0,(e[n>>2]|0)==(I|0)?e[n>>2]=g:e[c+20>>2]=g,!g){_=I,a=C;break}o=e[10222]|0,g>>>0>>0&&ae(),e[g+24>>2]=c,n=16-p|0,s=e[t+n>>2]|0;do if(s)if(s>>>0>>0)ae();else{e[g+16>>2]=s,e[s+24>>2]=g;break}while(!1);if(n=e[t+(n+4)>>2]|0,n)if(n>>>0<(e[10222]|0)>>>0)ae();else{e[g+20>>2]=n,e[n+24>>2]=g,_=I,a=C;break}else _=I,a=C}else _=I,a=C}while(!1);if(h=e[10222]|0,B>>>0>>0&&ae(),n=t+(r+4)|0,s=e[n>>2]|0,s&2)e[n>>2]=s&-2,e[_+4>>2]=a|1,e[_+a>>2]=a;else{if((B|0)==(e[10224]|0)){if(O=(e[10221]|0)+a|0,e[10221]=O,e[10224]=_,e[_+4>>2]=O|1,(_|0)!=(e[10223]|0))return;e[10223]=0,e[10220]=0;return}if((B|0)==(e[10223]|0)){O=(e[10220]|0)+a|0,e[10220]=O,e[10223]=_,e[_+4>>2]=O|1,e[_+O>>2]=O;return}a=(s&-8)+a|0,l=s>>>3;do if(s>>>0>=256){c=e[t+(r+24)>>2]|0,o=e[t+(r+12)>>2]|0;do if((o|0)==(B|0)){if(s=t+(r+20)|0,n=e[s>>2]|0,!n&&(s=t+(r+16)|0,n=e[s>>2]|0,!n)){U=0;break}for(;;){if(o=n+20|0,l=e[o>>2]|0,l){n=l,s=o;continue}if(o=n+16|0,l=e[o>>2]|0,l)n=l,s=o;else break}if(s>>>0>>0)ae();else{e[s>>2]=0,U=n;break}}else if(l=e[t+(r+8)>>2]|0,l>>>0>>0&&ae(),n=l+12|0,(e[n>>2]|0)!=(B|0)&&ae(),s=o+8|0,(e[s>>2]|0)==(B|0)){e[n>>2]=o,e[s>>2]=l,U=o;break}else ae();while(!1);if(c){if(n=e[t+(r+28)>>2]|0,s=41176+(n<<2)|0,(B|0)==(e[s>>2]|0)){if(e[s>>2]=U,!U){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),n=c+16|0,(e[n>>2]|0)==(B|0)?e[n>>2]=U:e[c+20>>2]=U,!U)break;s=e[10222]|0,U>>>0>>0&&ae(),e[U+24>>2]=c,n=e[t+(r+16)>>2]|0;do if(n)if(n>>>0>>0)ae();else{e[U+16>>2]=n,e[n+24>>2]=U;break}while(!1);if(n=e[t+(r+20)>>2]|0,n)if(n>>>0<(e[10222]|0)>>>0)ae();else{e[U+20>>2]=n,e[n+24>>2]=U;break}}}else{if(o=e[t+(r+8)>>2]|0,s=e[t+(r+12)>>2]|0,n=40912+(l<<1<<2)|0,(o|0)!=(n|0)&&(o>>>0>>0&&ae(),(e[o+12>>2]|0)!=(B|0)&&ae()),(s|0)==(o|0)){e[10218]=e[10218]&~(1<>>0>>0&&ae(),n=s+8|0,(e[n>>2]|0)==(B|0)?k=n:ae()):k=s+8|0,e[o+12>>2]=s,e[k>>2]=o}while(!1);if(e[_+4>>2]=a|1,e[_+a>>2]=a,(_|0)==(e[10223]|0)){e[10220]=a;return}}if(n=a>>>3,a>>>0<256){s=n<<1,l=40912+(s<<2)|0,o=e[10218]|0,n=1<>2]|0,s>>>0<(e[10222]|0)>>>0?ae():(V=n,O=s)):(e[10218]=o|n,V=40912+(s+2<<2)|0,O=l),e[V>>2]=_,e[O+12>>2]=_,e[_+8>>2]=O,e[_+12>>2]=l;return}if(n=a>>>8,n?a>>>0>16777215?l=31:(V=(n+1048320|0)>>>16&8,O=n<>>16&4,O=O<>>16&2,l=14-(B|V|l)+(O<>>15)|0,l=a>>>(l+7|0)&1|l<<1):l=0,n=41176+(l<<2)|0,e[_+28>>2]=l,e[_+20>>2]=0,e[_+16>>2]=0,s=e[10219]|0,o=1<>2]=_,e[_+24>>2]=n,e[_+12>>2]=_,e[_+8>>2]=_;return}n=e[n>>2]|0;e:do if((e[n+4>>2]&-8|0)!=(a|0)){for(l=a<<((l|0)==31?0:25-(l>>>1)|0);s=n+16+(l>>>31<<2)|0,o=e[s>>2]|0,!!o;)if((e[o+4>>2]&-8|0)==(a|0)){n=o;break e}else l=l<<1,n=o;s>>>0<(e[10222]|0)>>>0&&ae(),e[s>>2]=_,e[_+24>>2]=n,e[_+12>>2]=_,e[_+8>>2]=_;return}while(!1);s=n+8|0,o=e[s>>2]|0,O=e[10222]|0,o>>>0>=O>>>0&n>>>0>=O>>>0||ae(),e[o+12>>2]=_,e[s>>2]=_,e[_+8>>2]=o,e[_+12>>2]=n,e[_+24>>2]=0}function Th(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;if(s=e[9321]|0,Ih(42048,s,42104),e[10342]=42892,e[10344]=42912,e[10343]=0,t=e[10720]|0,f=0,h0(62,41368+t|0,42048),l=f,f=0,l&1&&(l=b()|0,H0(41376),r0(l|0)),e[41368+(t+72)>>2]=0,e[41368+(t+76)>>2]=-1,o=e[9322]|0,_2(42152,o,42112),e[10364]=42972,e[10365]=42992,n=e[10740]|0,f=0,h0(62,41456+n|0,42152),l=f,f=0,l&1&&(l=b()|0,H0(41460),r0(l|0)),t=n+72|0,e[41456+t>>2]=0,r=n+76|0,e[41456+r>>2]=-1,l=e[9320]|0,_2(42200,l,42120),e[10385]=42972,e[10386]=42992,f=0,h0(62,41540+n|0,42200),a=f,f=0,a&1&&(a=b()|0,H0(41544),r0(a|0)),e[41540+t>>2]=0,e[41540+r>>2]=-1,a=e[41540+((e[(e[10385]|0)+-12>>2]|0)+24)>>2]|0,e[10406]=42972,e[10407]=42992,f=0,h0(62,41624+n|0,a|0),a=f,f=0,a&1&&(a=b()|0,H0(41628),r0(a|0)),e[41624+t>>2]=0,e[41624+r>>2]=-1,e[41368+((e[(e[10342]|0)+-12>>2]|0)+72)>>2]=41456,t=41540+((e[(e[10385]|0)+-12>>2]|0)+4)|0,e[t>>2]=e[t>>2]|8192,e[41540+((e[(e[10385]|0)+-12>>2]|0)+72)>>2]=41456,Dh(42248,s,42128),e[10427]=42932,e[10429]=42952,e[10428]=0,t=e[10730]|0,f=0,h0(62,41708+t|0,42248),a=f,f=0,a&1&&(a=b()|0,cr(41716),r0(a|0)),e[41708+(t+72)>>2]=0,e[41708+(t+76)>>2]=-1,R2(42304,o,42136),e[10449]=43012,e[10450]=43032,n=e[10750]|0,f=0,h0(62,41796+n|0,42304),a=f,f=0,a&1&&(a=b()|0,cr(41800),r0(a|0)),t=n+72|0,e[41796+t>>2]=0,r=n+76|0,e[41796+r>>2]=-1,R2(42352,l,42144),e[10470]=43012,e[10471]=43032,f=0,h0(62,41880+n|0,42352),a=f,f=0,a&1&&(a=b()|0,cr(41884),r0(a|0)),e[41880+t>>2]=0,e[41880+r>>2]=-1,a=e[41880+((e[(e[10470]|0)+-12>>2]|0)+24)>>2]|0,e[10491]=43012,e[10492]=43032,f=0,h0(62,41964+n|0,a|0),a=f,f=0,a&1)a=b()|0,cr(41968),r0(a|0);else{e[41964+t>>2]=0,e[41964+r>>2]=-1,e[41708+((e[(e[10427]|0)+-12>>2]|0)+72)>>2]=41796,a=41880+((e[(e[10470]|0)+-12>>2]|0)+4)|0,e[a>>2]=e[a>>2]|8192,e[41880+((e[(e[10470]|0)+-12>>2]|0)+72)>>2]=41796;return}}function Ch(t){t=t|0,f=0,u0(70,41456)|0,t=f,f=0,!(!(t&1)&&(f=0,u0(70,41624)|0,t=f,f=0,!(t&1))&&(f=0,u0(71,41796)|0,t=f,f=0,!(t&1))&&(f=0,u0(71,41964)|0,t=f,f=0,!(t&1)))&&(t=b(0)|0,Ie(t))}function xh(){Th(0),Te(187,56757,Q|0)|0}function yh(){}function Ih(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;if(o=y,y=y+16|0,l=o+4|0,s=o,h1(t),e[t>>2]=42600,e[t+32>>2]=r,e[t+40>>2]=n,e[t+48>>2]=-1,d[t+52>>0]=0,$t(l,t+4|0),e[s>>2]=e[l>>2],f=0,h0(23,t|0,s|0),n=f,f=0,n&1)l=b()|0,Mi(s),ce(t),r0(l|0);else{Mi(s),y=o;return}}function _2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;if(o=y,y=y+16|0,l=o+4|0,s=o,h1(t),e[t>>2]=42536,e[t+32>>2]=r,$t(l,t+4|0),e[s>>2]=e[l>>2],f=0,r=y0(37,s|0,44280)|0,l=f,f=0,l&1)l=b()|0,Mi(s),ce(t),r0(l|0);else{Mi(s),e[t+36>>2]=r,e[t+40>>2]=n,l=(Se[e[(e[r>>2]|0)+28>>2]&127](r)|0)&1,d[t+44>>0]=l,y=o;return}}function Dh(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;if(o=y,y=y+16|0,l=o+4|0,s=o,q2(t),e[t>>2]=42472,e[t+32>>2]=r,e[t+40>>2]=n,e[t+48>>2]=-1,d[t+52>>0]=0,$t(l,t+4|0),e[s>>2]=e[l>>2],f=0,h0(21,t|0,s|0),n=f,f=0,n&1)l=b()|0,Mi(s),ir(t),r0(l|0);else{Mi(s),y=o;return}}function R2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;if(o=y,y=y+16|0,l=o+4|0,s=o,q2(t),e[t>>2]=42408,e[t+32>>2]=r,$t(l,t+4|0),e[s>>2]=e[l>>2],f=0,r=y0(37,s|0,44288)|0,l=f,f=0,l&1)l=b()|0,Mi(s),ir(t),r0(l|0);else{Mi(s),e[t+36>>2]=r,e[t+40>>2]=n,l=(Se[e[(e[r>>2]|0)+28>>2]&127](r)|0)&1,d[t+44>>0]=l,y=o;return}}function Eh(t){t=t|0,ir(t),a0(t)}function kh(t,r){t=t|0,r=r|0,Se[e[(e[t>>2]|0)+24>>2]&127](t)|0,r=Pi(r,44288)|0,e[t+36>>2]=r,r=(Se[e[(e[r>>2]|0)+28>>2]&127](r)|0)&1,d[t+44>>0]=r}function Fh(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;p=y,y=y+16|0,c=p+8|0,a=p,n=t+36|0,s=t+40|0,o=c+8|0,l=c,r=t+32|0;e:for(;;){if(t=e[n>>2]|0,t=nr[e[(e[t>>2]|0)+20>>2]&31](t,e[s>>2]|0,c,o,a)|0,g=(e[a>>2]|0)-l|0,(dt(c,1,g,e[r>>2]|0)|0)!=(g|0)){t=-1;break}switch(t|0){case 1:break;case 2:{t=-1;break e}default:{h=4;break e}}}return(h|0)==4&&(t=((I1(e[r>>2]|0)|0)!=0)<<31>>31),y=p,t|0}function Mh(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;e:do if(d[t+44>>0]|0)r=dt(r,4,n,e[t+32>>2]|0)|0;else if((n|0)>0)for(s=r,r=0;;){if((Ni[e[(e[t>>2]|0)+52>>2]&63](t,e[s>>2]|0)|0)==-1)break e;if(r=r+1|0,(r|0)<(n|0))s=s+4|0;else break}else r=0;while(!1);return r|0}function _h(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;B=y,y=y+32|0,I=B+16|0,n=B+8|0,C=B+4|0,g=B,k=(r|0)==-1;e:do if(k)U=11;else{if(e[n>>2]=r,d[t+44>>0]|0)if((dt(n,4,1,e[t+32>>2]|0)|0)==1){U=11;break}else{n=-1;break}for(e[C>>2]=I,h=n+4|0,p=t+36|0,o=t+40|0,l=I+8|0,a=I,c=t+32|0;;){if(t=e[p>>2]|0,t=Ct[e[(e[t>>2]|0)+12>>2]&15](t,e[o>>2]|0,n,h,g,I,l,C)|0,(e[g>>2]|0)==(n|0)){n=-1;break e}if((t|0)==3)break;if(s=(t|0)==1,t>>>0>=2){n=-1;break e}if(t=(e[C>>2]|0)-a|0,(dt(I,1,t,e[c>>2]|0)|0)!=(t|0)){n=-1;break e}if(s)n=s?e[g>>2]|0:n;else{U=11;break e}}(dt(n,1,1,e[c>>2]|0)|0)!=1?n=-1:U=11}while(!1);return(U|0)==11&&(n=k?0:r),y=B,n|0}function Rh(t,r){t=t|0,r=r|0;var n=0,s=0;s=Pi(r,44288)|0,n=t+36|0,e[n>>2]=s,s=Se[e[(e[s>>2]|0)+24>>2]&127](s)|0,r=t+44|0,e[r>>2]=s,n=e[n>>2]|0,n=(Se[e[(e[n>>2]|0)+28>>2]&127](n)|0)&1,d[t+53>>0]=n,(e[r>>2]|0)>8&&lr(56783)}function Ph(t){t=t|0,ir(t),a0(t)}function Lh(t){return t=t|0,P2(t,0)|0}function Uh(t){return t=t|0,P2(t,1)|0}function Oh(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;p=y,y=y+32|0,h=p+16|0,c=p+8|0,s=p+4|0,o=p,l=t+52|0,n=(d[l>>0]|0)!=0;e:do if((r|0)==-1)n?r=-1:(r=e[t+48>>2]|0,d[l>>0]=(r|0)!=-1&1);else{a=t+48|0;i:do if(n){switch(e[s>>2]=e[a>>2],n=e[t+36>>2]|0,Ct[e[(e[n>>2]|0)+12>>2]&15](n,e[t+40>>2]|0,s,s+4|0,o,h,h+8|0,c)|0){case 1:case 2:{r=-1;break e}case 3:{d[h>>0]=e[a>>2],e[c>>2]=h+1;break}default:}for(n=t+32|0;;){if(s=e[c>>2]|0,s>>>0<=h>>>0)break i;if(t=s+-1|0,e[c>>2]=t,(kr(d[t>>0]|0,e[n>>2]|0)|0)==-1){r=-1;break e}}}while(!1);e[a>>2]=r,d[l>>0]=1}while(!1);return y=p,r|0}function P2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0;U=y,y=y+32|0,k=U+16|0,I=U+8|0,p=U+4|0,g=U,o=t+52|0;e:do if(d[o>>0]|0)s=t+48|0,n=e[s>>2]|0,r&&(e[s>>2]=-1,d[o>>0]=0);else{if(n=e[t+44>>2]|0,n=(n|0)>1?n:1,C=t+32|0,(n|0)>0){o=0;do{if(s=Er(e[C>>2]|0)|0,(s|0)==-1){n=-1;break e}d[k+o>>0]=s,o=o+1|0}while((o|0)<(n|0))}i:do if(d[t+53>>0]|0)e[I>>2]=d[k>>0];else{a=t+40|0,c=t+36|0,h=I+4|0;t:for(;;){switch(B=e[a>>2]|0,o=B,s=e[o>>2]|0,o=e[o+4>>2]|0,V=e[c>>2]|0,l=k+n|0,Ct[e[(e[V>>2]|0)+16>>2]&15](V,B,k,l,p,I,h,g)|0){case 2:{n=-1;break e}case 3:break t;case 1:break;default:break i}if(V=e[a>>2]|0,e[V>>2]=s,e[V+4>>2]=o,(n|0)==8){n=-1;break e}if(s=Er(e[C>>2]|0)|0,(s|0)==-1){n=-1;break e}d[l>>0]=s,n=n+1|0}e[I>>2]=d[k>>0]}while(!1);if(r){n=e[I>>2]|0,e[t+48>>2]=n;break}for(;!((n|0)<=0);)if(n=n+-1|0,(kr(d[k+n>>0]|0,e[C>>2]|0)|0)==-1){n=-1;break e}n=e[I>>2]|0}while(!1);return y=U,n|0}function Nh(t){t=t|0,ce(t),a0(t)}function Bh(t,r){t=t|0,r=r|0,Se[e[(e[t>>2]|0)+24>>2]&127](t)|0,r=Pi(r,44280)|0,e[t+36>>2]=r,r=(Se[e[(e[r>>2]|0)+28>>2]&127](r)|0)&1,d[t+44>>0]=r}function Vh(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;p=y,y=y+16|0,c=p+8|0,a=p,n=t+36|0,s=t+40|0,o=c+8|0,l=c,r=t+32|0;e:for(;;){if(t=e[n>>2]|0,t=nr[e[(e[t>>2]|0)+20>>2]&31](t,e[s>>2]|0,c,o,a)|0,g=(e[a>>2]|0)-l|0,(dt(c,1,g,e[r>>2]|0)|0)!=(g|0)){t=-1;break}switch(t|0){case 1:break;case 2:{t=-1;break e}default:{h=4;break e}}}return(h|0)==4&&(t=((I1(e[r>>2]|0)|0)!=0)<<31>>31),y=p,t|0}function qh(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;e:do if(d[t+44>>0]|0)r=dt(r,1,n,e[t+32>>2]|0)|0;else if((n|0)>0)for(s=r,r=0;;){if((Ni[e[(e[t>>2]|0)+52>>2]&63](t,N[s>>0]|0)|0)==-1)break e;if(r=r+1|0,(r|0)<(n|0))s=s+1|0;else break}else r=0;while(!1);return r|0}function bh(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;B=y,y=y+32|0,I=B+16|0,n=B+8|0,C=B+4|0,g=B,k=(r|0)==-1;e:do if(k)U=11;else{if(d[n>>0]=r,d[t+44>>0]|0)if((dt(n,1,1,e[t+32>>2]|0)|0)==1){U=11;break}else{n=-1;break}for(e[C>>2]=I,p=n+1|0,o=t+36|0,l=t+40|0,a=I+8|0,c=I,h=t+32|0;;){if(t=e[o>>2]|0,t=Ct[e[(e[t>>2]|0)+12>>2]&15](t,e[l>>2]|0,n,p,g,I,a,C)|0,(e[g>>2]|0)==(n|0)){n=-1;break e}if((t|0)==3)break;if(s=(t|0)==1,t>>>0>=2){n=-1;break e}if(t=(e[C>>2]|0)-c|0,(dt(I,1,t,e[h>>2]|0)|0)!=(t|0)){n=-1;break e}if(s)n=s?e[g>>2]|0:n;else{U=11;break e}}(dt(n,1,1,e[h>>2]|0)|0)!=1?n=-1:U=11}while(!1);return(U|0)==11&&(n=k?0:r),y=B,n|0}function Gh(t,r){t=t|0,r=r|0;var n=0,s=0;s=Pi(r,44280)|0,n=t+36|0,e[n>>2]=s,s=Se[e[(e[s>>2]|0)+24>>2]&127](s)|0,r=t+44|0,e[r>>2]=s,n=e[n>>2]|0,n=(Se[e[(e[n>>2]|0)+28>>2]&127](n)|0)&1,d[t+53>>0]=n,(e[r>>2]|0)>8&&lr(56783)}function Qh(t){t=t|0,ce(t),a0(t)}function Hh(t){return t=t|0,L2(t,0)|0}function Yh(t){return t=t|0,L2(t,1)|0}function jh(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;p=y,y=y+32|0,h=p+16|0,c=p+4|0,s=p+8|0,o=p,l=t+52|0,n=(d[l>>0]|0)!=0;e:do if((r|0)==-1)n?r=-1:(r=e[t+48>>2]|0,d[l>>0]=(r|0)!=-1&1);else{a=t+48|0;i:do if(n){switch(d[s>>0]=e[a>>2],n=e[t+36>>2]|0,Ct[e[(e[n>>2]|0)+12>>2]&15](n,e[t+40>>2]|0,s,s+1|0,o,h,h+8|0,c)|0){case 1:case 2:{r=-1;break e}case 3:{d[h>>0]=e[a>>2],e[c>>2]=h+1;break}default:}for(n=t+32|0;;){if(s=e[c>>2]|0,s>>>0<=h>>>0)break i;if(t=s+-1|0,e[c>>2]=t,(kr(d[t>>0]|0,e[n>>2]|0)|0)==-1){r=-1;break e}}}while(!1);e[a>>2]=r,d[l>>0]=1}while(!1);return y=p,r|0}function L2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0;U=y,y=y+32|0,k=U+16|0,I=U+8|0,p=U+4|0,g=U,o=t+52|0;e:do if(d[o>>0]|0)s=t+48|0,n=e[s>>2]|0,r&&(e[s>>2]=-1,d[o>>0]=0);else{if(n=e[t+44>>2]|0,n=(n|0)>1?n:1,C=t+32|0,(n|0)>0){o=0;do{if(s=Er(e[C>>2]|0)|0,(s|0)==-1){n=-1;break e}d[k+o>>0]=s,o=o+1|0}while((o|0)<(n|0))}i:do if(d[t+53>>0]|0)d[I>>0]=d[k>>0]|0;else{a=t+40|0,c=t+36|0,h=I+1|0;t:for(;;){switch(B=e[a>>2]|0,o=B,s=e[o>>2]|0,o=e[o+4>>2]|0,V=e[c>>2]|0,l=k+n|0,Ct[e[(e[V>>2]|0)+16>>2]&15](V,B,k,l,p,I,h,g)|0){case 2:{n=-1;break e}case 3:break t;case 1:break;default:break i}if(V=e[a>>2]|0,e[V>>2]=s,e[V+4>>2]=o,(n|0)==8){n=-1;break e}if(s=Er(e[C>>2]|0)|0,(s|0)==-1){n=-1;break e}d[l>>0]=s,n=n+1|0}d[I>>0]=d[k>>0]|0}while(!1);if(r)n=d[I>>0]|0,e[t+48>>2]=n&255;else{for(;!((n|0)<=0);)if(n=n+-1|0,(kr(N[k+n>>0]|0,e[C>>2]|0)|0)==-1){n=-1;break e}n=d[I>>0]|0}n=n&255}while(!1);return y=U,n|0}function rA(t){t=t|0}function ur(t){t=t|0,t=t+4|0,e[t>>2]=(e[t>>2]|0)+1}function Ee(t){t=t|0;var r=0,n=0;return n=t+4|0,r=e[n>>2]|0,e[n>>2]=r+-1,r?t=0:(Ce[e[(e[t>>2]|0)+8>>2]&255](t),t=1),t|0}function Xh(t,r){if(t=t|0,r=r|0,e[t>>2]=36868,f=0,h0(86,t+4|0,(d[r>>0]&1?e[r+8>>2]|0:r+1|0)|0),t=f,f=0,t&1)t=b()|0,r0(t|0);else return}function Kh(t,r){if(t=t|0,r=r|0,e[t>>2]=36868,f=0,h0(86,t+4|0,r|0),t=f,f=0,t&1)t=b()|0,r0(t|0);else return}function Wh(t,r){t=t|0,r=r|0;var n=0,s=0;s=Ot(r)|0,n=G0(s+13|0)|0,e[n>>2]=s,e[n+4>>2]=s,e[n+8>>2]=0,n=n+12|0,ti(n|0,r|0,s+1|0)|0,e[t>>2]=n}function Zh(t,r,n){t=t|0,r=r|0,n=n|0,e[t>>2]=n,e[t+4>>2]=r}function Jh(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;return o=y,y=y+16|0,s=o,Rr[e[(e[t>>2]|0)+12>>2]&15](s,t,r),(e[s+4>>2]|0)==(e[n+4>>2]|0)?s=(e[s>>2]|0)==(e[n>>2]|0):s=0,y=o,s|0}function $h(t,r,n){return t=t|0,r=r|0,n=n|0,((e[r>>2]|0)==(n|0)?(e[r+4>>2]|0)==(t|0):0)|0}function e5(t,r,n){t=t|0,r=r|0,n=n|0,r=gn(n)|0,Tt(t,r,Ot(r)|0)}function i5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;a=y,y=y+16|0,l=a,s=e[r>>2]|0;do if(s)if(o=d[n>>0]|0,o&1?o=e[n+4>>2]|0:o=(o&255)>>>1,o&&(h5(n,56990)|0,s=e[r>>2]|0),r=e[r+4>>2]|0,Rr[e[(e[r>>2]|0)+24>>2]&15](l,r,s),r=d[l>>0]|0,o=(r&1)==0,f=0,L0(30,n|0,(o?l+1|0:e[l+8>>2]|0)|0,(o?(r&255)>>>1:e[l+4>>2]|0)|0)|0,r=f,f=0,r&1)a=b()|0,f0(l),r0(a|0);else{f0(l);break}while(!1);e[t>>2]=e[n>>2],e[t+4>>2]=e[n+4>>2],e[t+8>>2]=e[n+8>>2],e[n>>2]=0,e[n+4>>2]=0,e[n+8>>2]=0,y=a}function t5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;o=y,y=y+32|0,s=o+12|0,l=o,Tt(l,n,Ot(n)|0),f=0,m0(10,s|0,r|0,l|0),n=f,f=0;do if(n&1)s=b()|0;else if(f=0,h0(87,t|0,s|0),n=f,f=0,n&1){o=b()|0,f0(s),s=o;break}else{f0(s),f0(l),e[t>>2]=42664,n=e[r+4>>2]|0,l=t+8|0,e[l>>2]=e[r>>2],e[l+4>>2]=n,y=o;return}while(!1);f0(l),r0(s|0)}function r5(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0;l=y,y=y+48|0,o=l+24|0,c=l+16|0,a=l,e[c>>2]=r,e[c+4>>2]=n,l1(a,s),f=0,m0(10,o|0,c|0,a|0),s=f,f=0;do if(s&1)o=b()|0;else if(f=0,h0(87,t|0,o|0),c=f,f=0,c&1){c=b()|0,f0(o),o=c;break}else{f0(o),f0(a),e[t>>2]=42664,e[t+8>>2]=r,e[t+12>>2]=n,y=l;return}while(!1);f0(a),r0(o|0)}function n5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;o=y,y=y+48|0,s=o+24|0,a=o+16|0,l=o,e[a>>2]=r,e[a+4>>2]=n,Tt(l,58898,0),f=0,m0(10,s|0,a|0,l|0),a=f,f=0;do if(a&1)s=b()|0;else if(f=0,h0(87,t|0,s|0),a=f,f=0,a&1){a=b()|0,f0(s),s=a;break}else{f0(s),f0(l),e[t>>2]=42664,e[t+8>>2]=r,e[t+12>>2]=n,y=o;return}while(!1);f0(l),r0(s|0)}function o1(t){t=t|0,Tr(t)}function s5(t){t=t|0,Tr(t),a0(t)}function o5(t){t=t|0}function l5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if(B1(42676)|0,(e[t>>2]|0)==1)do Qi(42704,42676)|0;while((e[t>>2]|0)==1);do if(e[t>>2]|0)L1(42676)|0;else{if(e[t>>2]=1,f=0,u0(72,42676)|0,s=f,f=0,!(s&1)&&(f=0,n0(n|0,r|0),s=f,f=0,!(s&1))&&(f=0,u0(73,42676)|0,s=f,f=0,!(s&1))&&(e[t>>2]=-1,f=0,u0(72,42676)|0,s=f,f=0,!(s&1))&&(f=0,u0(74,42704)|0,s=f,f=0,!(s&1)))break;s=b(0)|0,zi(s|0)|0,f=0,u0(73,42676)|0,s=f,f=0,!(s&1)&&(e[t>>2]=0,f=0,u0(72,42676)|0,s=f,f=0,!(s&1))&&(f=0,u0(74,42704)|0,s=f,f=0,!(s&1))&&(f=0,we(5),f=0),r=b()|0,f=0,we(3),s=f,f=0,s&1?(s=b(0)|0,Ie(s)):r0(r|0)}while(!1)}function l1(t,r){t=t|0,r=r|0,d[r>>0]&1?Tt(t,e[r+8>>2]|0,e[r+4>>2]|0):(e[t>>2]=e[r>>2],e[t+4>>2]=e[r+4>>2],e[t+8>>2]=e[r+8>>2])}function Tt(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;n>>>0>4294967279&&tt(t),n>>>0<11?(d[t>>0]=n<<1,t=t+1|0):(o=n+16&-16,s=G0(o)|0,e[t+8>>2]=s,e[t>>2]=o|1,e[t+4>>2]=n,t=s),ti(t|0,r|0,n|0)|0,d[t+n>>0]=0}function a1(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;r>>>0>4294967279&&tt(t),r>>>0<11?(d[t>>0]=r<<1,t=t+1|0):(o=r+16&-16,s=G0(o)|0,e[t+8>>2]=s,e[t>>2]=o|1,e[t+4>>2]=r,t=s),je(t|0,n|0,r|0)|0,d[t+r>>0]=0}function f0(t){t=t|0,d[t>>0]&1&&a0(e[t+8>>2]|0)}function a5(t,r){t=t|0,r=r|0;var n=0,s=0;return(t|0)!=(r|0)&&(n=d[r>>0]|0,s=(n&1)==0,U2(t,s?r+1|0:e[r+8>>2]|0,s?(n&255)>>>1:e[r+4>>2]|0)|0),t|0}function f5(t,r){return t=t|0,r=r|0,U2(t,r,Ot(r)|0)|0}function U2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;s=d[t>>0]|0,s&1?(s=e[t>>2]|0,l=(s&-2)+-1|0,s=s&255):l=10,o=(s&1)==0;do if(l>>>0>=n>>>0)if(o?s=t+1|0:s=e[t+8>>2]|0,gr(s|0,r|0,n|0)|0,d[s+n>>0]=0,d[t>>0]&1){e[t+4>>2]=n;break}else{d[t>>0]=n<<1;break}else o?s=(s&255)>>>1:s=e[t+4>>2]|0,B2(t,l,n-l|0,s,0,s,n,r);while(!1);return t|0}function O2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;s=d[t>>0]|0,o=(s&1)==0,o?s=(s&255)>>>1:s=e[t+4>>2]|0;do if(s>>>0>=r>>>0)if(o){d[t+1+r>>0]=0,d[t>>0]=r<<1;break}else{d[(e[t+8>>2]|0)+r>>0]=0,e[t+4>>2]=r;break}else u5(t,r-s|0,n)|0;while(!1)}function u5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;return r&&(s=d[t>>0]|0,s&1?(s=e[t>>2]|0,o=(s&-2)+-1|0,s=s&255):o=10,s&1?l=e[t+4>>2]|0:l=(s&255)>>>1,(o-l|0)>>>0>>0&&(f1(t,o,r-o+l|0,l,l,0,0),s=d[t>>0]|0),s&1?o=e[t+8>>2]|0:o=t+1|0,je(o+l|0,n|0,r|0)|0,s=l+r|0,d[t>>0]&1?e[t+4>>2]=s:d[t>>0]=s<<1,d[o+s>>0]=0),t|0}function c5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;r>>>0>4294967279&&tt(t),n=d[t>>0]|0,n&1?(n=e[t>>2]|0,s=(n&-2)+-1|0,n=n&255):s=10,n&1?c=e[t+4>>2]|0:c=(n&255)>>>1,r=c>>>0>r>>>0?c:r,r>>>0<11?a=10:a=(r+16&-16)+-1|0;e:do if((a|0)!=(s|0)){do if((a|0)!=10){if(r=a+1|0,a>>>0<=s>>>0){if(f=0,r=u0(67,r|0)|0,l=f,f=0,l&1){t=b(0)|0,zi(t|0)|0,Wi();break e}}else r=G0(r)|0;if(n&1){s=1,o=e[t+8>>2]|0,l=1;break}else{s=1,o=t+1|0,l=0;break}}else r=t+1|0,s=0,o=e[t+8>>2]|0,l=1;while(!1);if(n&1?n=e[t+4>>2]|0:n=(n&255)>>>1,ti(r|0,o|0,n+1|0)|0,l&&a0(o),s){e[t>>2]=a+1|1,e[t+4>>2]=c,e[t+8>>2]=r;break}else{d[t>>0]=c<<1;break}}while(!1)}function h5(t,r){return t=t|0,r=r|0,N2(t,r,Ot(r)|0)|0}function m5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;n=d[t>>0]|0,s=(n&1)!=0,s?(o=(e[t>>2]&-2)+-1|0,l=e[t+4>>2]|0):(o=10,l=(n&255)>>>1),(l|0)==(o|0)?(f1(t,o,1,o,o,0,0),d[t>>0]&1?o=8:o=7):s?o=8:o=7,(o|0)==7?(d[t>>0]=(l<<1)+2,n=t+1|0,s=l+1|0):(o|0)==8&&(n=e[t+8>>2]|0,s=l+1|0,e[t+4>>2]=s),d[n+l>>0]=r,d[n+s>>0]=0}function N2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;return s=d[t>>0]|0,s&1?(s=e[t>>2]|0,o=(s&-2)+-1|0,s=s&255):o=10,s&1?l=e[t+4>>2]|0:l=(s&255)>>>1,(o-l|0)>>>0>=n>>>0?n&&(s&1?o=e[t+8>>2]|0:o=t+1|0,ti(o+l|0,r|0,n|0)|0,s=l+n|0,d[t>>0]&1?e[t+4>>2]=s:d[t>>0]=s<<1,d[o+s>>0]=0):B2(t,o,n-o+l|0,l,l,0,n,r),t|0}function B2(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0;(-18-r|0)>>>0>>0&&tt(t),d[t>>0]&1?g=e[t+8>>2]|0:g=t+1|0,r>>>0<2147483623?(h=n+r|0,p=r<<1,h=h>>>0

>>0?p:h,h=h>>>0<11?11:h+16&-16):h=-17,p=G0(h)|0,o&&ti(p|0,g|0,o|0)|0,a&&ti(p+o|0,c|0,a|0)|0,n=s-l|0,(n|0)!=(o|0)&&ti(p+(a+o)|0,g+(l+o)|0,n-o|0)|0,(r|0)!=10&&a0(g),e[t+8>>2]=p,e[t>>2]=h|1,r=n+a|0,e[t+4>>2]=r,d[p+r>>0]=0}function f1(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0;(-17-r|0)>>>0>>0&&tt(t),d[t>>0]&1?p=e[t+8>>2]|0:p=t+1|0,r>>>0<2147483623?(c=n+r|0,h=r<<1,c=c>>>0>>0?h:c,c=c>>>0<11?11:c+16&-16):c=-17,h=G0(c)|0,o&&ti(h|0,p|0,o|0)|0,n=s-l|0,(n|0)!=(o|0)&&ti(h+(a+o)|0,p+(l+o)|0,n-o|0)|0,(r|0)!=10&&a0(p),e[t+8>>2]=h,e[t>>2]=c|1}function u1(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;n>>>0>1073741807&&tt(t),n>>>0<2?(d[t>>0]=n<<1,t=t+4|0):(o=n+4&-4,s=G0(o<<2)|0,e[t+8>>2]=s,e[t>>2]=o|1,e[t+4>>2]=n,t=s),Nt(t,r,n)|0,e[t+(n<<2)>>2]=0}function c1(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;r>>>0>1073741807&&tt(t),r>>>0<2?(d[t>>0]=r<<1,t=t+4|0):(o=r+4&-4,s=G0(o<<2)|0,e[t+8>>2]=s,e[t>>2]=o|1,e[t+4>>2]=r,t=s),Rp(t,n,r)|0,e[t+(r<<2)>>2]=0}function ye(t){t=t|0,d[t>>0]&1&&a0(e[t+8>>2]|0)}function d5(t,r){return t=t|0,r=r|0,g5(t,r,Mr(r)|0)|0}function g5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;s=d[t>>0]|0,s&1?(s=e[t>>2]|0,l=(s&-2)+-1|0,s=s&255):l=1,o=(s&1)==0;do if(l>>>0>=n>>>0)if(o?s=t+4|0:s=e[t+8>>2]|0,_p(s,r,n)|0,e[s+(n<<2)>>2]=0,d[t>>0]&1){e[t+4>>2]=n;break}else{d[t>>0]=n<<1;break}else o?s=(s&255)>>>1:s=e[t+4>>2]|0,S5(t,l,n-l|0,s,0,s,n,r);while(!1);return t|0}function p5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;r>>>0>1073741807&&tt(t),n=d[t>>0]|0,n&1?(n=e[t>>2]|0,s=(n&-2)+-1|0,n=n&255):s=1,n&1?c=e[t+4>>2]|0:c=(n&255)>>>1,r=c>>>0>r>>>0?c:r,r>>>0<2?a=1:a=(r+4&-4)+-1|0;e:do if((a|0)!=(s|0)){do if((a|0)!=1){if(r=(a<<2)+4|0,a>>>0<=s>>>0){if(f=0,r=u0(67,r|0)|0,l=f,f=0,l&1){t=b(0)|0,zi(t|0)|0,Wi();break e}}else r=G0(r)|0;if(n&1){s=1,o=e[t+8>>2]|0,l=1;break}else{s=1,o=t+4|0,l=0;break}}else r=t+4|0,s=0,o=e[t+8>>2]|0,l=1;while(!1);if(n&1?n=e[t+4>>2]|0:n=(n&255)>>>1,Nt(r,o,n+1|0)|0,l&&a0(o),s){e[t>>2]=a+1|1,e[t+4>>2]=c,e[t+8>>2]=r;break}else{d[t>>0]=c<<1;break}}while(!1)}function A5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;n=d[t>>0]|0,s=(n&1)!=0,s?(o=(e[t>>2]&-2)+-1|0,l=e[t+4>>2]|0):(o=1,l=(n&255)>>>1),(l|0)==(o|0)?(V2(t,o,1,o,o,0,0),d[t>>0]&1?o=8:o=7):s?o=8:o=7,(o|0)==7?(d[t>>0]=(l<<1)+2,n=t+4|0,s=l+1|0):(o|0)==8&&(n=e[t+8>>2]|0,s=l+1|0,e[t+4>>2]=s),e[n+(l<<2)>>2]=r,e[n+(s<<2)>>2]=0}function S5(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0;(1073741806-r|0)>>>0>>0&&tt(t),d[t>>0]&1?g=e[t+8>>2]|0:g=t+4|0,r>>>0<536870887?(h=n+r|0,p=r<<1,h=h>>>0

>>0?p:h,h=h>>>0<2?2:h+4&-4):h=1073741807,p=G0(h<<2)|0,o&&Nt(p,g,o)|0,a&&Nt(p+(o<<2)|0,c,a)|0,n=s-l|0,(n|0)!=(o|0)&&Nt(p+(a+o<<2)|0,g+(l+o<<2)|0,n-o|0)|0,(r|0)!=1&&a0(g),e[t+8>>2]=p,e[t>>2]=h|1,r=n+a|0,e[t+4>>2]=r,e[p+(r<<2)>>2]=0}function V2(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0;(1073741807-r|0)>>>0>>0&&tt(t),d[t>>0]&1?p=e[t+8>>2]|0:p=t+4|0,r>>>0<536870887?(c=n+r|0,h=r<<1,c=c>>>0>>0?h:c,c=c>>>0<2?2:c+4&-4):c=1073741807,h=G0(c<<2)|0,o&&Nt(h,p,o)|0,n=s-l|0,(n|0)!=(o|0)&&Nt(h+(a+o<<2)|0,p+(l+o<<2)|0,n-o|0)|0,(r|0)!=1&&a0(p),e[t+8>>2]=h,e[t>>2]=c|1}function v5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;if(o=r,s=n-o|0,s>>>0>4294967279&&tt(t),s>>>0<11?(d[t>>0]=s<<1,l=t+1|0):(a=s+16&-16,l=G0(a)|0,e[t+8>>2]=l,e[t>>2]=a|1,e[t+4>>2]=s),t=n-o|0,(r|0)!=(n|0))for(s=l;d[s>>0]=d[r>>0]|0,r=r+1|0,(r|0)!=(n|0);)s=s+1|0;d[l+t>>0]=0}function w5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;if(l=r,s=n-l|0,o=s>>2,o>>>0>1073741807&&tt(t),o>>>0<2?(d[t>>0]=s>>>1,t=t+4|0):(a=o+4&-4,s=G0(a<<2)|0,e[t+8>>2]=s,e[t>>2]=a|1,e[t+4>>2]=o,t=s),o=(n-l|0)>>>2,(r|0)!=(n|0))for(s=t;e[s>>2]=e[r>>2],r=r+4|0,(r|0)!=(n|0);)s=s+4|0;e[t+(o<<2)>>2]=0}function T5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;if(n=y,y=y+16|0,s=n,o=(e[t+24>>2]|0)==0,e[t+16>>2]=o&1|r,!((o&1|r)&e[t+20>>2])){y=n;return}r=de(16)|0,g3()|0,e[s>>2]=1,e[s+4>>2]=43112,f=0,m0(11,r|0,57437,s|0),o=f,f=0,o&1?(o=b()|0,ge(r|0),r0(o|0)):Be(r|0,864,112)}function Vi(t){t=t|0;var r=0;if(e[t>>2]=43068,f=0,h0(88,t|0,0),r=f,f=0,r&1)r=b(0)|0,Ie(r);else{Mi(t+28|0),Ze(e[t+32>>2]|0),Ze(e[t+36>>2]|0),Ze(e[t+48>>2]|0),Ze(e[t+60>>2]|0);return}}function H0(t){t=t|0,Vi(t)}function nA(t){t=t|0,Vi(t),a0(t)}function C5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;if(n=e[t+40>>2]|0,s=t+32|0,o=t+36|0,n)do n=n+-1|0,Rr[e[(e[s>>2]|0)+(n<<2)>>2]&15](r,t,e[(e[o>>2]|0)+(n<<2)>>2]|0);while(n|0)}function ai(t){t=t|0;var r=0,n=0;return n=y,y=y+16|0,r=n,$t(r,t+28|0),y=n,e[r>>2]|0}function x5(t,r){t=t|0,r=r|0;var n=0;e[t+24>>2]=r,e[t+16>>2]=(r|0)==0&1,e[t+20>>2]=0,e[t+4>>2]=4098,e[t+12>>2]=0,e[t+8>>2]=6,n=t+28|0,r=t+32|0,t=r+40|0;do e[r>>2]=0,r=r+4|0;while((r|0)<(t|0));n1(n)}function cr(t){t=t|0,Vi(t)}function sA(t){t=t|0,Vi(t),a0(t)}function ce(t){t=t|0,e[t>>2]=42760,Mi(t+4|0)}function y5(t){t=t|0,e[t>>2]=42760,Mi(t+4|0),a0(t)}function h1(t){t=t|0,e[t>>2]=42760,n1(t+4|0),t=t+8|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[t+20>>2]=0}function I5(t,r){t=t|0,r=r|0}function D5(t,r,n){return t=t|0,r=r|0,n=n|0,t|0}function E5(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1}function k5(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1}function F5(t){return t=t|0,0}function M5(t){return t=t|0,0}function _5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;l=t+12|0,a=t+16|0;e:do if((n|0)>0)for(o=r,r=0;;){if(s=e[l>>2]|0,s>>>0<(e[a>>2]|0)>>>0)e[l>>2]=s+1,s=d[s>>0]|0;else{if(s=Se[e[(e[t>>2]|0)+40>>2]&127](t)|0,(s|0)==-1)break e;s=s&255}if(d[o>>0]=s,r=r+1|0,(r|0)<(n|0))o=o+1|0;else break}else r=0;while(!1);return r|0}function R5(t){return t=t|0,-1}function P5(t){t=t|0;var r=0;return(Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1?t=-1:(r=t+12|0,t=e[r>>2]|0,e[r>>2]=t+1,t=N[t>>0]|0),t|0}function L5(t,r){return t=t|0,r=r|0,-1}function U5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;l=t+24|0,a=t+28|0;e:do if((n|0)>0)for(o=r,r=0;;){if(s=e[l>>2]|0,s>>>0>=(e[a>>2]|0)>>>0){if((Ni[e[(e[t>>2]|0)+52>>2]&63](t,N[o>>0]|0)|0)==-1)break e}else c=d[o>>0]|0,e[l>>2]=s+1,d[s>>0]=c;if(r=r+1|0,(r|0)<(n|0))o=o+1|0;else break}else r=0;while(!1);return r|0}function O5(t,r){return t=t|0,r=r|0,-1}function ir(t){t=t|0,e[t>>2]=42824,Mi(t+4|0)}function N5(t){t=t|0,e[t>>2]=42824,Mi(t+4|0),a0(t)}function q2(t){t=t|0,e[t>>2]=42824,n1(t+4|0),t=t+8|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[t+20>>2]=0}function B5(t,r){t=t|0,r=r|0}function V5(t,r,n){return t=t|0,r=r|0,n=n|0,t|0}function q5(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1}function b5(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,r=t,e[r>>2]=0,e[r+4>>2]=0,r=t+8|0,e[r>>2]=-1,e[r+4>>2]=-1}function G5(t){return t=t|0,0}function Q5(t){return t=t|0,0}function z5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;l=t+12|0,a=t+16|0;e:do if((n|0)>0)for(o=r,r=0;;){if(s=e[l>>2]|0,s>>>0>=(e[a>>2]|0)>>>0){if(s=Se[e[(e[t>>2]|0)+40>>2]&127](t)|0,(s|0)==-1)break e}else e[l>>2]=s+4,s=e[s>>2]|0;if(e[o>>2]=s,r=r+1|0,(r|0)<(n|0))o=o+4|0;else break}else r=0;while(!1);return r|0}function H5(t){return t=t|0,-1}function Y5(t){t=t|0;var r=0;return(Se[e[(e[t>>2]|0)+36>>2]&127](t)|0)==-1?t=-1:(r=t+12|0,t=e[r>>2]|0,e[r>>2]=t+4,t=e[t>>2]|0),t|0}function j5(t,r){return t=t|0,r=r|0,-1}function X5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;l=t+24|0,a=t+28|0;e:do if((n|0)>0)for(o=r,r=0;;){if(s=e[l>>2]|0,s>>>0>=(e[a>>2]|0)>>>0){if((Ni[e[(e[t>>2]|0)+52>>2]&63](t,e[o>>2]|0)|0)==-1)break e}else c=e[o>>2]|0,e[l>>2]=s+4,e[s>>2]=c;if(r=r+1|0,(r|0)<(n|0))o=o+4|0;else break}else r=0;while(!1);return r|0}function K5(t,r){return t=t|0,r=r|0,-1}function W5(t){t=t|0,Vi(t+8|0)}function Z5(t){t=t|0,Vi(t+((e[(e[t>>2]|0)+-12>>2]|0)+8)|0)}function G2(t){t=t|0,Vi(t+8|0),a0(t)}function J5(t){t=t|0,G2(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)}function Q2(t){t=t|0;var r=0,n=0,s=0,o=0;s=y,y=y+16|0,n=s;e:do if(e[t+((e[(e[t>>2]|0)+-12>>2]|0)+24)>>2]|0){f=0,h0(65,n|0,t|0),r=f,f=0;i:do if(r&1)r=b(0)|0;else{do if(d[n>>0]|0){if(r=e[t+((e[(e[t>>2]|0)+-12>>2]|0)+24)>>2]|0,f=0,r=u0(e[(e[r>>2]|0)+24>>2]|0,r|0)|0,o=f,f=0,!(o&1)&&((r|0)!=-1||(o=e[(e[t>>2]|0)+-12>>2]|0,f=0,h0(66,t+o|0,e[t+(o+16)>>2]|1|0),o=f,f=0,!(o&1))))break;r=b(0)|0,yt(n);break i}while(!1);yt(n);break e}while(!1);if(zi(r|0)|0,f=0,n0(181,t+(e[(e[t>>2]|0)+-12>>2]|0)|0),o=f,f=0,!(o&1)){Wi();break}r=b()|0,f=0,we(3),o=f,f=0,o&1?(o=b(0)|0,Ie(o)):r0(r|0)}while(!1);return y=s,t|0}function $5(t){t=t|0;var r=0;if(r=t+16|0,e[r>>2]=e[r>>2]|1,e[t+20>>2]&1)O1();else return}function e3(t){t=t|0,Vi(t+8|0)}function i3(t){t=t|0,Vi(t+((e[(e[t>>2]|0)+-12>>2]|0)+8)|0)}function z2(t){t=t|0,Vi(t+8|0),a0(t)}function t3(t){t=t|0,z2(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)}function H2(t){t=t|0;var r=0,n=0,s=0,o=0;s=y,y=y+16|0,n=s;e:do if(e[t+((e[(e[t>>2]|0)+-12>>2]|0)+24)>>2]|0){f=0,h0(89,n|0,t|0),r=f,f=0;i:do if(r&1)r=b(0)|0;else{do if(d[n>>0]|0){if(r=e[t+((e[(e[t>>2]|0)+-12>>2]|0)+24)>>2]|0,f=0,r=u0(e[(e[r>>2]|0)+24>>2]|0,r|0)|0,o=f,f=0,!(o&1)&&((r|0)!=-1||(o=e[(e[t>>2]|0)+-12>>2]|0,f=0,h0(66,t+o|0,e[t+(o+16)>>2]|1|0),o=f,f=0,!(o&1))))break;r=b(0)|0,X2(n);break i}while(!1);X2(n);break e}while(!1);if(zi(r|0)|0,f=0,n0(181,t+(e[(e[t>>2]|0)+-12>>2]|0)|0),o=f,f=0,!(o&1)){Wi();break}r=b()|0,f=0,we(3),o=f,f=0,o&1?(o=b(0)|0,Ie(o)):r0(r|0)}while(!1);return y=s,t|0}function oA(t,r){t=t|0,r=r|0}function r3(t){t=t|0,Vi(t+4|0)}function n3(t){t=t|0,Vi(t+((e[(e[t>>2]|0)+-12>>2]|0)+4)|0)}function Y2(t){t=t|0,Vi(t+4|0),a0(t)}function s3(t){t=t|0,Y2(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)}function o3(t,r){t=t|0,r=r|0;var n=0;d[t>>0]=0,e[t+4>>2]=r,n=e[(e[r>>2]|0)+-12>>2]|0,e[r+(n+16)>>2]|0||(n=e[r+(n+72)>>2]|0,n&&Q2(n)|0,d[t>>0]=1)}function yt(t){t=t|0;var r=0,n=0;t=t+4|0,n=e[t>>2]|0,r=e[(e[n>>2]|0)+-12>>2]|0;do if(e[n+(r+24)>>2]|0&&!(e[n+(r+16)>>2]|0)&&e[n+(r+4)>>2]&8192|0&&!(R1()|0)){if(r=e[t>>2]|0,r=e[r+((e[(e[r>>2]|0)+-12>>2]|0)+24)>>2]|0,f=0,r=u0(e[(e[r>>2]|0)+24>>2]|0,r|0)|0,n=f,f=0,!(n&1)&&((r|0)!=-1||(r=e[t>>2]|0,n=e[(e[r>>2]|0)+-12>>2]|0,f=0,h0(66,r+n|0,e[r+(n+16)>>2]|1|0),n=f,f=0,!(n&1))))break;n=b(0)|0,zi(n|0)|0,f=0,we(3),n=f,f=0,n&1&&(n=b(0)|0,Ie(n))}while(!1)}function l3(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;I=y,y=y+32|0,c=I+20|0,h=I+16|0,g=I+8|0,n=I,f=0,h0(65,g|0,t|0),p=f,f=0;e:do if(p&1)n=b(0)|0,s=t,o=t,C=19;else{do if(d[g>>0]|0){if(p=ai(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)|0,e[n>>2]=p,f=0,p=y0(37,n|0,43392)|0,a=f,f=0,a&1)C=b(0)|0,Mi(n),n=C;else{Mi(n),o=e[(e[t>>2]|0)+-12>>2]|0,a=e[t+(o+24)>>2]|0,s=t+o|0,o=t+(o+76)|0,n=e[o>>2]|0;do if((n|0)==-1){if(n=ai(s)|0,e[c>>2]=n,f=0,n=y0(37,c|0,44220)|0,k=f,f=0,!(k&1)&&(f=0,l=y0(e[(e[n>>2]|0)+28>>2]|0,n|0,32)|0,k=f,f=0,!(k&1))){Mi(c),n=l<<24>>24,e[o>>2]=n,C=10;break}n=b(0)|0,Mi(c)}else C=10;while(!1);if((C|0)==10){if(k=e[(e[p>>2]|0)+16>>2]|0,e[h>>2]=a,f=0,e[c>>2]=e[h>>2],n=$(k|0,p|0,c|0,s|0,n&255|0,r|0)|0,k=f,f=0,!(k&1)&&(n||(k=e[(e[t>>2]|0)+-12>>2]|0,f=0,h0(66,t+k|0,e[t+(k+16)>>2]|5|0),k=f,f=0,!(k&1))))break;n=b(0)|0}}yt(g),s=t,o=t,C=19;break e}while(!1);yt(g)}while(!1);do if((C|0)==19){if(zi(n|0)|0,f=0,n0(181,s+(e[(e[o>>2]|0)+-12>>2]|0)|0),k=f,f=0,!(k&1)){Wi();break}n=b()|0,f=0,we(3),k=f,f=0,k&1?(k=b(0)|0,Ie(k)):r0(n|0)}while(!1);return y=I,t|0}function a3(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;I=y,y=y+32|0,c=I+20|0,h=I+16|0,g=I+8|0,n=I,f=0,h0(65,g|0,t|0),p=f,f=0;e:do if(p&1)n=b(0)|0,s=t,o=t,C=19;else{do if(d[g>>0]|0){if(p=ai(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)|0,e[n>>2]=p,f=0,p=y0(37,n|0,43392)|0,a=f,f=0,a&1)C=b(0)|0,Mi(n),n=C;else{Mi(n),o=e[(e[t>>2]|0)+-12>>2]|0,a=e[t+(o+24)>>2]|0,s=t+o|0,o=t+(o+76)|0,n=e[o>>2]|0;do if((n|0)==-1){if(n=ai(s)|0,e[c>>2]=n,f=0,n=y0(37,c|0,44220)|0,k=f,f=0,!(k&1)&&(f=0,l=y0(e[(e[n>>2]|0)+28>>2]|0,n|0,32)|0,k=f,f=0,!(k&1))){Mi(c),n=l<<24>>24,e[o>>2]=n,C=10;break}n=b(0)|0,Mi(c)}else C=10;while(!1);if((C|0)==10){if(k=e[(e[p>>2]|0)+24>>2]|0,e[h>>2]=a,f=0,e[c>>2]=e[h>>2],n=$(k|0,p|0,c|0,s|0,n&255|0,r|0)|0,k=f,f=0,!(k&1)&&(n||(k=e[(e[t>>2]|0)+-12>>2]|0,f=0,h0(66,t+k|0,e[t+(k+16)>>2]|5|0),k=f,f=0,!(k&1))))break;n=b(0)|0}}yt(g),s=t,o=t,C=19;break e}while(!1);yt(g)}while(!1);do if((C|0)==19){if(zi(n|0)|0,f=0,n0(181,s+(e[(e[o>>2]|0)+-12>>2]|0)|0),k=f,f=0,!(k&1)){Wi();break}n=b()|0,f=0,we(3),k=f,f=0,k&1?(k=b(0)|0,Ie(k)):r0(n|0)}while(!1);return y=I,t|0}function f3(t){t=t|0,Vi(t+4|0)}function u3(t){t=t|0,Vi(t+((e[(e[t>>2]|0)+-12>>2]|0)+4)|0)}function j2(t){t=t|0,Vi(t+4|0),a0(t)}function c3(t){t=t|0,j2(t+(e[(e[t>>2]|0)+-12>>2]|0)|0)}function h3(t,r){t=t|0,r=r|0;var n=0;d[t>>0]=0,e[t+4>>2]=r,n=e[(e[r>>2]|0)+-12>>2]|0,e[r+(n+16)>>2]|0||(n=e[r+(n+72)>>2]|0,n&&H2(n)|0,d[t>>0]=1)}function X2(t){t=t|0;var r=0,n=0;t=t+4|0,n=e[t>>2]|0,r=e[(e[n>>2]|0)+-12>>2]|0;do if(e[n+(r+24)>>2]|0&&!(e[n+(r+16)>>2]|0)&&e[n+(r+4)>>2]&8192|0&&!(R1()|0)){if(r=e[t>>2]|0,r=e[r+((e[(e[r>>2]|0)+-12>>2]|0)+24)>>2]|0,f=0,r=u0(e[(e[r>>2]|0)+24>>2]|0,r|0)|0,n=f,f=0,!(n&1)&&((r|0)!=-1||(r=e[t>>2]|0,n=e[(e[r>>2]|0)+-12>>2]|0,f=0,h0(66,r+n|0,e[r+(n+16)>>2]|1|0),n=f,f=0,!(n&1))))break;n=b(0)|0,zi(n|0)|0,f=0,we(3),n=f,f=0,n&1&&(n=b(0)|0,Ie(n))}while(!1)}function m3(t){return t=t|0,57453}function d3(t,r,n){t=t|0,r=r|0,n=n|0,(n|0)!=1&(n|0)<257?e5(t,r,n):Tt(t,57462,35)}function g3(){return!(d[1048]|0)&&Ae(1048)|0&&(e[10778]=43084,Te(72,43112,Q|0)|0,ve(1048)),43112}function p3(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;s=y,y=y+16|0,o=s+8|0,l=s,c=n,a=e[c+4>>2]|0,n=l,e[n>>2]=e[c>>2],e[n+4>>2]=a,e[o>>2]=e[l>>2],e[o+4>>2]=e[l+4>>2],t5(t,o,r),e[t>>2]=43048,y=s}function A3(t){t=t|0,o1(t)}function S3(t){t=t|0,o1(t),a0(t)}function v3(t){t=t|0,Vi(t),a0(t)}function w3(t){t=t|0,a0(t)}function T3(t){t=t|0}function C3(t){t=t|0}function x3(t){t=t|0,a0(t)}function y3(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;e:do if((s|0)==(o|0))a=6;else for(;;){if((r|0)==(n|0)){r=-1;break e}if(t=d[r>>0]|0,l=d[s>>0]|0,t<<24>>24>24){r=-1;break e}if(l<<24>>24>24){r=1;break e}if(r=r+1|0,s=s+1|0,(s|0)==(o|0)){a=6;break}}while(!1);return(a|0)==6&&(r=(r|0)!=(n|0)&1),r|0}function I3(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,v5(t,n,s)}function D3(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if((r|0)==(n|0))t=0;else{t=0;do t=(d[r>>0]|0)+(t<<4)|0,s=t&-268435456,t=(s>>>24|s)^t,r=r+1|0;while((r|0)!=(n|0))}return t|0}function E3(t){t=t|0}function k3(t){t=t|0,a0(t)}function F3(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;e:do if((s|0)==(o|0))a=6;else for(;;){if((r|0)==(n|0)){r=-1;break e}if(t=e[r>>2]|0,l=e[s>>2]|0,(t|0)<(l|0)){r=-1;break e}if((l|0)<(t|0)){r=1;break e}if(r=r+4|0,s=s+4|0,(s|0)==(o|0)){a=6;break}}while(!1);return(a|0)==6&&(r=(r|0)!=(n|0)&1),r|0}function M3(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,w5(t,n,s)}function _3(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if((r|0)==(n|0))t=0;else{t=0;do t=(e[r>>2]|0)+(t<<4)|0,s=t&-268435456,t=(s>>>24|s)^t,r=r+4|0;while((r|0)!=(n|0))}return t|0}function R3(t){t=t|0}function P3(t){t=t|0,a0(t)}function L3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;U=y,y=y+64|0,I=U+56|0,a=U+52|0,g=U+48|0,c=U+44|0,h=U+40|0,p=U+36|0,C=U+32|0,B=U+8|0,k=U;e:do if(e[s+4>>2]&1){a=ai(s)|0,e[p>>2]=a,f=0,t=y0(37,p|0,44220)|0,g=f,f=0;do if(g&1)B=b()|0,Ee(a)|0,a=B;else{if(Ee(a)|0,a=ai(s)|0,e[C>>2]=a,f=0,h=y0(37,C|0,44360)|0,C=f,f=0,C&1){B=b()|0,Ee(a)|0,a=B;break}if(Ee(a)|0,f=0,h0(e[(e[h>>2]|0)+24>>2]|0,B|0,h|0),C=f,f=0,C&1)c=B;else if(c=B+12|0,f=0,h0(e[(e[h>>2]|0)+28>>2]|0,c|0,h|0),C=f,f=0,!(C&1))if(e[k>>2]=e[n>>2],f=0,e[I>>2]=e[k>>2],a=ue(7,r|0,I|0,B|0,B+24|0,t|0,o|0,1)|0,o=f,f=0,o&1){a=b()|0,f0(B+12|0),f0(B);break}else{d[l>>0]=(a|0)==(B|0)&1,a=e[r>>2]|0,f0(B+12|0),f0(B);break e}if(a=b()|0,h=I0,(B|0)!=(c|0))do c=c+-12|0,f0(c);while((c|0)!=(B|0))}while(!1);r0(a|0)}else switch(e[g>>2]=-1,B=e[(e[t>>2]|0)+16>>2]|0,e[c>>2]=e[r>>2],e[h>>2]=e[n>>2],e[a>>2]=e[c>>2],e[I>>2]=e[h>>2],a=rr[B&63](t,a,I,s,o,g)|0,e[r>>2]=a,e[g>>2]|0){case 0:{d[l>>0]=0;break e}case 1:{d[l>>0]=1;break e}default:{d[l>>0]=1,e[o>>2]=4;break e}}while(!1);return y=U,a|0}function U3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Tm(t,h,c,s,o,l)|0,y=a,t|0}function O3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Cm(t,h,c,s,o,l)|0,y=a,t|0}function N3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=xm(t,h,c,s,o,l)|0,y=a,t|0}function B3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=ym(t,h,c,s,o,l)|0,y=a,t|0}function V3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Im(t,h,c,s,o,l)|0,y=a,t|0}function q3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Dm(t,h,c,s,o,l)|0,y=a,t|0}function b3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Em(t,h,c,s,o,l)|0,y=a,t|0}function G3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=km(t,h,c,s,o,l)|0,y=a,t|0}function Q3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Fm(t,h,c,s,o,l)|0,y=a,t|0}function z3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0;t0=y,y=y+240|0,_=t0,k=t0+208|0,s0=t0+32|0,t=t0+28|0,Z=t0+16|0,O=t0+12|0,B=t0+48|0,V=t0+8|0,U=t0+4|0,e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,f=0,s=u0(68,s|0)|0,I=f,f=0;do if(I&1)t=b()|0;else{if(e[t>>2]=s,f=0,t=y0(37,t|0,44220)|0,I=f,f=0,!(I&1)&&(f=0,k0(e[(e[t>>2]|0)+32>>2]|0,t|0,57498,57524,k|0)|0,I=f,f=0,!(I&1))){Ee(s)|0,e[Z>>2]=0,e[Z+4>>2]=0,e[Z+8>>2]=0,d[Z>>0]&1?t=(e[Z>>2]&-2)+-1|0:t=10,f=0,m0(8,Z|0,t|0,0),I=f,f=0;e:do if(I&1)w0=30;else{C=Z+8|0,I=Z+1|0,s=d[Z>>0]&1?e[C>>2]|0:I,e[O>>2]=s,e[V>>2]=B,e[U>>2]=0,g=Z+4|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,p=f,f=0,p&1){w0=29;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;c=(t|0)==0,a=e[n>>2]|0;do if(a){if((e[a+12>>2]|0)!=(e[a+16>>2]|0)){if(c)break;break i}if(f=0,h=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){w0=29;break i}if((h|0)!=-1){if(c)break;break i}else{e[n>>2]=0,w0=19;break}}else w0=19;while(!1);if((w0|0)==19)if(w0=0,c){a=0;break}else a=0;if(c=d[Z>>0]|0,c=c&1?e[g>>2]|0:(c&255)>>>1,(e[O>>2]|0)==(s+c|0)){if(f=0,m0(8,Z|0,c<<1|0,0),p=f,f=0,p&1){w0=29;break}if(d[Z>>0]&1?s=(e[Z>>2]&-2)+-1|0:s=10,f=0,m0(8,Z|0,s|0,0),p=f,f=0,p&1){w0=29;break}s=d[Z>>0]&1?e[C>>2]|0:I,e[O>>2]=s+c}if(h=t+12|0,c=e[h>>2]|0,p=t+16|0,(c|0)==(e[p>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,v0=f,f=0,v0&1){w0=29;break}}else c=N[c>>0]|0;if(Rt(c&255,16,s,O,U,0,s0,B,V,k)|0)break;if(a=e[h>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,v0=f,f=0,v0&1){w0=29;break}else continue;else{e[h>>2]=a+1;continue}}if((w0|0)==29){t=b()|0;break}if(f=0,m0(8,Z|0,(e[O>>2]|0)-s|0,0),v0=f,f=0,!(v0&1)&&(F=d[Z>>0]|0,M=e[C>>2]|0,f=0,X=p0(3)|0,v0=f,f=0,!(v0&1))&&(f=0,e[_>>2]=l,K=k0(16,(F&1?M:I)|0,X|0,58882,_|0)|0,v0=f,f=0,!(v0&1))){if((K|0)!=1&&(e[o>>2]=4),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,v0=f,f=0,v0&1){w0=30;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,v0=f,f=0,v0&1){w0=30;break e}if((t|0)==-1){e[n>>2]=0,w0=55;break}}s||(w0=56)}else w0=55;while(!1);return(w0|0)==55&&s&&(w0=56),(w0|0)==56&&(e[o>>2]=e[o>>2]|2),v0=e[r>>2]|0,f0(Z),f0(s0),y=t0,v0|0}else w0=30}while(!1);(w0|0)==30&&(t=b()|0),f0(Z);break}t=b()|0,Ee(s)|0}while(!1);return f0(s0),r0(t|0),0}function Rt(t,r,n,s,o,l,a,c,h,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0;var g=0,C=0,I=0,k=0;I=e[s>>2]|0,k=(I|0)==(n|0);do if(k){if(g=(d[p+24>>0]|0)==t<<24>>24,!g&&(d[p+25>>0]|0)!=t<<24>>24){C=5;break}e[s>>2]=n+1,d[n>>0]=g?43:45,e[o>>2]=0,g=0}else C=5;while(!1);e:do if((C|0)==5){if(C=d[a>>0]|0,t<<24>>24==l<<24>>24&&(C&1?e[a+4>>2]|0:(C&255)>>>1)|0){if(g=e[h>>2]|0,(g-c|0)>=160){g=0;break}r=e[o>>2]|0,e[h>>2]=g+4,e[g>>2]=r,e[o>>2]=0,g=0;break}for(a=p+26|0,g=p;(d[g>>0]|0)!=t<<24>>24;)if(g=g+1|0,(g|0)==(a|0)){g=a;break}if(g=g-p|0,(g|0)>23)g=-1;else{switch(r|0){case 10:case 8:{if((g|0)>=(r|0)){g=-1;break e}break}case 16:{if((g|0)>=22){if(k){g=-1;break e}if((I-n|0)>=3){g=-1;break e}if((d[I+-1>>0]|0)!=48){g=-1;break e}e[o>>2]=0,g=d[57498+g>>0]|0,e[s>>2]=I+1,d[I>>0]=g,g=0;break e}break}default:}g=d[57498+g>>0]|0,e[s>>2]=I+1,d[I>>0]=g,e[o>>2]=(e[o>>2]|0)+1,g=0}}while(!1);return g|0}function Ii(){var t=0,r=0;do if(!(d[1968]|0)&&Ae(1968)|0)if(f=0,t=L0(31,2147483647,58885,0)|0,r=f,f=0,r&1)r=b()|0,bi(1968),r0(r|0);else{e[11196]=t,ve(1968);break}while(!1);return e[11196]|0}function H3(t){t=t|0}function Y3(t){t=t|0,a0(t)}function j3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;U=y,y=y+64|0,I=U+56|0,a=U+52|0,g=U+48|0,c=U+44|0,h=U+40|0,p=U+36|0,C=U+32|0,B=U+8|0,k=U;e:do if(e[s+4>>2]&1){a=ai(s)|0,e[p>>2]=a,f=0,t=y0(37,p|0,44212)|0,g=f,f=0;do if(g&1)B=b()|0,Ee(a)|0,a=B;else{if(Ee(a)|0,a=ai(s)|0,e[C>>2]=a,f=0,h=y0(37,C|0,44368)|0,C=f,f=0,C&1){B=b()|0,Ee(a)|0,a=B;break}if(Ee(a)|0,f=0,h0(e[(e[h>>2]|0)+24>>2]|0,B|0,h|0),C=f,f=0,C&1)c=B;else if(c=B+12|0,f=0,h0(e[(e[h>>2]|0)+28>>2]|0,c|0,h|0),C=f,f=0,!(C&1))if(e[k>>2]=e[n>>2],f=0,e[I>>2]=e[k>>2],a=ue(8,r|0,I|0,B|0,B+24|0,t|0,o|0,1)|0,o=f,f=0,o&1){a=b()|0,ye(B+12|0),ye(B);break}else{d[l>>0]=(a|0)==(B|0)&1,a=e[r>>2]|0,ye(B+12|0),ye(B);break e}if(a=b()|0,h=I0,(B|0)!=(c|0))do c=c+-12|0,ye(c);while((c|0)!=(B|0))}while(!1);r0(a|0)}else switch(e[g>>2]=-1,B=e[(e[t>>2]|0)+16>>2]|0,e[c>>2]=e[r>>2],e[h>>2]=e[n>>2],e[a>>2]=e[c>>2],e[I>>2]=e[h>>2],a=rr[B&63](t,a,I,s,o,g)|0,e[r>>2]=a,e[g>>2]|0){case 0:{d[l>>0]=0;break e}case 1:{d[l>>0]=1;break e}default:{d[l>>0]=1,e[o>>2]=4;break e}}while(!1);return y=U,a|0}function X3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=_m(t,h,c,s,o,l)|0,y=a,t|0}function K3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Rm(t,h,c,s,o,l)|0,y=a,t|0}function W3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Pm(t,h,c,s,o,l)|0,y=a,t|0}function Z3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Lm(t,h,c,s,o,l)|0,y=a,t|0}function J3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Um(t,h,c,s,o,l)|0,y=a,t|0}function $3(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Om(t,h,c,s,o,l)|0,y=a,t|0}function e6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Nm(t,h,c,s,o,l)|0,y=a,t|0}function i6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Bm(t,h,c,s,o,l)|0,y=a,t|0}function t6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0;return a=y,y=y+16|0,c=a+12|0,h=a+8|0,g=a+4|0,p=a,e[g>>2]=e[r>>2],e[p>>2]=e[n>>2],e[h>>2]=e[g>>2],e[c>>2]=e[p>>2],t=Vm(t,h,c,s,o,l)|0,y=a,t|0}function r6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0;t0=y,y=y+320|0,_=t0,k=t0+208|0,s0=t0+32|0,t=t0+28|0,Z=t0+16|0,O=t0+12|0,B=t0+48|0,V=t0+8|0,U=t0+4|0,e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,f=0,s=u0(68,s|0)|0,I=f,f=0;do if(I&1)t=b()|0;else{if(e[t>>2]=s,f=0,t=y0(37,t|0,44212)|0,I=f,f=0,!(I&1)&&(f=0,k0(e[(e[t>>2]|0)+48>>2]|0,t|0,57498,57524,k|0)|0,I=f,f=0,!(I&1))){Ee(s)|0,e[Z>>2]=0,e[Z+4>>2]=0,e[Z+8>>2]=0,d[Z>>0]&1?t=(e[Z>>2]&-2)+-1|0:t=10,f=0,m0(8,Z|0,t|0,0),I=f,f=0;e:do if(I&1)w0=31;else{C=Z+8|0,I=Z+1|0,t=d[Z>>0]&1?e[C>>2]|0:I,e[O>>2]=t,e[V>>2]=B,e[U>>2]=0,g=Z+4|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){w0=30;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,s=0,c=1):(s=a,c=0)}else s=0,c=1;h=e[n>>2]|0;do if(h){if(a=e[h+12>>2]|0,(a|0)==(e[h+16>>2]|0)){if(f=0,a=u0(e[(e[h>>2]|0)+36>>2]|0,h|0)|0,p=f,f=0,p&1){w0=30;break i}}else a=e[a>>2]|0;if((a|0)!=-1)if(c){a=h;break}else{a=h;break i}else{e[n>>2]=0,w0=20;break}}else w0=20;while(!1);if((w0|0)==20)if(w0=0,c){a=0;break}else a=0;if(c=d[Z>>0]|0,c=c&1?e[g>>2]|0:(c&255)>>>1,(e[O>>2]|0)==(t+c|0)){if(f=0,m0(8,Z|0,c<<1|0,0),p=f,f=0,p&1){w0=30;break}if(d[Z>>0]&1?t=(e[Z>>2]&-2)+-1|0:t=10,f=0,m0(8,Z|0,t|0,0),p=f,f=0,p&1){w0=30;break}t=d[Z>>0]&1?e[C>>2]|0:I,e[O>>2]=t+c}if(h=s+12|0,c=e[h>>2]|0,p=s+16|0,(c|0)==(e[p>>2]|0)){if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,v0=f,f=0,v0&1){w0=30;break}}else c=e[c>>2]|0;if(Pt(c,16,t,O,U,0,s0,B,V,k)|0)break;if(a=e[h>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,v0=f,f=0,v0&1){w0=30;break}else{a=s;continue}else{e[h>>2]=a+4,a=s;continue}}if((w0|0)==30){t=b()|0;break}if(f=0,m0(8,Z|0,(e[O>>2]|0)-t|0,0),v0=f,f=0,!(v0&1)&&(F=d[Z>>0]|0,M=e[C>>2]|0,f=0,X=p0(3)|0,v0=f,f=0,!(v0&1))&&(f=0,e[_>>2]=l,K=k0(16,(F&1?M:I)|0,X|0,58882,_|0)|0,v0=f,f=0,!(v0&1))){if((K|0)!=1&&(e[o>>2]=4),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,v0=f,f=0,v0&1){w0=31;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,v0=f,f=0,v0&1){w0=31;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;w0=59;break}else{e[n>>2]=0,w0=57;break}}else w0=57;while(!1);return(w0|0)==57&&s&&(w0=59),(w0|0)==59&&(e[o>>2]=e[o>>2]|2),v0=e[r>>2]|0,f0(Z),f0(s0),y=t0,v0|0}else w0=31}while(!1);(w0|0)==31&&(t=b()|0),f0(Z);break}t=b()|0,Ee(s)|0}while(!1);return f0(s0),r0(t|0),0}function Pt(t,r,n,s,o,l,a,c,h,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0;var g=0,C=0,I=0,k=0;I=e[s>>2]|0,k=(I|0)==(n|0);do if(k){if(g=(e[p+96>>2]|0)==(t|0),!g&&(e[p+100>>2]|0)!=(t|0)){C=5;break}e[s>>2]=n+1,d[n>>0]=g?43:45,e[o>>2]=0,g=0}else C=5;while(!1);e:do if((C|0)==5){if(C=d[a>>0]|0,(t|0)==(l|0)&&(C&1?e[a+4>>2]|0:(C&255)>>>1)|0){if(g=e[h>>2]|0,(g-c|0)>=160){g=0;break}r=e[o>>2]|0,e[h>>2]=g+4,e[g>>2]=r,e[o>>2]=0,g=0;break}for(a=p+104|0,g=p;(e[g>>2]|0)!=(t|0);)if(g=g+4|0,(g|0)==(a|0)){g=a;break}if(g=g-p|0,a=g>>2,(g|0)>92)g=-1;else{switch(r|0){case 10:case 8:{if((a|0)>=(r|0)){g=-1;break e}break}case 16:{if((g|0)>=88){if(k){g=-1;break e}if((I-n|0)>=3){g=-1;break e}if((d[I+-1>>0]|0)!=48){g=-1;break e}e[o>>2]=0,g=d[57498+a>>0]|0,e[s>>2]=I+1,d[I>>0]=g,g=0;break e}break}default:}g=d[57498+a>>0]|0,e[s>>2]=I+1,d[I>>0]=g,e[o>>2]=(e[o>>2]|0)+1,g=0}}while(!1);return g|0}function Gt(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0;if(h=y,y=y+16|0,c=h,r=ai(r)|0,e[c>>2]=r,f=0,o=y0(37,c|0,44220)|0,p=f,f=0,!(p&1)&&(f=0,k0(e[(e[o>>2]|0)+32>>2]|0,o|0,57498,57524,n|0)|0,p=f,f=0,!(p&1))&&(f=0,a=y0(37,c|0,44360)|0,p=f,f=0,!(p&1))&&(f=0,l=u0(e[(e[a>>2]|0)+16>>2]|0,a|0)|0,p=f,f=0,!(p&1))&&(d[s>>0]=l,f=0,h0(e[(e[a>>2]|0)+20>>2]|0,t|0,a|0),p=f,f=0,!(p&1))){Ee(r)|0,y=h;return}p=b()|0,Ee(r)|0,r0(p|0)}function m1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;if(g=y,y=y+16|0,p=g,r=ai(r)|0,e[p>>2]=r,f=0,l=y0(37,p|0,44220)|0,C=f,f=0,!(C&1)&&(f=0,k0(e[(e[l>>2]|0)+32>>2]|0,l|0,57498,57530,n|0)|0,C=f,f=0,!(C&1))&&(f=0,h=y0(37,p|0,44360)|0,C=f,f=0,!(C&1))&&(f=0,a=u0(e[(e[h>>2]|0)+12>>2]|0,h|0)|0,C=f,f=0,!(C&1))&&(d[s>>0]=a,f=0,c=u0(e[(e[h>>2]|0)+16>>2]|0,h|0)|0,C=f,f=0,!(C&1))&&(d[o>>0]=c,f=0,h0(e[(e[h>>2]|0)+20>>2]|0,t|0,h|0),C=f,f=0,!(C&1))){Ee(r)|0,y=g;return}C=b()|0,Ee(r)|0,r0(C|0)}function d1(t,r,n,s,o,l,a,c,h,p,g,C){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,C=C|0;var I=0,k=0;e:do if(t<<24>>24==l<<24>>24)d[r>>0]|0?(d[r>>0]=0,n=e[o>>2]|0,e[o>>2]=n+1,d[n>>0]=46,n=d[c>>0]|0,(n&1?e[c+4>>2]|0:(n&255)>>>1)|0&&(I=e[p>>2]|0,(I-h|0)<160)&&(h=e[g>>2]|0,e[p>>2]=I+4,e[I>>2]=h),I=0):I=-1;else{if(t<<24>>24==a<<24>>24&&(a=d[c>>0]|0,((a&1?e[c+4>>2]|0:(a&255)>>>1)|0)!=0)){if(!(d[r>>0]|0)){I=-1;break}if(I=e[p>>2]|0,(I-h|0)>=160){I=0;break}h=e[g>>2]|0,e[p>>2]=I+4,e[I>>2]=h,e[g>>2]=0,I=0;break}for(l=C+32|0,I=C;(d[I>>0]|0)!=t<<24>>24;)if(I=I+1|0,(I|0)==(l|0)){I=l;break}if(l=I-C|0,(l|0)>31)I=-1;else switch(a=d[57498+l>>0]|0,l|0){case 24:case 25:{if(I=e[o>>2]|0,(I|0)!=(s|0)&&(N[I+-1>>0]&95|0)!=(N[n>>0]&127|0)){I=-1;break e}e[o>>2]=I+1,d[I>>0]=a,I=0;break e}case 23:case 22:{d[n>>0]=80,I=e[o>>2]|0,e[o>>2]=I+1,d[I>>0]=a,I=0;break e}default:{if(I=a&95,(I|0)==(d[n>>0]|0)&&(d[n>>0]=I|128,(d[r>>0]|0)!=0)&&(d[r>>0]=0,n=d[c>>0]|0,((n&1?e[c+4>>2]|0:(n&255)>>>1)|0)!=0)&&(k=e[p>>2]|0,(k-h|0)<160)&&(h=e[g>>2]|0,e[p>>2]=k+4,e[k>>2]=h),p=e[o>>2]|0,e[o>>2]=p+1,d[p>>0]=a,(l|0)>21){I=0;break e}e[g>>2]=(e[g>>2]|0)+1,I=0;break e}}}while(!1);return I|0}function Qt(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0;if(h=y,y=y+16|0,c=h,r=ai(r)|0,e[c>>2]=r,f=0,o=y0(37,c|0,44212)|0,p=f,f=0,!(p&1)&&(f=0,k0(e[(e[o>>2]|0)+48>>2]|0,o|0,57498,57524,n|0)|0,p=f,f=0,!(p&1))&&(f=0,a=y0(37,c|0,44368)|0,p=f,f=0,!(p&1))&&(f=0,l=u0(e[(e[a>>2]|0)+16>>2]|0,a|0)|0,p=f,f=0,!(p&1))&&(e[s>>2]=l,f=0,h0(e[(e[a>>2]|0)+20>>2]|0,t|0,a|0),p=f,f=0,!(p&1))){Ee(r)|0,y=h;return}p=b()|0,Ee(r)|0,r0(p|0)}function g1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;if(g=y,y=y+16|0,p=g,r=ai(r)|0,e[p>>2]=r,f=0,l=y0(37,p|0,44212)|0,C=f,f=0,!(C&1)&&(f=0,k0(e[(e[l>>2]|0)+48>>2]|0,l|0,57498,57530,n|0)|0,C=f,f=0,!(C&1))&&(f=0,h=y0(37,p|0,44368)|0,C=f,f=0,!(C&1))&&(f=0,a=u0(e[(e[h>>2]|0)+12>>2]|0,h|0)|0,C=f,f=0,!(C&1))&&(e[s>>2]=a,f=0,c=u0(e[(e[h>>2]|0)+16>>2]|0,h|0)|0,C=f,f=0,!(C&1))&&(e[o>>2]=c,f=0,h0(e[(e[h>>2]|0)+20>>2]|0,t|0,h|0),C=f,f=0,!(C&1))){Ee(r)|0,y=g;return}C=b()|0,Ee(r)|0,r0(C|0)}function p1(t,r,n,s,o,l,a,c,h,p,g,C){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,C=C|0;var I=0,k=0;e:do if((t|0)==(l|0))d[r>>0]|0?(d[r>>0]=0,n=e[o>>2]|0,e[o>>2]=n+1,d[n>>0]=46,n=d[c>>0]|0,(n&1?e[c+4>>2]|0:(n&255)>>>1)|0&&(I=e[p>>2]|0,(I-h|0)<160)&&(h=e[g>>2]|0,e[p>>2]=I+4,e[I>>2]=h),I=0):I=-1;else{if((t|0)==(a|0)&&(a=d[c>>0]|0,((a&1?e[c+4>>2]|0:(a&255)>>>1)|0)!=0)){if(!(d[r>>0]|0)){I=-1;break}if(I=e[p>>2]|0,(I-h|0)>=160){I=0;break}h=e[g>>2]|0,e[p>>2]=I+4,e[I>>2]=h,e[g>>2]=0,I=0;break}for(l=C+128|0,I=C;(e[I>>2]|0)!=(t|0);)if(I=I+4|0,(I|0)==(l|0)){I=l;break}if(l=I-C|0,I=l>>2,(l|0)<=124){switch(a=d[57498+I>>0]|0,I|0){case 24:case 25:{if(I=e[o>>2]|0,(I|0)!=(s|0)&&(N[I+-1>>0]&95|0)!=(N[n>>0]&127|0)){I=-1;break e}e[o>>2]=I+1,d[I>>0]=a,I=0;break e}case 23:case 22:{d[n>>0]=80;break}default:I=a&95,(I|0)==(d[n>>0]|0)&&(d[n>>0]=I|128,(d[r>>0]|0)!=0)&&(d[r>>0]=0,n=d[c>>0]|0,((n&1?e[c+4>>2]|0:(n&255)>>>1)|0)!=0)&&(k=e[p>>2]|0,(k-h|0)<160)&&(h=e[g>>2]|0,e[p>>2]=k+4,e[k>>2]=h)}p=e[o>>2]|0,e[o>>2]=p+1,d[p>>0]=a,(l|0)>84||(e[g>>2]=(e[g>>2]|0)+1),I=0}else I=-1}while(!1);return I|0}function n6(t){t=t|0}function s6(t){t=t|0,a0(t)}function o6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0;g=y,y=y+32|0,l=g+20|0,a=g+16|0,c=g+12|0,p=g;e:do if(!(e[n+4>>2]&1))p=e[(e[t>>2]|0)+24>>2]|0,e[a>>2]=e[r>>2],e[l>>2]=e[a>>2],l=nr[p&31](t,l,n,s,o&1)|0;else{l=ai(n)|0,e[c>>2]=l,f=0,a=y0(37,c|0,44360)|0,h=f,f=0;i:do if(h&1)g=b()|0,Ee(l)|0,l=g;else{Ee(l)|0,l=e[a>>2]|0,o?Ke[e[l+24>>2]&127](p,a):Ke[e[l+28>>2]&127](p,a),t=d[p>>0]|0,h=(t&1)==0,l=p+1|0,o=p+8|0,c=h?l:p+1|0,l=h?l:e[p+8>>2]|0,h=p+4|0,n=(t&1)==0;t:do if((l|0)!=((n?c:e[o>>2]|0)+(n?(t&255)>>>1:e[h>>2]|0)|0)){r:for(;;){a=d[l>>0]|0,s=e[r>>2]|0;do if(s){if(n=s+24|0,t=e[n>>2]|0,(t|0)!=(e[s+28>>2]|0)){e[n>>2]=t+1,d[t>>0]=a;break}if(f=0,a=y0(e[(e[s>>2]|0)+52>>2]|0,s|0,a&255|0)|0,t=f,f=0,t&1)break r;(a|0)==-1&&(e[r>>2]=0)}while(!1);if(l=l+1|0,t=d[p>>0]|0,n=(t&1)==0,(l|0)==((n?c:e[o>>2]|0)+(n?(t&255)>>>1:e[h>>2]|0)|0))break t}l=b()|0,f0(p);break i}while(!1);l=e[r>>2]|0,f0(p);break e}while(!1);r0(l|0)}while(!1);return y=g,l|0}function l6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(g=y,y=y+64|0,l=g,I=g+56|0,k=g+44|0,c=g+20|0,p=g+16|0,h=g+12|0,C=g+8|0,a=g+4|0,d[I>>0]=d[58887]|0,d[I+1>>0]=d[58888]|0,d[I+2>>0]=d[58889]|0,d[I+3>>0]=d[58890]|0,d[I+4>>0]=d[58891]|0,d[I+5>>0]=d[58892]|0,It(I+1|0,58893,1,e[n+4>>2]|0),t=Ii()|0,e[l>>2]=o,o=k+(qi(k,12,t,I,l)|0)|0,I=it(k,o,n)|0,t=ai(n)|0,e[C>>2]=t,f=0,re(1,k|0,I|0,o|0,c|0,p|0,h|0,C|0),o=f,f=0,o&1)k=b()|0,Ee(t)|0,r0(k|0);else return Ee(t)|0,e[a>>2]=e[r>>2],I=e[p>>2]|0,k=e[h>>2]|0,e[l>>2]=e[a>>2],k=Vt(l,c,I,k,n,s)|0,y=g,k|0;return 0}function It(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(s&2048&&(d[t>>0]=43,t=t+1|0),s&512&&(d[t>>0]=35,t=t+1|0),o=d[r>>0]|0,o<<24>>24)for(l=r;;)if(l=l+1|0,r=t+1|0,d[t>>0]=o,o=d[l>>0]|0,o<<24>>24)t=r;else{t=r;break}e:do switch(s&74|0){case 64:{d[t>>0]=111;break}case 8:if(s&16384){d[t>>0]=88;break e}else{d[t>>0]=120;break e}default:if(n){d[t>>0]=100;break e}else{d[t>>0]=117;break e}}while(!1)}function it(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;e:do switch(e[n+4>>2]&176|0){case 16:{switch(n=d[t>>0]|0,n<<24>>24){case 43:case 45:{t=t+1|0;break e}default:}if((r-t|0)>1&n<<24>>24==48){switch(d[t+1>>0]|0){case 88:case 120:break;default:{s=7;break e}}t=t+2|0}else s=7;break}case 32:{t=r;break}default:s=7}while(!1);return t|0}function a6(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0;O=y,y=y+16|0,_=O,B=Pi(a,44220)|0,p=Pi(a,44360)|0,Ke[e[(e[p>>2]|0)+20>>2]&127](_,p),k=d[_>>0]|0,U=_+4|0;e:do if(!((k&1?e[U>>2]|0:(k&255)>>>1)|0))f=0,k0(e[(e[B>>2]|0)+32>>2]|0,B|0,t|0,n|0,s|0)|0,V=f,f=0,V&1?V=5:(a=s+(n-t)|0,e[l>>2]=a,V=29);else{switch(e[l>>2]=s,a=d[t>>0]|0,a<<24>>24){case 43:case 45:{if(f=0,a=y0(e[(e[B>>2]|0)+28>>2]|0,B|0,a|0)|0,k=f,f=0,k&1){V=5;break e}h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=a,h=t+1|0;break}default:h=t}i:do if((n-h|0)>1&&(d[h>>0]|0)==48){switch(a=h+1|0,d[a>>0]|0){case 88:case 120:break;default:break i}if(f=0,c=y0(e[(e[B>>2]|0)+28>>2]|0,B|0,48)|0,k=f,f=0,k&1){V=5;break e}if(k=e[l>>2]|0,e[l>>2]=k+1,d[k>>0]=c,f=0,a=y0(e[(e[B>>2]|0)+28>>2]|0,B|0,d[a>>0]|0)|0,k=f,f=0,k&1){V=5;break e}k=e[l>>2]|0,e[l>>2]=k+1,d[k>>0]=a,h=h+2|0}while(!1);if((h|0)!=(n|0)&&(g=n+-1|0,h>>>0>>0)){c=h,a=g;do k=d[c>>0]|0,d[c>>0]=d[a>>0]|0,d[a>>0]=k,c=c+1|0,a=a+-1|0;while(c>>>0>>0)}if(f=0,g=u0(e[(e[p>>2]|0)+16>>2]|0,p|0)|0,k=f,f=0,k&1)V=5;else{C=_+8|0,I=_+1|0;i:do if(h>>>0>>0){for(a=0,c=0,k=h;p=d[(d[_>>0]&1?e[C>>2]|0:I)+c>>0]|0,p<<24>>24!=0&(a|0)==(p<<24>>24|0)?(a=e[l>>2]|0,e[l>>2]=a+1,d[a>>0]=g,a=d[_>>0]|0,p=0,c=(c>>>0<((a&1?e[U>>2]|0:(a&255)>>>1)+-1|0)>>>0&1)+c|0):p=a,f=0,a=y0(e[(e[B>>2]|0)+28>>2]|0,B|0,d[k>>0]|0)|0,F=f,f=0,!(F&1);){if(F=e[l>>2]|0,e[l>>2]=F+1,d[F>>0]=a,k=k+1|0,k>>>0>=n>>>0)break i;a=p+1|0}a=b()|0;break e}while(!1);if(c=t,a=s+(h-c)|0,t=e[l>>2]|0,(a|0)==(t|0))t=c,V=29;else{if(t=t+-1|0,a>>>0>>0)do F=d[a>>0]|0,d[a>>0]=d[t>>0]|0,d[t>>0]=F,a=a+1|0,t=t+-1|0;while(a>>>0>>0);t=c,a=e[l>>2]|0,V=29}}}while(!1);if((V|0)==5)a=b()|0;else if((V|0)==29){e[o>>2]=(r|0)==(n|0)?a:s+(r-t)|0,f0(_),y=O;return}f0(_),r0(a|0)}function f6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(C=y,y=y+96|0,a=C+8|0,t=C,k=C+74|0,h=C+32|0,g=C+28|0,p=C+24|0,I=C+20|0,c=C+16|0,U=t,e[U>>2]=37,e[U+4>>2]=0,It(t+1|0,58895,1,e[n+4>>2]|0),U=Ii()|0,B=a,e[B>>2]=o,e[B+4>>2]=l,l=k+(qi(k,22,U,t,a)|0)|0,o=it(k,l,n)|0,t=ai(n)|0,e[I>>2]=t,f=0,re(1,k|0,o|0,l|0,h|0,g|0,p|0,I|0),l=f,f=0,l&1)B=b()|0,Ee(t)|0,r0(B|0);else return Ee(t)|0,e[c>>2]=e[r>>2],U=e[g>>2]|0,B=e[p>>2]|0,e[a>>2]=e[c>>2],B=Vt(a,h,U,B,n,s)|0,y=C,B|0;return 0}function u6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(g=y,y=y+64|0,l=g,I=g+56|0,k=g+44|0,c=g+20|0,p=g+16|0,h=g+12|0,C=g+8|0,a=g+4|0,d[I>>0]=d[58887]|0,d[I+1>>0]=d[58888]|0,d[I+2>>0]=d[58889]|0,d[I+3>>0]=d[58890]|0,d[I+4>>0]=d[58891]|0,d[I+5>>0]=d[58892]|0,It(I+1|0,58893,0,e[n+4>>2]|0),t=Ii()|0,e[l>>2]=o,o=k+(qi(k,12,t,I,l)|0)|0,I=it(k,o,n)|0,t=ai(n)|0,e[C>>2]=t,f=0,re(1,k|0,I|0,o|0,c|0,p|0,h|0,C|0),o=f,f=0,o&1)k=b()|0,Ee(t)|0,r0(k|0);else return Ee(t)|0,e[a>>2]=e[r>>2],I=e[p>>2]|0,k=e[h>>2]|0,e[l>>2]=e[a>>2],k=Vt(l,c,I,k,n,s)|0,y=g,k|0;return 0}function c6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(C=y,y=y+112|0,a=C+8|0,t=C,k=C+75|0,h=C+32|0,g=C+28|0,p=C+24|0,I=C+20|0,c=C+16|0,U=t,e[U>>2]=37,e[U+4>>2]=0,It(t+1|0,58895,0,e[n+4>>2]|0),U=Ii()|0,B=a,e[B>>2]=o,e[B+4>>2]=l,l=k+(qi(k,23,U,t,a)|0)|0,o=it(k,l,n)|0,t=ai(n)|0,e[I>>2]=t,f=0,re(1,k|0,o|0,l|0,h|0,g|0,p|0,I|0),l=f,f=0,l&1)B=b()|0,Ee(t)|0,r0(B|0);else return Ee(t)|0,e[c>>2]=e[r>>2],U=e[g>>2]|0,B=e[p>>2]|0,e[a>>2]=e[c>>2],B=Vt(a,h,U,B,n,s)|0,y=C,B|0;return 0}function h6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=+o;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0;X=y,y=y+176|0,V=X+84|0,I=X+48|0,C=X+32|0,h=X+24|0,l=X+8|0,g=X,U=X+88|0,B=X+80|0,c=X+118|0,M=X+76|0,F=X+72|0,O=X+68|0,_=X+64|0,p=g,e[p>>2]=37,e[p+4>>2]=0,p=hr(g+1|0,58898,e[n+4>>2]|0)|0,e[B>>2]=U,t=Ii()|0,p?(e[l>>2]=e[n+8>>2],H[l+8>>3]=o,l=qi(U,30,t,g,l)|0):(H[h>>3]=o,l=qi(U,30,t,g,h)|0);e:do if((l|0)>29){f=0,t=p0(3)|0,l=f,f=0,l=l&1,p?!l&&(f=0,e[C>>2]=e[n+8>>2],H[C+8>>3]=o,a=k0(17,B|0,t|0,g|0,C|0)|0,k=f,f=0,!(k&1))&&(K=12):!l&&(f=0,e[I>>2]=e[n+8>>2],H[I+8>>3]=o,k=k0(17,B|0,t|0,g|0,I|0)|0,I=f,f=0,!(I&1))&&(a=k,K=12);do if((K|0)==12){if(t=e[B>>2]|0,t)l=t;else{if(f=0,we(6),k=f,f=0,k&1)break;l=e[B>>2]|0}t=l,g=l,K=16;break e}while(!1);t=b()|0}else t=e[B>>2]|0,g=0,a=l,K=16;while(!1);if((K|0)==16){h=t+a|0,p=it(t,h,n)|0;do if((t|0)==(U|0))t=U,l=0,K=22;else{if(a=xi(a<<1)|0,!a){if(f=0,we(6),K=f,f=0,K&1){l=0,K=20;break}t=e[B>>2]|0}l=a,c=a,K=22}while(!1);do if((K|0)==22)if(f=0,a=u0(68,n|0)|0,B=f,f=0,B&1)K=20;else{if(e[O>>2]=a,f=0,re(2,t|0,p|0,h|0,c|0,M|0,F|0,O|0),O=f,f=0,O&1){t=b()|0,Ee(a)|0;break}if(Ee(a)|0,e[_>>2]=e[r>>2],K=e[M>>2]|0,t=e[F>>2]|0,f=0,e[V>>2]=e[_>>2],t=Fe(39,V|0,c|0,K|0,t|0,n|0,s|0)|0,K=f,f=0,K&1)K=20;else return e[r>>2]=t,l&&Ze(l),g&&Ze(g),y=X,t|0}while(!1);(K|0)==20&&(t=b()|0),l&&Ze(l),g&&Ze(g)}return r0(t|0),0}function hr(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;if(n&2048&&(d[t>>0]=43,t=t+1|0),n&1024&&(d[t>>0]=35,t=t+1|0),a=n&260,o=n>>>14,c=(a|0)==260,c?l=0:(d[t>>0]=46,d[t+1>>0]=42,t=t+2|0,l=1),n=d[r>>0]|0,n<<24>>24)for(s=t;r=r+1|0,t=s+1|0,d[s>>0]=n,n=d[r>>0]|0,n<<24>>24;)s=t;e:do switch(a|0){case 4:if(o&1){d[t>>0]=70;break e}else{d[t>>0]=102;break e}case 256:if(o&1){d[t>>0]=69;break e}else{d[t>>0]=101;break e}default:if(n=(o&1|0)!=0,c)if(n){d[t>>0]=65;break e}else{d[t>>0]=97;break e}else if(n){d[t>>0]=71;break e}else{d[t>>0]=103;break e}}while(!1);return l|0}function m6(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0;switch(X=y,y=y+16|0,K=X,M=Pi(a,44220)|0,_=Pi(a,44360)|0,Ke[e[(e[_>>2]|0)+20>>2]&127](K,_),e[l>>2]=s,a=d[t>>0]|0,a<<24>>24){case 43:case 45:{f=0,a=y0(e[(e[M>>2]|0)+28>>2]|0,M|0,a|0)|0,F=f,f=0,F&1?O=8:(g=e[l>>2]|0,e[l>>2]=g+1,d[g>>0]=a,g=t+1|0,O=10);break}default:g=t,O=10}e:do if((O|0)==10){F=n;i:do if((F-g|0)>1&&(d[g>>0]|0)==48){switch(h=g+1|0,d[h>>0]|0){case 88:case 120:break;default:{O=11;break i}}if(f=0,a=y0(e[(e[M>>2]|0)+28>>2]|0,M|0,48)|0,V=f,f=0,V&1){O=8;break e}if(V=e[l>>2]|0,e[l>>2]=V+1,d[V>>0]=a,g=g+2|0,f=0,a=y0(e[(e[M>>2]|0)+28>>2]|0,M|0,d[h>>0]|0)|0,V=f,f=0,V&1){O=8;break e}if(V=e[l>>2]|0,e[l>>2]=V+1,d[V>>0]=a,g>>>0>>0){for(a=g;h=d[a>>0]|0,f=0,p=p0(3)|0,V=f,f=0,!(V&1||(f=0,h=y0(39,h<<24>>24|0,p|0)|0,V=f,f=0,V&1));){if(!h){V=g;break i}if(a=a+1|0,a>>>0>=n>>>0){V=g;break i}}a=b()|0;break e}else V=g,a=g}else O=11;while(!1);i:do if((O|0)==11)if(g>>>0>>0){for(a=g;h=d[a>>0]|0,f=0,p=p0(3)|0,V=f,f=0,!(V&1||(f=0,h=y0(40,h<<24>>24|0,p|0)|0,V=f,f=0,V&1));){if(!h){V=g;break i}if(a=a+1|0,a>>>0>=n>>>0){V=g;break i}}a=b()|0;break e}else V=g,a=g;while(!1);if(U=d[K>>0]|0,B=K+4|0,(U&1?e[B>>2]|0:(U&255)>>>1)|0){if((V|0)!=(a|0)&&(C=a+-1|0,V>>>0>>0)){p=V,h=C;do U=d[p>>0]|0,d[p>>0]=d[h>>0]|0,d[h>>0]=U,p=p+1|0,h=h+-1|0;while(p>>>0>>0)}if(f=0,C=u0(e[(e[_>>2]|0)+16>>2]|0,_|0)|0,U=f,f=0,U&1){O=8;break}I=K+8|0,k=K+1|0;i:do if(V>>>0>>0){for(h=0,p=0,U=V;g=d[(d[K>>0]&1?e[I>>2]|0:k)+p>>0]|0,g<<24>>24>0&(h|0)==(g<<24>>24|0)?(h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=C,h=d[K>>0]|0,g=0,p=(p>>>0<((h&1?e[B>>2]|0:(h&255)>>>1)+-1|0)>>>0&1)+p|0):g=h,f=0,h=y0(e[(e[M>>2]|0)+28>>2]|0,M|0,d[U>>0]|0)|0,t0=f,f=0,!(t0&1);){if(t0=e[l>>2]|0,e[l>>2]=t0+1,d[t0>>0]=h,U=U+1|0,U>>>0>=a>>>0)break i;h=g+1|0}a=b()|0;break e}while(!1);if(h=s+(V-t)|0,p=e[l>>2]|0,(h|0)!=(p|0)&&(c=p+-1|0,h>>>0>>0)){do t0=d[h>>0]|0,d[h>>0]=d[c>>0]|0,d[c>>0]=t0,h=h+1|0,c=c+-1|0;while(h>>>0>>0);h=M}else h=M}else{if(f=0,k0(e[(e[M>>2]|0)+32>>2]|0,M|0,V|0,a|0,e[l>>2]|0)|0,t0=f,f=0,t0&1){O=8;break}e[l>>2]=(e[l>>2]|0)+(a-V),h=M}i:do if(a>>>0>>0){for(;c=d[a>>0]|0,c<<24>>24!=46;){if(f=0,c=y0(e[(e[h>>2]|0)+28>>2]|0,M|0,c|0)|0,t0=f,f=0,t0&1){O=4;break}if(t0=e[l>>2]|0,e[l>>2]=t0+1,d[t0>>0]=c,a=a+1|0,a>>>0>=n>>>0)break i}if((O|0)==4){a=b()|0;break e}if(f=0,c=u0(e[(e[_>>2]|0)+12>>2]|0,_|0)|0,t0=f,f=0,t0&1){O=8;break e}t0=e[l>>2]|0,e[l>>2]=t0+1,d[t0>>0]=c,a=a+1|0}while(!1);if(f=0,k0(e[(e[M>>2]|0)+32>>2]|0,M|0,a|0,n|0,e[l>>2]|0)|0,t0=f,f=0,t0&1)O=8;else{t0=(e[l>>2]|0)+(F-a)|0,e[l>>2]=t0,e[o>>2]=(r|0)==(n|0)?t0:s+(r-t)|0,f0(K),y=X;return}}while(!1);(O|0)==8&&(a=b()|0),f0(K),r0(a|0)}function d6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=+o;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0;X=y,y=y+176|0,V=X+76|0,I=X+48|0,C=X+32|0,h=X+24|0,l=X+8|0,g=X,U=X+80|0,B=X+72|0,c=X+110|0,M=X+68|0,F=X+64|0,O=X+60|0,_=X+56|0,p=g,e[p>>2]=37,e[p+4>>2]=0,p=hr(g+1|0,58899,e[n+4>>2]|0)|0,e[B>>2]=U,t=Ii()|0,p?(e[l>>2]=e[n+8>>2],H[l+8>>3]=o,l=qi(U,30,t,g,l)|0):(H[h>>3]=o,l=qi(U,30,t,g,h)|0);e:do if((l|0)>29){f=0,t=p0(3)|0,l=f,f=0,l=l&1,p?!l&&(f=0,e[C>>2]=e[n+8>>2],H[C+8>>3]=o,a=k0(17,B|0,t|0,g|0,C|0)|0,k=f,f=0,!(k&1))&&(K=12):!l&&(f=0,H[I>>3]=o,k=k0(17,B|0,t|0,g|0,I|0)|0,I=f,f=0,!(I&1))&&(a=k,K=12);do if((K|0)==12){if(t=e[B>>2]|0,t)l=t;else{if(f=0,we(6),k=f,f=0,k&1)break;l=e[B>>2]|0}t=l,g=l,K=16;break e}while(!1);t=b()|0}else t=e[B>>2]|0,g=0,a=l,K=16;while(!1);if((K|0)==16){h=t+a|0,p=it(t,h,n)|0;do if((t|0)==(U|0))t=U,l=0,K=22;else{if(a=xi(a<<1)|0,!a){if(f=0,we(6),K=f,f=0,K&1){l=0,K=20;break}t=e[B>>2]|0}l=a,c=a,K=22}while(!1);do if((K|0)==22)if(f=0,a=u0(68,n|0)|0,B=f,f=0,B&1)K=20;else{if(e[O>>2]=a,f=0,re(2,t|0,p|0,h|0,c|0,M|0,F|0,O|0),O=f,f=0,O&1){t=b()|0,Ee(a)|0;break}if(Ee(a)|0,e[_>>2]=e[r>>2],K=e[M>>2]|0,t=e[F>>2]|0,f=0,e[V>>2]=e[_>>2],t=Fe(39,V|0,c|0,K|0,t|0,n|0,s|0)|0,K=f,f=0,K&1)K=20;else return e[r>>2]=t,l&&Ze(l),g&&Ze(g),y=X,t|0}while(!1);(K|0)==20&&(t=b()|0),l&&Ze(l),g&&Ze(g)}return r0(t|0),0}function g6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(I=y,y=y+80|0,h=I,t=I+70|0,g=I+12|0,C=I+32|0,c=I+8|0,p=I+4|0,d[t>>0]=d[58901]|0,d[t+1>>0]=d[58902]|0,d[t+2>>0]=d[58903]|0,d[t+3>>0]=d[58904]|0,d[t+4>>0]=d[58905]|0,d[t+5>>0]=d[58906]|0,l=Ii()|0,e[h>>2]=o,t=qi(g,20,l,t,h)|0,o=g+t|0,l=it(g,o,n)|0,a=ai(n)|0,e[c>>2]=a,f=0,c=y0(37,c|0,44220)|0,k=f,f=0,k&1)k=b()|0,Ee(a)|0,r0(k|0);else return Ee(a)|0,F1[e[(e[c>>2]|0)+32>>2]&31](c,g,o,C)|0,k=C+t|0,e[p>>2]=e[r>>2],e[h>>2]=e[p>>2],k=Vt(h,C,(l|0)==(o|0)?k:C+(l-g)|0,k,n,s)|0,y=I,k|0;return 0}function p6(t){t=t|0}function A6(t){t=t|0,a0(t)}function S6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0;p=y,y=y+32|0,l=p+20|0,a=p+16|0,c=p+12|0,h=p;e:do if(!(e[n+4>>2]&1))h=e[(e[t>>2]|0)+24>>2]|0,e[a>>2]=e[r>>2],e[l>>2]=e[a>>2],l=nr[h&31](t,l,n,s,o&1)|0;else{l=ai(n)|0,e[c>>2]=l,f=0,a=y0(37,c|0,44368)|0,c=f,f=0;i:do if(c&1)p=b()|0,Ee(l)|0,l=p;else{Ee(l)|0,l=e[a>>2]|0,o?Ke[e[l+24>>2]&127](h,a):Ke[e[l+28>>2]&127](h,a),t=d[h>>0]|0,n=(t&1)==0,l=h+4|0,o=h+8|0,c=n?l:h+4|0,l=n?l:e[h+8>>2]|0,n=(t&1)==0;t:do if((l|0)!=((n?c:e[o>>2]|0)+((n?(t&255)>>>1:e[c>>2]|0)<<2)|0)){for(;;){if(a=e[l>>2]|0,s=e[r>>2]|0,s){if(n=s+24|0,t=e[n>>2]|0,(t|0)==(e[s+28>>2]|0)){if(f=0,a=y0(e[(e[s>>2]|0)+52>>2]|0,s|0,a|0)|0,t=f,f=0,t&1)break}else e[n>>2]=t+4,e[t>>2]=a;(a|0)==-1&&(e[r>>2]=0)}if(l=l+4|0,t=d[h>>0]|0,n=(t&1)==0,(l|0)==((n?c:e[o>>2]|0)+((n?(t&255)>>>1:e[c>>2]|0)<<2)|0))break t}l=b()|0,ye(h);break i}while(!1);l=e[r>>2]|0,ye(h);break e}while(!1);r0(l|0)}while(!1);return y=p,l|0}function v6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if(g=y,y=y+128|0,l=g,I=g+116|0,k=g+104|0,c=g+20|0,p=g+16|0,h=g+12|0,C=g+8|0,a=g+4|0,d[I>>0]=d[58887]|0,d[I+1>>0]=d[58888]|0,d[I+2>>0]=d[58889]|0,d[I+3>>0]=d[58890]|0,d[I+4>>0]=d[58891]|0,d[I+5>>0]=d[58892]|0,It(I+1|0,58893,1,e[n+4>>2]|0),t=Ii()|0,e[l>>2]=o,o=k+(qi(k,12,t,I,l)|0)|0,I=it(k,o,n)|0,t=ai(n)|0,e[C>>2]=t,f=0,re(3,k|0,I|0,o|0,c|0,p|0,h|0,C|0),o=f,f=0,o&1)k=b()|0,Ee(t)|0,r0(k|0);else return Ee(t)|0,e[a>>2]=e[r>>2],I=e[p>>2]|0,k=e[h>>2]|0,e[l>>2]=e[a>>2],k=zt(l,c,I,k,n,s)|0,y=g,k|0;return 0}function w6(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0;O=y,y=y+16|0,_=O,B=Pi(a,44212)|0,p=Pi(a,44368)|0,Ke[e[(e[p>>2]|0)+20>>2]&127](_,p),k=d[_>>0]|0,U=_+4|0;e:do if(!((k&1?e[U>>2]|0:(k&255)>>>1)|0))f=0,k0(e[(e[B>>2]|0)+48>>2]|0,B|0,t|0,n|0,s|0)|0,V=f,f=0,V&1?V=5:(a=s+(n-t<<2)|0,e[l>>2]=a,V=28);else{switch(e[l>>2]=s,a=d[t>>0]|0,a<<24>>24){case 43:case 45:{if(f=0,a=y0(e[(e[B>>2]|0)+44>>2]|0,B|0,a|0)|0,k=f,f=0,k&1){V=5;break e}h=e[l>>2]|0,e[l>>2]=h+4,e[h>>2]=a,h=t+1|0;break}default:h=t}i:do if((n-h|0)>1&&(d[h>>0]|0)==48){switch(a=h+1|0,d[a>>0]|0){case 88:case 120:break;default:{k=h;break i}}if(f=0,c=y0(e[(e[B>>2]|0)+44>>2]|0,B|0,48)|0,k=f,f=0,k&1){V=5;break e}if(k=e[l>>2]|0,e[l>>2]=k+4,e[k>>2]=c,f=0,a=y0(e[(e[B>>2]|0)+44>>2]|0,B|0,d[a>>0]|0)|0,k=f,f=0,k&1){V=5;break e}k=e[l>>2]|0,e[l>>2]=k+4,e[k>>2]=a,k=h+2|0}else k=h;while(!1);if((k|0)!=(n|0)&&(g=n+-1|0,k>>>0>>0)){c=k,a=g;do I=d[c>>0]|0,d[c>>0]=d[a>>0]|0,d[a>>0]=I,c=c+1|0,a=a+-1|0;while(c>>>0>>0)}if(f=0,p=u0(e[(e[p>>2]|0)+16>>2]|0,p|0)|0,I=f,f=0,I&1)V=5;else{g=_+8|0,C=_+1|0;i:do if(k>>>0>>0){for(a=0,c=0,I=k;h=d[(d[_>>0]&1?e[g>>2]|0:C)+c>>0]|0,h<<24>>24!=0&(a|0)==(h<<24>>24|0)?(a=e[l>>2]|0,e[l>>2]=a+4,e[a>>2]=p,a=d[_>>0]|0,h=0,c=(c>>>0<((a&1?e[U>>2]|0:(a&255)>>>1)+-1|0)>>>0&1)+c|0):h=a,f=0,a=y0(e[(e[B>>2]|0)+44>>2]|0,B|0,d[I>>0]|0)|0,F=f,f=0,!(F&1);){if(F=e[l>>2]|0,e[l>>2]=F+4,e[F>>2]=a,I=I+1|0,I>>>0>=n>>>0)break i;a=h+1|0}a=b()|0;break e}while(!1);if(h=t,a=s+(k-h<<2)|0,c=e[l>>2]|0,(a|0)!=(c|0))if(t=c+-4|0,a>>>0>>0){do F=e[a>>2]|0,e[a>>2]=e[t>>2],e[t>>2]=F,a=a+4|0,t=t+-4|0;while(a>>>0>>0);t=h,a=c,V=28}else t=h,a=c,V=28;else t=h,V=28}}while(!1);if((V|0)==5)a=b()|0;else if((V|0)==28){e[o>>2]=(r|0)==(n|0)?a:s+(r-t<<2)|0,f0(_),y=O;return}f0(_),r0(a|0)}function T6(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(C=y,y=y+224|0,a=C+8|0,t=C,k=C+196|0,h=C+32|0,g=C+28|0,p=C+24|0,I=C+20|0,c=C+16|0,U=t,e[U>>2]=37,e[U+4>>2]=0,It(t+1|0,58895,1,e[n+4>>2]|0),U=Ii()|0,B=a,e[B>>2]=o,e[B+4>>2]=l,l=k+(qi(k,22,U,t,a)|0)|0,o=it(k,l,n)|0,t=ai(n)|0,e[I>>2]=t,f=0,re(3,k|0,o|0,l|0,h|0,g|0,p|0,I|0),l=f,f=0,l&1)B=b()|0,Ee(t)|0,r0(B|0);else return Ee(t)|0,e[c>>2]=e[r>>2],U=e[g>>2]|0,B=e[p>>2]|0,e[a>>2]=e[c>>2],B=zt(a,h,U,B,n,s)|0,y=C,B|0;return 0}function C6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0;V=y,y=y+16|0,U=V,I=V+8|0;e:do if((n|0)==(s|0))h=s;else for(h=n;;){if(!(e[h>>2]|0))break e;if(h=h+4|0,(h|0)==(s|0)){h=s;break}}while(!1);e[c>>2]=l,e[o>>2]=n,g=a,k=t+8|0;e:do if((l|0)==(a|0)|(n|0)==(s|0))O=47;else{t=l,p=h;i:for(;;){if(_=r,l=e[_+4>>2]|0,h=U,e[h>>2]=e[_>>2],e[h+4>>2]=l,h=nt(e[k>>2]|0)|0,f=0,l=$(21,t|0,o|0,p-n>>2|0,g-t|0,r|0)|0,_=f,f=0,_&1){O=9;break}if(h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)){O=8;break}switch(l|0){case 0:{C=1;break e}case-1:{h=t,O=14;break i}default:}if(h=(e[c>>2]|0)+l|0,e[c>>2]=h,(h|0)==(a|0)){O=27;break}if((p|0)==(s|0))n=e[o>>2]|0,t=h,h=s;else{if(h=nt(e[k>>2]|0)|0,f=0,n=L0(34,I|0,0,r|0)|0,_=f,f=0,_&1){O=35;break}if(h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)){O=34;break}if((n|0)==-1){C=2;break e}if(n>>>0>(g-(e[c>>2]|0)|0)>>>0){C=1;break e}if(n)for(h=I;p=d[h>>0]|0,_=e[c>>2]|0,e[c>>2]=_+1,d[_>>0]=p,n=n+-1|0,n;)h=h+1|0;n=(e[o>>2]|0)+4|0,e[o>>2]=n;t:do if((n|0)==(s|0))h=s;else for(h=n;;){if(!(e[h>>2]|0))break t;if(h=h+4|0,(h|0)==(s|0)){h=s;break}}while(!1);t=e[c>>2]|0}if((t|0)==(a|0)|(n|0)==(s|0)){O=47;break e}else p=h}if((O|0)==8)_=b(0)|0,Ie(_);else if((O|0)==9)n=b()|0,h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)&&(_=b(0)|0,Ie(_)),r0(n|0);else if((O|0)==14){e[c>>2]=h;i:do if((n|0)!=(e[o>>2]|0)){for(;;){if(_=e[n>>2]|0,t=nt(e[k>>2]|0)|0,f=0,h=L0(34,h|0,_|0,U|0)|0,_=f,f=0,_&1){B=t;break}if(t|0&&(f=0,u0(75,t|0)|0,_=f,f=0,_&1)){O=18;break}if((h|0)==-1||(h=(e[c>>2]|0)+h|0,e[c>>2]=h,n=n+4|0,(n|0)==(e[o>>2]|0)))break i}(O|0)==18&&(_=b(0)|0,Ie(_)),n=b()|0,B|0&&(f=0,u0(75,B|0)|0,_=f,f=0,_&1)&&(_=b(0)|0,Ie(_)),r0(n|0)}while(!1);e[o>>2]=n,C=2;break}else if((O|0)==27){n=e[o>>2]|0,O=47;break}else(O|0)==34?(_=b(0)|0,Ie(_)):(O|0)==35&&(n=b()|0,h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)&&(_=b(0)|0,Ie(_)),r0(n|0))}while(!1);return(O|0)==47&&(C=(n|0)!=(s|0)&1),y=V,C|0}function x6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0;V=y,y=y+16|0,B=V;e:do if((n|0)==(s|0))h=s;else for(h=n;;){if(!(d[h>>0]|0))break e;if(h=h+1|0,(h|0)==(s|0)){h=s;break}}while(!1);e[c>>2]=l,e[o>>2]=n,C=a,k=t+8|0;e:do if((l|0)==(a|0)|(n|0)==(s|0))O=47;else{t=l,g=h;i:for(;;){if(p=r,h=e[p+4>>2]|0,l=B,e[l>>2]=e[p>>2],e[l+4>>2]=h,l=g,h=nt(e[k>>2]|0)|0,f=0,p=$(22,t|0,o|0,l-n|0,C-t>>2|0,r|0)|0,_=f,f=0,_&1){O=9;break}if(h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)){O=8;break}switch(p|0){case 0:{I=2;break e}case-1:{h=t,O=14;break i}default:}if(t=(e[c>>2]|0)+(p<<2)|0,e[c>>2]=t,(t|0)==(a|0)){O=31;break}if(n=e[o>>2]|0,(g|0)==(s|0))h=s;else{if(h=nt(e[k>>2]|0)|0,f=0,n=k0(20,t|0,n|0,1,r|0)|0,_=f,f=0,_&1){O=38;break}if(h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)){O=37;break}if(n){I=2;break e}e[c>>2]=(e[c>>2]|0)+4,n=(e[o>>2]|0)+1|0,e[o>>2]=n;t:do if((n|0)==(s|0))h=s;else for(h=n;;){if(!(d[h>>0]|0))break t;if(h=h+1|0,(h|0)==(s|0)){h=s;break}}while(!1);t=e[c>>2]|0}if((t|0)==(a|0)|(n|0)==(s|0)){O=47;break e}else g=h}if((O|0)==8)_=b(0)|0,Ie(_);else if((O|0)==9)n=b()|0,h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)&&(_=b(0)|0,Ie(_)),r0(n|0);else if((O|0)==14){e[c>>2]=h;i:do if((n|0)!=(e[o>>2]|0)){t=h;t:for(;;){if(h=nt(e[k>>2]|0)|0,f=0,t=k0(20,t|0,n|0,l-n|0,B|0)|0,_=f,f=0,_&1){O=19;break}if(h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)){O=18;break}switch(t|0){case-1:{O=25;break t}case-2:{O=26;break t}case 0:{n=n+1|0;break}default:n=n+t|0}if(t=(e[c>>2]|0)+4|0,e[c>>2]=t,(n|0)==(e[o>>2]|0)){U=n;break i}}if((O|0)==18)_=b(0)|0,Ie(_);else if((O|0)==19)n=b()|0,h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)&&(_=b(0)|0,Ie(_)),r0(n|0);else if((O|0)==25){e[o>>2]=n,I=2;break e}else if((O|0)==26){e[o>>2]=n,I=1;break e}}else U=n;while(!1);e[o>>2]=U,I=(U|0)!=(s|0)&1;break}else if((O|0)==31){n=e[o>>2]|0,O=47;break}else(O|0)==37?(_=b(0)|0,Ie(_)):(O|0)==38&&(n=b()|0,h|0&&(f=0,u0(75,h|0)|0,_=f,f=0,_&1)&&(_=b(0)|0,Ie(_)),r0(n|0))}while(!1);return(O|0)==47&&(I=(n|0)!=(s|0)&1),y=V,I|0}function y6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;switch(a=y,y=y+16|0,l=a,e[o>>2]=n,n=nt(e[t+8>>2]|0)|0,f=0,t=L0(34,l|0,0,r|0)|0,r=f,f=0,r&1&&(l=b()|0,n|0&&(f=0,u0(75,n|0)|0,a=f,f=0,a&1)&&(a=b(0)|0,Ie(a)),r0(l|0)),n|0&&(f=0,u0(75,n|0)|0,r=f,f=0,r&1)&&(r=b(0)|0,Ie(r)),t|0){case 0:case-1:{l=2;break}default:if(t=t+-1|0,t>>>0<=(s-(e[o>>2]|0)|0)>>>0)if(!t)l=0;else for(;;)if(r=d[l>>0]|0,s=e[o>>2]|0,e[o>>2]=s+1,d[s>>0]=r,t=t+-1|0,t)l=l+1|0;else{l=0;break}else l=1}return y=a,l|0}function I6(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;r=t+8|0,f=0,n=u0(75,e[r>>2]|0)|0,s=f,f=0;do if(s&1)o=16;else{if(f=0,s=L0(35,0,0,4)|0,t=f,f=0,t&1){if(t=b(0)|0,!n||(f=0,u0(75,n|0)|0,a=f,f=0,!(a&1)))break;a=b(0)|0,Ie(a)}if(n|0&&(f=0,u0(75,n|0)|0,a=f,f=0,a&1)&&(a=b(0)|0,Ie(a)),s)l=-1;else if(t=e[r>>2]|0,t){if(f=0,t=u0(75,t|0)|0,a=f,f=0,a&1){o=16;break}t|0&&(f=0,u0(75,t|0)|0,a=f,f=0,a&1)?(a=b(0)|0,Ie(a)):l=0}else l=1;return l|0}while(!1);return(o|0)==16&&(t=b(0)|0),Ie(t),0}function D6(t){return t=t|0,0}function E6(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;p=s,h=t+8|0;e:do if((n|0)==(s|0)|(o|0)==0)t=0;else{for(t=0,c=0;;){if(a=nt(e[h>>2]|0)|0,f=0,l=L0(36,n|0,p-n|0,r|0)|0,I=f,f=0,I&1){C=a;break}if(a|0&&(f=0,u0(75,a|0)|0,I=f,f=0,I&1)){g=5;break}switch(l|0){case-2:case-1:break e;case 0:{n=n+1|0,l=1;break}default:n=n+l|0}if(t=l+t|0,c=c+1|0,(n|0)==(s|0)|c>>>0>=o>>>0)break e}(g|0)==5&&(I=b(0)|0,Ie(I)),t=b()|0,C|0&&(f=0,u0(75,C|0)|0,I=f,f=0,I&1)&&(I=b(0)|0,Ie(I)),r0(t|0)}while(!1);return t|0}function k6(t){t=t|0;var r=0,n=0;return t=e[t+8>>2]|0,t?(f=0,t=u0(75,t|0)|0,n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),t|0&&(f=0,u0(75,t|0)|0,n=f,f=0,n&1)?(n=b(0)|0,Ie(n)):r=4):r=1,r|0}function F6(t){t=t|0,a0(t)}function M6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0;return t=y,y=y+16|0,h=t+4|0,r=t,e[h>>2]=n,e[r>>2]=l,a=I8(n,s,h,l,a,r,1114111,0)|0,e[o>>2]=e[h>>2],e[c>>2]=e[r>>2],y=t,a|0}function _6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0;return t=y,y=y+16|0,h=t+4|0,r=t,e[h>>2]=n,e[r>>2]=l,a=D8(n,s,h,l,a,r,1114111,0)|0,e[o>>2]=e[h>>2],e[c>>2]=e[r>>2],y=t,a|0}function R6(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,e[o>>2]=n,3}function P6(t){return t=t|0,0}function L6(t){return t=t|0,0}function U6(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,E8(n,s,o,1114111,0)|0}function O6(t){return t=t|0,4}function N6(t){t=t|0,a0(t)}function B6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0;return t=y,y=y+16|0,h=t+4|0,r=t,e[h>>2]=n,e[r>>2]=l,a=k8(n,s,h,l,a,r,1114111,0)|0,e[o>>2]=e[h>>2],e[c>>2]=e[r>>2],y=t,a|0}function V6(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0;return t=y,y=y+16|0,h=t+4|0,r=t,e[h>>2]=n,e[r>>2]=l,a=F8(n,s,h,l,a,r,1114111,0)|0,e[o>>2]=e[h>>2],e[c>>2]=e[r>>2],y=t,a|0}function q6(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,e[o>>2]=n,3}function b6(t){return t=t|0,0}function G6(t){return t=t|0,0}function Q6(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,M8(n,s,o,1114111,0)|0}function z6(t){return t=t|0,4}function H6(t){t=t|0,a0(t)}function Y6(t){t=t|0,a0(t)}function j6(t,r){t=t|0,r=r|0,e[t+4>>2]=r+-1,e[t>>2]=44384,d[t+8>>0]=46,d[t+9>>0]=44,t=t+12|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function X6(t,r){t=t|0,r=r|0,e[t+4>>2]=r+-1,e[t>>2]=44424,e[t+8>>2]=46,e[t+12>>2]=44,t=t+16|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0}function K2(t){t=t|0,e[t>>2]=44384,f0(t+12|0)}function K6(t){t=t|0,K2(t),a0(t)}function W2(t){t=t|0,e[t>>2]=44424,f0(t+16|0)}function W6(t){t=t|0,W2(t),a0(t)}function Z6(t){return t=t|0,d[t+8>>0]|0}function J6(t){return t=t|0,e[t+8>>2]|0}function $6(t){return t=t|0,d[t+9>>0]|0}function em(t){return t=t|0,e[t+12>>2]|0}function im(t,r){t=t|0,r=r|0,l1(t,r+12|0)}function tm(t,r){t=t|0,r=r|0,l1(t,r+16|0)}function rm(t,r){t=t|0,r=r|0,Tt(t,59024,4)}function nm(t,r){t=t|0,r=r|0,u1(t,44996,Mr(44996)|0)}function sm(t,r){t=t|0,r=r|0,Tt(t,59029,5)}function om(t,r){t=t|0,r=r|0,u1(t,45016,Mr(45016)|0)}function st(t){switch(t=t|0,e[t+4>>2]&74|0){case 64:{t=8;break}case 8:{t=16;break}case 0:{t=0;break}default:t=10}return t|0}function lm(t){t=t|0;do if(!(d[2464]|0)&&Ae(2464)|0){if(!(d[2472]|0)&&Ae(2472)|0){t=45040;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=45208);Te(193,0,Q|0)|0,ve(2472)}if(f=0,y0(41,45040,59035)|0,t=f,f=0,!(t&1)&&(f=0,y0(41,45052,59042)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45064,59049)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45076,59057)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45088,59067)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45100,59076)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45112,59083)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45124,59092)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45136,59096)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45148,59100)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45160,59104)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45172,59108)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45184,59112)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45196,59116)|0,t=f,f=0,!(t&1))){e[11302]=45040,ve(2464);break}t=b()|0,bi(2464),r0(t|0)}while(!1);return e[11302]|0}function am(t){t=t|0;do if(!(d[2480]|0)&&Ae(2480)|0){if(!(d[2488]|0)&&Ae(2488)|0){t=45212;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=45380);Te(194,0,Q|0)|0,ve(2488)}if(f=0,y0(42,45212,45380)|0,t=f,f=0,!(t&1)&&(f=0,y0(42,45224,45408)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45236,45436)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45248,45468)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45260,45508)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45272,45544)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45284,45572)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45296,45608)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45308,45624)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45320,45640)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45332,45656)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45344,45672)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45356,45688)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,45368,45704)|0,t=f,f=0,!(t&1))){e[11430]=45212,ve(2480);break}t=b()|0,bi(2480),r0(t|0)}while(!1);return e[11430]|0}function fm(t){t=t|0;e:do if(!(d[2496]|0)&&Ae(2496)|0){if(!(d[2504]|0)&&Ae(2504)|0){t=45724;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=46012);Te(195,0,Q|0)|0,ve(2504)}f=0,y0(41,45724,59120)|0,t=f,f=0;do if(!(t&1)&&(f=0,y0(41,45736,59128)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45748,59137)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45760,59143)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45772,59149)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45784,59153)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45796,59158)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45808,59163)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45820,59170)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45832,59180)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45844,59188)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45856,59197)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45868,59206)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45880,59210)|0,t=f,f=0,!(t&1))&&(f=0,y0(41,45892,59214)|0,t=f,f=0,!(t&1))){if(f=0,y0(41,45904,59218)|0,t=f,f=0,t&1||(f=0,y0(41,45916,59149)|0,t=f,f=0,t&1)||(f=0,y0(41,45928,59222)|0,t=f,f=0,t&1)||(f=0,y0(41,45940,59226)|0,t=f,f=0,t&1)||(f=0,y0(41,45952,59230)|0,t=f,f=0,t&1)||(f=0,y0(41,45964,59234)|0,t=f,f=0,t&1)||(f=0,y0(41,45976,59238)|0,t=f,f=0,t&1)||(f=0,y0(41,45988,59242)|0,t=f,f=0,t&1)||(f=0,y0(41,46e3,59246)|0,t=f,f=0,t&1))break;e[11503]=45724,ve(2496);break e}while(!1);t=b()|0,bi(2496),r0(t|0)}while(!1);return e[11503]|0}function um(t){t=t|0;e:do if(!(d[2512]|0)&&Ae(2512)|0){if(!(d[2520]|0)&&Ae(2520)|0){t=46016;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=46304);Te(196,0,Q|0)|0,ve(2520)}f=0,y0(42,46016,46304)|0,t=f,f=0;do if(!(t&1)&&(f=0,y0(42,46028,46336)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46040,46372)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46052,46396)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46064,46420)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46076,46436)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46088,46456)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46100,46476)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46112,46504)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46124,46544)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46136,46576)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46148,46612)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46160,46648)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46172,46664)|0,t=f,f=0,!(t&1))&&(f=0,y0(42,46184,46680)|0,t=f,f=0,!(t&1))){if(f=0,y0(42,46196,46696)|0,t=f,f=0,t&1||(f=0,y0(42,46208,46420)|0,t=f,f=0,t&1)||(f=0,y0(42,46220,46712)|0,t=f,f=0,t&1)||(f=0,y0(42,46232,46728)|0,t=f,f=0,t&1)||(f=0,y0(42,46244,46744)|0,t=f,f=0,t&1)||(f=0,y0(42,46256,46760)|0,t=f,f=0,t&1)||(f=0,y0(42,46268,46776)|0,t=f,f=0,t&1)||(f=0,y0(42,46280,46792)|0,t=f,f=0,t&1)||(f=0,y0(42,46292,46808)|0,t=f,f=0,t&1))break;e[11706]=46016,ve(2512);break e}while(!1);t=b()|0,bi(2512),r0(t|0)}while(!1);return e[11706]|0}function cm(t){t=t|0;do if(!(d[2528]|0)&&Ae(2528)|0){if(!(d[2536]|0)&&Ae(2536)|0){t=46828;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=47116);Te(197,0,Q|0)|0,ve(2536)}if(f=0,y0(41,46828,59250)|0,t=f,f=0,!(t&1)&&(f=0,y0(41,46840,59253)|0,t=f,f=0,!(t&1))){e[11779]=46828,ve(2528);break}t=b()|0,bi(2528),r0(t|0)}while(!1);return e[11779]|0}function hm(t){t=t|0;do if(!(d[2544]|0)&&Ae(2544)|0){if(!(d[2552]|0)&&Ae(2552)|0){t=47120;do e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,t=t+12|0;while((t|0)!=47408);Te(198,0,Q|0)|0,ve(2552)}if(f=0,y0(42,47120,47408)|0,t=f,f=0,!(t&1)&&(f=0,y0(42,47132,47420)|0,t=f,f=0,!(t&1))){e[11858]=47120,ve(2544);break}t=b()|0,bi(2544),r0(t|0)}while(!1);return e[11858]|0}function mm(t){t=t|0;do if(!(d[2560]|0)&&Ae(2560)|0)if(f=0,m0(5,47436,59256,8),t=f,f=0,t&1)t=b()|0,bi(2560),r0(t|0);else{Te(199,47436,Q|0)|0,ve(2560);break}while(!1);return 47436}function dm(t){t=t|0;var r=0;do if(!(d[2568]|0)&&Ae(2568)|0){if(f=0,t=u0(76,47448)|0,r=f,f=0,!(r&1)&&(f=0,m0(15,47484,47448,t|0),r=f,f=0,!(r&1))){Te(200,47484,Q|0)|0,ve(2568);break}r=b()|0,bi(2568),r0(r|0)}while(!1);return 47484}function gm(t){t=t|0;do if(!(d[2576]|0)&&Ae(2576)|0)if(f=0,m0(5,47496,59265,8),t=f,f=0,t&1)t=b()|0,bi(2576),r0(t|0);else{Te(199,47496,Q|0)|0,ve(2576);break}while(!1);return 47496}function pm(t){t=t|0;var r=0;do if(!(d[2584]|0)&&Ae(2584)|0){if(f=0,t=u0(76,47508)|0,r=f,f=0,!(r&1)&&(f=0,m0(15,47544,47508,t|0),r=f,f=0,!(r&1))){Te(200,47544,Q|0)|0,ve(2584);break}r=b()|0,bi(2584),r0(r|0)}while(!1);return 47544}function Am(t){t=t|0;do if(!(d[2592]|0)&&Ae(2592)|0)if(f=0,m0(5,47556,59274,20),t=f,f=0,t&1)t=b()|0,bi(2592),r0(t|0);else{Te(199,47556,Q|0)|0,ve(2592);break}while(!1);return 47556}function Sm(t){t=t|0;var r=0;do if(!(d[2600]|0)&&Ae(2600)|0){if(f=0,t=u0(76,47568)|0,r=f,f=0,!(r&1)&&(f=0,m0(15,47652,47568,t|0),r=f,f=0,!(r&1))){Te(200,47652,Q|0)|0,ve(2600);break}r=b()|0,bi(2600),r0(r|0)}while(!1);return 47652}function vm(t){t=t|0;do if(!(d[2608]|0)&&Ae(2608)|0)if(f=0,m0(5,47664,59295,11),t=f,f=0,t&1)t=b()|0,bi(2608),r0(t|0);else{Te(199,47664,Q|0)|0,ve(2608);break}while(!1);return 47664}function wm(t){t=t|0;var r=0;do if(!(d[2616]|0)&&Ae(2616)|0){if(f=0,t=u0(76,47676)|0,r=f,f=0,!(r&1)&&(f=0,m0(15,47724,47676,t|0),r=f,f=0,!(r&1))){Te(200,47724,Q|0)|0,ve(2616);break}r=b()|0,bi(2616),r0(r|0)}while(!1);return 47724}function Z2(t){t=t|0;var r=0,n=0,s=0;e[t>>2]=44304,t=t+8|0,r=e[t>>2]|0,f=0,n=p0(3)|0,s=f,f=0;do if(!(s&1)){if((r|0)!=(n|0)&&(f=0,n0(188,e[t>>2]|0),s=f,f=0,s&1))break;return}while(!1);s=b(0)|0,Ie(s)}function mr(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0;M=y,y=y+112|0,h=M,g=(s-n|0)/12|0;do if(g>>>0>100){if(h=xi(g)|0,!(h|0)&&(f=0,we(6),F=f,f=0,F&1)){c=0,k=6;break}c=h,k=11}else c=0,k=11;while(!1);e:do if((k|0)==11){if((n|0)==(s|0))p=0;else for(k=n,C=0,I=h;p=d[k>>0]|0,p&1?p=e[k+4>>2]|0:p=(p&255)>>>1,p?(d[I>>0]=1,p=C):(d[I>>0]=2,p=C+1|0,g=g+-1|0),k=k+12|0,(k|0)!=(s|0);)C=p,I=I+1|0;_=(n|0)==(s|0),F=(n|0)==(s|0),O=0,U=p;i:for(;;){p=e[t>>2]|0;do if(p){if((e[p+12>>2]|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,V=f,f=0,V&1){k=5;break i}if((p|0)==-1){e[t>>2]=0,p=0;break}else{p=e[t>>2]|0;break}}}else p=0;while(!1);if(k=(p|0)==0,C=e[r>>2]|0,C){if((e[C+12>>2]|0)==(e[C+16>>2]|0)){if(f=0,p=u0(e[(e[C>>2]|0)+36>>2]|0,C|0)|0,V=f,f=0,V&1){k=5;break}(p|0)==-1&&(e[r>>2]=0,C=0)}}else C=0;if(I=(C|0)==0,p=e[t>>2]|0,!((g|0)!=0&(k^I))){k=64;break}if(C=e[p+12>>2]|0,(C|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,V=f,f=0,V&1){k=5;break}}else p=N[C>>0]|0;if(p=p&255,!a&&(f=0,p=y0(e[(e[o>>2]|0)+12>>2]|0,o|0,p|0)|0,V=f,f=0,V&1)){k=5;break}if(V=O+1|0,_)p=0,k=U;else for(I=0,B=n,k=U,U=h;;){do if((d[U>>0]|0)==1){if(d[B>>0]&1?C=e[B+8>>2]|0:C=B+1|0,C=d[C+O>>0]|0,!a&&(f=0,C=y0(e[(e[o>>2]|0)+12>>2]|0,o|0,C|0)|0,X=f,f=0,X&1)){k=4;break i}if(p<<24>>24!=C<<24>>24){d[U>>0]=0,C=I,g=g+-1|0;break}C=d[B>>0]|0,C&1?C=e[B+4>>2]|0:C=(C&255)>>>1,(C|0)==(V|0)?(d[U>>0]=2,C=1,k=k+1|0,g=g+-1|0):C=1}else C=I;while(!1);if(B=B+12|0,(B|0)==(s|0)){p=C;break}else I=C,U=U+1|0}if(!p){O=V,U=k;continue}if(p=e[t>>2]|0,C=p+12|0,I=e[C>>2]|0,(I|0)==(e[p+16>>2]|0)){if(f=0,u0(e[(e[p>>2]|0)+40>>2]|0,p|0)|0,X=f,f=0,X&1){k=5;break}}else e[C>>2]=I+1;if((k+g|0)>>>0<2|F){O=V,U=k;continue}else p=n,I=k,k=h;for(;;)if((d[k>>0]|0)==2&&(C=d[p>>0]|0,C&1?C=e[p+4>>2]|0:C=(C&255)>>>1,(C|0)!=(V|0)&&(d[k>>0]=0,I=I+-1|0)),p=p+12|0,(p|0)==(s|0)){O=V,U=I;continue i}else k=k+1|0}if((k|0)==4){n=b()|0;break}else if((k|0)==5){n=b()|0;break}else if((k|0)==64){do if(p){if((e[p+12>>2]|0)==(e[p+16>>2]|0)){if(f=0,p=u0(e[(e[p>>2]|0)+36>>2]|0,p|0)|0,X=f,f=0,X&1){k=6;break e}if((p|0)==-1){e[t>>2]=0,p=0;break}else{p=e[t>>2]|0;break}}}else p=0;while(!1);g=(p|0)==0;do if(I)k=76;else{if((e[C+12>>2]|0)==(e[C+16>>2]|0)){if(f=0,p=u0(e[(e[C>>2]|0)+36>>2]|0,C|0)|0,X=f,f=0,X&1){k=6;break e}if((p|0)==-1){e[r>>2]=0,k=76;break}}g||(k=77)}while(!1);(k|0)==76&&g&&(k=77),(k|0)==77&&(e[l>>2]=e[l>>2]|2);i:do if((n|0)==(s|0))k=81;else for(;;){if((d[h>>0]|0)==2)break i;if(n=n+12|0,(n|0)==(s|0)){k=81;break}else h=h+1|0}while(!1);return(k|0)==81&&(e[l>>2]=e[l>>2]|4,n=s),c&&Ze(c),y=M,n|0}}while(!1);return(k|0)==6&&(n=b()|0),c&&Ze(c),r0(n|0),0}function Tm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=25;else{C=K+8|0,I=K+1|0,s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,p=f,f=0,p&1){Z=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;c=(t|0)==0,a=e[n>>2]|0;do if(a){if((e[a+12>>2]|0)!=(e[a+16>>2]|0)){if(c)break;break i}if(f=0,h=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=24;break i}if((h|0)!=-1){if(c)break;break i}else{e[n>>2]=0,Z=16;break}}else Z=16;while(!1);if((Z|0)==16)if(Z=0,c){a=0;break}else a=0;if(c=d[K>>0]|0,c=c&1?e[k>>2]|0:(c&255)>>>1,(e[V>>2]|0)==(s+c|0)){if(f=0,m0(8,K|0,c<<1|0,0),p=f,f=0,p&1){Z=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,m0(8,K|0,s|0,0),p=f,f=0,p&1){Z=24;break}s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s+c}if(h=t+12|0,c=e[h>>2]|0,p=t+16|0,(c|0)==(e[p>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}}else c=N[c>>0]|0;if(Rt(c&255,B,s,V,O,g,t0,F,M,U)|0)break;if(a=e[h>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}else continue;else{e[h>>2]=a+1;continue}}if((Z|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,s=k0(21,s|0,e[V>>2]|0,o|0,B|0)|0,s0=f,f=0,s0&1)Z=25;else{if(e[l>>2]=s,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=25;break e}if((t|0)==-1){e[n>>2]=0,Z=49;break}}s||(Z=50)}else Z=49;while(!1);return(Z|0)==49&&s&&(Z=50),(Z|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==25&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Cm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=25;else{C=K+8|0,I=K+1|0,s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,p=f,f=0,p&1){Z=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;a=(t|0)==0,c=e[n>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0)){if(a)break;break i}if(f=0,h=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,p=f,f=0,p&1){Z=24;break i}if((h|0)!=-1){if(a)break;break i}else{e[n>>2]=0,Z=16;break}}else Z=16;while(!1);if((Z|0)==16)if(Z=0,a){c=0;break}else c=0;if(a=d[K>>0]|0,a=a&1?e[k>>2]|0:(a&255)>>>1,(e[V>>2]|0)==(s+a|0)){if(f=0,m0(8,K|0,a<<1|0,0),p=f,f=0,p&1){Z=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,m0(8,K|0,s|0,0),p=f,f=0,p&1){Z=24;break}s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s+a}if(h=t+12|0,a=e[h>>2]|0,p=t+16|0,(a|0)==(e[p>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}}else a=N[a>>0]|0;if(Rt(a&255,B,s,V,O,g,t0,F,M,U)|0)break;if(a=e[h>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}else continue;else{e[h>>2]=a+1;continue}}if((Z|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,s=k0(22,s|0,e[V>>2]|0,o|0,B|0)|0,a=I0,s0=f,f=0,s0&1)Z=25;else{if(s0=l,e[s0>>2]=s,e[s0+4>>2]=a,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,s0=f,f=0,s0&1){Z=25;break e}if((t|0)==-1){e[n>>2]=0,Z=49;break}}s||(Z=50)}else Z=49;while(!1);return(Z|0)==49&&s&&(Z=50),(Z|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==25&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function xm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=25;else{C=K+8|0,I=K+1|0,s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,p=f,f=0,p&1){Z=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;c=(t|0)==0,a=e[n>>2]|0;do if(a){if((e[a+12>>2]|0)!=(e[a+16>>2]|0)){if(c)break;break i}if(f=0,h=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=24;break i}if((h|0)!=-1){if(c)break;break i}else{e[n>>2]=0,Z=16;break}}else Z=16;while(!1);if((Z|0)==16)if(Z=0,c){a=0;break}else a=0;if(c=d[K>>0]|0,c=c&1?e[k>>2]|0:(c&255)>>>1,(e[V>>2]|0)==(s+c|0)){if(f=0,m0(8,K|0,c<<1|0,0),p=f,f=0,p&1){Z=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,m0(8,K|0,s|0,0),p=f,f=0,p&1){Z=24;break}s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s+c}if(h=t+12|0,c=e[h>>2]|0,p=t+16|0,(c|0)==(e[p>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}}else c=N[c>>0]|0;if(Rt(c&255,B,s,V,O,g,t0,F,M,U)|0)break;if(a=e[h>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}else continue;else{e[h>>2]=a+1;continue}}if((Z|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,s=k0(23,s|0,e[V>>2]|0,o|0,B|0)|0,s0=f,f=0,s0&1)Z=25;else{if(E[l>>1]=s,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=25;break e}if((t|0)==-1){e[n>>2]=0,Z=49;break}}s||(Z=50)}else Z=49;while(!1);return(Z|0)==49&&s&&(Z=50),(Z|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==25&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function ym(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=25;else{C=K+8|0,I=K+1|0,s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,p=f,f=0,p&1){Z=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;c=(t|0)==0,a=e[n>>2]|0;do if(a){if((e[a+12>>2]|0)!=(e[a+16>>2]|0)){if(c)break;break i}if(f=0,h=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=24;break i}if((h|0)!=-1){if(c)break;break i}else{e[n>>2]=0,Z=16;break}}else Z=16;while(!1);if((Z|0)==16)if(Z=0,c){a=0;break}else a=0;if(c=d[K>>0]|0,c=c&1?e[k>>2]|0:(c&255)>>>1,(e[V>>2]|0)==(s+c|0)){if(f=0,m0(8,K|0,c<<1|0,0),p=f,f=0,p&1){Z=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,m0(8,K|0,s|0,0),p=f,f=0,p&1){Z=24;break}s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s+c}if(h=t+12|0,c=e[h>>2]|0,p=t+16|0,(c|0)==(e[p>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}}else c=N[c>>0]|0;if(Rt(c&255,B,s,V,O,g,t0,F,M,U)|0)break;if(a=e[h>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}else continue;else{e[h>>2]=a+1;continue}}if((Z|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,s=k0(24,s|0,e[V>>2]|0,o|0,B|0)|0,s0=f,f=0,s0&1)Z=25;else{if(e[l>>2]=s,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=25;break e}if((t|0)==-1){e[n>>2]=0,Z=49;break}}s||(Z=50)}else Z=49;while(!1);return(Z|0)==49&&s&&(Z=50),(Z|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==25&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Im(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=25;else{C=K+8|0,I=K+1|0,s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,p=f,f=0,p&1){Z=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;c=(t|0)==0,a=e[n>>2]|0;do if(a){if((e[a+12>>2]|0)!=(e[a+16>>2]|0)){if(c)break;break i}if(f=0,h=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=24;break i}if((h|0)!=-1){if(c)break;break i}else{e[n>>2]=0,Z=16;break}}else Z=16;while(!1);if((Z|0)==16)if(Z=0,c){a=0;break}else a=0;if(c=d[K>>0]|0,c=c&1?e[k>>2]|0:(c&255)>>>1,(e[V>>2]|0)==(s+c|0)){if(f=0,m0(8,K|0,c<<1|0,0),p=f,f=0,p&1){Z=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,m0(8,K|0,s|0,0),p=f,f=0,p&1){Z=24;break}s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s+c}if(h=t+12|0,c=e[h>>2]|0,p=t+16|0,(c|0)==(e[p>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}}else c=N[c>>0]|0;if(Rt(c&255,B,s,V,O,g,t0,F,M,U)|0)break;if(a=e[h>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}else continue;else{e[h>>2]=a+1;continue}}if((Z|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,s=k0(25,s|0,e[V>>2]|0,o|0,B|0)|0,s0=f,f=0,s0&1)Z=25;else{if(e[l>>2]=s,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=25;break e}if((t|0)==-1){e[n>>2]=0,Z=49;break}}s||(Z=50)}else Z=49;while(!1);return(Z|0)==49&&s&&(Z=50),(Z|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==25&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Dm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+240|0,U=X+202|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Gt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=25;else{C=K+8|0,I=K+1|0,s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=d[a>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,p=f,f=0,p&1){Z=24;break}(a|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;a=(t|0)==0,c=e[n>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0)){if(a)break;break i}if(f=0,h=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,p=f,f=0,p&1){Z=24;break i}if((h|0)!=-1){if(a)break;break i}else{e[n>>2]=0,Z=16;break}}else Z=16;while(!1);if((Z|0)==16)if(Z=0,a){c=0;break}else c=0;if(a=d[K>>0]|0,a=a&1?e[k>>2]|0:(a&255)>>>1,(e[V>>2]|0)==(s+a|0)){if(f=0,m0(8,K|0,a<<1|0,0),p=f,f=0,p&1){Z=24;break}if(d[K>>0]&1?s=(e[K>>2]&-2)+-1|0:s=10,f=0,m0(8,K|0,s|0,0),p=f,f=0,p&1){Z=24;break}s=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=s+a}if(h=t+12|0,a=e[h>>2]|0,p=t+16|0,(a|0)==(e[p>>2]|0)){if(f=0,a=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}}else a=N[a>>0]|0;if(Rt(a&255,B,s,V,O,g,t0,F,M,U)|0)break;if(a=e[h>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=24;break}else continue;else{e[h>>2]=a+1;continue}}if((Z|0)==24){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,s=k0(26,s|0,e[V>>2]|0,o|0,B|0)|0,a=I0,s0=f,f=0,s0&1)Z=25;else{if(s0=l,e[s0>>2]=s,e[s0+4>>2]=a,Oi(t0,F,e[M>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,s0=f,f=0,s0&1){Z=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,s0=f,f=0,s0&1){Z=25;break e}if((t|0)==-1){e[n>>2]=0,Z=49;break}}s||(Z=50)}else Z=49;while(!1);return(Z|0)==49&&s&&(Z=50),(Z|0)==50&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==25&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Em(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;Z=y,y=y+240|0,V=Z+208|0,c=Z+203|0,h=Z+202|0,w0=Z+24|0,s0=Z+12|0,_=Z+8|0,K=Z+40|0,t0=Z+4|0,F=Z,M=Z+201|0,O=Z+200|0,m1(w0,s,V,c,h),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),B=f,f=0;e:do if(B&1)v0=25;else{k=s0+8|0,U=s0+1|0,s=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=s,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,B=s0+4|0,I=d[c>>0]|0,C=d[h>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,g=f,f=0,g&1){v0=24;break}(c|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;h=(t|0)==0,c=e[n>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0)){if(h)break;break i}if(f=0,p=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,g=f,f=0,g&1){v0=24;break i}if((p|0)!=-1){if(h)break;break i}else{e[n>>2]=0,v0=16;break}}else v0=16;while(!1);if((v0|0)==16)if(v0=0,h){c=0;break}else c=0;if(h=d[s0>>0]|0,h=h&1?e[B>>2]|0:(h&255)>>>1,(e[_>>2]|0)==(s+h|0)){if(f=0,m0(8,s0|0,h<<1|0,0),g=f,f=0,g&1){v0=24;break}if(d[s0>>0]&1?s=(e[s0>>2]&-2)+-1|0:s=10,f=0,m0(8,s0|0,s|0,0),g=f,f=0,g&1){v0=24;break}s=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=s+h}if(p=t+12|0,h=e[p>>2]|0,g=t+16|0,(h|0)==(e[g>>2]|0)){if(f=0,h=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=24;break}}else h=N[h>>0]|0;if(d1(h&255,M,O,s,_,I,C,w0,K,t0,F,V)|0)break;if(c=e[p>>2]|0,(c|0)==(e[g>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=24;break}else continue;else{e[p>>2]=c+1;continue}}if((v0|0)==24){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+J0(1,s|0,e[_>>2]|0,o|0),A0=f,f=0,A0&1)v0=25;else{if(e0[l>>2]=a,Oi(w0,K,e[t0>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){v0=25;break e}if((t|0)==-1){e[n>>2]=0,v0=49;break}}s||(v0=50)}else v0=49;while(!1);return(v0|0)==49&&s&&(v0=50),(v0|0)==50&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,f0(s0),f0(w0),y=Z,A0|0}}while(!1);return(v0|0)==25&&(t=b()|0),f0(s0),f0(w0),r0(t|0),0}function km(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;Z=y,y=y+240|0,V=Z+208|0,c=Z+203|0,h=Z+202|0,w0=Z+24|0,s0=Z+12|0,_=Z+8|0,K=Z+40|0,t0=Z+4|0,F=Z,M=Z+201|0,O=Z+200|0,m1(w0,s,V,c,h),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),B=f,f=0;e:do if(B&1)v0=25;else{k=s0+8|0,U=s0+1|0,s=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=s,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,B=s0+4|0,I=d[c>>0]|0,C=d[h>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,g=f,f=0,g&1){v0=24;break}(c|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;h=(t|0)==0,c=e[n>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0)){if(h)break;break i}if(f=0,p=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,g=f,f=0,g&1){v0=24;break i}if((p|0)!=-1){if(h)break;break i}else{e[n>>2]=0,v0=16;break}}else v0=16;while(!1);if((v0|0)==16)if(v0=0,h){c=0;break}else c=0;if(h=d[s0>>0]|0,h=h&1?e[B>>2]|0:(h&255)>>>1,(e[_>>2]|0)==(s+h|0)){if(f=0,m0(8,s0|0,h<<1|0,0),g=f,f=0,g&1){v0=24;break}if(d[s0>>0]&1?s=(e[s0>>2]&-2)+-1|0:s=10,f=0,m0(8,s0|0,s|0,0),g=f,f=0,g&1){v0=24;break}s=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=s+h}if(p=t+12|0,h=e[p>>2]|0,g=t+16|0,(h|0)==(e[g>>2]|0)){if(f=0,h=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=24;break}}else h=N[h>>0]|0;if(d1(h&255,M,O,s,_,I,C,w0,K,t0,F,V)|0)break;if(c=e[p>>2]|0,(c|0)==(e[g>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=24;break}else continue;else{e[p>>2]=c+1;continue}}if((v0|0)==24){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+J0(2,s|0,e[_>>2]|0,o|0),A0=f,f=0,A0&1)v0=25;else{if(H[l>>3]=a,Oi(w0,K,e[t0>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){v0=25;break e}if((t|0)==-1){e[n>>2]=0,v0=49;break}}s||(v0=50)}else v0=49;while(!1);return(v0|0)==49&&s&&(v0=50),(v0|0)==50&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,f0(s0),f0(w0),y=Z,A0|0}}while(!1);return(v0|0)==25&&(t=b()|0),f0(s0),f0(w0),r0(t|0),0}function Fm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;Z=y,y=y+240|0,V=Z+208|0,c=Z+203|0,h=Z+202|0,w0=Z+24|0,s0=Z+12|0,_=Z+8|0,K=Z+40|0,t0=Z+4|0,F=Z,M=Z+201|0,O=Z+200|0,m1(w0,s,V,c,h),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),B=f,f=0;e:do if(B&1)v0=25;else{k=s0+8|0,U=s0+1|0,s=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=s,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,B=s0+4|0,I=d[c>>0]|0,C=d[h>>0]|0,t=e[r>>2]|0;i:for(;;){if(t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,c=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,g=f,f=0,g&1){v0=24;break}(c|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;h=(t|0)==0,c=e[n>>2]|0;do if(c){if((e[c+12>>2]|0)!=(e[c+16>>2]|0)){if(h)break;break i}if(f=0,p=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,g=f,f=0,g&1){v0=24;break i}if((p|0)!=-1){if(h)break;break i}else{e[n>>2]=0,v0=16;break}}else v0=16;while(!1);if((v0|0)==16)if(v0=0,h){c=0;break}else c=0;if(h=d[s0>>0]|0,h=h&1?e[B>>2]|0:(h&255)>>>1,(e[_>>2]|0)==(s+h|0)){if(f=0,m0(8,s0|0,h<<1|0,0),g=f,f=0,g&1){v0=24;break}if(d[s0>>0]&1?s=(e[s0>>2]&-2)+-1|0:s=10,f=0,m0(8,s0|0,s|0,0),g=f,f=0,g&1){v0=24;break}s=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=s+h}if(p=t+12|0,h=e[p>>2]|0,g=t+16|0,(h|0)==(e[g>>2]|0)){if(f=0,h=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=24;break}}else h=N[h>>0]|0;if(d1(h&255,M,O,s,_,I,C,w0,K,t0,F,V)|0)break;if(c=e[p>>2]|0,(c|0)==(e[g>>2]|0))if(f=0,u0(e[(e[t>>2]|0)+40>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=24;break}else continue;else{e[p>>2]=c+1;continue}}if((v0|0)==24){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+J0(3,s|0,e[_>>2]|0,o|0),A0=f,f=0,A0&1)v0=25;else{if(H[l>>3]=a,Oi(w0,K,e[t0>>2]|0,o),t){if((e[t+12>>2]|0)==(e[t+16>>2]|0)){if(f=0,s=u0(e[(e[t>>2]|0)+36>>2]|0,t|0)|0,A0=f,f=0,A0&1){v0=25;break}(s|0)==-1&&(e[r>>2]=0,t=0)}}else t=0;s=(t|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){v0=25;break e}if((t|0)==-1){e[n>>2]=0,v0=49;break}}s||(v0=50)}else v0=49;while(!1);return(v0|0)==49&&s&&(v0=50),(v0|0)==50&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,f0(s0),f0(w0),y=Z,A0|0}}while(!1);return(v0|0)==25&&(t=b()|0),f0(s0),f0(w0),r0(t|0),0}function Mm(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;return o=y,y=y+16|0,l=o,e[l>>2]=s,s=nt(r)|0,r=Rn(t,n,l)|0,s|0&&(f=0,u0(75,s|0)|0,l=f,f=0,l&1)&&(l=b(0)|0,Ie(l)),y=o,r|0}function dr(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0;var c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0;M=y,y=y+112|0,h=M,g=(s-n|0)/12|0;do if(g>>>0>100){if(h=xi(g)|0,!(h|0)&&(f=0,we(6),F=f,f=0,F&1)){c=0,I=6;break}c=h,I=11}else c=0,I=11;while(!1);e:do if((I|0)==11){if((n|0)==(s|0))p=0;else for(k=n,C=0,I=h;p=d[k>>0]|0,p&1?p=e[k+4>>2]|0:p=(p&255)>>>1,p?(d[I>>0]=1,p=C):(d[I>>0]=2,p=C+1|0,g=g+-1|0),k=k+12|0,(k|0)!=(s|0);)C=p,I=I+1|0;_=(n|0)==(s|0),F=(n|0)==(s|0),O=0,U=g;i:for(;;){g=e[t>>2]|0;do if(g){if(C=e[g+12>>2]|0,(C|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,V=f,f=0,V&1){I=5;break i}}else g=e[C>>2]|0;if((g|0)==-1){e[t>>2]=0,k=1;break}else{k=(e[t>>2]|0)==0;break}}else k=1;while(!1);if(C=e[r>>2]|0,C){if(g=e[C+12>>2]|0,(g|0)==(e[C+16>>2]|0)){if(f=0,g=u0(e[(e[C>>2]|0)+36>>2]|0,C|0)|0,V=f,f=0,V&1){I=5;break}}else g=e[g>>2]|0;(g|0)==-1?(e[r>>2]=0,C=0,I=1):I=0}else C=0,I=1;if(g=e[t>>2]|0,!((U|0)!=0&(k^I))){I=66;break}if(C=e[g+12>>2]|0,(C|0)==(e[g+16>>2]|0)){if(f=0,g=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,V=f,f=0,V&1){I=5;break}}else g=e[C>>2]|0;if(!a&&(f=0,g=y0(e[(e[o>>2]|0)+28>>2]|0,o|0,g|0)|0,V=f,f=0,V&1)){I=5;break}if(V=O+1|0,_)g=0,k=U;else for(k=0,B=n,I=U,U=h;;){do if((d[U>>0]|0)==1){if(d[B>>0]&1?C=e[B+8>>2]|0:C=B+4|0,C=e[C+(O<<2)>>2]|0,!a&&(f=0,C=y0(e[(e[o>>2]|0)+28>>2]|0,o|0,C|0)|0,X=f,f=0,X&1)){I=4;break i}if((g|0)!=(C|0)){d[U>>0]=0,C=k,I=I+-1|0;break}C=d[B>>0]|0,C&1?C=e[B+4>>2]|0:C=(C&255)>>>1,(C|0)==(V|0)?(d[U>>0]=2,C=1,p=p+1|0,I=I+-1|0):C=1}else C=k;while(!1);if(B=B+12|0,(B|0)==(s|0)){g=C,k=I;break}else k=C,U=U+1|0}if(!g){O=V,U=k;continue}if(g=e[t>>2]|0,C=g+12|0,I=e[C>>2]|0,(I|0)==(e[g+16>>2]|0)){if(f=0,u0(e[(e[g>>2]|0)+40>>2]|0,g|0)|0,X=f,f=0,X&1){I=5;break}}else e[C>>2]=I+4;if((p+k|0)>>>0<2|F){O=V,U=k;continue}else g=n,I=h;for(;;)if((d[I>>0]|0)==2&&(C=d[g>>0]|0,C&1?C=e[g+4>>2]|0:C=(C&255)>>>1,(C|0)!=(V|0)&&(d[I>>0]=0,p=p+-1|0)),g=g+12|0,(g|0)==(s|0)){O=V,U=k;continue i}else I=I+1|0}if((I|0)==4){n=b()|0;break}else if((I|0)==5){n=b()|0;break}else if((I|0)==66){do if(g){if(p=e[g+12>>2]|0,(p|0)==(e[g+16>>2]|0)){if(f=0,p=u0(e[(e[g>>2]|0)+36>>2]|0,g|0)|0,X=f,f=0,X&1){I=6;break e}}else p=e[p>>2]|0;if((p|0)==-1){e[t>>2]=0,g=1;break}else{g=(e[t>>2]|0)==0;break}}else g=1;while(!1);do if(C){if(p=e[C+12>>2]|0,(p|0)==(e[C+16>>2]|0)){if(f=0,p=u0(e[(e[C>>2]|0)+36>>2]|0,C|0)|0,X=f,f=0,X&1){I=6;break e}}else p=e[p>>2]|0;if((p|0)!=-1){if(g)break;I=81;break}else{e[r>>2]=0,I=79;break}}else I=79;while(!1);(I|0)==79&&g&&(I=81),(I|0)==81&&(e[l>>2]=e[l>>2]|2);i:do if((n|0)==(s|0))I=85;else for(;;){if((d[h>>0]|0)==2)break i;if(n=n+12|0,(n|0)==(s|0)){I=85;break}else h=h+1|0}while(!1);return(I|0)==85&&(e[l>>2]=e[l>>2]|4,n=s),c&&Ze(c),y=M,n|0}}while(!1);return(I|0)==6&&(n=b()|0),c&&Ze(c),r0(n|0),0}function _m(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Qt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=26;else{C=K+8|0,I=K+1|0,t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,s=0,c=1):(s=a,c=0)}else s=0,c=1;h=e[n>>2]|0;do if(h){if(a=e[h+12>>2]|0,(a|0)==(e[h+16>>2]|0)){if(f=0,a=u0(e[(e[h>>2]|0)+36>>2]|0,h|0)|0,p=f,f=0,p&1){Z=25;break i}}else a=e[a>>2]|0;if((a|0)!=-1){if(c)break;a=h;break i}else{e[n>>2]=0,Z=17;break}}else Z=17;while(!1);if((Z|0)==17)if(Z=0,c){a=0;break}else h=0;if(a=d[K>>0]|0,a=a&1?e[k>>2]|0:(a&255)>>>1,(e[V>>2]|0)==(t+a|0)){if(f=0,m0(8,K|0,a<<1|0,0),p=f,f=0,p&1){Z=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),p=f,f=0,p&1){Z=25;break}t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t+a}if(c=s+12|0,a=e[c>>2]|0,p=s+16|0,(a|0)==(e[p>>2]|0)){if(f=0,a=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=25;break}}else a=e[a>>2]|0;if(Pt(a,B,t,V,O,g,t0,F,M,U)|0){a=h;break}if(a=e[c>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=25;break}else{a=s;continue}else{e[c>>2]=a+4,a=s;continue}}if((Z|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,t=k0(21,t|0,e[V>>2]|0,o|0,B|0)|0,s0=f,f=0,s0&1)Z=26;else{if(e[l>>2]=t,Oi(t0,F,e[M>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;Z=53;break}else{e[n>>2]=0,Z=51;break}}else Z=51;while(!1);return(Z|0)==51&&s&&(Z=53),(Z|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==26&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Rm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Qt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=26;else{C=K+8|0,I=K+1|0,t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,a=0,h=1):h=0}else a=0,h=1;c=e[n>>2]|0;do if(c){if(s=e[c+12>>2]|0,(s|0)==(e[c+16>>2]|0)){if(f=0,s=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,p=f,f=0,p&1){Z=25;break i}}else s=e[s>>2]|0;if((s|0)!=-1){if(h)break;break i}else{e[n>>2]=0,Z=17;break}}else Z=17;while(!1);if((Z|0)==17)if(Z=0,h){c=0;break}else c=0;if(s=d[K>>0]|0,s=s&1?e[k>>2]|0:(s&255)>>>1,(e[V>>2]|0)==(t+s|0)){if(f=0,m0(8,K|0,s<<1|0,0),p=f,f=0,p&1){Z=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),p=f,f=0,p&1){Z=25;break}t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t+s}if(h=a+12|0,s=e[h>>2]|0,p=a+16|0,(s|0)==(e[p>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=25;break}}else s=e[s>>2]|0;if(Pt(s,B,t,V,O,g,t0,F,M,U)|0)break;if(s=e[h>>2]|0,(s|0)==(e[p>>2]|0))if(f=0,u0(e[(e[a>>2]|0)+40>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=25;break}else continue;else{e[h>>2]=s+4;continue}}if((Z|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,t=k0(22,t|0,e[V>>2]|0,o|0,B|0)|0,s=I0,s0=f,f=0,s0&1)Z=26;else{if(s0=l,e[s0>>2]=t,e[s0+4>>2]=s,Oi(t0,F,e[M>>2]|0,o),a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(c){if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,s0=f,f=0,s0&1){Z=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;Z=53;break}else{e[n>>2]=0,Z=51;break}}else Z=51;while(!1);return(Z|0)==51&&s&&(Z=53),(Z|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==26&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Pm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Qt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=26;else{C=K+8|0,I=K+1|0,t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,s=0,c=1):(s=a,c=0)}else s=0,c=1;h=e[n>>2]|0;do if(h){if(a=e[h+12>>2]|0,(a|0)==(e[h+16>>2]|0)){if(f=0,a=u0(e[(e[h>>2]|0)+36>>2]|0,h|0)|0,p=f,f=0,p&1){Z=25;break i}}else a=e[a>>2]|0;if((a|0)!=-1){if(c)break;a=h;break i}else{e[n>>2]=0,Z=17;break}}else Z=17;while(!1);if((Z|0)==17)if(Z=0,c){a=0;break}else h=0;if(a=d[K>>0]|0,a=a&1?e[k>>2]|0:(a&255)>>>1,(e[V>>2]|0)==(t+a|0)){if(f=0,m0(8,K|0,a<<1|0,0),p=f,f=0,p&1){Z=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),p=f,f=0,p&1){Z=25;break}t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t+a}if(c=s+12|0,a=e[c>>2]|0,p=s+16|0,(a|0)==(e[p>>2]|0)){if(f=0,a=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=25;break}}else a=e[a>>2]|0;if(Pt(a,B,t,V,O,g,t0,F,M,U)|0){a=h;break}if(a=e[c>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=25;break}else{a=s;continue}else{e[c>>2]=a+4,a=s;continue}}if((Z|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,t=k0(23,t|0,e[V>>2]|0,o|0,B|0)|0,s0=f,f=0,s0&1)Z=26;else{if(E[l>>1]=t,Oi(t0,F,e[M>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;Z=53;break}else{e[n>>2]=0,Z=51;break}}else Z=51;while(!1);return(Z|0)==51&&s&&(Z=53),(Z|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==26&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Lm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Qt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=26;else{C=K+8|0,I=K+1|0,t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,s=0,c=1):(s=a,c=0)}else s=0,c=1;h=e[n>>2]|0;do if(h){if(a=e[h+12>>2]|0,(a|0)==(e[h+16>>2]|0)){if(f=0,a=u0(e[(e[h>>2]|0)+36>>2]|0,h|0)|0,p=f,f=0,p&1){Z=25;break i}}else a=e[a>>2]|0;if((a|0)!=-1){if(c)break;a=h;break i}else{e[n>>2]=0,Z=17;break}}else Z=17;while(!1);if((Z|0)==17)if(Z=0,c){a=0;break}else h=0;if(a=d[K>>0]|0,a=a&1?e[k>>2]|0:(a&255)>>>1,(e[V>>2]|0)==(t+a|0)){if(f=0,m0(8,K|0,a<<1|0,0),p=f,f=0,p&1){Z=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),p=f,f=0,p&1){Z=25;break}t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t+a}if(c=s+12|0,a=e[c>>2]|0,p=s+16|0,(a|0)==(e[p>>2]|0)){if(f=0,a=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=25;break}}else a=e[a>>2]|0;if(Pt(a,B,t,V,O,g,t0,F,M,U)|0){a=h;break}if(a=e[c>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=25;break}else{a=s;continue}else{e[c>>2]=a+4,a=s;continue}}if((Z|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,t=k0(24,t|0,e[V>>2]|0,o|0,B|0)|0,s0=f,f=0,s0&1)Z=26;else{if(e[l>>2]=t,Oi(t0,F,e[M>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;Z=53;break}else{e[n>>2]=0,Z=51;break}}else Z=51;while(!1);return(Z|0)==51&&s&&(Z=53),(Z|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==26&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Um(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Qt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=26;else{C=K+8|0,I=K+1|0,t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,s=0,c=1):(s=a,c=0)}else s=0,c=1;h=e[n>>2]|0;do if(h){if(a=e[h+12>>2]|0,(a|0)==(e[h+16>>2]|0)){if(f=0,a=u0(e[(e[h>>2]|0)+36>>2]|0,h|0)|0,p=f,f=0,p&1){Z=25;break i}}else a=e[a>>2]|0;if((a|0)!=-1){if(c)break;a=h;break i}else{e[n>>2]=0,Z=17;break}}else Z=17;while(!1);if((Z|0)==17)if(Z=0,c){a=0;break}else h=0;if(a=d[K>>0]|0,a=a&1?e[k>>2]|0:(a&255)>>>1,(e[V>>2]|0)==(t+a|0)){if(f=0,m0(8,K|0,a<<1|0,0),p=f,f=0,p&1){Z=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),p=f,f=0,p&1){Z=25;break}t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t+a}if(c=s+12|0,a=e[c>>2]|0,p=s+16|0,(a|0)==(e[p>>2]|0)){if(f=0,a=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=25;break}}else a=e[a>>2]|0;if(Pt(a,B,t,V,O,g,t0,F,M,U)|0){a=h;break}if(a=e[c>>2]|0,(a|0)==(e[p>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=25;break}else{a=s;continue}else{e[c>>2]=a+4,a=s;continue}}if((Z|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,t=k0(25,t|0,e[V>>2]|0,o|0,B|0)|0,s0=f,f=0,s0&1)Z=26;else{if(e[l>>2]=t,Oi(t0,F,e[M>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,s0=f,f=0,s0&1){Z=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;Z=53;break}else{e[n>>2]=0,Z=51;break}}else Z=51;while(!1);return(Z|0)==51&&s&&(Z=53),(Z|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==26&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Om(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;X=y,y=y+320|0,U=X+208|0,a=X+200|0,t0=X+24|0,K=X+12|0,V=X+8|0,F=X+40|0,M=X+4|0,O=X,B=st(s)|0,Qt(t0,s,U,a),e[K>>2]=0,e[K+4>>2]=0,e[K+8>>2]=0,d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),k=f,f=0;e:do if(k&1)Z=26;else{C=K+8|0,I=K+1|0,t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t,e[M>>2]=F,e[O>>2]=0,k=K+4|0,g=e[a>>2]|0,a=e[r>>2]|0;i:for(;;){if(a){if(s=e[a+12>>2]|0,(s|0)==(e[a+16>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,p=f,f=0,p&1){Z=25;break}}else s=e[s>>2]|0;(s|0)==-1?(e[r>>2]=0,a=0,h=1):h=0}else a=0,h=1;c=e[n>>2]|0;do if(c){if(s=e[c+12>>2]|0,(s|0)==(e[c+16>>2]|0)){if(f=0,s=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,p=f,f=0,p&1){Z=25;break i}}else s=e[s>>2]|0;if((s|0)!=-1){if(h)break;break i}else{e[n>>2]=0,Z=17;break}}else Z=17;while(!1);if((Z|0)==17)if(Z=0,h){c=0;break}else c=0;if(s=d[K>>0]|0,s=s&1?e[k>>2]|0:(s&255)>>>1,(e[V>>2]|0)==(t+s|0)){if(f=0,m0(8,K|0,s<<1|0,0),p=f,f=0,p&1){Z=25;break}if(d[K>>0]&1?t=(e[K>>2]&-2)+-1|0:t=10,f=0,m0(8,K|0,t|0,0),p=f,f=0,p&1){Z=25;break}t=d[K>>0]&1?e[C>>2]|0:I,e[V>>2]=t+s}if(h=a+12|0,s=e[h>>2]|0,p=a+16|0,(s|0)==(e[p>>2]|0)){if(f=0,s=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=25;break}}else s=e[s>>2]|0;if(Pt(s,B,t,V,O,g,t0,F,M,U)|0)break;if(s=e[h>>2]|0,(s|0)==(e[p>>2]|0))if(f=0,u0(e[(e[a>>2]|0)+40>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=25;break}else continue;else{e[h>>2]=s+4;continue}}if((Z|0)==25){t=b()|0;break}if(s0=d[t0>>0]|0,(s0&1?e[t0+4>>2]|0:(s0&255)>>>1)|0&&(_=e[M>>2]|0,(_-F|0)<160)&&(s0=e[O>>2]|0,e[M>>2]=_+4,e[_>>2]=s0),f=0,t=k0(26,t|0,e[V>>2]|0,o|0,B|0)|0,s=I0,s0=f,f=0,s0&1)Z=26;else{if(s0=l,e[s0>>2]=t,e[s0+4>>2]=s,Oi(t0,F,e[M>>2]|0,o),a){if(t=e[a+12>>2]|0,(t|0)==(e[a+16>>2]|0)){if(f=0,t=u0(e[(e[a>>2]|0)+36>>2]|0,a|0)|0,s0=f,f=0,s0&1){Z=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(c){if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,s0=f,f=0,s0&1){Z=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;Z=53;break}else{e[n>>2]=0,Z=51;break}}else Z=51;while(!1);return(Z|0)==51&&s&&(Z=53),(Z|0)==53&&(e[o>>2]=e[o>>2]|2),s0=e[r>>2]|0,f0(K),f0(t0),y=X,s0|0}}while(!1);return(Z|0)==26&&(t=b()|0),f0(K),f0(t0),r0(t|0),0}function Nm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;Z=y,y=y+352|0,V=Z+208|0,c=Z+40|0,h=Z+36|0,w0=Z+24|0,s0=Z+12|0,_=Z+8|0,K=Z+48|0,t0=Z+4|0,F=Z,M=Z+337|0,O=Z+336|0,g1(w0,s,V,c,h),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),B=f,f=0;e:do if(B&1)v0=26;else{k=s0+8|0,U=s0+1|0,t=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=t,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,B=s0+4|0,I=e[c>>2]|0,C=e[h>>2]|0,s=e[r>>2]|0;i:for(;;){if(s){if(c=e[s+12>>2]|0,(c|0)==(e[s+16>>2]|0)){if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,g=f,f=0,g&1){v0=25;break}}else c=e[c>>2]|0;(c|0)==-1?(e[r>>2]=0,s=0,p=1):p=0}else s=0,p=1;c=e[n>>2]|0;do if(c){if(h=e[c+12>>2]|0,(h|0)==(e[c+16>>2]|0)){if(f=0,h=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,g=f,f=0,g&1){v0=25;break i}}else h=e[h>>2]|0;if((h|0)!=-1){if(p)break;break i}else{e[n>>2]=0,v0=17;break}}else v0=17;while(!1);if((v0|0)==17)if(v0=0,p){c=0;break}else c=0;if(h=d[s0>>0]|0,h=h&1?e[B>>2]|0:(h&255)>>>1,(e[_>>2]|0)==(t+h|0)){if(f=0,m0(8,s0|0,h<<1|0,0),g=f,f=0,g&1){v0=25;break}if(d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),g=f,f=0,g&1){v0=25;break}t=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=t+h}if(p=s+12|0,h=e[p>>2]|0,g=s+16|0,(h|0)==(e[g>>2]|0)){if(f=0,h=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=25;break}}else h=e[h>>2]|0;if(p1(h,M,O,t,_,I,C,w0,K,t0,F,V)|0)break;if(c=e[p>>2]|0,(c|0)==(e[g>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=25;break}else continue;else{e[p>>2]=c+4;continue}}if((v0|0)==25){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+J0(1,t|0,e[_>>2]|0,o|0),A0=f,f=0,A0&1)v0=26;else{if(e0[l>>2]=a,Oi(w0,K,e[t0>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(c){if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){v0=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;v0=53;break}else{e[n>>2]=0,v0=51;break}}else v0=51;while(!1);return(v0|0)==51&&s&&(v0=53),(v0|0)==53&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,f0(s0),f0(w0),y=Z,A0|0}}while(!1);return(v0|0)==26&&(t=b()|0),f0(s0),f0(w0),r0(t|0),0}function Bm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;Z=y,y=y+352|0,V=Z+208|0,c=Z+40|0,h=Z+36|0,w0=Z+24|0,s0=Z+12|0,_=Z+8|0,K=Z+48|0,t0=Z+4|0,F=Z,M=Z+337|0,O=Z+336|0,g1(w0,s,V,c,h),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),B=f,f=0;e:do if(B&1)v0=26;else{k=s0+8|0,U=s0+1|0,t=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=t,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,B=s0+4|0,I=e[c>>2]|0,C=e[h>>2]|0,s=e[r>>2]|0;i:for(;;){if(s){if(c=e[s+12>>2]|0,(c|0)==(e[s+16>>2]|0)){if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,g=f,f=0,g&1){v0=25;break}}else c=e[c>>2]|0;(c|0)==-1?(e[r>>2]=0,s=0,p=1):p=0}else s=0,p=1;c=e[n>>2]|0;do if(c){if(h=e[c+12>>2]|0,(h|0)==(e[c+16>>2]|0)){if(f=0,h=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,g=f,f=0,g&1){v0=25;break i}}else h=e[h>>2]|0;if((h|0)!=-1){if(p)break;break i}else{e[n>>2]=0,v0=17;break}}else v0=17;while(!1);if((v0|0)==17)if(v0=0,p){c=0;break}else c=0;if(h=d[s0>>0]|0,h=h&1?e[B>>2]|0:(h&255)>>>1,(e[_>>2]|0)==(t+h|0)){if(f=0,m0(8,s0|0,h<<1|0,0),g=f,f=0,g&1){v0=25;break}if(d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),g=f,f=0,g&1){v0=25;break}t=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=t+h}if(p=s+12|0,h=e[p>>2]|0,g=s+16|0,(h|0)==(e[g>>2]|0)){if(f=0,h=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=25;break}}else h=e[h>>2]|0;if(p1(h,M,O,t,_,I,C,w0,K,t0,F,V)|0)break;if(c=e[p>>2]|0,(c|0)==(e[g>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=25;break}else continue;else{e[p>>2]=c+4;continue}}if((v0|0)==25){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+J0(2,t|0,e[_>>2]|0,o|0),A0=f,f=0,A0&1)v0=26;else{if(H[l>>3]=a,Oi(w0,K,e[t0>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(c){if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){v0=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;v0=53;break}else{e[n>>2]=0,v0=51;break}}else v0=51;while(!1);return(v0|0)==51&&s&&(v0=53),(v0|0)==53&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,f0(s0),f0(w0),y=Z,A0|0}}while(!1);return(v0|0)==26&&(t=b()|0),f0(s0),f0(w0),r0(t|0),0}function Vm(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0;Z=y,y=y+352|0,V=Z+208|0,c=Z+40|0,h=Z+36|0,w0=Z+24|0,s0=Z+12|0,_=Z+8|0,K=Z+48|0,t0=Z+4|0,F=Z,M=Z+337|0,O=Z+336|0,g1(w0,s,V,c,h),e[s0>>2]=0,e[s0+4>>2]=0,e[s0+8>>2]=0,d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),B=f,f=0;e:do if(B&1)v0=26;else{k=s0+8|0,U=s0+1|0,t=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=t,e[t0>>2]=K,e[F>>2]=0,d[M>>0]=1,d[O>>0]=69,B=s0+4|0,I=e[c>>2]|0,C=e[h>>2]|0,s=e[r>>2]|0;i:for(;;){if(s){if(c=e[s+12>>2]|0,(c|0)==(e[s+16>>2]|0)){if(f=0,c=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,g=f,f=0,g&1){v0=25;break}}else c=e[c>>2]|0;(c|0)==-1?(e[r>>2]=0,s=0,p=1):p=0}else s=0,p=1;c=e[n>>2]|0;do if(c){if(h=e[c+12>>2]|0,(h|0)==(e[c+16>>2]|0)){if(f=0,h=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,g=f,f=0,g&1){v0=25;break i}}else h=e[h>>2]|0;if((h|0)!=-1){if(p)break;break i}else{e[n>>2]=0,v0=17;break}}else v0=17;while(!1);if((v0|0)==17)if(v0=0,p){c=0;break}else c=0;if(h=d[s0>>0]|0,h=h&1?e[B>>2]|0:(h&255)>>>1,(e[_>>2]|0)==(t+h|0)){if(f=0,m0(8,s0|0,h<<1|0,0),g=f,f=0,g&1){v0=25;break}if(d[s0>>0]&1?t=(e[s0>>2]&-2)+-1|0:t=10,f=0,m0(8,s0|0,t|0,0),g=f,f=0,g&1){v0=25;break}t=d[s0>>0]&1?e[k>>2]|0:U,e[_>>2]=t+h}if(p=s+12|0,h=e[p>>2]|0,g=s+16|0,(h|0)==(e[g>>2]|0)){if(f=0,h=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=25;break}}else h=e[h>>2]|0;if(p1(h,M,O,t,_,I,C,w0,K,t0,F,V)|0)break;if(c=e[p>>2]|0,(c|0)==(e[g>>2]|0))if(f=0,u0(e[(e[s>>2]|0)+40>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=25;break}else continue;else{e[p>>2]=c+4;continue}}if((v0|0)==25){t=b()|0;break}if(A0=d[w0>>0]|0,!(!(d[M>>0]|0)||!((A0&1?e[w0+4>>2]|0:(A0&255)>>>1)|0))&&(X=e[t0>>2]|0,(X-K|0)<160)&&(A0=e[F>>2]|0,e[t0>>2]=X+4,e[X>>2]=A0),f=0,a=+J0(3,t|0,e[_>>2]|0,o|0),A0=f,f=0,A0&1)v0=26;else{if(H[l>>3]=a,Oi(w0,K,e[t0>>2]|0,o),s){if(t=e[s+12>>2]|0,(t|0)==(e[s+16>>2]|0)){if(f=0,t=u0(e[(e[s>>2]|0)+36>>2]|0,s|0)|0,A0=f,f=0,A0&1){v0=26;break}}else t=e[t>>2]|0;(t|0)==-1?(e[r>>2]=0,s=1):s=0}else s=1;do if(c){if(t=e[c+12>>2]|0,(t|0)==(e[c+16>>2]|0)){if(f=0,t=u0(e[(e[c>>2]|0)+36>>2]|0,c|0)|0,A0=f,f=0,A0&1){v0=26;break e}}else t=e[t>>2]|0;if((t|0)!=-1){if(s)break;v0=53;break}else{e[n>>2]=0,v0=51;break}}else v0=51;while(!1);return(v0|0)==51&&s&&(v0=53),(v0|0)==53&&(e[o>>2]=e[o>>2]|2),A0=e[r>>2]|0,f0(s0),f0(w0),y=Z,A0|0}}while(!1);return(v0|0)==26&&(t=b()|0),f0(s0),f0(w0),r0(t|0),0}function qi(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;return l=y,y=y+16|0,a=l,e[a>>2]=o,o=nt(n)|0,n=Fr(t,r,s,a)|0,o|0&&(f=0,u0(75,o|0)|0,a=f,f=0,a&1)&&(a=b(0)|0,Ie(a)),y=l,n|0}function qm(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;if(o=y,y=y+16|0,l=o,e[l>>2]=s,s=nt(r)|0,f=0,r=L0(37,t|0,n|0,l|0)|0,t=f,f=0,t&1)r=b()|0,s|0&&(f=0,u0(75,s|0)|0,l=f,f=0,l&1)&&(l=b(0)|0,Ie(l)),r0(r|0);else return s|0&&(f=0,u0(75,s|0)|0,l=f,f=0,l&1)&&(l=b(0)|0,Ie(l)),y=o,r|0;return 0}function zt(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0;C=y,y=y+16|0,g=C,a=e[t>>2]|0;e:do if(!a)a=0;else{if(I=r,h=s-I>>2,p=o+12|0,c=e[p>>2]|0,h=(c|0)>(h|0)?c-h|0:0,c=n,I=c-I|0,o=I>>2,(I|0)>0&&(Qe[e[(e[a>>2]|0)+48>>2]&63](a,r,o)|0)!=(o|0)){e[t>>2]=0,a=0;break}do if((h|0)>0)if(c1(g,h,l),f=0,o=L0(e[(e[a>>2]|0)+48>>2]|0,a|0,(d[g>>0]&1?e[g+8>>2]|0:g+4|0)|0,h|0)|0,I=f,f=0,I&1&&(I=b()|0,ye(g),r0(I|0)),(o|0)==(h|0)){ye(g);break}else{e[t>>2]=0,ye(g),a=0;break e}while(!1);if(I=s-c|0,s=I>>2,(I|0)>0&&(Qe[e[(e[a>>2]|0)+48>>2]&63](a,n,s)|0)!=(s|0)){e[t>>2]=0,a=0;break}e[p>>2]=0}while(!1);return y=C,a|0}function at(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;l=e[t>>2]|0;do if(l){if((e[l+12>>2]|0)==(e[l+16>>2]|0))if((Se[e[(e[l>>2]|0)+36>>2]&127](l)|0)==-1){e[t>>2]=0,l=0;break}else{l=e[t>>2]|0;break}}else l=0;while(!1);a=(l|0)==0,l=e[r>>2]|0;do if(l){if((e[l+12>>2]|0)==(e[l+16>>2]|0)&&(Se[e[(e[l>>2]|0)+36>>2]&127](l)|0)==-1){e[r>>2]=0,U=11;break}a?U=13:U=12}else U=11;while(!1);(U|0)==11&&(a?U=12:(l=0,U=13));e:do if((U|0)==12)e[n>>2]=e[n>>2]|6,l=0;else if((U|0)==13){if(a=e[t>>2]|0,c=e[a+12>>2]|0,(c|0)==(e[a+16>>2]|0)?a=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:a=N[c>>0]|0,c=a&255,c<<24>>24>-1&&(k=s+8|0,(E[(e[k>>2]|0)+(a<<24>>24<<1)>>1]&2048)!=0)){for(p=(Qe[e[(e[s>>2]|0)+36>>2]&63](s,c,0)|0)<<24>>24,a=e[t>>2]|0,c=a+12|0,h=e[c>>2]|0,(h|0)==(e[a+16>>2]|0)?(Se[e[(e[a>>2]|0)+40>>2]&127](a)|0,C=o,g=l,o=l,l=p):(e[c>>2]=h+1,C=o,g=l,o=l,l=p);;){l=l+-48|0,I=C+-1|0,a=e[t>>2]|0;do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0))if((Se[e[(e[a>>2]|0)+36>>2]&127](a)|0)==-1){e[t>>2]=0,a=0;break}else{a=e[t>>2]|0;break}}else a=0;while(!1);if(h=(a|0)==0,o?(e[o+12>>2]|0)==(e[o+16>>2]|0)?(Se[e[(e[o>>2]|0)+36>>2]&127](o)|0)==-1?(e[r>>2]=0,c=0,o=0):(c=g,o=g):c=g:(c=g,o=0),a=e[t>>2]|0,!((C|0)>1&(h^(o|0)==0)))break;if(h=e[a+12>>2]|0,(h|0)==(e[a+16>>2]|0)?a=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:a=N[h>>0]|0,h=a&255,h<<24>>24<=-1||!(E[(e[k>>2]|0)+(a<<24>>24<<1)>>1]&2048))break e;if(l=((Qe[e[(e[s>>2]|0)+36>>2]&63](s,h,0)|0)<<24>>24)+(l*10|0)|0,a=e[t>>2]|0,h=a+12|0,p=e[h>>2]|0,(p|0)==(e[a+16>>2]|0)){Se[e[(e[a>>2]|0)+40>>2]&127](a)|0,C=I,g=c;continue}else{e[h>>2]=p+1,C=I,g=c;continue}}do if(a){if((e[a+12>>2]|0)==(e[a+16>>2]|0))if((Se[e[(e[a>>2]|0)+36>>2]&127](a)|0)==-1){e[t>>2]=0,a=0;break}else{a=e[t>>2]|0;break}}else a=0;while(!1);a=(a|0)==0;do if(c){if((e[c+12>>2]|0)==(e[c+16>>2]|0)&&(Se[e[(e[c>>2]|0)+36>>2]&127](c)|0)==-1){e[r>>2]=0,U=50;break}if(a)break e}else U=50;while(!1);if((U|0)==50&&!a)break;e[n>>2]=e[n>>2]|2;break}e[n>>2]=e[n>>2]|4,l=0}while(!1);return l|0}function ft(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;l=e[t>>2]|0;do if(l)if(a=e[l+12>>2]|0,(a|0)==(e[l+16>>2]|0)?l=Se[e[(e[l>>2]|0)+36>>2]&127](l)|0:l=e[a>>2]|0,(l|0)==-1){e[t>>2]=0,c=1;break}else{c=(e[t>>2]|0)==0;break}else c=1;while(!1);a=e[r>>2]|0;do if(a)if(l=e[a+12>>2]|0,(l|0)==(e[a+16>>2]|0)?l=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:l=e[l>>2]|0,(l|0)!=-1)if(c){k=17;break}else{k=16;break}else{e[r>>2]=0,k=14;break}else k=14;while(!1);(k|0)==14&&(c?k=16:(a=0,k=17));e:do if((k|0)==16)e[n>>2]=e[n>>2]|6,l=0;else if((k|0)==17){if(l=e[t>>2]|0,c=e[l+12>>2]|0,(c|0)==(e[l+16>>2]|0)?l=Se[e[(e[l>>2]|0)+36>>2]&127](l)|0:l=e[c>>2]|0,!(Qe[e[(e[s>>2]|0)+12>>2]&63](s,2048,l)|0)){e[n>>2]=e[n>>2]|4,l=0;break}for(l=(Qe[e[(e[s>>2]|0)+52>>2]&63](s,l,0)|0)<<24>>24,c=e[t>>2]|0,h=c+12|0,p=e[h>>2]|0,(p|0)==(e[c+16>>2]|0)?(Se[e[(e[c>>2]|0)+40>>2]&127](c)|0,C=o,g=a,h=a):(e[h>>2]=p+4,C=o,g=a,h=a);;){l=l+-48|0,I=C+-1|0,a=e[t>>2]|0;do if(a)if(c=e[a+12>>2]|0,(c|0)==(e[a+16>>2]|0)?a=Se[e[(e[a>>2]|0)+36>>2]&127](a)|0:a=e[c>>2]|0,(a|0)==-1){e[t>>2]=0,p=1;break}else{p=(e[t>>2]|0)==0;break}else p=1;while(!1);do if(h)if(a=e[h+12>>2]|0,(a|0)==(e[h+16>>2]|0)?a=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:a=e[a>>2]|0,(a|0)==-1){e[r>>2]=0,h=0,o=0,a=1;break}else{h=g,o=g,a=(g|0)==0;break}else h=g,o=0,a=1;while(!1);if(c=e[t>>2]|0,!((C|0)>1&(p^a)))break;if(a=e[c+12>>2]|0,(a|0)==(e[c+16>>2]|0)?a=Se[e[(e[c>>2]|0)+36>>2]&127](c)|0:a=e[a>>2]|0,!(Qe[e[(e[s>>2]|0)+12>>2]&63](s,2048,a)|0))break e;if(l=((Qe[e[(e[s>>2]|0)+52>>2]&63](s,a,0)|0)<<24>>24)+(l*10|0)|0,a=e[t>>2]|0,c=a+12|0,p=e[c>>2]|0,(p|0)==(e[a+16>>2]|0)){Se[e[(e[a>>2]|0)+40>>2]&127](a)|0,C=I,g=h,h=o;continue}else{e[c>>2]=p+4,C=I,g=h,h=o;continue}}do if(c)if(a=e[c+12>>2]|0,(a|0)==(e[c+16>>2]|0)?a=Se[e[(e[c>>2]|0)+36>>2]&127](c)|0:a=e[a>>2]|0,(a|0)==-1){e[t>>2]=0,c=1;break}else{c=(e[t>>2]|0)==0;break}else c=1;while(!1);do if(h)if(a=e[h+12>>2]|0,(a|0)==(e[h+16>>2]|0)?a=Se[e[(e[h>>2]|0)+36>>2]&127](h)|0:a=e[a>>2]|0,(a|0)!=-1){if(c)break e;break}else{e[r>>2]=0,k=60;break}else k=60;while(!1);if((k|0)==60&&!c)break;e[n>>2]=e[n>>2]|2}while(!1);return l|0}function bm(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0;l=t+4|0,s=(e[l>>2]|0)!=189,c=e[t>>2]|0,a=c,o=(e[n>>2]|0)-a|0,o=o>>>0<2147483647?o<<1:-1,a=(e[r>>2]|0)-a|0,c=bt(s?c:0,o)|0,c||xr();do if(s)e[t>>2]=c,h=c;else if(s=e[t>>2]|0,e[t>>2]=c,s)if(f=0,n0(e[l>>2]|0,s|0),c=f,f=0,c&1)c=b(0)|0,Ie(c);else{h=e[t>>2]|0;break}else h=c;while(!1);e[l>>2]=201,e[r>>2]=h+a,e[n>>2]=(e[t>>2]|0)+o}function Gm(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0;l=t+4|0,s=(e[l>>2]|0)!=189,c=e[t>>2]|0,a=c,o=(e[n>>2]|0)-a|0,o=o>>>0<2147483647?o<<1:-1,a=(e[r>>2]|0)-a>>2,c=bt(s?c:0,o)|0,c||xr();do if(s)e[t>>2]=c,h=c;else if(s=e[t>>2]|0,e[t>>2]=c,s)if(f=0,n0(e[l>>2]|0,s|0),c=f,f=0,c&1)c=b(0)|0,Ie(c);else{h=e[t>>2]|0;break}else h=c;while(!1);e[l>>2]=201,e[r>>2]=h+(a<<2),e[n>>2]=(e[t>>2]|0)+(o>>>2<<2)}function Qm(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0;l=r,s=d[t>>0]|0,s&1?(s=e[t>>2]|0,o=(s&-2)+-1|0,h=e[t+4>>2]|0,s=s&255):(o=10,h=(s&255)>>>1),c=n-l|0;do if((n|0)!=(r|0)){if((o-h|0)>>>0>>0&&(f1(t,o,h+c-o|0,h,h,0,0),s=d[t>>0]|0),s&1?a=e[t+8>>2]|0:a=t+1|0,l=n+(h-l)|0,(r|0)!=(n|0))for(s=r,o=a+h|0;d[o>>0]=d[s>>0]|0,s=s+1|0,(s|0)!=(n|0);)o=o+1|0;if(d[a+l>>0]=0,s=h+c|0,d[t>>0]&1){e[t+4>>2]=s;break}else{d[t>>0]=s<<1;break}}while(!1);return t|0}function zm(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0;l=t+4|0,s=(e[l>>2]|0)!=189,c=e[t>>2]|0,a=c,o=(e[n>>2]|0)-a|0,o=o>>>0<2147483647?o<<1:-1,a=(e[r>>2]|0)-a>>2,c=bt(s?c:0,o)|0,c||xr();do if(s)e[t>>2]=c,h=c;else if(s=e[t>>2]|0,e[t>>2]=c,s)if(f=0,n0(e[l>>2]|0,s|0),c=f,f=0,c&1)c=b(0)|0,Ie(c);else{h=e[t>>2]|0;break}else h=c;while(!1);e[l>>2]=201,e[r>>2]=h+(a<<2),e[n>>2]=(e[t>>2]|0)+(o>>>2<<2)}function Hm(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0;l=r,s=d[t>>0]|0,s&1?(s=e[t>>2]|0,o=(s&-2)+-1|0,h=e[t+4>>2]|0,s=s&255):(o=1,h=(s&255)>>>1),c=n-l>>2;do if(c){if((o-h|0)>>>0>>0&&(V2(t,o,h+c-o|0,h,h,0,0),s=d[t>>0]|0),s&1?a=e[t+8>>2]|0:a=t+4|0,l=h+((n-l|0)>>>2)|0,(r|0)!=(n|0))for(s=r,o=a+(h<<2)|0;e[o>>2]=e[s>>2],s=s+4|0,(s|0)!=(n|0);)o=o+4|0;if(e[a+(l<<2)>>2]=0,s=h+c|0,d[t>>0]&1){e[t+4>>2]=s;break}else{d[t>>0]=s<<1;break}}while(!1);return t|0}function Ym(t,r){t=t|0,r=r|0;var n=0;e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,d[t+128>>0]=0;do if(r)if(f=0,h0(125,t|0,r|0),n=f,f=0,n&1)n=b()|0,A1(t),r0(n|0);else{J2(t,r);break}while(!1)}function jm(t,r){t=t|0,r=r|0,Si(t,r,Ai(43148)|0)}function Xm(t,r){t=t|0,r=r|0,Si(t,r,Ai(43188)|0)}function Km(t,r){t=t|0,r=r|0,Si(t,r,Ai(44220)|0)}function Wm(t,r){t=t|0,r=r|0,Si(t,r,Ai(44212)|0)}function Zm(t,r){t=t|0,r=r|0,Si(t,r,Ai(44280)|0)}function Jm(t,r){t=t|0,r=r|0,Si(t,r,Ai(44288)|0)}function $m(t,r){t=t|0,r=r|0,Si(t,r,Ai(44344)|0)}function e8(t,r){t=t|0,r=r|0,Si(t,r,Ai(44352)|0)}function i8(t,r){t=t|0,r=r|0,Si(t,r,Ai(44360)|0)}function t8(t,r){t=t|0,r=r|0,Si(t,r,Ai(44368)|0)}function r8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43260)|0)}function n8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43332)|0)}function s8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43392)|0)}function o8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43452)|0)}function l8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43764)|0)}function a8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43828)|0)}function f8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43892)|0)}function c8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43956)|0)}function h8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43992)|0)}function m8(t,r){t=t|0,r=r|0,Si(t,r,Ai(44028)|0)}function d8(t,r){t=t|0,r=r|0,Si(t,r,Ai(44064)|0)}function g8(t,r){t=t|0,r=r|0,Si(t,r,Ai(44100)|0)}function p8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43544)|0)}function A8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43636)|0)}function S8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43668)|0)}function v8(t,r){t=t|0,r=r|0,Si(t,r,Ai(43700)|0)}function w8(t,r){t=t|0,r=r|0,Si(t,r,Ai(44140)|0)}function T8(t,r){t=t|0,r=r|0,Si(t,r,Ai(44180)|0)}function A1(t){t=t|0;var r=0,n=0,s=0;n=e[t>>2]|0;do if(n){if(s=t+4|0,r=e[s>>2]|0,(r|0)!=(n|0)){do r=r+-4|0;while((r|0)!=(n|0));e[s>>2]=r}if((t+16|0)==(n|0)){d[t+128>>0]=0;break}else{a0(n);break}}while(!1)}function C8(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0;if(a=t+4|0,n=e[a>>2]|0,s=e[t>>2]|0,o=n-s>>2,o>>>0>=r>>>0){if(o>>>0>r>>>0&&(l=s+(r<<2)|0,(n|0)!=(l|0))){do n=n+-4|0;while((n|0)!=(l|0));e[a>>2]=n}}else N8(t,r-o|0)}function x8(t,r){t=t|0,r=r|0;var n=0;return n=e[t+8>>2]|0,(e[t+12>>2]|0)-n>>2>>>0>r>>>0?n=(e[n+(r<<2)>>2]|0)!=0:n=0,n|0}function y8(t){t=t|0;var r=0,n=0;n=t+4|0,r=e[n>>2]|0,n=e[n+4>>2]|0,t=(e[t>>2]|0)+(n>>1)|0,n&1&&(r=e[(e[t>>2]|0)+r>>2]|0),Ce[r&255](t)}function I8(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0;e[n>>2]=t,e[l>>2]=s,c&2?(o-s|0)<3?t=1:(e[l>>2]=s+1,d[s>>0]=-17,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=-69,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=-65,h=4):h=4;e:do if((h|0)==4)if(p=r,t=e[n>>2]|0,t>>>0>>0)for(;;){if(c=E[t>>1]|0,h=c&65535,h>>>0>a>>>0){t=2;break e}do if((c&65535)<128){if(t=e[l>>2]|0,(o-t|0)<1){t=1;break e}e[l>>2]=t+1,d[t>>0]=c}else{if((c&65535)<2048){if(t=e[l>>2]|0,(o-t|0)<2){t=1;break e}e[l>>2]=t+1,d[t>>0]=h>>>6|192,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=h&63|128;break}if((c&65535)<55296){if(t=e[l>>2]|0,(o-t|0)<3){t=1;break e}e[l>>2]=t+1,d[t>>0]=h>>>12|224,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=h>>>6&63|128,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=h&63|128;break}if((c&65535)>=56320){if((c&65535)<57344){t=2;break e}if(t=e[l>>2]|0,(o-t|0)<3){t=1;break e}e[l>>2]=t+1,d[t>>0]=h>>>12|224,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=h>>>6&63|128,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=h&63|128;break}if((p-t|0)<4){t=1;break e}if(t=t+2|0,c=q[t>>1]|0,(c&64512|0)!=56320){t=2;break e}if((o-(e[l>>2]|0)|0)<4){t=1;break e}if(s=h&960,((s<<10)+65536|h<<10&64512|c&1023)>>>0>a>>>0){t=2;break e}e[n>>2]=t,t=(s>>>6)+1|0,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=t>>>2|240,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=h>>>2&15|t<<4&48|128,s=e[l>>2]|0,e[l>>2]=s+1,d[s>>0]=h<<4&48|c>>>6&15|128,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=c&63|128}while(!1);if(t=(e[n>>2]|0)+2|0,e[n>>2]=t,t>>>0>=r>>>0){t=0;break}}else t=0;while(!1);return t|0}function D8(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0,C=0,I=0,k=0;e[n>>2]=t,e[l>>2]=s,c&4?(t=e[n>>2]|0,c=r,(c-t|0)>2&&(d[t>>0]|0)==-17&&(d[t+1>>0]|0)==-69&&(d[t+2>>0]|0)==-65?(e[n>>2]=t+3,h=e[l>>2]|0):h=s):(h=s,c=r),I=o,s=e[n>>2]|0,t=s>>>0>>0;e:do if(t&h>>>0>>0)for(;;){if(t=d[s>>0]|0,g=t&255,g>>>0>a>>>0){t=2;break e}do if(t<<24>>24>-1)E[h>>1]=t&255,e[n>>2]=s+1;else{if((t&255)<194){t=2;break e}if((t&255)<224){if((c-s|0)<2){t=1;break e}if(t=N[s+1>>0]|0,(t&192|0)!=128){t=2;break e}if(t=t&63|g<<6&1984,t>>>0>a>>>0){t=2;break e}E[h>>1]=t,e[n>>2]=s+2;break}if((t&255)<240){if((c-s|0)<3){t=1;break e}switch(p=d[s+1>>0]|0,t=d[s+2>>0]|0,g|0){case 224:{if((p&-32)<<24>>24!=-96){t=2;break e}break}case 237:{if((p&-32)<<24>>24!=-128){t=2;break e}break}default:if((p&-64)<<24>>24!=-128){t=2;break e}}if(t=t&255,(t&192|0)!=128){t=2;break e}if(t=(p&255)<<6&4032|g<<12|t&63,(t&65535)>>>0>a>>>0){t=2;break e}E[h>>1]=t,e[n>>2]=s+3;break}if((t&255)>=245){t=2;break e}if((c-s|0)<4){t=1;break e}switch(p=d[s+1>>0]|0,t=d[s+2>>0]|0,s=d[s+3>>0]|0,g|0){case 240:{if((p+112&255)>=48){t=2;break e}break}case 244:{if((p&-16)<<24>>24!=-128){t=2;break e}break}default:if((p&-64)<<24>>24!=-128){t=2;break e}}if(C=t&255,(C&192|0)!=128){t=2;break e}if(t=s&255,(t&192|0)!=128){t=2;break e}if((I-h|0)<4){t=1;break e}if(g=g&7,s=p&255,p=C<<6,t=t&63,(s<<12&258048|g<<18|p&4032|t)>>>0>a>>>0){t=2;break e}E[h>>1]=s<<2&60|C>>>4&3|((s>>>4&3|g<<2)<<6)+16320|55296,C=h+2|0,e[l>>2]=C,E[C>>1]=t|p&960|56320,e[n>>2]=(e[n>>2]|0)+4}while(!1);if(h=(e[l>>2]|0)+2|0,e[l>>2]=h,s=e[n>>2]|0,t=s>>>0>>0,!(t&h>>>0>>0)){k=39;break}}else k=39;while(!1);return(k|0)==39&&(t=t&1),t|0}function E8(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;C=r,o&4|0&&(C-t|0)>2&&(d[t>>0]|0)==-17&&(d[t+1>>0]|0)==-69?o=(d[t+2>>0]|0)==-65?t+3|0:t:o=t;e:do if((n|0)!=0&o>>>0>>0){g=o,l=0;i:for(;;){if(o=d[g>>0]|0,p=o&255,p>>>0>s>>>0){o=g,l=42;break e}do if(o<<24>>24>-1)o=g+1|0;else{if((o&255)<194){o=g,l=42;break e}if((o&255)<224){if((C-g|0)<2){o=g,l=42;break e}if(o=N[g+1>>0]|0,(o&192|0)!=128){o=g,l=42;break e}if((o&63|p<<6&1984)>>>0>s>>>0){o=g,l=42;break e}o=g+2|0;break}if((o&255)<240){if(o=g,(C-o|0)<3){o=g,l=42;break e}switch(c=d[g+1>>0]|0,a=d[g+2>>0]|0,p|0){case 224:{if((c&-32)<<24>>24!=-96){l=20;break i}break}case 237:{if((c&-32)<<24>>24!=-128){l=22;break i}break}default:if((c&-64)<<24>>24!=-128){l=24;break i}}if(o=a&255,(o&192|0)!=128){o=g,l=42;break e}if(((c&255)<<6&4032|p<<12&61440|o&63)>>>0>s>>>0){o=g,l=42;break e}o=g+3|0;break}if((o&255)>=245){o=g,l=42;break e}if(o=g,(n-l|0)>>>0<2|(C-o|0)<4){o=g,l=42;break e}switch(h=d[g+1>>0]|0,a=d[g+2>>0]|0,c=d[g+3>>0]|0,p|0){case 240:{if((h+112&255)>=48){l=32;break i}break}case 244:{if((h&-16)<<24>>24!=-128){l=34;break i}break}default:if((h&-64)<<24>>24!=-128){l=36;break i}}if(a=a&255,(a&192|0)!=128){o=g,l=42;break e}if(o=c&255,(o&192|0)!=128){o=g,l=42;break e}if(((h&255)<<12&258048|p<<18&1835008|a<<6&4032|o&63)>>>0>s>>>0){o=g,l=42;break e}o=g+4|0,l=l+1|0}while(!1);if(l=l+1|0,l>>>0>>0&o>>>0>>0)g=o;else{l=42;break e}}if((l|0)==20){o=o-t|0;break}else if((l|0)==22){o=o-t|0;break}else if((l|0)==24){o=o-t|0;break}else if((l|0)==32){o=o-t|0;break}else if((l|0)==34){o=o-t|0;break}else if((l|0)==36){o=o-t|0;break}}else l=42;while(!1);return(l|0)==42&&(o=o-t|0),o|0}function k8(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0;e[n>>2]=t,e[l>>2]=s,p=o,c&2?(p-s|0)<3?t=1:(e[l>>2]=s+1,d[s>>0]=-17,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=-69,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=-65,h=4):h=4;e:do if((h|0)==4)if(t=e[n>>2]|0,t>>>0>>0)for(;;){if(c=e[t>>2]|0,c>>>0>a>>>0|(c&-2048|0)==55296){t=2;break e}do if(c>>>0>=128){if(c>>>0<2048){if(t=e[l>>2]|0,(p-t|0)<2){t=1;break e}e[l>>2]=t+1,d[t>>0]=c>>>6|192,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=c&63|128;break}if(t=e[l>>2]|0,o=p-t|0,c>>>0<65536){if((o|0)<3){t=1;break e}e[l>>2]=t+1,d[t>>0]=c>>>12|224,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=c>>>6&63|128,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=c&63|128;break}else{if((o|0)<4){t=1;break e}e[l>>2]=t+1,d[t>>0]=c>>>18|240,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=c>>>12&63|128,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=c>>>6&63|128,h=e[l>>2]|0,e[l>>2]=h+1,d[h>>0]=c&63|128;break}}else{if(t=e[l>>2]|0,(p-t|0)<1){t=1;break e}e[l>>2]=t+1,d[t>>0]=c}while(!1);if(t=(e[n>>2]|0)+4|0,e[n>>2]=t,t>>>0>=r>>>0){t=0;break}}else t=0;while(!1);return t|0}function F8(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0,C=0,I=0,k=0;e[n>>2]=t,e[l>>2]=s,c&4?(t=e[n>>2]|0,c=r,(c-t|0)>2&&(d[t>>0]|0)==-17&&(d[t+1>>0]|0)==-69&&(d[t+2>>0]|0)==-65&&(e[n>>2]=t+3,s=e[l>>2]|0),I=c):I=r,c=e[n>>2]|0,t=c>>>0>>0;e:do if(t&s>>>0>>0)for(;;){t=d[c>>0]|0,C=t&255;do if(t<<24>>24>-1){if(C>>>0>a>>>0){t=2;break e}e[s>>2]=C,e[n>>2]=c+1}else{if((t&255)<194){t=2;break e}if((t&255)<224){if((I-c|0)<2){t=1;break e}if(t=N[c+1>>0]|0,(t&192|0)!=128){t=2;break e}if(t=t&63|C<<6&1984,t>>>0>a>>>0){t=2;break e}e[s>>2]=t,e[n>>2]=c+2;break}if((t&255)<240){if((I-c|0)<3){t=1;break e}switch(h=d[c+1>>0]|0,t=d[c+2>>0]|0,C|0){case 224:{if((h&-32)<<24>>24!=-96){t=2;break e}break}case 237:{if((h&-32)<<24>>24!=-128){t=2;break e}break}default:if((h&-64)<<24>>24!=-128){t=2;break e}}if(t=t&255,(t&192|0)!=128){t=2;break e}if(t=(h&255)<<6&4032|C<<12&61440|t&63,t>>>0>a>>>0){t=2;break e}e[s>>2]=t,e[n>>2]=c+3;break}if((t&255)>=245){t=2;break e}if((I-c|0)<4){t=1;break e}switch(g=d[c+1>>0]|0,t=d[c+2>>0]|0,h=d[c+3>>0]|0,C|0){case 240:{if((g+112&255)>=48){t=2;break e}break}case 244:{if((g&-16)<<24>>24!=-128){t=2;break e}break}default:if((g&-64)<<24>>24!=-128){t=2;break e}}if(p=t&255,(p&192|0)!=128){t=2;break e}if(t=h&255,(t&192|0)!=128){t=2;break e}if(t=(g&255)<<12&258048|C<<18&1835008|p<<6&4032|t&63,t>>>0>a>>>0){t=2;break e}e[s>>2]=t,e[n>>2]=c+4}while(!1);if(s=(e[l>>2]|0)+4|0,e[l>>2]=s,c=e[n>>2]|0,t=c>>>0>>0,!(t&s>>>0>>0)){k=38;break}}else k=38;while(!1);return(k|0)==38&&(t=t&1),t|0}function M8(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0;C=r,o&4|0&&(C-t|0)>2&&(d[t>>0]|0)==-17&&(d[t+1>>0]|0)==-69?o=(d[t+2>>0]|0)==-65?t+3|0:t:o=t;e:do if((n|0)!=0&o>>>0>>0){p=o,g=0;i:for(;;){o=d[p>>0]|0,h=o&255;do if(o<<24>>24>-1){if(h>>>0>s>>>0){o=p,l=42;break e}o=p+1|0}else{if((o&255)<194){o=p,l=42;break e}if((o&255)<224){if((C-p|0)<2){o=p,l=42;break e}if(o=N[p+1>>0]|0,(o&192|0)!=128){o=p,l=42;break e}if((o&63|h<<6&1984)>>>0>s>>>0){o=p,l=42;break e}o=p+2|0;break}if((o&255)<240){if(o=p,(C-o|0)<3){o=p,l=42;break e}switch(a=d[p+1>>0]|0,l=d[p+2>>0]|0,h|0){case 224:{if((a&-32)<<24>>24!=-96){l=20;break i}break}case 237:{if((a&-32)<<24>>24!=-128){l=22;break i}break}default:if((a&-64)<<24>>24!=-128){l=24;break i}}if(o=l&255,(o&192|0)!=128){o=p,l=42;break e}if(((a&255)<<6&4032|h<<12&61440|o&63)>>>0>s>>>0){o=p,l=42;break e}o=p+3|0;break}if((o&255)>=245){o=p,l=42;break e}if(o=p,(C-o|0)<4){o=p,l=42;break e}switch(c=d[p+1>>0]|0,l=d[p+2>>0]|0,a=d[p+3>>0]|0,h|0){case 240:{if((c+112&255)>=48){l=32;break i}break}case 244:{if((c&-16)<<24>>24!=-128){l=34;break i}break}default:if((c&-64)<<24>>24!=-128){l=36;break i}}if(l=l&255,(l&192|0)!=128){o=p,l=42;break e}if(o=a&255,(o&192|0)!=128){o=p,l=42;break e}if(((c&255)<<12&258048|h<<18&1835008|l<<6&4032|o&63)>>>0>s>>>0){o=p,l=42;break e}o=p+4|0}while(!1);if(g=g+1|0,g>>>0>>0&o>>>0>>0)p=o;else{l=42;break e}}if((l|0)==20){o=o-t|0;break}else if((l|0)==22){o=o-t|0;break}else if((l|0)==24){o=o-t|0;break}else if((l|0)==32){o=o-t|0;break}else if((l|0)==34){o=o-t|0;break}else if((l|0)==36){o=o-t|0;break}}else l=42;while(!1);return(l|0)==42&&(o=o-t|0),o|0}function _8(t){t=t|0,f0(45196),f0(45184),f0(45172),f0(45160),f0(45148),f0(45136),f0(45124),f0(45112),f0(45100),f0(45088),f0(45076),f0(45064),f0(45052),f0(45040)}function R8(t){t=t|0,ye(45368),ye(45356),ye(45344),ye(45332),ye(45320),ye(45308),ye(45296),ye(45284),ye(45272),ye(45260),ye(45248),ye(45236),ye(45224),ye(45212)}function P8(t){t=t|0,f0(46e3),f0(45988),f0(45976),f0(45964),f0(45952),f0(45940),f0(45928),f0(45916),f0(45904),f0(45892),f0(45880),f0(45868),f0(45856),f0(45844),f0(45832),f0(45820),f0(45808),f0(45796),f0(45784),f0(45772),f0(45760),f0(45748),f0(45736),f0(45724)}function L8(t){t=t|0,ye(46292),ye(46280),ye(46268),ye(46256),ye(46244),ye(46232),ye(46220),ye(46208),ye(46196),ye(46184),ye(46172),ye(46160),ye(46148),ye(46136),ye(46124),ye(46112),ye(46100),ye(46088),ye(46076),ye(46064),ye(46052),ye(46040),ye(46028),ye(46016)}function U8(t){t=t|0,f0(47104),f0(47092),f0(47080),f0(47068),f0(47056),f0(47044),f0(47032),f0(47020),f0(47008),f0(46996),f0(46984),f0(46972),f0(46960),f0(46948),f0(46936),f0(46924),f0(46912),f0(46900),f0(46888),f0(46876),f0(46864),f0(46852),f0(46840),f0(46828)}function O8(t){t=t|0,ye(47396),ye(47384),ye(47372),ye(47360),ye(47348),ye(47336),ye(47324),ye(47312),ye(47300),ye(47288),ye(47276),ye(47264),ye(47252),ye(47240),ye(47228),ye(47216),ye(47204),ye(47192),ye(47180),ye(47168),ye(47156),ye(47144),ye(47132),ye(47120)}function N8(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;h=y,y=y+32|0,c=h,l=e[t+8>>2]|0,n=e[t+4>>2]|0,l-n>>2>>>0>>0?(s=e[t>>2]|0,a=n-s>>2,o=a+r|0,o>>>0>1073741823&&ct(t),n=l-s|0,n>>2>>>0<536870911?(n=n>>1,n=n>>>0>>0?o:n):n=1073741823,B8(c,n,a,t+16|0),a=c+8|0,l=e[a>>2]|0,je(l|0,0,r<<2|0)|0,e[a>>2]=l+(r<<2),V8(t,c),q8(c)):J2(t,r),y=h}function J2(t,r){t=t|0,r=r|0;var n=0;n=t+4|0,t=r,r=e[n>>2]|0;do e[r>>2]=0,r=(e[n>>2]|0)+4|0,e[n>>2]=r,t=t+-1|0;while(t|0)}function B8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;e[t+12>>2]=0,e[t+16>>2]=s;do if(r)if(o=s+112|0,r>>>0<29&(d[o>>0]|0)==0){d[o>>0]=1;break}else{s=G0(r<<2)|0;break}else s=0;while(!1);e[t>>2]=s,n=s+(n<<2)|0,e[t+8>>2]=n,e[t+4>>2]=n,e[t+12>>2]=s+(r<<2)}function V8(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0;s=e[t>>2]|0,l=t+4|0,n=r+4|0,o=(e[l>>2]|0)-s|0,a=(e[n>>2]|0)+(0-(o>>2)<<2)|0,e[n>>2]=a,ti(a|0,s|0,o|0)|0,o=e[t>>2]|0,e[t>>2]=e[n>>2],e[n>>2]=o,o=r+8|0,s=e[l>>2]|0,e[l>>2]=e[o>>2],e[o>>2]=s,o=t+8|0,t=r+12|0,s=e[o>>2]|0,e[o>>2]=e[t>>2],e[t>>2]=s,e[r>>2]=e[n>>2]}function q8(t){t=t|0;var r=0,n=0,s=0;if(n=e[t+4>>2]|0,s=t+8|0,r=e[s>>2]|0,(r|0)!=(n|0)){do r=r+-4|0;while((r|0)!=(n|0));e[s>>2]=r}n=e[t>>2]|0;do if(n)if(r=e[t+16>>2]|0,(r|0)==(n|0)){d[r+112>>0]=0;break}else{a0(n);break}while(!1)}function G8(t,r){t=t|0,r=r|0;var n=0;r>>>0>1073741823&&ct(t),n=t+128|0,r>>>0<29&(d[n>>0]|0)==0?(d[n>>0]=1,n=t+16|0):n=G0(r<<2)|0,e[t+4>>2]=n,e[t>>2]=n,e[t+8>>2]=n+(r<<2)}function Q8(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;c=y,y=y+16|0,a=c;do if((t|0)!=(r|0)){if(o=di()|0,l=e[o>>2]|0,e[o>>2]=0,s=+D1(t,a,Ii()|0),t=e[o>>2]|0,t||(e[o>>2]=l),(e[a>>2]|0)!=(r|0)){e[n>>2]=4,s=0;break}(t|0)==34&&(e[n>>2]=4)}else e[n>>2]=4,s=0;while(!1);return y=c,+s}function z8(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;c=y,y=y+16|0,a=c;do if((t|0)!=(r|0)){if(o=di()|0,l=e[o>>2]|0,e[o>>2]=0,s=+D1(t,a,Ii()|0),t=e[o>>2]|0,t||(e[o>>2]=l),(e[a>>2]|0)!=(r|0)){e[n>>2]=4,s=0;break}(t|0)==34&&(e[n>>2]=4)}else e[n>>2]=4,s=0;while(!1);return y=c,+s}function H8(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;c=y,y=y+16|0,a=c;do if((t|0)==(r|0))e[n>>2]=4,s=0;else{if(o=di()|0,l=e[o>>2]|0,e[o>>2]=0,s=+D1(t,a,Ii()|0),t=e[o>>2]|0,t||(e[o>>2]=l),(e[a>>2]|0)!=(r|0)){e[n>>2]=4,s=0;break}(t|0)==34&&(e[n>>2]=4)}while(!1);return y=c,+s}function Y8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0;c=y,y=y+16|0,a=c;do if((t|0)!=(r|0)){if((d[t>>0]|0)==45){e[n>>2]=4,s=0,t=0;break}if(o=di()|0,l=e[o>>2]|0,e[o>>2]=0,t=yr(t,a,s,Ii()|0)|0,s=e[o>>2]|0,s||(e[o>>2]=l),(e[a>>2]|0)!=(r|0)){e[n>>2]=4,s=0,t=0;break}(s|0)==34?(e[n>>2]=4,s=-1,t=-1):s=I0}else e[n>>2]=4,s=0,t=0;while(!1);return I0=s,y=c,t|0}function j8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;h=y,y=y+16|0,c=h;do if((t|0)!=(r|0)){if((d[t>>0]|0)==45){e[n>>2]=4,t=0;break}if(l=di()|0,a=e[l>>2]|0,e[l>>2]=0,t=yr(t,c,s,Ii()|0)|0,s=I0,o=e[l>>2]|0,o||(e[l>>2]=a),(e[c>>2]|0)!=(r|0)){e[n>>2]=4,t=0;break}if(s>>>0>0|(s|0)==0&t>>>0>4294967295|(o|0)==34){e[n>>2]=4,t=-1;break}else break}else e[n>>2]=4,t=0;while(!1);return y=h,t|0}function X8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;h=y,y=y+16|0,c=h;do if((t|0)!=(r|0)){if((d[t>>0]|0)==45){e[n>>2]=4,t=0;break}if(l=di()|0,a=e[l>>2]|0,e[l>>2]=0,t=yr(t,c,s,Ii()|0)|0,s=I0,o=e[l>>2]|0,o||(e[l>>2]=a),(e[c>>2]|0)!=(r|0)){e[n>>2]=4,t=0;break}if(s>>>0>0|(s|0)==0&t>>>0>4294967295|(o|0)==34){e[n>>2]=4,t=-1;break}else break}else e[n>>2]=4,t=0;while(!1);return y=h,t|0}function K8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;h=y,y=y+16|0,c=h;do if((t|0)!=(r|0)){if((d[t>>0]|0)==45){e[n>>2]=4,t=0;break}if(l=di()|0,a=e[l>>2]|0,e[l>>2]=0,t=yr(t,c,s,Ii()|0)|0,s=I0,o=e[l>>2]|0,o||(e[l>>2]=a),(e[c>>2]|0)!=(r|0)){e[n>>2]=4,t=0;break}if(s>>>0>0|(s|0)==0&t>>>0>65535|(o|0)==34){e[n>>2]=4,t=-1;break}else{t=t&65535;break}}else e[n>>2]=4,t=0;while(!1);return y=h,t|0}function W8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;h=y,y=y+16|0,c=h;do if((t|0)!=(r|0)){if(l=di()|0,a=e[l>>2]|0,e[l>>2]=0,t=dn(t,c,s,Ii()|0)|0,s=I0,o=e[l>>2]|0,o||(e[l>>2]=a),(e[c>>2]|0)!=(r|0)){e[n>>2]=4,s=0,t=0;break}if((o|0)==34)return e[n>>2]=4,c=(s|0)>0|(s|0)==0&t>>>0>0,I0=c?2147483647:-2147483648,y=h,(c?-1:0)|0}else e[n>>2]=4,s=0,t=0;while(!1);return I0=s,y=h,t|0}function Z8(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0;h=y,y=y+16|0,c=h;e:do if((t|0)==(r|0))e[n>>2]=4,t=0;else{if(l=di()|0,a=e[l>>2]|0,e[l>>2]=0,t=dn(t,c,s,Ii()|0)|0,s=I0,o=e[l>>2]|0,o||(e[l>>2]=a),(e[c>>2]|0)!=(r|0)){e[n>>2]=4,t=0;break}do if((o|0)==34){if(e[n>>2]=4,(s|0)>0|(s|0)==0&t>>>0>0){t=2147483647;break e}}else{if((s|0)<-1|(s|0)==-1&t>>>0<2147483648){e[n>>2]=4;break}if((s|0)>0|(s|0)==0&t>>>0>2147483647){e[n>>2]=4,t=2147483647;break e}else break e}while(!1);t=-2147483648}while(!1);return y=h,t|0}function J8(){}function Ji(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,s=r-s-(n>>>0>t>>>0|0)>>>0,I0=s,t-n>>>0|0|0}function je(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;if(s=t+n|0,(n|0)>=20){if(r=r&255,l=t&3,a=r|r<<8|r<<16|r<<24,o=s&-4,l)for(l=t+4-l|0;(t|0)<(l|0);)d[t>>0]=r,t=t+1|0;for(;(t|0)<(o|0);)e[t>>2]=a,t=t+4|0}for(;(t|0)<(s|0);)d[t>>0]=r,t=t+1|0;return t-n|0}function Li(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,n=t+n>>>0,I0=r+s+(n>>>0>>0|0)>>>0,n|0|0}function Dt(t,r,n){return t=t|0,r=r|0,n=n|0,(n|0)<32?(I0=r>>>n,t>>>n|(r&(1<>>n-32|0)}function ti(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if((n|0)>=4096)return qn(t|0,r|0,n|0)|0;if(s=t|0,(t&3)==(r&3)){for(;t&3;){if(!n)return s|0;d[t>>0]=d[r>>0]|0,t=t+1|0,r=r+1|0,n=n-1|0}for(;(n|0)>=4;)e[t>>2]=e[r>>2],t=t+4|0,r=r+4|0,n=n-4|0}for(;(n|0)>0;)d[t>>0]=d[r>>0]|0,t=t+1|0,r=r+1|0,n=n-1|0;return s|0}function pi(t,r,n){return t=t|0,r=r|0,n=n|0,(n|0)<32?(I0=r<>>32-n,t<0;)t=t-1|0,r=r-1|0,n=n-1|0,d[t>>0]=d[r>>0]|0;t=s}else ti(t,r,n)|0;return t|0}function lA(t,r,n){return t=t|0,r=r|0,n=n|0,(n|0)<32?(I0=r>>n,t>>>n|(r&(1<>n-32|0)}function $2(t){t=t|0;var r=0;return r=d[i0+(t&255)>>0]|0,(r|0)<8?r|0:(r=d[i0+(t>>8&255)>>0]|0,(r|0)<8?r+8|0:(r=d[i0+(t>>16&255)>>0]|0,(r|0)<8?r+16|0:(d[i0+(t>>>24)>>0]|0)+24|0))}function $8(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;return l=t&65535,o=r&65535,n=W(o,l)|0,s=t>>>16,t=(n>>>16)+(W(o,s)|0)|0,o=r>>>16,r=W(o,l)|0,I0=(t>>>16)+(W(o,s)|0)+(((t&65535)+r|0)>>>16)|0,t+r<<16|n&65535|0|0}function aA(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0;return p=r>>31|((r|0)<0?-1:0)<<1,h=((r|0)<0?-1:0)>>31|((r|0)<0?-1:0)<<1,l=s>>31|((s|0)<0?-1:0)<<1,o=((s|0)<0?-1:0)>>31|((s|0)<0?-1:0)<<1,c=Ji(p^t,h^r,p,h)|0,a=I0,t=l^p,r=o^h,Ji((Ar(c,a,Ji(l^n,o^s,l,o)|0,I0,0)|0)^t,I0^r,t,r)|0}function fA(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0;return o=y,y=y+16|0,c=o|0,a=r>>31|((r|0)<0?-1:0)<<1,l=((r|0)<0?-1:0)>>31|((r|0)<0?-1:0)<<1,p=s>>31|((s|0)<0?-1:0)<<1,h=((s|0)<0?-1:0)>>31|((s|0)<0?-1:0)<<1,t=Ji(a^t,l^r,a,l)|0,r=I0,Ar(t,r,Ji(p^n,h^s,p,h)|0,I0,c)|0,s=Ji(e[c>>2]^a,e[c+4>>2]^l,a,l)|0,n=I0,y=o,I0=n,s|0}function Ht(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;return o=t,l=n,n=$8(o,l)|0,t=I0,I0=(W(r,l)|0)+(W(s,o)|0)+t|t&0,n|0|0|0}function pr(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,Ar(t,r,n,s,0)|0}function S1(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;return l=y,y=y+16|0,o=l|0,Ar(t,r,n,s,o)|0,y=l,I0=e[o+4>>2]|0,e[o>>2]|0|0}function Ar(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(g=t,h=r,p=h,a=n,I=s,c=I,!p)return l=(o|0)!=0,c?l?(e[o>>2]=t|0,e[o+4>>2]=r&0,I=0,o=0,I0=I,o|0):(I=0,o=0,I0=I,o|0):(l&&(e[o>>2]=(g>>>0)%(a>>>0),e[o+4>>2]=0),I=0,o=(g>>>0)/(a>>>0)>>>0,I0=I,o|0);l=(c|0)==0;do if(a){if(!l){if(l=(X0(c|0)|0)-(X0(p|0)|0)|0,l>>>0<=31){C=l+1|0,c=31-l|0,r=l-31>>31,a=C,t=g>>>(C>>>0)&r|p<>>(C>>>0)&r,l=0,c=g<>2]=t|0,e[o+4>>2]=h|r&0,I=0,o=0,I0=I,o|0):(I=0,o=0,I0=I,o|0)}if(l=a-1|0,l&a){c=(X0(a|0)|0)+33-(X0(p|0)|0)|0,U=64-c|0,C=32-c|0,h=C>>31,k=c-32|0,r=k>>31,a=c,t=C-1>>31&p>>>(k>>>0)|(p<>>(c>>>0))&r,r=r&p>>>(c>>>0),l=g<>>(k>>>0))&h|g<>31;break}return o&&(e[o>>2]=l&g,e[o+4>>2]=0),(a|0)==1?(k=h|r&0,U=t|0|0,I0=k,U|0):(U=$2(a|0)|0,k=p>>>(U>>>0)|0,U=p<<32-U|g>>>(U>>>0)|0,I0=k,U|0)}else{if(l)return o&&(e[o>>2]=(p>>>0)%(a>>>0),e[o+4>>2]=0),k=0,U=(p>>>0)/(a>>>0)>>>0,I0=k,U|0;if(!g)return o&&(e[o>>2]=0,e[o+4>>2]=(p>>>0)%(c>>>0)),k=0,U=(p>>>0)/(c>>>0)>>>0,I0=k,U|0;if(l=c-1|0,!(l&c))return o&&(e[o>>2]=t|0,e[o+4>>2]=l&p|r&0),k=0,U=p>>>(($2(c|0)|0)>>>0),I0=k,U|0;if(l=(X0(c|0)|0)-(X0(p|0)|0)|0,l>>>0<=30){r=l+1|0,c=31-l|0,a=r,t=p<>>(r>>>0),r=p>>>(r>>>0),l=0,c=g<>2]=t|0,e[o+4>>2]=h|r&0,k=0,U=0,I0=k,U|0):(k=0,U=0,I0=k,U|0)}while(!1);if(!a)p=c,h=0,c=0;else{C=n|0|0,g=I|s&0,p=Li(C|0,g|0,-1,-1)|0,n=I0,h=c,c=0;do s=h,h=l>>>31|h<<1,l=c|l<<1,s=t<<1|s>>>31|0,I=t>>>31|r<<1|0,Ji(p,n,s,I)|0,U=I0,k=U>>31|((U|0)<0?-1:0)<<1,c=k&1,t=Ji(s,I,k&C,(((U|0)<0?-1:0)>>31|((U|0)<0?-1:0)<<1)&g)|0,r=I0,a=a-1|0;while(a|0);p=h,h=0}return a=0,o&&(e[o>>2]=t,e[o+4>>2]=r),k=(l|0)>>>31|(p|a)<<1|(a<<1|l>>>31)&0|h,U=(l<<1|0)&-2|c,I0=k,U|0}function ed(t,r,n,s,o,l,a,c){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,Up[t&15](r|0,n|0,s|0,o|0,l|0,a|0,c|0)|0}function id(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,_r[t&15](r|0,n|0,s|0,o|0,l|0)}function rd(t,r,n,s,o,l,a){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=+a,Op[t&3](r|0,n|0,s|0,o|0,l|0,+a)|0}function nd(t,r){t=t|0,r=r|0,Ce[t&255](r|0)}function sd(t,r,n){t=t|0,r=r|0,n=n|0,Ke[t&127](r|0,n|0)}function od(t,r,n,s,o,l,a){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,rr[t&63](r|0,n|0,s|0,o|0,l|0,a|0)|0}function ld(t,r){return t=t|0,r=r|0,Se[t&127](r|0)|0}function ad(t,r,n,s,o,l,a,c,h,p,g,C){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,C=C|0,Np[t&3](r|0,n|0,s|0,o|0,l|0,a|0,c|0,h|0,p|0,g|0,C|0)|0}function ud(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,Qe[t&63](r|0,n|0,s|0)|0}function cd(t,r,n,s,o,l,a,c,h,p,g,C,I,k,U,B){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,C=C|0,I=I|0,k=k|0,U=U|0,B=B|0,Bp[t&3](r|0,n|0,s|0,o|0,l|0,a|0,c|0,h|0,p|0,g|0,C|0,I|0,k|0,U|0,B|0)}function hd(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,Bt[t&15](r|0,n|0,s|0,o|0,l|0,a|0)}function md(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,Vp[t&7](r|0,n|0,s|0,o|0,l|0,a|0,c|0)}function dd(t,r,n,s,o,l,a,c,h,p,g){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,qp[t&7](r|0,n|0,s|0,o|0,l|0,a|0,c|0,h|0,p|0,g|0)}function gd(t,r,n){return t=t|0,r=r|0,n=n|0,Ni[t&63](r|0,n|0)|0}function pd(t,r,n,s,o,l){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,nr[t&31](r|0,n|0,s|0,o|0,l|0)|0}function Ad(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,+bp[t&3](r|0,n|0,s|0)}function Sd(t){return t=t|0,Gp[t&15]()|0}function vd(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,F1[t&31](r|0,n|0,s|0,o|0)|0}function wd(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,Rr[t&15](r|0,n|0,s|0)}function Td(t){t=t|0,On[t&7]()}function Cd(t,r,n,s,o,l,a,c,h){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,Ct[t&15](r|0,n|0,s|0,o|0,l|0,a|0,c|0,h|0)|0}function xd(t,r,n,s,o,l){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=+l,Qp[t&7](r|0,n|0,s|0,o|0,+l)|0}function yd(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,Pr[t&63](r|0,n|0,s|0,o|0)}function Et(t,r,n,s,o,l,a){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,Q0(0),0}function tr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,Q0(1)}function en(t,r,n,s,o,l){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=+l,Q0(2),0}function Xe(t){t=t|0,Q0(3)}function v1(t,r){t=t|0,r=r|0,Q0(4)}function Di(t,r,n,s,o,l){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,Q0(5),0}function Je(t){return t=t|0,Q0(6),0}function Id(t){return t=t|0,L1(t|0)|0}function Dd(t){return t=t|0,B1(t|0)|0}function Ed(t){return t=t|0,Yn(t|0)|0}function tn(t,r,n,s,o,l,a,c,h,p,g){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,Q0(7),0}function wi(t,r,n){return t=t|0,r=r|0,n=n|0,Q0(8),0}function rn(t,r,n,s,o,l,a,c,h,p,g,C,I,k,U){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0,C=C|0,I=I|0,k=k|0,U=U|0,Q0(9)}function kt(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,Q0(10)}function Sr(t,r,n,s,o,l,a){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,Q0(11)}function vr(t,r,n,s,o,l,a,c,h,p){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,Q0(12)}function Ri(t,r){return t=t|0,r=r|0,Q0(13),0}function ut(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,Q0(14),0}function kd(t,r,n){return t=t|0,r=r|0,n=n|0,Q0(15),0}function Lt(){return Q0(16),0}function Yt(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,Q0(17),0}function Fd(t,r,n){t=t|0,r=r|0,n=n|0,Q0(18)}function Md(t,r,n){t=t|0,r=r|0,n=n|0,Be(t|0,r|0,n|0)}function nn(){Q0(19)}function _d(){Kn()}function Rd(){Wi()}function Pd(){O1()}function jt(t,r,n,s,o,l,a,c){return t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,Q0(20),0}function wr(t,r,n,s,o){return t=t|0,r=r|0,n=n|0,s=s|0,o=+o,Q0(21),0}function Gi(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,Q0(22)}function Ld(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=y,y=y+32|0,c=p,hi(c,255,0),h=t+152|0,(e[c+4>>2]|0)==(e[h>>2]|0)&&(e[c+8>>2]|0)==(e[t+156>>2]|0)&&(e[c+12>>2]|0)==(e[t+160>>2]|0)){h=e[8900]|0,e[t+4580>>2]=h+(((e[8901]|0)-h|0)>>>1),y=p;return}for(n=t+4584|0,s=t+4588|0,o=e[s>>2]|0,r=e[n>>2]|0,l=o-r|0,l>>>0>=512?l>>>0>512&&(a=r+512|0,(o|0)!=(a|0))&&(e[s>>2]=a):(Yi(n,512-l|0),r=e[n>>2]|0),c=t+4580|0,e[c>>2]=r+256,a=t+160|0,o=t+156|0,l=-256;;){if(r=e[a>>2]|0,(l|0)>(0-r|0))if(n=e[o>>2]|0,(l|0)>(0-n|0))if(s=e[h>>2]|0,(l|0)>(0-s|0))if((l|0)>=0){if((l|0)<1){d[(e[c>>2]|0)+l>>0]=0,l=1;continue}(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1}else r=-1;else r=-2;else r=-3;else r=-4;if(d[(e[c>>2]|0)+l>>0]=r,l=l+1|0,(l|0)==256)break}y=p}function Ud(t){t=t|0;var r=0,n=0;e[t>>2]=35660,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),t=t+88|0,r=e[t>>2]|0,e[t>>2]=0,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r)}function Od(t){t=t|0;var r=0,n=0;if(e[t>>2]=35660,r=e[t+4608>>2]|0,r&&(n=t+4612|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),e[t>>2]=36736,r=e[t+92>>2]|0,r&&(n=t+96|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r)),n=t+88|0,r=e[n>>2]|0,e[n>>2]=0,!r){a0(t);return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),a0(t)}function Nd(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;if(O=y,y=y+352|0,_=O+328|0,F=O+192|0,n=O+343|0,s=O+342|0,o=O+341|0,l=O+340|0,I=O+176|0,c=O+168|0,h=O+160|0,p=O+152|0,V=O,U=O+136|0,e[t+28>>2]|0&&(e[t+20>>2]|0)!=1){if(k=t+4|0,B=t+32|0,a=e[B>>2]|0,!a){if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[n>>0]|0,P0(44,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}if(t=e[t+12>>2]|0,(t|0)==8)switch(a|0){case 1:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[s>>0]|0,P0(45,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[o>>0]|0,P0(46,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(48)|0,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],d[_>>0]=d[l>>0]|0,P0(47,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=F+56|0,o=F+4|0,e[F>>2]=36160,e[a>>2]=36180,f=0,h0(62,F+56|0,o|0),O=f,f=0,O&1&&(M=b()|0,H0(a),r0(M|0)),e[F+128>>2]=0,e[F+132>>2]=-1,e[F>>2]=36200,e[F+56>>2]=36220,f=0,n0(180,o|0),O=f,f=0;do if(O&1)t=b()|0;else{if(e[o>>2]=36236,l=F+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[F+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),O=f,f=0,O&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,F|0,49007,21)|0,_=f,f=0;do if(!(_&1)&&(f=0,g=y0(36,t|0,e[B>>2]|0)|0,_=f,f=0,!(_&1))&&(f=0,L0(28,g|0,50997,18)|0,_=f,f=0,!(_&1))){if(s=de(16)|0,f=0,h0(64,I|0,o|0),_=f,f=0,_&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,I|0),_=f,f=0,_&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(I),!n)break;ge(s|0)}else M=34;while(!1);(M|0)==34&&(t=b()|0),e[F>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}switch((t|0)<=8&&(t=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,t|0,8,35648),M=f,f=0,M&1||Be(t|0,824,96),M=b()|0,ge(t|0),r0(M|0)),n=16-t|0,a|0){case 1:{if(t=G0(60)|0,e[c>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[c>>2],e[_+4>>2]=e[c+4>>2],P0(41,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 2:{if(t=G0(60)|0,e[h>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[h>>2],e[_+4>>2]=e[h+4>>2],P0(42,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}case 3:{if(t=G0(60)|0,e[p>>2]=n,f=0,e[F>>2]=e[r>>2],e[F+4>>2]=e[r+4>>2],e[F+8>>2]=e[r+8>>2],e[_>>2]=e[p>>2],e[_+4>>2]=e[p+4>>2],P0(43,t|0,F|0,k|0,_|0),M=f,f=0,!(M&1))return M=t,y=O,M|0;M=b()|0,a0(t),r0(M|0)}default:{a=V+56|0,o=V+4|0,e[V>>2]=36160,e[a>>2]=36180,f=0,h0(62,V+56|0,o|0),F=f,f=0,F&1&&(M=b()|0,H0(a),r0(M|0)),e[V+128>>2]=0,e[V+132>>2]=-1,e[V>>2]=36200,e[V+56>>2]=36220,f=0,n0(180,o|0),F=f,f=0;do if(F&1)t=b()|0;else{if(e[o>>2]=36236,l=V+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[V+52>>2]=16,e[_>>2]=0,e[_+4>>2]=0,e[_+8>>2]=0,f=0,h0(63,o|0,_|0),F=f,f=0,F&1){t=b()|0,f0(_),f0(l),ce(o);break}f0(_),f=0,t=L0(28,V|0,49007,21)|0,F=f,f=0;do if(!(F&1)&&(f=0,C=y0(36,t|0,e[B>>2]|0)|0,F=f,f=0,!(F&1))&&(f=0,L0(28,C|0,50997,18)|0,F=f,f=0,!(F&1))){if(s=de(16)|0,f=0,h0(64,U|0,o|0),F=f,f=0,F&1)t=b()|0;else if(!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,P0(36,s|0,9,35648,U|0),F=f,f=0,F&1?n=1:(f=0,m0(6,s|0,824,96),f=0,n=0),t=b()|0,f0(U),!n)break;ge(s|0)}else M=64;while(!1);(M|0)==64&&(t=b()|0),e[V>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),M=t,r0(M|0)}while(!1);M=t,H0(a),r0(M|0)}}}return n=e[r+4>>2]|0,s=G0(16)|0,t=e[t+16>>2]|0,n?(e[s>>2]=36108,e[s+4>>2]=n,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0):(M=e[r>>2]|0,e[s>>2]=36132,e[s+4>>2]=M,e[s+8>>2]=1,e[s+12>>2]=t,M=s,y=O,M|0)}function Bd(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;a=y,y=y+32|0,h=a,hi(h,e[t+128>>2]|0,e[t+136>>2]|0),c=e[r+4>>2]|0,l=e[r+8>>2]|0,l=l|0?l:e[h+8>>2]|0,o=e[r+12>>2]|0,o=o|0?o:e[h+12>>2]|0,n=e[r+16>>2]|0,s=e[h+16>>2]|0,e[t+176>>2]=c|0?c:e[h+4>>2]|0,e[t+180>>2]=l,e[t+184>>2]=o,Hd(t),o=t+132|0,r=(e[o>>2]|0)+32|0,r=(r|0)<128?2:(r|0)/64|0,l=0;do e[t+188+(l*12|0)>>2]=r,e[t+188+(l*12|0)+4>>2]=0,E[t+188+(l*12|0)+8>>1]=0,E[t+188+(l*12|0)+10>>1]=1,l=l+1|0;while((l|0)!=365);c=(e[o>>2]|0)+32|0,c=(c|0)<128?2:(c|0)/64|0,h=(n|0?n:s)&255,e[t+4568>>2]=c,e[t+4572>>2]=0,d[t+4576>>0]=h,d[t+4577>>0]=1,d[t+4578>>0]=0,e[t+4580>>2]=c,e[t+4584>>2]=1,d[t+4588>>0]=h,d[t+4589>>0]=1,d[t+4590>>0]=0,e[t+4592>>2]=0,y=a}function Vd(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;for(a=t+88|0,l=e[r>>2]|0,e[r>>2]=0,r=e[a>>2]|0,e[a>>2]=l,r&&Ce[e[(e[r>>2]|0)+4>>2]&255](r),a=s+4|0,l=e[a>>2]|0,d[t+4620>>0]=o&1,r=t+156|0,e[r>>2]=e[n>>2],e[r+4>>2]=e[n+4>>2],e[r+8>>2]=e[n+8>>2],e[r+12>>2]=e[n+12>>2],Hi(t,s),qd(t),r=e[t+116>>2]|0,t=e[t+112>>2]|0;o=r+-1|0,n=(d[o>>0]|0)==-1?7:8,!((t|0)<(n|0));)r=o,t=t-n|0;r=r-l|0,o=e[a>>2]|0,o&&(e[a>>2]=o+r,s=s+8|0,e[s>>2]=(e[s>>2]|0)-r)}function qd(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0;K=y,y=y+32|0,Z=K+12|0,X=K,c=t+172|0,M=(e[c>>2]|0)+4|0,(e[t+28>>2]|0)==1?h=e[t+20>>2]|0:h=1,r=W(h<<1,M)|0,e[Z>>2]=0,s0=Z+4|0,e[s0>>2]=0,e[Z+8>>2]=0;e:do if(r){if((r|0)<0&&(f=0,n0(178,Z|0),t0=f,f=0,t0&1)||(F=6),(F|0)==6&&(f=0,n=u0(67,r|0)|0,t0=f,f=0,!(t0&1))){for(e[s0>>2]=n,e[Z>>2]=n,e[Z+8>>2]=n+r;;)if(d[n>>0]=0,n=(e[s0>>2]|0)+1|0,e[s0>>2]=n,r=r+-1|0,!r)break e}n=b()|0,r=e[Z>>2]|0,r||r0(n|0),(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),a0(r),r0(n|0)}while(!1);e[X>>2]=0,t0=X+4|0,e[t0>>2]=0,e[X+8>>2]=0;do if(!h)F=19;else{if(h>>>0>1073741823&&(f=0,n0(178,X|0),_=f,f=0,_&1)||(F=17),(F|0)==17&&(s=h<<2,f=0,o=u0(67,s|0)|0,_=f,f=0,!(_&1))){e[X>>2]=o,F=o+(h<<2)|0,e[X+8>>2]=F,je(o|0,0,s|0)|0,e[t0>>2]=F,F=19;break}n=b()|0,r=e[X>>2]|0,s=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-s|0)>>>2)<<2)),a0(r))}while(!1);if((F|0)==19){p=t+8|0,r=e[p>>2]|0;e:do if((r|0)>0){if(g=t+4596|0,C=W(h,M)|0,I=C+1|0,k=t+4600|0,U=t+160|0,B=t+168|0,V=t+164|0,O=t+156|0,_=t+88|0,a=t+4592|0,(h|0)>0)l=0;else{for(l=0;;){if(o=e[Z>>2]|0,n=o+1|0,e[g>>2]=n,s=o+I|0,e[k>>2]=s,l&1?(e[g>>2]=s,e[k>>2]=n,n=1):n=I,h=e[U>>2]|0,(h|0)<=(l|0)&&(l|0)<((e[B>>2]|0)+h|0)){if(h=e[_>>2]|0,f=0,P0(e[(e[h>>2]|0)+8>>2]|0,h|0,o+(n+((e[O>>2]|0)-C))|0,e[V>>2]|0,M|0),h=f,f=0,h&1)break;r=e[p>>2]|0}if(l=l+1|0,(l|0)>=(r|0)){F=50;break e}}n=b()|0;break}i:for(;;){n=e[Z>>2]|0,r=n+1|0,e[g>>2]=r,n=n+I|0,e[k>>2]=n,l&1&&(e[g>>2]=n,e[k>>2]=r,r=n),o=e[X>>2]|0,n=r,s=0;do{if(e[a>>2]=e[o+(s<<2)>>2],F=e[c>>2]|0,d[n+F>>0]=d[n+(F+-1)>>0]|0,d[(e[k>>2]|0)+-1>>0]=d[e[g>>2]>>0]|0,f=0,h0(83,t|0,0),F=f,f=0,F&1){F=38;break i}o=e[X>>2]|0,e[o+(s<<2)>>2]=e[a>>2],n=(e[g>>2]|0)+M|0,e[g>>2]=n,r=e[k>>2]|0,e[k>>2]=r+M,s=s+1|0}while((s|0)<(h|0));if(F=e[U>>2]|0,(F|0)<=(l|0)&&(l|0)<((e[B>>2]|0)+F|0)&&(F=e[_>>2]|0,f=0,P0(e[(e[F>>2]|0)+8>>2]|0,F|0,r+(M+((e[O>>2]|0)-C))|0,e[V>>2]|0,M|0),F=f,f=0,F&1)){F=30;break}if(l=l+1|0,(l|0)>=(e[p>>2]|0)){F=50;break e}}if((F|0)==30){n=b()|0;break}else if((F|0)==38){n=b()|0;break}}else F=50;while(!1);do if((F|0)==50){if(f=0,n0(183,t|0),t=f,f=0,t&1){n=b()|0;break}if(r=e[X>>2]|0,n=r,r&&(s=e[t0>>2]|0,(s|0)!=(r|0)&&(e[t0>>2]=s+(~((s+-4-n|0)>>>2)<<2)),a0(r)),r=e[Z>>2]|0,!r){y=K;return}(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),a0(r),y=K;return}while(!1);r=e[X>>2]|0,s=r,r&&(o=e[t0>>2]|0,(o|0)!=(r|0)&&(e[t0>>2]=o+(~((o+-4-s|0)>>>2)<<2)),a0(r))}r=e[Z>>2]|0,r||r0(n|0),(e[s0>>2]|0)!=(r|0)&&(e[s0>>2]=r),a0(r),r0(n|0)}function bd(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0;if(I=t+4596|0,n=e[I>>2]|0,V=t+172|0,r=e[V>>2]|0,!((r|0)<=0))for(k=t+4600|0,U=t+4604|0,B=t+4592|0,c=n,l=N[n+-1>>0]|0,n=N[n>>0]|0,C=0;p=e[k>>2]|0,a=d[p+(C+-1)>>0]|0,g=a&255,o=C+1|0,s=N[c+o>>0]|0,h=e[U>>2]|0,c=n-l|0,l=l-g|0,h=((((d[h+(s-n)>>0]|0)*9|0)+(d[h+c>>0]|0)|0)*9|0)+(d[h+l>>0]|0)|0,p=p+C|0,h?(r=n-g>>31,(r^l|0)<0?r=n:r=g+((r^c|0)<0?0:c)|0,g=Gd(t,h,N[p>>0]|0,r,0)|0,d[(e[k>>2]|0)+C>>0]=g):(r=Qd(t,a,p,r-C|0)|0,n=r+C|0,(n|0)!=(e[V>>2]|0)&&(g=zd(t,g,N[(e[I>>2]|0)+n>>0]|0)|0,d[(e[k>>2]|0)+n>>0]=g,g=e[B>>2]|0,e[B>>2]=(g|0)<1?0:g+-1|0,r=r+1|0),o=r+C|0,s=e[I>>2]|0,n=N[s+(o+-1)>>0]|0,s=N[s+o>>0]|0),r=e[V>>2]|0,!((r|0)<=(o|0));)c=e[I>>2]|0,l=n,n=s,C=o}function Gd(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(U=r>>31,h=(U^r)-U|0,I=t+188+(h*12|0)+10|0,n=E[I>>1]|0,C=t+188+(h*12|0)|0,o=e[C>>2]|0,(n|0)<(o|0))if((n<<1|0)<(o|0))if((n<<2|0)<(o|0))if((n<<3|0)<(o|0))if((n<<4|0)<(o|0))for(r=5;(n<>1]^U)-U+s|0,k=t+128|0,o=e[k>>2]|0,(n&o|0)==(n|0)?p=n:p=o&~(n>>31),n=t+112|0,(e[n>>2]|0)<8&&_i(t),o=t+108|0,s=e[o>>2]|0,l=s>>>24,a=e[2832+(r<<11)+(l<<3)+4>>2]|0,a?(e[n>>2]=(e[n>>2]|0)-a,e[o>>2]=s<>2]|0):(c=e[t+148>>2]|0,o=e[t+140>>2]|0,n=ji(t)|0,(n|0)<(c+-1-o|0)?r&&(n=(ni(t,r)|0)+(n<>31^n>>1,(((n|0)>-1?n:0-n|0)|0)>65535&&(n=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,n|0,5,35648),t=f,f=0,t&1?(t=b()|0,ge(n|0),r0(t|0)):Be(n|0,824,96))),c=t+136|0,s=e[c>>2]|0,r?a=n:(s?o=0:o=(e[t+188+(h*12|0)+4>>2]<<1)+-1+(E[I>>1]|0)>>31,a=o^n),r=e[t+152>>2]|0,o=(e[C>>2]|0)+((a|0)>-1?a:0-a|0)|0,l=t+188+(h*12|0)+4|0,n=(e[l>>2]|0)+(W(s<<1|1,a)|0)|0,s=E[I>>1]|0,(s|0)==(r|0)&&(o=o>>1,n=n>>1,s=r>>1),e[C>>2]=o,r=s+1|0,E[I>>1]=r,o=r+n|0,(o|0)>=1?(n|0)>0&&(n=n-r|0,I=E[g>>1]|0,E[g>>1]=(I<<16>>16<127&1)+(I&65535),n=(n|0)>0?0:n):(n=E[g>>1]|0,E[g>>1]=(n&65535)-(n<<16>>16>-128&1),n=(o|0)>(~s|0)?o:0-s|0),e[l>>2]=n,r=e[c>>2]|0,s=r<<1|1,o=(W(s,(a^U)-U|0)|0)+p|0,(o|0)>=(0-r|0)?(n=e[k>>2]|0,(n+r|0)<(o|0)&&(o=o-(W(e[t+132>>2]|0,s)|0)|0)):(o=(W(e[t+132>>2]|0,s)|0)+o|0,n=e[k>>2]|0),(o&n|0)==(o|0)?(t=o,t=t&255,t|0):(t=n&~(o>>31),t=t&255,t|0)}function Qd(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;for(c=t+112|0,h=t+108|0,p=t+4592|0,o=e[c>>2]|0,l=0;;){if((o|0)<1&&(_i(t),o=e[c>>2]|0),a=e[h>>2]|0,o=o+-1|0,e[c>>2]=o,e[h>>2]=a<<1,(a|0)>=0){g=8;break}if(a=e[p>>2]|0,C=1<>2],I=s-l|0,I=(C|0)<(I|0)?C:I,l=I+l|0,(I|0)==(C|0)&&(e[p>>2]=(a|0)>30?31:a+1|0),(l|0)==(s|0)){o=s;break}}return(g|0)==8&&((l|0)!=(s|0)?(o=e[p>>2]|0,(o+-4|0)>>>0<28?o=ni(t,e[36476+(o<<2)>>2]|0)|0:o=0,o=o+l|0,(o|0)>(s|0)&&(o=de(16)|0,!(d[8]|0)&&Ae(8)|0&&(Te(72,35648,Q|0)|0,ve(8)),f=0,m0(7,o|0,5,35648),I=f,f=0,I&1?(I=b()|0,ge(o|0),r0(I|0)):Be(o|0,824,96))):o=s),(o|0)<=0||je(n|0,r|0,o|0)|0,o|0}function zd(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return l=r-n|0,a=t+128|0,s=t+136|0,(((l|0)>-1?l:0-l|0)|0)>(e[s>>2]|0)?(r=W(sn(t,t+4568|0)|0,n-r>>31|1)|0,o=e[s>>2]|0,l=o<<1|1,r=(W(r,l)|0)+n|0,(r|0)>=(0-o|0)?(s=e[a>>2]|0,(s+o|0)<(r|0)&&(r=r-(W(e[t+132>>2]|0,l)|0)|0)):(r=(W(e[t+132>>2]|0,l)|0)+r|0,s=e[a>>2]|0),(r&s|0)==(r|0)?(t=r,t=t&255,t|0):(t=s&~(r>>31),t=t&255,t|0)):(n=sn(t,t+4580|0)|0,l=e[s>>2]|0,o=l<<1|1,r=(W(o,n)|0)+r|0,(r|0)>=(0-l|0)?(s=e[a>>2]|0,(s+l|0)<(r|0)&&(r=r-(W(e[t+132>>2]|0,o)|0)|0)):(r=(W(e[t+132>>2]|0,o)|0)+r|0,s=e[a>>2]|0),(r&s|0)==(r|0)?(t=r,t=t&255,t|0):(t=s&~(r>>31),t=t&255,t|0))}function sn(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;if(p=r+9|0,n=N[p>>0]|0,l=r+4|0,o=(W(n>>>1,e[l>>2]|0)|0)+(e[r>>2]|0)|0,(n|0)<(o|0)){s=0;do n=n<<1,s=s+1|0;while((n|0)<(o|0))}else s=0;a=e[t+148>>2]|0,c=e[36476+(e[t+4592>>2]<<2)>>2]|0,n=e[t+140>>2]|0,o=ji(t)|0;do if((o|0)<(a+-2-c-n|0))if(s){c=(ni(t,s)|0)+(o<>2]|0,o=c+s|0,a=o&1,n=a,l=1,o=(a+o|0)/2|0;break}else{s=e[l>>2]|0,t=s+o|0,n=t&1,t=(n+t|0)/2|0,h=8;break}else o=(ni(t,n)|0)+1|0,a=e[l>>2]|0,t=o+a|0,n=t&1,t=(n+t|0)/2|0,s?(c=o,l=1,o=t,s=a):(s=a,h=8);while(!1);return(h|0)==8&&(c=o,l=N[r+10>>0]<<1>>>0>=(N[p>>0]|0)>>>0,o=t),o=(n|0)!=0^l?o:0-o|0,(o|0)<0&&(h=r+10|0,d[h>>0]=(N[h>>0]|0)+1),n=(c+1-s>>1)+(e[r>>2]|0)|0,e[r>>2]=n,s=d[p>>0]|0,s<<24>>24!=(d[r+8>>0]|0)?(r=s,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r,o|0):(e[r>>2]=n>>1,h=(s&255)>>>1,d[p>>0]=h,r=r+10|0,d[r>>0]=(N[r>>0]|0)>>>1,r=h,r=r&255,r=r+1|0,r=r&255,d[p>>0]=r,o|0)}function Hd(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;I=y,y=y+32|0,s=I,C=t+136|0;e:do if(e[C>>2]|0)r=t+144|0;else if(n=e[t+128>>2]|0,r=t+144|0,(n|0)==((1<>2])+-1|0)&&(hi(s,n,0),(e[s+4>>2]|0)==(e[t+176>>2]|0))&&(e[s+8>>2]|0)==(e[t+180>>2]|0)&&(e[s+12>>2]|0)==(e[t+184>>2]|0))switch(e[r>>2]|0){case 8:{C=e[8900]|0,e[t+4604>>2]=C+(((e[8901]|0)-C|0)>>>1),y=I;return}case 10:{C=e[8903]|0,e[t+4604>>2]=C+(((e[8904]|0)-C|0)>>>1),y=I;return}case 12:{C=e[8906]|0,e[t+4604>>2]=C+(((e[8907]|0)-C|0)>>>1),y=I;return}case 16:{C=e[8909]|0,e[t+4604>>2]=C+(((e[8910]|0)-C|0)>>>1),y=I;return}default:break e}while(!1);if(g=1<>2],n=t+4608|0,s=g<<1,o=t+4612|0,l=e[o>>2]|0,r=e[n>>2]|0,a=l-r|0,s>>>0<=a>>>0?s>>>0>>0&&(c=r+s|0,(l|0)!=(c|0))&&(e[o>>2]=c):(Yi(n,s-a|0),r=e[n>>2]|0),p=t+4604|0,e[p>>2]=r+g,r=0-g|0,(g|0)<=(r|0)){y=I;return}c=t+184|0,h=t+180|0,a=t+176|0,l=r;do r=e[c>>2]|0,(l|0)>(0-r|0)?(n=e[h>>2]|0,(l|0)>(0-n|0)?(s=e[a>>2]|0,(l|0)>(0-s|0)?(o=e[C>>2]|0,(l|0)>=(0-o|0)?(o|0)<(l|0)?(s|0)<=(l|0)?(n|0)>(l|0)?r=2:r=(r|0)>(l|0)?3:4:r=1:r=0:r=-1):r=-2):r=-3):r=-4,d[(e[p>>2]|0)+l>>0]=r,l=l+1|0;while((l|0)!=(g|0));y=I}function Yd(t){t=t|0,a0(t)}function jd(t){return t=t|0,50767}function Xd(t,r,n){t=t|0,r=r|0,n=n|0,Tt(t,50754,12)}function Kd(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0;U=y,y=y+16|0,B=U,e[B>>2]=0,V=B+4|0,e[V>>2]=0,e[B+8>>2]=0,I=B+8|0,f=0,o=u0(67,1)|0,C=f,f=0;e:do if(!(C&1)&&(C=o+1|0,d[o>>0]=n,e[B>>2]=o,e[V>>2]=C,e[I>>2]=C,f=0,h0(84,B|0,r&65535|0),C=f,f=0,!(C&1))&&(f=0,h0(84,B|0,t&65535|0),C=f,f=0,!(C&1))){if(p=s&255,o=e[V>>2]|0,n=e[I>>2]|0,o>>>0>=n>>>0){if(r=e[B>>2]|0,t=r,a=o-t+1|0,(a|0)<0){if(f=0,n0(178,B|0),C=f,f=0,C&1){k=52;break}t=e[B>>2]|0,n=e[I>>2]|0,r=t}if(h=r,o=n-h|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,n=e[V>>2]|0,c=n-h|0,o?k=12:(o=0,a=0)):(c=e[V>>2]|0,o=2147483647,n=c,c=c-h|0,k=12),(k|0)==12&&(f=0,a=u0(67,o|0)|0,C=f,f=0,C&1)){k=52;break}d[a+c>>0]=p,g=n-h|0,C=a+(c-g)|0,ti(C|0,r|0,g|0)|0,e[B>>2]=C,e[V>>2]=a+(c+1),e[I>>2]=a+o,t&&a0(t)}else d[o>>0]=p,e[V>>2]=(e[V>>2]|0)+1;i:do if((s|0)>0){for(C=0;;){if(C=C+1|0,g=C&255,o=e[V>>2]|0,r=e[I>>2]|0,o>>>0>=r>>>0){if(t=e[B>>2]|0,n=t,a=o-n+1|0,(a|0)<0){if(f=0,n0(178,B|0),p=f,f=0,p&1)break;t=e[B>>2]|0,n=t,r=e[I>>2]|0}if(p=t,o=r-p|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,r=e[V>>2]|0,c=r-p|0,o?k=25:(h=0,a=0)):(c=e[V>>2]|0,o=2147483647,r=c,c=c-p|0,k=25),(k|0)==25){if(k=0,f=0,a=u0(67,o|0)|0,h=f,f=0,h&1)break;h=o}d[a+c>>0]=g,o=a+(c+1)|0,p=r-p|0,g=a+(c-p)|0,ti(g|0,t|0,p|0)|0,e[B>>2]=g,e[V>>2]=o,e[I>>2]=a+h,n&&(a0(n),o=e[V>>2]|0)}else d[o>>0]=g,o=(e[V>>2]|0)+1|0,e[V>>2]=o;if(n=e[I>>2]|0,o>>>0>=n>>>0){if(r=e[B>>2]|0,t=r,a=o-t+1|0,(a|0)<0){if(f=0,n0(178,B|0),g=f,f=0,g&1)break;t=e[B>>2]|0,n=e[I>>2]|0,r=t}if(p=r,o=n-p|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,a=e[V>>2]|0,c=a-p|0,o?k=36:(h=0,n=0)):(c=e[V>>2]|0,o=2147483647,a=c,c=c-p|0,k=36),(k|0)==36){if(k=0,f=0,n=u0(67,o|0)|0,g=f,f=0,g&1)break;h=o}d[n+c>>0]=17,o=n+(c+1)|0,p=a-p|0,g=n+(c-p)|0,ti(g|0,r|0,p|0)|0,e[B>>2]=g,e[V>>2]=o,e[I>>2]=n+h,t&&(a0(t),o=e[V>>2]|0)}else d[o>>0]=17,o=(e[V>>2]|0)+1|0,e[V>>2]=o;if(n=e[I>>2]|0,o>>>0>=n>>>0){if(r=e[B>>2]|0,t=r,a=o-t+1|0,(a|0)<0){if(f=0,n0(178,B|0),g=f,f=0,g&1)break;t=e[B>>2]|0,n=e[I>>2]|0,r=t}if(h=r,o=n-h|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,n=e[V>>2]|0,c=n-h|0,o?k=48:(o=0,a=0)):(c=e[V>>2]|0,o=2147483647,n=c,c=c-h|0,k=48),(k|0)==48&&(k=0,f=0,a=u0(67,o|0)|0,g=f,f=0,g&1))break;d[a+c>>0]=0,p=n-h|0,g=a+(c-p)|0,ti(g|0,r|0,p|0)|0,e[B>>2]=g,e[V>>2]=a+(c+1),e[I>>2]=a+o,t&&a0(t)}else d[o>>0]=0,e[V>>2]=(e[V>>2]|0)+1;if((C|0)>=(s|0))break i}l=b()|0;break e}while(!1);if(f=0,c=u0(67,20)|0,s=f,f=0,s&1)k=52;else{e[c>>2]=36800,d[c+4>>0]=-9,t=c+8|0,e[t>>2]=0,a=c+12|0,e[a>>2]=0,n=c+16|0,e[n>>2]=0,o=e[V>>2]|0,s=e[B>>2]|0,r=o-s|0;do if((o|0)!=(s|0)){if((r|0)<0&&(f=0,n0(178,t|0),s=f,f=0,s&1)||(k=62),(k|0)==62&&(f=0,l=u0(67,r|0)|0,s=f,f=0,!(s&1))){if(e[a>>2]=l,e[t>>2]=l,e[n>>2]=l+r,o=e[B>>2]|0,n=e[V>>2]|0,(o|0)==(n|0))break;do d[l>>0]=d[o>>0]|0,l=(e[a>>2]|0)+1|0,e[a>>2]=l,o=o+1|0;while((o|0)!=(n|0));o=e[B>>2]|0;break}l=b()|0,o=e[t>>2]|0,o&&((e[a>>2]|0)!=(o|0)&&(e[a>>2]=o),a0(o)),a0(c);break e}while(!1);return o?((e[V>>2]|0)!=(o|0)&&(e[V>>2]=o),a0(o),y=U,c|0):(y=U,c|0)}}else k=52;while(!1);return(k|0)==52&&(l=b()|0),o=e[B>>2]|0,o||r0(l|0),(e[V>>2]|0)!=(o|0)&&(e[V>>2]=o),a0(o),r0(l|0),0}function Wd(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0;V=y,y=y+32|0,k=V+28|0,_=V+16|0,B=V+4|0,U=V,e[_>>2]=0,F=_+4|0,e[F>>2]=0,e[_+8>>2]=0,C=G0(5)|0,e[_>>2]=C,I=_+8|0,e[I>>2]=C+5,d[C>>0]=74,d[C+1>>0]=70,d[C+2>>0]=73,d[C+3>>0]=70,d[C+4>>0]=0,e[F>>2]=C+5,f=0,h0(84,_|0,e[t>>2]&65535|0),C=f,f=0;e:do if(C&1)O=43;else{if(p=e[t+4>>2]&255,r=e[F>>2]|0,s=e[I>>2]|0,r>>>0>=s>>>0){if(o=e[_>>2]|0,l=o,a=r-l+1|0,(a|0)<0){if(f=0,n0(178,_|0),C=f,f=0,C&1){O=43;break}l=e[_>>2]|0,s=e[I>>2]|0,o=l}if(h=o,r=s-h|0,r>>>0<1073741823?(r=r<<1,r=r>>>0>>0?a:r,s=e[F>>2]|0,c=s-h|0,r?O=10:(r=0,a=0)):(c=e[F>>2]|0,r=2147483647,s=c,c=c-h|0,O=10),(O|0)==10&&(f=0,a=u0(67,r|0)|0,C=f,f=0,C&1)){O=43;break}d[a+c>>0]=p,g=s-h|0,C=a+(c-g)|0,ti(C|0,o|0,g|0)|0,e[_>>2]=C,e[F>>2]=a+(c+1),e[I>>2]=a+r,l&&a0(l)}else d[r>>0]=p,e[F>>2]=(e[F>>2]|0)+1;if(f=0,h0(84,_|0,e[t+8>>2]&65535|0),C=f,f=0,!(C&1)&&(f=0,h0(84,_|0,e[t+12>>2]&65535|0),C=f,f=0,!(C&1))){if(C=t+16|0,g=e[C>>2]&255,r=e[F>>2]|0,o=e[I>>2]|0,r>>>0>=o>>>0){if(l=e[_>>2]|0,s=l,a=r-s+1|0,(a|0)<0){if(f=0,n0(178,_|0),p=f,f=0,p&1){O=43;break}l=e[_>>2]|0,s=l,o=e[I>>2]|0}if(p=l,r=o-p|0,r>>>0<1073741823?(r=r<<1,r=r>>>0>>0?a:r,a=e[F>>2]|0,c=a-p|0,r?O=23:(h=0,o=0)):(c=e[F>>2]|0,r=2147483647,a=c,c=c-p|0,O=23),(O|0)==23)if(f=0,o=u0(67,r|0)|0,h=f,f=0,h&1){O=43;break}else h=r;d[o+c>>0]=g,r=o+(c+1)|0,p=a-p|0,g=o+(c-p)|0,ti(g|0,l|0,p|0)|0,e[_>>2]=g,e[F>>2]=r,e[I>>2]=o+h,s&&(a0(s),r=e[F>>2]|0)}else d[r>>0]=g,r=(e[F>>2]|0)+1|0,e[F>>2]=r;if(g=t+20|0,p=e[g>>2]&255,s=e[I>>2]|0,r>>>0>=s>>>0){if(o=e[_>>2]|0,l=o,a=r-l+1|0,(a|0)<0){if(f=0,n0(178,_|0),h=f,f=0,h&1){O=43;break}l=e[_>>2]|0,s=e[I>>2]|0,o=l}if(h=o,r=s-h|0,r>>>0<1073741823?(r=r<<1,r=r>>>0>>0?a:r,s=e[F>>2]|0,c=s-h|0,r?O=34:(r=0,a=0)):(c=e[F>>2]|0,r=2147483647,s=c,c=c-h|0,O=34),(O|0)==34&&(f=0,a=u0(67,r|0)|0,M=f,f=0,M&1)){O=43;break}d[a+c>>0]=p,p=s-h|0,M=a+(c-p)|0,ti(M|0,o|0,p|0)|0,e[_>>2]=M,e[F>>2]=a+(c+1),e[I>>2]=a+r,l&&a0(l)}else d[r>>0]=p,e[F>>2]=(e[F>>2]|0)+1;r=e[C>>2]|0;do if((r|0)>0){if(!(e[t+24>>2]|0))if(e[U>>2]=e[F>>2],M=0+(W(r*3|0,e[g>>2]|0)|0)|0,f=0,e[k>>2]=e[U>>2],k0(15,_|0,k|0,0,M|0)|0,M=f,f=0,M&1){O=43;break e}else break;if(s=de(16)|0,f=0,m0(5,B|0,50792,57),M=f,f=0,M&1)r=b()|0;else if(f=0,r=p0(1)|0,M=f,f=0,!(M&1)&&(f=0,P0(36,s|0,1,r|0,B|0),M=f,f=0,!(M&1))?(f=0,m0(6,s|0,824,96),f=0,n=0):n=1,r=b()|0,f0(B),!n){n=r;break e}ge(s|0),n=r;break e}while(!1);if(f=0,c=u0(67,20)|0,M=f,f=0,M&1)O=43;else{e[c>>2]=36800,d[c+4>>0]=-32,l=c+8|0,e[l>>2]=0,a=c+12|0,e[a>>2]=0,s=c+16|0,e[s>>2]=0,r=e[F>>2]|0,M=e[_>>2]|0,o=r-M|0;do if((r|0)!=(M|0)){if((o|0)<0&&(f=0,n0(178,l|0),M=f,f=0,M&1)||(O=53),(O|0)==53&&(f=0,n=u0(67,o|0)|0,M=f,f=0,!(M&1))){if(e[a>>2]=n,e[l>>2]=n,e[s>>2]=n+o,r=e[_>>2]|0,s=e[F>>2]|0,(r|0)==(s|0))break;do d[n>>0]=d[r>>0]|0,n=(e[a>>2]|0)+1|0,e[a>>2]=n,r=r+1|0;while((r|0)!=(s|0));r=e[_>>2]|0;break}r=b()|0,n=e[l>>2]|0,n&&((e[a>>2]|0)!=(n|0)&&(e[a>>2]=n),a0(n)),a0(c),O=44;break e}while(!1);return r?((e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),a0(r),y=V,c|0):(y=V,c|0)}}else O=43}while(!1);return(O|0)==43&&(r=b()|0,O=44),(O|0)==44&&(n=r),r=e[_>>2]|0,r||r0(n|0),(e[F>>2]|0)!=(r|0)&&(e[F>>2]=r),a0(r),r0(n|0),0}function on(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0;c=y,y=y+16|0,p=c,e[p>>2]=0,g=p+4|0,e[g>>2]=0,e[p+8>>2]=0,f=0,r=u0(67,1)|0,a=f,f=0;e:do if(!(a&1)&&(a=r+1|0,d[r>>0]=1,e[p>>2]=r,e[g>>2]=a,e[p+8>>2]=a,f=0,h0(84,p|0,e[t>>2]&65535|0),a=f,f=0,!(a&1))&&(f=0,h0(84,p|0,e[t+4>>2]&65535|0),a=f,f=0,!(a&1))&&(f=0,h0(84,p|0,e[t+8>>2]&65535|0),a=f,f=0,!(a&1))&&(f=0,h0(84,p|0,e[t+12>>2]&65535|0),a=f,f=0,!(a&1))&&(f=0,h0(84,p|0,e[t+16>>2]&65535|0),a=f,f=0,!(a&1))&&(f=0,h=u0(67,20)|0,a=f,f=0,!(a&1))){e[h>>2]=36800,d[h+4>>0]=-8,o=h+8|0,e[o>>2]=0,a=h+12|0,e[a>>2]=0,t=h+16|0,e[t>>2]=0,r=e[g>>2]|0,C=e[p>>2]|0,s=r-C|0;do if((r|0)!=(C|0)){if((s|0)<0&&(f=0,n0(178,o|0),C=f,f=0,C&1)||(l=11),(l|0)==11&&(f=0,n=u0(67,s|0)|0,C=f,f=0,!(C&1))){if(e[a>>2]=n,e[o>>2]=n,e[t>>2]=n+s,r=e[p>>2]|0,t=e[g>>2]|0,(r|0)==(t|0))break;do d[n>>0]=d[r>>0]|0,n=(e[a>>2]|0)+1|0,e[a>>2]=n,r=r+1|0;while((r|0)!=(t|0));r=e[p>>2]|0;break}n=b()|0,r=e[o>>2]|0,r&&((e[a>>2]|0)!=(r|0)&&(e[a>>2]=r),a0(r)),a0(h);break e}while(!1);return r?((e[g>>2]|0)!=(r|0)&&(e[g>>2]=r),a0(r),y=c,h|0):(y=c,h|0)}else l=25;while(!1);return(l|0)==25&&(n=b()|0),r=e[p>>2]|0,r||r0(n|0),(e[g>>2]|0)!=(r|0)&&(e[g>>2]=r),a0(r),r0(n|0),0}function Zd(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;return l=G0(5)|0,d[l>>0]=109,d[l+1>>0]=114,d[l+2>>0]=102,d[l+3>>0]=120,d[l+4>>0]=t,f=0,o=u0(67,20)|0,s=f,f=0,s&1&&(o=b()|0,a0(l),r0(o|0)),e[o>>2]=36800,d[o+4>>0]=-24,t=o+8|0,e[t>>2]=0,r=o+12|0,e[r>>2]=0,n=o+16|0,e[n>>2]=0,f=0,s=u0(67,5)|0,a=f,f=0,a&1?(a=b()|0,a0(o),a0(l),r0(a|0),0):(e[r>>2]=s,e[t>>2]=s,e[n>>2]=s+5,d[s>>0]=109,a=(e[r>>2]|0)+1|0,e[r>>2]=a,s=l+1|0,d[a>>0]=d[s>>0]|0,a=(e[r>>2]|0)+1|0,e[r>>2]=a,s=s+1|0,d[a>>0]=d[s>>0]|0,a=(e[r>>2]|0)+1|0,e[r>>2]=a,s=s+1|0,d[a>>0]=d[s>>0]|0,a=(e[r>>2]|0)+1|0,e[r>>2]=a,d[a>>0]=d[s+1>>0]|0,e[r>>2]=(e[r>>2]|0)+1,a0(l),o|0)}function Jd(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0;O=y,y=y+16|0,_=O,e[_>>2]=0,F=_+4|0,e[F>>2]=0,e[_+8>>2]=0,B=_+8|0,f=0,o=u0(67,1)|0,U=f,f=0;e:do if(U&1)V=29;else{if(c=o+1|0,U=c,d[o>>0]=r,e[_>>2]=o,e[F>>2]=U,e[B>>2]=U,(r|0)>0){a=c,U=0;do{if(k=U+t&255,a>>>0>=c>>>0){if(o=e[_>>2]|0,h=o,a=a-h+1|0,(a|0)<0){if(f=0,n0(178,_|0),I=f,f=0,I&1){V=28;break}h=e[_>>2]|0,c=e[B>>2]|0,I=h}else I=o;if(C=I,o=c-C|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,c=e[F>>2]|0,p=c-C|0,o?V=13:(g=0,a=0)):(p=e[F>>2]|0,o=2147483647,c=p,p=p-C|0,V=13),(V|0)==13)if(V=0,f=0,a=u0(67,o|0)|0,g=f,f=0,g&1){V=28;break}else g=o;d[a+p>>0]=k,o=a+(p+1)|0,C=c-C|0,k=a+(p-C)|0,ti(k|0,I|0,C|0)|0,e[_>>2]=k,e[F>>2]=o,e[B>>2]=a+g,h&&(a0(h),o=e[F>>2]|0)}else d[a>>0]=k,o=(e[F>>2]|0)+1|0,e[F>>2]=o;if(c=e[B>>2]|0,o>>>0>=c>>>0){if(h=e[_>>2]|0,a=h,p=o-a+1|0,(p|0)<0){if(f=0,n0(178,_|0),k=f,f=0,k&1){V=28;break}h=e[_>>2]|0,a=h,c=e[B>>2]|0}if(C=h,o=c-C|0,o>>>0<1073741823?(o=o<<1,o=o>>>0

>>0?p:o,p=e[F>>2]|0,c=p-C|0,o?V=24:(o=0,g=0)):(c=e[F>>2]|0,o=2147483647,p=c,c=c-C|0,V=24),(V|0)==24&&(V=0,f=0,g=u0(67,o|0)|0,k=f,f=0,k&1)){V=28;break}d[g+c>>0]=0,I=p-C|0,k=g+(c-I)|0,ti(k|0,h|0,I|0)|0,e[_>>2]=k,e[F>>2]=g+(c+1),e[B>>2]=g+o,a&&a0(a)}else d[o>>0]=0,e[F>>2]=(e[F>>2]|0)+1;U=U+1|0,a=e[F>>2]|0,c=e[B>>2]|0}while((U|0)<(r|0));if((V|0)==28){l=b()|0;break}o=n&255,a>>>0>>0?(d[a>>0]=o,a=(e[F>>2]|0)+1|0,e[F>>2]=a):V=37}else a=c,o=n&255,V=37;if((V|0)==37){if(h=e[_>>2]|0,p=h,g=a-p+1|0,(g|0)<0){if(f=0,n0(178,_|0),n=f,f=0,n&1){V=29;break}p=e[_>>2]|0,c=e[B>>2]|0,h=p}if(k=h,a=c-k|0,a>>>0<1073741823?(a=a<<1,a=a>>>0>>0?g:a,g=e[F>>2]|0,C=g-k|0,a?V=43:(I=0,c=0)):(C=e[F>>2]|0,a=2147483647,g=C,C=C-k|0,V=43),(V|0)==43)if(f=0,c=u0(67,a|0)|0,n=f,f=0,n&1){V=29;break}else I=a;d[c+C>>0]=o,a=c+(C+1)|0,t=g-k|0,n=c+(C-t)|0,ti(n|0,h|0,t|0)|0,e[_>>2]=n,e[F>>2]=a,e[B>>2]=c+I,p&&(a0(p),a=e[F>>2]|0)}if(k=s&255,o=e[B>>2]|0,a>>>0>=o>>>0){if(c=e[_>>2]|0,h=c,a=a-h+1|0,(a|0)<0){if(f=0,n0(178,_|0),s=f,f=0,s&1){V=29;break}h=e[_>>2]|0,o=e[B>>2]|0,c=h}if(I=c,o=o-I|0,o>>>0<1073741823?(o=o<<1,o=o>>>0>>0?a:o,p=e[F>>2]|0,g=p-I|0,o?V=54:(C=0,a=0)):(g=e[F>>2]|0,o=2147483647,p=g,g=g-I|0,V=54),(V|0)==54)if(f=0,a=u0(67,o|0)|0,s=f,f=0,s&1){V=29;break}else C=o;d[a+g>>0]=k,o=a+(g+1)|0,n=p-I|0,s=a+(g-n)|0,ti(s|0,c|0,n|0)|0,e[_>>2]=s,e[F>>2]=o,e[B>>2]=a+C,h&&(a0(h),o=e[F>>2]|0)}else d[a>>0]=k,o=(e[F>>2]|0)+1|0,e[F>>2]=o;if(a=e[B>>2]|0,o>>>0>=a>>>0){if(c=e[_>>2]|0,h=c,p=o-h+1|0,(p|0)<0){if(f=0,n0(178,_|0),s=f,f=0,s&1){V=29;break}h=e[_>>2]|0,a=e[B>>2]|0,c=h}if(C=c,o=a-C|0,o>>>0<1073741823?(o=o<<1,o=o>>>0

>>0?p:o,a=e[F>>2]|0,g=a-C|0,o?V=65:(o=0,p=0)):(g=e[F>>2]|0,o=2147483647,a=g,g=g-C|0,V=65),(V|0)==65&&(f=0,p=u0(67,o|0)|0,s=f,f=0,s&1)){V=29;break}d[p+g>>0]=0,n=a-C|0,s=p+(g-n)|0,ti(s|0,c|0,n|0)|0,e[_>>2]=s,e[F>>2]=p+(g+1),e[B>>2]=p+o,h&&a0(h)}else d[o>>0]=0,e[F>>2]=(e[F>>2]|0)+1;if(f=0,g=u0(67,20)|0,B=f,f=0,B&1)V=29;else{e[g>>2]=36800,d[g+4>>0]=-38,h=g+8|0,e[h>>2]=0,p=g+12|0,e[p>>2]=0,a=g+16|0,e[a>>2]=0,o=e[F>>2]|0,B=e[_>>2]|0,c=o-B|0;do if((o|0)!=(B|0)){if((c|0)<0&&(f=0,n0(178,h|0),B=f,f=0,B&1)||(V=72),(V|0)==72&&(f=0,l=u0(67,c|0)|0,B=f,f=0,!(B&1))){if(e[p>>2]=l,e[h>>2]=l,e[a>>2]=l+c,o=e[_>>2]|0,a=e[F>>2]|0,(o|0)==(a|0))break;do d[l>>0]=d[o>>0]|0,l=(e[p>>2]|0)+1|0,e[p>>2]=l,o=o+1|0;while((o|0)!=(a|0));o=e[_>>2]|0;break}l=b()|0,o=e[h>>2]|0,o&&((e[p>>2]|0)!=(o|0)&&(e[p>>2]=o),a0(o)),a0(g);break e}while(!1);return o?((e[F>>2]|0)!=(o|0)&&(e[F>>2]=o),a0(o),y=O,g|0):(y=O,g|0)}}while(!1);return(V|0)==29&&(l=b()|0),o=e[_>>2]|0,o||r0(l|0),(e[F>>2]|0)!=(o|0)&&(e[F>>2]=o),a0(o),r0(l|0),0}function $d(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(C=(r&65535)>>>8&255,I=t+4|0,n=e[I>>2]|0,k=t+8|0,s=e[k>>2]|0,n>>>0>=s>>>0?(o=e[t>>2]|0,l=o,a=n-l+1|0,(a|0)<0&&(ct(t),l=e[t>>2]|0,s=e[k>>2]|0,o=l),g=o,n=s-g|0,n>>>0<1073741823?(n=n<<1,n=n>>>0>>0?a:n,a=e[I>>2]|0,s=a-g|0,n?U=8:(p=0,h=0,c=s,n=a)):(s=e[I>>2]|0,n=2147483647,a=s,s=s-g|0,U=8),(U|0)==8&&(p=n,h=G0(n)|0,c=s,n=a),d[h+c>>0]=C,s=h+(c+1)|0,g=n-g|0,C=h+(c-g)|0,ti(C|0,o|0,g|0)|0,e[t>>2]=C,e[I>>2]=s,e[k>>2]=h+p,l&&(a0(l),s=e[I>>2]|0)):(d[n>>0]=C,s=(e[I>>2]|0)+1|0,e[I>>2]=s),g=r&255,n=e[k>>2]|0,s>>>0>>0){d[s>>0]=g,e[I>>2]=(e[I>>2]|0)+1;return}o=e[t>>2]|0,l=o,s=s-l+1|0,(s|0)<0&&(ct(t),l=e[t>>2]|0,n=e[k>>2]|0,o=l),p=o,n=n-p|0,n>>>0<1073741823?(n=n<<1,n=n>>>0>>0?s:n,a=e[I>>2]|0,s=a-p|0,n?U=18:(h=0,c=0,n=a)):(s=e[I>>2]|0,n=2147483647,a=s,s=s-p|0,U=18),(U|0)==18&&(h=n,c=G0(n)|0,n=a),d[c+s>>0]=g,r=n-p|0,U=c+(s-r)|0,ti(U|0,o|0,r|0)|0,e[t>>2]=U,e[I>>2]=c+(s+1),e[k>>2]=c+h,l&&a0(l)}function eg(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(o=e[t>>2]|0,U=e[r>>2]|0,k=U,h=o,C=n,p=s-C|0,(p|0)<=0)return B=U,B|0;if(I=t+8|0,r=e[I>>2]|0,B=t+4|0,g=e[B>>2]|0,l=g,(p|0)<=(r-l|0)){if(c=l-k|0,(p|0)>(c|0)){if(a=n+c|0,(a|0)==(s|0))r=g;else{l=a,r=g;do d[r>>0]=d[l>>0]|0,r=(e[B>>2]|0)+1|0,e[B>>2]=r,l=l+1|0;while((l|0)!=(s|0))}if((c|0)>0)c=r;else return B=U,B|0}else c=g,a=s;if(o=c-(o+(p-h+k))|0,r=U+o|0,r>>>0>>0){l=c;do d[l>>0]=d[r>>0]|0,r=r+1|0,l=(e[B>>2]|0)+1|0,e[B>>2]=l;while((r|0)!=(g|0))}return gr(c+(0-o)|0,U|0,o|0)|0,gr(U|0,n|0,a-C|0)|0,B=U,B|0}if(l=l-h+p|0,(l|0)<0&&(ct(t),r=e[I>>2]|0,o=e[t>>2]|0),a=o,r=r-a|0,r>>>0<1073741823?(r=r<<1,r=r>>>0>>0?l:r,l=k-a|0,r?c=15:(a=0,p=0)):(r=2147483647,l=k-a|0,c=15),(c|0)==15&&(a=r,p=G0(r)|0),h=p+l|0,r=h,c=p+a|0,(n|0)!=(s|0)){o=n,a=h;do d[a>>0]=d[o>>0]|0,a=r+1|0,r=a,o=o+1|0;while((o|0)!=(s|0));o=e[t>>2]|0}return n=k-o|0,s=p+(l-n)|0,ti(s|0,o|0,n|0)|0,k=(e[B>>2]|0)-k|0,n=r,ti(n|0,U|0,k|0)|0,r=e[t>>2]|0,e[t>>2]=s,e[B>>2]=n+k,e[I>>2]=c,r?(a0(r),B=h,B|0):(B=h,B|0)}function ig(t){t=t|0;var r=0;e[t>>2]=36800,r=e[t+8>>2]|0,r&&(t=t+12|0,(e[t>>2]|0)!=(r|0)&&(e[t>>2]=r),a0(r))}function tg(t){t=t|0;var r=0,n=0;if(e[t>>2]=36800,r=e[t+8>>2]|0,!r){a0(t);return}n=t+12|0,(e[n>>2]|0)!=(r|0)&&(e[n>>2]=r),a0(r),a0(t)}function rg(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;if(ot(r,-1),ot(r,d[t+4>>0]|0),o=t+12|0,s=t+8|0,t=(e[o>>2]|0)-(e[s>>2]|0)+2|0,ot(r,(t&65535)>>>8&255),ot(r,t&255),t=e[s>>2]|0,(e[o>>2]|0)!=(t|0)){n=0;do ot(r,d[t+n>>0]|0),n=n+1|0,t=e[s>>2]|0;while(n>>>0<((e[o>>2]|0)-t|0)>>>0)}}function ot(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;if(o=e[t+4>>2]|0,o)if(n=o+24|0,s=e[n>>2]|0,(s|0)==(e[o+28>>2]|0)){Ni[e[(e[o>>2]|0)+52>>2]&63](o,r&255)|0;return}else{e[n>>2]=s+1,d[s>>0]=r;return}if(n=t+16|0,s=e[n>>2]|0,s>>>0<(e[t+12>>2]|0)>>>0){e[n>>2]=s+1,d[(e[t+8>>2]|0)+s>>0]=r;return}n=de(16)|0,f=0,s=p0(1)|0,r=f,f=0,r&1&&(r=b()|0,ge(n|0),r0(r|0)),f=0,m0(7,n|0,4,s|0),r=f,f=0,r&1?(r=b()|0,ge(n|0),r0(r|0)):Be(n|0,824,96)}function hi(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,o=(r|0)<4095?(r+128|0)/256|0:16,l=(n*3|0)+2+o|0,s=n+1|0,l=(l|0)<(s|0)|(l|0)>(r|0)?s:l,e[t+4>>2]=l,s=(o<<2|3)+(n*5|0)|0,s=(s|0)>(r|0)|(s|0)<(l|0)?l:s,e[t+8>>2]=s,n=(n*7|0)+4+(o*17|0)|0,e[t+12>>2]=(n|0)>(r|0)|(n|0)<(s|0)?s:n,e[t>>2]=r,e[t+16>>2]=64}function ng(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;p=y,y=y+128|0,c=p+100|0,s=p+16|0,n=p+112|0,h=p+4|0,g=p,o=s,l=t+20|0,a=o+84|0;do e[o>>2]=e[l>>2],o=o+4|0,l=l+4|0;while((o|0)<(a|0));e[s+16>>2]=e[t+4>>2],l=As(n,s,t+56|0)|0,n=e[(e[l>>2]|0)+16>>2]|0,t=t+8|0,f=0,e[c>>2]=e[t>>2],e[c+4>>2]=e[t+4>>2],e[c+8>>2]=e[t+8>>2],n=y0(n|0,l|0,c|0)|0,t=f,f=0;do if(t&1)n=b()|0;else{if(o=r+4|0,e[h>>2]=e[o>>2],e[h+4>>2]=e[o+4>>2],e[h+8>>2]=e[o+8>>2],o=r+16|0,t=e[o>>2]|0,c=h+8|0,e[c>>2]=(e[c>>2]|0)-t,c=h+4|0,e[c>>2]=(e[c>>2]|0)+t,c=e[(e[l>>2]|0)+12>>2]|0,e[g>>2]=n,f=0,n=k0(c|0,l|0,g|0,h|0,(d[r>>0]|0?(e[r+8>>2]|0)+t|0:0)|0)|0,h=f,f=0,h&1){if(n=b()|0,s=e[g>>2]|0,e[g>>2]=0,!s)break;Ce[e[(e[s>>2]|0)+4>>2]&255](s);break}if(s=e[g>>2]|0,e[g>>2]=0,s&&Ce[e[(e[s>>2]|0)+4>>2]&255](s),e[r+4>>2]|0||(e[o>>2]=(e[o>>2]|0)+n),!l){y=p;return}Ce[e[(e[l>>2]|0)+4>>2]&255](l),y=p;return}while(!1);l||r0(n|0),Ce[e[(e[l>>2]|0)+4>>2]&255](l),r0(n|0)}function sg(t,r){t=t|0,r=r|0,e[t>>2]=e[r>>2],e[t+4>>2]=e[r+4>>2],e[t+8>>2]=e[r+8>>2],d[t+12>>0]=0,r=t+16|0,t=r+100|0;do e[r>>2]=0,r=r+4|0;while((r|0)<(t|0))}function og(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0;O=y,y=y+32|0,V=O+4|0,I=O+16|0,_=O,an(t),k=t+16|0,o=e[t+24>>2]|0;e:do if((o+-2|0)>>>0<=14)if(U=t+40|0,n=e[U>>2]|0,n>>>0>2)n=5;else{switch(B=t+32|0,l=e[B>>2]|0,l|0){case 0:{n=1;break e}case 4:{if((n|0)==2){n=2;break e}break}case 3:break;default:if(n){n=2;break e}}if(C=t+100|0,n=t+108|0,s=e[n>>2]|0,(s|0)<1?(s=e[k>>2]|0,e[n>>2]=s,n=e[t+20>>2]|0,e[t+112>>2]=n):n=e[t+112>>2]|0,h=Ht(n|0,((n|0)<0)<<31>>31|0,s|0,((s|0)<0)<<31>>31|0)|0,c=(o+7|0)/8|0,c=Ht(h|0,I0|0,c|0,((c|0)<0)<<31>>31|0)|0,h=r+4|0,n=e[h>>2]|0,a=r+8|0,n|0&&(p=e[a>>2]|0,g=Ht(l|0,((l|0)<0)<<31>>31|0,c|0,I0|0)|0,o=I0,0<(o|0)|(o|0)==0&p>>>0>>0)&&(n=de(16)|0,f=0,s=p0(1)|0,_=f,f=0,!(_&1)&&(f=0,m0(7,n|0,3,s|0),_=f,f=0,!(_&1))&&Be(n|0,824,96),_=b()|0,ge(n|0),r0(_|0)),p=t+52|0,g=t+12|0,(l|0)>0)l=0;else{y=O;return}for(;;){if(fn(t,(l|0)==0),s=gs(I,k,p)|0,o=e[(e[s>>2]|0)+8>>2]|0,f=0,e[V>>2]=e[r>>2],e[V+4>>2]=e[r+4>>2],e[V+8>>2]=e[r+8>>2],o=y0(o|0,s|0,V|0)|0,F=f,f=0,F&1){o=32;break}if(F=e[(e[s>>2]|0)+16>>2]|0,e[_>>2]=o,f=0,D0(F|0,s|0,_|0,C|0,t|0,(d[g>>0]|0)!=0|0),F=f,f=0,F&1){o=30;break}if(o=e[_>>2]|0,e[_>>2]=0,o&&Ce[e[(e[o>>2]|0)+4>>2]&255](o),n?(n=n+c|0,e[h>>2]=n,e[a>>2]=(e[a>>2]|0)-c):n=0,o=(e[U>>2]|0)==0,l=(o&1)+l|0,s&&Ce[e[(e[s>>2]|0)+4>>2]&255](s),!o){o=34;break}if((l|0)>=(e[B>>2]|0)){o=34;break}}if((o|0)==30)n=b()|0,o=e[_>>2]|0,e[_>>2]=0,o&&Ce[e[(e[o>>2]|0)+4>>2]&255](o);else if((o|0)==32)n=b()|0,s||(F=n,r0(F|0));else if((o|0)==34){y=O;return}Ce[e[(e[s>>2]|0)+4>>2]&255](s),F=n,r0(F|0)}else n=2;while(!1);s=de(16)|0,f=0,o=p0(1)|0,F=f,f=0,!(F&1)&&(f=0,m0(7,s|0,n|0,o|0),F=f,f=0,!(F&1))&&Be(s|0,824,96),F=b()|0,ge(s|0),r0(F|0)}function an(t){t=t|0;var r=0,n=0,s=0,o=0;if((w1(t)|0)<<24>>24!=-40&&(r=de(16)|0,f=0,n=p0(1)|0,o=f,f=0,!(o&1)&&(f=0,m0(7,r|0,5,n|0),o=f,f=0,!(o&1))&&Be(r|0,824,96),o=b()|0,ge(r|0),r0(o|0)),r=w1(t)|0,r<<24>>24!=-38){for(;s=((ui(t)|0)&255)<<8,s=s|(ui(t)|0)&255,r=ag(t,r)|0,n=-2-r+s|0,!((n|0)<0);){if((n|0)>0){r=s+-2-r|0,n=0;do ui(t)|0,n=n+1|0;while((n|0)!=(r|0))}if(r=w1(t)|0,r<<24>>24==-38){o=8;break}}(o|0)!=8&&(r=de(16)|0,f=0,n=p0(1)|0,o=f,f=0,!(o&1)&&(f=0,m0(7,r|0,5,n|0),o=f,f=0,!(o&1))&&Be(r|0,824,96),o=b()|0,ge(r|0),r0(o|0))}}function fn(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;r||((ui(t)|0)<<24>>24!=-1&&(r=de(16)|0,f=0,n=p0(1)|0,t=f,f=0,!(t&1)&&(f=0,m0(7,r|0,12,n|0),t=f,f=0,!(t&1))&&Be(r|0,824,96),t=b()|0,ge(r|0),r0(t|0)),(ui(t)|0)<<24>>24!=-38&&(r=de(16)|0,f=0,n=p0(1)|0,t=f,f=0,!(t&1)&&(f=0,m0(7,r|0,5,n|0),t=f,f=0,!(t&1))&&Be(r|0,824,96),t=b()|0,ge(r|0),r0(t|0))),ui(t)|0,ui(t)|0,n=ui(t)|0,s=n&255;do if(n<<24>>24==1)ui(t)|0,n=0,o=20;else{if((s|0)==(e[t+32>>2]|0))if(r=ui(t)|0,n<<24>>24){n=0,o=20;break}else break;r=de(16)|0,f=0,n=p0(1)|0,t=f,f=0,!(t&1)&&(f=0,m0(7,r|0,2,n|0),t=f,f=0,!(t&1))&&Be(r|0,824,96),t=b()|0,ge(r|0),r0(t|0)}while(!1);if((o|0)==20)for(;ui(t)|0,n=n+1|0,r=ui(t)|0,(n|0)!=(s|0);)o=20;e[t+36>>2]=r&255,o=ui(t)|0,n=t+40|0,e[n>>2]=o&255,(o&255)>=3&&(r=de(16)|0,f=0,n=p0(1)|0,t=f,f=0,!(t&1)&&(f=0,m0(7,r|0,5,n|0),t=f,f=0,!(t&1))&&Be(r|0,824,96),t=b()|0,ge(r|0),r0(t|0)),(ui(t)|0)<<24>>24&&(r=de(16)|0,f=0,n=p0(1)|0,t=f,f=0,!(t&1)&&(f=0,m0(7,r|0,5,n|0),t=f,f=0,!(t&1))&&Be(r|0,824,96),t=b()|0,ge(r|0),r0(t|0)),s=t+28|0,!(e[s>>2]|0)&&(r=e[t+108>>2]|0,r||(r=e[t+16>>2]|0),e[n>>2]|0?n=e[t+32>>2]|0:n=1,o=W(n,r)|0,t=W(o,((e[t+24>>2]|0)+7|0)/8|0)|0,e[s>>2]=t)}function lg(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;if(!((n|0)<=0)){C=r+4|0,I=r+8|0,U=0;do k=ui(t)|0,s=e[C>>2]|0,o=e[I>>2]|0,s>>>0>=o>>>0?(l=e[r>>2]|0,a=l,c=s-a+1|0,(c|0)<0&&(ct(r),a=e[r>>2]|0,o=e[I>>2]|0,l=a),g=l,s=o-g|0,s>>>0<1073741823?(s=s<<1,s=s>>>0>>0?c:s,c=e[C>>2]|0,o=c-g|0,s?B=10:(p=0,h=0,s=c)):(o=e[C>>2]|0,s=2147483647,c=o,o=o-g|0,B=10),(B|0)==10&&(B=0,p=s,h=G0(s)|0,s=c),d[h+o>>0]=k,g=s-g|0,k=h+(o-g)|0,ti(k|0,l|0,g|0)|0,e[r>>2]=k,e[C>>2]=h+(o+1),e[I>>2]=h+p,a&&a0(a)):(d[s>>0]=k,e[C>>2]=(e[C>>2]|0)+1),U=U+1|0;while((U|0)!=(n|0))}}function ui(t){t=t|0;var r=0,n=0,s=0,o=0;return n=e[t>>2]|0,n?(t=n+12|0,r=e[t>>2]|0,(r|0)==(e[n+16>>2]|0)?t=Se[e[(e[n>>2]|0)+40>>2]&127](n)|0:(e[t>>2]=r+1,t=N[r>>0]|0),o=t&255,o|0):(s=t+8|0,o=e[s>>2]|0,o?(t=t+4|0,r=e[t>>2]|0,n=d[r>>0]|0,r?(e[t>>2]=r+1,e[s>>2]=o+-1,o=n,o|0):(o=n,o|0)):(t=de(16)|0,f=0,r=p0(1)|0,o=f,f=0,o&1&&(o=b()|0,ge(t|0),r0(o|0)),f=0,m0(7,t|0,4,r|0),o=f,f=0,o&1?(o=b()|0,ge(t|0),r0(o|0)):Be(t|0,824,96),0))}function w1(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0;if(n=y,y=y+176|0,r=n+152|0,h=n+16|0,a=n,c=ui(t)|0,s=c&255,c<<24>>24==-1){do r=ui(t)|0;while(r<<24>>24==-1);return y=n,r|0}c=h+56|0,l=h+4|0,e[h>>2]=36160,e[c>>2]=36180,f=0,h0(62,h+56|0,l|0),o=f,f=0,o&1&&(h=b()|0,H0(c),r0(h|0)),e[h+128>>2]=0,e[h+132>>2]=-1,e[h>>2]=36200,e[h+56>>2]=36220,f=0,n0(180,l|0),o=f,f=0;do if(o&1)r=b()|0;else{if(e[l>>2]=36236,o=h+36|0,e[o>>2]=0,e[o+4>>2]=0,e[o+8>>2]=0,e[o+12>>2]=0,e[h+52>>2]=16,e[r>>2]=0,e[r+4>>2]=0,e[r+8>>2]=0,f=0,h0(63,l|0,r|0),n=f,f=0,n&1){h=b()|0,f0(r),f0(o),ce(l),r=h;break}f0(r),e[h+((e[(e[h>>2]|0)+-12>>2]|0)+76)>>2]=48,f=0,r=L0(28,h|0,50907,62)|0,n=f,f=0,!(n&1)&&(n=r+((e[(e[r>>2]|0)+-12>>2]|0)+4)|0,e[n>>2]=e[n>>2]&-75|8,n=r+((e[(e[r>>2]|0)+-12>>2]|0)+4)|0,e[n>>2]=e[n>>2]|16384,e[r+((e[(e[r>>2]|0)+-12>>2]|0)+12)>>2]=2,f=0,y0(38,r|0,s|0)|0,s=f,f=0,!(s&1))&&(n=de(16)|0,f=0,h0(64,a|0,l|0),s=f,f=0,s&1?r=b()|0:(f=0,r=p0(1)|0,s=f,f=0,!(s&1)&&(f=0,P0(36,n|0,12,r|0,a|0),s=f,f=0,!(s&1))?(f=0,m0(6,n|0,824,96),f=0,t=0):t=1,r=b()|0,f0(a),t||(a=r,e[h>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,f0(o),ce(l),H0(c),r0(a|0))),ge(n|0),a=r,e[h>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,f0(o),ce(l),H0(c),r0(a|0)),a=b()|0,e[h>>2]=36200,e[c>>2]=36220,e[l>>2]=36236,f0(o),ce(l),H0(c),r0(a|0)}while(!1);return h=r,H0(c),r0(h|0),0}function ag(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;switch(n=y,y=y+320|0,c=n+300|0,g=n+152|0,h=n+288|0,C=n+16|0,p=n,r<<24>>24){case-9:return I=(ui(t)|0)&255,e[t+24>>2]=I,I=((ui(t)|0)&255)<<8|(ui(t)|0)&255,C=((ui(t)|0)&255)<<8|(ui(t)|0)&255,e[t+16>>2]=C,e[t+20>>2]=I,I=(ui(t)|0)&255,e[t+32>>2]=I,I=6,y=n,I|0;case-8:return I=fg(t)|0,y=n,I|0;case-24:return I=ug(t)|0,y=n,I|0;case-53:case-54:case-55:case-57:case-58:case-59:case-61:case-62:case-63:case-64:{a=g+56|0,o=g+4|0,e[g>>2]=36160,e[a>>2]=36180,f=0,h0(62,g+56|0,o|0),C=f,f=0,C&1&&(I=b()|0,H0(a),r0(I|0)),e[g+128>>2]=0,e[g+132>>2]=-1,e[g>>2]=36200,e[g+56>>2]=36220,f=0,n0(180,o|0),C=f,f=0;do if(C&1)t=b()|0;else{if(e[o>>2]=36236,l=g+36|0,e[l>>2]=0,e[l+4>>2]=0,e[l+8>>2]=0,e[l+12>>2]=0,e[g+52>>2]=16,e[c>>2]=0,e[c+4>>2]=0,e[c+8>>2]=0,f=0,h0(63,o|0,c|0),C=f,f=0,C&1){t=b()|0,f0(c),f0(l),ce(o);break}f0(c),f=0,t=L0(28,g|0,50970,26)|0,C=f,f=0;do if(!(C&1)&&(f=0,s=y0(38,t|0,r&255|0)|0,C=f,f=0,!(C&1))&&(f=0,L0(28,s|0,50997,18)|0,C=f,f=0,!(C&1))){if(s=de(16)|0,f=0,h0(64,h|0,o|0),C=f,f=0,C&1)t=b()|0;else if(f=0,t=p0(1)|0,C=f,f=0,!(C&1)&&(f=0,P0(36,s|0,10,t|0,h|0),C=f,f=0,!(C&1))?(f=0,m0(6,s|0,824,96),f=0,n=0):n=1,t=b()|0,f0(h),!n)break;ge(s|0)}else I=20;while(!1);(I|0)==20&&(t=b()|0),e[g>>2]=36200,e[a>>2]=36220,e[o>>2]=36236,f0(l),ce(o),H0(a),I=t,r0(I|0)}while(!1);I=t,H0(a),r0(I|0)}case-25:case-32:case-2:return I=0,y=n,I|0;default:{h=C+56|0,l=C+4|0,e[C>>2]=36160,e[h>>2]=36180,f=0,h0(62,C+56|0,l|0),g=f,f=0,g&1&&(I=b()|0,H0(h),r0(I|0)),e[C+128>>2]=0,e[C+132>>2]=-1,e[C>>2]=36200,e[C+56>>2]=36220,f=0,n0(180,l|0),g=f,f=0;do if(g&1)t=b()|0;else{if(e[l>>2]=36236,a=C+36|0,e[a>>2]=0,e[a+4>>2]=0,e[a+8>>2]=0,e[a+12>>2]=0,e[C+52>>2]=16,e[c>>2]=0,e[c+4>>2]=0,e[c+8>>2]=0,f=0,h0(63,l|0,c|0),g=f,f=0,g&1){t=b()|0,f0(c),f0(a),ce(l);break}f0(c),f=0,t=L0(28,C|0,51016,20)|0,g=f,f=0;do if(!(g&1)&&(f=0,o=y0(38,t|0,r&255|0)|0,g=f,f=0,!(g&1))&&(f=0,L0(28,o|0,51037,13)|0,g=f,f=0,!(g&1))){if(s=de(16)|0,f=0,h0(64,p|0,l|0),g=f,f=0,g&1)t=b()|0;else if(f=0,t=p0(1)|0,g=f,f=0,!(g&1)&&(f=0,P0(36,s|0,11,t|0,p|0),g=f,f=0,!(g&1))?(f=0,m0(6,s|0,824,96),f=0,n=0):n=1,t=b()|0,f0(p),!n)break;ge(s|0)}else I=40;while(!1);(I|0)==40&&(t=b()|0),e[C>>2]=36200,e[h>>2]=36220,e[l>>2]=36236,f0(a),ce(l),H0(h),I=t,r0(I|0)}while(!1);I=t,H0(h),r0(I|0)}}return 0}function fg(t){t=t|0;var r=0;return(ui(t)|0)<<24>>24!=1?(t=1,t|0):(r=((ui(t)|0)&255)<<8,r=r|(ui(t)|0)&255,e[t+52>>2]=r,r=((ui(t)|0)&255)<<8,r=r|(ui(t)|0)&255,e[t+56>>2]=r,r=((ui(t)|0)&255)<<8,r=r|(ui(t)|0)&255,e[t+60>>2]=r,r=((ui(t)|0)&255)<<8,r=r|(ui(t)|0)&255,e[t+64>>2]=r,r=((ui(t)|0)&255)<<8,r=r|(ui(t)|0)&255,e[t+68>>2]=r,t=11,t|0)}function ug(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;n=y,y=y+16|0,o=n,e[o>>2]=0,l=o+4|0,e[l>>2]=0,e[o+8>>2]=0,f=0,m0(9,t|0,o|0,4),r=f,f=0;e:do if(r&1)s=3;else{r=e[o>>2]|0;i:do if(Mp(r,51051,4)|0)t=4;else{if(f=0,r=u0(69,t|0)|0,a=f,f=0,a&1){s=3;break e}switch(r=r&255,r|0){case 3:case 2:case 1:case 0:{e[t+44>>2]=r,t=5,r=e[o>>2]|0;break i}case 5:case 4:{if(r=de(16)|0,f=0,t=p0(1)|0,a=f,f=0,!(a&1)&&(f=0,m0(7,r|0,7,t|0),a=f,f=0,!(a&1))){f=0,m0(6,r|0,824,96),f=0,s=3;break e}t=b()|0,ge(r|0);break e}default:{if(r=de(16)|0,f=0,t=p0(1)|0,a=f,f=0,!(a&1)&&(f=0,m0(7,r|0,5,t|0),a=f,f=0,!(a&1))){f=0,m0(6,r|0,824,96),f=0,s=3;break e}t=b()|0,ge(r|0);break e}}}while(!1);return r?((e[l>>2]|0)!=(r|0)&&(e[l>>2]=r),a0(r),y=n,t|0):(y=n,t|0)}while(!1);return(s|0)==3&&(t=b()|0),r=e[o>>2]|0,r||r0(t|0),(e[l>>2]|0)!=(r|0)&&(e[l>>2]=r),a0(r),r0(t|0),0}function cg(t){t=t|0;var r=0,n=0,s=0;s=e[(e[t>>2]|0)+-12>>2]|0,e[t+s>>2]=36200,r=t+(s+56)|0,e[r>>2]=36220,n=t+(s+4)|0,e[n>>2]=36236,f0(t+(s+36)|0),ce(n),H0(r)}function hg(t){t=t|0}function mg(t){t=t|0,a0(t)}function dg(t){t=t|0,d[t>>0]=0,t=t+4|0,e[t>>2]=0,e[t+4>>2]=0,e[t+8>>2]=0,e[t+12>>2]=0,e[t+16>>2]=0,e[t+20>>2]=0,e[t+24>>2]=0,e[t+28>>2]=0}function gg(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;if(o=y,y=y+16|0,l=o,r=Zd(r)|0,e[l>>2]=r,n=t+28|0,s=e[n>>2]|0,s>>>0<(e[t+32>>2]|0)>>>0){e[s>>2]=r,e[n>>2]=s+4,e[l>>2]=0,y=o;return}if(f=0,h0(57,t+24|0,l|0),t=f,f=0,t&1)r=b()|0,n=e[l>>2]|0,e[l>>2]=0,n||r0(r|0),Ce[e[(e[n>>2]|0)+4>>2]&255](n),r0(r|0);else{if(r=e[l>>2]|0,e[l>>2]=0,!r){y=o;return}Ce[e[(e[r>>2]|0)+4>>2]&255](r),y=o;return}}function pg(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;if(s=t+4|0,e[s>>2]=e[r>>2],e[s+4>>2]=e[r+4>>2],e[s+8>>2]=e[r+8>>2],ot(t,-1),ot(t,-40),s=t+28|0,o=t+24|0,r=e[o>>2]|0,(e[s>>2]|0)==(r|0))return ot(t,-1),ot(t,-39),t=t+16|0,t=e[t>>2]|0,t|0;n=0;do l=e[r+(n<<2)>>2]|0,Ke[e[(e[l>>2]|0)+8>>2]&127](l,t),n=n+1|0,r=e[o>>2]|0;while(n>>>0<(e[s>>2]|0)-r>>2>>>0);return ot(t,-1),ot(t,-39),l=t+16|0,l=e[l>>2]|0,l|0}function Ag(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;C=y,y=y+48|0,c=C+32|0,o=C+12|0,h=C+8|0,g=C+4|0,I=C,s=n+36|0;do if(!(e[s>>2]|0)&&!(e[n+40>>2]|0)&&!(e[n+44>>2]|0)&&!(e[n+48>>2]|0)&&!(e[n+52>>2]|0)){if(s=e[n+8>>2]|0,(s|0)<=12){l=t+28|0,a=t+32|0;break}if(hi(o,(1<>2]|0),s=on(o)|0,e[h>>2]=s,l=t+28|0,o=e[l>>2]|0,a=t+32|0,o>>>0<(e[a>>2]|0)>>>0){e[o>>2]=s,e[l>>2]=o+4,e[h>>2]=0;break}if(f=0,h0(57,t+24|0,h|0),c=f,f=0,!(c&1)){if(s=e[h>>2]|0,e[h>>2]=0,!s)break;Ce[e[(e[s>>2]|0)+4>>2]&255](s);break}n=b()|0,s=e[h>>2]|0,e[h>>2]=0,s||(I=n,r0(I|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),I=n,r0(I|0)}else p=6;while(!1);do if((p|0)==6){if(s=on(s)|0,e[c>>2]=s,l=t+28|0,o=e[l>>2]|0,a=t+32|0,o>>>0<(e[a>>2]|0)>>>0){e[o>>2]=s,e[l>>2]=o+4,e[c>>2]=0;break}if(f=0,h0(57,t+24|0,c|0),p=f,f=0,!(p&1)){if(s=e[c>>2]|0,e[c>>2]=0,!s)break;Ce[e[(e[s>>2]|0)+4>>2]&255](s);break}n=b()|0,s=e[c>>2]|0,e[c>>2]=0,s||(I=n,r0(I|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),I=n,r0(I|0)}while(!1);s=t+20|0,o=(e[s>>2]|0)+1|0,e[s>>2]=o,s=e[n+24>>2]|0,c=s|0?e[n+16>>2]|0:1,s=Jd(o,c,e[n+20>>2]|0,s)|0,e[g>>2]=s,o=e[l>>2]|0;do if(o>>>0<(e[a>>2]|0)>>>0)e[o>>2]=s,e[l>>2]=o+4,e[g>>2]=0;else{if(f=0,h0(57,t+24|0,g|0),p=f,f=0,!(p&1)){if(s=e[g>>2]|0,e[g>>2]=0,!s)break;Ce[e[(e[s>>2]|0)+4>>2]&255](s);break}n=b()|0,s=e[g>>2]|0,e[g>>2]=0,s||(I=n,r0(I|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),I=n,r0(I|0)}while(!1);h=G0(104)|0,e[h>>2]=36820,e[h+4>>2]=c,o=h+8|0,e[o>>2]=e[r>>2],e[o+4>>2]=e[r+4>>2],e[o+8>>2]=e[r+8>>2],o=h+20|0,s=o+84|0;do e[o>>2]=e[n>>2],o=o+4|0,n=n+4|0;while((o|0)<(s|0));if(e[I>>2]=h,n=e[l>>2]|0,n>>>0<(e[a>>2]|0)>>>0){e[n>>2]=h,e[l>>2]=n+4,e[I>>2]=0,y=C;return}if(f=0,h0(57,t+24|0,I|0),t=f,f=0,t&1)n=b()|0,s=e[I>>2]|0,e[I>>2]=0,s||(I=n,r0(I|0)),Ce[e[(e[s>>2]|0)+4>>2]&255](s),I=n,r0(I|0);else{if(n=e[I>>2]|0,e[I>>2]=0,!n){y=C;return}Ce[e[(e[n>>2]|0)+4>>2]&255](n),y=C;return}}function Sg(t,r,n,s,o,l,a,c,h,p,g){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0,p=p|0,g=g|0;var C=0,I=0,k=0,U=0,B=0,V=0,O=0;return k=y,y=y+96|0,I=k,C=cs(t,r,I,0)|0,C?(o=C,y=k,o|0):(d[I+32>>0]=0,B=e[I+8>>2]|0,O=e[I>>2]|0,V=e[I+4>>2]|0,C=W(V,O)|0,U=e[I+16>>2]|0,C=W(W(C,(B|0)<9?1:2)|0,U)|0,e[s>>2]=C,C=xi(C)|0,e[n>>2]=C,e[o>>2]=O,e[l>>2]=V,e[a>>2]=B,e[c>>2]=e[I+12>>2],e[h>>2]=U,e[p>>2]=e[I+20>>2],e[g>>2]=e[I+24>>2],o=hs(C,e[s>>2]|0,t,r,0,0)|0,y=k,o|0)}function vg(t,r,n,s,o,l,a,c,h){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0,h=h|0;var p=0,g=0,C=0,I=0;C=y,y=y+96|0,p=C+4|0,a=C,g=p,I=g+84|0;do e[g>>2]=0,g=g+4|0;while((g|0)<(I|0));return e[p+16>>2]=l,e[p+8>>2]=o,e[p>>2]=n,e[p+4>>2]=s,n=xi(r)|0,e[c>>2]=n,e[a>>2]=0,n=us(c,r,a,t,r,p,0)|0,e[h>>2]=e[a>>2],y=C,n|0}function Ft(t,r){t=t|0,r=r|0;var n=0;n=y,y=y+16|0,e[n>>2]=r,r=e[9320]|0,_n(r,t,n)|0,yp(10,r)|0,ae()}function tt(t){t=t|0,_1(51337,51366,1164,51442)}function ct(t){t=t|0,_1(51463,51486,303,51442)}function un(){var t=0,r=0;if(t=y,y=y+16|0,Qn(37024,4)|0)Ft(51562,t);else return r=Gn(e[9255]|0)|0,y=t,r|0;return 0}function G0(t){t=t|0;var r=0;r=t|0?t:1,t=xi(r)|0;e:do if(!t){for(;t=Dg()|0,!!t;)if(On[t&7](),t=xi(r)|0,t)break e;r=de(4)|0,e[r>>2]=36844,Be(r|0,592,78)}while(!1);return t|0}function a0(t){t=t|0,Ze(t)}function wg(t){t=t|0,a0(t)}function Tg(t){t=t|0,e[t>>2]=36844}function Cg(t){t=t|0}function xg(t){t=t|0,a0(t)}function yg(t){return t=t|0,51611}function cn(t){t=t|0;var r=0;r=y,y=y+16|0,f=0,we(t|0),t=f,f=0,t&1||(f=0,h0(85,51626,r|0),f=0),t=b(0)|0,zi(t|0)|0,f=0,h0(85,51666,r+8|0),f=0,t=b(0)|0,f=0,we(3),r=f,f=0,r&1?(r=b(0)|0,Ie(r)):Ie(t)}function Ig(){var t=0,r=0,n=0;f=0,t=p0(2)|0,n=f,f=0,n&1&&(n=b(0)|0,Ie(n)),t|0&&(r=e[t>>2]|0,(r|0)!=0)&&(n=r+48|0,(e[n>>2]&-256|0)==1126902528?(e[n+4>>2]|0)==1129074247:0)&&cn(e[r+12>>2]|0),n=e[9208]|0,e[9208]=n+0,cn(n)}function Dg(){var t=0;return t=e[9214]|0,e[9214]=t+0,t|0}function uA(t){t=t|0}function Tr(t){t=t|0,e[t>>2]=36868,$g(t+4|0)}function Eg(t){t=t|0,Tr(t),a0(t)}function kg(t){return t=t|0,e[t+4>>2]|0}function cA(t){t=t|0}function Fg(t){t=t|0,e[t>>2]=36888}function Mg(t){t=t|0}function _g(t){t=t|0,a0(t)}function Rg(t){return t=t|0,51716}function Pg(t){t=t|0}function Lg(t){t=t|0}function Ug(t){t=t|0}function Og(t){t=t|0,a0(t)}function Ng(t){t=t|0,a0(t)}function Bg(t){t=t|0,a0(t)}function Vg(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;if(a=y,y=y+64|0,l=a,(t|0)!=(r|0))if(r|0&&(o=mn(r,656,672,0)|0,(o|0)!=0)){r=l,s=r+56|0;do e[r>>2]=0,r=r+4|0;while((r|0)<(s|0));e[l>>2]=o,e[l+8>>2]=t,e[l+12>>2]=-1,e[l+48>>2]=1,Pr[e[(e[o>>2]|0)+28>>2]&63](o,l,e[n>>2]|0,1),(e[l+24>>2]|0)==1?(e[n>>2]=e[l+16>>2],r=1):r=0}else r=0;else r=1;return y=a,r|0}function T1(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0;t=r+16|0,o=e[t>>2]|0;do if(o){if((o|0)!=(n|0)){s=r+36|0,e[s>>2]=(e[s>>2]|0)+1,e[r+24>>2]=2,d[r+54>>0]=1;break}t=r+24|0,(e[t>>2]|0)==2&&(e[t>>2]=s)}else e[t>>2]=n,e[r+24>>2]=s,e[r+36>>2]=1;while(!1)}function qg(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,(t|0)==(e[r+8>>2]|0)&&T1(0,r,n,s)}function bg(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0,(t|0)==(e[r+8>>2]|0)?T1(0,r,n,s):(t=e[t+8>>2]|0,Pr[e[(e[t>>2]|0)+28>>2]&63](t,r,n,s))}function hn(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;l=e[t+4>>2]|0,o=l>>8,l&1&&(o=e[(e[n>>2]|0)+o>>2]|0),t=e[t>>2]|0,Pr[e[(e[t>>2]|0)+28>>2]&63](t,r,n+o|0,l&2|0?s:2)}function Gg(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;e:do if((t|0)!=(e[r+8>>2]|0)){if(l=e[t+12>>2]|0,o=t+16+(l<<3)|0,hn(t+16|0,r,n,s),(l|0)>1){l=r+54|0,t=t+24|0;do{if(hn(t,r,n,s),d[l>>0]|0)break e;t=t+8|0}while(t>>>0>>0)}}else T1(0,r,n,s);while(!1)}function mn(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;k=y,y=y+64|0,I=k,C=e[t>>2]|0,g=t+(e[C+-8>>2]|0)|0,C=e[C+-4>>2]|0,e[I>>2]=n,e[I+4>>2]=t,e[I+8>>2]=r,e[I+12>>2]=s,s=I+16|0,t=I+20|0,r=I+24|0,o=I+28|0,l=I+32|0,a=I+40|0,c=(C|0)==(n|0),h=s,p=h+36|0;do e[h>>2]=0,h=h+4|0;while((h|0)<(p|0));E[s+36>>1]=0,d[s+38>>0]=0;e:do if(c)e[I+48>>2]=1,Bt[e[(e[n>>2]|0)+20>>2]&15](n,I,g,g,1,0),s=(e[r>>2]|0)==1?g:0;else{switch(_r[e[(e[C>>2]|0)+24>>2]&15](C,I,g,1,0),e[I+36>>2]|0){case 0:{s=(e[a>>2]|0)==1&(e[o>>2]|0)==1&(e[l>>2]|0)==1?e[t>>2]|0:0;break e}case 1:break;default:{s=0;break e}}if((e[r>>2]|0)!=1&&!((e[a>>2]|0)==0&(e[o>>2]|0)==1&(e[l>>2]|0)==1)){s=0;break}s=e[s>>2]|0}while(!1);return y=k,s|0}function C1(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,d[r+53>>0]=1;do if((e[r+4>>2]|0)==(s|0)){if(d[r+52>>0]=1,s=r+16|0,t=e[s>>2]|0,!t){if(e[s>>2]=n,e[r+24>>2]=o,e[r+36>>2]=1,!((o|0)==1&&(e[r+48>>2]|0)==1))break;d[r+54>>0]=1;break}if((t|0)!=(n|0)){o=r+36|0,e[o>>2]=(e[o>>2]|0)+1,d[r+54>>0]=1;break}t=r+24|0,s=e[t>>2]|0,(s|0)==2&&(e[t>>2]=o,s=o),(s|0)==1&&(e[r+48>>2]|0)==1&&(d[r+54>>0]=1)}while(!1)}function Qg(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;e:do if((t|0)==(e[r+8>>2]|0))(e[r+4>>2]|0)==(n|0)&&(l=r+28|0,(e[l>>2]|0)!=1)&&(e[l>>2]=s);else{if((t|0)!=(e[r>>2]|0)){if(U=e[t+12>>2]|0,c=t+16+(U<<3)|0,Cr(t+16|0,r,n,s,o),l=t+24|0,(U|0)<=1)break;if(a=e[t+8>>2]|0,!(a&2|0)&&(h=r+36|0,(e[h>>2]|0)!=1)){if(!(a&1)){for(a=r+54|0;;)if(d[a>>0]|0||(e[h>>2]|0)==1||(Cr(l,r,n,s,o),l=l+8|0,l>>>0>=c>>>0))break e}for(a=r+24|0,t=r+54|0;;)if(d[t>>0]|0||(e[h>>2]|0)==1&&(e[a>>2]|0)==1||(Cr(l,r,n,s,o),l=l+8|0,l>>>0>=c>>>0))break e}for(a=r+54|0;;)if(d[a>>0]|0||(Cr(l,r,n,s,o),l=l+8|0,l>>>0>=c>>>0))break e}if((e[r+16>>2]|0)!=(n|0)&&(k=r+20|0,(e[k>>2]|0)!=(n|0))){if(e[r+32>>2]=s,g=r+44|0,(e[g>>2]|0)==4)break;a=e[t+12>>2]|0,c=t+16+(a<<3)|0,h=r+52|0,s=r+53|0,C=r+54|0,p=t+8|0,I=r+24|0;i:do if((a|0)>0)for(a=0,l=0,t=t+16|0;;){if(d[h>>0]=0,d[s>>0]=0,x1(t,r,n,n,1,o),d[C>>0]|0){U=20;break i}do if(d[s>>0]|0){if(!(d[h>>0]|0))if(e[p>>2]&1){l=1;break}else{l=1,U=20;break i}if((e[I>>2]|0)==1)break i;if(e[p>>2]&2)a=1,l=1;else break i}while(!1);if(t=t+8|0,t>>>0>=c>>>0){U=20;break}}else a=0,l=0,U=20;while(!1);do if((U|0)==20){if(!a&&(e[k>>2]=n,n=r+40|0,e[n>>2]=(e[n>>2]|0)+1,(e[r+36>>2]|0)==1)&&(e[I>>2]|0)==2){if(d[C>>0]=1,l)break}else U=24;if((U|0)==24&&l)break;e[g>>2]=4;break e}while(!1);e[g>>2]=3;break}(s|0)==1&&(e[r+32>>2]=1)}while(!1)}function x1(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0;c=e[t+4>>2]|0,a=c>>8,c&1&&(a=e[(e[s>>2]|0)+a>>2]|0),t=e[t>>2]|0,Bt[e[(e[t>>2]|0)+20>>2]&15](t,r,n,s+a|0,c&2|0?o:2,l)}function Cr(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;a=e[t+4>>2]|0,l=a>>8,a&1&&(l=e[(e[n>>2]|0)+l>>2]|0),t=e[t>>2]|0,_r[e[(e[t>>2]|0)+24>>2]&15](t,r,n+l|0,a&2|0?s:2,o)}function zg(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0;e:do if((t|0)==(e[r+8>>2]|0))(e[r+4>>2]|0)==(n|0)&&(l=r+28|0,(e[l>>2]|0)!=1)&&(e[l>>2]=s);else{if((t|0)!=(e[r>>2]|0)){c=e[t+8>>2]|0,_r[e[(e[c>>2]|0)+24>>2]&15](c,r,n,s,o);break}if((e[r+16>>2]|0)!=(n|0)&&(a=r+20|0,(e[a>>2]|0)!=(n|0))){if(e[r+32>>2]=s,s=r+44|0,(e[s>>2]|0)==4)break;l=r+52|0,d[l>>0]=0,h=r+53|0,d[h>>0]=0,t=e[t+8>>2]|0,Bt[e[(e[t>>2]|0)+20>>2]&15](t,r,n,n,1,o),d[h>>0]|0?d[l>>0]|0||(l=1,c=13):(l=0,c=13);do if((c|0)==13){if(e[a>>2]=n,h=r+40|0,e[h>>2]=(e[h>>2]|0)+1,(e[r+36>>2]|0)==1&&(e[r+24>>2]|0)==2){if(d[r+54>>0]=1,l)break}else c=16;if((c|0)==16&&l)break;e[s>>2]=4;break e}while(!1);e[s>>2]=3;break}(s|0)==1&&(e[r+32>>2]=1)}while(!1)}function Hg(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0;do if((t|0)==(e[r+8>>2]|0))(e[r+4>>2]|0)==(n|0)&&(a=r+28|0,(e[a>>2]|0)!=1)&&(e[a>>2]=s);else if((t|0)==(e[r>>2]|0)){if((e[r+16>>2]|0)!=(n|0)&&(l=r+20|0,(e[l>>2]|0)!=(n|0))){e[r+32>>2]=s,e[l>>2]=n,o=r+40|0,e[o>>2]=(e[o>>2]|0)+1,(e[r+36>>2]|0)==1&&(e[r+24>>2]|0)==2&&(d[r+54>>0]=1),e[r+44>>2]=4;break}(s|0)==1&&(e[r+32>>2]=1)}while(!1)}function Yg(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0;var a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;if((t|0)==(e[r+8>>2]|0))C1(0,r,n,s,o);else{g=r+52|0,C=d[g>>0]|0,I=r+53|0,k=d[I>>0]|0,p=e[t+12>>2]|0,a=t+16+(p<<3)|0,d[g>>0]=0,d[I>>0]=0,x1(t+16|0,r,n,s,o,l);e:do if((p|0)>1){c=r+24|0,h=t+8|0,p=r+54|0,t=t+24|0;do{if(d[p>>0]|0)break e;if(d[g>>0]|0){if((e[c>>2]|0)==1||!(e[h>>2]&2))break e}else if(d[I>>0]|0&&!(e[h>>2]&1|0))break e;d[g>>0]=0,d[I>>0]=0,x1(t,r,n,s,o,l),t=t+8|0}while(t>>>0>>0)}while(!1);d[g>>0]=C,d[I>>0]=k}}function jg(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,(t|0)==(e[r+8>>2]|0)?C1(0,r,n,s,o):(t=e[t+8>>2]|0,Bt[e[(e[t>>2]|0)+20>>2]&15](t,r,n,s,o,l))}function Xg(t,r,n,s,o,l){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,(t|0)==(e[r+8>>2]|0)&&C1(0,r,n,s,o)}function Kg(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;return o=y,y=y+16|0,s=o,e[s>>2]=e[n>>2],t=Qe[e[(e[t>>2]|0)+16>>2]&63](t,r,s)|0,t&&(e[n>>2]=e[s>>2]),y=o,t&1|0}function Wg(t){return t=t|0,t?t=(mn(t,656,704,0)|0)!=0:t=0,t&1|0}function xr(){var t=0;t=de(4)|0,Tg(t),Be(t|0,592,78)}function Zg(){var t=0,r=0,n=0,s=0,o=0,l=0,a=0,c=0;o=y,y=y+48|0,a=o+32|0,n=o+24|0,c=o+16|0,l=o,o=o+36|0,t=un()|0,t|0&&(s=e[t>>2]|0,(s|0)!=0)&&(t=s+48|0,r=e[t>>2]|0,t=e[t+4>>2]|0,(r&-256|0)==1126902528&(t|0)==1129074247||(e[n>>2]=e[9257],Ft(51919,n)),(r|0)==1126902529&(t|0)==1129074247?t=e[s+44>>2]|0:t=s+80|0,e[o>>2]=t,s=e[s>>2]|0,t=e[s+4>>2]|0,Qe[e[(e[152]|0)+16>>2]&63](608,s,o)|0?(c=e[o>>2]|0,o=e[9257]|0,c=Se[e[(e[c>>2]|0)+8>>2]&127](c)|0,e[l>>2]=o,e[l+4>>2]=t,e[l+8>>2]=c,Ft(51833,l)):(e[c>>2]=e[9257],e[c+4>>2]=t,Ft(51878,c))),Ft(51957,a)}function Jg(){var t=0;if(t=y,y=y+16|0,$i(37020,184)|0)Ft(51730,t);else{y=t;return}}function $g(t){t=t|0;var r=0,n=0;n=(e[t>>2]|0)+-4|0,r=e[n>>2]|0,e[n>>2]=r+-1,(r+-1|0)<0&&a0((e[t>>2]|0)+-12|0)}function ep(t){t=t|0;var r=0;if(r=y,y=y+16|0,Ze(t),jn(e[9255]|0,0)|0)Ft(51780,r);else{y=r;return}}function yr(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,t=Ep(t,r,n)|0,t|0}function dn(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,t=kp(t,r,n)|0,t|0}function ip(){return 37296}function tp(){return 37300}function rp(){return 37304}function Xt(t){return t=t|0,((t|0)==32|(t+-9|0)>>>0<5)&1|0}function np(t){return t=t|0,(t+-48|0)>>>0<10?t=1:t=((t|32)+-97|0)>>>0<6,t&1|0}function di(){var t=0;return e[9258]|0?(t=(P1()|0)+60|0,t=e[t>>2]|0):t=37308,t|0}function gn(t){t=t|0;var r=0,n=0;for(r=0;;){if((N[51978+r>>0]|0)==(t|0)){n=2;break}if(r=r+1|0,(r|0)==87){r=87,t=52066,n=5;break}}if((n|0)==2&&(r?(t=52066,n=5):t=52066),(n|0)==5)for(;;){for(n=t;t=n+1|0,d[n>>0]|0;)n=t;if(r=r+-1|0,r)n=5;else break}return t|0}function pn(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0;switch(ze=y,y=y+512|0,w0=ze,r|0){case 0:{Y0=24,A0=-149,M=4;break}case 1:{Y0=53,A0=-1074,M=4;break}case 2:{Y0=53,A0=-1074,M=4;break}default:s=0}e:do if((M|0)==4){t0=t+4|0,K=t+100|0;do r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0;while(Xt(r)|0);i:do switch(r|0){case 43:case 45:if(o=1-(((r|0)==45&1)<<1)|0,r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=r+1,r=N[r>>0]|0,v0=o;break i}else{r=si(t)|0,v0=o;break i}default:v0=1}while(!1);o=r,r=0;do{if((o|32|0)!=(d[53870+r>>0]|0))break;do if(r>>>0<7)if(o=e[t0>>2]|0,o>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=o+1,o=N[o>>0]|0;break}else{o=si(t)|0;break}while(!1);r=r+1|0}while(r>>>0<8);i:do switch(r|0){case 8:break;case 3:{M=23;break}default:{if(a=(n|0)!=0,a&r>>>0>3){if((r|0)==8)break i;M=23;break i}t:do if(!r){r=0;do{if((o|32|0)!=(d[56747+r>>0]|0))break t;do if(r>>>0<2)if(o=e[t0>>2]|0,o>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=o+1,o=N[o>>0]|0;break}else{o=si(t)|0;break}while(!1);r=r+1|0}while(r>>>0<3)}while(!1);switch(r|0){case 3:{if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,(r|0)==40)r=1;else{if(!(e[K>>2]|0)){s=d0;break e}e[t0>>2]=(e[t0>>2]|0)+-1,s=d0;break e}for(;o=e[t0>>2]|0,o>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=o+1,o=N[o>>0]|0):o=si(t)|0,!(!((o+-48|0)>>>0<10|(o+-65|0)>>>0<26)&&!((o|0)==95|(o+-97|0)>>>0<26));)r=r+1|0;if((o|0)==41){s=d0;break e}if(o=(e[K>>2]|0)==0,o||(e[t0>>2]=(e[t0>>2]|0)+-1),!a){Y0=di()|0,e[Y0>>2]=22,rt(t,0),s=0;break e}if(!r){s=d0;break e}for(;;)if(r=r+-1|0,o||(e[t0>>2]=(e[t0>>2]|0)+-1),!r){s=d0;break e}}case 0:{do if((o|0)==48){if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,(r|32|0)!=120){if(!(e[K>>2]|0)){r=48;break}e[t0>>2]=(e[t0>>2]|0)+-1,r=48;break}r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0,a=0):(r=si(t)|0,a=0);t:for(;;){switch(r|0){case 46:{M=74;break t}case 48:break;default:{_=0,c=0,O=0,o=0,p=a,g=0,V=0,h=1,a=0,s=0;break t}}if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=r+1,r=N[r>>0]|0,a=1;continue}else{r=si(t)|0,a=1;continue}}if((M|0)==74)if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,(r|0)==48){a=0,o=0;do r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,a=Li(a|0,o|0,-1,-1)|0,o=I0;while((r|0)==48);_=0,c=0,O=a,p=1,g=1,V=0,h=1,a=0,s=0}else _=0,c=0,O=0,o=0,p=a,g=1,V=0,h=1,a=0,s=0;for(;;){if(U=r+-48|0,C=r|32,U>>>0>=10){if(B=(r|0)==46,!(B|(C+-97|0)>>>0<6)){C=O,U=_;break}if(B)if(!g)B=c,o=_,U=_,g=1,C=V,l=h;else{C=O,U=_,r=46;break}else M=86}else M=86;if((M|0)==86){M=0,r=(r|0)>57?C+-87|0:U;do if((_|0)<0|(_|0)==0&c>>>0<8)C=V,l=h,a=r+(a<<4)|0;else{if((_|0)<0|(_|0)==0&c>>>0<14){k=h*.0625,C=V,l=k,s=s+k*+(r|0);break}(V|0)!=0|(r|0)==0?(C=V,l=h):(C=1,l=h,s=s+h*.5)}while(!1);c=Li(c|0,_|0,1,0)|0,B=O,U=I0,p=1}if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=r+1,_=U,O=B,r=N[r>>0]|0,V=C,h=l;continue}else{_=U,O=B,r=si(t)|0,V=C,h=l;continue}}if(!p){r=(e[K>>2]|0)==0,r||(e[t0>>2]=(e[t0>>2]|0)+-1),n?!r&&(F=e[t0>>2]|0,e[t0>>2]=F+-1,(g|0)!=0)&&(e[t0>>2]=F+-2):rt(t,0),s=+(v0|0)*0;break e}if(p=(g|0)==0,g=p?c:C,p=p?U:o,(U|0)<0|(U|0)==0&c>>>0<8){o=U;do a=a<<4,c=Li(c|0,o|0,1,0)|0,o=I0;while((o|0)<0|(o|0)==0&c>>>0<8)}if((r|32|0)==112){if(o=Un(t,n)|0,r=I0,(o|0)==0&(r|0)==-2147483648){if(!n){rt(t,0),s=0;break e}e[K>>2]|0?(e[t0>>2]=(e[t0>>2]|0)+-1,o=0,r=0):(o=0,r=0)}}else e[K>>2]|0?(e[t0>>2]=(e[t0>>2]|0)+-1,o=0,r=0):(o=0,r=0);if(w0=pi(g|0,p|0,2)|0,w0=Li(w0|0,I0|0,-32,-1)|0,r=Li(w0|0,I0|0,o|0,r|0)|0,o=I0,!a){s=+(v0|0)*0;break e}if((o|0)>0|(o|0)==0&r>>>0>(0-A0|0)>>>0){Y0=di()|0,e[Y0>>2]=34,s=+(v0|0)*17976931348623157e292*17976931348623157e292;break e}if(w0=A0+-106|0,s0=((w0|0)<0)<<31>>31,(o|0)<(s0|0)|(o|0)==(s0|0)&r>>>0>>0){Y0=di()|0,e[Y0>>2]=34,s=+(v0|0)*22250738585072014e-324*22250738585072014e-324;break e}if((a|0)>-1){do s0=!(s>=.5),w0=s0&1|a<<1,a=w0^1,s=s+(s0?s:s+-1),r=Li(r|0,o|0,-1,-1)|0,o=I0;while((w0|0)>-1);c=r,h=s}else c=r,h=s;r=Ji(32,0,A0|0,((A0|0)<0)<<31>>31|0)|0,r=Li(c|0,o|0,r|0,I0|0)|0,A0=I0,0>(A0|0)|(A0|0)==0&Y0>>>0>r>>>0?(r|0)<0?(r=0,M=127):M=125:(r=Y0,M=125),(M|0)==125&&((r|0)<53?M=127:(o=r,l=+(v0|0),s=0)),(M|0)==127&&(s=+(v0|0),o=r,l=s,s=+vn(+Ir(1,84-r|0),s)),Y0=(a&1|0)==0&(h!=0&(o|0)<32),s=l*(Y0?0:h)+(s+l*+(((Y0&1)+a|0)>>>0))-s,s==0&&(Y0=di()|0,e[Y0>>2]=34),s=+Cn(s,c);break e}else r=o;while(!1);Z=A0+Y0|0,s0=0-Z|0,a=0;t:for(;;){switch(r|0){case 46:{M=138;break t}case 48:break;default:{o=0,C=0,g=0;break t}}if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0){e[t0>>2]=r+1,r=N[r>>0]|0,a=1;continue}else{r=si(t)|0,a=1;continue}}if((M|0)==138)if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,(r|0)==48)for(o=0,r=0;;)if(o=Li(o|0,r|0,-1,-1)|0,a=I0,r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,(r|0)==48)r=a;else{C=a,a=1,g=1;break}else o=0,C=0,g=1;e[w0>>2]=0,p=r+-48|0,c=(r|0)==46;t:do if(c|p>>>0<10){X=w0+496|0,_=0,B=0,V=c,M=C,U=a,F=g,a=0,c=0,g=0;r:for(;;){do if(V)if(!F)o=_,C=B,F=1;else{C=M,r=_,p=B;break r}else{if(V=Li(_|0,B|0,1,0)|0,B=I0,O=(r|0)!=48,(c|0)>=125){if(!O){C=M,_=V;break}e[X>>2]=e[X>>2]|1,C=M,_=V;break}C=w0+(c<<2)|0,a&&(p=r+-48+((e[C>>2]|0)*10|0)|0),e[C>>2]=p,a=a+1|0,p=(a|0)==9,C=M,_=V,U=1,a=p?0:a,c=(p&1)+c|0,g=O?V:g}while(!1);if(r=e[t0>>2]|0,r>>>0<(e[K>>2]|0)>>>0?(e[t0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,p=r+-48|0,V=(r|0)==46,V|p>>>0<10)M=C;else{p=F,M=161;break t}}U=(U|0)!=0,M=169}else _=0,B=0,U=a,p=g,a=0,c=0,g=0,M=161;while(!1);do if((M|0)==161){if(X=(p|0)==0,o=X?_:o,C=X?B:C,U=(U|0)!=0,!((r|32|0)==101&U))if((r|0)>-1){r=_,p=B,M=169;break}else{r=_,p=B,M=171;break}if(p=Un(t,n)|0,r=I0,(p|0)==0&(r|0)==-2147483648){if(!n){rt(t,0),s=0;break}e[K>>2]|0?(e[t0>>2]=(e[t0>>2]|0)+-1,p=0,r=0):(p=0,r=0)}o=Li(p|0,r|0,o|0,C|0)|0,U=_,C=I0,p=B,M=173}while(!1);(M|0)==169&&(e[K>>2]|0?(e[t0>>2]=(e[t0>>2]|0)+-1,U?(U=r,M=173):M=172):M=171),(M|0)==171&&(U?(U=r,M=173):M=172);do if((M|0)==172)Y0=di()|0,e[Y0>>2]=22,rt(t,0),s=0;else if((M|0)==173){if(r=e[w0>>2]|0,!r){s=+(v0|0)*0;break}if(((p|0)<0|(p|0)==0&U>>>0<10)&((o|0)==(U|0)&(C|0)==(p|0))&&Y0>>>0>30|(r>>>Y0|0)==0){s=+(v0|0)*+(r>>>0);break}if(t=(A0|0)/-2|0,t0=((t|0)<0)<<31>>31,(C|0)>(t0|0)|(C|0)==(t0|0)&o>>>0>t>>>0){Y0=di()|0,e[Y0>>2]=34,s=+(v0|0)*17976931348623157e292*17976931348623157e292;break}if(t=A0+-106|0,t0=((t|0)<0)<<31>>31,(C|0)<(t0|0)|(C|0)==(t0|0)&o>>>0>>0){Y0=di()|0,e[Y0>>2]=34,s=+(v0|0)*22250738585072014e-324*22250738585072014e-324;break}if(a){if((a|0)<9){p=w0+(c<<2)|0,r=e[p>>2]|0;do r=r*10|0,a=a+1|0;while((a|0)!=9);e[p>>2]=r}c=c+1|0}if((g|0)<9&&(g|0)<=(o|0)&(o|0)<18){if((o|0)==9){s=+(v0|0)*+((e[w0>>2]|0)>>>0);break}if((o|0)<9){s=+(v0|0)*+((e[w0>>2]|0)>>>0)/+(e[37312+(8-o<<2)>>2]|0);break}if(t=Y0+27+(W(o,-3)|0)|0,r=e[w0>>2]|0,(t|0)>30|(r>>>t|0)==0){s=+(v0|0)*+(r>>>0)*+(e[37312+(o+-10<<2)>>2]|0);break}}if(r=(o|0)%9|0,!r)a=0,r=0;else{if(U=(o|0)>-1?r:r+9|0,p=e[37312+(8-U<<2)>>2]|0,c){g=1e9/(p|0)|0,a=0,r=0,C=0;do K=w0+(C<<2)|0,t0=e[K>>2]|0,t=((t0>>>0)/(p>>>0)|0)+r|0,e[K>>2]=t,r=W((t0>>>0)%(p>>>0)|0,g)|0,t=(C|0)==(a|0)&(t|0)==0,C=C+1|0,o=t?o+-9|0:o,a=t?C&127:a;while((C|0)!=(c|0));r&&(e[w0+(c<<2)>>2]=r,c=c+1|0)}else a=0,c=0;r=0,o=9-U+o|0}t:for(;;){B=(o|0)<18,V=(o|0)==18,O=w0+(a<<2)|0;do{if(!B){if(!V)break t;if((e[O>>2]|0)>>>0>=9007199){o=18;break t}}for(p=0,g=c+127|0;U=g&127,C=w0+(U<<2)|0,g=pi(e[C>>2]|0,0,29)|0,g=Li(g|0,I0|0,p|0,0)|0,p=I0,p>>>0>0|(p|0)==0&g>>>0>1e9?(t=pr(g|0,p|0,1e9,0)|0,g=S1(g|0,p|0,1e9,0)|0,p=t):p=0,e[C>>2]=g,t=(U|0)==(a|0),c=(U|0)!=(c+127&127|0)|t||g|0?c:U,!t;)g=U+-1|0;r=r+-29|0}while(!(p|0));a=a+127&127,(a|0)==(c|0)&&(t=c+127&127,c=w0+((c+126&127)<<2)|0,e[c>>2]=e[c>>2]|e[w0+(t<<2)>>2],c=t),e[w0+(a<<2)>>2]=p,o=o+9|0}t:for(;;){for(_=c+1&127,O=w0+((c+127&127)<<2)|0;;){for(B=(o|0)==18,V=(o|0)>27?9:1,U=B^1;;){g=a&127,C=(g|0)==(c|0);do if(C)M=219;else{if(p=e[w0+(g<<2)>>2]|0,p>>>0<9007199){M=219;break}if(p>>>0>9007199)break;if(p=a+1&127,(p|0)==(c|0)){M=219;break}if(p=e[w0+(p<<2)>>2]|0,p>>>0<254740991){M=219;break}if(!(p>>>0>254740991|U)){o=g;break t}}while(!1);if((M|0)==219&&(M=0,B)){M=220;break t}if(r=r+V|0,(a|0)==(c|0))a=c;else break}for(U=(1<>>V,g=a,p=0,C=a;t0=w0+(C<<2)|0,t=e[t0>>2]|0,a=(t>>>V)+p|0,e[t0>>2]=a,p=W(t&U,B)|0,a=(C|0)==(g|0)&(a|0)==0,C=C+1&127,o=a?o+-9|0:o,a=a?C:g,(C|0)!=(c|0);)g=a;if(p){if((_|0)!=(a|0))break;e[O>>2]=e[O>>2]|1}}e[w0+(c<<2)>>2]=p,c=_}(M|0)==220&&(C?(e[w0+(_+-1<<2)>>2]=0,o=c,c=_):o=g),s=+((e[w0+(o<<2)>>2]|0)>>>0),o=a+1&127,(o|0)==(c|0)&&(c=a+2&127,e[w0+(c+-1<<2)>>2]=0),k=+(v0|0),l=k*(s*1e9+ +((e[w0+(o<<2)>>2]|0)>>>0)),B=r+53|0,C=B-A0|0,U=(C|0)<(Y0|0),o=U&1,g=U?(C|0)<0?0:C:Y0,(g|0)<53?(Re=+vn(+Ir(1,105-g|0),l),h=+wn(l,+Ir(1,53-g|0)),I=Re,s=h,h=Re+(l-h)):(I=0,s=0,h=l),p=a+2&127;do if((p|0)==(c|0))l=s;else{p=e[w0+(p<<2)>>2]|0;do if(p>>>0>=5e8){if(p>>>0>5e8){s=k*.75+s;break}if((a+3&127|0)==(c|0)){s=k*.5+s;break}else{s=k*.75+s;break}}else{if(!(p|0)&&(a+3&127|0)==(c|0))break;s=k*.25+s}while(!1);if((53-g|0)<=1){l=s;break}if(+wn(s,1)!=0){l=s;break}l=s+1}while(!1);s=h+l-I;do if((B&2147483647|0)>(-2-Z|0)){if(+x0(+s)>=9007199254740992&&(o=U&(g|0)==(C|0)?0:o,r=r+1|0,s=s*.5),(r+50|0)<=(s0|0)&&!(l!=0&(o|0)!=0))break;Y0=di()|0,e[Y0>>2]=34}while(!1);s=+Cn(s,r)}while(!1);break e}default:{e[K>>2]|0&&(e[t0>>2]=(e[t0>>2]|0)+-1),Y0=di()|0,e[Y0>>2]=22,rt(t,0),s=0;break e}}}}while(!1);if((M|0)==23&&(o=(e[K>>2]|0)==0,o||(e[t0>>2]=(e[t0>>2]|0)+-1),(n|0)!=0&r>>>0>3))do o||(e[t0>>2]=(e[t0>>2]|0)+-1),r=r+-1|0;while(r>>>0>3);s=+(v0|0)*S0}while(!1);return y=ze,+s}function An(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;e:do if(r>>>0>36)o=di()|0,e[o>>2]=22,o=0,s=0;else{U=t+4|0,k=t+100|0;do l=e[U>>2]|0,l>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0;while(Xt(l)|0);i:do switch(l|0){case 43:case 45:if(a=((l|0)==45)<<31>>31,l=e[U>>2]|0,l>>>0<(e[k>>2]|0)>>>0){e[U>>2]=l+1,l=N[l>>0]|0,I=a;break i}else{l=si(t)|0,I=a;break i}default:I=0}while(!1);a=(r|0)==0;do if((r&-17|0)==0&(l|0)==48){if(l=e[U>>2]|0,l>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,(l|32|0)!=120)if(a){r=8,g=46;break}else{g=32;break}if(r=e[U>>2]|0,r>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=r+1,l=N[r>>0]|0):l=si(t)|0,(N[53879+(l+1)>>0]|0)>15){if(s=(e[k>>2]|0)==0,s||(e[U>>2]=(e[U>>2]|0)+-1),!n){rt(t,0),o=0,s=0;break e}if(s){o=0,s=0;break e}e[U>>2]=(e[U>>2]|0)+-1,o=0,s=0;break e}else r=16,g=46}else if(r=a?10:r,(N[53879+(l+1)>>0]|0)>>>0>>0)g=32;else{e[k>>2]|0&&(e[U>>2]=(e[U>>2]|0)+-1),rt(t,0),o=di()|0,e[o>>2]=22,o=0,s=0;break e}while(!1);if((g|0)==32)if((r|0)==10){if(r=l+-48|0,r>>>0<10){for(l=0;;)if(a=(l*10|0)+r|0,r=e[U>>2]|0,r>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=r+1,l=N[r>>0]|0):l=si(t)|0,r=l+-48|0,r>>>0<10&a>>>0<429496729)l=a;else{r=a;break}a=0}else r=0,a=0;if(n=l+-48|0,n>>>0<10){for(;;){if(c=Ht(r|0,a|0,10,0)|0,h=I0,p=((n|0)<0)<<31>>31,C=~p,h>>>0>C>>>0|(h|0)==(C|0)&c>>>0>~n>>>0){c=r;break}if(r=Li(c|0,h|0,n|0,p|0)|0,a=I0,l=e[U>>2]|0,l>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,n=l+-48|0,!(n>>>0<10&(a>>>0<429496729|(a|0)==429496729&r>>>0<2576980378))){c=r;break}}n>>>0>9?(l=c,r=I):(r=10,g=72)}else l=r,r=I}else g=46;i:do if((g|0)==46){if(!(r+-1&r)){if(g=d[54136+((r*23|0)>>>5&7)>>0]|0,a=d[53879+(l+1)>>0]|0,n=a&255,n>>>0>>0){for(l=0;c=n|l<>2]|0,l>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,a=d[53879+(l+1)>>0]|0,n=a&255,c>>>0<134217728&n>>>0>>0;)l=c;n=0}else n=0,c=0;if(h=Dt(-1,-1,g|0)|0,p=I0,(a&255)>>>0>=r>>>0|(n>>>0>p>>>0|(n|0)==(p|0)&c>>>0>h>>>0)){a=n,g=72;break}else l=n;for(;;)if(c=pi(c|0,l|0,g|0)|0,n=I0,c=a&255|c,l=e[U>>2]|0,l>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,a=d[53879+(l+1)>>0]|0,(a&255)>>>0>=r>>>0|(n>>>0>p>>>0|(n|0)==(p|0)&c>>>0>h>>>0)){a=n,g=72;break i}else l=n}if(a=d[53879+(l+1)>>0]|0,n=a&255,n>>>0>>0){for(l=0;c=n+(W(l,r)|0)|0,l=e[U>>2]|0,l>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,a=d[53879+(l+1)>>0]|0,n=a&255,c>>>0<119304647&n>>>0>>0;)l=c;n=0}else c=0,n=0;if((a&255)>>>0>>0)for(g=pr(-1,-1,r|0,0)|0,C=I0,p=n;;){if(p>>>0>C>>>0|(p|0)==(C|0)&c>>>0>g>>>0){a=p,g=72;break i}if(n=Ht(c|0,p|0,r|0,0)|0,h=I0,a=a&255,h>>>0>4294967295|(h|0)==-1&n>>>0>~a>>>0){a=p,g=72;break i}if(c=Li(a|0,0,n|0,h|0)|0,n=I0,l=e[U>>2]|0,l>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,a=d[53879+(l+1)>>0]|0,(a&255)>>>0>=r>>>0){a=n,g=72;break}else p=n}else a=n,g=72}while(!1);if((g|0)==72)if((N[53879+(l+1)>>0]|0)>>>0>>0){do l=e[U>>2]|0,l>>>0<(e[k>>2]|0)>>>0?(e[U>>2]=l+1,l=N[l>>0]|0):l=si(t)|0;while((N[53879+(l+1)>>0]|0)>>>0>>0);a=di()|0,e[a>>2]=34,a=o,l=s,r=(s&1|0)==0&!0?I:0}else l=c,r=I;if(e[k>>2]|0&&(e[U>>2]=(e[U>>2]|0)+-1),!(a>>>0>>0|(a|0)==(o|0)&l>>>0>>0)){if(!((s&1|0)!=0|!1|(r|0)!=0)){U=di()|0,e[U>>2]=34,s=Li(s|0,o|0,-1,-1)|0,o=I0;break}if(a>>>0>o>>>0|(a|0)==(o|0)&l>>>0>s>>>0){U=di()|0,e[U>>2]=34;break}}s=((r|0)<0)<<31>>31,s=Ji(l^r|0,a^s|0,r|0,s|0)|0,o=I0}while(!1);return I0=o,s|0}function rt(t,r){t=t|0,r=r|0;var n=0,s=0,o=0;e[t+104>>2]=r,n=e[t+4>>2]|0,s=e[t+8>>2]|0,o=s-n|0,e[t+108>>2]=o,(r|0)!=0&(o|0)>(r|0)?e[t+100>>2]=n+r:e[t+100>>2]=s}function si(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;return n=t+104|0,l=e[n>>2]|0,l|0&&(e[t+108>>2]|0)>=(l|0)?a=4:(r=y1(t)|0,(r|0)>=0?(o=e[n>>2]|0,n=t+8|0,o?(s=e[n>>2]|0,l=e[t+4>>2]|0,n=s,o=o-(e[t+108>>2]|0)+-1|0,(n-l|0)>(o|0)?e[t+100>>2]=l+o:a=9):(s=e[n>>2]|0,n=s,a=9),(a|0)==9&&(e[t+100>>2]=n),n=e[t+4>>2]|0,s&&(t=t+108|0,e[t>>2]=s+1-n+(e[t>>2]|0)),n=n+-1|0,(N[n>>0]|0|0)!=(r|0)&&(d[n>>0]=r)):a=4),(a|0)==4&&(e[t+100>>2]=0,r=-1),r|0}function Kt(t){t=t|0;var r=0;return t>>>0>4294963200&&(r=di()|0,e[r>>2]=0-t,t=-1),t|0}function hA(t){return t=t|0,0}function sp(t,r,n,s){return t=t|0,r=r|0,n=n|0,s=s|0,s|0}function Sn(t,r){return t=t|0,r=r|0,-1}function op(t){t=t|0,Ze(t)}function lp(t,r){return t=t|0,r=r|0,(t+-48|0)>>>0<10|0}function ap(t,r){return t=t|0,r=r|0,np(t)|0}function fp(t,r,n){return t=t|0,r=r|0,n=n|0,d[r>>0]|0&&Ln(r,58885)|0&&Ln(r,54145)|0?n=0:n||(n=vh(1,4)|0),n|0}function nt(t){t=t|0;var r=0,n=0;return r=(P1()|0)+176|0,n=e[r>>2]|0,t&&(e[r>>2]=t),n|0}function up(t,r){t=+t,r=+r;var n=0,s=0;return H[G>>3]=t,s=e[G>>2]|0,n=e[G+4>>2]|0,H[G>>3]=r,n=e[G+4>>2]&-2147483648|n&2147483647,e[G>>2]=s,e[G+4>>2]=n,+ +H[G>>3]}function vn(t,r){return t=+t,r=+r,+ +up(t,r)}function cp(t,r){t=+t,r=+r;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;H[G>>3]=t,n=e[G>>2]|0,p=e[G+4>>2]|0,H[G>>3]=r,g=e[G>>2]|0,C=e[G+4>>2]|0,s=Dt(n|0,p|0,52)|0,s=s&2047,c=Dt(g|0,C|0,52)|0,c=c&2047,I=p&-2147483648,a=pi(g|0,C|0,1)|0,h=I0;e:do if(!((a|0)==0&(h|0)==0)&&(l=C&2147483647,!(l>>>0>2146435072|(l|0)==2146435072&g>>>0>0|(s|0)==2047))){if(o=pi(n|0,p|0,1)|0,l=I0,!(l>>>0>h>>>0|(l|0)==(h|0)&o>>>0>a>>>0))return+((o|0)==(a|0)&(l|0)==(h|0)?t*0:t);if(s)o=p&1048575|1048576;else{if(s=pi(n|0,p|0,12)|0,o=I0,(o|0)>-1|(o|0)==-1&s>>>0>4294967295){l=s,s=0;do s=s+-1|0,l=pi(l|0,o|0,1)|0,o=I0;while((o|0)>-1|(o|0)==-1&l>>>0>4294967295)}else s=0;n=pi(n|0,p|0,1-s|0)|0,o=I0}if(c)p=C&1048575|1048576;else{if(l=pi(g|0,C|0,12)|0,a=I0,(a|0)>-1|(a|0)==-1&l>>>0>4294967295){c=0;do c=c+-1|0,l=pi(l|0,a|0,1)|0,a=I0;while((a|0)>-1|(a|0)==-1&l>>>0>4294967295)}else c=0;g=pi(g|0,C|0,1-c|0)|0,p=I0}h=Ji(n|0,o|0,g|0,p|0)|0,a=I0,l=(a|0)>-1|(a|0)==-1&h>>>0>4294967295;i:do if((s|0)>(c|0)){for(;;){if(l){if((n|0)==(g|0)&(o|0)==(p|0))break;n=h,o=a}if(n=pi(n|0,o|0,1)|0,o=I0,s=s+-1|0,h=Ji(n|0,o|0,g|0,p|0)|0,a=I0,l=(a|0)>-1|(a|0)==-1&h>>>0>4294967295,(s|0)<=(c|0))break i}r=t*0;break e}while(!1);if(l)if((n|0)==(g|0)&(o|0)==(p|0)){r=t*0;break}else o=a,n=h;if(o>>>0<1048576|(o|0)==1048576&n>>>0<0)do n=pi(n|0,o|0,1)|0,o=I0,s=s+-1|0;while(o>>>0<1048576|(o|0)==1048576&n>>>0<0);(s|0)>0?(C=Li(n|0,o|0,0,-1048576)|0,n=I0,s=pi(s|0,0,52)|0,n=n|I0,s=C|s):(s=Dt(n|0,o|0,1-s|0)|0,n=I0),e[G>>2]=s,e[G+4>>2]=n|I,r=+H[G>>3]}else k=3;while(!1);return(k|0)==3&&(r=t*r,r=r/r),+r}function wn(t,r){return t=+t,r=+r,+ +cp(t,r)}function Tn(t,r){t=+t,r=r|0;var n=0,s=0,o=0;switch(H[G>>3]=t,n=e[G>>2]|0,s=e[G+4>>2]|0,o=Dt(n|0,s|0,52)|0,o=o&2047,o|0){case 0:{t!=0?(t=+Tn(t*18446744073709552e3,r),n=(e[r>>2]|0)+-64|0):n=0,e[r>>2]=n;break}case 2047:break;default:e[r>>2]=o+-1022,e[G>>2]=n,e[G+4>>2]=s&-2146435073|1071644672,t=+H[G>>3]}return+t}function hp(t,r){return t=+t,r=r|0,+ +Tn(t,r)}function Ir(t,r){t=+t,r=r|0;var n=0;return(r|0)>1023?(t=t*898846567431158e293,n=r+-1023|0,(n|0)>1023&&(n=r+-2046|0,n=(n|0)>1023?1023:n,t=t*898846567431158e293)):(r|0)<-1022?(t=t*22250738585072014e-324,n=r+1022|0,(n|0)<-1022&&(n=r+2044|0,n=(n|0)<-1022?-1022:n,t=t*22250738585072014e-324)):n=r,n=pi(n+1023|0,0,52)|0,r=I0,e[G>>2]=n,e[G+4>>2]=r,+(t*+H[G>>3])}function Cn(t,r){return t=+t,r=r|0,+ +Ir(t,r)}function mp(t,r,n){return t=t|0,r=r|0,n=n|0,Dr(0,t,r,n|0?n:37344)|0}function Dr(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0;h=y,y=y+16|0,o=h,a=s|0?s:37348,s=e[a>>2]|0;e:do if(!r)s?c=15:s=0;else if(l=t|0?t:o,!n)s=-2;else{if(s)o=n,c=9;else{if(s=d[r>>0]|0,o=s&255,s<<24>>24>-1){e[l>>2]=o,s=s<<24>>24!=0&1;break}if(s=o+-194|0,s>>>0>50){c=15;break}s=e[37076+(s<<2)>>2]|0,o=n+-1|0,o&&(r=r+1|0,c=9)}i:do if((c|0)==9){if(t=d[r>>0]|0,p=(t&255)>>>3,(p+-16|p+(s>>26))>>>0>7){c=15;break e}for(;r=r+1|0,s=(t&255)+-128|s<<6,o=o+-1|0,!((s|0)>=0);){if(!o)break i;if(t=d[r>>0]|0,(t&-64)<<24>>24!=-128){c=15;break e}}e[a>>2]=0,e[l>>2]=s,s=n-o|0;break e}while(!1);e[a>>2]=s,s=-2}while(!1);return(c|0)==15&&(e[a>>2]=0,s=di()|0,e[s>>2]=84,s=-1),y=h,s|0}function dp(t){return t=t|0,t?t=(e[t>>2]|0)==0:t=1,t&1|0}function gp(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0;I=y,y=y+1040|0,p=I+8|0,C=I,h=e[r>>2]|0,e[C>>2]=h,g=(t|0)!=0,s=g?s:256,t=g?t:p,l=h;e:do if((s|0)!=0&(h|0)!=0){for(c=s,h=l,s=0;;){if(l=n>>>2,a=l>>>0>=c>>>0,!(n>>>0>131|a)){l=h;break e}if(l=a?c:l,n=n-l|0,l=xn(t,C,l,o)|0,(l|0)==-1){s=n;break}if(k=(t|0)==(p|0),h=k?0:l,a=c-h|0,t=k?t:t+(l<<2)|0,s=l+s|0,l=e[C>>2]|0,(c|0)!=(h|0)&(l|0)!=0)c=a,h=l;else{c=a;break e}}n=s,c=0,l=e[C>>2]|0,s=-1}else c=s,s=0;while(!1);e:do if(l|0&&(c|0)!=0&(n|0)!=0){for(a=l,l=t;t=Dr(l,a,n,o)|0,!((t+2|0)>>>0<3);)if(a=(e[C>>2]|0)+t|0,e[C>>2]=a,c=c+-1|0,s=s+1|0,(c|0)!=0&(n|0)!=(t|0))n=n-t|0,l=l+4|0;else break e;switch(t|0){case-1:{s=-1;break e}case 0:{e[C>>2]=0;break e}default:{e[o>>2]=0;break e}}}while(!1);return g&&(e[r>>2]=e[C>>2]),y=I,s|0}function xn(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0;o=e[r>>2]|0,s|0&&(l=e[s>>2]|0,(l|0)!=0)?t?(e[s>>2]=0,h=t,s=n,c=l,p=37):(s=n,a=o,p=16):t?(l=t,s=n,p=6):(s=n,p=7);e:for(;;)if((p|0)==6){if(s)t=l;else{p=26;break}for(;;){l=d[o>>0]|0;do if(((l&255)+-1|0)>>>0<127&&s>>>0>4&(o&3|0)==0){for(a=o;;){if(o=e[a>>2]|0,(o+-16843009|o)&-2139062144){l=o,o=a,p=32;break}if(e[t>>2]=o&255,e[t+4>>2]=N[a+1>>0],e[t+8>>2]=N[a+2>>0],o=a+4|0,l=t+16|0,e[t+12>>2]=N[a+3>>0],s=s+-4|0,s>>>0>4)t=l,a=o;else{p=31;break}}if((p|0)==31){t=l,l=d[o>>0]|0;break}else if((p|0)==32){l=l&255;break}}while(!1);if(l=l&255,(l+-1|0)>>>0>=127)break;if(o=o+1|0,e[t>>2]=l,s=s+-1|0,s)t=t+4|0;else{p=26;break e}}if(l=l+-194|0,l>>>0>50){p=48;break}h=t,c=e[37076+(l<<2)>>2]|0,o=o+1|0,p=37;continue}else if((p|0)==7){if(l=d[o>>0]|0,((l&255)+-1|0)>>>0<127&&!(o&3|0)){if(l=e[o>>2]|0,!((l+-16843009|l)&-2139062144))do o=o+4|0,s=s+-4|0,l=e[o>>2]|0;while(!((l+-16843009|l)&-2139062144|0));l=l&255}if(l=l&255,(l+-1|0)>>>0<127){s=s+-1|0,o=o+1|0,p=7;continue}if(l=l+-194|0,l>>>0>50){p=48;break}l=e[37076+(l<<2)>>2]|0,a=o+1|0,p=16;continue}else if((p|0)==16){if(p=(N[a>>0]|0)>>>3,(p+-16|p+(l>>26))>>>0>7){p=17;break}if(o=a+1|0,l&33554432){if((d[o>>0]&-64)<<24>>24!=-128){p=20;break}if(o=a+2|0,l&524288){if((d[o>>0]&-64)<<24>>24!=-128){p=23;break}o=a+3|0}}s=s+-1|0,p=7;continue}else if((p|0)==37){if(l=N[o>>0]|0,p=l>>>3,(p+-16|p+(c>>26))>>>0>7){p=38;break}if(a=o+1|0,t=l+-128|c<<6,(t|0)<0){if(l=N[a>>0]|0,(l&192|0)!=128){p=41;break}if(a=o+2|0,t=l+-128|t<<6,(t|0)<0){if(l=N[a>>0]|0,(l&192|0)!=128){p=44;break}t=l+-128|t<<6,o=o+3|0}else o=a}else o=a;e[h>>2]=t,l=h+4|0,s=s+-1|0,p=6;continue}return(p|0)==17||(p|0)==20||(p|0)==23?(o=a+-1|0,p=47):(p|0)==26?e[r>>2]=o:(p|0)==38?(t=h,l=c,o=o+-1|0,p=47):((p|0)==41||(p|0)==44)&&(s=h,n=o+-1|0,p=52),(p|0)==47&&(l?(s=t,n=o,p=52):p=48),(p|0)==48&&(d[o>>0]|0?(s=t,n=o,p=52):(t&&(e[t>>2]=0,e[r>>2]=0),n=n-s|0)),(p|0)==52&&(p=di()|0,e[p>>2]=84,s&&(e[r>>2]=n),n=-1),n|0}function pp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;a=y,y=y+16|0,s=a;e:do if(!r)s=0;else{do if(n){if(l=t|0?t:s,s=d[r>>0]|0,t=s&255,s<<24>>24>-1){e[l>>2]=t,s=s<<24>>24!=0&1;break e}if(s=t+-194|0,s>>>0<=50){if(t=r+1|0,o=e[37076+(s<<2)>>2]|0,n>>>0<4&&o&-2147483648>>>((n*6|0)+-6|0)|0)break;if(s=N[t>>0]|0,n=s>>>3,(n+-16|n+(o>>26))>>>0<=7){if(s=s+-128|o<<6,(s|0)>=0){e[l>>2]=s,s=2;break e}if(t=N[r+2>>0]|0,(t&192|0)==128){if(t=t+-128|s<<6,(t|0)>=0){e[l>>2]=t,s=3;break e}if(s=N[r+3>>0]|0,(s&192|0)==128){e[l>>2]=s+-128|t<<6,s=4;break e}}}}}while(!1);s=di()|0,e[s>>2]=84,s=-1}while(!1);return y=a,s|0}function Ut(t,r,n){t=t|0,r=r|0,n=n|0;do if(t){if(r>>>0<128){d[t>>0]=r,t=1;break}if(r>>>0<2048){d[t>>0]=r>>>6|192,d[t+1>>0]=r&63|128,t=2;break}if(r>>>0<55296|(r&-8192|0)==57344){d[t>>0]=r>>>12|224,d[t+1>>0]=r>>>6&63|128,d[t+2>>0]=r&63|128,t=3;break}if((r+-65536|0)>>>0<1048576){d[t>>0]=r>>>18|240,d[t+1>>0]=r>>>12&63|128,d[t+2>>0]=r>>>6&63|128,d[t+3>>0]=r&63|128,t=4;break}else{t=di()|0,e[t>>2]=84,t=-1;break}}else t=1;while(!1);return t|0}function Ap(t,r,n,s,o){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0;var l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0;g=y,y=y+272|0,c=g+8|0,p=g,a=e[r>>2]|0,e[p>>2]=a,h=(t|0)!=0,o=h?s:256,s=h?t:c,t=a;e:do if((o|0)!=0&(a|0)!=0){for(a=o,l=t,o=0;;){if(t=n>>>0>=a>>>0,!(t|n>>>0>32)){t=l;break e}if(t=t?a:n,n=n-t|0,t=Sp(s,p,t,0)|0,(t|0)==-1){o=n;break}if(I=(s|0)==(c|0),C=I?0:t,l=a-C|0,s=I?s:s+t|0,o=t+o|0,t=e[p>>2]|0,(a|0)!=(C|0)&(t|0)!=0)a=l,l=t;else{a=l;break e}}n=o,a=0,t=e[p>>2]|0,o=-1}else a=o,o=0;while(!1);e:do if(t|0&&(a|0)!=0&(n|0)!=0){for(l=t,t=s;s=Ut(t,e[l>>2]|0,0)|0,!((s+1|0)>>>0<2);)if(l=(e[p>>2]|0)+4|0,e[p>>2]=l,n=n+-1|0,o=o+1|0,(a|0)!=(s|0)&(n|0)!=0)a=a-s|0,t=t+s|0;else break e;s?o=-1:e[p>>2]=0}while(!1);return h&&(e[r>>2]=e[p>>2]),y=g,o|0}function Sp(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0;c=y,y=y+16|0,a=c;e:do if(t){i:do if(n>>>0>3){for(s=n,o=e[r>>2]|0;;){if(l=e[o>>2]|0,(l+-1|0)>>>0>126){if(!l)break;if(l=Ut(t,l,0)|0,(l|0)==-1){n=-1;break e}t=t+l|0,s=s-l|0}else d[t>>0]=l,t=t+1|0,s=s+-1|0,o=e[r>>2]|0;if(o=o+4|0,e[r>>2]=o,s>>>0<=3)break i}d[t>>0]=0,e[r>>2]=0,n=n-s|0;break e}else s=n;while(!1);if(s){for(o=e[r>>2]|0;;){if(l=e[o>>2]|0,(l+-1|0)>>>0>126){if(!l){o=19;break}if(l=Ut(a,l,0)|0,(l|0)==-1){n=-1;break e}if(s>>>0>>0){o=22;break}Ut(t,e[o>>2]|0,0)|0,t=t+l|0,s=s-l|0}else d[t>>0]=l,t=t+1|0,s=s+-1|0,o=e[r>>2]|0;if(o=o+4|0,e[r>>2]=o,!s)break e}if((o|0)==19){d[t>>0]=0,e[r>>2]=0,n=n-s|0;break}else if((o|0)==22){n=n-s|0;break}}}else if(t=e[r>>2]|0,s=e[t>>2]|0,!s)n=0;else{n=0;do{if(s>>>0>127){if(s=Ut(a,s,0)|0,(s|0)==-1){n=-1;break e}}else s=1;n=s+n|0,t=t+4|0,s=e[t>>2]|0}while(s|0)}while(!1);return y=c,n|0}function yn(t,r){return t=t|0,r=r|0,t?t=Ut(t,r,0)|0:t=0,t|0}function Mt(t){return t=t|0,0}function ht(t){t=t|0}function In(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0;h=y,y=y+16|0,c=h,a=r&255,d[c>>0]=a,s=t+16|0,o=e[s>>2]|0,o?l=4:kn(t)|0?n=-1:(o=e[s>>2]|0,l=4);do if((l|0)==4){if(s=t+20|0,l=e[s>>2]|0,l>>>0>>0&&(n=r&255,(n|0)!=(d[t+75>>0]|0))){e[s>>2]=l+1,d[l>>0]=a;break}(Qe[e[t+36>>2]&63](t,c,1)|0)==1?n=N[c>>0]|0:n=-1}while(!1);return y=h,n|0}function vp(t){t=t|0;var r=0,n=0;return r=y,y=y+16|0,n=r,e[n>>2]=e[t+60>>2],t=Kt(Xn(6,n|0)|0)|0,y=r,t|0}function wp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;return p=y,y=y+48|0,l=p+16|0,o=p,s=p+32|0,e[s>>2]=r,a=s+4|0,h=t+48|0,g=e[h>>2]|0,e[a>>2]=n-((g|0)!=0&1),c=t+44|0,e[s+8>>2]=e[c>>2],e[s+12>>2]=g,e[9258]|0?(N1(185,t|0),e[o>>2]=e[t+60>>2],e[o+4>>2]=s,e[o+8>>2]=2,s=Kt(V1(145,o|0)|0)|0,U1(0)):(e[l>>2]=e[t+60>>2],e[l+4>>2]=s,e[l+8>>2]=2,s=Kt(V1(145,l|0)|0)|0),(s|0)>=1?(a=e[a>>2]|0,s>>>0>a>>>0&&(l=e[c>>2]|0,o=t+4|0,e[o>>2]=l,e[t+8>>2]=l+(s-a),e[h>>2]|0&&(e[o>>2]=l+1,d[r+(n+-1)>>0]=d[l>>0]|0),s=n)):(e[t>>2]=e[t>>2]|s&48^16,e[t+8>>2]=0,e[t+4>>2]=0),y=p,s|0}function Tp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;return o=y,y=y+32|0,l=o,s=o+20|0,e[l>>2]=e[t+60>>2],e[l+4>>2]=0,e[l+8>>2]=r,e[l+12>>2]=s,e[l+16>>2]=n,(Kt(Zn(140,l|0)|0)|0)<0?(e[s>>2]=-1,t=-1):t=e[s>>2]|0,y=o,t|0}function Dn(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;for(U=y,y=y+48|0,C=U+16|0,g=U,s=U+32|0,I=t+28|0,o=e[I>>2]|0,e[s>>2]=o,k=t+20|0,o=(e[k>>2]|0)-o|0,e[s+4>>2]=o,e[s+8>>2]=r,e[s+12>>2]=n,h=t+60|0,p=t+44|0,r=2,o=o+n|0;;){if(e[9258]|0?(N1(186,t|0),e[g>>2]=e[h>>2],e[g+4>>2]=s,e[g+8>>2]=r,a=Kt(q1(146,g|0)|0)|0,U1(0)):(e[C>>2]=e[h>>2],e[C+4>>2]=s,e[C+8>>2]=r,a=Kt(q1(146,C|0)|0)|0),(o|0)==(a|0)){o=6;break}if((a|0)<0){o=8;break}o=o-a|0,l=e[s+4>>2]|0,a>>>0<=l>>>0?(r|0)==2?(e[I>>2]=(e[I>>2]|0)+a,c=l,r=2):c=l:(c=e[p>>2]|0,e[I>>2]=c,e[k>>2]=c,c=e[s+12>>2]|0,a=a-l|0,s=s+8|0,r=r+-1|0),e[s>>2]=(e[s>>2]|0)+a,e[s+4>>2]=c-a}return(o|0)==6?(C=e[p>>2]|0,e[t+16>>2]=C+(e[t+48>>2]|0),t=C,e[I>>2]=t,e[k>>2]=t):(o|0)==8&&(e[t+16>>2]=0,e[I>>2]=0,e[k>>2]=0,e[t>>2]=e[t>>2]|32,(r|0)==2?n=0:n=n-(e[s+4>>2]|0)|0),y=U,n|0}function Cp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;return o=y,y=y+80|0,s=o,e[t+36>>2]=8,!(e[t>>2]&64|0)&&(e[s>>2]=e[t+60>>2],e[s+4>>2]=21505,e[s+8>>2]=o+12,(zn(54,s|0)|0)!=0)&&(d[t+75>>0]=-1),s=Dn(t,r,n)|0,y=o,s|0}function xp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;return s=t+84|0,l=e[s>>2]|0,a=n+256|0,o=Pn(l,0,a)|0,o=o|0?o-l|0:a,n=o>>>0>>0?o:n,ti(r|0,l|0,n|0)|0,e[t+4>>2]=l+n,r=l+o|0,e[t+8>>2]=r,e[s>>2]=r,n|0}function En(t){t=t|0;var r=0,n=0;return r=t+74|0,n=d[r>>0]|0,d[r>>0]=n+255|n,r=t+20|0,n=t+44|0,(e[r>>2]|0)>>>0>(e[n>>2]|0)>>>0&&Qe[e[t+36>>2]&63](t,0,0)|0,e[t+16>>2]=0,e[t+28>>2]=0,e[r>>2]=0,r=e[t>>2]|0,r&20?(r&4&&(e[t>>2]=r|32),r=-1):(r=e[n>>2]|0,e[t+8>>2]=r,e[t+4>>2]=r,r=0),r|0}function kn(t){t=t|0;var r=0,n=0;return r=t+74|0,n=d[r>>0]|0,d[r>>0]=n+255|n,r=e[t>>2]|0,r&8?(e[t>>2]=r|32,r=-1):(e[t+8>>2]=0,e[t+4>>2]=0,r=e[t+44>>2]|0,e[t+28>>2]=r,e[t+20>>2]=r,e[t+16>>2]=r+(e[t+48>>2]|0),r=0),r|0}function y1(t){t=t|0;var r=0,n=0;return n=y,y=y+16|0,r=n,!(e[t+8>>2]|0)&&En(t)|0?r=-1:(Qe[e[t+32>>2]&63](t,r,1)|0)==1?r=N[r>>0]|0:r=-1,y=n,r|0}function I1(t){t=t|0;var r=0,n=0;do if(t){if((e[t+76>>2]|0)<=-1){r=k1(t)|0;break}n=(Mt(t)|0)==0,r=k1(t)|0,n||ht(t)}else{if(e[9323]|0?r=I1(e[9323]|0)|0:r=0,Fi(37060),t=e[9264]|0,t)do(e[t+76>>2]|0)>-1?n=Mt(t)|0:n=0,(e[t+20>>2]|0)>>>0>(e[t+28>>2]|0)>>>0&&(r=k1(t)|0|r),n&&ht(t),t=e[t+56>>2]|0;while(t|0);Hn(37060)}while(!1);return r|0}function yp(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0;(e[r+76>>2]|0)>=0&&Mt(r)|0?((d[r+75>>0]|0)!=(t|0)&&(s=r+20|0,o=e[s>>2]|0,o>>>0<(e[r+16>>2]|0)>>>0)?(e[s>>2]=o+1,d[o>>0]=t,n=t&255):n=In(r,t)|0,ht(r)):a=3;do if((a|0)==3){if((d[r+75>>0]|0)!=(t|0)&&(l=r+20|0,n=e[l>>2]|0,n>>>0<(e[r+16>>2]|0)>>>0)){e[l>>2]=n+1,d[n>>0]=t,n=t&255;break}n=In(r,t)|0}while(!1);return n|0}function Ui(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;s=n+16|0,o=e[s>>2]|0,o?l=4:kn(n)|0?s=0:(o=e[s>>2]|0,l=4);e:do if((l|0)==4){if(a=n+20|0,l=e[a>>2]|0,(o-l|0)>>>0>>0){s=Qe[e[n+36>>2]&63](n,t,r)|0;break}i:do if((d[n+75>>0]|0)>-1){for(s=r;;){if(!s){o=l,s=0;break i}if(o=s+-1|0,(d[t+o>>0]|0)==10)break;s=o}if((Qe[e[n+36>>2]&63](n,t,s)|0)>>>0>>0)break e;r=r-s|0,t=t+s|0,o=e[a>>2]|0}else o=l,s=0;while(!1);ti(o|0,t|0,r|0)|0,e[a>>2]=(e[a>>2]|0)+r,s=s+r|0}while(!1);return s|0}function dt(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;return o=W(n,r)|0,(e[s+76>>2]|0)>-1?(l=(Mt(s)|0)==0,t=Ui(t,o,s)|0,l||ht(s)):t=Ui(t,o,s)|0,(t|0)!=(o|0)&&(n=(t>>>0)/(r>>>0)|0),n|0}function Er(t){t=t|0;var r=0,n=0,s=0;(e[t+76>>2]|0)>=0&&Mt(t)|0?(r=t+4|0,n=e[r>>2]|0,n>>>0<(e[t+8>>2]|0)>>>0?(e[r>>2]=n+1,r=N[n>>0]|0):r=y1(t)|0):s=3;do if((s|0)==3)if(r=t+4|0,n=e[r>>2]|0,n>>>0<(e[t+8>>2]|0)>>>0){e[r>>2]=n+1,r=N[n>>0]|0;break}else{r=y1(t)|0;break}while(!1);return r|0}function Fn(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0;return o=y,y=y+16|0,l=o,e[l>>2]=s,s=Fr(t,r,n,l)|0,y=o,s|0}function Mn(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;return s=y,y=y+16|0,o=s,e[o>>2]=n,n=Rn(t,r,o)|0,y=s,n|0}function kr(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;do if((t|0)!=-1){if((e[r+76>>2]|0)>-1?o=Mt(r)|0:o=0,!(e[r+8>>2]|0)&&En(r)|0||(l=6),(l|0)==6&&(n=r+4|0,s=e[n>>2]|0,s>>>0>((e[r+44>>2]|0)+-8|0)>>>0)){if(l=s+-1|0,e[n>>2]=l,d[l>>0]=t,e[r>>2]=e[r>>2]&-17,!o)break;ht(r);break}o&&ht(r),t=-1}else t=-1;while(!1);return t|0}function Ip(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0;c=y,y=y+16|0,s=c,o=xi(240)|0;do if(o){if(e[s>>2]=e[n>>2],s=Fr(o,240,r,s)|0,s>>>0<240){r=bt(o,s+1|0)|0,e[t>>2]=r|0?r:o;break}Ze(o),(s|0)>=0&&(a=s+1|0,l=xi(a)|0,e[t>>2]=l,(l|0)!=0)?s=Fr(l,a,r,n)|0:s=-1}else s=-1;while(!1);return y=c,s|0}function _n(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;B=y,y=y+224|0,C=B+80|0,U=B+96|0,k=B,I=B+136|0,s=U,o=s+40|0;do e[s>>2]=0,s=s+4|0;while((s|0)<(o|0));return e[C>>2]=e[n>>2],(s1(0,r,C,k,U)|0)<0?n=-1:((e[t+76>>2]|0)>-1?p=Mt(t)|0:p=0,n=e[t>>2]|0,g=n&32,(d[t+74>>0]|0)<1&&(e[t>>2]=n&-33),n=t+48|0,e[n>>2]|0?s=s1(t,r,C,k,U)|0:(o=t+44|0,l=e[o>>2]|0,e[o>>2]=I,a=t+28|0,e[a>>2]=I,c=t+20|0,e[c>>2]=I,e[n>>2]=80,h=t+16|0,e[h>>2]=I+80,s=s1(t,r,C,k,U)|0,l&&(Qe[e[t+36>>2]&63](t,0,0)|0,s=e[c>>2]|0?s:-1,e[o>>2]=l,e[n>>2]=0,e[h>>2]=0,e[a>>2]=0,e[c>>2]=0)),n=e[t>>2]|0,e[t>>2]=n|g,p&&ht(t),n=n&32|0?-1:s),y=B,n|0}function Dp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0,M=0,X=0,K=0,t0=0,Z=0,s0=0,w0=0,v0=0,A0=0,Y0=0,ze=0,Re=0,$e=0,We=0,_e=0;We=y,y=y+304|0,s0=We+16|0,v0=We+8|0,w0=We+33|0,A0=We,O=We+32|0,(e[t+76>>2]|0)>-1?$e=Mt(t)|0:$e=0,s=d[r>>0]|0;e:do if(s<<24>>24){Y0=t+4|0,ze=t+100|0,Z=t+108|0,_=t+8|0,F=w0+10|0,M=w0+33|0,X=v0+4|0,K=w0+46|0,t0=w0+94|0,l=s,s=0,a=r,C=0,o=0,r=0;i:for(;;){t:do if(Xt(l&255)|0){for(;l=a+1|0,Xt(N[l>>0]|0)|0;)a=l;rt(t,0);do l=e[Y0>>2]|0,l>>>0<(e[ze>>2]|0)>>>0?(e[Y0>>2]=l+1,l=N[l>>0]|0):l=si(t)|0;while(Xt(l)|0);l=e[Y0>>2]|0,e[ze>>2]|0&&(l=l+-1|0,e[Y0>>2]=l),c=(e[Z>>2]|0)+C+l-(e[_>>2]|0)|0}else{l=(d[a>>0]|0)==37;r:do if(l){p=a+1|0,c=d[p>>0]|0;n:do switch(c<<24>>24){case 37:break r;case 42:{V=0,c=a+2|0;break}default:{if(c=(c&255)+-48|0,c>>>0<10&&(d[a+2>>0]|0)==36){for(e[s0>>2]=e[n>>2];V=(e[s0>>2]|0)+3&-4,l=e[V>>2]|0,e[s0>>2]=V+4,c>>>0>1;)c=c+-1|0;V=l,c=a+3|0;break n}c=(e[n>>2]|0)+3&-4,V=e[c>>2]|0,e[n>>2]=c+4,c=p}}while(!1);if(l=d[c>>0]|0,a=l&255,(a+-48|0)>>>0<10)for(l=0;p=(l*10|0)+-48+a|0,c=c+1|0,l=d[c>>0]|0,a=l&255,!((a+-48|0)>>>0>=10);)l=p;else p=0;switch(l<<24>>24==109?(c=c+1|0,g=d[c>>0]|0,l=(V|0)!=0&1,o=0,r=0):(g=l,l=0),a=c+1|0,g&255|0){case 104:{B=(d[a>>0]|0)==104,a=B?c+2|0:a,c=B?-2:-1;break}case 108:{B=(d[a>>0]|0)==108,a=B?c+2|0:a,c=B?3:1;break}case 106:{c=3;break}case 116:case 122:{c=1;break}case 76:{c=2;break}case 110:case 112:case 67:case 83:case 91:case 99:case 115:case 88:case 71:case 70:case 69:case 65:case 103:case 102:case 101:case 97:case 120:case 117:case 111:case 105:case 100:{a=c,c=0;break}default:{Re=152;break i}}switch(g=N[a>>0]|0,I=(g&47|0)==3,g=I?g|32:g,I=I?1:c,g|0){case 99:{B=C,U=(p|0)<1?1:p;break}case 91:{B=C,U=p;break}case 110:{if(!V){c=C;break t}switch(I|0){case-2:{d[V>>0]=C,c=C;break t}case-1:{E[V>>1]=C,c=C;break t}case 0:{e[V>>2]=C,c=C;break t}case 1:{e[V>>2]=C,c=C;break t}case 3:{c=V,e[c>>2]=C,e[c+4>>2]=((C|0)<0)<<31>>31,c=C;break t}default:{c=C;break t}}}default:{rt(t,0);do c=e[Y0>>2]|0,c>>>0<(e[ze>>2]|0)>>>0?(e[Y0>>2]=c+1,c=N[c>>0]|0):c=si(t)|0;while(Xt(c)|0);c=e[Y0>>2]|0,e[ze>>2]|0&&(c=c+-1|0,e[Y0>>2]=c),B=(e[Z>>2]|0)+C+c-(e[_>>2]|0)|0,U=p}}if(rt(t,U),c=e[Y0>>2]|0,p=e[ze>>2]|0,c>>>0

>>0)e[Y0>>2]=c+1;else{if((si(t)|0)<0){Re=152;break i}p=e[ze>>2]|0}p&&(e[Y0>>2]=(e[Y0>>2]|0)+-1);n:do switch(g|0){case 91:case 99:case 115:{k=(g|0)==99;s:do if((g&239|0)==99)je(w0|0,-1,257)|0,d[w0>>0]=0,(g|0)==115&&(d[M>>0]=0,d[F>>0]=0,d[F+1>>0]=0,d[F+2>>0]=0,d[F+3>>0]=0,d[F+4>>0]=0);else{switch(_e=a+1|0,C=(d[_e>>0]|0)==94,c=C&1,g=C?_e:a,a=C?a+2|0:_e,je(w0|0,C&1|0,257)|0,d[w0>>0]=0,d[a>>0]|0){case 45:{C=(c^1)&255,d[K>>0]=C,a=g+2|0;break}case 93:{C=(c^1)&255,d[t0>>0]=C,a=g+2|0;break}default:C=(c^1)&255}for(;;){c=d[a>>0]|0;o:do switch(c<<24>>24){case 0:{Re=152;break i}case 93:break s;case 45:{switch(g=a+1|0,c=d[g>>0]|0,c<<24>>24){case 93:case 0:{c=45;break o}default:}if(a=d[a+-1>>0]|0,(a&255)<(c&255)){a=a&255;do a=a+1|0,d[w0+a>>0]=C,c=d[g>>0]|0;while((a|0)<(c&255|0));a=g}else a=g;break}default:}while(!1);d[w0+((c&255)+1)>>0]=C,a=a+1|0}}while(!1);g=k?U+1|0:31,C=(I|0)==1,I=(l|0)!=0;s:do if(C){if(I){if(r=xi(g<<2)|0,!r){o=0,Re=152;break i}}else r=V;e[v0>>2]=0,e[X>>2]=0,o=0;o:for(;;){p=(r|0)==0;do{l:for(;;){if(c=e[Y0>>2]|0,c>>>0<(e[ze>>2]|0)>>>0?(e[Y0>>2]=c+1,c=N[c>>0]|0):c=si(t)|0,!(d[w0+(c+1)>>0]|0))break o;switch(d[O>>0]=c,Dr(A0,O,1,v0)|0){case-1:{o=0,Re=152;break i}case-2:break;default:break l}}p||(e[r+(o<<2)>>2]=e[A0>>2],o=o+1|0)}while(!(I&(o|0)==(g|0)));if(o=g<<1|1,c=bt(r,o<<2)|0,!c){o=0,Re=152;break i}_e=g,g=o,r=c,o=_e}if(dp(v0)|0)p=o,o=0;else{o=0,Re=152;break i}}else{if(I){if(o=xi(g)|0,o)c=0;else{o=0,r=0,Re=152;break i}for(;;){do{if(r=e[Y0>>2]|0,r>>>0<(e[ze>>2]|0)>>>0?(e[Y0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,!(d[w0+(r+1)>>0]|0)){p=c,r=0;break s}d[o+c>>0]=r,c=c+1|0}while((c|0)!=(g|0));if(r=g<<1|1,c=bt(o,r)|0,c)_e=g,g=r,o=c,c=_e;else{r=0,Re=152;break i}}}if(V)for(o=0;;){if(r=e[Y0>>2]|0,r>>>0

>>0?(e[Y0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,!(d[w0+(r+1)>>0]|0)){p=o,o=V,r=0;break s}d[V+o>>0]=r,p=e[ze>>2]|0,o=o+1|0}else for(o=p;;){if(r=e[Y0>>2]|0,r>>>0>>0?(e[Y0>>2]=r+1,r=N[r>>0]|0):r=si(t)|0,!(d[w0+(r+1)>>0]|0)){p=0,o=0,r=0;break s}o=e[ze>>2]|0}}while(!1);if(c=e[Y0>>2]|0,e[ze>>2]|0&&(c=c+-1|0,e[Y0>>2]=c),c=c-(e[_>>2]|0)+(e[Z>>2]|0)|0,!c||!((c|0)==(U|0)|k^1))break i;do if(I)if(C){e[V>>2]=r;break}else{e[V>>2]=o;break}while(!1);if(!k){if(r&&(e[r+(p<<2)>>2]=0),!o){o=0;break n}d[o+p>>0]=0}break}case 120:case 88:case 112:{c=16,Re=134;break}case 111:{c=8,Re=134;break}case 117:case 100:{c=10,Re=134;break}case 105:{c=0,Re=134;break}case 71:case 103:case 70:case 102:case 69:case 101:case 65:case 97:{if(h=+pn(t,I,0),(e[Z>>2]|0)==((e[_>>2]|0)-(e[Y0>>2]|0)|0))break i;if(V)switch(I|0){case 0:{e0[V>>2]=h;break n}case 1:{H[V>>3]=h;break n}case 2:{H[V>>3]=h;break n}default:break n}break}default:}while(!1);n:do if((Re|0)==134){if(Re=0,c=An(t,c,0,-1,-1)|0,(e[Z>>2]|0)==((e[_>>2]|0)-(e[Y0>>2]|0)|0))break i;if((V|0)!=0&(g|0)==112){e[V>>2]=c;break}if(V)switch(I|0){case-2:{d[V>>0]=c;break n}case-1:{E[V>>1]=c;break n}case 0:{e[V>>2]=c;break n}case 1:{e[V>>2]=c;break n}case 3:{_e=V,e[_e>>2]=c,e[_e+4>>2]=I0;break n}default:break n}}while(!1);s=((V|0)!=0&1)+s|0,c=(e[Z>>2]|0)+B+(e[Y0>>2]|0)-(e[_>>2]|0)|0;break t}while(!1);if(a=a+(l&1)|0,rt(t,0),l=e[Y0>>2]|0,l>>>0<(e[ze>>2]|0)>>>0?(e[Y0>>2]=l+1,l=N[l>>0]|0):l=si(t)|0,(l|0)!=(N[a>>0]|0)){Re=21;break i}c=C+1|0}while(!1);if(a=a+1|0,l=d[a>>0]|0,l<<24>>24)C=c;else break e}if((Re|0)==21){if(e[ze>>2]|0&&(e[Y0>>2]=(e[Y0>>2]|0)+-1),(s|0)!=0|(l|0)>-1)break;s=0,Re=153}else(Re|0)==152&&(s||(s=l,Re=153));(Re|0)==153&&(l=s,s=-1),l&&(Ze(o),Ze(r))}else s=0;while(!1);return $e&&ht(t),y=We,s|0}function Fr(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0,h=0,p=0,g=0;g=y,y=y+128|0,o=g+112|0,p=g,l=p,a=37352,c=l+112|0;do e[l>>2]=e[a>>2],l=l+4|0,a=a+4|0;while((l|0)<(c|0));return(r+-1|0)>>>0>2147483646?r?(r=di()|0,e[r>>2]=75,r=-1):(r=1,h=4):(o=t,h=4),(h|0)==4&&(h=-2-o|0,h=r>>>0>h>>>0?h:r,e[p+48>>2]=h,t=p+20|0,e[t>>2]=o,e[p+44>>2]=o,r=o+h|0,o=p+16|0,e[o>>2]=r,e[p+28>>2]=r,r=_n(p,n,s)|0,h&&(n=e[t>>2]|0,d[n+(((n|0)==(e[o>>2]|0))<<31>>31)>>0]=0)),y=g,r|0}function Rn(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;l=y,y=y+112|0,s=l,o=s,a=o+112|0;do e[o>>2]=0,o=o+4|0;while((o|0)<(a|0));return e[s+32>>2]=29,e[s+44>>2]=t,e[s+76>>2]=-1,e[s+84>>2]=t,a=Dp(s,r,n)|0,y=l,a|0}function D1(t,r,n){return t=t|0,r=r|0,n=n|0,+ +Ah(t,r,2)}function Ep(t,r,n){return t=t|0,r=r|0,n=n|0,t=k2(t,r,n,-1,-1)|0,t|0}function kp(t,r,n){return t=t|0,r=r|0,n=n|0,t=k2(t,r,n,0,-2147483648)|0,t|0}function Pn(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;l=r&255,s=(n|0)!=0;e:do if(s&(t&3|0)!=0)for(o=r&255;;){if((d[t>>0]|0)==o<<24>>24){a=6;break e}if(t=t+1|0,n=n+-1|0,s=(n|0)!=0,!(s&(t&3|0)!=0)){a=5;break}}else a=5;while(!1);(a|0)==5&&(s?a=6:n=0);e:do if((a|0)==6&&(o=r&255,(d[t>>0]|0)!=o<<24>>24)){s=W(l,16843009)|0;i:do if(n>>>0>3){for(;l=e[t>>2]^s,!((l&-2139062144^-2139062144)&l+-16843009);)if(t=t+4|0,n=n+-4|0,n>>>0<=3){a=11;break i}}else a=11;while(!1);if((a|0)==11&&!n){n=0;break}for(;;){if((d[t>>0]|0)==o<<24>>24)break e;if(t=t+1|0,n=n+-1|0,!n){n=0;break}}}while(!1);return(n|0?t:0)|0}function Fp(t,r){t=t|0,r=r|0;var n=0,s=0;n=r;e:do if((n^t)&3)s=8;else{if(n&3)do{if(n=d[r>>0]|0,d[t>>0]=n,!(n<<24>>24))break e;r=r+1|0,t=t+1|0}while(r&3|0);if(n=e[r>>2]|0,!((n&-2139062144^-2139062144)&n+-16843009))for(s=t;r=r+4|0,t=s+4|0,e[s>>2]=n,n=e[r>>2]|0,!((n&-2139062144^-2139062144)&n+-16843009);)s=t;s=8}while(!1);if((s|0)==8&&(s=d[r>>0]|0,d[t>>0]=s,s<<24>>24))do r=r+1|0,t=t+1|0,s=d[r>>0]|0,d[t>>0]=s;while(s<<24>>24);return t|0}function Ln(t,r){t=t|0,r=r|0;var n=0,s=0;if(s=d[t>>0]|0,n=d[r>>0]|0,!(s<<24>>24)||s<<24>>24!=n<<24>>24)r=s;else{do t=t+1|0,r=r+1|0,s=d[t>>0]|0,n=d[r>>0]|0;while(!(!(s<<24>>24)||s<<24>>24!=n<<24>>24));r=s}return(r&255)-(n&255)|0}function E1(t,r){return t=t|0,r=r|0,Fp(t,r)|0,t|0}function Ot(t){t=t|0;var r=0,n=0,s=0;s=t;e:do if(!(s&3))n=4;else for(r=t,t=s;;){if(!(d[r>>0]|0))break e;if(r=r+1|0,t=r,!(t&3)){t=r,n=4;break}}while(!1);if((n|0)==4){for(;r=e[t>>2]|0,!((r&-2139062144^-2139062144)&r+-16843009);)t=t+4|0;if((r&255)<<24>>24)do t=t+1|0;while(d[t>>0]|0)}return t-s|0}function Mp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;if(!n)r=0;else{s=d[t>>0]|0;e:do if(!(s<<24>>24))s=0;else for(;;){if(n=n+-1|0,o=d[r>>0]|0,!(s<<24>>24==o<<24>>24&((n|0)!=0&o<<24>>24!=0)))break e;if(t=t+1|0,r=r+1|0,s=d[t>>0]|0,!(s<<24>>24)){s=0;break}}while(!1);r=(s&255)-(N[r>>0]|0)|0}return r|0}function Mr(t){t=t|0;var r=0;for(r=t;e[r>>2]|0;)r=r+4|0;return r-t>>2|0}function Nt(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if(n)for(s=t;n=n+-1|0,e[s>>2]=e[r>>2],n;)r=r+4|0,s=s+4|0;return t|0}function _p(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if(s=(n|0)==0,t-r>>2>>>0>>0){if(!s)do n=n+-1|0,e[t+(n<<2)>>2]=e[r+(n<<2)>>2];while(n|0)}else if(!s)for(s=r,r=t;n=n+-1|0,e[r>>2]=e[s>>2],n;)s=s+4|0,r=r+4|0;return t|0}function Rp(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if(n)for(s=t;n=n+-1|0,e[s>>2]=r,n;)s=s+4|0;return t|0}function Un(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;switch(a=t+4|0,n=e[a>>2]|0,c=t+100|0,n>>>0<(e[c>>2]|0)>>>0?(e[a>>2]=n+1,n=N[n>>0]|0):n=si(t)|0,n|0){case 43:case 45:{s=(n|0)==45&1,n=e[a>>2]|0,n>>>0<(e[c>>2]|0)>>>0?(e[a>>2]=n+1,n=N[n>>0]|0):n=si(t)|0,(r|0)!=0&(n+-48|0)>>>0>9&&e[c>>2]|0&&(e[a>>2]=(e[a>>2]|0)+-1),l=s;break}default:l=0}if((n+-48|0)>>>0>9)e[c>>2]|0?(e[a>>2]=(e[a>>2]|0)+-1,s=-2147483648,n=0):(s=-2147483648,n=0);else{s=0;do s=n+-48+(s*10|0)|0,n=e[a>>2]|0,n>>>0<(e[c>>2]|0)>>>0?(e[a>>2]=n+1,n=N[n>>0]|0):n=si(t)|0;while((n+-48|0)>>>0<10&(s|0)<214748364);if(r=((s|0)<0)<<31>>31,(n+-48|0)>>>0<10){do r=Ht(s|0,r|0,10,0)|0,s=I0,n=Li(n|0,((n|0)<0)<<31>>31|0,-48,-1)|0,s=Li(n|0,I0|0,r|0,s|0)|0,r=I0,n=e[a>>2]|0,n>>>0<(e[c>>2]|0)>>>0?(e[a>>2]=n+1,n=N[n>>0]|0):n=si(t)|0;while((n+-48|0)>>>0<10&((r|0)<21474836|(r|0)==21474836&s>>>0<2061584302));o=s}else o=s;if((n+-48|0)>>>0<10)do n=e[a>>2]|0,n>>>0<(e[c>>2]|0)>>>0?(e[a>>2]=n+1,n=N[n>>0]|0):n=si(t)|0;while((n+-48|0)>>>0<10);e[c>>2]|0&&(e[a>>2]=(e[a>>2]|0)+-1),t=(l|0)!=0,n=Ji(0,0,o|0,r|0)|0,s=t?I0:r,n=t?n:o}return I0=s,n|0}function Pp(t){t=t|0,e[t+68>>2]|0||ht(t)}function Lp(t){t=t|0,e[t+68>>2]|0||ht(t)}function k1(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;return r=t+20|0,l=t+28|0,(e[r>>2]|0)>>>0>(e[l>>2]|0)>>>0&&(Qe[e[t+36>>2]&63](t,0,0)|0,(e[r>>2]|0)==0)?r=-1:(a=t+4|0,n=e[a>>2]|0,s=t+8|0,o=e[s>>2]|0,n>>>0>>0&&Qe[e[t+40>>2]&63](t,n-o|0,1)|0,e[t+16>>2]=0,e[l>>2]=0,e[r>>2]=0,e[s>>2]=0,e[a>>2]=0,r=0),r|0}var Up=[Et,ju,Wu,Y4,K4,$4,tc,mr,dr,Et,Et,Et,Et,Et,Et,Et],_r=[tr,Vd,Yf,Uf,yf,mf,rf,Ya,Ra,Hg,zg,Qg,tr,tr,tr,tr],Op=[en,oc,mc,en],Ce=[Xe,Ud,Od,Gf,Qf,_f,Rf,wf,Tf,ff,uf,Ja,$a,Ga,Qa,Ea,ka,Aa,Sa,aa,fa,Jl,$l,Gl,Ql,Rl,Pl,Jo,$o,Qo,zo,Ts,Cs,ko,Ro,Fo,r3,Y2,n3,s3,no,so,cg,oo,Zs,Js,Os,Ns,bs,Gs,Ys,js,lo,ao,ho,mo,So,vo,xo,yo,bo,Go,ll,al,ml,dl,Sl,vl,xl,yl,qa,ba,o5,Yd,ig,tg,hg,mg,Cg,xg,Tr,Eg,Mg,_g,Pg,Og,Lg,Ug,Ng,Bg,ir,Eh,Ph,ce,Nh,Qh,o1,s5,y5,N5,W5,G2,Z5,J5,e3,z2,i3,t3,f3,j2,u3,c3,A3,S3,Vi,v3,w3,T3,x3,Uc,E3,k3,R3,P3,H3,Y3,n6,s6,p6,A6,ru,nu,yu,Iu,Hu,Yu,Xu,Ku,Ju,$u,f4,u4,T4,C4,R4,P4,z4,H4,Z4,J4,nc,sc,cc,hc,Ac,Sc,Cc,xc,D2,Fc,E2,Wc,Z2,gh,K2,K6,W2,W6,C3,Lc,Nc,sh,F6,N6,H6,Y6,dg,an,ct,ws,h1,$5,Oo,Ua,ep,Pp,Lp,Ch,op,j4,lr,Oc,y8,_8,R8,P8,L8,U8,O8,f0,ye,Ze,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe,Xe],Ke=[v1,Bd,Hf,Lf,xf,hf,tf,Ha,Ma,va,ua,ea,zl,Ll,el,Ho,xs,I5,rg,ng,kh,Rh,Bh,Gh,B5,t4,r4,n4,s4,l4,a4,m4,d4,g4,p4,S4,w4,I4,D4,E4,k4,M4,_4,O4,N4,B4,V4,G4,Q4,Tc,Dc,im,rm,sm,tm,nm,om,ms,gg,sg,og,fn,x5,Ms,Rs,o3,T5,m5,Uo,Xo,kl,Nl,jl,ra,ma,Ca,La,Xa,sf,gf,Df,Nf,Xf,bd,$d,Ft,Wh,Xh,C5,h3,Kh,c5,A5,p5,Ym,jm,Xm,Km,Wm,Zm,dh,Jm,$m,e8,i8,t8,r8,n8,s8,o8,l8,a8,f8,c8,h8,m8,d8,g8,p8,A8,S8,v8,w8,T8,C8,G8,v1,v1],rr=[Di,L3,U3,O3,N3,B3,V3,q3,b3,G3,Q3,z3,j3,X3,K3,W3,Z3,J3,$3,e6,i6,t6,r6,f6,c6,T6,Jf,ou,lu,au,fu,uu,Eu,ku,Fu,Mu,_u,uc,pc,Vt,zt,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di,Di],Se=[Je,F5,M5,io,P5,jd,yg,kg,Rg,vp,Fh,Q5,H5,Y5,G5,Lh,Uh,Vh,R5,Hh,Yh,m3,su,lm,fm,cm,Am,vm,mm,gm,Du,am,um,hm,Sm,wm,dm,pm,e4,i4,o4,c4,h4,A4,x4,y4,F4,L4,U4,q4,I6,D6,k6,Z6,$6,J6,em,fh,uh,mh,P6,L6,O6,b6,G6,z6,Wd,G0,ai,ui,Q2,H2,Id,Dd,Ed,nt,Mr,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je,Je],Np=[tn,X4,ic,tn],Qe=[wi,D5,_5,U5,Jh,$h,Vg,Sh,Dn,Tp,wp,Cp,V5,z5,Mh,X5,qh,D3,_3,vc,yc,Jc,eh,rh,Bc,Qc,Hc,Xc,_s,ph,N2,fp,Qm,Hm,Ut,pp,mp,Ip,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi,wi],Bp=[rn,fc,gc,rn],Bt=[kt,$s,Xg,jg,Yg,q5,E5,wc,Ic,kt,kt,kt,kt,kt,kt,kt],Vp=[Sr,a6,m6,w6,eu,Sr,Sr,Sr],qp=[vr,W4,rc,ac,dc,vr,vr,vr],Ni=[Ri,Nd,zf,Pf,Cf,cf,ef,za,Fa,Ta,ha,ta,Yl,Ol,tl,jo,Is,to,ro,j5,_h,Oh,K5,L5,bh,jh,O5,Zc,$c,ih,Gc,zc,Yc,pg,ps,Ss,l3,Pi,a3,ap,lp,f5,d5,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri,Ri],nr=[ut,y3,F3,o6,l6,u6,g6,S6,v6,Zf,tu,nh,y6,E6,Kc,ah,hh,R6,U6,q6,Q6,Ap,gp,ut,ut,ut,ut,ut,ut,ut,ut,ut],bp=[kd,H8,z8,Q8],Gp=[Lt,ds,un,Ii,_c,Rc,Pc,ip,rp,tp,Lt,Lt,Lt,Lt,Lt,Lt],F1=[Yt,wa,ca,ia,Hl,Ul,il,Yo,ys,th,Vc,qc,bc,jc,Kd,eg,Mm,qm,xn,sp,Dr,Z8,W8,K8,X8,j8,Y8,Yt,Yt,Yt,Yt,Yt],Rr=[Fd,Zh,Xd,d3,Ag,Tt,Md,n5,O2,lg,i5,p3,bm,Gm,zm,u1],On=[nn,_d,Zg,Rd,Jg,Pd,xr,nn],Ct=[jt,cu,Ru,C6,x6,oh,lh,M6,_6,B6,V6,jt,jt,jt,jt,jt],Qp=[wr,h6,d6,$f,iu,wr,wr,wr],Pr=[Gi,Po,Lo,Mo,_o,eo,Bs,Vs,Qs,zs,Xs,Ks,fo,uo,go,po,wo,To,Io,Do,ul,cl,gl,pl,wl,Tl,Il,Dl,qg,bg,Gg,b5,k5,I3,M3,ls,r5,Ds,Es,ks,Fs,Ps,Ls,Us,rl,nl,sl,ol,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi,Gi];return{_jpegls_encode:vg,___cxa_can_catch:Kg,_free:Ze,_jpegls_decode:Sg,___cxa_is_pointer_type:Wg,_i64Add:Li,_memmove:gr,_i64Subtract:Ji,_memset:je,_malloc:xi,_memcpy:ti,_bitshift64Lshr:Dt,_bitshift64Shl:pi,__GLOBAL__I_000101:xh,__GLOBAL__sub_I_jpegls_cpp:vs,__GLOBAL__sub_I_iostream_cpp:yh,runPostSets:J8,_emscripten_replace_memory:Jn,stackAlloc:$n,stackSave:es,stackRestore:is,establishStackSpace:ts,setThrew:rs,setTempRet0:ns,getTempRet0:ss,dynCall_iiiiiiii:ed,dynCall_viiiii:id,dynCall_iiiiiid:rd,dynCall_vi:nd,dynCall_vii:sd,dynCall_iiiiiii:od,dynCall_ii:ld,dynCall_iiiiiiiiiiii:ad,dynCall_iiii:ud,dynCall_viiiiiiiiiiiiiii:cd,dynCall_viiiiii:hd,dynCall_viiiiiii:md,dynCall_viiiiiiiiii:dd,dynCall_iii:gd,dynCall_iiiiii:pd,dynCall_diii:Ad,dynCall_i:Sd,dynCall_iiiii:vd,dynCall_viii:wd,dynCall_v:Td,dynCall_iiiiiiiii:Cd,dynCall_iiiiid:xd,dynCall_viiii:yd}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer);Module._jpegls_encode=asm._jpegls_encode,Module.___cxa_can_catch=asm.___cxa_can_catch;var _free=Module._free=asm._free;Module._jpegls_decode=asm._jpegls_decode,Module.___cxa_is_pointer_type=asm.___cxa_is_pointer_type;var _i64Add=Module._i64Add=asm._i64Add,_memmove=Module._memmove=asm._memmove,_i64Subtract=Module._i64Subtract=asm._i64Subtract,_memset=Module._memset=asm._memset,_malloc=Module._malloc=asm._malloc,_memcpy=Module._memcpy=asm._memcpy,_emscripten_replace_memory=Module._emscripten_replace_memory=asm._emscripten_replace_memory;Module.runPostSets=asm.runPostSets,Module.__GLOBAL__sub_I_iostream_cpp=asm.__GLOBAL__sub_I_iostream_cpp;var _bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,__GLOBAL__sub_I_jpegls_cpp=Module.__GLOBAL__sub_I_jpegls_cpp=asm.__GLOBAL__sub_I_jpegls_cpp,__GLOBAL__I_000101=Module.__GLOBAL__I_000101=asm.__GLOBAL__I_000101,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl;Module.dynCall_iiiiiiii=asm.dynCall_iiiiiiii,Module.dynCall_viiiii=asm.dynCall_viiiii,Module.dynCall_iiiiiid=asm.dynCall_iiiiiid,Module.dynCall_vi=asm.dynCall_vi,Module.dynCall_vii=asm.dynCall_vii,Module.dynCall_iiiiiii=asm.dynCall_iiiiiii,Module.dynCall_ii=asm.dynCall_ii,Module.dynCall_iiiiiiiiiiii=asm.dynCall_iiiiiiiiiiii,Module.dynCall_iiii=asm.dynCall_iiii,Module.dynCall_viiiiiiiiiiiiiii=asm.dynCall_viiiiiiiiiiiiiii,Module.dynCall_viiiiii=asm.dynCall_viiiiii,Module.dynCall_viiiiiii=asm.dynCall_viiiiiii,Module.dynCall_viiiiiiiiii=asm.dynCall_viiiiiiiiii,Module.dynCall_iii=asm.dynCall_iii,Module.dynCall_iiiiii=asm.dynCall_iiiiii,Module.dynCall_diii=asm.dynCall_diii,Module.dynCall_i=asm.dynCall_i,Module.dynCall_iiiii=asm.dynCall_iiiii,Module.dynCall_viii=asm.dynCall_viii,Module.dynCall_v=asm.dynCall_v,Module.dynCall_iiiiiiiii=asm.dynCall_iiiiiiiii,Module.dynCall_iiiiid=asm.dynCall_iiiiid,Module.dynCall_viiii=asm.dynCall_viiii,Runtime.stackAlloc=asm.stackAlloc,Runtime.stackSave=asm.stackSave,Runtime.stackRestore=asm.stackRestore,Runtime.establishStackSpace=asm.establishStackSpace,Runtime.setTempRet0=asm.setTempRet0,Runtime.getTempRet0=asm.getTempRet0;function ExitStatus(T){this.name="ExitStatus",this.message="Program terminated with exit("+T+")",this.status=T}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop;dependenciesFulfilled=function T(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=T)},Module.callMain=Module.callMain=function T(u){assert(runDependencies==0,"cannot call main when async dependencies remain! (listen on __ATMAIN__)"),assert(__ATPRERUN__.length==0,"cannot call main when preRun functions remain to be called"),u=u||[],ensureInitRuntime();var m=u.length+1;function A(){for(var D=0;D<3;D++)S.push(0)}var S=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];A();for(var v=0;v0||(preRun(),runDependencies>0)||Module.calledRun)return;function u(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(T),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),u()},1)):u()}Module.run=Module.run=run;function exit(T,u){if(!(u&&Module.noExitRuntime))throw Module.noExitRuntime||(ABORT=!0,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(T)),ENVIRONMENT_IS_NODE?(process.stdout.once("drain",function(){process.exit(T)}),console.log(" "),setTimeout(function(){process.exit(T)},500)):ENVIRONMENT_IS_SHELL&&typeof quit=="function"&&quit(T),new ExitStatus(T)}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(T){T!==void 0?(Module.print(T),Module.printErr(T),T=JSON.stringify(T)):T="",ABORT=!0;var u=` +If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,m="abort("+T+") at "+stackTrace()+u;throw abortDecorators&&abortDecorators.forEach(function(A){m=A(m,T)}),m}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;return Module.noInitialRun&&(shouldRunNow=!1),run(),Module};module.exports&&(module.exports=CharLS)}(charLSDynamicMemoryBrowser)),charLSDynamicMemoryBrowser.exports}var hasRequiredJpegLs;function requireJpegLs(){return hasRequiredJpegLs||(hasRequiredJpegLs=1,function(T){var u=u||(typeof commonjsRequire<"u"?requireCharLSDynamicMemoryBrowser():null),m=function(){var A;function S(){}S.prototype={decodeJPEGLS:function(R,L){return D(R,L)}};function v(R,L){var P=A._malloc(R.length);A.writeArrayToMemory(R,P);var d=A._malloc(4),E=A._malloc(4),e=A._malloc(4),N=A._malloc(4),q=A._malloc(4),z=A._malloc(4),e0=A._malloc(4),H=A._malloc(4),j=A._malloc(4),y=A.ccall("jpegls_decode","number",["number","number","number","number","number","number","number","number","number","number","number"],[P,R.length,d,E,e,N,q,z,H,e0,j]),Y={result:y,width:A.getValue(e,"i32"),height:A.getValue(N,"i32"),bitsPerSample:A.getValue(q,"i32"),stride:A.getValue(z,"i32"),components:A.getValue(H,"i32"),allowedLossyError:A.getValue(e0,"i32"),interleaveMode:A.getValue(j,"i32"),pixelData:void 0},G=A.getValue(d,"*");return Y.bitsPerSample<=8?(Y.pixelData=new Uint8Array(Y.width*Y.height*Y.components),Y.pixelData.set(new Uint8Array(A.HEAP8.buffer,G,Y.pixelData.length))):L?(Y.pixelData=new Int16Array(Y.width*Y.height*Y.components),Y.pixelData.set(new Int16Array(A.HEAP16.buffer,G,Y.pixelData.length))):(Y.pixelData=new Uint16Array(Y.width*Y.height*Y.components),Y.pixelData.set(new Uint16Array(A.HEAP16.buffer,G,Y.pixelData.length))),A._free(P),A._free(G),A._free(d),A._free(E),A._free(e),A._free(N),A._free(q),A._free(z),A._free(H),A._free(j),Y}function w(){if(typeof u>"u")throw"No JPEG-LS decoder loaded";if(!A&&(A=u(),!A||!A._jpegls_decode))throw"JPEG-LS failed to initialize"}function D(R,L){w();var P=v(R,L);if(P.result!==0&&P.result!==6)throw"JPEG-LS decoder failed to decode frame (error code "+P.result+")";var d={};return d.columns=P.width,d.rows=P.height,d.pixelData=P.pixelData,d}return S}();T.exports&&(T.exports=m)}(jpegLs)),jpegLs.exports}var parser={exports:{}},pako={},deflate$1={},deflate={},trees={},hasRequiredTrees;function requireTrees(){if(hasRequiredTrees)return trees;hasRequiredTrees=1;const T=4,u=0,m=1,A=2;function S(W){let U0=W.length;for(;--U0>=0;)W[U0]=0}const v=0,w=1,D=2,R=3,L=258,P=29,d=256,E=d+1+P,e=30,N=19,q=2*E+1,z=15,e0=16,H=7,j=256,y=16,Y=17,G=18,J=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),i0=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),Q=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),f=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o0=512,l0=new Array((E+2)*2);S(l0);const c0=new Array(e*2);S(c0);const d0=new Array(o0);S(d0);const S0=new Array(L-R+1);S(S0);const g0=new Array(P);S(g0);const T0=new Array(e);S(T0);function C0(W,U0,X0,Q0,oe){this.static_tree=W,this.extra_bits=U0,this.extra_base=X0,this.elems=Q0,this.max_length=oe,this.has_stree=W&&W.length}let F0,ee,ie;function ke(W,U0){this.dyn_tree=W,this.max_code=0,this.stat_desc=U0}const Ne=W=>W<256?d0[W]:d0[256+(W>>>7)],De=(W,U0)=>{W.pending_buf[W.pending++]=U0&255,W.pending_buf[W.pending++]=U0>>>8&255},I0=(W,U0,X0)=>{W.bi_valid>e0-X0?(W.bi_buf|=U0<>e0-W.bi_valid,W.bi_valid+=X0-e0):(W.bi_buf|=U0<{I0(W,X0[U0*2],X0[U0*2+1])},Ge=(W,U0)=>{let X0=0;do X0|=W&1,W>>>=1,X0<<=1;while(--U0>0);return X0>>>1},ii=W=>{W.bi_valid===16?(De(W,W.bi_buf),W.bi_buf=0,W.bi_valid=0):W.bi_valid>=8&&(W.pending_buf[W.pending++]=W.bi_buf&255,W.bi_buf>>=8,W.bi_valid-=8)},oi=(W,U0)=>{const X0=U0.dyn_tree,Q0=U0.max_code,oe=U0.stat_desc.static_tree,ue=U0.stat_desc.has_stree,D0=U0.stat_desc.extra_bits,b0=U0.stat_desc.extra_base,n0=U0.stat_desc.max_length;let h0,Fe,u0,Me,L0,Ye,W0=0;for(Me=0;Me<=z;Me++)W.bl_count[Me]=0;for(X0[W.heap[W.heap_max]*2+1]=0,h0=W.heap_max+1;h0n0&&(Me=n0,W0++),X0[Fe*2+1]=Me,!(Fe>Q0)&&(W.bl_count[Me]++,L0=0,Fe>=b0&&(L0=D0[Fe-b0]),Ye=X0[Fe*2],W.opt_len+=Ye*(Me+L0),ue&&(W.static_len+=Ye*(oe[Fe*2+1]+L0)));if(W0!==0){do{for(Me=n0-1;W.bl_count[Me]===0;)Me--;W.bl_count[Me]--,W.bl_count[Me+1]+=2,W.bl_count[n0]--,W0-=2}while(W0>0);for(Me=n0;Me!==0;Me--)for(Fe=W.bl_count[Me];Fe!==0;)u0=W.heap[--h0],!(u0>Q0)&&(X0[u0*2+1]!==Me&&(W.opt_len+=(Me-X0[u0*2+1])*X0[u0*2],X0[u0*2+1]=Me),Fe--)}},ei=(W,U0,X0)=>{const Q0=new Array(z+1);let oe=0,ue,D0;for(ue=1;ue<=z;ue++)oe=oe+X0[ue-1]<<1,Q0[ue]=oe;for(D0=0;D0<=U0;D0++){let b0=W[D0*2+1];b0!==0&&(W[D0*2]=Ge(Q0[b0]++,b0))}},Ve=()=>{let W,U0,X0,Q0,oe;const ue=new Array(z+1);for(X0=0,Q0=0;Q0>=7;Q0{let U0;for(U0=0;U0{W.bi_valid>8?De(W,W.bi_buf):W.bi_valid>0&&(W.pending_buf[W.pending++]=W.bi_buf),W.bi_buf=0,W.bi_valid=0},M0=(W,U0,X0,Q0)=>{const oe=U0*2,ue=X0*2;return W[oe]{const Q0=W.heap[X0];let oe=X0<<1;for(;oe<=W.heap_len&&(oe{let Q0,oe,ue=0,D0,b0;if(W.sym_next!==0)do Q0=W.pending_buf[W.sym_buf+ue++]&255,Q0+=(W.pending_buf[W.sym_buf+ue++]&255)<<8,oe=W.pending_buf[W.sym_buf+ue++],Q0===0?Le(W,oe,U0):(D0=S0[oe],Le(W,D0+d+1,U0),b0=J[D0],b0!==0&&(oe-=g0[D0],I0(W,oe,b0)),Q0--,D0=Ne(Q0),Le(W,D0,X0),b0=i0[D0],b0!==0&&(Q0-=T0[D0],I0(W,Q0,b0)));while(ue{const X0=U0.dyn_tree,Q0=U0.stat_desc.static_tree,oe=U0.stat_desc.has_stree,ue=U0.stat_desc.elems;let D0,b0,n0=-1,h0;for(W.heap_len=0,W.heap_max=q,D0=0;D0>1;D0>=1;D0--)se(W,X0,D0);h0=ue;do D0=W.heap[1],W.heap[1]=W.heap[W.heap_len--],se(W,X0,1),b0=W.heap[1],W.heap[--W.heap_max]=D0,W.heap[--W.heap_max]=b0,X0[h0*2]=X0[D0*2]+X0[b0*2],W.depth[h0]=(W.depth[D0]>=W.depth[b0]?W.depth[D0]:W.depth[b0])+1,X0[D0*2+1]=X0[b0*2+1]=h0,W.heap[1]=h0++,se(W,X0,1);while(W.heap_len>=2);W.heap[--W.heap_max]=W.heap[1],oi(W,U0),ei(X0,n0,W.bl_count)},me=(W,U0,X0)=>{let Q0,oe=-1,ue,D0=U0[0*2+1],b0=0,n0=7,h0=4;for(D0===0&&(n0=138,h0=3),U0[(X0+1)*2+1]=65535,Q0=0;Q0<=X0;Q0++)ue=D0,D0=U0[(Q0+1)*2+1],!(++b0{let Q0,oe=-1,ue,D0=U0[0*2+1],b0=0,n0=7,h0=4;for(D0===0&&(n0=138,h0=3),Q0=0;Q0<=X0;Q0++)if(ue=D0,D0=U0[(Q0+1)*2+1],!(++b0{let U0;for(me(W,W.dyn_ltree,W.l_desc.max_code),me(W,W.dyn_dtree,W.d_desc.max_code),R0(W,W.bl_desc),U0=N-1;U0>=3&&W.bl_tree[f[U0]*2+1]===0;U0--);return W.opt_len+=3*(U0+1)+5+5+4,U0},B0=(W,U0,X0,Q0)=>{let oe;for(I0(W,U0-257,5),I0(W,X0-1,5),I0(W,Q0-4,4),oe=0;oe{let U0=4093624447,X0;for(X0=0;X0<=31;X0++,U0>>>=1)if(U0&1&&W.dyn_ltree[X0*2]!==0)return u;if(W.dyn_ltree[9*2]!==0||W.dyn_ltree[10*2]!==0||W.dyn_ltree[13*2]!==0)return m;for(X0=32;X0{j0||(Ve(),j0=!0),W.l_desc=new ke(W.dyn_ltree,F0),W.d_desc=new ke(W.dyn_dtree,ee),W.bl_desc=new ke(W.bl_tree,ie),W.bi_buf=0,W.bi_valid=0,qe(W)},V0=(W,U0,X0,Q0)=>{I0(W,(v<<1)+(Q0?1:0),3),Z0(W),De(W,X0),De(W,~X0),X0&&W.pending_buf.set(W.window.subarray(U0,U0+X0),W.pending),W.pending+=X0},pe=W=>{I0(W,w<<1,3),Le(W,j,l0),ii(W)},q0=(W,U0,X0,Q0)=>{let oe,ue,D0=0;W.level>0?(W.strm.data_type===A&&(W.strm.data_type=E0(W)),R0(W,W.l_desc),R0(W,W.d_desc),D0=O0(W),oe=W.opt_len+3+7>>>3,ue=W.static_len+3+7>>>3,ue<=oe&&(oe=ue)):oe=ue=X0+5,X0+4<=oe&&U0!==-1?V0(W,U0,X0,Q0):W.strategy===T||ue===oe?(I0(W,(w<<1)+(Q0?1:0),3),x0(W,l0,c0)):(I0(W,(D<<1)+(Q0?1:0),3),B0(W,W.l_desc.max_code+1,W.d_desc.max_code+1,D0+1),x0(W,W.dyn_ltree,W.dyn_dtree)),qe(W),Q0&&Z0(W)},K0=(W,U0,X0)=>(W.pending_buf[W.sym_buf+W.sym_next++]=U0,W.pending_buf[W.sym_buf+W.sym_next++]=U0>>8,W.pending_buf[W.sym_buf+W.sym_next++]=X0,U0===0?W.dyn_ltree[X0*2]++:(W.matches++,U0--,W.dyn_ltree[(S0[X0]+d+1)*2]++,W.dyn_dtree[Ne(U0)*2]++),W.sym_next===W.sym_end);return trees._tr_init=z0,trees._tr_stored_block=V0,trees._tr_flush_block=q0,trees._tr_tally=K0,trees._tr_align=pe,trees}var adler32_1,hasRequiredAdler32;function requireAdler32(){return hasRequiredAdler32||(hasRequiredAdler32=1,adler32_1=(u,m,A,S)=>{let v=u&65535|0,w=u>>>16&65535|0,D=0;for(;A!==0;){D=A>2e3?2e3:A,A-=D;do v=v+m[S++]|0,w=w+v|0;while(--D);v%=65521,w%=65521}return v|w<<16|0}),adler32_1}var crc32_1,hasRequiredCrc32;function requireCrc32(){if(hasRequiredCrc32)return crc32_1;hasRequiredCrc32=1;const T=()=>{let A,S=[];for(var v=0;v<256;v++){A=v;for(var w=0;w<8;w++)A=A&1?3988292384^A>>>1:A>>>1;S[v]=A}return S},u=new Uint32Array(T());return crc32_1=(A,S,v,w)=>{const D=u,R=w+v;A^=-1;for(let L=w;L>>8^D[(A^S[L])&255];return A^-1},crc32_1}var messages,hasRequiredMessages;function requireMessages(){return hasRequiredMessages||(hasRequiredMessages=1,messages={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}),messages}var constants,hasRequiredConstants;function requireConstants(){return hasRequiredConstants||(hasRequiredConstants=1,constants={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}),constants}var hasRequiredDeflate$1;function requireDeflate$1(){if(hasRequiredDeflate$1)return deflate;hasRequiredDeflate$1=1;const{_tr_init:T,_tr_stored_block:u,_tr_flush_block:m,_tr_tally:A,_tr_align:S}=requireTrees(),v=requireAdler32(),w=requireCrc32(),D=requireMessages(),{Z_NO_FLUSH:R,Z_PARTIAL_FLUSH:L,Z_FULL_FLUSH:P,Z_FINISH:d,Z_BLOCK:E,Z_OK:e,Z_STREAM_END:N,Z_STREAM_ERROR:q,Z_DATA_ERROR:z,Z_BUF_ERROR:e0,Z_DEFAULT_COMPRESSION:H,Z_FILTERED:j,Z_HUFFMAN_ONLY:y,Z_RLE:Y,Z_FIXED:G,Z_DEFAULT_STRATEGY:J,Z_UNKNOWN:i0,Z_DEFLATED:Q}=requireConstants(),f=9,o0=15,l0=8,S0=256+1+29,g0=30,T0=19,C0=2*S0+1,F0=15,ee=3,ie=258,ke=ie+ee+1,Ne=32,De=42,I0=57,Le=69,Ge=73,ii=91,oi=103,ei=113,Ve=666,qe=1,Z0=2,M0=3,se=4,x0=3,R0=($,J0)=>($.msg=D[J0],J0),me=$=>$*2-($>4?9:0),N0=$=>{let J0=$.length;for(;--J0>=0;)$[J0]=0},O0=$=>{let J0,p0,k0,m0=$.w_size;J0=$.hash_size,k0=J0;do p0=$.head[--k0],$.head[k0]=p0>=m0?p0-m0:0;while(--J0);J0=m0,k0=J0;do p0=$.prev[--k0],$.prev[k0]=p0>=m0?p0-m0:0;while(--J0)};let E0=($,J0,p0)=>(J0<<$.hash_shift^p0)&$.hash_mask;const j0=$=>{const J0=$.state;let p0=J0.pending;p0>$.avail_out&&(p0=$.avail_out),p0!==0&&($.output.set(J0.pending_buf.subarray(J0.pending_out,J0.pending_out+p0),$.next_out),$.next_out+=p0,J0.pending_out+=p0,$.total_out+=p0,$.avail_out-=p0,J0.pending-=p0,J0.pending===0&&(J0.pending_out=0))},z0=($,J0)=>{m($,$.block_start>=0?$.block_start:-1,$.strstart-$.block_start,J0),$.block_start=$.strstart,j0($.strm)},V0=($,J0)=>{$.pending_buf[$.pending++]=J0},pe=($,J0)=>{$.pending_buf[$.pending++]=J0>>>8&255,$.pending_buf[$.pending++]=J0&255},q0=($,J0,p0,k0)=>{let m0=$.avail_in;return m0>k0&&(m0=k0),m0===0?0:($.avail_in-=m0,J0.set($.input.subarray($.next_in,$.next_in+m0),p0),$.state.wrap===1?$.adler=v($.adler,J0,m0,p0):$.state.wrap===2&&($.adler=w($.adler,J0,m0,p0)),$.next_in+=m0,$.total_in+=m0,m0)},K0=($,J0)=>{let p0=$.max_chain_length,k0=$.strstart,m0,we,He=$.prev_length,Ue=$.nice_match;const P0=$.strstart>$.w_size-ke?$.strstart-($.w_size-ke):0,ci=$.window,ki=$.w_mask,Qi=$.prev,Fi=$.strstart+ie;let $i=ci[k0+He-1],ae=ci[k0+He];$.prev_length>=$.good_match&&(p0>>=2),Ue>$.lookahead&&(Ue=$.lookahead);do if(m0=J0,!(ci[m0+He]!==ae||ci[m0+He-1]!==$i||ci[m0]!==ci[k0]||ci[++m0]!==ci[k0+1])){k0+=2,m0++;do;while(ci[++k0]===ci[++m0]&&ci[++k0]===ci[++m0]&&ci[++k0]===ci[++m0]&&ci[++k0]===ci[++m0]&&ci[++k0]===ci[++m0]&&ci[++k0]===ci[++m0]&&ci[++k0]===ci[++m0]&&ci[++k0]===ci[++m0]&&k0He){if($.match_start=J0,He=we,we>=Ue)break;$i=ci[k0+He-1],ae=ci[k0+He]}}while((J0=Qi[J0&ki])>P0&&--p0!==0);return He<=$.lookahead?He:$.lookahead},W=$=>{const J0=$.w_size;let p0,k0,m0;do{if(k0=$.window_size-$.lookahead-$.strstart,$.strstart>=J0+(J0-ke)&&($.window.set($.window.subarray(J0,J0+J0-k0),0),$.match_start-=J0,$.strstart-=J0,$.block_start-=J0,$.insert>$.strstart&&($.insert=$.strstart),O0($),k0+=J0),$.strm.avail_in===0)break;if(p0=q0($.strm,$.window,$.strstart+$.lookahead,k0),$.lookahead+=p0,$.lookahead+$.insert>=ee)for(m0=$.strstart-$.insert,$.ins_h=$.window[m0],$.ins_h=E0($,$.ins_h,$.window[m0+1]);$.insert&&($.ins_h=E0($,$.ins_h,$.window[m0+ee-1]),$.prev[m0&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=m0,m0++,$.insert--,!($.lookahead+$.insert{let p0=$.pending_buf_size-5>$.w_size?$.w_size:$.pending_buf_size-5,k0,m0,we,He=0,Ue=$.strm.avail_in;do{if(k0=65535,we=$.bi_valid+42>>3,$.strm.avail_outm0+$.strm.avail_in&&(k0=m0+$.strm.avail_in),k0>we&&(k0=we),k0>8,$.pending_buf[$.pending-2]=~k0,$.pending_buf[$.pending-1]=~k0>>8,j0($.strm),m0&&(m0>k0&&(m0=k0),$.strm.output.set($.window.subarray($.block_start,$.block_start+m0),$.strm.next_out),$.strm.next_out+=m0,$.strm.avail_out-=m0,$.strm.total_out+=m0,$.block_start+=m0,k0-=m0),k0&&(q0($.strm,$.strm.output,$.strm.next_out,k0),$.strm.next_out+=k0,$.strm.avail_out-=k0,$.strm.total_out+=k0)}while(He===0);return Ue-=$.strm.avail_in,Ue&&(Ue>=$.w_size?($.matches=2,$.window.set($.strm.input.subarray($.strm.next_in-$.w_size,$.strm.next_in),0),$.strstart=$.w_size,$.insert=$.strstart):($.window_size-$.strstart<=Ue&&($.strstart-=$.w_size,$.window.set($.window.subarray($.w_size,$.w_size+$.strstart),0),$.matches<2&&$.matches++,$.insert>$.strstart&&($.insert=$.strstart)),$.window.set($.strm.input.subarray($.strm.next_in-Ue,$.strm.next_in),$.strstart),$.strstart+=Ue,$.insert+=Ue>$.w_size-$.insert?$.w_size-$.insert:Ue),$.block_start=$.strstart),$.high_water<$.strstart&&($.high_water=$.strstart),He?se:J0!==R&&J0!==d&&$.strm.avail_in===0&&$.strstart===$.block_start?Z0:(we=$.window_size-$.strstart,$.strm.avail_in>we&&$.block_start>=$.w_size&&($.block_start-=$.w_size,$.strstart-=$.w_size,$.window.set($.window.subarray($.w_size,$.w_size+$.strstart),0),$.matches<2&&$.matches++,we+=$.w_size,$.insert>$.strstart&&($.insert=$.strstart)),we>$.strm.avail_in&&(we=$.strm.avail_in),we&&(q0($.strm,$.window,$.strstart,we),$.strstart+=we,$.insert+=we>$.w_size-$.insert?$.w_size-$.insert:we),$.high_water<$.strstart&&($.high_water=$.strstart),we=$.bi_valid+42>>3,we=$.pending_buf_size-we>65535?65535:$.pending_buf_size-we,p0=we>$.w_size?$.w_size:we,m0=$.strstart-$.block_start,(m0>=p0||(m0||J0===d)&&J0!==R&&$.strm.avail_in===0&&m0<=we)&&(k0=m0>we?we:m0,He=J0===d&&$.strm.avail_in===0&&k0===m0?1:0,u($,$.block_start,k0,He),$.block_start+=k0,j0($.strm)),He?M0:qe)},X0=($,J0)=>{let p0,k0;for(;;){if($.lookahead=ee&&($.ins_h=E0($,$.ins_h,$.window[$.strstart+ee-1]),p0=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart),p0!==0&&$.strstart-p0<=$.w_size-ke&&($.match_length=K0($,p0)),$.match_length>=ee)if(k0=A($,$.strstart-$.match_start,$.match_length-ee),$.lookahead-=$.match_length,$.match_length<=$.max_lazy_match&&$.lookahead>=ee){$.match_length--;do $.strstart++,$.ins_h=E0($,$.ins_h,$.window[$.strstart+ee-1]),p0=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart;while(--$.match_length!==0);$.strstart++}else $.strstart+=$.match_length,$.match_length=0,$.ins_h=$.window[$.strstart],$.ins_h=E0($,$.ins_h,$.window[$.strstart+1]);else k0=A($,0,$.window[$.strstart]),$.lookahead--,$.strstart++;if(k0&&(z0($,!1),$.strm.avail_out===0))return qe}return $.insert=$.strstart{let p0,k0,m0;for(;;){if($.lookahead=ee&&($.ins_h=E0($,$.ins_h,$.window[$.strstart+ee-1]),p0=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart),$.prev_length=$.match_length,$.prev_match=$.match_start,$.match_length=ee-1,p0!==0&&$.prev_length<$.max_lazy_match&&$.strstart-p0<=$.w_size-ke&&($.match_length=K0($,p0),$.match_length<=5&&($.strategy===j||$.match_length===ee&&$.strstart-$.match_start>4096)&&($.match_length=ee-1)),$.prev_length>=ee&&$.match_length<=$.prev_length){m0=$.strstart+$.lookahead-ee,k0=A($,$.strstart-1-$.prev_match,$.prev_length-ee),$.lookahead-=$.prev_length-1,$.prev_length-=2;do++$.strstart<=m0&&($.ins_h=E0($,$.ins_h,$.window[$.strstart+ee-1]),p0=$.prev[$.strstart&$.w_mask]=$.head[$.ins_h],$.head[$.ins_h]=$.strstart);while(--$.prev_length!==0);if($.match_available=0,$.match_length=ee-1,$.strstart++,k0&&(z0($,!1),$.strm.avail_out===0))return qe}else if($.match_available){if(k0=A($,0,$.window[$.strstart-1]),k0&&z0($,!1),$.strstart++,$.lookahead--,$.strm.avail_out===0)return qe}else $.match_available=1,$.strstart++,$.lookahead--}return $.match_available&&(k0=A($,0,$.window[$.strstart-1]),$.match_available=0),$.insert=$.strstart{let p0,k0,m0,we;const He=$.window;for(;;){if($.lookahead<=ie){if(W($),$.lookahead<=ie&&J0===R)return qe;if($.lookahead===0)break}if($.match_length=0,$.lookahead>=ee&&$.strstart>0&&(m0=$.strstart-1,k0=He[m0],k0===He[++m0]&&k0===He[++m0]&&k0===He[++m0])){we=$.strstart+ie;do;while(k0===He[++m0]&&k0===He[++m0]&&k0===He[++m0]&&k0===He[++m0]&&k0===He[++m0]&&k0===He[++m0]&&k0===He[++m0]&&k0===He[++m0]&&m0$.lookahead&&($.match_length=$.lookahead)}if($.match_length>=ee?(p0=A($,1,$.match_length-ee),$.lookahead-=$.match_length,$.strstart+=$.match_length,$.match_length=0):(p0=A($,0,$.window[$.strstart]),$.lookahead--,$.strstart++),p0&&(z0($,!1),$.strm.avail_out===0))return qe}return $.insert=0,J0===d?(z0($,!0),$.strm.avail_out===0?M0:se):$.sym_next&&(z0($,!1),$.strm.avail_out===0)?qe:Z0},ue=($,J0)=>{let p0;for(;;){if($.lookahead===0&&(W($),$.lookahead===0)){if(J0===R)return qe;break}if($.match_length=0,p0=A($,0,$.window[$.strstart]),$.lookahead--,$.strstart++,p0&&(z0($,!1),$.strm.avail_out===0))return qe}return $.insert=0,J0===d?(z0($,!0),$.strm.avail_out===0?M0:se):$.sym_next&&(z0($,!1),$.strm.avail_out===0)?qe:Z0};function D0($,J0,p0,k0,m0){this.good_length=$,this.max_lazy=J0,this.nice_length=p0,this.max_chain=k0,this.func=m0}const b0=[new D0(0,0,0,0,U0),new D0(4,4,8,4,X0),new D0(4,5,16,8,X0),new D0(4,6,32,32,X0),new D0(4,4,16,16,Q0),new D0(8,16,32,32,Q0),new D0(8,16,128,128,Q0),new D0(8,32,128,256,Q0),new D0(32,128,258,1024,Q0),new D0(32,258,258,4096,Q0)],n0=$=>{$.window_size=2*$.w_size,N0($.head),$.max_lazy_match=b0[$.level].max_lazy,$.good_match=b0[$.level].good_length,$.nice_match=b0[$.level].nice_length,$.max_chain_length=b0[$.level].max_chain,$.strstart=0,$.block_start=0,$.lookahead=0,$.insert=0,$.match_length=$.prev_length=ee-1,$.match_available=0,$.ins_h=0};function h0(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Q,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(C0*2),this.dyn_dtree=new Uint16Array((2*g0+1)*2),this.bl_tree=new Uint16Array((2*T0+1)*2),N0(this.dyn_ltree),N0(this.dyn_dtree),N0(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(F0+1),this.heap=new Uint16Array(2*S0+1),N0(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*S0+1),N0(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Fe=$=>{if(!$)return 1;const J0=$.state;return!J0||J0.strm!==$||J0.status!==De&&J0.status!==I0&&J0.status!==Le&&J0.status!==Ge&&J0.status!==ii&&J0.status!==oi&&J0.status!==ei&&J0.status!==Ve?1:0},u0=$=>{if(Fe($))return R0($,q);$.total_in=$.total_out=0,$.data_type=i0;const J0=$.state;return J0.pending=0,J0.pending_out=0,J0.wrap<0&&(J0.wrap=-J0.wrap),J0.status=J0.wrap===2?I0:J0.wrap?De:ei,$.adler=J0.wrap===2?0:1,J0.last_flush=-2,T(J0),e},Me=$=>{const J0=u0($);return J0===e&&n0($.state),J0},L0=($,J0)=>Fe($)||$.state.wrap!==2?q:($.state.gzhead=J0,e),Ye=($,J0,p0,k0,m0,we)=>{if(!$)return q;let He=1;if(J0===H&&(J0=6),k0<0?(He=0,k0=-k0):k0>15&&(He=2,k0-=16),m0<1||m0>f||p0!==Q||k0<8||k0>15||J0<0||J0>9||we<0||we>G||k0===8&&He!==1)return R0($,q);k0===8&&(k0=9);const Ue=new h0;return $.state=Ue,Ue.strm=$,Ue.status=De,Ue.wrap=He,Ue.gzhead=null,Ue.w_bits=k0,Ue.w_size=1<Ye($,J0,Q,o0,l0,J),re=($,J0)=>{if(Fe($)||J0>E||J0<0)return $?R0($,q):q;const p0=$.state;if(!$.output||$.avail_in!==0&&!$.input||p0.status===Ve&&J0!==d)return R0($,$.avail_out===0?e0:q);const k0=p0.last_flush;if(p0.last_flush=J0,p0.pending!==0){if(j0($),$.avail_out===0)return p0.last_flush=-1,e}else if($.avail_in===0&&me(J0)<=me(k0)&&J0!==d)return R0($,e0);if(p0.status===Ve&&$.avail_in!==0)return R0($,e0);if(p0.status===De&&p0.wrap===0&&(p0.status=ei),p0.status===De){let m0=Q+(p0.w_bits-8<<4)<<8,we=-1;if(p0.strategy>=y||p0.level<2?we=0:p0.level<6?we=1:p0.level===6?we=2:we=3,m0|=we<<6,p0.strstart!==0&&(m0|=Ne),m0+=31-m0%31,pe(p0,m0),p0.strstart!==0&&(pe(p0,$.adler>>>16),pe(p0,$.adler&65535)),$.adler=1,p0.status=ei,j0($),p0.pending!==0)return p0.last_flush=-1,e}if(p0.status===I0){if($.adler=0,V0(p0,31),V0(p0,139),V0(p0,8),p0.gzhead)V0(p0,(p0.gzhead.text?1:0)+(p0.gzhead.hcrc?2:0)+(p0.gzhead.extra?4:0)+(p0.gzhead.name?8:0)+(p0.gzhead.comment?16:0)),V0(p0,p0.gzhead.time&255),V0(p0,p0.gzhead.time>>8&255),V0(p0,p0.gzhead.time>>16&255),V0(p0,p0.gzhead.time>>24&255),V0(p0,p0.level===9?2:p0.strategy>=y||p0.level<2?4:0),V0(p0,p0.gzhead.os&255),p0.gzhead.extra&&p0.gzhead.extra.length&&(V0(p0,p0.gzhead.extra.length&255),V0(p0,p0.gzhead.extra.length>>8&255)),p0.gzhead.hcrc&&($.adler=w($.adler,p0.pending_buf,p0.pending,0)),p0.gzindex=0,p0.status=Le;else if(V0(p0,0),V0(p0,0),V0(p0,0),V0(p0,0),V0(p0,0),V0(p0,p0.level===9?2:p0.strategy>=y||p0.level<2?4:0),V0(p0,x0),p0.status=ei,j0($),p0.pending!==0)return p0.last_flush=-1,e}if(p0.status===Le){if(p0.gzhead.extra){let m0=p0.pending,we=(p0.gzhead.extra.length&65535)-p0.gzindex;for(;p0.pending+we>p0.pending_buf_size;){let Ue=p0.pending_buf_size-p0.pending;if(p0.pending_buf.set(p0.gzhead.extra.subarray(p0.gzindex,p0.gzindex+Ue),p0.pending),p0.pending=p0.pending_buf_size,p0.gzhead.hcrc&&p0.pending>m0&&($.adler=w($.adler,p0.pending_buf,p0.pending-m0,m0)),p0.gzindex+=Ue,j0($),p0.pending!==0)return p0.last_flush=-1,e;m0=0,we-=Ue}let He=new Uint8Array(p0.gzhead.extra);p0.pending_buf.set(He.subarray(p0.gzindex,p0.gzindex+we),p0.pending),p0.pending+=we,p0.gzhead.hcrc&&p0.pending>m0&&($.adler=w($.adler,p0.pending_buf,p0.pending-m0,m0)),p0.gzindex=0}p0.status=Ge}if(p0.status===Ge){if(p0.gzhead.name){let m0=p0.pending,we;do{if(p0.pending===p0.pending_buf_size){if(p0.gzhead.hcrc&&p0.pending>m0&&($.adler=w($.adler,p0.pending_buf,p0.pending-m0,m0)),j0($),p0.pending!==0)return p0.last_flush=-1,e;m0=0}p0.gzindexm0&&($.adler=w($.adler,p0.pending_buf,p0.pending-m0,m0)),p0.gzindex=0}p0.status=ii}if(p0.status===ii){if(p0.gzhead.comment){let m0=p0.pending,we;do{if(p0.pending===p0.pending_buf_size){if(p0.gzhead.hcrc&&p0.pending>m0&&($.adler=w($.adler,p0.pending_buf,p0.pending-m0,m0)),j0($),p0.pending!==0)return p0.last_flush=-1,e;m0=0}p0.gzindexm0&&($.adler=w($.adler,p0.pending_buf,p0.pending-m0,m0))}p0.status=oi}if(p0.status===oi){if(p0.gzhead.hcrc){if(p0.pending+2>p0.pending_buf_size&&(j0($),p0.pending!==0))return p0.last_flush=-1,e;V0(p0,$.adler&255),V0(p0,$.adler>>8&255),$.adler=0}if(p0.status=ei,j0($),p0.pending!==0)return p0.last_flush=-1,e}if($.avail_in!==0||p0.lookahead!==0||J0!==R&&p0.status!==Ve){let m0=p0.level===0?U0(p0,J0):p0.strategy===y?ue(p0,J0):p0.strategy===Y?oe(p0,J0):b0[p0.level].func(p0,J0);if((m0===M0||m0===se)&&(p0.status=Ve),m0===qe||m0===M0)return $.avail_out===0&&(p0.last_flush=-1),e;if(m0===Z0&&(J0===L?S(p0):J0!==E&&(u(p0,0,0,!1),J0===P&&(N0(p0.head),p0.lookahead===0&&(p0.strstart=0,p0.block_start=0,p0.insert=0))),j0($),$.avail_out===0))return p0.last_flush=-1,e}return J0!==d?e:p0.wrap<=0?N:(p0.wrap===2?(V0(p0,$.adler&255),V0(p0,$.adler>>8&255),V0(p0,$.adler>>16&255),V0(p0,$.adler>>24&255),V0(p0,$.total_in&255),V0(p0,$.total_in>>8&255),V0(p0,$.total_in>>16&255),V0(p0,$.total_in>>24&255)):(pe(p0,$.adler>>>16),pe(p0,$.adler&65535)),j0($),p0.wrap>0&&(p0.wrap=-p0.wrap),p0.pending!==0?e:N)},Ci=$=>{if(Fe($))return q;const J0=$.state.status;return $.state=null,J0===ei?R0($,z):e},y0=($,J0)=>{let p0=J0.length;if(Fe($))return q;const k0=$.state,m0=k0.wrap;if(m0===2||m0===1&&k0.status!==De||k0.lookahead)return q;if(m0===1&&($.adler=v($.adler,J0,p0,0)),k0.wrap=0,p0>=k0.w_size){m0===0&&(N0(k0.head),k0.strstart=0,k0.block_start=0,k0.insert=0);let P0=new Uint8Array(k0.w_size);P0.set(J0.subarray(p0-k0.w_size,p0),0),J0=P0,p0=k0.w_size}const we=$.avail_in,He=$.next_in,Ue=$.input;for($.avail_in=p0,$.next_in=0,$.input=J0,W(k0);k0.lookahead>=ee;){let P0=k0.strstart,ci=k0.lookahead-(ee-1);do k0.ins_h=E0(k0,k0.ins_h,k0.window[P0+ee-1]),k0.prev[P0&k0.w_mask]=k0.head[k0.ins_h],k0.head[k0.ins_h]=P0,P0++;while(--ci);k0.strstart=P0,k0.lookahead=ee-1,W(k0)}return k0.strstart+=k0.lookahead,k0.block_start=k0.strstart,k0.insert=k0.lookahead,k0.lookahead=0,k0.match_length=k0.prev_length=ee-1,k0.match_available=0,$.next_in=He,$.input=Ue,$.avail_in=we,k0.wrap=m0,e};return deflate.deflateInit=W0,deflate.deflateInit2=Ye,deflate.deflateReset=Me,deflate.deflateResetKeep=u0,deflate.deflateSetHeader=L0,deflate.deflate=re,deflate.deflateEnd=Ci,deflate.deflateSetDictionary=y0,deflate.deflateInfo="pako deflate (from Nodeca project)",deflate}var common={},hasRequiredCommon;function requireCommon(){if(hasRequiredCommon)return common;hasRequiredCommon=1;const T=(u,m)=>Object.prototype.hasOwnProperty.call(u,m);return common.assign=function(u){const m=Array.prototype.slice.call(arguments,1);for(;m.length;){const A=m.shift();if(A){if(typeof A!="object")throw new TypeError(A+"must be non-object");for(const S in A)T(A,S)&&(u[S]=A[S])}}return u},common.flattenChunks=u=>{let m=0;for(let S=0,v=u.length;S=252?6:A>=248?5:A>=240?4:A>=224?3:A>=192?2:1;u[254]=u[254]=1,strings.string2buf=A=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(A);let S,v,w,D,R,L=A.length,P=0;for(D=0;D>>6,S[R++]=128|v&63):v<65536?(S[R++]=224|v>>>12,S[R++]=128|v>>>6&63,S[R++]=128|v&63):(S[R++]=240|v>>>18,S[R++]=128|v>>>12&63,S[R++]=128|v>>>6&63,S[R++]=128|v&63);return S};const m=(A,S)=>{if(S<65534&&A.subarray&&T)return String.fromCharCode.apply(null,A.length===S?A:A.subarray(0,S));let v="";for(let w=0;w{const v=S||A.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(A.subarray(0,S));let w,D;const R=new Array(v*2);for(D=0,w=0;w4){R[D++]=65533,w+=P-1;continue}for(L&=P===2?31:P===3?15:7;P>1&&w1){R[D++]=65533;continue}L<65536?R[D++]=L:(L-=65536,R[D++]=55296|L>>10&1023,R[D++]=56320|L&1023)}return m(R,D)},strings.utf8border=(A,S)=>{S=S||A.length,S>A.length&&(S=A.length);let v=S-1;for(;v>=0&&(A[v]&192)===128;)v--;return v<0||v===0?S:v+u[A[v]]>S?v:S},strings}var zstream,hasRequiredZstream;function requireZstream(){if(hasRequiredZstream)return zstream;hasRequiredZstream=1;function T(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}return zstream=T,zstream}var hasRequiredDeflate;function requireDeflate(){if(hasRequiredDeflate)return deflate$1;hasRequiredDeflate=1;const T=requireDeflate$1(),u=requireCommon(),m=requireStrings(),A=requireMessages(),S=requireZstream(),v=Object.prototype.toString,{Z_NO_FLUSH:w,Z_SYNC_FLUSH:D,Z_FULL_FLUSH:R,Z_FINISH:L,Z_OK:P,Z_STREAM_END:d,Z_DEFAULT_COMPRESSION:E,Z_DEFAULT_STRATEGY:e,Z_DEFLATED:N}=requireConstants();function q(j){this.options=u.assign({level:E,method:N,chunkSize:16384,windowBits:15,memLevel:8,strategy:e},j||{});let y=this.options;y.raw&&y.windowBits>0?y.windowBits=-y.windowBits:y.gzip&&y.windowBits>0&&y.windowBits<16&&(y.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new S,this.strm.avail_out=0;let Y=T.deflateInit2(this.strm,y.level,y.method,y.windowBits,y.memLevel,y.strategy);if(Y!==P)throw new Error(A[Y]);if(y.header&&T.deflateSetHeader(this.strm,y.header),y.dictionary){let G;if(typeof y.dictionary=="string"?G=m.string2buf(y.dictionary):v.call(y.dictionary)==="[object ArrayBuffer]"?G=new Uint8Array(y.dictionary):G=y.dictionary,Y=T.deflateSetDictionary(this.strm,G),Y!==P)throw new Error(A[Y]);this._dict_set=!0}}q.prototype.push=function(j,y){const Y=this.strm,G=this.options.chunkSize;let J,i0;if(this.ended)return!1;for(y===~~y?i0=y:i0=y===!0?L:w,typeof j=="string"?Y.input=m.string2buf(j):v.call(j)==="[object ArrayBuffer]"?Y.input=new Uint8Array(j):Y.input=j,Y.next_in=0,Y.avail_in=Y.input.length;;){if(Y.avail_out===0&&(Y.output=new Uint8Array(G),Y.next_out=0,Y.avail_out=G),(i0===D||i0===R)&&Y.avail_out<=6){this.onData(Y.output.subarray(0,Y.next_out)),Y.avail_out=0;continue}if(J=T.deflate(Y,i0),J===d)return Y.next_out>0&&this.onData(Y.output.subarray(0,Y.next_out)),J=T.deflateEnd(this.strm),this.onEnd(J),this.ended=!0,J===P;if(Y.avail_out===0){this.onData(Y.output);continue}if(i0>0&&Y.next_out>0){this.onData(Y.output.subarray(0,Y.next_out)),Y.avail_out=0;continue}if(Y.avail_in===0)break}return!0},q.prototype.onData=function(j){this.chunks.push(j)},q.prototype.onEnd=function(j){j===P&&(this.result=u.flattenChunks(this.chunks)),this.chunks=[],this.err=j,this.msg=this.strm.msg};function z(j,y){const Y=new q(y);if(Y.push(j,!0),Y.err)throw Y.msg||A[Y.err];return Y.result}function e0(j,y){return y=y||{},y.raw=!0,z(j,y)}function H(j,y){return y=y||{},y.gzip=!0,z(j,y)}return deflate$1.Deflate=q,deflate$1.deflate=z,deflate$1.deflateRaw=e0,deflate$1.gzip=H,deflate$1.constants=requireConstants(),deflate$1}var inflate$1={},inflate={},inffast,hasRequiredInffast;function requireInffast(){if(hasRequiredInffast)return inffast;hasRequiredInffast=1;const T=16209,u=16191;return inffast=function(A,S){let v,w,D,R,L,P,d,E,e,N,q,z,e0,H,j,y,Y,G,J,i0,Q,f,o0,l0;const c0=A.state;v=A.next_in,o0=A.input,w=v+(A.avail_in-5),D=A.next_out,l0=A.output,R=D-(S-A.avail_out),L=D+(A.avail_out-257),P=c0.dmax,d=c0.wsize,E=c0.whave,e=c0.wnext,N=c0.window,q=c0.hold,z=c0.bits,e0=c0.lencode,H=c0.distcode,j=(1<>>24,q>>>=G,z-=G,G=Y>>>16&255,G===0)l0[D++]=Y&65535;else if(G&16){J=Y&65535,G&=15,G&&(z>>=G,z-=G),z<15&&(q+=o0[v++]<>>24,q>>>=G,z-=G,G=Y>>>16&255,G&16){if(i0=Y&65535,G&=15,zP){A.msg="invalid distance too far back",c0.mode=T;break e}if(q>>>=G,z-=G,G=D-R,i0>G){if(G=i0-G,G>E&&c0.sane){A.msg="invalid distance too far back",c0.mode=T;break e}if(Q=0,f=N,e===0){if(Q+=d-G,G2;)l0[D++]=f[Q++],l0[D++]=f[Q++],l0[D++]=f[Q++],J-=3;J&&(l0[D++]=f[Q++],J>1&&(l0[D++]=f[Q++]))}else{Q=D-i0;do l0[D++]=l0[Q++],l0[D++]=l0[Q++],l0[D++]=l0[Q++],J-=3;while(J>2);J&&(l0[D++]=l0[Q++],J>1&&(l0[D++]=l0[Q++]))}}else if(G&64){A.msg="invalid distance code",c0.mode=T;break e}else{Y=H[(Y&65535)+(q&(1<>3,v-=J,z-=J<<3,q&=(1<{const j=H.bits;let y=0,Y=0,G=0,J=0,i0=0,Q=0,f=0,o0=0,l0=0,c0=0,d0,S0,g0,T0,C0,F0=null,ee;const ie=new Uint16Array(T+1),ke=new Uint16Array(T+1);let Ne=null,De,I0,Le;for(y=0;y<=T;y++)ie[y]=0;for(Y=0;Y=1&&ie[J]===0;J--);if(i0>J&&(i0=J),J===0)return q[z++]=1<<24|64<<16|0,q[z++]=1<<24|64<<16|0,H.bits=1,0;for(G=1;G0&&(d===A||J!==1))return-1;for(ke[1]=0,y=1;yu||d===v&&l0>m)return 1;for(;;){De=y-f,e0[Y]+1=ee?(I0=Ne[e0[Y]-ee],Le=F0[e0[Y]-ee]):(I0=96,Le=0),d0=1<>f)+S0]=De<<24|I0<<16|Le|0;while(S0!==0);for(d0=1<>=1;if(d0!==0?(c0&=d0-1,c0+=d0):c0=0,Y++,--ie[y]===0){if(y===J)break;y=E[e+e0[Y]]}if(y>i0&&(c0&T0)!==g0){for(f===0&&(f=i0),C0+=G,Q=y-f,o0=1<u||d===v&&l0>m)return 1;g0=c0&T0,q[g0]=i0<<24|Q<<16|C0-z|0}}return c0!==0&&(q[C0+c0]=y-f<<24|64<<16|0),H.bits=i0,0},inftrees}var hasRequiredInflate$1;function requireInflate$1(){if(hasRequiredInflate$1)return inflate;hasRequiredInflate$1=1;const T=requireAdler32(),u=requireCrc32(),m=requireInffast(),A=requireInftrees(),S=0,v=1,w=2,{Z_FINISH:D,Z_BLOCK:R,Z_TREES:L,Z_OK:P,Z_STREAM_END:d,Z_NEED_DICT:E,Z_STREAM_ERROR:e,Z_DATA_ERROR:N,Z_MEM_ERROR:q,Z_BUF_ERROR:z,Z_DEFLATED:e0}=requireConstants(),H=16180,j=16181,y=16182,Y=16183,G=16184,J=16185,i0=16186,Q=16187,f=16188,o0=16189,l0=16190,c0=16191,d0=16192,S0=16193,g0=16194,T0=16195,C0=16196,F0=16197,ee=16198,ie=16199,ke=16200,Ne=16201,De=16202,I0=16203,Le=16204,Ge=16205,ii=16206,oi=16207,ei=16208,Ve=16209,qe=16210,Z0=16211,M0=852,se=592,R0=15,me=D0=>(D0>>>24&255)+(D0>>>8&65280)+((D0&65280)<<8)+((D0&255)<<24);function N0(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const O0=D0=>{if(!D0)return 1;const b0=D0.state;return!b0||b0.strm!==D0||b0.modeZ0?1:0},B0=D0=>{if(O0(D0))return e;const b0=D0.state;return D0.total_in=D0.total_out=b0.total=0,D0.msg="",b0.wrap&&(D0.adler=b0.wrap&1),b0.mode=H,b0.last=0,b0.havedict=0,b0.flags=-1,b0.dmax=32768,b0.head=null,b0.hold=0,b0.bits=0,b0.lencode=b0.lendyn=new Int32Array(M0),b0.distcode=b0.distdyn=new Int32Array(se),b0.sane=1,b0.back=-1,P},E0=D0=>{if(O0(D0))return e;const b0=D0.state;return b0.wsize=0,b0.whave=0,b0.wnext=0,B0(D0)},j0=(D0,b0)=>{let n0;if(O0(D0))return e;const h0=D0.state;return b0<0?(n0=0,b0=-b0):(n0=(b0>>4)+5,b0<48&&(b0&=15)),b0&&(b0<8||b0>15)?e:(h0.window!==null&&h0.wbits!==b0&&(h0.window=null),h0.wrap=n0,h0.wbits=b0,E0(D0))},z0=(D0,b0)=>{if(!D0)return e;const n0=new N0;D0.state=n0,n0.strm=D0,n0.window=null,n0.mode=H;const h0=j0(D0,b0);return h0!==P&&(D0.state=null),h0},V0=D0=>z0(D0,R0);let pe=!0,q0,K0;const W=D0=>{if(pe){q0=new Int32Array(512),K0=new Int32Array(32);let b0=0;for(;b0<144;)D0.lens[b0++]=8;for(;b0<256;)D0.lens[b0++]=9;for(;b0<280;)D0.lens[b0++]=7;for(;b0<288;)D0.lens[b0++]=8;for(A(v,D0.lens,0,288,q0,0,D0.work,{bits:9}),b0=0;b0<32;)D0.lens[b0++]=5;A(w,D0.lens,0,32,K0,0,D0.work,{bits:5}),pe=!1}D0.lencode=q0,D0.lenbits=9,D0.distcode=K0,D0.distbits=5},U0=(D0,b0,n0,h0)=>{let Fe;const u0=D0.state;return u0.window===null&&(u0.wsize=1<=u0.wsize?(u0.window.set(b0.subarray(n0-u0.wsize,n0),0),u0.wnext=0,u0.whave=u0.wsize):(Fe=u0.wsize-u0.wnext,Fe>h0&&(Fe=h0),u0.window.set(b0.subarray(n0-h0,n0-h0+Fe),u0.wnext),h0-=Fe,h0?(u0.window.set(b0.subarray(n0-h0,n0),0),u0.wnext=h0,u0.whave=u0.wsize):(u0.wnext+=Fe,u0.wnext===u0.wsize&&(u0.wnext=0),u0.whave{let n0,h0,Fe,u0,Me,L0,Ye,W0,re,Ci,y0,$,J0,p0,k0=0,m0,we,He,Ue,P0,ci,ki,Qi;const Fi=new Uint8Array(4);let $i,ae;const Ae=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(O0(D0)||!D0.output||!D0.input&&D0.avail_in!==0)return e;n0=D0.state,n0.mode===c0&&(n0.mode=d0),Me=D0.next_out,Fe=D0.output,Ye=D0.avail_out,u0=D0.next_in,h0=D0.input,L0=D0.avail_in,W0=n0.hold,re=n0.bits,Ci=L0,y0=Ye,Qi=P;e:for(;;)switch(n0.mode){case H:if(n0.wrap===0){n0.mode=d0;break}for(;re<16;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>8&255,n0.check=u(n0.check,Fi,2,0),W0=0,re=0,n0.mode=j;break}if(n0.head&&(n0.head.done=!1),!(n0.wrap&1)||(((W0&255)<<8)+(W0>>8))%31){D0.msg="incorrect header check",n0.mode=Ve;break}if((W0&15)!==e0){D0.msg="unknown compression method",n0.mode=Ve;break}if(W0>>>=4,re-=4,ki=(W0&15)+8,n0.wbits===0&&(n0.wbits=ki),ki>15||ki>n0.wbits){D0.msg="invalid window size",n0.mode=Ve;break}n0.dmax=1<>8&1),n0.flags&512&&n0.wrap&4&&(Fi[0]=W0&255,Fi[1]=W0>>>8&255,n0.check=u(n0.check,Fi,2,0)),W0=0,re=0,n0.mode=y;case y:for(;re<32;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>8&255,Fi[2]=W0>>>16&255,Fi[3]=W0>>>24&255,n0.check=u(n0.check,Fi,4,0)),W0=0,re=0,n0.mode=Y;case Y:for(;re<16;){if(L0===0)break e;L0--,W0+=h0[u0++]<>8),n0.flags&512&&n0.wrap&4&&(Fi[0]=W0&255,Fi[1]=W0>>>8&255,n0.check=u(n0.check,Fi,2,0)),W0=0,re=0,n0.mode=G;case G:if(n0.flags&1024){for(;re<16;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>8&255,n0.check=u(n0.check,Fi,2,0)),W0=0,re=0}else n0.head&&(n0.head.extra=null);n0.mode=J;case J:if(n0.flags&1024&&($=n0.length,$>L0&&($=L0),$&&(n0.head&&(ki=n0.head.extra_len-n0.length,n0.head.extra||(n0.head.extra=new Uint8Array(n0.head.extra_len)),n0.head.extra.set(h0.subarray(u0,u0+$),ki)),n0.flags&512&&n0.wrap&4&&(n0.check=u(n0.check,h0,$,u0)),L0-=$,u0+=$,n0.length-=$),n0.length))break e;n0.length=0,n0.mode=i0;case i0:if(n0.flags&2048){if(L0===0)break e;$=0;do ki=h0[u0+$++],n0.head&&ki&&n0.length<65536&&(n0.head.name+=String.fromCharCode(ki));while(ki&&$>9&1,n0.head.done=!0),D0.adler=n0.check=0,n0.mode=c0;break;case o0:for(;re<32;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=re&7,re-=re&7,n0.mode=ii;break}for(;re<3;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=1,re-=1,W0&3){case 0:n0.mode=S0;break;case 1:if(W(n0),n0.mode=ie,b0===L){W0>>>=2,re-=2;break e}break;case 2:n0.mode=C0;break;case 3:D0.msg="invalid block type",n0.mode=Ve}W0>>>=2,re-=2;break;case S0:for(W0>>>=re&7,re-=re&7;re<32;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>16^65535)){D0.msg="invalid stored block lengths",n0.mode=Ve;break}if(n0.length=W0&65535,W0=0,re=0,n0.mode=g0,b0===L)break e;case g0:n0.mode=T0;case T0:if($=n0.length,$){if($>L0&&($=L0),$>Ye&&($=Ye),$===0)break e;Fe.set(h0.subarray(u0,u0+$),Me),L0-=$,u0+=$,Ye-=$,Me+=$,n0.length-=$;break}n0.mode=c0;break;case C0:for(;re<14;){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=5,re-=5,n0.ndist=(W0&31)+1,W0>>>=5,re-=5,n0.ncode=(W0&15)+4,W0>>>=4,re-=4,n0.nlen>286||n0.ndist>30){D0.msg="too many length or distance symbols",n0.mode=Ve;break}n0.have=0,n0.mode=F0;case F0:for(;n0.have>>=3,re-=3}for(;n0.have<19;)n0.lens[Ae[n0.have++]]=0;if(n0.lencode=n0.lendyn,n0.lenbits=7,$i={bits:n0.lenbits},Qi=A(S,n0.lens,0,19,n0.lencode,0,n0.work,$i),n0.lenbits=$i.bits,Qi){D0.msg="invalid code lengths set",n0.mode=Ve;break}n0.have=0,n0.mode=ee;case ee:for(;n0.have>>24,we=k0>>>16&255,He=k0&65535,!(m0<=re);){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=m0,re-=m0,n0.lens[n0.have++]=He;else{if(He===16){for(ae=m0+2;re>>=m0,re-=m0,n0.have===0){D0.msg="invalid bit length repeat",n0.mode=Ve;break}ki=n0.lens[n0.have-1],$=3+(W0&3),W0>>>=2,re-=2}else if(He===17){for(ae=m0+3;re>>=m0,re-=m0,ki=0,$=3+(W0&7),W0>>>=3,re-=3}else{for(ae=m0+7;re>>=m0,re-=m0,ki=0,$=11+(W0&127),W0>>>=7,re-=7}if(n0.have+$>n0.nlen+n0.ndist){D0.msg="invalid bit length repeat",n0.mode=Ve;break}for(;$--;)n0.lens[n0.have++]=ki}}if(n0.mode===Ve)break;if(n0.lens[256]===0){D0.msg="invalid code -- missing end-of-block",n0.mode=Ve;break}if(n0.lenbits=9,$i={bits:n0.lenbits},Qi=A(v,n0.lens,0,n0.nlen,n0.lencode,0,n0.work,$i),n0.lenbits=$i.bits,Qi){D0.msg="invalid literal/lengths set",n0.mode=Ve;break}if(n0.distbits=6,n0.distcode=n0.distdyn,$i={bits:n0.distbits},Qi=A(w,n0.lens,n0.nlen,n0.ndist,n0.distcode,0,n0.work,$i),n0.distbits=$i.bits,Qi){D0.msg="invalid distances set",n0.mode=Ve;break}if(n0.mode=ie,b0===L)break e;case ie:n0.mode=ke;case ke:if(L0>=6&&Ye>=258){D0.next_out=Me,D0.avail_out=Ye,D0.next_in=u0,D0.avail_in=L0,n0.hold=W0,n0.bits=re,m(D0,y0),Me=D0.next_out,Fe=D0.output,Ye=D0.avail_out,u0=D0.next_in,h0=D0.input,L0=D0.avail_in,W0=n0.hold,re=n0.bits,n0.mode===c0&&(n0.back=-1);break}for(n0.back=0;k0=n0.lencode[W0&(1<>>24,we=k0>>>16&255,He=k0&65535,!(m0<=re);){if(L0===0)break e;L0--,W0+=h0[u0++]<>Ue)],m0=k0>>>24,we=k0>>>16&255,He=k0&65535,!(Ue+m0<=re);){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=Ue,re-=Ue,n0.back+=Ue}if(W0>>>=m0,re-=m0,n0.back+=m0,n0.length=He,we===0){n0.mode=Ge;break}if(we&32){n0.back=-1,n0.mode=c0;break}if(we&64){D0.msg="invalid literal/length code",n0.mode=Ve;break}n0.extra=we&15,n0.mode=Ne;case Ne:if(n0.extra){for(ae=n0.extra;re>>=n0.extra,re-=n0.extra,n0.back+=n0.extra}n0.was=n0.length,n0.mode=De;case De:for(;k0=n0.distcode[W0&(1<>>24,we=k0>>>16&255,He=k0&65535,!(m0<=re);){if(L0===0)break e;L0--,W0+=h0[u0++]<>Ue)],m0=k0>>>24,we=k0>>>16&255,He=k0&65535,!(Ue+m0<=re);){if(L0===0)break e;L0--,W0+=h0[u0++]<>>=Ue,re-=Ue,n0.back+=Ue}if(W0>>>=m0,re-=m0,n0.back+=m0,we&64){D0.msg="invalid distance code",n0.mode=Ve;break}n0.offset=He,n0.extra=we&15,n0.mode=I0;case I0:if(n0.extra){for(ae=n0.extra;re>>=n0.extra,re-=n0.extra,n0.back+=n0.extra}if(n0.offset>n0.dmax){D0.msg="invalid distance too far back",n0.mode=Ve;break}n0.mode=Le;case Le:if(Ye===0)break e;if($=y0-Ye,n0.offset>$){if($=n0.offset-$,$>n0.whave&&n0.sane){D0.msg="invalid distance too far back",n0.mode=Ve;break}$>n0.wnext?($-=n0.wnext,J0=n0.wsize-$):J0=n0.wnext-$,$>n0.length&&($=n0.length),p0=n0.window}else p0=Fe,J0=Me-n0.offset,$=n0.length;$>Ye&&($=Ye),Ye-=$,n0.length-=$;do Fe[Me++]=p0[J0++];while(--$);n0.length===0&&(n0.mode=ke);break;case Ge:if(Ye===0)break e;Fe[Me++]=n0.length,Ye--,n0.mode=ke;break;case ii:if(n0.wrap){for(;re<32;){if(L0===0)break e;L0--,W0|=h0[u0++]<{if(O0(D0))return e;let b0=D0.state;return b0.window&&(b0.window=null),D0.state=null,P},oe=(D0,b0)=>{if(O0(D0))return e;const n0=D0.state;return n0.wrap&2?(n0.head=b0,b0.done=!1,P):e},ue=(D0,b0)=>{const n0=b0.length;let h0,Fe,u0;return O0(D0)||(h0=D0.state,h0.wrap!==0&&h0.mode!==l0)?e:h0.mode===l0&&(Fe=1,Fe=T(Fe,b0,n0,0),Fe!==h0.check)?N:(u0=U0(D0,b0,n0,n0),u0?(h0.mode=qe,q):(h0.havedict=1,P))};return inflate.inflateReset=E0,inflate.inflateReset2=j0,inflate.inflateResetKeep=B0,inflate.inflateInit=V0,inflate.inflateInit2=z0,inflate.inflate=X0,inflate.inflateEnd=Q0,inflate.inflateGetHeader=oe,inflate.inflateSetDictionary=ue,inflate.inflateInfo="pako inflate (from Nodeca project)",inflate}var gzheader,hasRequiredGzheader;function requireGzheader(){if(hasRequiredGzheader)return gzheader;hasRequiredGzheader=1;function T(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}return gzheader=T,gzheader}var hasRequiredInflate;function requireInflate(){if(hasRequiredInflate)return inflate$1;hasRequiredInflate=1;const T=requireInflate$1(),u=requireCommon(),m=requireStrings(),A=requireMessages(),S=requireZstream(),v=requireGzheader(),w=Object.prototype.toString,{Z_NO_FLUSH:D,Z_FINISH:R,Z_OK:L,Z_STREAM_END:P,Z_NEED_DICT:d,Z_STREAM_ERROR:E,Z_DATA_ERROR:e,Z_MEM_ERROR:N}=requireConstants();function q(H){this.options=u.assign({chunkSize:1024*64,windowBits:15,to:""},H||{});const j=this.options;j.raw&&j.windowBits>=0&&j.windowBits<16&&(j.windowBits=-j.windowBits,j.windowBits===0&&(j.windowBits=-15)),j.windowBits>=0&&j.windowBits<16&&!(H&&H.windowBits)&&(j.windowBits+=32),j.windowBits>15&&j.windowBits<48&&(j.windowBits&15||(j.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new S,this.strm.avail_out=0;let y=T.inflateInit2(this.strm,j.windowBits);if(y!==L)throw new Error(A[y]);if(this.header=new v,T.inflateGetHeader(this.strm,this.header),j.dictionary&&(typeof j.dictionary=="string"?j.dictionary=m.string2buf(j.dictionary):w.call(j.dictionary)==="[object ArrayBuffer]"&&(j.dictionary=new Uint8Array(j.dictionary)),j.raw&&(y=T.inflateSetDictionary(this.strm,j.dictionary),y!==L)))throw new Error(A[y])}q.prototype.push=function(H,j){const y=this.strm,Y=this.options.chunkSize,G=this.options.dictionary;let J,i0,Q;if(this.ended)return!1;for(j===~~j?i0=j:i0=j===!0?R:D,w.call(H)==="[object ArrayBuffer]"?y.input=new Uint8Array(H):y.input=H,y.next_in=0,y.avail_in=y.input.length;;){for(y.avail_out===0&&(y.output=new Uint8Array(Y),y.next_out=0,y.avail_out=Y),J=T.inflate(y,i0),J===d&&G&&(J=T.inflateSetDictionary(y,G),J===L?J=T.inflate(y,i0):J===e&&(J=d));y.avail_in>0&&J===P&&y.state.wrap>0&&H[y.next_in]!==0;)T.inflateReset(y),J=T.inflate(y,i0);switch(J){case E:case e:case d:case N:return this.onEnd(J),this.ended=!0,!1}if(Q=y.avail_out,y.next_out&&(y.avail_out===0||J===P))if(this.options.to==="string"){let f=m.utf8border(y.output,y.next_out),o0=y.next_out-f,l0=m.buf2string(y.output,f);y.next_out=o0,y.avail_out=Y-o0,o0&&y.output.set(y.output.subarray(f,f+o0),0),this.onData(l0)}else this.onData(y.output.length===y.next_out?y.output:y.output.subarray(0,y.next_out));if(!(J===L&&Q===0)){if(J===P)return J=T.inflateEnd(this.strm),this.onEnd(J),this.ended=!0,!0;if(y.avail_in===0)break}}return!0},q.prototype.onData=function(H){this.chunks.push(H)},q.prototype.onEnd=function(H){H===L&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=u.flattenChunks(this.chunks)),this.chunks=[],this.err=H,this.msg=this.strm.msg};function z(H,j){const y=new q(j);if(y.push(H),y.err)throw y.msg||A[y.err];return y.result}function e0(H,j){return j=j||{},j.raw=!0,z(H,j)}return inflate$1.Inflate=q,inflate$1.inflate=z,inflate$1.inflateRaw=e0,inflate$1.ungzip=z,inflate$1.constants=requireConstants(),inflate$1}var hasRequiredPako;function requirePako(){if(hasRequiredPako)return pako;hasRequiredPako=1;const{Deflate:T,deflate:u,deflateRaw:m,gzip:A}=requireDeflate(),{Inflate:S,inflate:v,inflateRaw:w,ungzip:D}=requireInflate(),R=requireConstants();return pako.Deflate=T,pako.deflate=u,pako.deflateRaw=m,pako.gzip=A,pako.Inflate=S,pako.inflate=v,pako.inflateRaw=w,pako.ungzip=D,pako.constants=R,pako}var hasRequiredParser;function requireParser(){return hasRequiredParser||(hasRequiredParser=1,function(T){var u=u||{};u.Tag=u.Tag||(typeof commonjsRequire<"u"?requireTag():null),u.Utils=u.Utils||(typeof commonjsRequire<"u"?requireUtilities():null),u.Dictionary=u.Dictionary||(typeof commonjsRequire<"u"?requireDictionary():null),u.Image=u.Image||(typeof commonjsRequire<"u"?requireImage():null);var m=m||(typeof commonjsRequire<"u"?requirePako():null);u.Parser=u.Parser||function(){this.littleEndian=!0,this.explicit=!0,this.metaFound=!1,this.metaFinished=!1,this.metaFinishedOffset=-1,this.needsDeflate=!1,this.inflated=null,this.encapsulation=!1,this.level=0,this.error=null},u.Parser.verbose=!1,u.Parser.MAGIC_COOKIE_OFFSET=128,u.Parser.MAGIC_COOKIE=[68,73,67,77],u.Parser.VRS=["AE","AS","AT","CS","DA","DS","DT","FL","FD","IS","LO","LT","OB","OD","OF","OW","PN","SH","SL","SS","ST","TM","UI","UL","UN","US","UT","UC"],u.Parser.DATA_VRS=["OB","OW","OF","SQ","UT","UN","UC"],u.Parser.RAW_DATA_VRS=["OB","OD","OF","OW","UN"],u.Parser.TRANSFER_SYNTAX_IMPLICIT_LITTLE="1.2.840.10008.1.2",u.Parser.TRANSFER_SYNTAX_EXPLICIT_LITTLE="1.2.840.10008.1.2.1",u.Parser.TRANSFER_SYNTAX_EXPLICIT_BIG="1.2.840.10008.1.2.2",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG="1.2.840.10008.1.2.4",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LOSSLESS="1.2.840.10008.1.2.4.57",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LOSSLESS_SEL1="1.2.840.10008.1.2.4.70",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_BASELINE_8BIT="1.2.840.10008.1.2.4.50",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_BASELINE_12BIT="1.2.840.10008.1.2.4.51",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LS_LOSSLESS="1.2.840.10008.1.2.4.80",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_LS="1.2.840.10008.1.2.4.81",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_2000_LOSSLESS="1.2.840.10008.1.2.4.90",u.Parser.TRANSFER_SYNTAX_COMPRESSION_JPEG_2000="1.2.840.10008.1.2.4.91",u.Parser.TRANSFER_SYNTAX_COMPRESSION_RLE="1.2.840.10008.1.2.5",u.Parser.TRANSFER_SYNTAX_COMPRESSION_DEFLATE="1.2.840.10008.1.2.1.99",u.Parser.UNDEFINED_LENGTH=4294967295,u.Parser.isMagicCookieFound=function(A){var S=u.Parser.MAGIC_COOKIE_OFFSET,v=u.Parser.MAGIC_COOKIE.length,w;for(w=0;w=this.metaFinishedOffset&&(this.needsDeflate=!1,D=A.buffer.slice(0,w.offsetEnd),R=A.buffer.slice(w.offsetEnd),this.inflated=u.Utils.concatArrayBuffers(D,m.inflateRaw(R)),A=new DataView(this.inflated)),w=this.getNextTag(A,w.offsetEnd)}catch(L){this.error=L}return S!==null&&(S.littleEndian=this.littleEndian),S},u.Parser.prototype.parseEncapsulated=function(A){var S=0,v,w=[];this.encapsulation=!0;try{for(v=this.getNextTag(A,S);v!==null;)v.isSublistItem()&&w.push(v),u.Parser.verbose&&console.log(v.toString()),v=this.getNextTag(A,v.offsetEnd)}catch(D){this.error=D}return w},u.Parser.prototype.testForValidTag=function(A){var S,v=null;try{S=this.findFirstTagOffset(A),v=this.getNextTag(A,S,!1)}catch(w){this.error=w}return v},u.Parser.prototype.getNextTag=function(A,S,v){var w=0,D,R=null,L=S,P,d=0,E=!0,e=null,N;if(S>=A.byteLength)return null;this.metaFinished?(E=this.littleEndian,w=A.getUint16(S,E)):(w=A.getUint16(S,!0),this.metaFinishedOffset!==-1&&S>=this.metaFinishedOffset||w!==2?(this.metaFinished=!0,E=this.littleEndian,w=A.getUint16(S,E)):E=!0),!this.metaFound&&w===2&&(this.metaFound=!0),S+=2,D=A.getUint16(S,E),S+=2,this.explicit||!this.metaFinished?(e=u.Utils.getStringAt(A,S,2),!this.metaFound&&this.metaFinished&&u.Parser.VRS.indexOf(e)===-1?(e=u.Dictionary.getVR(w,D),d=A.getUint32(S,E),S+=4,this.explicit=!1):(S+=2,u.Parser.DATA_VRS.indexOf(e)!==-1?(S+=2,d=A.getUint32(S,E),S+=4):(d=A.getUint16(S,E),S+=2))):(e=u.Dictionary.getVR(w,D),d=A.getUint32(S,E),d===u.Parser.UNDEFINED_LENGTH&&(e="SQ"),S+=4),P=S;var q=w===u.Tag.TAG_PIXEL_DATA[0]&&D===u.Tag.TAG_PIXEL_DATA[1],z=w===40&&D>=4609&&D<4864;if(e==="SQ"||!z&&!q&&!this.encapsulation&&u.Parser.DATA_VRS.indexOf(e)!==-1&&e!=="UC"?(R=this.parseSublist(A,S,d,e!=="SQ"),d===u.Parser.UNDEFINED_LENGTH&&(d=R[R.length-1].offsetEnd-S)):d>0&&!v&&(d===u.Parser.UNDEFINED_LENGTH&&q&&(d=A.byteLength-S),R=A.buffer.slice(S,S+d)),S+=d,N=new u.Tag(w,D,e,R,L,P,S,this.littleEndian,this.charset),N.value){if(N.isTransformSyntax())this.transformSyntaxAlreadyExist=!0,N.value[0]===u.Parser.TRANSFER_SYNTAX_IMPLICIT_LITTLE?(this.explicit=!1,this.littleEndian=!0):N.value[0]===u.Parser.TRANSFER_SYNTAX_EXPLICIT_BIG?(this.explicit=!0,this.littleEndian=!1):N.value[0]===u.Parser.TRANSFER_SYNTAX_COMPRESSION_DEFLATE?(this.needsDeflate=!0,this.explicit=!0,this.littleEndian=!0):(this.explicit=!0,this.littleEndian=!0);else if(N.isMetaLength())this.metaFinishedOffset=N.value[0]+S;else if(N.isCharset()){var e0=N.value;e0.length==2?e0=(e0[0]||"ISO 2022 IR 6")+"\\"+e0[1]:e0.length==1&&(e0=e0[0]),this.charset=e0}}return N},u.Parser.prototype.parseSublist=function(A,S,v,w){var D,R=S+v,L=[];if(this.level++,v===u.Parser.UNDEFINED_LENGTH){for(D=this.parseSublistItem(A,S,w);!D.isSequenceDelim();)L.push(D),S=D.offsetEnd,D=this.parseSublistItem(A,S,w);L.push(D)}else for(;Su.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&e>N&&e>q?L=P:N>u.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&N>e&&N>q?L=d:q>u.Image.OBLIQUITY_THRESHOLD_COSINE_VALUE&&q>e&&q>N?L=E:L=null,L},u.Image.prototype.getCols=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_COLS[0],u.Tag.TAG_COLS[1]),0)},u.Image.prototype.getRows=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_ROWS[0],u.Tag.TAG_ROWS[1]),0)},u.Image.prototype.getSeriesDescription=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SERIES_DESCRIPTION[0],u.Tag.TAG_SERIES_DESCRIPTION[1]),0)},u.Image.prototype.getSeriesInstanceUID=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SERIES_INSTANCE_UID[0],u.Tag.TAG_SERIES_INSTANCE_UID[1]),0)},u.Image.prototype.getSeriesNumber=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SERIES_NUMBER[0],u.Tag.TAG_SERIES_NUMBER[1]),0)},u.Image.prototype.getEchoNumber=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_ECHO_NUMBER[0],u.Tag.TAG_ECHO_NUMBER[1]),0)},u.Image.prototype.getImagePosition=function(){return u.Image.getValueSafely(this.getTag(u.Tag.TAG_IMAGE_POSITION[0],u.Tag.TAG_IMAGE_POSITION[1]))},u.Image.prototype.getImageDirections=function(){return u.Image.getValueSafely(this.getTag(u.Tag.TAG_IMAGE_ORIENTATION[0],u.Tag.TAG_IMAGE_ORIENTATION[1]))},u.Image.prototype.getImagePositionSliceDir=function(w){var D=u.Image.getValueSafely(this.getTag(u.Tag.TAG_IMAGE_POSITION[0],u.Tag.TAG_IMAGE_POSITION[1]));return D&&w>=0?D[w]:0},u.Image.prototype.getModality=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_MODALITY[0],u.Tag.TAG_MODALITY[1]),0)},u.Image.prototype.getSliceLocation=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SLICE_LOCATION[0],u.Tag.TAG_SLICE_LOCATION[1]),0)},u.Image.prototype.getSliceLocationVector=function(){return u.Image.getValueSafely(this.getTag(u.Tag.TAG_SLICE_LOCATION_VECTOR[0],u.Tag.TAG_SLICE_LOCATION_VECTOR[1]))},u.Image.prototype.getImageNumber=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_IMAGE_NUM[0],u.Tag.TAG_IMAGE_NUM[1]),0)},u.Image.prototype.getTemporalPosition=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_TEMPORAL_POSITION[0],u.Tag.TAG_TEMPORAL_POSITION[1]),0)},u.Image.prototype.getTemporalNumber=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_NUMBER_TEMPORAL_POSITIONS[0],u.Tag.TAG_NUMBER_TEMPORAL_POSITIONS[1]),0)},u.Image.prototype.getSliceGap=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SLICE_GAP[0],u.Tag.TAG_SLICE_GAP[1]),0)},u.Image.prototype.getSliceThickness=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_SLICE_THICKNESS[0],u.Tag.TAG_SLICE_THICKNESS[1]),0)},u.Image.prototype.getImageMax=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_IMAGE_MAX[0],u.Tag.TAG_IMAGE_MAX[1]),0)},u.Image.prototype.getImageMin=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_IMAGE_MIN[0],u.Tag.TAG_IMAGE_MIN[1]),0)},u.Image.prototype.getDataScaleSlope=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_DATA_SCALE_SLOPE[0],u.Tag.TAG_DATA_SCALE_SLOPE[1]),0)},u.Image.prototype.getDataScaleIntercept=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_DATA_SCALE_INTERCEPT[0],u.Tag.TAG_DATA_SCALE_INTERCEPT[1]),0)},u.Image.prototype.getDataScaleElscint=function(){var w=u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_DATA_SCALE_ELSCINT[0],u.Tag.TAG_DATA_SCALE_ELSCINT[1]),0);w||(w=1);var D=this.getPixelBandwidth();return w=Math.sqrt(D)/(10*w),w<=0&&(w=1),w},u.Image.prototype.getWindowWidth=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_WINDOW_WIDTH[0],u.Tag.TAG_WINDOW_WIDTH[1]),0)},u.Image.prototype.getWindowCenter=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_WINDOW_CENTER[0],u.Tag.TAG_WINDOW_CENTER[1]),0)},u.Image.prototype.getPixelBandwidth=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_PIXEL_BANDWIDTH[0],u.Tag.TAG_PIXEL_BANDWIDTH[1]),0)},u.Image.prototype.getSeriesId=function(){var w=this.getSeriesDescription(),D=this.getSeriesInstanceUID(),R=this.getSeriesNumber(),L=this.getEchoNumber(),P=this.getOrientation(),d=this.getCols(),E=this.getRows(),e="";return w!==null&&(e+=" "+w),D!==null&&(e+=" "+D),R!==null&&(e+=" "+R),L!==null&&(e+=" "+L),P!==null&&(e+=" "+P),e+=" ("+d+" x "+E+")",e},u.Image.prototype.getPixelSpacing=function(){return u.Image.getValueSafely(this.getTag(u.Tag.TAG_PIXEL_SPACING[0],u.Tag.TAG_PIXEL_SPACING[1]))},u.Image.prototype.getImageType=function(){return u.Image.getValueSafely(this.getTag(u.Tag.TAG_IMAGE_TYPE[0],u.Tag.TAG_IMAGE_TYPE[1]))},u.Image.prototype.getBitsStored=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_BITS_STORED[0],u.Tag.TAG_BITS_STORED[1]),0)},u.Image.prototype.getBitsAllocated=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_BITS_ALLOCATED[0],u.Tag.TAG_BITS_ALLOCATED[1]),0)},u.Image.prototype.getFrameTime=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_FRAME_TIME[0],u.Tag.TAG_FRAME_TIME[1]),0)},u.Image.prototype.getAcquisitionMatrix=function(){var w,D,R,L,P;return w=[0,0],w[0]=u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_ACQUISITION_MATRIX[0],u.Tag.TAG_ACQUISITION_MATRIX[1]),0),this.privateDataAll===null&&(this.privateDataAll=this.getAllInterpretedPrivateData()),this.privateDataAll!==null&&this.privateDataAll.length>0&&(R=this.privateDataAll.indexOf("AcquisitionMatrixText"),R!==-1&&(L=this.privateDataAll.indexOf(` +`,R),L!==-1&&(P=this.privateDataAll.substring(R,L),D=P.match(/\d+/g),D!==null&&D.length===2?(w[0]=D[0],w[1]=D[1]):D!==null&&D.length===1&&(w[0]=D[0])))),w[1]===0&&(w[1]=w[0]),w},u.Image.prototype.getTR=function(){return u.Image.getSingleValueSafely(this.getTag(u.Tag.TAG_TR,u.Tag.TAG_TR[1]),0)},u.Image.prototype.putTag=function(w){this.tags[w.id]&&this.tags[w.id].value[0]!==w.value[0]||(this.tags[w.id]=w,this.putFlattenedTag(this.tagsFlat,w))},u.Image.prototype.putFlattenedTag=function(w,D){var R;if(D.sublist)for(R=0;Rj&&(j=y,G=d0);return D?{data:e,min:H,minIndex:Y,max:j,maxIndex:G,numCols:this.getCols(),numRows:this.getRows()}:e},u.Image.prototype.convertPalette=function(){var w,D,R,L,P,d,E,e,N,q,z,e0;if(w=this.tags[u.Tag.createId(u.Tag.TAG_PIXEL_DATA[0],u.Tag.TAG_PIXEL_DATA[1])].value,D=this.getPalleteValues(u.Tag.TAG_PALETTE_RED),R=this.getPalleteValues(u.Tag.TAG_PALETTE_GREEN),L=this.getPalleteValues(u.Tag.TAG_PALETTE_BLUE),D!==null&&D.length>0&&R!==null&&R.length>0&&L!==null&&L.length>0&&!this.convertedPalette){if(P=new DataView(new ArrayBuffer(this.getRows()*this.getCols()*this.getNumberOfFrames()*3)),d=parseInt(Math.ceil(this.getBitsAllocated()/8)),E=w.byteLength/d,d===1)for(e=0;eN&&(N=Math.abs(D[R]),E=R);for(N=0;R<6;R+=1)Math.abs(D[R])>N&&(N=Math.abs(D[R]),e=R);switch(E){case 0:q+="X",e===4?q+="YZ":q+="ZY";break;case 1:q+="Y",e===3?q+="XZ":q+="ZX";break;case 2:q+="Z",e===3?q+="XY":q+="YX";break}switch(E){case 0:D[E]>0?q+="-":q+="+",e===4?D[e]>0?q+="-":q+="+":D[e]>0?q+="+":q+="-";break;case 1:D[E]>0?q+="-":q+="+",e===3?D[e]>0?q+="-":q+="+":D[e]>0?q+="+":q+="-";break;case 2:D[E]>0?q+="+":q+="-",D[e]>0?q+="-":q+="+";break}if(P===0)q+="+",w=q;else{if(d)switch(q.charAt(2)){case"X":P>0?q+="-":q+="+";break;case"Y":case"Z":P>0?q+="+":q+="-";break}else switch(q.charAt(2)){case"X":P>0?q+="+":q+="-";break;case"Y":case"Z":P>0?q+="-":q+="+";break}w=q}return w},u.Image.prototype.isMosaic=function(){var w,D=!1,R,L,P;if(w=this.getImageType(),w!==null){for(L=0;L0&&(P[0]1?d[R]=u.Utils.concatArrayBuffers2(P[R]):d[R]=P[R][0],P[R]=null;return d},u.Image.prototype.getRLE=function(){var w,D,R,L=[];if(w=this.getEncapsulatedData(),w)for(D=w.length,R=1;R");return L=L.replace(/\n\s*\n/g,` `),L=L.replace(/(?:\r\n|\r|\n)/g,"
"),L},u.Image.prototype.getPalleteValues=function(w){var D,R,L,P,d,E,e,N,q,z,e0;if(D=null,R=null,L=u.Image.getValueSafely(this.getTag(w[0],w[1])),L!==null){for(P=L.buffer.byteLength/2,D=[],R=[],d=0;d255||D<0)for(P=255/(R-D),d=D,L=0;L1&&m[0].getTemporalPosition()!==null,L=A>1&&m[0].getTemporalNumber()!==null&&m[0].getTemporalNumber()===A,R&&L)for(P=0;P1||this.isMosaic&&this.images[0].length>1,this.isMultiFrameVolume=!1,this.isMultiFrameTimeseries=!1,this.isImplicitTimeseries=!1,this.isMultiFrame&&(m=this.images[0].getFrameTime()>0,this.isMosaic?this.isMultiFrameTimeseries=!0:m?this.isMultiFrameTimeseries=!0:this.numberOfFramesInFile>1?(this.isMultiFrameTimeseries=!0,this.numberOfFrames=this.images.length):this.isMultiFrameVolume=!0),!this.isMosaic&&this.numberOfFrames<=1){for(d=this.images[0].getImagePosition()||[],S=d.toString(),this.numberOfFrames=0,A=0;A1&&(this.isImplicitTimeseries=!0)}this.sliceDir=this.images[0].getAcquiredSliceDirection(),u.Series.useExplicitOrdering?v=this.images.slice():v=u.Series.orderDicoms(this.images,this.numberOfFrames,this.sliceDir),w=v[0].getImagePositionSliceDir(this.sliceDir),D=v[v.length-1].getImagePositionSliceDir(this.sliceDir),R=D-w,u.Series.useExplicitOrdering?this.sliceSense=!1:this.isMosaic?this.sliceSense=!0:this.isMultiFrame?(L=v[0].getSliceLocationVector(),L!==null?(P=v[0].getOrientation(),P.charAt(2)==="Z"?this.sliceSense=L[0]-L[L.length-1]<0:this.sliceSense=L[0]-L[L.length-1]>0):this.sliceSense=!(w<0)):this.sliceDir===u.Image.SLICE_DIRECTION_SAGITTAL||this.sliceDir===u.Image.SLICE_DIRECTION_CORONAL?R>0?this.sliceSense=!1:this.sliceSense=!0:R>0?this.sliceSense=!0:this.sliceSense=!1,this.imagesOriginalOrder=this.images,this.images=v},u.Series.prototype.concatenateImageData=function(m,A){var S,v,w;this.isMosaic?v=this.getMosaicData(this.images[0],this.images[0].getPixelDataBytes()):v=this.images[0].getPixelDataBytes(),w=this.validatePixelDataLength(this.images[0]),this.images[0].clearPixelData(),S=new Uint8Array(new ArrayBuffer(w*this.images.length)),S.set(new Uint8Array(v,0,w),0),setTimeout(u.Utils.bind(this,function(){this.concatenateNextImageData(S,w,m,1,A)}),0)},u.Series.prototype.concatenateNextImageData=function(m,A,S,v,w){var D,R;v>=this.images.length?(S&&S.drawProgress(1,"Reading DICOM Images"),w(m.buffer)):(S&&S.drawProgress(v/this.images.length,"Reading DICOM Images"),this.isMosaic?D=this.getMosaicData(this.images[v],this.images[v].getPixelDataBytes()):D=this.images[v].getPixelDataBytes(),R=this.validatePixelDataLength(this.images[v]),this.images[v].clearPixelData(),m.set(new Uint8Array(D,0,R),A*v),setTimeout(u.Utils.bind(this,function(){this.concatenateNextImageData(m,A,S,v+1,w)}),0))},u.Series.prototype.validatePixelDataLength=function(m){var A=m.getPixelDataBytes().byteLength,S=m.getCols()*m.getRows();return A%S===0?A:S*m.getNumberOfFrames()*m.getNumberOfSamplesPerPixel()*(m.getBitsAllocated()/8)},u.Series.prototype.getMosaicData=function(m,A){var S,v,w,D,R,L,P,d,E,e,N,q,z,e0,H,j,y,Y=0;for(P=parseInt(this.images[0].getBitsAllocated()/8),N=this.images[0].getMosaicCols()*this.images[0].getMosaicRows(),q=parseInt(this.images[0].getRows()/this.images[0].getMosaicRows()),z=parseInt(this.images[0].getCols()/this.images[0].getMosaicCols()),S=this.images[0].getCols(),v=this.images[0].getRows(),w=this.images[0].getMosaicRows(),D=this.images[0].getMosaicCols(),R=parseInt(v/w),L=parseInt(S/D),e0=new Uint8Array(new ArrayBuffer(N*q*z*P)),H=new Uint8Array(A),d=0;du in T?__defProp(T,u,{enumerable:!0,configurable:!0,writable:!0,value:m}):T[u]=m,__export=(T,u)=>{for(var m in u)__defProp(T,m,{get:u[m],enumerable:!0})},__publicField=(T,u,m)=>(__defNormalProp(T,typeof u!="symbol"?u+"":u,m),m),version="0.43.3",_Log=class lt{constructor({name:u="niivue",level:m="info"}={}){__publicField(this,"level"),__publicField(this,"name"),this.name=`${u}`,this.level=m}debug(...u){lt.levels[this.level]>lt.levels.debug||console.debug(`${this.name}-debug`,...u)}info(...u){lt.levels[this.level]>lt.levels.info||console.info(`${this.name}-info`,...u)}warn(...u){lt.levels[this.level]>lt.levels.warn||console.warn(`${this.name}-warn`,...u)}error(...u){lt.levels[this.level]>lt.levels.error||console.error(`${this.name}-error`,...u)}fatal(...u){lt.levels[this.level]>lt.levels.fatal||console.error(`${this.name}-fatal`,...u)}setLogLevel(u){this.level=u}setName(u){this.name=u}};__publicField(_Log,"levels",{debug:0,info:1,warn:2,error:3,fatal:4,silent:1/0});var Log=_Log,log=new Log({name:"niivue",level:"info"}),compileShader=function(T,u,m){const A=T.createShader(T.VERTEX_SHADER);if(A===null)throw new Error("could not create vertex shader");if(T.shaderSource(A,u),T.compileShader(A),!T.getShaderParameter(A,T.COMPILE_STATUS))throw log.error(T.getShaderInfoLog(A)),new Error("Vertex shader failed to compile, see console for log");const S=T.createShader(T.FRAGMENT_SHADER);if(S===null)throw new Error("could not create fragment shader");if(T.shaderSource(S,m),T.compileShader(S),!T.getShaderParameter(S,T.COMPILE_STATUS))throw log.error(T.getShaderInfoLog(S)),new Error("Fragment shader failed to compile, see console for log");const v=T.createProgram();if(v===null)throw new Error("could not create GL program");if(T.attachShader(v,A),T.attachShader(v,S),T.linkProgram(v),!T.getProgramParameter(v,T.LINK_STATUS))throw log.error(T.getProgramInfoLog(v)),new Error("Shader failed to link, see console for log");return v},Shader=class{constructor(T,u,m){__publicField(this,"program"),__publicField(this,"uniforms",{}),__publicField(this,"isMatcap"),this.program=compileShader(T,u,m);const A=/uniform[^;]+[ ](\w+);/g,S=/uniform[^;]+[ ](\w+);/,v=u.match(A),w=m.match(A);v&&v.forEach(D=>{const R=D.match(S);this.uniforms[R[1]]=-1}),w&&w.forEach(D=>{const R=D.match(S);this.uniforms[R[1]]=-1});for(const D in this.uniforms)this.uniforms[D]=T.getUniformLocation(this.program,D)}use(T){T.useProgram(this.program)}},vertRenderShader=`#version 300 es #line 4 layout(location=0) in vec3 pos; @@ -1601,17 +1601,17 @@ void main(void) { gradientSample.rgb = normalize(gradientSample.rgb); gradientSample.rgb = (gradientSample.rgb * 0.5)+0.5; FragColor = gradientSample; -}`,orientCube=new Float32Array([-1,-1,-1,.28,.28,.28,-1,-1,-1,.28,.28,.28,-1,1,-1,.28,.28,.28,1,-1,-1,.28,.28,.28,1,1,-1,.28,.28,.28,1,1,-1,.28,.28,.28,-1,-1,1,.8,.8,.8,-1,-1,1,.8,.8,.8,1,-1,1,.8,.8,.8,-1,1,1,.8,.8,.8,1,1,1,.8,.8,.8,1,1,1,.8,.8,.8,-1,1,-1,0,0,.74,-1,1,-1,0,0,.74,-1,1,1,0,0,.74,1,1,-1,0,0,.74,1,1,1,0,0,.74,1,1,1,0,0,.74,-1,-1,-1,.42,0,.42,-1,-1,-1,.42,0,.42,1,-1,-1,.42,0,.42,-1,-1,1,.42,0,.42,1,-1,1,.42,0,.42,1,-1,1,.42,0,.42,-1,-1,-1,.64,0,0,-1,-1,-1,.64,0,0,-1,-1,1,.64,0,0,-1,1,-1,.64,0,0,-1,1,1,.64,0,0,-1,1,1,.64,0,0,1,-1,-1,0,.5,0,1,-1,-1,0,.5,0,1,1,-1,0,.5,0,1,-1,1,0,.5,0,1,1,1,0,.5,0,1,1,1,0,.5,0,-.45,1,-.8,0,0,0,-.45,1,-.8,0,0,0,-.45,1,.8,0,0,0,-.25,1,-.8,0,0,0,-.25,1,.8,0,0,0,-.25,1,.8,0,0,0,-.25,1,.6,0,0,0,-.25,1,.6,0,0,0,-.25,1,.8,0,0,0,.45,1,.6,0,0,0,.25,1,.8,0,0,0,.25,1,.8,0,0,0,.25,1,.1,0,0,0,.25,1,.1,0,0,0,.25,1,.6,0,0,0,.45,1,.1,0,0,0,.45,1,.6,0,0,0,.45,1,.6,0,0,0,-.25,1,-.1,0,0,0,-.25,1,-.1,0,0,0,-.25,1,.1,0,0,0,.25,1,-.1,0,0,0,.45,1,.1,0,0,0,.45,1,.1,0,0,0,.45,-1,-.8,0,0,0,.45,-1,-.8,0,0,0,.05,-1,.8,0,0,0,.25,-1,-.8,0,0,0,-.15,-1,.8,0,0,0,-.15,-1,.8,0,0,0,-.25,-1,-.8,0,0,0,-.25,-1,-.8,0,0,0,.05,-1,.8,0,0,0,-.45,-1,-.8,0,0,0,-.15,-1,.8,0,0,0,-.15,-1,.8,0,0,0,.13,-1,-.3,0,0,0,.13,-1,-.3,0,0,0,.07,-1,-.1,0,0,0,-.33,-1,-.3,0,0,0,-.27,-1,-.1,0,0,0,-.27,-1,-.1,0,0,0,-.45,.6,1,0,0,0,-.45,.6,1,0,0,0,-.45,.4,1,0,0,0,-.25,.8,1,0,0,0,-.25,.4,1,0,0,0,-.25,.4,1,0,0,0,-.25,.8,1,0,0,0,-.25,.8,1,0,0,0,-.25,.6,1,0,0,0,.25,.8,1,0,0,0,.45,.6,1,0,0,0,.45,.6,1,0,0,0,.25,.8,1,0,0,0,.25,.8,1,0,0,0,.25,-.1,1,0,0,0,.45,.6,1,0,0,0,.45,.1,1,0,0,0,.45,.1,1,0,0,0,-.25,.1,1,0,0,0,-.25,.1,1,0,0,0,-.45,-.1,1,0,0,0,.25,.1,1,0,0,0,.25,-.1,1,0,0,0,.25,-.1,1,0,0,0,-.45,-.1,1,0,0,0,-.45,-.1,1,0,0,0,-.45,-.6,1,0,0,0,-.25,-.1,1,0,0,0,-.25,-.8,1,0,0,0,-.25,-.8,1,0,0,0,-.25,-.6,1,0,0,0,-.25,-.6,1,0,0,0,-.25,-.8,1,0,0,0,.45,-.6,1,0,0,0,.25,-.8,1,0,0,0,.25,-.8,1,0,0,0,.25,-.4,1,0,0,0,.25,-.4,1,0,0,0,.25,-.6,1,0,0,0,.45,-.4,1,0,0,0,.45,-.6,1,0,0,0,.45,-.6,1,0,0,0,-.1,-.8,-1,0,0,0,-.1,-.8,-1,0,0,0,-.1,.8,-1,0,0,0,.1,-.8,-1,0,0,0,.1,.8,-1,0,0,0,.1,.8,-1,0,0,0,-1,-.45,-.8,0,0,0,-1,-.45,-.8,0,0,0,-1,-.45,.8,0,0,0,-1,-.25,-.8,0,0,0,-1,-.25,.8,0,0,0,-1,-.25,.8,0,0,0,-1,-.25,-.8,0,0,0,-1,-.25,-.8,0,0,0,-1,-.25,-.6,0,0,0,-1,.45,-.8,0,0,0,-1,.45,-.6,0,0,0,-1,.45,-.6,0,0,0,1,.45,-.8,0,0,0,1,.45,-.8,0,0,0,1,.45,.8,0,0,0,1,.25,-.8,0,0,0,1,.25,.8,0,0,0,1,.25,.8,0,0,0,1,.25,.6,0,0,0,1,.25,.6,0,0,0,1,.25,.8,0,0,0,1,-.45,.6,0,0,0,1,-.25,.8,0,0,0,1,-.25,.8,0,0,0,1,-.25,.1,0,0,0,1,-.25,.1,0,0,0,1,-.25,.6,0,0,0,1,-.45,.1,0,0,0,1,-.45,.6,0,0,0,1,-.45,.6,0,0,0,1,.25,-.1,0,0,0,1,.25,-.1,0,0,0,1,.25,.1,0,0,0,1,-.25,-.1,0,0,0,1,-.45,.1,0,0,0,1,-.45,.1,0,0,0,1,-.25,-.8,0,0,0,1,-.25,-.8,0,0,0,1,-.05,-.1,0,0,0,1,-.45,-.8,0,0,0,1,-.25,-.1,0,0,0,1,-.25,-.1,0,0,0]),_NiivueObject3D=class{constructor(u,m,A,S,v=null,w=null){__publicField(this,"sphereIdx",[]),__publicField(this,"sphereVtx",[]),__publicField(this,"renderShaders",[]),__publicField(this,"isVisible",!0),__publicField(this,"isPickable",!0),__publicField(this,"vertexBuffer"),__publicField(this,"indexCount"),__publicField(this,"indexBuffer"),__publicField(this,"vao"),__publicField(this,"mode"),__publicField(this,"glFlags",0),__publicField(this,"id"),__publicField(this,"colorId"),__publicField(this,"modelMatrix",create$3()),__publicField(this,"scale",[1,1,1]),__publicField(this,"position",[0,0,0]),__publicField(this,"rotation",[0,0,0]),__publicField(this,"rotationRadians",0),__publicField(this,"extentsMin",[]),__publicField(this,"extentsMax",[]),__publicField(this,"furthestVertexFromOrigin"),__publicField(this,"originNegate"),__publicField(this,"fieldOfViewDeObliqueMM"),__publicField(this,"mm"),this.vertexBuffer=m,this.indexCount=S,this.indexBuffer=v,this.vao=w,this.mode=A,this.id=u,this.colorId=[(u>>0&255)/255,(u>>8&255)/255,(u>>16&255)/255,(u>>24&255)/255]}};__publicField(_NiivueObject3D,"BLEND",1);__publicField(_NiivueObject3D,"CULL_FACE",2);__publicField(_NiivueObject3D,"CULL_FRONT",4);__publicField(_NiivueObject3D,"CULL_BACK",8);__publicField(_NiivueObject3D,"ENABLE_DEPTH_TEST",16);__publicField(_NiivueObject3D,"generateCrosshairs",function(T,u,m,A,S,v,w=20,D=0){const R=_NiivueObject3D.generateCrosshairsGeometry(T,m,A,S,v,w,D);return new _NiivueObject3D(u,R.vertexBuffer,T.TRIANGLES,R.indexCount,R.indexBuffer,R.vao)});__publicField(_NiivueObject3D,"generateCrosshairsGeometry",function(T,u,m,A,S,v=20,w=0){const D=[],R=[],L=S*w;if(L<=0){let e=fromValues$2(m[0],u[1],u[2]),N=fromValues$2(A[0],u[1],u[2]);_NiivueObject3D.makeCylinder(D,R,e,N,S,v),e=fromValues$2(u[0],m[1],u[2]),N=fromValues$2(u[0],A[1],u[2]),_NiivueObject3D.makeCylinder(D,R,e,N,S,v),e=fromValues$2(u[0],u[1],m[2]),N=fromValues$2(u[0],u[1],A[2]),_NiivueObject3D.makeCylinder(D,R,e,N,S,v)}else{let e=fromValues$2(m[0],u[1],u[2]),N=fromValues$2(u[0]-L,u[1],u[2]);_NiivueObject3D.makeCylinder(D,R,e,N,S,v,!1),e=fromValues$2(u[0]+L,u[1],u[2]),N=fromValues$2(A[0],u[1],u[2]),_NiivueObject3D.makeCylinder(D,R,e,N,S,v,!1),e=fromValues$2(u[0],m[1],u[2]),N=fromValues$2(u[0],u[1]-L,u[2]),_NiivueObject3D.makeCylinder(D,R,e,N,S,v,!1),e=fromValues$2(u[0],u[1]+L,u[2]),N=fromValues$2(u[0],A[1],u[2]),_NiivueObject3D.makeCylinder(D,R,e,N,S,v,!1),e=fromValues$2(u[0],u[1],m[2]),N=fromValues$2(u[0],u[1],u[2]-L),_NiivueObject3D.makeCylinder(D,R,e,N,S,v,!1),e=fromValues$2(u[0],u[1],u[2]+L),N=fromValues$2(u[0],u[1],A[2]),_NiivueObject3D.makeCylinder(D,R,e,N,S,v,!1)}const P=T.createBuffer();if(P===null)throw new Error("could not instantiate vertex buffer");T.bindBuffer(T.ARRAY_BUFFER,P),T.bufferData(T.ARRAY_BUFFER,new Float32Array(D),T.STATIC_DRAW);const d=T.createBuffer();if(d===null)throw new Error("could not instantiate index buffer");T.bindBuffer(T.ELEMENT_ARRAY_BUFFER,d),T.bufferData(T.ELEMENT_ARRAY_BUFFER,new Uint32Array(R),T.STATIC_DRAW);const E=T.createVertexArray();return T.bindVertexArray(E),T.bindBuffer(T.ELEMENT_ARRAY_BUFFER,d),T.bindBuffer(T.ARRAY_BUFFER,P),T.enableVertexAttribArray(0),T.vertexAttribPointer(0,3,T.FLOAT,!1,0,0),T.bindVertexArray(null),{vertexBuffer:P,indexBuffer:d,indexCount:R.length,vao:E}});__publicField(_NiivueObject3D,"getFirstPerpVector",function(T){const u=fromValues$2(0,0,0);return T[0]===0?u[0]=1:T[1]===0?u[1]=1:T[2]===0?u[2]=1:(u[0]=T[2],u[1]=T[2],u[2]=-(T[0]+T[1]),normalize$1(u,u)),u});__publicField(_NiivueObject3D,"subdivide",function(T,u){let m=T.length/3,A=u.length/3;const S=A,v=create$2(),w=create$2();for(let D=0;Ditksnap_default,$slicer3d:()=>slicer3d_default,actc:()=>actc_default,afni_blues_inv:()=>afni_blues_inv_default,afni_reds_inv:()=>afni_reds_inv_default,bcgwhw:()=>bcgwhw_default,bcgwhw_dark:()=>bcgwhw_dark_default,blue:()=>blue_default,blue2cyan:()=>blue2cyan_default,blue2magenta:()=>blue2magenta_default,blue2red:()=>blue2red_default,bluegrn:()=>bluegrn_default,bone:()=>bone_default,bronze:()=>bronze_default,cet_l17:()=>cet_l17_default,cividis:()=>cividis_default,cool:()=>cool_default,copper:()=>copper_default,copper2:()=>copper2_default,ct_airways:()=>ct_airways_default,ct_artery:()=>ct_artery_default,ct_bones:()=>ct_bones_default,ct_brain:()=>ct_brain_default,ct_brain_gray:()=>ct_brain_gray_default,ct_cardiac:()=>ct_cardiac_default,ct_head:()=>ct_head_default,ct_kidneys:()=>ct_kidneys_default,ct_liver:()=>ct_liver_default,ct_muscles:()=>ct_muscles_default,ct_scalp:()=>ct_scalp_default,ct_skull:()=>ct_skull_default,ct_soft:()=>ct_soft_default,ct_soft_tissue:()=>ct_soft_tissue_default,ct_surface:()=>ct_surface_default,ct_vessels:()=>ct_vessels_default,ct_w_contrast:()=>ct_w_contrast_default,cubehelix:()=>cubehelix_default,electric_blue:()=>electric_blue_default,freesurfer:()=>freesurfer_default,ge_color:()=>ge_color_default,gold:()=>gold_default,gray:()=>gray_default,green:()=>green_default,green2cyan:()=>green2cyan_default,green2orange:()=>green2orange_default,hot:()=>hot_default,hotiron:()=>hotiron_default,hsv:()=>hsv_default,inferno:()=>inferno_default,jet:()=>jet_default,linspecer:()=>linspecer_default,magma:()=>magma_default,mako:()=>mako_default,nih:()=>nih_default,plasma:()=>plasma_default,random:()=>random_default,red:()=>red_default,redyell:()=>redyell_default,rocket:()=>rocket_default,roi_i256:()=>roi_i256_default,surface:()=>surface_default,turbo:()=>turbo_default,violet:()=>violet_default,viridis:()=>viridis_default,warm:()=>warm_default,winter:()=>winter_default,x_rain:()=>x_rain_default});var itksnap_default={R:[0,255,0,0,255,0,255,255,0,205,210,102,0,0,46,255,106,221,233,165,255,147,218,75,255,60,255,255,218,0,188,255,255,222,127,139,124,255,70,0,238,238,240,245,184,32,255,25,112,34,248,245,255,144,173,65,255,250,128,50,244,255,123,255,173,255,127,255,143,220,253,255,0,0,128,255,250,148,178,255,135,100,240,250,255,107,135,0,139,245,186,255,255,0,210,255,47,72,175,128,176,255,139,240,255,216,119,219,72,255,199,154,189,240,230,0,85,64,153,205,250,95,0,255,224,176,138,30,240,152,160],G:[0,0,255,0,255,255,0,239,0,133,180,205,0,139,139,228,90,160,150,42,250,112,112,0,182,179,235,228,165,128,143,105,218,184,255,69,252,255,130,100,130,232,255,222,134,178,20,25,128,139,248,255,160,238,255,105,99,240,0,205,164,255,104,165,216,192,255,140,188,20,245,250,206,255,0,250,128,0,34,127,206,149,230,235,245,142,206,0,0,245,85,228,222,191,105,248,79,61,238,128,224,240,0,255,215,191,136,112,209,0,21,205,183,248,230,250,107,224,50,92,250,158,128,69,255,196,43,144,128,251,82],B:[0,0,0,255,0,255,255,213,205,63,140,170,128,139,87,225,205,221,122,42,250,219,214,130,193,113,205,196,32,128,143,180,185,135,0,19,0,224,180,0,238,170,240,179,11,170,147,112,144,34,255,250,122,144,47,225,71,230,0,50,96,240,238,0,230,203,212,0,143,60,230,240,209,127,128,205,114,211,34,80,235,237,140,215,238,35,250,139,139,220,211,181,173,255,30,220,79,139,238,0,230,245,0,255,0,216,153,147,204,255,133,50,107,255,250,154,47,208,204,92,210,160,0,0,255,222,226,255,128,152,45],A:[0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],I:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130]},slicer3d_default={labels:["background","tissue","bone","skin","connective tissue","blood","organ","mass","muscle","foreign object","waste","teeth","fat","gray matter","white matter","nerve","vein","artery","capillary","ligament","tendon","cartilage","meniscus","lymph node","lymphatic vessel","cerebro-spinal fluid","bile","urine","feces","gas","fluid","edema","bleeding","necrosis","clot","embolism","head","central nervous system","brain","gray matter of brain","telencephalon","cerebral cortex","right frontal lobe","left frontal lobe","right temporal lobe","left temporal lobe","right parietal lobe","left parietal lobe","right occipital lobe","left occipital lobe","right insular lobe","left insular lobe","right limbic lobe","left limbic lobe","right striatum","left striatum","right caudate nucleus","left caudate nucleus","right putamen","left putamen","right pallidum","left pallidum","right amygdaloid complex","left amygdaloid complex","diencephalon","thalamus","right thalamus","left thalamus","pineal gland","midbrain","substantia nigra","right substantia nigra","left substantia nigra","cerebral white matter","right superior longitudinal fasciculus","left superior longitudinal fasciculus","right inferior longitudinal fasciculus","left inferior longitudinal fasciculus","right arcuate fasciculus","left arcuate fasciculus","right uncinate fasciculus","left uncinate fasciculus","right cingulum bundle","left cingulum bundle","projection fibers","right corticospinal tract","left corticospinal tract","right optic radiation","left optic radiation","right medial lemniscus","left medial lemniscus","right superior cerebellar peduncle","left superior cerebellar peduncle","right middle cerebellar peduncle","left middle cerebellar peduncle","right inferior cerebellar peduncle","left inferior cerebellar peduncle","optic chiasm","right optic tract","left optic tract","right fornix","left fornix","commissural fibers","corpus callosum","posterior commissure","cerebellar white matter","CSF space","ventricles of brain","right lateral ventricle","left lateral ventricle","right third ventricle","left third ventricle","cerebral aqueduct","fourth ventricle","subarachnoid space","spinal cord","gray matter of spinal cord","white matter of spinal cord","endocrine system of brain","pituitary gland","adenohypophysis","neurohypophysis","meninges","dura mater","arachnoid","pia mater","muscles of head","salivary glands","lips","nose","tongue","soft palate","right inner ear","left inner ear","right external ear","left external ear","right middle ear","left middle ear","right eyeball","left eyeball","skull","right frontal bone","left frontal bone","right parietal bone","left parietal bone","right temporal bone","left temporal bone","right sphenoid bone","left sphenoid bone","right ethmoid bone","left ethmoid bone","occipital bone","maxilla","right zygomatic bone","right lacrimal bone","vomer bone","right palatine bone","left palatine bone","mandible","neck","muscles of neck","pharynx","larynx","thyroid gland","right parathyroid glands","left parathyroid glands","skeleton of neck","hyoid bone","cervical vertebral column","thorax","trachea","bronchi","right lung","left lung","superior lobe of right lung","superior lobe of left lung","middle lobe of right lung","inferior lobe of right lung","inferior lobe of left lung","pleura","heart","right atrium","left atrium","atrial septum","ventricular septum","right ventricle of heart","left ventricle of heart","mitral valve","tricuspid valve","aortic valve","pulmonary valve","aorta","pericardium","pericardial cavity","esophagus","thymus","mediastinum","skin of thoracic wall","muscles of thoracic wall","skeleton of thorax","thoracic vertebral column","ribs","sternum","right clavicle","left clavicle","abdominal cavity","abdomen","peritoneum","omentum","peritoneal cavity","retroperitoneal space","stomach","duodenum","small bowel","colon","anus","liver","biliary tree","gallbladder","pancreas","spleen","urinary system","right kidney","left kidney","right ureter","left ureter","urinary bladder","urethra","right adrenal gland","left adrenal gland","female internal genitalia","uterus","right fallopian tube","left fallopian tube","right ovary","left ovary","vagina","male internal genitalia","prostate","right seminal vesicle","left seminal vesicle","right deferent duct","left deferent duct","skin of abdominal wall","muscles of abdominal wall","skeleton of abdomen","lumbar vertebral column","female external genitalia","male external genitalia","skeleton of upper limb","muscles of upper limb","right upper limb","left upper limb","right shoulder","left shoulder","right arm"],R:[0,128,241,177,111,216,221,144,192,220,78,255,230,200,250,244,0,216,183,183,152,111,178,68,111,85,0,214,78,218,170,140,188,216,145,150,177,244,250,200,68,128,83,83,162,162,141,141,182,182,188,188,154,154,177,177,30,30,210,210,48,48,98,98,69,166,122,122,253,145,46,0,0,250,127,127,159,159,125,125,106,106,154,154,126,201,201,78,78,174,174,139,139,148,148,186,186,99,156,156,64,64,138,97,126,194,85,88,88,88,88,88,88,88,88,244,200,250,82,57,60,92,255,255,255,255,201,70,188,177,166,182,229,229,174,174,201,201,194,194,241,203,203,229,229,255,255,209,209,248,248,255,196,255,255,255,242,242,222,177,213,184,150,62,62,62,242,250,255,177,182,175,197,197,172,172,202,224,224,255,206,210,203,233,195,181,152,159,166,218,225,224,255,184,211,47,255,173,188,255,226,253,244,205,205,186,177,255,234,204,180,216,255,205,204,255,221,0,139,249,157,203,185,185,247,247,222,124,249,249,244,255,255,227,213,213,193,216,230,245,245,241,241,177,171,217,212,185,185,198,194,177,177,177,177,177],G:[0,174,214,122,184,101,130,238,104,245,63,250,220,200,250,214,151,101,156,214,189,184,212,172,197,188,145,230,63,255,250,224,65,191,60,98,122,214,250,200,131,174,146,146,115,115,93,93,166,166,135,135,150,150,140,140,111,111,157,157,129,129,153,153,110,113,101,101,135,92,101,108,108,250,150,150,116,116,102,102,174,174,146,146,126,160,160,152,152,140,140,126,126,120,120,135,135,106,171,171,123,123,95,113,161,195,188,106,106,106,106,106,106,106,106,214,200,250,174,157,143,162,244,244,244,244,121,163,91,122,84,105,147,147,122,122,112,112,142,142,213,179,179,204,204,243,243,185,185,223,223,230,172,255,250,237,217,217,198,122,124,105,208,162,162,162,206,210,255,122,228,216,165,165,138,138,164,186,186,245,110,115,108,138,100,85,55,63,70,123,130,97,244,122,171,150,244,121,95,239,202,232,217,179,179,124,122,255,234,142,119,132,253,167,168,224,130,145,150,180,108,136,102,102,182,182,154,186,186,186,170,181,190,153,141,141,123,146,158,172,172,172,172,124,85,198,188,135,135,175,98,122,122,122,122,122],B:[0,128,145,101,210,79,101,144,88,20,0,220,70,235,210,49,206,79,220,211,207,210,242,100,131,255,30,130,0,255,250,228,28,216,66,83,101,49,225,215,98,128,164,164,105,105,137,137,110,110,166,166,201,201,190,190,85,85,166,166,126,126,112,112,53,137,38,38,192,109,131,112,112,225,88,88,163,163,154,154,155,155,83,83,55,133,133,141,141,103,103,177,177,72,72,135,135,24,108,108,147,147,74,158,197,164,255,215,215,215,215,215,215,215,215,49,215,225,128,110,83,109,209,209,209,209,77,117,95,101,94,107,118,118,90,90,73,73,0,0,144,77,77,109,109,152,152,85,85,131,131,138,68,167,160,145,123,123,101,101,109,108,243,114,114,114,142,139,207,101,255,244,145,145,115,115,140,162,162,217,84,89,81,112,73,57,13,27,38,97,104,76,209,154,143,103,209,88,76,172,134,158,154,108,108,161,101,220,194,178,153,105,229,142,143,199,101,30,98,111,162,116,83,83,164,164,132,223,150,150,147,158,165,130,113,113,103,127,140,147,147,151,151,92,68,131,102,134,134,125,79,101,101,101,101,101],A:[0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],I:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},actc_default={R:[0,0,24,248,255],G:[0,0,177,254,0],B:[0,136,0,0,0],A:[0,32,64,78,128],I:[0,64,128,156,255]},bcgwhw_dark_default={R:[0,248,242,235,229,222,212,202,193,183,173,145,117,78,39,0,0,0,0,0,0,64,128,191,255,255,255,255,255,238,221,204,214,224,235,245,255,249,242,236,229,223,217,210,204,197,191,184,176,169,161,154,146,139,132,124,117,109,102,0],G:[0,251,247,243,239,235,235,235,235,235,235,216,197,174,150,127,153,178,204,229,255,255,255,255,255,220,185,150,115,77,38,0,31,61,92,122,153,138,122,107,92,77,61,46,31,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0],B:[0,254,253,252,251,250,251,252,253,254,255,226,198,132,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,80,120,160,200,199,198,197,196,196,195,194,193,192,191,184,176,169,161,154,146,139,132,124,117,109,102,0],A:[256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256],I:[0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,255]},bcgwhw_default={R:[255,248,242,235,229,222,212,202,193,183,173,145,117,78,39,0,0,0,0,0,0,64,128,191,255,255,255,255,255,238,221,204,214,224,235,245,255,249,242,236,229,223,217,210,204,197,191,184,176,169,161,154,146,139,132,124,117,109,102,0],G:[255,251,247,243,239,235,235,235,235,235,235,216,197,174,150,127,153,178,204,229,255,255,255,255,255,220,185,150,115,77,38,0,31,61,92,122,153,138,122,107,92,77,61,46,31,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0],B:[255,254,253,252,251,250,251,252,253,254,255,226,198,132,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,80,120,160,200,199,198,197,196,196,195,194,193,192,191,184,176,169,161,154,146,139,132,124,117,109,102,0],A:[256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256],I:[0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,255]},blue2red_default={R:[0,0,0,0,196,255],G:[0,32,128,128,128,32],B:[0,255,196,0,0,0],A:[0,128,64,64,64,128],I:[0,1,64,128,192,255]},blue2magenta_default={R:[0,255],G:[0,0],B:[255,255],A:[0,128],I:[0,255]},blue2cyan_default={R:[0,0],G:[0,255],B:[255,255],A:[0,128],I:[0,255]},bluegrn_default={R:[0,0,0,0],G:[0,1,128,255],B:[0,222,127,32],A:[0,0,64,128],I:[0,1,128,255]},blue_default={R:[0,0,0],G:[0,0,0],B:[0,128,255],A:[0,64,128],I:[0,128,255]},bone_default={R:[0,103,255],G:[0,126,255],B:[0,165,255],A:[0,76,128],I:[0,153,255]},bronze_default={R:[0,43,103,199,216,255],G:[0,0,37,155,213,255],B:[0,0,20,97,201,255],A:[0,44,48,54,56,56],I:[0,64,128,196,240,255]},cet_l17_default={R:[0,9,24,33,40,46,52,57,62,66,70,74,78,81,85,88,91,94,98,101,103,106,109,112,114,117,119,121,124,126,128,130,133,135,137,139,141,143,145,147,149,151,153,155,157,159,161,163,164,166,168,169,171,172,174,175,177,178,180,181,183,184,186,187,189,190,191,193,194,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,222,223,224,224,225,226,226,227,228,228,229,229,230,231,231,232,233,233,234,234,235,235,236,236,236,237,237,237,238,238,238,239,239,239,240,240,240,241,241,241,242,242,242,243,243,243,243,243,243,243,243,244,244,244,244,244,244,244,244,244,244,244,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,243,243,243,243,243,243,243,243,243,243,243,243,242,242,242,242,242,242,242,242,241,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,243,243,244,244,245,246,246,247,247,248,249,249,250,250,251,251,252,252,253,253,254,254,254],G:[42,41,41,41,40,40,40,39,39,39,38,38,37,37,36,36,35,35,34,34,33,32,32,31,30,30,30,30,29,29,29,29,28,28,28,27,27,27,26,26,26,25,25,25,24,24,24,24,24,25,25,26,27,27,28,28,29,30,30,31,31,32,33,33,34,34,35,36,36,37,38,39,40,42,43,44,45,47,48,49,50,51,53,54,55,56,57,58,59,60,62,63,64,65,66,68,69,71,72,73,75,76,77,79,80,81,83,84,85,87,88,89,90,92,93,94,95,97,98,100,101,102,104,105,107,108,109,111,112,113,115,116,117,119,120,121,122,124,125,126,128,129,130,132,133,134,136,137,138,140,141,142,144,145,146,147,149,150,151,153,154,155,156,158,159,160,161,163,164,165,167,168,169,170,172,173,174,175,176,178,179,180,181,183,184,185,186,187,189,190,191,192,193,194,196,197,198,199,200,201,203,204,205,206,207,208,209,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,228,229,230,231,232,233,234,235,236,237,238,238,239,240,241,241,242,243,244,244,245,246,247,248,248,249,250,251,251,252,253,254,255],B:[167,167,166,166,166,165,165,165,164,164,164,163,163,162,162,162,161,161,161,160,160,160,159,159,158,158,157,157,156,155,155,154,154,153,153,152,151,151,150,150,149,149,148,147,147,146,146,145,144,144,143,143,142,141,141,140,139,139,138,137,137,136,135,135,134,133,133,132,131,131,130,130,129,128,128,127,127,126,125,125,124,124,123,123,122,121,121,120,119,119,118,118,117,116,116,116,115,115,114,114,113,113,113,112,112,111,111,110,110,109,109,109,108,108,107,107,106,106,106,106,106,105,105,105,105,105,105,105,104,104,104,104,104,103,103,103,103,103,102,102,102,103,103,103,103,104,104,104,104,104,105,105,105,105,106,106,106,106,106,107,107,107,107,108,108,109,110,111,111,112,113,113,114,115,115,116,117,117,118,119,120,120,121,122,122,123,124,125,126,128,129,130,131,132,134,135,136,137,138,140,141,142,143,144,146,147,148,149,150,152,153,155,157,158,160,162,163,165,167,168,170,172,173,175,177,178,180,182,183,185,187,188,190,193,196,199,201,204,207,210,212,215,218,221,224,226,229,232,235,238,240,243,246,249,252,255],A:[0,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64],I:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},cividis_default={R:[0,86,166,255],G:[32,92,156,233],B:[76,108,117,69],A:[0,56,80,88],I:[0,64,192,255]},cool_default={R:[0,0,0],G:[127,196,254],B:[255,255,255],A:[0,64,128],I:[0,128,255]},copper2_default={R:[0,61,122,183,244,255],G:[0,41,81,122,163,255],B:[0,25,51,76,102,255],A:[0,25,51,71,102,128],I:[0,51,102,153,204,255]},copper_default={R:[0,61,122,183,244,255],G:[0,41,81,122,163,203],B:[0,25,51,76,102,127],A:[0,25,51,71,102,128],I:[0,51,102,153,204,255]},ct_airways_default={min:-643,max:-235,R:[0,0,0],G:[154,154,154],B:[179,179,101],A:[0,32,0],I:[0,163,255]},ct_artery_default={min:114,max:800,R:[0,255,255,255],G:[0,0,129,255],B:[0,0,0,255],A:[0,64,88,228],I:[0,80,160,255]},ct_bones_default={min:180,max:600,R:[0,0,113,255],G:[0,0,109,250],B:[0,0,101,245],A:[0,0,100,160],I:[0,1,128,255]},ct_brain_gray_default={min:-10,max:110,R:[0,127,255],G:[0,127,255],B:[0,127,255],A:[0,48,128],I:[0,124,255]},ct_brain_default={min:-10,max:110,R:[0,199,255],G:[0,127,255],B:[0,127,255],A:[0,48,128],I:[0,124,255]},ct_cardiac_default={min:-80,max:1e3,R:[0,189,150,150,150,150,255],G:[0,169,54,54,54,54,240],B:[0,153,52,52,52,52,242],A:[0,32,64,0,0,64,64],I:[0,1,82,92,234,242,255]},ct_head_default={min:-590,max:600,R:[0,241,241,248,248,178,178,232,255,255,255],G:[0,156,156,222,222,36,36,51,255,255,255],B:[0,130,130,169,169,24,24,37,255,255,255],A:[0,8,0,0,0,64,64,0,0,222,222],I:[0,2,3,64,122,142,172,182,252,253,255]},ct_kidneys_default={min:114,max:302,R:[0,255,255],G:[0,129,255],B:[0,0,255],A:[0,88,228],I:[0,103,255]},ct_liver_default={min:-23,max:246,R:[0,44,255,255,255],G:[0,128,90,255,255],B:[0,0,70,0,255],A:[0,0,82,184,228],I:[0,64,131,196,255]},ct_muscles_default={min:-100,max:246,R:[0,128,159,255,255,255,255],G:[0,0,56,90,0,255,255],B:[0,0,41,70,0,0,255],A:[0,63,105,135,167,184,228],I:[0,100,128,155,180,209,255]},ct_scalp_default={min:-590,max:600,R:[0,241,241,248,248,178,232,255,255],G:[0,156,156,222,222,36,51,255,255],B:[0,130,130,169,169,24,37,255,255],A:[0,63,105,135,167,184,228,228,228],I:[0,1,52,127,137,162,172,252,255]},ct_skull_default={min:140,max:1024,R:[0,2,113,255],G:[0,1,109,250],B:[0,1,101,245],A:[0,1,96,168],I:[0,1,128,255]},ct_soft_default={min:-923,max:679,R:[0,0,0,0,0,255,255,255],G:[154,154,154,154,0,0,254,255],B:[179,179,179,179,0,0,0,255],A:[0,3,8,0,0,10,15,20],I:[0,30,62,88,170,200,232,255]},ct_soft_tissue_default={min:-10,max:110,R:[0,199,255],G:[0,127,255],B:[0,127,255],A:[0,48,128],I:[0,124,255]},ct_surface_default={min:-600,max:100,R:[0,134,255],G:[0,109,250],B:[0,101,245],A:[0,60,148],I:[0,128,255]},ct_vessels_default={min:114,max:246,R:[0,255,255],G:[0,128,255],B:[0,128,255],A:[0,64,96],I:[0,87,255]},ct_w_contrast_default={min:50,max:1e3,R:[98,210,169,128,255],G:[94,26,77,128,255],B:[45,21,74,128,255],A:[0,25,0,4,168],I:[0,41,87,154,255]},cubehelix_default={R:[0,13,21,26,27,25,22,21,22,28,39,54,75,98,124,148,171,189,202,210,213,211,206,200,195,193,195,201,211,225,240,255],G:[0,5,11,20,31,44,58,72,86,99,109,116,120,122,122,122,121,121,124,129,137,147,161,175,190,205,218,229,238,245,251,255],B:[0,14,30,46,61,71,77,78,75,68,60,52,48,47,53,65,83,105,131,157,183,205,222,235,241,243,242,240,239,240,245,255],A:[0,4,8,12,17,21,25,29,33,37,41,45,50,54,58,62,66,70,74,78,83,87,91,95,99,103,107,111,116,120,124,128],I:[0,8,16,25,33,41,49,58,66,74,82,90,99,107,115,123,132,140,148,156,165,173,181,189,197,206,214,222,230,239,247,255]},electric_blue_default={R:[0,10,136,255],G:[0,39,220,255],B:[0,223,253,255],A:[0,48,64,70],I:[0,92,192,255]},freesurfer_default={R:[0,245,205,120,196,220,230,0,122,236,12,204,42,119,220,103,60,255,165,160,0,245,205,120,196,220,230,0,122,236,13,220,103,255,165,160,0,120,200,255,255,164,164,164,234,0,0,0,0,0],G:[0,245,62,18,58,248,148,118,186,13,48,182,204,159,216,255,60,165,42,32,200,245,62,18,58,248,148,118,186,13,48,216,255,165,42,32,200,190,70,148,148,108,108,108,169,0,0,0,0,0],B:[0,245,78,134,250,164,34,14,220,176,255,142,164,176,20,255,60,0,42,240,200,245,78,134,250,164,34,14,220,176,255,20,255,0,42,240,221,150,255,10,10,226,226,226,30,64,112,160,208,255],A:[0,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64],I:[0,2,3,4,5,7,8,10,11,12,13,14,15,16,17,18,24,26,28,30,31,41,42,43,44,46,47,49,50,51,52,53,54,58,60,62,63,72,77,78,79,80,81,82,85,251,252,253,254,255]},ge_color_default={R:[0,0,128,255,255],G:[0,128,0,128,255],B:[0,125,255,0,255],A:[0,32,64,96,128],I:[0,63,128,192,255]},gold_default={R:[0,142,227,255],G:[0,85,170,255],B:[0,14,76,255],A:[0,42,84,128],I:[0,85,170,255]},gray_default={R:[0,255],G:[0,255],B:[0,255],A:[0,128],I:[0,255]},green_default={R:[0,0,0],G:[0,128,255],B:[0,0,0],A:[0,64,128],I:[0,128,255]},green2cyan_default={R:[0,0,0],G:[72,72,255],B:[0,255,255],A:[0,64,128],I:[0,88,255]},green2orange_default={R:[0,255,255],G:[72,88,255],B:[0,0,0],A:[0,64,128],I:[0,88,255]},hotiron_default={R:[0,255,255,255],G:[0,0,126,255],B:[0,0,0,255],A:[0,64,96,128],I:[0,128,191,255]},hot_default={R:[3,255,255,255],G:[0,0,255,255],B:[0,0,0,255],A:[0,48,96,128],I:[0,95,191,255]},hsv_default={R:[255,255,0,0,0,255,255],G:[0,255,255,255,0,0,0],B:[0,0,0,255,255,255,0],A:[0,14,28,43,57,71,85],I:[0,43,85,128,170,213,255]},inferno_default={R:[0,120,237,240],G:[0,28,105,249],B:[4,109,37,33],A:[0,56,80,88],I:[0,64,192,255]},jet_default={R:[0,0,127,255,127],G:[0,127,255,127,0],B:[127,255,127,0,0],A:[0,32,64,96,128],I:[0,63,128,192,255]},linspecer_default={R:[94,50,90,152,215,238,249,254,252,241,209,158],G:[79,131,186,214,240,244,237,210,157,100,57,1],B:[162,189,167,164,155,169,168,123,86,68,79,66],A:[0,12,23,35,47,58,70,81,93,105,116,128],I:[0,23,46,70,93,116,139,162,185,209,232,255]},magma_default={R:[0,148,183,223,247,252],G:[0,44,55,74,112,253],B:[4,128,121,104,92,191],A:[0,44,53,64,75,107],I:[0,107,128,154,179,255]},mako_default={R:[11,59,55,222],G:[4,45,165,245],B:[5,91,172,229],A:[0,23,70,107],I:[0,56,167,255]},nih_default={R:[0,85,0,0,0,0,0,0,85,255,255,255,172],G:[0,0,0,0,85,170,255,255,255,255,85,0,0],B:[0,170,85,255,255,170,170,0,85,0,0,0,0],A:[0,5,10,21,26,32,37,42,48,53,64,72,85],I:[0,15,31,63,79,95,111,127,143,159,191,217,255]},plasma_default={R:[13,156,237,240],G:[8,23,121,249],B:[135,158,83,33],A:[0,56,80,88],I:[0,64,192,255]},random_default={R:[208,71,33,192,32,195,208,173,233,202,25,210,145,89,87,245,246,38,3,25,57,167,245,86,227,208,81,64,90,199,140,48,212,180,70,120,9,192,245,177,65,157,9,193,100,181,125,145,62,8,108,36,140,237,242,248,161,189,41,114,65,121,97,50,238,149,44,214,124,167,40,167,127,178,231,30,173,244,193,203,204,238,139,135,71,234,234,217,66,14,129,19,97,165,112,244,35,73,192,12,149,71,33,192,32,195,208,173,233,202,25,210,145,89,87,245,246,38,3,25,57,167,245,86,227,208,81,64,90,199,140,48,212,180,70,120,9,192,245,177,65,157,9,193,100,181,125,145,62,8,108,36,140,237,242,248,161,189,41,114,65,121,97,50,238,149,44,214,124,167,40,167,127,178,231,30,173,244,193,203,204,238,139,135,71,234,234,217,66,14,129,19,97,165,112,244,35,73,192,12,149,71,33,192,32,195,208,173,233,202,25,210,145,89,87,245,246,38,3,25,57,167,245,86,227,208,81,64,90,199,140,48,212,180,70,120,9,192,245,177,65,157,9,193,100,181,125,145,62,8,108,36,140,237,242,248],G:[182,46,78,199,79,89,41,208,135,20,154,35,21,43,230,113,191,147,208,37,28,27,86,203,25,209,148,187,139,111,48,102,76,110,106,130,37,160,34,222,90,165,245,222,102,47,19,130,4,232,137,211,240,11,140,21,42,22,241,61,99,115,199,166,114,190,204,60,233,66,115,230,125,103,203,125,13,176,94,131,39,198,167,124,67,175,254,1,15,198,62,237,159,31,218,58,244,47,61,67,94,46,78,199,79,89,41,208,135,20,154,35,21,43,230,113,191,147,208,37,28,27,86,203,25,209,148,187,139,111,48,102,76,110,106,130,37,160,34,222,90,165,245,222,102,47,19,130,4,232,137,211,240,11,140,21,42,22,241,61,99,115,199,166,114,190,204,60,233,66,115,230,125,103,203,125,13,176,94,131,39,198,167,124,67,175,254,1,15,198,62,237,159,31,218,58,244,47,61,67,94,46,78,199,79,89,41,208,135,20,154,35,21,43,230,113,191,147,208,37,28,27,86,203,25,209,148,187,139,111,48,102,76,110,106,130,37,160,34,222,90,165,245,222,102,47,19,130,4,232,137,211,240,11,140,21],B:[191,154,43,10,207,204,164,231,136,58,239,30,147,230,101,111,150,35,128,57,252,79,173,120,25,126,81,85,8,7,122,237,190,152,246,182,130,219,67,76,167,178,235,250,28,61,186,250,199,67,58,50,86,182,108,77,89,112,59,125,226,50,205,227,125,128,104,27,59,66,53,133,159,203,97,125,139,159,158,7,215,47,140,226,223,231,44,110,184,61,233,47,67,148,22,120,173,156,117,181,94,154,43,10,207,204,164,231,136,58,239,30,147,230,101,111,150,35,128,57,252,79,173,120,25,126,81,85,8,7,122,237,190,152,246,182,130,219,67,76,167,178,235,250,28,61,186,250,199,67,58,50,86,182,108,77,89,112,59,125,226,50,205,227,125,128,104,27,59,66,53,133,159,203,97,125,139,159,158,7,215,47,140,226,223,231,44,110,184,61,233,47,67,148,22,120,173,156,117,181,94,154,43,10,207,204,164,231,136,58,239,30,147,230,101,111,150,35,128,57,252,79,173,120,25,126,81,85,8,7,122,237,190,152,246,182,130,219,67,76,167,178,235,250,28,61,186,250,199,67,58,50,86,182,108,77],A:[0,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64],I:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},red_default={R:[0,128,255],G:[0,0,0],B:[0,0,0],A:[0,64,128],I:[0,128,255]},redyell_default={R:[192,224,255],G:[1,128,255],B:[0,0,0],A:[0,64,128],I:[0,128,255]},rocket_default={R:[3,112,144,188,236,246,255],G:[5,31,29,22,76,158,250],B:[26,87,91,86,62,117,235],A:[0,30,38,49,67,85,107],I:[0,73,92,118,160,205,255]},surface_default={R:[1,240,255],G:[1,128,255],B:[1,128,255],A:[0,76,128],I:[0,153,255]},turbo_default={R:[48,48,64,70,65,25,132,195,244,254,218,122],G:[18,18,64,107,150,226,255,241,199,158,57,4],B:[59,59,162,227,255,187,81,52,58,47,7,3],A:[0,22,26,30,34,43,52,57,63,67,77,86],I:[0,1,16,32,49,83,118,140,164,181,219,255]},violet_default={R:[0,128,255],G:[0,0,0],B:[0,128,255],A:[0,64,128],I:[0,128,255]},viridis_default={R:[68,49,53,253],G:[1,104,183,231],B:[84,142,121,37],A:[0,56,80,88],I:[0,64,192,255]},warm_default={R:[255,255,255],G:[127,196,254],B:[0,0,0],A:[0,64,128],I:[0,128,255]},winter_default={R:[0,0,0],G:[0,128,255],B:[255,196,128],A:[0,64,128],I:[0,128,255]},x_rain_default={R:[3,64,0,0,255,255,255],G:[0,0,0,255,255,192,3],B:[0,32,48,56,64,96,128],A:[0,8,16,24,32,52,80],I:[0,32,64,96,160,192,255]},afni_blues_inv_default={min:0,max:0,R:[0,37],G:[242,0],B:[255,255],A:[0,64],I:[0,255]},afni_reds_inv_default={R:[255,255],G:[255,11],B:[0,0],A:[0,64],I:[0,255]},roi_i256_default={min:0,max:0,R:[65,10,223,120,216,207,251,93,252,217,21,253,131,165,173,143,144,217,86,89,63,254,172,1,142,107,42,78,221,8,222,71,127,126,167,33,104,2,208,216,0,251,7,105,2,101,248,190,253,62,255,224,166,37,110,138,45,34,6,37,69,201,43,122,199,37,173,194,103,211,75,159,96,4,239,98,110,193,253,166,40,255,48,130,140,243,101,9,177,220,133,32,4,81,48,48,210,109,60,132,1,119,1,159,247,33,212,187,253,144,196,254,168,79,64,196,39,97,73,173,104,216,217,43,101,119,254,5,237,103,203,122,57,87,251,164,19,75,200,2,252,150,66,0,255,157,23,254,55,16,240,161,69,253,207,195,5,60,255,251,200,217,134,123,253,180,27,246,130,136,250,232,4,125,140,22,253,255,13,180,123,61,254,111,10,185,76,192,255,223,186,61,198,5,172,13,83,172,171,6,23,73,134,133,109,61,213,55,57,132,36,209,2,144,1,253,68,155,3,160,2,77,121,70,67,176,223,131,4,162,232,255,150,94,235,191,207,10,246,0,225,4,209,116,57,112,172,253,1,6,92,227,73,62,135,223],G:[162,50,112,245,4,124,176,243,56,125,183,139,182,68,189,4,225,10,20,223,7,46,31,193,225,250,219,41,2,100,83,181,34,150,72,223,168,248,80,253,7,117,214,2,248,10,3,59,179,160,90,244,146,4,207,4,125,255,96,100,1,208,130,51,116,181,236,53,244,5,165,28,181,86,96,42,254,1,134,194,214,92,41,204,137,86,207,3,143,3,100,239,164,94,65,251,131,244,173,57,143,107,217,53,210,0,148,250,45,198,81,40,61,218,252,88,171,0,248,24,248,4,41,100,187,46,208,145,43,168,121,46,175,250,125,107,233,112,207,231,174,215,53,9,43,153,52,124,128,65,210,147,255,147,63,200,148,254,0,179,241,42,239,2,230,8,82,135,87,16,3,87,86,151,254,8,255,86,53,19,7,192,171,201,253,247,197,103,251,126,0,149,54,183,61,126,79,113,10,103,184,75,11,195,222,136,149,131,8,99,240,177,252,255,198,16,7,68,178,66,191,150,73,26,211,109,78,209,240,254,1,166,247,131,2,0,167,127,133,10,43,99,235,3,214,142,176,82,132,38,10,249,255,215,44,81],B:[176,182,248,37,117,35,96,69,32,152,108,20,237,250,2,89,141,216,111,251,211,149,10,44,214,103,31,251,3,32,252,246,97,1,219,167,197,4,36,116,206,118,106,43,205,204,114,69,127,205,87,80,41,251,145,204,253,161,247,1,149,9,43,253,97,72,136,161,171,181,26,255,108,80,218,214,231,255,84,31,109,4,218,3,217,36,68,85,241,39,221,2,240,2,173,42,206,5,110,46,103,27,212,184,2,207,246,45,116,72,110,253,38,105,248,159,243,81,192,93,141,145,24,157,234,131,57,178,62,75,65,176,148,40,253,66,76,240,51,154,17,251,139,253,207,9,114,49,200,254,96,73,138,118,204,102,137,89,145,161,4,112,66,234,147,178,212,205,185,11,203,131,2,250,118,169,1,185,154,53,171,197,61,175,249,96,15,254,95,5,222,75,246,194,2,61,180,25,133,165,15,233,59,35,221,140,109,7,114,255,198,0,115,168,252,23,242,80,75,142,137,255,12,182,68,201,4,111,37,228,83,248,24,192,249,5,54,223,160,122,160,114,145,119,252,31,253,250,10,214,8,47,0,142,222,70],A:[0,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64],I:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},ColorTables=class{constructor(){__publicField(this,"gamma",1),__publicField(this,"version",.1),__publicField(this,"cluts",{});const u=Object.keys(cmaps_exports).filter(m=>!m.startsWith("$")).sort(new Intl.Collator("en").compare);for(const m of u)this.cluts[m]=cmaps_exports[m]}addColormap(T,u){this.cluts[T]=u}colormaps(){return Object.keys(this.cluts)}colorMaps(){return this.colormaps()}colormapFromKey(T){let u=this.cluts[T];return u!==void 0||(u=this.cluts[T.toLowerCase()],u!==void 0)?u:(T.length>0&&log.warn("No color map named "+T),{min:0,max:0,R:[0,255],G:[0,255],B:[0,255],A:[0,255],I:[0,255]})}colormap(T="",u=!1){const m=this.colormapFromKey(T);return this.makeLut(m.R,m.G,m.B,m.A,m.I,u)}makeLabelLut(T,u=255){if(T.R===void 0||T.G===void 0||T.B===void 0)throw new Error(`Invalid colormap table: ${T}`);const m=T.R.length,A=T.I??[...Array(m).keys()];if(m!==T.G.length||m!==T.B.length||m!==A.length)throw new Error(`colormap does not make sense: ${T}`);let S=new Uint8ClampedArray(m).fill(u);S[0]=0,T.A!==void 0&&(S=Uint8ClampedArray.from(T.A));const v=Math.min(...A),w=Math.max(...A),D=w-v+1,R=new Uint8ClampedArray(D*4).fill(0);for(let P=0;P0)for(let w=0;w"u"){d=new Uint8ClampedArray(w).fill(0);for(let e=0;e"u"&&(P=new Uint8ClampedArray(w).fill(64),P[0]=0);for(let e=0;e0&&(A[w]=!0);const S=u.length/3;let v=0;for(let w=0;w0&&(z=1/Math.sqrt(z),m[0]*=z,m[1]*=z,m[2]*=z),N[A]=m[0],N[A+1]=m[1],N[A+2]=m[2]}return N}},utiltiesLogger=log,NVMeshLoaders=class Xi{static readTRACT(u){const m=u.byteLength;if(m<20)throw new Error("File too small to be niml.tract: bytes = "+m);const A=new DataView(u),S=new Uint8Array(u);let v=0;function w(){for(;v=1&&c0<=2)d0=4;else if(c0>=3&&c0<=4)d0=2;else if(c0===5)d0=1;else if(c0!==0)throw new Error("impossible Matlab v4 datatype");if(z+=Q,Y>50)throw new Error("Does not appear to be little-endian V4 Matlab file");const S0=z+f*d0;e0[o0]=j(c0,z,S0),z=S0}for(;z+20>10,z=N&1023;return(N>>15?-1:1)*(q?q===31?z?NaN:1/0:Math.pow(2,q-15)*(1+z/1024):6103515625e-14*(z/1024))}let A=0,S=0,v=new Float32Array([]);const w=[],D=[],R=[],L=[];let P=[],d=!1;const E=unzipSync$1(new Uint8Array(u),{filter(N){return N.originalSize>0}}),e=Object.keys(E);for(let N=0,q=e.length;N2||v!==1e3||A!==1128354388)throw new Error("Not a valid TRK file");const w=m.getInt16(36,!0),D=[];for(let l0=0;l00)for(let p0=0;p00)for(let o0=0;o0=L);z++)P[d]=parseFloat(q[z]),d++}const E=[];for(w++;S[w].length<1;)w++;if(D=S[w].trim().split(/\s+/),w++,D[0].includes("LINES")){const N=parseInt(D[1]);if(N<1)throw new Error("Corrupted VTK ASCII");let q=S[w].trim();const z=[];let e0=[];if(q.startsWith("OFFSETS")){w++;let H=0;for(;H=N));y++);}e0=Array.from(P)}else{let H=function(){q=S[w].trim();const G=q.trim().split(/\s+/);y=[];for(let J=0;J=y.length&&H();const J=y[Y++];j+=J,z[G+1]=j;for(let i0=0;i0=y.length&&H();const Q=y[Y++]*3;e0.push(P[Q+0]),e0.push(P[Q+1]),e0.push(P[Q+2])}}}return{pts:Float32Array.from(e0),offsetPt0:Uint32Array.from(z)}}else if(D[0].includes("TRIANGLE_STRIPS")){const N=parseInt(D[1]);for(let q=0;q1&&H.pop()&&(j=j.split(".").slice(0,-1).join("."));const y=Xi.readTSF(m,e0);A.dpv||(A.dpv=[]);const Y=y.reduce((J,i0)=>Math.min(J,i0)),G=y.reduce((J,i0)=>Math.max(J,i0));return A.dpv.push({id:j,vals:Float32Array.from(y.slice()),global_min:Y,global_max:G,cal_min:Y,cal_max:G}),d}if(N<3){log.error("n_vert < 3 in layer");return}if(e==="MZ3")d.values=Xi.readMZ3(m,N);else if(e==="ANNOT"){const e0=Xi.readANNOT(m,N,!0);e0 instanceof Uint32Array?d.values=e0:(d.values=e0.scalars,d.colormapLabel=e0.colormapLabel)}else if(e==="CRV"||e==="CURV")d.values=Xi.readCURV(m,N),d.isTransparentBelowCalMin=!1;else if(e==="GII"){const e0=Xi.readGII(m,N);d.values=e0.scalars,d.colormapLabel=e0.colormapLabel}else if(e==="MGH"||e==="MGZ"){const e0=Xi.readMGH(m,N,!0);"scalars"in e0?(d.values=e0.scalars,d.colormapLabel=e0.colormapLabel):d.values=e0}else if(e==="NII")d.values=Xi.readNII(m,N,A.anatomicalStructurePrimary);else if(e==="SMP")d.values=Xi.readSMP(m,N);else if(e==="STC")d.values=Xi.readSTC(m,N);else return log.warn("Unknown layer overlay format "+u),d;if(!d.values){log.error("no values in layer");return}d.nFrame4D=d.values.length/N,d.frame4D=0,d.outlineBorder=P;let q=d.values[0],z=d.values[0];for(let e0=0;e05){const d=decompressSync$1(new Uint8Array(u));S=new DataView(d.buffer),v=S.getUint16(0,!0),u=d.buffer}v>5&&log.error("Unsupported or invalid BrainVoyager SMP version "+v);const w=S.getUint32(2,!0);w!==m&&log.error("SMP file has "+w+" vertices, background mesh has "+m);const D=S.getUint16(6,!0),R=new Float32Array(w*D);let L=9;function P(){const d=L;for(;L=3&&E.mapType===3&&(E.nLags=S.getUint32(L,!0),L+=4,E.mnLag=S.getUint32(L,!0),L+=4,E.mxLag=S.getUint32(L,!0),L+=4,E.ccOverlay=S.getUint32(L,!0),L+=4),E.clusterSize=S.getUint32(L,!0),L+=4,E.clusterCheck=S.getUint8(L),L+=1,E.critThresh=S.getFloat32(L,!0),L+=4,E.maxThresh=S.getFloat32(L,!0),L+=4,v>=4&&(E.includeValuesGreaterThreshMax=S.getUint32(L,!0),L+=4),E.df1=S.getUint32(L,!0),L+=4,E.df2=S.getUint32(L,!0),L+=4,v>=5?(E.posNegFlag=S.getUint32(L,!0),L+=4):E.posNegFlag=3,E.cortexBonferroni=S.getUint32(L,!0),L+=4,E.posMinRGB=[0,0,0],E.posMaxRGB=[0,0,0],E.negMinRGB=[0,0,0],E.negMaxRGB=[0,0,0],v>=2&&(E.posMinRGB[0]=S.getUint8(L),L++,E.posMinRGB[1]=S.getUint8(L),L++,E.posMinRGB[2]=S.getUint8(L),L++,E.posMaxRGB[0]=S.getUint8(L),L++,E.posMaxRGB[1]=S.getUint8(L),L++,E.posMaxRGB[2]=S.getUint8(L),L++,v>=4&&(E.negMinRGB[0]=S.getUint8(L),L++,E.negMinRGB[1]=S.getUint8(L),L++,E.negMinRGB[2]=S.getUint8(L),L++,E.negMaxRGB[0]=S.getUint8(L),L++,E.negMaxRGB[1]=S.getUint8(L),L++,E.negMaxRGB[2]=S.getUint8(L),L++),E.enableSMPColor=S.getUint8(L),L++,v>=4&&(E.lut=P()),E.colorAlpha=S.getFloat32(L,!0),L+=4),E.name=P();const e=new Float32Array(u,L,w);R.set(e,d*w),L+=w*4}return R}static readSTC(u,m){const A=new DataView(u),S=A.getInt32(8,!1);if(S!==m)throw new Error("Overlay has "+S+" vertices, expected "+m);let v=12+S*4;const w=A.getUint32(v,!1);v+=4;const D=new Float32Array(w*S);for(let R=0;R0)return D;const d=S.getInt32(w+=4,!1),E=S.getInt32(w+=4,!1);w+=E;const e=S.getInt32(w+=4,!1);if(e<1)return D;const N={R:Array(d).fill(0),G:Array(d).fill(0),B:Array(d).fill(0),A:Array(d).fill(0),I:Array(d).fill(0),labels:Array(d).fill("")};for(let H=0;H=d){log.warn("annot entry out of range");continue}N.R[j]=G,N.G[j]=J,N.B[j]=i0,N.A[j]=Q,N.I[j]=(Q<<24)+(i0<<16)+(J<<8)+G,N.labels[j]=Y}const q=new Float32Array(v);q.fill(-1);let z=0;for(let H=0;H0&&log.error(`annot vertex colors do not match ${z} of ${v} vertices.`);for(let H=0;H=D*3)break;d[L+2]=parseInt(e[0])-1,d[L+1]=parseInt(e[1])-1,d[L+0]=parseInt(e[2])-1,L+=3}return{positions:P,indices:d}}static readASC(u){const m=u.byteLength,A=new Uint8Array(u);let S=0;function v(){for(;S65535)throw new Error("Invalid VTK binary polygons using little-endian data (MRtrix)");S+=4;const H=E.getInt32(S,!1);S+=4;let j=E.getInt32(S,!1);S+=4;for(let y=0;y=0&&(E=new Float32Array(u,R,D*3)),{positions:d,indices:P,colors:E}}static readMZ3(u,m=0){if(u.byteLength<20)throw new Error("File too small to be mz3: bytes = "+u.byteLength);let A=new DataView(u),S=A.getUint16(0,!0),v=u;if(S===35615||S===8075){const G=decompressSync$1(new Uint8Array(u));A=new DataView(G.buffer),S=A.getUint16(0,!0),v=G.buffer}const w=A.getUint16(2,!0),D=A.getUint32(4,!0);let R=A.getUint32(8,!0);const L=A.getUint32(12,!0);if(utiltiesLogger.debug("MZ3 magic %d attr %d face %d vert %d skip %d",S,w,D,R,L),S!==23117)throw new Error("Invalid MZ3 file");const P=(w&1)!==0,d=(w&2)!==0,E=(w&4)!==0;let e=(w&8)!==0;const N=(w&16)!==0;if(w>63)throw new Error("Unsupported future version of MZ3 file");let q=4;N&&(q=8);let z=0;if(m>0&&!P&&D<1&&!E&&(e=!0),e){let G=m;m===0&&(G=R);const J=16+L+(P?1:0)*D*12+(d?1:0)*G*12+(E?1:0)*G*4,i0=Math.floor((v.byteLength-J)/q);R!==m&&i0%m===0&&(log.warn("Issue 729: mz3 mismatch scalar NVERT does not match mesh NVERT"),R=m),z=Math.floor(i0/R),z<1&&(log.warn("Corrupt MZ3: file reports NSCALAR but not enough bytes"),e=!1)}if(R<3&&m<3)throw new Error("Not a mesh MZ3 file (maybe scalar)");m>0&&m!==R&&log.warn("Layer has "+R+"vertices, but background mesh has "+m);let e0=16+L,H=null;P&&(H=new Uint32Array(v,e0,D*3),e0+=D*3*4);let j=null;d&&(j=new Float32Array(v,e0,R*3),e0+=R*3*4);let y=null;if(E){y=new Float32Array(R*3);const G=new Uint8Array(v,e0,R*4);e0+=R*4;let J=0,i0=0;for(let Q=0;Q0){if(N){const G=new Float64Array(v,e0,z*R);Y=Float32Array.from(G)}else Y=new Float32Array(v,e0,z*R);e0+=q*z*R}return m>0?Y:{positions:j,indices:H,scalars:Y,colors:y}}static readPLY(u){const m=u.byteLength,A=new Uint8Array(u);let S=0;function v(){for(;Sf.length){const T0=new Uint32Array(f.length+f.length);T0.set(f),f=T0.slice()}const S0=parseInt(c0[e0+1]);let p0=parseInt(c0[e0+2]);for(let T0=0;T0>0&255)/255,(u>>8&255)/255,(u>>16&255)/255,(u>>24&255)/255]}};__publicField(_NiivueObject3D,"BLEND",1);__publicField(_NiivueObject3D,"CULL_FACE",2);__publicField(_NiivueObject3D,"CULL_FRONT",4);__publicField(_NiivueObject3D,"CULL_BACK",8);__publicField(_NiivueObject3D,"ENABLE_DEPTH_TEST",16);__publicField(_NiivueObject3D,"generateCrosshairs",function(T,u,m,A,S,v,w=20,D=0){const R=_NiivueObject3D.generateCrosshairsGeometry(T,m,A,S,v,w,D);return new _NiivueObject3D(u,R.vertexBuffer,T.TRIANGLES,R.indexCount,R.indexBuffer,R.vao)});__publicField(_NiivueObject3D,"generateCrosshairsGeometry",function(T,u,m,A,S,v=20,w=0){const D=[],R=[],L=S*w;if(L<=0){let e=fromValues$2(m[0],u[1],u[2]),N=fromValues$2(A[0],u[1],u[2]);_NiivueObject3D.makeCylinder(D,R,e,N,S,v),e=fromValues$2(u[0],m[1],u[2]),N=fromValues$2(u[0],A[1],u[2]),_NiivueObject3D.makeCylinder(D,R,e,N,S,v),e=fromValues$2(u[0],u[1],m[2]),N=fromValues$2(u[0],u[1],A[2]),_NiivueObject3D.makeCylinder(D,R,e,N,S,v)}else{let e=fromValues$2(m[0],u[1],u[2]),N=fromValues$2(u[0]-L,u[1],u[2]);_NiivueObject3D.makeCylinder(D,R,e,N,S,v,!1),e=fromValues$2(u[0]+L,u[1],u[2]),N=fromValues$2(A[0],u[1],u[2]),_NiivueObject3D.makeCylinder(D,R,e,N,S,v,!1),e=fromValues$2(u[0],m[1],u[2]),N=fromValues$2(u[0],u[1]-L,u[2]),_NiivueObject3D.makeCylinder(D,R,e,N,S,v,!1),e=fromValues$2(u[0],u[1]+L,u[2]),N=fromValues$2(u[0],A[1],u[2]),_NiivueObject3D.makeCylinder(D,R,e,N,S,v,!1),e=fromValues$2(u[0],u[1],m[2]),N=fromValues$2(u[0],u[1],u[2]-L),_NiivueObject3D.makeCylinder(D,R,e,N,S,v,!1),e=fromValues$2(u[0],u[1],u[2]+L),N=fromValues$2(u[0],u[1],A[2]),_NiivueObject3D.makeCylinder(D,R,e,N,S,v,!1)}const P=T.createBuffer();if(P===null)throw new Error("could not instantiate vertex buffer");T.bindBuffer(T.ARRAY_BUFFER,P),T.bufferData(T.ARRAY_BUFFER,new Float32Array(D),T.STATIC_DRAW);const d=T.createBuffer();if(d===null)throw new Error("could not instantiate index buffer");T.bindBuffer(T.ELEMENT_ARRAY_BUFFER,d),T.bufferData(T.ELEMENT_ARRAY_BUFFER,new Uint32Array(R),T.STATIC_DRAW);const E=T.createVertexArray();return T.bindVertexArray(E),T.bindBuffer(T.ELEMENT_ARRAY_BUFFER,d),T.bindBuffer(T.ARRAY_BUFFER,P),T.enableVertexAttribArray(0),T.vertexAttribPointer(0,3,T.FLOAT,!1,0,0),T.bindVertexArray(null),{vertexBuffer:P,indexBuffer:d,indexCount:R.length,vao:E}});__publicField(_NiivueObject3D,"getFirstPerpVector",function(T){const u=fromValues$2(0,0,0);return T[0]===0?u[0]=1:T[1]===0?u[1]=1:T[2]===0?u[2]=1:(u[0]=T[2],u[1]=T[2],u[2]=-(T[0]+T[1]),normalize$1(u,u)),u});__publicField(_NiivueObject3D,"subdivide",function(T,u){let m=T.length/3,A=u.length/3;const S=A,v=create$2(),w=create$2();for(let D=0;Ditksnap_default,$slicer3d:()=>slicer3d_default,actc:()=>actc_default,afni_blues_inv:()=>afni_blues_inv_default,afni_reds_inv:()=>afni_reds_inv_default,bcgwhw:()=>bcgwhw_default,bcgwhw_dark:()=>bcgwhw_dark_default,blue:()=>blue_default,blue2cyan:()=>blue2cyan_default,blue2magenta:()=>blue2magenta_default,blue2red:()=>blue2red_default,bluegrn:()=>bluegrn_default,bone:()=>bone_default,bronze:()=>bronze_default,cet_l17:()=>cet_l17_default,cividis:()=>cividis_default,cool:()=>cool_default,copper:()=>copper_default,copper2:()=>copper2_default,ct_airways:()=>ct_airways_default,ct_artery:()=>ct_artery_default,ct_bones:()=>ct_bones_default,ct_brain:()=>ct_brain_default,ct_brain_gray:()=>ct_brain_gray_default,ct_cardiac:()=>ct_cardiac_default,ct_head:()=>ct_head_default,ct_kidneys:()=>ct_kidneys_default,ct_liver:()=>ct_liver_default,ct_muscles:()=>ct_muscles_default,ct_scalp:()=>ct_scalp_default,ct_skull:()=>ct_skull_default,ct_soft:()=>ct_soft_default,ct_soft_tissue:()=>ct_soft_tissue_default,ct_surface:()=>ct_surface_default,ct_vessels:()=>ct_vessels_default,ct_w_contrast:()=>ct_w_contrast_default,cubehelix:()=>cubehelix_default,electric_blue:()=>electric_blue_default,freesurfer:()=>freesurfer_default,ge_color:()=>ge_color_default,gold:()=>gold_default,gray:()=>gray_default,green:()=>green_default,green2cyan:()=>green2cyan_default,green2orange:()=>green2orange_default,hot:()=>hot_default,hotiron:()=>hotiron_default,hsv:()=>hsv_default,inferno:()=>inferno_default,jet:()=>jet_default,linspecer:()=>linspecer_default,magma:()=>magma_default,mako:()=>mako_default,nih:()=>nih_default,plasma:()=>plasma_default,random:()=>random_default,red:()=>red_default,redyell:()=>redyell_default,rocket:()=>rocket_default,roi_i256:()=>roi_i256_default,surface:()=>surface_default,turbo:()=>turbo_default,violet:()=>violet_default,viridis:()=>viridis_default,warm:()=>warm_default,winter:()=>winter_default,x_rain:()=>x_rain_default});var itksnap_default={R:[0,255,0,0,255,0,255,255,0,205,210,102,0,0,46,255,106,221,233,165,255,147,218,75,255,60,255,255,218,0,188,255,255,222,127,139,124,255,70,0,238,238,240,245,184,32,255,25,112,34,248,245,255,144,173,65,255,250,128,50,244,255,123,255,173,255,127,255,143,220,253,255,0,0,128,255,250,148,178,255,135,100,240,250,255,107,135,0,139,245,186,255,255,0,210,255,47,72,175,128,176,255,139,240,255,216,119,219,72,255,199,154,189,240,230,0,85,64,153,205,250,95,0,255,224,176,138,30,240,152,160],G:[0,0,255,0,255,255,0,239,0,133,180,205,0,139,139,228,90,160,150,42,250,112,112,0,182,179,235,228,165,128,143,105,218,184,255,69,252,255,130,100,130,232,255,222,134,178,20,25,128,139,248,255,160,238,255,105,99,240,0,205,164,255,104,165,216,192,255,140,188,20,245,250,206,255,0,250,128,0,34,127,206,149,230,235,245,142,206,0,0,245,85,228,222,191,105,248,79,61,238,128,224,240,0,255,215,191,136,112,209,0,21,205,183,248,230,250,107,224,50,92,250,158,128,69,255,196,43,144,128,251,82],B:[0,0,0,255,0,255,255,213,205,63,140,170,128,139,87,225,205,221,122,42,250,219,214,130,193,113,205,196,32,128,143,180,185,135,0,19,0,224,180,0,238,170,240,179,11,170,147,112,144,34,255,250,122,144,47,225,71,230,0,50,96,240,238,0,230,203,212,0,143,60,230,240,209,127,128,205,114,211,34,80,235,237,140,215,238,35,250,139,139,220,211,181,173,255,30,220,79,139,238,0,230,245,0,255,0,216,153,147,204,255,133,50,107,255,250,154,47,208,204,92,210,160,0,0,255,222,226,255,128,152,45],A:[0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],I:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130]},slicer3d_default={labels:["background","tissue","bone","skin","connective tissue","blood","organ","mass","muscle","foreign object","waste","teeth","fat","gray matter","white matter","nerve","vein","artery","capillary","ligament","tendon","cartilage","meniscus","lymph node","lymphatic vessel","cerebro-spinal fluid","bile","urine","feces","gas","fluid","edema","bleeding","necrosis","clot","embolism","head","central nervous system","brain","gray matter of brain","telencephalon","cerebral cortex","right frontal lobe","left frontal lobe","right temporal lobe","left temporal lobe","right parietal lobe","left parietal lobe","right occipital lobe","left occipital lobe","right insular lobe","left insular lobe","right limbic lobe","left limbic lobe","right striatum","left striatum","right caudate nucleus","left caudate nucleus","right putamen","left putamen","right pallidum","left pallidum","right amygdaloid complex","left amygdaloid complex","diencephalon","thalamus","right thalamus","left thalamus","pineal gland","midbrain","substantia nigra","right substantia nigra","left substantia nigra","cerebral white matter","right superior longitudinal fasciculus","left superior longitudinal fasciculus","right inferior longitudinal fasciculus","left inferior longitudinal fasciculus","right arcuate fasciculus","left arcuate fasciculus","right uncinate fasciculus","left uncinate fasciculus","right cingulum bundle","left cingulum bundle","projection fibers","right corticospinal tract","left corticospinal tract","right optic radiation","left optic radiation","right medial lemniscus","left medial lemniscus","right superior cerebellar peduncle","left superior cerebellar peduncle","right middle cerebellar peduncle","left middle cerebellar peduncle","right inferior cerebellar peduncle","left inferior cerebellar peduncle","optic chiasm","right optic tract","left optic tract","right fornix","left fornix","commissural fibers","corpus callosum","posterior commissure","cerebellar white matter","CSF space","ventricles of brain","right lateral ventricle","left lateral ventricle","right third ventricle","left third ventricle","cerebral aqueduct","fourth ventricle","subarachnoid space","spinal cord","gray matter of spinal cord","white matter of spinal cord","endocrine system of brain","pituitary gland","adenohypophysis","neurohypophysis","meninges","dura mater","arachnoid","pia mater","muscles of head","salivary glands","lips","nose","tongue","soft palate","right inner ear","left inner ear","right external ear","left external ear","right middle ear","left middle ear","right eyeball","left eyeball","skull","right frontal bone","left frontal bone","right parietal bone","left parietal bone","right temporal bone","left temporal bone","right sphenoid bone","left sphenoid bone","right ethmoid bone","left ethmoid bone","occipital bone","maxilla","right zygomatic bone","right lacrimal bone","vomer bone","right palatine bone","left palatine bone","mandible","neck","muscles of neck","pharynx","larynx","thyroid gland","right parathyroid glands","left parathyroid glands","skeleton of neck","hyoid bone","cervical vertebral column","thorax","trachea","bronchi","right lung","left lung","superior lobe of right lung","superior lobe of left lung","middle lobe of right lung","inferior lobe of right lung","inferior lobe of left lung","pleura","heart","right atrium","left atrium","atrial septum","ventricular septum","right ventricle of heart","left ventricle of heart","mitral valve","tricuspid valve","aortic valve","pulmonary valve","aorta","pericardium","pericardial cavity","esophagus","thymus","mediastinum","skin of thoracic wall","muscles of thoracic wall","skeleton of thorax","thoracic vertebral column","ribs","sternum","right clavicle","left clavicle","abdominal cavity","abdomen","peritoneum","omentum","peritoneal cavity","retroperitoneal space","stomach","duodenum","small bowel","colon","anus","liver","biliary tree","gallbladder","pancreas","spleen","urinary system","right kidney","left kidney","right ureter","left ureter","urinary bladder","urethra","right adrenal gland","left adrenal gland","female internal genitalia","uterus","right fallopian tube","left fallopian tube","right ovary","left ovary","vagina","male internal genitalia","prostate","right seminal vesicle","left seminal vesicle","right deferent duct","left deferent duct","skin of abdominal wall","muscles of abdominal wall","skeleton of abdomen","lumbar vertebral column","female external genitalia","male external genitalia","skeleton of upper limb","muscles of upper limb","right upper limb","left upper limb","right shoulder","left shoulder","right arm"],R:[0,128,241,177,111,216,221,144,192,220,78,255,230,200,250,244,0,216,183,183,152,111,178,68,111,85,0,214,78,218,170,140,188,216,145,150,177,244,250,200,68,128,83,83,162,162,141,141,182,182,188,188,154,154,177,177,30,30,210,210,48,48,98,98,69,166,122,122,253,145,46,0,0,250,127,127,159,159,125,125,106,106,154,154,126,201,201,78,78,174,174,139,139,148,148,186,186,99,156,156,64,64,138,97,126,194,85,88,88,88,88,88,88,88,88,244,200,250,82,57,60,92,255,255,255,255,201,70,188,177,166,182,229,229,174,174,201,201,194,194,241,203,203,229,229,255,255,209,209,248,248,255,196,255,255,255,242,242,222,177,213,184,150,62,62,62,242,250,255,177,182,175,197,197,172,172,202,224,224,255,206,210,203,233,195,181,152,159,166,218,225,224,255,184,211,47,255,173,188,255,226,253,244,205,205,186,177,255,234,204,180,216,255,205,204,255,221,0,139,249,157,203,185,185,247,247,222,124,249,249,244,255,255,227,213,213,193,216,230,245,245,241,241,177,171,217,212,185,185,198,194,177,177,177,177,177],G:[0,174,214,122,184,101,130,238,104,245,63,250,220,200,250,214,151,101,156,214,189,184,212,172,197,188,145,230,63,255,250,224,65,191,60,98,122,214,250,200,131,174,146,146,115,115,93,93,166,166,135,135,150,150,140,140,111,111,157,157,129,129,153,153,110,113,101,101,135,92,101,108,108,250,150,150,116,116,102,102,174,174,146,146,126,160,160,152,152,140,140,126,126,120,120,135,135,106,171,171,123,123,95,113,161,195,188,106,106,106,106,106,106,106,106,214,200,250,174,157,143,162,244,244,244,244,121,163,91,122,84,105,147,147,122,122,112,112,142,142,213,179,179,204,204,243,243,185,185,223,223,230,172,255,250,237,217,217,198,122,124,105,208,162,162,162,206,210,255,122,228,216,165,165,138,138,164,186,186,245,110,115,108,138,100,85,55,63,70,123,130,97,244,122,171,150,244,121,95,239,202,232,217,179,179,124,122,255,234,142,119,132,253,167,168,224,130,145,150,180,108,136,102,102,182,182,154,186,186,186,170,181,190,153,141,141,123,146,158,172,172,172,172,124,85,198,188,135,135,175,98,122,122,122,122,122],B:[0,128,145,101,210,79,101,144,88,20,0,220,70,235,210,49,206,79,220,211,207,210,242,100,131,255,30,130,0,255,250,228,28,216,66,83,101,49,225,215,98,128,164,164,105,105,137,137,110,110,166,166,201,201,190,190,85,85,166,166,126,126,112,112,53,137,38,38,192,109,131,112,112,225,88,88,163,163,154,154,155,155,83,83,55,133,133,141,141,103,103,177,177,72,72,135,135,24,108,108,147,147,74,158,197,164,255,215,215,215,215,215,215,215,215,49,215,225,128,110,83,109,209,209,209,209,77,117,95,101,94,107,118,118,90,90,73,73,0,0,144,77,77,109,109,152,152,85,85,131,131,138,68,167,160,145,123,123,101,101,109,108,243,114,114,114,142,139,207,101,255,244,145,145,115,115,140,162,162,217,84,89,81,112,73,57,13,27,38,97,104,76,209,154,143,103,209,88,76,172,134,158,154,108,108,161,101,220,194,178,153,105,229,142,143,199,101,30,98,111,162,116,83,83,164,164,132,223,150,150,147,158,165,130,113,113,103,127,140,147,147,151,151,92,68,131,102,134,134,125,79,101,101,101,101,101],A:[0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255],I:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},actc_default={R:[0,0,24,248,255],G:[0,0,177,254,0],B:[0,136,0,0,0],A:[0,32,64,78,128],I:[0,64,128,156,255]},bcgwhw_dark_default={R:[0,248,242,235,229,222,212,202,193,183,173,145,117,78,39,0,0,0,0,0,0,64,128,191,255,255,255,255,255,238,221,204,214,224,235,245,255,249,242,236,229,223,217,210,204,197,191,184,176,169,161,154,146,139,132,124,117,109,102,0],G:[0,251,247,243,239,235,235,235,235,235,235,216,197,174,150,127,153,178,204,229,255,255,255,255,255,220,185,150,115,77,38,0,31,61,92,122,153,138,122,107,92,77,61,46,31,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0],B:[0,254,253,252,251,250,251,252,253,254,255,226,198,132,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,80,120,160,200,199,198,197,196,196,195,194,193,192,191,184,176,169,161,154,146,139,132,124,117,109,102,0],A:[256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256],I:[0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,255]},bcgwhw_default={R:[255,248,242,235,229,222,212,202,193,183,173,145,117,78,39,0,0,0,0,0,0,64,128,191,255,255,255,255,255,238,221,204,214,224,235,245,255,249,242,236,229,223,217,210,204,197,191,184,176,169,161,154,146,139,132,124,117,109,102,0],G:[255,251,247,243,239,235,235,235,235,235,235,216,197,174,150,127,153,178,204,229,255,255,255,255,255,220,185,150,115,77,38,0,31,61,92,122,153,138,122,107,92,77,61,46,31,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0],B:[255,254,253,252,251,250,251,252,253,254,255,226,198,132,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,80,120,160,200,199,198,197,196,196,195,194,193,192,191,184,176,169,161,154,146,139,132,124,117,109,102,0],A:[256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256,256],I:[0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,100,104,108,112,116,120,124,128,132,136,140,144,148,152,156,160,164,168,172,176,180,184,188,192,196,200,204,208,212,216,220,224,228,232,236,240,244,248,255]},blue2red_default={R:[0,0,0,0,196,255],G:[0,32,128,128,128,32],B:[0,255,196,0,0,0],A:[0,128,64,64,64,128],I:[0,1,64,128,192,255]},blue2magenta_default={R:[0,255],G:[0,0],B:[255,255],A:[0,128],I:[0,255]},blue2cyan_default={R:[0,0],G:[0,255],B:[255,255],A:[0,128],I:[0,255]},bluegrn_default={R:[0,0,0,0],G:[0,1,128,255],B:[0,222,127,32],A:[0,0,64,128],I:[0,1,128,255]},blue_default={R:[0,0,0],G:[0,0,0],B:[0,128,255],A:[0,64,128],I:[0,128,255]},bone_default={R:[0,103,255],G:[0,126,255],B:[0,165,255],A:[0,76,128],I:[0,153,255]},bronze_default={R:[0,43,103,199,216,255],G:[0,0,37,155,213,255],B:[0,0,20,97,201,255],A:[0,44,48,54,56,56],I:[0,64,128,196,240,255]},cet_l17_default={R:[0,9,24,33,40,46,52,57,62,66,70,74,78,81,85,88,91,94,98,101,103,106,109,112,114,117,119,121,124,126,128,130,133,135,137,139,141,143,145,147,149,151,153,155,157,159,161,163,164,166,168,169,171,172,174,175,177,178,180,181,183,184,186,187,189,190,191,193,194,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,222,223,224,224,225,226,226,227,228,228,229,229,230,231,231,232,233,233,234,234,235,235,236,236,236,237,237,237,238,238,238,239,239,239,240,240,240,241,241,241,242,242,242,243,243,243,243,243,243,243,243,244,244,244,244,244,244,244,244,244,244,244,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,243,243,243,243,243,243,243,243,243,243,243,243,242,242,242,242,242,242,242,242,241,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,243,243,244,244,245,246,246,247,247,248,249,249,250,250,251,251,252,252,253,253,254,254,254],G:[42,41,41,41,40,40,40,39,39,39,38,38,37,37,36,36,35,35,34,34,33,32,32,31,30,30,30,30,29,29,29,29,28,28,28,27,27,27,26,26,26,25,25,25,24,24,24,24,24,25,25,26,27,27,28,28,29,30,30,31,31,32,33,33,34,34,35,36,36,37,38,39,40,42,43,44,45,47,48,49,50,51,53,54,55,56,57,58,59,60,62,63,64,65,66,68,69,71,72,73,75,76,77,79,80,81,83,84,85,87,88,89,90,92,93,94,95,97,98,100,101,102,104,105,107,108,109,111,112,113,115,116,117,119,120,121,122,124,125,126,128,129,130,132,133,134,136,137,138,140,141,142,144,145,146,147,149,150,151,153,154,155,156,158,159,160,161,163,164,165,167,168,169,170,172,173,174,175,176,178,179,180,181,183,184,185,186,187,189,190,191,192,193,194,196,197,198,199,200,201,203,204,205,206,207,208,209,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,228,229,230,231,232,233,234,235,236,237,238,238,239,240,241,241,242,243,244,244,245,246,247,248,248,249,250,251,251,252,253,254,255],B:[167,167,166,166,166,165,165,165,164,164,164,163,163,162,162,162,161,161,161,160,160,160,159,159,158,158,157,157,156,155,155,154,154,153,153,152,151,151,150,150,149,149,148,147,147,146,146,145,144,144,143,143,142,141,141,140,139,139,138,137,137,136,135,135,134,133,133,132,131,131,130,130,129,128,128,127,127,126,125,125,124,124,123,123,122,121,121,120,119,119,118,118,117,116,116,116,115,115,114,114,113,113,113,112,112,111,111,110,110,109,109,109,108,108,107,107,106,106,106,106,106,105,105,105,105,105,105,105,104,104,104,104,104,103,103,103,103,103,102,102,102,103,103,103,103,104,104,104,104,104,105,105,105,105,106,106,106,106,106,107,107,107,107,108,108,109,110,111,111,112,113,113,114,115,115,116,117,117,118,119,120,120,121,122,122,123,124,125,126,128,129,130,131,132,134,135,136,137,138,140,141,142,143,144,146,147,148,149,150,152,153,155,157,158,160,162,163,165,167,168,170,172,173,175,177,178,180,182,183,185,187,188,190,193,196,199,201,204,207,210,212,215,218,221,224,226,229,232,235,238,240,243,246,249,252,255],A:[0,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64],I:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},cividis_default={R:[0,86,166,255],G:[32,92,156,233],B:[76,108,117,69],A:[0,56,80,88],I:[0,64,192,255]},cool_default={R:[0,0,0],G:[127,196,254],B:[255,255,255],A:[0,64,128],I:[0,128,255]},copper2_default={R:[0,61,122,183,244,255],G:[0,41,81,122,163,255],B:[0,25,51,76,102,255],A:[0,25,51,71,102,128],I:[0,51,102,153,204,255]},copper_default={R:[0,61,122,183,244,255],G:[0,41,81,122,163,203],B:[0,25,51,76,102,127],A:[0,25,51,71,102,128],I:[0,51,102,153,204,255]},ct_airways_default={min:-643,max:-235,R:[0,0,0],G:[154,154,154],B:[179,179,101],A:[0,32,0],I:[0,163,255]},ct_artery_default={min:114,max:800,R:[0,255,255,255],G:[0,0,129,255],B:[0,0,0,255],A:[0,64,88,228],I:[0,80,160,255]},ct_bones_default={min:180,max:600,R:[0,0,113,255],G:[0,0,109,250],B:[0,0,101,245],A:[0,0,100,160],I:[0,1,128,255]},ct_brain_gray_default={min:-10,max:110,R:[0,127,255],G:[0,127,255],B:[0,127,255],A:[0,48,128],I:[0,124,255]},ct_brain_default={min:-10,max:110,R:[0,199,255],G:[0,127,255],B:[0,127,255],A:[0,48,128],I:[0,124,255]},ct_cardiac_default={min:-80,max:1e3,R:[0,189,150,150,150,150,255],G:[0,169,54,54,54,54,240],B:[0,153,52,52,52,52,242],A:[0,32,64,0,0,64,64],I:[0,1,82,92,234,242,255]},ct_head_default={min:-590,max:600,R:[0,241,241,248,248,178,178,232,255,255,255],G:[0,156,156,222,222,36,36,51,255,255,255],B:[0,130,130,169,169,24,24,37,255,255,255],A:[0,8,0,0,0,64,64,0,0,222,222],I:[0,2,3,64,122,142,172,182,252,253,255]},ct_kidneys_default={min:114,max:302,R:[0,255,255],G:[0,129,255],B:[0,0,255],A:[0,88,228],I:[0,103,255]},ct_liver_default={min:-23,max:246,R:[0,44,255,255,255],G:[0,128,90,255,255],B:[0,0,70,0,255],A:[0,0,82,184,228],I:[0,64,131,196,255]},ct_muscles_default={min:-100,max:246,R:[0,128,159,255,255,255,255],G:[0,0,56,90,0,255,255],B:[0,0,41,70,0,0,255],A:[0,63,105,135,167,184,228],I:[0,100,128,155,180,209,255]},ct_scalp_default={min:-590,max:600,R:[0,241,241,248,248,178,232,255,255],G:[0,156,156,222,222,36,51,255,255],B:[0,130,130,169,169,24,37,255,255],A:[0,63,105,135,167,184,228,228,228],I:[0,1,52,127,137,162,172,252,255]},ct_skull_default={min:140,max:1024,R:[0,2,113,255],G:[0,1,109,250],B:[0,1,101,245],A:[0,1,96,168],I:[0,1,128,255]},ct_soft_default={min:-923,max:679,R:[0,0,0,0,0,255,255,255],G:[154,154,154,154,0,0,254,255],B:[179,179,179,179,0,0,0,255],A:[0,3,8,0,0,10,15,20],I:[0,30,62,88,170,200,232,255]},ct_soft_tissue_default={min:-10,max:110,R:[0,199,255],G:[0,127,255],B:[0,127,255],A:[0,48,128],I:[0,124,255]},ct_surface_default={min:-600,max:100,R:[0,134,255],G:[0,109,250],B:[0,101,245],A:[0,60,148],I:[0,128,255]},ct_vessels_default={min:114,max:246,R:[0,255,255],G:[0,128,255],B:[0,128,255],A:[0,64,96],I:[0,87,255]},ct_w_contrast_default={min:50,max:1e3,R:[98,210,169,128,255],G:[94,26,77,128,255],B:[45,21,74,128,255],A:[0,25,0,4,168],I:[0,41,87,154,255]},cubehelix_default={R:[0,13,21,26,27,25,22,21,22,28,39,54,75,98,124,148,171,189,202,210,213,211,206,200,195,193,195,201,211,225,240,255],G:[0,5,11,20,31,44,58,72,86,99,109,116,120,122,122,122,121,121,124,129,137,147,161,175,190,205,218,229,238,245,251,255],B:[0,14,30,46,61,71,77,78,75,68,60,52,48,47,53,65,83,105,131,157,183,205,222,235,241,243,242,240,239,240,245,255],A:[0,4,8,12,17,21,25,29,33,37,41,45,50,54,58,62,66,70,74,78,83,87,91,95,99,103,107,111,116,120,124,128],I:[0,8,16,25,33,41,49,58,66,74,82,90,99,107,115,123,132,140,148,156,165,173,181,189,197,206,214,222,230,239,247,255]},electric_blue_default={R:[0,10,136,255],G:[0,39,220,255],B:[0,223,253,255],A:[0,48,64,70],I:[0,92,192,255]},freesurfer_default={R:[0,245,205,120,196,220,230,0,122,236,12,204,42,119,220,103,60,255,165,160,0,245,205,120,196,220,230,0,122,236,13,220,103,255,165,160,0,120,200,255,255,164,164,164,234,0,0,0,0,0],G:[0,245,62,18,58,248,148,118,186,13,48,182,204,159,216,255,60,165,42,32,200,245,62,18,58,248,148,118,186,13,48,216,255,165,42,32,200,190,70,148,148,108,108,108,169,0,0,0,0,0],B:[0,245,78,134,250,164,34,14,220,176,255,142,164,176,20,255,60,0,42,240,200,245,78,134,250,164,34,14,220,176,255,20,255,0,42,240,221,150,255,10,10,226,226,226,30,64,112,160,208,255],A:[0,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64],I:[0,2,3,4,5,7,8,10,11,12,13,14,15,16,17,18,24,26,28,30,31,41,42,43,44,46,47,49,50,51,52,53,54,58,60,62,63,72,77,78,79,80,81,82,85,251,252,253,254,255]},ge_color_default={R:[0,0,128,255,255],G:[0,128,0,128,255],B:[0,125,255,0,255],A:[0,32,64,96,128],I:[0,63,128,192,255]},gold_default={R:[0,142,227,255],G:[0,85,170,255],B:[0,14,76,255],A:[0,42,84,128],I:[0,85,170,255]},gray_default={R:[0,255],G:[0,255],B:[0,255],A:[0,128],I:[0,255]},green_default={R:[0,0,0],G:[0,128,255],B:[0,0,0],A:[0,64,128],I:[0,128,255]},green2cyan_default={R:[0,0,0],G:[72,72,255],B:[0,255,255],A:[0,64,128],I:[0,88,255]},green2orange_default={R:[0,255,255],G:[72,88,255],B:[0,0,0],A:[0,64,128],I:[0,88,255]},hotiron_default={R:[0,255,255,255],G:[0,0,126,255],B:[0,0,0,255],A:[0,64,96,128],I:[0,128,191,255]},hot_default={R:[3,255,255,255],G:[0,0,255,255],B:[0,0,0,255],A:[0,48,96,128],I:[0,95,191,255]},hsv_default={R:[255,255,0,0,0,255,255],G:[0,255,255,255,0,0,0],B:[0,0,0,255,255,255,0],A:[0,14,28,43,57,71,85],I:[0,43,85,128,170,213,255]},inferno_default={R:[0,120,237,240],G:[0,28,105,249],B:[4,109,37,33],A:[0,56,80,88],I:[0,64,192,255]},jet_default={R:[0,0,127,255,127],G:[0,127,255,127,0],B:[127,255,127,0,0],A:[0,32,64,96,128],I:[0,63,128,192,255]},linspecer_default={R:[94,50,90,152,215,238,249,254,252,241,209,158],G:[79,131,186,214,240,244,237,210,157,100,57,1],B:[162,189,167,164,155,169,168,123,86,68,79,66],A:[0,12,23,35,47,58,70,81,93,105,116,128],I:[0,23,46,70,93,116,139,162,185,209,232,255]},magma_default={R:[0,148,183,223,247,252],G:[0,44,55,74,112,253],B:[4,128,121,104,92,191],A:[0,44,53,64,75,107],I:[0,107,128,154,179,255]},mako_default={R:[11,59,55,222],G:[4,45,165,245],B:[5,91,172,229],A:[0,23,70,107],I:[0,56,167,255]},nih_default={R:[0,85,0,0,0,0,0,0,85,255,255,255,172],G:[0,0,0,0,85,170,255,255,255,255,85,0,0],B:[0,170,85,255,255,170,170,0,85,0,0,0,0],A:[0,5,10,21,26,32,37,42,48,53,64,72,85],I:[0,15,31,63,79,95,111,127,143,159,191,217,255]},plasma_default={R:[13,156,237,240],G:[8,23,121,249],B:[135,158,83,33],A:[0,56,80,88],I:[0,64,192,255]},random_default={R:[208,71,33,192,32,195,208,173,233,202,25,210,145,89,87,245,246,38,3,25,57,167,245,86,227,208,81,64,90,199,140,48,212,180,70,120,9,192,245,177,65,157,9,193,100,181,125,145,62,8,108,36,140,237,242,248,161,189,41,114,65,121,97,50,238,149,44,214,124,167,40,167,127,178,231,30,173,244,193,203,204,238,139,135,71,234,234,217,66,14,129,19,97,165,112,244,35,73,192,12,149,71,33,192,32,195,208,173,233,202,25,210,145,89,87,245,246,38,3,25,57,167,245,86,227,208,81,64,90,199,140,48,212,180,70,120,9,192,245,177,65,157,9,193,100,181,125,145,62,8,108,36,140,237,242,248,161,189,41,114,65,121,97,50,238,149,44,214,124,167,40,167,127,178,231,30,173,244,193,203,204,238,139,135,71,234,234,217,66,14,129,19,97,165,112,244,35,73,192,12,149,71,33,192,32,195,208,173,233,202,25,210,145,89,87,245,246,38,3,25,57,167,245,86,227,208,81,64,90,199,140,48,212,180,70,120,9,192,245,177,65,157,9,193,100,181,125,145,62,8,108,36,140,237,242,248],G:[182,46,78,199,79,89,41,208,135,20,154,35,21,43,230,113,191,147,208,37,28,27,86,203,25,209,148,187,139,111,48,102,76,110,106,130,37,160,34,222,90,165,245,222,102,47,19,130,4,232,137,211,240,11,140,21,42,22,241,61,99,115,199,166,114,190,204,60,233,66,115,230,125,103,203,125,13,176,94,131,39,198,167,124,67,175,254,1,15,198,62,237,159,31,218,58,244,47,61,67,94,46,78,199,79,89,41,208,135,20,154,35,21,43,230,113,191,147,208,37,28,27,86,203,25,209,148,187,139,111,48,102,76,110,106,130,37,160,34,222,90,165,245,222,102,47,19,130,4,232,137,211,240,11,140,21,42,22,241,61,99,115,199,166,114,190,204,60,233,66,115,230,125,103,203,125,13,176,94,131,39,198,167,124,67,175,254,1,15,198,62,237,159,31,218,58,244,47,61,67,94,46,78,199,79,89,41,208,135,20,154,35,21,43,230,113,191,147,208,37,28,27,86,203,25,209,148,187,139,111,48,102,76,110,106,130,37,160,34,222,90,165,245,222,102,47,19,130,4,232,137,211,240,11,140,21],B:[191,154,43,10,207,204,164,231,136,58,239,30,147,230,101,111,150,35,128,57,252,79,173,120,25,126,81,85,8,7,122,237,190,152,246,182,130,219,67,76,167,178,235,250,28,61,186,250,199,67,58,50,86,182,108,77,89,112,59,125,226,50,205,227,125,128,104,27,59,66,53,133,159,203,97,125,139,159,158,7,215,47,140,226,223,231,44,110,184,61,233,47,67,148,22,120,173,156,117,181,94,154,43,10,207,204,164,231,136,58,239,30,147,230,101,111,150,35,128,57,252,79,173,120,25,126,81,85,8,7,122,237,190,152,246,182,130,219,67,76,167,178,235,250,28,61,186,250,199,67,58,50,86,182,108,77,89,112,59,125,226,50,205,227,125,128,104,27,59,66,53,133,159,203,97,125,139,159,158,7,215,47,140,226,223,231,44,110,184,61,233,47,67,148,22,120,173,156,117,181,94,154,43,10,207,204,164,231,136,58,239,30,147,230,101,111,150,35,128,57,252,79,173,120,25,126,81,85,8,7,122,237,190,152,246,182,130,219,67,76,167,178,235,250,28,61,186,250,199,67,58,50,86,182,108,77],A:[0,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64],I:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},red_default={R:[0,128,255],G:[0,0,0],B:[0,0,0],A:[0,64,128],I:[0,128,255]},redyell_default={R:[192,224,255],G:[1,128,255],B:[0,0,0],A:[0,64,128],I:[0,128,255]},rocket_default={R:[3,112,144,188,236,246,255],G:[5,31,29,22,76,158,250],B:[26,87,91,86,62,117,235],A:[0,30,38,49,67,85,107],I:[0,73,92,118,160,205,255]},surface_default={R:[1,240,255],G:[1,128,255],B:[1,128,255],A:[0,76,128],I:[0,153,255]},turbo_default={R:[48,48,64,70,65,25,132,195,244,254,218,122],G:[18,18,64,107,150,226,255,241,199,158,57,4],B:[59,59,162,227,255,187,81,52,58,47,7,3],A:[0,22,26,30,34,43,52,57,63,67,77,86],I:[0,1,16,32,49,83,118,140,164,181,219,255]},violet_default={R:[0,128,255],G:[0,0,0],B:[0,128,255],A:[0,64,128],I:[0,128,255]},viridis_default={R:[68,49,53,253],G:[1,104,183,231],B:[84,142,121,37],A:[0,56,80,88],I:[0,64,192,255]},warm_default={R:[255,255,255],G:[127,196,254],B:[0,0,0],A:[0,64,128],I:[0,128,255]},winter_default={R:[0,0,0],G:[0,128,255],B:[255,196,128],A:[0,64,128],I:[0,128,255]},x_rain_default={R:[3,64,0,0,255,255,255],G:[0,0,0,255,255,192,3],B:[0,32,48,56,64,96,128],A:[0,8,16,24,32,52,80],I:[0,32,64,96,160,192,255]},afni_blues_inv_default={min:0,max:0,R:[0,37],G:[242,0],B:[255,255],A:[0,64],I:[0,255]},afni_reds_inv_default={R:[255,255],G:[255,11],B:[0,0],A:[0,64],I:[0,255]},roi_i256_default={min:0,max:0,R:[65,10,223,120,216,207,251,93,252,217,21,253,131,165,173,143,144,217,86,89,63,254,172,1,142,107,42,78,221,8,222,71,127,126,167,33,104,2,208,216,0,251,7,105,2,101,248,190,253,62,255,224,166,37,110,138,45,34,6,37,69,201,43,122,199,37,173,194,103,211,75,159,96,4,239,98,110,193,253,166,40,255,48,130,140,243,101,9,177,220,133,32,4,81,48,48,210,109,60,132,1,119,1,159,247,33,212,187,253,144,196,254,168,79,64,196,39,97,73,173,104,216,217,43,101,119,254,5,237,103,203,122,57,87,251,164,19,75,200,2,252,150,66,0,255,157,23,254,55,16,240,161,69,253,207,195,5,60,255,251,200,217,134,123,253,180,27,246,130,136,250,232,4,125,140,22,253,255,13,180,123,61,254,111,10,185,76,192,255,223,186,61,198,5,172,13,83,172,171,6,23,73,134,133,109,61,213,55,57,132,36,209,2,144,1,253,68,155,3,160,2,77,121,70,67,176,223,131,4,162,232,255,150,94,235,191,207,10,246,0,225,4,209,116,57,112,172,253,1,6,92,227,73,62,135,223],G:[162,50,112,245,4,124,176,243,56,125,183,139,182,68,189,4,225,10,20,223,7,46,31,193,225,250,219,41,2,100,83,181,34,150,72,223,168,248,80,253,7,117,214,2,248,10,3,59,179,160,90,244,146,4,207,4,125,255,96,100,1,208,130,51,116,181,236,53,244,5,165,28,181,86,96,42,254,1,134,194,214,92,41,204,137,86,207,3,143,3,100,239,164,94,65,251,131,244,173,57,143,107,217,53,210,0,148,250,45,198,81,40,61,218,252,88,171,0,248,24,248,4,41,100,187,46,208,145,43,168,121,46,175,250,125,107,233,112,207,231,174,215,53,9,43,153,52,124,128,65,210,147,255,147,63,200,148,254,0,179,241,42,239,2,230,8,82,135,87,16,3,87,86,151,254,8,255,86,53,19,7,192,171,201,253,247,197,103,251,126,0,149,54,183,61,126,79,113,10,103,184,75,11,195,222,136,149,131,8,99,240,177,252,255,198,16,7,68,178,66,191,150,73,26,211,109,78,209,240,254,1,166,247,131,2,0,167,127,133,10,43,99,235,3,214,142,176,82,132,38,10,249,255,215,44,81],B:[176,182,248,37,117,35,96,69,32,152,108,20,237,250,2,89,141,216,111,251,211,149,10,44,214,103,31,251,3,32,252,246,97,1,219,167,197,4,36,116,206,118,106,43,205,204,114,69,127,205,87,80,41,251,145,204,253,161,247,1,149,9,43,253,97,72,136,161,171,181,26,255,108,80,218,214,231,255,84,31,109,4,218,3,217,36,68,85,241,39,221,2,240,2,173,42,206,5,110,46,103,27,212,184,2,207,246,45,116,72,110,253,38,105,248,159,243,81,192,93,141,145,24,157,234,131,57,178,62,75,65,176,148,40,253,66,76,240,51,154,17,251,139,253,207,9,114,49,200,254,96,73,138,118,204,102,137,89,145,161,4,112,66,234,147,178,212,205,185,11,203,131,2,250,118,169,1,185,154,53,171,197,61,175,249,96,15,254,95,5,222,75,246,194,2,61,180,25,133,165,15,233,59,35,221,140,109,7,114,255,198,0,115,168,252,23,242,80,75,142,137,255,12,182,68,201,4,111,37,228,83,248,24,192,249,5,54,223,160,122,160,114,145,119,252,31,253,250,10,214,8,47,0,142,222,70],A:[0,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64,64],I:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]},ColorTables=class{constructor(){__publicField(this,"gamma",1),__publicField(this,"version",.1),__publicField(this,"cluts",{});const u=Object.keys(cmaps_exports).filter(m=>!m.startsWith("$")).sort(new Intl.Collator("en").compare);for(const m of u)this.cluts[m]=cmaps_exports[m]}addColormap(T,u){this.cluts[T]=u}colormaps(){return Object.keys(this.cluts)}colorMaps(){return this.colormaps()}colormapFromKey(T){let u=this.cluts[T];return u!==void 0||(u=this.cluts[T.toLowerCase()],u!==void 0)?u:(T.length>0&&log.warn("No color map named "+T),{min:0,max:0,R:[0,255],G:[0,255],B:[0,255],A:[0,255],I:[0,255]})}colormap(T="",u=!1){const m=this.colormapFromKey(T);return this.makeLut(m.R,m.G,m.B,m.A,m.I,u)}makeLabelLut(T,u=255){if(T.R===void 0||T.G===void 0||T.B===void 0)throw new Error(`Invalid colormap table: ${T}`);const m=T.R.length,A=T.I??[...Array(m).keys()];if(m!==T.G.length||m!==T.B.length||m!==A.length)throw new Error(`colormap does not make sense: ${T}`);let S=new Uint8ClampedArray(m).fill(u);S[0]=0,T.A!==void 0&&(S=Uint8ClampedArray.from(T.A));const v=Math.min(...A),w=Math.max(...A),D=w-v+1,R=new Uint8ClampedArray(D*4).fill(0);for(let P=0;P0)for(let w=0;w"u"){d=new Uint8ClampedArray(w).fill(0);for(let e=0;e"u"&&(P=new Uint8ClampedArray(w).fill(64),P[0]=0);for(let e=0;e0&&(A[w]=!0);const S=u.length/3;let v=0;for(let w=0;w0&&(z=1/Math.sqrt(z),m[0]*=z,m[1]*=z,m[2]*=z),N[A]=m[0],N[A+1]=m[1],N[A+2]=m[2]}return N}},utiltiesLogger=log,NVMeshLoaders=class Xi{static readTRACT(u){const m=u.byteLength;if(m<20)throw new Error("File too small to be niml.tract: bytes = "+m);const A=new DataView(u),S=new Uint8Array(u);let v=0;function w(){for(;v=1&&c0<=2)d0=4;else if(c0>=3&&c0<=4)d0=2;else if(c0===5)d0=1;else if(c0!==0)throw new Error("impossible Matlab v4 datatype");if(z+=Q,Y>50)throw new Error("Does not appear to be little-endian V4 Matlab file");const S0=z+f*d0;e0[l0]=j(c0,z,S0),z=S0}for(;z+20>10,z=N&1023;return(N>>15?-1:1)*(q?q===31?z?NaN:1/0:Math.pow(2,q-15)*(1+z/1024):6103515625e-14*(z/1024))}let A=0,S=0,v=new Float32Array([]);const w=[],D=[],R=[],L=[];let P=[],d=!1;const E=unzipSync$1(new Uint8Array(u),{filter(N){return N.originalSize>0}}),e=Object.keys(E);for(let N=0,q=e.length;N2||v!==1e3||A!==1128354388)throw new Error("Not a valid TRK file");const w=m.getInt16(36,!0),D=[];for(let o0=0;o00)for(let g0=0;g00)for(let l0=0;l0=L);z++)P[d]=parseFloat(q[z]),d++}const E=[];for(w++;S[w].length<1;)w++;if(D=S[w].trim().split(/\s+/),w++,D[0].includes("LINES")){const N=parseInt(D[1]);if(N<1)throw new Error("Corrupted VTK ASCII");let q=S[w].trim();const z=[];let e0=[];if(q.startsWith("OFFSETS")){w++;let H=0;for(;H=N));y++);}e0=Array.from(P)}else{let H=function(){q=S[w].trim();const G=q.trim().split(/\s+/);y=[];for(let J=0;J=y.length&&H();const J=y[Y++];j+=J,z[G+1]=j;for(let i0=0;i0=y.length&&H();const Q=y[Y++]*3;e0.push(P[Q+0]),e0.push(P[Q+1]),e0.push(P[Q+2])}}}return{pts:Float32Array.from(e0),offsetPt0:Uint32Array.from(z)}}else if(D[0].includes("TRIANGLE_STRIPS")){const N=parseInt(D[1]);for(let q=0;q1&&H.pop()&&(j=j.split(".").slice(0,-1).join("."));const y=Xi.readTSF(m,e0);A.dpv||(A.dpv=[]);const Y=y.reduce((J,i0)=>Math.min(J,i0)),G=y.reduce((J,i0)=>Math.max(J,i0));return A.dpv.push({id:j,vals:Float32Array.from(y.slice()),global_min:Y,global_max:G,cal_min:Y,cal_max:G}),d}if(N<3){log.error("n_vert < 3 in layer");return}if(e==="MZ3")d.values=Xi.readMZ3(m,N);else if(e==="ANNOT"){const e0=Xi.readANNOT(m,N,!0);e0 instanceof Uint32Array?d.values=e0:(d.values=e0.scalars,d.colormapLabel=e0.colormapLabel)}else if(e==="CRV"||e==="CURV")d.values=Xi.readCURV(m,N),d.isTransparentBelowCalMin=!1;else if(e==="GII"){const e0=Xi.readGII(m,N);d.values=e0.scalars,d.colormapLabel=e0.colormapLabel}else if(e==="MGH"||e==="MGZ"){const e0=Xi.readMGH(m,N,!0);"scalars"in e0?(d.values=e0.scalars,d.colormapLabel=e0.colormapLabel):d.values=e0}else if(e==="NII")d.values=Xi.readNII(m,N,A.anatomicalStructurePrimary);else if(e==="SMP")d.values=Xi.readSMP(m,N);else if(e==="STC")d.values=Xi.readSTC(m,N);else return log.warn("Unknown layer overlay format "+u),d;if(!d.values){log.error("no values in layer");return}d.nFrame4D=d.values.length/N,d.frame4D=0,d.outlineBorder=P;let q=d.values[0],z=d.values[0];for(let e0=0;e05){const d=decompressSync$1(new Uint8Array(u));S=new DataView(d.buffer),v=S.getUint16(0,!0),u=d.buffer}v>5&&log.error("Unsupported or invalid BrainVoyager SMP version "+v);const w=S.getUint32(2,!0);w!==m&&log.error("SMP file has "+w+" vertices, background mesh has "+m);const D=S.getUint16(6,!0),R=new Float32Array(w*D);let L=9;function P(){const d=L;for(;L=3&&E.mapType===3&&(E.nLags=S.getUint32(L,!0),L+=4,E.mnLag=S.getUint32(L,!0),L+=4,E.mxLag=S.getUint32(L,!0),L+=4,E.ccOverlay=S.getUint32(L,!0),L+=4),E.clusterSize=S.getUint32(L,!0),L+=4,E.clusterCheck=S.getUint8(L),L+=1,E.critThresh=S.getFloat32(L,!0),L+=4,E.maxThresh=S.getFloat32(L,!0),L+=4,v>=4&&(E.includeValuesGreaterThreshMax=S.getUint32(L,!0),L+=4),E.df1=S.getUint32(L,!0),L+=4,E.df2=S.getUint32(L,!0),L+=4,v>=5?(E.posNegFlag=S.getUint32(L,!0),L+=4):E.posNegFlag=3,E.cortexBonferroni=S.getUint32(L,!0),L+=4,E.posMinRGB=[0,0,0],E.posMaxRGB=[0,0,0],E.negMinRGB=[0,0,0],E.negMaxRGB=[0,0,0],v>=2&&(E.posMinRGB[0]=S.getUint8(L),L++,E.posMinRGB[1]=S.getUint8(L),L++,E.posMinRGB[2]=S.getUint8(L),L++,E.posMaxRGB[0]=S.getUint8(L),L++,E.posMaxRGB[1]=S.getUint8(L),L++,E.posMaxRGB[2]=S.getUint8(L),L++,v>=4&&(E.negMinRGB[0]=S.getUint8(L),L++,E.negMinRGB[1]=S.getUint8(L),L++,E.negMinRGB[2]=S.getUint8(L),L++,E.negMaxRGB[0]=S.getUint8(L),L++,E.negMaxRGB[1]=S.getUint8(L),L++,E.negMaxRGB[2]=S.getUint8(L),L++),E.enableSMPColor=S.getUint8(L),L++,v>=4&&(E.lut=P()),E.colorAlpha=S.getFloat32(L,!0),L+=4),E.name=P();const e=new Float32Array(u,L,w);R.set(e,d*w),L+=w*4}return R}static readSTC(u,m){const A=new DataView(u),S=A.getInt32(8,!1);if(S!==m)throw new Error("Overlay has "+S+" vertices, expected "+m);let v=12+S*4;const w=A.getUint32(v,!1);v+=4;const D=new Float32Array(w*S);for(let R=0;R0)return D;const d=S.getInt32(w+=4,!1),E=S.getInt32(w+=4,!1);w+=E;const e=S.getInt32(w+=4,!1);if(e<1)return D;const N={R:Array(d).fill(0),G:Array(d).fill(0),B:Array(d).fill(0),A:Array(d).fill(0),I:Array(d).fill(0),labels:Array(d).fill("")};for(let H=0;H=d){log.warn("annot entry out of range");continue}N.R[j]=G,N.G[j]=J,N.B[j]=i0,N.A[j]=Q,N.I[j]=(Q<<24)+(i0<<16)+(J<<8)+G,N.labels[j]=Y}const q=new Float32Array(v);q.fill(-1);let z=0;for(let H=0;H0&&log.error(`annot vertex colors do not match ${z} of ${v} vertices.`);for(let H=0;H=D*3)break;d[L+2]=parseInt(e[0])-1,d[L+1]=parseInt(e[1])-1,d[L+0]=parseInt(e[2])-1,L+=3}return{positions:P,indices:d}}static readASC(u){const m=u.byteLength,A=new Uint8Array(u);let S=0;function v(){for(;S65535)throw new Error("Invalid VTK binary polygons using little-endian data (MRtrix)");S+=4;const H=E.getInt32(S,!1);S+=4;let j=E.getInt32(S,!1);S+=4;for(let y=0;y=0&&(E=new Float32Array(u,R,D*3)),{positions:d,indices:P,colors:E}}static readMZ3(u,m=0){if(u.byteLength<20)throw new Error("File too small to be mz3: bytes = "+u.byteLength);let A=new DataView(u),S=A.getUint16(0,!0),v=u;if(S===35615||S===8075){const G=decompressSync$1(new Uint8Array(u));A=new DataView(G.buffer),S=A.getUint16(0,!0),v=G.buffer}const w=A.getUint16(2,!0),D=A.getUint32(4,!0);let R=A.getUint32(8,!0);const L=A.getUint32(12,!0);if(utiltiesLogger.debug("MZ3 magic %d attr %d face %d vert %d skip %d",S,w,D,R,L),S!==23117)throw new Error("Invalid MZ3 file");const P=(w&1)!==0,d=(w&2)!==0,E=(w&4)!==0;let e=(w&8)!==0;const N=(w&16)!==0;if(w>63)throw new Error("Unsupported future version of MZ3 file");let q=4;N&&(q=8);let z=0;if(m>0&&!P&&D<1&&!E&&(e=!0),e){let G=m;m===0&&(G=R);const J=16+L+(P?1:0)*D*12+(d?1:0)*G*12+(E?1:0)*G*4,i0=Math.floor((v.byteLength-J)/q);R!==m&&i0%m===0&&(log.warn("Issue 729: mz3 mismatch scalar NVERT does not match mesh NVERT"),R=m),z=Math.floor(i0/R),z<1&&(log.warn("Corrupt MZ3: file reports NSCALAR but not enough bytes"),e=!1)}if(R<3&&m<3)throw new Error("Not a mesh MZ3 file (maybe scalar)");m>0&&m!==R&&log.warn("Layer has "+R+"vertices, but background mesh has "+m);let e0=16+L,H=null;P&&(H=new Uint32Array(v,e0,D*3),e0+=D*3*4);let j=null;d&&(j=new Float32Array(v,e0,R*3),e0+=R*3*4);let y=null;if(E){y=new Float32Array(R*3);const G=new Uint8Array(v,e0,R*4);e0+=R*4;let J=0,i0=0;for(let Q=0;Q0){if(N){const G=new Float64Array(v,e0,z*R);Y=Float32Array.from(G)}else Y=new Float32Array(v,e0,z*R);e0+=q*z*R}return m>0?Y:{positions:j,indices:H,scalars:Y,colors:y}}static readPLY(u){const m=u.byteLength,A=new Uint8Array(u);let S=0;function v(){for(;Sf.length){const T0=new Uint32Array(f.length+f.length);T0.set(f),f=T0.slice()}const S0=parseInt(c0[e0+1]);let g0=parseInt(c0[e0+2]);for(let T0=0;T01&&log.warn("This is not a valid FreeSurfer ICO/TRI mesh.");const w=parseInt(v[0]),D=new Float32Array(w*3);let R=1;for(let d=0;d=w){log.error("ICO vertices corrupted");break}e*=3,D[e]=N,D[e+1]=q,D[e+2]=z}v=S[R].trim().split(/\s+/),R++;const L=parseInt(v[0]),P=new Uint32Array(L*3);for(let d=0;d=L){log.error("ICO indices corrupted");break}e*=3,P[e]=N,P[e+1]=q,P[e+2]=z}for(let d=0;d1||P!==L*3)&&log.warn("Multi-part BYU/GEO header or not a triangular mesh.");const d=[];R*=3;let E=0,e=2;for(;E=R));j++);}const N=[];L*=3;let q=0;for(;q=L));j++);}if(m)for(let H=0;H2)&&log.warn("This is not a valid MNI OBJ mesh.");let d=1;P===1?d=L:P===1&&(d=w),v+=d*4,v+=L;const E=L*3,e=new Uint32Array(E);for(let N=0;N1056964608&&(j[E+0]=(J>>16&255)/255,j[E+1]=(J>>8&255)/255,j[E+2]=(J&255)/255),J===0&&(j[E+0]=e,j[E+1]=N,j[E+2]=q),J===1&&(j[E+0]=z,j[E+1]=e0,j[E+2]=H),E+=3}d+=v*4;for(let G=0;G=3e3&&E<=3099&&L>580){let z=function(){for(;Q"))return p0;for(;Q");)p0+=z();return p0},H=function(p0,T0=!1){const C0=f.indexOf(p0);if(C0<0)return 1;const F0=f.indexOf('"',C0)+1,ee=f.indexOf('"',F0),ie=f.slice(F0,ee);return T0?ie:parseInt(ie)},j=0,y=0,Y=0,G="",J=new Uint32Array;const i0=new Uint8Array(u);let Q=552,f;const l0=q[5],o0=new Float32Array(m*l0);for(;Q"));)if(f.includes("")||(f=e0()),!f.startsWith("")||!f.endsWith(""))return log.warn("Unable to find CIfTI "),o0;f=f.slice(15,-16);const F0=f.trim().split(/\s+/);F0.length4)&&log.warn("Not a valid MGH file");const N=D*R*L*P;let q=[];if(N%m!==0)return log.warn("Vertices in NIfTI ("+N+") is not a multiple of number of vertices ("+m+")"),q;if(d===3){q=new Float32Array(N);for(let J=0;J0)return log.warn("unsupported CTABreadFromBinaryV1"),q;if(Q=-Q,Q!==2)return log.warn("CTABreadFromBinary: unknown version"),q;const f=S.getInt32(E+=4,e);if(f<0)return log.warn("CTABreadFromBinaryV2: nentries was ",f),q;const l0=S.getInt32(E+=4,e);E+=l0;const o0=S.getInt32(E+=4,e);if(o0<0)return q;const c0={R:[],G:[],B:[],A:[],I:[],labels:[]};for(let d0=0;d0"))if(w.startsWith(""))for(;S");)w+=v();else for(;S");)w+=v();const j=D("USE");if(j.length>1){j in e0?q=e0[j]:log.warn("Unable to find DEF for "+j);return}const y=R("diffuseColor");if(y.length<3)return;q[0]=Math.round(y[0]*255),q[1]=Math.round(y[1]*255),q[2]=Math.round(y[2]*255);const Y=D("DEF");Y.length<1||(e0[Y]=q)}for(;S=0?(P.push(Y[l0]+J),P.push(Y[i0-1]+J),P.push(Y[i0-0]+J),i0+=1):(i0+=3,l0=i0-2)}else for(;i0=0?(P.push(Y[i0-2]+J),P.push(Y[i0-1]+J),P.push(Y[i0-0]+J),i0+=1):i0+=3;L=[...L,...G];const Q=Math.floor(G.length/3),f=Array(Q).fill(q).flat();if(E.length===Q*3){let l0=0,o0=0;for(let c0=0;c0";)v++;if(o0=S[v-1]==="/",c0+1=A)break}const d0=new TextDecoder().decode(u.slice(c0+1,v)).trim(),S0=d0.split(" ")[0].trim(),p0=v;let T0=v,C0=v;if(S[c0+1]!=="?"&&S[c0+1]!=="!"){const F0="";T0=S.indexOf(F0,p0),C0=T0+F0.length-1}return{name:d0,startPos:c0,contentStartPos:p0,contentEndPos:T0,endPos:C0}}let D=w();if(!D.name.startsWith("?xml"))throw new Error("readGII: Invalid XML file");for(;!D.name.startsWith("GIFTI")&&D.endPos1;){if(D=w(),D.name.startsWith("Label Key")&&(J=D.name,f.I.push(i0("Key=")),f.R.push(Math.round(255*i0("Red=",!0))),f.G.push(Math.round(255*i0("Green=",!0))),f.B.push(Math.round(255*i0("Blue=",!0))),f.A.push(Math.round(255*i0("Alpha",!0))),J=new TextDecoder().decode(u.slice(D.contentStartPos+1,D.contentEndPos)).trim(),f.labels.push(Q(""u"){let c0=function(d0){const S0=atob(d0),p0=S0.length,T0=new Uint8Array(p0);for(let C0=0;C01&&(l0=cmapper.makeLabelLut(f)),m>0)return{scalars:P,colormapLabel:l0,anatomicalStructurePrimary:d};if(R.length>2&&!G&&(e0[0]!==0||e0[1]!==0||e0[2]!==0)){Y=Math.floor(R.length/3);let o0=0;for(let c0=0;c01?1:v,this.visible=w,this.meshShaderIndex=0,this.indexBuffer=D.createBuffer(),this.vertexBuffer=D.createBuffer(),this.vao=D.createVertexArray(),D.bindVertexArray(this.vao),D.bindBuffer(D.ELEMENT_ARRAY_BUFFER,this.indexBuffer),D.bindBuffer(D.ARRAY_BUFFER,this.vertexBuffer),D.enableVertexAttribArray(0),D.enableVertexAttribArray(1),this.f32PerVertex!==7?(D.vertexAttribPointer(0,3,D.FLOAT,!1,20,0),D.vertexAttribPointer(1,4,D.BYTE,!0,20,12),D.enableVertexAttribArray(2),D.vertexAttribPointer(2,4,D.UNSIGNED_BYTE,!0,20,16)):(D.vertexAttribPointer(0,3,D.FLOAT,!1,28,0),D.vertexAttribPointer(1,3,D.FLOAT,!1,28,12),D.enableVertexAttribArray(2),D.vertexAttribPointer(2,4,D.UNSIGNED_BYTE,!0,28,24)),D.bindVertexArray(null),this.vaoFiber=D.createVertexArray(),this.offsetPt0=null,this.hasConnectome=!1,this.colormapInvert=!1,this.fiberGroupColormap=null,this.pts=u,this.layers=[],this.type="mesh",this.tris=m,S[3]<1){this.rgba255=S,this.fiberLength=2,this.fiberDither=.1,this.fiberColor="Global",this.fiberDecimationStride=1,this.fiberMask=[],this.colormap=R,this.dpg=L,this.dps=P,this.dpv=d,L&&this.initValuesArray(L),P&&this.initValuesArray(P),d&&this.initValuesArray(d),this.offsetPt0=m,this.updateFibers(D),D.bindVertexArray(this.vaoFiber),D.bindBuffer(D.ELEMENT_ARRAY_BUFFER,this.indexBuffer),D.bindBuffer(D.ARRAY_BUFFER,this.vertexBuffer),D.enableVertexAttribArray(0),D.vertexAttribPointer(0,3,D.FLOAT,!1,16,0),D.enableVertexAttribArray(1),D.vertexAttribPointer(1,4,D.UNSIGNED_BYTE,!0,16,12),D.bindVertexArray(null);return}if(R){this.connectome=R,this.hasConnectome=!0;const z=Object.keys(R);for(let e0=0,H=z.length;e0Math.min(v,w)),S=u[m].vals.reduce((v,w)=>Math.max(v,w));u[m].global_min=A,u[m].global_max=S,u[m].cal_min=A,u[m].cal_max=S}return u}linesToCylinders(u,m,A){function S(Q){return fromValues$2(Q[0],Q[1],Q[2])}const v=Math.pow(2,32)-1,w=A.length;let D=0,R=0;for(let Q=0;Q 1 requires f32PerVertex == 5");const E=new Float32Array(P*d),e=new Uint8Array(E.buffer);let N=0,q=create$1(),z=create$1(),e0=create$1();const H=create$2();let j=create$2(),y=0;const Y=this.fiberRadius;for(let Q=0;Q0){const G=parseInt(N.substring(3));G0){const G=parseInt(N.substring(3));G=this.dpg.length||i0.A[Q]<1||(J[f]=!0,f*=4,G[f]=i0.R[Q],G[f+1]=i0.G[Q],G[f+2]=i0.B[Q],G[f+3]=255)}e0.fill(-1);for(let Q=0;Q2&&this.fiberRadius>0?this.linesToCylinders(u,w,y):(this.indexCount=y.length,u.bindBuffer(u.ARRAY_BUFFER,this.vertexBuffer),u.bufferData(u.ARRAY_BUFFER,Uint32Array.from(D),u.STATIC_DRAW),u.bindBuffer(u.ELEMENT_ARRAY_BUFFER,this.indexBuffer),u.bufferData(u.ELEMENT_ARRAY_BUFFER,Uint32Array.from(y),u.STATIC_DRAW))}indexNearestXYZmm(u,m,A){const S=this.pts,v=this.pts.length/3;let w=0,D=1/0,R=0;for(let L=0;L0)for(let L=0;LP.cal_max)continue;if(P.outlineBorder===void 0&&(P.outlineBorder=0),P.isAdditiveBlend===void 0&&(P.isAdditiveBlend=!1),P.colormapLabel&&P.colormapLabel.R&&!P.colormapLabel.lut&&(P.colormapLabel=cmapper.makeLabelLut(P.colormapLabel)),P.colormapLabel&&P.colormapLabel.lut){const j=P.colormapLabel.lut,y=Math.floor(j.length/4),Y=Math.min(Math.max(P.frame4D,0),P.nFrame4D-1),G=v*Y,J=new Uint8Array(v*4);let i0=0;for(let f=0;f0&&(Q=NVMeshUtilities.getClusterBoundary(J,this.tris)),i0=0;for(let f=0;f0&&(j=NVMeshUtilities.getClusterBoundary(H,this.tris));let y=0;for(let Y=0;Y0)for(let L=0;L"u"){const z=new Float32Array([0,0,0,0,0,0]),e0=new Uint32Array([0]);P={pts:z,offsetPt0:e0},log.error("Creating empty tracts")}return v[3]=0,new pt(P.pts,P.offsetPt0,m,v,S,w,A,"inferno",P.dpg||null,P.dps||null,P.dpv||null)}if(E==="GII")P=NVMeshLoaders.readGII(u);else if(E==="MZ3")P=NVMeshLoaders.readMZ3(u),(P instanceof Float32Array||P.positions===null)&&log.warn("MZ3 does not have positions (statistical overlay?)");else if(E==="ASC")P=NVMeshLoaders.readASC(u);else if(E==="DFS")P=NVMeshLoaders.readDFS(u);else if(E==="BYU"||E==="G")P=NVMeshLoaders.readGEO(u);else if(E==="GEO")P=NVMeshLoaders.readGEO(u,!0);else if(E==="ICO"||E==="TRI")P=NVMeshLoaders.readICO(u);else if(E==="OFF")P=NVMeshLoaders.readOFF(u);else if(E==="NV")P=NVMeshLoaders.readNV(u);else if(E==="OBJ")P=NVMeshLoaders.readOBJ(u);else if(E==="PLY")P=NVMeshLoaders.readPLY(u);else if(E==="X3D")P=NVMeshLoaders.readX3D(u);else if(E==="FIB"||E==="VTK"){if(P=NVMeshLoaders.readVTK(u),"offsetPt0"in P)return v[3]=0,new pt(P.pts,P.offsetPt0,m,v,S,w,A,"inferno")}else E==="SRF"?P=NVMeshLoaders.readSRF(u):E==="STL"?P=NVMeshLoaders.readSTL(u):P=NVMeshLoaders.readFreeSurfer(u);if(P.anatomicalStructurePrimary&&(L=P.anatomicalStructurePrimary),P instanceof Float32Array)throw new Error("fatal: unknown mesh type loaded");if(!P.positions)throw new Error("positions not loaded");if(!P.indices)throw new Error("indices not loaded");if(R=P.positions,D=P.indices,"rgba255"in P&&P.rgba255.length>0&&(v=P.rgba255),"colors"in P&&P.colors&&P.colors.length===R.length){const z=R.length/3;v=new Uint8Array(z*4);let e0=0,H=0;for(let j=0;j0&&(NVMeshLoaders.readLayer(m,u,q,S,"gray"),q.updateMesh(A)),q}static async loadLayer(u,m){let A;function S(N){const q=window.atob(N),z=q.length,e0=new Uint8Array(z);for(let H=0;H-1&&(v=v.slice(0,v.indexOf("?")));let D=.5;"opacity"in u&&(D=u.opacity);let R="warm";"colormap"in u&&(R=u.colormap);let L="winter";"colormapNegative"in u&&(L=u.colormapNegative);let P=!1;"useNegativeCmap"in u&&(P=u.useNegativeCmap);let d=null;"cal_min"in u&&(d=u.cal_min);let E=null;"cal_max"in u&&(E=u.cal_max);const e=NVMeshLoaders.readLayer(v,A,m,D,R,L,P,d,E);e&&m.layers.push(e)}static async loadFromUrl({url:u="",headers:m={},gl:A,name:S="",opacity:v=1,rgba255:w=[255,255,255,255],visible:D=!0,layers:R=[],buffer:L=new ArrayBuffer(0)}={}){let P=u.split("/");if(S===""){try{P=new URL(u).pathname.split("/")}catch{P=u.split("/")}S=P.slice(-1)[0],S.indexOf("?")>-1&&(S=S.slice(0,S.indexOf("?")))}if(u==="")throw Error("url must not be empty");if(!A)throw Error("gl context is null");let d;if(L.byteLength>0)d=L;else{const e=await fetch(u,{headers:m});if(!e.ok)throw Error(e.statusText);d=await e.arrayBuffer()}const E=await this.readMesh(d,S,A,v,new Uint8Array(w),D);if(!R||R.length<1)return E;for(let e=0;e{const S=new FileReader;S.onload=()=>{m(S.result)},S.onerror=A,S.readAsArrayBuffer(u)})}static async loadFromFile({file:u,gl:m,name:A="",opacity:S=1,rgba255:v=[255,255,255,255],visible:w=!0,layers:D=[]}={}){if(!u)throw new Error("file must be set");if(!m)throw new Error("rendering context must be set");const R=await pt.readFileAsync(u),L=pt.readMesh(R,A,m,S,new Uint8Array(v),w);if(!D||D.length<1)return L;for(let P=0;P>18,R=(d&258048)>>12,L=(d&4032)>>6,P=d&63,m+=A[D]+A[R]+A[L]+A[P];return v===1?(d=u[w],D=(d&252)>>2,R=(d&3)<<4,m+=A[D]+A[R]+"=="):v===2&&(d=u[w]<<8|u[w+1],D=(d&64512)>>10,R=(d&1008)>>4,L=(d&15)<<2,m+=A[D]+A[R]+A[L]+"="),m}static download(u,m,A){const S=document.createElement("a"),v=new Blob([u],{type:A});S.href=URL.createObjectURL(v),S.download=m,S.click()}static readFileAsync(u){return new Promise((m,A)=>{const S=new FileReader;S.onload=()=>{m(S.result)},S.onerror=A,S.readAsArrayBuffer(u)})}static blobToBase64(u){return new Promise(m=>{const A=new FileReader;A.onloadend=()=>m(A.result),A.readAsDataURL(u)})}static decompressBase64String(u){const m=atob(u),A=new ArrayBuffer(m.length),S=new Uint8Array(A);for(let D=0;Du+v*A)}static sph2cartDeg(u,m){const A=-m*(Math.PI/180),S=(u-90)%360*(Math.PI/180),v=[Math.cos(A)*Math.cos(S),Math.cos(A)*Math.sin(S),Math.sin(A)],w=Math.sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);return w<=0||(v[0]/=w,v[1]/=w,v[2]/=w),v}static vox2mm(u,m){const A=clone$2(m);transpose(A,A);const S=fromValues$1(u[0],u[1],u[2],1);return transformMat4(S,S,A),fromValues$2(S[0],S[1],S[2])}},isPlatformLittleEndian=()=>{const T=new ArrayBuffer(2);return new DataView(T).setInt16(0,256,!0),new Int16Array(T)[0]===256},ImageType=(T=>(T[T.UNKNOWN=0]="UNKNOWN",T[T.NII=1]="NII",T[T.DCM=2]="DCM",T[T.DCM_MANIFEST=3]="DCM_MANIFEST",T[T.MIH=4]="MIH",T[T.MIF=5]="MIF",T[T.NHDR=6]="NHDR",T[T.NRRD=7]="NRRD",T[T.MHD=8]="MHD",T[T.MHA=9]="MHA",T[T.MGH=10]="MGH",T[T.MGZ=11]="MGZ",T[T.V=12]="V",T[T.V16=13]="V16",T[T.VMR=14]="VMR",T[T.HEAD=15]="HEAD",T[T.DCM_FOLDER=16]="DCM_FOLDER",T))(ImageType||{}),NVIMAGE_TYPE=Object.freeze({...ImageType,parse:T=>{let u=0;switch(T.toUpperCase()){case"":case"DCM":u=2;break;case"TXT":u=3;break;case"NII":u=1;break;case"MIH":u=4;break;case"MIF":u=5;break;case"NHDR":u=6;break;case"NRRD":u=7;break;case"MHD":u=8;break;case"MHA":u=9;break;case"MGH":u=10;break;case"MGZ":u=11;break;case"V":u=12;break;case"V16":u=13;break;case"VMR":u=14;break;case"HEAD":u=15;break}return u}}),NVImageFromUrlOptions=(T,u="",m="",A="gray",S=1,v=NaN,w=NaN,D=!0,R=.02,L=!1,P=!1,d="",E=0,e=NVIMAGE_TYPE.UNKNOWN,N=NaN,q=NaN,z=!0,e0=!1,H=null)=>({url:T,urlImageData:u,name:m,colormap:A,colorMap:A,opacity:S,cal_min:v,cal_max:w,trustCalMinMax:D,percentileFrac:R,ignoreZeroVoxels:L,useQFormNotSForm:P,colormapNegative:d,imageType:e,cal_minNeg:N,cal_maxNeg:q,colorbarVisible:z,frame4D:E,alphaThreshold:e0,colormapLabel:H});function getBestTransform(T,u,m){const A=T;let S=null;if(A){const v={colSize:u[0],rowSize:u[1],sliceSize:u[2]},w=m,D=[A[0],A[1],A[2]],R=[A[3],A[4],A[5]],L=[D[1]*R[2]-D[2]*R[1],D[2]*R[0]-D[0]*R[2],D[0]*R[1]-D[1]*R[0]];S=[[D[0]*v.colSize*-1,R[0]*v.rowSize*-1,L[0]*v.sliceSize*-1,-1*w[0]],[D[1]*v.colSize*-1,R[1]*v.rowSize*-1,L[1]*v.sliceSize*-1,-1*w[1]],[D[2]*v.colSize,R[2]*v.rowSize,L[2]*v.sliceSize,w[2]],[0,0,0,1]]}return S}function str2Buffer(T){const u=[];for(let m=0;m=D)break;let E=!0;for(let e=0;e<3;++e)S[e]>A[e]&&(E=!1),v[e]{}),__publicField(this,"onOpacityChange",()=>{}),__publicField(this,"mm000"),__publicField(this,"mm100"),__publicField(this,"mm010"),__publicField(this,"mm001"),__publicField(this,"cal_min"),__publicField(this,"cal_max"),__publicField(this,"robust_min"),__publicField(this,"robust_max"),__publicField(this,"global_min"),__publicField(this,"global_max"),__publicField(this,"urlImgData"),__publicField(this,"isManifest"),__publicField(this,"limitFrames4D"),this.name=m,this.id=v4(),this._colormap=A,this._opacity=S>1?1:S,this.percentileFrac=L,this.ignoreZeroVoxels=P,this.trustCalMinMax=R,this.colormapNegative=E,this.colormapLabel=H,this.frame4D=e,this.cal_minNeg=q,this.cal_maxNeg=z,this.colorbarVisible=e0,this.useQFormNotSForm=d,!u)return;const j=/(?:\.([^.]+))?$/;let y=j.exec(m)[1]||"";y=y.toUpperCase(),y==="GZ"&&(y=j.exec(m.slice(0,-3))[1],y=y.toUpperCase());let Y=null;switch(N===NVIMAGE_TYPE.UNKNOWN&&(N=NVIMAGE_TYPE.parse(y)),this.imageType=N,N){case NVIMAGE_TYPE.DCM_FOLDER:case NVIMAGE_TYPE.DCM_MANIFEST:case NVIMAGE_TYPE.DCM:Y=this.readDICOM(u);break;case NVIMAGE_TYPE.MIH:case NVIMAGE_TYPE.MIF:Y=this.readMIF(u,v);break;case NVIMAGE_TYPE.NHDR:case NVIMAGE_TYPE.NRRD:Y=this.readNRRD(u,v);break;case NVIMAGE_TYPE.MHD:case NVIMAGE_TYPE.MHA:Y=this.readMHA(u,v);break;case NVIMAGE_TYPE.MGH:case NVIMAGE_TYPE.MGZ:Y=this.readMGH(u);break;case NVIMAGE_TYPE.V:Y=this.readECAT(u);break;case NVIMAGE_TYPE.V16:Y=this.readV16(u);break;case NVIMAGE_TYPE.VMR:Y=this.readVMR(u);break;case NVIMAGE_TYPE.HEAD:Y=this.readHEAD(u,v);break;case NVIMAGE_TYPE.NII:this.hdr=nifti.readHeader(u),this.hdr!==null&&(this.hdr.cal_min===0&&this.hdr.cal_max===255&&(this.hdr.cal_max=0),nifti.isCompressed(u)?Y=nifti.readImage(this.hdr,nifti.decompress(u)):Y=nifti.readImage(this.hdr,u));break;default:throw new Error("Image type not supported")}if(this.hdr&&typeof this.hdr.magic=="number"&&(this.hdr.magic="n+1"),this.nFrame4D=1,this.hdr)for(let Q=4;Q<7;Q++)this.hdr.dims[Q]>1&&(this.nFrame4D*=this.hdr.dims[Q]);if(this.frame4D=Math.min(this.frame4D,this.nFrame4D-1),this.nTotalFrame4D=this.nFrame4D,!this.hdr||!Y)return;this.nVox3D=this.hdr.dims[1]*this.hdr.dims[2]*this.hdr.dims[3];const G=this.nVox3D*(this.hdr.numBitsPerVoxel/8),J=Y.byteLength/G;if(J!==this.nFrame4D&&(J>0&&J*G===Y.byteLength?log.debug("Loading the first "+J+" of "+this.nFrame4D+" volumes"):log.warn("This header does not match voxel data",this.hdr,Y.byteLength),this.nFrame4D=J),(this.hdr.intent_code===1007||this.hdr.intent_code===2003)&&this.nFrame4D===3&&this.hdr.datatypeCode===16){const f=new Float32Array(Y).slice();this.hdr.datatypeCode=2304,this.nFrame4D=1;for(let S0=4;S0<7;S0++)this.hdr.dims[S0]=1;this.hdr.dims[0]=3,Y=new Uint8Array(this.nVox3D*4);let l0=1;for(let S0=0;S00)*1,ee=+(T0>0)*2,ie=+(C0>0)*4;let ke=248+F0+ee+ie;Math.abs(p0)+Math.abs(T0)+Math.abs(C0)<.1&&(ke=0),Y[d0+3]=ke,d0+=4}}(this.hdr.pixDims[1]===0||this.hdr.pixDims[2]===0||this.hdr.pixDims[3]===0)&&log.error("pixDims not plausible",this.hdr),(isNaN(this.hdr.scl_slope)||this.hdr.scl_slope===0)&&(this.hdr.scl_slope=1),isNaN(this.hdr.scl_inter)&&(this.hdr.scl_inter=0);let i0=isAffineOK(this.hdr.affine);if(d||!i0||this.hdr.qform_code>this.hdr.sform_code){log.debug("spatial transform based on QForm");const Q=this.hdr.quatern_b,f=this.hdr.quatern_c,l0=this.hdr.quatern_d,o0=Math.sqrt(1-(Math.pow(Q,2)+Math.pow(f,2)+Math.pow(l0,2))),c0=this.hdr.pixDims[0]===0?1:this.hdr.pixDims[0],d0=[[o0*o0+Q*Q-f*f-l0*l0,2*Q*f-2*o0*l0,2*Q*l0+2*o0*f],[2*Q*f+2*o0*l0,o0*o0+f*f-Q*Q-l0*l0,2*f*l0-2*o0*Q],[2*Q*l0-2*o0*f,2*f*l0+2*o0*Q,o0*o0+l0*l0-f*f-Q*Q]],S0=this.hdr.affine;for(let p0=0;p0<3;p0+=1)for(let T0=0;T0<3;T0+=1)S0[p0][T0]=d0[p0][T0]*this.hdr.pixDims[T0+1],T0===2&&(S0[p0][T0]*=c0);S0[0][3]=this.hdr.qoffset_x,S0[1][3]=this.hdr.qoffset_y,S0[2][3]=this.hdr.qoffset_z,this.hdr.affine=S0}if(i0=isAffineOK(this.hdr.affine),!i0){log.debug("Defective NIfTI: spatial transform does not make sense");let Q=this.hdr.pixDims[1],f=this.hdr.pixDims[2],l0=this.hdr.pixDims[3];(isNaN(Q)||Q===0)&&(Q=1),(isNaN(f)||f===0)&&(f=1),(isNaN(l0)||l0===0)&&(l0=1),this.hdr.pixDims[1]=Q,this.hdr.pixDims[2]=f,this.hdr.pixDims[3]=l0;const o0=[[Q,0,0,0],[0,f,0,0],[0,0,l0,0],[0,0,0,1]];this.hdr.affine=o0}if(this.hdr.datatypeCode!==128&&this.hdr.datatypeCode!==2304&&this.hdr.littleEndian!==isPlatformLittleEndian()&&this.hdr.numBitsPerVoxel>8){if(this.hdr.numBitsPerVoxel===16){const Q=new Uint16Array(Y);for(let f=0;f>8&255)<<16>>16}}else if(this.hdr.numBitsPerVoxel===32){const Q=new Uint32Array(Y);for(let f=0;f>8&65280|l0>>24&255}}else if(this.hdr.numBitsPerVoxel===64){const Q=this.hdr.numBitsPerVoxel/8,f=new Uint8Array(Y);for(let l0=0;l0.01?log.warn("Warning voxels not aligned with world space: "+P+` degrees from plumb. -`):P=0,P}calculateOblique(){if(!this.matRAS)throw new Error("matRAS not defined");if(this.pixDimsRAS===void 0)throw new Error("pixDimsRAS not defined");if(!this.dimsRAS)throw new Error("dimsRAS not defined");this.oblique_angle=this.computeObliqueAngle(this.matRAS);const u=this.vox2mm([0,0,0],this.matRAS),m=this.vox2mm([1/this.pixDimsRAS[1],0,0],this.matRAS),A=this.vox2mm([0,1/this.pixDimsRAS[2],0],this.matRAS),S=this.vox2mm([0,0,1/this.pixDimsRAS[3]],this.matRAS);subtract$1(m,m,u),subtract$1(A,A,u),subtract$1(S,S,u);const v=fromValues$3(m[0],m[1],m[2],0,A[0],A[1],A[2],0,S[0],S[1],S[2],0,0,0,0,1);this.obliqueRAS=clone$2(v);const w=Math.abs(90-angle(m,A)*(180/Math.PI)),D=Math.abs(90-angle(m,S)*(180/Math.PI)),R=Math.abs(90-angle(A,S)*(180/Math.PI));this.maxShearDeg=Math.max(Math.max(w,D),R),this.maxShearDeg>.1&&log.warn("Warning: voxels are rhomboidal, maximum shear is %f degrees.",this.maxShearDeg);const L=fromValues$1(this.dimsRAS[1],this.dimsRAS[2],this.dimsRAS[3],1),P=clone$2(this.matRAS);transpose(P,P);const d=fromValues$1(-.5,-.5,-.5,0);translate(P,P,fromValues$2(d[0],d[1],d[2])),P[0]*=L[0],P[1]*=L[0],P[2]*=L[0],P[4]*=L[1],P[5]*=L[1],P[6]*=L[1],P[8]*=L[2],P[9]*=L[2],P[10]*=L[2],this.frac2mm=clone$2(P);const E=this.pixDimsRAS[1],e=this.pixDimsRAS[2],N=this.pixDimsRAS[3],q=clone$2(P);q[0]=E*L[0],q[1]=0,q[2]=0,q[4]=0,q[5]=e*L[1],q[6]=0,q[8]=0,q[9]=0,q[10]=N*L[2];const z=this.mm2vox([0,0,0],!0);q[12]=(-z[0]-.5)*E,q[13]=(-z[1]-.5)*e,q[14]=(-z[2]-.5)*N,this.frac2mmOrtho=clone$2(q),this.extentsMinOrtho=[q[12],q[13],q[14]],this.extentsMaxOrtho=[q[0]+q[12],q[5]+q[13],q[10]+q[14]],this.mm2ortho=create$3(),invert(this.mm2ortho,v)}THD_daxes_to_NIFTI(u,m,A){const S=this.hdr;if(S===null)throw new Error("HDR is not set");S.sform_code=2;const v="xxyyzzg";let w=-1,D=-1,R=-1;const L=["x","y","z"];L[0]=v[A[0]],L[1]=v[A[1]],L[2]=v[A[2]];const P=u.slice(0,3),d=m.slice(0,3);for(let E=0;E<3;E++)L[E]==="x"?w=E:L[E]==="y"?D=E:R=E;w<0||D<0||R<0||w===D||w===R||D===R||(S.pixDims[1]=Math.abs(P[0]),S.pixDims[2]=Math.abs(P[1]),S.pixDims[3]=Math.abs(P[2]),S.affine=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],S.affine[0][w]=-P[w],S.affine[1][D]=-P[D],S.affine[2][R]=P[R],S.affine[0][3]=-d[w],S.affine[1][3]=-d[D],S.affine[2][3]=d[R])}SetPixDimFromSForm(){if(!this.hdr)throw new Error("hdr not defined");const u=this.hdr.affine,m=fromValues$3(u[0][0],u[0][1],u[0][2],u[0][3],u[1][0],u[1][1],u[1][2],u[1][3],u[2][0],u[2][1],u[2][2],u[2][3],u[3][0],u[3][1],u[3][2],u[3][3]),A=this.vox2mm([0,0,0],m),S=this.vox2mm([1,0,0],m);subtract$1(S,S,A);const v=this.vox2mm([0,1,0],m);subtract$1(v,v,A);const w=this.vox2mm([0,0,1],m);subtract$1(w,w,A),this.hdr.pixDims[1]=length$1(S),this.hdr.pixDims[2]=length$1(v),this.hdr.pixDims[3]=length$1(w)}readDICOM(u){if(this.series=new daikon.Series,Array.isArray(u))for(let d=0;d1&&(m.dims[3]>1&&log.debug("To Do: multiple slices per file and multiple files (XA30 DWI)"),m.dims[3]=this.series.images.length);const A=this.series.images[0].getPixelSpacing();if(m.pixDims[1]=A[0],m.pixDims[2]=A[1],this.series.images.length>1){const d=fromValues$2(...this.series.images[0].getImagePosition()),E=fromValues$2(...this.series.images[1].getImagePosition()),e=fromValues$2(0,0,0);subtract$1(e,d,E),m.pixDims[3]=length$1(e)}else m.pixDims[3]=this.series.images[0].getSliceThickness();m.pixDims[4]=this.series.images[0].getTR()/1e3;const S=this.series.images[0].getDataType(),v=this.series.images[0].getBitsAllocated();m.numBitsPerVoxel=v,this.hdr.littleEndian=this.series.images[0].littleEndian,v===8&&S===2?m.datatypeCode=256:v===8&&S===3?m.datatypeCode=2:v===16&&S===2?m.datatypeCode=4:v===16&&S===3?m.datatypeCode=512:v===32&&S===2?m.datatypeCode=8:v===32&&S===3?m.datatypeCode=768:v===32&&S===4?m.datatypeCode=16:v===64&&S===4?m.datatypeCode=64:v===1?m.datatypeCode=1:log.warn("Unsupported DICOM format: "+S+" "+v);const w=m.pixDims.slice(1,4),D=getBestTransform(this.series.images[0].getImageDirections(),w,this.series.images[0].getImagePosition());D&&(m.sform_code=1,m.affine=[[D[0][0],D[0][1],D[0][2],D[0][3]],[D[1][0],D[1][1],D[1][2],D[1][3]],[D[2][0],D[2][1],D[2][2],D[2][3]],[0,0,0,1]]);let R,L=this.series.validatePixelDataLength(this.series.images[0]);const P=new Uint8Array(new ArrayBuffer(L*this.series.images.length));for(let d=0;d14)throw new Error("Not a valid ECAT file");let w=512,D=0;const R=[];let L=new Float32Array;for(;;){const P=A.getInt32(w,!1),d=A.getInt32(w+12,!1);if(P+d!==31)break;let E=w+20,e=0,N=0;for(;e<31&&(N=A.getInt32(E,!1),E+=16,N!==0);){e++;let q=N*512;const z=q-512,e0=A.getUint16(z,!1);m.dims[1]=A.getUint16(z+4,!1),m.dims[2]=A.getUint16(z+6,!1),m.dims[3]=A.getUint16(z+8,!1);const H=A.getFloat32(z+26,!1);m.pixDims[1]=A.getFloat32(z+34,!1)*10,m.pixDims[2]=A.getFloat32(z+38,!1)*10,m.pixDims[3]=A.getFloat32(z+42,!1)*10,m.pixDims[4]=A.getUint32(z+46,!1)/1e3,R.push(m.pixDims[4]);const j=m.dims[1]*m.dims[2]*m.dims[3],y=new Float32Array(j);if(e0===1)for(let G=0;G1){m.dims[0]=4;let P=!1;for(let d=0;d=4){let w=8+v;const D=A.getUint32(w+88,!0);if(w=w+92,D>0){const R=u.byteLength;for(let L=0;L4)&&log.warn("Not a valid MGH file"),P===0?(m.numBitsPerVoxel=8,m.datatypeCode=2):P===4?(m.numBitsPerVoxel=16,m.datatypeCode=4):P===1?(m.numBitsPerVoxel=32,m.datatypeCode=8):P===3&&(m.numBitsPerVoxel=32,m.datatypeCode=16),m.dims[1]=w,m.dims[2]=D,m.dims[3]=R,m.dims[4]=L,L>1&&(m.dims[0]=4),m.pixDims[1]=d,m.pixDims[2]=E,m.pixDims[3]=e,m.vox_offset=284,m.sform_code=1;const f=fromValues$3(N*m.pixDims[1],e0*m.pixDims[2],y*m.pixDims[3],0,q*m.pixDims[1],H*m.pixDims[2],Y*m.pixDims[3],0,z*m.pixDims[1],j*m.pixDims[2],G*m.pixDims[3],0,0,0,0,1),l0=[m.dims[1]/2,m.dims[2]/2,m.dims[3]/2,1],o0=[0,0,0,0];for(let d0=0;d0<3;d0++){o0[d0]=0;for(let S0=0;S0<3;S0++)o0[d0]=o0[d0]+f[S0+d0*4]*l0[S0]}m.affine=[[f[0],f[1],f[2],J-o0[0]],[f[4],f[5],f[6],i0-o0[1]],[f[8],f[9],f[10],Q-o0[2]],[0,0,0,1]];const c0=m.dims[1]*m.dims[2]*m.dims[3]*m.dims[4]*(m.numBitsPerVoxel/8);return A.slice(m.vox_offset,m.vox_offset+c0)}readHEAD(u,m){this.hdr=new nifti.NIFTI1;const A=this.hdr;A.dims[0]=3,A.pixDims=[1,1,1,1,1,0,0,0];let S=[0,0,0],v=[0,0,0],w=[1,1,1];const R=new TextDecoder().decode(u).split(/\r?\n/),L=(u.byteLength+8)%16,P=u.byteLength+(16-L);log.debug(u.byteLength,"len",P);const d=new Uint8Array(P);d.fill(0),d.set(new Uint8Array(u));const E=new nifti.NIFTIEXTENSION(P+8,42,d,!0);A.addExtension(E),A.extensionCode=42,A.extensionFlag[0]=1,A.extensionSize=P+8;const e=R.length;let N=0,q=!1;for(;N2&&(q=q.slice(2)),R.startsWith("BinaryDataByteOrderMSB")&&q[0].includes("False")&&(L.littleEndian=!0),R.startsWith("BinaryDataByteOrderMSB")&&q[0].includes("True")&&(L.littleEndian=!1),R.startsWith("CompressedData")&&q[0].includes("True")&&(P=!0),R.startsWith("TransformMatrix"))for(let z=0;z<9;z++)E[z]=parseFloat(q[z]);if(R.startsWith("Offset"))for(let z=0;z2||l0.length!==4)break;A.affine[P][0]=parseFloat(l0[0]),A.affine[P][1]=parseFloat(l0[1]),A.affine[P][2]=parseFloat(l0[2]),A.affine[P][3]=parseFloat(l0[3]),P++;break;case"RepetitionTime":d=parseFloat(l0[0]);break;case"file":E=!l0[0].startsWith(". "),E||(l0=l0[0].split(" "),A.vox_offset=parseInt(l0[1]));break}}const e=A.dims[0];e>5&&log.warn("reader only designed for a maximum of 5 dimensions (XYZTD)");let N=1;for(let l0=0;l00&&(A.pixDims[4]=d),E&&!m&&log.warn("MIH header provided without paired image data");let q;m&&E?q=m.slice(0):q=u.slice(A.vox_offset,A.vox_offset+N*(A.numBitsPerVoxel/8)),L.length!==A.dims[0]&&log.warn("dims does not match layout");let z=1;const e0=[1,1,1,1,1],H=[!1,!1,!1,!1,!1];for(let l0=0;l0=3e3&&E<=3099&&L>580){let z=function(){for(;Q"))return g0;for(;Q");)g0+=z();return g0},H=function(g0,T0=!1){const C0=f.indexOf(g0);if(C0<0)return 1;const F0=f.indexOf('"',C0)+1,ee=f.indexOf('"',F0),ie=f.slice(F0,ee);return T0?ie:parseInt(ie)},j=0,y=0,Y=0,G="",J=new Uint32Array;const i0=new Uint8Array(u);let Q=552,f;const o0=q[5],l0=new Float32Array(m*o0);for(;Q"));)if(f.includes("")||(f=e0()),!f.startsWith("")||!f.endsWith(""))return log.warn("Unable to find CIfTI "),l0;f=f.slice(15,-16);const F0=f.trim().split(/\s+/);F0.length4)&&log.warn("Not a valid MGH file");const N=D*R*L*P;let q=[];if(N%m!==0)return log.warn("Vertices in NIfTI ("+N+") is not a multiple of number of vertices ("+m+")"),q;if(d===3){q=new Float32Array(N);for(let J=0;J0)return log.warn("unsupported CTABreadFromBinaryV1"),q;if(Q=-Q,Q!==2)return log.warn("CTABreadFromBinary: unknown version"),q;const f=S.getInt32(E+=4,e);if(f<0)return log.warn("CTABreadFromBinaryV2: nentries was ",f),q;const o0=S.getInt32(E+=4,e);E+=o0;const l0=S.getInt32(E+=4,e);if(l0<0)return q;const c0={R:[],G:[],B:[],A:[],I:[],labels:[]};for(let d0=0;d0"))if(w.startsWith(""))for(;S");)w+=v();else for(;S");)w+=v();const j=D("USE");if(j.length>1){j in e0?q=e0[j]:log.warn("Unable to find DEF for "+j);return}const y=R("diffuseColor");if(y.length<3)return;q[0]=Math.round(y[0]*255),q[1]=Math.round(y[1]*255),q[2]=Math.round(y[2]*255);const Y=D("DEF");Y.length<1||(e0[Y]=q)}for(;S=0?(P.push(Y[o0]+J),P.push(Y[i0-1]+J),P.push(Y[i0-0]+J),i0+=1):(i0+=3,o0=i0-2)}else for(;i0=0?(P.push(Y[i0-2]+J),P.push(Y[i0-1]+J),P.push(Y[i0-0]+J),i0+=1):i0+=3;L=[...L,...G];const Q=Math.floor(G.length/3),f=Array(Q).fill(q).flat();if(E.length===Q*3){let o0=0,l0=0;for(let c0=0;c0";)v++;if(l0=S[v-1]==="/",c0+1=A)break}const d0=new TextDecoder().decode(u.slice(c0+1,v)).trim(),S0=d0.split(" ")[0].trim(),g0=v;let T0=v,C0=v;if(S[c0+1]!=="?"&&S[c0+1]!=="!"){const F0="";T0=S.indexOf(F0,g0),C0=T0+F0.length-1}return{name:d0,startPos:c0,contentStartPos:g0,contentEndPos:T0,endPos:C0}}let D=w();if(!D.name.startsWith("?xml"))throw new Error("readGII: Invalid XML file");for(;!D.name.startsWith("GIFTI")&&D.endPos1;){if(D=w(),D.name.startsWith("Label Key")&&(J=D.name,f.I.push(i0("Key=")),f.R.push(Math.round(255*i0("Red=",!0))),f.G.push(Math.round(255*i0("Green=",!0))),f.B.push(Math.round(255*i0("Blue=",!0))),f.A.push(Math.round(255*i0("Alpha",!0))),J=new TextDecoder().decode(u.slice(D.contentStartPos+1,D.contentEndPos)).trim(),f.labels.push(Q(""u"){let c0=function(d0){const S0=atob(d0),g0=S0.length,T0=new Uint8Array(g0);for(let C0=0;C01&&(o0=cmapper.makeLabelLut(f)),m>0)return{scalars:P,colormapLabel:o0,anatomicalStructurePrimary:d};if(R.length>2&&!G&&(e0[0]!==0||e0[1]!==0||e0[2]!==0)){Y=Math.floor(R.length/3);let l0=0;for(let c0=0;c01?1:v,this.visible=w,this.meshShaderIndex=0,this.indexBuffer=D.createBuffer(),this.vertexBuffer=D.createBuffer(),this.vao=D.createVertexArray(),D.bindVertexArray(this.vao),D.bindBuffer(D.ELEMENT_ARRAY_BUFFER,this.indexBuffer),D.bindBuffer(D.ARRAY_BUFFER,this.vertexBuffer),D.enableVertexAttribArray(0),D.enableVertexAttribArray(1),this.f32PerVertex!==7?(D.vertexAttribPointer(0,3,D.FLOAT,!1,20,0),D.vertexAttribPointer(1,4,D.BYTE,!0,20,12),D.enableVertexAttribArray(2),D.vertexAttribPointer(2,4,D.UNSIGNED_BYTE,!0,20,16)):(D.vertexAttribPointer(0,3,D.FLOAT,!1,28,0),D.vertexAttribPointer(1,3,D.FLOAT,!1,28,12),D.enableVertexAttribArray(2),D.vertexAttribPointer(2,4,D.UNSIGNED_BYTE,!0,28,24)),D.bindVertexArray(null),this.vaoFiber=D.createVertexArray(),this.offsetPt0=null,this.hasConnectome=!1,this.colormapInvert=!1,this.fiberGroupColormap=null,this.pts=u,this.layers=[],this.type="mesh",this.tris=m,S[3]<1){this.rgba255=S,this.fiberLength=2,this.fiberDither=.1,this.fiberColor="Global",this.fiberDecimationStride=1,this.fiberMask=[],this.colormap=R,this.dpg=L,this.dps=P,this.dpv=d,L&&this.initValuesArray(L),P&&this.initValuesArray(P),d&&this.initValuesArray(d),this.offsetPt0=m,this.updateFibers(D),D.bindVertexArray(this.vaoFiber),D.bindBuffer(D.ELEMENT_ARRAY_BUFFER,this.indexBuffer),D.bindBuffer(D.ARRAY_BUFFER,this.vertexBuffer),D.enableVertexAttribArray(0),D.vertexAttribPointer(0,3,D.FLOAT,!1,16,0),D.enableVertexAttribArray(1),D.vertexAttribPointer(1,4,D.UNSIGNED_BYTE,!0,16,12),D.bindVertexArray(null);return}if(R){this.connectome=R,this.hasConnectome=!0;const z=Object.keys(R);for(let e0=0,H=z.length;e0Math.min(v,w)),S=u[m].vals.reduce((v,w)=>Math.max(v,w));u[m].global_min=A,u[m].global_max=S,u[m].cal_min=A,u[m].cal_max=S}return u}linesToCylinders(u,m,A){function S(Q){return fromValues$2(Q[0],Q[1],Q[2])}const v=Math.pow(2,32)-1,w=A.length;let D=0,R=0;for(let Q=0;Q 1 requires f32PerVertex == 5");const E=new Float32Array(P*d),e=new Uint8Array(E.buffer);let N=0,q=create$1(),z=create$1(),e0=create$1();const H=create$2();let j=create$2(),y=0;const Y=this.fiberRadius;for(let Q=0;Q0){const G=parseInt(N.substring(3));G0){const G=parseInt(N.substring(3));G=this.dpg.length||i0.A[Q]<1||(J[f]=!0,f*=4,G[f]=i0.R[Q],G[f+1]=i0.G[Q],G[f+2]=i0.B[Q],G[f+3]=255)}e0.fill(-1);for(let Q=0;Q2&&this.fiberRadius>0?this.linesToCylinders(u,w,y):(this.indexCount=y.length,u.bindBuffer(u.ARRAY_BUFFER,this.vertexBuffer),u.bufferData(u.ARRAY_BUFFER,Uint32Array.from(D),u.STATIC_DRAW),u.bindBuffer(u.ELEMENT_ARRAY_BUFFER,this.indexBuffer),u.bufferData(u.ELEMENT_ARRAY_BUFFER,Uint32Array.from(y),u.STATIC_DRAW))}indexNearestXYZmm(u,m,A){const S=this.pts,v=this.pts.length/3;let w=0,D=1/0,R=0;for(let L=0;L0)for(let L=0;LP.cal_max)continue;if(P.outlineBorder===void 0&&(P.outlineBorder=0),P.isAdditiveBlend===void 0&&(P.isAdditiveBlend=!1),P.colormapLabel&&P.colormapLabel.R&&!P.colormapLabel.lut&&(P.colormapLabel=cmapper.makeLabelLut(P.colormapLabel)),P.colormapLabel&&P.colormapLabel.lut){const j=P.colormapLabel.lut,y=Math.floor(j.length/4),Y=Math.min(Math.max(P.frame4D,0),P.nFrame4D-1),G=v*Y,J=new Uint8Array(v*4);let i0=0;for(let f=0;f0&&(Q=NVMeshUtilities.getClusterBoundary(J,this.tris)),i0=0;for(let f=0;f0&&(j=NVMeshUtilities.getClusterBoundary(H,this.tris));let y=0;for(let Y=0;Y0)for(let L=0;L"u"){const z=new Float32Array([0,0,0,0,0,0]),e0=new Uint32Array([0]);P={pts:z,offsetPt0:e0},log.error("Creating empty tracts")}return v[3]=0,new pt(P.pts,P.offsetPt0,m,v,S,w,A,"inferno",P.dpg||null,P.dps||null,P.dpv||null)}if(E==="GII")P=NVMeshLoaders.readGII(u);else if(E==="MZ3")P=NVMeshLoaders.readMZ3(u),(P instanceof Float32Array||P.positions===null)&&log.warn("MZ3 does not have positions (statistical overlay?)");else if(E==="ASC")P=NVMeshLoaders.readASC(u);else if(E==="DFS")P=NVMeshLoaders.readDFS(u);else if(E==="BYU"||E==="G")P=NVMeshLoaders.readGEO(u);else if(E==="GEO")P=NVMeshLoaders.readGEO(u,!0);else if(E==="ICO"||E==="TRI")P=NVMeshLoaders.readICO(u);else if(E==="OFF")P=NVMeshLoaders.readOFF(u);else if(E==="NV")P=NVMeshLoaders.readNV(u);else if(E==="OBJ")P=NVMeshLoaders.readOBJ(u);else if(E==="PLY")P=NVMeshLoaders.readPLY(u);else if(E==="X3D")P=NVMeshLoaders.readX3D(u);else if(E==="FIB"||E==="VTK"){if(P=NVMeshLoaders.readVTK(u),"offsetPt0"in P)return v[3]=0,new pt(P.pts,P.offsetPt0,m,v,S,w,A,"inferno")}else E==="SRF"?P=NVMeshLoaders.readSRF(u):E==="STL"?P=NVMeshLoaders.readSTL(u):P=NVMeshLoaders.readFreeSurfer(u);if(P.anatomicalStructurePrimary&&(L=P.anatomicalStructurePrimary),P instanceof Float32Array)throw new Error("fatal: unknown mesh type loaded");if(!P.positions)throw new Error("positions not loaded");if(!P.indices)throw new Error("indices not loaded");if(R=P.positions,D=P.indices,"rgba255"in P&&P.rgba255.length>0&&(v=P.rgba255),"colors"in P&&P.colors&&P.colors.length===R.length){const z=R.length/3;v=new Uint8Array(z*4);let e0=0,H=0;for(let j=0;j0&&(NVMeshLoaders.readLayer(m,u,q,S,"gray"),q.updateMesh(A)),q}static async loadLayer(u,m){let A;function S(N){const q=window.atob(N),z=q.length,e0=new Uint8Array(z);for(let H=0;H-1&&(v=v.slice(0,v.indexOf("?")));let D=.5;"opacity"in u&&(D=u.opacity);let R="warm";"colormap"in u&&(R=u.colormap);let L="winter";"colormapNegative"in u&&(L=u.colormapNegative);let P=!1;"useNegativeCmap"in u&&(P=u.useNegativeCmap);let d=null;"cal_min"in u&&(d=u.cal_min);let E=null;"cal_max"in u&&(E=u.cal_max);const e=NVMeshLoaders.readLayer(v,A,m,D,R,L,P,d,E);e&&m.layers.push(e)}static async loadFromUrl({url:u="",headers:m={},gl:A,name:S="",opacity:v=1,rgba255:w=[255,255,255,255],visible:D=!0,layers:R=[],buffer:L=new ArrayBuffer(0)}={}){let P=u.split("/");if(S===""){try{P=new URL(u).pathname.split("/")}catch{P=u.split("/")}S=P.slice(-1)[0],S.indexOf("?")>-1&&(S=S.slice(0,S.indexOf("?")))}if(u==="")throw Error("url must not be empty");if(!A)throw Error("gl context is null");let d;if(L.byteLength>0)d=L;else{const e=await fetch(u,{headers:m});if(!e.ok)throw Error(e.statusText);d=await e.arrayBuffer()}const E=await this.readMesh(d,S,A,v,new Uint8Array(w),D);if(!R||R.length<1)return E;for(let e=0;e{const S=new FileReader;S.onload=()=>{m(S.result)},S.onerror=A,S.readAsArrayBuffer(u)})}static async loadFromFile({file:u,gl:m,name:A="",opacity:S=1,rgba255:v=[255,255,255,255],visible:w=!0,layers:D=[]}={}){if(!u)throw new Error("file must be set");if(!m)throw new Error("rendering context must be set");const R=await pt.readFileAsync(u),L=pt.readMesh(R,A,m,S,new Uint8Array(v),w);if(!D||D.length<1)return L;for(let P=0;P>18,R=(d&258048)>>12,L=(d&4032)>>6,P=d&63,m+=A[D]+A[R]+A[L]+A[P];return v===1?(d=u[w],D=(d&252)>>2,R=(d&3)<<4,m+=A[D]+A[R]+"=="):v===2&&(d=u[w]<<8|u[w+1],D=(d&64512)>>10,R=(d&1008)>>4,L=(d&15)<<2,m+=A[D]+A[R]+A[L]+"="),m}static download(u,m,A){const S=document.createElement("a"),v=new Blob([u],{type:A});S.href=URL.createObjectURL(v),S.download=m,S.click()}static readFileAsync(u){return new Promise((m,A)=>{const S=new FileReader;S.onload=()=>{m(S.result)},S.onerror=A,S.readAsArrayBuffer(u)})}static blobToBase64(u){return new Promise(m=>{const A=new FileReader;A.onloadend=()=>m(A.result),A.readAsDataURL(u)})}static decompressBase64String(u){const m=atob(u),A=new ArrayBuffer(m.length),S=new Uint8Array(A);for(let D=0;Du+v*A)}static sph2cartDeg(u,m){const A=-m*(Math.PI/180),S=(u-90)%360*(Math.PI/180),v=[Math.cos(A)*Math.cos(S),Math.cos(A)*Math.sin(S),Math.sin(A)],w=Math.sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);return w<=0||(v[0]/=w,v[1]/=w,v[2]/=w),v}static vox2mm(u,m){const A=clone$2(m);transpose(A,A);const S=fromValues$1(u[0],u[1],u[2],1);return transformMat4(S,S,A),fromValues$2(S[0],S[1],S[2])}},isPlatformLittleEndian=()=>{const T=new ArrayBuffer(2);return new DataView(T).setInt16(0,256,!0),new Int16Array(T)[0]===256},ImageType=(T=>(T[T.UNKNOWN=0]="UNKNOWN",T[T.NII=1]="NII",T[T.DCM=2]="DCM",T[T.DCM_MANIFEST=3]="DCM_MANIFEST",T[T.MIH=4]="MIH",T[T.MIF=5]="MIF",T[T.NHDR=6]="NHDR",T[T.NRRD=7]="NRRD",T[T.MHD=8]="MHD",T[T.MHA=9]="MHA",T[T.MGH=10]="MGH",T[T.MGZ=11]="MGZ",T[T.V=12]="V",T[T.V16=13]="V16",T[T.VMR=14]="VMR",T[T.HEAD=15]="HEAD",T[T.DCM_FOLDER=16]="DCM_FOLDER",T))(ImageType||{}),NVIMAGE_TYPE=Object.freeze({...ImageType,parse:T=>{let u=0;switch(T.toUpperCase()){case"":case"DCM":u=2;break;case"TXT":u=3;break;case"NII":u=1;break;case"MIH":u=4;break;case"MIF":u=5;break;case"NHDR":u=6;break;case"NRRD":u=7;break;case"MHD":u=8;break;case"MHA":u=9;break;case"MGH":u=10;break;case"MGZ":u=11;break;case"V":u=12;break;case"V16":u=13;break;case"VMR":u=14;break;case"HEAD":u=15;break}return u}}),NVImageFromUrlOptions=(T,u="",m="",A="gray",S=1,v=NaN,w=NaN,D=!0,R=.02,L=!1,P=!1,d="",E=0,e=NVIMAGE_TYPE.UNKNOWN,N=NaN,q=NaN,z=!0,e0=!1,H=null)=>({url:T,urlImageData:u,name:m,colormap:A,colorMap:A,opacity:S,cal_min:v,cal_max:w,trustCalMinMax:D,percentileFrac:R,ignoreZeroVoxels:L,useQFormNotSForm:P,colormapNegative:d,imageType:e,cal_minNeg:N,cal_maxNeg:q,colorbarVisible:z,frame4D:E,alphaThreshold:e0,colormapLabel:H});function getBestTransform(T,u,m){const A=T;let S=null;if(A){const v={colSize:u[0],rowSize:u[1],sliceSize:u[2]},w=m,D=[A[0],A[1],A[2]],R=[A[3],A[4],A[5]],L=[D[1]*R[2]-D[2]*R[1],D[2]*R[0]-D[0]*R[2],D[0]*R[1]-D[1]*R[0]];S=[[D[0]*v.colSize*-1,R[0]*v.rowSize*-1,L[0]*v.sliceSize*-1,-1*w[0]],[D[1]*v.colSize*-1,R[1]*v.rowSize*-1,L[1]*v.sliceSize*-1,-1*w[1]],[D[2]*v.colSize,R[2]*v.rowSize,L[2]*v.sliceSize,w[2]],[0,0,0,1]]}return S}function str2Buffer(T){const u=[];for(let m=0;m=D)break;let E=!0;for(let e=0;e<3;++e)S[e]>A[e]&&(E=!1),v[e]{}),__publicField(this,"onOpacityChange",()=>{}),__publicField(this,"mm000"),__publicField(this,"mm100"),__publicField(this,"mm010"),__publicField(this,"mm001"),__publicField(this,"cal_min"),__publicField(this,"cal_max"),__publicField(this,"robust_min"),__publicField(this,"robust_max"),__publicField(this,"global_min"),__publicField(this,"global_max"),__publicField(this,"urlImgData"),__publicField(this,"isManifest"),__publicField(this,"limitFrames4D"),this.name=m,this.id=v4(),this._colormap=A,this._opacity=S>1?1:S,this.percentileFrac=L,this.ignoreZeroVoxels=P,this.trustCalMinMax=R,this.colormapNegative=E,this.colormapLabel=H,this.frame4D=e,this.cal_minNeg=q,this.cal_maxNeg=z,this.colorbarVisible=e0,this.useQFormNotSForm=d,!u)return;const j=/(?:\.([^.]+))?$/;let y=j.exec(m)[1]||"";y=y.toUpperCase(),y==="GZ"&&(y=j.exec(m.slice(0,-3))[1],y=y.toUpperCase());let Y=null;switch(N===NVIMAGE_TYPE.UNKNOWN&&(N=NVIMAGE_TYPE.parse(y)),this.imageType=N,N){case NVIMAGE_TYPE.DCM_FOLDER:case NVIMAGE_TYPE.DCM_MANIFEST:case NVIMAGE_TYPE.DCM:Y=this.readDICOM(u);break;case NVIMAGE_TYPE.MIH:case NVIMAGE_TYPE.MIF:Y=this.readMIF(u,v);break;case NVIMAGE_TYPE.NHDR:case NVIMAGE_TYPE.NRRD:Y=this.readNRRD(u,v);break;case NVIMAGE_TYPE.MHD:case NVIMAGE_TYPE.MHA:Y=this.readMHA(u,v);break;case NVIMAGE_TYPE.MGH:case NVIMAGE_TYPE.MGZ:Y=this.readMGH(u);break;case NVIMAGE_TYPE.V:Y=this.readECAT(u);break;case NVIMAGE_TYPE.V16:Y=this.readV16(u);break;case NVIMAGE_TYPE.VMR:Y=this.readVMR(u);break;case NVIMAGE_TYPE.HEAD:Y=this.readHEAD(u,v);break;case NVIMAGE_TYPE.NII:this.hdr=nifti.readHeader(u),this.hdr!==null&&(this.hdr.cal_min===0&&this.hdr.cal_max===255&&(this.hdr.cal_max=0),nifti.isCompressed(u)?Y=nifti.readImage(this.hdr,nifti.decompress(u)):Y=nifti.readImage(this.hdr,u));break;default:throw new Error("Image type not supported")}if(this.hdr&&typeof this.hdr.magic=="number"&&(this.hdr.magic="n+1"),this.nFrame4D=1,this.hdr)for(let Q=4;Q<7;Q++)this.hdr.dims[Q]>1&&(this.nFrame4D*=this.hdr.dims[Q]);if(this.frame4D=Math.min(this.frame4D,this.nFrame4D-1),this.nTotalFrame4D=this.nFrame4D,!this.hdr||!Y)return;this.nVox3D=this.hdr.dims[1]*this.hdr.dims[2]*this.hdr.dims[3];const G=this.nVox3D*(this.hdr.numBitsPerVoxel/8),J=Y.byteLength/G;if(J!==this.nFrame4D&&(J>0&&J*G===Y.byteLength?log.debug("Loading the first "+J+" of "+this.nFrame4D+" volumes"):log.warn("This header does not match voxel data",this.hdr,Y.byteLength),this.nFrame4D=J),(this.hdr.intent_code===1007||this.hdr.intent_code===2003)&&this.nFrame4D===3&&this.hdr.datatypeCode===16){const f=new Float32Array(Y).slice();this.hdr.datatypeCode=2304,this.nFrame4D=1;for(let S0=4;S0<7;S0++)this.hdr.dims[S0]=1;this.hdr.dims[0]=3,Y=new Uint8Array(this.nVox3D*4);let o0=1;for(let S0=0;S00)*1,ee=+(T0>0)*2,ie=+(C0>0)*4;let ke=248+F0+ee+ie;Math.abs(g0)+Math.abs(T0)+Math.abs(C0)<.1&&(ke=0),Y[d0+3]=ke,d0+=4}}(this.hdr.pixDims[1]===0||this.hdr.pixDims[2]===0||this.hdr.pixDims[3]===0)&&log.error("pixDims not plausible",this.hdr),(isNaN(this.hdr.scl_slope)||this.hdr.scl_slope===0)&&(this.hdr.scl_slope=1),isNaN(this.hdr.scl_inter)&&(this.hdr.scl_inter=0);let i0=isAffineOK(this.hdr.affine);if(d||!i0||this.hdr.qform_code>this.hdr.sform_code){log.debug("spatial transform based on QForm");const Q=this.hdr.quatern_b,f=this.hdr.quatern_c,o0=this.hdr.quatern_d,l0=Math.sqrt(1-(Math.pow(Q,2)+Math.pow(f,2)+Math.pow(o0,2))),c0=this.hdr.pixDims[0]===0?1:this.hdr.pixDims[0],d0=[[l0*l0+Q*Q-f*f-o0*o0,2*Q*f-2*l0*o0,2*Q*o0+2*l0*f],[2*Q*f+2*l0*o0,l0*l0+f*f-Q*Q-o0*o0,2*f*o0-2*l0*Q],[2*Q*o0-2*l0*f,2*f*o0+2*l0*Q,l0*l0+o0*o0-f*f-Q*Q]],S0=this.hdr.affine;for(let g0=0;g0<3;g0+=1)for(let T0=0;T0<3;T0+=1)S0[g0][T0]=d0[g0][T0]*this.hdr.pixDims[T0+1],T0===2&&(S0[g0][T0]*=c0);S0[0][3]=this.hdr.qoffset_x,S0[1][3]=this.hdr.qoffset_y,S0[2][3]=this.hdr.qoffset_z,this.hdr.affine=S0}if(i0=isAffineOK(this.hdr.affine),!i0){log.debug("Defective NIfTI: spatial transform does not make sense");let Q=this.hdr.pixDims[1],f=this.hdr.pixDims[2],o0=this.hdr.pixDims[3];(isNaN(Q)||Q===0)&&(Q=1),(isNaN(f)||f===0)&&(f=1),(isNaN(o0)||o0===0)&&(o0=1),this.hdr.pixDims[1]=Q,this.hdr.pixDims[2]=f,this.hdr.pixDims[3]=o0;const l0=[[Q,0,0,0],[0,f,0,0],[0,0,o0,0],[0,0,0,1]];this.hdr.affine=l0}if(this.hdr.datatypeCode!==128&&this.hdr.datatypeCode!==2304&&this.hdr.littleEndian!==isPlatformLittleEndian()&&this.hdr.numBitsPerVoxel>8){if(this.hdr.numBitsPerVoxel===16){const Q=new Uint16Array(Y);for(let f=0;f>8&255)<<16>>16}}else if(this.hdr.numBitsPerVoxel===32){const Q=new Uint32Array(Y);for(let f=0;f>8&65280|o0>>24&255}}else if(this.hdr.numBitsPerVoxel===64){const Q=this.hdr.numBitsPerVoxel/8,f=new Uint8Array(Y);for(let o0=0;o0.01?log.warn("Warning voxels not aligned with world space: "+P+` degrees from plumb. +`):P=0,P}calculateOblique(){if(!this.matRAS)throw new Error("matRAS not defined");if(this.pixDimsRAS===void 0)throw new Error("pixDimsRAS not defined");if(!this.dimsRAS)throw new Error("dimsRAS not defined");this.oblique_angle=this.computeObliqueAngle(this.matRAS);const u=this.vox2mm([0,0,0],this.matRAS),m=this.vox2mm([1/this.pixDimsRAS[1],0,0],this.matRAS),A=this.vox2mm([0,1/this.pixDimsRAS[2],0],this.matRAS),S=this.vox2mm([0,0,1/this.pixDimsRAS[3]],this.matRAS);subtract$1(m,m,u),subtract$1(A,A,u),subtract$1(S,S,u);const v=fromValues$3(m[0],m[1],m[2],0,A[0],A[1],A[2],0,S[0],S[1],S[2],0,0,0,0,1);this.obliqueRAS=clone$2(v);const w=Math.abs(90-angle(m,A)*(180/Math.PI)),D=Math.abs(90-angle(m,S)*(180/Math.PI)),R=Math.abs(90-angle(A,S)*(180/Math.PI));this.maxShearDeg=Math.max(Math.max(w,D),R),this.maxShearDeg>.1&&log.warn("Warning: voxels are rhomboidal, maximum shear is %f degrees.",this.maxShearDeg);const L=fromValues$1(this.dimsRAS[1],this.dimsRAS[2],this.dimsRAS[3],1),P=clone$2(this.matRAS);transpose(P,P);const d=fromValues$1(-.5,-.5,-.5,0);translate(P,P,fromValues$2(d[0],d[1],d[2])),P[0]*=L[0],P[1]*=L[0],P[2]*=L[0],P[4]*=L[1],P[5]*=L[1],P[6]*=L[1],P[8]*=L[2],P[9]*=L[2],P[10]*=L[2],this.frac2mm=clone$2(P);const E=this.pixDimsRAS[1],e=this.pixDimsRAS[2],N=this.pixDimsRAS[3],q=clone$2(P);q[0]=E*L[0],q[1]=0,q[2]=0,q[4]=0,q[5]=e*L[1],q[6]=0,q[8]=0,q[9]=0,q[10]=N*L[2];const z=this.mm2vox([0,0,0],!0);q[12]=(-z[0]-.5)*E,q[13]=(-z[1]-.5)*e,q[14]=(-z[2]-.5)*N,this.frac2mmOrtho=clone$2(q),this.extentsMinOrtho=[q[12],q[13],q[14]],this.extentsMaxOrtho=[q[0]+q[12],q[5]+q[13],q[10]+q[14]],this.mm2ortho=create$3(),invert(this.mm2ortho,v)}THD_daxes_to_NIFTI(u,m,A){const S=this.hdr;if(S===null)throw new Error("HDR is not set");S.sform_code=2;const v="xxyyzzg";let w=-1,D=-1,R=-1;const L=["x","y","z"];L[0]=v[A[0]],L[1]=v[A[1]],L[2]=v[A[2]];const P=u.slice(0,3),d=m.slice(0,3);for(let E=0;E<3;E++)L[E]==="x"?w=E:L[E]==="y"?D=E:R=E;w<0||D<0||R<0||w===D||w===R||D===R||(S.pixDims[1]=Math.abs(P[0]),S.pixDims[2]=Math.abs(P[1]),S.pixDims[3]=Math.abs(P[2]),S.affine=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],S.affine[0][w]=-P[w],S.affine[1][D]=-P[D],S.affine[2][R]=P[R],S.affine[0][3]=-d[w],S.affine[1][3]=-d[D],S.affine[2][3]=d[R])}SetPixDimFromSForm(){if(!this.hdr)throw new Error("hdr not defined");const u=this.hdr.affine,m=fromValues$3(u[0][0],u[0][1],u[0][2],u[0][3],u[1][0],u[1][1],u[1][2],u[1][3],u[2][0],u[2][1],u[2][2],u[2][3],u[3][0],u[3][1],u[3][2],u[3][3]),A=this.vox2mm([0,0,0],m),S=this.vox2mm([1,0,0],m);subtract$1(S,S,A);const v=this.vox2mm([0,1,0],m);subtract$1(v,v,A);const w=this.vox2mm([0,0,1],m);subtract$1(w,w,A),this.hdr.pixDims[1]=length$1(S),this.hdr.pixDims[2]=length$1(v),this.hdr.pixDims[3]=length$1(w)}readDICOM(u){if(this.series=new daikon.Series,Array.isArray(u))for(let d=0;d1&&(m.dims[3]>1&&log.debug("To Do: multiple slices per file and multiple files (XA30 DWI)"),m.dims[3]=this.series.images.length);const A=this.series.images[0].getPixelSpacing();if(m.pixDims[1]=A[0],m.pixDims[2]=A[1],this.series.images.length>1){const d=fromValues$2(...this.series.images[0].getImagePosition()),E=fromValues$2(...this.series.images[1].getImagePosition()),e=fromValues$2(0,0,0);subtract$1(e,d,E),m.pixDims[3]=length$1(e)}else m.pixDims[3]=this.series.images[0].getSliceThickness();m.pixDims[4]=this.series.images[0].getTR()/1e3;const S=this.series.images[0].getDataType(),v=this.series.images[0].getBitsAllocated();m.numBitsPerVoxel=v,this.hdr.littleEndian=this.series.images[0].littleEndian,v===8&&S===2?m.datatypeCode=256:v===8&&S===3?m.datatypeCode=2:v===16&&S===2?m.datatypeCode=4:v===16&&S===3?m.datatypeCode=512:v===32&&S===2?m.datatypeCode=8:v===32&&S===3?m.datatypeCode=768:v===32&&S===4?m.datatypeCode=16:v===64&&S===4?m.datatypeCode=64:v===1?m.datatypeCode=1:log.warn("Unsupported DICOM format: "+S+" "+v);const w=m.pixDims.slice(1,4),D=getBestTransform(this.series.images[0].getImageDirections(),w,this.series.images[0].getImagePosition());D&&(m.sform_code=1,m.affine=[[D[0][0],D[0][1],D[0][2],D[0][3]],[D[1][0],D[1][1],D[1][2],D[1][3]],[D[2][0],D[2][1],D[2][2],D[2][3]],[0,0,0,1]]);let R,L=this.series.validatePixelDataLength(this.series.images[0]);const P=new Uint8Array(new ArrayBuffer(L*this.series.images.length));for(let d=0;d14)throw new Error("Not a valid ECAT file");let w=512,D=0;const R=[];let L=new Float32Array;for(;;){const P=A.getInt32(w,!1),d=A.getInt32(w+12,!1);if(P+d!==31)break;let E=w+20,e=0,N=0;for(;e<31&&(N=A.getInt32(E,!1),E+=16,N!==0);){e++;let q=N*512;const z=q-512,e0=A.getUint16(z,!1);m.dims[1]=A.getUint16(z+4,!1),m.dims[2]=A.getUint16(z+6,!1),m.dims[3]=A.getUint16(z+8,!1);const H=A.getFloat32(z+26,!1);m.pixDims[1]=A.getFloat32(z+34,!1)*10,m.pixDims[2]=A.getFloat32(z+38,!1)*10,m.pixDims[3]=A.getFloat32(z+42,!1)*10,m.pixDims[4]=A.getUint32(z+46,!1)/1e3,R.push(m.pixDims[4]);const j=m.dims[1]*m.dims[2]*m.dims[3],y=new Float32Array(j);if(e0===1)for(let G=0;G1){m.dims[0]=4;let P=!1;for(let d=0;d=4){let w=8+v;const D=A.getUint32(w+88,!0);if(w=w+92,D>0){const R=u.byteLength;for(let L=0;L4)&&log.warn("Not a valid MGH file"),P===0?(m.numBitsPerVoxel=8,m.datatypeCode=2):P===4?(m.numBitsPerVoxel=16,m.datatypeCode=4):P===1?(m.numBitsPerVoxel=32,m.datatypeCode=8):P===3&&(m.numBitsPerVoxel=32,m.datatypeCode=16),m.dims[1]=w,m.dims[2]=D,m.dims[3]=R,m.dims[4]=L,L>1&&(m.dims[0]=4),m.pixDims[1]=d,m.pixDims[2]=E,m.pixDims[3]=e,m.vox_offset=284,m.sform_code=1;const f=fromValues$3(N*m.pixDims[1],e0*m.pixDims[2],y*m.pixDims[3],0,q*m.pixDims[1],H*m.pixDims[2],Y*m.pixDims[3],0,z*m.pixDims[1],j*m.pixDims[2],G*m.pixDims[3],0,0,0,0,1),o0=[m.dims[1]/2,m.dims[2]/2,m.dims[3]/2,1],l0=[0,0,0,0];for(let d0=0;d0<3;d0++){l0[d0]=0;for(let S0=0;S0<3;S0++)l0[d0]=l0[d0]+f[S0+d0*4]*o0[S0]}m.affine=[[f[0],f[1],f[2],J-l0[0]],[f[4],f[5],f[6],i0-l0[1]],[f[8],f[9],f[10],Q-l0[2]],[0,0,0,1]];const c0=m.dims[1]*m.dims[2]*m.dims[3]*m.dims[4]*(m.numBitsPerVoxel/8);return A.slice(m.vox_offset,m.vox_offset+c0)}readHEAD(u,m){this.hdr=new nifti.NIFTI1;const A=this.hdr;A.dims[0]=3,A.pixDims=[1,1,1,1,1,0,0,0];let S=[0,0,0],v=[0,0,0],w=[1,1,1];const R=new TextDecoder().decode(u).split(/\r?\n/),L=(u.byteLength+8)%16,P=u.byteLength+(16-L);log.debug(u.byteLength,"len",P);const d=new Uint8Array(P);d.fill(0),d.set(new Uint8Array(u));const E=new nifti.NIFTIEXTENSION(P+8,42,d,!0);A.addExtension(E),A.extensionCode=42,A.extensionFlag[0]=1,A.extensionSize=P+8;const e=R.length;let N=0,q=!1;for(;N2&&(q=q.slice(2)),R.startsWith("BinaryDataByteOrderMSB")&&q[0].includes("False")&&(L.littleEndian=!0),R.startsWith("BinaryDataByteOrderMSB")&&q[0].includes("True")&&(L.littleEndian=!1),R.startsWith("CompressedData")&&q[0].includes("True")&&(P=!0),R.startsWith("TransformMatrix"))for(let z=0;z<9;z++)E[z]=parseFloat(q[z]);if(R.startsWith("Offset"))for(let z=0;z2||o0.length!==4)break;A.affine[P][0]=parseFloat(o0[0]),A.affine[P][1]=parseFloat(o0[1]),A.affine[P][2]=parseFloat(o0[2]),A.affine[P][3]=parseFloat(o0[3]),P++;break;case"RepetitionTime":d=parseFloat(o0[0]);break;case"file":E=!o0[0].startsWith(". "),E||(o0=o0[0].split(" "),A.vox_offset=parseInt(o0[1]));break}}const e=A.dims[0];e>5&&log.warn("reader only designed for a maximum of 5 dimensions (XYZTD)");let N=1;for(let o0=0;o00&&(A.pixDims[4]=d),E&&!m&&log.warn("MIH header provided without paired image data");let q;m&&E?q=m.slice(0):q=u.slice(A.vox_offset,A.vox_offset+N*(A.numBitsPerVoxel/8)),L.length!==A.dims[0]&&log.warn("dims does not match layout");let z=1;const e0=[1,1,1,1,1],H=[!1,!1,!1,!1,!1];for(let o0=0;o0A[0]&&(S[0]=2),A[6]>A[0]&&A[6]>A[3]&&(S[0]=3),S[1]=1,S[0]===1?A[4]>A[7]?S[1]=2:S[1]=3:S[0]===2?A[1]>A[7]?S[1]=1:S[1]=3:A[1]>A[4]?S[1]=1:S[1]=2,S[2]=6-S[1]-S[0];let v=[1,2,3];v[S[0]-1]=1,v[S[1]-1]=2,v[S[2]-1]=3;let w=fromValues$3(u[0][0],u[0][1],u[0][2],u[0][3],u[1][0],u[1][1],u[1][2],u[1][3],u[2][0],u[2][1],u[2][2],u[2][3],0,0,0,1);this.mm000=this.vox2mm([-.5,-.5,-.5],w),this.mm100=this.vox2mm([m.dims[1]-.5,-.5,-.5],w),this.mm010=this.vox2mm([-.5,m.dims[2]-.5,-.5],w),this.mm001=this.vox2mm([-.5,-.5,m.dims[3]-.5],w);const D=create$3();copy$1(D,w);for(let z=0;z<3;z++)for(let e0=0;e0<3;e0++)D[z*4+e0]=w[z*4+v[e0]-1];const R=[0,0,0];D[0]<0&&(R[0]=1),D[5]<0&&(R[1]=1),D[10]<0&&(R[2]=1),this.dimsRAS=[m.dims[0],m.dims[v[0]],m.dims[v[1]],m.dims[v[2]]],this.pixDimsRAS=[m.pixDims[0],m.pixDims[v[0]],m.pixDims[v[1]],m.pixDims[v[2]]],this.permRAS=v.slice();for(let z=0;z<3;z++)R[z]===1&&(this.permRAS[z]=-this.permRAS[z]);if(this.arrayEquals(v,[1,2,3])&&this.arrayEquals(R,[0,0,0])){this.toRAS=create$3(),this.matRAS=clone$2(w),this.calculateOblique(),this.img2RASstep=[1,this.dimsRAS[1],this.dimsRAS[1]*this.dimsRAS[2]],this.img2RASstart=[0,0,0];return}identity(w),w[0+0*4]=1-R[0]*2,w[1+1*4]=1-R[1]*2,w[2+2*4]=1-R[2]*2,w[3+0*4]=(m.dims[v[0]]-1)*R[0],w[3+1*4]=(m.dims[v[1]]-1)*R[1],w[3+2*4]=(m.dims[v[2]]-1)*R[2];const L=create$3();invert(L,w),multiply(L,L,D),this.matRAS=clone$2(L),w=fromValues$3(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1),w[v[0]-1+0*4]=-R[0]*2+1,w[v[1]-1+1*4]=-R[1]*2+1,w[v[2]-1+2*4]=-R[2]*2+1,w[3+0*4]=R[0],w[3+1*4]=R[1],w[3+2*4]=R[2],this.toRAS=clone$2(w),w[3]=0,w[7]=0,w[11]=0,w[12]=0,(this.permRAS[0]===-1||this.permRAS[1]===-1||this.permRAS[2]===-1)&&(w[12]=m.dims[1]-1),w[13]=0,(this.permRAS[0]===-2||this.permRAS[1]===-2||this.permRAS[2]===-2)&&(w[13]=m.dims[2]-1),w[14]=0,(this.permRAS[0]===-3||this.permRAS[1]===-3||this.permRAS[2]===-3)&&(w[14]=m.dims[3]-1),this.toRASvox=clone$2(w),log.debug(this.hdr.dims),log.debug(this.dimsRAS);const P=this.hdr;v=this.permRAS;const d=[Math.abs(v[0]),Math.abs(v[1]),Math.abs(v[2])],E=[P.dims[d[0]],P.dims[d[1]],P.dims[d[2]]],e=[1,P.dims[1],P.dims[1]*P.dims[2]],N=[e[d[0]-1],e[d[1]-1],e[d[2]-1]],q=[0,0,0];for(let z=0;z<3;z++)v[z]<0&&(q[z]=N[z]*(E[z]-1),N[z]=-N[z]);this.img2RASstep=N,this.img2RASstart=q,this.calculateOblique()}img2RAS(){if(!this.permRAS)throw new Error("permRAS undefined");if(!this.img)throw new Error("img undefined");if(!this.hdr)throw new Error("hdr undefined");const u=this.permRAS.slice();if(u[0]===1&&u[1]===2&&u[2]===3)return this.img;const m=this.hdr,A=this.img.slice(0,m.dims[1]*m.dims[1]*m.dims[2]*m.dims[3]),S=[Math.abs(u[0]),Math.abs(u[1]),Math.abs(u[2])],v=[m.dims[S[0]],m.dims[S[1]],m.dims[S[2]]],w=[1,m.dims[1],m.dims[1]*m.dims[2]],D=[w[S[0]-1],w[S[1]-1],w[S[2]-1]],R=[0,0,0];for(let P=0;P<3;P++)u[P]<0&&(R[P]=D[P]*(v[P]-1),D[P]=-D[P]);let L=0;for(let P=0;PA===m[S])}setColormap(u){this._colormap=u,this.calMinMax(),this.onColormapChange&&this.onColormapChange(this)}setColormapLabel(u){this.colormapLabel=cmapper.makeLabelLut(u)}async setColormapLabelFromUrl(u){this.colormapLabel=await cmapper.makeLabelLutFromUrl(u)}get colormap(){return this._colormap}get colorMap(){return this._colormap}set colormap(u){this.setColormap(u)}set colorMap(u){this.setColormap(u)}get opacity(){return this._opacity}set opacity(u){this._opacity=u,this.onOpacityChange&&this.onOpacityChange(this)}calMinMax(){if(!this.hdr)throw new Error("hdr undefined");if(!this.img)throw new Error("img undefined");let u=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,A=0,S=0;const v=this.img.length,w=this.img.constructor!==Float64Array&&this.img.constructor!==Float32Array&&this.ignoreZeroVoxels;if(w)for(let J=0;Jthis.hdr.cal_min)return this.cal_min=this.hdr.cal_min,this.cal_max=this.hdr.cal_max,this.robust_min=this.cal_min,this.robust_max=this.cal_max,this.global_min=D,this.global_max=R,[this.hdr.cal_min,this.hdr.cal_max,this.hdr.cal_min,this.hdr.cal_max];if(P!==d)return this.cal_min=P,this.cal_max=d,this.robust_min=this.cal_min,this.robust_max=this.cal_max,[P,d,P,d];const E=100*A/v;let e=!1;E>60&&!this.ignoreZeroVoxels&&(log.warn(`${Math.round(E)}% of voxels are zero: ignoring zeros for cal_max`),e=!0,this.ignoreZeroVoxels=!0),this.ignoreZeroVoxels||(A=0),A+=S;const N=Math.round((v-A)*this.percentileFrac);if(N<1||u===m)return log.debug("no variability in image intensity?"),this.cal_min=D,this.cal_max=R,this.robust_min=this.cal_min,this.robust_max=this.cal_max,this.global_min=D,this.global_max=R,[D,R,D,R];const q=1001,z=(q-1)/(m-u),e0=new Array(q);for(let J=0;J0&&(j--,e0[j]>0&&(J=0)),J!==0&&y0&&(J=0)),j===0&&y===q-1&&(J=0)}let Y=this.intensityRaw2Scaled(j/z+u),G=this.intensityRaw2Scaled(y/z+u);return this.hdr.cal_min=D&&this.hdr.cal_max<=R&&(Y=this.hdr.cal_min,G=this.hdr.cal_max),e&&(Y=Math.min(Y,0)),this.cal_min=Y,this.cal_max=G,this.robust_min=this.cal_min,this.robust_max=this.cal_max,this.global_min=D,this.global_max=R,[Y,G,D,R]}intensityRaw2Scaled(u){if(!this.hdr)throw new Error("hdr undefined");return this.hdr.scl_slope===0&&(this.hdr.scl_slope=1),u*this.hdr.scl_slope+this.hdr.scl_inter}intensityScaled2Raw(u){if(!this.hdr)throw new Error("hdr undefined");return this.hdr.scl_slope===0&&(this.hdr.scl_slope=1),(u-this.hdr.scl_inter)/this.hdr.scl_slope}saveToUint8Array(u,m=null){if(!this.hdr)throw new Error("hdr undefined");if(!this.img)throw new Error("img undefined");const A=m!==null,S=hdrToArrayBuffer(this.hdr,A),v=new Uint8Array(4);let w=new Uint8Array(this.img.buffer);A&&(w=new Uint8Array(m.buffer));const D=new Uint8Array(S.length+v.length+w.length);D.set(S),D.set(v,S.length),D.set(w,S.length+v.length);let R=null;return u.endsWith(".gz")?R=gzipSync$1(D,{filename:u,mtime:Date.now(),level:6}):R=D,R}saveToDisk(u="",m=null){const A=this.saveToUint8Array(u,m);if(u==="")return log.debug("saveToDisk: empty file name, returning data as Uint8Array rather than triggering download"),A;const S=new Blob([A.buffer],{type:"application/octet-stream"}),v=URL.createObjectURL(S),w=document.createElement("a");return w.setAttribute("href",v),w.setAttribute("download",u),w.style.visibility="hidden",document.body.appendChild(w),w.click(),document.body.removeChild(w),A}static async fetchDicomData(u,m={}){if(u==="")throw Error("url must not be empty");let S=/^(?:[a-z+]+:)?\/\//i.test(u)?u:new URL(u,window.location.href);/(?:.([^.]+))?$/.exec(S.pathname)||(S=new URL("niivue-manifest.txt",u));let D=await fetch(S,{headers:m});if(!D.ok)throw Error(D.statusText);const L=(await D.text()).split(` -`),d=/(.*\/).*/.exec(S)[0],E=[];for(const e of L){const N=new URL(e,d);if(D=await fetch(N,{headers:m}),!D.ok)throw Error(D.statusText);const q=await D.arrayBuffer();E.push(q)}return E}static async fetchPartial(u,m,A={}){try{return await fetch(u,{headers:{range:`bytes=0-'${m}`,stream:"true",...A}})}catch(S){return log.error(S),log.error("fetchPartial failed, trying again without range header"),await fetch(u,{headers:A})}}static async loadFromUrl({url:u="",urlImgData:m="",headers:A={},name:S="",colormap:v="gray",opacity:w=1,cal_min:D=NaN,cal_max:R=NaN,trustCalMinMax:L=!0,percentileFrac:P=.02,ignoreZeroVoxels:d=!1,useQFormNotSForm:E=!1,colormapNegative:e="",frame4D:N=0,isManifest:q=!1,limitFrames4D:z=NaN,imageType:e0=NVIMAGE_TYPE.UNKNOWN,colorbarVisible:H=!0,buffer:j=new ArrayBuffer(0)}={}){if(u==="")throw Error("url must not be empty");let y=null,Y=null;if(u instanceof Uint8Array&&(u=u.buffer),j.byteLength>0&&(u=j),u instanceof ArrayBuffer)if(Y=u,S!=="")u=S;else{u="array.nii";const f=new Uint8Array(Y);f[0]===31&&f[1]===139&&(u="array.nii.gz")}if(!isNaN(z)){let f=await this.fetchPartial(u,512,A);Y=await f.arrayBuffer();let l0=new Uint8Array(Y),o0=!1;l0[0]===31&&l0[1]===139&&(o0=!0,new Decompress$1(S0=>{l0=S0}).push(l0),Y=l0.buffer);let c0=l0[0]===92&&l0[1]===1;if(c0||(c0=l0[1]===92&&l0[0]===1),!c0)Y=null;else{const d0=nifti.readHeader(Y);if(d0===null)throw new Error("could not read nifti header");const S0=d0.numBitsPerVoxel/8;let p0=1;for(let ee=1;ee<4;ee++)d0.dims[ee]>1&&(p0*=d0.dims[ee]);let T0=1;for(let ee=4;ee<7;ee++)d0.dims[ee]>1&&(T0*=d0.dims[ee]);const C0=Math.max(Math.min(z,T0),1),F0=d0.vox_offset+C0*p0*S0;if(Y.byteLength{ee=ke}).push(ee),Y=ee.buffer}Y.byteLength-1&&(S=S.slice(0,S.indexOf("?")))}let Q=null;if(m.length>0){let f=await fetch(m,{headers:A});f.status===404&&m.lastIndexOf("BRIK")!==-1&&(f=await fetch(m+".gz",{headers:A})),Q=await f.arrayBuffer()}if(!Y)throw new Error("Unable to load buffer properly from volume");return y=new Wt(Y,S,v,w,Q,D,R,L,P,d,E,e,N,e0),y.url=u,y.colorbarVisible=H,y}static readFileAsync(u,m=NaN){return new Promise((A,S)=>{const v=new FileReader;v.onload=()=>{u.name.lastIndexOf("gz")!==-1&&isNaN(m)?A(nifti.decompress(v.result)):A(v.result)},v.onerror=S,isNaN(m)?v.readAsArrayBuffer(u):v.readAsArrayBuffer(u.slice(0,m))})}static async loadFromFile({file:u,name:m="",colormap:A="gray",opacity:S=1,urlImgData:v=null,cal_min:w=NaN,cal_max:D=NaN,trustCalMinMax:R=!0,percentileFrac:L=.02,ignoreZeroVoxels:P=!1,useQFormNotSForm:d=!1,colormapNegative:E="",frame4D:e=0,limitFrames4D:N=NaN,imageType:q=NVIMAGE_TYPE.UNKNOWN}){let z=null,e0=[];try{if(Array.isArray(u))for(let j=0;j{j=J}).push(j),e0=j.buffer);let Y=j[0]===92&&j[1]===1;if(Y||(Y=j[1]===92&&j[0]===1),!Y)e0=await this.readFileAsync(u);else{const G=nifti.readHeader(e0);if(!G)throw new Error("could not read nifti header");const J=G.numBitsPerVoxel/8;let i0=1;for(let o0=1;o0<4;o0++)G.dims[o0]>1&&(i0*=G.dims[o0]);let Q=1;for(let o0=4;o0<7;o0++)G.dims[o0]>1&&(Q*=G.dims[o0]);const f=Math.max(Math.min(N,Q),1),l0=G.vox_offset+f*i0*J;if(e0.byteLength{o0=d0}).push(o0),e0=o0.buffer}if(e0.byteLength"u")return v;if(!m){const D=clone$2(this.frac2mmOrtho);return invert(D,D),transformMat4(A,A,D),v[0]=A[0],v[1]=A[1],v[2]=A[2],v}if(S[1]<1||S[2]<1||S[3]<1)return v;const w=clone$2(this.matRAS);return invert(w,w),transpose(w,w),transformMat4(A,A,w),v[0]=(A[0]+.5)/S[1],v[1]=(A[1]+.5)/S[2],v[2]=(A[2]+.5)/S[3],v}},DRAG_MODE=(T=>(T[T.none=0]="none",T[T.contrast=1]="contrast",T[T.measurement=2]="measurement",T[T.pan=3]="pan",T[T.slicer3D=4]="slicer3D",T[T.callbackOnly=5]="callbackOnly",T))(DRAG_MODE||{}),DEFAULT_OPTIONS={textHeight:.06,colorbarHeight:.05,crosshairWidth:1,crosshairGap:0,rulerWidth:4,show3Dcrosshair:!1,backColor:[0,0,0,1],crosshairColor:[1,0,0,1],fontColor:[.5,.5,.5,1],selectionBoxColor:[1,1,1,.5],clipPlaneColor:[.7,0,.7,.5],rulerColor:[1,0,0,.8],colorbarMargin:.05,trustCalMinMax:!0,clipPlaneHotKey:"KeyC",viewModeHotKey:"KeyV",doubleTouchTimeout:500,longTouchTimeout:1e3,keyDebounceTime:50,isNearestInterpolation:!1,isResizeCanvas:!0,atlasOutline:0,isRuler:!1,isColorbar:!1,isOrientCube:!1,multiplanarPadPixels:0,multiplanarForceRender:!1,isRadiologicalConvention:!1,meshThicknessOn2D:1/0,dragMode:1,yoke3Dto2DZoom:!1,isDepthPickMesh:!1,isCornerOrientationText:!1,sagittalNoseLeft:!1,isSliceMM:!1,isV1SliceShader:!1,isHighResolutionCapable:!0,logLevel:"info",loadingText:"waiting for images...",isForceMouseClickToVoxelCenters:!1,dragAndDropEnabled:!0,drawingEnabled:!1,penValue:1,floodFillNeighbors:6,isFilledPen:!1,thumbnail:"",maxDrawUndoBitmaps:8,sliceType:3,meshXRay:0,isAntiAlias:null,limitFrames4D:NaN,isAdditiveBlend:!1,showLegend:!0,legendBackgroundColor:[.3,.3,.3,.5],legendTextColor:[1,1,1,1],multiplanarLayout:0,renderOverlayBlend:1,sliceMosaicString:""},INITIAL_SCENE_DATA={azimuth:110,elevation:10,crosshairPos:fromValues$2(.5,.5,.5),clipPlane:[0,0,0,0],clipPlaneDepthAziElev:[2,0,0],volScaleMultiplier:1,pan2Dxyzmm:fromValues$1(0,0,0,1)},NVDocument=class Zt{constructor(){__publicField(this,"data",{title:"Untitled document",imageOptionsArray:[],meshOptionsArray:[],opts:{...DEFAULT_OPTIONS},previewImageDataURL:"",labels:[],encodedImageBlobs:[],encodedDrawingBlob:""}),__publicField(this,"scene"),__publicField(this,"volumes",[]),__publicField(this,"meshDataObjects"),__publicField(this,"meshes",[]),__publicField(this,"drawBitmap",null),__publicField(this,"imageOptionsMap",new Map),__publicField(this,"meshOptionsMap",new Map),this.scene={onAzimuthElevationChange:()=>{},onZoom3DChange:()=>{},sceneData:INITIAL_SCENE_DATA,get renderAzimuth(){return this.sceneData.azimuth},set renderAzimuth(u){this.sceneData.azimuth=u,this.onAzimuthElevationChange&&this.onAzimuthElevationChange(this.sceneData.azimuth,this.sceneData.elevation)},get renderElevation(){return this.sceneData.elevation},set renderElevation(u){this.sceneData.elevation=u,this.onAzimuthElevationChange&&this.onAzimuthElevationChange(this.sceneData.azimuth,this.sceneData.elevation)},get volScaleMultiplier(){return this.sceneData.volScaleMultiplier},set volScaleMultiplier(u){this.sceneData.volScaleMultiplier=u,this.onZoom3DChange(u)},get crosshairPos(){return this.sceneData.crosshairPos},set crosshairPos(u){this.sceneData.crosshairPos=u},get clipPlane(){return this.sceneData.clipPlane},set clipPlane(u){this.sceneData.clipPlane=u},get clipPlaneDepthAziElev(){return this.sceneData.clipPlaneDepthAziElev},set clipPlaneDepthAziElev(u){this.sceneData.clipPlaneDepthAziElev=u},get pan2Dxyzmm(){return this.sceneData.pan2Dxyzmm},set pan2Dxyzmm(u){this.sceneData.pan2Dxyzmm=u}}}get title(){return this.data.title}get previewImageDataURL(){return this.data.previewImageDataURL}set previewImageDataURL(u){this.data.previewImageDataURL=u}set title(u){this.data.title=u}get imageOptionsArray(){return this.data.imageOptionsArray}get encodedImageBlobs(){return this.data.encodedImageBlobs}get encodedDrawingBlob(){return this.data.encodedDrawingBlob}get opts(){return this.data.opts}set opts(u){this.data.opts={...u}}get labels(){return this.data.labels}set labels(u){this.data.labels=u}get customData(){return this.data.customData}set customData(u){this.data.customData=u}hasImage(u){return this.volumes.find(m=>m.id===u.id)!==void 0}hasImageFromUrl(u){return this.data.imageOptionsArray.find(m=>m.url===u)!==void 0}addImageOptions(u,m){if(!this.hasImage(u)&&!m.name)if(m.url){const S=/^(?:[a-z+]+:)?\/\//i.test(m.url)?new URL(m.url):new URL(m.url,window.location.href);m.name=S.pathname.split("/").pop(),m.name.toLowerCase().endsWith(".gz")&&(m.name=m.name.slice(0,-3)),m.name.toLowerCase().endsWith(".nii")||(m.name+=".nii")}else m.name="untitled.nii";m.imageType=NVIMAGE_TYPE.NII,this.data.imageOptionsArray.push(m),this.imageOptionsMap.set(u.id,this.data.imageOptionsArray.length-1)}removeImage(u){if(this.imageOptionsMap.has(u.id)){const m=this.imageOptionsMap.get(u.id);this.data.imageOptionsArray.length>m&&this.data.imageOptionsArray.splice(m,1),this.imageOptionsMap.delete(u.id)}this.volumes=this.volumes.filter(m=>m.id!==u.id)}getImageOptions(u){return this.imageOptionsMap.has(u.id)?this.data.imageOptionsArray[this.imageOptionsMap.get(u.id)]:null}json(){const u={encodedImageBlobs:[],previewImageDataURL:this.data.previewImageDataURL,imageOptionsMap:new Map},m=[];if(u.sceneData={...this.scene.sceneData},u.opts={...this.opts},this.opts.meshThicknessOn2D===1/0&&(u.opts.meshThicknessOn2D="infinity"),u.labels=[...this.data.labels],u.customData=this.customData,this.volumes.length){let S=this.imageOptionsArray[0];if(S||(log.debug("no image options for base image"),S={name:"",colormap:"gray",opacity:1,pairedImgData:null,cal_min:NaN,cal_max:NaN,trustCalMinMax:!0,percentileFrac:.02,ignoreZeroVoxels:!1,useQFormNotSForm:!1,colormapNegative:"",colormapLabel:null,imageType:NVIMAGE_TYPE.NII,frame4D:0,limitFrames4D:NaN,url:"",urlImageData:"",alphaThreshold:!1,cal_minNeg:NaN,cal_maxNeg:NaN,colorbarVisible:!0}),S.colormap=this.volumes[0].colormap,S.opacity=this.volumes[0].opacity,S.cal_max=this.volumes[0].cal_max||NaN,S.cal_min=this.volumes[0].cal_min||NaN,S){m.push(S);const v=NVUtilities.uint8tob64(this.volumes[0].toUint8Array());u.encodedImageBlobs.push(v),this.drawBitmap&&(u.encodedDrawingBlob=NVUtilities.uint8tob64(this.volumes[0].toUint8Array(this.drawBitmap))),u.imageOptionsMap.set(this.volumes[0].id,0)}else throw new Error("image options for base layer not found");for(let v=1;v({values:w.values,nFrame4D:w.nFrame4D,frame4D:0,outlineBorder:w.outlineBorder,global_min:w.global_min,global_max:w.global_max,cal_min:w.cal_min,cal_max:w.cal_max,opacity:w.opacity,colormap:w.colormap,colormapNegative:w.colormapNegative,colormapLabel:w.colormapLabel,useNegativeCmap:w.useNegativeCmap})),hasConnectome:S.hasConnectome,edgeColormap:S.edgeColormap,edgeColormapNegative:S.edgeColormapNegative,edgeMax:S.edgeMax,edgeMin:S.edgeMin,edges:S.edges&&Array.isArray(S.edges)?[...S.edges]:[],extentsMax:S.extentsMax,extentsMin:S.extentsMin,fiberGroupColormap:S.fiberGroupColormap,furthestVertexFromOrigin:S.furthestVertexFromOrigin,nodeColormap:S.nodeColormap,nodeColormapNegative:S.nodeColormapNegative,nodeMaxColor:S.nodeMaxColor,nodeMinColor:S.nodeMinColor,nodeScale:S.nodeScale,legendLineThickness:S.legendLineThickness,offsetPt0:S.offsetPt0,nodes:S.nodes};A.push(v)}return u.meshesString=JSON.stringify(serialize(A)),u}download(u){const m=this.json();NVUtilities.download(JSON.stringify(m),u,"application/json")}static deserializeMeshDataObjects(u){if(u.data.meshesString){u.meshDataObjects=deserialize(JSON.parse(u.data.meshesString));for(const m of u.meshDataObjects)for(const A of m.layers)"colorMap"in A&&(A.colormap=A.colorMap,delete A.colorMap),"colorMapNegative"in A&&(A.colormapNegative=A.colorMapNegative,delete A.colorMapNegative)}}static async loadFromUrl(u){const A=await(await fetch(u)).json();return Zt.loadFromJSON(A)}static async loadFromFile(u){const m=await NVUtilities.readFileAsync(u),A=new Zt,v=new TextDecoder().decode(m);return A.data=JSON.parse(v),A.data.opts.meshThicknessOn2D==="infinity"&&(A.data.opts.meshThicknessOn2D=1/0),A.scene.sceneData={...INITIAL_SCENE_DATA,...A.data.sceneData},Zt.deserializeMeshDataObjects(A),A}static loadFromJSON(u){const m=new Zt;return m.data=u,m.data.opts.meshThicknessOn2D==="infinity"&&(m.data.opts.meshThicknessOn2D=1/0),m.scene.sceneData={...INITIAL_SCENE_DATA,...u.sceneData},Zt.deserializeMeshDataObjects(m),m}},NVLabel3D=class{constructor(T,u,m){__publicField(this,"text"),__publicField(this,"style"),__publicField(this,"points"),this.text=T,this.style=u,this.points=m}},defaultOptions={name:"untitled connectome",nodeColormap:"warm",nodeColormapNegative:"winter",nodeMinColor:0,nodeMaxColor:4,nodeScale:3,edgeColormap:"warm",edgeColormapNegative:"winter",edgeMin:2,edgeMax:6,edgeScale:1,legendLineThickness:0},NVConnectome=class Nn extends NVMesh2{constructor(u,m){super(new Float32Array([]),new Uint32Array([]),m.name,new Uint8Array([]),1,!0,u,m),__publicField(this,"gl"),__publicField(this,"nodesChanged"),this.gl=u,this.type="connectome",this.nodes&&this.updateLabels(),this.nodesChanged=new EventTarget}static convertLegacyConnectome(u){const m={nodes:[],edges:[],...defaultOptions};for(const S in u)if(S in defaultOptions){const v=S;m[v]=u[v]}const A=u.nodes;for(let S=0;S({name:Array.isArray(w.comments)&&w.comments.length>0&&"text"in w.comments[0]?w.comments[0].text:"",x:w.coordinates.x,y:w.coordinates.y,z:w.coordinates.z,colorValue:1,sizeValue:1,metadata:w.comments}));return{...defaultOptions,nodeColormap:m,edgeColormap:m,nodes:S,edges:[]}}updateLabels(){const u=this.nodes;if(u&&u.length>0){const m=u.reduce((L,P)=>L.sizeValue>P.sizeValue?L:P).sizeValue,A=this.nodeMinColor?this.nodeMinColor:u.reduce((L,P)=>L.colorValueL.colorValue>P.colorValue?L:P).colorValue,v=cmapper.colormap(this.nodeColormap,this.colormapInvert),w=cmapper.colormap(this.nodeColormapNegative,this.colormapInvert),D="nodeColormapNegative"in this,R=this.legendLineThickness?this.legendLineThickness:0;for(let L=0;Le/255),log.debug("adding label for ",u[L]),u[L].label=new NVLabel3D(u[L].name,{textColor:E,bulletScale:u[L].sizeValue/m,bulletColor:E,lineWidth:R,lineColor:E,textScale:1,textAlignment:"left",lineTerminator:"none"},[u[L].x,u[L].y,u[L].z]),log.debug("label for node:",u[L].label)}}}addConnectomeNode(u){if(log.debug("adding node",u),!this.nodes)throw new Error("nodes not defined");this.nodes.push(u),this.updateLabels(),this.nodesChanged.dispatchEvent(new CustomEvent("nodeAdded",{detail:{node:u}}))}deleteConnectomeNode(u){const m=this.nodes.indexOf(u),A=this.edges;A&&(this.edges=A.filter(S=>S.first!==m&&S.second!==m)),this.nodes=this.nodes.filter(S=>S!==u),this.updateLabels(),this.updateConnectome(this.gl),this.nodesChanged.dispatchEvent(new CustomEvent("nodeDeleted",{detail:{node:u}}))}updateConnectomeNodeByIndex(u,m){this.nodes[u]=m,this.updateLabels(),this.updateConnectome(this.gl),this.nodesChanged.dispatchEvent(new CustomEvent("nodeChanged",{detail:{node:m}}))}updateConnectomeNodeByPoint(u,m){const A=this.nodes;if(!A)throw new Error("Node to update does not exist");const S=A.find(w=>NVUtilities.arraysAreEqual([w.x,w.y,w.z],u));if(!S)throw new Error(`Node with point ${u} to update does not exist`);const v=A.findIndex(w=>w===S);this.updateConnectomeNodeByIndex(v,m)}addConnectomeEdge(u,m,A){const S=this.edges;let v=S.find(w=>(w.first===u||w.second===u)&&w.first+w.second===u+m);return v||(v={first:u,second:m,colorValue:A},S.push(v),this.updateConnectome(this.gl),v)}deleteConnectomeEdge(u,m){const A=this.edges,S=A.find(v=>(v.first===u||v.first===m)&&v.first+v.second===u+m);if(S)this.edges=A.filter(v=>v!==S);else throw new Error(`edge between ${u} and ${m} not found`);return this.updateConnectome(this.gl),S}findClosestConnectomeNode(u,m){const A=this.nodes;if(!A||A.length===0)return null;const S=A.map((v,w)=>({node:v,distance:Math.sqrt(Math.pow(v.x-u[0],2)+Math.pow(v.y-u[1],2)+Math.pow(v.z-u[2],2)),index:w})).filter(v=>v.distancev.distance-w.distance);return S.length>0?S[0].node:null}updateConnectome(u){const m=[],A=[],S=[];let v=cmapper.colormap(this.nodeColormap,this.colormapInvert),w=cmapper.colormap(this.nodeColormapNegative,this.colormapInvert),D="nodeColormapNegative"in this;if(this.nodeMinColor===void 0||this.nodeMaxColor===void 0)throw new Error("nodeMinColor or nodeMaxColor is undefined");if(this.edgeMin===void 0||this.edgeMax===void 0)throw new Error("edgeMin or edgeMax undefined");let R=this.nodeMinColor,L=this.nodeMaxColor;const P=this.nodes,d=P.length;for(let e0=0;e0v&&([S,v]=[v,S]),[S,v]}function swizzleVec3(T,u=[0,1,2]){const m=create$2();return m[0]=T[u[0]],m[1]=T[u[1]],m[2]=T[u[2]],m}function isRadiological(T){const u=fromValues$1(1,0,0,0),m=create$1();return transformMat4(m,u,T),m[0]}function unProject(T,u,m,A){const S=fromValues$1(T,u,m,1),v=clone$2(A);invert(v,v),S[0]=S[0]*2-1,S[1]=S[1]*2-1,S[2]=S[2]*2-1;const w=create$1();return transformMat4(w,S,v),w[3]===0||(w[0]/=w[3],w[1]/=w[3],w[2]/=w[3]),w}function unpackFloatFromVec4i(T){const u=[5960464477539063e-23,152587890625e-16,.00390625,1];return(T[0]*u[0]+T[1]*u[1]+T[2]*u[2]+T[3]*u[3])/255}function clamp(T,u,m){return Math.min(Math.max(T,u),m)}function encodeRLE(T){const u=T.length;let m=0;const A=new Uint8Array(u+Math.ceil(.01*u)),S=new Int8Array(A.buffer);let v=0;for(;m1){S[v]=-D+1,v++,A[v]=w,v++;continue}for(;m127||m+2 "+v+" bytes (x"+u/v+")"),A.slice(0,v)}function decodeRLE(T,u){const m=new Uint8Array(T.buffer),A=new Int8Array(m.buffer);let S=0;const v=new Uint8Array(u);let w=0;for(;S{}),__publicField(this,"onMouseUp",()=>{}),__publicField(this,"onLocationChange",()=>{}),__publicField(this,"onIntensityChange",()=>{}),__publicField(this,"onImageLoaded",()=>{}),__publicField(this,"onMeshLoaded",()=>{}),__publicField(this,"onFrameChange",()=>{}),__publicField(this,"onError",()=>{}),__publicField(this,"onColormapChange",()=>{}),__publicField(this,"onInfo",()=>{}),__publicField(this,"onWarn",()=>{}),__publicField(this,"onDebug",()=>{}),__publicField(this,"onVolumeAddedFromUrl",()=>{}),__publicField(this,"onVolumeWithUrlRemoved",()=>{}),__publicField(this,"onVolumeUpdated",()=>{}),__publicField(this,"onMeshAddedFromUrl",()=>{}),__publicField(this,"onMeshAdded",()=>{}),__publicField(this,"onMeshWithUrlRemoved",()=>{}),__publicField(this,"onZoom3DChange",()=>{}),__publicField(this,"onAzimuthElevationChange",()=>{}),__publicField(this,"onClipPlaneChange",()=>{}),__publicField(this,"onCustomMeshShaderAdded",()=>{}),__publicField(this,"onMeshShaderChanged",()=>{}),__publicField(this,"onMeshPropertyChanged",()=>{}),__publicField(this,"onDocumentLoaded",()=>{}),__publicField(this,"document",new NVDocument),__publicField(this,"mediaUrlMap",new Map),__publicField(this,"initialized",!1),__publicField(this,"currentDrawUndoBitmap"),__publicField(this,"loadingText");for(const m in u)typeof u[m]=="function"?this[m]=u[m]:this.opts[m]=DEFAULT_OPTIONS[m]===void 0?DEFAULT_OPTIONS[m]:u[m];this.opts.isHighResolutionCapable?this.uiData.dpr=window.devicePixelRatio||1:this.uiData.dpr=1,this.currentDrawUndoBitmap=this.opts.maxDrawUndoBitmaps,this.opts.drawingEnabled&&this.createEmptyDrawing(),this.opts.thumbnail.length>0&&(this.thumbnailVisible=!0),this.loadingText=this.opts.loadingText,log.setLogLevel(this.opts.logLevel)}get scene(){return this.document.scene}get opts(){return this.document.opts}get sliceMosaicString(){return this.document.opts.sliceMosaicString||""}set sliceMosaicString(u){this.document.opts.sliceMosaicString=u}get volumes(){return this.document.volumes}set volumes(u){this.document.volumes=u}get meshes(){return this.document.meshes}set meshes(u){this.document.meshes=u}get drawBitmap(){return this.document.drawBitmap}set drawBitmap(u){this.document.drawBitmap=u}get volScaleMultiplier(){return this.scene.volScaleMultiplier}set volScaleMultiplier(u){this.setScale(u)}async saveScene(u="niivue.png"){function m(S,v){const w=document.createElement("a");document.body.appendChild(w),w.style.display="none";const D=window.URL.createObjectURL(S);w.href=D,w.download=v,w.click(),w.remove()}const A=this.canvas;if(!A)throw new Error("canvas not defined");this.drawScene(),A.toBlob(S=>{S&&(u===""&&(u=`niivue-screenshot-${new Date().toString()}.png`,u=u.replace(/\s/g,"_")),m(S,u))})}async attachTo(u,m=null){return await this.attachToCanvas(document.getElementById(u),m),log.debug("attached to element with id: ",u),this}async attachToCanvas(u,m=null){return this.canvas=u,m===null&&(m=navigator.hardwareConcurrency>6,log.debug("AntiAlias ",m," Threads ",navigator.hardwareConcurrency)),this.gl=this.canvas.getContext("webgl2",{alpha:!0,antialias:m}),log.info("NIIVUE VERSION ",version),this.canvas.parentElement.style.backgroundColor="black",this.opts.isResizeCanvas&&(this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.display="block",this.canvas.width=this.canvas.offsetWidth,this.canvas.height=this.canvas.offsetHeight,window.addEventListener("resize",this.resizeListener.bind(this)),this.resizeObserver=new ResizeObserver(this.resizeListener.bind(this)),this.resizeObserver.observe(this.canvas.parentElement)),this.registerInteractions(),await this.init(),this.drawScene(),this}syncWith(u,m={"2d":!0,"3d":!0}){this.otherNV=u,this.syncOpts=m}broadcastTo(u,m={"2d":!0,"3d":!0}){this.otherNV=u,this.syncOpts=m}sync(){if(!this.gl||!this.otherNV||typeof this.otherNV>"u"||!this.gl.canvas.matches(":focus"))return;const u=this.frac2mm(this.scene.crosshairPos);if(this.otherNV instanceof Bn)this.syncOpts["2d"]&&(this.otherNV.scene.crosshairPos=this.otherNV.mm2frac(u)),this.syncOpts["3d"]&&(this.otherNV.scene.renderAzimuth=this.scene.renderAzimuth,this.otherNV.scene.renderElevation=this.scene.renderElevation),this.otherNV.drawScene(),this.otherNV.createOnLocationChange();else if(Array.isArray(this.otherNV))for(let m=0;mA===m[S])}resizeListener(){if(!(!this.canvas||!this.gl)){if(!this.opts.isResizeCanvas){this.opts.isHighResolutionCapable&&(log.warn("isHighResolutionCapable requires isResizeCanvas"),this.opts.isHighResolutionCapable=!1),this.uiData.dpr=1,this.drawScene();return}this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.display="block",this.opts.isHighResolutionCapable?(this.uiData.dpr=window.devicePixelRatio||1,log.debug("devicePixelRatio: "+this.uiData.dpr)):this.uiData.dpr=1,"width"in this.canvas.parentElement?(this.canvas.width=this.canvas.parentElement.width*this.uiData.dpr,this.canvas.height=this.canvas.parentElement.height*this.uiData.dpr):(this.canvas.width=this.canvas.offsetWidth*this.uiData.dpr,this.canvas.height=this.canvas.offsetHeight*this.uiData.dpr),this.gl.viewport(0,0,this.gl.canvas.width,this.gl.canvas.height),this.drawScene()}}getRelativeMousePosition(u,m){if(m=m||u.target,!m)return;const A=m.getBoundingClientRect();return{x:u.clientX-A.left,y:u.clientY-A.top}}getNoPaddingNoBorderCanvasRelativeMousePosition(u,m){return m=m||u.target,this.getRelativeMousePosition(u,m)}mouseContextMenuListener(u){u.preventDefault()}mouseDownListener(u){u.preventDefault(),this.drawPenLocation=[NaN,NaN,NaN],this.drawPenAxCorSag=-1,this.uiData.mousedown=!0,log.debug("mouse down"),log.debug(u);const m=this.getNoPaddingNoBorderCanvasRelativeMousePosition(u,this.gl.canvas);if(!m)return;const[A,S]=[m.x*this.uiData.dpr,m.y*this.uiData.dpr],v=this.getLabelAtPoint([A,S]);if(v){for(const w of this.meshes)if(w.type==="connectome")for(const D of w.nodes)D.label===v&&(this.scene.crosshairPos=this.mm2frac([D.x,D.y,D.z]),this.updateGLVolume(),this.drawScene())}this.uiData.clickedTile=this.tileIndex(A,S),u.button===LEFT_MOUSE_BUTTON&&u.shiftKey?(this.uiData.mouseButtonCenterDown=!0,this.mouseCenterButtonHandler(u)):u.button===LEFT_MOUSE_BUTTON?(this.uiData.mouseButtonLeftDown=!0,this.mouseLeftButtonHandler(u)):u.button===RIGHT_MOUSE_BUTTON?(this.uiData.mouseButtonRightDown=!0,this.mouseRightButtonHandler(u)):u.button===CENTER_MOUSE_BUTTON&&(this.uiData.mouseButtonCenterDown=!0,this.mouseCenterButtonHandler(u))}mouseLeftButtonHandler(u){const m=this.getNoPaddingNoBorderCanvasRelativeMousePosition(u,this.gl.canvas);this.mouseDown(m.x,m.y),this.mouseClick(m.x,m.y)}mouseCenterButtonHandler(u){const m=this.getNoPaddingNoBorderCanvasRelativeMousePosition(u,this.gl.canvas);this.mousePos=[m.x*this.uiData.dpr,m.y*this.uiData.dpr],this.opts.dragMode!==0&&(this.setDragStart(m.x,m.y),this.uiData.isDragging||(this.uiData.pan2DxyzmmAtMouseDown=clone(this.scene.pan2Dxyzmm)),this.uiData.isDragging=!0,this.uiData.dragClipPlaneStartDepthAziElev=this.scene.clipPlaneDepthAziElev)}mouseRightButtonHandler(u){const m=this.getNoPaddingNoBorderCanvasRelativeMousePosition(u,this.gl.canvas);this.mousePos=[m.x*this.uiData.dpr,m.y*this.uiData.dpr],this.opts.dragMode!==0&&(this.setDragStart(m.x,m.y),this.uiData.isDragging||(this.uiData.pan2DxyzmmAtMouseDown=clone(this.scene.pan2Dxyzmm)),this.uiData.isDragging=!0,this.uiData.dragClipPlaneStartDepthAziElev=this.scene.clipPlaneDepthAziElev)}calculateMinMaxVoxIdx(u){if(u.length>2)throw new Error("array must not contain more than two values");return[Math.floor(Math.min(u[0],u[1])),Math.floor(Math.max(u[0],u[1]))]}calculateNewRange({volIdx:u=0}={}){if(this.opts.sliceType===4&&this.sliceMosaicString.length<1||this.uiData.dragStart[0]===this.uiData.dragEnd[0]&&this.uiData.dragStart[1]===this.uiData.dragEnd[1])return;let m=this.canvasPos2frac([this.uiData.dragStart[0],this.uiData.dragStart[1]]);if(m[0]<0)return;const A=this.frac2vox(m,u);if(m=this.canvasPos2frac([this.uiData.dragEnd[0],this.uiData.dragEnd[1]]),m[0]<0)return;const S=this.frac2vox(m,u);let v=-Number.MAX_VALUE,w=Number.MAX_VALUE;const D=this.calculateMinMaxVoxIdx([A[0],S[0]]),R=this.calculateMinMaxVoxIdx([A[1],S[1]]),L=this.calculateMinMaxVoxIdx([A[2],S[2]]);A[0]-S[0]===0?D[1]=A[0]+1:A[1]-S[1]===0?R[1]=A[1]+1:A[2]-S[2]===0&&(L[1]=A[2]+1);const P=this.volumes[u].hdr,d=this.volumes[u].img;if(!P||!d)return;const E=P.dims[1],e=P.dims[2];for(let z=L[0];zd[Y]&&(w=d[Y]),v=v)return;const N=intensityRaw2Scaled(P,w),q=intensityRaw2Scaled(P,v);this.volumes[u].cal_min=N,this.volumes[u].cal_max=q,this.onIntensityChange(this.volumes[u])}generateMouseUpCallback(u,m){const A=this.tileIndex(this.uiData.dragStart[0],this.uiData.dragStart[1]),S=this.tileIndex(this.uiData.dragEnd[0],this.uiData.dragEnd[1]);let v=-1;A===S&&(v=S);let w=-1;v>=0&&(w=this.screenSlices[v].axCorSag);const D=this.frac2mm(u),R=this.frac2mm(m),L=create$2();sub$1(L,fromValues$2(D[0],D[1],D[2]),fromValues$2(R[0],R[1],R[2]));const P=len(L),d=this.frac2vox(u),E=this.frac2vox(m);this.onDragRelease({fracStart:u,fracEnd:m,voxStart:d,voxEnd:E,mmStart:D,mmEnd:R,mmLength:P,tileIdx:v,axCorSag:w})}mouseUpListener(){function u(S){return Object.prototype.toString.call(S).indexOf("Function")>-1}const m={mouseButtonRightDown:this.uiData.mouseButtonRightDown,mouseButtonCenterDown:this.uiData.mouseButtonCenterDown,isDragging:this.uiData.isDragging,mousePos:this.mousePos,fracPos:this.canvasPos2frac(this.mousePos)};this.uiData.mousedown=!1,this.uiData.mouseButtonRightDown=!1;const A=this.uiData.mouseButtonCenterDown;if(this.uiData.mouseButtonCenterDown=!1,this.uiData.mouseButtonLeftDown=!1,this.drawPenFillPts.length>0?this.drawPenFilled():this.drawPenAxCorSag>=0&&this.drawAddUndoBitmap(),this.drawPenLocation=[NaN,NaN,NaN],this.drawPenAxCorSag=-1,u(this.onMouseUp)&&this.onMouseUp(m),this.uiData.isDragging){this.uiData.isDragging=!1,this.opts.dragMode===5&&this.drawScene();const S=this.canvasPos2frac([this.uiData.dragStart[0],this.uiData.dragStart[1]]),v=this.canvasPos2frac([this.uiData.dragEnd[0],this.uiData.dragEnd[1]]);if(this.generateMouseUpCallback(S,v),this.opts.dragMode!==1||A||this.uiData.dragStart[0]===this.uiData.dragEnd[0]&&this.uiData.dragStart[1]===this.uiData.dragEnd[1])return;this.calculateNewRange({volIdx:0}),this.refreshLayers(this.volumes[0],0)}this.drawScene()}checkMultitouch(u){if(this.uiData.touchdown&&!this.uiData.multiTouchGesture){const m=this.canvas.getBoundingClientRect();this.mouseDown(u.touches[0].clientX-m.left,u.touches[0].clientY-m.top),this.mouseClick(u.touches[0].clientX-m.left,u.touches[0].clientY-m.top)}}touchStartListener(u){u.preventDefault(),this.uiData.touchTimer||(this.uiData.touchTimer=setTimeout(()=>{this.resetBriCon(u)},this.opts.longTouchTimeout)),this.uiData.touchdown=!0,this.uiData.currentTouchTime=new Date().getTime();const m=this.uiData.currentTouchTime-this.uiData.lastTouchTime;if(m0){this.uiData.doubleTouch=!0,this.setDragStart(u.targetTouches[0].clientX-u.target.getBoundingClientRect().left,u.targetTouches[0].clientY-u.target.getBoundingClientRect().top),this.resetBriCon(u),this.uiData.lastTouchTime=this.uiData.currentTouchTime;return}else this.uiData.doubleTouch=!1,this.setDragStart(0,0),this.setDragEnd(0,0),this.uiData.lastTouchTime=this.uiData.currentTouchTime;this.uiData.touchdown&&u.touches.length<2?this.uiData.multiTouchGesture=!1:this.uiData.multiTouchGesture=!0,setTimeout(this.checkMultitouch.bind(this),1,u)}touchEndListener(u){if(u.preventDefault(),this.uiData.touchdown=!1,this.uiData.lastTwoTouchDistance=0,this.uiData.multiTouchGesture=!1,this.uiData.touchTimer&&(clearTimeout(this.uiData.touchTimer),this.uiData.touchTimer=null),this.uiData.isDragging){this.uiData.isDragging=!1,this.opts.dragMode===1&&(this.calculateNewRange(),this.refreshLayers(this.volumes[0],0));const m=this.canvasPos2frac([this.uiData.dragStart[0],this.uiData.dragStart[1]]),A=this.canvasPos2frac([this.uiData.dragEnd[0],this.uiData.dragEnd[1]]);this.generateMouseUpCallback(m,A)}this.mouseUpListener()}mouseMoveListener(u){if(this.uiData.mousedown){const m=this.getNoPaddingNoBorderCanvasRelativeMousePosition(u,this.gl.canvas);if(!m)return;const A=m.x*this.uiData.dpr,S=m.y*this.uiData.dpr;if(this.tileIndex(A,S)!==this.uiData.clickedTile)return;this.uiData.mouseButtonLeftDown?(this.mouseMove(m.x,m.y),this.mouseClick(m.x,m.y)):(this.uiData.mouseButtonRightDown||this.uiData.mouseButtonCenterDown)&&this.setDragEnd(m.x,m.y),this.drawScene(),this.uiData.prevX=this.uiData.currX,this.uiData.prevY=this.uiData.currY}}resetBriCon(u=null){if(this.uiData.isDragging)return;let m=!1;this.opts.sliceType===4&&(m=!0);let A=0,S=0;if(u!==null&&("targetTouches"in u?(A=u.targetTouches[0].clientX-u.target.getBoundingClientRect().left,S=u.targetTouches[0].clientY-u.target.getBoundingClientRect().top):(A=u.offsetX,S=u.offsetY),A*=this.uiData.dpr,S*=this.uiData.dpr,this.inRenderTile(A,S)>=0&&(m=!0)),m){this.uiData.mouseDepthPicker=!0,this.drawScene(),this.drawScene();return}this.opts.dragMode!==4&&(this.volumes.length<1||this.uiData.doubleTouch||(this.volumes[0].cal_min=this.volumes[0].robust_min,this.volumes[0].cal_max=this.volumes[0].robust_max,this.onIntensityChange(this.volumes[0]),this.refreshLayers(this.volumes[0],0),this.drawScene()))}setDragStart(u,m){u*=this.uiData.dpr,m*=this.uiData.dpr,this.uiData.dragStart[0]=u,this.uiData.dragStart[1]=m}setDragEnd(u,m){u*=this.uiData.dpr,m*=this.uiData.dpr,this.uiData.dragEnd[0]=u,this.uiData.dragEnd[1]=m}touchMoveListener(u){if(this.uiData.touchdown&&u.touches.length<2){const m=this.canvas.getBoundingClientRect();if(this.uiData.isDragging||(this.uiData.pan2DxyzmmAtMouseDown=clone(this.scene.pan2Dxyzmm)),this.uiData.isDragging=!0,this.uiData.doubleTouch&&this.uiData.isDragging){this.setDragEnd(u.targetTouches[0].clientX-u.target.getBoundingClientRect().left,u.targetTouches[0].clientY-u.target.getBoundingClientRect().top),this.drawScene();return}this.mouseClick(u.touches[0].clientX-m.left,u.touches[0].clientY-m.top),this.mouseMove(u.touches[0].clientX-m.left,u.touches[0].clientY-m.top)}else this.handlePinchZoom(u)}handlePinchZoom(u){if(u.targetTouches.length===2&&u.changedTouches.length===2){const m=Math.hypot(u.touches[0].pageX-u.touches[1].pageX,u.touches[0].pageY-u.touches[1].pageY),A=this.canvas.getBoundingClientRect();this.mousePos=[u.touches[0].clientX-A.left,u.touches[0].clientY-A.top],mthis.opts.keyDebounceTime){switch(this.currentClipPlaneIndex=(this.currentClipPlaneIndex+1)%7,this.currentClipPlaneIndex){case 0:this.scene.clipPlaneDepthAziElev=[2,0,0];break;case 1:this.scene.clipPlaneDepthAziElev=[0,270,0];break;case 2:this.scene.clipPlaneDepthAziElev=[0,90,0];break;case 3:this.scene.clipPlaneDepthAziElev=[0,0,0];break;case 4:this.scene.clipPlaneDepthAziElev=[0,180,0];break;case 5:this.scene.clipPlaneDepthAziElev=[0,0,-90];break;case 6:this.scene.clipPlaneDepthAziElev=[0,0,90];break}this.setClipPlane(this.scene.clipPlaneDepthAziElev)}this.lastCalled=m}else if(u.code===this.opts.viewModeHotKey){const m=new Date().getTime();m-this.lastCalled>this.opts.keyDebounceTime&&(this.setSliceType((this.opts.sliceType+1)%5),this.lastCalled=m)}}keyDownListener(u){u.code==="KeyH"&&this.opts.sliceType===4?this.setRenderAzimuthElevation(this.scene.renderAzimuth-1,this.scene.renderElevation):u.code==="KeyL"&&this.opts.sliceType===4?this.setRenderAzimuthElevation(this.scene.renderAzimuth+1,this.scene.renderElevation):u.code==="KeyJ"&&this.opts.sliceType===4?this.setRenderAzimuthElevation(this.scene.renderAzimuth,this.scene.renderElevation+1):u.code==="KeyK"&&this.opts.sliceType===4?this.setRenderAzimuthElevation(this.scene.renderAzimuth,this.scene.renderElevation-1):u.code==="KeyH"&&this.opts.sliceType!==4?this.moveCrosshairInVox(-1,0,0):u.code==="KeyL"&&this.opts.sliceType!==4?this.moveCrosshairInVox(1,0,0):u.code==="KeyU"&&this.opts.sliceType!==4&&u.ctrlKey?this.moveCrosshairInVox(0,0,1):u.code==="KeyD"&&this.opts.sliceType!==4&&u.ctrlKey?this.moveCrosshairInVox(0,0,-1):u.code==="KeyJ"&&this.opts.sliceType!==4?this.moveCrosshairInVox(0,-1,0):u.code==="KeyK"&&this.opts.sliceType!==4?this.moveCrosshairInVox(0,1,0):u.code==="KeyM"&&this.opts.sliceType!==4?(this.opts.dragMode++,this.opts.dragMode>=4&&(this.opts.dragMode=0),log.info("drag mode changed to ",DRAG_MODE[this.opts.dragMode])):u.code==="ArrowLeft"?this.setFrame4D(this.volumes[0].id,this.volumes[0].frame4D-1):u.code==="ArrowRight"?this.setFrame4D(this.volumes[0].id,this.volumes[0].frame4D+1):u.code==="Slash"&&u.shiftKey&&alert(`NIIVUE VERSION: ${version}`)}wheelListener(u){if(u.preventDefault(),u.stopPropagation(),this.thumbnailVisible)return;const m=this.canvas.getBoundingClientRect();u.deltaY<0?this.sliceScroll2D(-.01,u.clientX-m.left,u.clientY-m.top):this.sliceScroll2D(.01,u.clientX-m.left,u.clientY-m.top)}registerInteractions(){if(!this.canvas)throw new Error("canvas undefined");this.canvas.addEventListener("mousedown",this.mouseDownListener.bind(this)),this.canvas.addEventListener("mouseup",this.mouseUpListener.bind(this)),this.canvas.addEventListener("mousemove",this.mouseMoveListener.bind(this)),this.canvas.addEventListener("touchstart",this.touchStartListener.bind(this)),this.canvas.addEventListener("touchend",this.touchEndListener.bind(this)),this.canvas.addEventListener("touchmove",this.touchMoveListener.bind(this)),this.canvas.addEventListener("wheel",this.wheelListener.bind(this)),this.canvas.addEventListener("contextmenu",this.mouseContextMenuListener.bind(this)),this.canvas.addEventListener("dblclick",this.resetBriCon.bind(this)),this.canvas.addEventListener("dragenter",this.dragEnterListener.bind(this),!1),this.canvas.addEventListener("dragover",this.dragOverListener.bind(this),!1),this.canvas.addEventListener("drop",this.dropListener.bind(this),!1),this.canvas.setAttribute("tabindex","0"),this.canvas.addEventListener("keyup",this.keyUpListener.bind(this),!1),this.canvas.addEventListener("keydown",this.keyDownListener.bind(this),!1)}dragEnterListener(u){u.stopPropagation(),u.preventDefault()}dragOverListener(u){u.stopPropagation(),u.preventDefault()}getFileExt(u,m=!0){log.debug("fullname: ",u);const A=/(?:\.([^.]+))?$/;let S=A.exec(u)[1];return S=S.toUpperCase(),S==="GZ"&&(S=A.exec(u.slice(0,-3))[1],S=S.toUpperCase()),m?S:S.toLowerCase()}async addVolumeFromUrl(u){const m=await NVImage.loadFromUrl(u);return this.document.addImageOptions(m,u),m.onColormapChange=this.onColormapChange,this.mediaUrlMap.set(m,u.url),this.onVolumeAddedFromUrl&&this.onVolumeAddedFromUrl(u,m),this.addVolume(m),m}getMediaByUrl(u){return[...this.mediaUrlMap.entries()].filter(m=>m[1]===u).map(m=>m[0]).pop()}removeVolumeByUrl(u){const m=this.getMediaByUrl(u);if(m)this.removeVolume(m);else throw new Error("No volume with URL present")}readDirectory(u){const m=u.createReader();let A=[];const S=async w=>{const D=[],R=async L=>new Promise((P,d)=>L.file(P,d));for(let L=0;L{m.readEntries(w=>{w.length?(A=A.concat(w),v()):S(A).then(D=>{NVImage.loadFromFile({file:D,name:u.name,urlImgData:null,imageType:NVIMAGE_TYPE.DCM_FOLDER}).then(R=>this.addVolume(R)).catch(R=>{throw R})}).catch(D=>{throw D})})};return v(),A}isMeshExt(u){const m=this.getFileExt(u);return log.debug("dropped ext"),log.debug(m),MESH_EXTENSIONS.includes(m)}async loadFromArrayBuffer(u,m){const A=this.getFileExt(m);if(MESH_EXTENSIONS.includes(A)){await this.addMeshFromUrl({url:m,buffer:u});return}const S=NVImageFromUrlOptions(m);S.buffer=u,S.name=m,await this.addVolumeFromUrl(S)}async loadFromFile(u){const m=this.getFileExt(u.name);if(MESH_EXTENSIONS.includes(m)){await NVMesh2.loadFromFile({file:u,gl:this.gl,name:u.name}).then(A=>{this.addMesh(A)});return}await NVImage.loadFromFile({file:u,name:u.name}).then(A=>{this.addVolume(A)})}dropListener(u){if(u.stopPropagation(),u.preventDefault(),!this.opts.dragAndDropEnabled)return;const m=u.dataTransfer;if(!m)return;const A=m.getData("text/uri-list");if(A){const S=NVImageFromUrlOptions(A),v=this.getFileExt(A);log.debug("dropped ext"),log.debug(v),MESH_EXTENSIONS.includes(v)?this.addMeshFromUrl({url:A}).catch(w=>{throw w}):v==="NVD"?this.loadDocumentFromUrl(A).catch(w=>{throw w}):this.addVolumeFromUrl(S).catch(w=>{throw w})}else{const S=m.items;if(S.length>0){!u.shiftKey&&!u.altKey&&(this.volumes=[],this.overlays=[],this.meshes=[]),this.closeDrawing();for(const v of Array.from(S)){const w=v.webkitGetAsEntry();if(log.debug(w),!w)throw new Error("could not get entry from file");if(w.isFile){const D=this.getFileExt(w.name);if(D==="PNG"){w.file(L=>{this.loadBmpTexture(L).catch(P=>{throw P})});continue}let R;if(w.name.lastIndexOf("HEAD")!==-1)for(const L of Array.from(S)){const P=L.webkitGetAsEntry();if(!P)throw new Error("could not get paired entry");const d=w.name.substring(0,w.name.lastIndexOf("HEAD")),E=P.name.substring(0,P.name.lastIndexOf("BRIK"));d===E&&(R=P)}if(w.name.lastIndexOf("BRIK")!==-1)continue;if(MESH_EXTENSIONS.includes(D)){w.file(L=>{NVMesh2.loadFromFile({file:L,gl:this.gl,name:L.name}).then(P=>{this.addMesh(P)}).catch(P=>{throw P})});continue}else if(D==="NVD"){w.file(L=>{NVDocument.loadFromFile(L).then(P=>{this.loadDocument(P),log.debug("loaded document")}).catch(P=>{throw P})});break}w.file(L=>{R?R.file(P=>{NVImage.loadFromFile({file:L,urlImgData:P,limitFrames4D:this.opts.limitFrames4D}).then(d=>{this.addVolume(d)}).catch(d=>{throw d})}):NVImage.loadFromFile({file:L,urlImgData:R,limitFrames4D:this.opts.limitFrames4D}).then(P=>{u.altKey?(log.debug("alt key detected: assuming this is a drawing overlay"),this.drawClearAllUndoBitmaps(),this.loadDrawing(P)):this.addVolume(P)}).catch(P=>{throw P})})}else w.isDirectory&&this.readDirectory(w)}}}this.drawScene()}setMultiplanarPadPixels(u){this.opts.multiplanarPadPixels=u,this.drawScene()}setMultiplanarLayout(u){typeof u=="string"&&(u=parseInt(u)),this.opts.multiplanarLayout=u,this.drawScene()}setCornerOrientationText(u){this.opts.isCornerOrientationText=u,this.updateGLVolume()}setRadiologicalConvention(u){this.opts.isRadiologicalConvention=u,this.updateGLVolume()}setDefaults(u={},m=!1){this.document.opts={...DEFAULT_OPTIONS},this.scene.sceneData={...INITIAL_SCENE_DATA};for(const A in u)typeof u[A]=="function"?this[A]=u[A]:this.opts[A]=DEFAULT_OPTIONS[A]===void 0?DEFAULT_OPTIONS[A]:u[A];if(this.scene.pan2Dxyzmm=[0,0,0,1],m&&this.volumes&&this.volumes.length>0)for(let A=0;A=this.opts.maxDrawUndoBitmaps&&(this.currentDrawUndoBitmap=0),this.drawUndoBitmaps[this.currentDrawUndoBitmap]=encodeRLE(this.drawBitmap)}drawClearAllUndoBitmaps(){if(this.currentDrawUndoBitmap=this.opts.maxDrawUndoBitmaps,!(!this.drawUndoBitmaps||this.drawUndoBitmaps.length<1))for(let u=this.drawUndoBitmaps.length-1;u>=0;u--)this.drawUndoBitmaps[u]=new Uint8Array}drawUndo(){if(this.drawUndoBitmaps.length<1){log.debug("undo bitmaps not loaded");return}if(this.currentDrawUndoBitmap--,this.currentDrawUndoBitmap<0&&(this.currentDrawUndoBitmap=this.drawUndoBitmaps.length-1),this.currentDrawUndoBitmap>=this.drawUndoBitmaps.length&&(this.currentDrawUndoBitmap=0),this.drawUndoBitmaps[this.currentDrawUndoBitmap].length<2){log.debug("drawUndo is misbehaving");return}this.drawBitmap=decodeRLE(this.drawUndoBitmaps[this.currentDrawUndoBitmap],this.drawBitmap.length),this.refreshDrawing(!0)}loadDrawing(u){if(this.drawBitmap&&log.debug("Overwriting open drawing!"),!this.back)throw new Error("back undefined");this.drawClearAllUndoBitmaps();const m=u.hdr.dims;if(m[1]!==this.back.hdr.dims[1]||m[2]!==this.back.hdr.dims[2]||m[3]!==this.back.hdr.dims[3])return log.debug("drawing dimensions do not match background image"),!1;u.img.constructor!==Uint8Array&&log.debug("Drawings should be UINT8");const A=u.permRAS,S=m[1]*m[2]*m[3];this.drawBitmap=new Uint8Array(S),this.drawTexture=this.r8Tex(this.drawTexture,TEXTURE7_DRAW,this.back.dims,!0);const v=[0,0,0];for(let q=0;q<3;q++)for(let z=0;z<3;z++)Math.abs(A[q])-1===z&&(v[z]=q*Math.sign(A[q]));let w=1;const D=[1,1,1],R=[!1,!1,!1];for(let q=0;qArray(S).fill(0)),q=Array(S).fill(0).map(()=>Array(S).fill(0));for(let H=1;H3)for(let H=0;Hz&&(e0[0]=H,e0[1]=j,e0[2]=y,z=Y)}else if(u===3)for(let H=0;Hz&&(e0[0]=H,e0[1]=j,z=y)}else for(let H=0;Hz&&(e0[0]=H,z=j)}return[P(e0[0]),P(e0[1]),P(e0[2])]}drawOtsu(u=2){if(this.volumes.length===0)return;const m=this.volumes[0].img.length,A=this.findOtsu(u);if(A.length<3)return;this.drawBitmap||this.createEmptyDrawing();const S=this.drawBitmap,v=this.volumes[0].img;for(let w=0;wA[0]&&(S[w]=1),D>A[1]&&(S[w]=2),D>A[2]&&(S[w]=3)}this.drawAddUndoBitmap(),this.refreshDrawing(!0)}removeHaze(u=5,m=0){const A=this.volumes[m].img,S=this.volumes[m].hdr,v=A.length;let w=2;(u===5||u===1)&&(w=4),(u===4||u===2)&&(w=3);const D=this.findOtsu(w);if(D.length<3)return;let R=D[0];u===1&&(R=D[2]),u===2&&(R=D[1]);const L=S.scl_inter,P=S.scl_slope,d=this.volumes[m].global_min;for(let E=0;E=this.meshes.length?-1:u;const m=this.meshes.length;for(let A=0;AA)return;const S=this.getVolumeIndexByID(u.id);m===0?(this.volumes.splice(S,1),this.volumes.unshift(u),this.back=this.volumes[0],this.overlays=this.volumes.slice(1)):m<0?(this.volumes.splice(this.getVolumeIndexByID(u.id),1),this.back=this.volumes[0],this.volumes.length>1?this.overlays=this.volumes.slice(1):this.overlays=[]):(this.volumes.splice(S,1),this.volumes.splice(m,0,u),this.overlays=this.volumes.slice(1),this.back=this.volumes[0]),this.updateGLVolume()}setMesh(u,m=0){this.meshes.forEach(v=>{log.debug("MESH: ",v.name)});const A=this.meshes.length;if(m>A)return;const S=this.getMeshIndexByID(u.id);m===0?(this.meshes.splice(S,1),this.meshes.unshift(u)):m<0?this.meshes.splice(this.getMeshIndexByID(u.id),1):(this.meshes.splice(S,1),this.meshes.splice(m,0,u)),this.updateGLVolume(),this.meshes.forEach(v=>{log.debug(v.name)})}removeVolume(u){if(this.setVolume(u,-1),this.mediaUrlMap.has(u)){const m=this.mediaUrlMap.get(u);this.onVolumeWithUrlRemoved(m),this.mediaUrlMap.delete(u)}this.drawScene()}removeVolumeByIndex(u){if(u>=this.volumes.length)throw new Error("Index of volume out of bounds");this.removeVolume(this.volumes[u])}removeMesh(u){if(this.setMesh(u,-1),this.mediaUrlMap.has(u)){const m=this.mediaUrlMap.get(u);this.onMeshWithUrlRemoved(m),this.mediaUrlMap.delete(u)}}removeMeshByUrl(u){const m=this.getMediaByUrl(u);m&&(this.removeMesh(m),this.mediaUrlMap.delete(m),this.onMeshWithUrlRemoved(u))}moveVolumeToBottom(u){this.setVolume(u,0)}moveVolumeUp(u){const m=this.getVolumeIndexByID(u.id);this.setVolume(u,m+1)}moveVolumeDown(u){const m=this.getVolumeIndexByID(u.id);this.setVolume(u,m-1)}moveVolumeToTop(u){this.setVolume(u,this.volumes.length-1)}mouseDown(u,m){u*=this.uiData.dpr,m*=this.uiData.dpr,this.mousePos=[u,m]}mouseMove(u,m){u*=this.uiData.dpr,m*=this.uiData.dpr;const A=(u-this.mousePos[0])/this.uiData.dpr,S=(m-this.mousePos[1])/this.uiData.dpr;this.mousePos=[u,m],!(this.inRenderTile(u,m)<0)&&(Math.abs(A)<1&&Math.abs(S)<1||(this.scene.renderAzimuth+=A,this.scene.renderElevation+=S,this.drawScene()))}sph2cartDeg(u,m){const A=-m*(Math.PI/180),S=(u-90)%360*(Math.PI/180),v=[Math.cos(A)*Math.cos(S),Math.cos(A)*Math.sin(S),Math.sin(A)],w=Math.sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);return w<=0||(v[0]/=w,v[1]/=w,v[2]/=w),v}setClipPlane(u){const m=this.sph2cartDeg(u[1]+180,u[2]);this.scene.clipPlane=[m[0],m[1],m[2],u[0]],this.scene.clipPlaneDepthAziElev=u,this.onClipPlaneChange(this.scene.clipPlane),this.drawScene()}setCrosshairColor(u){this.opts.crosshairColor=u,this.drawScene()}setCrosshairWidth(u){this.opts.crosshairWidth=u,this.crosshairs3D&&(this.crosshairs3D.mm[0]=NaN),this.drawScene()}setDrawColormap(u){this.drawLut=cmapper.makeDrawLut(u),this.updateGLVolume()}setDrawingEnabled(u){this.opts.drawingEnabled=u,this.opts.drawingEnabled&&(this.drawBitmap||this.createEmptyDrawing()),this.drawScene()}setPenValue(u,m=!1){this.opts.penValue=u,this.opts.isFilledPen=m,this.drawScene()}setDrawOpacity(u){this.drawOpacity=u,this.drawScene()}setSelectionBoxColor(u){this.opts.selectionBoxColor=u}sliceScroll2D(u,m,A,S=!0){if(this.inGraphTile(m,A)){let v=this.volumes[0].frame4D;u>0&&v++,u<0&&v--,this.setFrame4D(this.volumes[0].id,v);return}if(u!==0&&this.opts.dragMode===3&&this.inRenderTile(this.uiData.dpr*m,this.uiData.dpr*A)===-1){let v=this.scene.pan2Dxyzmm[3]*(1+10*u);v=Math.round(v*10)/10;const w=this.scene.pan2Dxyzmm[3]-v;this.opts.yoke3Dto2DZoom&&(this.scene.volScaleMultiplier=v),this.scene.pan2Dxyzmm[3]=v;const D=this.frac2mm(this.scene.crosshairPos);this.scene.pan2Dxyzmm[0]+=w*D[0],this.scene.pan2Dxyzmm[1]+=w*D[1],this.scene.pan2Dxyzmm[2]+=w*D[2],this.drawScene();return}this.mouseClick(m,A,u,S)}setSliceType(u){return this.opts.sliceType=u,this.drawScene(),this}setOpacity(u,m){if(this.volumes[u].opacity=m,u===0){this.drawScene();return}this.updateGLVolume()}setScale(u){this.scene.volScaleMultiplier=u,this.drawScene()}setClipPlaneColor(u){this.opts.clipPlaneColor=u,this.renderShader.use(this.gl),this.gl.uniform4fv(this.renderShader.uniforms.clipPlaneColor,this.opts.clipPlaneColor),this.drawScene()}async setVolumeRenderIllumination(u=0){this.renderShader=this.renderVolumeShader,u>0&&(this.renderShader=this.renderGradientShader),u<0&&(this.renderShader=this.renderSliceShader),this.initRenderShader(this.renderShader,u),this.renderShader.use(this.gl),this.setClipPlaneColor(this.opts.clipPlaneColor),this.gradientTextureAmount=u,this.refreshLayers(this.volumes[0],0),this.drawScene()}overlayRGBA(u){const m=u.hdr,A=m.dims[1]*m.dims[2]*m.dims[3],S=new Uint8ClampedArray(A*4),v=.2*Math.min(Math.min(m.dims[1],m.dims[2]),m.dims[3]),w=.5*m.dims[1],D=.5*m.dims[2],R=.5*m.dims[3];let L=0;for(let P=0;P0&&(this.back=this.volumes[0]);const S=u.encodedDrawingBlob;if(S){const v=u.imageOptionsArray[0],w=NVImage.loadFromBase64({base64:S,...v});w&&this.loadDrawing(w)}for(const v of u.meshDataObjects??[]){const w={gl:this.gl,...v};log.debug(w);const D=new NVMesh2(w.pts,w.tris,w.name,w.rgba255,w.opacity,w.visible,this.gl,w.connectome,w.dpg,w.dps,w.dpv);D.meshShaderIndex=w.meshShaderIndex,D.layers=w.layers,D.updateMesh(this.gl),log.debug(D),this.addMesh(D)}if(u.data.connectomes)for(const v of u.data.connectomes){const w=JSON.parse(v),D=this.loadConnectomeAsMesh(w);D.updateMesh(this.gl),this.addMesh(D)}return this.updateGLVolume(),this.drawScene(),this.onDocumentLoaded(u),this}generateLoadDocumentJavaScript(u,m){const A=this.json(),S=NVUtilities.compressToBase64String(JSON.stringify(A));return` +`),d=/(.*\/).*/.exec(S)[0],E=[];for(const e of L){const N=new URL(e,d);if(D=await fetch(N,{headers:m}),!D.ok)throw Error(D.statusText);const q=await D.arrayBuffer();E.push(q)}return E}static async fetchPartial(u,m,A={}){try{return await fetch(u,{headers:{range:`bytes=0-'${m}`,stream:"true",...A}})}catch(S){return log.error(S),log.error("fetchPartial failed, trying again without range header"),await fetch(u,{headers:A})}}static async loadFromUrl({url:u="",urlImgData:m="",headers:A={},name:S="",colormap:v="gray",opacity:w=1,cal_min:D=NaN,cal_max:R=NaN,trustCalMinMax:L=!0,percentileFrac:P=.02,ignoreZeroVoxels:d=!1,useQFormNotSForm:E=!1,colormapNegative:e="",frame4D:N=0,isManifest:q=!1,limitFrames4D:z=NaN,imageType:e0=NVIMAGE_TYPE.UNKNOWN,colorbarVisible:H=!0,buffer:j=new ArrayBuffer(0)}={}){if(u==="")throw Error("url must not be empty");let y=null,Y=null;if(u instanceof Uint8Array&&(u=u.buffer),j.byteLength>0&&(u=j),u instanceof ArrayBuffer)if(Y=u,S!=="")u=S;else{u="array.nii";const f=new Uint8Array(Y);f[0]===31&&f[1]===139&&(u="array.nii.gz")}if(!isNaN(z)){let f=await this.fetchPartial(u,512,A);Y=await f.arrayBuffer();let o0=new Uint8Array(Y),l0=!1;o0[0]===31&&o0[1]===139&&(l0=!0,new Decompress$1(S0=>{o0=S0}).push(o0),Y=o0.buffer);let c0=o0[0]===92&&o0[1]===1;if(c0||(c0=o0[1]===92&&o0[0]===1),!c0)Y=null;else{const d0=nifti.readHeader(Y);if(d0===null)throw new Error("could not read nifti header");const S0=d0.numBitsPerVoxel/8;let g0=1;for(let ee=1;ee<4;ee++)d0.dims[ee]>1&&(g0*=d0.dims[ee]);let T0=1;for(let ee=4;ee<7;ee++)d0.dims[ee]>1&&(T0*=d0.dims[ee]);const C0=Math.max(Math.min(z,T0),1),F0=d0.vox_offset+C0*g0*S0;if(Y.byteLength{ee=ke}).push(ee),Y=ee.buffer}Y.byteLength-1&&(S=S.slice(0,S.indexOf("?")))}let Q=null;if(m.length>0){let f=await fetch(m,{headers:A});f.status===404&&m.lastIndexOf("BRIK")!==-1&&(f=await fetch(m+".gz",{headers:A})),Q=await f.arrayBuffer()}if(!Y)throw new Error("Unable to load buffer properly from volume");return y=new Wt(Y,S,v,w,Q,D,R,L,P,d,E,e,N,e0),y.url=u,y.colorbarVisible=H,y}static readFileAsync(u,m=NaN){return new Promise((A,S)=>{const v=new FileReader;v.onload=()=>{u.name.lastIndexOf("gz")!==-1&&isNaN(m)?A(nifti.decompress(v.result)):A(v.result)},v.onerror=S,isNaN(m)?v.readAsArrayBuffer(u):v.readAsArrayBuffer(u.slice(0,m))})}static async loadFromFile({file:u,name:m="",colormap:A="gray",opacity:S=1,urlImgData:v=null,cal_min:w=NaN,cal_max:D=NaN,trustCalMinMax:R=!0,percentileFrac:L=.02,ignoreZeroVoxels:P=!1,useQFormNotSForm:d=!1,colormapNegative:E="",frame4D:e=0,limitFrames4D:N=NaN,imageType:q=NVIMAGE_TYPE.UNKNOWN}){let z=null,e0=[];try{if(Array.isArray(u))for(let j=0;j{j=J}).push(j),e0=j.buffer);let Y=j[0]===92&&j[1]===1;if(Y||(Y=j[1]===92&&j[0]===1),!Y)e0=await this.readFileAsync(u);else{const G=nifti.readHeader(e0);if(!G)throw new Error("could not read nifti header");const J=G.numBitsPerVoxel/8;let i0=1;for(let l0=1;l0<4;l0++)G.dims[l0]>1&&(i0*=G.dims[l0]);let Q=1;for(let l0=4;l0<7;l0++)G.dims[l0]>1&&(Q*=G.dims[l0]);const f=Math.max(Math.min(N,Q),1),o0=G.vox_offset+f*i0*J;if(e0.byteLength{l0=d0}).push(l0),e0=l0.buffer}if(e0.byteLength"u")return v;if(!m){const D=clone$2(this.frac2mmOrtho);return invert(D,D),transformMat4(A,A,D),v[0]=A[0],v[1]=A[1],v[2]=A[2],v}if(S[1]<1||S[2]<1||S[3]<1)return v;const w=clone$2(this.matRAS);return invert(w,w),transpose(w,w),transformMat4(A,A,w),v[0]=(A[0]+.5)/S[1],v[1]=(A[1]+.5)/S[2],v[2]=(A[2]+.5)/S[3],v}},DRAG_MODE=(T=>(T[T.none=0]="none",T[T.contrast=1]="contrast",T[T.measurement=2]="measurement",T[T.pan=3]="pan",T[T.slicer3D=4]="slicer3D",T[T.callbackOnly=5]="callbackOnly",T))(DRAG_MODE||{}),DEFAULT_OPTIONS={textHeight:.06,colorbarHeight:.05,crosshairWidth:1,crosshairGap:0,rulerWidth:4,show3Dcrosshair:!1,backColor:[0,0,0,1],crosshairColor:[1,0,0,1],fontColor:[.5,.5,.5,1],selectionBoxColor:[1,1,1,.5],clipPlaneColor:[.7,0,.7,.5],rulerColor:[1,0,0,.8],colorbarMargin:.05,trustCalMinMax:!0,clipPlaneHotKey:"KeyC",viewModeHotKey:"KeyV",doubleTouchTimeout:500,longTouchTimeout:1e3,keyDebounceTime:50,isNearestInterpolation:!1,isResizeCanvas:!0,atlasOutline:0,isRuler:!1,isColorbar:!1,isOrientCube:!1,multiplanarPadPixels:0,multiplanarForceRender:!1,isRadiologicalConvention:!1,meshThicknessOn2D:1/0,dragMode:1,yoke3Dto2DZoom:!1,isDepthPickMesh:!1,isCornerOrientationText:!1,sagittalNoseLeft:!1,isSliceMM:!1,isV1SliceShader:!1,isHighResolutionCapable:!0,logLevel:"info",loadingText:"waiting for images...",isForceMouseClickToVoxelCenters:!1,dragAndDropEnabled:!0,drawingEnabled:!1,penValue:1,floodFillNeighbors:6,isFilledPen:!1,thumbnail:"",maxDrawUndoBitmaps:8,sliceType:3,meshXRay:0,isAntiAlias:null,limitFrames4D:NaN,isAdditiveBlend:!1,showLegend:!0,legendBackgroundColor:[.3,.3,.3,.5],legendTextColor:[1,1,1,1],multiplanarLayout:0,renderOverlayBlend:1,sliceMosaicString:""},INITIAL_SCENE_DATA={azimuth:110,elevation:10,crosshairPos:fromValues$2(.5,.5,.5),clipPlane:[0,0,0,0],clipPlaneDepthAziElev:[2,0,0],volScaleMultiplier:1,pan2Dxyzmm:fromValues$1(0,0,0,1)},NVDocument=class Zt{constructor(){__publicField(this,"data",{title:"Untitled document",imageOptionsArray:[],meshOptionsArray:[],opts:{...DEFAULT_OPTIONS},previewImageDataURL:"",labels:[],encodedImageBlobs:[],encodedDrawingBlob:""}),__publicField(this,"scene"),__publicField(this,"volumes",[]),__publicField(this,"meshDataObjects"),__publicField(this,"meshes",[]),__publicField(this,"drawBitmap",null),__publicField(this,"imageOptionsMap",new Map),__publicField(this,"meshOptionsMap",new Map),this.scene={onAzimuthElevationChange:()=>{},onZoom3DChange:()=>{},sceneData:INITIAL_SCENE_DATA,get renderAzimuth(){return this.sceneData.azimuth},set renderAzimuth(u){this.sceneData.azimuth=u,this.onAzimuthElevationChange&&this.onAzimuthElevationChange(this.sceneData.azimuth,this.sceneData.elevation)},get renderElevation(){return this.sceneData.elevation},set renderElevation(u){this.sceneData.elevation=u,this.onAzimuthElevationChange&&this.onAzimuthElevationChange(this.sceneData.azimuth,this.sceneData.elevation)},get volScaleMultiplier(){return this.sceneData.volScaleMultiplier},set volScaleMultiplier(u){this.sceneData.volScaleMultiplier=u,this.onZoom3DChange(u)},get crosshairPos(){return this.sceneData.crosshairPos},set crosshairPos(u){this.sceneData.crosshairPos=u},get clipPlane(){return this.sceneData.clipPlane},set clipPlane(u){this.sceneData.clipPlane=u},get clipPlaneDepthAziElev(){return this.sceneData.clipPlaneDepthAziElev},set clipPlaneDepthAziElev(u){this.sceneData.clipPlaneDepthAziElev=u},get pan2Dxyzmm(){return this.sceneData.pan2Dxyzmm},set pan2Dxyzmm(u){this.sceneData.pan2Dxyzmm=u}}}get title(){return this.data.title}get previewImageDataURL(){return this.data.previewImageDataURL}set previewImageDataURL(u){this.data.previewImageDataURL=u}set title(u){this.data.title=u}get imageOptionsArray(){return this.data.imageOptionsArray}get encodedImageBlobs(){return this.data.encodedImageBlobs}get encodedDrawingBlob(){return this.data.encodedDrawingBlob}get opts(){return this.data.opts}set opts(u){this.data.opts={...u}}get labels(){return this.data.labels}set labels(u){this.data.labels=u}get customData(){return this.data.customData}set customData(u){this.data.customData=u}hasImage(u){return this.volumes.find(m=>m.id===u.id)!==void 0}hasImageFromUrl(u){return this.data.imageOptionsArray.find(m=>m.url===u)!==void 0}addImageOptions(u,m){if(!this.hasImage(u)&&!m.name)if(m.url){const S=/^(?:[a-z+]+:)?\/\//i.test(m.url)?new URL(m.url):new URL(m.url,window.location.href);m.name=S.pathname.split("/").pop(),m.name.toLowerCase().endsWith(".gz")&&(m.name=m.name.slice(0,-3)),m.name.toLowerCase().endsWith(".nii")||(m.name+=".nii")}else m.name="untitled.nii";m.imageType=NVIMAGE_TYPE.NII,this.data.imageOptionsArray.push(m),this.imageOptionsMap.set(u.id,this.data.imageOptionsArray.length-1)}removeImage(u){if(this.imageOptionsMap.has(u.id)){const m=this.imageOptionsMap.get(u.id);this.data.imageOptionsArray.length>m&&this.data.imageOptionsArray.splice(m,1),this.imageOptionsMap.delete(u.id)}this.volumes=this.volumes.filter(m=>m.id!==u.id)}getImageOptions(u){return this.imageOptionsMap.has(u.id)?this.data.imageOptionsArray[this.imageOptionsMap.get(u.id)]:null}json(){const u={encodedImageBlobs:[],previewImageDataURL:this.data.previewImageDataURL,imageOptionsMap:new Map},m=[];if(u.sceneData={...this.scene.sceneData},u.opts={...this.opts},this.opts.meshThicknessOn2D===1/0&&(u.opts.meshThicknessOn2D="infinity"),u.labels=[...this.data.labels],u.customData=this.customData,this.volumes.length){let S=this.imageOptionsArray[0];if(S||(log.debug("no image options for base image"),S={name:"",colormap:"gray",opacity:1,pairedImgData:null,cal_min:NaN,cal_max:NaN,trustCalMinMax:!0,percentileFrac:.02,ignoreZeroVoxels:!1,useQFormNotSForm:!1,colormapNegative:"",colormapLabel:null,imageType:NVIMAGE_TYPE.NII,frame4D:0,limitFrames4D:NaN,url:"",urlImageData:"",alphaThreshold:!1,cal_minNeg:NaN,cal_maxNeg:NaN,colorbarVisible:!0}),S.colormap=this.volumes[0].colormap,S.opacity=this.volumes[0].opacity,S.cal_max=this.volumes[0].cal_max||NaN,S.cal_min=this.volumes[0].cal_min||NaN,S){m.push(S);const v=NVUtilities.uint8tob64(this.volumes[0].toUint8Array());u.encodedImageBlobs.push(v),this.drawBitmap&&(u.encodedDrawingBlob=NVUtilities.uint8tob64(this.volumes[0].toUint8Array(this.drawBitmap))),u.imageOptionsMap.set(this.volumes[0].id,0)}else throw new Error("image options for base layer not found");for(let v=1;v({values:w.values,nFrame4D:w.nFrame4D,frame4D:0,outlineBorder:w.outlineBorder,global_min:w.global_min,global_max:w.global_max,cal_min:w.cal_min,cal_max:w.cal_max,opacity:w.opacity,colormap:w.colormap,colormapNegative:w.colormapNegative,colormapLabel:w.colormapLabel,useNegativeCmap:w.useNegativeCmap})),hasConnectome:S.hasConnectome,edgeColormap:S.edgeColormap,edgeColormapNegative:S.edgeColormapNegative,edgeMax:S.edgeMax,edgeMin:S.edgeMin,edges:S.edges&&Array.isArray(S.edges)?[...S.edges]:[],extentsMax:S.extentsMax,extentsMin:S.extentsMin,fiberGroupColormap:S.fiberGroupColormap,furthestVertexFromOrigin:S.furthestVertexFromOrigin,nodeColormap:S.nodeColormap,nodeColormapNegative:S.nodeColormapNegative,nodeMaxColor:S.nodeMaxColor,nodeMinColor:S.nodeMinColor,nodeScale:S.nodeScale,legendLineThickness:S.legendLineThickness,offsetPt0:S.offsetPt0,nodes:S.nodes};A.push(v)}return u.meshesString=JSON.stringify(serialize(A)),u}download(u){const m=this.json();NVUtilities.download(JSON.stringify(m),u,"application/json")}static deserializeMeshDataObjects(u){if(u.data.meshesString){u.meshDataObjects=deserialize(JSON.parse(u.data.meshesString));for(const m of u.meshDataObjects)for(const A of m.layers)"colorMap"in A&&(A.colormap=A.colorMap,delete A.colorMap),"colorMapNegative"in A&&(A.colormapNegative=A.colorMapNegative,delete A.colorMapNegative)}}static async loadFromUrl(u){const A=await(await fetch(u)).json();return Zt.loadFromJSON(A)}static async loadFromFile(u){const m=await NVUtilities.readFileAsync(u),A=new Zt,v=new TextDecoder().decode(m);return A.data=JSON.parse(v),A.data.opts.meshThicknessOn2D==="infinity"&&(A.data.opts.meshThicknessOn2D=1/0),A.scene.sceneData={...INITIAL_SCENE_DATA,...A.data.sceneData},Zt.deserializeMeshDataObjects(A),A}static loadFromJSON(u){const m=new Zt;return m.data=u,m.data.opts.meshThicknessOn2D==="infinity"&&(m.data.opts.meshThicknessOn2D=1/0),m.scene.sceneData={...INITIAL_SCENE_DATA,...u.sceneData},Zt.deserializeMeshDataObjects(m),m}},NVLabel3D=class{constructor(T,u,m){__publicField(this,"text"),__publicField(this,"style"),__publicField(this,"points"),this.text=T,this.style=u,this.points=m}},defaultOptions={name:"untitled connectome",nodeColormap:"warm",nodeColormapNegative:"winter",nodeMinColor:0,nodeMaxColor:4,nodeScale:3,edgeColormap:"warm",edgeColormapNegative:"winter",edgeMin:2,edgeMax:6,edgeScale:1,legendLineThickness:0},NVConnectome=class Nn extends NVMesh2{constructor(u,m){super(new Float32Array([]),new Uint32Array([]),m.name,new Uint8Array([]),1,!0,u,m),__publicField(this,"gl"),__publicField(this,"nodesChanged"),this.gl=u,this.type="connectome",this.nodes&&this.updateLabels(),this.nodesChanged=new EventTarget}static convertLegacyConnectome(u){const m={nodes:[],edges:[],...defaultOptions};for(const S in u)if(S in defaultOptions){const v=S;m[v]=u[v]}const A=u.nodes;for(let S=0;S({name:Array.isArray(w.comments)&&w.comments.length>0&&"text"in w.comments[0]?w.comments[0].text:"",x:w.coordinates.x,y:w.coordinates.y,z:w.coordinates.z,colorValue:1,sizeValue:1,metadata:w.comments}));return{...defaultOptions,nodeColormap:m,edgeColormap:m,nodes:S,edges:[]}}updateLabels(){const u=this.nodes;if(u&&u.length>0){const m=u.reduce((L,P)=>L.sizeValue>P.sizeValue?L:P).sizeValue,A=this.nodeMinColor?this.nodeMinColor:u.reduce((L,P)=>L.colorValueL.colorValue>P.colorValue?L:P).colorValue,v=cmapper.colormap(this.nodeColormap,this.colormapInvert),w=cmapper.colormap(this.nodeColormapNegative,this.colormapInvert),D="nodeColormapNegative"in this,R=this.legendLineThickness?this.legendLineThickness:0;for(let L=0;Le/255),log.debug("adding label for ",u[L]),u[L].label=new NVLabel3D(u[L].name,{textColor:E,bulletScale:u[L].sizeValue/m,bulletColor:E,lineWidth:R,lineColor:E,textScale:1,textAlignment:"left",lineTerminator:"none"},[u[L].x,u[L].y,u[L].z]),log.debug("label for node:",u[L].label)}}}addConnectomeNode(u){if(log.debug("adding node",u),!this.nodes)throw new Error("nodes not defined");this.nodes.push(u),this.updateLabels(),this.nodesChanged.dispatchEvent(new CustomEvent("nodeAdded",{detail:{node:u}}))}deleteConnectomeNode(u){const m=this.nodes.indexOf(u),A=this.edges;A&&(this.edges=A.filter(S=>S.first!==m&&S.second!==m)),this.nodes=this.nodes.filter(S=>S!==u),this.updateLabels(),this.updateConnectome(this.gl),this.nodesChanged.dispatchEvent(new CustomEvent("nodeDeleted",{detail:{node:u}}))}updateConnectomeNodeByIndex(u,m){this.nodes[u]=m,this.updateLabels(),this.updateConnectome(this.gl),this.nodesChanged.dispatchEvent(new CustomEvent("nodeChanged",{detail:{node:m}}))}updateConnectomeNodeByPoint(u,m){const A=this.nodes;if(!A)throw new Error("Node to update does not exist");const S=A.find(w=>NVUtilities.arraysAreEqual([w.x,w.y,w.z],u));if(!S)throw new Error(`Node with point ${u} to update does not exist`);const v=A.findIndex(w=>w===S);this.updateConnectomeNodeByIndex(v,m)}addConnectomeEdge(u,m,A){const S=this.edges;let v=S.find(w=>(w.first===u||w.second===u)&&w.first+w.second===u+m);return v||(v={first:u,second:m,colorValue:A},S.push(v),this.updateConnectome(this.gl),v)}deleteConnectomeEdge(u,m){const A=this.edges,S=A.find(v=>(v.first===u||v.first===m)&&v.first+v.second===u+m);if(S)this.edges=A.filter(v=>v!==S);else throw new Error(`edge between ${u} and ${m} not found`);return this.updateConnectome(this.gl),S}findClosestConnectomeNode(u,m){const A=this.nodes;if(!A||A.length===0)return null;const S=A.map((v,w)=>({node:v,distance:Math.sqrt(Math.pow(v.x-u[0],2)+Math.pow(v.y-u[1],2)+Math.pow(v.z-u[2],2)),index:w})).filter(v=>v.distancev.distance-w.distance);return S.length>0?S[0].node:null}updateConnectome(u){const m=[],A=[],S=[];let v=cmapper.colormap(this.nodeColormap,this.colormapInvert),w=cmapper.colormap(this.nodeColormapNegative,this.colormapInvert),D="nodeColormapNegative"in this;if(this.nodeMinColor===void 0||this.nodeMaxColor===void 0)throw new Error("nodeMinColor or nodeMaxColor is undefined");if(this.edgeMin===void 0||this.edgeMax===void 0)throw new Error("edgeMin or edgeMax undefined");let R=this.nodeMinColor,L=this.nodeMaxColor;const P=this.nodes,d=P.length;for(let e0=0;e0v&&([S,v]=[v,S]),[S,v]}function swizzleVec3(T,u=[0,1,2]){const m=create$2();return m[0]=T[u[0]],m[1]=T[u[1]],m[2]=T[u[2]],m}function isRadiological(T){const u=fromValues$1(1,0,0,0),m=create$1();return transformMat4(m,u,T),m[0]}function unProject(T,u,m,A){const S=fromValues$1(T,u,m,1),v=clone$2(A);invert(v,v),S[0]=S[0]*2-1,S[1]=S[1]*2-1,S[2]=S[2]*2-1;const w=create$1();return transformMat4(w,S,v),w[3]===0||(w[0]/=w[3],w[1]/=w[3],w[2]/=w[3]),w}function unpackFloatFromVec4i(T){const u=[5960464477539063e-23,152587890625e-16,.00390625,1];return(T[0]*u[0]+T[1]*u[1]+T[2]*u[2]+T[3]*u[3])/255}function clamp(T,u,m){return Math.min(Math.max(T,u),m)}function encodeRLE(T){const u=T.length;let m=0;const A=new Uint8Array(u+Math.ceil(.01*u)),S=new Int8Array(A.buffer);let v=0;for(;m1){S[v]=-D+1,v++,A[v]=w,v++;continue}for(;m127||m+2 "+v+" bytes (x"+u/v+")"),A.slice(0,v)}function decodeRLE(T,u){const m=new Uint8Array(T.buffer),A=new Int8Array(m.buffer);let S=0;const v=new Uint8Array(u);let w=0;for(;S{}),__publicField(this,"onMouseUp",()=>{}),__publicField(this,"onLocationChange",()=>{}),__publicField(this,"onIntensityChange",()=>{}),__publicField(this,"onImageLoaded",()=>{}),__publicField(this,"onMeshLoaded",()=>{}),__publicField(this,"onFrameChange",()=>{}),__publicField(this,"onError",()=>{}),__publicField(this,"onColormapChange",()=>{}),__publicField(this,"onInfo",()=>{}),__publicField(this,"onWarn",()=>{}),__publicField(this,"onDebug",()=>{}),__publicField(this,"onVolumeAddedFromUrl",()=>{}),__publicField(this,"onVolumeWithUrlRemoved",()=>{}),__publicField(this,"onVolumeUpdated",()=>{}),__publicField(this,"onMeshAddedFromUrl",()=>{}),__publicField(this,"onMeshAdded",()=>{}),__publicField(this,"onMeshWithUrlRemoved",()=>{}),__publicField(this,"onZoom3DChange",()=>{}),__publicField(this,"onAzimuthElevationChange",()=>{}),__publicField(this,"onClipPlaneChange",()=>{}),__publicField(this,"onCustomMeshShaderAdded",()=>{}),__publicField(this,"onMeshShaderChanged",()=>{}),__publicField(this,"onMeshPropertyChanged",()=>{}),__publicField(this,"onDocumentLoaded",()=>{}),__publicField(this,"document",new NVDocument),__publicField(this,"mediaUrlMap",new Map),__publicField(this,"initialized",!1),__publicField(this,"currentDrawUndoBitmap"),__publicField(this,"loadingText");for(const m in u)typeof u[m]=="function"?this[m]=u[m]:this.opts[m]=DEFAULT_OPTIONS[m]===void 0?DEFAULT_OPTIONS[m]:u[m];this.opts.isHighResolutionCapable?this.uiData.dpr=window.devicePixelRatio||1:this.uiData.dpr=1,this.currentDrawUndoBitmap=this.opts.maxDrawUndoBitmaps,this.opts.drawingEnabled&&this.createEmptyDrawing(),this.opts.thumbnail.length>0&&(this.thumbnailVisible=!0),this.loadingText=this.opts.loadingText,log.setLogLevel(this.opts.logLevel)}get scene(){return this.document.scene}get opts(){return this.document.opts}get sliceMosaicString(){return this.document.opts.sliceMosaicString||""}set sliceMosaicString(u){this.document.opts.sliceMosaicString=u}get volumes(){return this.document.volumes}set volumes(u){this.document.volumes=u}get meshes(){return this.document.meshes}set meshes(u){this.document.meshes=u}get drawBitmap(){return this.document.drawBitmap}set drawBitmap(u){this.document.drawBitmap=u}get volScaleMultiplier(){return this.scene.volScaleMultiplier}set volScaleMultiplier(u){this.setScale(u)}async saveScene(u="niivue.png"){function m(S,v){const w=document.createElement("a");document.body.appendChild(w),w.style.display="none";const D=window.URL.createObjectURL(S);w.href=D,w.download=v,w.click(),w.remove()}const A=this.canvas;if(!A)throw new Error("canvas not defined");this.drawScene(),A.toBlob(S=>{S&&(u===""&&(u=`niivue-screenshot-${new Date().toString()}.png`,u=u.replace(/\s/g,"_")),m(S,u))})}async attachTo(u,m=null){return await this.attachToCanvas(document.getElementById(u),m),log.debug("attached to element with id: ",u),this}async attachToCanvas(u,m=null){return this.canvas=u,m===null&&(m=navigator.hardwareConcurrency>6,log.debug("AntiAlias ",m," Threads ",navigator.hardwareConcurrency)),this.gl=this.canvas.getContext("webgl2",{alpha:!0,antialias:m}),log.info("NIIVUE VERSION ",version),this.canvas.parentElement.style.backgroundColor="black",this.opts.isResizeCanvas&&(this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.display="block",this.canvas.width=this.canvas.offsetWidth,this.canvas.height=this.canvas.offsetHeight,window.addEventListener("resize",this.resizeListener.bind(this)),this.resizeObserver=new ResizeObserver(this.resizeListener.bind(this)),this.resizeObserver.observe(this.canvas.parentElement)),this.registerInteractions(),await this.init(),this.drawScene(),this}syncWith(u,m={"2d":!0,"3d":!0}){this.otherNV=u,this.syncOpts=m}broadcastTo(u,m={"2d":!0,"3d":!0}){this.otherNV=u,this.syncOpts=m}sync(){if(!this.gl||!this.otherNV||typeof this.otherNV>"u"||!this.gl.canvas.matches(":focus"))return;const u=this.frac2mm(this.scene.crosshairPos);if(this.otherNV instanceof Bn)this.syncOpts["2d"]&&(this.otherNV.scene.crosshairPos=this.otherNV.mm2frac(u)),this.syncOpts["3d"]&&(this.otherNV.scene.renderAzimuth=this.scene.renderAzimuth,this.otherNV.scene.renderElevation=this.scene.renderElevation),this.otherNV.drawScene(),this.otherNV.createOnLocationChange();else if(Array.isArray(this.otherNV))for(let m=0;mA===m[S])}resizeListener(){if(!(!this.canvas||!this.gl)){if(!this.opts.isResizeCanvas){this.opts.isHighResolutionCapable&&(log.warn("isHighResolutionCapable requires isResizeCanvas"),this.opts.isHighResolutionCapable=!1),this.uiData.dpr=1,this.drawScene();return}this.canvas.style.width="100%",this.canvas.style.height="100%",this.canvas.style.display="block",this.opts.isHighResolutionCapable?(this.uiData.dpr=window.devicePixelRatio||1,log.debug("devicePixelRatio: "+this.uiData.dpr)):this.uiData.dpr=1,"width"in this.canvas.parentElement?(this.canvas.width=this.canvas.parentElement.width*this.uiData.dpr,this.canvas.height=this.canvas.parentElement.height*this.uiData.dpr):(this.canvas.width=this.canvas.offsetWidth*this.uiData.dpr,this.canvas.height=this.canvas.offsetHeight*this.uiData.dpr),this.gl.viewport(0,0,this.gl.canvas.width,this.gl.canvas.height),this.drawScene()}}getRelativeMousePosition(u,m){if(m=m||u.target,!m)return;const A=m.getBoundingClientRect();return{x:u.clientX-A.left,y:u.clientY-A.top}}getNoPaddingNoBorderCanvasRelativeMousePosition(u,m){return m=m||u.target,this.getRelativeMousePosition(u,m)}mouseContextMenuListener(u){u.preventDefault()}mouseDownListener(u){u.preventDefault(),this.drawPenLocation=[NaN,NaN,NaN],this.drawPenAxCorSag=-1,this.uiData.mousedown=!0,log.debug("mouse down"),log.debug(u);const m=this.getNoPaddingNoBorderCanvasRelativeMousePosition(u,this.gl.canvas);if(!m)return;const[A,S]=[m.x*this.uiData.dpr,m.y*this.uiData.dpr],v=this.getLabelAtPoint([A,S]);if(v){for(const w of this.meshes)if(w.type==="connectome")for(const D of w.nodes)D.label===v&&(this.scene.crosshairPos=this.mm2frac([D.x,D.y,D.z]),this.updateGLVolume(),this.drawScene())}this.uiData.clickedTile=this.tileIndex(A,S),u.button===LEFT_MOUSE_BUTTON&&u.shiftKey?(this.uiData.mouseButtonCenterDown=!0,this.mouseCenterButtonHandler(u)):u.button===LEFT_MOUSE_BUTTON?(this.uiData.mouseButtonLeftDown=!0,this.mouseLeftButtonHandler(u)):u.button===RIGHT_MOUSE_BUTTON?(this.uiData.mouseButtonRightDown=!0,this.mouseRightButtonHandler(u)):u.button===CENTER_MOUSE_BUTTON&&(this.uiData.mouseButtonCenterDown=!0,this.mouseCenterButtonHandler(u))}mouseLeftButtonHandler(u){const m=this.getNoPaddingNoBorderCanvasRelativeMousePosition(u,this.gl.canvas);this.mouseDown(m.x,m.y),this.mouseClick(m.x,m.y)}mouseCenterButtonHandler(u){const m=this.getNoPaddingNoBorderCanvasRelativeMousePosition(u,this.gl.canvas);this.mousePos=[m.x*this.uiData.dpr,m.y*this.uiData.dpr],this.opts.dragMode!==0&&(this.setDragStart(m.x,m.y),this.uiData.isDragging||(this.uiData.pan2DxyzmmAtMouseDown=clone(this.scene.pan2Dxyzmm)),this.uiData.isDragging=!0,this.uiData.dragClipPlaneStartDepthAziElev=this.scene.clipPlaneDepthAziElev)}mouseRightButtonHandler(u){const m=this.getNoPaddingNoBorderCanvasRelativeMousePosition(u,this.gl.canvas);this.mousePos=[m.x*this.uiData.dpr,m.y*this.uiData.dpr],this.opts.dragMode!==0&&(this.setDragStart(m.x,m.y),this.uiData.isDragging||(this.uiData.pan2DxyzmmAtMouseDown=clone(this.scene.pan2Dxyzmm)),this.uiData.isDragging=!0,this.uiData.dragClipPlaneStartDepthAziElev=this.scene.clipPlaneDepthAziElev)}calculateMinMaxVoxIdx(u){if(u.length>2)throw new Error("array must not contain more than two values");return[Math.floor(Math.min(u[0],u[1])),Math.floor(Math.max(u[0],u[1]))]}calculateNewRange({volIdx:u=0}={}){if(this.opts.sliceType===4&&this.sliceMosaicString.length<1||this.uiData.dragStart[0]===this.uiData.dragEnd[0]&&this.uiData.dragStart[1]===this.uiData.dragEnd[1])return;let m=this.canvasPos2frac([this.uiData.dragStart[0],this.uiData.dragStart[1]]);if(m[0]<0)return;const A=this.frac2vox(m,u);if(m=this.canvasPos2frac([this.uiData.dragEnd[0],this.uiData.dragEnd[1]]),m[0]<0)return;const S=this.frac2vox(m,u);let v=-Number.MAX_VALUE,w=Number.MAX_VALUE;const D=this.calculateMinMaxVoxIdx([A[0],S[0]]),R=this.calculateMinMaxVoxIdx([A[1],S[1]]),L=this.calculateMinMaxVoxIdx([A[2],S[2]]);A[0]-S[0]===0?D[1]=A[0]+1:A[1]-S[1]===0?R[1]=A[1]+1:A[2]-S[2]===0&&(L[1]=A[2]+1);const P=this.volumes[u].hdr,d=this.volumes[u].img;if(!P||!d)return;const E=P.dims[1],e=P.dims[2];for(let z=L[0];zd[Y]&&(w=d[Y]),v=v)return;const N=intensityRaw2Scaled(P,w),q=intensityRaw2Scaled(P,v);this.volumes[u].cal_min=N,this.volumes[u].cal_max=q,this.onIntensityChange(this.volumes[u])}generateMouseUpCallback(u,m){const A=this.tileIndex(this.uiData.dragStart[0],this.uiData.dragStart[1]),S=this.tileIndex(this.uiData.dragEnd[0],this.uiData.dragEnd[1]);let v=-1;A===S&&(v=S);let w=-1;v>=0&&(w=this.screenSlices[v].axCorSag);const D=this.frac2mm(u),R=this.frac2mm(m),L=create$2();sub$1(L,fromValues$2(D[0],D[1],D[2]),fromValues$2(R[0],R[1],R[2]));const P=len(L),d=this.frac2vox(u),E=this.frac2vox(m);this.onDragRelease({fracStart:u,fracEnd:m,voxStart:d,voxEnd:E,mmStart:D,mmEnd:R,mmLength:P,tileIdx:v,axCorSag:w})}mouseUpListener(){function u(S){return Object.prototype.toString.call(S).indexOf("Function")>-1}const m={mouseButtonRightDown:this.uiData.mouseButtonRightDown,mouseButtonCenterDown:this.uiData.mouseButtonCenterDown,isDragging:this.uiData.isDragging,mousePos:this.mousePos,fracPos:this.canvasPos2frac(this.mousePos)};this.uiData.mousedown=!1,this.uiData.mouseButtonRightDown=!1;const A=this.uiData.mouseButtonCenterDown;if(this.uiData.mouseButtonCenterDown=!1,this.uiData.mouseButtonLeftDown=!1,this.drawPenFillPts.length>0?this.drawPenFilled():this.drawPenAxCorSag>=0&&this.drawAddUndoBitmap(),this.drawPenLocation=[NaN,NaN,NaN],this.drawPenAxCorSag=-1,u(this.onMouseUp)&&this.onMouseUp(m),this.uiData.isDragging){this.uiData.isDragging=!1,this.opts.dragMode===5&&this.drawScene();const S=this.canvasPos2frac([this.uiData.dragStart[0],this.uiData.dragStart[1]]),v=this.canvasPos2frac([this.uiData.dragEnd[0],this.uiData.dragEnd[1]]);if(this.generateMouseUpCallback(S,v),this.opts.dragMode!==1||A||this.uiData.dragStart[0]===this.uiData.dragEnd[0]&&this.uiData.dragStart[1]===this.uiData.dragEnd[1])return;this.calculateNewRange({volIdx:0}),this.refreshLayers(this.volumes[0],0)}this.drawScene()}checkMultitouch(u){if(this.uiData.touchdown&&!this.uiData.multiTouchGesture){const m=this.canvas.getBoundingClientRect();this.mouseDown(u.touches[0].clientX-m.left,u.touches[0].clientY-m.top),this.mouseClick(u.touches[0].clientX-m.left,u.touches[0].clientY-m.top)}}touchStartListener(u){u.preventDefault(),this.uiData.touchTimer||(this.uiData.touchTimer=setTimeout(()=>{this.resetBriCon(u)},this.opts.longTouchTimeout)),this.uiData.touchdown=!0,this.uiData.currentTouchTime=new Date().getTime();const m=this.uiData.currentTouchTime-this.uiData.lastTouchTime;if(m0){this.uiData.doubleTouch=!0,this.setDragStart(u.targetTouches[0].clientX-u.target.getBoundingClientRect().left,u.targetTouches[0].clientY-u.target.getBoundingClientRect().top),this.resetBriCon(u),this.uiData.lastTouchTime=this.uiData.currentTouchTime;return}else this.uiData.doubleTouch=!1,this.setDragStart(0,0),this.setDragEnd(0,0),this.uiData.lastTouchTime=this.uiData.currentTouchTime;this.uiData.touchdown&&u.touches.length<2?this.uiData.multiTouchGesture=!1:this.uiData.multiTouchGesture=!0,setTimeout(this.checkMultitouch.bind(this),1,u)}touchEndListener(u){if(u.preventDefault(),this.uiData.touchdown=!1,this.uiData.lastTwoTouchDistance=0,this.uiData.multiTouchGesture=!1,this.uiData.touchTimer&&(clearTimeout(this.uiData.touchTimer),this.uiData.touchTimer=null),this.uiData.isDragging){this.uiData.isDragging=!1,this.opts.dragMode===1&&(this.calculateNewRange(),this.refreshLayers(this.volumes[0],0));const m=this.canvasPos2frac([this.uiData.dragStart[0],this.uiData.dragStart[1]]),A=this.canvasPos2frac([this.uiData.dragEnd[0],this.uiData.dragEnd[1]]);this.generateMouseUpCallback(m,A)}this.mouseUpListener()}mouseMoveListener(u){if(this.uiData.mousedown){const m=this.getNoPaddingNoBorderCanvasRelativeMousePosition(u,this.gl.canvas);if(!m)return;const A=m.x*this.uiData.dpr,S=m.y*this.uiData.dpr;if(this.tileIndex(A,S)!==this.uiData.clickedTile)return;this.uiData.mouseButtonLeftDown?(this.mouseMove(m.x,m.y),this.mouseClick(m.x,m.y)):(this.uiData.mouseButtonRightDown||this.uiData.mouseButtonCenterDown)&&this.setDragEnd(m.x,m.y),this.drawScene(),this.uiData.prevX=this.uiData.currX,this.uiData.prevY=this.uiData.currY}}resetBriCon(u=null){if(this.uiData.isDragging)return;let m=!1;this.opts.sliceType===4&&(m=!0);let A=0,S=0;if(u!==null&&("targetTouches"in u?(A=u.targetTouches[0].clientX-u.target.getBoundingClientRect().left,S=u.targetTouches[0].clientY-u.target.getBoundingClientRect().top):(A=u.offsetX,S=u.offsetY),A*=this.uiData.dpr,S*=this.uiData.dpr,this.inRenderTile(A,S)>=0&&(m=!0)),m){this.uiData.mouseDepthPicker=!0,this.drawScene(),this.drawScene();return}this.opts.dragMode!==4&&(this.volumes.length<1||this.uiData.doubleTouch||(this.volumes[0].cal_min=this.volumes[0].robust_min,this.volumes[0].cal_max=this.volumes[0].robust_max,this.onIntensityChange(this.volumes[0]),this.refreshLayers(this.volumes[0],0),this.drawScene()))}setDragStart(u,m){u*=this.uiData.dpr,m*=this.uiData.dpr,this.uiData.dragStart[0]=u,this.uiData.dragStart[1]=m}setDragEnd(u,m){u*=this.uiData.dpr,m*=this.uiData.dpr,this.uiData.dragEnd[0]=u,this.uiData.dragEnd[1]=m}touchMoveListener(u){if(this.uiData.touchdown&&u.touches.length<2){const m=this.canvas.getBoundingClientRect();if(this.uiData.isDragging||(this.uiData.pan2DxyzmmAtMouseDown=clone(this.scene.pan2Dxyzmm)),this.uiData.isDragging=!0,this.uiData.doubleTouch&&this.uiData.isDragging){this.setDragEnd(u.targetTouches[0].clientX-u.target.getBoundingClientRect().left,u.targetTouches[0].clientY-u.target.getBoundingClientRect().top),this.drawScene();return}this.mouseClick(u.touches[0].clientX-m.left,u.touches[0].clientY-m.top),this.mouseMove(u.touches[0].clientX-m.left,u.touches[0].clientY-m.top)}else this.handlePinchZoom(u)}handlePinchZoom(u){if(u.targetTouches.length===2&&u.changedTouches.length===2){const m=Math.hypot(u.touches[0].pageX-u.touches[1].pageX,u.touches[0].pageY-u.touches[1].pageY),A=this.canvas.getBoundingClientRect();this.mousePos=[u.touches[0].clientX-A.left,u.touches[0].clientY-A.top],mthis.opts.keyDebounceTime){switch(this.currentClipPlaneIndex=(this.currentClipPlaneIndex+1)%7,this.currentClipPlaneIndex){case 0:this.scene.clipPlaneDepthAziElev=[2,0,0];break;case 1:this.scene.clipPlaneDepthAziElev=[0,270,0];break;case 2:this.scene.clipPlaneDepthAziElev=[0,90,0];break;case 3:this.scene.clipPlaneDepthAziElev=[0,0,0];break;case 4:this.scene.clipPlaneDepthAziElev=[0,180,0];break;case 5:this.scene.clipPlaneDepthAziElev=[0,0,-90];break;case 6:this.scene.clipPlaneDepthAziElev=[0,0,90];break}this.setClipPlane(this.scene.clipPlaneDepthAziElev)}this.lastCalled=m}else if(u.code===this.opts.viewModeHotKey){const m=new Date().getTime();m-this.lastCalled>this.opts.keyDebounceTime&&(this.setSliceType((this.opts.sliceType+1)%5),this.lastCalled=m)}}keyDownListener(u){u.code==="KeyH"&&this.opts.sliceType===4?this.setRenderAzimuthElevation(this.scene.renderAzimuth-1,this.scene.renderElevation):u.code==="KeyL"&&this.opts.sliceType===4?this.setRenderAzimuthElevation(this.scene.renderAzimuth+1,this.scene.renderElevation):u.code==="KeyJ"&&this.opts.sliceType===4?this.setRenderAzimuthElevation(this.scene.renderAzimuth,this.scene.renderElevation+1):u.code==="KeyK"&&this.opts.sliceType===4?this.setRenderAzimuthElevation(this.scene.renderAzimuth,this.scene.renderElevation-1):u.code==="KeyH"&&this.opts.sliceType!==4?this.moveCrosshairInVox(-1,0,0):u.code==="KeyL"&&this.opts.sliceType!==4?this.moveCrosshairInVox(1,0,0):u.code==="KeyU"&&this.opts.sliceType!==4&&u.ctrlKey?this.moveCrosshairInVox(0,0,1):u.code==="KeyD"&&this.opts.sliceType!==4&&u.ctrlKey?this.moveCrosshairInVox(0,0,-1):u.code==="KeyJ"&&this.opts.sliceType!==4?this.moveCrosshairInVox(0,-1,0):u.code==="KeyK"&&this.opts.sliceType!==4?this.moveCrosshairInVox(0,1,0):u.code==="KeyM"&&this.opts.sliceType!==4?(this.opts.dragMode++,this.opts.dragMode>=4&&(this.opts.dragMode=0),log.info("drag mode changed to ",DRAG_MODE[this.opts.dragMode])):u.code==="ArrowLeft"?this.setFrame4D(this.volumes[0].id,this.volumes[0].frame4D-1):u.code==="ArrowRight"?this.setFrame4D(this.volumes[0].id,this.volumes[0].frame4D+1):u.code==="Slash"&&u.shiftKey&&alert(`NIIVUE VERSION: ${version}`)}wheelListener(u){if(u.preventDefault(),u.stopPropagation(),this.thumbnailVisible)return;const m=this.canvas.getBoundingClientRect();u.deltaY<0?this.sliceScroll2D(-.01,u.clientX-m.left,u.clientY-m.top):this.sliceScroll2D(.01,u.clientX-m.left,u.clientY-m.top)}registerInteractions(){if(!this.canvas)throw new Error("canvas undefined");this.canvas.addEventListener("mousedown",this.mouseDownListener.bind(this)),this.canvas.addEventListener("mouseup",this.mouseUpListener.bind(this)),this.canvas.addEventListener("mousemove",this.mouseMoveListener.bind(this)),this.canvas.addEventListener("touchstart",this.touchStartListener.bind(this)),this.canvas.addEventListener("touchend",this.touchEndListener.bind(this)),this.canvas.addEventListener("touchmove",this.touchMoveListener.bind(this)),this.canvas.addEventListener("wheel",this.wheelListener.bind(this)),this.canvas.addEventListener("contextmenu",this.mouseContextMenuListener.bind(this)),this.canvas.addEventListener("dblclick",this.resetBriCon.bind(this)),this.canvas.addEventListener("dragenter",this.dragEnterListener.bind(this),!1),this.canvas.addEventListener("dragover",this.dragOverListener.bind(this),!1),this.canvas.addEventListener("drop",this.dropListener.bind(this),!1),this.canvas.setAttribute("tabindex","0"),this.canvas.addEventListener("keyup",this.keyUpListener.bind(this),!1),this.canvas.addEventListener("keydown",this.keyDownListener.bind(this),!1)}dragEnterListener(u){u.stopPropagation(),u.preventDefault()}dragOverListener(u){u.stopPropagation(),u.preventDefault()}getFileExt(u,m=!0){log.debug("fullname: ",u);const A=/(?:\.([^.]+))?$/;let S=A.exec(u)[1];return S=S.toUpperCase(),S==="GZ"&&(S=A.exec(u.slice(0,-3))[1],S=S.toUpperCase()),m?S:S.toLowerCase()}async addVolumeFromUrl(u){const m=await NVImage.loadFromUrl(u);return this.document.addImageOptions(m,u),m.onColormapChange=this.onColormapChange,this.mediaUrlMap.set(m,u.url),this.onVolumeAddedFromUrl&&this.onVolumeAddedFromUrl(u,m),this.addVolume(m),m}getMediaByUrl(u){return[...this.mediaUrlMap.entries()].filter(m=>m[1]===u).map(m=>m[0]).pop()}removeVolumeByUrl(u){const m=this.getMediaByUrl(u);if(m)this.removeVolume(m);else throw new Error("No volume with URL present")}readDirectory(u){const m=u.createReader();let A=[];const S=async w=>{const D=[],R=async L=>new Promise((P,d)=>L.file(P,d));for(let L=0;L{m.readEntries(w=>{w.length?(A=A.concat(w),v()):S(A).then(D=>{NVImage.loadFromFile({file:D,name:u.name,urlImgData:null,imageType:NVIMAGE_TYPE.DCM_FOLDER}).then(R=>this.addVolume(R)).catch(R=>{throw R})}).catch(D=>{throw D})})};return v(),A}isMeshExt(u){const m=this.getFileExt(u);return log.debug("dropped ext"),log.debug(m),MESH_EXTENSIONS.includes(m)}async loadFromArrayBuffer(u,m){const A=this.getFileExt(m);if(MESH_EXTENSIONS.includes(A)){await this.addMeshFromUrl({url:m,buffer:u});return}const S=NVImageFromUrlOptions(m);S.buffer=u,S.name=m,await this.addVolumeFromUrl(S)}async loadFromFile(u){const m=this.getFileExt(u.name);if(MESH_EXTENSIONS.includes(m)){await NVMesh2.loadFromFile({file:u,gl:this.gl,name:u.name}).then(A=>{this.addMesh(A)});return}await NVImage.loadFromFile({file:u,name:u.name}).then(A=>{this.addVolume(A)})}dropListener(u){if(u.stopPropagation(),u.preventDefault(),!this.opts.dragAndDropEnabled)return;const m=u.dataTransfer;if(!m)return;const A=m.getData("text/uri-list");if(A){const S=NVImageFromUrlOptions(A),v=this.getFileExt(A);log.debug("dropped ext"),log.debug(v),MESH_EXTENSIONS.includes(v)?this.addMeshFromUrl({url:A}).catch(w=>{throw w}):v==="NVD"?this.loadDocumentFromUrl(A).catch(w=>{throw w}):this.addVolumeFromUrl(S).catch(w=>{throw w})}else{const S=m.items;if(S.length>0){!u.shiftKey&&!u.altKey&&(this.volumes=[],this.overlays=[],this.meshes=[]),this.closeDrawing();for(const v of Array.from(S)){const w=v.webkitGetAsEntry();if(log.debug(w),!w)throw new Error("could not get entry from file");if(w.isFile){const D=this.getFileExt(w.name);if(D==="PNG"){w.file(L=>{this.loadBmpTexture(L).catch(P=>{throw P})});continue}let R;if(w.name.lastIndexOf("HEAD")!==-1)for(const L of Array.from(S)){const P=L.webkitGetAsEntry();if(!P)throw new Error("could not get paired entry");const d=w.name.substring(0,w.name.lastIndexOf("HEAD")),E=P.name.substring(0,P.name.lastIndexOf("BRIK"));d===E&&(R=P)}if(w.name.lastIndexOf("BRIK")!==-1)continue;if(MESH_EXTENSIONS.includes(D)){w.file(L=>{NVMesh2.loadFromFile({file:L,gl:this.gl,name:L.name}).then(P=>{this.addMesh(P)}).catch(P=>{throw P})});continue}else if(D==="NVD"){w.file(L=>{NVDocument.loadFromFile(L).then(P=>{this.loadDocument(P),log.debug("loaded document")}).catch(P=>{throw P})});break}w.file(L=>{R?R.file(P=>{NVImage.loadFromFile({file:L,urlImgData:P,limitFrames4D:this.opts.limitFrames4D}).then(d=>{this.addVolume(d)}).catch(d=>{throw d})}):NVImage.loadFromFile({file:L,urlImgData:R,limitFrames4D:this.opts.limitFrames4D}).then(P=>{u.altKey?(log.debug("alt key detected: assuming this is a drawing overlay"),this.drawClearAllUndoBitmaps(),this.loadDrawing(P)):this.addVolume(P)}).catch(P=>{throw P})})}else w.isDirectory&&this.readDirectory(w)}}}this.drawScene()}setMultiplanarPadPixels(u){this.opts.multiplanarPadPixels=u,this.drawScene()}setMultiplanarLayout(u){typeof u=="string"&&(u=parseInt(u)),this.opts.multiplanarLayout=u,this.drawScene()}setCornerOrientationText(u){this.opts.isCornerOrientationText=u,this.updateGLVolume()}setRadiologicalConvention(u){this.opts.isRadiologicalConvention=u,this.updateGLVolume()}setDefaults(u={},m=!1){this.document.opts={...DEFAULT_OPTIONS},this.scene.sceneData={...INITIAL_SCENE_DATA};for(const A in u)typeof u[A]=="function"?this[A]=u[A]:this.opts[A]=DEFAULT_OPTIONS[A]===void 0?DEFAULT_OPTIONS[A]:u[A];if(this.scene.pan2Dxyzmm=[0,0,0,1],m&&this.volumes&&this.volumes.length>0)for(let A=0;A=this.opts.maxDrawUndoBitmaps&&(this.currentDrawUndoBitmap=0),this.drawUndoBitmaps[this.currentDrawUndoBitmap]=encodeRLE(this.drawBitmap)}drawClearAllUndoBitmaps(){if(this.currentDrawUndoBitmap=this.opts.maxDrawUndoBitmaps,!(!this.drawUndoBitmaps||this.drawUndoBitmaps.length<1))for(let u=this.drawUndoBitmaps.length-1;u>=0;u--)this.drawUndoBitmaps[u]=new Uint8Array}drawUndo(){if(this.drawUndoBitmaps.length<1){log.debug("undo bitmaps not loaded");return}if(this.currentDrawUndoBitmap--,this.currentDrawUndoBitmap<0&&(this.currentDrawUndoBitmap=this.drawUndoBitmaps.length-1),this.currentDrawUndoBitmap>=this.drawUndoBitmaps.length&&(this.currentDrawUndoBitmap=0),this.drawUndoBitmaps[this.currentDrawUndoBitmap].length<2){log.debug("drawUndo is misbehaving");return}this.drawBitmap=decodeRLE(this.drawUndoBitmaps[this.currentDrawUndoBitmap],this.drawBitmap.length),this.refreshDrawing(!0)}loadDrawing(u){if(this.drawBitmap&&log.debug("Overwriting open drawing!"),!this.back)throw new Error("back undefined");this.drawClearAllUndoBitmaps();const m=u.hdr.dims;if(m[1]!==this.back.hdr.dims[1]||m[2]!==this.back.hdr.dims[2]||m[3]!==this.back.hdr.dims[3])return log.debug("drawing dimensions do not match background image"),!1;u.img.constructor!==Uint8Array&&log.debug("Drawings should be UINT8");const A=u.permRAS,S=m[1]*m[2]*m[3];this.drawBitmap=new Uint8Array(S),this.drawTexture=this.r8Tex(this.drawTexture,TEXTURE7_DRAW,this.back.dims,!0);const v=[0,0,0];for(let q=0;q<3;q++)for(let z=0;z<3;z++)Math.abs(A[q])-1===z&&(v[z]=q*Math.sign(A[q]));let w=1;const D=[1,1,1],R=[!1,!1,!1];for(let q=0;qArray(S).fill(0)),q=Array(S).fill(0).map(()=>Array(S).fill(0));for(let H=1;H3)for(let H=0;Hz&&(e0[0]=H,e0[1]=j,e0[2]=y,z=Y)}else if(u===3)for(let H=0;Hz&&(e0[0]=H,e0[1]=j,z=y)}else for(let H=0;Hz&&(e0[0]=H,z=j)}return[P(e0[0]),P(e0[1]),P(e0[2])]}drawOtsu(u=2){if(this.volumes.length===0)return;const m=this.volumes[0].img.length,A=this.findOtsu(u);if(A.length<3)return;this.drawBitmap||this.createEmptyDrawing();const S=this.drawBitmap,v=this.volumes[0].img;for(let w=0;wA[0]&&(S[w]=1),D>A[1]&&(S[w]=2),D>A[2]&&(S[w]=3)}this.drawAddUndoBitmap(),this.refreshDrawing(!0)}removeHaze(u=5,m=0){const A=this.volumes[m].img,S=this.volumes[m].hdr,v=A.length;let w=2;(u===5||u===1)&&(w=4),(u===4||u===2)&&(w=3);const D=this.findOtsu(w);if(D.length<3)return;let R=D[0];u===1&&(R=D[2]),u===2&&(R=D[1]);const L=S.scl_inter,P=S.scl_slope,d=this.volumes[m].global_min;for(let E=0;E=this.meshes.length?-1:u;const m=this.meshes.length;for(let A=0;AA)return;const S=this.getVolumeIndexByID(u.id);m===0?(this.volumes.splice(S,1),this.volumes.unshift(u),this.back=this.volumes[0],this.overlays=this.volumes.slice(1)):m<0?(this.volumes.splice(this.getVolumeIndexByID(u.id),1),this.back=this.volumes[0],this.volumes.length>1?this.overlays=this.volumes.slice(1):this.overlays=[]):(this.volumes.splice(S,1),this.volumes.splice(m,0,u),this.overlays=this.volumes.slice(1),this.back=this.volumes[0]),this.updateGLVolume()}setMesh(u,m=0){this.meshes.forEach(v=>{log.debug("MESH: ",v.name)});const A=this.meshes.length;if(m>A)return;const S=this.getMeshIndexByID(u.id);m===0?(this.meshes.splice(S,1),this.meshes.unshift(u)):m<0?this.meshes.splice(this.getMeshIndexByID(u.id),1):(this.meshes.splice(S,1),this.meshes.splice(m,0,u)),this.updateGLVolume(),this.meshes.forEach(v=>{log.debug(v.name)})}removeVolume(u){if(this.setVolume(u,-1),this.mediaUrlMap.has(u)){const m=this.mediaUrlMap.get(u);this.onVolumeWithUrlRemoved(m),this.mediaUrlMap.delete(u)}this.drawScene()}removeVolumeByIndex(u){if(u>=this.volumes.length)throw new Error("Index of volume out of bounds");this.removeVolume(this.volumes[u])}removeMesh(u){if(this.setMesh(u,-1),this.mediaUrlMap.has(u)){const m=this.mediaUrlMap.get(u);this.onMeshWithUrlRemoved(m),this.mediaUrlMap.delete(u)}}removeMeshByUrl(u){const m=this.getMediaByUrl(u);m&&(this.removeMesh(m),this.mediaUrlMap.delete(m),this.onMeshWithUrlRemoved(u))}moveVolumeToBottom(u){this.setVolume(u,0)}moveVolumeUp(u){const m=this.getVolumeIndexByID(u.id);this.setVolume(u,m+1)}moveVolumeDown(u){const m=this.getVolumeIndexByID(u.id);this.setVolume(u,m-1)}moveVolumeToTop(u){this.setVolume(u,this.volumes.length-1)}mouseDown(u,m){u*=this.uiData.dpr,m*=this.uiData.dpr,this.mousePos=[u,m]}mouseMove(u,m){u*=this.uiData.dpr,m*=this.uiData.dpr;const A=(u-this.mousePos[0])/this.uiData.dpr,S=(m-this.mousePos[1])/this.uiData.dpr;this.mousePos=[u,m],!(this.inRenderTile(u,m)<0)&&(Math.abs(A)<1&&Math.abs(S)<1||(this.scene.renderAzimuth+=A,this.scene.renderElevation+=S,this.drawScene()))}sph2cartDeg(u,m){const A=-m*(Math.PI/180),S=(u-90)%360*(Math.PI/180),v=[Math.cos(A)*Math.cos(S),Math.cos(A)*Math.sin(S),Math.sin(A)],w=Math.sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]);return w<=0||(v[0]/=w,v[1]/=w,v[2]/=w),v}setClipPlane(u){const m=this.sph2cartDeg(u[1]+180,u[2]);this.scene.clipPlane=[m[0],m[1],m[2],u[0]],this.scene.clipPlaneDepthAziElev=u,this.onClipPlaneChange(this.scene.clipPlane),this.drawScene()}setCrosshairColor(u){this.opts.crosshairColor=u,this.drawScene()}setCrosshairWidth(u){this.opts.crosshairWidth=u,this.crosshairs3D&&(this.crosshairs3D.mm[0]=NaN),this.drawScene()}setDrawColormap(u){this.drawLut=cmapper.makeDrawLut(u),this.updateGLVolume()}setDrawingEnabled(u){this.opts.drawingEnabled=u,this.opts.drawingEnabled&&(this.drawBitmap||this.createEmptyDrawing()),this.drawScene()}setPenValue(u,m=!1){this.opts.penValue=u,this.opts.isFilledPen=m,this.drawScene()}setDrawOpacity(u){this.drawOpacity=u,this.drawScene()}setSelectionBoxColor(u){this.opts.selectionBoxColor=u}sliceScroll2D(u,m,A,S=!0){if(this.inGraphTile(m,A)){let v=this.volumes[0].frame4D;u>0&&v++,u<0&&v--,this.setFrame4D(this.volumes[0].id,v);return}if(u!==0&&this.opts.dragMode===3&&this.inRenderTile(this.uiData.dpr*m,this.uiData.dpr*A)===-1){let v=this.scene.pan2Dxyzmm[3]*(1+10*u);v=Math.round(v*10)/10;const w=this.scene.pan2Dxyzmm[3]-v;this.opts.yoke3Dto2DZoom&&(this.scene.volScaleMultiplier=v),this.scene.pan2Dxyzmm[3]=v;const D=this.frac2mm(this.scene.crosshairPos);this.scene.pan2Dxyzmm[0]+=w*D[0],this.scene.pan2Dxyzmm[1]+=w*D[1],this.scene.pan2Dxyzmm[2]+=w*D[2],this.drawScene();return}this.mouseClick(m,A,u,S)}setSliceType(u){return this.opts.sliceType=u,this.drawScene(),this}setOpacity(u,m){if(this.volumes[u].opacity=m,u===0){this.drawScene();return}this.updateGLVolume()}setScale(u){this.scene.volScaleMultiplier=u,this.drawScene()}setClipPlaneColor(u){this.opts.clipPlaneColor=u,this.renderShader.use(this.gl),this.gl.uniform4fv(this.renderShader.uniforms.clipPlaneColor,this.opts.clipPlaneColor),this.drawScene()}async setVolumeRenderIllumination(u=0){this.renderShader=this.renderVolumeShader,u>0&&(this.renderShader=this.renderGradientShader),u<0&&(this.renderShader=this.renderSliceShader),this.initRenderShader(this.renderShader,u),this.renderShader.use(this.gl),this.setClipPlaneColor(this.opts.clipPlaneColor),this.gradientTextureAmount=u,this.refreshLayers(this.volumes[0],0),this.drawScene()}overlayRGBA(u){const m=u.hdr,A=m.dims[1]*m.dims[2]*m.dims[3],S=new Uint8ClampedArray(A*4),v=.2*Math.min(Math.min(m.dims[1],m.dims[2]),m.dims[3]),w=.5*m.dims[1],D=.5*m.dims[2],R=.5*m.dims[3];let L=0;for(let P=0;P0&&(this.back=this.volumes[0]);const S=u.encodedDrawingBlob;if(S){const v=u.imageOptionsArray[0],w=NVImage.loadFromBase64({base64:S,...v});w&&this.loadDrawing(w)}for(const v of u.meshDataObjects??[]){const w={gl:this.gl,...v};log.debug(w);const D=new NVMesh2(w.pts,w.tris,w.name,w.rgba255,w.opacity,w.visible,this.gl,w.connectome,w.dpg,w.dps,w.dpv);D.meshShaderIndex=w.meshShaderIndex,D.layers=w.layers,D.updateMesh(this.gl),log.debug(D),this.addMesh(D)}if(u.data.connectomes)for(const v of u.data.connectomes){const w=JSON.parse(v),D=this.loadConnectomeAsMesh(w);D.updateMesh(this.gl),this.addMesh(D)}return this.updateGLVolume(),this.drawScene(),this.onDocumentLoaded(u),this}generateLoadDocumentJavaScript(u,m){const A=this.json(),S=NVUtilities.compressToBase64String(JSON.stringify(A));return` ${m} function saveNiivueAsHtml(pageName) { @@ -1699,5 +1699,5 @@ void main(void) { button.onclick = saveAsHtml; <\/script> - `}saveHTML(u="untitled.html",m="gl1",A){const S=this.generateHTML(m,A);NVUtilities.download(S,u,"application/html")}json(){return this.document.opts=this.opts,this.document.scene=this.scene,this.document.volumes=this.volumes,this.document.meshes=this.meshes,this.drawScene(),this.document.previewImageDataURL=this.canvas.toDataURL(),this.document.json()}async saveDocument(u="untitled.nvd"){this.document.title=u,log.debug("saveDocument",this.volumes[0]),this.drawScene(),this.document.previewImageDataURL=this.canvas.toDataURL(),this.document.volumes=this.volumes,this.document.meshes=this.meshes,this.document.download(u)}async loadVolumes(u){if(this.loadingText="loading...",this.drawScene(),this.thumbnailVisible)return this.deferredVolumes=u,this;this.volumes=[],this.gl.clearColor(0,0,0,1),this.gl.clear(this.gl.COLOR_BUFFER_BIT);for(let m=0;m0&&(v[Y]=L);const P=this.r16Tex(null,TEXTURE12_GC_STRENGTH0,this.back.dims,v),d=this.r16Tex(null,TEXTURE13_GC_STRENGTH1,this.back.dims,v);m.bindVertexArray(this.genericVAO);const E=this.growCutShader;E.use(m);const e=128;m.uniform1i(E.uniforms.finalPass,0),m.uniform1i(E.uniforms.backTex,11);for(let Y=0;Yu[0]&&(D=1),m[1]>u[1]&&(R=1),m[2]>u[2]&&(L=1);let P=u[0],d=u[1],E=u[2];const e=m[0],N=m[1],q=m[2];if(S>=v&&S>=w){let z=2*v-S,e0=2*w-S;for(;P!==e;)P+=D,z>=0&&(d+=R,z-=2*S),e0>=0&&(E+=L,e0-=2*S),z+=2*v,e0+=2*w,this.drawPt(P,d,E,A)}else if(v>=S&&v>=w){let z=2*S-v,e0=2*w-v;for(;d!==N;)d+=R,z>=0&&(P+=D,z-=2*v),e0>=0&&(E+=L,e0-=2*v),z+=2*S,e0+=2*w,this.drawPt(P,d,E,A)}else{let z=2*v-w,e0=2*S-w;for(;E!==q;)E+=L,z>=0&&(d+=R,z-=2*w),e0>=0&&(P+=D,e0-=2*w),z+=2*v,e0+=2*S,this.drawPt(P,d,E,A)}}drawFloodFillCore(u,m,A=6){var P;if(!((P=this.back)!=null&&P.dims))throw new Error("back.dims undefined");const S=[this.back.dims[1],this.back.dims[2],this.back.dims[3]],v=S[0],w=v*S[1];function D(d){return d[0]+d[1]*v+d[2]*w}function R(d){const E=Math.floor(d/w),e=Math.floor((d-E*w)/v);return[Math.floor(d%v),e,E]}const L=[];for(L.push(m),u[m]=2;L.length>0;){let d=function(N){const q=e.slice();if(q[0]+=N[0],q[1]+=N[1],q[2]+=N[2],q[0]<0||q[1]<0||q[2]<0||q[0]>=S[0]||q[1]>=S[1]||q[2]>=S[2])return;const z=D(q);u[z]===1&&(u[z]=2,L.push(z))};const E=L[0];L.shift();const e=R(E);d([0,0,-1]),d([0,0,1]),d([0,-1,0]),d([0,1,0]),d([-1,0,0]),d([1,0,0]),!(A<=6)&&(d([-1,-1,0]),d([1,1,0]),d([-1,1,0]),d([1,1,0]),d([0,-1,-1]),d([0,1,-1]),d([-1,0,-1]),d([1,0,-1]),d([0,-1,1]),d([0,1,1]),d([-1,0,1]),d([1,0,1]),!(A<=18)&&(d([-1,-1,-1]),d([1,-1,-1]),d([-1,1,-1]),d([1,1,-1]),d([-1,-1,1]),d([1,-1,1]),d([-1,1,1]),d([1,1,1])))}}drawFloodFill(u,m=0,A=0,S=NaN,v=NaN,w=6){var q;if(!this.drawBitmap)throw new Error("drawBitmap undefined");if(!((q=this.back)!=null&&q.dims))throw new Error("back.dims undefined");m=Math.abs(m);const D=[this.back.dims[1],this.back.dims[2],this.back.dims[3]];if(u[0]<0||u[1]<0||u[2]<0||u[0]>=D[0]||u[1]>=D[1]||u[2]>=D[2])return;const R=D[0],L=R*D[1],P=L*D[2],d=this.drawBitmap.slice();if(d.length!==L*D[2])return;function E(z){return z[0]+z[1]*R+z[2]*L}const e=E(u),N=d[e];if(N===m){A!==0?log.debug("drawFloodFill selected voxel is not part of a drawing"):log.debug("drawFloodFill selected voxel is already desired color");return}for(let z=1;z=H&&z[j]<=e0&&(d[j]=1);this.drawFloodFillCore(d,e,w),m=N}for(let z=1;zq[0]&&(j=1),z[1]>q[1]&&(y=1);let Y=q[0],G=q[1];const J=z[0],i0=z[1];if(e0>=H){let Q=2*H-e0;for(;Y!==J;)Y+=j,Q>=0&&(G+=y,Q-=2*e0),Q+=2*H,w[Y+G*v[0]]=D}else{let Q=2*e0-H;for(;G!==i0;)G+=y,Q>=0&&(Y+=j,Q-=2*H),Q+=2*e0,w[Y+G*v[0]]=D}}const L=[this.drawPenFillPts[0][A],this.drawPenFillPts[0][S]];let P=L;for(let q=1;q=v[0]||q[1]>=v[1])return;const z=q[0]+q[1]*v[0];w[z]===0&&(d.push(q),w[z]=2)}for(let q=0;q0;){const q=d.shift();E([q[0]-1,q[1]]),E([q[0]+1,q[1]]),E([q[0],q[1]-1]),E([q[0],q[1]+1])}D=this.opts.penValue;const e=this.drawPenFillPts[0][3-(A+S)];if(!this.drawBitmap)throw new Error("drawBitmap undefined");if(m===0){const q=e*v[0]*v[1];for(let z=0;z0){const q=this.drawBitmap.length,z=decodeRLE(this.drawUndoBitmaps[this.currentDrawUndoBitmap],q);for(let e0=0;e0{const v=new Image;v.onload=()=>{if(!this.bmpShader)return;let w;m===4?(this.bmpTexture!==null&&this.gl.deleteTexture(this.bmpTexture),this.bmpTexture=this.gl.createTexture(),w=this.bmpTexture,this.bmpTextureWH=v.width/v.height,this.gl.activeTexture(TEXTURE4_THUMBNAIL),this.bmpShader.use(this.gl),this.gl.uniform1i(this.bmpShader.uniforms.bmpTexture,4)):m===5?(this.gl.activeTexture(TEXTURE5_MATCAP),this.matCapTexture!==null&&this.gl.deleteTexture(this.matCapTexture),this.matCapTexture=this.gl.createTexture(),w=this.matCapTexture):(this.fontShader.use(this.gl),this.gl.activeTexture(TEXTURE3_FONT),this.gl.uniform1i(this.fontShader.uniforms.fontTexture,3),this.fontTexture!==null&&this.gl.deleteTexture(this.fontTexture),this.fontTexture=this.gl.createTexture(),w=this.fontTexture),this.gl.bindTexture(this.gl.TEXTURE_2D,w),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,v),A(w),m!==4&&this.drawScene()},v.onerror=S,this.requestCORSIfNotSameOrigin(v,u),v.src=u})}async loadFontTexture(u){return this.loadPngAsTexture(u,3)}async loadBmpTexture(u){return this.loadPngAsTexture(u,4)}async loadMatCapTexture(u){return this.loadPngAsTexture(u,5)}initFontMets(){if(!this.fontMetrics)throw new Error("fontMetrics undefined");this.fontMets={distanceRange:this.fontMetrics.atlas.distanceRange,size:this.fontMetrics.atlas.size,mets:{}};for(let A=0;A<256;A++)this.fontMets.mets[A]={xadv:0,uv_lbwh:[0,0,0,0],lbwh:[0,0,0,0]};const u=this.fontMetrics.atlas.width,m=this.fontMetrics.atlas.height;for(let A=0;A=this.meshes.length){log.debug("Unable to change shader until mesh is loaded (maybe you need async)");return}this.meshes[S].meshShaderIndex=A,this.updateGLVolume(),this.onMeshShaderChanged(S,A)}createCustomMeshShader(u,m="Custom"){if(!u)throw new Error("Need fragment shader");const A=this.meshShaderNameToNumber(m);A>=0&&(this.gl.deleteProgram(this.meshShaders[A].shader.program),this.meshShaders.splice(A,1));const S=new Shader(this.gl,vertMeshShader,u);return S.use(this.gl),{Name:m,Frag:u,shader:S}}setCustomMeshShader(u="",m="Custom"){const A=this.createCustomMeshShader(u,m);return this.meshShaders.push(A),this.onCustomMeshShaderAdded(u,m),this.meshShaders.length-1}meshShaderNames(u=!0){const m=[];for(let A=0;A0&&(await this.loadBmpTexture(this.opts.thumbnail),this.thumbnailVisible=!0),this.updateGLVolume(),this.initialized=!0,this.resizeListener(),this.drawScene(),this}gradientGL(u){const m=this.gl,A=[0,0,0,0,1,0,1,0,0,1,1,0],S=m.createVertexArray();m.bindVertexArray(S);const v=m.createBuffer();m.bindBuffer(m.ARRAY_BUFFER,v),m.bufferData(m.ARRAY_BUFFER,new Float32Array(A),m.STATIC_DRAW),m.enableVertexAttribArray(0),m.vertexAttribPointer(0,3,m.FLOAT,!1,0,0);const w=m.createFramebuffer();m.bindFramebuffer(m.FRAMEBUFFER,w),m.disable(m.CULL_FACE),m.viewport(0,0,u.dims[1],u.dims[2]),m.disable(m.BLEND);const D=this.rgbaTex(null,TEXTURE8_GRADIENT_TEMP,u.dims),R=this.blurShader;R.use(m),m.activeTexture(TEXTURE0_BACK_VOL),m.bindTexture(m.TEXTURE_3D,this.volumeTexture);const L=.7;m.uniform1i(R.uniforms.intensityVol,0),m.uniform1f(R.uniforms.dX,L/u.dims[1]),m.uniform1f(R.uniforms.dY,L/u.dims[2]),m.uniform1f(R.uniforms.dZ,L/u.dims[3]),m.bindVertexArray(S);for(let E=0;E0&&(this.furthestVertexFromOrigin=this.volumeObject3D.furthestVertexFromOrigin),this.meshes)for(let A=0;A0)for(let J=0;J0&&u.frame4D1&&v===0)return;let w=null;if(!this.back)throw new Error("back undefined");this.gl.bindVertexArray(this.unusedVAO),this.crosshairs3D&&(this.crosshairs3D.mm[0]=NaN);let D=clone$2(u.toRAS);if(m===0){this.volumeObject3D=u.toNiivueObject3D(this.VOLUME_ID,this.gl),invert(D,D),this.back.matRAS=u.matRAS,this.back.dims=u.dimsRAS,this.back.pixDims=u.pixDimsRAS,w=this.rgbaTex(this.volumeTexture,TEXTURE0_BACK_VOL,u.dimsRAS);const{volScale:G,vox:J}=this.sliceScale(!0);if(this.volScale=G,this.vox=J,this.volumeObject3D.scale=G,!this.renderShader)throw new Error("renderShader undefined");this.renderShader.use(this.gl),this.gl.uniform3fv(this.renderShader.uniforms.texVox,J),this.gl.uniform3fv(this.renderShader.uniforms.volScale,G);const i0=this.pickingImageShader;i0.use(this.gl),this.gl.uniform1i(i0.uniforms.volume,0),this.gl.uniform1i(i0.uniforms.colormap,1),this.gl.uniform1i(i0.uniforms.overlay,2),this.gl.uniform3fv(i0.uniforms.volScale,G),log.debug(this.volumeObject3D)}else{((Y=this.back)==null?void 0:Y.dims)===void 0&&log.error("Fatal error: Unable to render overlay: background dimensions not defined!");const G=this.mm2frac(u.mm000,0,!0);let J=this.mm2frac(u.mm100,0,!0),i0=this.mm2frac(u.mm010,0,!0),Q=this.mm2frac(u.mm001,0,!0);J=subtract$1(J,J,G),i0=subtract$1(i0,i0,G),Q=subtract$1(Q,Q,G),D=fromValues$3(J[0],i0[0],Q[0],G[0],J[1],i0[1],Q[1],G[1],J[2],i0[2],Q[2],G[2],0,0,0,1),invert(D,D),m===1?(w=this.rgbaTex(this.overlayTexture,TEXTURE2_OVERLAY_VOL,this.back.dims),this.overlayTexture=w,this.overlayTextureID=w):w=this.overlayTextureID}const R=this.gl.createFramebuffer();this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,R),this.gl.disable(this.gl.CULL_FACE),this.gl.viewport(0,0,this.back.dims[1],this.back.dims[2]),this.gl.disable(this.gl.BLEND);const L=this.gl.createTexture();this.gl.activeTexture(TEXTURE9_ORIENT),this.gl.bindTexture(this.gl.TEXTURE_3D,L),this.gl.texParameteri(this.gl.TEXTURE_3D,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.gl.TEXTURE_3D,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.gl.TEXTURE_3D,this.gl.TEXTURE_WRAP_R,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_3D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_3D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,1);let P=this.orientShaderU;if(!A)throw new Error("hdr undefined");if(!S)throw new Error("img undefined");if(A.datatypeCode===2)A.intent_code===1002&&(P=this.orientShaderAtlasU),this.gl.texStorage3D(this.gl.TEXTURE_3D,1,this.gl.R8UI,A.dims[1],A.dims[2],A.dims[3]),this.gl.texSubImage3D(this.gl.TEXTURE_3D,0,0,0,0,A.dims[1],A.dims[2],A.dims[3],this.gl.RED_INTEGER,this.gl.UNSIGNED_BYTE,S);else if(A.datatypeCode===4)P=this.orientShaderI,A.intent_code===1002&&(P=this.orientShaderAtlasI),this.gl.texStorage3D(this.gl.TEXTURE_3D,1,this.gl.R16I,A.dims[1],A.dims[2],A.dims[3]),this.gl.texSubImage3D(this.gl.TEXTURE_3D,0,0,0,0,A.dims[1],A.dims[2],A.dims[3],this.gl.RED_INTEGER,this.gl.SHORT,S);else if(A.datatypeCode===16)this.gl.texStorage3D(this.gl.TEXTURE_3D,1,this.gl.R32F,A.dims[1],A.dims[2],A.dims[3]),this.gl.texSubImage3D(this.gl.TEXTURE_3D,0,0,0,0,A.dims[1],A.dims[2],A.dims[3],this.gl.RED,this.gl.FLOAT,S),P=this.orientShaderF;else if(A.datatypeCode===64){let G=new Float32Array;G=Float32Array.from(S),this.gl.texStorage3D(this.gl.TEXTURE_3D,1,this.gl.R32F,A.dims[1],A.dims[2],A.dims[3]),this.gl.texSubImage3D(this.gl.TEXTURE_3D,0,0,0,0,A.dims[1],A.dims[2],A.dims[3],this.gl.RED,this.gl.FLOAT,G),P=this.orientShaderF}else A.datatypeCode===128?(P=this.orientShaderRGBU,P.use(this.gl),this.gl.uniform1i(P.uniforms.hasAlpha,0),this.gl.texStorage3D(this.gl.TEXTURE_3D,1,this.gl.RGB8UI,A.dims[1],A.dims[2],A.dims[3]),this.gl.texSubImage3D(this.gl.TEXTURE_3D,0,0,0,0,A.dims[1],A.dims[2],A.dims[3],this.gl.RGB_INTEGER,this.gl.UNSIGNED_BYTE,S)):A.datatypeCode===512?(A.intent_code===1002&&(P=this.orientShaderAtlasU),this.gl.texStorage3D(this.gl.TEXTURE_3D,1,this.gl.R16UI,A.dims[1],A.dims[2],A.dims[3]),this.gl.texSubImage3D(this.gl.TEXTURE_3D,0,0,0,0,A.dims[1],A.dims[2],A.dims[3],this.gl.RED_INTEGER,this.gl.UNSIGNED_SHORT,S)):A.datatypeCode===2304&&(P=this.orientShaderRGBU,P.use(this.gl),this.gl.uniform1i(P.uniforms.hasAlpha,1),this.gl.texStorage3D(this.gl.TEXTURE_3D,1,this.gl.RGBA8UI,A.dims[1],A.dims[2],A.dims[3]),this.gl.texSubImage3D(this.gl.TEXTURE_3D,0,0,0,0,A.dims[1],A.dims[2],A.dims[3],this.gl.RGBA_INTEGER,this.gl.UNSIGNED_BYTE,S));u.global_min===void 0&&u.calMinMax();let d=null;if(this.gl.bindVertexArray(this.genericVAO),m>1){if(!this.back.dims)throw new Error("back.dims undefined");d=this.rgbaTex(d,TEXTURE10_BLEND,this.back.dims),this.gl.bindTexture(this.gl.TEXTURE_3D,d);const G=this.passThroughShader;G.use(this.gl),this.gl.uniform1i(G.uniforms.in3D,2);for(let J=0;J7){const G=u.colormapLabel.max-u.colormapLabel.min+1;E=this.createColormapTexture(E,1,G),this.gl.texSubImage2D(this.gl.TEXTURE_2D,0,0,0,G,1,this.gl.RGBA,this.gl.UNSIGNED_BYTE,u.colormapLabel.lut),this.gl.uniform1f(P.uniforms.cal_min,u.colormapLabel.min-.5),this.gl.uniform1f(P.uniforms.cal_max,u.colormapLabel.max+.5),this.gl.bindTexture(this.gl.TEXTURE_2D,E)}else this.gl.bindTexture(this.gl.TEXTURE_2D,this.colormapTexture),this.gl.uniform1f(P.uniforms.cal_min,u.cal_min),this.gl.uniform1f(P.uniforms.cal_max,u.cal_max);this.gl.uniform1i(P.uniforms.isAlphaThreshold,u.alphaThreshold),this.gl.uniform1i(P.uniforms.isAdditiveBlend,this.opts.isAdditiveBlend?1:0);let e=Number.POSITIVE_INFINITY,N=Number.NEGATIVE_INFINITY;if(u.colormapNegative.length>0&&(e=Math.min(-u.cal_min,-u.cal_max),N=Math.max(-u.cal_min,-u.cal_max),isFinite(u.cal_minNeg)&&isFinite(u.cal_maxNeg)&&(e=Math.min(u.cal_minNeg,u.cal_maxNeg),N=Math.max(u.cal_minNeg,u.cal_maxNeg))),!P)throw new Error("orientShader undefined");this.gl.uniform1f(P.uniforms.layer??null,m),this.gl.uniform1f(P.uniforms.cal_minNeg??null,e),this.gl.uniform1f(P.uniforms.cal_maxNeg??null,N),this.gl.bindTexture(this.gl.TEXTURE_3D,L),this.gl.uniform1i(P.uniforms.intensityVol??null,9),this.gl.uniform1i(P.uniforms.blend3D??null,10),this.gl.uniform1i(P.uniforms.colormap??null,1),this.gl.uniform1f(P.uniforms.scl_inter??null,A.scl_inter),this.gl.uniform1f(P.uniforms.scl_slope??null,A.scl_slope),this.gl.uniform1f(P.uniforms.opacity??null,v),this.gl.uniform1i(P.uniforms.modulationVol??null,7);let q=null;if(u.modulationImage!==null&&u.modulationImage>=0&&u.modulationImage0;let d0=this.volumes[u.modulationImage].cal_min,S0=this.volumes[u.modulationImage].cal_max;isFinite(this.volumes[u.modulationImage].cal_minNeg)&&isFinite(this.volumes[u.modulationImage].cal_maxNeg)&&(d0=this.volumes[u.modulationImage].cal_minNeg,S0=this.volumes[u.modulationImage].cal_minNeg),d0=Math.abs(d0),S0=Math.abs(S0),d0>S0&&([d0,S0]=[S0,d0]);const p0=1/(S0-d0);let T0=Math.abs(u.modulateAlpha);T0=Math.max(T0,1);const C0=this.volumes[u.modulationImage].frame4D*J;for(let F0=0;F00?this.gradientGL(A):(this.gradientTexture!==null&&this.gl.deleteTexture(this.gradientTexture),this.gradientTexture=null)),!this.renderShader)throw new Error("renderShader undefined");this.renderShader.use(this.gl);const e0=this.sliceScale(!0),H=e0.vox,j=e0.volScale;if(this.gl.uniform1f(this.renderShader.uniforms.overlays,this.overlays),this.gl.uniform4fv(this.renderShader.uniforms.clipPlaneColor,this.opts.clipPlaneColor),this.gl.uniform1f(this.renderShader.uniforms.backOpacity,this.volumes[0].opacity),this.gl.uniform1f(this.renderShader.uniforms.renderOverlayBlend,this.opts.renderOverlayBlend),this.gl.uniform4fv(this.renderShader.uniforms.clipPlane,this.scene.clipPlane),this.gl.uniform3fv(this.renderShader.uniforms.texVox,H),this.gl.uniform3fv(this.renderShader.uniforms.volScale,j),!this.pickingImageShader)throw new Error("pickingImageShader undefined");this.pickingImageShader.use(this.gl),this.gl.uniform1f(this.pickingImageShader.uniforms.overlays,this.overlays.length),this.gl.uniform3fv(this.pickingImageShader.uniforms.texVox,H);let y=this.sliceMMShader;if(this.opts.isV1SliceShader&&(y=this.sliceV1Shader),!y)throw new Error("slice shader undefined");y.use(this.gl),this.gl.uniform1f(y.uniforms.overlays,this.overlays.length),this.gl.uniform1f(y.uniforms.drawOpacity,this.drawOpacity),E!==null&&(this.gl.deleteTexture(E),this.gl.activeTexture(TEXTURE1_COLORMAPS),this.gl.bindTexture(this.gl.TEXTURE_2D,this.colormapTexture)),this.gl.uniform1i(y.uniforms.drawing,7),this.gl.activeTexture(TEXTURE7_DRAW),this.gl.bindTexture(this.gl.TEXTURE_3D,this.drawTexture),this.updateInterpolation(m)}colormaps(){return cmapper.colormaps()}addColormap(u,m){cmapper.addColormap(u,m)}setColormap(u,m){const A=this.getVolumeIndexByID(u);this.volumes[A].colormap=m,this.updateGLVolume()}idx(u,m,A,S){return A*S[0]*S[1]+m*S[0]+u}check_previous_slice(u,m,A,S,v,w,D,R){const L=new Uint32Array(27);let P=0;if(!v)return 0;const d=u[this.idx(A,S,v,w)];if(D>=6){const E=this.idx(A,S,v-1,w);d===u[E]&&(L[P++]=m[E])}if(D>=18){if(A){const E=this.idx(A-1,S,v-1,w);d===u[E]&&(L[P++]=m[E])}if(S){const E=this.idx(A,S-1,v-1,w);d===u[E]&&(L[P++]=m[E])}if(A=6){if(E){const q=this.idx(E-1,d,P,m);N===u[q]&&(L[e++]=R[q])}if(d){const q=this.idx(E,d-1,P,m);N===u[q]&&(L[e++]=R[q])}}if(A>=18){if(d&&E){const q=this.idx(E-1,d-1,P,m);N===u[q]&&(L[e++]=R[q])}if(d&&E=w){w+=v;const q=new Uint32Array(w);q.set(D),D=q}D[S-1]=S,S++}}}for(let P=0;P100){log.info(` -Ooh no!!`);break}v[R]=L,D=Math.min(D,L)}for(let R=0;Ru.cal_min){w=u.cal_min,D=u.cal_max;const j=(A-m)/(D-w);return log.info(" Robust Rescale: min: "+w+" max: "+D+" scale: "+j),console.log("Robust Rescale: min: "+w+" max: "+D+" scale: "+j),[w,j]}const R=u.img,L=u.hdr.dims[1]*u.hdr.dims[2]*u.hdr.dims[3];if(u.hdr.scl_slope!==1||u.hdr.scl_inter!==0){const j=u.img,y=new Float32Array(u.img.length);for(let Y=0;Y=1e-15&&P++;const d=1e3,E=(D-w)/d,e=new Array(d).fill(0);for(let j=0;j=q);)z++;const e0=w;for(w=z*E+e0,q=L-Math.floor((1-v)*P),z=0;z=q);)z++;D=z*E+e0;let H=1;return w!==D&&(H=(A-m)/(D-w)),log.info(" Rescale: min: "+w+" max: "+D+" scale: "+H),[w,H]}conformVox2Vox(u,m,A=256,S=1,v=!1){const w=m.flat(),D=fromValues$3(w[0],w[1],w[2],w[3],w[4],w[5],w[6],w[7],w[8],w[9],w[10],w[11],w[12],w[13],w[14],w[15]),R=fromValues$1(u[1]/2,u[2]/2,u[3]/2,1),L=create$1(),P=create$3();transpose(P,D),transformMat4(L,R,P);const d=fromValues$2(L[0],L[1],L[2]),E=fromValues$2(S,S,S);let e=fromValues$3(-1,0,0,0,0,0,1,0,0,-1,0,0,0,0,0,1);v&&(e=fromValues$3(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),transpose(e,e);const N=fromValues$1(A,A,A,1),q=create$3();scale$3(q,e,E);const z=fromValues$1(N[0],N[1],N[2],1);transformMat4(z,z,q),scale$1(z,z,.5);const e0=create$2();subtract$1(e0,d,fromValues$2(z[0],z[1],z[2]));const H=create$3();transpose(H,q),H[3]=e0[0],H[7]=e0[1],H[11]=e0[2];const j=create$3();invert(j,H);const y=create$3();mul(y,D,j);const Y=create$3();return invert(Y,y),[H,y,Y]}async createNiftiArray(u=[256,256,256],m=[1,1,1],A=[1,0,0,-128,0,1,0,-128,0,0,1,-128,0,0,0,1],S=2,v=new Uint8Array){return await NVImage.createNiftiArray(u,m,A,S,v)}async niftiArray2NVImage(u=new Uint8Array){return await NVImage.loadFromUrl({url:u})}async loadFromUrl(u){return await NVImage.loadFromUrl({url:u})}async conform(u,m=!1,A=!0,S=!1,v=!1){const R=this.conformVox2Vox(u.hdr.dims,u.hdr.affine.flat(),256,1,m),L=R[0],P=R[2],d=256*256*256,E=new Float32Array(d),e=new Float32Array(u.img),N=u.hdr.dims[1]*u.hdr.dims[2]*u.hdr.dims[3];if(u.hdr.scl_slope!==1||u.hdr.scl_inter!==0)for(let l0=0;l0=q||De>=z||I0>=e0)continue;const Ue=T0-ee,qe=C0-ie,$e=F0-ke,oi=1-Ue,ri=1-qe,be=1-$e,Ge=y(ee,ie,ke);let J0=0;J0+=e[Ge]*oi*ri*be,J0+=e[Ge+H]*oi*ri*$e,J0+=e[Ge+q]*oi*qe*be,J0+=e[Ge+q+H]*oi*qe*$e,J0+=e[Ge+1]*Ue*ri*be,J0+=e[Ge+1+H]*Ue*ri*$e,J0+=e[Ge+1+q]*Ue*qe*be,J0+=e[Ge+1+q+H]*Ue*qe*$e,E[j]=J0}}else for(let l0=0;l0<256;l0++)for(let o0=0;o0<256;o0++){const c0=o0*P[1]+l0*P[2]+P[3],d0=o0*P[5]+l0*P[6]+P[7],S0=o0*P[9]+l0*P[10]+P[11];for(let p0=0;p0<256;p0++){const T0=Math.round(p0*Y+c0),C0=Math.round(p0*G+d0),F0=Math.round(p0*J+S0);j++,!(T0<0||C0<0||F0<0)&&(T0>=q||C0>=z||F0>=e0||(E[j]=e[y(T0,C0,F0)]))}}let i0=0;v&&(i0=NaN);let Q=new Uint8Array;if(S){const l0=await this.getScale(u,0,1,i0),o0=await this.scalecropFloat32(E,0,1,l0[0],l0[1]);Q=await this.createNiftiArray([256,256,256],[1,1,1],Array.from(L),16,new Uint8Array(o0.buffer))}else{const l0=await this.getScale(u,0,255,i0),o0=await this.scalecropUint8(E,0,255,l0[0],l0[1]);Q=await this.createNiftiArray([256,256,256],[1,1,1],Array.from(L),2,o0)}return await this.niftiArray2NVImage(Q)}setRenderDrawAmbientOcclusion(u){if(!this.renderShader)throw new Error("renderShader undefined");this.renderDrawAmbientOcclusion=u,this.renderShader.use(this.gl),this.gl.uniform1fv(this.renderShader.uniforms.renderDrawAmbientOcclusion,[this.renderDrawAmbientOcclusion,1]),this.drawScene()}setColorMap(u,m){this.setColormap(u,m)}setColormapNegative(u,m){const A=this.getVolumeIndexByID(u);this.volumes[A].colormapNegative=m,this.updateGLVolume()}setModulationImage(u,m,A=0){const S=this.getVolumeIndexByID(u);let v=null;m.length>0&&(v=this.getVolumeIndexByID(m)),this.volumes[S].modulationImage=v,this.volumes[S].modulateAlpha=A,this.updateGLVolume()}setGamma(u=1){cmapper.gamma=u,this.updateGLVolume()}async loadDeferred4DVolumes(u){const m=this.getVolumeIndexByID(u),A=this.volumes[m];if(A.nTotalFrame4D<=A.nFrame4D)return;let S;A.fileObject?S=await NVImage.loadFromFile({file:A.fileObject}):S=await NVImage.loadFromUrl({url:A.url}),S&&(A.img=S.img.slice(),A.nTotalFrame4D=S.nTotalFrame4D,A.nFrame4D=S.nFrame4D,this.updateGLVolume())}setFrame4D(u,m){const A=this.getVolumeIndexByID(u),S=this.volumes[A];m>S.nFrame4D-1&&(m=S.nFrame4D-1),m<0&&(m=0),m!==S.frame4D&&(S.frame4D=m,this.updateGLVolume(),this.onFrameChange(S,m),this.createOnLocationChange())}getFrame4D(u){const m=this.getVolumeIndexByID(u);return this.volumes[m].frame4D}colormapFromKey(u){return cmapper.colormapFromKey(u)}colormap(u="",m=!1){return cmapper.colormap(u,m)}createColormapTexture(u=null,m=0,A=256){return u!==null&&this.gl.deleteTexture(u),m<1||A<1?null:(u=this.gl.createTexture(),this.gl.activeTexture(TEXTURE1_COLORMAPS),this.gl.bindTexture(this.gl.TEXTURE_2D,u),this.gl.texStorage2D(this.gl.TEXTURE_2D,1,this.gl.RGBA8,A,m),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_R,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,1),u)}addColormapList(u="",m=NaN,A=NaN,S=!1,v=!1,w=!0,D=!1){u.length<1&&(w=!1),this.colormapLists.push({name:u,min:m,max:A,alphaThreshold:S,negative:v,visible:w,invert:D})}refreshColormaps(){if(this.colormapLists=[],this.volumes.length<1&&this.meshes.length<1)return;const u=this.volumes.length;if(u>0)for(let w=0;w0)for(let w=0;wS[0]&&m>S[1]&&u=0&&this.screenSlices[A].axCorSag===4?A:-1}sliceScroll3D(u=0){if(u!==0){if(this.volumes.length>0&&this.scene.clipPlaneDepthAziElev[0]<1.8){const m=this.scene.clipPlaneDepthAziElev.slice();return u>0&&(m[0]=Math.min(1.5,m[0]+.025)),u<0&&(m[0]=Math.max(-1.5,m[0]-.025)),m[0]!==this.scene.clipPlaneDepthAziElev[0]?(this.scene.clipPlaneDepthAziElev=m,this.setClipPlane(this.scene.clipPlaneDepthAziElev)):void 0}u>0&&(this.scene.volScaleMultiplier=Math.min(2,this.scene.volScaleMultiplier*1.1)),u<0&&(this.scene.volScaleMultiplier=Math.max(.5,this.scene.volScaleMultiplier*.9)),this.drawScene()}}deleteThumbnail(){this.bmpTexture&&(this.gl.deleteTexture(this.bmpTexture),this.bmpTexture=null,this.thumbnailVisible=!1)}inGraphTile(u,m){if(this.graph.opacity<=0||this.volumes.length<1||this.volumes[0].nFrame4D<1||!this.graph.plotLTWH||this.graph.plotLTWH[2]<1||this.graph.plotLTWH[3]<1)return!1;const A=[(u-this.graph.LTWH[0])/this.graph.LTWH[2],(m-this.graph.LTWH[1])/this.graph.LTWH[3]];return A[0]>0&&A[1]>0&&A[0]<=1&&A[1]<=1}mouseClick(u,m,A=0,S=!0){if(u*=this.uiData.dpr,m*=this.uiData.dpr,this.canvas.focus(),this.thumbnailVisible){this.thumbnailVisible=!1,Promise.all([this.loadVolumes(this.deferredVolumes),this.loadMeshes(this.deferredMeshes)]).catch(v=>{throw v});return}if(this.inGraphTile(u,m)){if(!this.graph.plotLTWH)throw new Error("plotLTWH undefined");const v=[(u-this.graph.plotLTWH[0])/this.graph.plotLTWH[2],(m-this.graph.plotLTWH[1])/this.graph.plotLTWH[3]];if(v[0]>0&&v[1]>0&&v[0]<=1&&v[1]<=1){const w=Math.round(v[0]*(this.volumes[0].nFrame4D-1));this.setFrame4D(this.volumes[0].id,w);return}v[0]>.5&&v[1]>1&&this.loadDeferred4DVolumes(this.volumes[0].id).catch(w=>{throw w});return}if(this.inRenderTile(u,m)>=0){this.sliceScroll3D(A),this.drawScene();return}if(!(this.screenSlices.length<1||this.gl.canvas.height<1||this.gl.canvas.width<1))for(let v=0;v=0&&this.drawPenAxCorSag!==w||w>2)continue;const D=this.screenXY2TextureFrac(u,m,v,!1);if(!(D[0]<0)){if(!S){this.scene.crosshairPos[2-w]=A,this.drawScene();return}if(A!==0){let R=1;A<0&&(R=-1);const L=[0,0,0];L[2-w]=R,this.moveCrosshairInVox(L[0],L[1],L[2]),this.drawScene(),this.createOnLocationChange(w);return}if(this.opts.isForceMouseClickToVoxelCenters?this.scene.crosshairPos=clone$1(this.vox2frac(this.frac2vox(D))):this.scene.crosshairPos=clone$1(D),this.opts.drawingEnabled){const R=this.frac2vox(this.scene.crosshairPos);if(!isFinite(this.opts.penValue)||this.opts.penValue<0||Object.is(this.opts.penValue,-0)){isFinite(this.opts.penValue)?this.drawFloodFill(R,Math.abs(this.opts.penValue),this.opts.floodFillNeighbors):this.drawFloodFill(R,0,this.opts.penValue,this.opts.floodFillNeighbors);return}if(isNaN(this.drawPenLocation[0]))this.drawPenAxCorSag=w,this.drawPenFillPts=[],this.drawPt(...R,this.opts.penValue);else{if(R[0]===this.drawPenLocation[0]&&R[1]===this.drawPenLocation[1]&&R[2]===this.drawPenLocation[2])return;this.drawPenLine(R,this.drawPenLocation,this.opts.penValue)}this.drawPenLocation=R,this.opts.isFilledPen&&this.drawPenFillPts.push(R),this.refreshDrawing(!1)}this.drawScene(),this.createOnLocationChange(w);return}}}drawRuler(){let u=[],m=[];for(let R=0;R1){m=this.screenSlices[R].leftTopWidthHeight,u=this.screenSlices[R].fovMM;break}if(m.length<4)return;const S=100/u[0]*m[2],v=m[0]+.5*m[2]-.5*S,w=m[1]+m[3]-2*this.opts.rulerWidth,D=[v,w,v+S,w];this.drawRuler10cm(D)}drawRuler10cm(u){if(!this.lineShader)throw new Error("lineShader undefined");this.gl.bindVertexArray(this.genericVAO),this.lineShader.use(this.gl),this.gl.uniform4fv(this.lineShader.uniforms.lineColor,this.opts.rulerColor),this.gl.uniform2fv(this.lineShader.uniforms.canvasWidthHeight,[this.gl.canvas.width,this.gl.canvas.height]),this.gl.uniform1f(this.lineShader.uniforms.thickness,this.opts.rulerWidth),this.gl.uniform4fv(this.lineShader.uniforms.startXYendXY,u),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4);const m=-.1*(u[0]-u[2]),A=u[1],S=A-2*this.opts.rulerWidth,v=A-4*this.opts.rulerWidth;for(let w=0;w<11;w++){const D=u[0]+w*m,R=[D,A,D,S];w%5===0&&(R[3]=v),this.gl.uniform4fv(this.lineShader.uniforms.startXYendXY,R),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4)}this.gl.bindVertexArray(this.unusedVAO)}screenXY2mm(u,m,A=-1){let S;for(let v=0;v=0&&(w=A),this.screenSlices[w].axCorSag>2)continue;const R=this.screenSlices[w].leftTopWidthHeight;if(uR[0]+R[2]||m>R[1]+R[3]||(S=this.screenXY2TextureFrac(u,m,w,!1),S[0]<0))continue;const L=this.frac2mm(S);return fromValues$1(L[0],L[1],L[2],w)}return fromValues$1(NaN,NaN,NaN,NaN)}dragForPanZoom(u){const m=this.screenXY2mm(u[2],u[3]);if(isNaN(m[0]))return;const A=this.screenXY2mm(u[0],u[1],m[3]);if(isNaN(A[0])||isNaN(m[0])||isNaN(m[3]))return;const S=create$1(),v=this.uiData.pan2DxyzmmAtMouseDown[3];sub(S,m,A),this.scene.pan2Dxyzmm[0]=this.uiData.pan2DxyzmmAtMouseDown[0]+v*S[0],this.scene.pan2Dxyzmm[1]=this.uiData.pan2DxyzmmAtMouseDown[1]+v*S[1],this.scene.pan2Dxyzmm[2]=this.uiData.pan2DxyzmmAtMouseDown[2]+v*S[2]}dragForCenterButton(u){this.dragForPanZoom(u)}dragForSlicer3D(u){let m=this.uiData.pan2DxyzmmAtMouseDown[3];const A=u[3]-u[1];m+=A*.01,m=Math.max(m,.1),m=Math.min(m,10);const v=this.scene.pan2Dxyzmm[3]-m;this.opts.yoke3Dto2DZoom&&(this.scene.volScaleMultiplier=m),this.scene.pan2Dxyzmm[3]=m;const w=this.frac2mm(this.scene.crosshairPos);this.scene.pan2Dxyzmm[0]+=v*w[0],this.scene.pan2Dxyzmm[1]+=v*w[1],this.scene.pan2Dxyzmm[2]+=v*w[2]}drawMeasurementTool(u){const m=this.gl;if(m.bindVertexArray(this.genericVAO),m.depthFunc(m.ALWAYS),m.enable(m.BLEND),m.blendFunc(m.SRC_ALPHA,m.ONE_MINUS_SRC_ALPHA),!this.lineShader)throw new Error("lineShader undefined");this.lineShader.use(this.gl),m.uniform4fv(this.lineShader.uniforms.lineColor,this.opts.rulerColor),m.uniform2fv(this.lineShader.uniforms.canvasWidthHeight,[m.canvas.width,m.canvas.height]),m.uniform1f(this.lineShader.uniforms.thickness,this.opts.rulerWidth),m.uniform4fv(this.lineShader.uniforms.startXYendXY,u),m.drawArrays(m.TRIANGLE_STRIP,0,4);const A=this.opts.rulerColor;A[3]=1,m.uniform4fv(this.lineShader.uniforms.lineColor,A);const S=this.opts.rulerWidth;m.uniform1f(this.lineShader.uniforms.thickness,S*2);let v=[u[0],u[1]-S,u[0],u[1]+S];m.uniform4fv(this.lineShader.uniforms.startXYendXY,v),m.drawArrays(m.TRIANGLE_STRIP,0,4),v=[u[2],u[3]-S,u[2],u[3]+S],m.uniform4fv(this.lineShader.uniforms.startXYendXY,v),m.drawArrays(m.TRIANGLE_STRIP,0,4);let w=this.canvasPos2frac([u[0],u[1]]),D=this.canvasPos2frac([u[2],u[3]]);if(w[0]>=0&&D[0]>=0){const R=this.frac2mm(w);w=fromValues$2(R[0],R[1],R[2]);const L=this.frac2mm(D);D=fromValues$2(L[0],L[1],L[2]);const P=create$2();sub$1(P,w,D);const d=len(P);let E=2;d>9&&(E=1),d>99&&(E=0);const e=d.toFixed(E);this.drawTextBetween(u,e,1,A)}m.bindVertexArray(this.unusedVAO)}drawRect(u,m=[1,0,0,-1]){if(m[3]<0&&(m=this.opts.crosshairColor),!this.rectShader)throw new Error("rectShader undefined");this.rectShader.use(this.gl),this.gl.enable(this.gl.BLEND),this.gl.uniform4fv(this.rectShader.uniforms.lineColor,m),this.gl.uniform2fv(this.rectShader.uniforms.canvasWidthHeight,[this.gl.canvas.width,this.gl.canvas.height]),this.gl.uniform4f(this.rectShader.uniforms.leftTopWidthHeight,u[0],u[1],u[2],u[3]),this.gl.bindVertexArray(this.genericVAO),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4),this.gl.bindVertexArray(this.unusedVAO)}drawCircle(u,m=this.opts.fontColor,A=1){if(!this.circleShader)throw new Error("circleShader undefined");this.circleShader.use(this.gl),this.gl.enable(this.gl.BLEND),this.gl.uniform4fv(this.circleShader.uniforms.circleColor,m),this.gl.uniform2fv(this.circleShader.uniforms.canvasWidthHeight,[this.gl.canvas.width,this.gl.canvas.height]),this.gl.uniform4f(this.circleShader.uniforms.leftTopWidthHeight,u[0],u[1],u[2],u[3]),this.gl.uniform1f(this.circleShader.uniforms.fillPercent,A),this.gl.uniform4fv(this.circleShader.uniforms.circleColor,m),this.gl.bindVertexArray(this.genericVAO),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4),this.gl.bindVertexArray(this.unusedVAO)}drawSelectionBox(u){this.drawRect(u,this.opts.selectionBoxColor)}effectiveCanvasHeight(){return this.gl.canvas.height-this.colorbarHeight}effectiveCanvasWidth(){return this.gl.canvas.width-this.getLegendPanelWidth()}getAllLabels(){const S=this.meshes.filter(w=>w.type==="connectome").flatMap(w=>w.nodes).map(w=>w.label).filter(w=>w!==void 0);return[...this.document.labels,...S]}getBulletMarginWidth(){let u=0;const m=this.getAllLabels();if(m.length===0)return 0;const A=m.length===1?m[0].style.bulletScale:m.reduce((w,D)=>w.style.bulletScale>D.style.bulletScale?w:D).style.bulletScale,S=m.length===1?m[0]:m.reduce((w,D)=>{const R=this.opts.textHeight*this.gl.canvas.height*w.style.textScale,L=this.opts.textHeight*this.gl.canvas.height*D.style.textScale;return this.textHeight(R,w.text)>this.textHeight(L,D.text)?w:D}),v=this.opts.textHeight*this.gl.canvas.height*S.style.textScale;return u=this.textHeight(v,S.text)*A,u+=v,u}getLegendPanelWidth(){const u=this.getAllLabels();if(!this.opts.showLegend||u.length===0)return 0;const A=this.opts.textHeight*this.gl.canvas.height*1;let S=0;const v=u.reduce((L,P)=>{const d=this.opts.textHeight*this.gl.canvas.height*L.style.textScale,E=this.opts.textHeight*this.gl.canvas.height*P.style.textScale;return this.textWidth(d,L.text)>this.textWidth(E,P.text)?L:P}),w=this.opts.textHeight*this.gl.canvas.height*v.style.textScale,D=this.textWidth(w,v.text),R=this.getBulletMarginWidth();return D&&(S=R+D,S+=A*2),S}getLegendPanelHeight(){const u=this.getAllLabels();let m=0;const S=this.opts.textHeight*this.gl.canvas.height*1;for(const v of u){const w=this.opts.textHeight*this.gl.canvas.height*v.style.textScale,D=this.textHeight(w,v.text);m+=D}return m&&(m+=S/2*(u.length+1)),m}reserveColorbarPanel(){let u=Math.max(this.opts.textHeight,.01);u=u*Math.min(this.gl.canvas.height,this.gl.canvas.width);const m=3*u,A=[0,this.gl.canvas.height-m,this.gl.canvas.width,m];return this.colorbarHeight=A[3]+1,A}drawColorbarCore(u=0,m=[0,0,0,0],A=!1,S=0,v=1,w){if(m[2]<=0||m[3]<=0)return;let D=Math.max(this.opts.textHeight,.01);D=D*Math.min(this.gl.canvas.height,this.gl.canvas.width);let R=D;const L=3*D;let P=D;if(m[3]0&&(N=S,S=0),S===v||D<1)return;const q=Math.abs(v-S);let[z,e0]=tickSpacing(S,v);e0S.includes(R)).reduce((D,R)=>D.lbwh[3]>R.lbwh[3]?D:R).lbwh[3];return u*w}drawChar(u,m,A){if(!this.fontShader)throw new Error("fontShader undefined");const S=this.fontMets.mets[A],v=u[0]+m*S.lbwh[0],w=-(m*S.lbwh[1]),D=m*S.lbwh[2],R=m*S.lbwh[3],L=u[1]+(w-R)+m;return this.gl.uniform4f(this.fontShader.uniforms.leftTopWidthHeight,v,L,D,R),this.gl.uniform4fv(this.fontShader.uniforms.uvLeftTopWidthHeight,S.uv_lbwh),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4),m*S.xadv}drawLoadingText(u){if(!this.canvas)throw new Error("canvas undefined");this.gl.viewport(0,0,this.gl.canvas.width,this.gl.canvas.height),this.gl.enable(this.gl.CULL_FACE),this.gl.enable(this.gl.BLEND),this.drawTextBelow([this.canvas.width/2,this.canvas.height/2],u,3)}drawText(u,m,A=1,S=null){if(this.opts.textHeight<=0)return;if(!this.fontShader)throw new Error("fontShader undefined");this.fontShader.use(this.gl);const v=this.opts.textHeight*Math.min(this.gl.canvas.height,this.gl.canvas.width)*A;this.gl.enable(this.gl.BLEND),this.gl.uniform2f(this.fontShader.uniforms.canvasWidthHeight,this.gl.canvas.width,this.gl.canvas.height),S===null&&(S=this.opts.fontColor),this.gl.uniform4fv(this.fontShader.uniforms.fontColor,S);let w=v/this.fontMets.size*this.fontMets.distanceRange;w=Math.max(w,1),this.gl.uniform1f(this.fontShader.uniforms.screenPxRange,w);const D=new TextEncoder().encode(m);this.gl.bindVertexArray(this.genericVAO);for(let R=0;R.8?L=[0,0,0,.5]:L=[1,1,1,.5],this.drawRect(R,L),this.drawText(v,m,A,S)}drawTextBelow(u,m,A=1,S=null){if(this.opts.textHeight<=0)return;if(!this.canvas)throw new Error("canvas undefined");let v=this.opts.textHeight*this.gl.canvas.height*A,w=this.textWidth(v,m);w>this.canvas.width&&(A*=(this.canvas.width-2)/w,v=this.opts.textHeight*this.gl.canvas.height*A,w=this.textWidth(v,m)),u[0]-=.5*this.textWidth(v,m),u[0]=Math.max(u[0],1),u[0]=Math.min(u[0],this.canvas.width-w-1),this.drawText(u,m,A,S)}updateInterpolation(u,m=!1){let A=this.gl.LINEAR;!m&&this.opts.isNearestInterpolation&&(A=this.gl.NEAREST),u===0?this.gl.activeTexture(TEXTURE0_BACK_VOL):this.gl.activeTexture(TEXTURE2_OVERLAY_VOL),this.gl.texParameteri(this.gl.TEXTURE_3D,this.gl.TEXTURE_MIN_FILTER,A),this.gl.texParameteri(this.gl.TEXTURE_3D,this.gl.TEXTURE_MAG_FILTER,A)}setAtlasOutline(u){this.opts.atlasOutline=u,this.updateGLVolume(),this.drawScene()}setInterpolation(u){this.opts.isNearestInterpolation=u;const m=this.volumes.length;if(!(m<1)){for(let A=0;A0){this.opts.meshThicknessOn2D!==1/0&&(q=this.calculateMvpMatrix2D(u,v.mnMM,v.mxMM,this.opts.meshThicknessOn2D,N,L,R,D));const e0=clone$2(q.modelViewProjectionMatrix);multiply(e0,e0,w),this.drawMesh3D(!0,1,e0,q.modelMatrix,q.normalMatrix)}isNaN(A)&&this.drawCrosshairs3D(!1,.15,q.modelViewProjectionMatrix,!0,this.opts.isSliceMM),this.drawSliceOrientationText(u,m),this.readyForSync=!0}calculateMvpMatrix(u,m=[0,0,0,0],A,S){(m[2]===0||m[3]===0)&&(m=[0,0,this.gl.canvas.width,this.gl.canvas.height]);const v=m[2]/m[3];let w=this.furthestFromPivot;const D=this.pivot3D,R=create$3();w=.8*w/this.scene.volScaleMultiplier,v<1?ortho(R,-w,w,-w/v,w/v,w*.01,w*8):ortho(R,-w*v,w*v,-w,w,w*.01,w*8);const L=create$3();L[0]=-1;const P=fromValues$2(0,0,-w*1.8);translate(L,L,P),this.position&&translate(L,L,this.position),rotateX(L,L,deg2rad(270-S)),rotateZ(L,L,deg2rad(A-180)),translate(L,L,[-D[0],-D[1],-D[2]]);const d=create$3();invert(d,L);const E=create$3();transpose(E,d);const e=create$3();return multiply(e,R,L),[e,L,E]}calculateModelMatrix(u,m){if(!this.back)throw new Error("back undefined");const A=create$3();if(A[0]=-1,rotateX(A,A,deg2rad(270-m)),rotateZ(A,A,deg2rad(u-180)),this.back.obliqueRAS){const S=clone$2(this.back.obliqueRAS);multiply(A,A,S)}return A}calculateRayDirection(u,m){const A=this.calculateModelMatrix(u,m),S=fromValues$3(1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,0,1),v=create$3();multiply(v,S,A);const w=create$3();invert(w,v);const D=fromValues$1(0,0,-1,1);transformMat4(D,D,w);const R=fromValues$2(D[0],D[1],D[2]);normalize$1(R,R);const L=5e-5;return Math.abs(R[0])0){if(!this.volumeObject3D)throw new Error("volumeObject3D undefined");m=fromValues$2(this.volumeObject3D.extentsMin[0],this.volumeObject3D.extentsMin[1],this.volumeObject3D.extentsMin[2]),A=fromValues$2(this.volumeObject3D.extentsMax[0],this.volumeObject3D.extentsMax[1],this.volumeObject3D.extentsMax[2]),u||(m=fromValues$2(this.volumes[0].extentsMinOrtho[0],this.volumes[0].extentsMinOrtho[1],this.volumes[0].extentsMinOrtho[2]),A=fromValues$2(this.volumes[0].extentsMaxOrtho[0],this.volumes[0].extentsMaxOrtho[1],this.volumes[0].extentsMaxOrtho[2]))}if(this.meshes.length>0){if(this.volumes.length<1){const v=this.meshes[0].extentsMin,w=this.meshes[0].extentsMax;m=fromValues$2(v[0],v[1],v[2]),A=fromValues$2(w[0],w[1],w[2])}for(let v=0;vthis.gl.canvas.width||u.LTWH[1]+u.LTWH[3]>this.gl.canvas.height)return;u.backColor=[.15,.15,.15,u.opacity],u.lineColor=[1,1,1,1],this.opts.backColor[0]+this.opts.backColor[1]+this.opts.backColor[2]>1.5&&(u.backColor=[.95,.95,.95,u.opacity],u.lineColor=[0,0,0,1]),u.textColor=u.lineColor.slice(),u.lineThickness=4,u.lineAlpha=1,u.lines=[];const A=[];if(u.vols.length<1)this.volumes[0]!=null&&A.push(0);else for(let o0=0;o0v){const o0=w-v;for(let c0=0;c0=w&&(w=v+1),this.drawRect(u.LTWH,u.backColor);const[D,R,L]=tickSpacing(v,w),P=Math.max(0,-1*Math.floor(Math.log(D)/Math.log(10)));v=Math.min(R,v),w=Math.max(L,w);function d(o0){return o0.toFixed(6).replace(/\.?0*$/,"")}const e=.07*(Math.min(u.LTWH[2],u.LTWH[3])/(this.fontMets.size*this.uiData.dpr));let N=this.opts.textHeight*this.gl.canvas.height*e;N<16&&(N=0);let q=0,z=R;if(N>0)for(;z<=w;){const o0=z.toFixed(P),c0=this.textWidth(N,o0);q=Math.max(c0,q),z+=D}const e0=.05,H=Math.abs(u.LTWH[2]),j=Math.abs(u.LTWH[3]),y=[u.LTWH[0]+e0*H+q,u.LTWH[1]+e0*j,u.LTWH[2]-q-2*e0*H,u.LTWH[3]-N-2*e0*j];this.graph.LTWH=u.LTWH,this.graph.plotLTWH=y,this.drawRect(y,this.opts.backColor);const Y=w-v,G=y[3]/Y,J=y[2]/(u.lines[0].length-1),i0=y[1]+y[3];z=R+.5*D;const Q=u.lineColor.slice();for(Q[3]=.25*u.lineColor[3];z<=w;){const o0=i0-(z-v)*G;this.drawLine([y[0],o0,y[0]+y[2],o0],.5*u.lineThickness,Q),z+=D}z=R;const f=.5*u.lineThickness;for(;z<=w;){const o0=i0-(z-v)*G;this.drawLine([y[0]-f,o0,y[0]+y[2]+u.lineThickness,o0],u.lineThickness,u.lineColor);const c0=z.toFixed(P);N>0&&this.drawTextLeft([y[0]-6,o0],c0,e,u.textColor),z+=D}let l0=1;for(;u.lines[0].length/l0>20;)l0*=5;for(let o0=0;o00&&this.drawTextBelow([c0,2+y[1]+y[3]],S0,e,u.textColor),this.drawLine([c0,y[1],c0,y[1]+y[3]],d0,u.lineColor)}}for(let o0=0;o0=0&&u.selectedColumnE/255);return}const D=unpackFloatFromVec4i(w);if(D>1)return;const R=(this.mousePos[0]-u[0])/u[2],L=(A.canvas.height-this.mousePos[1]-u[1])/u[3],P=unProject(R,L,D,m),d=this.mm2frac(P,0,!0);d[0]<0||d[0]>1||d[1]<0||d[1]>1||d[2]<0||d[2]>1||(this.scene.crosshairPos=this.mm2frac(P,0,!0))}drawImage3D(u,m,A){if(this.volumes.length===0)return;const S=this.gl,v=this.calculateRayDirection(m,A),w=this.volumeObject3D;if(w){S.enable(S.BLEND),S.blendFunc(S.SRC_ALPHA,S.ONE_MINUS_SRC_ALPHA),S.enable(S.CULL_FACE),S.cullFace(S.FRONT);let D=this.renderShader;if(this.uiData.mouseDepthPicker&&(D=this.pickingImageShader),D.use(this.gl),S.uniform1i(D.uniforms.backgroundMasksOverlays,this.backgroundMasksOverlays),this.gradientTextureAmount>0){S.activeTexture(TEXTURE6_GRADIENT),S.bindTexture(S.TEXTURE_3D,this.gradientTexture);const R=this.calculateModelMatrix(m,A),L=create$3();invert(L,R);const P=create$3();transpose(P,L),S.uniformMatrix4fv(D.uniforms.normMtx,!1,P)}this.drawBitmap&&this.drawBitmap.length>8?S.uniform2f(D.uniforms.renderDrawAmbientOcclusionXY,this.renderDrawAmbientOcclusion,this.drawOpacity):S.uniform2f(D.uniforms.renderDrawAmbientOcclusionXY,this.renderDrawAmbientOcclusion,0),S.uniformMatrix4fv(D.uniforms.mvpMtx,!1,u),S.uniformMatrix4fv(D.uniforms.matRAS,!1,this.back.matRAS),S.uniform3fv(D.uniforms.rayDir,v),this.gradientTextureAmount<0?S.uniform4fv(D.uniforms.clipPlane,[this.scene.crosshairPos[0],this.scene.crosshairPos[1],this.scene.crosshairPos[2],30]):S.uniform4fv(D.uniforms.clipPlane,this.scene.clipPlane),S.uniform1f(D.uniforms.drawOpacity,1),S.bindVertexArray(w.vao),S.drawElements(w.mode,w.indexCount,S.UNSIGNED_SHORT,0),S.bindVertexArray(this.unusedVAO)}}drawOrientationCube(u,m=0,A=0){if(!this.opts.isOrientCube)return;const S=.05*Math.min(u[2],u[3]);if(S<5)return;const v=this.gl;v.enable(v.CULL_FACE),v.cullFace(v.BACK),this.orientCubeShader.use(this.gl),v.bindVertexArray(this.orientCubeShaderVAO);const w=create$3(),D=create$3();ortho(D,0,v.canvas.width,0,v.canvas.height,-10*S,10*S);let R=0;u[1]===0&&(R=v.canvas.height-this.effectiveCanvasHeight()),translate(w,w,[1.8*S+u[0],R+1.8*S+u[1],0]),scale$3(w,w,[S,S,S]),rotateX(w,w,deg2rad(270-A)),rotateZ(w,w,deg2rad(-m));const L=create$3();multiply(L,D,w),v.uniformMatrix4fv(this.orientCubeShader.uniforms.u_matrix,!1,L),v.drawArrays(v.TRIANGLE_STRIP,0,168),v.bindVertexArray(this.unusedVAO),this.gl.disable(this.gl.CULL_FACE)}createOnLocationChange(u=NaN){const[m,A,S]=this.sceneExtentsMinMax(!0),v=Math.max(Math.max(S[0],S[1]),S[2]);function w(E){return Math.max(0,-Math.ceil(Math.log10(Math.abs(E))))}let D=w(v*.001);const R=this.frac2mm(this.scene.crosshairPos,0,!0);function L(E,e=0){return parseFloat(E.toFixed(e))}let P=L(R[0],D)+"×"+L(R[1],D)+"×"+L(R[2],D);if(this.volumes.length>0&&this.volumes[0].nFrame4D>0&&(P+="×"+L(this.volumes[0].frame4D)),this.volumes.length>0){let E=" = ";for(let q=0;q=0&&H=0&&(E+="+"),E+=L(e0,D)),E+=" "}P+=E;const e=this.back.dimsRAS,N=e[1]*e[2]*e[3];if(this.drawBitmap&&this.drawBitmap.length===N){const q=this.frac2vox(this.scene.crosshairPos),z=q[0]+q[1]*e[1]+q[2]*e[1]*e[2];P+=" "+this.drawLut.labels[this.drawBitmap[z]]}}const d={mm:this.frac2mm(this.scene.crosshairPos,0,!0),axCorSag:u,vox:this.frac2vox(this.scene.crosshairPos),frac:this.scene.crosshairPos,xy:[this.mousePos[0],this.mousePos[1]],values:this.volumes.map(E=>{const e=this.frac2mm(this.scene.crosshairPos,0,!0),N=E.mm2vox(e),q=E.getValue(N[0],N[1],N[2],E.frame4D);return{name:E.name,value:q,id:E.id,mm:e,vox:N}}),string:P};this.onLocationChange(d)}addLabel(u,m,A){const S={textColor:this.opts.legendTextColor,textScale:1,textAlignment:"left",lineWidth:0,lineColor:this.opts.legendTextColor,lineTerminator:"none",bulletScale:0,bulletColor:this.opts.legendTextColor},v=m?{...S,...m}:{...S},w=new NVLabel3D(u,v,A);return this.document.labels.push(w),w}calculateScreenPoint(u,m,A){const S=create$1();return transformMat4(S,[...u,1],m),S[3]!==0&&(S[0]=(S[0]/S[3]+1)*.5*A[2],S[1]=(1-S[1]/S[3])*.5*A[3],S[2]/=S[3],S[0]+=A[0],S[1]+=A[1]),S}getLabelAtPoint(u){log.debug("screenPoint",u);const m=this.getLegendPanelHeight(),A=this.getLegendPanelWidth(),S=this.gl.canvas.width-A;let v=(this.canvas.height-m)/2;if(log.debug("panelrect",S,v,S+A,v+m),u[0]S+A||u[1]>v+m)return null;const D=this.opts.textHeight*Math.min(this.gl.canvas.height,this.gl.canvas.width)*1,R=this.getAllLabels();for(const L of R){const P=this.opts.textHeight*this.gl.canvas.height*L.style.textScale,d=this.textHeight(P,L.text);if(u[1]>=v&&u[1]<=v+d+D/2)return L;v+=d,v+=D/2}return null}drawLabelLine(u,m,A,S,v=!1){const w=Array.isArray(u.points)&&Array.isArray(u.points[0])?u.points:[u.points];for(const D of w){const R=this.calculateScreenPoint(D,A,S);v?this.drawDottedLine([...m,R[0],R[1]],u.style.lineWidth,u.style.lineColor):this.draw3DLine(m,[R[0],R[1],R[2]],u.style.lineWidth,u.style.lineColor)}}draw3DLabel(u,m,A,S,v=0,w,D=!1){const R=u.text,L=m[0],P=m[1],d=this.opts.textHeight*Math.min(this.gl.canvas.height,this.gl.canvas.width)*1,E=this.textHeight(u.style.textScale,R)*d;if(u.style.lineWidth>0&&Array.isArray(u.points)&&this.drawLabelLine(u,[L,P+E],A,S,D),u.style.bulletScale){const N=u.style.bulletScale*E,q=E-N,z=P+q/2+N/2,e0=L+(v-N)/2;this.drawCircle([e0,z,N,N],u.style.bulletColor)}let e=L;if(u.style.textAlignment!=="left"){const N=this.textWidth(u.style.textScale,u.text)*d;if(u.style.textAlignment==="right")e=L+w-d*1.5-N;else{const q=w-(v||d);e+=(q-N)/2}}else e+=v;this.drawText([e,P],R,u.style.textScale,u.style.textColor)}draw3DLabels(u,m,A=!1){const S=this.getAllLabels();if(!this.opts.showLegend||S.length===0)return;if(!this.canvas)throw new Error("canvas undefined");const v=this.gl;v.disable(v.CULL_FACE),v.viewport(0,0,this.canvas.width,this.canvas.height);const D=this.opts.textHeight*Math.min(this.gl.canvas.height,this.gl.canvas.width)*1,R=this.getBulletMarginWidth(),L=this.getLegendPanelHeight(),P=this.getLegendPanelWidth(),d=v.canvas.width-P;let E=(this.canvas.height-L)/2;this.drawRect([v.canvas.width-P,E,P-D,L],this.opts.legendBackgroundColor);const e=v.getParameter(v.BLEND),N=v.getParameter(v.DEPTH_FUNC);A||(v.disable(v.BLEND),v.depthFunc(v.GREATER));for(const q of S){this.draw3DLabel(q,[d,E],u,m,R,P,A);const z=this.opts.textHeight*this.gl.canvas.height*q.style.textScale,e0=this.textHeight(z,q.text);E+=e0,E+=D/2}A||(v.depthFunc(N),e&&v.enable(v.BLEND))}draw3D(u=[0,0,0,0],m=null,A=null,S=null,v=null,w=0){const D=v!==null;this.setPivot3D(),D||(v=this.scene.renderAzimuth,w=this.scene.renderElevation);const R=this.gl;m===null&&([m,A,S]=this.calculateMvpMatrix(null,u,v,w));let L=[...u];if(u[2]===0||u[3]===0?(u=[0,0,R.canvas.width,R.canvas.height],L=[...u],this.screenSlices.push({leftTopWidthHeight:u,axCorSag:4,sliceFrac:0,AxyzMxy:[],leftTopMM:[],fovMM:[isRadiological(A),0]})):(this.screenSlices.push({leftTopWidthHeight:u.slice(),axCorSag:4,sliceFrac:0,AxyzMxy:[],leftTopMM:[],fovMM:[isRadiological(A),0]}),u[1]=R.canvas.height-u[3]-u[1]),R.enable(R.DEPTH_TEST),R.depthFunc(R.ALWAYS),R.depthMask(!0),R.clearDepth(0),this.draw3DLabels(m,L,!1),R.viewport(u[0],u[1],u[2],u[3]),this.volumes.length>0&&(this.updateInterpolation(0,!0),this.updateInterpolation(1,!0),this.drawImage3D(m,v,w)),this.updateInterpolation(0),this.updateInterpolation(1),D||this.drawCrosshairs3D(!0,1,m),this.drawMesh3D(!0,1,m,A,S),this.uiData.mouseDepthPicker){this.depthPicker(u,m),this.createOnLocationChange(),this.draw3D(u,m,A,S,v,w);return}this.opts.meshXRay>0&&this.drawMesh3D(!1,this.opts.meshXRay,m,A,S),this.draw3DLabels(m,L,!1),R.viewport(u[0],u[1],u[2],u[3]),D||this.drawCrosshairs3D(!1,.15,m),R.viewport(0,0,R.canvas.width,R.canvas.height),this.drawOrientationCube(u,v,w);const P="azimuth: "+this.scene.renderAzimuth.toFixed(0)+" elevation: "+this.scene.renderElevation.toFixed(0);return this.readyForSync=!0,this.sync(),this.draw3DLabels(m,L,!0),P}drawMesh3D(u=!0,m=1,A,S,v){if(this.meshes.length<1)return;const w=this.gl;A||([A,S,v]=this.calculateMvpMatrix(this.volumeObject3D,void 0,this.scene.renderAzimuth,this.scene.renderElevation)),w.enable(w.DEPTH_TEST),w.blendFunc(w.SRC_ALPHA,w.ONE_MINUS_SRC_ALPHA),w.disable(w.BLEND),w.depthFunc(w.GREATER),w.disable(w.CULL_FACE),u?(w.disable(w.BLEND),w.depthFunc(w.GREATER)):(w.enable(w.BLEND),w.depthFunc(w.ALWAYS),w.enable(w.CULL_FACE)),w.cullFace(w.BACK);let D=this.meshShaders[0].shader,R=!1;for(let L=0;L=3&&this.meshes[L].fiberRadius>0||(w.bindVertexArray(this.meshes[L].vaoFiber),w.drawElements(w.LINE_STRIP,this.meshes[L].indexCount,w.UNSIGNED_INT,0),w.bindVertexArray(this.unusedVAO)));w.enable(w.BLEND),w.depthFunc(w.ALWAYS),this.readyForSync=!0}drawCrosshairs3D(u=!0,m=1,A=null,S=!1,v=!0){if(!this.opts.show3Dcrosshair&&!S||this.opts.crosshairWidth<=0&&S)return;const w=this.gl,D=this.frac2mm(this.scene.crosshairPos,0,v);if(this.crosshairs3D===null||this.crosshairs3D.mm[0]!==D[0]||this.crosshairs3D.mm[1]!==D[1]||this.crosshairs3D.mm[2]!==D[2]){this.crosshairs3D!==null&&(w.deleteBuffer(this.crosshairs3D.indexBuffer),w.deleteBuffer(this.crosshairs3D.vertexBuffer));const[P,d,E]=this.sceneExtentsMinMax(v);let e=1;if(this.volumes.length>0){if(!this.back)throw new Error("back undefined");e=.5*Math.min(Math.min(this.back.pixDims[1],this.back.pixDims[2]),this.back.pixDims[3])}else(E[0]<50||E[0]>1e3)&&(e=E[0]*.02);e*=this.opts.crosshairWidth,this.crosshairs3D=NiivueObject3D.generateCrosshairs(this.gl,1,D,P,d,e,20,this.opts.crosshairGap),this.crosshairs3D.mm=D}if(!this.surfaceShader)throw new Error("surfaceShader undefined");const R=this.surfaceShader;R.use(this.gl),A==null&&([A]=this.calculateMvpMatrix(this.crosshairs3D,void 0,this.scene.renderAzimuth,this.scene.renderElevation)),w.uniformMatrix4fv(R.uniforms.mvpMtx,!1,A),w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,this.crosshairs3D.indexBuffer),w.enable(w.DEPTH_TEST);const L=[...this.opts.crosshairColor];u?(w.disable(w.BLEND),w.depthFunc(w.GREATER)):(w.enable(w.BLEND),w.blendFunc(w.SRC_ALPHA,w.ONE_MINUS_SRC_ALPHA),w.depthFunc(w.ALWAYS)),L[3]=m,w.uniform4fv(R.uniforms.surfaceColor,L),w.bindVertexArray(this.crosshairs3D.vao),w.drawElements(w.TRIANGLES,this.crosshairs3D.indexCount,w.UNSIGNED_INT,0),w.bindVertexArray(this.unusedVAO)}mm2frac(u,m=0,A=!1){if(this.volumes.length<1){const S=fromValues$2(.1,.5,.5),[v,w,D]=this.sceneExtentsMinMax();return S[0]=(u[0]-v[0])/D[0],S[1]=(u[1]-v[1])/D[1],S[2]=(u[2]-v[2])/D[2],isFinite(S)||(isFinite(S[0])||(S[0]=.5),isFinite(S[1])||(S[1]=.5),isFinite(S[2])||(S[2]=.5),this.meshes.length<1&&log.error("mm2frac() not finite: objects not (yet) loaded.")),S}return this.volumes[m].convertMM2Frac(u,A||this.opts.isSliceMM)}vox2frac(u,m=0){return this.volumes[m].convertVox2Frac(u)}frac2vox(u,m=0){return this.volumes.length<=m?[0,0,0]:this.volumes[m].convertFrac2Vox(u)}moveCrosshairInVox(u,m,A){const S=this.frac2vox(this.scene.crosshairPos);S[0]+=u,S[1]+=m,S[2]+=A,S[0]=clamp(S[0],0,this.volumes[0].dimsRAS[1]-1),S[1]=clamp(S[1],0,this.volumes[0].dimsRAS[2]-1),S[2]=clamp(S[2],0,this.volumes[0].dimsRAS[3]-1),this.scene.crosshairPos=this.vox2frac(S),this.createOnLocationChange(),this.drawScene()}frac2mm(u,m=0,A=!1){const S=fromValues$1(u[0],u[1],u[2],1);if(this.volumes.length>0)return this.volumes[m].convertFrac2MM(u,A||this.opts.isSliceMM);{const[v,w]=this.sceneExtentsMinMax(),D=(R,L,P)=>R*(1-P)+L*P;S[0]=D(v[0],w[0],u[0]),S[1]=D(v[1],w[1],u[1]),S[2]=D(v[2],w[2],u[2])}return S}screenXY2TextureFrac(u,m,A,S=!0){const v=fromValues$2(-1,-1,-1),w=this.screenSlices[A].axCorSag;if(w>2)return v;const D=this.screenSlices[A].leftTopWidthHeight.slice();let R=!1;D[2]<0&&(R=!0,D[0]+=D[2],D[2]=-D[2]);let L=(u-D[0])/D[2];R&&(L=1-L);const P=1-(m-D[1])/D[3];if(L<0||L>1||P<0||P>1||this.screenSlices[A].AxyzMxy.length<4)return v;let d=fromValues$2(0,0,0);d[0]=this.screenSlices[A].leftTopMM[0]+L*this.screenSlices[A].fovMM[0],d[1]=this.screenSlices[A].leftTopMM[1]+P*this.screenSlices[A].fovMM[1];const E=this.screenSlices[A].AxyzMxy;d[2]=E[2]+E[4]*(d[1]-E[1])-E[3]*(d[0]-E[0]),w===1&&(d=swizzleVec3(d,[0,2,1])),w===2&&(d=swizzleVec3(d,[2,0,1]));const e=this.mm2frac(d);return S&&(e[0]<0||e[0]>1||e[1]<0||e[1]>1||e[2]<0||e[2]>1)?v:e}canvasPos2frac(u){for(let m=0;m=0)return A}return[-1,-1,-1]}scaleSlice(u,m,A=0,S=0){const v=this.effectiveCanvasWidth()-A,w=this.effectiveCanvasHeight()-S;let D=v/u;m*D>w&&(D=w/m);const R=u*D,L=m*D;return[(v-R)*.5,(w-L)*.5,R,L,D]}drawThumbnail(){if(!this.bmpShader)throw new Error("bmpShader undefined");this.bmpShader.use(this.gl),this.gl.uniform2f(this.bmpShader.uniforms.canvasWidthHeight,this.gl.canvas.width,this.gl.canvas.height);let u=this.gl.canvas.height,m=this.gl.canvas.height*this.bmpTextureWH;m>this.gl.canvas.width&&(u=this.gl.canvas.width/this.bmpTextureWH,m=this.gl.canvas.width),this.gl.uniform4f(this.bmpShader.uniforms.leftTopWidthHeight,0,0,m,u),this.gl.bindVertexArray(this.genericVAO),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4),this.gl.bindVertexArray(this.unusedVAO)}drawLine(u,m=1,A=[1,0,0,-1]){if(this.gl.bindVertexArray(this.genericVAO),!this.lineShader)throw new Error("lineShader undefined");this.lineShader.use(this.gl),A[3]<0&&(A=this.opts.crosshairColor),this.gl.uniform4fv(this.lineShader.uniforms.lineColor,A),this.gl.uniform2fv(this.lineShader.uniforms.canvasWidthHeight,[this.gl.canvas.width,this.gl.canvas.height]),this.gl.uniform1f(this.lineShader.uniforms.thickness,m),this.gl.uniform4fv(this.lineShader.uniforms.startXYendXY,u),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4),this.gl.bindVertexArray(this.unusedVAO)}draw3DLine(u,m,A=1,S=[1,0,0,-1]){if(this.gl.bindVertexArray(this.genericVAO),!this.line3DShader)throw new Error("line3DShader undefined");this.line3DShader.use(this.gl),S[3]<0&&(S=this.opts.crosshairColor),this.gl.uniform4fv(this.line3DShader.uniforms.lineColor,S),this.gl.uniform2fv(this.line3DShader.uniforms.canvasWidthHeight,[this.gl.canvas.width,this.gl.canvas.height]),this.gl.uniform1f(this.line3DShader.uniforms.thickness,A),this.gl.uniform2fv(this.line3DShader.uniforms.startXY,u),this.gl.uniform3fv(this.line3DShader.uniforms.endXYZ,m),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4),this.gl.bindVertexArray(this.unusedVAO)}drawDottedLine(u,m=1,A=[1,0,0,-1]){if(this.gl.bindVertexArray(this.genericVAO),!this.lineShader)throw new Error("lineShader undefined");this.lineShader.use(this.gl);const S=A[3]<0?[...this.opts.crosshairColor]:[...A];S[3]=.3;const v=fromValues(u[2]-u[0],u[3]-u[1]),w=length(v);normalize(v,v);const R=this.opts.textHeight*Math.min(this.gl.canvas.height,this.gl.canvas.width)*1;scale(v,v,R/2);const L=length(v);let P=Math.floor(w/L);w%L&&P++;const d=[u[0],u[1]];this.gl.uniform4fv(this.lineShader.uniforms.lineColor,S),this.gl.uniform2fv(this.lineShader.uniforms.canvasWidthHeight,[this.gl.canvas.width,this.gl.canvas.height]),this.gl.uniform1f(this.lineShader.uniforms.thickness,m);for(let E=0;E0&&m===0){const e=D,N=1;for(let q=0;q0&&m===1){const e=D,N=2;for(let q=0;q0&&m===2){const e=D,N=2;for(let q=0;q0&&m===0){const e=D,N=0;for(let q=0;q0&&m===1){const e=D,N=0;for(let q=0;q0&&m===2){const e=D,N=1;for(let q=0;q0){const L=w.leftTopWidthHeight.slice();let P=2;m===0&&(P=1);const d=this.frac2mm([.5,.5,.5]);for(let E=0;E0){const L=w.leftTopWidthHeight.slice(),P=w.fovMM[0]<0;let d=0;m===2&&(d=1);const E=this.frac2mm([.5,.5,.5]);for(let e=0;e"u"){if(this.meshes.length>0){this.screenSlices=[],this.opts.sliceType=4,this.draw3D(),this.opts.isColorbar&&this.drawColorbar();return}this.drawLoadingText(this.loadingText);return}if(this.back===null)return;if(this.uiData.isDragging&&this.scene.clipPlaneDepthAziElev[0]<1.8&&this.inRenderTile(this.uiData.dragStart[0],this.uiData.dragStart[1])>=0){const v=this.uiData.dragStart[0]-this.uiData.dragEnd[0],w=this.uiData.dragStart[1]-this.uiData.dragEnd[1],D=this.uiData.dragClipPlaneStartDepthAziElev.slice();if(D[1]-=v,D[1]=D[1]%360,D[2]+=w,D[1]!==this.scene.clipPlaneDepthAziElev[1]||D[2]!==this.scene.clipPlaneDepthAziElev[2])return this.scene.clipPlaneDepthAziElev=D,this.setClipPlane(this.scene.clipPlaneDepthAziElev)}if(this.sliceMosaicString.length<1&&this.opts.sliceType===4){this.opts.isColorbar&&this.reserveColorbarPanel(),this.screenSlices=[],this.draw3D(),this.opts.isColorbar&&this.drawColorbar();return}this.opts.isColorbar&&this.reserveColorbarPanel();const m=this.getMaxVols(),A=this.opts.sliceType===3&&m>1&&this.graph.autoSizeMultiplanar&&this.graph.opacity>0;if(this.sliceMosaicString.length>0)this.drawMosaic(this.sliceMosaicString);else if(this.gl.viewport(0,0,this.gl.canvas.width,this.gl.canvas.height),this.screenSlices=[],this.opts.sliceType===0)this.draw2D([0,0,0,0],0);else if(this.opts.sliceType===1)this.draw2D([0,0,0,0],1);else if(this.opts.sliceType===2)this.draw2D([0,0,0,0],2);else{const v=isFinite(this.drawPenLocation[0])&&this.opts.drawingEnabled,{volScale:w}=this.sliceScale();typeof this.opts.multiplanarPadPixels!="number"&&log.debug("multiplanarPadPixels must be numeric");const D=parseFloat(`${this.opts.multiplanarPadPixels}`),R=this.scaleSlice(w[0]+w[1],w[1]+w[2],D*1,D*1),L=Math.max(Math.max(w[1],w[2]),w[0]),P=this.scaleSlice(w[0]+w[0]+w[1],Math.max(w[1],w[2]),D*2),d=this.scaleSlice(w[0]+w[0]+w[1]+L,Math.max(w[1],w[2]),D*3),E=this.scaleSlice(L,w[1]+w[2]+w[2],0,D*2),e=this.scaleSlice(L,w[1]+w[2]+w[2]+L,0,D*3);let N=!v&&(m<2||!A),q=!1,z=!1,e0=!1;if(this.opts.multiplanarLayout===1?q=!0:this.opts.multiplanarLayout===2?z=!0:this.opts.multiplanarLayout===3?e0=!0:E[4]>P[4]&&E[4]>R[4]?q=!0:P[4]>R[4]?e0=!0:z=!0,q){let H=E;this.opts.multiplanarForceRender||e[4]>=E[4]?H=e:N=!1;const j=w[0]*H[4],y=w[1]*H[4],Y=w[2]*H[4],G=L*H[4];this.draw2D([H[0],H[1],j,y],0),this.draw2D([H[0],H[1]+y+D,j,Y],1),this.draw2D([H[0],H[1]+y+D+Y+D,y,Y],2),N&&this.draw3D([H[0],H[1]+y+Y+Y+D*3,G,G])}else if(e0){let H=P;this.opts.multiplanarForceRender||d[4]>=P[4]?H=d:N=!1;const j=w[0]*H[4],y=w[1]*H[4],Y=w[2]*H[4];this.draw2D([H[0],H[1],j,y],0),this.draw2D([H[0]+j+D,H[1],j,Y],1),this.draw2D([H[0]+j+j+D*2,H[1],y,Y],2),N&&this.draw3D([H[0]+j+j+y+D*3,H[1],H[3],H[3]])}else if(z){const H=R,j=w[0]*H[4],y=w[1]*H[4],Y=w[2]*H[4];this.draw2D([H[0],H[1]+Y+D,j,y],0),this.draw2D([H[0],H[1],j,Y],1),this.draw2D([H[0]+j+D,H[1],y,Y],2),N&&this.draw3D([H[0]+j+D,H[1]+Y+D,y,y])}}if(this.opts.isRuler&&this.drawRuler(),this.opts.isColorbar&&this.drawColorbar(),A&&this.drawGraph(),this.uiData.isDragging){if(this.uiData.mouseButtonCenterDown){this.dragForCenterButton([this.uiData.dragStart[0],this.uiData.dragStart[1],this.uiData.dragEnd[0],this.uiData.dragEnd[1]]);return}if(this.opts.dragMode===4){this.dragForSlicer3D([this.uiData.dragStart[0],this.uiData.dragStart[1],this.uiData.dragEnd[0],this.uiData.dragEnd[1]]);return}if(this.opts.dragMode===3){this.dragForPanZoom([this.uiData.dragStart[0],this.uiData.dragStart[1],this.uiData.dragEnd[0],this.uiData.dragEnd[1]]);return}if(this.inRenderTile(this.uiData.dragStart[0],this.uiData.dragStart[1])>=0)return;if(this.opts.dragMode===2){this.drawMeasurementTool([this.uiData.dragStart[0],this.uiData.dragStart[1],this.uiData.dragEnd[0],this.uiData.dragEnd[1]]);return}const v=Math.abs(this.uiData.dragStart[0]-this.uiData.dragEnd[0]),w=Math.abs(this.uiData.dragStart[1]-this.uiData.dragEnd[1]);this.drawSelectionBox([Math.min(this.uiData.dragStart[0],this.uiData.dragEnd[0]),Math.min(this.uiData.dragStart[1],this.uiData.dragEnd[1]),v,w])}const S=this.frac2mm([this.scene.crosshairPos[0],this.scene.crosshairPos[1],this.scene.crosshairPos[2]]);return u=S[0].toFixed(2)+"×"+S[1].toFixed(2)+"×"+S[2].toFixed(2),this.readyForSync=!0,this.sync(),u}drawScene(){if(this.isBusy){this.needsRefresh=!0;return}this.isBusy=!1,this.needsRefresh=!1;let u=this.drawSceneCore();return this._gl!==null&&this.gl.finish(),this.needsRefresh&&(u=this.drawScene()),u}get gl(){if(!this._gl)throw new Error("unable to get WebGL context. Maybe the browser doesn't support WebGL2.");return this._gl}set gl(u){this._gl=u}};async function main(){async function T(P){await v.loadFromFile(P[0]),v.setColormap(v.volumes[2].id,"red"),lesionSlider.oninput()}function u(P,d,E){let e=E-d,N=(P-d)/e;return Math.min(Math.max(N,0),1)}function m(){if(v.volumes.length!==3){window.alert('Please reload the page and open lesions with the "Open Lesion Map" button');return}let P=v.volumes[1].img,d=v.volumes[2].img,E=d.length;if(E!==P.length){window.alert("Lesion must precisely match mask");return}let e=0,N=0,q=0;const z=5,e0=Math.floor(w.length/z);let H=new Float64Array(E);for(let o0=0;o00&&N++,d[o0]>0&&P[o0]>0&&e++,P[o0]>1&&(H[q++]=d[o0]);if(e0!==q){window.alert("PCA and mask have different number of elements");return}let j=new Float64Array(z);for(let o0=0;o0ie+S0[Le]*ke,0);ee+=p0,Q+=ee}let f=Q/L.length;return[y,Y,G,f]}openBtn.onclick=async function(){let P=document.createElement("input");P.style.display="none",P.type="file",document.body.appendChild(P),await v.removeVolume(v.volumes[2]),P.onchange=async function(d){await T(d.target.files)},P.click()},predictBtn.onclick=function(){const[P,d,E,e]=m(),N=`Given ${d}ml lesion (with ${E} in core neglect voxels), and ${P} acute CoC, predicted recovery is ${e}`;window.alert(N)},aboutBtn.onclick=function(){window.alert("Drag and drop NIfTI images. Use pulldown menu to choose brainchop model")};function A(P){document.getElementById("intensity").innerHTML=P.string}const S={backColor:[.4,.4,.4,1],show3Dcrosshair:!0,onLocationChange:A,dragAndDropEnabled:!1};maskSlider.oninput=function(){v.setOpacity(1,this.value/255)},lesionSlider.oninput=function(){v.setOpacity(2,this.value/255)};const v=new Niivue(S);v.attachToCanvas(gl1);const w=(await v.loadFromUrl("./pca_values_coeff.nii.gz")).img,D=(await v.loadFromUrl("./pca_values_mu.nii.gz")).img;async function R(){const P=(await v.loadFromUrl("./models_5x10_diff.nii.gz")).img;let d=0;const E=P[d++],e=[];for(let N=0;N`}saveHTML(u="untitled.html",m="gl1",A){const S=this.generateHTML(m,A);NVUtilities.download(S,u,"application/html")}json(){return this.document.opts=this.opts,this.document.scene=this.scene,this.document.volumes=this.volumes,this.document.meshes=this.meshes,this.drawScene(),this.document.previewImageDataURL=this.canvas.toDataURL(),this.document.json()}async saveDocument(u="untitled.nvd"){this.document.title=u,log.debug("saveDocument",this.volumes[0]),this.drawScene(),this.document.previewImageDataURL=this.canvas.toDataURL(),this.document.volumes=this.volumes,this.document.meshes=this.meshes,this.document.download(u)}async loadVolumes(u){if(this.loadingText="loading...",this.drawScene(),this.thumbnailVisible)return this.deferredVolumes=u,this;this.volumes=[],this.gl.clearColor(0,0,0,1),this.gl.clear(this.gl.COLOR_BUFFER_BIT);for(let m=0;m0&&(v[Y]=L);const P=this.r16Tex(null,TEXTURE12_GC_STRENGTH0,this.back.dims,v),d=this.r16Tex(null,TEXTURE13_GC_STRENGTH1,this.back.dims,v);m.bindVertexArray(this.genericVAO);const E=this.growCutShader;E.use(m);const e=128;m.uniform1i(E.uniforms.finalPass,0),m.uniform1i(E.uniforms.backTex,11);for(let Y=0;Yu[0]&&(D=1),m[1]>u[1]&&(R=1),m[2]>u[2]&&(L=1);let P=u[0],d=u[1],E=u[2];const e=m[0],N=m[1],q=m[2];if(S>=v&&S>=w){let z=2*v-S,e0=2*w-S;for(;P!==e;)P+=D,z>=0&&(d+=R,z-=2*S),e0>=0&&(E+=L,e0-=2*S),z+=2*v,e0+=2*w,this.drawPt(P,d,E,A)}else if(v>=S&&v>=w){let z=2*S-v,e0=2*w-v;for(;d!==N;)d+=R,z>=0&&(P+=D,z-=2*v),e0>=0&&(E+=L,e0-=2*v),z+=2*S,e0+=2*w,this.drawPt(P,d,E,A)}else{let z=2*v-w,e0=2*S-w;for(;E!==q;)E+=L,z>=0&&(d+=R,z-=2*w),e0>=0&&(P+=D,e0-=2*w),z+=2*v,e0+=2*S,this.drawPt(P,d,E,A)}}drawFloodFillCore(u,m,A=6){var P;if(!((P=this.back)!=null&&P.dims))throw new Error("back.dims undefined");const S=[this.back.dims[1],this.back.dims[2],this.back.dims[3]],v=S[0],w=v*S[1];function D(d){return d[0]+d[1]*v+d[2]*w}function R(d){const E=Math.floor(d/w),e=Math.floor((d-E*w)/v);return[Math.floor(d%v),e,E]}const L=[];for(L.push(m),u[m]=2;L.length>0;){let d=function(N){const q=e.slice();if(q[0]+=N[0],q[1]+=N[1],q[2]+=N[2],q[0]<0||q[1]<0||q[2]<0||q[0]>=S[0]||q[1]>=S[1]||q[2]>=S[2])return;const z=D(q);u[z]===1&&(u[z]=2,L.push(z))};const E=L[0];L.shift();const e=R(E);d([0,0,-1]),d([0,0,1]),d([0,-1,0]),d([0,1,0]),d([-1,0,0]),d([1,0,0]),!(A<=6)&&(d([-1,-1,0]),d([1,1,0]),d([-1,1,0]),d([1,1,0]),d([0,-1,-1]),d([0,1,-1]),d([-1,0,-1]),d([1,0,-1]),d([0,-1,1]),d([0,1,1]),d([-1,0,1]),d([1,0,1]),!(A<=18)&&(d([-1,-1,-1]),d([1,-1,-1]),d([-1,1,-1]),d([1,1,-1]),d([-1,-1,1]),d([1,-1,1]),d([-1,1,1]),d([1,1,1])))}}drawFloodFill(u,m=0,A=0,S=NaN,v=NaN,w=6){var q;if(!this.drawBitmap)throw new Error("drawBitmap undefined");if(!((q=this.back)!=null&&q.dims))throw new Error("back.dims undefined");m=Math.abs(m);const D=[this.back.dims[1],this.back.dims[2],this.back.dims[3]];if(u[0]<0||u[1]<0||u[2]<0||u[0]>=D[0]||u[1]>=D[1]||u[2]>=D[2])return;const R=D[0],L=R*D[1],P=L*D[2],d=this.drawBitmap.slice();if(d.length!==L*D[2])return;function E(z){return z[0]+z[1]*R+z[2]*L}const e=E(u),N=d[e];if(N===m){A!==0?log.debug("drawFloodFill selected voxel is not part of a drawing"):log.debug("drawFloodFill selected voxel is already desired color");return}for(let z=1;z=H&&z[j]<=e0&&(d[j]=1);this.drawFloodFillCore(d,e,w),m=N}for(let z=1;zq[0]&&(j=1),z[1]>q[1]&&(y=1);let Y=q[0],G=q[1];const J=z[0],i0=z[1];if(e0>=H){let Q=2*H-e0;for(;Y!==J;)Y+=j,Q>=0&&(G+=y,Q-=2*e0),Q+=2*H,w[Y+G*v[0]]=D}else{let Q=2*e0-H;for(;G!==i0;)G+=y,Q>=0&&(Y+=j,Q-=2*H),Q+=2*e0,w[Y+G*v[0]]=D}}const L=[this.drawPenFillPts[0][A],this.drawPenFillPts[0][S]];let P=L;for(let q=1;q=v[0]||q[1]>=v[1])return;const z=q[0]+q[1]*v[0];w[z]===0&&(d.push(q),w[z]=2)}for(let q=0;q0;){const q=d.shift();E([q[0]-1,q[1]]),E([q[0]+1,q[1]]),E([q[0],q[1]-1]),E([q[0],q[1]+1])}D=this.opts.penValue;const e=this.drawPenFillPts[0][3-(A+S)];if(!this.drawBitmap)throw new Error("drawBitmap undefined");if(m===0){const q=e*v[0]*v[1];for(let z=0;z0){const q=this.drawBitmap.length,z=decodeRLE(this.drawUndoBitmaps[this.currentDrawUndoBitmap],q);for(let e0=0;e0{const v=new Image;v.onload=()=>{if(!this.bmpShader)return;let w;m===4?(this.bmpTexture!==null&&this.gl.deleteTexture(this.bmpTexture),this.bmpTexture=this.gl.createTexture(),w=this.bmpTexture,this.bmpTextureWH=v.width/v.height,this.gl.activeTexture(TEXTURE4_THUMBNAIL),this.bmpShader.use(this.gl),this.gl.uniform1i(this.bmpShader.uniforms.bmpTexture,4)):m===5?(this.gl.activeTexture(TEXTURE5_MATCAP),this.matCapTexture!==null&&this.gl.deleteTexture(this.matCapTexture),this.matCapTexture=this.gl.createTexture(),w=this.matCapTexture):(this.fontShader.use(this.gl),this.gl.activeTexture(TEXTURE3_FONT),this.gl.uniform1i(this.fontShader.uniforms.fontTexture,3),this.fontTexture!==null&&this.gl.deleteTexture(this.fontTexture),this.fontTexture=this.gl.createTexture(),w=this.fontTexture),this.gl.bindTexture(this.gl.TEXTURE_2D,w),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,v),A(w),m!==4&&this.drawScene()},v.onerror=S,this.requestCORSIfNotSameOrigin(v,u),v.src=u})}async loadFontTexture(u){return this.loadPngAsTexture(u,3)}async loadBmpTexture(u){return this.loadPngAsTexture(u,4)}async loadMatCapTexture(u){return this.loadPngAsTexture(u,5)}initFontMets(){if(!this.fontMetrics)throw new Error("fontMetrics undefined");this.fontMets={distanceRange:this.fontMetrics.atlas.distanceRange,size:this.fontMetrics.atlas.size,mets:{}};for(let A=0;A<256;A++)this.fontMets.mets[A]={xadv:0,uv_lbwh:[0,0,0,0],lbwh:[0,0,0,0]};const u=this.fontMetrics.atlas.width,m=this.fontMetrics.atlas.height;for(let A=0;A=this.meshes.length){log.debug("Unable to change shader until mesh is loaded (maybe you need async)");return}this.meshes[S].meshShaderIndex=A,this.updateGLVolume(),this.onMeshShaderChanged(S,A)}createCustomMeshShader(u,m="Custom"){if(!u)throw new Error("Need fragment shader");const A=this.meshShaderNameToNumber(m);A>=0&&(this.gl.deleteProgram(this.meshShaders[A].shader.program),this.meshShaders.splice(A,1));const S=new Shader(this.gl,vertMeshShader,u);return S.use(this.gl),{Name:m,Frag:u,shader:S}}setCustomMeshShader(u="",m="Custom"){const A=this.createCustomMeshShader(u,m);return this.meshShaders.push(A),this.onCustomMeshShaderAdded(u,m),this.meshShaders.length-1}meshShaderNames(u=!0){const m=[];for(let A=0;A0&&(await this.loadBmpTexture(this.opts.thumbnail),this.thumbnailVisible=!0),this.updateGLVolume(),this.initialized=!0,this.resizeListener(),this.drawScene(),this}gradientGL(u){const m=this.gl,A=[0,0,0,0,1,0,1,0,0,1,1,0],S=m.createVertexArray();m.bindVertexArray(S);const v=m.createBuffer();m.bindBuffer(m.ARRAY_BUFFER,v),m.bufferData(m.ARRAY_BUFFER,new Float32Array(A),m.STATIC_DRAW),m.enableVertexAttribArray(0),m.vertexAttribPointer(0,3,m.FLOAT,!1,0,0);const w=m.createFramebuffer();m.bindFramebuffer(m.FRAMEBUFFER,w),m.disable(m.CULL_FACE),m.viewport(0,0,u.dims[1],u.dims[2]),m.disable(m.BLEND);const D=this.rgbaTex(null,TEXTURE8_GRADIENT_TEMP,u.dims),R=this.blurShader;R.use(m),m.activeTexture(TEXTURE0_BACK_VOL),m.bindTexture(m.TEXTURE_3D,this.volumeTexture);const L=.7;m.uniform1i(R.uniforms.intensityVol,0),m.uniform1f(R.uniforms.dX,L/u.dims[1]),m.uniform1f(R.uniforms.dY,L/u.dims[2]),m.uniform1f(R.uniforms.dZ,L/u.dims[3]),m.bindVertexArray(S);for(let E=0;E0&&(this.furthestVertexFromOrigin=this.volumeObject3D.furthestVertexFromOrigin),this.meshes)for(let A=0;A0)for(let J=0;J0&&u.frame4D1&&v===0)return;let w=null;if(!this.back)throw new Error("back undefined");this.gl.bindVertexArray(this.unusedVAO),this.crosshairs3D&&(this.crosshairs3D.mm[0]=NaN);let D=clone$2(u.toRAS);if(m===0){this.volumeObject3D=u.toNiivueObject3D(this.VOLUME_ID,this.gl),invert(D,D),this.back.matRAS=u.matRAS,this.back.dims=u.dimsRAS,this.back.pixDims=u.pixDimsRAS,w=this.rgbaTex(this.volumeTexture,TEXTURE0_BACK_VOL,u.dimsRAS);const{volScale:G,vox:J}=this.sliceScale(!0);if(this.volScale=G,this.vox=J,this.volumeObject3D.scale=G,!this.renderShader)throw new Error("renderShader undefined");this.renderShader.use(this.gl),this.gl.uniform3fv(this.renderShader.uniforms.texVox,J),this.gl.uniform3fv(this.renderShader.uniforms.volScale,G);const i0=this.pickingImageShader;i0.use(this.gl),this.gl.uniform1i(i0.uniforms.volume,0),this.gl.uniform1i(i0.uniforms.colormap,1),this.gl.uniform1i(i0.uniforms.overlay,2),this.gl.uniform3fv(i0.uniforms.volScale,G),log.debug(this.volumeObject3D)}else{((Y=this.back)==null?void 0:Y.dims)===void 0&&log.error("Fatal error: Unable to render overlay: background dimensions not defined!");const G=this.mm2frac(u.mm000,0,!0);let J=this.mm2frac(u.mm100,0,!0),i0=this.mm2frac(u.mm010,0,!0),Q=this.mm2frac(u.mm001,0,!0);J=subtract$1(J,J,G),i0=subtract$1(i0,i0,G),Q=subtract$1(Q,Q,G),D=fromValues$3(J[0],i0[0],Q[0],G[0],J[1],i0[1],Q[1],G[1],J[2],i0[2],Q[2],G[2],0,0,0,1),invert(D,D),m===1?(w=this.rgbaTex(this.overlayTexture,TEXTURE2_OVERLAY_VOL,this.back.dims),this.overlayTexture=w,this.overlayTextureID=w):w=this.overlayTextureID}const R=this.gl.createFramebuffer();this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,R),this.gl.disable(this.gl.CULL_FACE),this.gl.viewport(0,0,this.back.dims[1],this.back.dims[2]),this.gl.disable(this.gl.BLEND);const L=this.gl.createTexture();this.gl.activeTexture(TEXTURE9_ORIENT),this.gl.bindTexture(this.gl.TEXTURE_3D,L),this.gl.texParameteri(this.gl.TEXTURE_3D,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.gl.TEXTURE_3D,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.gl.TEXTURE_3D,this.gl.TEXTURE_WRAP_R,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_3D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_3D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,1);let P=this.orientShaderU;if(!A)throw new Error("hdr undefined");if(!S)throw new Error("img undefined");if(A.datatypeCode===2)A.intent_code===1002&&(P=this.orientShaderAtlasU),this.gl.texStorage3D(this.gl.TEXTURE_3D,1,this.gl.R8UI,A.dims[1],A.dims[2],A.dims[3]),this.gl.texSubImage3D(this.gl.TEXTURE_3D,0,0,0,0,A.dims[1],A.dims[2],A.dims[3],this.gl.RED_INTEGER,this.gl.UNSIGNED_BYTE,S);else if(A.datatypeCode===4)P=this.orientShaderI,A.intent_code===1002&&(P=this.orientShaderAtlasI),this.gl.texStorage3D(this.gl.TEXTURE_3D,1,this.gl.R16I,A.dims[1],A.dims[2],A.dims[3]),this.gl.texSubImage3D(this.gl.TEXTURE_3D,0,0,0,0,A.dims[1],A.dims[2],A.dims[3],this.gl.RED_INTEGER,this.gl.SHORT,S);else if(A.datatypeCode===16)this.gl.texStorage3D(this.gl.TEXTURE_3D,1,this.gl.R32F,A.dims[1],A.dims[2],A.dims[3]),this.gl.texSubImage3D(this.gl.TEXTURE_3D,0,0,0,0,A.dims[1],A.dims[2],A.dims[3],this.gl.RED,this.gl.FLOAT,S),P=this.orientShaderF;else if(A.datatypeCode===64){let G=new Float32Array;G=Float32Array.from(S),this.gl.texStorage3D(this.gl.TEXTURE_3D,1,this.gl.R32F,A.dims[1],A.dims[2],A.dims[3]),this.gl.texSubImage3D(this.gl.TEXTURE_3D,0,0,0,0,A.dims[1],A.dims[2],A.dims[3],this.gl.RED,this.gl.FLOAT,G),P=this.orientShaderF}else A.datatypeCode===128?(P=this.orientShaderRGBU,P.use(this.gl),this.gl.uniform1i(P.uniforms.hasAlpha,0),this.gl.texStorage3D(this.gl.TEXTURE_3D,1,this.gl.RGB8UI,A.dims[1],A.dims[2],A.dims[3]),this.gl.texSubImage3D(this.gl.TEXTURE_3D,0,0,0,0,A.dims[1],A.dims[2],A.dims[3],this.gl.RGB_INTEGER,this.gl.UNSIGNED_BYTE,S)):A.datatypeCode===512?(A.intent_code===1002&&(P=this.orientShaderAtlasU),this.gl.texStorage3D(this.gl.TEXTURE_3D,1,this.gl.R16UI,A.dims[1],A.dims[2],A.dims[3]),this.gl.texSubImage3D(this.gl.TEXTURE_3D,0,0,0,0,A.dims[1],A.dims[2],A.dims[3],this.gl.RED_INTEGER,this.gl.UNSIGNED_SHORT,S)):A.datatypeCode===2304&&(P=this.orientShaderRGBU,P.use(this.gl),this.gl.uniform1i(P.uniforms.hasAlpha,1),this.gl.texStorage3D(this.gl.TEXTURE_3D,1,this.gl.RGBA8UI,A.dims[1],A.dims[2],A.dims[3]),this.gl.texSubImage3D(this.gl.TEXTURE_3D,0,0,0,0,A.dims[1],A.dims[2],A.dims[3],this.gl.RGBA_INTEGER,this.gl.UNSIGNED_BYTE,S));u.global_min===void 0&&u.calMinMax();let d=null;if(this.gl.bindVertexArray(this.genericVAO),m>1){if(!this.back.dims)throw new Error("back.dims undefined");d=this.rgbaTex(d,TEXTURE10_BLEND,this.back.dims),this.gl.bindTexture(this.gl.TEXTURE_3D,d);const G=this.passThroughShader;G.use(this.gl),this.gl.uniform1i(G.uniforms.in3D,2);for(let J=0;J7){const G=u.colormapLabel.max-u.colormapLabel.min+1;E=this.createColormapTexture(E,1,G),this.gl.texSubImage2D(this.gl.TEXTURE_2D,0,0,0,G,1,this.gl.RGBA,this.gl.UNSIGNED_BYTE,u.colormapLabel.lut),this.gl.uniform1f(P.uniforms.cal_min,u.colormapLabel.min-.5),this.gl.uniform1f(P.uniforms.cal_max,u.colormapLabel.max+.5),this.gl.bindTexture(this.gl.TEXTURE_2D,E)}else this.gl.bindTexture(this.gl.TEXTURE_2D,this.colormapTexture),this.gl.uniform1f(P.uniforms.cal_min,u.cal_min),this.gl.uniform1f(P.uniforms.cal_max,u.cal_max);this.gl.uniform1i(P.uniforms.isAlphaThreshold,u.alphaThreshold),this.gl.uniform1i(P.uniforms.isAdditiveBlend,this.opts.isAdditiveBlend?1:0);let e=Number.POSITIVE_INFINITY,N=Number.NEGATIVE_INFINITY;if(u.colormapNegative.length>0&&(e=Math.min(-u.cal_min,-u.cal_max),N=Math.max(-u.cal_min,-u.cal_max),isFinite(u.cal_minNeg)&&isFinite(u.cal_maxNeg)&&(e=Math.min(u.cal_minNeg,u.cal_maxNeg),N=Math.max(u.cal_minNeg,u.cal_maxNeg))),!P)throw new Error("orientShader undefined");this.gl.uniform1f(P.uniforms.layer??null,m),this.gl.uniform1f(P.uniforms.cal_minNeg??null,e),this.gl.uniform1f(P.uniforms.cal_maxNeg??null,N),this.gl.bindTexture(this.gl.TEXTURE_3D,L),this.gl.uniform1i(P.uniforms.intensityVol??null,9),this.gl.uniform1i(P.uniforms.blend3D??null,10),this.gl.uniform1i(P.uniforms.colormap??null,1),this.gl.uniform1f(P.uniforms.scl_inter??null,A.scl_inter),this.gl.uniform1f(P.uniforms.scl_slope??null,A.scl_slope),this.gl.uniform1f(P.uniforms.opacity??null,v),this.gl.uniform1i(P.uniforms.modulationVol??null,7);let q=null;if(u.modulationImage!==null&&u.modulationImage>=0&&u.modulationImage0;let d0=this.volumes[u.modulationImage].cal_min,S0=this.volumes[u.modulationImage].cal_max;isFinite(this.volumes[u.modulationImage].cal_minNeg)&&isFinite(this.volumes[u.modulationImage].cal_maxNeg)&&(d0=this.volumes[u.modulationImage].cal_minNeg,S0=this.volumes[u.modulationImage].cal_minNeg),d0=Math.abs(d0),S0=Math.abs(S0),d0>S0&&([d0,S0]=[S0,d0]);const g0=1/(S0-d0);let T0=Math.abs(u.modulateAlpha);T0=Math.max(T0,1);const C0=this.volumes[u.modulationImage].frame4D*J;for(let F0=0;F00?this.gradientGL(A):(this.gradientTexture!==null&&this.gl.deleteTexture(this.gradientTexture),this.gradientTexture=null)),!this.renderShader)throw new Error("renderShader undefined");this.renderShader.use(this.gl);const e0=this.sliceScale(!0),H=e0.vox,j=e0.volScale;if(this.gl.uniform1f(this.renderShader.uniforms.overlays,this.overlays),this.gl.uniform4fv(this.renderShader.uniforms.clipPlaneColor,this.opts.clipPlaneColor),this.gl.uniform1f(this.renderShader.uniforms.backOpacity,this.volumes[0].opacity),this.gl.uniform1f(this.renderShader.uniforms.renderOverlayBlend,this.opts.renderOverlayBlend),this.gl.uniform4fv(this.renderShader.uniforms.clipPlane,this.scene.clipPlane),this.gl.uniform3fv(this.renderShader.uniforms.texVox,H),this.gl.uniform3fv(this.renderShader.uniforms.volScale,j),!this.pickingImageShader)throw new Error("pickingImageShader undefined");this.pickingImageShader.use(this.gl),this.gl.uniform1f(this.pickingImageShader.uniforms.overlays,this.overlays.length),this.gl.uniform3fv(this.pickingImageShader.uniforms.texVox,H);let y=this.sliceMMShader;if(this.opts.isV1SliceShader&&(y=this.sliceV1Shader),!y)throw new Error("slice shader undefined");y.use(this.gl),this.gl.uniform1f(y.uniforms.overlays,this.overlays.length),this.gl.uniform1f(y.uniforms.drawOpacity,this.drawOpacity),E!==null&&(this.gl.deleteTexture(E),this.gl.activeTexture(TEXTURE1_COLORMAPS),this.gl.bindTexture(this.gl.TEXTURE_2D,this.colormapTexture)),this.gl.uniform1i(y.uniforms.drawing,7),this.gl.activeTexture(TEXTURE7_DRAW),this.gl.bindTexture(this.gl.TEXTURE_3D,this.drawTexture),this.updateInterpolation(m)}colormaps(){return cmapper.colormaps()}addColormap(u,m){cmapper.addColormap(u,m)}setColormap(u,m){const A=this.getVolumeIndexByID(u);this.volumes[A].colormap=m,this.updateGLVolume()}idx(u,m,A,S){return A*S[0]*S[1]+m*S[0]+u}check_previous_slice(u,m,A,S,v,w,D,R){const L=new Uint32Array(27);let P=0;if(!v)return 0;const d=u[this.idx(A,S,v,w)];if(D>=6){const E=this.idx(A,S,v-1,w);d===u[E]&&(L[P++]=m[E])}if(D>=18){if(A){const E=this.idx(A-1,S,v-1,w);d===u[E]&&(L[P++]=m[E])}if(S){const E=this.idx(A,S-1,v-1,w);d===u[E]&&(L[P++]=m[E])}if(A=6){if(E){const q=this.idx(E-1,d,P,m);N===u[q]&&(L[e++]=R[q])}if(d){const q=this.idx(E,d-1,P,m);N===u[q]&&(L[e++]=R[q])}}if(A>=18){if(d&&E){const q=this.idx(E-1,d-1,P,m);N===u[q]&&(L[e++]=R[q])}if(d&&E=w){w+=v;const q=new Uint32Array(w);q.set(D),D=q}D[S-1]=S,S++}}}for(let P=0;P100){log.info(` +Ooh no!!`);break}v[R]=L,D=Math.min(D,L)}for(let R=0;Ru.cal_min){w=u.cal_min,D=u.cal_max;const j=(A-m)/(D-w);return log.info(" Robust Rescale: min: "+w+" max: "+D+" scale: "+j),console.log("Robust Rescale: min: "+w+" max: "+D+" scale: "+j),[w,j]}const R=u.img,L=u.hdr.dims[1]*u.hdr.dims[2]*u.hdr.dims[3];if(u.hdr.scl_slope!==1||u.hdr.scl_inter!==0){const j=u.img,y=new Float32Array(u.img.length);for(let Y=0;Y=1e-15&&P++;const d=1e3,E=(D-w)/d,e=new Array(d).fill(0);for(let j=0;j=q);)z++;const e0=w;for(w=z*E+e0,q=L-Math.floor((1-v)*P),z=0;z=q);)z++;D=z*E+e0;let H=1;return w!==D&&(H=(A-m)/(D-w)),log.info(" Rescale: min: "+w+" max: "+D+" scale: "+H),[w,H]}conformVox2Vox(u,m,A=256,S=1,v=!1){const w=m.flat(),D=fromValues$3(w[0],w[1],w[2],w[3],w[4],w[5],w[6],w[7],w[8],w[9],w[10],w[11],w[12],w[13],w[14],w[15]),R=fromValues$1(u[1]/2,u[2]/2,u[3]/2,1),L=create$1(),P=create$3();transpose(P,D),transformMat4(L,R,P);const d=fromValues$2(L[0],L[1],L[2]),E=fromValues$2(S,S,S);let e=fromValues$3(-1,0,0,0,0,0,1,0,0,-1,0,0,0,0,0,1);v&&(e=fromValues$3(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)),transpose(e,e);const N=fromValues$1(A,A,A,1),q=create$3();scale$3(q,e,E);const z=fromValues$1(N[0],N[1],N[2],1);transformMat4(z,z,q),scale$1(z,z,.5);const e0=create$2();subtract$1(e0,d,fromValues$2(z[0],z[1],z[2]));const H=create$3();transpose(H,q),H[3]=e0[0],H[7]=e0[1],H[11]=e0[2];const j=create$3();invert(j,H);const y=create$3();mul(y,D,j);const Y=create$3();return invert(Y,y),[H,y,Y]}async createNiftiArray(u=[256,256,256],m=[1,1,1],A=[1,0,0,-128,0,1,0,-128,0,0,1,-128,0,0,0,1],S=2,v=new Uint8Array){return await NVImage.createNiftiArray(u,m,A,S,v)}async niftiArray2NVImage(u=new Uint8Array){return await NVImage.loadFromUrl({url:u})}async loadFromUrl(u){return await NVImage.loadFromUrl({url:u})}async conform(u,m=!1,A=!0,S=!1,v=!1){const R=this.conformVox2Vox(u.hdr.dims,u.hdr.affine.flat(),256,1,m),L=R[0],P=R[2],d=256*256*256,E=new Float32Array(d),e=new Float32Array(u.img),N=u.hdr.dims[1]*u.hdr.dims[2]*u.hdr.dims[3];if(u.hdr.scl_slope!==1||u.hdr.scl_inter!==0)for(let o0=0;o0=q||De>=z||I0>=e0)continue;const Le=T0-ee,Ge=C0-ie,ii=F0-ke,oi=1-Le,ei=1-Ge,Ve=1-ii,qe=y(ee,ie,ke);let Z0=0;Z0+=e[qe]*oi*ei*Ve,Z0+=e[qe+H]*oi*ei*ii,Z0+=e[qe+q]*oi*Ge*Ve,Z0+=e[qe+q+H]*oi*Ge*ii,Z0+=e[qe+1]*Le*ei*Ve,Z0+=e[qe+1+H]*Le*ei*ii,Z0+=e[qe+1+q]*Le*Ge*Ve,Z0+=e[qe+1+q+H]*Le*Ge*ii,E[j]=Z0}}else for(let o0=0;o0<256;o0++)for(let l0=0;l0<256;l0++){const c0=l0*P[1]+o0*P[2]+P[3],d0=l0*P[5]+o0*P[6]+P[7],S0=l0*P[9]+o0*P[10]+P[11];for(let g0=0;g0<256;g0++){const T0=Math.round(g0*Y+c0),C0=Math.round(g0*G+d0),F0=Math.round(g0*J+S0);j++,!(T0<0||C0<0||F0<0)&&(T0>=q||C0>=z||F0>=e0||(E[j]=e[y(T0,C0,F0)]))}}let i0=0;v&&(i0=NaN);let Q=new Uint8Array;if(S){const o0=await this.getScale(u,0,1,i0),l0=await this.scalecropFloat32(E,0,1,o0[0],o0[1]);Q=await this.createNiftiArray([256,256,256],[1,1,1],Array.from(L),16,new Uint8Array(l0.buffer))}else{const o0=await this.getScale(u,0,255,i0),l0=await this.scalecropUint8(E,0,255,o0[0],o0[1]);Q=await this.createNiftiArray([256,256,256],[1,1,1],Array.from(L),2,l0)}return await this.niftiArray2NVImage(Q)}setRenderDrawAmbientOcclusion(u){if(!this.renderShader)throw new Error("renderShader undefined");this.renderDrawAmbientOcclusion=u,this.renderShader.use(this.gl),this.gl.uniform1fv(this.renderShader.uniforms.renderDrawAmbientOcclusion,[this.renderDrawAmbientOcclusion,1]),this.drawScene()}setColorMap(u,m){this.setColormap(u,m)}setColormapNegative(u,m){const A=this.getVolumeIndexByID(u);this.volumes[A].colormapNegative=m,this.updateGLVolume()}setModulationImage(u,m,A=0){const S=this.getVolumeIndexByID(u);let v=null;m.length>0&&(v=this.getVolumeIndexByID(m)),this.volumes[S].modulationImage=v,this.volumes[S].modulateAlpha=A,this.updateGLVolume()}setGamma(u=1){cmapper.gamma=u,this.updateGLVolume()}async loadDeferred4DVolumes(u){const m=this.getVolumeIndexByID(u),A=this.volumes[m];if(A.nTotalFrame4D<=A.nFrame4D)return;let S;A.fileObject?S=await NVImage.loadFromFile({file:A.fileObject}):S=await NVImage.loadFromUrl({url:A.url}),S&&(A.img=S.img.slice(),A.nTotalFrame4D=S.nTotalFrame4D,A.nFrame4D=S.nFrame4D,this.updateGLVolume())}setFrame4D(u,m){const A=this.getVolumeIndexByID(u),S=this.volumes[A];m>S.nFrame4D-1&&(m=S.nFrame4D-1),m<0&&(m=0),m!==S.frame4D&&(S.frame4D=m,this.updateGLVolume(),this.onFrameChange(S,m),this.createOnLocationChange())}getFrame4D(u){const m=this.getVolumeIndexByID(u);return this.volumes[m].frame4D}colormapFromKey(u){return cmapper.colormapFromKey(u)}colormap(u="",m=!1){return cmapper.colormap(u,m)}createColormapTexture(u=null,m=0,A=256){return u!==null&&this.gl.deleteTexture(u),m<1||A<1?null:(u=this.gl.createTexture(),this.gl.activeTexture(TEXTURE1_COLORMAPS),this.gl.bindTexture(this.gl.TEXTURE_2D,u),this.gl.texStorage2D(this.gl.TEXTURE_2D,1,this.gl.RGBA8,A,m),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_R,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,1),u)}addColormapList(u="",m=NaN,A=NaN,S=!1,v=!1,w=!0,D=!1){u.length<1&&(w=!1),this.colormapLists.push({name:u,min:m,max:A,alphaThreshold:S,negative:v,visible:w,invert:D})}refreshColormaps(){if(this.colormapLists=[],this.volumes.length<1&&this.meshes.length<1)return;const u=this.volumes.length;if(u>0)for(let w=0;w0)for(let w=0;wS[0]&&m>S[1]&&u=0&&this.screenSlices[A].axCorSag===4?A:-1}sliceScroll3D(u=0){if(u!==0){if(this.volumes.length>0&&this.scene.clipPlaneDepthAziElev[0]<1.8){const m=this.scene.clipPlaneDepthAziElev.slice();return u>0&&(m[0]=Math.min(1.5,m[0]+.025)),u<0&&(m[0]=Math.max(-1.5,m[0]-.025)),m[0]!==this.scene.clipPlaneDepthAziElev[0]?(this.scene.clipPlaneDepthAziElev=m,this.setClipPlane(this.scene.clipPlaneDepthAziElev)):void 0}u>0&&(this.scene.volScaleMultiplier=Math.min(2,this.scene.volScaleMultiplier*1.1)),u<0&&(this.scene.volScaleMultiplier=Math.max(.5,this.scene.volScaleMultiplier*.9)),this.drawScene()}}deleteThumbnail(){this.bmpTexture&&(this.gl.deleteTexture(this.bmpTexture),this.bmpTexture=null,this.thumbnailVisible=!1)}inGraphTile(u,m){if(this.graph.opacity<=0||this.volumes.length<1||this.volumes[0].nFrame4D<1||!this.graph.plotLTWH||this.graph.plotLTWH[2]<1||this.graph.plotLTWH[3]<1)return!1;const A=[(u-this.graph.LTWH[0])/this.graph.LTWH[2],(m-this.graph.LTWH[1])/this.graph.LTWH[3]];return A[0]>0&&A[1]>0&&A[0]<=1&&A[1]<=1}mouseClick(u,m,A=0,S=!0){if(u*=this.uiData.dpr,m*=this.uiData.dpr,this.canvas.focus(),this.thumbnailVisible){this.thumbnailVisible=!1,Promise.all([this.loadVolumes(this.deferredVolumes),this.loadMeshes(this.deferredMeshes)]).catch(v=>{throw v});return}if(this.inGraphTile(u,m)){if(!this.graph.plotLTWH)throw new Error("plotLTWH undefined");const v=[(u-this.graph.plotLTWH[0])/this.graph.plotLTWH[2],(m-this.graph.plotLTWH[1])/this.graph.plotLTWH[3]];if(v[0]>0&&v[1]>0&&v[0]<=1&&v[1]<=1){const w=Math.round(v[0]*(this.volumes[0].nFrame4D-1));this.setFrame4D(this.volumes[0].id,w);return}v[0]>.5&&v[1]>1&&this.loadDeferred4DVolumes(this.volumes[0].id).catch(w=>{throw w});return}if(this.inRenderTile(u,m)>=0){this.sliceScroll3D(A),this.drawScene();return}if(!(this.screenSlices.length<1||this.gl.canvas.height<1||this.gl.canvas.width<1))for(let v=0;v=0&&this.drawPenAxCorSag!==w||w>2)continue;const D=this.screenXY2TextureFrac(u,m,v,!1);if(!(D[0]<0)){if(!S){this.scene.crosshairPos[2-w]=A,this.drawScene();return}if(A!==0){let R=1;A<0&&(R=-1);const L=[0,0,0];L[2-w]=R,this.moveCrosshairInVox(L[0],L[1],L[2]),this.drawScene(),this.createOnLocationChange(w);return}if(this.opts.isForceMouseClickToVoxelCenters?this.scene.crosshairPos=clone$1(this.vox2frac(this.frac2vox(D))):this.scene.crosshairPos=clone$1(D),this.opts.drawingEnabled){const R=this.frac2vox(this.scene.crosshairPos);if(!isFinite(this.opts.penValue)||this.opts.penValue<0||Object.is(this.opts.penValue,-0)){isFinite(this.opts.penValue)?this.drawFloodFill(R,Math.abs(this.opts.penValue),this.opts.floodFillNeighbors):this.drawFloodFill(R,0,this.opts.penValue,this.opts.floodFillNeighbors);return}if(isNaN(this.drawPenLocation[0]))this.drawPenAxCorSag=w,this.drawPenFillPts=[],this.drawPt(...R,this.opts.penValue);else{if(R[0]===this.drawPenLocation[0]&&R[1]===this.drawPenLocation[1]&&R[2]===this.drawPenLocation[2])return;this.drawPenLine(R,this.drawPenLocation,this.opts.penValue)}this.drawPenLocation=R,this.opts.isFilledPen&&this.drawPenFillPts.push(R),this.refreshDrawing(!1)}this.drawScene(),this.createOnLocationChange(w);return}}}drawRuler(){let u=[],m=[];for(let R=0;R1){m=this.screenSlices[R].leftTopWidthHeight,u=this.screenSlices[R].fovMM;break}if(m.length<4)return;const S=100/u[0]*m[2],v=m[0]+.5*m[2]-.5*S,w=m[1]+m[3]-2*this.opts.rulerWidth,D=[v,w,v+S,w];this.drawRuler10cm(D)}drawRuler10cm(u){if(!this.lineShader)throw new Error("lineShader undefined");this.gl.bindVertexArray(this.genericVAO),this.lineShader.use(this.gl),this.gl.uniform4fv(this.lineShader.uniforms.lineColor,this.opts.rulerColor),this.gl.uniform2fv(this.lineShader.uniforms.canvasWidthHeight,[this.gl.canvas.width,this.gl.canvas.height]),this.gl.uniform1f(this.lineShader.uniforms.thickness,this.opts.rulerWidth),this.gl.uniform4fv(this.lineShader.uniforms.startXYendXY,u),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4);const m=-.1*(u[0]-u[2]),A=u[1],S=A-2*this.opts.rulerWidth,v=A-4*this.opts.rulerWidth;for(let w=0;w<11;w++){const D=u[0]+w*m,R=[D,A,D,S];w%5===0&&(R[3]=v),this.gl.uniform4fv(this.lineShader.uniforms.startXYendXY,R),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4)}this.gl.bindVertexArray(this.unusedVAO)}screenXY2mm(u,m,A=-1){let S;for(let v=0;v=0&&(w=A),this.screenSlices[w].axCorSag>2)continue;const R=this.screenSlices[w].leftTopWidthHeight;if(uR[0]+R[2]||m>R[1]+R[3]||(S=this.screenXY2TextureFrac(u,m,w,!1),S[0]<0))continue;const L=this.frac2mm(S);return fromValues$1(L[0],L[1],L[2],w)}return fromValues$1(NaN,NaN,NaN,NaN)}dragForPanZoom(u){const m=this.screenXY2mm(u[2],u[3]);if(isNaN(m[0]))return;const A=this.screenXY2mm(u[0],u[1],m[3]);if(isNaN(A[0])||isNaN(m[0])||isNaN(m[3]))return;const S=create$1(),v=this.uiData.pan2DxyzmmAtMouseDown[3];sub(S,m,A),this.scene.pan2Dxyzmm[0]=this.uiData.pan2DxyzmmAtMouseDown[0]+v*S[0],this.scene.pan2Dxyzmm[1]=this.uiData.pan2DxyzmmAtMouseDown[1]+v*S[1],this.scene.pan2Dxyzmm[2]=this.uiData.pan2DxyzmmAtMouseDown[2]+v*S[2]}dragForCenterButton(u){this.dragForPanZoom(u)}dragForSlicer3D(u){let m=this.uiData.pan2DxyzmmAtMouseDown[3];const A=u[3]-u[1];m+=A*.01,m=Math.max(m,.1),m=Math.min(m,10);const v=this.scene.pan2Dxyzmm[3]-m;this.opts.yoke3Dto2DZoom&&(this.scene.volScaleMultiplier=m),this.scene.pan2Dxyzmm[3]=m;const w=this.frac2mm(this.scene.crosshairPos);this.scene.pan2Dxyzmm[0]+=v*w[0],this.scene.pan2Dxyzmm[1]+=v*w[1],this.scene.pan2Dxyzmm[2]+=v*w[2]}drawMeasurementTool(u){const m=this.gl;if(m.bindVertexArray(this.genericVAO),m.depthFunc(m.ALWAYS),m.enable(m.BLEND),m.blendFunc(m.SRC_ALPHA,m.ONE_MINUS_SRC_ALPHA),!this.lineShader)throw new Error("lineShader undefined");this.lineShader.use(this.gl),m.uniform4fv(this.lineShader.uniforms.lineColor,this.opts.rulerColor),m.uniform2fv(this.lineShader.uniforms.canvasWidthHeight,[m.canvas.width,m.canvas.height]),m.uniform1f(this.lineShader.uniforms.thickness,this.opts.rulerWidth),m.uniform4fv(this.lineShader.uniforms.startXYendXY,u),m.drawArrays(m.TRIANGLE_STRIP,0,4);const A=this.opts.rulerColor;A[3]=1,m.uniform4fv(this.lineShader.uniforms.lineColor,A);const S=this.opts.rulerWidth;m.uniform1f(this.lineShader.uniforms.thickness,S*2);let v=[u[0],u[1]-S,u[0],u[1]+S];m.uniform4fv(this.lineShader.uniforms.startXYendXY,v),m.drawArrays(m.TRIANGLE_STRIP,0,4),v=[u[2],u[3]-S,u[2],u[3]+S],m.uniform4fv(this.lineShader.uniforms.startXYendXY,v),m.drawArrays(m.TRIANGLE_STRIP,0,4);let w=this.canvasPos2frac([u[0],u[1]]),D=this.canvasPos2frac([u[2],u[3]]);if(w[0]>=0&&D[0]>=0){const R=this.frac2mm(w);w=fromValues$2(R[0],R[1],R[2]);const L=this.frac2mm(D);D=fromValues$2(L[0],L[1],L[2]);const P=create$2();sub$1(P,w,D);const d=len(P);let E=2;d>9&&(E=1),d>99&&(E=0);const e=d.toFixed(E);this.drawTextBetween(u,e,1,A)}m.bindVertexArray(this.unusedVAO)}drawRect(u,m=[1,0,0,-1]){if(m[3]<0&&(m=this.opts.crosshairColor),!this.rectShader)throw new Error("rectShader undefined");this.rectShader.use(this.gl),this.gl.enable(this.gl.BLEND),this.gl.uniform4fv(this.rectShader.uniforms.lineColor,m),this.gl.uniform2fv(this.rectShader.uniforms.canvasWidthHeight,[this.gl.canvas.width,this.gl.canvas.height]),this.gl.uniform4f(this.rectShader.uniforms.leftTopWidthHeight,u[0],u[1],u[2],u[3]),this.gl.bindVertexArray(this.genericVAO),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4),this.gl.bindVertexArray(this.unusedVAO)}drawCircle(u,m=this.opts.fontColor,A=1){if(!this.circleShader)throw new Error("circleShader undefined");this.circleShader.use(this.gl),this.gl.enable(this.gl.BLEND),this.gl.uniform4fv(this.circleShader.uniforms.circleColor,m),this.gl.uniform2fv(this.circleShader.uniforms.canvasWidthHeight,[this.gl.canvas.width,this.gl.canvas.height]),this.gl.uniform4f(this.circleShader.uniforms.leftTopWidthHeight,u[0],u[1],u[2],u[3]),this.gl.uniform1f(this.circleShader.uniforms.fillPercent,A),this.gl.uniform4fv(this.circleShader.uniforms.circleColor,m),this.gl.bindVertexArray(this.genericVAO),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4),this.gl.bindVertexArray(this.unusedVAO)}drawSelectionBox(u){this.drawRect(u,this.opts.selectionBoxColor)}effectiveCanvasHeight(){return this.gl.canvas.height-this.colorbarHeight}effectiveCanvasWidth(){return this.gl.canvas.width-this.getLegendPanelWidth()}getAllLabels(){const S=this.meshes.filter(w=>w.type==="connectome").flatMap(w=>w.nodes).map(w=>w.label).filter(w=>w!==void 0);return[...this.document.labels,...S]}getBulletMarginWidth(){let u=0;const m=this.getAllLabels();if(m.length===0)return 0;const A=m.length===1?m[0].style.bulletScale:m.reduce((w,D)=>w.style.bulletScale>D.style.bulletScale?w:D).style.bulletScale,S=m.length===1?m[0]:m.reduce((w,D)=>{const R=this.opts.textHeight*this.gl.canvas.height*w.style.textScale,L=this.opts.textHeight*this.gl.canvas.height*D.style.textScale;return this.textHeight(R,w.text)>this.textHeight(L,D.text)?w:D}),v=this.opts.textHeight*this.gl.canvas.height*S.style.textScale;return u=this.textHeight(v,S.text)*A,u+=v,u}getLegendPanelWidth(){const u=this.getAllLabels();if(!this.opts.showLegend||u.length===0)return 0;const A=this.opts.textHeight*this.gl.canvas.height*1;let S=0;const v=u.reduce((L,P)=>{const d=this.opts.textHeight*this.gl.canvas.height*L.style.textScale,E=this.opts.textHeight*this.gl.canvas.height*P.style.textScale;return this.textWidth(d,L.text)>this.textWidth(E,P.text)?L:P}),w=this.opts.textHeight*this.gl.canvas.height*v.style.textScale,D=this.textWidth(w,v.text),R=this.getBulletMarginWidth();return D&&(S=R+D,S+=A*2),S}getLegendPanelHeight(){const u=this.getAllLabels();let m=0;const S=this.opts.textHeight*this.gl.canvas.height*1;for(const v of u){const w=this.opts.textHeight*this.gl.canvas.height*v.style.textScale,D=this.textHeight(w,v.text);m+=D}return m&&(m+=S/2*(u.length+1)),m}reserveColorbarPanel(){let u=Math.max(this.opts.textHeight,.01);u=u*Math.min(this.gl.canvas.height,this.gl.canvas.width);const m=3*u,A=[0,this.gl.canvas.height-m,this.gl.canvas.width,m];return this.colorbarHeight=A[3]+1,A}drawColorbarCore(u=0,m=[0,0,0,0],A=!1,S=0,v=1,w){if(m[2]<=0||m[3]<=0)return;let D=Math.max(this.opts.textHeight,.01);D=D*Math.min(this.gl.canvas.height,this.gl.canvas.width);let R=D;const L=3*D;let P=D;if(m[3]0&&(N=S,S=0),S===v||D<1)return;const q=Math.abs(v-S);let[z,e0]=tickSpacing(S,v);e0S.includes(R)).reduce((D,R)=>D.lbwh[3]>R.lbwh[3]?D:R).lbwh[3];return u*w}drawChar(u,m,A){if(!this.fontShader)throw new Error("fontShader undefined");const S=this.fontMets.mets[A],v=u[0]+m*S.lbwh[0],w=-(m*S.lbwh[1]),D=m*S.lbwh[2],R=m*S.lbwh[3],L=u[1]+(w-R)+m;return this.gl.uniform4f(this.fontShader.uniforms.leftTopWidthHeight,v,L,D,R),this.gl.uniform4fv(this.fontShader.uniforms.uvLeftTopWidthHeight,S.uv_lbwh),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4),m*S.xadv}drawLoadingText(u){if(!this.canvas)throw new Error("canvas undefined");this.gl.viewport(0,0,this.gl.canvas.width,this.gl.canvas.height),this.gl.enable(this.gl.CULL_FACE),this.gl.enable(this.gl.BLEND),this.drawTextBelow([this.canvas.width/2,this.canvas.height/2],u,3)}drawText(u,m,A=1,S=null){if(this.opts.textHeight<=0)return;if(!this.fontShader)throw new Error("fontShader undefined");this.fontShader.use(this.gl);const v=this.opts.textHeight*Math.min(this.gl.canvas.height,this.gl.canvas.width)*A;this.gl.enable(this.gl.BLEND),this.gl.uniform2f(this.fontShader.uniforms.canvasWidthHeight,this.gl.canvas.width,this.gl.canvas.height),S===null&&(S=this.opts.fontColor),this.gl.uniform4fv(this.fontShader.uniforms.fontColor,S);let w=v/this.fontMets.size*this.fontMets.distanceRange;w=Math.max(w,1),this.gl.uniform1f(this.fontShader.uniforms.screenPxRange,w);const D=new TextEncoder().encode(m);this.gl.bindVertexArray(this.genericVAO);for(let R=0;R.8?L=[0,0,0,.5]:L=[1,1,1,.5],this.drawRect(R,L),this.drawText(v,m,A,S)}drawTextBelow(u,m,A=1,S=null){if(this.opts.textHeight<=0)return;if(!this.canvas)throw new Error("canvas undefined");let v=this.opts.textHeight*this.gl.canvas.height*A,w=this.textWidth(v,m);w>this.canvas.width&&(A*=(this.canvas.width-2)/w,v=this.opts.textHeight*this.gl.canvas.height*A,w=this.textWidth(v,m)),u[0]-=.5*this.textWidth(v,m),u[0]=Math.max(u[0],1),u[0]=Math.min(u[0],this.canvas.width-w-1),this.drawText(u,m,A,S)}updateInterpolation(u,m=!1){let A=this.gl.LINEAR;!m&&this.opts.isNearestInterpolation&&(A=this.gl.NEAREST),u===0?this.gl.activeTexture(TEXTURE0_BACK_VOL):this.gl.activeTexture(TEXTURE2_OVERLAY_VOL),this.gl.texParameteri(this.gl.TEXTURE_3D,this.gl.TEXTURE_MIN_FILTER,A),this.gl.texParameteri(this.gl.TEXTURE_3D,this.gl.TEXTURE_MAG_FILTER,A)}setAtlasOutline(u){this.opts.atlasOutline=u,this.updateGLVolume(),this.drawScene()}setInterpolation(u){this.opts.isNearestInterpolation=u;const m=this.volumes.length;if(!(m<1)){for(let A=0;A0){this.opts.meshThicknessOn2D!==1/0&&(q=this.calculateMvpMatrix2D(u,v.mnMM,v.mxMM,this.opts.meshThicknessOn2D,N,L,R,D));const e0=clone$2(q.modelViewProjectionMatrix);multiply(e0,e0,w),this.drawMesh3D(!0,1,e0,q.modelMatrix,q.normalMatrix)}isNaN(A)&&this.drawCrosshairs3D(!1,.15,q.modelViewProjectionMatrix,!0,this.opts.isSliceMM),this.drawSliceOrientationText(u,m),this.readyForSync=!0}calculateMvpMatrix(u,m=[0,0,0,0],A,S){(m[2]===0||m[3]===0)&&(m=[0,0,this.gl.canvas.width,this.gl.canvas.height]);const v=m[2]/m[3];let w=this.furthestFromPivot;const D=this.pivot3D,R=create$3();w=.8*w/this.scene.volScaleMultiplier,v<1?ortho(R,-w,w,-w/v,w/v,w*.01,w*8):ortho(R,-w*v,w*v,-w,w,w*.01,w*8);const L=create$3();L[0]=-1;const P=fromValues$2(0,0,-w*1.8);translate(L,L,P),this.position&&translate(L,L,this.position),rotateX(L,L,deg2rad(270-S)),rotateZ(L,L,deg2rad(A-180)),translate(L,L,[-D[0],-D[1],-D[2]]);const d=create$3();invert(d,L);const E=create$3();transpose(E,d);const e=create$3();return multiply(e,R,L),[e,L,E]}calculateModelMatrix(u,m){if(!this.back)throw new Error("back undefined");const A=create$3();if(A[0]=-1,rotateX(A,A,deg2rad(270-m)),rotateZ(A,A,deg2rad(u-180)),this.back.obliqueRAS){const S=clone$2(this.back.obliqueRAS);multiply(A,A,S)}return A}calculateRayDirection(u,m){const A=this.calculateModelMatrix(u,m),S=fromValues$3(1,0,0,0,0,-1,0,0,0,0,-1,0,0,0,0,1),v=create$3();multiply(v,S,A);const w=create$3();invert(w,v);const D=fromValues$1(0,0,-1,1);transformMat4(D,D,w);const R=fromValues$2(D[0],D[1],D[2]);normalize$1(R,R);const L=5e-5;return Math.abs(R[0])0){if(!this.volumeObject3D)throw new Error("volumeObject3D undefined");m=fromValues$2(this.volumeObject3D.extentsMin[0],this.volumeObject3D.extentsMin[1],this.volumeObject3D.extentsMin[2]),A=fromValues$2(this.volumeObject3D.extentsMax[0],this.volumeObject3D.extentsMax[1],this.volumeObject3D.extentsMax[2]),u||(m=fromValues$2(this.volumes[0].extentsMinOrtho[0],this.volumes[0].extentsMinOrtho[1],this.volumes[0].extentsMinOrtho[2]),A=fromValues$2(this.volumes[0].extentsMaxOrtho[0],this.volumes[0].extentsMaxOrtho[1],this.volumes[0].extentsMaxOrtho[2]))}if(this.meshes.length>0){if(this.volumes.length<1){const v=this.meshes[0].extentsMin,w=this.meshes[0].extentsMax;m=fromValues$2(v[0],v[1],v[2]),A=fromValues$2(w[0],w[1],w[2])}for(let v=0;vthis.gl.canvas.width||u.LTWH[1]+u.LTWH[3]>this.gl.canvas.height)return;u.backColor=[.15,.15,.15,u.opacity],u.lineColor=[1,1,1,1],this.opts.backColor[0]+this.opts.backColor[1]+this.opts.backColor[2]>1.5&&(u.backColor=[.95,.95,.95,u.opacity],u.lineColor=[0,0,0,1]),u.textColor=u.lineColor.slice(),u.lineThickness=4,u.lineAlpha=1,u.lines=[];const A=[];if(u.vols.length<1)this.volumes[0]!=null&&A.push(0);else for(let l0=0;l0v){const l0=w-v;for(let c0=0;c0=w&&(w=v+1),this.drawRect(u.LTWH,u.backColor);const[D,R,L]=tickSpacing(v,w),P=Math.max(0,-1*Math.floor(Math.log(D)/Math.log(10)));v=Math.min(R,v),w=Math.max(L,w);function d(l0){return l0.toFixed(6).replace(/\.?0*$/,"")}const e=.07*(Math.min(u.LTWH[2],u.LTWH[3])/(this.fontMets.size*this.uiData.dpr));let N=this.opts.textHeight*this.gl.canvas.height*e;N<16&&(N=0);let q=0,z=R;if(N>0)for(;z<=w;){const l0=z.toFixed(P),c0=this.textWidth(N,l0);q=Math.max(c0,q),z+=D}const e0=.05,H=Math.abs(u.LTWH[2]),j=Math.abs(u.LTWH[3]),y=[u.LTWH[0]+e0*H+q,u.LTWH[1]+e0*j,u.LTWH[2]-q-2*e0*H,u.LTWH[3]-N-2*e0*j];this.graph.LTWH=u.LTWH,this.graph.plotLTWH=y,this.drawRect(y,this.opts.backColor);const Y=w-v,G=y[3]/Y,J=y[2]/(u.lines[0].length-1),i0=y[1]+y[3];z=R+.5*D;const Q=u.lineColor.slice();for(Q[3]=.25*u.lineColor[3];z<=w;){const l0=i0-(z-v)*G;this.drawLine([y[0],l0,y[0]+y[2],l0],.5*u.lineThickness,Q),z+=D}z=R;const f=.5*u.lineThickness;for(;z<=w;){const l0=i0-(z-v)*G;this.drawLine([y[0]-f,l0,y[0]+y[2]+u.lineThickness,l0],u.lineThickness,u.lineColor);const c0=z.toFixed(P);N>0&&this.drawTextLeft([y[0]-6,l0],c0,e,u.textColor),z+=D}let o0=1;for(;u.lines[0].length/o0>20;)o0*=5;for(let l0=0;l00&&this.drawTextBelow([c0,2+y[1]+y[3]],S0,e,u.textColor),this.drawLine([c0,y[1],c0,y[1]+y[3]],d0,u.lineColor)}}for(let l0=0;l0=0&&u.selectedColumnE/255);return}const D=unpackFloatFromVec4i(w);if(D>1)return;const R=(this.mousePos[0]-u[0])/u[2],L=(A.canvas.height-this.mousePos[1]-u[1])/u[3],P=unProject(R,L,D,m),d=this.mm2frac(P,0,!0);d[0]<0||d[0]>1||d[1]<0||d[1]>1||d[2]<0||d[2]>1||(this.scene.crosshairPos=this.mm2frac(P,0,!0))}drawImage3D(u,m,A){if(this.volumes.length===0)return;const S=this.gl,v=this.calculateRayDirection(m,A),w=this.volumeObject3D;if(w){S.enable(S.BLEND),S.blendFunc(S.SRC_ALPHA,S.ONE_MINUS_SRC_ALPHA),S.enable(S.CULL_FACE),S.cullFace(S.FRONT);let D=this.renderShader;if(this.uiData.mouseDepthPicker&&(D=this.pickingImageShader),D.use(this.gl),S.uniform1i(D.uniforms.backgroundMasksOverlays,this.backgroundMasksOverlays),this.gradientTextureAmount>0){S.activeTexture(TEXTURE6_GRADIENT),S.bindTexture(S.TEXTURE_3D,this.gradientTexture);const R=this.calculateModelMatrix(m,A),L=create$3();invert(L,R);const P=create$3();transpose(P,L),S.uniformMatrix4fv(D.uniforms.normMtx,!1,P)}this.drawBitmap&&this.drawBitmap.length>8?S.uniform2f(D.uniforms.renderDrawAmbientOcclusionXY,this.renderDrawAmbientOcclusion,this.drawOpacity):S.uniform2f(D.uniforms.renderDrawAmbientOcclusionXY,this.renderDrawAmbientOcclusion,0),S.uniformMatrix4fv(D.uniforms.mvpMtx,!1,u),S.uniformMatrix4fv(D.uniforms.matRAS,!1,this.back.matRAS),S.uniform3fv(D.uniforms.rayDir,v),this.gradientTextureAmount<0?S.uniform4fv(D.uniforms.clipPlane,[this.scene.crosshairPos[0],this.scene.crosshairPos[1],this.scene.crosshairPos[2],30]):S.uniform4fv(D.uniforms.clipPlane,this.scene.clipPlane),S.uniform1f(D.uniforms.drawOpacity,1),S.bindVertexArray(w.vao),S.drawElements(w.mode,w.indexCount,S.UNSIGNED_SHORT,0),S.bindVertexArray(this.unusedVAO)}}drawOrientationCube(u,m=0,A=0){if(!this.opts.isOrientCube)return;const S=.05*Math.min(u[2],u[3]);if(S<5)return;const v=this.gl;v.enable(v.CULL_FACE),v.cullFace(v.BACK),this.orientCubeShader.use(this.gl),v.bindVertexArray(this.orientCubeShaderVAO);const w=create$3(),D=create$3();ortho(D,0,v.canvas.width,0,v.canvas.height,-10*S,10*S);let R=0;u[1]===0&&(R=v.canvas.height-this.effectiveCanvasHeight()),translate(w,w,[1.8*S+u[0],R+1.8*S+u[1],0]),scale$3(w,w,[S,S,S]),rotateX(w,w,deg2rad(270-A)),rotateZ(w,w,deg2rad(-m));const L=create$3();multiply(L,D,w),v.uniformMatrix4fv(this.orientCubeShader.uniforms.u_matrix,!1,L),v.drawArrays(v.TRIANGLE_STRIP,0,168),v.bindVertexArray(this.unusedVAO),this.gl.disable(this.gl.CULL_FACE)}createOnLocationChange(u=NaN){const[m,A,S]=this.sceneExtentsMinMax(!0),v=Math.max(Math.max(S[0],S[1]),S[2]);function w(E){return Math.max(0,-Math.ceil(Math.log10(Math.abs(E))))}let D=w(v*.001);const R=this.frac2mm(this.scene.crosshairPos,0,!0);function L(E,e=0){return parseFloat(E.toFixed(e))}let P=L(R[0],D)+"×"+L(R[1],D)+"×"+L(R[2],D);if(this.volumes.length>0&&this.volumes[0].nFrame4D>0&&(P+="×"+L(this.volumes[0].frame4D)),this.volumes.length>0){let E=" = ";for(let q=0;q=0&&H=0&&(E+="+"),E+=L(e0,D)),E+=" "}P+=E;const e=this.back.dimsRAS,N=e[1]*e[2]*e[3];if(this.drawBitmap&&this.drawBitmap.length===N){const q=this.frac2vox(this.scene.crosshairPos),z=q[0]+q[1]*e[1]+q[2]*e[1]*e[2];P+=" "+this.drawLut.labels[this.drawBitmap[z]]}}const d={mm:this.frac2mm(this.scene.crosshairPos,0,!0),axCorSag:u,vox:this.frac2vox(this.scene.crosshairPos),frac:this.scene.crosshairPos,xy:[this.mousePos[0],this.mousePos[1]],values:this.volumes.map(E=>{const e=this.frac2mm(this.scene.crosshairPos,0,!0),N=E.mm2vox(e),q=E.getValue(N[0],N[1],N[2],E.frame4D);return{name:E.name,value:q,id:E.id,mm:e,vox:N}}),string:P};this.onLocationChange(d)}addLabel(u,m,A){const S={textColor:this.opts.legendTextColor,textScale:1,textAlignment:"left",lineWidth:0,lineColor:this.opts.legendTextColor,lineTerminator:"none",bulletScale:0,bulletColor:this.opts.legendTextColor},v=m?{...S,...m}:{...S},w=new NVLabel3D(u,v,A);return this.document.labels.push(w),w}calculateScreenPoint(u,m,A){const S=create$1();return transformMat4(S,[...u,1],m),S[3]!==0&&(S[0]=(S[0]/S[3]+1)*.5*A[2],S[1]=(1-S[1]/S[3])*.5*A[3],S[2]/=S[3],S[0]+=A[0],S[1]+=A[1]),S}getLabelAtPoint(u){log.debug("screenPoint",u);const m=this.getLegendPanelHeight(),A=this.getLegendPanelWidth(),S=this.gl.canvas.width-A;let v=(this.canvas.height-m)/2;if(log.debug("panelrect",S,v,S+A,v+m),u[0]S+A||u[1]>v+m)return null;const D=this.opts.textHeight*Math.min(this.gl.canvas.height,this.gl.canvas.width)*1,R=this.getAllLabels();for(const L of R){const P=this.opts.textHeight*this.gl.canvas.height*L.style.textScale,d=this.textHeight(P,L.text);if(u[1]>=v&&u[1]<=v+d+D/2)return L;v+=d,v+=D/2}return null}drawLabelLine(u,m,A,S,v=!1){const w=Array.isArray(u.points)&&Array.isArray(u.points[0])?u.points:[u.points];for(const D of w){const R=this.calculateScreenPoint(D,A,S);v?this.drawDottedLine([...m,R[0],R[1]],u.style.lineWidth,u.style.lineColor):this.draw3DLine(m,[R[0],R[1],R[2]],u.style.lineWidth,u.style.lineColor)}}draw3DLabel(u,m,A,S,v=0,w,D=!1){const R=u.text,L=m[0],P=m[1],d=this.opts.textHeight*Math.min(this.gl.canvas.height,this.gl.canvas.width)*1,E=this.textHeight(u.style.textScale,R)*d;if(u.style.lineWidth>0&&Array.isArray(u.points)&&this.drawLabelLine(u,[L,P+E],A,S,D),u.style.bulletScale){const N=u.style.bulletScale*E,q=E-N,z=P+q/2+N/2,e0=L+(v-N)/2;this.drawCircle([e0,z,N,N],u.style.bulletColor)}let e=L;if(u.style.textAlignment!=="left"){const N=this.textWidth(u.style.textScale,u.text)*d;if(u.style.textAlignment==="right")e=L+w-d*1.5-N;else{const q=w-(v||d);e+=(q-N)/2}}else e+=v;this.drawText([e,P],R,u.style.textScale,u.style.textColor)}draw3DLabels(u,m,A=!1){const S=this.getAllLabels();if(!this.opts.showLegend||S.length===0)return;if(!this.canvas)throw new Error("canvas undefined");const v=this.gl;v.disable(v.CULL_FACE),v.viewport(0,0,this.canvas.width,this.canvas.height);const D=this.opts.textHeight*Math.min(this.gl.canvas.height,this.gl.canvas.width)*1,R=this.getBulletMarginWidth(),L=this.getLegendPanelHeight(),P=this.getLegendPanelWidth(),d=v.canvas.width-P;let E=(this.canvas.height-L)/2;this.drawRect([v.canvas.width-P,E,P-D,L],this.opts.legendBackgroundColor);const e=v.getParameter(v.BLEND),N=v.getParameter(v.DEPTH_FUNC);A||(v.disable(v.BLEND),v.depthFunc(v.GREATER));for(const q of S){this.draw3DLabel(q,[d,E],u,m,R,P,A);const z=this.opts.textHeight*this.gl.canvas.height*q.style.textScale,e0=this.textHeight(z,q.text);E+=e0,E+=D/2}A||(v.depthFunc(N),e&&v.enable(v.BLEND))}draw3D(u=[0,0,0,0],m=null,A=null,S=null,v=null,w=0){const D=v!==null;this.setPivot3D(),D||(v=this.scene.renderAzimuth,w=this.scene.renderElevation);const R=this.gl;m===null&&([m,A,S]=this.calculateMvpMatrix(null,u,v,w));let L=[...u];if(u[2]===0||u[3]===0?(u=[0,0,R.canvas.width,R.canvas.height],L=[...u],this.screenSlices.push({leftTopWidthHeight:u,axCorSag:4,sliceFrac:0,AxyzMxy:[],leftTopMM:[],fovMM:[isRadiological(A),0]})):(this.screenSlices.push({leftTopWidthHeight:u.slice(),axCorSag:4,sliceFrac:0,AxyzMxy:[],leftTopMM:[],fovMM:[isRadiological(A),0]}),u[1]=R.canvas.height-u[3]-u[1]),R.enable(R.DEPTH_TEST),R.depthFunc(R.ALWAYS),R.depthMask(!0),R.clearDepth(0),this.draw3DLabels(m,L,!1),R.viewport(u[0],u[1],u[2],u[3]),this.volumes.length>0&&(this.updateInterpolation(0,!0),this.updateInterpolation(1,!0),this.drawImage3D(m,v,w)),this.updateInterpolation(0),this.updateInterpolation(1),D||this.drawCrosshairs3D(!0,1,m),this.drawMesh3D(!0,1,m,A,S),this.uiData.mouseDepthPicker){this.depthPicker(u,m),this.createOnLocationChange(),this.draw3D(u,m,A,S,v,w);return}this.opts.meshXRay>0&&this.drawMesh3D(!1,this.opts.meshXRay,m,A,S),this.draw3DLabels(m,L,!1),R.viewport(u[0],u[1],u[2],u[3]),D||this.drawCrosshairs3D(!1,.15,m),R.viewport(0,0,R.canvas.width,R.canvas.height),this.drawOrientationCube(u,v,w);const P="azimuth: "+this.scene.renderAzimuth.toFixed(0)+" elevation: "+this.scene.renderElevation.toFixed(0);return this.readyForSync=!0,this.sync(),this.draw3DLabels(m,L,!0),P}drawMesh3D(u=!0,m=1,A,S,v){if(this.meshes.length<1)return;const w=this.gl;A||([A,S,v]=this.calculateMvpMatrix(this.volumeObject3D,void 0,this.scene.renderAzimuth,this.scene.renderElevation)),w.enable(w.DEPTH_TEST),w.blendFunc(w.SRC_ALPHA,w.ONE_MINUS_SRC_ALPHA),w.disable(w.BLEND),w.depthFunc(w.GREATER),w.disable(w.CULL_FACE),u?(w.disable(w.BLEND),w.depthFunc(w.GREATER)):(w.enable(w.BLEND),w.depthFunc(w.ALWAYS),w.enable(w.CULL_FACE)),w.cullFace(w.BACK);let D=this.meshShaders[0].shader,R=!1;for(let L=0;L=3&&this.meshes[L].fiberRadius>0||(w.bindVertexArray(this.meshes[L].vaoFiber),w.drawElements(w.LINE_STRIP,this.meshes[L].indexCount,w.UNSIGNED_INT,0),w.bindVertexArray(this.unusedVAO)));w.enable(w.BLEND),w.depthFunc(w.ALWAYS),this.readyForSync=!0}drawCrosshairs3D(u=!0,m=1,A=null,S=!1,v=!0){if(!this.opts.show3Dcrosshair&&!S||this.opts.crosshairWidth<=0&&S)return;const w=this.gl,D=this.frac2mm(this.scene.crosshairPos,0,v);if(this.crosshairs3D===null||this.crosshairs3D.mm[0]!==D[0]||this.crosshairs3D.mm[1]!==D[1]||this.crosshairs3D.mm[2]!==D[2]){this.crosshairs3D!==null&&(w.deleteBuffer(this.crosshairs3D.indexBuffer),w.deleteBuffer(this.crosshairs3D.vertexBuffer));const[P,d,E]=this.sceneExtentsMinMax(v);let e=1;if(this.volumes.length>0){if(!this.back)throw new Error("back undefined");e=.5*Math.min(Math.min(this.back.pixDims[1],this.back.pixDims[2]),this.back.pixDims[3])}else(E[0]<50||E[0]>1e3)&&(e=E[0]*.02);e*=this.opts.crosshairWidth,this.crosshairs3D=NiivueObject3D.generateCrosshairs(this.gl,1,D,P,d,e,20,this.opts.crosshairGap),this.crosshairs3D.mm=D}if(!this.surfaceShader)throw new Error("surfaceShader undefined");const R=this.surfaceShader;R.use(this.gl),A==null&&([A]=this.calculateMvpMatrix(this.crosshairs3D,void 0,this.scene.renderAzimuth,this.scene.renderElevation)),w.uniformMatrix4fv(R.uniforms.mvpMtx,!1,A),w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,this.crosshairs3D.indexBuffer),w.enable(w.DEPTH_TEST);const L=[...this.opts.crosshairColor];u?(w.disable(w.BLEND),w.depthFunc(w.GREATER)):(w.enable(w.BLEND),w.blendFunc(w.SRC_ALPHA,w.ONE_MINUS_SRC_ALPHA),w.depthFunc(w.ALWAYS)),L[3]=m,w.uniform4fv(R.uniforms.surfaceColor,L),w.bindVertexArray(this.crosshairs3D.vao),w.drawElements(w.TRIANGLES,this.crosshairs3D.indexCount,w.UNSIGNED_INT,0),w.bindVertexArray(this.unusedVAO)}mm2frac(u,m=0,A=!1){if(this.volumes.length<1){const S=fromValues$2(.1,.5,.5),[v,w,D]=this.sceneExtentsMinMax();return S[0]=(u[0]-v[0])/D[0],S[1]=(u[1]-v[1])/D[1],S[2]=(u[2]-v[2])/D[2],isFinite(S)||(isFinite(S[0])||(S[0]=.5),isFinite(S[1])||(S[1]=.5),isFinite(S[2])||(S[2]=.5),this.meshes.length<1&&log.error("mm2frac() not finite: objects not (yet) loaded.")),S}return this.volumes[m].convertMM2Frac(u,A||this.opts.isSliceMM)}vox2frac(u,m=0){return this.volumes[m].convertVox2Frac(u)}frac2vox(u,m=0){return this.volumes.length<=m?[0,0,0]:this.volumes[m].convertFrac2Vox(u)}moveCrosshairInVox(u,m,A){const S=this.frac2vox(this.scene.crosshairPos);S[0]+=u,S[1]+=m,S[2]+=A,S[0]=clamp(S[0],0,this.volumes[0].dimsRAS[1]-1),S[1]=clamp(S[1],0,this.volumes[0].dimsRAS[2]-1),S[2]=clamp(S[2],0,this.volumes[0].dimsRAS[3]-1),this.scene.crosshairPos=this.vox2frac(S),this.createOnLocationChange(),this.drawScene()}frac2mm(u,m=0,A=!1){const S=fromValues$1(u[0],u[1],u[2],1);if(this.volumes.length>0)return this.volumes[m].convertFrac2MM(u,A||this.opts.isSliceMM);{const[v,w]=this.sceneExtentsMinMax(),D=(R,L,P)=>R*(1-P)+L*P;S[0]=D(v[0],w[0],u[0]),S[1]=D(v[1],w[1],u[1]),S[2]=D(v[2],w[2],u[2])}return S}screenXY2TextureFrac(u,m,A,S=!0){const v=fromValues$2(-1,-1,-1),w=this.screenSlices[A].axCorSag;if(w>2)return v;const D=this.screenSlices[A].leftTopWidthHeight.slice();let R=!1;D[2]<0&&(R=!0,D[0]+=D[2],D[2]=-D[2]);let L=(u-D[0])/D[2];R&&(L=1-L);const P=1-(m-D[1])/D[3];if(L<0||L>1||P<0||P>1||this.screenSlices[A].AxyzMxy.length<4)return v;let d=fromValues$2(0,0,0);d[0]=this.screenSlices[A].leftTopMM[0]+L*this.screenSlices[A].fovMM[0],d[1]=this.screenSlices[A].leftTopMM[1]+P*this.screenSlices[A].fovMM[1];const E=this.screenSlices[A].AxyzMxy;d[2]=E[2]+E[4]*(d[1]-E[1])-E[3]*(d[0]-E[0]),w===1&&(d=swizzleVec3(d,[0,2,1])),w===2&&(d=swizzleVec3(d,[2,0,1]));const e=this.mm2frac(d);return S&&(e[0]<0||e[0]>1||e[1]<0||e[1]>1||e[2]<0||e[2]>1)?v:e}canvasPos2frac(u){for(let m=0;m=0)return A}return[-1,-1,-1]}scaleSlice(u,m,A=0,S=0){const v=this.effectiveCanvasWidth()-A,w=this.effectiveCanvasHeight()-S;let D=v/u;m*D>w&&(D=w/m);const R=u*D,L=m*D;return[(v-R)*.5,(w-L)*.5,R,L,D]}drawThumbnail(){if(!this.bmpShader)throw new Error("bmpShader undefined");this.bmpShader.use(this.gl),this.gl.uniform2f(this.bmpShader.uniforms.canvasWidthHeight,this.gl.canvas.width,this.gl.canvas.height);let u=this.gl.canvas.height,m=this.gl.canvas.height*this.bmpTextureWH;m>this.gl.canvas.width&&(u=this.gl.canvas.width/this.bmpTextureWH,m=this.gl.canvas.width),this.gl.uniform4f(this.bmpShader.uniforms.leftTopWidthHeight,0,0,m,u),this.gl.bindVertexArray(this.genericVAO),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4),this.gl.bindVertexArray(this.unusedVAO)}drawLine(u,m=1,A=[1,0,0,-1]){if(this.gl.bindVertexArray(this.genericVAO),!this.lineShader)throw new Error("lineShader undefined");this.lineShader.use(this.gl),A[3]<0&&(A=this.opts.crosshairColor),this.gl.uniform4fv(this.lineShader.uniforms.lineColor,A),this.gl.uniform2fv(this.lineShader.uniforms.canvasWidthHeight,[this.gl.canvas.width,this.gl.canvas.height]),this.gl.uniform1f(this.lineShader.uniforms.thickness,m),this.gl.uniform4fv(this.lineShader.uniforms.startXYendXY,u),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4),this.gl.bindVertexArray(this.unusedVAO)}draw3DLine(u,m,A=1,S=[1,0,0,-1]){if(this.gl.bindVertexArray(this.genericVAO),!this.line3DShader)throw new Error("line3DShader undefined");this.line3DShader.use(this.gl),S[3]<0&&(S=this.opts.crosshairColor),this.gl.uniform4fv(this.line3DShader.uniforms.lineColor,S),this.gl.uniform2fv(this.line3DShader.uniforms.canvasWidthHeight,[this.gl.canvas.width,this.gl.canvas.height]),this.gl.uniform1f(this.line3DShader.uniforms.thickness,A),this.gl.uniform2fv(this.line3DShader.uniforms.startXY,u),this.gl.uniform3fv(this.line3DShader.uniforms.endXYZ,m),this.gl.drawArrays(this.gl.TRIANGLE_STRIP,0,4),this.gl.bindVertexArray(this.unusedVAO)}drawDottedLine(u,m=1,A=[1,0,0,-1]){if(this.gl.bindVertexArray(this.genericVAO),!this.lineShader)throw new Error("lineShader undefined");this.lineShader.use(this.gl);const S=A[3]<0?[...this.opts.crosshairColor]:[...A];S[3]=.3;const v=fromValues(u[2]-u[0],u[3]-u[1]),w=length(v);normalize(v,v);const R=this.opts.textHeight*Math.min(this.gl.canvas.height,this.gl.canvas.width)*1;scale(v,v,R/2);const L=length(v);let P=Math.floor(w/L);w%L&&P++;const d=[u[0],u[1]];this.gl.uniform4fv(this.lineShader.uniforms.lineColor,S),this.gl.uniform2fv(this.lineShader.uniforms.canvasWidthHeight,[this.gl.canvas.width,this.gl.canvas.height]),this.gl.uniform1f(this.lineShader.uniforms.thickness,m);for(let E=0;E0&&m===0){const e=D,N=1;for(let q=0;q0&&m===1){const e=D,N=2;for(let q=0;q0&&m===2){const e=D,N=2;for(let q=0;q0&&m===0){const e=D,N=0;for(let q=0;q0&&m===1){const e=D,N=0;for(let q=0;q0&&m===2){const e=D,N=1;for(let q=0;q0){const L=w.leftTopWidthHeight.slice();let P=2;m===0&&(P=1);const d=this.frac2mm([.5,.5,.5]);for(let E=0;E0){const L=w.leftTopWidthHeight.slice(),P=w.fovMM[0]<0;let d=0;m===2&&(d=1);const E=this.frac2mm([.5,.5,.5]);for(let e=0;e"u"){if(this.meshes.length>0){this.screenSlices=[],this.opts.sliceType=4,this.draw3D(),this.opts.isColorbar&&this.drawColorbar();return}this.drawLoadingText(this.loadingText);return}if(this.back===null)return;if(this.uiData.isDragging&&this.scene.clipPlaneDepthAziElev[0]<1.8&&this.inRenderTile(this.uiData.dragStart[0],this.uiData.dragStart[1])>=0){const v=this.uiData.dragStart[0]-this.uiData.dragEnd[0],w=this.uiData.dragStart[1]-this.uiData.dragEnd[1],D=this.uiData.dragClipPlaneStartDepthAziElev.slice();if(D[1]-=v,D[1]=D[1]%360,D[2]+=w,D[1]!==this.scene.clipPlaneDepthAziElev[1]||D[2]!==this.scene.clipPlaneDepthAziElev[2])return this.scene.clipPlaneDepthAziElev=D,this.setClipPlane(this.scene.clipPlaneDepthAziElev)}if(this.sliceMosaicString.length<1&&this.opts.sliceType===4){this.opts.isColorbar&&this.reserveColorbarPanel(),this.screenSlices=[],this.draw3D(),this.opts.isColorbar&&this.drawColorbar();return}this.opts.isColorbar&&this.reserveColorbarPanel();const m=this.getMaxVols(),A=this.opts.sliceType===3&&m>1&&this.graph.autoSizeMultiplanar&&this.graph.opacity>0;if(this.sliceMosaicString.length>0)this.drawMosaic(this.sliceMosaicString);else if(this.gl.viewport(0,0,this.gl.canvas.width,this.gl.canvas.height),this.screenSlices=[],this.opts.sliceType===0)this.draw2D([0,0,0,0],0);else if(this.opts.sliceType===1)this.draw2D([0,0,0,0],1);else if(this.opts.sliceType===2)this.draw2D([0,0,0,0],2);else{const v=isFinite(this.drawPenLocation[0])&&this.opts.drawingEnabled,{volScale:w}=this.sliceScale();typeof this.opts.multiplanarPadPixels!="number"&&log.debug("multiplanarPadPixels must be numeric");const D=parseFloat(`${this.opts.multiplanarPadPixels}`),R=this.scaleSlice(w[0]+w[1],w[1]+w[2],D*1,D*1),L=Math.max(Math.max(w[1],w[2]),w[0]),P=this.scaleSlice(w[0]+w[0]+w[1],Math.max(w[1],w[2]),D*2),d=this.scaleSlice(w[0]+w[0]+w[1]+L,Math.max(w[1],w[2]),D*3),E=this.scaleSlice(L,w[1]+w[2]+w[2],0,D*2),e=this.scaleSlice(L,w[1]+w[2]+w[2]+L,0,D*3);let N=!v&&(m<2||!A),q=!1,z=!1,e0=!1;if(this.opts.multiplanarLayout===1?q=!0:this.opts.multiplanarLayout===2?z=!0:this.opts.multiplanarLayout===3?e0=!0:E[4]>P[4]&&E[4]>R[4]?q=!0:P[4]>R[4]?e0=!0:z=!0,q){let H=E;this.opts.multiplanarForceRender||e[4]>=E[4]?H=e:N=!1;const j=w[0]*H[4],y=w[1]*H[4],Y=w[2]*H[4],G=L*H[4];this.draw2D([H[0],H[1],j,y],0),this.draw2D([H[0],H[1]+y+D,j,Y],1),this.draw2D([H[0],H[1]+y+D+Y+D,y,Y],2),N&&this.draw3D([H[0],H[1]+y+Y+Y+D*3,G,G])}else if(e0){let H=P;this.opts.multiplanarForceRender||d[4]>=P[4]?H=d:N=!1;const j=w[0]*H[4],y=w[1]*H[4],Y=w[2]*H[4];this.draw2D([H[0],H[1],j,y],0),this.draw2D([H[0]+j+D,H[1],j,Y],1),this.draw2D([H[0]+j+j+D*2,H[1],y,Y],2),N&&this.draw3D([H[0]+j+j+y+D*3,H[1],H[3],H[3]])}else if(z){const H=R,j=w[0]*H[4],y=w[1]*H[4],Y=w[2]*H[4];this.draw2D([H[0],H[1]+Y+D,j,y],0),this.draw2D([H[0],H[1],j,Y],1),this.draw2D([H[0]+j+D,H[1],y,Y],2),N&&this.draw3D([H[0]+j+D,H[1]+Y+D,y,y])}}if(this.opts.isRuler&&this.drawRuler(),this.opts.isColorbar&&this.drawColorbar(),A&&this.drawGraph(),this.uiData.isDragging){if(this.uiData.mouseButtonCenterDown){this.dragForCenterButton([this.uiData.dragStart[0],this.uiData.dragStart[1],this.uiData.dragEnd[0],this.uiData.dragEnd[1]]);return}if(this.opts.dragMode===4){this.dragForSlicer3D([this.uiData.dragStart[0],this.uiData.dragStart[1],this.uiData.dragEnd[0],this.uiData.dragEnd[1]]);return}if(this.opts.dragMode===3){this.dragForPanZoom([this.uiData.dragStart[0],this.uiData.dragStart[1],this.uiData.dragEnd[0],this.uiData.dragEnd[1]]);return}if(this.inRenderTile(this.uiData.dragStart[0],this.uiData.dragStart[1])>=0)return;if(this.opts.dragMode===2){this.drawMeasurementTool([this.uiData.dragStart[0],this.uiData.dragStart[1],this.uiData.dragEnd[0],this.uiData.dragEnd[1]]);return}const v=Math.abs(this.uiData.dragStart[0]-this.uiData.dragEnd[0]),w=Math.abs(this.uiData.dragStart[1]-this.uiData.dragEnd[1]);this.drawSelectionBox([Math.min(this.uiData.dragStart[0],this.uiData.dragEnd[0]),Math.min(this.uiData.dragStart[1],this.uiData.dragEnd[1]),v,w])}const S=this.frac2mm([this.scene.crosshairPos[0],this.scene.crosshairPos[1],this.scene.crosshairPos[2]]);return u=S[0].toFixed(2)+"×"+S[1].toFixed(2)+"×"+S[2].toFixed(2),this.readyForSync=!0,this.sync(),u}drawScene(){if(this.isBusy){this.needsRefresh=!0;return}this.isBusy=!1,this.needsRefresh=!1;let u=this.drawSceneCore();return this._gl!==null&&this.gl.finish(),this.needsRefresh&&(u=this.drawScene()),u}get gl(){if(!this._gl)throw new Error("unable to get WebGL context. Maybe the browser doesn't support WebGL2.");return this._gl}set gl(u){this._gl=u}};async function main(){async function T(P){await v.loadFromFile(P[0]),v.setColormap(v.volumes[2].id,"red"),lesionSlider.oninput()}function u(P,d,E){let e=E-d,N=(P-d)/e;return Math.min(Math.max(N,0),1)}function m(){if(v.volumes.length!==3){window.alert('Please reload the page and open lesions with the "Open Lesion Map" button');return}let P=v.volumes[1].img,d=v.volumes[2].img,E=d.length;if(E!==P.length){window.alert("Lesion must precisely match mask");return}let e=0,N=0,q=0;const z=5,e0=Math.floor(w.length/z);let H=new Float64Array(E);for(let g0=0;g00&&N++,d[g0]>0&&P[g0]>0&&e++,P[g0]>1&&(H[q++]=d[g0]);if(e0!==q){window.alert("PCA and mask have different number of elements");return}let j=new Float64Array(z);for(let g0=0;g0I0+F0[Ge]*Le,0);De+=ee,Q+=De}const o0=Q/L.length*(38.72560594+1.211389735)-1.211389735,l0=(y-.00803)/.0216,c0=l0-o0,d0=c0*.0216+.00803;return[y,l0,Y,G,d0,c0]}openBtn.onclick=async function(){let P=document.createElement("input");P.style.display="none",P.type="file",document.body.appendChild(P),await v.removeVolume(v.volumes[2]),P.onchange=async function(d){await T(d.target.files)},P.click()},predictBtn.onclick=function(){const[P,d,E,e,N,q]=m(),z=`Given ${E}ml lesion (with ${e} in core neglect voxels), and acute CoC ${P} (z= ${d}), predicted chronic CoC is ${N} (z= ${q})`;window.alert(z)},aboutBtn.onclick=function(){window.alert("Drag and drop NIfTI images. Use pulldown menu to choose brainchop model")};function A(P){document.getElementById("intensity").innerHTML=P.string}const S={backColor:[.4,.4,.4,1],show3Dcrosshair:!0,onLocationChange:A,dragAndDropEnabled:!1};maskSlider.oninput=function(){v.setOpacity(1,this.value/255)},lesionSlider.oninput=function(){v.setOpacity(2,this.value/255)};const v=new Niivue(S);v.attachToCanvas(gl1);const w=(await v.loadFromUrl("./pca_values_coeff.nii.gz")).img,D=(await v.loadFromUrl("./pca_values_mu.nii.gz")).img;async function R(){const P=(await v.loadFromUrl("./models_5x10_diff.nii.gz")).img;let d=0;const E=P[d++],e=[];for(let N=0;N Niivue Neglect Predictions - + diff --git a/mask_vox.nii.gz b/mask_vox.nii.gz deleted file mode 100644 index 4ae5ede..0000000 Binary files a/mask_vox.nii.gz and /dev/null differ diff --git a/neglect_predict.m b/neglect_predict.m index 829c65b..856851c 100644 --- a/neglect_predict.m +++ b/neglect_predict.m @@ -33,7 +33,8 @@ function neglect_predict(fnm, acuteCoC) maskVox = uint8(maskVox012 > 1); ROI_volVox = nnz(maskROI & lesion); ROI_volML = ROI_volVox / 1000; %convert voxels to ML - fprintf("%d lesioned voxels in ROI mask: %g ml\n", ROI_volVox, ROI_volML); + lesionVolTotalML = nnz(lesion) / 1000; %convert voxels to ML + % fprintf("%d lesioned voxels in ROI mask: %g ml\n", ROI_volVox, ROI_volML); %PCA fnmPCA = fullfile(mpath, 'pca_values_5x21220.mat'); if ~exist(fnmPCA,'file') @@ -89,7 +90,17 @@ function neglect_predict(fnm, acuteCoC) end % Calculate mean prediction prediction_mean = mean(predictions_mdls); - disp(['Mean prediction: ' num2str(prediction_mean)]); + diffZ = prediction_mean * (38.72560594 + 1.211389735) - 1.211389735; + % calculate acute z-score based on user input CoC + acuteZ = (acuteCoC - 0.00803)/0.0216; % mean/SD of controls + % calculate chronic z-score that can be interpreted by the user + chronZ = acuteZ-diffZ; + chronCoC = chronZ * 0.0216 + 0.00803; + % output text + % "Acute z-score = xxx; z-score difference (predicted) = xxx; chronic z-score = xxx. + % The predicted score represents the direct improvement between acute and chronic stroke phase (i.e. acute z-score minus chronic z-score). Negative values and a z-score % of about 0 indicate no deficit; the larger the z-score, the more severe the neglect behavior." + str = sprintf('Given %gml lesion (with %g in core neglect voxels), and acute CoC %g (z= %g), predicted chronic CoC is %g (z= %g)\n', lesionVolTotalML, ROI_volML, acuteCoC, acuteZ, chronCoC, chronZ); + disp(str); end function ret = norm0to1(val, mn, mx) %return normalized 0..1, linearly interpolated min..max

>>15)|0,p=C>>>(p+7|0)&1|p<<1):p=0,t=e[41176+(p<<2)>>2]|0;e:do if(!t)o=0,t=0,M=86;else for(a=n,o=0,c=C<<((p|0)==31?0:25-(p>>>1)|0),h=t,t=0;;){if(l=e[h+4>>2]&-8,n=l-C|0,n>>>0>>0)if((l|0)==(C|0)){l=h,t=h,M=90;break e}else t=h;else n=a;if(M=e[h+20>>2]|0,h=e[h+16+(c>>>31<<2)>>2]|0,o=(M|0)==0|(M|0)==(h|0)?o:M,h)a=n,c=c<<1;else{M=86;break}}while(!1);if((M|0)==86){if((o|0)==0&(t|0)==0){if(t=2<>>12&16,t=t>>>I,g=t>>>5&8,t=t>>>g,U=t>>>2&4,t=t>>>U,B=t>>>1&2,t=t>>>B,o=t>>>1&1,o=e[41176+((g|I|U|B|o)+(t>>>o)<<2)>>2]|0,t=0}o?(l=o,M=90):(c=n,h=t)}if((M|0)==90)for(;;){if(M=0,B=(e[l+4>>2]&-8)-C|0,o=B>>>0>>0,n=o?B:n,t=o?l:t,o=e[l+16>>2]|0,o){l=o,M=90;continue}if(l=e[l+20>>2]|0,l)M=90;else{c=n,h=t;break}}if(h|0&&c>>>0<((e[10220]|0)-C|0)>>>0){o=e[10222]|0,h>>>0>>0&&ae(),a=h+C|0,h>>>0>=a>>>0&&ae(),l=e[h+24>>2]|0,n=e[h+12>>2]|0;do if((n|0)==(h|0)){if(t=h+20|0,r=e[t>>2]|0,!r&&(t=h+16|0,r=e[t>>2]|0,!r)){k=0;break}for(;;){if(n=r+20|0,s=e[n>>2]|0,s){r=s,t=n;continue}if(n=r+16|0,s=e[n>>2]|0,s)r=s,t=n;else break}if(t>>>0>>0)ae();else{e[t>>2]=0,k=r;break}}else if(s=e[h+8>>2]|0,s>>>0>>0&&ae(),r=s+12|0,(e[r>>2]|0)!=(h|0)&&ae(),t=n+8|0,(e[t>>2]|0)==(h|0)){e[r>>2]=n,e[t>>2]=s,k=n;break}else ae();while(!1);do if(l){if(r=e[h+28>>2]|0,t=41176+(r<<2)|0,(h|0)==(e[t>>2]|0)){if(e[t>>2]=k,!k){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),r=l+16|0,(e[r>>2]|0)==(h|0)?e[r>>2]=k:e[l+20>>2]=k,!k)break;t=e[10222]|0,k>>>0>>0&&ae(),e[k+24>>2]=l,r=e[h+16>>2]|0;do if(r)if(r>>>0>>0)ae();else{e[k+16>>2]=r,e[r+24>>2]=k;break}while(!1);if(r=e[h+20>>2]|0,r)if(r>>>0<(e[10222]|0)>>>0)ae();else{e[k+20>>2]=r,e[r+24>>2]=k;break}}while(!1);e:do if(c>>>0>=16){if(e[h+4>>2]=C|3,e[h+(C|4)>>2]=c|1,e[h+(c+C)>>2]=c,r=c>>>3,c>>>0<256){t=r<<1,s=40912+(t<<2)|0,n=e[10218]|0,r=1<>2]|0,t>>>0<(e[10222]|0)>>>0?ae():(O=r,_=t)):(e[10218]=n|r,O=40912+(t+2<<2)|0,_=s),e[O>>2]=a,e[_+12>>2]=a,e[h+(C+8)>>2]=_,e[h+(C+12)>>2]=s;break}if(r=c>>>8,r?c>>>0>16777215?s=31:(Ve=(r+1048320|0)>>>16&8,ne=r<>>16&4,ne=ne<>>16&2,s=14-(le|Ve|s)+(ne<>>15)|0,s=c>>>(s+7|0)&1|s<<1):s=0,r=41176+(s<<2)|0,e[h+(C+28)>>2]=s,e[h+(C+20)>>2]=0,e[h+(C+16)>>2]=0,t=e[10219]|0,n=1<>2]=a,e[h+(C+24)>>2]=r,e[h+(C+12)>>2]=a,e[h+(C+8)>>2]=a;break}r=e[r>>2]|0;i:do if((e[r+4>>2]&-8|0)!=(c|0)){for(s=c<<((s|0)==31?0:25-(s>>>1)|0);t=r+16+(s>>>31<<2)|0,n=e[t>>2]|0,!!n;)if((e[n+4>>2]&-8|0)==(c|0)){t0=n;break i}else s=s<<1,r=n;if(t>>>0<(e[10222]|0)>>>0)ae();else{e[t>>2]=a,e[h+(C+24)>>2]=r,e[h+(C+12)>>2]=a,e[h+(C+8)>>2]=a;break e}}else t0=r;while(!1);if(r=t0+8|0,t=e[r>>2]|0,ne=e[10222]|0,t>>>0>=ne>>>0&t0>>>0>=ne>>>0){e[t+12>>2]=a,e[r>>2]=a,e[h+(C+8)>>2]=t,e[h+(C+12)>>2]=t0,e[h+(C+24)>>2]=0;break}else ae()}else ne=c+C|0,e[h+4>>2]=ne|3,ne=h+(ne+4)|0,e[ne>>2]=e[ne>>2]|1;while(!1);return ne=h+8|0,ne|0}else B=C}else B=C;else B=-1;while(!1);if(n=e[10220]|0,n>>>0>=B>>>0)return r=n-B|0,t=e[10223]|0,r>>>0>15?(e[10223]=t+B,e[10220]=r,e[t+(B+4)>>2]=r|1,e[t+n>>2]=r,e[t+4>>2]=B|3):(e[10220]=0,e[10223]=0,e[t+4>>2]=n|3,ne=t+(n+4)|0,e[ne>>2]=e[ne>>2]|1),ne=t+8|0,ne|0;if(t=e[10221]|0,t>>>0>B>>>0)return Ve=t-B|0,e[10221]=Ve,ne=e[10224]|0,e[10224]=ne+B,e[ne+(B+4)>>2]=Ve|1,e[ne+4>>2]=B|3,ne=ne+8|0,ne|0;do if(!(e[10336]|0))if(t=bn(30)|0,t+-1&t)ae();else{e[10338]=t,e[10337]=t,e[10339]=-1,e[10340]=-1,e[10341]=0,e[10329]=0,t0=(Wn(0)|0)&-16^1431655768,e[10336]=t0;break}while(!1);if(h=B+48|0,c=e[10338]|0,p=B+47|0,a=c+p|0,c=0-c|0,g=a&c,g>>>0<=B>>>0||(t=e[10328]|0,t|0&&(_=e[10326]|0,t0=_+g|0,t0>>>0<=_>>>0|t0>>>0>t>>>0)))return ne=0,ne|0;e:do if(e[10329]&4)t=0,M=191;else{t=e[10224]|0;i:do if(t){for(o=41320;;){if(n=e[o>>2]|0,n>>>0<=t>>>0&&(V=o+4|0,(n+(e[V>>2]|0)|0)>>>0>t>>>0)){l=o,t=V;break}if(o=e[o+8>>2]|0,!o){M=174;break i}}if(n=a-(e[10221]|0)&c,n>>>0<2147483647)if(o=_t(n|0)|0,t0=(o|0)==((e[l>>2]|0)+(e[t>>2]|0)|0),t=t0?n:0,t0){if((o|0)!=-1){X=o,U=t,M=194;break e}}else M=184;else t=0}else M=174;while(!1);do if((M|0)==174)if(l=_t(0)|0,(l|0)!=-1)if(t=l,n=e[10337]|0,o=n+-1|0,o&t?n=g-t+(o+t&0-n)|0:n=g,t=e[10326]|0,o=t+n|0,n>>>0>B>>>0&n>>>0<2147483647){if(t0=e[10328]|0,t0|0&&o>>>0<=t>>>0|o>>>0>t0>>>0){t=0;break}if(o=_t(n|0)|0,t0=(o|0)==(l|0),t=t0?n:0,t0){X=l,U=t,M=194;break e}else M=184}else t=0;else t=0;while(!1);i:do if((M|0)==184){l=0-n|0;do if(h>>>0>n>>>0&(n>>>0<2147483647&(o|0)!=-1)&&(F=e[10338]|0,F=p-n+F&0-F,F>>>0<2147483647))if((_t(F|0)|0)==-1){_t(l|0)|0;break i}else{n=F+n|0;break}while(!1);if((o|0)!=-1){X=o,U=n,M=194;break e}}while(!1);e[10329]=e[10329]|4,M=191}while(!1);if((M|0)==191&&g>>>0<2147483647&&(X=_t(g|0)|0,K=_t(0)|0,X>>>0>>0&((X|0)!=-1&(K|0)!=-1))&&(Z=K-X|0,s0=Z>>>0>(B+40|0)>>>0,s0)&&(U=s0?Z:t,M=194),(M|0)==194){t=(e[10326]|0)+U|0,e[10326]=t,t>>>0>(e[10327]|0)>>>0&&(e[10327]=t),a=e[10224]|0;e:do if(a){l=41320;do{if(t=e[l>>2]|0,n=l+4|0,o=e[n>>2]|0,(X|0)==(t+o|0)){w0=t,v0=n,A0=o,Y0=l,M=204;break}l=e[l+8>>2]|0}while(l|0);if((M|0)==204&&!(e[Y0+12>>2]&8|0)&&a>>>0>>0&a>>>0>=w0>>>0){e[v0>>2]=A0+U,ne=(e[10221]|0)+U|0,Ve=a+8|0,Ve=Ve&7|0?0-Ve&7:0,le=ne-Ve|0,e[10224]=a+Ve,e[10221]=le,e[a+(Ve+4)>>2]=le|1,e[a+(ne+4)>>2]=40,e[10225]=e[10340];break}for(t=e[10222]|0,X>>>0>>0&&(e[10222]=X,t=X),n=X+U|0,l=41320;;){if((e[l>>2]|0)==(n|0)){o=l,n=l,M=212;break}if(l=e[l+8>>2]|0,!l){n=41320;break}}if((M|0)==212)if(e[n+12>>2]&8)n=41320;else{e[o>>2]=X,I=n+4|0,e[I>>2]=(e[I>>2]|0)+U,I=X+8|0,I=I&7|0?0-I&7:0,p=X+(U+8)|0,p=p&7|0?0-p&7:0,r=X+(p+U)|0,C=I+B|0,k=X+C|0,g=r-(X+I)-B|0,e[X+(I+4)>>2]=B|3;i:do if((r|0)!=(a|0)){if((r|0)==(e[10223]|0)){ne=(e[10220]|0)+g|0,e[10220]=ne,e[10223]=k,e[X+(C+4)>>2]=ne|1,e[X+(ne+C)>>2]=ne;break}if(c=U+4|0,n=e[X+(c+p)>>2]|0,(n&3|0)==1){h=n&-8,l=n>>>3;t:do if(n>>>0>=256){a=e[X+((p|24)+U)>>2]|0,s=e[X+(U+12+p)>>2]|0;do if((s|0)==(r|0)){if(o=p|16,s=X+(c+o)|0,n=e[s>>2]|0,!n&&(s=X+(o+U)|0,n=e[s>>2]|0,!n)){_e=0;break}for(;;){if(o=n+20|0,l=e[o>>2]|0,l){n=l,s=o;continue}if(o=n+16|0,l=e[o>>2]|0,l)n=l,s=o;else break}if(s>>>0>>0)ae();else{e[s>>2]=0,_e=n;break}}else if(o=e[X+((p|8)+U)>>2]|0,o>>>0>>0&&ae(),t=o+12|0,(e[t>>2]|0)!=(r|0)&&ae(),n=s+8|0,(e[n>>2]|0)==(r|0)){e[t>>2]=s,e[n>>2]=o,_e=s;break}else ae();while(!1);if(!a)break;t=e[X+(U+28+p)>>2]|0,n=41176+(t<<2)|0;do if((r|0)!=(e[n>>2]|0)){if(a>>>0<(e[10222]|0)>>>0&&ae(),t=a+16|0,(e[t>>2]|0)==(r|0)?e[t>>2]=_e:e[a+20>>2]=_e,!_e)break t}else{if(e[n>>2]=_e,_e)break;e[10219]=e[10219]&~(1<>>0>>0&&ae(),e[_e+24>>2]=a,r=p|16,t=e[X+(r+U)>>2]|0;do if(t)if(t>>>0>>0)ae();else{e[_e+16>>2]=t,e[t+24>>2]=_e;break}while(!1);if(r=e[X+(c+r)>>2]|0,!r)break;if(r>>>0<(e[10222]|0)>>>0)ae();else{e[_e+20>>2]=r,e[r+24>>2]=_e;break}}else{s=e[X+((p|8)+U)>>2]|0,o=e[X+(U+12+p)>>2]|0,n=40912+(l<<1<<2)|0;do if((s|0)!=(n|0)){if(s>>>0>>0&&ae(),(e[s+12>>2]|0)==(r|0))break;ae()}while(!1);if((o|0)==(s|0)){e[10218]=e[10218]&~(1<>>0>>0&&ae(),t=o+8|0,(e[t>>2]|0)==(r|0)){ze=t;break}ae()}while(!1);e[s+12>>2]=o,e[ze>>2]=s}while(!1);r=X+((h|p)+U)|0,o=h+g|0}else o=g;if(r=r+4|0,e[r>>2]=e[r>>2]&-2,e[X+(C+4)>>2]=o|1,e[X+(o+C)>>2]=o,r=o>>>3,o>>>0<256){t=r<<1,s=40912+(t<<2)|0,n=e[10218]|0,r=1<>2]|0,t>>>0>=(e[10222]|0)>>>0){le=r,Ve=t;break}ae()}while(!1);e[le>>2]=k,e[Ve+12>>2]=k,e[X+(C+8)>>2]=Ve,e[X+(C+12)>>2]=s;break}r=o>>>8;do if(!r)s=0;else{if(o>>>0>16777215){s=31;break}le=(r+1048320|0)>>>16&8,Ve=r<>>16&4,Ve=Ve<<_e,s=(Ve+245760|0)>>>16&2,s=14-(_e|le|s)+(Ve<>>15)|0,s=o>>>(s+7|0)&1|s<<1}while(!1);if(r=41176+(s<<2)|0,e[X+(C+28)>>2]=s,e[X+(C+20)>>2]=0,e[X+(C+16)>>2]=0,t=e[10219]|0,n=1<>2]=k,e[X+(C+24)>>2]=r,e[X+(C+12)>>2]=k,e[X+(C+8)>>2]=k;break}r=e[r>>2]|0;t:do if((e[r+4>>2]&-8|0)!=(o|0)){for(s=o<<((s|0)==31?0:25-(s>>>1)|0);t=r+16+(s>>>31<<2)|0,n=e[t>>2]|0,!!n;)if((e[n+4>>2]&-8|0)==(o|0)){ne=n;break t}else s=s<<1,r=n;if(t>>>0<(e[10222]|0)>>>0)ae();else{e[t>>2]=k,e[X+(C+24)>>2]=r,e[X+(C+12)>>2]=k,e[X+(C+8)>>2]=k;break i}}else ne=r;while(!1);if(r=ne+8|0,t=e[r>>2]|0,Ve=e[10222]|0,t>>>0>=Ve>>>0&ne>>>0>=Ve>>>0){e[t+12>>2]=k,e[r>>2]=k,e[X+(C+8)>>2]=t,e[X+(C+12)>>2]=ne,e[X+(C+24)>>2]=0;break}else ae()}else ne=(e[10221]|0)+g|0,e[10221]=ne,e[10224]=k,e[X+(C+4)>>2]=ne|1;while(!1);return ne=X+(I|8)|0,ne|0}for(;t=e[n>>2]|0,!(t>>>0<=a>>>0&&(r=e[n+4>>2]|0,s=t+r|0,s>>>0>a>>>0));)n=e[n+8>>2]|0;if(o=t+(r+-39)|0,t=t+(r+-47+(o&7|0?0-o&7:0))|0,o=a+16|0,t=t>>>0>>0?a:t,r=t+8|0,n=X+8|0,n=n&7|0?0-n&7:0,ne=U+-40-n|0,e[10224]=X+n,e[10221]=ne,e[X+(n+4)>>2]=ne|1,e[X+(U+-36)>>2]=40,e[10225]=e[10340],n=t+4|0,e[n>>2]=27,e[r>>2]=e[10330],e[r+4>>2]=e[10331],e[r+8>>2]=e[10332],e[r+12>>2]=e[10333],e[10330]=X,e[10331]=U,e[10333]=0,e[10332]=r,r=t+28|0,e[r>>2]=7,(t+32|0)>>>0>>0)do ne=r,r=r+4|0,e[r>>2]=7;while((ne+8|0)>>>0>>0);if((t|0)!=(a|0)){if(l=t-a|0,e[n>>2]=e[n>>2]&-2,e[a+4>>2]=l|1,e[t>>2]=l,r=l>>>3,l>>>0<256){t=r<<1,s=40912+(t<<2)|0,n=e[10218]|0,r=1<>2]|0,t>>>0<(e[10222]|0)>>>0?ae():(Re=r,ei=t)):(e[10218]=n|r,Re=40912+(t+2<<2)|0,ei=s),e[Re>>2]=a,e[ei+12>>2]=a,e[a+8>>2]=ei,e[a+12>>2]=s;break}if(r=l>>>8,r?l>>>0>16777215?s=31:(Ve=(r+1048320|0)>>>16&8,ne=r<>>16&4,ne=ne<>>16&2,s=14-(le|Ve|s)+(ne<>>15)|0,s=l>>>(s+7|0)&1|s<<1):s=0,n=41176+(s<<2)|0,e[a+28>>2]=s,e[a+20>>2]=0,e[o>>2]=0,r=e[10219]|0,t=1<>2]=a,e[a+24>>2]=n,e[a+12>>2]=a,e[a+8>>2]=a;break}r=e[n>>2]|0;i:do if((e[r+4>>2]&-8|0)!=(l|0)){for(s=l<<((s|0)==31?0:25-(s>>>1)|0);t=r+16+(s>>>31<<2)|0,n=e[t>>2]|0,!!n;)if((e[n+4>>2]&-8|0)==(l|0)){We=n;break i}else s=s<<1,r=n;if(t>>>0<(e[10222]|0)>>>0)ae();else{e[t>>2]=a,e[a+24>>2]=r,e[a+12>>2]=a,e[a+8>>2]=a;break e}}else We=r;while(!1);if(r=We+8|0,t=e[r>>2]|0,ne=e[10222]|0,t>>>0>=ne>>>0&We>>>0>=ne>>>0){e[t+12>>2]=a,e[r>>2]=a,e[a+8>>2]=t,e[a+12>>2]=We,e[a+24>>2]=0;break}else ae()}}else{ne=e[10222]|0,(ne|0)==0|X>>>0>>0&&(e[10222]=X),e[10330]=X,e[10331]=U,e[10333]=0,e[10227]=e[10336],e[10226]=-1,r=0;do ne=r<<1,Ve=40912+(ne<<2)|0,e[40912+(ne+3<<2)>>2]=Ve,e[40912+(ne+2<<2)>>2]=Ve,r=r+1|0;while((r|0)!=32);ne=X+8|0,ne=ne&7|0?0-ne&7:0,Ve=U+-40-ne|0,e[10224]=X+ne,e[10221]=Ve,e[X+(ne+4)>>2]=Ve|1,e[X+(U+-36)>>2]=40,e[10225]=e[10340]}while(!1);if(r=e[10221]|0,r>>>0>B>>>0)return Ve=r-B|0,e[10221]=Ve,ne=e[10224]|0,e[10224]=ne+B,e[ne+(B+4)>>2]=Ve|1,e[ne+4>>2]=B|3,ne=ne+8|0,ne|0}return ne=di()|0,e[ne>>2]=12,ne=0,ne|0}function Ze(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0,F=0;if(t){r=t+-8|0,c=e[10222]|0,r>>>0>>0&&ae(),n=e[t+-4>>2]|0,s=n&3,(s|0)==1&&ae(),k=n&-8,B=t+(k+-8)|0;do if(n&1)F=r,l=k;else{if(r=e[r>>2]|0,!s)return;if(h=-8-r|0,g=t+h|0,C=r+k|0,g>>>0>>0&&ae(),(g|0)==(e[10223]|0)){if(r=t+(k+-4)|0,n=e[r>>2]|0,(n&3|0)!=3){F=g,l=C;break}e[10220]=C,e[r>>2]=n&-2,e[t+(h+4)>>2]=C|1,e[B>>2]=C;return}if(o=r>>>3,r>>>0<256){if(s=e[t+(h+8)>>2]|0,n=e[t+(h+12)>>2]|0,r=40912+(o<<1<<2)|0,(s|0)!=(r|0)&&(s>>>0>>0&&ae(),(e[s+12>>2]|0)!=(g|0)&&ae()),(n|0)==(s|0)){e[10218]=e[10218]&~(1<>>0>>0&&ae(),r=n+8|0,(e[r>>2]|0)==(g|0)?a=r:ae()):a=n+8|0,e[s+12>>2]=n,e[a>>2]=s,F=g,l=C;break}a=e[t+(h+24)>>2]|0,s=e[t+(h+12)>>2]|0;do if((s|0)==(g|0)){if(n=t+(h+20)|0,r=e[n>>2]|0,!r&&(n=t+(h+16)|0,r=e[n>>2]|0,!r)){p=0;break}for(;;){if(s=r+20|0,o=e[s>>2]|0,o){r=o,n=s;continue}if(s=r+16|0,o=e[s>>2]|0,o)r=o,n=s;else break}if(n>>>0>>0)ae();else{e[n>>2]=0,p=r;break}}else if(o=e[t+(h+8)>>2]|0,o>>>0>>0&&ae(),r=o+12|0,(e[r>>2]|0)!=(g|0)&&ae(),n=s+8|0,(e[n>>2]|0)==(g|0)){e[r>>2]=s,e[n>>2]=o,p=s;break}else ae();while(!1);if(a){if(r=e[t+(h+28)>>2]|0,n=41176+(r<<2)|0,(g|0)==(e[n>>2]|0)){if(e[n>>2]=p,!p){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),r=a+16|0,(e[r>>2]|0)==(g|0)?e[r>>2]=p:e[a+20>>2]=p,!p){F=g,l=C;break}n=e[10222]|0,p>>>0>>0&&ae(),e[p+24>>2]=a,r=e[t+(h+16)>>2]|0;do if(r)if(r>>>0>>0)ae();else{e[p+16>>2]=r,e[r+24>>2]=p;break}while(!1);if(r=e[t+(h+20)>>2]|0,r)if(r>>>0<(e[10222]|0)>>>0)ae();else{e[p+20>>2]=r,e[r+24>>2]=p,F=g,l=C;break}else F=g,l=C}else F=g,l=C}while(!1);if(F>>>0>=B>>>0&&ae(),r=t+(k+-4)|0,n=e[r>>2]|0,n&1||ae(),n&2)e[r>>2]=n&-2,e[F+4>>2]=l|1,e[F+l>>2]=l;else{if((B|0)==(e[10224]|0)){if(_=(e[10221]|0)+l|0,e[10221]=_,e[10224]=F,e[F+4>>2]=_|1,(F|0)!=(e[10223]|0))return;e[10223]=0,e[10220]=0;return}if((B|0)==(e[10223]|0)){_=(e[10220]|0)+l|0,e[10220]=_,e[10223]=F,e[F+4>>2]=_|1,e[F+_>>2]=_;return}l=(n&-8)+l|0,o=n>>>3;do if(n>>>0>=256){a=e[t+(k+16)>>2]|0,r=e[t+(k|4)>>2]|0;do if((r|0)==(B|0)){if(n=t+(k+12)|0,r=e[n>>2]|0,!r&&(n=t+(k+8)|0,r=e[n>>2]|0,!r)){U=0;break}for(;;){if(s=r+20|0,o=e[s>>2]|0,o){r=o,n=s;continue}if(s=r+16|0,o=e[s>>2]|0,o)r=o,n=s;else break}if(n>>>0<(e[10222]|0)>>>0)ae();else{e[n>>2]=0,U=r;break}}else if(n=e[t+k>>2]|0,n>>>0<(e[10222]|0)>>>0&&ae(),s=n+12|0,(e[s>>2]|0)!=(B|0)&&ae(),o=r+8|0,(e[o>>2]|0)==(B|0)){e[s>>2]=r,e[o>>2]=n,U=r;break}else ae();while(!1);if(a){if(r=e[t+(k+20)>>2]|0,n=41176+(r<<2)|0,(B|0)==(e[n>>2]|0)){if(e[n>>2]=U,!U){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),r=a+16|0,(e[r>>2]|0)==(B|0)?e[r>>2]=U:e[a+20>>2]=U,!U)break;n=e[10222]|0,U>>>0>>0&&ae(),e[U+24>>2]=a,r=e[t+(k+8)>>2]|0;do if(r)if(r>>>0>>0)ae();else{e[U+16>>2]=r,e[r+24>>2]=U;break}while(!1);if(r=e[t+(k+12)>>2]|0,r)if(r>>>0<(e[10222]|0)>>>0)ae();else{e[U+20>>2]=r,e[r+24>>2]=U;break}}}else{if(s=e[t+k>>2]|0,n=e[t+(k|4)>>2]|0,r=40912+(o<<1<<2)|0,(s|0)!=(r|0)&&(s>>>0<(e[10222]|0)>>>0&&ae(),(e[s+12>>2]|0)!=(B|0)&&ae()),(n|0)==(s|0)){e[10218]=e[10218]&~(1<>>0<(e[10222]|0)>>>0&&ae(),r=n+8|0,(e[r>>2]|0)==(B|0)?I=r:ae()):I=n+8|0,e[s+12>>2]=n,e[I>>2]=s}while(!1);if(e[F+4>>2]=l|1,e[F+l>>2]=l,(F|0)==(e[10223]|0)){e[10220]=l;return}}if(r=l>>>3,l>>>0<256){n=r<<1,o=40912+(n<<2)|0,s=e[10218]|0,r=1<>2]|0,n>>>0<(e[10222]|0)>>>0?ae():(V=r,O=n)):(e[10218]=s|r,V=40912+(n+2<<2)|0,O=o),e[V>>2]=F,e[O+12>>2]=F,e[F+8>>2]=O,e[F+12>>2]=o;return}r=l>>>8,r?l>>>0>16777215?o=31:(V=(r+1048320|0)>>>16&8,O=r<>>16&4,O=O<>>16&2,o=14-(B|V|o)+(O<>>15)|0,o=l>>>(o+7|0)&1|o<<1):o=0,r=41176+(o<<2)|0,e[F+28>>2]=o,e[F+20>>2]=0,e[F+16>>2]=0,n=e[10219]|0,s=1<>2]|0;i:do if((e[r+4>>2]&-8|0)!=(l|0)){for(o=l<<((o|0)==31?0:25-(o>>>1)|0);n=r+16+(o>>>31<<2)|0,s=e[n>>2]|0,!!s;)if((e[s+4>>2]&-8|0)==(l|0)){_=s;break i}else o=o<<1,r=s;if(n>>>0<(e[10222]|0)>>>0)ae();else{e[n>>2]=F,e[F+24>>2]=r,e[F+12>>2]=F,e[F+8>>2]=F;break e}}else _=r;while(!1);if(r=_+8|0,n=e[r>>2]|0,O=e[10222]|0,n>>>0>=O>>>0&_>>>0>=O>>>0){e[n+12>>2]=F,e[r>>2]=F,e[F+8>>2]=n,e[F+12>>2]=_,e[F+24>>2]=0;break}else ae()}else e[10219]=n|s,e[r>>2]=F,e[F+24>>2]=r,e[F+12>>2]=F,e[F+8>>2]=F;while(!1);if(F=(e[10226]|0)+-1|0,e[10226]=F,!F)r=41328;else return;for(;r=e[r>>2]|0,r;)r=r+8|0;e[10226]=-1}}function vh(t,r){t=t|0,r=r|0;var n=0;return t?(n=W(r,t)|0,(r|t)>>>0>65535&&(n=((n>>>0)/(t>>>0)|0|0)==(r|0)?n:-1)):n=0,r=xi(n)|0,!r||!(e[r+-4>>2]&3)||je(r|0,0,n|0)|0,r|0}function bt(t,r){t=t|0,r=r|0;var n=0,s=0;return t?r>>>0>4294967231?(t=di()|0,e[t>>2]=12,t=0,t|0):(n=wh(t+-8|0,r>>>0<11?16:r+11&-8)|0,n?(t=n+8|0,t|0):(n=xi(r)|0,n?(s=e[t+-4>>2]|0,s=(s&-8)-(s&3|0?4:8)|0,ii(n|0,t|0,(s>>>0>>0?s:r)|0)|0,Ze(t),t=n,t|0):(t=0,t|0))):(t=xi(r)|0,t|0)}function wh(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0;if(k=t+4|0,U=e[k>>2]|0,h=U&-8,g=t+h|0,c=e[10222]|0,n=U&3,(n|0)!=1&t>>>0>=c>>>0&t>>>0>>0||ae(),s=t+(h|4)|0,o=e[s>>2]|0,o&1||ae(),!n)return r>>>0<256?(t=0,t|0):(h>>>0>=(r+4|0)>>>0&&(h-r|0)>>>0<=e[10338]<<1>>>0||(t=0),t|0);if(h>>>0>=r>>>0)return n=h-r|0,n>>>0<=15||(e[k>>2]=U&1|r|2,e[t+(r+4)>>2]=n|3,e[s>>2]=e[s>>2]|1,M2(t+r|0,n)),t|0;if((g|0)==(e[10224]|0))return n=(e[10221]|0)+h|0,n>>>0<=r>>>0?(t=0,t|0):(I=n-r|0,e[k>>2]=U&1|r|2,e[t+(r+4)>>2]=I|1,e[10224]=t+r,e[10221]=I,t|0);if((g|0)==(e[10223]|0))return s=(e[10220]|0)+h|0,s>>>0>>0?(t=0,t|0):(n=s-r|0,n>>>0>15?(e[k>>2]=U&1|r|2,e[t+(r+4)>>2]=n|1,e[t+s>>2]=n,s=t+(s+4)|0,e[s>>2]=e[s>>2]&-2,s=t+r|0):(e[k>>2]=U&1|s|2,s=t+(s+4)|0,e[s>>2]=e[s>>2]|1,s=0,n=0),e[10220]=n,e[10223]=s,t|0);if(o&2||(C=(o&-8)+h|0,C>>>0>>0))return t=0,t|0;I=C-r|0,l=o>>>3;do if(o>>>0>=256){a=e[t+(h+24)>>2]|0,l=e[t+(h+12)>>2]|0;do if((l|0)==(g|0)){if(s=t+(h+20)|0,n=e[s>>2]|0,!n&&(s=t+(h+16)|0,n=e[s>>2]|0,!n)){p=0;break}for(;;){if(o=n+20|0,l=e[o>>2]|0,l){n=l,s=o;continue}if(o=n+16|0,l=e[o>>2]|0,l)n=l,s=o;else break}if(s>>>0>>0)ae();else{e[s>>2]=0,p=n;break}}else if(o=e[t+(h+8)>>2]|0,o>>>0>>0&&ae(),n=o+12|0,(e[n>>2]|0)!=(g|0)&&ae(),s=l+8|0,(e[s>>2]|0)==(g|0)){e[n>>2]=l,e[s>>2]=o,p=l;break}else ae();while(!1);if(a){if(n=e[t+(h+28)>>2]|0,s=41176+(n<<2)|0,(g|0)==(e[s>>2]|0)){if(e[s>>2]=p,!p){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),n=a+16|0,(e[n>>2]|0)==(g|0)?e[n>>2]=p:e[a+20>>2]=p,!p)break;s=e[10222]|0,p>>>0>>0&&ae(),e[p+24>>2]=a,n=e[t+(h+16)>>2]|0;do if(n)if(n>>>0>>0)ae();else{e[p+16>>2]=n,e[n+24>>2]=p;break}while(!1);if(n=e[t+(h+20)>>2]|0,n)if(n>>>0<(e[10222]|0)>>>0)ae();else{e[p+20>>2]=n,e[n+24>>2]=p;break}}}else{if(o=e[t+(h+8)>>2]|0,s=e[t+(h+12)>>2]|0,n=40912+(l<<1<<2)|0,(o|0)!=(n|0)&&(o>>>0>>0&&ae(),(e[o+12>>2]|0)!=(g|0)&&ae()),(s|0)==(o|0)){e[10218]=e[10218]&~(1<>>0>>0&&ae(),n=s+8|0,(e[n>>2]|0)==(g|0)?a=n:ae()):a=s+8|0,e[o+12>>2]=s,e[a>>2]=o}while(!1);return I>>>0<16?(e[k>>2]=C|U&1|2,r=t+(C|4)|0,e[r>>2]=e[r>>2]|1,t|0):(e[k>>2]=U&1|r|2,e[t+(r+4)>>2]=I|3,U=t+(C|4)|0,e[U>>2]=e[U>>2]|1,M2(t+r|0,I),t|0)}function M2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0,O=0,_=0;B=t+r|0,n=e[t+4>>2]|0;do if(n&1)_=t,a=r;else{if(p=e[t>>2]|0,!(n&3))return;if(I=t+(0-p)|0,C=p+r|0,h=e[10222]|0,I>>>0>>0&&ae(),(I|0)==(e[10223]|0)){if(s=t+(r+4)|0,n=e[s>>2]|0,(n&3|0)!=3){_=I,a=C;break}e[10220]=C,e[s>>2]=n&-2,e[t+(4-p)>>2]=C|1,e[B>>2]=C;return}if(l=p>>>3,p>>>0<256){if(o=e[t+(8-p)>>2]|0,s=e[t+(12-p)>>2]|0,n=40912+(l<<1<<2)|0,(o|0)!=(n|0)&&(o>>>0>>0&&ae(),(e[o+12>>2]|0)!=(I|0)&&ae()),(s|0)==(o|0)){e[10218]=e[10218]&~(1<>>0>>0&&ae(),n=s+8|0,(e[n>>2]|0)==(I|0)?c=n:ae()):c=s+8|0,e[o+12>>2]=s,e[c>>2]=o,_=I,a=C;break}c=e[t+(24-p)>>2]|0,o=e[t+(12-p)>>2]|0;do if((o|0)==(I|0)){if(o=16-p|0,s=t+(o+4)|0,n=e[s>>2]|0,!n&&(s=t+o|0,n=e[s>>2]|0,!n)){g=0;break}for(;;){if(o=n+20|0,l=e[o>>2]|0,l){n=l,s=o;continue}if(o=n+16|0,l=e[o>>2]|0,l)n=l,s=o;else break}if(s>>>0>>0)ae();else{e[s>>2]=0,g=n;break}}else if(l=e[t+(8-p)>>2]|0,l>>>0>>0&&ae(),n=l+12|0,(e[n>>2]|0)!=(I|0)&&ae(),s=o+8|0,(e[s>>2]|0)==(I|0)){e[n>>2]=o,e[s>>2]=l,g=o;break}else ae();while(!1);if(c){if(n=e[t+(28-p)>>2]|0,s=41176+(n<<2)|0,(I|0)==(e[s>>2]|0)){if(e[s>>2]=g,!g){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),n=c+16|0,(e[n>>2]|0)==(I|0)?e[n>>2]=g:e[c+20>>2]=g,!g){_=I,a=C;break}o=e[10222]|0,g>>>0>>0&&ae(),e[g+24>>2]=c,n=16-p|0,s=e[t+n>>2]|0;do if(s)if(s>>>0>>0)ae();else{e[g+16>>2]=s,e[s+24>>2]=g;break}while(!1);if(n=e[t+(n+4)>>2]|0,n)if(n>>>0<(e[10222]|0)>>>0)ae();else{e[g+20>>2]=n,e[n+24>>2]=g,_=I,a=C;break}else _=I,a=C}else _=I,a=C}while(!1);if(h=e[10222]|0,B>>>0>>0&&ae(),n=t+(r+4)|0,s=e[n>>2]|0,s&2)e[n>>2]=s&-2,e[_+4>>2]=a|1,e[_+a>>2]=a;else{if((B|0)==(e[10224]|0)){if(O=(e[10221]|0)+a|0,e[10221]=O,e[10224]=_,e[_+4>>2]=O|1,(_|0)!=(e[10223]|0))return;e[10223]=0,e[10220]=0;return}if((B|0)==(e[10223]|0)){O=(e[10220]|0)+a|0,e[10220]=O,e[10223]=_,e[_+4>>2]=O|1,e[_+O>>2]=O;return}a=(s&-8)+a|0,l=s>>>3;do if(s>>>0>=256){c=e[t+(r+24)>>2]|0,o=e[t+(r+12)>>2]|0;do if((o|0)==(B|0)){if(s=t+(r+20)|0,n=e[s>>2]|0,!n&&(s=t+(r+16)|0,n=e[s>>2]|0,!n)){U=0;break}for(;;){if(o=n+20|0,l=e[o>>2]|0,l){n=l,s=o;continue}if(o=n+16|0,l=e[o>>2]|0,l)n=l,s=o;else break}if(s>>>0>>0)ae();else{e[s>>2]=0,U=n;break}}else if(l=e[t+(r+8)>>2]|0,l>>>0>>0&&ae(),n=l+12|0,(e[n>>2]|0)!=(B|0)&&ae(),s=o+8|0,(e[s>>2]|0)==(B|0)){e[n>>2]=o,e[s>>2]=l,U=o;break}else ae();while(!1);if(c){if(n=e[t+(r+28)>>2]|0,s=41176+(n<<2)|0,(B|0)==(e[s>>2]|0)){if(e[s>>2]=U,!U){e[10219]=e[10219]&~(1<>>0<(e[10222]|0)>>>0&&ae(),n=c+16|0,(e[n>>2]|0)==(B|0)?e[n>>2]=U:e[c+20>>2]=U,!U)break;s=e[10222]|0,U>>>0>>0&&ae(),e[U+24>>2]=c,n=e[t+(r+16)>>2]|0;do if(n)if(n>>>0>>0)ae();else{e[U+16>>2]=n,e[n+24>>2]=U;break}while(!1);if(n=e[t+(r+20)>>2]|0,n)if(n>>>0<(e[10222]|0)>>>0)ae();else{e[U+20>>2]=n,e[n+24>>2]=U;break}}}else{if(o=e[t+(r+8)>>2]|0,s=e[t+(r+12)>>2]|0,n=40912+(l<<1<<2)|0,(o|0)!=(n|0)&&(o>>>0>>0&&ae(),(e[o+12>>2]|0)!=(B|0)&&ae()),(s|0)==(o|0)){e[10218]=e[10218]&~(1<>>0>>0&&ae(),n=s+8|0,(e[n>>2]|0)==(B|0)?k=n:ae()):k=s+8|0,e[o+12>>2]=s,e[k>>2]=o}while(!1);if(e[_+4>>2]=a|1,e[_+a>>2]=a,(_|0)==(e[10223]|0)){e[10220]=a;return}}if(n=a>>>3,a>>>0<256){s=n<<1,l=40912+(s<<2)|0,o=e[10218]|0,n=1<>2]|0,s>>>0<(e[10222]|0)>>>0?ae():(V=n,O=s)):(e[10218]=o|n,V=40912+(s+2<<2)|0,O=l),e[V>>2]=_,e[O+12>>2]=_,e[_+8>>2]=O,e[_+12>>2]=l;return}if(n=a>>>8,n?a>>>0>16777215?l=31:(V=(n+1048320|0)>>>16&8,O=n<>>16&4,O=O<>>16&2,l=14-(B|V|l)+(O<>>15)|0,l=a>>>(l+7|0)&1|l<<1):l=0,n=41176+(l<<2)|0,e[_+28>>2]=l,e[_+20>>2]=0,e[_+16>>2]=0,s=e[10219]|0,o=1<>2]=_,e[_+24>>2]=n,e[_+12>>2]=_,e[_+8>>2]=_;return}n=e[n>>2]|0;e:do if((e[n+4>>2]&-8|0)!=(a|0)){for(l=a<<((l|0)==31?0:25-(l>>>1)|0);s=n+16+(l>>>31<<2)|0,o=e[s>>2]|0,!!o;)if((e[o+4>>2]&-8|0)==(a|0)){n=o;break e}else l=l<<1,n=o;s>>>0<(e[10222]|0)>>>0&&ae(),e[s>>2]=_,e[_+24>>2]=n,e[_+12>>2]=_,e[_+8>>2]=_;return}while(!1);s=n+8|0,o=e[s>>2]|0,O=e[10222]|0,o>>>0>=O>>>0&n>>>0>=O>>>0||ae(),e[o+12>>2]=_,e[s>>2]=_,e[_+8>>2]=o,e[_+12>>2]=n,e[_+24>>2]=0}function Th(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0;if(s=e[9321]|0,Ih(42048,s,42104),e[10342]=42892,e[10344]=42912,e[10343]=0,t=e[10720]|0,f=0,h0(62,41368+t|0,42048),l=f,f=0,l&1&&(l=b()|0,H0(41376),r0(l|0)),e[41368+(t+72)>>2]=0,e[41368+(t+76)>>2]=-1,o=e[9322]|0,_2(42152,o,42112),e[10364]=42972,e[10365]=42992,n=e[10740]|0,f=0,h0(62,41456+n|0,42152),l=f,f=0,l&1&&(l=b()|0,H0(41460),r0(l|0)),t=n+72|0,e[41456+t>>2]=0,r=n+76|0,e[41456+r>>2]=-1,l=e[9320]|0,_2(42200,l,42120),e[10385]=42972,e[10386]=42992,f=0,h0(62,41540+n|0,42200),a=f,f=0,a&1&&(a=b()|0,H0(41544),r0(a|0)),e[41540+t>>2]=0,e[41540+r>>2]=-1,a=e[41540+((e[(e[10385]|0)+-12>>2]|0)+24)>>2]|0,e[10406]=42972,e[10407]=42992,f=0,h0(62,41624+n|0,a|0),a=f,f=0,a&1&&(a=b()|0,H0(41628),r0(a|0)),e[41624+t>>2]=0,e[41624+r>>2]=-1,e[41368+((e[(e[10342]|0)+-12>>2]|0)+72)>>2]=41456,t=41540+((e[(e[10385]|0)+-12>>2]|0)+4)|0,e[t>>2]=e[t>>2]|8192,e[41540+((e[(e[10385]|0)+-12>>2]|0)+72)>>2]=41456,Dh(42248,s,42128),e[10427]=42932,e[10429]=42952,e[10428]=0,t=e[10730]|0,f=0,h0(62,41708+t|0,42248),a=f,f=0,a&1&&(a=b()|0,cr(41716),r0(a|0)),e[41708+(t+72)>>2]=0,e[41708+(t+76)>>2]=-1,R2(42304,o,42136),e[10449]=43012,e[10450]=43032,n=e[10750]|0,f=0,h0(62,41796+n|0,42304),a=f,f=0,a&1&&(a=b()|0,cr(41800),r0(a|0)),t=n+72|0,e[41796+t>>2]=0,r=n+76|0,e[41796+r>>2]=-1,R2(42352,l,42144),e[10470]=43012,e[10471]=43032,f=0,h0(62,41880+n|0,42352),a=f,f=0,a&1&&(a=b()|0,cr(41884),r0(a|0)),e[41880+t>>2]=0,e[41880+r>>2]=-1,a=e[41880+((e[(e[10470]|0)+-12>>2]|0)+24)>>2]|0,e[10491]=43012,e[10492]=43032,f=0,h0(62,41964+n|0,a|0),a=f,f=0,a&1)a=b()|0,cr(41968),r0(a|0);else{e[41964+t>>2]=0,e[41964+r>>2]=-1,e[41708+((e[(e[10427]|0)+-12>>2]|0)+72)>>2]=41796,a=41880+((e[(e[10470]|0)+-12>>2]|0)+4)|0,e[a>>2]=e[a>>2]|8192,e[41880+((e[(e[10470]|0)+-12>>2]|0)+72)>>2]=41796;return}}function Ch(t){t=t|0,f=0,u0(70,41456)|0,t=f,f=0,!(!(t&1)&&(f=0,u0(70,41624)|0,t=f,f=0,!(t&1))&&(f=0,u0(71,41796)|0,t=f,f=0,!(t&1))&&(f=0,u0(71,41964)|0,t=f,f=0,!(t&1)))&&(t=b(0)|0,Ie(t))}function xh(){Th(0),Te(187,56757,Q|0)|0}function yh(){}function Ih(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;if(o=y,y=y+16|0,l=o+4|0,s=o,h1(t),e[t>>2]=42600,e[t+32>>2]=r,e[t+40>>2]=n,e[t+48>>2]=-1,d[t+52>>0]=0,$t(l,t+4|0),e[s>>2]=e[l>>2],f=0,h0(23,t|0,s|0),n=f,f=0,n&1)l=b()|0,Mi(s),ce(t),r0(l|0);else{Mi(s),y=o;return}}function _2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;if(o=y,y=y+16|0,l=o+4|0,s=o,h1(t),e[t>>2]=42536,e[t+32>>2]=r,$t(l,t+4|0),e[s>>2]=e[l>>2],f=0,r=y0(37,s|0,44280)|0,l=f,f=0,l&1)l=b()|0,Mi(s),ce(t),r0(l|0);else{Mi(s),e[t+36>>2]=r,e[t+40>>2]=n,l=(Se[e[(e[r>>2]|0)+28>>2]&127](r)|0)&1,d[t+44>>0]=l,y=o;return}}function Dh(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;if(o=y,y=y+16|0,l=o+4|0,s=o,q2(t),e[t>>2]=42472,e[t+32>>2]=r,e[t+40>>2]=n,e[t+48>>2]=-1,d[t+52>>0]=0,$t(l,t+4|0),e[s>>2]=e[l>>2],f=0,h0(21,t|0,s|0),n=f,f=0,n&1)l=b()|0,Mi(s),ir(t),r0(l|0);else{Mi(s),y=o;return}}function R2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;if(o=y,y=y+16|0,l=o+4|0,s=o,q2(t),e[t>>2]=42408,e[t+32>>2]=r,$t(l,t+4|0),e[s>>2]=e[l>>2],f=0,r=y0(37,s|0,44288)|0,l=f,f=0,l&1)l=b()|0,Mi(s),ir(t),r0(l|0);else{Mi(s),e[t+36>>2]=r,e[t+40>>2]=n,l=(Se[e[(e[r>>2]|0)+28>>2]&127](r)|0)&1,d[t+44>>0]=l,y=o;return}}function Eh(t){t=t|0,ir(t),a0(t)}function kh(t,r){t=t|0,r=r|0,Se[e[(e[t>>2]|0)+24>>2]&127](t)|0,r=Pi(r,44288)|0,e[t+36>>2]=r,r=(Se[e[(e[r>>2]|0)+28>>2]&127](r)|0)&1,d[t+44>>0]=r}function Fh(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;p=y,y=y+16|0,c=p+8|0,a=p,n=t+36|0,s=t+40|0,o=c+8|0,l=c,r=t+32|0;e:for(;;){if(t=e[n>>2]|0,t=nr[e[(e[t>>2]|0)+20>>2]&31](t,e[s>>2]|0,c,o,a)|0,g=(e[a>>2]|0)-l|0,(dt(c,1,g,e[r>>2]|0)|0)!=(g|0)){t=-1;break}switch(t|0){case 1:break;case 2:{t=-1;break e}default:{h=4;break e}}}return(h|0)==4&&(t=((I1(e[r>>2]|0)|0)!=0)<<31>>31),y=p,t|0}function Mh(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;e:do if(d[t+44>>0]|0)r=dt(r,4,n,e[t+32>>2]|0)|0;else if((n|0)>0)for(s=r,r=0;;){if((Ni[e[(e[t>>2]|0)+52>>2]&63](t,e[s>>2]|0)|0)==-1)break e;if(r=r+1|0,(r|0)<(n|0))s=s+4|0;else break}else r=0;while(!1);return r|0}function _h(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;B=y,y=y+32|0,I=B+16|0,n=B+8|0,C=B+4|0,g=B,k=(r|0)==-1;e:do if(k)U=11;else{if(e[n>>2]=r,d[t+44>>0]|0)if((dt(n,4,1,e[t+32>>2]|0)|0)==1){U=11;break}else{n=-1;break}for(e[C>>2]=I,h=n+4|0,p=t+36|0,o=t+40|0,l=I+8|0,a=I,c=t+32|0;;){if(t=e[p>>2]|0,t=Ct[e[(e[t>>2]|0)+12>>2]&15](t,e[o>>2]|0,n,h,g,I,l,C)|0,(e[g>>2]|0)==(n|0)){n=-1;break e}if((t|0)==3)break;if(s=(t|0)==1,t>>>0>=2){n=-1;break e}if(t=(e[C>>2]|0)-a|0,(dt(I,1,t,e[c>>2]|0)|0)!=(t|0)){n=-1;break e}if(s)n=s?e[g>>2]|0:n;else{U=11;break e}}(dt(n,1,1,e[c>>2]|0)|0)!=1?n=-1:U=11}while(!1);return(U|0)==11&&(n=k?0:r),y=B,n|0}function Rh(t,r){t=t|0,r=r|0;var n=0,s=0;s=Pi(r,44288)|0,n=t+36|0,e[n>>2]=s,s=Se[e[(e[s>>2]|0)+24>>2]&127](s)|0,r=t+44|0,e[r>>2]=s,n=e[n>>2]|0,n=(Se[e[(e[n>>2]|0)+28>>2]&127](n)|0)&1,d[t+53>>0]=n,(e[r>>2]|0)>8&&lr(56783)}function Ph(t){t=t|0,ir(t),a0(t)}function Lh(t){return t=t|0,P2(t,0)|0}function Uh(t){return t=t|0,P2(t,1)|0}function Oh(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;p=y,y=y+32|0,h=p+16|0,c=p+8|0,s=p+4|0,o=p,l=t+52|0,n=(d[l>>0]|0)!=0;e:do if((r|0)==-1)n?r=-1:(r=e[t+48>>2]|0,d[l>>0]=(r|0)!=-1&1);else{a=t+48|0;i:do if(n){switch(e[s>>2]=e[a>>2],n=e[t+36>>2]|0,Ct[e[(e[n>>2]|0)+12>>2]&15](n,e[t+40>>2]|0,s,s+4|0,o,h,h+8|0,c)|0){case 1:case 2:{r=-1;break e}case 3:{d[h>>0]=e[a>>2],e[c>>2]=h+1;break}default:}for(n=t+32|0;;){if(s=e[c>>2]|0,s>>>0<=h>>>0)break i;if(t=s+-1|0,e[c>>2]=t,(kr(d[t>>0]|0,e[n>>2]|0)|0)==-1){r=-1;break e}}}while(!1);e[a>>2]=r,d[l>>0]=1}while(!1);return y=p,r|0}function P2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0;U=y,y=y+32|0,k=U+16|0,I=U+8|0,p=U+4|0,g=U,o=t+52|0;e:do if(d[o>>0]|0)s=t+48|0,n=e[s>>2]|0,r&&(e[s>>2]=-1,d[o>>0]=0);else{if(n=e[t+44>>2]|0,n=(n|0)>1?n:1,C=t+32|0,(n|0)>0){o=0;do{if(s=Er(e[C>>2]|0)|0,(s|0)==-1){n=-1;break e}d[k+o>>0]=s,o=o+1|0}while((o|0)<(n|0))}i:do if(d[t+53>>0]|0)e[I>>2]=d[k>>0];else{a=t+40|0,c=t+36|0,h=I+4|0;t:for(;;){switch(B=e[a>>2]|0,o=B,s=e[o>>2]|0,o=e[o+4>>2]|0,V=e[c>>2]|0,l=k+n|0,Ct[e[(e[V>>2]|0)+16>>2]&15](V,B,k,l,p,I,h,g)|0){case 2:{n=-1;break e}case 3:break t;case 1:break;default:break i}if(V=e[a>>2]|0,e[V>>2]=s,e[V+4>>2]=o,(n|0)==8){n=-1;break e}if(s=Er(e[C>>2]|0)|0,(s|0)==-1){n=-1;break e}d[l>>0]=s,n=n+1|0}e[I>>2]=d[k>>0]}while(!1);if(r){n=e[I>>2]|0,e[t+48>>2]=n;break}for(;!((n|0)<=0);)if(n=n+-1|0,(kr(d[k+n>>0]|0,e[C>>2]|0)|0)==-1){n=-1;break e}n=e[I>>2]|0}while(!1);return y=U,n|0}function Nh(t){t=t|0,ce(t),a0(t)}function Bh(t,r){t=t|0,r=r|0,Se[e[(e[t>>2]|0)+24>>2]&127](t)|0,r=Pi(r,44280)|0,e[t+36>>2]=r,r=(Se[e[(e[r>>2]|0)+28>>2]&127](r)|0)&1,d[t+44>>0]=r}function Vh(t){t=t|0;var r=0,n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0;p=y,y=y+16|0,c=p+8|0,a=p,n=t+36|0,s=t+40|0,o=c+8|0,l=c,r=t+32|0;e:for(;;){if(t=e[n>>2]|0,t=nr[e[(e[t>>2]|0)+20>>2]&31](t,e[s>>2]|0,c,o,a)|0,g=(e[a>>2]|0)-l|0,(dt(c,1,g,e[r>>2]|0)|0)!=(g|0)){t=-1;break}switch(t|0){case 1:break;case 2:{t=-1;break e}default:{h=4;break e}}}return(h|0)==4&&(t=((I1(e[r>>2]|0)|0)!=0)<<31>>31),y=p,t|0}function qh(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;e:do if(d[t+44>>0]|0)r=dt(r,1,n,e[t+32>>2]|0)|0;else if((n|0)>0)for(s=r,r=0;;){if((Ni[e[(e[t>>2]|0)+52>>2]&63](t,N[s>>0]|0)|0)==-1)break e;if(r=r+1|0,(r|0)<(n|0))s=s+1|0;else break}else r=0;while(!1);return r|0}function bh(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0;B=y,y=y+32|0,I=B+16|0,n=B+8|0,C=B+4|0,g=B,k=(r|0)==-1;e:do if(k)U=11;else{if(d[n>>0]=r,d[t+44>>0]|0)if((dt(n,1,1,e[t+32>>2]|0)|0)==1){U=11;break}else{n=-1;break}for(e[C>>2]=I,p=n+1|0,o=t+36|0,l=t+40|0,a=I+8|0,c=I,h=t+32|0;;){if(t=e[o>>2]|0,t=Ct[e[(e[t>>2]|0)+12>>2]&15](t,e[l>>2]|0,n,p,g,I,a,C)|0,(e[g>>2]|0)==(n|0)){n=-1;break e}if((t|0)==3)break;if(s=(t|0)==1,t>>>0>=2){n=-1;break e}if(t=(e[C>>2]|0)-c|0,(dt(I,1,t,e[h>>2]|0)|0)!=(t|0)){n=-1;break e}if(s)n=s?e[g>>2]|0:n;else{U=11;break e}}(dt(n,1,1,e[h>>2]|0)|0)!=1?n=-1:U=11}while(!1);return(U|0)==11&&(n=k?0:r),y=B,n|0}function Gh(t,r){t=t|0,r=r|0;var n=0,s=0;s=Pi(r,44280)|0,n=t+36|0,e[n>>2]=s,s=Se[e[(e[s>>2]|0)+24>>2]&127](s)|0,r=t+44|0,e[r>>2]=s,n=e[n>>2]|0,n=(Se[e[(e[n>>2]|0)+28>>2]&127](n)|0)&1,d[t+53>>0]=n,(e[r>>2]|0)>8&&lr(56783)}function Qh(t){t=t|0,ce(t),a0(t)}function Hh(t){return t=t|0,L2(t,0)|0}function Yh(t){return t=t|0,L2(t,1)|0}function jh(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0;p=y,y=y+32|0,h=p+16|0,c=p+4|0,s=p+8|0,o=p,l=t+52|0,n=(d[l>>0]|0)!=0;e:do if((r|0)==-1)n?r=-1:(r=e[t+48>>2]|0,d[l>>0]=(r|0)!=-1&1);else{a=t+48|0;i:do if(n){switch(d[s>>0]=e[a>>2],n=e[t+36>>2]|0,Ct[e[(e[n>>2]|0)+12>>2]&15](n,e[t+40>>2]|0,s,s+1|0,o,h,h+8|0,c)|0){case 1:case 2:{r=-1;break e}case 3:{d[h>>0]=e[a>>2],e[c>>2]=h+1;break}default:}for(n=t+32|0;;){if(s=e[c>>2]|0,s>>>0<=h>>>0)break i;if(t=s+-1|0,e[c>>2]=t,(kr(d[t>>0]|0,e[n>>2]|0)|0)==-1){r=-1;break e}}}while(!1);e[a>>2]=r,d[l>>0]=1}while(!1);return y=p,r|0}function L2(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0,h=0,p=0,g=0,C=0,I=0,k=0,U=0,B=0,V=0;U=y,y=y+32|0,k=U+16|0,I=U+8|0,p=U+4|0,g=U,o=t+52|0;e:do if(d[o>>0]|0)s=t+48|0,n=e[s>>2]|0,r&&(e[s>>2]=-1,d[o>>0]=0);else{if(n=e[t+44>>2]|0,n=(n|0)>1?n:1,C=t+32|0,(n|0)>0){o=0;do{if(s=Er(e[C>>2]|0)|0,(s|0)==-1){n=-1;break e}d[k+o>>0]=s,o=o+1|0}while((o|0)<(n|0))}i:do if(d[t+53>>0]|0)d[I>>0]=d[k>>0]|0;else{a=t+40|0,c=t+36|0,h=I+1|0;t:for(;;){switch(B=e[a>>2]|0,o=B,s=e[o>>2]|0,o=e[o+4>>2]|0,V=e[c>>2]|0,l=k+n|0,Ct[e[(e[V>>2]|0)+16>>2]&15](V,B,k,l,p,I,h,g)|0){case 2:{n=-1;break e}case 3:break t;case 1:break;default:break i}if(V=e[a>>2]|0,e[V>>2]=s,e[V+4>>2]=o,(n|0)==8){n=-1;break e}if(s=Er(e[C>>2]|0)|0,(s|0)==-1){n=-1;break e}d[l>>0]=s,n=n+1|0}d[I>>0]=d[k>>0]|0}while(!1);if(r)n=d[I>>0]|0,e[t+48>>2]=n&255;else{for(;!((n|0)<=0);)if(n=n+-1|0,(kr(N[k+n>>0]|0,e[C>>2]|0)|0)==-1){n=-1;break e}n=d[I>>0]|0}n=n&255}while(!1);return y=U,n|0}function rA(t){t=t|0}function ur(t){t=t|0,t=t+4|0,e[t>>2]=(e[t>>2]|0)+1}function Ee(t){t=t|0;var r=0,n=0;return n=t+4|0,r=e[n>>2]|0,e[n>>2]=r+-1,r?t=0:(Ce[e[(e[t>>2]|0)+8>>2]&255](t),t=1),t|0}function Xh(t,r){if(t=t|0,r=r|0,e[t>>2]=36868,f=0,h0(86,t+4|0,(d[r>>0]&1?e[r+8>>2]|0:r+1|0)|0),t=f,f=0,t&1)t=b()|0,r0(t|0);else return}function Kh(t,r){if(t=t|0,r=r|0,e[t>>2]=36868,f=0,h0(86,t+4|0,r|0),t=f,f=0,t&1)t=b()|0,r0(t|0);else return}function Wh(t,r){t=t|0,r=r|0;var n=0,s=0;s=Ot(r)|0,n=G0(s+13|0)|0,e[n>>2]=s,e[n+4>>2]=s,e[n+8>>2]=0,n=n+12|0,ii(n|0,r|0,s+1|0)|0,e[t>>2]=n}function Zh(t,r,n){t=t|0,r=r|0,n=n|0,e[t>>2]=n,e[t+4>>2]=r}function Jh(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;return o=y,y=y+16|0,s=o,Rr[e[(e[t>>2]|0)+12>>2]&15](s,t,r),(e[s+4>>2]|0)==(e[n+4>>2]|0)?s=(e[s>>2]|0)==(e[n>>2]|0):s=0,y=o,s|0}function $h(t,r,n){return t=t|0,r=r|0,n=n|0,((e[r>>2]|0)==(n|0)?(e[r+4>>2]|0)==(t|0):0)|0}function e5(t,r,n){t=t|0,r=r|0,n=n|0,r=gn(n)|0,Tt(t,r,Ot(r)|0)}function i5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;a=y,y=y+16|0,l=a,s=e[r>>2]|0;do if(s)if(o=d[n>>0]|0,o&1?o=e[n+4>>2]|0:o=(o&255)>>>1,o&&(h5(n,56990)|0,s=e[r>>2]|0),r=e[r+4>>2]|0,Rr[e[(e[r>>2]|0)+24>>2]&15](l,r,s),r=d[l>>0]|0,o=(r&1)==0,f=0,L0(30,n|0,(o?l+1|0:e[l+8>>2]|0)|0,(o?(r&255)>>>1:e[l+4>>2]|0)|0)|0,r=f,f=0,r&1)a=b()|0,f0(l),r0(a|0);else{f0(l);break}while(!1);e[t>>2]=e[n>>2],e[t+4>>2]=e[n+4>>2],e[t+8>>2]=e[n+8>>2],e[n>>2]=0,e[n+4>>2]=0,e[n+8>>2]=0,y=a}function t5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;o=y,y=y+32|0,s=o+12|0,l=o,Tt(l,n,Ot(n)|0),f=0,m0(10,s|0,r|0,l|0),n=f,f=0;do if(n&1)s=b()|0;else if(f=0,h0(87,t|0,s|0),n=f,f=0,n&1){o=b()|0,f0(s),s=o;break}else{f0(s),f0(l),e[t>>2]=42664,n=e[r+4>>2]|0,l=t+8|0,e[l>>2]=e[r>>2],e[l+4>>2]=n,y=o;return}while(!1);f0(l),r0(s|0)}function r5(t,r,n,s){t=t|0,r=r|0,n=n|0,s=s|0;var o=0,l=0,a=0,c=0;l=y,y=y+48|0,o=l+24|0,c=l+16|0,a=l,e[c>>2]=r,e[c+4>>2]=n,l1(a,s),f=0,m0(10,o|0,c|0,a|0),s=f,f=0;do if(s&1)o=b()|0;else if(f=0,h0(87,t|0,o|0),c=f,f=0,c&1){c=b()|0,f0(o),o=c;break}else{f0(o),f0(a),e[t>>2]=42664,e[t+8>>2]=r,e[t+12>>2]=n,y=l;return}while(!1);f0(a),r0(o|0)}function n5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0,a=0;o=y,y=y+48|0,s=o+24|0,a=o+16|0,l=o,e[a>>2]=r,e[a+4>>2]=n,Tt(l,58898,0),f=0,m0(10,s|0,a|0,l|0),a=f,f=0;do if(a&1)s=b()|0;else if(f=0,h0(87,t|0,s|0),a=f,f=0,a&1){a=b()|0,f0(s),s=a;break}else{f0(s),f0(l),e[t>>2]=42664,e[t+8>>2]=r,e[t+12>>2]=n,y=o;return}while(!1);f0(l),r0(s|0)}function o1(t){t=t|0,Tr(t)}function s5(t){t=t|0,Tr(t),a0(t)}function o5(t){t=t|0}function l5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0;if(B1(42676)|0,(e[t>>2]|0)==1)do Qi(42704,42676)|0;while((e[t>>2]|0)==1);do if(e[t>>2]|0)L1(42676)|0;else{if(e[t>>2]=1,f=0,u0(72,42676)|0,s=f,f=0,!(s&1)&&(f=0,n0(n|0,r|0),s=f,f=0,!(s&1))&&(f=0,u0(73,42676)|0,s=f,f=0,!(s&1))&&(e[t>>2]=-1,f=0,u0(72,42676)|0,s=f,f=0,!(s&1))&&(f=0,u0(74,42704)|0,s=f,f=0,!(s&1)))break;s=b(0)|0,zi(s|0)|0,f=0,u0(73,42676)|0,s=f,f=0,!(s&1)&&(e[t>>2]=0,f=0,u0(72,42676)|0,s=f,f=0,!(s&1))&&(f=0,u0(74,42704)|0,s=f,f=0,!(s&1))&&(f=0,we(5),f=0),r=b()|0,f=0,we(3),s=f,f=0,s&1?(s=b(0)|0,Ie(s)):r0(r|0)}while(!1)}function l1(t,r){t=t|0,r=r|0,d[r>>0]&1?Tt(t,e[r+8>>2]|0,e[r+4>>2]|0):(e[t>>2]=e[r>>2],e[t+4>>2]=e[r+4>>2],e[t+8>>2]=e[r+8>>2])}function Tt(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;n>>>0>4294967279&&tt(t),n>>>0<11?(d[t>>0]=n<<1,t=t+1|0):(o=n+16&-16,s=G0(o)|0,e[t+8>>2]=s,e[t>>2]=o|1,e[t+4>>2]=n,t=s),ii(t|0,r|0,n|0)|0,d[t+n>>0]=0}function a1(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;r>>>0>4294967279&&tt(t),r>>>0<11?(d[t>>0]=r<<1,t=t+1|0):(o=r+16&-16,s=G0(o)|0,e[t+8>>2]=s,e[t>>2]=o|1,e[t+4>>2]=r,t=s),je(t|0,n|0,r|0)|0,d[t+r>>0]=0}function f0(t){t=t|0,d[t>>0]&1&&a0(e[t+8>>2]|0)}function a5(t,r){t=t|0,r=r|0;var n=0,s=0;return(t|0)!=(r|0)&&(n=d[r>>0]|0,s=(n&1)==0,U2(t,s?r+1|0:e[r+8>>2]|0,s?(n&255)>>>1:e[r+4>>2]|0)|0),t|0}function f5(t,r){return t=t|0,r=r|0,U2(t,r,Ot(r)|0)|0}function U2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;s=d[t>>0]|0,s&1?(s=e[t>>2]|0,l=(s&-2)+-1|0,s=s&255):l=10,o=(s&1)==0;do if(l>>>0>=n>>>0)if(o?s=t+1|0:s=e[t+8>>2]|0,gr(s|0,r|0,n|0)|0,d[s+n>>0]=0,d[t>>0]&1){e[t+4>>2]=n;break}else{d[t>>0]=n<<1;break}else o?s=(s&255)>>>1:s=e[t+4>>2]|0,B2(t,l,n-l|0,s,0,s,n,r);while(!1);return t|0}function O2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0;s=d[t>>0]|0,o=(s&1)==0,o?s=(s&255)>>>1:s=e[t+4>>2]|0;do if(s>>>0>=r>>>0)if(o){d[t+1+r>>0]=0,d[t>>0]=r<<1;break}else{d[(e[t+8>>2]|0)+r>>0]=0,e[t+4>>2]=r;break}else u5(t,r-s|0,n)|0;while(!1)}function u5(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;return r&&(s=d[t>>0]|0,s&1?(s=e[t>>2]|0,o=(s&-2)+-1|0,s=s&255):o=10,s&1?l=e[t+4>>2]|0:l=(s&255)>>>1,(o-l|0)>>>0>>0&&(f1(t,o,r-o+l|0,l,l,0,0),s=d[t>>0]|0),s&1?o=e[t+8>>2]|0:o=t+1|0,je(o+l|0,n|0,r|0)|0,s=l+r|0,d[t>>0]&1?e[t+4>>2]=s:d[t>>0]=s<<1,d[o+s>>0]=0),t|0}function c5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0,a=0,c=0;r>>>0>4294967279&&tt(t),n=d[t>>0]|0,n&1?(n=e[t>>2]|0,s=(n&-2)+-1|0,n=n&255):s=10,n&1?c=e[t+4>>2]|0:c=(n&255)>>>1,r=c>>>0>r>>>0?c:r,r>>>0<11?a=10:a=(r+16&-16)+-1|0;e:do if((a|0)!=(s|0)){do if((a|0)!=10){if(r=a+1|0,a>>>0<=s>>>0){if(f=0,r=u0(67,r|0)|0,l=f,f=0,l&1){t=b(0)|0,zi(t|0)|0,Wi();break e}}else r=G0(r)|0;if(n&1){s=1,o=e[t+8>>2]|0,l=1;break}else{s=1,o=t+1|0,l=0;break}}else r=t+1|0,s=0,o=e[t+8>>2]|0,l=1;while(!1);if(n&1?n=e[t+4>>2]|0:n=(n&255)>>>1,ii(r|0,o|0,n+1|0)|0,l&&a0(o),s){e[t>>2]=a+1|1,e[t+4>>2]=c,e[t+8>>2]=r;break}else{d[t>>0]=c<<1;break}}while(!1)}function h5(t,r){return t=t|0,r=r|0,N2(t,r,Ot(r)|0)|0}function m5(t,r){t=t|0,r=r|0;var n=0,s=0,o=0,l=0;n=d[t>>0]|0,s=(n&1)!=0,s?(o=(e[t>>2]&-2)+-1|0,l=e[t+4>>2]|0):(o=10,l=(n&255)>>>1),(l|0)==(o|0)?(f1(t,o,1,o,o,0,0),d[t>>0]&1?o=8:o=7):s?o=8:o=7,(o|0)==7?(d[t>>0]=(l<<1)+2,n=t+1|0,s=l+1|0):(o|0)==8&&(n=e[t+8>>2]|0,s=l+1|0,e[t+4>>2]=s),d[n+l>>0]=r,d[n+s>>0]=0}function N2(t,r,n){t=t|0,r=r|0,n=n|0;var s=0,o=0,l=0;return s=d[t>>0]|0,s&1?(s=e[t>>2]|0,o=(s&-2)+-1|0,s=s&255):o=10,s&1?l=e[t+4>>2]|0:l=(s&255)>>>1,(o-l|0)>>>0>=n>>>0?n&&(s&1?o=e[t+8>>2]|0:o=t+1|0,ii(o+l|0,r|0,n|0)|0,s=l+n|0,d[t>>0]&1?e[t+4>>2]=s:d[t>>0]=s<<1,d[o+s>>0]=0):B2(t,o,n-o+l|0,l,l,0,n,r),t|0}function B2(t,r,n,s,o,l,a,c){t=t|0,r=r|0,n=n|0,s=s|0,o=o|0,l=l|0,a=a|0,c=c|0;var h=0,p=0,g=0;(-18-r|0)>>>0>>0&&tt(t),d[t>>0]&1?g=e[t+8>>2]|0:g=t+1|0,r>>>0<2147483623?(h=n+r|0,p=r<<1,h=h>>>0