@vladmandic/face-api
Version:
FaceAPI: AI-powered Face Detection & Rotation Tracking, Face Description & Recognition, Age & Gender & Emotion Prediction for Browser and NodeJS using TensorFlow/JS
9 lines (8 loc) • 1.28 MB
JavaScript
/*
Face-API
homepage: <https://github.com/vladmandic/face-api>
author: <https://github.com/vladmandic>'
*/
var nF=Object.defineProperty;var aF=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,n)=>(typeof require!="undefined"?require:t)[n]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var tb=(e,t)=>{for(var n in t)nF(e,n,{get:t[n],enumerable:!0})};var ze={};tb(ze,{Abs:()=>wl,Acos:()=>kl,Acosh:()=>Il,AdadeltaOptimizer:()=>Ov,AdagradOptimizer:()=>Lv,AdamOptimizer:()=>zv,AdamaxOptimizer:()=>Wv,Add:()=>fs,AddN:()=>yi,All:()=>Sl,Any:()=>Tl,ArgMax:()=>bi,ArgMin:()=>rc,Asin:()=>Nl,Asinh:()=>Cl,Atan:()=>_l,Atan2:()=>Al,Atanh:()=>El,AvgPool:()=>xi,AvgPool3D:()=>sc,AvgPool3DGrad:()=>Yh,AvgPoolGrad:()=>Xh,BackendWasm:()=>wA,BatchMatMul:()=>vi,BatchToSpaceND:()=>$l,Bincount:()=>Zh,BroadcastArgs:()=>Jh,BroadcastTo:()=>$I,Callback:()=>ZN,CallbackList:()=>tN,Cast:()=>wi,Ceil:()=>ki,ClipByValue:()=>gs,Complex:()=>Qh,ComplexAbs:()=>ic,Concat:()=>Fl,Conv2D:()=>Ii,Conv2DBackpropFilter:()=>em,Conv2DBackpropInput:()=>Si,Conv3D:()=>oc,Conv3DBackpropFilterV2:()=>tm,Conv3DBackpropInputV2:()=>nm,Cos:()=>Ti,Cosh:()=>Ni,CropAndResize:()=>Dl,Cumprod:()=>Rl,Cumsum:()=>Ci,CustomCallback:()=>aN,DataStorage:()=>Hh,DenseBincount:()=>am,DepthToSpace:()=>Ml,DepthwiseConv2dNative:()=>_i,DepthwiseConv2dNativeBackpropFilter:()=>rm,DepthwiseConv2dNativeBackpropInput:()=>sm,Diag:()=>im,Dilation2D:()=>lc,Dilation2DBackpropFilter:()=>gh,Dilation2DBackpropInput:()=>fh,ENV:()=>xx,EarlyStopping:()=>JN,Einsum:()=>om,Elu:()=>Ai,EluGrad:()=>lm,Environment:()=>EI,Equal:()=>Ol,Erf:()=>Pl,Exp:()=>$i,ExpandDims:()=>Ll,Expm1:()=>zl,FFT:()=>um,Fill:()=>uc,FlipLeftRight:()=>Wl,Floor:()=>Fi,FloorDiv:()=>Ri,FromPixels:()=>yh,FusedBatchNorm:()=>Di,FusedConv2D:()=>ei,FusedDepthwiseConv2D:()=>ti,GPGPUContext:()=>ph,GatherNd:()=>Vl,GatherV2:()=>Bl,GraphModel:()=>S0,Greater:()=>Ul,GreaterEqual:()=>Mi,History:()=>nN,IFFT:()=>pm,Identity:()=>Pi,Imag:()=>cm,InputSpec:()=>zt,IsFinite:()=>Gl,IsInf:()=>Hl,IsNan:()=>Oi,KernelBackend:()=>ac,LRN:()=>pc,LRNGrad:()=>hm,LayerVariable:()=>KT,LayersModel:()=>_r,LeakyRelu:()=>Li,Less:()=>ql,LessEqual:()=>jl,LinSpace:()=>dm,Log:()=>zi,Log1p:()=>Kl,LogSoftmax:()=>RI,LogicalAnd:()=>Xl,LogicalNot:()=>Yl,LogicalOr:()=>Zl,LogicalXor:()=>FI,LowerBound:()=>KF,MathBackendWebGL:()=>Ef,Max:()=>Wi,MaxPool:()=>Vi,MaxPool3D:()=>cc,MaxPool3DGrad:()=>fm,MaxPoolGrad:()=>mm,MaxPoolWithArgmax:()=>gm,Maximum:()=>Bi,Mean:()=>Ui,Min:()=>Gi,Minimum:()=>Hi,MirrorPad:()=>qi,Mod:()=>Jl,MomentumOptimizer:()=>Bv,Multinomial:()=>ym,Multiply:()=>ji,Neg:()=>Ql,NonMaxSuppressionV3:()=>tu,NonMaxSuppressionV4:()=>nu,NonMaxSuppressionV5:()=>au,NotEqual:()=>eu,OP_SCOPE_SUFFIX:()=>Ix,OneHot:()=>Ki,OnesLike:()=>ru,Optimizer:()=>Rr,OptimizerConstructors:()=>$T,Pack:()=>su,PadV2:()=>Xi,Pool:()=>XF,Pow:()=>Yi,Prelu:()=>Zi,Prod:()=>Ji,RMSPropOptimizer:()=>Vv,RNN:()=>mr,RaggedGather:()=>bm,RaggedRange:()=>xm,RaggedTensorToTensor:()=>vm,Range:()=>dc,Rank:()=>vb,Real:()=>wm,RealDiv:()=>Ei,Reciprocal:()=>Qi,Reduction:()=>vn,Relu:()=>eo,Relu6:()=>ao,Reshape:()=>iu,ResizeBilinear:()=>no,ResizeBilinearGrad:()=>Im,ResizeNearestNeighbor:()=>to,ResizeNearestNeighborGrad:()=>km,Reverse:()=>ro,RotateWithOffset:()=>ku,Round:()=>so,Rsqrt:()=>io,SGDOptimizer:()=>of,ScatterNd:()=>ou,SearchSorted:()=>Sm,Select:()=>lu,Selu:()=>uu,Sequential:()=>hl,Sigmoid:()=>lo,Sign:()=>du,Sin:()=>oo,Sinh:()=>cu,Slice:()=>pu,Softmax:()=>co,Softplus:()=>hu,SpaceToBatchND:()=>mu,SparseFillEmptyRows:()=>hc,SparseReshape:()=>gu,SparseSegmentMean:()=>mc,SparseSegmentSum:()=>fc,SparseToDense:()=>Tm,SplitV:()=>fu,Sqrt:()=>uo,Square:()=>gc,SquaredDifference:()=>ho,Step:()=>bs,StridedSlice:()=>yu,StringNGrams:()=>yc,StringSplit:()=>bc,StringToHashBucketFast:()=>xc,Sub:()=>mo,Sum:()=>po,SymbolicTensor:()=>Va,Tan:()=>fo,Tanh:()=>go,Tensor:()=>Ne,TensorBuffer:()=>jt,Tile:()=>ys,TopK:()=>bu,Transform:()=>xu,Transpose:()=>Cr,Unique:()=>Nm,Unpack:()=>vu,UnsortedSegmentSum:()=>vc,UpperBound:()=>YF,Variable:()=>ss,ZerosLike:()=>wu,_FusedMatMul:()=>Qs,abs:()=>Lt,acos:()=>Ex,acosh:()=>Ax,add:()=>X,addN:()=>tS,all:()=>$m,any:()=>Gp,argMax:()=>ri,argMin:()=>$x,asin:()=>Fx,asinh:()=>Rx,atan:()=>Dx,atan2:()=>Mx,atanh:()=>Px,avgPool:()=>ya,avgPool3d:()=>Lx,backend:()=>eS,backend_util:()=>N,basicLSTMCell:()=>sS,batchNorm:()=>vs,batchNorm2d:()=>zx,batchNorm3d:()=>Wx,batchNorm4d:()=>Bx,batchToSpaceND:()=>Cc,bincount:()=>Vx,booleanMaskAsync:()=>HS,broadcastArgs:()=>iS,broadcastTo:()=>Ys,broadcast_util:()=>Iu,browser:()=>vo,buffer:()=>Le,callbacks:()=>kH,cast:()=>ie,ceil:()=>Ux,clipByValue:()=>tn,clone:()=>sr,complex:()=>Er,concat:()=>Ze,concat1d:()=>Gx,concat2d:()=>Hx,concat3d:()=>qx,concat4d:()=>jx,constraints:()=>ZT,conv1d:()=>Fm,conv2d:()=>Rt,conv2dTranspose:()=>Rm,conv3d:()=>Xx,conv3dTranspose:()=>Yx,copyRegisteredKernels:()=>eR,cos:()=>_c,cosh:()=>Dm,cosineWindow:()=>tf,cumprod:()=>jp,cumsum:()=>Mm,customGrad:()=>ur,data:()=>k2,denseBincount:()=>Ih,deprecationWarn:()=>_x,depthToSpace:()=>Zx,depthwiseConv2d:()=>ws,deregisterOp:()=>TH,device_util:()=>Sc,diag:()=>lS,dilation2d:()=>Jx,disableDeprecationWarnings:()=>pD,dispose:()=>_e,disposeVariables:()=>cD,div:()=>he,divNoNan:()=>Qx,dot:()=>ev,dropout:()=>Fv,einsum:()=>pS,elu:()=>Su,enableDebugMode:()=>uD,enableProdMode:()=>lD,enclosingPowerOfTwo:()=>Rv,engine:()=>Ca,env:()=>H,equal:()=>Jn,erf:()=>tv,euclideanNorm:()=>rv,exp:()=>yn,expandDims:()=>Qt,expm1:()=>sv,eye:()=>Pm,fft:()=>Oc,fill:()=>bn,findBackend:()=>bD,findBackendFactory:()=>xD,floor:()=>Nu,floorDiv:()=>Am,forceHalfFloat:()=>B_,fused:()=>ul,gather:()=>Cu,gatherND:()=>YS,gather_util:()=>Hv,getBackend:()=>gD,getGradient:()=>bb,getKernel:()=>bh,getKernelsForBackend:()=>xh,getThreadsCount:()=>wpe,gpgpu_util:()=>x_,grad:()=>hP,grads:()=>mP,greater:()=>Nn,greaterEqual:()=>$r,ifft:()=>ll,imag:()=>Ec,image:()=>Ea,inTopKAsync:()=>ZS,initializers:()=>JT,input:()=>yN,io:()=>Ht,irfft:()=>Zm,isFinite:()=>iv,isInf:()=>ov,isNaN:()=>lv,keep:()=>Gt,kernel_impls:()=>hr,layers:()=>QT,leakyRelu:()=>Ac,less:()=>Om,lessEqual:()=>ks,linalg:()=>Pv,linspace:()=>fS,loadGraphModel:()=>E6,loadGraphModelSync:()=>A6,loadLayersModel:()=>vU,localResponseNormalization:()=>uv,log:()=>Qn,log1p:()=>$c,logSigmoid:()=>pv,logSoftmax:()=>zm,logSumExp:()=>Wm,logicalAnd:()=>$a,logicalNot:()=>Fc,logicalOr:()=>Bm,logicalXor:()=>cv,losses:()=>uT,lowerBound:()=>yS,matMul:()=>Re,math:()=>xT,max:()=>ha,maxPool:()=>Dt,maxPool3d:()=>dv,maxPoolWithArgmax:()=>bS,maximum:()=>dr,mean:()=>Ct,memory:()=>kh,meshgrid:()=>xS,metrics:()=>KN,min:()=>rl,minimum:()=>_u,mirrorPad:()=>hv,mod:()=>mv,model:()=>IU,models:()=>XN,moments:()=>Rc,movingAverage:()=>qS,mul:()=>z,multiRNNCell:()=>vS,multinomial:()=>wS,neg:()=>bt,nextFrame:()=>qv,norm:()=>Tu,notEqual:()=>li,oneHot:()=>sl,ones:()=>Zn,onesLike:()=>ea,op:()=>L,outerProduct:()=>kS,pad:()=>ba,pad1d:()=>IS,pad2d:()=>SS,pad3d:()=>TS,pad4d:()=>NS,pool:()=>fv,pow:()=>Ar,prelu:()=>Mc,print:()=>Cx,prod:()=>gv,profile:()=>dD,raggedGather:()=>CS,raggedRange:()=>_S,raggedTensorToTensor:()=>ES,rand:()=>AS,randomGamma:()=>DS,randomNormal:()=>Um,randomStandardNormal:()=>MS,randomUniform:()=>Eu,range:()=>ui,ready:()=>fD,real:()=>il,reciprocal:()=>wv,registerBackend:()=>Em,registerCallbackConstructor:()=>TU,registerGradient:()=>DI,registerKernel:()=>wc,registerOp:()=>SH,regularizers:()=>YN,relu:()=>Ke,relu6:()=>Gm,removeBackend:()=>yD,reshape:()=>W,reverse:()=>ga,reverse1d:()=>PS,reverse2d:()=>OS,reverse3d:()=>LS,reverse4d:()=>zS,rfft:()=>Lc,round:()=>Hm,rsqrt:()=>qm,scalar:()=>xe,scatterND:()=>KS,scatter_util:()=>Ev,searchSorted:()=>Vm,selu:()=>jm,separableConv2d:()=>Is,sequential:()=>SU,serialization:()=>ne,setBackend:()=>mD,setPlatform:()=>vD,setThreadsCount:()=>vpe,setWasmPath:()=>bpe,setWasmPaths:()=>xpe,setWebGLContext:()=>UC,setdiff1dAsync:()=>WS,sigmoid:()=>da,sign:()=>kv,signal:()=>lT,sin:()=>Km,sinh:()=>Xm,slice:()=>Ve,slice1d:()=>Pc,slice2d:()=>Ym,slice3d:()=>bo,slice4d:()=>ol,slice_util:()=>Kt,softmax:()=>Xa,softplus:()=>yo,spaceToBatchND:()=>Dc,sparse:()=>pT,sparseToDense:()=>XS,spectral:()=>oT,split:()=>zn,sqrt:()=>pn,square:()=>it,squaredDifference:()=>Jm,squeeze:()=>Ss,stack:()=>Ft,step:()=>xo,stridedSlice:()=>Iv,string:()=>cT,sub:()=>pe,sum:()=>fe,sumOutType:()=>_m,tan:()=>Sv,tanh:()=>ii,tensor:()=>fn,tensor1d:()=>je,tensor2d:()=>Aa,tensor3d:()=>zc,tensor4d:()=>Ra,tensor5d:()=>BS,tensor6d:()=>VS,tensor_util:()=>Ua,test_util:()=>$S,tidy:()=>P,tile:()=>Ln,time:()=>hD,topk:()=>Tv,train:()=>Us,transpose:()=>Ee,truncatedNormal:()=>Qm,unique:()=>Nv,unregisterGradient:()=>QF,unregisterKernel:()=>JF,unsortedSegmentSum:()=>ef,unstack:()=>lt,upcastType:()=>ma,upperBound:()=>US,util:()=>v,valueAndGrad:()=>fP,valueAndGrads:()=>gP,variable:()=>Cv,variableGrads:()=>gS,version:()=>_pe,version_converter:()=>F6,version_core:()=>Ez,version_layers:()=>mw,version_wasm:()=>kpe,version_webgl:()=>uJ,webgl:()=>pJ,webgl_util:()=>VC,where:()=>gn,whereAsync:()=>_v,zeros:()=>It,zerosLike:()=>qe});var rF=Object.create,gx=Object.defineProperty,sF=Object.getOwnPropertyDescriptor,iF=Object.getOwnPropertyNames,oF=Object.getPrototypeOf,lF=Object.prototype.hasOwnProperty,Bt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ae=(e,t)=>{for(var n in t)gx(e,n,{get:t[n],enumerable:!0})},uF=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of iF(t))!lF.call(e,r)&&r!==n&&gx(e,r,{get:()=>t[r],enumerable:!(a=sF(t,r))||a.enumerable});return e},hs=(e,t,n)=>(n=e!=null?rF(oF(e)):{},uF(t||!e||!e.__esModule?gx(n,"default",{value:e,enumerable:!0}):n,e)),pF=Bt((e,t)=>{t.exports=a;var n=null;try{n=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(S){}function a(S,M,B){this.low=S|0,this.high=M|0,this.unsigned=!!B}a.prototype.__isLong__,Object.defineProperty(a.prototype,"__isLong__",{value:!0});function r(S){return(S&&S.__isLong__)===!0}a.isLong=r;var s={},i={};function o(S,M){var B,U,G;return M?(S>>>=0,(G=0<=S&&S<256)&&(U=i[S],U)?U:(B=u(S,(S|0)<0?-1:0,!0),G&&(i[S]=B),B)):(S|=0,(G=-128<=S&&S<128)&&(U=s[S],U)?U:(B=u(S,S<0?-1:0,!1),G&&(s[S]=B),B))}a.fromInt=o;function l(S,M){if(isNaN(S))return M?w:x;if(M){if(S<0)return w;if(S>=g)return $}else{if(S<=-y)return R;if(S+1>=y)return E}return S<0?l(-S,M).neg():u(S%f|0,S/f|0,M)}a.fromNumber=l;function u(S,M,B){return new a(S,M,B)}a.fromBits=u;var p=Math.pow;function d(S,M,B){if(S.length===0)throw Error("empty string");if(S==="NaN"||S==="Infinity"||S==="+Infinity"||S==="-Infinity")return x;if(typeof M=="number"?(B=M,M=!1):M=!!M,B=B||10,B<2||36<B)throw RangeError("radix");var U;if((U=S.indexOf("-"))>0)throw Error("interior hyphen");if(U===0)return d(S.substring(1),M,B).neg();for(var G=l(p(B,8)),j=x,K=0;K<S.length;K+=8){var Z=Math.min(8,S.length-K),J=parseInt(S.substring(K,K+Z),B);if(Z<8){var ee=l(p(B,Z));j=j.mul(ee).add(l(J))}else j=j.mul(G),j=j.add(l(J))}return j.unsigned=M,j}a.fromString=d;function c(S,M){return typeof S=="number"?l(S,M):typeof S=="string"?d(S,M):u(S.low,S.high,typeof M=="boolean"?M:S.unsigned)}a.fromValue=c;var h=1<<16,m=1<<24,f=h*h,g=f*f,y=g/2,b=o(m),x=o(0);a.ZERO=x;var w=o(0,!0);a.UZERO=w;var I=o(1);a.ONE=I;var T=o(1,!0);a.UONE=T;var C=o(-1);a.NEG_ONE=C;var E=u(-1,2147483647,!1);a.MAX_VALUE=E;var $=u(-1,-1,!0);a.MAX_UNSIGNED_VALUE=$;var R=u(0,-2147483648,!1);a.MIN_VALUE=R;var F=a.prototype;F.toInt=function(){return this.unsigned?this.low>>>0:this.low},F.toNumber=function(){return this.unsigned?(this.high>>>0)*f+(this.low>>>0):this.high*f+(this.low>>>0)},F.toString=function(S){if(S=S||10,S<2||36<S)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(R)){var M=l(S),B=this.div(M),U=B.mul(M).sub(this);return B.toString(S)+U.toInt().toString(S)}else return"-"+this.neg().toString(S);for(var G=l(p(S,6),this.unsigned),j=this,K="";;){var Z=j.div(G),J=j.sub(Z.mul(G)).toInt()>>>0,ee=J.toString(S);if(j=Z,j.isZero())return ee+K;for(;ee.length<6;)ee="0"+ee;K=""+ee+K}},F.getHighBits=function(){return this.high},F.getHighBitsUnsigned=function(){return this.high>>>0},F.getLowBits=function(){return this.low},F.getLowBitsUnsigned=function(){return this.low>>>0},F.getNumBitsAbs=function(){if(this.isNegative())return this.eq(R)?64:this.neg().getNumBitsAbs();for(var S=this.high!=0?this.high:this.low,M=31;M>0&&!(S&1<<M);M--);return this.high!=0?M+33:M+1},F.isZero=function(){return this.high===0&&this.low===0},F.eqz=F.isZero,F.isNegative=function(){return!this.unsigned&&this.high<0},F.isPositive=function(){return this.unsigned||this.high>=0},F.isOdd=function(){return(this.low&1)===1},F.isEven=function(){return(this.low&1)===0},F.equals=function(S){return r(S)||(S=c(S)),this.unsigned!==S.unsigned&&this.high>>>31===1&&S.high>>>31===1?!1:this.high===S.high&&this.low===S.low},F.eq=F.equals,F.notEquals=function(S){return!this.eq(S)},F.neq=F.notEquals,F.ne=F.notEquals,F.lessThan=function(S){return this.comp(S)<0},F.lt=F.lessThan,F.lessThanOrEqual=function(S){return this.comp(S)<=0},F.lte=F.lessThanOrEqual,F.le=F.lessThanOrEqual,F.greaterThan=function(S){return this.comp(S)>0},F.gt=F.greaterThan,F.greaterThanOrEqual=function(S){return this.comp(S)>=0},F.gte=F.greaterThanOrEqual,F.ge=F.greaterThanOrEqual,F.compare=function(S){if(r(S)||(S=c(S)),this.eq(S))return 0;var M=this.isNegative(),B=S.isNegative();return M&&!B?-1:!M&&B?1:this.unsigned?S.high>>>0>this.high>>>0||S.high===this.high&&S.low>>>0>this.low>>>0?-1:1:this.sub(S).isNegative()?-1:1},F.comp=F.compare,F.negate=function(){return!this.unsigned&&this.eq(R)?R:this.not().add(I)},F.neg=F.negate,F.add=function(S){r(S)||(S=c(S));var M=this.high>>>16,B=this.high&65535,U=this.low>>>16,G=this.low&65535,j=S.high>>>16,K=S.high&65535,Z=S.low>>>16,J=S.low&65535,ee=0,ae=0,te=0,re=0;return re+=G+J,te+=re>>>16,re&=65535,te+=U+Z,ae+=te>>>16,te&=65535,ae+=B+K,ee+=ae>>>16,ae&=65535,ee+=M+j,ee&=65535,u(te<<16|re,ee<<16|ae,this.unsigned)},F.subtract=function(S){return r(S)||(S=c(S)),this.add(S.neg())},F.sub=F.subtract,F.multiply=function(S){if(this.isZero())return x;if(r(S)||(S=c(S)),n){var M=n.mul(this.low,this.high,S.low,S.high);return u(M,n.get_high(),this.unsigned)}if(S.isZero())return x;if(this.eq(R))return S.isOdd()?R:x;if(S.eq(R))return this.isOdd()?R:x;if(this.isNegative())return S.isNegative()?this.neg().mul(S.neg()):this.neg().mul(S).neg();if(S.isNegative())return this.mul(S.neg()).neg();if(this.lt(b)&&S.lt(b))return l(this.toNumber()*S.toNumber(),this.unsigned);var B=this.high>>>16,U=this.high&65535,G=this.low>>>16,j=this.low&65535,K=S.high>>>16,Z=S.high&65535,J=S.low>>>16,ee=S.low&65535,ae=0,te=0,re=0,se=0;return se+=j*ee,re+=se>>>16,se&=65535,re+=G*ee,te+=re>>>16,re&=65535,re+=j*J,te+=re>>>16,re&=65535,te+=U*ee,ae+=te>>>16,te&=65535,te+=G*J,ae+=te>>>16,te&=65535,te+=j*Z,ae+=te>>>16,te&=65535,ae+=B*ee+U*J+G*Z+j*K,ae&=65535,u(re<<16|se,ae<<16|te,this.unsigned)},F.mul=F.multiply,F.divide=function(S){if(r(S)||(S=c(S)),S.isZero())throw Error("division by zero");if(n){if(!this.unsigned&&this.high===-2147483648&&S.low===-1&&S.high===-1)return this;var M=(this.unsigned?n.div_u:n.div_s)(this.low,this.high,S.low,S.high);return u(M,n.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?w:x;var B,U,G;if(this.unsigned){if(S.unsigned||(S=S.toUnsigned()),S.gt(this))return w;if(S.gt(this.shru(1)))return T;G=w}else{if(this.eq(R)){if(S.eq(I)||S.eq(C))return R;if(S.eq(R))return I;var j=this.shr(1);return B=j.div(S).shl(1),B.eq(x)?S.isNegative()?I:C:(U=this.sub(S.mul(B)),G=B.add(U.div(S)),G)}else if(S.eq(R))return this.unsigned?w:x;if(this.isNegative())return S.isNegative()?this.neg().div(S.neg()):this.neg().div(S).neg();if(S.isNegative())return this.div(S.neg()).neg();G=x}for(U=this;U.gte(S);){B=Math.max(1,Math.floor(U.toNumber()/S.toNumber()));for(var K=Math.ceil(Math.log(B)/Math.LN2),Z=K<=48?1:p(2,K-48),J=l(B),ee=J.mul(S);ee.isNegative()||ee.gt(U);)B-=Z,J=l(B,this.unsigned),ee=J.mul(S);J.isZero()&&(J=I),G=G.add(J),U=U.sub(ee)}return G},F.div=F.divide,F.modulo=function(S){if(r(S)||(S=c(S)),n){var M=(this.unsigned?n.rem_u:n.rem_s)(this.low,this.high,S.low,S.high);return u(M,n.get_high(),this.unsigned)}return this.sub(this.div(S).mul(S))},F.mod=F.modulo,F.rem=F.modulo,F.not=function(){return u(~this.low,~this.high,this.unsigned)},F.and=function(S){return r(S)||(S=c(S)),u(this.low&S.low,this.high&S.high,this.unsigned)},F.or=function(S){return r(S)||(S=c(S)),u(this.low|S.low,this.high|S.high,this.unsigned)},F.xor=function(S){return r(S)||(S=c(S)),u(this.low^S.low,this.high^S.high,this.unsigned)},F.shiftLeft=function(S){return r(S)&&(S=S.toInt()),(S&=63)===0?this:S<32?u(this.low<<S,this.high<<S|this.low>>>32-S,this.unsigned):u(0,this.low<<S-32,this.unsigned)},F.shl=F.shiftLeft,F.shiftRight=function(S){return r(S)&&(S=S.toInt()),(S&=63)===0?this:S<32?u(this.low>>>S|this.high<<32-S,this.high>>S,this.unsigned):u(this.high>>S-32,this.high>=0?0:-1,this.unsigned)},F.shr=F.shiftRight,F.shiftRightUnsigned=function(S){if(r(S)&&(S=S.toInt()),S&=63,S===0)return this;var M=this.high;if(S<32){var B=this.low;return u(B>>>S|M<<32-S,M>>>S,this.unsigned)}else return S===32?u(M,0,this.unsigned):u(M>>>S-32,0,this.unsigned)},F.shru=F.shiftRightUnsigned,F.shr_u=F.shiftRightUnsigned,F.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},F.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},F.toBytes=function(S){return S?this.toBytesLE():this.toBytesBE()},F.toBytesLE=function(){var S=this.high,M=this.low;return[M&255,M>>>8&255,M>>>16&255,M>>>24,S&255,S>>>8&255,S>>>16&255,S>>>24]},F.toBytesBE=function(){var S=this.high,M=this.low;return[S>>>24,S>>>16&255,S>>>8&255,S&255,M>>>24,M>>>16&255,M>>>8&255,M&255]},a.fromBytes=function(S,M,B){return B?a.fromBytesLE(S,M):a.fromBytesBE(S,M)},a.fromBytesLE=function(S,M){return new a(S[0]|S[1]<<8|S[2]<<16|S[3]<<24,S[4]|S[5]<<8|S[6]<<16|S[7]<<24,M)},a.fromBytesBE=function(S,M){return new a(S[4]<<24|S[5]<<16|S[6]<<8|S[7],S[0]<<24|S[1]<<16|S[2]<<8|S[3],M)}}),cF=Bt(()=>{}),dF=Bt(()=>{}),hF=Bt((e,t)=>{(function(n,a,r){function s(u){var p=this,d=l();p.next=function(){var c=2091639*p.s0+p.c*23283064365386963e-26;return p.s0=p.s1,p.s1=p.s2,p.s2=c-(p.c=c|0)},p.c=1,p.s0=d(" "),p.s1=d(" "),p.s2=d(" "),p.s0-=d(u),p.s0<0&&(p.s0+=1),p.s1-=d(u),p.s1<0&&(p.s1+=1),p.s2-=d(u),p.s2<0&&(p.s2+=1),d=null}function i(u,p){return p.c=u.c,p.s0=u.s0,p.s1=u.s1,p.s2=u.s2,p}function o(u,p){var d=new s(u),c=p&&p.state,h=d.next;return h.int32=function(){return d.next()*4294967296|0},h.double=function(){return h()+(h()*2097152|0)*11102230246251565e-32},h.quick=h,c&&(typeof c=="object"&&i(c,d),h.state=function(){return i(d,{})}),h}function l(){var u=4022871197,p=function(d){d=String(d);for(var c=0;c<d.length;c++){u+=d.charCodeAt(c);var h=.02519603282416938*u;u=h>>>0,h-=u,h*=u,u=h>>>0,h-=u,u+=h*4294967296}return(u>>>0)*23283064365386963e-26};return p}a&&a.exports?a.exports=o:r&&r.amd?r(function(){return o}):this.alea=o})(e,typeof t=="object"&&t,typeof define=="function"&&define)}),mF=Bt((e,t)=>{(function(n,a,r){function s(l){var u=this,p="";u.x=0,u.y=0,u.z=0,u.w=0,u.next=function(){var c=u.x^u.x<<11;return u.x=u.y,u.y=u.z,u.z=u.w,u.w^=u.w>>>19^c^c>>>8},l===(l|0)?u.x=l:p+=l;for(var d=0;d<p.length+64;d++)u.x^=p.charCodeAt(d)|0,u.next()}function i(l,u){return u.x=l.x,u.y=l.y,u.z=l.z,u.w=l.w,u}function o(l,u){var p=new s(l),d=u&&u.state,c=function(){return(p.next()>>>0)/4294967296};return c.double=function(){do var h=p.next()>>>11,m=(p.next()>>>0)/4294967296,f=(h+m)/(1<<21);while(f===0);return f},c.int32=p.next,c.quick=c,d&&(typeof d=="object"&&i(d,p),c.state=function(){return i(p,{})}),c}a&&a.exports?a.exports=o:r&&r.amd?r(function(){return o}):this.xor128=o})(e,typeof t=="object"&&t,typeof define=="function"&&define)}),fF=Bt((e,t)=>{(function(n,a,r){function s(l){var u=this,p="";u.next=function(){var c=u.x^u.x>>>2;return u.x=u.y,u.y=u.z,u.z=u.w,u.w=u.v,(u.d=u.d+362437|0)+(u.v=u.v^u.v<<4^(c^c<<1))|0},u.x=0,u.y=0,u.z=0,u.w=0,u.v=0,l===(l|0)?u.x=l:p+=l;for(var d=0;d<p.length+64;d++)u.x^=p.charCodeAt(d)|0,d==p.length&&(u.d=u.x<<10^u.x>>>4),u.next()}function i(l,u){return u.x=l.x,u.y=l.y,u.z=l.z,u.w=l.w,u.v=l.v,u.d=l.d,u}function o(l,u){var p=new s(l),d=u&&u.state,c=function(){return(p.next()>>>0)/4294967296};return c.double=function(){do var h=p.next()>>>11,m=(p.next()>>>0)/4294967296,f=(h+m)/(1<<21);while(f===0);return f},c.int32=p.next,c.quick=c,d&&(typeof d=="object"&&i(d,p),c.state=function(){return i(p,{})}),c}a&&a.exports?a.exports=o:r&&r.amd?r(function(){return o}):this.xorwow=o})(e,typeof t=="object"&&t,typeof define=="function"&&define)}),gF=Bt((e,t)=>{(function(n,a,r){function s(l){var u=this;u.next=function(){var d=u.x,c=u.i,h,m,f;return h=d[c],h^=h>>>7,m=h^h<<24,h=d[c+1&7],m^=h^h>>>10,h=d[c+3&7],m^=h^h>>>3,h=d[c+4&7],m^=h^h<<7,h=d[c+7&7],h=h^h<<13,m^=h^h<<9,d[c]=m,u.i=c+1&7,m};function p(d,c){var h,m,f=[];if(c===(c|0))m=f[0]=c;else for(c=""+c,h=0;h<c.length;++h)f[h&7]=f[h&7]<<15^c.charCodeAt(h)+f[h+1&7]<<13;for(;f.length<8;)f.push(0);for(h=0;h<8&&f[h]===0;++h);for(h==8?m=f[7]=-1:m=f[h],d.x=f,d.i=0,h=256;h>0;--h)d.next()}p(u,l)}function i(l,u){return u.x=l.x.slice(),u.i=l.i,u}function o(l,u){l==null&&(l=+new Date);var p=new s(l),d=u&&u.state,c=function(){return(p.next()>>>0)/4294967296};return c.double=function(){do var h=p.next()>>>11,m=(p.next()>>>0)/4294967296,f=(h+m)/(1<<21);while(f===0);return f},c.int32=p.next,c.quick=c,d&&(d.x&&i(d,p),c.state=function(){return i(p,{})}),c}a&&a.exports?a.exports=o:r&&r.amd?r(function(){return o}):this.xorshift7=o})(e,typeof t=="object"&&t,typeof define=="function"&&define)}),yF=Bt((e,t)=>{(function(n,a,r){function s(l){var u=this;u.next=function(){var d=u.w,c=u.X,h=u.i,m,f;return u.w=d=d+1640531527|0,f=c[h+34&127],m=c[h=h+1&127],f^=f<<13,m^=m<<17,f^=f>>>15,m^=m>>>12,f=c[h]=f^m,u.i=h,f+(d^d>>>16)|0};function p(d,c){var h,m,f,g,y,b=[],x=128;for(c===(c|0)?(m=c,c=null):(c=c+"\0",m=0,x=Math.max(x,c.length)),f=0,g=-32;g<x;++g)c&&(m^=c.charCodeAt((g+32)%c.length)),g===0&&(y=m),m^=m<<10,m^=m>>>15,m^=m<<4,m^=m>>>13,g>=0&&(y=y+1640531527|0,h=b[g&127]^=m+y,f=h==0?f+1:0);for(f>=128&&(b[(c&&c.length||0)&127]=-1),f=127,g=4*128;g>0;--g)m=b[f+34&127],h=b[f=f+1&127],m^=m<<13,h^=h<<17,m^=m>>>15,h^=h>>>12,b[f]=m^h;d.w=y,d.X=b,d.i=f}p(u,l)}function i(l,u){return u.i=l.i,u.w=l.w,u.X=l.X.slice(),u}function o(l,u){l==null&&(l=+new Date);var p=new s(l),d=u&&u.state,c=function(){return(p.next()>>>0)/4294967296};return c.double=function(){do var h=p.next()>>>11,m=(p.next()>>>0)/4294967296,f=(h+m)/(1<<21);while(f===0);return f},c.int32=p.next,c.quick=c,d&&(d.X&&i(d,p),c.state=function(){return i(p,{})}),c}a&&a.exports?a.exports=o:r&&r.amd?r(function(){return o}):this.xor4096=o})(e,typeof t=="object"&&t,typeof define=="function"&&define)}),bF=Bt((e,t)=>{(function(n,a,r){function s(l){var u=this,p="";u.next=function(){var c=u.b,h=u.c,m=u.d,f=u.a;return c=c<<25^c>>>7^h,h=h-m|0,m=m<<24^m>>>8^f,f=f-c|0,u.b=c=c<<20^c>>>12^h,u.c=h=h-m|0,u.d=m<<16^h>>>16^f,u.a=f-c|0},u.a=0,u.b=0,u.c=-1640531527,u.d=1367130551,l===Math.floor(l)?(u.a=l/4294967296|0,u.b=l|0):p+=l;for(var d=0;d<p.length+20;d++)u.b^=p.charCodeAt(d)|0,u.next()}function i(l,u){return u.a=l.a,u.b=l.b,u.c=l.c,u.d=l.d,u}function o(l,u){var p=new s(l),d=u&&u.state,c=function(){return(p.next()>>>0)/4294967296};return c.double=function(){do var h=p.next()>>>11,m=(p.next()>>>0)/4294967296,f=(h+m)/(1<<21);while(f===0);return f},c.int32=p.next,c.quick=c,d&&(typeof d=="object"&&i(d,p),c.state=function(){return i(p,{})}),c}a&&a.exports?a.exports=o:r&&r.amd?r(function(){return o}):this.tychei=o})(e,typeof t=="object"&&t,typeof define=="function"&&define)}),xF=Bt(()=>{}),vF=Bt((e,t)=>{(function(n,a,r){var s=256,i=6,o=52,l="random",u=r.pow(s,i),p=r.pow(2,o),d=p*2,c=s-1,h;function m(I,T,C){var E=[];T=T==!0?{entropy:!0}:T||{};var $=b(y(T.entropy?[I,w(a)]:I==null?x():I,3),E),R=new f(E),F=function(){for(var S=R.g(i),M=u,B=0;S<p;)S=(S+B)*s,M*=s,B=R.g(1);for(;S>=d;)S/=2,M/=2,B>>>=1;return(S+B)/M};return F.int32=function(){return R.g(4)|0},F.quick=function(){return R.g(4)/4294967296},F.double=F,b(w(R.S),a),(T.pass||C||function(S,M,B,U){return U&&(U.S&&g(U,R),S.state=function(){return g(R,{})}),B?(r[l]=S,M):S})(F,$,"global"in T?T.global:this==r,T.state)}function f(I){var T,C=I.length,E=this,$=0,R=E.i=E.j=0,F=E.S=[];for(C||(I=[C++]);$<s;)F[$]=$++;for($=0;$<s;$++)F[$]=F[R=c&R+I[$%C]+(T=F[$])],F[R]=T;(E.g=function(S){for(var M,B=0,U=E.i,G=E.j,j=E.S;S--;)M=j[U=c&U+1],B=B*s+j[c&(j[U]=j[G=c&G+M])+(j[G]=M)];return E.i=U,E.j=G,B})(s)}function g(I,T){return T.i=I.i,T.j=I.j,T.S=I.S.slice(),T}function y(I,T){var C=[],E=typeof I,$;if(T&&E=="object")for($ in I)try{C.push(y(I[$],T-1))}catch(R){}return C.length?C:E=="string"?I:I+"\0"}function b(I,T){for(var C=I+"",E,$=0;$<C.length;)T[c&$]=c&(E^=T[c&$]*19)+C.charCodeAt($++);return w(T)}function x(){try{var I;return h&&(I=h.randomBytes)?I=I(s):(I=new Uint8Array(s),(n.crypto||n.msCrypto).getRandomValues(I)),w(I)}catch(E){var T=n.navigator,C=T&&T.plugins;return[+new Date,n,C,n.screen,w(a)]}}function w(I){return String.fromCharCode.apply(0,I)}if(b(r.random(),a),typeof t=="object"&&t.exports){t.exports=m;try{h=xF()}catch(I){}}else typeof define=="function"&&define.amd?define(function(){return m}):r["seed"+l]=m})(typeof self!="undefined"?self:e,[],Math)}),Gh=Bt((e,t)=>{var n=hF(),a=mF(),r=fF(),s=gF(),i=yF(),o=bF(),l=vF();l.alea=n,l.xor128=a,l.xorwow=r,l.xorshift7=s,l.xor4096=i,l.tychei=o,t.exports=l}),yI=Bt(()=>{}),yx=Bt(()=>{}),bI=Bt(()=>{}),wF=Bt(()=>{}),kF=Bt(()=>{}),IF=Bt(()=>{}),SF=Bt((e,t)=>{var n=(()=>{var a=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename!="undefined"&&(a=a||__filename),function(r){r=r||{};function s(){return ue.buffer!=De&&st(ue.buffer),dt}function i(){return ue.buffer!=De&&st(ue.buffer),Hn}function o(){return ue.buffer!=De&&st(ue.buffer),Pt}function l(){return ue.buffer!=De&&st(ue.buffer),on}function u(){return ue.buffer!=De&&st(ue.buffer),Fn}function p(){return ue.buffer!=De&&st(ue.buffer),ia}function d(){return ue.buffer!=De&&st(ue.buffer),Rn}var c=typeof r!="undefined"?r:{},h,m;c.ready=new Promise(function(D,q){h=D,m=q});var f;typeof process!="undefined"&&process.listeners&&(f={uncaughtException:process.listeners("uncaughtException"),unhandledRejection:process.listeners("unhandledRejection")});var g=Object.assign({},c),y=[],b="./this.program",x=(D,q)=>{throw q},w=typeof window=="object",I=typeof importScripts=="function",T=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",C=c.ENVIRONMENT_IS_PTHREAD||!1,E="";function $(D){return c.locateFile?c.locateFile(D,E):E+D}var R,F,S,M;function B(D){D instanceof Ls||J("exiting due to exception: "+D)}if(T){var U=yx(),G=bI();I?E=G.dirname(E)+"/":E=__dirname+"/",R=(q,le)=>(q=Bo(q)?new URL(q):G.normalize(q),U.readFileSync(q,le?void 0:"utf8")),S=q=>{var le=R(q,!0);return le.buffer||(le=new Uint8Array(le)),le},F=(q,le,Te)=>{q=Bo(q)?new URL(q):G.normalize(q),U.readFile(q,function(Me,Fe){Me?Te(Me):le(Fe.buffer)})},process.argv.length>1&&(b=process.argv[1].replace(/\\/g,"/")),y=process.argv.slice(2),process.on("uncaughtException",function(q){if(!(q instanceof Ls))throw q}),process.on("unhandledRejection",function(q){throw q}),x=(q,le)=>{if(ka())throw process.exitCode=q,le;B(le),process.exit(q)},c.inspect=function(){return"[Emscripten Module object]"};let D;try{D=wF()}catch(q){throw console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'),q}global.Worker=D.Worker}else(w||I)&&(I?E=self.location.href:typeof document!="undefined"&&document.currentScript&&(E=document.currentScript.src),typeof a!="undefined"&&a&&(E=a),E.indexOf("blob:")!==0?E=E.substr(0,E.replace(/[?#].*/,"").lastIndexOf("/")+1):E="",T||(R=D=>{var q=new XMLHttpRequest;return q.open("GET",D,!1),q.send(null),q.responseText},I&&(S=D=>{var q=new XMLHttpRequest;return q.open("GET",D,!1),q.responseType="arraybuffer",q.send(null),new Uint8Array(q.response)}),F=(D,q,le)=>{var Te=new XMLHttpRequest;Te.open("GET",D,!0),Te.responseType="arraybuffer",Te.onload=()=>{if(Te.status==200||Te.status==0&&Te.response){q(Te.response);return}le()},Te.onerror=le,Te.send(null)}),M=D=>document.title=D);T&&typeof performance=="undefined"&&(global.performance=kF().performance);var j=console.log.bind(console),K=console.warn.bind(console);T&&(j=D=>U.writeSync(1,D+`
`),K=D=>U.writeSync(2,D+`
`));var Z=c.print||j,J=c.printErr||K;Object.assign(c,g),g=null,c.arguments&&(y=c.arguments),c.thisProgram&&(b=c.thisProgram),c.quit&&(x=c.quit);var ee=4,ae=Atomics.load,te=Atomics.store,re=Atomics.compareExchange,se;c.wasmBinary&&(se=c.wasmBinary);var be=c.noExitRuntime||!0;typeof WebAssembly!="object"&&Os("no native wasm support detected");var ue,ye,ke=!1,Se;function We(D,q){D||Os(q)}var Ge=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function pt(D,q,le){for(var Te=q+le,Me=q;D[Me]&&!(Me>=Te);)++Me;if(Me-q>16&&D.buffer&&Ge)return Ge.decode(D.buffer instanceof SharedArrayBuffer?D.slice(q,Me):D.subarray(q,Me));for(var Fe="";q<Me;){var me=D[q++];if(!(me&128)){Fe+=String.fromCharCode(me);continue}var we=D[q++]&63;if((me&224)==192){Fe+=String.fromCharCode((me&31)<<6|we);continue}var Nt=D[q++]&63;if((me&240)==224?me=(me&15)<<12|we<<6|Nt:me=(me&7)<<18|we<<12|Nt<<6|D[q++]&63,me<65536)Fe+=String.fromCharCode(me);else{var la=me-65536;Fe+=String.fromCharCode(55296|la>>10,56320|la&1023)}}return Fe}function at(D,q){return D?pt(i(),D,q):""}function Qe(D,q,le,Te){if(!(Te>0))return 0;for(var Me=le,Fe=le+Te-1,me=0;me<D.length;++me){var we=D.charCodeAt(me);if(we>=55296&&we<=57343){var Nt=D.charCodeAt(++me);we=65536+((we&1023)<<10)|Nt&1023}if(we<=127){if(le>=Fe)break;q[le++]=we}else if(we<=2047){if(le+1>=Fe)break;q[le++]=192|we>>6,q[le++]=128|we&63}else if(we<=65535){if(le+2>=Fe)break;q[le++]=224|we>>12,q[le++]=128|we>>6&63,q[le++]=128|we&63}else{if(le+3>=Fe)break;q[le++]=240|we>>18,q[le++]=128|we>>12&63,q[le++]=128|we>>6&63,q[le++]=128|we&63}}return q[le]=0,le-Me}function et(D,q,le){return Qe(D,i(),q,le)}var De,dt,Hn,Pt,sa,on,Fn,ia,Rn;C&&(De=c.buffer);function st(D){De=D,c.HEAP8=dt=new Int8Array(D),c.HEAP16=Pt=new Int16Array(D),c.HEAP32=on=new Int32Array(D),c.HEAPU8=Hn=new Uint8Array(D),c.HEAPU16=sa=new Uint16Array(D),c.HEAPU32=Fn=new Uint32Array(D),c.HEAPF32=ia=new Float32Array(D),c.HEAPF64=Rn=new Float64Array(D)}var Dn=c.INITIAL_MEMORY||16777216;if(C)ue=c.wasmMemory,De=c.buffer;else if(c.wasmMemory)ue=c.wasmMemory;else if(ue=new WebAssembly.Memory({initial:Dn/65536,maximum:32768,shared:!0}),!(ue.buffer instanceof SharedArrayBuffer))throw J("requested a shared WebAssembly.Memory but the returned buffer is not a SharedArrayBuffer, indicating that while the browser has SharedArrayBuffer it does not have WebAssembly threads support - you may need to set a flag"),T&&J("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");ue&&(De=ue.buffer),Dn=De.byteLength,st(De);var qn,br=[],zo=[],Qa=[],dp=!1;function ka(){return be}function Ur(){if(c.preRun)for(typeof c.preRun=="function"&&(c.preRun=[c.preRun]);c.preRun.length;)hg(c.preRun.shift());mp(br)}function Zt(){dp=!0,!C&&mp(zo)}function gd(){if(!C){if(c.postRun)for(typeof c.postRun=="function"&&(c.postRun=[c.postRun]);c.postRun.length;)T1(c.postRun.shift());mp(Qa)}}function hg(D){br.unshift(D)}function mg(D){zo.unshift(D)}function T1(D){Qa.unshift(D)}var Gr=0,Wo=null,xr=null;function fg(D){Gr++,c.monitorRunDependencies&&c.monitorRunDependencies(Gr)}function yd(D){if(Gr--,c.monitorRunDependencies&&c.monitorRunDependencies(Gr),Gr==0&&(Wo!==null&&(clearInterval(Wo),Wo=null),xr)){var q=xr;xr=null,q()}}function Os(D){c.onAbort&&c.onAbort(D),D="Aborted("+D+")",J(D),ke=!0,Se=1,D+=". Build with -sASSERTIONS for more info.";var q=new WebAssembly.RuntimeError(D);throw m(q),q}var gg="data:application/octet-stream;base64,";function bd(D){return D.startsWith(gg)}function Bo(D){return D.startsWith("file://")}var mn;mn="tfjs-backend-wasm-threaded-simd.wasm",bd(mn)||(mn=$(mn));function xd(D){try{if(D==mn&&se)return new Uint8Array(se);if(S)return S(D);throw"both async and sync fetching of the wasm failed"}catch(q){Os(q)}}function yg(){if(!se&&(w||I)){if(typeof fetch=="function"&&!Bo(mn))return fetch(mn,{credentials:"same-origin"}).then(function(D){if(!D.ok)throw"failed to load wasm binary file at '"+mn+"'";return D.arrayBuffer()}).catch(function(){return xd(mn)});if(F)return new Promise(function(D,q){F(mn,function(le){D(new Uint8Array(le))},q)})}return Promise.resolve().then(function(){return xd(mn)})}function bg(){var D={env:Fd,wasi_snapshot_preview1:Fd};function q(me,we){var Nt=me.exports;if(c.asm=Nt,Cg(c.asm._emscripten_tls_init),qn=c.asm.__indirect_function_table,mg(c.asm.__wasm_call_ctors),ye=we,!C){var la=$e.unusedWorkers.length;$e.unusedWorkers.forEach(function(wr){$e.loadWasmModuleToWorker(wr,function(){--la||yd("wasm-instantiate")})})}}C||fg("wasm-instantiate");function le(me){q(me.instance,me.module)}function Te(me){return yg().then(function(we){return WebAssembly.instantiate(we,D)}).then(function(we){return we}).then(me,function(we){J("failed to asynchronously prepare wasm: "+we),Os(we)})}function Me(){return!se&&typeof WebAssembly.instantiateStreaming=="function"&&!bd(mn)&&!Bo(mn)&&!T&&typeof fetch=="function"?fetch(mn,{credentials:"same-origin"}).then(function(me){var we=WebAssembly.instantiateStreaming(me,D);return we.then(le,function(Nt){return J("wasm streaming compile failed: "+Nt),J("falling back to ArrayBuffer instantiation"),Te(le)})}):Te(le)}if(c.instantiateWasm)try{var Fe=c.instantiateWasm(D,q);return Fe}catch(me){J("Module.instantiateWasm callback failed with error: "+me),m(me)}return Me().catch(m),{}}var N1,C1,vd={};function Ls(D){this.name="ExitStatus",this.message="Program terminated with exit("+D+")",this.status=D}function xg(D){var q=$e.pthreads[D];delete $e.pthreads[D],q.terminate(),Jy(D),$e.runningWorkers.splice($e.runningWorkers.indexOf(q),1),q.pthread_ptr=0}function vg(D){var q=$e.pthreads[D];q.postMessage({cmd:"cancel"})}function hp(D){var q=$e.pthreads[D];We(q),$e.returnWorkerToPool(q)}function wg(D){var q=$e.getNewWorker();if(!q)return 6;$e.runningWorkers.push(q),$e.pthreads[D.pthread_ptr]=q,q.pthread_ptr=D.pthread_ptr;var le={cmd:"run",start_routine:D.startRoutine,arg:D.arg,pthread_ptr:D.pthread_ptr};return q.runPthread=()=>{T&&q.ref(),q.postMessage(le,D.transferList),delete q.runPthread},q.loaded&&q.runPthread(),0}var wd={varargs:void 0,get:function(){wd.varargs+=4;var D=l()[wd.varargs-4>>2];return D},getStr:function(D){var q=at(D);return q}};function kd(D){if(C)return Hr(1,1,D);Se=D,ka()||($e.terminateAllThreads(),c.onExit&&c.onExit(D),ke=!0),x(D,new Ls(D))}function kg(D,q){if(Se=D,!q&&C)throw Sd(D),"unwind";kd(D)}var Id=kg;function Ig(D){if(D instanceof Ls||D=="unwind")return Se;x(1,D)}var $e={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init:function(){C?$e.initWorker():$e.initMainThread()},initMainThread:function(){for(var D=8;D--;)$e.allocateUnusedWorker()},initWorker:function(){be=!1},setExitStatus:function(D){Se=D},terminateAllThreads:function(){for(var D of Object.values($e.pthreads))$e.returnWorkerToPool(D);for(var D of $e.unusedWorkers)D.terminate();$e.unusedWorkers=[]},returnWorkerToPool:function(D){var q=D.pthread_ptr;delete $e.pthreads[q],$e.unusedWorkers.push(D),$e.runningWorkers.splice($e.runningWorkers.indexOf(D),1),D.pthread_ptr=0,T&&D.unref(),Jy(q)},receiveObjectTransfer:function(D){},threadInitTLS:function(){$e.tlsInitFunctions.forEach(D=>D())},loadWasmModuleToWorker:function(D,q){D.onmessage=Fe=>{var me=Fe.data,we=me.cmd;if(D.pthread_ptr&&($e.currentProxiedOperationCallerThread=D.pthread_ptr),me.targetThread&&me.targetThread!=Ld()){var Nt=$e.pthreads[me.targetThread];Nt?Nt.postMessage(me,me.transferList):J('Internal error! Worker sent a message "'+we+'" to target pthread '+me.targetThread+", but that thread no longer exists!"),$e.currentProxiedOperationCallerThread=void 0;return}we==="processProxyingQueue"?fp(me.queue):we==="spawnThread"?wg(me):we==="cleanupThread"?hp(me.thread):we==="killThread"?xg(me.thread):we==="cancelThread"?vg(me.thread):we==="loaded"?(D.loaded=!0,T&&D.unref(),q&&q(D),D.runPthread&&D.runPthread()):we==="print"?Z("Thread "+me.threadId+": "+me.text):we==="printErr"?J("Thread "+me.threadId+": "+me.text):we==="alert"?alert("Thread "+me.threadId+": "+me.text):me.target==="setimmediate"?D.postMessage(me):we==="callHandler"?c[me.handler](...me.args):we&&J("worker sent an unknown command "+we),$e.currentProxiedOperationCallerThread=void 0},D.onerror=Fe=>{var me="worker sent an error!";throw J(me+" "+Fe.filename+":"+Fe.lineno+": "+Fe.message),Fe},T&&(D.on("message",function(Fe){D.onmessage({data:Fe})}),D.on("error",function(Fe){D.onerror(Fe)}),D.on("detachedExit",function(){}));var le=[],Te=["onExit","onAbort","print","printErr"];for(var Me of Te)c.hasOwnProperty(Me)&&le.push(Me);D.postMessage({cmd:"load",handlers:le,urlOrBlob:c.mainScriptUrlOrBlob||a,wasmMemory:ue,wasmModule:ye})},allocateUnusedWorker:function(){var D,q=$("tfjs-backend-wasm-threaded-simd.worker.js");D=new Worker(q),$e.unusedWorkers.push(D)},getNewWorker:function(){return $e.unusedWorkers.length==0&&($e.allocateUnusedWorker(),$e.loadWasmModuleToWorker($e.unusedWorkers[0])),$e.unusedWorkers.pop()}};c.PThread=$e;function mp(D){for(;D.length>0;)D.shift()(c)}function Sg(){var D=Ld(),q=l()[D+52>>2],le=l()[D+56>>2],Te=q-le;R1(q,Te),zd(q)}c.establishStackSpace=Sg;function Sd(D){if(C)return Hr(2,0,D);try{Id(D)}catch(q){Ig(q)}}var Vo=[];function Tg(D){var q=Vo[D];return q||(D>=Vo.length&&(Vo.length=D+1),Vo[D]=q=qn.get(D)),q}function Ng(D,q){var le=Tg(D)(q);ka()?$e.setExitStatus(le):F1(le)}c.invokeEntryPoint=Ng;function Cg(D){$e.tlsInitFunctions.push(D)}function _g(D){E1(D,!I,1,!w),$e.threadInitTLS()}function Eg(D){C?postMessage({cmd:"cleanupThread",thread:D}):hp(D)}function Td(D,q,le,Te){return C?Hr(3,1,D,q,le,Te):Nd(D,q,le,Te)}function Nd(D,q,le,Te){if(typeof SharedArrayBuffer=="undefined")return J("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var Me=[],Fe=0;if(C&&(Me.length===0||Fe))return Td(D,q,le,Te);if(Fe)return Fe;var me={startRoutine:le,pthread_ptr:D,arg:Te,transferList:Me};return C?(me.cmd="spawnThread",postMessage(me,Me),0):wg(me)}function Ag(){return 65536}var $g=!0;function Fg(){return $g}function fp(D){Atomics.store(l(),D>>2,1),Ld()&&$1(D),Atomics.compareExchange(l(),D>>2,1,0)}c.executeNotifiedProxyingQueue=fp;function Rg(D,q,le,Te){if(D==q)setTimeout(()=>fp(Te));else if(C)postMessage({targetThread:D,cmd:"processProxyingQueue",queue:Te});else{var Me=$e.pthreads[D];if(!Me)return;Me.postMessage({cmd:"processProxyingQueue",queue:Te})}return 1}function Dg(D,q,le){return-1}function Mg(){Os("")}function zs(D){zs.shown||(zs.shown={}),zs.shown[D]||(zs.shown[D]=1,T&&(D="warning: "+D),J(D))}function Pg(){T||I||zs("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")}function Og(){return Date.now()}function Cd(){return 2147483648}function Lg(){return Cd()}var gp;T?gp=()=>{var D=process.hrtime();return D[0]*1e3+D[1]/1e6}:gp=()=>performance.timeOrigin+performance.now();function zg(D,q,le){i().copyWithin(D,q,q+le)}function Wg(){return T?IF().cpus().length:navigator.hardwareConcurrency}function Bg(D){var q=Qy(),le=D();return zd(q),le}function Hr(D,q){var le=arguments.length-2,Te=arguments;return Bg(()=>{for(var Me=le,Fe=Wd(Me*8),me=Fe>>3,we=0;we<le;we++){var Nt=Te[2+we];d()[me+we]=Nt}return A1(D,Me,Fe,q)})}var yp=[];function Vg(D,q,le){yp.length=q;for(var Te=le>>3,Me=0;Me<q;Me++)yp[Me]=d()[Te+Me];var Fe=D<0,me=Fe?vd[-D-1]:Zg[D];return me.apply(null,yp)}function Ug(D){try{return ue.grow(D-De.byteLength+65535>>>16),st(ue.buffer),1}catch(q){}}function Gg(D){var q=i().length;if(D=D>>>0,D<=q)return!1;var le=Cd();if(D>le)return!1;let Te=(Nt,la)=>Nt+(la-Nt%la)%la;for(var Me=1;Me<=4;Me*=2){var Fe=q*(1+.2/Me);Fe=Math.min(Fe,D+100663296);var me=Math.min(le,Te(Math.max(D,Fe),65536)),we=Ug(me);if(we)return!0}return!1}function Hg(){throw"unwind"}function _d(D){return C?Hr(4,1,D):52}function Ed(D,q,le,Te,Me){return C?Hr(5,1,D,q,le,Te,Me):70}var qg=[null,[],[]];function jg(D,q){var le=qg[D];q===0||q===10?((D===1?Z:J)(pt(le,0)),le.length=0):le.push(q)}function Ad(D,q,le,Te){if(C)return Hr(6,1,D,q,le,Te);for(var Me=0,Fe=0;Fe<le;Fe++){var me=u()[q>>2],we=u()[q+4>>2];q+=8;for(var Nt=0;Nt<we;Nt++)jg(D,i()[me+Nt]);Me+=we}return u()[Te>>2]=Me,0}function $d(D){var q=c["_"+D];return q}function Kg(D,q){s().set(D,q)}function Xg(D,q,le,Te,Me){var Fe={string:ua=>{var qo=0;if(ua!=null&&ua!==0){var P1=(ua.length<<2)+1;qo=Wd(P1),et(ua,qo,P1)}return qo},array:ua=>{var qo=Wd(ua.length);return Kg(ua,qo),qo}};function me(ua){return q==="string"?at(ua):q==="boolean"?Boolean(ua):ua}var we=$d(D),Nt=[],la=0;if(Te)for(var wr=0;wr<Te.length;wr++){var M1=Fe[le[wr]];M1?(la===0&&(la=Qy()),Nt[wr]=M1(Te[wr])):Nt[wr]=Te[wr]}var eb=we.apply(null,Nt);function tF(ua){return la!==0&&zd(la),me(ua)}return eb=tF(eb),eb}function Yg(D,q,le,Te){le=le||[];var Me=le.every(me=>me==="number"||me==="boolean"),Fe=q!=="string";return Fe&&Me&&!Te?$d(D):function(){return Xg(D,q,le,arguments,Te)}}$e.init();var Zg=[null,kd,Sd,Td,_d,Ed,Ad],Fd={__emscripten_init_main_thread_js:_g,__emscripten_thread_cleanup:Eg,__pthread_create_js:Nd,_emscripten_default_pthread_stack_size:Ag,_emscripten_get_now_is_monotonic:Fg,_emscripten_notify_task_queue:Rg,_emscripten_set_offscreencanvas_size:Dg,abort:Mg,emscripten_check_blocking_allowed:Pg,emscripten_date_now:Og,emscripten_get_heap_max:Lg,emscripten_get_now:gp,emscripten_memcpy_big:zg,emscripten_num_logical_cores:Wg,emscripten_receive_on_main_thread_js:Vg,emscripten_resize_heap:Gg,emscripten_unwind_to_js_event_loop:Hg,exit:Id,fd_close:_d,fd_seek:Ed,fd_write:Ad,memory:ue||c.wasmMemory},_1=bg(),Jg=c.___wasm_call_ctors=function(){return(Jg=c.___wasm_call_ctors=c.asm.__wasm_call_ctors).apply(null,arguments)},Qg=c._init=function(){return(Qg=c._init=c.asm.init).apply(null,arguments)},ey=c._init_with_threads_count=function(){return(ey=c._init_with_threads_count=c.asm.init_with_threads_count).apply(null,arguments)},ty=c._get_threads_count=function(){return(ty=c._get_threads_count=c.asm.get_threads_count).apply(null,arguments)},ny=c._register_tensor=function(){return(ny=c._register_tensor=c.asm.register_tensor).apply(null,arguments)},ay=c._dispose_data=function(){return(ay=c._dispose_data=c.asm.dispose_data).apply(null,arguments)},ry=c._dispose=function(){return(ry=c._dispose=c.asm.dispose).apply(null,arguments)},sy=c._Abs=function(){return(sy=c._Abs=c.asm.Abs).apply(null,arguments)},iy=c._Add=function(){return(iy=c._Add=c.asm.Add).apply(null,arguments)},oy=c._AddN=function(){return(oy=c._AddN=c.asm.AddN).apply(null,arguments)},ly=c._All=function(){return(ly=c._All=c.asm.All).apply(null,arguments)},uy=c._Any=function(){return(uy=c._Any=c.asm.Any).apply(null,arguments)},py=c._ArgMax=function(){return(py=c._ArgMax=c.asm.ArgMax).apply(null,arguments)},cy=c._AvgPool=function(){return(cy=c._AvgPool=c.asm.AvgPool).apply(null,arguments)},dy=c._BatchMatMul=function(){return(dy=c._BatchMatMul=c.asm.BatchMatMul).apply(null,arguments)},hy=c._Ceil=function(){return(hy=c._Ceil=c.asm.Ceil).apply(null,arguments)},my=c._ClipByValue=function(){return(my=c._ClipByValue=c.asm.ClipByValue).apply(null,arguments)},fy=c._Conv2D=function(){return(fy=c._Conv2D=c.asm.Conv2D).apply(null,arguments)},gy=c._Conv2DBackpropInput=function(){return(gy=c._Conv2DBackpropInput=c.asm.Conv2DBackpropInput).apply(null,arguments)},yy=c._Cos=function(){return(yy=c._Cos=c.asm.Cos).apply(null,arguments)},by=c._Cosh=function(){return(by=c._Cosh=c.asm.Cosh).apply(null,arguments)},xy=c._CropAndResize=function(){return(xy=c._CropAndResize=c.asm.CropAndResize).apply(null,arguments)},vy=c._Cumprod=function(){return(vy=c._Cumprod=c.asm.Cumprod).apply(null,arguments)},wy=c._Cumsum=function(){return(wy=c._Cumsum=c.asm.Cumsum).apply(null,arguments)},ky=c._DepthToSpace=function(){return(ky=c._DepthToSpace=c.asm.DepthToSpace).apply(null,arguments)},Iy=c._DepthwiseConv2dNative=function(){return(Iy=c._DepthwiseConv2dNative=c.asm.DepthwiseConv2dNative).apply(null,arguments)},Sy=c._Elu=function(){return(Sy=c._Elu=c.asm.Elu).apply(null,arguments)},Ty=c._Equal=function(){return(Ty=c._Equal=c.asm.Equal).apply(null,arguments)},Ny=c._Exp=function(){return(Ny=c._Exp=c.asm.Exp).apply(null,arguments)},Cy=c._FlipLeftRight=function(){return(Cy=c._FlipLeftRight=c.asm.FlipLeftRight).apply(null,arguments)},_y=c._Floor=function(){return(_y=c._Floor=c.asm.Floor).apply(null,arguments)},Ey=c._FloorDiv=function(){return(Ey=c._FloorDiv=c.asm.FloorDiv).apply(null,arguments)},Ay=c._FusedBatchNorm=function(){return(Ay=c._FusedBatchNorm=c.asm.FusedBatchNorm).apply(null,arguments)},$y=c._FusedConv2D=function(){return($y=c._FusedConv2D=c.asm.FusedConv2D).apply(null,arguments)},Fy=c._FusedDepthwiseConv2D=function(){return(Fy=c._FusedDepthwiseConv2D=c.asm.FusedDepthwiseConv2D).apply(null,arguments)},Ry=c._Gather=function(){return(Ry=c._Gather=c.asm.Gather).apply(null,arguments)},Dy=c._GatherNd=function(){return(Dy=c._GatherNd=c.asm.GatherNd).apply(null,arguments)},My=c._Greater=function(){return(My=c._Greater=c.asm.Greater).apply(null,arguments)},Py=c._GreaterEqual=function(){return(Py=c._GreaterEqual=c.asm.GreaterEqual).apply(null,arguments)},Oy=c._IsNan=function(){return(Oy=c._IsNan=c.asm.IsNan).apply(null,arguments)},Ly=c._LeakyRelu=function(){return(Ly=c._LeakyRelu=c.asm.LeakyRelu).apply(null,arguments)},zy=c._Less=function(){return(zy=c._Less=c.asm.Less).apply(null,arguments)},Wy=c._LessEqual=function(){return(Wy=c._LessEqual=c.asm.LessEqual).apply(null,arguments)},By=c._Log=function(){return(By=c._Log=c.asm.Log).apply(null,arguments)},Vy=c._LogicalAnd=function(){return(Vy=c._LogicalAnd=c.asm.LogicalAnd).apply(null,arguments)},Uy=c._LogicalNot=function(){return(Uy=c._LogicalNot=c.asm.LogicalNot).apply(null,arguments)},Gy=c._LogicalOr=function(){return(Gy=c._LogicalOr=c.asm.LogicalOr).apply(null,arguments)},Hy=c._LogicalXor=function(){return(Hy=c._LogicalXor=c.asm.LogicalXor).apply(null,arguments)},qy=c._Max=function(){return(qy=c._Max=c.asm.Max).apply(null,arguments)},jy=c._MaxPool=function(){return(jy=c._MaxPool=c.asm.MaxPool).apply(null,arguments)},Rd=c._Maximum=function(){return(Rd=c._Maximum=c.asm.Maximum).apply(null,arguments)},Dd=c._Mean=function(){return(Dd=c._Mean=c.asm.Mean).apply(null,arguments)},bp=c._Min=function(){return(bp=c._Min=c.asm.Min).apply(null,arguments)},Ky=c._Minimum=function(){return(Ky=c._Minimum=c.asm.Minimum).apply(null,arguments)},Xy=c._MirrorPad=function(){return(Xy=c._MirrorPad=c.asm.MirrorPad).apply(null,arguments)},Uo=c._Multiply=function(){return(Uo=c._Multiply=c.asm.Multiply).apply(null,arguments)},Md=c._Neg=function(){return(Md=c._Neg=c.asm.Neg).apply(null,arguments)},Go=c._NonMaxSuppressionV3=function(){return(Go=c._NonMaxSuppressionV3=c.asm.NonMaxSuppressionV3).apply(null,arguments)},Ho=c._NonMaxSuppressionV4=function(){return(Ho=c._NonMaxSuppressionV4=c.asm.NonMaxSuppressionV4).apply(null,arguments)},Yy=c._NonMaxSuppressionV5=function(){return(Yy=c._NonMaxSuppressionV5=c.asm.NonMaxSuppressionV5).apply(null,arguments)},Y=c._NotEqual=function(){return(Y=c._NotEqual=c.asm.NotEqual).apply(null,arguments)},oe=c._OneHot=function(){return(oe=c._OneHot=c.asm.OneHot).apply(null,arguments)},Ie=c._PadV2=function(){return(Ie=c._PadV2=c.asm.PadV2).apply(null,arguments)},Xe=c._Pow=function(){return(Xe=c._Pow=c.asm.Pow).apply(null,arguments)},wt=c._Prelu=function(){return(wt=c._Prelu=c.asm.Prelu).apply(null,arguments)},kt=c._Prod=function(){return(kt=c._Prod=c.asm.Prod).apply(null,arguments)},He=c._RealDiv=function(){return(He=c._RealDiv=c.asm.RealDiv).apply(null,arguments)},Be=c._Reciprocal=function(){return(Be=c._Reciprocal=c.asm.Reciprocal).apply(null,arguments)},Ot=c._Relu=function(){return(Ot=c._Relu=c.asm.Relu).apply(null,arguments)},oa=c._Relu6=function(){return(oa=c._Relu6=c.asm.Relu6).apply(null,arguments)},vr=c._ResizeBilinear=function(){return(vr=c._ResizeBilinear=c.asm.ResizeBilinear).apply(null,arguments)},Pd=c._ResizeNearestNeighbor=function(){return(Pd=c._ResizeNearestNeighbor=c.asm.ResizeNearestNeighbor).apply(null,arguments)},xp=c._Reverse=function(){return(xp=c._Reverse=c.asm.Reverse).apply(null,arguments)},Zy=c._RotateWithOffset=function(){return(Zy=c._RotateWithOffset=c.asm.RotateWithOffset).apply(null,arguments)},Mn=c._Round=function(){return(Mn=c._Round=c.asm.Round).apply(null,arguments)},qr=c._Rsqrt=function(){return(qr=c._Rsqrt=c.asm.Rsqrt).apply(null,arguments)},Od=c._ScatterNd=function(){return(Od=c._ScatterNd=c.asm.ScatterNd).apply(null,arguments)},I$=c._SelectV2=function(){return(I$=c._SelectV2=c.asm.SelectV2).apply(null,arguments)},S$=c._Sigmoid=function(){return(S$=c._Sigmoid=c.asm.Sigmoid).apply(null,arguments)},T$=c._Sin=function(){return(T$=c._Sin=c.asm.Sin).apply(null,arguments)},N$=c._Softmax=function(){return(N$=c._Softmax=c.asm.Softmax).apply(null,arguments)},C$=c._SparseFillEmptyRows=function(){return