UNPKG

@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

10 lines (9 loc) 1.2 MB
/* Face-API homepage: <https://github.com/vladmandic/face-api> author: <https://github.com/vladmandic>' */ var OU=Object.create;var r0=Object.defineProperty;var PU=Object.getOwnPropertyDescriptor;var LU=Object.getOwnPropertyNames;var MU=Object.getPrototypeOf,zU=Object.prototype.hasOwnProperty;var br=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),Ut=(r,t)=>{for(var e in t)r0(r,e,{get:t[e],enumerable:!0})},BU=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of LU(t))!zU.call(r,o)&&o!==e&&r0(r,o,{get:()=>t[o],enumerable:!(n=PU(t,o))||n.enumerable});return r};var El=(r,t,e)=>(e=r!=null?OU(MU(r)):{},BU(t||!r||!r.__esModule?r0(e,"default",{value:r,enumerable:!0}):e,r));var T1=br((Plt,N1)=>{N1.exports=Ue;var fo=null;try{fo=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(r){}function Ue(r,t,e){this.low=r|0,this.high=t|0,this.unsigned=!!e}Ue.prototype.__isLong__;Object.defineProperty(Ue.prototype,"__isLong__",{value:!0});function Pn(r){return(r&&r.__isLong__)===!0}Ue.isLong=Pn;var g1={},x1={};function Pu(r,t){var e,n,o;return t?(r>>>=0,(o=0<=r&&r<256)&&(n=x1[r],n)?n:(e=He(r,(r|0)<0?-1:0,!0),o&&(x1[r]=e),e)):(r|=0,(o=-128<=r&&r<128)&&(n=g1[r],n)?n:(e=He(r,r<0?-1:0,!1),o&&(g1[r]=e),e))}Ue.fromInt=Pu;function ho(r,t){if(isNaN(r))return t?Ou:go;if(t){if(r<0)return Ou;if(r>=C1)return S1}else{if(r<=-b1)return On;if(r+1>=b1)return v1}return r<0?ho(-r,t).neg():He(r%Gp|0,r/Gp|0,t)}Ue.fromNumber=ho;function He(r,t,e){return new Ue(r,t,e)}Ue.fromBits=He;var Vg=Math.pow;function h0(r,t,e){if(r.length===0)throw Error("empty string");if(r==="NaN"||r==="Infinity"||r==="+Infinity"||r==="-Infinity")return go;if(typeof t=="number"?(e=t,t=!1):t=!!t,e=e||10,e<2||36<e)throw RangeError("radix");var n;if((n=r.indexOf("-"))>0)throw Error("interior hyphen");if(n===0)return h0(r.substring(1),t,e).neg();for(var o=ho(Vg(e,8)),s=go,i=0;i<r.length;i+=8){var a=Math.min(8,r.length-i),u=parseInt(r.substring(i,i+a),e);if(a<8){var l=ho(Vg(e,a));s=s.mul(l).add(ho(u))}else s=s.mul(o),s=s.add(ho(u))}return s.unsigned=t,s}Ue.fromString=h0;function Ms(r,t){return typeof r=="number"?ho(r,t):typeof r=="string"?h0(r,t):He(r.low,r.high,typeof t=="boolean"?t:r.unsigned)}Ue.fromValue=Ms;var y1=1<<16,u4=1<<24,Gp=y1*y1,C1=Gp*Gp,b1=C1/2,w1=Pu(u4),go=Pu(0);Ue.ZERO=go;var Ou=Pu(0,!0);Ue.UZERO=Ou;var Vp=Pu(1);Ue.ONE=Vp;var I1=Pu(1,!0);Ue.UONE=I1;var d0=Pu(-1);Ue.NEG_ONE=d0;var v1=He(-1,2147483647,!1);Ue.MAX_VALUE=v1;var S1=He(-1,-1,!0);Ue.MAX_UNSIGNED_VALUE=S1;var On=He(0,-2147483648,!1);Ue.MIN_VALUE=On;var xt=Ue.prototype;xt.toInt=function(){return this.unsigned?this.low>>>0:this.low};xt.toNumber=function(){return this.unsigned?(this.high>>>0)*Gp+(this.low>>>0):this.high*Gp+(this.low>>>0)};xt.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(On)){var e=ho(t),n=this.div(e),o=n.mul(e).sub(this);return n.toString(t)+o.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var s=ho(Vg(t,6),this.unsigned),i=this,a="";;){var u=i.div(s),l=i.sub(u.mul(s)).toInt()>>>0,c=l.toString(t);if(i=u,i.isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}};xt.getHighBits=function(){return this.high};xt.getHighBitsUnsigned=function(){return this.high>>>0};xt.getLowBits=function(){return this.low};xt.getLowBitsUnsigned=function(){return this.low>>>0};xt.getNumBitsAbs=function(){if(this.isNegative())return this.eq(On)?64:this.neg().getNumBitsAbs();for(var t=this.high!=0?this.high:this.low,e=31;e>0&&!(t&1<<e);e--);return this.high!=0?e+33:e+1};xt.isZero=function(){return this.high===0&&this.low===0};xt.eqz=xt.isZero;xt.isNegative=function(){return!this.unsigned&&this.high<0};xt.isPositive=function(){return this.unsigned||this.high>=0};xt.isOdd=function(){return(this.low&1)===1};xt.isEven=function(){return(this.low&1)===0};xt.equals=function(t){return Pn(t)||(t=Ms(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low};xt.eq=xt.equals;xt.notEquals=function(t){return!this.eq(t)};xt.neq=xt.notEquals;xt.ne=xt.notEquals;xt.lessThan=function(t){return this.comp(t)<0};xt.lt=xt.lessThan;xt.lessThanOrEqual=function(t){return this.comp(t)<=0};xt.lte=xt.lessThanOrEqual;xt.le=xt.lessThanOrEqual;xt.greaterThan=function(t){return this.comp(t)>0};xt.gt=xt.greaterThan;xt.greaterThanOrEqual=function(t){return this.comp(t)>=0};xt.gte=xt.greaterThanOrEqual;xt.ge=xt.greaterThanOrEqual;xt.compare=function(t){if(Pn(t)||(t=Ms(t)),this.eq(t))return 0;var e=this.isNegative(),n=t.isNegative();return e&&!n?-1:!e&&n?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1};xt.comp=xt.compare;xt.negate=function(){return!this.unsigned&&this.eq(On)?On:this.not().add(Vp)};xt.neg=xt.negate;xt.add=function(t){Pn(t)||(t=Ms(t));var e=this.high>>>16,n=this.high&65535,o=this.low>>>16,s=this.low&65535,i=t.high>>>16,a=t.high&65535,u=t.low>>>16,l=t.low&65535,c=0,p=0,m=0,f=0;return f+=s+l,m+=f>>>16,f&=65535,m+=o+u,p+=m>>>16,m&=65535,p+=n+a,c+=p>>>16,p&=65535,c+=e+i,c&=65535,He(m<<16|f,c<<16|p,this.unsigned)};xt.subtract=function(t){return Pn(t)||(t=Ms(t)),this.add(t.neg())};xt.sub=xt.subtract;xt.multiply=function(t){if(this.isZero())return go;if(Pn(t)||(t=Ms(t)),fo){var e=fo.mul(this.low,this.high,t.low,t.high);return He(e,fo.get_high(),this.unsigned)}if(t.isZero())return go;if(this.eq(On))return t.isOdd()?On:go;if(t.eq(On))return this.isOdd()?On:go;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(w1)&&t.lt(w1))return ho(this.toNumber()*t.toNumber(),this.unsigned);var n=this.high>>>16,o=this.high&65535,s=this.low>>>16,i=this.low&65535,a=t.high>>>16,u=t.high&65535,l=t.low>>>16,c=t.low&65535,p=0,m=0,f=0,d=0;return d+=i*c,f+=d>>>16,d&=65535,f+=s*c,m+=f>>>16,f&=65535,f+=i*l,m+=f>>>16,f&=65535,m+=o*c,p+=m>>>16,m&=65535,m+=s*l,p+=m>>>16,m&=65535,m+=i*u,p+=m>>>16,m&=65535,p+=n*c+o*l+s*u+i*a,p&=65535,He(f<<16|d,p<<16|m,this.unsigned)};xt.mul=xt.multiply;xt.divide=function(t){if(Pn(t)||(t=Ms(t)),t.isZero())throw Error("division by zero");if(fo){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var e=(this.unsigned?fo.div_u:fo.div_s)(this.low,this.high,t.low,t.high);return He(e,fo.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?Ou:go;var n,o,s;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return Ou;if(t.gt(this.shru(1)))return I1;s=Ou}else{if(this.eq(On)){if(t.eq(Vp)||t.eq(d0))return On;if(t.eq(On))return Vp;var i=this.shr(1);return n=i.div(t).shl(1),n.eq(go)?t.isNegative()?Vp:d0:(o=this.sub(t.mul(n)),s=n.add(o.div(t)),s)}else if(t.eq(On))return this.unsigned?Ou:go;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();s=go}for(o=this;o.gte(t);){n=Math.max(1,Math.floor(o.toNumber()/t.toNumber()));for(var a=Math.ceil(Math.log(n)/Math.LN2),u=a<=48?1:Vg(2,a-48),l=ho(n),c=l.mul(t);c.isNegative()||c.gt(o);)n-=u,l=ho(n,this.unsigned),c=l.mul(t);l.isZero()&&(l=Vp),s=s.add(l),o=o.sub(c)}return s};xt.div=xt.divide;xt.modulo=function(t){if(Pn(t)||(t=Ms(t)),fo){var e=(this.unsigned?fo.rem_u:fo.rem_s)(this.low,this.high,t.low,t.high);return He(e,fo.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))};xt.mod=xt.modulo;xt.rem=xt.modulo;xt.not=function(){return He(~this.low,~this.high,this.unsigned)};xt.and=function(t){return Pn(t)||(t=Ms(t)),He(this.low&t.low,this.high&t.high,this.unsigned)};xt.or=function(t){return Pn(t)||(t=Ms(t)),He(this.low|t.low,this.high|t.high,this.unsigned)};xt.xor=function(t){return Pn(t)||(t=Ms(t)),He(this.low^t.low,this.high^t.high,this.unsigned)};xt.shiftLeft=function(t){return Pn(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?He(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):He(0,this.low<<t-32,this.unsigned)};xt.shl=xt.shiftLeft;xt.shiftRight=function(t){return Pn(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?He(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):He(this.high>>t-32,this.high>=0?0:-1,this.unsigned)};xt.shr=xt.shiftRight;xt.shiftRightUnsigned=function(t){if(Pn(t)&&(t=t.toInt()),t&=63,t===0)return this;var e=this.high;if(t<32){var n=this.low;return He(n>>>t|e<<32-t,e>>>t,this.unsigned)}else return t===32?He(e,0,this.unsigned):He(e>>>t-32,0,this.unsigned)};xt.shru=xt.shiftRightUnsigned;xt.shr_u=xt.shiftRightUnsigned;xt.toSigned=function(){return this.unsigned?He(this.low,this.high,!1):this};xt.toUnsigned=function(){return this.unsigned?this:He(this.low,this.high,!0)};xt.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()};xt.toBytesLE=function(){var t=this.high,e=this.low;return[e&255,e>>>8&255,e>>>16&255,e>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]};xt.toBytesBE=function(){var t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,e>>>24,e>>>16&255,e>>>8&255,e&255]};Ue.fromBytes=function(t,e,n){return n?Ue.fromBytesLE(t,e):Ue.fromBytesBE(t,e)};Ue.fromBytesLE=function(t,e){return new Ue(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)};Ue.fromBytesBE=function(t,e){return new Ue(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)}});var iE=br(()=>{});var aE=br(()=>{});var PE=br((OE,j0)=>{(function(r,t,e){function n(a){var u=this,l=i();u.next=function(){var c=2091639*u.s0+u.c*23283064365386963e-26;return u.s0=u.s1,u.s1=u.s2,u.s2=c-(u.c=c|0)},u.c=1,u.s0=l(" "),u.s1=l(" "),u.s2=l(" "),u.s0-=l(a),u.s0<0&&(u.s0+=1),u.s1-=l(a),u.s1<0&&(u.s1+=1),u.s2-=l(a),u.s2<0&&(u.s2+=1),l=null}function o(a,u){return u.c=a.c,u.s0=a.s0,u.s1=a.s1,u.s2=a.s2,u}function s(a,u){var l=new n(a),c=u&&u.state,p=l.next;return p.int32=function(){return l.next()*4294967296|0},p.double=function(){return p()+(p()*2097152|0)*11102230246251565e-32},p.quick=p,c&&(typeof c=="object"&&o(c,l),p.state=function(){return o(l,{})}),p}function i(){var a=4022871197,u=function(l){l=String(l);for(var c=0;c<l.length;c++){a+=l.charCodeAt(c);var p=.02519603282416938*a;a=p>>>0,p-=a,p*=a,a=p>>>0,p-=a,a+=p*4294967296}return(a>>>0)*23283064365386963e-26};return u}t&&t.exports?t.exports=s:e&&e.amd?e(function(){return s}):this.alea=s})(OE,typeof j0=="object"&&j0,typeof define=="function"&&define)});var ME=br((LE,X0)=>{(function(r,t,e){function n(i){var a=this,u="";a.x=0,a.y=0,a.z=0,a.w=0,a.next=function(){var c=a.x^a.x<<11;return a.x=a.y,a.y=a.z,a.z=a.w,a.w^=a.w>>>19^c^c>>>8},i===(i|0)?a.x=i:u+=i;for(var l=0;l<u.length+64;l++)a.x^=u.charCodeAt(l)|0,a.next()}function o(i,a){return a.x=i.x,a.y=i.y,a.z=i.z,a.w=i.w,a}function s(i,a){var u=new n(i),l=a&&a.state,c=function(){return(u.next()>>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,m=(u.next()>>>0)/4294967296,f=(p+m)/(1<<21);while(f===0);return f},c.int32=u.next,c.quick=c,l&&(typeof l=="object"&&o(l,u),c.state=function(){return o(u,{})}),c}t&&t.exports?t.exports=s:e&&e.amd?e(function(){return s}):this.xor128=s})(LE,typeof X0=="object"&&X0,typeof define=="function"&&define)});var BE=br((zE,Y0)=>{(function(r,t,e){function n(i){var a=this,u="";a.next=function(){var c=a.x^a.x>>>2;return a.x=a.y,a.y=a.z,a.z=a.w,a.w=a.v,(a.d=a.d+362437|0)+(a.v=a.v^a.v<<4^(c^c<<1))|0},a.x=0,a.y=0,a.z=0,a.w=0,a.v=0,i===(i|0)?a.x=i:u+=i;for(var l=0;l<u.length+64;l++)a.x^=u.charCodeAt(l)|0,l==u.length&&(a.d=a.x<<10^a.x>>>4),a.next()}function o(i,a){return a.x=i.x,a.y=i.y,a.z=i.z,a.w=i.w,a.v=i.v,a.d=i.d,a}function s(i,a){var u=new n(i),l=a&&a.state,c=function(){return(u.next()>>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,m=(u.next()>>>0)/4294967296,f=(p+m)/(1<<21);while(f===0);return f},c.int32=u.next,c.quick=c,l&&(typeof l=="object"&&o(l,u),c.state=function(){return o(u,{})}),c}t&&t.exports?t.exports=s:e&&e.amd?e(function(){return s}):this.xorwow=s})(zE,typeof Y0=="object"&&Y0,typeof define=="function"&&define)});var GE=br((VE,Z0)=>{(function(r,t,e){function n(i){var a=this;a.next=function(){var l=a.x,c=a.i,p,m,f;return p=l[c],p^=p>>>7,m=p^p<<24,p=l[c+1&7],m^=p^p>>>10,p=l[c+3&7],m^=p^p>>>3,p=l[c+4&7],m^=p^p<<7,p=l[c+7&7],p=p^p<<13,m^=p^p<<9,l[c]=m,a.i=c+1&7,m};function u(l,c){var p,m,f=[];if(c===(c|0))m=f[0]=c;else for(c=""+c,p=0;p<c.length;++p)f[p&7]=f[p&7]<<15^c.charCodeAt(p)+f[p+1&7]<<13;for(;f.length<8;)f.push(0);for(p=0;p<8&&f[p]===0;++p);for(p==8?m=f[7]=-1:m=f[p],l.x=f,l.i=0,p=256;p>0;--p)l.next()}u(a,i)}function o(i,a){return a.x=i.x.slice(),a.i=i.i,a}function s(i,a){i==null&&(i=+new Date);var u=new n(i),l=a&&a.state,c=function(){return(u.next()>>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,m=(u.next()>>>0)/4294967296,f=(p+m)/(1<<21);while(f===0);return f},c.int32=u.next,c.quick=c,l&&(l.x&&o(l,u),c.state=function(){return o(u,{})}),c}t&&t.exports?t.exports=s:e&&e.amd?e(function(){return s}):this.xorshift7=s})(VE,typeof Z0=="object"&&Z0,typeof define=="function"&&define)});var UE=br((WE,J0)=>{(function(r,t,e){function n(i){var a=this;a.next=function(){var l=a.w,c=a.X,p=a.i,m,f;return a.w=l=l+1640531527|0,f=c[p+34&127],m=c[p=p+1&127],f^=f<<13,m^=m<<17,f^=f>>>15,m^=m>>>12,f=c[p]=f^m,a.i=p,f+(l^l>>>16)|0};function u(l,c){var p,m,f,d,h,g=[],x=128;for(c===(c|0)?(m=c,c=null):(c=c+"\0",m=0,x=Math.max(x,c.length)),f=0,d=-32;d<x;++d)c&&(m^=c.charCodeAt((d+32)%c.length)),d===0&&(h=m),m^=m<<10,m^=m>>>15,m^=m<<4,m^=m>>>13,d>=0&&(h=h+1640531527|0,p=g[d&127]^=m+h,f=p==0?f+1:0);for(f>=128&&(g[(c&&c.length||0)&127]=-1),f=127,d=4*128;d>0;--d)m=g[f+34&127],p=g[f=f+1&127],m^=m<<13,p^=p<<17,m^=m>>>15,p^=p>>>12,g[f]=m^p;l.w=h,l.X=g,l.i=f}u(a,i)}function o(i,a){return a.i=i.i,a.w=i.w,a.X=i.X.slice(),a}function s(i,a){i==null&&(i=+new Date);var u=new n(i),l=a&&a.state,c=function(){return(u.next()>>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,m=(u.next()>>>0)/4294967296,f=(p+m)/(1<<21);while(f===0);return f},c.int32=u.next,c.quick=c,l&&(l.X&&o(l,u),c.state=function(){return o(u,{})}),c}t&&t.exports?t.exports=s:e&&e.amd?e(function(){return s}):this.xor4096=s})(WE,typeof J0=="object"&&J0,typeof define=="function"&&define)});var qE=br((HE,Q0)=>{(function(r,t,e){function n(i){var a=this,u="";a.next=function(){var c=a.b,p=a.c,m=a.d,f=a.a;return c=c<<25^c>>>7^p,p=p-m|0,m=m<<24^m>>>8^f,f=f-c|0,a.b=c=c<<20^c>>>12^p,a.c=p=p-m|0,a.d=m<<16^p>>>16^f,a.a=f-c|0},a.a=0,a.b=0,a.c=-1640531527,a.d=1367130551,i===Math.floor(i)?(a.a=i/4294967296|0,a.b=i|0):u+=i;for(var l=0;l<u.length+20;l++)a.b^=u.charCodeAt(l)|0,a.next()}function o(i,a){return a.a=i.a,a.b=i.b,a.c=i.c,a.d=i.d,a}function s(i,a){var u=new n(i),l=a&&a.state,c=function(){return(u.next()>>>0)/4294967296};return c.double=function(){do var p=u.next()>>>11,m=(u.next()>>>0)/4294967296,f=(p+m)/(1<<21);while(f===0);return f},c.int32=u.next,c.quick=c,l&&(typeof l=="object"&&o(l,u),c.state=function(){return o(u,{})}),c}t&&t.exports?t.exports=s:e&&e.amd?e(function(){return s}):this.tychei=s})(HE,typeof Q0=="object"&&Q0,typeof define=="function"&&define)});var KE=br(()=>{});var XE=br((jE,Gx)=>{(function(r,t,e){var n=256,o=6,s=52,i="random",a=e.pow(n,o),u=e.pow(2,s),l=u*2,c=n-1,p;function m(w,C,N){var _=[];C=C==!0?{entropy:!0}:C||{};var A=g(h(C.entropy?[w,b(t)]:w==null?x():w,3),_),$=new f(_),F=function(){for(var P=$.g(o),V=a,G=0;P<u;)P=(P+G)*n,V*=n,G=$.g(1);for(;P>=l;)P/=2,V/=2,G>>>=1;return(P+G)/V};return F.int32=function(){return $.g(4)|0},F.quick=function(){return $.g(4)/4294967296},F.double=F,g(b($.S),t),(C.pass||N||function(P,V,G,W){return W&&(W.S&&d(W,$),P.state=function(){return d($,{})}),G?(e[i]=P,V):P})(F,A,"global"in C?C.global:this==e,C.state)}function f(w){var C,N=w.length,_=this,A=0,$=_.i=_.j=0,F=_.S=[];for(N||(w=[N++]);A<n;)F[A]=A++;for(A=0;A<n;A++)F[A]=F[$=c&$+w[A%N]+(C=F[A])],F[$]=C;(_.g=function(P){for(var V,G=0,W=_.i,q=_.j,H=_.S;P--;)V=H[W=c&W+1],G=G*n+H[c&(H[W]=H[q=c&q+V])+(H[q]=V)];return _.i=W,_.j=q,G})(n)}function d(w,C){return C.i=w.i,C.j=w.j,C.S=w.S.slice(),C}function h(w,C){var N=[],_=typeof w,A;if(C&&_=="object")for(A in w)try{N.push(h(w[A],C-1))}catch($){}return N.length?N:_=="string"?w:w+"\0"}function g(w,C){for(var N=w+"",_,A=0;A<N.length;)C[c&A]=c&(_^=C[c&A]*19)+N.charCodeAt(A++);return b(C)}function x(){try{var w;return p&&(w=p.randomBytes)?w=w(n):(w=new Uint8Array(n),(r.crypto||r.msCrypto).getRandomValues(w)),b(w)}catch(_){var C=r.navigator,N=C&&C.plugins;return[+new Date,r,N,r.screen,b(t)]}}function b(w){return String.fromCharCode.apply(0,w)}if(g(e.random(),t),typeof Gx=="object"&&Gx.exports){Gx.exports=m;try{p=KE()}catch(w){}}else typeof define=="function"&&define.amd?define(function(){return m}):e["seed"+i]=m})(typeof self!="undefined"?self:jE,[],Math)});var ch=br((uSt,YE)=>{var $K=PE(),DK=ME(),RK=BE(),FK=GE(),OK=UE(),PK=qE(),Ku=XE();Ku.alea=$K;Ku.xor128=DK;Ku.xorwow=RK;Ku.xorshift7=FK;Ku.xor4096=OK;Ku.tychei=PK;YE.exports=Ku});var wN=br(()=>{});var Zb=br(()=>{});var Mk=br(()=>{});var WW=br(()=>{});var UW=br(()=>{});var HW=br(()=>{});var qW=br((fI,Bk)=>{var zk=(()=>{var r=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename!="undefined"&&(r=r||__filename),function(t){t=t||{};function e(){return st.buffer!=ee&&je(st.buffer),ge}function n(){return st.buffer!=ee&&je(st.buffer),fe}function o(){return st.buffer!=ee&&je(st.buffer),Ae}function s(){return st.buffer!=ee&&je(st.buffer),$n}function i(){return st.buffer!=ee&&je(st.buffer),ar}function a(){return st.buffer!=ee&&je(st.buffer),qn}function u(){return st.buffer!=ee&&je(st.buffer),zr}var l=typeof t!="undefined"?t:{},c,p;l.ready=new Promise(function(L,U){c=L,p=U});var m;typeof process!="undefined"&&process.listeners&&(m={uncaughtException:process.listeners("uncaughtException"),unhandledRejection:process.listeners("unhandledRejection")});var f=Object.assign({},l),d=[],h="./this.program",g=(L,U)=>{throw U},x=typeof window=="object",b=typeof importScripts=="function",w=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string",C=l.ENVIRONMENT_IS_PTHREAD||!1,N="";function _(L){return l.locateFile?l.locateFile(L,N):N+L}var A,$,F,P;function V(L){if(L instanceof _u)return;X("exiting due to exception: "+L)}if(w){var G=Zb(),W=Mk();b?N=W.dirname(N)+"/":N=__dirname+"/",A=(U,dt)=>(U=Zc(U)?new URL(U):W.normalize(U),G.readFileSync(U,dt?void 0:"utf8")),F=U=>{var dt=A(U,!0);return dt.buffer||(dt=new Uint8Array(dt)),dt},$=(U,dt,Lt)=>{U=Zc(U)?new URL(U):W.normalize(U),G.readFile(U,function(Yt,Xt){Yt?Lt(Yt):dt(Xt.buffer)})},process.argv.length>1&&(h=process.argv[1].replace(/\\/g,"/")),d=process.argv.slice(2),process.on("uncaughtException",function(U){if(!(U instanceof _u))throw U}),process.on("unhandledRejection",function(U){throw U}),g=(U,dt)=>{if(Mo())throw process.exitCode=U,dt;V(dt),process.exit(U)},l.inspect=function(){return"[Emscripten Module object]"};let L;try{L=WW()}catch(U){throw console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?'),U}global.Worker=L.Worker}else(x||b)&&(b?N=self.location.href:typeof document!="undefined"&&document.currentScript&&(N=document.currentScript.src),typeof r!="undefined"&&r&&(N=r),N.indexOf("blob:")!==0?N=N.substr(0,N.replace(/[?#].*/,"").lastIndexOf("/")+1):N="",w||(A=L=>{var U=new XMLHttpRequest;return U.open("GET",L,!1),U.send(null),U.responseText},b&&(F=L=>{var U=new XMLHttpRequest;return U.open("GET",L,!1),U.responseType="arraybuffer",U.send(null),new Uint8Array(U.response)}),$=(L,U,dt)=>{var Lt=new XMLHttpRequest;Lt.open("GET",L,!0),Lt.responseType="arraybuffer",Lt.onload=()=>{if(Lt.status==200||Lt.status==0&&Lt.response){U(Lt.response);return}dt()},Lt.onerror=dt,Lt.send(null)}),P=L=>document.title=L);w&&typeof performance=="undefined"&&(global.performance=UW().performance);var q=console.log.bind(console),H=console.warn.bind(console);w&&(q=L=>G.writeSync(1,L+` `),H=L=>G.writeSync(2,L+` `));var K=l.print||q,X=l.printErr||H;Object.assign(l,f),f=null,l.arguments&&(d=l.arguments),l.thisProgram&&(h=l.thisProgram),l.quit&&(g=l.quit);var Z=4,et=Atomics.load,rt=Atomics.store,ot=Atomics.compareExchange,at;l.wasmBinary&&(at=l.wasmBinary);var nt=l.noExitRuntime||!0;typeof WebAssembly!="object"&&Eu("no native wasm support detected");var st,ft,gt=!1,Ct;function $t(L,U){L||Eu(U)}var _t=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function Gt(L,U,dt){for(var Lt=U+dt,Yt=U;L[Yt]&&!(Yt>=Lt);)++Yt;if(Yt-U>16&&L.buffer&&_t)return _t.decode(L.buffer instanceof SharedArrayBuffer?L.slice(U,Yt):L.subarray(U,Yt));for(var Xt="";U<Yt;){var yt=L[U++];if(!(yt&128)){Xt+=String.fromCharCode(yt);continue}var At=L[U++]&63;if((yt&224)==192){Xt+=String.fromCharCode((yt&31)<<6|At);continue}var nr=L[U++]&63;if((yt&240)==224?yt=(yt&15)<<12|At<<6|nr:yt=(yt&7)<<18|At<<12|nr<<6|L[U++]&63,yt<65536)Xt+=String.fromCharCode(yt);else{var Yn=yt-65536;Xt+=String.fromCharCode(55296|Yn>>10,56320|Yn&1023)}}return Xt}function Wt(L,U){return L?Gt(n(),L,U):""}function ue(L,U,dt,Lt){if(!(Lt>0))return 0;for(var Yt=dt,Xt=dt+Lt-1,yt=0;yt<L.length;++yt){var At=L.charCodeAt(yt);if(At>=55296&&At<=57343){var nr=L.charCodeAt(++yt);At=65536+((At&1023)<<10)|nr&1023}if(At<=127){if(dt>=Xt)break;U[dt++]=At}else if(At<=2047){if(dt+1>=Xt)break;U[dt++]=192|At>>6,U[dt++]=128|At&63}else if(At<=65535){if(dt+2>=Xt)break;U[dt++]=224|At>>12,U[dt++]=128|At>>6&63,U[dt++]=128|At&63}else{if(dt+3>=Xt)break;U[dt++]=240|At>>18,U[dt++]=128|At>>12&63,U[dt++]=128|At>>6&63,U[dt++]=128|At&63}}return U[dt]=0,dt-Yt}function he(L,U,dt){return ue(L,n(),U,dt)}var ee,ge,fe,Ae,$e,$n,ar,qn,zr;C&&(ee=l.buffer);function je(L){ee=L,l.HEAP8=ge=new Int8Array(L),l.HEAP16=Ae=new Int16Array(L),l.HEAP32=$n=new Int32Array(L),l.HEAPU8=fe=new Uint8Array(L),l.HEAPU16=$e=new Uint16Array(L),l.HEAPU32=ar=new Uint32Array(L),l.HEAPF32=qn=new Float32Array(L),l.HEAPF64=zr=new Float64Array(L)}var Br=l.INITIAL_MEMORY||16777216;if(C)st=l.wasmMemory,ee=l.buffer;else if(l.wasmMemory)st=l.wasmMemory;else if(st=new WebAssembly.Memory({initial:Br/65536,maximum:32768,shared:!0}),!(st.buffer instanceof SharedArrayBuffer))throw X("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"),w&&X("(on node you may need: --experimental-wasm-threads --experimental-wasm-bulk-memory and/or recent version)"),Error("bad memory");st&&(ee=st.buffer),Br=ee.byteLength,je(ee);var Vr,Kn=[],jn=[],Zr=[],ea=!1;function Mo(){return nt}function si(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)Od(l.preRun.shift());Md(Kn)}function Er(){ea=!0,!C&&Md(jn)}function ra(){if(!C){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)Kk(l.postRun.shift());Md(Zr)}}function Od(L){Kn.unshift(L)}function Pd(L){jn.unshift(L)}function Kk(L){Zr.unshift(L)}var Nl=0,Yc=null,na=null;function gI(L){Nl++,l.monitorRunDependencies&&l.monitorRunDependencies(Nl)}function mg(L){if(Nl--,l.monitorRunDependencies&&l.monitorRunDependencies(Nl),Nl==0&&(Yc!==null&&(clearInterval(Yc),Yc=null),na)){var U=na;na=null,U()}}function Eu(L){l.onAbort&&l.onAbort(L),L="Aborted("+L+")",X(L),gt=!0,Ct=1,L+=". Build with -sASSERTIONS for more info.";var U=new WebAssembly.RuntimeError(L);throw p(U),U}var xI="data:application/octet-stream;base64,";function fg(L){return L.startsWith(xI)}function Zc(L){return L.startsWith("file://")}var Jr;Jr="tfjs-backend-wasm-threaded-simd.wasm",fg(Jr)||(Jr=_(Jr));function dg(L){try{if(L==Jr&&at)return new Uint8Array(at);if(F)return F(L);throw"both async and sync fetching of the wasm failed"}catch(U){Eu(U)}}function yI(){if(!at&&(x||b)){if(typeof fetch=="function"&&!Zc(Jr))return fetch(Jr,{credentials:"same-origin"}).then(function(L){if(!L.ok)throw"failed to load wasm binary file at '"+Jr+"'";return L.arrayBuffer()}).catch(function(){return dg(Jr)});if($)return new Promise(function(L,U){$(Jr,function(dt){L(new Uint8Array(dt))},U)})}return Promise.resolve().then(function(){return dg(Jr)})}function bI(){var L={env:kg,wasi_snapshot_preview1:kg};function U(yt,At){var nr=yt.exports;if(l.asm=nr,EI(l.asm._emscripten_tls_init),Vr=l.asm.__indirect_function_table,Pd(l.asm.__wasm_call_ctors),ft=At,!C){var Yn=jt.unusedWorkers.length;jt.unusedWorkers.forEach(function(sa){jt.loadWasmModuleToWorker(sa,function(){--Yn||mg("wasm-instantiate")})})}}C||gI("wasm-instantiate");function dt(yt){U(yt.instance,yt.module)}function Lt(yt){return yI().then(function(At){return WebAssembly.instantiate(At,L)}).then(function(At){return At}).then(yt,function(At){X("failed to asynchronously prepare wasm: "+At),Eu(At)})}function Yt(){return!at&&typeof WebAssembly.instantiateStreaming=="function"&&!fg(Jr)&&!Zc(Jr)&&!w&&typeof fetch=="function"?fetch(Jr,{credentials:"same-origin"}).then(function(yt){var At=WebAssembly.instantiateStreaming(yt,L);return At.then(dt,function(nr){return X("wasm streaming compile failed: "+nr),X("falling back to ArrayBuffer instantiation"),Lt(dt)})}):Lt(dt)}if(l.instantiateWasm)try{var Xt=l.instantiateWasm(L,U);return Xt}catch(yt){X("Module.instantiateWasm callback failed with error: "+yt),p(yt)}return Yt().catch(p),{}}var jk,Xk,hg={};function _u(L){this.name="ExitStatus",this.message="Program terminated with exit("+L+")",this.status=L}function wI(L){var U=jt.pthreads[L];delete jt.pthreads[L],U.terminate(),Qv(L),jt.runningWorkers.splice(jt.runningWorkers.indexOf(U),1),U.pthread_ptr=0}function CI(L){var U=jt.pthreads[L];U.postMessage({cmd:"cancel"})}function Ld(L){var U=jt.pthreads[L];$t(U),jt.returnWorkerToPool(U)}function II(L){var U=jt.getNewWorker();if(!U)return 6;jt.runningWorkers.push(U),jt.pthreads[L.pthread_ptr]=U,U.pthread_ptr=L.pthread_ptr;var dt={cmd:"run",start_routine:L.startRoutine,arg:L.arg,pthread_ptr:L.pthread_ptr};return U.runPthread=()=>{w&&U.ref(),U.postMessage(dt,L.transferList),delete U.runPthread},U.loaded&&U.runPthread(),0}var gg={varargs:void 0,get:function(){gg.varargs+=4;var L=s()[gg.varargs-4>>2];return L},getStr:function(L){var U=Wt(L);return U}};function xg(L){if(C)return Tl(1,1,L);Ct=L,Mo()||(jt.terminateAllThreads(),l.onExit&&l.onExit(L),gt=!0),g(L,new _u(L))}function vI(L,U){if(Ct=L,!U&&C)throw bg(L),"unwind";xg(L)}var yg=vI;function SI(L){if(L instanceof _u||L=="unwind")return Ct;g(1,L)}var jt={unusedWorkers:[],runningWorkers:[],tlsInitFunctions:[],pthreads:{},init:function(){C?jt.initWorker():jt.initMainThread()},initMainThread:function(){for(var L=8;L--;)jt.allocateUnusedWorker()},initWorker:function(){nt=!1},setExitStatus:function(L){Ct=L},terminateAllThreads:function(){for(var L of Object.values(jt.pthreads))jt.returnWorkerToPool(L);for(var L of jt.unusedWorkers)L.terminate();jt.unusedWorkers=[]},returnWorkerToPool:function(L){var U=L.pthread_ptr;delete jt.pthreads[U],jt.unusedWorkers.push(L),jt.runningWorkers.splice(jt.runningWorkers.indexOf(L),1),L.pthread_ptr=0,w&&L.unref(),Qv(U)},receiveObjectTransfer:function(L){},threadInitTLS:function(){jt.tlsInitFunctions.forEach(L=>L())},loadWasmModuleToWorker:function(L,U){L.onmessage=Xt=>{var yt=Xt.data,At=yt.cmd;if(L.pthread_ptr&&(jt.currentProxiedOperationCallerThread=L.pthread_ptr),yt.targetThread&&yt.targetThread!=Rg()){var nr=jt.pthreads[yt.targetThread];nr?nr.postMessage(yt,yt.transferList):X('Internal error! Worker sent a message "'+At+'" to target pthread '+yt.targetThread+", but that thread no longer exists!"),jt.currentProxiedOperationCallerThread=void 0;return}At==="processProxyingQueue"?zd(yt.queue):At==="spawnThread"?II(yt):At==="cleanupThread"?Ld(yt.thread):At==="killThread"?wI(yt.thread):At==="cancelThread"?CI(yt.thread):At==="loaded"?(L.loaded=!0,w&&L.unref(),U&&U(L),L.runPthread&&L.runPthread()):At==="print"?K("Thread "+yt.threadId+": "+yt.text):At==="printErr"?X("Thread "+yt.threadId+": "+yt.text):At==="alert"?alert("Thread "+yt.threadId+": "+yt.text):yt.target==="setimmediate"?L.postMessage(yt):At==="callHandler"?l[yt.handler](...yt.args):At&&X("worker sent an unknown command "+At),jt.currentProxiedOperationCallerThread=void 0},L.onerror=Xt=>{var yt="worker sent an error!";throw X(yt+" "+Xt.filename+":"+Xt.lineno+": "+Xt.message),Xt},w&&(L.on("message",function(Xt){L.onmessage({data:Xt})}),L.on("error",function(Xt){L.onerror(Xt)}),L.on("detachedExit",function(){}));var dt=[],Lt=["onExit","onAbort","print","printErr"];for(var Yt of Lt)l.hasOwnProperty(Yt)&&dt.push(Yt);L.postMessage({cmd:"load",handlers:dt,urlOrBlob:l.mainScriptUrlOrBlob||r,wasmMemory:st,wasmModule:ft})},allocateUnusedWorker:function(){var L,U=_("tfjs-backend-wasm-threaded-simd.worker.js");L=new Worker(U),jt.unusedWorkers.push(L)},getNewWorker:function(){return jt.unusedWorkers.length==0&&(jt.allocateUnusedWorker(),jt.loadWasmModuleToWorker(jt.unusedWorkers[0])),jt.unusedWorkers.pop()}};l.PThread=jt;function Md(L){for(;L.length>0;)L.shift()(l)}function NI(){var L=Rg(),U=s()[L+52>>2],dt=s()[L+56>>2],Lt=U-dt;e1(U,Lt),Fg(U)}l.establishStackSpace=NI;function bg(L){if(C)return Tl(2,0,L);try{yg(L)}catch(U){SI(U)}}var Jc=[];function TI(L){var U=Jc[L];return U||(L>=Jc.length&&(Jc.length=L+1),Jc[L]=U=Vr.get(L)),U}function kI(L,U){var dt=TI(L)(U);Mo()?jt.setExitStatus(dt):t1(dt)}l.invokeEntryPoint=kI;function EI(L){jt.tlsInitFunctions.push(L)}function _I(L){Zk(L,!b,1,!x),jt.threadInitTLS()}function AI(L){C?postMessage({cmd:"cleanupThread",thread:L}):Ld(L)}function wg(L,U,dt,Lt){return C?Tl(3,1,L,U,dt,Lt):Cg(L,U,dt,Lt)}function Cg(L,U,dt,Lt){if(typeof SharedArrayBuffer=="undefined")return X("Current environment does not support SharedArrayBuffer, pthreads are not available!"),6;var Yt=[],Xt=0;if(C&&(Yt.length===0||Xt))return wg(L,U,dt,Lt);if(Xt)return Xt;var yt={startRoutine:dt,pthread_ptr:L,arg:Lt,transferList:Yt};return C?(yt.cmd="spawnThread",postMessage(yt,Yt),0):II(yt)}function $I(){return 65536}var DI=!0;function RI(){return DI}function zd(L){Atomics.store(s(),L>>2,1),Rg()&&Qk(L),Atomics.compareExchange(s(),L>>2,1,0)}l.executeNotifiedProxyingQueue=zd;function FI(L,U,dt,Lt){if(L==U)setTimeout(()=>zd(Lt));else if(C)postMessage({targetThread:L,cmd:"processProxyingQueue",queue:Lt});else{var Yt=jt.pthreads[L];if(!Yt)return;Yt.postMessage({cmd:"processProxyingQueue",queue:Lt})}return 1}function OI(L,U,dt){return-1}function PI(){Eu("")}function Au(L){Au.shown||(Au.shown={}),Au.shown[L]||(Au.shown[L]=1,w&&(L="warning: "+L),X(L))}function LI(){w||b||Au("Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread")}function MI(){return Date.now()}function Ig(){return 2147483648}function zI(){return Ig()}var Bd;w?Bd=()=>{var L=process.hrtime();return L[0]*1e3+L[1]/1e6}:Bd=()=>performance.timeOrigin+performance.now();function BI(L,U,dt){n().copyWithin(L,U,U+dt)}function VI(){return w?HW().cpus().length:navigator.hardwareConcurrency}function GI(L){var U=t0(),dt=L();return Fg(U),dt}function Tl(L,U){var dt=arguments.length-2,Lt=arguments;return GI(()=>{for(var Yt=dt,Xt=Og(Yt*8),yt=Xt>>3,At=0;At<dt;At++){var nr=Lt[2+At];u()[yt+At]=nr}return Jk(L,Yt,Xt,U)})}var Vd=[];function WI(L,U,dt){Vd.length=U;for(var Lt=dt>>3,Yt=0;Yt<U;Yt++)Vd[Yt]=u()[Lt+Yt];var Xt=L<0,yt=Xt?hg[-L-1]:JI[L];return yt.apply(null,Vd)}function UI(L){try{return st.grow(L-ee.byteLength+65535>>>16),je(st.buffer),1}catch(U){}}function HI(L){var U=n().length;if(L=L>>>0,L<=U)return!1;var dt=Ig();if(L>dt)return!1;let Lt=(nr,Yn)=>nr+(Yn-nr%Yn)%Yn;for(var Yt=1;Yt<=4;Yt*=2){var Xt=U*(1+.2/Yt);Xt=Math.min(Xt,L+100663296);var yt=Math.min(dt,Lt(Math.max(L,Xt),65536)),At=UI(yt);if(At)return!0}return!1}function qI(){throw"unwind"}function vg(L){return C?Tl(4,1,L):52}function Sg(L,U,dt,Lt,Yt){return C?Tl(5,1,L,U,dt,Lt,Yt):70}var KI=[null,[],[]];function jI(L,U){var dt=KI[L];U===0||U===10?((L===1?K:X)(Gt(dt,0)),dt.length=0):dt.push(U)}function Ng(L,U,dt,Lt){if(C)return Tl(6,1,L,U,dt,Lt);for(var Yt=0,Xt=0;Xt<dt;Xt++){var yt=i()[U>>2],At=i()[U+4>>2];U+=8;for(var nr=0;nr<At;nr++)jI(L,n()[yt+nr]);Yt+=At}return i()[Lt>>2]=Yt,0}function Tg(L){var U=l["_"+L];return U}function XI(L,U){e().set(L,U)}function YI(L,U,dt,Lt,Yt){var Xt={string:Dn=>{var rp=0;if(Dn!=null&&Dn!==0){var o1=(Dn.length<<2)+1;rp=Og(o1),he(Dn,rp,o1)}return rp},array:Dn=>{var rp=Og(Dn.length);return XI(Dn,rp),rp}};function yt(Dn){return U==="string"?Wt(Dn):U==="boolean"?Boolean(Dn):Dn}var At=Tg(L),nr=[],Yn=0;if(Lt)for(var sa=0;sa<Lt.length;sa++){var n1=Xt[dt[sa]];n1?(Yn===0&&(Yn=t0()),nr[sa]=n1(Lt[sa])):nr[sa]=Lt[sa]}var e0=At.apply(null,nr);function FU(Dn){return Yn!==0&&Fg(Yn),yt(Dn)}return e0=FU(e0),e0}function ZI(L,U,dt,Lt){dt=dt||[];var Yt=dt.every(yt=>yt==="number"||yt==="boolean"),Xt=U!=="string";return Xt&&Yt&&!Lt?Tg(L):function(){return YI(L,U,dt,arguments,Lt)}}jt.init();var JI=[null,xg,bg,wg,vg,Sg,Ng],kg={__emscripten_init_main_thread_js:_I,__emscripten_thread_cleanup:AI,__pthread_create_js:Cg,_emscripten_default_pthread_stack_size:$I,_emscripten_get_now_is_monotonic:RI,_emscripten_notify_task_queue:FI,_emscripten_set_offscreencanvas_size:OI,abort:PI,emscripten_check_blocking_allowed:LI,emscripten_date_now:MI,emscripten_get_heap_max:zI,emscripten_get_now:Bd,emscripten_memcpy_big:BI,emscripten_num_logical_cores:VI,emscripten_receive_on_main_thread_js:WI,emscripten_resize_heap:HI,emscripten_unwind_to_js_event_loop:qI,exit:yg,fd_close:vg,fd_seek:Sg,fd_write:Ng,memory:st||l.wasmMemory},Yk=bI(),QI=l.___wasm_call_ctors=function(){return(QI=l.___wasm_call_ctors=l.asm.__wasm_call_ctors).apply(null,arguments)},tv=l._init=function(){return(tv=l._init=l.asm.init).apply(null,arguments)},ev=l._init_with_threads_count=function(){return(ev=l._init_with_threads_count=l.asm.init_with_threads_count).apply(null,arguments)},rv=l._get_threads_count=function(){return(rv=l._get_threads_count=l.asm.get_threads_count).apply(null,arguments)},nv=l._register_tensor=function(){return(nv=l._register_tensor=l.asm.register_tensor).apply(null,arguments)},ov=l._dispose_data=function(){return(ov=l._dispose_data=l.asm.dispose_data).apply(null,arguments)},sv=l._dispose=function(){return(sv=l._dispose=l.asm.dispose).apply(null,arguments)},iv=l._Abs=function(){return(iv=l._Abs=l.asm.Abs).apply(null,arguments)},av=l._Add=function(){return(av=l._Add=l.asm.Add).apply(null,arguments)},lv=l._AddN=function(){return(lv=l._AddN=l.asm.AddN).apply(null,arguments)},uv=l._All=function(){return(uv=l._All=l.asm.All).apply(null,arguments)},cv=l._Any=function(){return(cv=l._Any=l.asm.Any).apply(null,arguments)},pv=l._ArgMax=function(){return(pv=l._ArgMax=l.asm.ArgMax).apply(null,arguments)},mv=l._AvgPool=function(){return(mv=l._AvgPool=l.asm.AvgPool).apply(null,arguments)},fv=l._BatchMatMul=function(){return(fv=l._BatchMatMul=l.asm.BatchMatMul).apply(null,arguments)},dv=l._Ceil=function(){return(dv=l._Ceil=l.asm.Ceil).apply(null,arguments)},hv=l._ClipByValue=function(){return(hv=l._ClipByValue=l.asm.ClipByValue).apply(null,arguments)},gv=l._Conv2D=function(){return(gv=l._Conv2D=l.asm.Conv2D).apply(null,arguments)},xv=l._Conv2DBackpropInput=function(){return(xv=l._Conv2DBackpropInput=l.asm.Conv2DBackpropInput).apply(null,arguments)},yv=l._Cos=function(){return(yv=l._Cos=l.asm.Cos).apply(null,arguments)},bv=l._Cosh=function(){return(bv=l._Cosh=l.asm.Cosh).apply(null,arguments)},wv=l._CropAndResize=function(){return(wv=l._CropAndResize=l.asm.CropAndResize).apply(null,arguments)},Cv=l._Cumprod=function(){return(Cv=l._Cumprod=l.asm.Cumprod).apply(null,arguments)},Iv=l._Cumsum=function(){return(Iv=l._Cumsum=l.asm.Cumsum).apply(null,arguments)},vv=l._DepthToSpace=function(){return(vv=l._DepthToSpace=l.asm.DepthToSpace).apply(null,arguments)},Sv=l._DepthwiseConv2dNative=function(){return(Sv=l._DepthwiseConv2dNative=l.asm.DepthwiseConv2dNative).apply(null,arguments)},Nv=l._Elu=function(){return(Nv=l._Elu=l.asm.Elu).apply(null,arguments)},Tv=l._Equal=function(){return(Tv=l._Equal=l.asm.Equal).apply(null,arguments)},kv=l._Exp=function(){return(kv=l._Exp=l.asm.Exp).apply(null,arguments)},Ev=l._FlipLeftRight=function(){return(Ev=l._FlipLeftRight=l.asm.FlipLeftRight).apply(null,arguments)},_v=l._Floor=function(){return(_v=l._Floor=l.asm.Floor).apply(null,arguments)},Av=l._FloorDiv=function(){return(Av=l._FloorDiv=l.asm.FloorDiv).apply(null,arguments)},$v=l._FusedBatchNorm=function(){return($v=l._FusedBatchNorm=l.asm.FusedBatchNorm).apply(null,arguments)},Dv=l._FusedConv2D=function(){return(Dv=l._FusedConv2D=l.asm.FusedConv2D).apply(null,arguments)},Rv=l._FusedDepthwiseConv2D=function(){return(Rv=l._FusedDepthwiseConv2D=l.asm.FusedDepthwiseConv2D).apply(null,arguments)},Fv=l._Gather=function(){return(Fv=l._Gather=l.asm.Gather).apply(null,arguments)},Ov=l._GatherNd=function(){return(Ov=l._GatherNd=l.asm.GatherNd).apply(null,arguments)},Pv=l._Greater=function(){return(Pv=l._Greater=l.asm.Greater).apply(null,arguments)},Lv=l._GreaterEqual=function(){return(Lv=l._GreaterEqual=l.asm.GreaterEqual).apply(null,arguments)},Mv=l._IsNan=function(){return(Mv=l._IsNan=l.asm.IsNan).apply(null,arguments)},zv=l._LeakyRelu=function(){return(zv=l._LeakyRelu=l.asm.LeakyRelu).apply(null,arguments)},Bv=l._Less=function(){return(Bv=l._Less=l.asm.Less).apply(null,arguments)},Vv=l._LessEqual=function(){return(Vv=l._LessEqual=l.asm.LessEqual).apply(null,arguments)},Gv=l._Log=function(){return(Gv=l._Log=l.asm.Log).apply(null,arguments)},Wv=l._LogicalAnd=function(){return(Wv=l._LogicalAnd=l.asm.LogicalAnd).apply(null,arguments)},Uv=l._LogicalNot=function(){return(Uv=l._LogicalNot=l.asm.LogicalNot).apply(null,arguments)},Hv=l._LogicalOr=function(){return(Hv=l._LogicalOr=l.asm.LogicalOr).apply(null,arguments)},qv=l._LogicalXor=function(){return(qv=l._LogicalXor=l.asm.LogicalXor).apply(null,arguments)},Kv=l._Max=function(){return(Kv=l._Max=l.asm.Max).apply(null,arguments)},jv=l._MaxPool=function(){return(jv=l._MaxPool=l.asm.MaxPool).apply(null,arguments)},Eg=l._Maximum=function(){return(Eg=l._Maximum=l.asm.Maximum).apply(null,arguments)},_g=l._Mean=function(){return(_g=l._Mean=l.asm.Mean).apply(null,arguments)},Gd=l._Min=function(){return(Gd=l._Min=l.asm.Min).apply(null,arguments)},Xv=l._Minimum=function(){return(Xv=l._Minimum=l.asm.Minimum).apply(null,arguments)},Yv=l._MirrorPad=function(){return(Yv=l._MirrorPad=l.asm.MirrorPad).apply(null,arguments)},Qc=l._Multiply=function(){return(Qc=l._Multiply=l.asm.Multiply).apply(null,arguments)},Ag=l._Neg=function(){return(Ag=l._Neg=l.asm.Neg).apply(null,arguments)},tp=l._NonMaxSuppressionV3=function(){return(tp=l._NonMaxSuppressionV3=l.asm.NonMaxSuppressionV3).apply(null,arguments)},ep=l._NonMaxSuppressionV4=function(){return(ep=l._NonMaxSuppressionV4=l.asm.NonMaxSuppressionV4).apply(null,arguments)},Zv=l._NonMaxSuppressionV5=function(){return(Zv=l._NonMaxSuppressionV5=l.asm.NonMaxSuppressionV5).apply(null,arguments)},j=l._NotEqual=function(){return(j=l._NotEqual=l.asm.NotEqual).apply(null,arguments)},ct=l._OneHot=function(){return(ct=l._OneHot=l.asm.OneHot).apply(null,arguments)},Dt=l._PadV2=function(){return(Dt=l._PadV2=l.asm.PadV2).apply(null,arguments)},ce=l._Pow=function(){return(ce=l._Pow=l.asm.Pow).apply(null,arguments)},Xe=l._Prelu=function(){return(Xe=l._Prelu=l.asm.Prelu).apply(null,arguments)},Ye=l._Prod=function(){return(Ye=l._Prod=l.asm.Prod).apply(null,arguments)},ne=l._RealDiv=function(){return(ne=l._RealDiv=l.asm.RealDiv).apply(null,arguments)},re=l._Reciprocal=function(){return(re=l._Reciprocal=l.asm.Reciprocal).apply(null,arguments)},yr=l._Relu=function(){return(yr=l._Relu=l.asm.Relu).apply(null,arguments)},Xn=l._Relu6=function(){return(Xn=l._Relu6=l.asm.Relu6).apply(null,arguments)},oa=l._ResizeBilinear=function(){return(oa=l._ResizeBilinear=l.asm.ResizeBilinear).apply(null,arguments)},$g=l._ResizeNearestNeighbor=function(){return($g=l._ResizeNearestNeighbor=l.asm.ResizeNearestNeighbor).apply(null,arguments)},Wd=l._Reverse=function(){return(Wd=l._Reverse=l.asm.Reverse).apply(null,arguments)},Jv=l._RotateWithOffset=function(){return(Jv=l._RotateWithOffset=l.asm.RotateWithOffset).apply(null,arguments)},nn=l._Round=function(){return(nn=l._Round=l.asm.Round).apply(null,arguments)},kl=l._Rsqrt=function(){return(kl=l._Rsqrt=l.asm.Rsqrt).apply(null,arguments)},Dg=l._ScatterNd=function(){return(Dg=l._ScatterNd=l.asm.ScatterNd).apply(null,arguments)},rU=l._SelectV2=function(){return(rU=l._SelectV2=l.asm.SelectV2).apply(null,arguments)},nU=l._Sigmoid=function(){return(nU=l._Sigmoid=l.asm.Sigmoid).apply(null,arguments)},oU=l._Sin=function(){return(oU=l._Sin=l.asm.Sin).apply(null,arguments)},sU=l._Softmax=function(){return(sU=l._Softmax=l.asm.Softmax).apply(null,arguments)},iU=l._SparseFillEmptyRows=function(){return(iU=l._SparseFillEmptyRows=l.asm.SparseFillEmptyRows).apply(null,arguments)},aU=l._SparseReshape=function(){return(aU=l._SparseReshape=l.asm.SparseReshape).apply(null,arguments)},lU=l._SparseSegmentReduction=function(){return(lU=l._SparseSegmentReduction=l.asm.SparseSegmentReduction).apply(null,arguments)},uU=l._Sqrt=function(){return(uU=l._Sqrt=l.asm.Sqrt).apply(null,arguments)},cU=l._Square=function(){return(cU=l._Square=l.asm.Square).apply(null,arguments)},pU=l._SquaredDifference=function(){return(pU=l._SquaredDifference=l.asm.SquaredDifference).apply(null,arguments)},mU=l._Step=function(){return(mU=l._Step=l.asm.Step).apply(null,arguments)},fU=l._StridedSlice=function(){return(fU=l._StridedSlice=l.asm.StridedSlice).apply(null,arguments)},dU=l._Sub=function(){return(dU=l._Sub=l.asm.Sub).apply(null,arguments)},hU=l._Sum=function(){return(hU=l._Sum=l.asm.Sum).apply(null,arguments)},gU=l._Tan=function(){return(gU=l._Tan=l.asm.Tan).apply(null,arguments)},xU=l._Tanh=function(){return(xU=l._Tanh=l.asm.Tanh).apply(null,arguments)},yU=l._Tile=function(){return(yU=l._Tile=l.asm.Tile).apply(null,arguments)},bU=l._TopK=function(){return(bU=l._TopK=l.asm.TopK).apply(null,arguments)},wU=l._Transform=function(){return(wU=l._Transform=l.asm.Transform).apply(null,arguments)},CU=l._Transpose=function(){return(CU=l._Transpose=l.asm.Transpose).apply(null,arguments)},IU=l.__FusedMatMul=function(){return(IU=l.__FusedMatMul=l.asm._FusedMatMul).apply(null,arguments)},vU=l._malloc=function(){return(vU=l._malloc=l.asm.malloc).apply(null,arguments)},SU=l._free=function(){return(SU=l._free=l.asm.free).apply(null,arguments)},NU=l.__emscripten_tls_init=function(){return(NU=l.__emscripten_tls_init=l.asm._emscripten_tls_init).apply(null,arguments)},Rg=l._pthread_self=function(){return(Rg=l._pthread_self=l.asm.pthread_self).apply(null,arguments)},TU=l.___errno_location=function(){return(TU=l.___errno_location=l.asm.__errno_location).apply(null,arguments)},Zk=l.__emscripten_thread_init=function(){return(Zk=l.__emscripten_thread_init=l.asm._emscripten_thread_init).apply(null,arguments)},kU=l.__emscripten_thread_crashed=function(){return(kU=l.__emscripten_thread_crashed=l.asm._emscripten_thread_crashed).apply(null,arguments)},EU=l._emscripten_main_thread_process_queued_calls=function(){return(EU=l._emscripten_main_thread_process_queued_calls=l.asm.emscripten_main_thread_process_queued_calls).apply(null,arguments)},_U=l._emscripten_main_browser_thread_id=function(){return(_U=l._emscripten_main_browser_thread_id=l.asm.emscripten_main_browser_thread_id).apply(null,arguments)},Jk=l._emscripten_run_in_main_runtime_thread_js=function(){return(Jk=l._emscripten_run_in_main_runtime_thread_js=l.asm.emscripten_run_in_main_runtime_thread_js).apply(null,arguments)},AU=l._emscripten_dispatch_to_thread_=function(){return(AU=l._emscripten_dispatch_to_thread_=l.asm.emscripten_dispatch_to_thread_).apply(null,arguments)},Qk=l.__emscripten_proxy_execute_task_queue=function(){return(Qk=l.__emscripten_proxy_execute_task_queue=l.asm._emscripten_proxy_execute_task_queue).apply(null,arguments)},Qv=l.__emscripten_thread_free_data=function(){return(Qv=l.__emscripten_thread_free_data=l.asm._emscripten_thread_free_data).apply(null,arguments)},t1=l.__emscripten_thread_exit=function(){return(t1=l.__emscripten_thread_exit=l.asm._emscripten_thread_exit).apply(null,arguments)},e1=l._emscripten_stack_set_limits=function(){return(e1=l._emscripten_stack_set_limits=l.asm.emscripten_stack_set_limits).apply(null,arguments)},t0=l.stackSave=function(){return(t0=l.stackSave=l.asm.stackSave).apply(null,arguments)},Fg=l.stackRestore=function(){return(Fg=l.stackRestore=l.asm.stackRestore).apply(null,arguments)},Og=l.stackAlloc=function(){return(Og=l.stackAlloc=l.asm.stackAlloc).apply(null,arguments)},$U=l.dynCall_iijjiiii=function(){return($U=l.dynCall_iijjiiii=l.asm.dynCall_iijjiiii).apply(null,arguments)},DU=l.dynCall_jiji=function(){return(DU=l.dynCall_jiji=l.asm.dynCall_jiji).apply(null,arguments)};l.keepRuntimeAlive=Mo,l.wasmMemory=st,l.cwrap=ZI,l.ExitStatus=_u,l.PThread=jt;var Pg;na=function L(){Pg||r1(),Pg||(na=L)};function r1(L){if(L=L||d,Nl>0)return;if(C){c(l),Er(),startWorker(l);return}if(si(),Nl>0)return;function U(){Pg||(Pg=!0,l.calledRun=!0,!gt&&(Er(),c(l),l.onRuntimeInitialized&&l.onRuntimeInitialized(),ra()))}l.setStatus?(l.setStatus("Running..."),setTimeout(function(){setTimeout(function(){l.setStatus("")},1),U()},1)):U()}if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.pop()();r1();var Lg;m&&(Lg={uncaughtException:process.listeners("uncaughtException").filter(function(L){return!m.uncaughtException.indexOf(L)>-1}),unhandledRejection:process.listeners("unhandledRejection").filter(function(L){return!m.unhandledRejection.indexOf(L)>-1})});var Mg;if(typeof WasmBackendModule!="undefined")Mg=WasmBackendModule;else if(typeof t!="undefined")Mg=t;else throw new Error("Could not find wasm module in post.js");if(Lg){var RU=Mg._dispose;Mg._dispose=function(){RU(),Lg.uncaughtException.forEach(function(L){process.removeListener("uncaughtException",L)}),Lg.unhandledRejection.forEach(function(L){process.removeListener("unhandledRejection",L)})}}return t.ready}})();typeof fI=="object"&&typeof Bk=="object"?Bk.exports=zk:typeof define=="function"&&define.amd?define([],function(){return zk}):typeof fI=="object"&&(fI.WasmBackendModuleThreadedSimd=zk)});var jW=br((g8e,KW)=>{KW.exports.wasmWorkerContents=`"use strict";var Module={};var ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string";if(ENVIRONMENT_IS_NODE){var nodeWorkerThreads=require("worker_threads");var parentPort=nodeWorkerThreads.parentPort;parentPort.on("message",data=>onmessage({data:data}));var fs=require("fs");Object.assign(global,{self:global,require:require,Module:Module,location:{href:__filename},Worker:nodeWorkerThreads.Worker,importScripts:function(f){(0,eval)(fs.readFileSync(f,"utf8")+"//# sourceURL="+f)},postMessage:function(msg){parentPort.postMessage(msg)},performance:global.performance||{now:function(){return Date.now()}}})}var initializedJS=false;var pendingNotifiedProxyingQueues=[];function threadPrintErr(){var text=Array.prototype.slice.call(arguments).join(" ");if(ENVIRONMENT_IS_NODE){fs.writeSync(2,text+" ");return}console.error(text)}function threadAlert(){var text=Array.prototype.slice.call(arguments).join(" ");postMessage({cmd:"alert",text:text,threadId:Module["_pthread_self"]()})}var err=threadPrintErr;self.alert=threadAlert;Module["instantiateWasm"]=(info,receiveInstance)=>{var instance=new WebAssembly.Instance(Module["wasmModule"],info);receiveInstance(instance);Module["wasmModule"]=null;return instance.exports};self.onunhandledrejection=e=>{throw e.reason??e};self.startWorker=instance=>{Module=instance;postMessage({"cmd":"loaded"})};self.onmessage=e=>{try{if(e.data.cmd==="load"){Module["wasmModule"]=e.data.wasmModule;for(const handler of e.data.handlers){Module[handler]=function(){postMessage({cmd:"callHandler",handler:handler,args:[...arguments]})}}Module["wasmMemory"]=e.data.wasmMemory;Module["buffer"]=Module["wasmMemory"].buffer;Module["ENVIRONMENT_IS_PTHREAD"]=true;if(typeof e.data.urlOrBlob=="string"){importScripts(e.data.urlOrBlob)}else{var objectUrl=URL.createObjectURL(e.data.urlOrBlob);importScripts(objectUrl);URL.revokeObjectURL(objectUrl)}WasmBackendModuleThreadedSimd(Module)}else if(e.data.cmd==="run"){Module["__emscripten_thread_init"](e.data.pthread_ptr,0,0,1);Module["establishStackSpace"]();Module["PThread"].receiveObjectTransfer(e.data);Module["PThread"].threadInitTLS();if(!initializedJS){pendingNotifiedProxyingQueues.forEach(queue=>{Module["executeNotifiedProxyingQueue"](queue)});pendingNotifiedProxyingQueues=[];initializedJS=true}try{Module["invokeEntryPoint"](e.data.start_routine,e.data.arg)}catch(ex){if(ex!="unwind"){if(ex instanceof Module["ExitStatus"]){if(Module["keepRuntimeAlive"]()){}else{Module["__emscripten_thread_exit"](ex.status)}}else{throw ex}}}}else if(e.data.cmd==="cancel"){if(Module["_pthread_self"]()){Module["__emscripten_thread_exit"](-1)}}else if(e.data.target==="setimmediate"){}else if(e.data.cmd==="processProxyingQueue"){if(initializedJS){Module["executeNotifiedProxyingQueue"](e.data.queue)}else{pendingNotifiedProxyingQueues.push(e.data.queue)}}else if(e.data.cmd){err("worker.js received unknown command "+e.data.cmd);err(e.data)}}catch(ex){if(Module["__emscripten_thread_crashed"]){Module["__emscripten_thread_crashed"]()}throw ex}};`});var