/*! numjs */ !function(r){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=r();else if("function"==typeof define&&define.amd)define([],r);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).nj=r()}}(function(){return function r(n,t,e){function i(o,u){if(!t[o]){if(!n[o]){var s="function"==typeof require&&require;if(!u&&s)return s(o,!0);if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var f=t[o]={exports:{}};n[o][0].call(f.exports,function(r){var t=n[o][1][r];return i(t||r)},f,f.exports,r,n,t,e)}return t[o].exports}for(var a="function"==typeof require&&require,o=0;o0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===r[n-2]?2:"="===r[n-1]?1:0}function i(r){return o[r>>18&63]+o[r>>12&63]+o[r>>6&63]+o[63&r]}function a(r,n,t){for(var e,a=[],o=n;o0?l-4:l;var f=0;for(n=0;n>16&255,o[f++]=i>>8&255,o[f++]=255&i;return 2===a?(i=u[r.charCodeAt(n)]<<2|u[r.charCodeAt(n+1)]>>4,o[f++]=255&i):1===a&&(i=u[r.charCodeAt(n)]<<10|u[r.charCodeAt(n+1)]<<4|u[r.charCodeAt(n+2)]>>2,o[f++]=i>>8&255,o[f++]=255&i),o},t.fromByteArray=function(r){for(var n,t=r.length,e=t%3,i="",u=[],s=0,l=t-e;sl?l:s+16383));return 1===e?(n=r[t-1],i+=o[n>>2],i+=o[n<<4&63],i+="=="):2===e&&(n=(r[t-2]<<8)+r[t-1],i+=o[n>>10],i+=o[n>>4&63],i+=o[n<<2&63],i+="="),u.push(i),u.join("")};for(var o=[],u=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",f=0,c=l.length;f0)-(r<0)},t.abs=function(r){var n=r>>31;return(r^n)-n},t.min=function(r,n){return n^(r^n)&-(r65535)<<4,r>>>=n,t=(r>255)<<3,r>>>=t,n|=t,t=(r>15)<<2,r>>>=t,n|=t,t=(r>3)<<1,r>>>=t,(n|=t)|r>>1},t.log10=function(r){return r>=1e9?9:r>=1e8?8:r>=1e7?7:r>=1e6?6:r>=1e5?5:r>=1e4?4:r>=1e3?3:r>=100?2:r>=10?1:0},t.popCount=function(r){return r-=r>>>1&1431655765,16843009*((r=(858993459&r)+(r>>>2&858993459))+(r>>>4)&252645135)>>>24},t.countTrailingZeros=e,t.nextPow2=function(r){return r+=0===r,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)+1},t.prevPow2=function(r){return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)-(r>>>1)},t.parity=function(r){return r^=r>>>16,r^=r>>>8,r^=r>>>4,27030>>>(r&=15)&1};var i=new Array(256);!function(r){for(var n=0;n<256;++n){var t=n,e=n,i=7;for(t>>>=1;t;t>>>=1)e<<=1,e|=1&t,--i;r[n]=e<>>8&255]<<16|i[r>>>16&255]<<8|i[r>>>24&255]},t.interleave2=function(r,n){return r&=65535,r=16711935&(r|r<<8),r=252645135&(r|r<<4),r=858993459&(r|r<<2),r=1431655765&(r|r<<1),n&=65535,n=16711935&(n|n<<8),n=252645135&(n|n<<4),n=858993459&(n|n<<2),n=1431655765&(n|n<<1),r|n<<1},t.deinterleave2=function(r,n){return r=r>>>n&1431655765,r=858993459&(r|r>>>1),r=252645135&(r|r>>>2),r=16711935&(r|r>>>4),(r=65535&(r|r>>>16))<<16>>16},t.interleave3=function(r,n,t){return r&=1023,r=4278190335&(r|r<<16),r=251719695&(r|r<<8),r=3272356035&(r|r<<4),r=1227133513&(r|r<<2),n&=1023,n=4278190335&(n|n<<16),n=251719695&(n|n<<8),n=3272356035&(n|n<<4),n=1227133513&(n|n<<2),r|=n<<1,t&=1023,t=4278190335&(t|t<<16),t=251719695&(t|t<<8),t=3272356035&(t|t<<4),t=1227133513&(t|t<<2),r|t<<2},t.deinterleave3=function(r,n){return r=r>>>n&1227133513,r=3272356035&(r|r>>>2),r=251719695&(r|r>>>4),r=4278190335&(r|r>>>8),(r=1023&(r|r>>>16))<<22>>22},t.nextCombination=function(r){var n=r|r-1;return n+1|(~n&-~n)-1>>>e(r)+1}},{}],3:[function(r,n,t){"use strict";function e(r){if(r>M)throw new RangeError("Invalid typed array length");var n=new Uint8Array(r);return n.__proto__=i.prototype,n}function i(r,n,t){if("number"==typeof r){if("string"==typeof n)throw new Error("If encoding is specified then the first argument must be a string");return u(r)}return a(r,n,t)}function a(r,n,t){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return T(r)?function(r,n,t){if(n<0||r.byteLength=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return 0|r}function f(r,n){if(i.isBuffer(r))return r.length;if(B(r)||T(r))return r.byteLength;"string"!=typeof r&&(r=""+r);var t=r.length;if(0===t)return 0;for(var e=!1;;)switch(n){case"ascii":case"latin1":case"binary":return t;case"utf8":case"utf-8":case void 0:return k(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*t;case"hex":return t>>>1;case"base64":return I(r).length;default:if(e)return k(r).length;n=(""+n).toLowerCase(),e=!0}}function c(r,n,t){var e=!1;if((void 0===n||n<0)&&(n=0),n>this.length)return"";if((void 0===t||t>this.length)&&(t=this.length),t<=0)return"";if(t>>>=0,n>>>=0,t<=n)return"";for(r||(r="utf8");;)switch(r){case"hex":return function(r,n,t){var e=r.length;(!n||n<0)&&(n=0);(!t||t<0||t>e)&&(t=e);for(var i="",a=n;a2147483647?t=2147483647:t<-2147483648&&(t=-2147483648),t=+t,N(t)&&(t=a?0:r.length-1),t<0&&(t=r.length+t),t>=r.length){if(a)return-1;t=r.length-1}else if(t<0){if(!a)return-1;t=0}if("string"==typeof n&&(n=i.from(n,e)),i.isBuffer(n))return 0===n.length?-1:p(r,n,t,e,a);if("number"==typeof n)return n&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(r,n,t):Uint8Array.prototype.lastIndexOf.call(r,n,t):p(r,[n],t,e,a);throw new TypeError("val must be string, number or Buffer")}function p(r,n,t,e,i){function a(r,n){return 1===o?r[n]:r.readUInt16BE(n*o)}var o=1,u=r.length,s=n.length;if(void 0!==e&&("ucs2"===(e=String(e).toLowerCase())||"ucs-2"===e||"utf16le"===e||"utf-16le"===e)){if(r.length<2||n.length<2)return-1;o=2,u/=2,s/=2,t/=2}var l;if(i){var f=-1;for(l=t;lu&&(t=u-s),l=t;l>=0;l--){for(var c=!0,h=0;hi&&(e=i):e=i;var a=n.length;if(a%2!=0)throw new TypeError("Invalid hex string");e>a/2&&(e=a/2);for(var o=0;o>8,i=t%256,a.push(i),a.push(e);return a}(n,r.length-t),r,t,e)}function m(r,n,t){t=Math.min(r.length,t);for(var e=[],i=n;i239?4:a>223?3:a>191?2:1;if(i+u<=t){var s,l,f,c;switch(u){case 1:a<128&&(o=a);break;case 2:128==(192&(s=r[i+1]))&&(c=(31&a)<<6|63&s)>127&&(o=c);break;case 3:s=r[i+1],l=r[i+2],128==(192&s)&&128==(192&l)&&(c=(15&a)<<12|(63&s)<<6|63&l)>2047&&(c<55296||c>57343)&&(o=c);break;case 4:s=r[i+1],l=r[i+2],f=r[i+3],128==(192&s)&&128==(192&l)&&128==(192&f)&&(c=(15&a)<<18|(63&s)<<12|(63&l)<<6|63&f)>65535&&c<1114112&&(o=c)}}null===o?(o=65533,u=1):o>65535&&(o-=65536,e.push(o>>>10&1023|55296),o=56320|1023&o),e.push(o),i+=u}return function(r){var n=r.length;if(n<=C)return String.fromCharCode.apply(String,r);var t="",e=0;for(;et)throw new RangeError("Trying to access beyond buffer length")}function j(r,n,t,e,a,o){if(!i.isBuffer(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>a||nr.length)throw new RangeError("Index out of range")}function x(r,n,t,e,i,a){if(t+e>r.length)throw new RangeError("Index out of range");if(t<0)throw new RangeError("Index out of range")}function V(r,n,t,e,i){return n=+n,t>>>=0,i||x(r,0,t,4),z.write(r,n,t,e,23,4),t+4}function E(r,n,t,e,i){return n=+n,t>>>=0,i||x(r,0,t,8),z.write(r,n,t,e,52,8),t+8}function k(r,n){n=n||1/0;for(var t,e=r.length,i=null,a=[],o=0;o55295&&t<57344){if(!i){if(t>56319){(n-=3)>-1&&a.push(239,191,189);continue}if(o+1===e){(n-=3)>-1&&a.push(239,191,189);continue}i=t;continue}if(t<56320){(n-=3)>-1&&a.push(239,191,189),i=t;continue}t=65536+(i-55296<<10|t-56320)}else i&&(n-=3)>-1&&a.push(239,191,189);if(i=null,t<128){if((n-=1)<0)break;a.push(t)}else if(t<2048){if((n-=2)<0)break;a.push(t>>6|192,63&t|128)}else if(t<65536){if((n-=3)<0)break;a.push(t>>12|224,t>>6&63|128,63&t|128)}else{if(!(t<1114112))throw new Error("Invalid code point");if((n-=4)<0)break;a.push(t>>18|240,t>>12&63|128,t>>6&63|128,63&t|128)}}return a}function I(r){return U.toByteArray(function(r){if((r=r.trim().replace(O,"")).length<2)return"";for(;r.length%4!=0;)r+="=";return r}(r))}function S(r,n,t,e){for(var i=0;i=n.length||i>=r.length);++i)n[i+t]=r[i];return i}function T(r){return r instanceof ArrayBuffer||null!=r&&null!=r.constructor&&"ArrayBuffer"===r.constructor.name&&"number"==typeof r.byteLength}function B(r){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(r)}function N(r){return r!=r}var U=r("base64-js"),z=r("ieee754");t.Buffer=i,t.SlowBuffer=function(r){return+r!=r&&(r=0),i.alloc(+r)},t.INSPECT_MAX_BYTES=50;var M=2147483647;t.kMaxLength=M,(i.TYPED_ARRAY_SUPPORT=function(){try{var r=new Uint8Array(1);return r.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===r.foo()}catch(r){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),i.poolSize=8192,i.from=function(r,n,t){return a(r,n,t)},i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,i.alloc=function(r,n,t){return function(r,n,t){return o(r),r<=0?e(r):void 0!==n?"string"==typeof t?e(r).fill(n,t):e(r).fill(n):e(r)}(r,n,t)},i.allocUnsafe=function(r){return u(r)},i.allocUnsafeSlow=function(r){return u(r)},i.isBuffer=function(r){return null!=r&&!0===r._isBuffer},i.compare=function(r,n){if(!i.isBuffer(r)||!i.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(r===n)return 0;for(var t=r.length,e=n.length,a=0,o=Math.min(t,e);a0&&(r=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(r+=" ... ")),""},i.prototype.compare=function(r,n,t,e,a){if(!i.isBuffer(r))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===t&&(t=r?r.length:0),void 0===e&&(e=0),void 0===a&&(a=this.length),n<0||t>r.length||e<0||a>this.length)throw new RangeError("out of range index");if(e>=a&&n>=t)return 0;if(e>=a)return-1;if(n>=t)return 1;if(n>>>=0,t>>>=0,e>>>=0,a>>>=0,this===r)return 0;for(var o=a-e,u=t-n,s=Math.min(o,u),l=this.slice(e,a),f=r.slice(n,t),c=0;c>>=0,isFinite(t)?(t>>>=0,void 0===e&&(e="utf8")):(e=t,t=void 0)}var i=this.length-n;if((void 0===t||t>i)&&(t=i),r.length>0&&(t<0||n<0)||n>this.length)throw new RangeError("Attempt to write outside buffer bounds");e||(e="utf8");for(var a=!1;;)switch(e){case"hex":return g(this,r,n,t);case"utf8":case"utf-8":return v(this,r,n,t);case"ascii":return y(this,r,n,t);case"latin1":case"binary":return d(this,r,n,t);case"base64":return b(this,r,n,t);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,r,n,t);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),a=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;i.prototype.slice=function(r,n){var t=this.length;r=~~r,n=void 0===n?t:~~n,r<0?(r+=t)<0&&(r=0):r>t&&(r=t),n<0?(n+=t)<0&&(n=0):n>t&&(n=t),n>>=0,n>>>=0,t||A(r,n,this.length);for(var e=this[r],i=1,a=0;++a>>=0,n>>>=0,t||A(r,n,this.length);for(var e=this[r+--n],i=1;n>0&&(i*=256);)e+=this[r+--n]*i;return e},i.prototype.readUInt8=function(r,n){return r>>>=0,n||A(r,1,this.length),this[r]},i.prototype.readUInt16LE=function(r,n){return r>>>=0,n||A(r,2,this.length),this[r]|this[r+1]<<8},i.prototype.readUInt16BE=function(r,n){return r>>>=0,n||A(r,2,this.length),this[r]<<8|this[r+1]},i.prototype.readUInt32LE=function(r,n){return r>>>=0,n||A(r,4,this.length),(this[r]|this[r+1]<<8|this[r+2]<<16)+16777216*this[r+3]},i.prototype.readUInt32BE=function(r,n){return r>>>=0,n||A(r,4,this.length),16777216*this[r]+(this[r+1]<<16|this[r+2]<<8|this[r+3])},i.prototype.readIntLE=function(r,n,t){r>>>=0,n>>>=0,t||A(r,n,this.length);for(var e=this[r],i=1,a=0;++a=i&&(e-=Math.pow(2,8*n)),e},i.prototype.readIntBE=function(r,n,t){r>>>=0,n>>>=0,t||A(r,n,this.length);for(var e=n,i=1,a=this[r+--e];e>0&&(i*=256);)a+=this[r+--e]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*n)),a},i.prototype.readInt8=function(r,n){return r>>>=0,n||A(r,1,this.length),128&this[r]?-1*(255-this[r]+1):this[r]},i.prototype.readInt16LE=function(r,n){r>>>=0,n||A(r,2,this.length);var t=this[r]|this[r+1]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt16BE=function(r,n){r>>>=0,n||A(r,2,this.length);var t=this[r+1]|this[r]<<8;return 32768&t?4294901760|t:t},i.prototype.readInt32LE=function(r,n){return r>>>=0,n||A(r,4,this.length),this[r]|this[r+1]<<8|this[r+2]<<16|this[r+3]<<24},i.prototype.readInt32BE=function(r,n){return r>>>=0,n||A(r,4,this.length),this[r]<<24|this[r+1]<<16|this[r+2]<<8|this[r+3]},i.prototype.readFloatLE=function(r,n){return r>>>=0,n||A(r,4,this.length),z.read(this,r,!0,23,4)},i.prototype.readFloatBE=function(r,n){return r>>>=0,n||A(r,4,this.length),z.read(this,r,!1,23,4)},i.prototype.readDoubleLE=function(r,n){return r>>>=0,n||A(r,8,this.length),z.read(this,r,!0,52,8)},i.prototype.readDoubleBE=function(r,n){return r>>>=0,n||A(r,8,this.length),z.read(this,r,!1,52,8)},i.prototype.writeUIntLE=function(r,n,t,e){if(r=+r,n>>>=0,t>>>=0,!e){j(this,r,n,t,Math.pow(2,8*t)-1,0)}var i=1,a=0;for(this[n]=255&r;++a>>=0,t>>>=0,!e){j(this,r,n,t,Math.pow(2,8*t)-1,0)}var i=t-1,a=1;for(this[n+i]=255&r;--i>=0&&(a*=256);)this[n+i]=r/a&255;return n+t},i.prototype.writeUInt8=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,1,255,0),this[n]=255&r,n+1},i.prototype.writeUInt16LE=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,2,65535,0),this[n]=255&r,this[n+1]=r>>>8,n+2},i.prototype.writeUInt16BE=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,2,65535,0),this[n]=r>>>8,this[n+1]=255&r,n+2},i.prototype.writeUInt32LE=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,4,4294967295,0),this[n+3]=r>>>24,this[n+2]=r>>>16,this[n+1]=r>>>8,this[n]=255&r,n+4},i.prototype.writeUInt32BE=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,4,4294967295,0),this[n]=r>>>24,this[n+1]=r>>>16,this[n+2]=r>>>8,this[n+3]=255&r,n+4},i.prototype.writeIntLE=function(r,n,t,e){if(r=+r,n>>>=0,!e){var i=Math.pow(2,8*t-1);j(this,r,n,t,i-1,-i)}var a=0,o=1,u=0;for(this[n]=255&r;++a>0)-u&255;return n+t},i.prototype.writeIntBE=function(r,n,t,e){if(r=+r,n>>>=0,!e){var i=Math.pow(2,8*t-1);j(this,r,n,t,i-1,-i)}var a=t-1,o=1,u=0;for(this[n+a]=255&r;--a>=0&&(o*=256);)r<0&&0===u&&0!==this[n+a+1]&&(u=1),this[n+a]=(r/o>>0)-u&255;return n+t},i.prototype.writeInt8=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,1,127,-128),r<0&&(r=255+r+1),this[n]=255&r,n+1},i.prototype.writeInt16LE=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,2,32767,-32768),this[n]=255&r,this[n+1]=r>>>8,n+2},i.prototype.writeInt16BE=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,2,32767,-32768),this[n]=r>>>8,this[n+1]=255&r,n+2},i.prototype.writeInt32LE=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,4,2147483647,-2147483648),this[n]=255&r,this[n+1]=r>>>8,this[n+2]=r>>>16,this[n+3]=r>>>24,n+4},i.prototype.writeInt32BE=function(r,n,t){return r=+r,n>>>=0,t||j(this,r,n,4,2147483647,-2147483648),r<0&&(r=4294967295+r+1),this[n]=r>>>24,this[n+1]=r>>>16,this[n+2]=r>>>8,this[n+3]=255&r,n+4},i.prototype.writeFloatLE=function(r,n,t){return V(this,r,n,!0,t)},i.prototype.writeFloatBE=function(r,n,t){return V(this,r,n,!1,t)},i.prototype.writeDoubleLE=function(r,n,t){return E(this,r,n,!0,t)},i.prototype.writeDoubleBE=function(r,n,t){return E(this,r,n,!1,t)},i.prototype.copy=function(r,n,t,e){if(t||(t=0),e||0===e||(e=this.length),n>=r.length&&(n=r.length),n||(n=0),e>0&&e=this.length)throw new RangeError("sourceStart out of bounds");if(e<0)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),r.length-n=0;--i)r[i+n]=this[i+t];else if(a<1e3)for(i=0;i>>=0,t=void 0===t?this.length:t>>>0,r||(r=0);var o;if("number"==typeof r)for(o=n;o0)throw new Error("cwise: pre() block may not reference array args");if(i0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===a)n.scalarArgs.push(i),n.shimArgs.push("scalar"+i);else if("index"===a){if(n.indexArgs.push(i),i0)throw new Error("cwise: pre() block may not reference array index");if(i0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===a){if(n.shapeArgs.push(i),it.length)throw new Error("cwise: Too many arguments in pre() block");if(n.body.args.length>t.length)throw new Error("cwise: Too many arguments in body() block");if(n.post.args.length>t.length)throw new Error("cwise: Too many arguments in post() block");return n.debug=!!r.printCode||!!r.debug,n.funcName=r.funcName||"cwise",n.blockSize=r.blockSize||64,e(n)}},{"./lib/thunk.js":6}],5:[function(r,n,t){"use strict";function e(r,n,t){var e,i,a=r.length,o=n.arrayArgs.length,u=n.indexArgs.length>0,s=[],l=[],f=0,c=0;for(e=0;e0&&s.push("var "+l.join(",")),e=a-1;e>=0;--e)f=r[e],s.push(["for(i",e,"=0;i",e,"0&&s.push(["index[",c,"]-=s",c].join("")),s.push(["++index[",f,"]"].join(""))),s.push("}")}return s.join("\n")}function i(r,n,t){for(var e=r.body,i=[],a=[],o=0;o0&&d.push("shape=SS.slice(0)"),r.indexArgs.length>0){for(var b=new Array(t),s=0;s0&&y.push("var "+d.join(",")),s=0;s3&&y.push(i(r.pre,r,u));var j=i(r.body,r,u),x=function(r){for(var n=0,t=r[0].length;n0,l=[],f=0;f0;){"].join("")),l.push(["if(j",f,"<",u,"){"].join("")),l.push(["s",n[f],"=j",f].join("")),l.push(["j",f,"=0"].join("")),l.push(["}else{s",n[f],"=",u].join("")),l.push(["j",f,"-=",u,"}"].join("")),s&&l.push(["index[",n[f],"]=j",f].join(""));for(f=0;f3&&y.push(i(r.post,r,u)),r.debug&&console.log("-----Generated cwise routine for ",n,":\n"+y.join("\n")+"\n----------");var V=[r.funcName||"unnamed","_cwise_loop_",o[0].join("s"),"m",x,function(r){for(var n=new Array(r.length),t=!0,e=0;e0&&(t=t&&n[e]===n[e-1])}return t?n[0]:n.join("")}(u)].join("");return new Function(["function ",V,"(",v.join(","),"){",y.join("\n"),"} return ",V].join(""))()}},{uniq:22}],6:[function(r,n,t){"use strict";var e=r("./compile.js");n.exports=function(r){var n=["'use strict'","var CACHED={}"],t=[],i=r.funcName+"_cwise_thunk";n.push(["return function ",i,"(",r.shimArgs.join(","),"){"].join(""));for(var a=[],o=[],u=[["array",r.arrayArgs[0],".shape.slice(",Math.max(0,r.arrayBlockIndices[0]),r.arrayBlockIndices[0]<0?","+r.arrayBlockIndices[0]+")":")"].join("")],s=[],l=[],f=0;f0&&(s.push("array"+r.arrayArgs[0]+".shape.length===array"+c+".shape.length+"+(Math.abs(r.arrayBlockIndices[0])-Math.abs(r.arrayBlockIndices[f]))),l.push("array"+r.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,r.arrayBlockIndices[0])+"]===array"+c+".shape[shapeIndex+"+Math.max(0,r.arrayBlockIndices[f])+"]"))}for(r.arrayArgs.length>1&&(n.push("if (!("+s.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),n.push("for(var shapeIndex=array"+r.arrayArgs[0]+".shape.length-"+Math.abs(r.arrayBlockIndices[0])+"; shapeIndex--\x3e0;) {"),n.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),n.push("}")),f=0;f0)return function(r,n){var t,e;for(t=new Array(r),e=0;e>1,f=-7,c=t?i-1:0,h=t?-1:1,_=r[n+c];for(c+=h,a=_&(1<<-f)-1,_>>=-f,f+=u;f>0;a=256*a+r[n+c],c+=h,f-=8);for(o=a&(1<<-f)-1,a>>=-f,f+=e;f>0;o=256*o+r[n+c],c+=h,f-=8);if(0===a)a=1-l;else{if(a===s)return o?NaN:1/0*(_?-1:1);o+=Math.pow(2,e),a-=l}return(_?-1:1)*o*Math.pow(2,a-e)},t.write=function(r,n,t,e,i,a){var o,u,s,l=8*a-i-1,f=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,_=e?0:a-1,p=e?1:-1,g=n<0||0===n&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(u=isNaN(n)?1:0,o=f):(o=Math.floor(Math.log(n)/Math.LN2),n*(s=Math.pow(2,-o))<1&&(o--,s*=2),(n+=o+c>=1?h/s:h*Math.pow(2,1-c))*s>=2&&(o++,s/=2),o+c>=f?(u=0,o=f):o+c>=1?(u=(n*s-1)*Math.pow(2,i),o+=c):(u=n*Math.pow(2,c-1)*Math.pow(2,i),o=0));i>=8;r[t+_]=255&u,_+=p,u/=256,i-=8);for(o=o<0;r[t+_]=255&o,_+=p,o/=256,l-=8);r[t+_-p]|=128*g}},{}],10:[function(r,n,t){"use strict";n.exports=function(r){for(var n=new Array(r),t=0;t-1}function f(r,n,t){for(var e=-1,i=null==r?0:r.length;++e-1;);return t}function S(r,n){for(var t=r.length;t--&&y(n,r[t],0)>-1;);return t}function T(r){return"\\"+vt[r]}function B(r){return ft.test(r)}function N(r){var n=-1,t=Array(r.size);return r.forEach(function(r,e){t[++n]=[e,r]}),t}function U(r,n){return function(t){return r(n(t))}}function z(r,n){for(var t=-1,e=r.length,i=0,a=[];++t>>1,br=[["ary",er],["bind",J],["bindKey",K],["curry",Q],["curryRight",rr],["flip",ar],["partial",nr],["partialRight",tr],["rearg",ir]],wr="[object Arguments]",mr="[object Array]",Ar="[object AsyncFunction]",jr="[object Boolean]",xr="[object Date]",Vr="[object DOMException]",Er="[object Error]",kr="[object Function]",Ir="[object GeneratorFunction]",Sr="[object Map]",Tr="[object Number]",Br="[object Null]",Nr="[object Object]",Ur="[object Promise]",zr="[object Proxy]",Mr="[object RegExp]",Cr="[object Set]",Or="[object String]",qr="[object Symbol]",Rr="[object Undefined]",Lr="[object WeakMap]",Fr="[object WeakSet]",Dr="[object ArrayBuffer]",Pr="[object DataView]",Wr="[object Float32Array]",$r="[object Float64Array]",Yr="[object Int8Array]",Hr="[object Int16Array]",Zr="[object Int32Array]",Gr="[object Uint8Array]",Jr="[object Uint8ClampedArray]",Kr="[object Uint16Array]",Xr="[object Uint32Array]",Qr=/\b__p \+= '';/g,rn=/\b(__p \+=) '' \+/g,nn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,tn=/&(?:amp|lt|gt|quot|#39);/g,en=/[&<>"']/g,an=RegExp(tn.source),on=RegExp(en.source),un=/<%-([\s\S]+?)%>/g,sn=/<%([\s\S]+?)%>/g,ln=/<%=([\s\S]+?)%>/g,fn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cn=/^\w*$/,hn=/^\./,_n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pn=/[\\^$.*+?()[\]{}|]/g,gn=RegExp(pn.source),vn=/^\s+|\s+$/g,yn=/^\s+/,dn=/\s+$/,bn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,wn=/\{\n\/\* \[wrapped with (.+)\] \*/,mn=/,? & /,An=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,jn=/\\(\\)?/g,xn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vn=/\w*$/,En=/^[-+]0x[0-9a-f]+$/i,kn=/^0b[01]+$/i,In=/^\[object .+?Constructor\]$/,Sn=/^0o[0-7]+$/i,Tn=/^(?:0|[1-9]\d*)$/,Bn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Nn=/($^)/,Un=/['\n\r\u2028\u2029\\]/g,zn="\\ud800-\\udfff",Mn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Cn="a-z\\xdf-\\xf6\\xf8-\\xff",On="A-Z\\xc0-\\xd6\\xd8-\\xde",qn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Rn="["+zn+"]",Ln="["+qn+"]",Fn="["+Mn+"]",Dn="\\d+",Pn="[\\u2700-\\u27bf]",Wn="["+Cn+"]",$n="[^"+zn+qn+Dn+"\\u2700-\\u27bf"+Cn+On+"]",Yn="\\ud83c[\\udffb-\\udfff]",Hn="[^"+zn+"]",Zn="(?:\\ud83c[\\udde6-\\uddff]){2}",Gn="[\\ud800-\\udbff][\\udc00-\\udfff]",Jn="["+On+"]",Kn="(?:"+Wn+"|"+$n+")",Xn="(?:"+Jn+"|"+$n+")",Qn="(?:['’](?:d|ll|m|re|s|t|ve))?",rt="(?:['’](?:D|LL|M|RE|S|T|VE))?",nt="(?:"+Fn+"|"+Yn+")"+"?",tt="[\\ufe0e\\ufe0f]?",et=tt+nt+("(?:\\u200d(?:"+[Hn,Zn,Gn].join("|")+")"+tt+nt+")*"),it="(?:"+[Pn,Zn,Gn].join("|")+")"+et,at="(?:"+[Hn+Fn+"?",Fn,Zn,Gn,Rn].join("|")+")",ot=RegExp("['’]","g"),ut=RegExp(Fn,"g"),st=RegExp(Yn+"(?="+Yn+")|"+at+et,"g"),lt=RegExp([Jn+"?"+Wn+"+"+Qn+"(?="+[Ln,Jn,"$"].join("|")+")",Xn+"+"+rt+"(?="+[Ln,Jn+Kn,"$"].join("|")+")",Jn+"?"+Kn+"+"+Qn,Jn+"+"+rt,"\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)","\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)",Dn,it].join("|"),"g"),ft=RegExp("[\\u200d"+zn+Mn+"\\ufe0e\\ufe0f]"),ct=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ht=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],_t=-1,pt={};pt[Wr]=pt[$r]=pt[Yr]=pt[Hr]=pt[Zr]=pt[Gr]=pt[Jr]=pt[Kr]=pt[Xr]=!0,pt[wr]=pt[mr]=pt[Dr]=pt[jr]=pt[Pr]=pt[xr]=pt[Er]=pt[kr]=pt[Sr]=pt[Tr]=pt[Nr]=pt[Mr]=pt[Cr]=pt[Or]=pt[Lr]=!1;var gt={};gt[wr]=gt[mr]=gt[Dr]=gt[Pr]=gt[jr]=gt[xr]=gt[Wr]=gt[$r]=gt[Yr]=gt[Hr]=gt[Zr]=gt[Sr]=gt[Tr]=gt[Nr]=gt[Mr]=gt[Cr]=gt[Or]=gt[qr]=gt[Gr]=gt[Jr]=gt[Kr]=gt[Xr]=!0,gt[Er]=gt[kr]=gt[Lr]=!1;var vt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},yt=parseFloat,dt=parseInt,bt="object"==typeof r&&r&&r.Object===Object&&r,wt="object"==typeof self&&self&&self.Object===Object&&self,mt=bt||wt||Function("return this")(),At="object"==typeof t&&t&&!t.nodeType&&t,jt=At&&"object"==typeof n&&n&&!n.nodeType&&n,xt=jt&&jt.exports===At,Vt=xt&&bt.process,Et=function(){try{return Vt&&Vt.binding&&Vt.binding("util")}catch(r){}}(),kt=Et&&Et.isArrayBuffer,It=Et&&Et.isDate,St=Et&&Et.isMap,Tt=Et&&Et.isRegExp,Bt=Et&&Et.isSet,Nt=Et&&Et.isTypedArray,Ut=w("length"),zt=m({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Mt=m({"&":"&","<":"<",">":">",'"':""","'":"'"}),Ct=m({"&":"&","<":"<",">":">",""":'"',"'":"'"}),Ot=function r(n){function t(r){if(ra(r)&&!Wu(r)&&!(r instanceof Mn)){if(r instanceof zn)return r;if(Pa.call(r,"__wrapped__"))return xi(r)}return new zn(r)}function m(){}function zn(r,n){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=q}function Mn(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=vr,this.__views__=[]}function Cn(r){var n=-1,t=null==r?0:r.length;for(this.clear();++n=n?r:n)),r}function Jn(r,n,t,a,u,s){var l,f=n&$,c=n&Y,h=n&H;if(t&&(l=u?t(r,a,u,s):t(r)),l!==q)return l;if(!Qi(r))return r;var p=Wu(r);if(p){if(l=function(r){var n=r.length,t=r.constructor(n);return n&&"string"==typeof r[0]&&Pa.call(r,"index")&&(t.index=r.index,t.input=r.input),t}(r),!f)return Ee(r,l)}else{var g=ru(r),v=g==kr||g==Ir;if(Yu(r))return we(r,f);if(g==Nr||g==wr||v&&!u){if(l=c||v?{}:si(r),!f)return c?function(r,n){return ke(r,Qo(r),n)}(r,function(n,t){return n&&ke(r,ga(r),n)}(l)):function(r,n){return ke(r,Xo(r),n)}(r,Yn(l,r))}else{if(!gt[g])return u?r:{};l=function(r,n,t,a){var o=r.constructor;switch(n){case Dr:return me(r);case jr:case xr:return new o(+r);case Pr:return function(r,n){var t=a?me(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}(r);case Wr:case $r:case Yr:case Hr:case Zr:case Gr:case Jr:case Kr:case Xr:return Ae(r,a);case Sr:return function(r,n,i){return _(a?t(N(r),$):N(r),e,new r.constructor)}(r);case Tr:case Or:return new o(r);case Mr:return function(r){var n=new r.constructor(r.source,Vn.exec(r));return n.lastIndex=r.lastIndex,n}(r);case Cr:return function(r,n,e){return _(a?t(M(r),$):M(r),i,new r.constructor)}(r);case qr:return function(r){return Ro?za(Ro.call(r)):{}}(r)}}(r,g,Jn,f)}}s||(s=new Ln);var y=s.get(r);if(y)return y;s.set(r,l);var d=p?q:(h?c?ri:Qe:c?ga:pa)(r);return o(d||r,function(e,i){d&&(e=r[i=e]),Wn(l,i,Jn(e,n,t,i,r,s))}),l}function Kn(r,n,t){var e=t.length;if(null==r)return!e;for(r=za(r);e--;){var i=t[e],a=n[i],o=r[i];if(o===q&&!(i in r)||!a(o))return!1}return!0}function Xn(r,n,t){if("function"!=typeof r)throw new Oa(F);return eu(function(){r.apply(q,t)},n)}function Qn(r,n,t,e){var i=-1,a=l,o=!0,u=r.length,s=[],h=n.length;if(!u)return s;t&&(n=c(n,V(t))),e?(a=f,o=!1):n.length>=R&&(a=k,o=!1,n=new Rn(n));r:for(;++i0&&t(u)?n>1?tt(u,n-1,t,e,i):h(i,u):e||(i[i.length]=u)}return i}function et(r,n){return r&&Wo(r,n,pa)}function it(r,n){return r&&$o(r,n,pa)}function at(r,n){return s(n,function(n){return Ji(r[n])})}function st(r,n){for(var t=0,e=(n=de(n,r)).length;null!=r&&tn}function wt(r,n){return null!=r&&Pa.call(r,n)}function At(r,n){return null!=r&&n in za(r)}function jt(r,n,t){for(var e=t?f:l,i=r[0].length,a=r.length,o=a,u=Sa(a),s=1/0,h=[];o--;){var _=r[o];o&&n&&(_=c(_,V(n))),s=wo(_.length,s),u[o]=!t&&(n||i>=120&&_.length>=120)?new Rn(o&&_):q}_=r[0];var p=-1,g=u[0];r:for(;++p=u)return s;var l=t[e];return s*("desc"==l?-1:1)}}return r.index-n.index}(r,n,t)})}function Jt(r,n,t){for(var e=-1,i=n.length,a={};++e-1;)u!==r&&eo.call(u,s,1),eo.call(r,s,1);return r}function Xt(r,n){for(var t=r?n.length:0,e=t-1;t--;){var i=n[t];if(t==e||i!==a){var a=i;fi(i)?eo.call(r,i,1):fe(r,i)}}return r}function Qt(r,n){return r+ho(jo()*(n-r+1))}function re(r,n){var t="";if(!r||n<1||n>_r)return t;do{n%2&&(t+=r),(n=ho(n/2))&&(r+=r)}while(n);return t}function ne(r,n){return iu(yi(r,n,Aa),r+"")}function te(r,n,t,e){if(!Qi(r))return r;for(var i=-1,a=(n=de(n,r)).length,o=a-1,u=r;null!=u&&++ii?0:i+n),(t=t>i?i:t)<0&&(t+=i),i=n>t?0:t-n>>>0,n>>>=0;for(var a=Sa(i);++e>>1,o=r[a];null!==o&&!ia(o)&&(t?o<=n:o=R){var c=n?null:Jo(r);if(c)return M(c);o=!1,i=k,s=new Rn}else s=n?[]:u;r:for(;++e=e?r:ee(r,n,t)}function we(r,n){if(n)return r.slice();var t=r.length,e=Qa?Qa(t):new r.constructor(t);return r.copy(e),e}function me(r){var n=new r.constructor(r.byteLength);return new Xa(n).set(new Xa(r)),n}function Ae(r,n){var t=n?me(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}function je(r,n){if(r!==n){var t=r!==q,e=null===r,i=r==r,a=ia(r),o=n!==q,u=null===n,s=n==n,l=ia(n);if(!u&&!l&&!a&&r>n||a&&o&&s&&!u&&!l||e&&o&&s||!t&&s||!i)return 1;if(!e&&!a&&!l&&r1?t[i-1]:q,o=i>2?t[2]:q;for(a=r.length>3&&"function"==typeof a?(i--,a):q,o&&ci(t[0],t[1],o)&&(a=i<3?q:a,i=1),n=za(n);++e-1?i[a?n[o]:o]:q}}function Ce(r){return Xe(function(n){var t=n.length,e=t,i=zn.prototype.thru;for(r&&n.reverse();e--;){var a=n[e];if("function"!=typeof a)throw new Oa(F);if(i&&!o&&"wrapper"==ni(a))var o=new zn([],!0)}for(e=o?e:t;++e1&&d.reverse(),c&&su))return!1;var l=a.get(r);if(l&&a.get(n))return l==n;var f=-1,c=!0,h=t&G?new Rn:q;for(a.set(r,n),a.set(n,r);++f-1&&r%1==0&&r1?"& ":"")+n[e],n=n.join(t>2?", ":" "),r.replace(bn,"{\n/* [wrapped with "+n+"] */\n")}(e,function(r,n){return o(br,function(t){var e="_."+t[0];n&t[1]&&!l(r,e)&&r.push(e)}),r.sort()}(function(r){var n=e.match(wn);return n?n[1].split(mn):[]}(),t)))}function wi(r){var n=0,t=0;return function(){var e=mo(),i=lr-(e-t);if(t=e,i>0){if(++n>=sr)return arguments[0]}else n=0;return r.apply(q,arguments)}}function mi(r,n){var t=-1,e=r.length,i=e-1;for(n=n===q?e:n;++t0&&(t=n.apply(this,arguments)),r<=1&&(n=q),t}}function Fi(r,n,t){var e=He(r,Q,q,q,q,q,q,n=t?q:n);return e.placeholder=Fi.placeholder,e}function Di(r,n,t){var e=He(r,rr,q,q,q,q,q,n=t?q:n);return e.placeholder=Di.placeholder,e}function Pi(r,n,t){function e(n){var t=s,e=l;return s=l=q,p=n,c=r.apply(e,t)}function i(r){var t=r-_;return _===q||t>=n||t<0||v&&r-p>=f}function a(){var r=Nu();if(i(r))return o(r);h=eu(a,function(t){var e=n-(r-_);return v?wo(e,f-(r-p)):e}())}function o(r){return h=q,y&&s?e(r):(s=l=q,c)}function u(){var r=Nu(),t=i(r);if(s=arguments,l=this,_=r,t){if(h===q)return function(r){return p=r,h=eu(a,n),g?e(r):c}(_);if(v)return h=eu(a,n),e(_)}return h===q&&(h=eu(a,n)),c}var s,l,f,c,h,_,p=0,g=!1,v=!1,y=!0;if("function"!=typeof r)throw new Oa(F);return n=la(n)||0,Qi(t)&&(g=!!t.leading,f=(v="maxWait"in t)?bo(la(t.maxWait)||0,n):f,y="trailing"in t?!!t.trailing:y),u.cancel=function(){h!==q&&Go(h),p=0,s=_=l=h=q},u.flush=function(){return h===q?c:o(Nu())},u}function Wi(r,n){if("function"!=typeof r||null!=n&&"function"!=typeof n)throw new Oa(F);var t=function(){var e=arguments,i=n?n.apply(this,e):e[0],a=t.cache;if(a.has(i))return a.get(i);var o=r.apply(this,e);return t.cache=a.set(i,o)||a,o};return t.cache=new(Wi.Cache||qn),t}function $i(r){if("function"!=typeof r)throw new Oa(F);return function(){var n=arguments;switch(n.length){case 0:return!r.call(this);case 1:return!r.call(this,n[0]);case 2:return!r.call(this,n[0],n[1]);case 3:return!r.call(this,n[0],n[1],n[2])}return!r.apply(this,n)}}function Yi(r,n){return r===n||r!=r&&n!=n}function Hi(r){return null!=r&&Xi(r.length)&&!Ji(r)}function Zi(r){return ra(r)&&Hi(r)}function Gi(r){if(!ra(r))return!1;var n=vt(r);return n==Er||n==Vr||"string"==typeof r.message&&"string"==typeof r.name&&!ta(r)}function Ji(r){if(!Qi(r))return!1;var n=vt(r);return n==kr||n==Ir||n==Ar||n==zr}function Ki(r){return"number"==typeof r&&r==ua(r)}function Xi(r){return"number"==typeof r&&r>-1&&r%1==0&&r<=_r}function Qi(r){var n=typeof r;return null!=r&&("object"==n||"function"==n)}function ra(r){return null!=r&&"object"==typeof r}function na(r){return"number"==typeof r||ra(r)&&vt(r)==Tr}function ta(r){if(!ra(r)||vt(r)!=Nr)return!1;var n=ro(r);if(null===n)return!0;var t=Pa.call(n,"constructor")&&n.constructor;return"function"==typeof t&&t instanceof t&&Da.call(t)==Ha}function ea(r){return"string"==typeof r||!Wu(r)&&ra(r)&&vt(r)==Or}function ia(r){return"symbol"==typeof r||ra(r)&&vt(r)==qr}function aa(r){if(!r)return[];if(Hi(r))return ea(r)?O(r):Ee(r);if(ao&&r[ao])return function(r){for(var n,t=[];!(n=r.next()).done;)t.push(n.value);return t}(r[ao]());var n=ru(r);return(n==Sr?N:n==Cr?M:ya)(r)}function oa(r){return r?(r=la(r))===hr||r===-hr?(r<0?-1:1)*pr:r==r?r:0:0===r?r:0}function ua(r){var n=oa(r),t=n%1;return n==n?t?n-t:n:0}function sa(r){return r?Gn(ua(r),0,vr):0}function la(r){if("number"==typeof r)return r;if(ia(r))return gr;if(Qi(r)){var n="function"==typeof r.valueOf?r.valueOf():r;r=Qi(n)?n+"":n}if("string"!=typeof r)return 0===r?r:+r;r=r.replace(vn,"");var t=kn.test(r);return t||Sn.test(r)?dt(r.slice(2),t?2:8):En.test(r)?gr:+r}function fa(r){return ke(r,ga(r))}function ca(r){return null==r?"":se(r)}function ha(r,n,t){var e=null==r?q:st(r,n);return e===q?t:e}function _a(r,n){return null!=r&&ui(r,n,At)}function pa(r){return Hi(r)?Fn(r):Ft(r)}function ga(r){return Hi(r)?Fn(r,!0):Dt(r)}function va(r,n){if(null==r)return{};var t=c(ri(r),function(r){return[r]});return n=ei(n),Jt(r,t,function(r,t){return n(r,t[0])})}function ya(r){return null==r?[]:E(r,pa(r))}function da(r){return js(ca(r).toLowerCase())}function ba(r){return(r=ca(r))&&r.replace(Bn,zt).replace(ut,"")}function wa(r,n,t){return r=ca(r),(n=t?q:n)===q?function(r){return ct.test(r)}(r)?r.match(lt)||[]:r.match(An)||[]:r.match(n)||[]}function ma(r){return function(){return r}}function Aa(r){return r}function ja(r){return Lt("function"==typeof r?r:Jn(r,$))}function xa(r,n,t){var e=pa(n),i=at(n,e);null!=t||Qi(n)&&(i.length||!e.length)||(t=n,n=r,r=this,i=at(n,pa(n)));var a=!(Qi(t)&&"chain"in t&&!t.chain),u=Ji(r);return o(i,function(t){var e=n[t];r[t]=e,u&&(r.prototype[t]=function(){var n=this.__chain__;if(a||n){var t=r(this.__wrapped__);return(t.__actions__=Ee(this.__actions__)).push({func:e,args:arguments,thisArg:r}),t.__chain__=n,t}return e.apply(r,h([this.value()],arguments))})}),r}function Va(){}function Ea(r){return hi(r)?w(Ai(r)):function(r){return function(n){return st(n,r)}}(r)}function ka(){return[]}function Ia(){return!1}var Sa=(n=null==n?mt:Ot.defaults(mt.Object(),n,Ot.pick(mt,ht))).Array,Ta=n.Date,Ba=n.Error,Na=n.Function,Ua=n.Math,za=n.Object,Ma=n.RegExp,Ca=n.String,Oa=n.TypeError,qa=Sa.prototype,Ra=Na.prototype,La=za.prototype,Fa=n["__core-js_shared__"],Da=Ra.toString,Pa=La.hasOwnProperty,Wa=0,$a=function(){var r=/[^.]+$/.exec(Fa&&Fa.keys&&Fa.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),Ya=La.toString,Ha=Da.call(za),Za=mt._,Ga=Ma("^"+Da.call(Pa).replace(pn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ja=xt?n.Buffer:q,Ka=n.Symbol,Xa=n.Uint8Array,Qa=Ja?Ja.allocUnsafe:q,ro=U(za.getPrototypeOf,za),no=za.create,to=La.propertyIsEnumerable,eo=qa.splice,io=Ka?Ka.isConcatSpreadable:q,ao=Ka?Ka.iterator:q,oo=Ka?Ka.toStringTag:q,uo=function(){try{var r=oi(za,"defineProperty");return r({},"",{}),r}catch(r){}}(),so=n.clearTimeout!==mt.clearTimeout&&n.clearTimeout,lo=Ta&&Ta.now!==mt.Date.now&&Ta.now,fo=n.setTimeout!==mt.setTimeout&&n.setTimeout,co=Ua.ceil,ho=Ua.floor,_o=za.getOwnPropertySymbols,po=Ja?Ja.isBuffer:q,go=n.isFinite,vo=qa.join,yo=U(za.keys,za),bo=Ua.max,wo=Ua.min,mo=Ta.now,Ao=n.parseInt,jo=Ua.random,xo=qa.reverse,Vo=oi(n,"DataView"),Eo=oi(n,"Map"),ko=oi(n,"Promise"),Io=oi(n,"Set"),So=oi(n,"WeakMap"),To=oi(za,"create"),Bo=So&&new So,No={},Uo=ji(Vo),zo=ji(Eo),Mo=ji(ko),Co=ji(Io),Oo=ji(So),qo=Ka?Ka.prototype:q,Ro=qo?qo.valueOf:q,Lo=qo?qo.toString:q,Fo=function(){function r(){}return function(n){if(!Qi(n))return{};if(no)return no(n);r.prototype=n;var t=new r;return r.prototype=q,t}}();t.templateSettings={escape:un,evaluate:sn,interpolate:ln,variable:"",imports:{_:t}},(t.prototype=m.prototype).constructor=t,(zn.prototype=Fo(m.prototype)).constructor=zn,(Mn.prototype=Fo(m.prototype)).constructor=Mn,Cn.prototype.clear=function(){this.__data__=To?To(null):{},this.size=0},Cn.prototype.delete=function(r){var n=this.has(r)&&delete this.__data__[r];return this.size-=n?1:0,n},Cn.prototype.get=function(r){var n=this.__data__;if(To){var t=n[r];return t===D?q:t}return Pa.call(n,r)?n[r]:q},Cn.prototype.has=function(r){var n=this.__data__;return To?n[r]!==q:Pa.call(n,r)},Cn.prototype.set=function(r,n){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=To&&n===q?D:n,this},On.prototype.clear=function(){this.__data__=[],this.size=0},On.prototype.delete=function(r){var n=this.__data__,t=$n(n,r);return!(t<0||(t==n.length-1?n.pop():eo.call(n,t,1),--this.size,0))},On.prototype.get=function(r){var n=this.__data__,t=$n(n,r);return t<0?q:n[t][1]},On.prototype.has=function(r){return $n(this.__data__,r)>-1},On.prototype.set=function(r,n){var t=this.__data__,e=$n(t,r);return e<0?(++this.size,t.push([r,n])):t[e][1]=n,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Cn,map:new(Eo||On),string:new Cn}},qn.prototype.delete=function(r){var n=ii(this,r).delete(r);return this.size-=n?1:0,n},qn.prototype.get=function(r){return ii(this,r).get(r)},qn.prototype.has=function(r){return ii(this,r).has(r)},qn.prototype.set=function(r,n){var t=ii(this,r),e=t.size;return t.set(r,n),this.size+=t.size==e?0:1,this},Rn.prototype.add=Rn.prototype.push=function(r){return this.__data__.set(r,D),this},Rn.prototype.has=function(r){return this.__data__.has(r)},Ln.prototype.clear=function(){this.__data__=new On,this.size=0},Ln.prototype.delete=function(r){var n=this.__data__,t=n.delete(r);return this.size=n.size,t},Ln.prototype.get=function(r){return this.__data__.get(r)},Ln.prototype.has=function(r){return this.__data__.has(r)},Ln.prototype.set=function(r,n){var t=this.__data__;if(t instanceof On){var e=t.__data__;if(!Eo||e.length1?r[n-1]:q;return t="function"==typeof t?(r.pop(),t):q,Ui(r,t)}),ju=Xe(function(r){var n=r.length,t=n?r[0]:0,e=this.__wrapped__,i=function(n){return Zn(n,r)};return!(n>1||this.__actions__.length)&&e instanceof Mn&&fi(t)?((e=e.slice(t,+t+(n?1:0))).__actions__.push({func:Mi,args:[i],thisArg:q}),new zn(e,this.__chain__).thru(function(r){return n&&!r.length&&r.push(q),r})):this.thru(i)}),xu=Ie(function(r,n,t){Pa.call(r,t)?++r[t]:Hn(r,t,1)}),Vu=Me(Vi),Eu=Me(Ei),ku=Ie(function(r,n,t){Pa.call(r,t)?r[t].push(n):Hn(r,t,[n])}),Iu=ne(function(r,n,t){var e=-1,i="function"==typeof n,o=Hi(r)?Sa(r.length):[];return Do(r,function(r){o[++e]=i?a(n,r,t):Vt(r,n,t)}),o}),Su=Ie(function(r,n,t){Hn(r,t,n)}),Tu=Ie(function(r,n,t){r[t?0:1].push(n)},function(){return[[],[]]}),Bu=ne(function(r,n){if(null==r)return[];var t=n.length;return t>1&&ci(r,n[0],n[1])?n=[]:t>2&&ci(n[0],n[1],n[2])&&(n=[n[0]]),Gt(r,tt(n,1),[])}),Nu=lo||function(){return mt.Date.now()},Uu=ne(function(r,n,t){var e=J;if(t.length){var i=z(t,ti(Uu));e|=nr}return He(r,e,n,t,i)}),zu=ne(function(r,n,t){var e=J|K;if(t.length){var i=z(t,ti(zu));e|=nr}return He(n,e,r,t,i)}),Mu=ne(function(r,n){return Xn(r,1,n)}),Cu=ne(function(r,n,t){return Xn(r,la(n)||0,t)});Wi.Cache=qn;var Ou=Zo(function(r,n){var t=(n=1==n.length&&Wu(n[0])?c(n[0],V(ei())):c(tt(n,1),V(ei()))).length;return ne(function(e){for(var i=-1,o=wo(e.length,t);++i=n}),Pu=Et(function(){return arguments}())?Et:function(r){return ra(r)&&Pa.call(r,"callee")&&!to.call(r,"callee")},Wu=Sa.isArray,$u=kt?V(kt):function(r){return ra(r)&&vt(r)==Dr},Yu=po||Ia,Hu=It?V(It):function(r){return ra(r)&&vt(r)==xr},Zu=St?V(St):function(r){return ra(r)&&ru(r)==Sr},Gu=Tt?V(Tt):function(r){return ra(r)&&vt(r)==Mr},Ju=Bt?V(Bt):function(r){return ra(r)&&ru(r)==Cr},Ku=Nt?V(Nt):function(r){return ra(r)&&Xi(r.length)&&!!pt[vt(r)]},Xu=Pe(Pt),Qu=Pe(function(r,n){return r<=n}),rs=Se(function(r,n){if(pi(n)||Hi(n))ke(n,pa(n),r);else for(var t in n)Pa.call(n,t)&&Wn(r,t,n[t])}),ns=Se(function(r,n){ke(n,ga(n),r)}),ts=Se(function(r,n,t,e){ke(n,ga(n),r,e)}),es=Se(function(r,n,t,e){ke(n,pa(n),r,e)}),is=Xe(Zn),as=ne(function(r){return r.push(q,Ze),a(ts,q,r)}),os=ne(function(r){return r.push(q,Ge),a(cs,q,r)}),us=qe(function(r,n,t){r[n]=t},ma(Aa)),ss=qe(function(r,n,t){Pa.call(r,n)?r[n].push(t):r[n]=[t]},ei),ls=ne(Vt),fs=Se(function(r,n,t){Ht(r,n,t)}),cs=Se(function(r,n,t,e){Ht(r,n,t,e)}),hs=Xe(function(r,n){var t={};if(null==r)return t;var e=!1;n=c(n,function(n){return n=de(n,r),e||(e=n.length>1),n}),ke(r,ri(r),t),e&&(t=Jn(t,$|Y|H,Je));for(var i=n.length;i--;)fe(t,n[i]);return t}),_s=Xe(function(r,n){return null==r?{}:function(r,t){return Jt(r,n,function(n,t){return _a(r,t)})}(r)}),ps=Ye(pa),gs=Ye(ga),vs=Ue(function(r,n,t){return n=n.toLowerCase(),r+(t?da(n):n)}),ys=Ue(function(r,n,t){return r+(t?"-":"")+n.toLowerCase()}),ds=Ue(function(r,n,t){return r+(t?" ":"")+n.toLowerCase()}),bs=Ne("toLowerCase"),ws=Ue(function(r,n,t){return r+(t?"_":"")+n.toLowerCase()}),ms=Ue(function(r,n,t){return r+(t?" ":"")+js(n)}),As=Ue(function(r,n,t){return r+(t?" ":"")+n.toUpperCase()}),js=Ne("toUpperCase"),xs=ne(function(r,n){try{return a(r,q,n)}catch(r){return Gi(r)?r:new Ba(r)}}),Vs=Xe(function(r,n){return o(n,function(n){n=Ai(n),Hn(r,n,Uu(r[n],r))}),r}),Es=Ce(),ks=Ce(!0),Is=ne(function(r,n){return function(t){return Vt(t,r,n)}}),Ss=ne(function(r,n){return function(t){return Vt(r,t,n)}}),Ts=Le(c),Bs=Le(u),Ns=Le(p),Us=De(),zs=De(!0),Ms=Re(function(r,n){return r+n},0),Cs=$e("ceil"),Os=Re(function(r,n){return r/n},1),qs=$e("floor"),Rs=Re(function(r,n){return r*n},1),Ls=$e("round"),Fs=Re(function(r,n){return r-n},0);return t.after=function(r,n){if("function"!=typeof n)throw new Oa(F);return r=ua(r),function(){if(--r<1)return n.apply(this,arguments)}},t.ary=Ri,t.assign=rs,t.assignIn=ns,t.assignInWith=ts,t.assignWith=es,t.at=is,t.before=Li,t.bind=Uu,t.bindAll=Vs,t.bindKey=zu,t.castArray=function(){if(!arguments.length)return[];var r=arguments[0];return Wu(r)?r:[r]},t.chain=zi,t.chunk=function(r,n,t){n=(t?ci(r,n,t):n===q)?1:bo(ua(n),0);var e=null==r?0:r.length;if(!e||n<1)return[];for(var i=0,a=0,o=Sa(co(e/n));ii?0:i+t),(e=e===q||e>i?i:ua(e))<0&&(e+=i),e=t>e?0:sa(e);t>>0)?(r=ca(r))&&("string"==typeof n||null!=n&&!Gu(n))&&!(n=se(n))&&B(r)?be(O(r),0,t):r.split(n,t):[]},t.spread=function(r,n){if("function"!=typeof r)throw new Oa(F);return n=null==n?0:bo(ua(n),0),ne(function(t){var e=t[n],i=be(t,0,n);return e&&h(i,e),a(r,this,i)})},t.tail=function(r){var n=null==r?0:r.length;return n?ee(r,1,n):[]},t.take=function(r,n,t){return r&&r.length?(n=t||n===q?1:ua(n),ee(r,0,n<0?0:n)):[]},t.takeRight=function(r,n,t){var e=null==r?0:r.length;return e?(n=t||n===q?1:ua(n),n=e-n,ee(r,n<0?0:n,e)):[]},t.takeRightWhile=function(r,n){return r&&r.length?he(r,ei(n,3),!1,!0):[]},t.takeWhile=function(r,n){return r&&r.length?he(r,ei(n,3)):[]},t.tap=function(r,n){return n(r),r},t.throttle=function(r,n,t){var e=!0,i=!0;if("function"!=typeof r)throw new Oa(F);return Qi(t)&&(e="leading"in t?!!t.leading:e,i="trailing"in t?!!t.trailing:i),Pi(r,n,{leading:e,maxWait:n,trailing:i})},t.thru=Mi,t.toArray=aa,t.toPairs=ps,t.toPairsIn=gs,t.toPath=function(r){return Wu(r)?c(r,Ai):ia(r)?[r]:Ee(au(ca(r)))},t.toPlainObject=fa,t.transform=function(r,n,t){var e=Wu(r),i=e||Yu(r)||Ku(r);if(n=ei(n,4),null==t){var a=r&&r.constructor;t=i?e?new a:[]:Qi(r)&&Ji(a)?Fo(ro(r)):{}}return(i?o:et)(r,function(r,e,i){return n(t,r,e,i)}),t},t.unary=function(r){return Ri(r,1)},t.union=pu,t.unionBy=gu,t.unionWith=vu,t.uniq=function(r){return r&&r.length?le(r):[]},t.uniqBy=function(r,n){return r&&r.length?le(r,ei(n,2)):[]},t.uniqWith=function(r,n){return n="function"==typeof n?n:q,r&&r.length?le(r,q,n):[]},t.unset=function(r,n){return null==r||fe(r,n)},t.unzip=Ni,t.unzipWith=Ui,t.update=function(r,n,t){return null==r?r:ce(r,n,ye(t))},t.updateWith=function(r,n,t,e){return e="function"==typeof e?e:q,null==r?r:ce(r,n,ye(t),e)},t.values=ya,t.valuesIn=function(r){return null==r?[]:E(r,ga(r))},t.without=yu,t.words=wa,t.wrap=function(r,n){return qu(ye(n),r)},t.xor=du,t.xorBy=bu,t.xorWith=wu,t.zip=mu,t.zipObject=function(r,n){return ge(r||[],n||[],Wn)},t.zipObjectDeep=function(r,n){return ge(r||[],n||[],te)},t.zipWith=Au,t.entries=ps,t.entriesIn=gs,t.extend=ns,t.extendWith=ts,xa(t,t),t.add=Ms,t.attempt=xs,t.camelCase=vs,t.capitalize=da,t.ceil=Cs,t.clamp=function(r,n,t){return t===q&&(t=n,n=q),t!==q&&(t=(t=la(t))==t?t:0),n!==q&&(n=(n=la(n))==n?n:0),Gn(la(r),n,t)},t.clone=function(r){return Jn(r,H)},t.cloneDeep=function(r){return Jn(r,$|H)},t.cloneDeepWith=function(r,n){return n="function"==typeof n?n:q,Jn(r,$|H,n)},t.cloneWith=function(r,n){return n="function"==typeof n?n:q,Jn(r,H,n)},t.conformsTo=function(r,n){return null==n||Kn(r,n,pa(n))},t.deburr=ba,t.defaultTo=function(r,n){return null==r||r!=r?n:r},t.divide=Os,t.endsWith=function(r,n,t){r=ca(r),n=se(n);var e=r.length,i=t=t===q?e:Gn(ua(t),0,e);return(t-=n.length)>=0&&r.slice(t,i)==n},t.eq=Yi,t.escape=function(r){return(r=ca(r))&&on.test(r)?r.replace(en,Mt):r},t.escapeRegExp=function(r){return(r=ca(r))&&gn.test(r)?r.replace(pn,"\\$&"):r},t.every=function(r,n,t){var e=Wu(r)?u:function(r,n){var t=!0;return Do(r,function(r,e,i){return t=!!n(r,e,i)}),t};return t&&ci(r,n,t)&&(n=q),e(r,ei(n,3))},t.find=Vu,t.findIndex=Vi,t.findKey=function(r,n){return g(r,ei(n,3),et)},t.findLast=Eu,t.findLastIndex=Ei,t.findLastKey=function(r,n){return g(r,ei(n,3),it)},t.floor=qs,t.forEach=Ci,t.forEachRight=Oi,t.forIn=function(r,n){return null==r?r:Wo(r,ei(n,3),ga)},t.forInRight=function(r,n){return null==r?r:$o(r,ei(n,3),ga)},t.forOwn=function(r,n){return r&&et(r,ei(n,3))},t.forOwnRight=function(r,n){return r&&it(r,ei(n,3))},t.get=ha,t.gt=Fu,t.gte=Du,t.has=function(r,n){return null!=r&&ui(r,n,wt)},t.hasIn=_a,t.head=Ii,t.identity=Aa,t.includes=function(r,n,t,e){r=Hi(r)?r:ya(r),t=t&&!e?ua(t):0;var i=r.length;return t<0&&(t=bo(i+t,0)),ea(r)?t<=i&&r.indexOf(n,t)>-1:!!i&&y(r,n,t)>-1},t.indexOf=function(r,n,t){var e=null==r?0:r.length;if(!e)return-1;var i=null==t?0:ua(t);return i<0&&(i=bo(e+i,0)),y(r,n,i)},t.inRange=function(r,n,t){return n=oa(n),t===q?(t=n,n=0):t=oa(t),r=la(r),function(r,n,t){return r>=wo(n,t)&&r=-_r&&r<=_r},t.isSet=Ju,t.isString=ea,t.isSymbol=ia,t.isTypedArray=Ku,t.isUndefined=function(r){return r===q},t.isWeakMap=function(r){return ra(r)&&ru(r)==Lr},t.isWeakSet=function(r){return ra(r)&&vt(r)==Fr},t.join=function(r,n){return null==r?"":vo.call(r,n)},t.kebabCase=ys,t.last=Si,t.lastIndexOf=function(r,n,t){var e=null==r?0:r.length;if(!e)return-1;var i=e;return t!==q&&(i=(i=ua(t))<0?bo(e+i,0):wo(i,e-1)),n==n?function(r,n,t){for(var e=i+1;e--;)if(r[e]===n)return e;return e}(r,n):v(r,d,i,!0)},t.lowerCase=ds,t.lowerFirst=bs,t.lt=Xu,t.lte=Qu,t.max=function(r){return r&&r.length?rt(r,Aa,bt):q},t.maxBy=function(r,n){return r&&r.length?rt(r,ei(n,2),bt):q},t.mean=function(r){return b(r,Aa)},t.meanBy=function(r,n){return b(r,ei(n,2))},t.min=function(r){return r&&r.length?rt(r,Aa,Pt):q},t.minBy=function(r,n){return r&&r.length?rt(r,ei(n,2),Pt):q},t.stubArray=ka,t.stubFalse=Ia,t.stubObject=function(){return{}},t.stubString=function(){return""},t.stubTrue=function(){return!0},t.multiply=Rs,t.nth=function(r,n){return r&&r.length?Zt(r,ua(n)):q},t.noConflict=function(){return mt._===this&&(mt._=Za),this},t.noop=Va,t.now=Nu,t.pad=function(r,n,t){r=ca(r);var e=(n=ua(n))?C(r):0;if(!n||e>=n)return r;var i=(n-e)/2;return Fe(ho(i),t)+r+Fe(co(i),t)},t.padEnd=function(r,n,t){r=ca(r);var e=(n=ua(n))?C(r):0;return n&&en){var e=r;r=n,n=e}if(t||r%1||n%1){var i=jo();return wo(r+i*(n-r+yt("1e-"+((i+"").length-1))),n)}return Qt(r,n)},t.reduce=function(r,n,t){var e=Wu(r)?_:A,i=arguments.length<3;return e(r,ei(n,4),t,i,Do)},t.reduceRight=function(r,n,t){var e=Wu(r)?function(r,n,t,e){var i=null==r?0:r.length;for(e&&i&&(t=r[--i]);i--;)t=n(t,r[i],i,r);return t}:A,i=arguments.length<3;return e(r,ei(n,4),t,i,Po)},t.repeat=function(r,n,t){return n=(t?ci(r,n,t):n===q)?1:ua(n),re(ca(r),n)},t.replace=function(){var r=arguments,n=ca(r[0]);return r.length<3?n:n.replace(r[1],r[2])},t.result=function(r,n,t){var e=-1,i=(n=de(n,r)).length;for(i||(i=1,r=q);++e_r)return[];var t=vr,e=wo(r,vr);n=ei(n),r-=vr;for(var i=x(e,n);++t=a)return r;var u=t-C(e);if(u<1)return e;var s=o?be(o,0,u).join(""):r.slice(0,u);if(i===q)return s+e;if(o&&(u+=s.length-u),Gu(i)){if(r.slice(u).search(i)){var l,f=s;for(i.global||(i=Ma(i.source,ca(Vn.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var c=l.index;s=s.slice(0,c===q?u:c)}}else if(r.indexOf(se(i),u)!=u){var h=s.lastIndexOf(i);h>-1&&(s=s.slice(0,h))}return s+e},t.unescape=function(r){return(r=ca(r))&&an.test(r)?r.replace(tn,Ct):r},t.uniqueId=function(r){var n=++Wa;return ca(r)+n},t.upperCase=As,t.upperFirst=js,t.each=Ci,t.eachRight=Oi,t.first=Ii,xa(t,function(){var r={};return et(t,function(n,e){Pa.call(t.prototype,e)||(r[e]=n)}),r}(),{chain:!1}),t.VERSION="4.17.4",o(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){t[r].placeholder=t}),o(["drop","take"],function(r,n){Mn.prototype[r]=function(t){t=t===q?1:bo(ua(t),0);var e=this.__filtered__&&!n?new Mn(this):this.clone();return e.__filtered__?e.__takeCount__=wo(t,e.__takeCount__):e.__views__.push({size:wo(t,vr),type:r+(e.__dir__<0?"Right":"")}),e},Mn.prototype[r+"Right"]=function(n){return this.reverse()[r](n).reverse()}}),o(["filter","map","takeWhile"],function(r,n){var t=n+1,e=t==fr||3==t;Mn.prototype[r]=function(r){var n=this.clone();return n.__iteratees__.push({iteratee:ei(r,3),type:t}),n.__filtered__=n.__filtered__||e,n}}),o(["head","last"],function(r,n){var t="take"+(n?"Right":"");Mn.prototype[r]=function(){return this[t](1).value()[0]}}),o(["initial","tail"],function(r,n){var t="drop"+(n?"":"Right");Mn.prototype[r]=function(){return this.__filtered__?new Mn(this):this[t](1)}}),Mn.prototype.compact=function(){return this.filter(Aa)},Mn.prototype.find=function(r){return this.filter(r).head()},Mn.prototype.findLast=function(r){return this.reverse().find(r)},Mn.prototype.invokeMap=ne(function(r,n){return"function"==typeof r?new Mn(this):this.map(function(t){return Vt(t,r,n)})}),Mn.prototype.reject=function(r){return this.filter($i(ei(r)))},Mn.prototype.slice=function(r,n){r=ua(r);var t=this;return t.__filtered__&&(r>0||n<0)?new Mn(t):(r<0?t=t.takeRight(-r):r&&(t=t.drop(r)),n!==q&&(t=(n=ua(n))<0?t.dropRight(-n):t.take(n-r)),t)},Mn.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},Mn.prototype.toArray=function(){return this.take(vr)},et(Mn.prototype,function(r,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),a=t[i?"take"+("last"==n?"Right":""):n],o=i||/^find/.test(n);a&&(t.prototype[n]=function(){var n=this.__wrapped__,u=i?[1]:arguments,s=n instanceof Mn,l=u[0],f=s||Wu(n),c=function(r){var n=a.apply(t,h([r],u));return i&&_?n[0]:n};f&&e&&"function"==typeof l&&1!=l.length&&(s=f=!1);var _=this.__chain__,p=!!this.__actions__.length,g=o&&!_,v=s&&!p;if(!o&&f){n=v?n:new Mn(this);var y=r.apply(n,u);return y.__actions__.push({func:Mi,args:[c],thisArg:q}),new zn(y,_)}return g&&v?r.apply(this,u):(y=this.thru(c),g?i?y.value()[0]:y.value():y)})}),o(["pop","push","shift","sort","splice","unshift"],function(r){var n=qa[r],e=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",i=/^(?:pop|shift)$/.test(r);t.prototype[r]=function(){var r=arguments;if(i&&!this.__chain__){var t=this.value();return n.apply(Wu(t)?t:[],r)}return this[e](function(t){return n.apply(Wu(t)?t:[],r)})}}),et(Mn.prototype,function(r,n){var e=t[n];if(e){var i=e.name+"";(No[i]||(No[i]=[])).push({name:n,func:e})}}),No[Oe(q,K).name]=[{name:"wrapper",func:q}],Mn.prototype.clone=function(){var r=new Mn(this.__wrapped__);return r.__actions__=Ee(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=Ee(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=Ee(this.__views__),r},Mn.prototype.reverse=function(){if(this.__filtered__){var r=new Mn(this);r.__dir__=-1,r.__filtered__=!0}else(r=this.clone()).__dir__*=-1;return r},Mn.prototype.value=function(){var r=this.__wrapped__.value(),n=this.__dir__,t=Wu(r),e=n<0,i=t?r.length:0,a=function(r,n,t){for(var e=-1,i=t.length;++e=this.__values__.length;return{done:r,value:r?q:this.__values__[this.__index__++]}},t.prototype.plant=function(r){for(var n,t=this;t instanceof m;){var e=xi(t);e.__index__=0,e.__values__=q,n?i.__wrapped__=e:n=e;var i=e;t=t.__wrapped__}return i.__wrapped__=r,n},t.prototype.reverse=function(){var r=this.__wrapped__;if(r instanceof Mn){var n=r;return this.__actions__.length&&(n=new Mn(this)),(n=n.reverse()).__actions__.push({func:Mi,args:[Bi],thisArg:q}),new zn(n,this.__chain__)}return this.thru(Bi)},t.prototype.toJSON=t.prototype.valueOf=t.prototype.value=function(){return _e(this.__wrapped__,this.__actions__)},t.prototype.first=t.prototype.head,ao&&(t.prototype[ao]=function(){return this}),t}();jt?((jt.exports=Ot)._=Ot,At._=Ot):mt._=Ot}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],13:[function(r,n,t){"use strict";var e=r("ndarray-ops"),i=r("ndarray"),a=r("typedarray-pool"),o=r("./lib/fft-matrix.js");n.exports=function(r,n,t){var u,s,l=n.shape,f=l.length,c=1,h=new Array(f),_=0;for(u=f-1;u>=0;--u)if(h[u]=c,c*=l[u],_=Math.max(_,o.scratchMemory(l[u])),n.shape[u]!==t.shape[u])throw new Error("Shape mismatch, real and imaginary arrays must have same size");var p,g=4*c+_;p="array"===n.dtype||"float64"===n.dtype||"custom"===n.dtype?a.mallocDouble(g):a.mallocFloat(g);var v,y,d,b,w=i(p,l.slice(0),h,0),m=i(p,l.slice(0),h.slice(0),c),A=i(p,l.slice(0),h.slice(0),2*c),j=i(p,l.slice(0),h.slice(0),3*c),x=4*c;for(e.assign(w,n),e.assign(m,t),u=f-1;u>=0&&(o(r,c/l[u],l[u],p,w.offset,m.offset,x),0!==u);--u){for(y=1,d=A.stride,b=j.stride,s=u-1;s=0;--s)b[s]=d[s]=y,y*=l[s];e.assign(A,w),e.assign(j,m),v=w,w=A,A=v,v=m,m=j,j=v}e.assign(n,w),e.assign(t,m),a.free(p)}},{"./lib/fft-matrix.js":14,ndarray:18,"ndarray-ops":17,"typedarray-pool":21}],14:[function(r,n,t){function e(r,n,t,e,a,o){r|=0,n|=0,a|=0,o|=0;var u,s,l,f,c,h,_,p,g,v,y,d,b,w,m,A,j,x,V,E,k,I,S,T;for(u=t|=0,s=i.log2(u),x=0;x>1,c=0,l=0;l>=1;c+=h}for(y=-1,d=0,v=1,p=0;p0;){","var w",g,"=",l,";","if(i",g,"<",l,"){","w",g,"=i",g,";","i",g,"=0;","}else{","i",g,"-=",l,";","}");f.push.apply(f,i(h,"o",r,"i0","i1","w1")),f.push("for(i=0;i>",rrshift:">>>"};!function(){for(var r in u){var n=u[r];t[r]=i({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+n+"c"},funcName:r}),t[r+"eq"]=i({args:["array","array"],body:{args:["a","b"],body:"a"+n+"=b"},rvalue:!0,funcName:r+"eq"}),t[r+"s"]=i({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+n+"s"},funcName:r+"s"}),t[r+"seq"]=i({args:["array","scalar"],body:{args:["a","s"],body:"a"+n+"=s"},rvalue:!0,funcName:r+"seq"})}}();var s={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var r in s){var n=s[r];t[r]=i({args:["array","array"],body:{args:["a","b"],body:"a="+n+"b"},funcName:r}),t[r+"eq"]=i({args:["array"],body:{args:["a"],body:"a="+n+"a"},rvalue:!0,count:2,funcName:r+"eq"})}}();var l={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var r in l){var n=l[r];t[r]=i({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+n+"c"},funcName:r}),t[r+"s"]=i({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+n+"s"},funcName:r+"s"}),t[r+"eq"]=i({args:["array","array"],body:{args:["a","b"],body:"a=a"+n+"b"},rvalue:!0,count:2,funcName:r+"eq"}),t[r+"seq"]=i({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+n+"s"},rvalue:!0,count:2,funcName:r+"seq"})}}();var f=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var r=0;rthis_s){this_s=-a}else if(a>this_s){this_s=a}",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norminf"}),t.norm1=a({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:3}],body:"this_s+=a<0?-a:a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm1"}),t.sup=a({args:["array"],pre:{body:"this_h=-Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_>this_h)this_h=_inline_1_arg0_",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_h"],localVars:[]},post:{body:"return this_h",args:[],thisVars:["this_h"],localVars:[]}}),t.inf=a({args:["array"],pre:{body:"this_h=Infinity",args:[],thisVars:["this_h"],localVars:[]},body:{body:"if(_inline_1_arg0_this_v){this_v=_inline_1_arg1_;for(var _inline_1_k=0;_inline_1_k<_inline_1_arg0_.length;++_inline_1_k){this_i[_inline_1_k]=_inline_1_arg0_[_inline_1_k]}}}",args:[{name:"_inline_1_arg0_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_i","this_v"],localVars:["_inline_1_k"]},post:{body:"{return this_i}",args:[],thisVars:["this_i"],localVars:[]}}),t.random=i({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),t.assign=i({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),t.assigns=i({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),t.equals=a({args:["array","array"],pre:o,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1},{name:"y",lvalue:!1,rvalue:!0,count:1}],body:"if(x!==y){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"equals"})},{"cwise-compiler":4}],18:[function(r,n,t){function e(r,n){return r[0]-n[0]}function i(){var r,n=this.stride,t=new Array(n.length);for(r=0;rMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===n&&a.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):a.push("ORDER})")),a.push("proto.set=function "+t+"_set("+s.join(",")+",v){"),e?a.push("return this.data.set("+f+",v)}"):a.push("return this.data["+f+"]=v}"),a.push("proto.get=function "+t+"_get("+s.join(",")+"){"),e?a.push("return this.data.get("+f+")}"):a.push("return this.data["+f+"]}"),a.push("proto.index=function "+t+"_index(",s.join(),"){return "+f+"}"),a.push("proto.hi=function "+t+"_hi("+s.join(",")+"){return new "+t+"(this.data,"+u.map(function(r){return["(typeof i",r,"!=='number'||i",r,"<0)?this.shape[",r,"]:i",r,"|0"].join("")}).join(",")+","+u.map(function(r){return"this.stride["+r+"]"}).join(",")+",this.offset)}");var _=u.map(function(r){return"a"+r+"=this.shape["+r+"]"}),p=u.map(function(r){return"c"+r+"=this.stride["+r+"]"});a.push("proto.lo=function "+t+"_lo("+s.join(",")+"){var b=this.offset,d=0,"+_.join(",")+","+p.join(","));for(y=0;y=0){d=i"+y+"|0;b+=c"+y+"*d;a"+y+"-=d}");a.push("return new "+t+"(this.data,"+u.map(function(r){return"a"+r}).join(",")+","+u.map(function(r){return"c"+r}).join(",")+",b)}"),a.push("proto.step=function "+t+"_step("+s.join(",")+"){var "+u.map(function(r){return"a"+r+"=this.shape["+r+"]"}).join(",")+","+u.map(function(r){return"b"+r+"=this.stride["+r+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(y=0;y=0){c=(c+this.stride["+y+"]*i"+y+")|0}else{a.push(this.shape["+y+"]);b.push(this.stride["+y+"])}");a.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),a.push("return function construct_"+t+"(data,shape,stride,offset){return new "+t+"(data,"+u.map(function(r){return"shape["+r+"]"}).join(",")+","+u.map(function(r){return"stride["+r+"]"}).join(",")+",offset)}");var d=new Function("CTOR_LIST","ORDER",a.join("\n"));return d(l[r],i)}var o=r("iota-array"),u=r("is-buffer"),s="undefined"!=typeof Float64Array,l={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};n.exports=function(r,n,t,e){if(void 0===r)return(_=l.array[0])([]);"number"==typeof r&&(r=[r]),void 0===n&&(n=[r.length]);var i=n.length;if(void 0===t){t=new Array(i);for(var o=i-1,f=1;o>=0;--o)t[o]=f,f*=n[o]}if(void 0===e)for(e=0,o=0;o=0;e--){var i=r[e];"."===i?r.splice(e,1):".."===i?(r.splice(e,1),t++):t&&(r.splice(e,1),t--)}if(n)for(;t--;t)r.unshift("..");return r}function e(r,n){if(r.filter)return r.filter(n);for(var t=[],e=0;e=-1&&!i;a--){var o=a>=0?arguments[a]:r.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,i="/"===o.charAt(0))}return t=n(e(t.split("/"),function(r){return!!r}),!i).join("/"),(i?"/":"")+t||"."},t.normalize=function(r){var i=t.isAbsolute(r),a="/"===o(r,-1);return(r=n(e(r.split("/"),function(r){return!!r}),!i).join("/"))||i||(r="."),r&&a&&(r+="/"),(i?"/":"")+r},t.isAbsolute=function(r){return"/"===r.charAt(0)},t.join=function(){var r=Array.prototype.slice.call(arguments,0);return t.normalize(e(r,function(r,n){if("string"!=typeof r)throw new TypeError("Arguments to path.join must be strings");return r}).join("/"))},t.relative=function(r,n){function e(r){for(var n=0;n=0&&""===r[t];t--);return n>t?[]:r.slice(n,t-n+1)}r=t.resolve(r).substr(1),n=t.resolve(n).substr(1);for(var i=e(r.split("/")),a=e(n.split("/")),o=Math.min(i.length,a.length),u=o,s=0;s1)for(var t=1;t0?t.pop():new ArrayBuffer(r)}function o(r){return new Uint8Array(a(r),0,r)}function u(r){return new Uint16Array(a(2*r),0,r)}function s(r){return new Uint32Array(a(4*r),0,r)}function l(r){return new Int8Array(a(r),0,r)}function f(r){return new Int16Array(a(2*r),0,r)}function c(r){return new Int32Array(a(4*r),0,r)}function h(r){return new Float32Array(a(4*r),0,r)}function _(r){return new Float64Array(a(8*r),0,r)}function p(r){return b?new Uint8ClampedArray(a(r),0,r):o(r)}function g(r){return new DataView(a(r),0,r)}function v(r){r=y.nextPow2(r);var n=y.log2(r),t=A[n];return t.length>0?t.pop():new e(r)}var y=r("bit-twiddle"),d=r("dup");n.__TYPEDARRAY_POOL||(n.__TYPEDARRAY_POOL={UINT8:d([32,0]),UINT16:d([32,0]),UINT32:d([32,0]),INT8:d([32,0]),INT16:d([32,0]),INT32:d([32,0]),FLOAT:d([32,0]),DOUBLE:d([32,0]),DATA:d([32,0]),UINT8C:d([32,0]),BUFFER:d([32,0])});var b="undefined"!=typeof Uint8ClampedArray,w=n.__TYPEDARRAY_POOL;w.UINT8C||(w.UINT8C=d([32,0])),w.BUFFER||(w.BUFFER=d([32,0]));var m=w.DATA,A=w.BUFFER;t.free=function(r){if(e.isBuffer(r))A[y.log2(r.length)].push(r);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(r)&&(r=r.buffer),!r)return;var n=r.length||r.byteLength,t=0|y.log2(n);m[t].push(r)}},t.freeUint8=t.freeUint16=t.freeUint32=t.freeInt8=t.freeInt16=t.freeInt32=t.freeFloat32=t.freeFloat=t.freeFloat64=t.freeDouble=t.freeUint8Clamped=t.freeDataView=function(r){i(r.buffer)},t.freeArrayBuffer=i,t.freeBuffer=function(r){A[y.log2(r.length)].push(r)},t.malloc=function(r,n){if(void 0===n||"arraybuffer"===n)return a(r);switch(n){case"uint8":return o(r);case"uint16":return u(r);case"uint32":return s(r);case"int8":return l(r);case"int16":return f(r);case"int32":return c(r);case"float":case"float32":return h(r);case"double":case"float64":return _(r);case"uint8_clamped":return p(r);case"buffer":return v(r);case"data":case"dataview":return g(r);default:return null}return null},t.mallocArrayBuffer=a,t.mallocUint8=o,t.mallocUint16=u,t.mallocUint32=s,t.mallocInt8=l,t.mallocInt16=f,t.mallocInt32=c,t.mallocFloat32=t.mallocFloat=h,t.mallocFloat64=t.mallocDouble=_,t.mallocUint8Clamped=p,t.mallocDataView=g,t.mallocBuffer=v,t.clearCache=function(){for(var r=0;r<32;++r)w.UINT8[r].length=0,w.UINT16[r].length=0,w.UINT32[r].length=0,w.INT8[r].length=0,w.INT16[r].length=0,w.INT32[r].length=0,w.FLOAT[r].length=0,w.DOUBLE[r].length=0,w.UINT8C[r].length=0,m[r].length=0,A[r].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},r("buffer").Buffer)},{"bit-twiddle":2,buffer:3,dup:8}],22:[function(r,n,t){"use strict";n.exports=function(r,n,t){return 0===r.length?r:n?(t||r.sort(n),function(r,n){for(var t=1,e=r.length,i=r[0],a=r[0],o=1;o>14}",args:[{name:"_inline_79_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_79_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_79_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_79_arg3_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"rgb2grayCwise",blockSize:64});n.exports=function(r){r instanceof e||(r=new e(r));var n=r.shape,t=n[0],o=n[1];if(1===(n[2]||1))return r;var u=[t,o],s=new e(new Uint8Array(i.shapeSize(u)),u),l=r.selection.pick(null,null,0),f=r.selection.pick(null,null,1),c=r.selection.pick(null,null,2);return a(s.selection,l,f,c),s}},{"../ndarray":42,"../utils":43,"cwise/lib/wrapper":7}],35:[function(r,n,t){"use strict";var e=r("../ndarray"),i=r("./rgb2gray"),a=r("cwise/lib/wrapper")({args:["array","array","index",{offset:[-1,-1],array:0},{offset:[-1,0],array:0},{offset:[0,-1],array:0}],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_70_arg0_=0!==_inline_70_arg2_[0]&&0!==_inline_70_arg2_[1]?_inline_70_arg1_+_inline_70_arg4_+_inline_70_arg5_-_inline_70_arg3_:0===_inline_70_arg2_[0]&&0===_inline_70_arg2_[1]?_inline_70_arg1_:0===_inline_70_arg2_[0]?_inline_70_arg1_+_inline_70_arg5_:_inline_70_arg1_+_inline_70_arg4_}",args:[{name:"_inline_70_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_70_arg1_",lvalue:!1,rvalue:!0,count:4},{name:"_inline_70_arg2_",lvalue:!1,rvalue:!0,count:5},{name:"_inline_70_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_70_arg4_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_70_arg5_",lvalue:!1,rvalue:!0,count:2}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"doIntegrateBody",blockSize:64});n.exports=function(r){var n=i(r),t=n.shape,o=t[0],u=t[1],s=new e(new Uint32Array(o*u),[o,u]);return a(s.selection,n.selection),s}},{"../ndarray":42,"./rgb2gray":34,"cwise/lib/wrapper":7}],36:[function(r,n,t){"use strict";var e=r("./utils"),i=r("../errors");n.exports=function(r,n){var t=r.shape,a=t[0],o=t[1];if(!(n instanceof HTMLCanvasElement))throw new i.ValueError("expect input to be either an HTML Canvas or a (loaded) Image");var u=document.createElement("canvas");u.height=a,u.width=o;var s=u.getContext("2d"),l=s.createImageData(o,a),f=e.setRawData(r.selection,l.data);if(f)throw f;s.putImageData(l,0,0),s.drawImage(u,o,a),n.getContext("2d").drawImage(u,0,0,o,a,0,0,n.width,n.height)}},{"../errors":25,"./utils":40}],37:[function(r,n,t){"use strict";var e=r("ndarray-ops"),i=r("../ndarray"),a=r("../utils"),o=r("./rgb2gray"),u=r("cwise/lib/wrapper")({args:["array","array",{offset:[-1,-1],array:1},{offset:[-1,0],array:1},{offset:[-1,1],array:1},{offset:[0,-1],array:1},{offset:[0,1],array:1},{offset:[1,-1],array:1},{offset:[1,0],array:1},{offset:[1,1],array:1}],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{var _inline_76_q=3*_inline_76_arg2_+10*_inline_76_arg3_+3*_inline_76_arg4_-3*_inline_76_arg7_-10*_inline_76_arg8_-3*_inline_76_arg9_,_inline_76_s=3*_inline_76_arg2_-3*_inline_76_arg4_+10*_inline_76_arg5_-10*_inline_76_arg6_+3*_inline_76_arg7_-3*_inline_76_arg9_;_inline_76_arg0_=Math.sqrt(_inline_76_s*_inline_76_s+_inline_76_q*_inline_76_q)}",args:[{name:"_inline_76_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_76_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_76_arg2_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_76_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_76_arg4_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_76_arg5_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_76_arg6_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_76_arg7_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_76_arg8_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_76_arg9_",lvalue:!1,rvalue:!0,count:2}],thisVars:[],localVars:["_inline_76_q","_inline_76_s"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"doSobelBody",blockSize:64});n.exports=function(r){var n=o(r),t=n.shape,s=t[0],l=t[1],f=new i(new Float32Array(a.shapeSize(t)),t);return u(f.selection,n.selection),e.assigns(f.selection.pick(0,null),0),e.assigns(f.selection.pick(null,0),0),e.assigns(f.selection.pick(s-1,null),0),e.assigns(f.selection.pick(null,l-1),0),f.divide(16*Math.sqrt(2),!1)}},{"../ndarray":42,"../utils":43,"./rgb2gray":34,"cwise/lib/wrapper":7,"ndarray-ops":17}],38:[function(r,n,t){"use strict";var e=r("ndarray-ops"),i=r("../ndarray"),a=r("../utils"),o=r("./rgb2gray"),u=r("cwise/lib/wrapper")({args:["array","array",{offset:[-1,-1],array:1},{offset:[-1,0],array:1},{offset:[-1,1],array:1},{offset:[0,-1],array:1},{offset:[0,1],array:1},{offset:[1,-1],array:1},{offset:[1,0],array:1},{offset:[1,1],array:1}],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{var _inline_73_q=_inline_73_arg2_+2*_inline_73_arg3_+_inline_73_arg4_-_inline_73_arg7_-2*_inline_73_arg8_-_inline_73_arg9_,_inline_73_s=_inline_73_arg2_-_inline_73_arg4_+2*_inline_73_arg5_-2*_inline_73_arg6_+_inline_73_arg7_-_inline_73_arg9_;_inline_73_arg0_=Math.sqrt(_inline_73_s*_inline_73_s+_inline_73_q*_inline_73_q)}",args:[{name:"_inline_73_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_73_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_73_arg2_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_73_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_73_arg4_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_73_arg5_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_73_arg6_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_73_arg7_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_73_arg8_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_73_arg9_",lvalue:!1,rvalue:!0,count:2}],thisVars:[],localVars:["_inline_73_q","_inline_73_s"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"doSobelBody",blockSize:64});n.exports=function(r){var n=o(r),t=n.shape,s=t[0],l=t[1],f=new i(new Float32Array(a.shapeSize(t)),t);return u(f.selection,n.selection),e.assigns(f.selection.pick(0,null),0),e.assigns(f.selection.pick(null,0),0),e.assigns(f.selection.pick(s-1,null),0),e.assigns(f.selection.pick(null,l-1),0),f.divide(4*Math.sqrt(2),!1)}},{"../ndarray":42,"../utils":43,"./rgb2gray":34,"cwise/lib/wrapper":7,"ndarray-ops":17}],39:[function(r,n,t){"use strict";var e=r("../ndarray"),i=r("./rgb2gray"),a=r("cwise/lib/wrapper")({args:["array","array","index",{offset:[-1,-1],array:0},{offset:[-1,0],array:0},{offset:[0,-1],array:0}],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_67_arg0_=0!==_inline_67_arg2_[0]&&0!==_inline_67_arg2_[1]?_inline_67_arg1_*_inline_67_arg1_+_inline_67_arg4_+_inline_67_arg5_-_inline_67_arg3_:0===_inline_67_arg2_[0]&&0===_inline_67_arg2_[1]?_inline_67_arg1_*_inline_67_arg1_:0===_inline_67_arg2_[0]?_inline_67_arg1_*_inline_67_arg1_+_inline_67_arg5_:_inline_67_arg1_*_inline_67_arg1_+_inline_67_arg4_}",args:[{name:"_inline_67_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_67_arg1_",lvalue:!1,rvalue:!0,count:8},{name:"_inline_67_arg2_",lvalue:!1,rvalue:!0,count:5},{name:"_inline_67_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_67_arg4_",lvalue:!1,rvalue:!0,count:2},{name:"_inline_67_arg5_",lvalue:!1,rvalue:!0,count:2}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"doIntegrateBody",blockSize:64});n.exports=function(r){var n=i(r),t=n.shape,o=t[0],u=t[1],s=new e(new Uint32Array(o*u),[o,u]);return a(s.selection,n.selection),s}},{"../ndarray":42,"./rgb2gray":34,"cwise/lib/wrapper":7}],40:[function(r,n,t){"use strict";var e=r("../ndarray");n.exports.getRawData=function(r){r instanceof e&&(r=r.selection);var n,t,i=0,a=r.shape,o=a[0],u=a[1],s=a[2]||1,l=new Uint8Array(o*u*s);if(3===r.shape.length)if(3===s)for(n=0;n=0&&(r=[r]);var t=v.shapeSize(r),e=v.getType(n),i=new g(new e(t),r);return"array"===i.dtype&&c.assigns(i.selection,0),i}function o(r,n){v.isNumber(r)&&r>=0&&(r=[r]);var t=v.shapeSize(r),e=v.getType(n),i=new g(new e(t),r);return c.assigns(i.selection,1),i}function u(r){var n=r instanceof g?r.clone():g.new(r);return c.abseq(n.selection),n}function s(r){arguments.length>1&&(r=[].slice.call(arguments));var n,t;for(n=0;n30?1:1/(1+Math.exp(-1*_inline_43_arg1_*_inline_43_arg0_))}",args:[{name:"_inline_43_arg0_",lvalue:!0,rvalue:!0,count:4},{name:"_inline_43_arg1_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"sigmoidCwise",blockSize:64}),b=r("cwise/lib/wrapper")({args:["array","scalar","scalar"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_46_arg0_=Math.min(Math.max(_inline_46_arg1_,_inline_46_arg0_),_inline_46_arg2_)}",args:[{name:"_inline_46_arg0_",lvalue:!0,rvalue:!0,count:2},{name:"_inline_46_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_46_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"clipCwise",blockSize:64}),w=r("cwise/lib/wrapper")({args:["array","scalar"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_49_arg0_=Math.max(_inline_49_arg1_*_inline_49_arg0_,_inline_49_arg0_)}",args:[{name:"_inline_49_arg0_",lvalue:!0,rvalue:!0,count:3},{name:"_inline_49_arg1_",lvalue:!1,rvalue:!0,count:1}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"leakyReluCwise",blockSize:64}),m=r("cwise/lib/wrapper")({args:["array"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{_inline_52_arg0_=(Math.exp(2*_inline_52_arg0_)-1)/(Math.exp(2*_inline_52_arg0_)+1)}",args:[{name:"_inline_52_arg0_",lvalue:!0,rvalue:!0,count:3}],thisVars:[],localVars:[]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"tanhCwise",blockSize:64});n.exports={config:_,dtypes:p,NdArray:g,ndarray:f,array:g.new,arange:i,reshape:function(r,n){return g.new(r).reshape(n)},zeros:a,ones:o,empty:function(r,n){v.isNumber(r)&&r>=0&&(r=[r]);var t=v.shapeSize(r),e=v.getType(n);return new g(new e(t),r)},flatten:function(r){return g.new(r).flatten()},flip:l,random:function(r){if(0===arguments.length)return g.new(Math.random());r=1===arguments.length?v.isNumber(r)?[0|r]:r:[].slice.call(arguments);var n=v.shapeSize(r),t=new g(new Float64Array(n),r);return c.random(t.selection),t},softmax:function(r){var n=g.new(r).exp(),t=n.sum();return c.divseq(n.selection,t),n},sigmoid:function(r,n){return r=g.new(r).clone(),n=n||1,d(r.selection,n),r},leakyRelu:function(r,n){n=n||.001;var t=r instanceof g?r.clone():g.new(r);return w(t.selection,n),t},abs:u,arccos:function(r){var n=r instanceof g?r.clone():g.new(r);return c.acoseq(n.selection),n},arcsin:function(r){var n=r instanceof g?r.clone():g.new(r);return c.asineq(n.selection),n},arctan:function(r){var n=r instanceof g?r.clone():g.new(r);return c.ataneq(n.selection),n},cos:function(r){var n=r instanceof g?r.clone():g.new(r);return c.coseq(n.selection),n},sin:function(r){var n=r instanceof g?r.clone():g.new(r);return c.sineq(n.selection),n},tan:function(r){var n=r instanceof g?r.clone():g.new(r);return c.taneq(n.selection),n},tanh:function(r){var n=r instanceof g?r.clone():g.new(r);return m(n.selection),n},clip:function(r,n,t){1===arguments.length?(n=0,t=1):2===arguments.length&&(t=1);var e=r instanceof g?r.clone():g.new(r);return b(e.selection,n,t),e},exp:function(r){return g.new(r).exp()},log:function(r){return g.new(r).log()},sqrt:function(r){return g.new(r).sqrt()},power:function(r,n){return g.new(r).pow(n)},sum:function(r){return g.new(r).sum()},mean:function(r){return g.new(r).mean()},std:function(r,n){return g.new(r).std(n)},dot:function(r,n){return g.new(r).dot(n)},add:function(r,n){return g.new(r).add(n)},subtract:function(r,n){return g.new(r).subtract(n)},multiply:function(r,n){return g.new(r).multiply(n)},divide:function(r,n){return g.new(r).divide(n)},negative:function(r){return g.new(r).negative()},equal:function(r,n){return g.new(r).equal(n)},max:function(r){return g.new(r).max()},min:function(r){return g.new(r).min()},concatenate:s,transpose:e,errors:y,broadcast:function(r,n){if(0!==r.length&&0!==n.length){for(var t=r.slice().reverse(),e=n.slice().reverse(),i=Math.max(r.length,n.length),a=new Array(i),o=0;o1&&(r=p.flatten(r,!0)),r instanceof t||(r=new t(r)),new g(r,e)}function i(r,n){var t=0|r[n=n||0];if(t<=0)return[];var e,a=new Array(t);if(n===r.length-1)for(e=0;e1&&(r=[].slice.call(arguments)),r.filter(function(r){return-1===r}).length>1)throw new _.ValueError("can only specify one unknown dimension");var n=p.shapeSize(r);if(r=r.map(function(r){return-1===r?-1*this.size/n:r}.bind(this)),this.size!==p.shapeSize(r))throw new _.ValueError("total size of new array must be unchanged");var t,e,i,a,o=this.selection.shape,u=this.selection.offset,s=this.selection.stride,l=o.length,f=r.length;if(l===f){var c=!0;for(i=0;i=0;--i)t[i]=a,a*=r[i];for(e=u,i=0;i1&&(r=arguments);return new g(this.selection.transpose.apply(this.selection,r))},g.prototype.dot=function(r){r=r instanceof g?r:e(r,this.dtype);var n=this.shape,t=r.shape;if(2===n.length&&2===t.length&&n[1]===t[0]){var i=p.getType(this.dtype),a=new g(new i(n[0]*t[1]),[n[0],t[1]]);return l(a.selection,this.selection,r.selection),a}if(1===n.length&&2===t.length&&n[0]===t[0])return this.reshape([n[0],1]).T.dot(r).reshape(t[1]);if(2===n.length&&1===t.length&&n[1]===t[0])return this.dot(r.reshape([t[0],1])).reshape(n[0]);if(1===n.length&&1===t.length&&n[0]===t[0])return this.reshape([n[0],1]).T.dot(r.reshape([t[0],1])).reshape([1]);throw new _.ValueError("cannot compute the matrix product of given arrays")},g.prototype.assign=function(r,n){1===arguments.length&&(n=!0);var t=n?this.clone():this;return p.isNumber(r)?(s.assigns(t.selection,r),t):(r=e(r,this.dtype),s.assign(t.selection,r.selection),t)},g.prototype.add=function(r,n){1===arguments.length&&(n=!0);var t=n?this.clone():this;return p.isNumber(r)?(s.addseq(t.selection,r),t):(r=e(r,this.dtype),s.addeq(t.selection,r.selection),t)},g.prototype.subtract=function(r,n){1===arguments.length&&(n=!0);var t=n?this.clone():this;return p.isNumber(r)?(s.subseq(t.selection,r),t):(r=e(r,this.dtype),s.subeq(t.selection,r.selection),t)},g.prototype.multiply=function(r,n){1===arguments.length&&(n=!0);var t=n?this.clone():this;return p.isNumber(r)?(s.mulseq(t.selection,r),t):(r=e(r,this.dtype),s.muleq(t.selection,r.selection),t)},g.prototype.divide=function(r,n){1===arguments.length&&(n=!0);var t=n?this.clone():this;return p.isNumber(r)?(s.divseq(t.selection,r),t):(r=e(r,this.dtype),s.diveq(t.selection,r.selection),t)},g.prototype.pow=function(r,n){1===arguments.length&&(n=!0);var t=n?this.clone():this;return p.isNumber(r)?(s.powseq(t.selection,r),t):(r=e(r,this.dtype),s.poweq(t.selection,r.selection),t)},g.prototype.exp=function(r){0===arguments.length&&(r=!0);var n=r?this.clone():this;return s.expeq(n.selection),n},g.prototype.log=function(r){0===arguments.length&&(r=!0);var n=r?this.clone():this;return s.logeq(n.selection),n},g.prototype.sqrt=function(r){0===arguments.length&&(r=!0);var n=r?this.clone():this;return s.sqrteq(n.selection),n},g.prototype.max=function(){return 0===this.selection.size?null:s.sup(this.selection)},g.prototype.min=function(){return 0===this.selection.size?null:s.inf(this.selection)},g.prototype.sum=function(){return s.sum(this.selection)},g.prototype.std=function(r){r=p.defaults(r,{ddof:0});var n=this.clone();s.powseq(n.selection,2);var t=this.mean(),e=p.shapeSize(this.shape),i=s.sum(n.selection)/(e-r.ddof)-t*t*e/(e-r.ddof);return i>0?Math.sqrt(Math.abs(i)):0},g.prototype.mean=function(){return s.sum(this.selection)/p.shapeSize(this.shape)},g.prototype.tolist=function(){return a(this.selection)},g.prototype.valueOf=function(){return this.tolist()},g.prototype.toString=function(){function r(t,e){if(p.isString(e))return e;if(p.isNumber(e)){var i=o(e);return new Array(Math.max(0,n-i.length+2)).join(" ")+i}t=t||0;var a,u=h.printThreshold,s=u/2|0;return a=e.length>u?[].concat(e.slice(0,s),[" ..."],e.slice(e.length-s)):e,new Array(t+1).join(" ")+"["+a.map(function(n,e){return r(0===e&&0===t?1:t+1,n)}).join(",")+"]"}var n=o(this.max()).length,t=/\[\s+\[/g,e=JSON.stringify(this.tolist(),r).replace(/\]\,(\s*)\[/g,"],\n$1 [").replace(t,"[[").replace(t,"[[").replace(/\]\,(\s+)...\,(\s+)\[/g,"],\n$2 ...\n$2 [").slice(2,-1);switch(this.dtype){case"array":return"array(["+e+")";default:return"array(["+e+", dtype="+this.dtype+")"}},g.prototype.inspect=g.prototype.toString,g.prototype.toJSON=function(){return JSON.stringify(this.tolist())},g.prototype.clone=function(){var r=this.selection;return new g(void 0===r.data.slice?u([].slice.apply(r.data),r.shape,r.stride,r.offset):u(r.data.slice(),r.shape,r.stride,r.offset))},g.prototype.equal=function(r){if(r=e(r),this.size!==r.size||this.ndim!==r.ndim)return!1;for(var n=this.ndim,t=0;tt.length-1)throw new _.ValueError("invalid axis");for(var i=0;i=0;--n)l[n]=t.shape[n],o[n]=a,a*=l[n],h[n]=t.shape[n]-e.shape[n]+1;var y=p.getType(t.dtype),d=new g(new y(p.shapeSize(h)),h),b=d.selection,w=c.mallocDouble(a),m=u(w,l,o,0);s.assigns(m,0),s.assign(m.hi.apply(m,t.shape),t);var A=c.mallocDouble(a),j=u(A,l,o,0);s.assigns(j,0),f(1,m,j);var x=c.mallocDouble(a),V=u(x,l,o,0);s.assigns(V,0),s.assign(V.hi.apply(V,e.shape),e);var E=c.mallocDouble(a),k=u(E,l,o,0);s.assigns(k,0),f(1,V,k),v(m,j,V,k),f(-1,m,j);var I=new Array(i),S=new Array(i),T=!1;for(n=0;nl[n]&&(T=!0),S[n]=e.shape[n]-1,I[n]=Math.min(b.shape[n],l[n]-S[n]);var B;return T&&s.assign(b,0),B=m.lo.apply(m,S),B=B.hi.apply(B,I),s.assign(b.hi.apply(b,I),B),c.freeDouble(w),c.freeDouble(A),c.freeDouble(x),c.freeDouble(E),d},g.new=e,n.exports=g;var b=r("cwise/lib/wrapper")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{var _inline_64_a,_inline_64_e=_inline_64_arg1_;for(_inline_64_a=0;_inline_64_a<_inline_64_arg2_.length-1;++_inline_64_a)_inline_64_e=_inline_64_e[_inline_64_arg2_[_inline_64_a]];_inline_64_e[_inline_64_arg2_[_inline_64_arg2_.length-1]]=_inline_64_arg0_}",args:[{name:"_inline_64_arg0_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_64_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_64_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_64_a","_inline_64_e"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"unpackCwise",blockSize:64})},{"./config":23,"./errors":25,"./utils":43,"cwise/lib/wrapper":7,ndarray:18,"ndarray-fft":13,"ndarray-gemm":15,"ndarray-ops":17,"typedarray-pool":21}],43:[function(r,n,t){"use strict";function e(r){return"number"==typeof r}function i(r){return"function"==typeof r}function a(r,n,t){t=t||[];for(var i=-1,o=r.length;++i