m){for(l=[],y=0;y>18&63]+Ff[i>>12&63]+Ff[i>>6&63]+Ff[63&i]);return o.join("")}function kf(t){var e;Mf||Uf();for(var n=t.length,r=n%3,i="",o=[],a=16383,u=0,f=n-r;uf?f:u+a));return 1===r?(e=t[n-1],i+=Ff[e>>2],i+=Ff[e<<4&63],i+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],i+=Ff[e>>10],i+=Ff[e>>4&63],i+=Ff[e<<2&63],i+="="),o.push(i),o.join("")}function Cf(t,e,n,r,i){var o,a,u=8*i-r-1,f=(1<>1,l=-7,c=n?i-1:0,h=n?-1:1,p=t[e+c];for(c+=h,o=p&(1<<-l)-1,p>>=-l,l+=u;l>0;o=256*o+t[e+c],c+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+c],c+=h,l-=8);if(0===o)o=1-s;else{if(o===f)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=s}return(p?-1:1)*a*Math.pow(2,o-r)}function Yf(t,e,n,r,i,o){var a,u,f,s=8*o-i-1,l=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,g=r?1:-1,d=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-a))<1&&(a--,f*=2),(e+=a+c>=1?h/f:h*Math.pow(2,1-c))*f>=2&&(a++,f/=2),a+c>=l?(u=0,a=l):a+c>=1?(u=(e*f-1)*Math.pow(2,i),a+=c):(u=e*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&u,p+=g,u/=256,i-=8);for(a=a<0;t[n+p]=255&a,p+=g,a/=256,s-=8);t[n+p-g]|=128*d}var Df={}.toString,zf=Array.isArray||function(t){return"[object Array]"==Df.call(t)};$f.TYPED_ARRAY_SUPPORT=void 0===If.TYPED_ARRAY_SUPPORT||If.TYPED_ARRAY_SUPPORT;var Jf=Gf();function Gf(){return $f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Wf(t,e){if(Gf()=Gf())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Gf().toString(16)+" bytes");return 0|t}function Qf(t){return!(null==t||!t._isBuffer)}function ts(t,e){if(Qf(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Vs(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Ss(t).length;default:if(r)return Vs(t).length;e=(""+e).toLowerCase(),r=!0}}function es(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return ys(this,e,n);case"utf8":case"utf-8":return hs(this,e,n);case"ascii":return gs(this,e,n);case"latin1":case"binary":return ds(this,e,n);case"base64":return cs(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ms(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function ns(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function rs(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=$f.from(e,r)),Qf(e))return 0===e.length?-1:is(t,e,n,r,i);if("number"==typeof e)return e&=255,$f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):is(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function is(t,e,n,r,i){var o,a=1,u=t.length,f=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,u/=2,f/=2,n/=2}function s(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var l=-1;for(o=n;ou&&(n=u-f),o=n;o>=0;o--){for(var c=!0,h=0;hi&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function cs(t,e,n){return 0===e&&n===t.length?kf(t):kf(t.slice(e,n))}function hs(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:s>223?3:s>191?2:1;if(i+c<=n)switch(c){case 1:s<128&&(l=s);break;case 2:128==(192&(o=t[i+1]))&&(f=(31&s)<<6|63&o)>127&&(l=f);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(f=(15&s)<<12|(63&o)<<6|63&a)>2047&&(f<55296||f>57343)&&(l=f);break;case 4:o=t[i+1],a=t[i+2],u=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&u)&&(f=(15&s)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&f<1114112&&(l=f)}null===l?(l=65533,c=1):l>65535&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=c}return function(t){var e=t.length;if(e<=ps)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),""},$f.prototype.compare=function(t,e,n,r,i){if(!Qf(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),u=Math.min(o,a),f=this.slice(r,i),s=t.slice(e,n),l=0;li)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return os(this,t,e,n);case"utf8":case"utf-8":return as(this,t,e,n);case"ascii":return us(this,t,e,n);case"latin1":case"binary":return fs(this,t,e,n);case"base64":return ss(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ls(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},$f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ps=4096;function gs(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ir)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function vs(t,e,n,r,i,o){if(!Qf(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function ws(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function _s(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function Es(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function xs(t,e,n,r,i){return i||Es(t,0,n,4),Yf(t,e,n,r,23,4),n+4}function Ts(t,e,n,r,i){return i||Es(t,0,n,8),Yf(t,e,n,r,52,8),n+8}$f.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)r+=this[t+--e]*i;return r},$f.prototype.readUInt8=function(t,e){return e||bs(t,1,this.length),this[t]},$f.prototype.readUInt16LE=function(t,e){return e||bs(t,2,this.length),this[t]|this[t+1]<<8},$f.prototype.readUInt16BE=function(t,e){return e||bs(t,2,this.length),this[t]<<8|this[t+1]},$f.prototype.readUInt32LE=function(t,e){return e||bs(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},$f.prototype.readUInt32BE=function(t,e){return e||bs(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},$f.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||bs(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},$f.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||bs(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},$f.prototype.readInt8=function(t,e){return e||bs(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},$f.prototype.readInt16LE=function(t,e){e||bs(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},$f.prototype.readInt16BE=function(t,e){e||bs(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},$f.prototype.readInt32LE=function(t,e){return e||bs(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},$f.prototype.readInt32BE=function(t,e){return e||bs(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},$f.prototype.readFloatLE=function(t,e){return e||bs(t,4,this.length),Cf(this,t,!0,23,4)},$f.prototype.readFloatBE=function(t,e){return e||bs(t,4,this.length),Cf(this,t,!1,23,4)},$f.prototype.readDoubleLE=function(t,e){return e||bs(t,8,this.length),Cf(this,t,!0,52,8)},$f.prototype.readDoubleBE=function(t,e){return e||bs(t,8,this.length),Cf(this,t,!1,52,8)},$f.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||vs(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},$f.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||vs(this,t,e,1,255,0),$f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},$f.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||vs(this,t,e,2,65535,0),$f.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):ws(this,t,e,!0),e+2},$f.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||vs(this,t,e,2,65535,0),$f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):ws(this,t,e,!1),e+2},$f.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||vs(this,t,e,4,4294967295,0),$f.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):_s(this,t,e,!0),e+4},$f.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||vs(this,t,e,4,4294967295,0),$f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):_s(this,t,e,!1),e+4},$f.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);vs(this,t,e,n,i-1,-i)}var o=0,a=1,u=0;for(this[e]=255&t;++o>0)-u&255;return e+n},$f.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);vs(this,t,e,n,i-1,-i)}var o=n-1,a=1,u=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+n},$f.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||vs(this,t,e,1,127,-128),$f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},$f.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||vs(this,t,e,2,32767,-32768),$f.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):ws(this,t,e,!0),e+2},$f.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||vs(this,t,e,2,32767,-32768),$f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):ws(this,t,e,!1),e+2},$f.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||vs(this,t,e,4,2147483647,-2147483648),$f.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):_s(this,t,e,!0),e+4},$f.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||vs(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),$f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):_s(this,t,e,!1),e+4},$f.prototype.writeFloatLE=function(t,e,n){return xs(this,t,e,!0,n)},$f.prototype.writeFloatBE=function(t,e,n){return xs(this,t,e,!1,n)},$f.prototype.writeDoubleLE=function(t,e,n){return Ts(this,t,e,!0,n)},$f.prototype.writeDoubleBE=function(t,e,n){return Ts(this,t,e,!1,n)},$f.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!$f.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Ss(t){return function(t){var e,n,r,i,o,a;Mf||Uf();var u=t.length;if(u%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[u-2]?2:"="===t[u-1]?1:0,a=new Pf(3*u/4-o),r=o>0?u-4:u;var f=0;for(e=0,n=0;e>16&255,a[f++]=i>>8&255,a[f++]=255&i;return 2===o?(i=Bf[t.charCodeAt(e)]<<2|Bf[t.charCodeAt(e+1)]>>4,a[f++]=255&i):1===o&&(i=Bf[t.charCodeAt(e)]<<10|Bf[t.charCodeAt(e+1)]<<4|Bf[t.charCodeAt(e+2)]>>2,a[f++]=i>>8&255,a[f++]=255&i),a}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(Os,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function js(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function Rs(t){return null!=t&&(!!t._isBuffer||Ls(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&Ls(t.slice(0,0))}(t))}function Ls(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}Lf(Object.freeze({__proto__:null,Buffer:$f,INSPECT_MAX_BYTES:50,SlowBuffer:function(t){return+t!=t&&(t=0),$f.alloc(+t)},isBuffer:Rs,kMaxLength:Jf})).Buffer;var Is=function(){throw new Error("not implemented")};function Fs(){throw new Error("not implemented")}var Bs={binary:Is,float64:Yt,float32:$t,float16:Fs,generic:Array,int16:we,int32:ue,int8:Ne,uint16:pe,uint32:te,uint8:Ae,uint8c:Le,complex32:Fs,complex64:Mn,complex128:Gn,bool:Kn},Ps={};var Ms=mt(Is.allocUnsafe)?function(t){if(!He(t))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));return Is.allocUnsafe(t)}:function(t){if(!He(t))throw new TypeError(j("invalid argument. Must provide a nonnegative integer. Value: `%s`.",t));return new Is(t)};function Us(t){return function(t,e,n,r){var i;return function(t,e){return"function"==typeof t["fill"]}(t)?t.fill(e,n,r):(n<0&&(n+=t.length)<0&&(n=0),r<0?r+=t.length:r>t.length&&(r=t.length),(i=di(t)).accessorProtocol?function(t,e,n,r){var i,o,a;for(i=t.data,o=t.accessors[1],a=n;ae?e:t}function Jl(t,e){var n=e+1;return t<0?((t+=n)<0&&0!==(t%=n)&&(t+=n),t):t>e?((t-=n)>e&&(t%=n),t):t}function Gl(t,e){return t<0?(t+=e+1)<0?-1:t:t>e?-1:t}var Wl=rr(ro()),$l={wrap:Jl,clamp:zl,normalize:function(t,e){var n=Gl(t,e);if(n<0||n>e)throw new RangeError(j("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",e,t));return n},throw:function(t,e){if(t<0||t>e)throw new RangeError(j("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",e,t));return t}};function ql(t,e,n){var r;if("clamp"===n)return zl(t,e);if("wrap"===n)return Jl(t,e);if(r=t,"normalize"===n&&(r=Gl(r,e)),r<0||r>e)throw new RangeError(j("invalid argument. Index must resolve to a value on the interval: [0, %d]. Value: `%d`.",e,t));return r}N(ql,"factory",(function(t){if(!Wl(t))throw new TypeError(j("invalid argument. First argument must be a recognized index mode. Value: `%s`.",t));return $l[t]}));var Zl=mo.prototype.iget;var Xl=mo.prototype.iset;function Kl(t,e){var n,r;for(n=[],r=0;r0))throw new TypeError(j("invalid argument. Third argument must be an array-like object containing nonnegative integers. Value: `%s`.",n));if((u=n.length)>32767)throw new RangeError(j("invalid argument. Number of dimensions must not exceed %u due to stack limits. Value: `%u`.",32767,u));if(!Ml(r))throw new TypeError(j("invalid argument. Fourth argument must be an array-like object containing integers. Value: `%s`.",r));if(u>0){if(r.length!==u)throw new RangeError(j("invalid argument. Fourth argument length must match the number of dimensions. Expected number of dimensions: `%u`. Strides length: `%u`.",u,r.length))}else{if(1!==r.length)throw new RangeError("invalid argument. Fourth argument length must be equal to 1 when creating a zero-dimensional ndarray.");if(0!==r[0])throw new RangeError(j("invalid argument. Fourth argument must contain a single element equal to 0. Value: `%d`.",r[0]))}if(!Xe(i))throw new TypeError(j("invalid argument. Fifth argument must be a nonnegative integer. Value: `%s`.",i));if(!li(o))throw new TypeError(j("invalid argument. Sixth argument must be a supported order. Value: `%s`.",o));if(u>0&&!function(t,e,n,r){var i=Bi(e,n,r);return i[0]>=0&&i[1]