mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-24 09:10:03 +01:00
* implement basic toString() Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * refactor Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * remove load-image from string Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * more refactor Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * doing es5 way Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * final refactor Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * refactor Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * remove if else from map Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * fix function call Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * add sequencer.steps Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * add tests for toString and stepToString Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * fix toString final Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * fix build failing Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * refactored and fix tests Signed-off-by: tech4GT <varun.gupta1798@gmail.com> * refactor tests Signed-off-by: tech4GT <varun.gupta1798@gmail.com>
1 line
451 KiB
JavaScript
1 line
451 KiB
JavaScript
!function(){return function t(e,n,r){function i(o,s){if(!n[o]){if(!e[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[o]={exports:{}};e[o][0].call(c.exports,function(t){return i(e[o][1][t]||t)},c,c.exports,t,e,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}}()({1:[function(t,e,n){"use strict";n.byteLength=function(t){var e=l(t),n=e[0],r=e[1];return 3*(n+r)/4-r},n.toByteArray=function(t){for(var e,n=l(t),r=n[0],o=n[1],s=new a(function(t,e,n){return 3*(e+n)/4-n}(0,r,o)),u=0,c=o>0?r-4:r,f=0;f<c;f+=4)e=i[t.charCodeAt(f)]<<18|i[t.charCodeAt(f+1)]<<12|i[t.charCodeAt(f+2)]<<6|i[t.charCodeAt(f+3)],s[u++]=e>>16&255,s[u++]=e>>8&255,s[u++]=255&e;2===o&&(e=i[t.charCodeAt(f)]<<2|i[t.charCodeAt(f+1)]>>4,s[u++]=255&e);1===o&&(e=i[t.charCodeAt(f)]<<10|i[t.charCodeAt(f+1)]<<4|i[t.charCodeAt(f+2)]>>2,s[u++]=e>>8&255,s[u++]=255&e);return s},n.fromByteArray=function(t){for(var e,n=t.length,i=n%3,a=[],o=0,s=n-i;o<s;o+=16383)a.push(c(t,o,o+16383>s?s:o+16383));1===i?(e=t[n-1],a.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],a.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return a.join("")};for(var r=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s<u;++s)r[s]=o[s],i[o.charCodeAt(s)]=s;function l(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,n){for(var i,a,o=[],s=e;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),o.push(r[(a=i)>>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],2:[function(t,e,n){"use strict";"use restrict";function r(t){var e=32;return(t&=-t)&&e--,65535&t&&(e-=16),16711935&t&&(e-=8),252645135&t&&(e-=4),858993459&t&&(e-=2),1431655765&t&&(e-=1),e}n.INT_BITS=32,n.INT_MAX=2147483647,n.INT_MIN=-1<<31,n.sign=function(t){return(t>0)-(t<0)},n.abs=function(t){var e=t>>31;return(t^e)-e},n.min=function(t,e){return e^(t^e)&-(t<e)},n.max=function(t,e){return t^(t^e)&-(t<e)},n.isPow2=function(t){return!(t&t-1||!t)},n.log2=function(t){var e,n;return e=(t>65535)<<4,e|=n=((t>>>=e)>255)<<3,e|=n=((t>>>=n)>15)<<2,(e|=n=((t>>>=n)>3)<<1)|(t>>>=n)>>1},n.log10=function(t){return t>=1e9?9:t>=1e8?8:t>=1e7?7:t>=1e6?6:t>=1e5?5:t>=1e4?4:t>=1e3?3:t>=100?2:t>=10?1:0},n.popCount=function(t){return 16843009*((t=(858993459&(t-=t>>>1&1431655765))+(t>>>2&858993459))+(t>>>4)&252645135)>>>24},n.countTrailingZeros=r,n.nextPow2=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1},n.prevPow2=function(t){return t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)-(t>>>1)},n.parity=function(t){return t^=t>>>16,t^=t>>>8,t^=t>>>4,27030>>>(t&=15)&1};var i=new Array(256);!function(t){for(var e=0;e<256;++e){var n=e,r=e,i=7;for(n>>>=1;n;n>>>=1)r<<=1,r|=1&n,--i;t[e]=r<<i&255}}(i),n.reverse=function(t){return i[255&t]<<24|i[t>>>8&255]<<16|i[t>>>16&255]<<8|i[t>>>24&255]},n.interleave2=function(t,e){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))<<1},n.deinterleave2=function(t,e){return(t=65535&((t=16711935&((t=252645135&((t=858993459&((t=t>>>e&1431655765)|t>>>1))|t>>>2))|t>>>4))|t>>>16))<<16>>16},n.interleave3=function(t,e,n){return t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2),(t|=(e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},n.deinterleave3=function(t,e){return(t=1023&((t=4278190335&((t=251719695&((t=3272356035&((t=t>>>e&1227133513)|t>>>2))|t>>>4))|t>>>8))|t>>>16))<<22>>22},n.nextCombination=function(t){var e=t|t-1;return e+1|(~e&-~e)-1>>>r(t)+1}},{}],3:[function(t,e,n){},{}],4:[function(t,e,n){"use strict";var r=t("base64-js"),i=t("ieee754");n.Buffer=s,n.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},n.INSPECT_MAX_BYTES=50;var a=2147483647;function o(t){if(t>a)throw new RangeError("Invalid typed array length");var e=new Uint8Array(t);return e.__proto__=s.prototype,e}function s(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return c(t)}return u(t,e,n)}function u(t,e,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return U(t)?function(t,e,n){if(e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");var r;r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n);return r.__proto__=s.prototype,r}(t,e,n):"string"==typeof t?function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!s.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(t,e),r=o(n),i=r.write(t,e);i!==n&&(r=r.slice(0,i));return r}(t,e):function(t){if(s.isBuffer(t)){var e=0|h(t.length),n=o(e);return 0===n.length?n:(t.copy(n,0,0,e),n)}if(t){if(N(t)||"length"in t)return"number"!=typeof t.length||q(t.length)?o(0):f(t);if("Buffer"===t.type&&Array.isArray(t.data))return f(t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t){return l(t),o(t<0?0:0|h(t))}function f(t){for(var e=t.length<0?0:0|h(t.length),n=o(e),r=0;r<e;r+=1)n[r]=255&t[r];return n}function h(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function p(t,e){if(s.isBuffer(t))return t.length;if(N(t)||U(t))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 O(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(t).length;default:if(r)return O(t).length;e=(""+e).toLowerCase(),r=!0}}function d(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function g(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),q(n=+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=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,i){var a,o=1,s=t.length,u=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;o=2,s/=2,u/=2,n/=2}function l(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var c=-1;for(a=n;a<s;a++)if(l(t,a)===l(e,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===u)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(n+u>s&&(n=s-u),a=n;a>=0;a--){for(var f=!0,h=0;h<u;h++)if(l(t,a+h)!==l(e,h)){f=!1;break}if(f)return a}return-1}function m(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(e.substr(2*o,2),16);if(q(s))return o;t[n+o]=s}return o}function _(t,e,n,r){return P(O(e,t.length-n),t,n,r)}function w(t,e,n,r){return P(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function b(t,e,n,r){return w(t,e,n,r)}function y(t,e,n,r){return P(F(e),t,n,r)}function x(t,e,n,r){return P(function(t,e){for(var n,r,i,a=[],o=0;o<t.length&&!((e-=2)<0);++o)n=t.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}(e,t.length-n),t,n,r)}function k(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var a,o,s,u,l=t[i],c=null,f=l>239?4:l>223?3:l>191?2:1;if(i+f<=n)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(a=t[i+1]))&&(u=(31&l)<<6|63&a)>127&&(c=u);break;case 3:a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&(u=(15&l)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),i+=f}return function(t){var e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=S));return n}(r)}n.kMaxLength=a,s.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),s.TYPED_ARRAY_SUPPORT||"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&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),s.poolSize=8192,s.from=function(t,e,n){return u(t,e,n)},s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,s.alloc=function(t,e,n){return function(t,e,n){return l(t),t<=0?o(t):void 0!==e?"string"==typeof n?o(t).fill(e,n):o(t).fill(e):o(t)}(t,e,n)},s.allocUnsafe=function(t){return c(t)},s.allocUnsafeSlow=function(t){return c(t)},s.isBuffer=function(t){return null!=t&&!0===t._isBuffer},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,a=Math.min(n,r);i<a;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=s.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var a=t[n];if(!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)d(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)d(this,e,e+3),d(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)d(this,e,e+7),d(this,e+1,e+6),d(this,e+2,e+5),d(this,e+3,e+4);return this},s.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?E(this,0,t):function(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 T(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return A(this,e,n);case"latin1":case"binary":return M(this,e,n);case"base64":return k(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",e=n.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,e,n,r,i){if(!s.isBuffer(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(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var a=i-r,o=n-e,u=Math.min(a,o),l=this.slice(r,i),c=t.slice(e,n),f=0;f<u;++f)if(l[f]!==c[f]){a=l[f],o=c[f];break}return a<o?-1:o<a?1:0},s.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},s.prototype.indexOf=function(t,e,n){return g(this,t,e,n,!0)},s.prototype.lastIndexOf=function(t,e,n){return g(this,t,e,n,!1)},s.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(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 a=!1;;)switch(r){case"hex":return m(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return b(this,t,e,n);case"base64":return y(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(a)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),a=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var S=4096;function A(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function M(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function T(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",a=e;a<n;++a)i+=z(t[a]);return i}function I(t,e,n){for(var r=t.slice(e,n),i="",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function j(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,n,r,i,a){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<a)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function L(t,e,n,r,i,a){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function C(t,e,n,r,a){return e=+e,n>>>=0,a||L(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function B(t,e,n,r,a){return e=+e,n>>>=0,a||L(t,0,n,8),i.write(t,e,n,r,52,8),n+8}s.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,t<0?(t+=n)<0&&(t=0):t>n&&(t=n),e<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);var r=this.subarray(t,e);return r.__proto__=s.prototype,r},s.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||j(t,e,this.length);for(var r=this[t],i=1,a=0;++a<e&&(i*=256);)r+=this[t+a]*i;return r},s.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||j(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},s.prototype.readUInt8=function(t,e){return t>>>=0,e||j(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return t>>>=0,e||j(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return t>>>=0,e||j(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return t>>>=0,e||j(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||j(t,e,this.length);for(var r=this[t],i=1,a=0;++a<e&&(i*=256);)r+=this[t+a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||j(t,e,this.length);for(var r=e,i=1,a=this[t+--r];r>0&&(i*=256);)a+=this[t+--r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},s.prototype.readInt8=function(t,e){return t>>>=0,e||j(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){t>>>=0,e||j(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){t>>>=0,e||j(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return t>>>=0,e||j(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return t>>>=0,e||j(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return t>>>=0,e||j(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return t>>>=0,e||j(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return t>>>=0,e||j(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return t>>>=0,e||j(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e>>>=0,n>>>=0,r)||R(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,a=0;for(this[e]=255&t;++a<n&&(i*=256);)this[e+a]=t/i&255;return e+n},s.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e>>>=0,n>>>=0,r)||R(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+n},s.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,1,255,0),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a<n&&(o*=256);)t<0&&0===s&&0!==this[e+a-1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){var i=Math.pow(2,8*n-1);R(this,t,e,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[e+a]=255&t;--a>=0&&(o*=256);)t<0&&0===s&&0!==this[e+a+1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},s.prototype.writeFloatLE=function(t,e,n){return C(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return C(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return B(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return B(this,t,e,!1,n)},s.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<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=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<r-n&&(r=t.length-e+n);var i,a=r-n;if(this===t&&n<e&&e<r)for(i=a-1;i>=0;--i)t[i+e]=this[i+n];else if(a<1e3)for(i=0;i<a;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+a),e);return a},s.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var a;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(a=e;a<n;++a)this[a]=t;else{var o=s.isBuffer(t)?t:new s(t,r),u=o.length;for(a=0;a<n-e;++a)this[a+e]=o[a%u]}return this};var D=/[^+/0-9A-Za-z-_]/g;function z(t){return t<16?"0"+t.toString(16):t.toString(16)}function O(t,e){var n;e=e||1/0;for(var r=t.length,i=null,a=[],o=0;o<r;++o){if((n=t.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(e-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;a.push(n)}else if(n<2048){if((e-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;a.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;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function F(t){return r.toByteArray(function(t){if((t=t.trim().replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function P(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function U(t){return t instanceof ArrayBuffer||null!=t&&null!=t.constructor&&"ArrayBuffer"===t.constructor.name&&"number"==typeof t.byteLength}function N(t){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(t)}function q(t){return t!=t}},{"base64-js":1,ieee754:52}],5:[function(t,e,n){(function(n){var r=t("tty"),i=t("./lib/encode"),a=t("stream").Stream,o=e.exports=function(){var t=null;function e(e){if(t)throw new Error("multiple inputs specified");t=e}var i=null;function a(t){if(i)throw new Error("multiple outputs specified");i=t}for(var o=0;o<arguments.length;o++){var u=arguments[o];u&&(u.readable?e(u):(u.stdin||u.input)&&e(u.stdin||u.input),u.writable?a(u):(u.stdout||u.output)&&a(u.stdout||u.output))}t&&"number"==typeof t.fd&&r.isatty(t.fd)&&(n.stdin.setRawMode?n.stdin.setRawMode(!0):r.setRawMode(!0));var l=new s;return t&&t.pipe(l),i&&l.pipe(i),l.once("^C",n.exit),l.once("end",function(){t&&("number"==typeof t.fd&&r.isatty(t.fd)&&(n.stdin.setRawMode?n.stdin.setRawMode(!1):r.setRawMode(!1)),t.destroy())}),l},s=o.Charm=function(){this.writable=!0,this.readable=!0,this.pending=[]};s.prototype=new a,s.prototype.write=function(t){if(this.pending.length){for(var e=u(t),n=!1,r=0;r<e.length;r++)for(var i=0;i<this.pending.length;i++){if((0,this.pending[i])(e[r])){n=!0,this.pending.splice(i,1);break}}if(n)return}return 1===t.length&&(3===t[0]&&this.emit("^C"),4===t[0]&&this.emit("^D")),this.emit("data",t),this},s.prototype.destroy=function(){this.end()},s.prototype.end=function(t){t&&this.write(t),this.emit("end")},s.prototype.reset=function(t){return this.write(i("c")),this},s.prototype.position=function(t,e){if("function"==typeof t){var n=t;this.pending.push(function(t){if(27===t[0]&&t[1]===i.ord("[")&&t[t.length-1]===i.ord("R")){var e=t.toString().slice(2,-1).split(";").map(Number);return n(e[1],e[0]),!0}}),this.write(i("[6n"))}else this.write(i("["+Math.floor(e)+";"+Math.floor(t)+"f"));return this},s.prototype.move=function(t,e){return e<0?this.up(-e):e>0&&this.down(e),t>0?this.right(t):t<0&&this.left(-t),this},s.prototype.up=function(t){return void 0===t&&(t=1),this.write(i("["+Math.floor(t)+"A")),this},s.prototype.down=function(t){return void 0===t&&(t=1),this.write(i("["+Math.floor(t)+"B")),this},s.prototype.right=function(t){return void 0===t&&(t=1),this.write(i("["+Math.floor(t)+"C")),this},s.prototype.left=function(t){return void 0===t&&(t=1),this.write(i("["+Math.floor(t)+"D")),this},s.prototype.column=function(t){return this.write(i("["+Math.floor(t)+"G")),this},s.prototype.push=function(t){return this.write(i(t?"7":"[s")),this},s.prototype.pop=function(t){return this.write(i(t?"8":"[u")),this},s.prototype.erase=function(t){return"end"===t||"$"===t?this.write(i("[K")):"start"===t||"^"===t?this.write(i("[1K")):"line"===t?this.write(i("[2K")):"down"===t?this.write(i("[J")):"up"===t?this.write(i("[1J")):"screen"===t?this.write(i("[1J")):this.emit("error",new Error("Unknown erase type: "+t)),this},s.prototype.display=function(t){var e={reset:0,bright:1,dim:2,underscore:4,blink:5,reverse:7,hidden:8}[t];return void 0===e&&this.emit("error",new Error("Unknown attribute: "+t)),this.write(i("["+e+"m")),this},s.prototype.foreground=function(t){if("number"==typeof t)(t<0||t>=256)&&this.emit("error",new Error("Color out of range: "+t)),this.write(i("[38;5;"+t+"m"));else{var e={black:30,red:31,green:32,yellow:33,blue:34,magenta:35,cyan:36,white:37}[t.toLowerCase()];e||this.emit("error",new Error("Unknown color: "+t)),this.write(i("["+e+"m"))}return this},s.prototype.background=function(t){if("number"==typeof t)(t<0||t>=256)&&this.emit("error",new Error("Color out of range: "+t)),this.write(i("[48;5;"+t+"m"));else{var e={black:40,red:41,green:42,yellow:43,blue:44,magenta:45,cyan:46,white:47}[t.toLowerCase()];e||this.emit("error",new Error("Unknown color: "+t)),this.write(i("["+e+"m"))}return this},s.prototype.cursor=function(t){return this.write(i(t?"[?25h":"[?25l")),this};var u=o.extractCodes=function(t){for(var e=[],n=-1,r=0;r<t.length;r++)27===t[r]?(n>=0&&e.push(t.slice(n,r)),n=r):n>=0&&r===t.length-1&&e.push(t.slice(n));return e}}).call(this,t("_process"))},{"./lib/encode":6,_process:94,stream:108,tty:125}],6:[function(t,e,n){(function(t){var n=(e.exports=function(e){return new t([27].concat(function t(e){return"string"==typeof e?e.split("").map(n):Array.isArray(e)?e.reduce(function(e,n){return e.concat(t(n))},[]):void 0}(e)))}).ord=function(t){return t.charCodeAt(0)}}).call(this,t("buffer").Buffer)},{buffer:4}],7:[function(t,e,n){(function(n){"use strict";var r=t("readable-stream").Readable,i=t("util");function a(t,e){if(!(this instanceof a))return new a(t,e);r.call(this,e),null!==t&&void 0!==t||(t=String(t)),this._obj=t}e.exports=a,i.inherits(a,r),a.prototype._read=function(t){var e=this._obj;"string"==typeof e?this.push(new n(e)):n.isBuffer(e)?this.push(e):this.push(new n(JSON.stringify(e))),this.push(null)}}).call(this,t("buffer").Buffer)},{buffer:4,"readable-stream":102,util:132}],8:[function(t,e,n){(function(t){function e(t){return Object.prototype.toString.call(t)}n.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},n.isBoolean=function(t){return"boolean"==typeof t},n.isNull=function(t){return null===t},n.isNullOrUndefined=function(t){return null==t},n.isNumber=function(t){return"number"==typeof t},n.isString=function(t){return"string"==typeof t},n.isSymbol=function(t){return"symbol"==typeof t},n.isUndefined=function(t){return void 0===t},n.isRegExp=function(t){return"[object RegExp]"===e(t)},n.isObject=function(t){return"object"==typeof t&&null!==t},n.isDate=function(t){return"[object Date]"===e(t)},n.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},n.isFunction=function(t){return"function"==typeof t},n.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},n.isBuffer=t.isBuffer}).call(this,{isBuffer:t("../../is-buffer/index.js")})},{"../../is-buffer/index.js":55}],9:[function(t,e,n){"use strict";var r=t("./lib/thunk.js");e.exports=function(t){var e=new function(){this.argTypes=[],this.shimArgs=[],this.arrayArgs=[],this.arrayBlockIndices=[],this.scalarArgs=[],this.offsetArgs=[],this.offsetArgIndex=[],this.indexArgs=[],this.shapeArgs=[],this.funcName="",this.pre=null,this.body=null,this.post=null,this.debug=!1};e.pre=t.pre,e.body=t.body,e.post=t.post;var n=t.args.slice(0);e.argTypes=n;for(var i=0;i<n.length;++i){var a=n[i];if("array"===a||"object"==typeof a&&a.blockIndices){if(e.argTypes[i]="array",e.arrayArgs.push(i),e.arrayBlockIndices.push(a.blockIndices?a.blockIndices:0),e.shimArgs.push("array"+i),i<e.pre.args.length&&e.pre.args[i].count>0)throw new Error("cwise: pre() block may not reference array args");if(i<e.post.args.length&&e.post.args[i].count>0)throw new Error("cwise: post() block may not reference array args")}else if("scalar"===a)e.scalarArgs.push(i),e.shimArgs.push("scalar"+i);else if("index"===a){if(e.indexArgs.push(i),i<e.pre.args.length&&e.pre.args[i].count>0)throw new Error("cwise: pre() block may not reference array index");if(i<e.body.args.length&&e.body.args[i].lvalue)throw new Error("cwise: body() block may not write to array index");if(i<e.post.args.length&&e.post.args[i].count>0)throw new Error("cwise: post() block may not reference array index")}else if("shape"===a){if(e.shapeArgs.push(i),i<e.pre.args.length&&e.pre.args[i].lvalue)throw new Error("cwise: pre() block may not write to array shape");if(i<e.body.args.length&&e.body.args[i].lvalue)throw new Error("cwise: body() block may not write to array shape");if(i<e.post.args.length&&e.post.args[i].lvalue)throw new Error("cwise: post() block may not write to array shape")}else{if("object"!=typeof a||!a.offset)throw new Error("cwise: Unknown argument type "+n[i]);e.argTypes[i]="offset",e.offsetArgs.push({array:a.array,offset:a.offset}),e.offsetArgIndex.push(i)}}if(e.arrayArgs.length<=0)throw new Error("cwise: No array arguments specified");if(e.pre.args.length>n.length)throw new Error("cwise: Too many arguments in pre() block");if(e.body.args.length>n.length)throw new Error("cwise: Too many arguments in body() block");if(e.post.args.length>n.length)throw new Error("cwise: Too many arguments in post() block");return e.debug=!!t.printCode||!!t.debug,e.funcName=t.funcName||"cwise",e.blockSize=t.blockSize||64,r(e)}},{"./lib/thunk.js":11}],10:[function(t,e,n){"use strict";var r=t("uniq");function i(t,e,n){var r,i,a=t.length,o=e.arrayArgs.length,s=e.indexArgs.length>0,u=[],l=[],c=0,f=0;for(r=0;r<a;++r)l.push(["i",r,"=0"].join(""));for(i=0;i<o;++i)for(r=0;r<a;++r)f=c,c=t[r],0===r?l.push(["d",i,"s",r,"=t",i,"p",c].join("")):l.push(["d",i,"s",r,"=(t",i,"p",c,"-s",f,"*t",i,"p",f,")"].join(""));for(l.length>0&&u.push("var "+l.join(",")),r=a-1;r>=0;--r)c=t[r],u.push(["for(i",r,"=0;i",r,"<s",c,";++i",r,"){"].join(""));for(u.push(n),r=0;r<a;++r){for(f=c,c=t[r],i=0;i<o;++i)u.push(["p",i,"+=d",i,"s",r].join(""));s&&(r>0&&u.push(["index[",f,"]-=s",f].join("")),u.push(["++index[",c,"]"].join(""))),u.push("}")}return u.join("\n")}function a(t,e,n){for(var r=t.body,i=[],a=[],o=0;o<t.args.length;++o){var s=t.args[o];if(!(s.count<=0)){var u=new RegExp(s.name,"g"),l="",c=e.arrayArgs.indexOf(o);switch(e.argTypes[o]){case"offset":var f=e.offsetArgIndex.indexOf(o);c=e.offsetArgs[f].array,l="+q"+f;case"array":l="p"+c+l;var h="l"+o,p="a"+c;if(0===e.arrayBlockIndices[c])1===s.count?"generic"===n[c]?s.lvalue?(i.push(["var ",h,"=",p,".get(",l,")"].join("")),r=r.replace(u,h),a.push([p,".set(",l,",",h,")"].join(""))):r=r.replace(u,[p,".get(",l,")"].join("")):r=r.replace(u,[p,"[",l,"]"].join("")):"generic"===n[c]?(i.push(["var ",h,"=",p,".get(",l,")"].join("")),r=r.replace(u,h),s.lvalue&&a.push([p,".set(",l,",",h,")"].join(""))):(i.push(["var ",h,"=",p,"[",l,"]"].join("")),r=r.replace(u,h),s.lvalue&&a.push([p,"[",l,"]=",h].join("")));else{for(var d=[s.name],g=[l],v=0;v<Math.abs(e.arrayBlockIndices[c]);v++)d.push("\\s*\\[([^\\]]+)\\]"),g.push("$"+(v+1)+"*t"+c+"b"+v);if(u=new RegExp(d.join(""),"g"),l=g.join("+"),"generic"===n[c])throw new Error("cwise: Generic arrays not supported in combination with blocks!");r=r.replace(u,[p,"[",l,"]"].join(""))}break;case"scalar":r=r.replace(u,"Y"+e.scalarArgs.indexOf(o));break;case"index":r=r.replace(u,"index");break;case"shape":r=r.replace(u,"shape")}}}return[i.join("\n"),r,a.join("\n")].join("\n").trim()}e.exports=function(t,e){for(var n=e[1].length-Math.abs(t.arrayBlockIndices[0])|0,o=new Array(t.arrayArgs.length),s=new Array(t.arrayArgs.length),u=0;u<t.arrayArgs.length;++u)s[u]=e[2*u],o[u]=e[2*u+1];var l=[],c=[],f=[],h=[],p=[];for(u=0;u<t.arrayArgs.length;++u){t.arrayBlockIndices[u]<0?(f.push(0),h.push(n),l.push(n),c.push(n+t.arrayBlockIndices[u])):(f.push(t.arrayBlockIndices[u]),h.push(t.arrayBlockIndices[u]+n),l.push(0),c.push(t.arrayBlockIndices[u]));for(var d=[],g=0;g<o[u].length;g++)f[u]<=o[u][g]&&o[u][g]<h[u]&&d.push(o[u][g]-f[u]);p.push(d)}var v=["SS"],m=["'use strict'"],_=[];for(g=0;g<n;++g)_.push(["s",g,"=SS[",g,"]"].join(""));for(u=0;u<t.arrayArgs.length;++u){for(v.push("a"+u),v.push("t"+u),v.push("p"+u),g=0;g<n;++g)_.push(["t",u,"p",g,"=t",u,"[",f[u]+g,"]"].join(""));for(g=0;g<Math.abs(t.arrayBlockIndices[u]);++g)_.push(["t",u,"b",g,"=t",u,"[",l[u]+g,"]"].join(""))}for(u=0;u<t.scalarArgs.length;++u)v.push("Y"+u);if(t.shapeArgs.length>0&&_.push("shape=SS.slice(0)"),t.indexArgs.length>0){var w=new Array(n);for(u=0;u<n;++u)w[u]="0";_.push(["index=[",w.join(","),"]"].join(""))}for(u=0;u<t.offsetArgs.length;++u){var b=t.offsetArgs[u],y=[];for(g=0;g<b.offset.length;++g)0!==b.offset[g]&&(1===b.offset[g]?y.push(["t",b.array,"p",g].join("")):y.push([b.offset[g],"*t",b.array,"p",g].join("")));0===y.length?_.push("q"+u+"=0"):_.push(["q",u,"=",y.join("+")].join(""))}var x=r([].concat(t.pre.thisVars).concat(t.body.thisVars).concat(t.post.thisVars));for((_=_.concat(x)).length>0&&m.push("var "+_.join(",")),u=0;u<t.arrayArgs.length;++u)m.push("p"+u+"|=0");t.pre.body.length>3&&m.push(a(t.pre,t,s));var k=a(t.body,t,s),E=function(t){for(var e=0,n=t[0].length;e<n;){for(var r=1;r<t.length;++r)if(t[r][e]!==t[0][e])return e;++e}return e}(p);E<n?m.push(function(t,e,n,r){for(var a=e.length,o=n.arrayArgs.length,s=n.blockSize,u=n.indexArgs.length>0,l=[],c=0;c<o;++c)l.push(["var offset",c,"=p",c].join(""));for(c=t;c<a;++c)l.push(["for(var j"+c+"=SS[",e[c],"]|0;j",c,">0;){"].join("")),l.push(["if(j",c,"<",s,"){"].join("")),l.push(["s",e[c],"=j",c].join("")),l.push(["j",c,"=0"].join("")),l.push(["}else{s",e[c],"=",s].join("")),l.push(["j",c,"-=",s,"}"].join("")),u&&l.push(["index[",e[c],"]=j",c].join(""));for(c=0;c<o;++c){for(var f=["offset"+c],h=t;h<a;++h)f.push(["j",h,"*t",c,"p",e[h]].join(""));l.push(["p",c,"=(",f.join("+"),")"].join(""))}for(l.push(i(e,n,r)),c=t;c<a;++c)l.push("}");return l.join("\n")}(E,p[0],t,k)):m.push(i(p[0],t,k)),t.post.body.length>3&&m.push(a(t.post,t,s)),t.debug&&console.log("-----Generated cwise routine for ",e,":\n"+m.join("\n")+"\n----------");var S=[t.funcName||"unnamed","_cwise_loop_",o[0].join("s"),"m",E,function(t){for(var e=new Array(t.length),n=!0,r=0;r<t.length;++r){var i=t[r],a=i.match(/\d+/);a=a?a[0]:"",0===i.charAt(0)?e[r]="u"+i.charAt(1)+a:e[r]=i.charAt(0)+a,r>0&&(n=n&&e[r]===e[r-1])}return n?e[0]:e.join("")}(s)].join("");return new Function(["function ",S,"(",v.join(","),"){",m.join("\n"),"} return ",S].join(""))()}},{uniq:127}],11:[function(t,e,n){"use strict";var r=t("./compile.js");e.exports=function(t){var e=["'use strict'","var CACHED={}"],n=[],i=t.funcName+"_cwise_thunk";e.push(["return function ",i,"(",t.shimArgs.join(","),"){"].join(""));for(var a=[],o=[],s=[["array",t.arrayArgs[0],".shape.slice(",Math.max(0,t.arrayBlockIndices[0]),t.arrayBlockIndices[0]<0?","+t.arrayBlockIndices[0]+")":")"].join("")],u=[],l=[],c=0;c<t.arrayArgs.length;++c){var f=t.arrayArgs[c];n.push(["t",f,"=array",f,".dtype,","r",f,"=array",f,".order"].join("")),a.push("t"+f),a.push("r"+f),o.push("t"+f),o.push("r"+f+".join()"),s.push("array"+f+".data"),s.push("array"+f+".stride"),s.push("array"+f+".offset|0"),c>0&&(u.push("array"+t.arrayArgs[0]+".shape.length===array"+f+".shape.length+"+(Math.abs(t.arrayBlockIndices[0])-Math.abs(t.arrayBlockIndices[c]))),l.push("array"+t.arrayArgs[0]+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[0])+"]===array"+f+".shape[shapeIndex+"+Math.max(0,t.arrayBlockIndices[c])+"]"))}for(t.arrayArgs.length>1&&(e.push("if (!("+u.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same dimensionality!')"),e.push("for(var shapeIndex=array"+t.arrayArgs[0]+".shape.length-"+Math.abs(t.arrayBlockIndices[0])+"; shapeIndex--\x3e0;) {"),e.push("if (!("+l.join(" && ")+")) throw new Error('cwise: Arrays do not all have the same shape!')"),e.push("}")),c=0;c<t.scalarArgs.length;++c)s.push("scalar"+t.scalarArgs[c]);return n.push(["type=[",o.join(","),"].join()"].join("")),n.push("proc=CACHED[type]"),e.push("var "+n.join(",")),e.push(["if(!proc){","CACHED[type]=proc=compile([",a.join(","),"])}","return proc(",s.join(","),")}"].join("")),t.debug&&console.log("-----Generated thunk:\n"+e.join("\n")+"\n----------"),new Function("compile",e.join("\n"))(r.bind(void 0,t))}},{"./compile.js":10}],12:[function(t,e,n){e.exports=t("cwise-compiler")},{"cwise-compiler":9}],13:[function(t,e,n){(function(t){"use strict";e.exports=function(e){if(!/^data\:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');var n=(e=e.replace(/\r?\n/g,"")).indexOf(",");if(-1===n||n<=4)throw new TypeError("malformed data: URI");for(var r=e.substring(5,n).split(";"),i=r[0]||"text/plain",a=i,o=!1,s="",u=1;u<r.length;u++)"base64"==r[u]?o=!0:(a+=";"+r[u],0==r[u].indexOf("charset=")&&(s=r[u].substring(8)));r[0]||s.length||(a+=";charset=US-ASCII",s="US-ASCII");var l=unescape(e.substring(n+1)),c=new t(l,o?"base64":"ascii");return c.type=i,c.typeFull=a,c.charset=s,c}}).call(this,t("buffer").Buffer)},{buffer:4}],14:[function(t,e,n){"use strict";e.exports=function(t,e){switch(void 0===e&&(e=0),typeof t){case"number":if(t>0)return function(t,e){var n,r;for(n=new Array(t),r=0;r<t;++r)n[r]=e;return n}(0|t,e);break;case"object":if("number"==typeof t.length)return function t(e,n,r){var i=0|e[r];if(i<=0)return[];var a,o=new Array(i);if(r===e.length-1)for(a=0;a<i;++a)o[a]=n;else for(a=0;a<i;++a)o[a]=t(e,n,r+1);return o}(t,e,0)}return[]}},{}],15:[function(t,e,n){var r=function(e){(e=e||{}).width=e.width||800,e.height=e.height||600;var n=e.model||{vertex:[-1,-1,0,1,-1,0,1,1,0,-1,1,0],indices:[0,1,2,0,2,3,2,1,0,3,2,0],textureCoords:[0,0,1,0,1,1,0,1]},r=e.lens||{a:1,b:1,Fx:0,Fy:0,scale:1.5},i=e.fov||{x:1,y:1},a=e.image||"images/barrel-distortion.png",o=function(t){var e=document.querySelector(t);if(null==e)throw new Error("there is no canvas on this page");for(var n=["webgl","experimental-webgl","webkit-3d","moz-webgl"],r=0;r<n.length;++r){var i;try{i=e.getContext(n[r],{preserveDrawingBuffer:!0})}catch(t){continue}if(i)return i}throw new Error("WebGL is not supported!")}(e.selector||"#canvas"),s=t("./shaders"),u=y(e.vertexSrc||"vertex"),l=y(e.fragmentSrc||"fragment3"),c=function(t,e,n){var r=t.createShader(t.VERTEX_SHADER);t.shaderSource(r,e),t.compileShader(r),o(r);var i=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(i,n),t.compileShader(i),o(i);var a=t.createProgram();return t.attachShader(a,r),t.attachShader(a,i),t.linkProgram(a),a;function o(e){if(!t.getShaderParameter(e,t.COMPILE_STATUS))throw new Error(t.getShaderInfoLog(e))}}(o,u,l);o.useProgram(c);var f,h,p,d,g=o.getAttribLocation(c,"aVertexPosition"),v=o.getAttribLocation(c,"aTextureCoord"),m=o.getUniformLocation(c,"uSampler"),_=o.getUniformLocation(c,"uLensS"),w=o.getUniformLocation(c,"uLensF"),b=o.getUniformLocation(c,"uFov");function y(t,e){if(s.hasOwnProperty(t))return s[t];var n=new XMLHttpRequest;if(e)n.addEventListener("readystatechange",function(){4===n.readyState&&(200===n.status?e(null,n.responseText):e(new Error("fail to load!")))}),n.open("GET",t,!0),n.send(null);else if(n.open("GET",t,!1),n.send(null),200==n.status)return n.responseText}function x(t,n){var r=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame;if(!0===t){if(!r)throw new Error("do not support 'requestAnimationFram'");r(a)}else r(a);var i=null;function a(o){i||(i=o);var s=o-i;i=o,e.runner(s),n&&n(),!0===t&&r(a)}}function k(t,e){o.viewport(0,0,t,e),o.canvas.width=t,o.canvas.height=e}function E(t,n){d=function(t,n,r){var i=t.createTexture(),a=new Image;return a.addEventListener("load",function(){!function(t,e,n,r){r=r||t.createTexture(),t.bindTexture(t.TEXTURE_2D,r),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.bindTexture(t.TEXTURE_2D,null),n&&n(null,r)}(t,a,r,i),e.width=a.width,e.height=a.height,k(e.width,e.height)}),a.src=n,i}(o,t,function(){x(e.animate,n)})}return f=o.createBuffer(),o.bindBuffer(o.ARRAY_BUFFER,f),o.bufferData(o.ARRAY_BUFFER,new Float32Array(n.vertex),o.STATIC_DRAW),o.bindBuffer(o.ARRAY_BUFFER,null),h=o.createBuffer(),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,h),o.bufferData(o.ELEMENT_ARRAY_BUFFER,new Uint16Array(n.indices),o.STATIC_DRAW),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null),p=o.createBuffer(),o.bindBuffer(o.ARRAY_BUFFER,p),o.bufferData(o.ARRAY_BUFFER,new Float32Array(n.textureCoords),o.STATIC_DRAW),o.bindBuffer(o.ARRAY_BUFFER,null),e.runner=e.runner||function(t){o.clearColor(0,0,0,1),o.enable(o.DEPTH_TEST),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT),o.enableVertexAttribArray(g),o.bindBuffer(o.ARRAY_BUFFER,f),o.vertexAttribPointer(g,3,o.FLOAT,!1,0,0),o.enableVertexAttribArray(v),o.bindBuffer(o.ARRAY_BUFFER,p),o.vertexAttribPointer(v,2,o.FLOAT,!1,0,0),o.activeTexture(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,d),o.uniform1i(m,0),o.uniform3fv(_,[r.a,r.b,r.scale]),o.uniform2fv(w,[r.Fx,r.Fy]),o.uniform2fv(b,[i.x,i.y]),o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,h),o.drawElements(o.TRIANGLES,n.indices.length,o.UNSIGNED_SHORT,0)},E(a),{options:e,gl:o,lens:r,fov:i,run:x,getImage:function(t){var e=new Image;return e.src=o.canvas.toDataURL(t||"image/jpeg"),e},setImage:E}};"undefined"!=typeof document?window.FisheyeGl=r:e.exports=r},{"./shaders":16}],16:[function(t,e,n){e.exports={fragment:t("./shaders/fragment.glfs"),fragment2:t("./shaders/fragment2.glfs"),fragment3:t("./shaders/fragment3.glfs"),method1:t("./shaders/method1.glfs"),method2:t("./shaders/method2.glfs"),vertex:t("./shaders/vertex.glvs")}},{"./shaders/fragment.glfs":17,"./shaders/fragment2.glfs":18,"./shaders/fragment3.glfs":19,"./shaders/method1.glfs":20,"./shaders/method2.glfs":21,"./shaders/vertex.glvs":22}],17:[function(t,e,n){e.exports="#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec4 uLens;\nuniform vec2 uFov;\nuniform sampler2D uSampler;\nvarying vec3 vPosition;\nvarying vec2 vTextureCoord;\nvec2 GLCoord2TextureCoord(vec2 glCoord) {\n\treturn glCoord * vec2(1.0, -1.0)/ 2.0 + vec2(0.5, 0.5);\n}\nvoid main(void){\n\tfloat scale = uLens.w;\n\tfloat F = uLens.z;\n\t\n\tfloat L = length(vec3(vPosition.xy/scale, F));\n\tvec2 vMapping = vPosition.xy * F / L;\n\tvMapping = vMapping * uLens.xy;\n\tvMapping = GLCoord2TextureCoord(vMapping/scale);\n\tvec4 texture = texture2D(uSampler, vMapping);\n\tif(vMapping.x > 0.99 || vMapping.x < 0.01 || vMapping.y > 0.99 || vMapping.y < 0.01){\n\t\ttexture = vec4(0.0, 0.0, 0.0, 1.0);\n\t} \n\tgl_FragColor = texture;\n}\n"},{}],18:[function(t,e,n){e.exports="#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec4 uLens;\nuniform vec2 uFov;\nuniform sampler2D uSampler;\nvarying vec3 vPosition;\nvarying vec2 vTextureCoord;\nvec2 TextureCoord2GLCoord(vec2 textureCoord) {\n\treturn (textureCoord - vec2(0.5, 0.5)) * 2.0;\n}\nvec2 GLCoord2TextureCoord(vec2 glCoord) {\n\treturn glCoord / 2.0 + vec2(0.5, 0.5);\n}\nvoid main(void){\n\tfloat correctionRadius = 0.5;\n\tfloat distance = sqrt(vPosition.x * vPosition.x + vPosition.y * vPosition.y) / correctionRadius;\n\tfloat theta = 1.0;\n\tif(distance != 0.0){\n\t\ttheta = atan(distance);\n\t}\n\tvec2 vMapping = theta * vPosition.xy;\n\tvMapping = GLCoord2TextureCoord(vMapping);\n\t\t\n\tvec4 texture = texture2D(uSampler, vMapping);\n\tif(vMapping.x > 0.99 || vMapping.x < 0.01 || vMapping.y > 0.99 || vMapping.y < 0.01){\n\t\ttexture = vec4(0.0, 0.0, 0.0, 1.0);\n\t} \n\tgl_FragColor = texture;\n}\n"},{}],19:[function(t,e,n){e.exports="#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec3 uLensS;\nuniform vec2 uLensF;\nuniform vec2 uFov;\nuniform sampler2D uSampler;\nvarying vec3 vPosition;\nvarying vec2 vTextureCoord;\nvec2 GLCoord2TextureCoord(vec2 glCoord) {\n\treturn glCoord * vec2(1.0, -1.0)/ 2.0 + vec2(0.5, 0.5);\n}\nvoid main(void){\n\tfloat scale = uLensS.z;\n\tvec3 vPos = vPosition;\n\tfloat Fx = uLensF.x;\n\tfloat Fy = uLensF.y;\n\tvec2 vMapping = vPos.xy;\n\tvMapping.x = vMapping.x + ((pow(vPos.y, 2.0)/scale)*vPos.x/scale)*-Fx;\n\tvMapping.y = vMapping.y + ((pow(vPos.x, 2.0)/scale)*vPos.y/scale)*-Fy;\n\tvMapping = vMapping * uLensS.xy;\n\tvMapping = GLCoord2TextureCoord(vMapping/scale);\n\tvec4 texture = texture2D(uSampler, vMapping);\n\tif(vMapping.x > 0.99 || vMapping.x < 0.01 || vMapping.y > 0.99 || vMapping.y < 0.01){\n\t\ttexture = vec4(0.0, 0.0, 0.0, 1.0);\n\t}\n\tgl_FragColor = texture;\n}\n"},{}],20:[function(t,e,n){e.exports="#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec4 uLens;\nuniform vec2 uFov;\nuniform sampler2D uSampler;\nvarying vec3 vPosition;\nvarying vec2 vTextureCoord;\nvec2 TextureCoord2GLCoord(vec2 textureCoord) {\n\treturn (textureCoord - vec2(0.5, 0.5)) * 2.0;\n}\nvec2 GLCoord2TextureCoord(vec2 glCoord) {\n\treturn glCoord / 2.0 + vec2(0.5, 0.5);\n}\nvoid main(void){\n\tvec2 vMapping = vec2(vTextureCoord.x, 1.0 - vTextureCoord.y);\n\tvMapping = TextureCoord2GLCoord(vMapping);\n\t//TODO insert Code\n\tfloat F = uLens.x/ uLens.w;\n\tfloat seta = length(vMapping) / F;\n\tvMapping = sin(seta) * F / length(vMapping) * vMapping;\n\tvMapping *= uLens.w * 1.414;\n\tvMapping = GLCoord2TextureCoord(vMapping);\n\tvec4 texture = texture2D(uSampler, vMapping);\n\tif(vMapping.x > 0.99 || vMapping.x < 0.01 || vMapping.y > 0.99 || vMapping.y < 0.01){\n\t\ttexture = vec4(0.0, 0.0, 0.0, 1.0);\n\t} \n\tgl_FragColor = texture;\n}\n"},{}],21:[function(t,e,n){e.exports="#ifdef GL_ES\nprecision highp float;\n#endif\nuniform vec4 uLens;\nuniform vec2 uFov;\nuniform sampler2D uSampler;\nvarying vec3 vPosition;\nvarying vec2 vTextureCoord;\nvec2 TextureCoord2GLCoord(vec2 textureCoord) {\n\treturn (textureCoord - vec2(0.5, 0.5)) * 2.0;\n}\nvec2 GLCoord2TextureCoord(vec2 glCoord) {\n\treturn glCoord / 2.0 + vec2(0.5, 0.5);\n}\nvoid main(void){\n\tvec2 vMapping = vec2(vTextureCoord.x, 1.0 - vTextureCoord.y);\n\tvMapping = TextureCoord2GLCoord(vMapping);\n\t//TOD insert Code\n\tfloat F = uLens.x/ uLens.w;\n\tfloat seta = length(vMapping) / F;\n\tvMapping = sin(seta) * F / length(vMapping) * vMapping;\n\tvMapping *= uLens.w * 1.414;\n\tvMapping = GLCoord2TextureCoord(vMapping);\n\tvec4 texture = texture2D(uSampler, vMapping);\n\tif(vMapping.x > 0.99 || vMapping.x < 0.01 || vMapping.y > 0.99 || vMapping.y < 0.01){\n\t\ttexture = vec4(0.0, 0.0, 0.0, 1.0);\n\t} \n\tgl_FragColor = texture;\n}\n"},{}],22:[function(t,e,n){e.exports="#ifdef GL_ES\nprecision highp float;\n#endif\nattribute vec3 aVertexPosition;\nattribute vec2 aTextureCoord;\nvarying vec3 vPosition;\nvarying vec2 vTextureCoord;\nvoid main(void){\n\tvPosition = aVertexPosition;\n\tvTextureCoord = aTextureCoord;\n\tgl_Position = vec4(vPosition,1.0);\n}\n"},{}],23:[function(t,e,n){(function(n,r){"use strict";var i=t("path"),a=t("ndarray"),o=t("omggif").GifReader,s=(t("ndarray-pack"),t("through"),t("data-uri-to-buffer"));function u(t,e){var n;try{n=new o(t)}catch(t){return void e(t)}if(n.numFrames()>0){var r=[n.numFrames(),n.height,n.width,4],i=new Uint8Array(r[0]*r[1]*r[2]*r[3]),s=a(i,r);try{for(var u=0;u<n.numFrames();++u)n.decodeAndBlitFrameRGBA(u,i.subarray(s.index(u,0,0,0),s.index(u+1,0,0,0)))}catch(t){return void e(t)}e(null,s.transpose(0,2,1))}else{r=[n.height,n.width,4],i=new Uint8Array(r[0]*r[1]*r[2]),s=a(i,r);try{n.decodeAndBlitFrameRGBA(0,i)}catch(t){return void e(t)}e(null,s.transpose(1,0))}}function l(t,e){r.nextTick(function(){try{var n=s(t);n?u(function(t){if(void 0===t[0]){for(var e=t.length,n=new Uint8Array(e),r=0;r<e;++r)n[r]=t.get(r);return n}return new Uint8Array(t)}(n),e):e(new Error("Error parsing data URI"))}catch(t){e(t)}})}e.exports=function(t,e,r){r||(r=e,e="");var o=i.extname(t);switch(e||o.toUpperCase()){case".GIF":!function(t,e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="arraybuffer",n.overrideMimeType&&n.overrideMimeType("application/binary"),n.onerror=function(t){e(t)},n.onload=function(){4===n.readyState&&u(new Uint8Array(n.response),e)},n.send()}(t,r);break;default:n.isBuffer(t)&&(t="data:"+e+";base64,"+t.toString("base64")),0===t.indexOf("data:image/gif;")?l(t,r):function(t,e){var n=new Image;n.crossOrigin="Anonymous",n.onload=function(){var t=document.createElement("canvas");t.width=n.width,t.height=n.height;var r=t.getContext("2d");r.drawImage(n,0,0);var i=r.getImageData(0,0,n.width,n.height);e(null,a(new Uint8Array(i.data),[n.width,n.height,4],[4,4*n.width,1],0))},n.onerror=function(t){e(t)},n.src=t}(t,r)}}}).call(this,{isBuffer:t("../is-buffer/index.js")},t("_process"))},{"../is-buffer/index.js":55,_process:94,"data-uri-to-buffer":24,ndarray:67,"ndarray-pack":65,omggif:69,path:71,through:123}],24:[function(t,e,n){(function(t){e.exports=function(e){if(!/^data\:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');var n=(e=e.replace(/\r?\n/g,"")).indexOf(",");if(-1===n||n<=4)throw new TypeError("malformed data: URI");for(var r=e.substring(5,n).split(";"),i=!1,a="US-ASCII",o=0;o<r.length;o++)"base64"==r[o]?i=!0:0==r[o].indexOf("charset=")&&(a=r[o].substring(8));var s=unescape(e.substring(n+1)),u=new t(s,i?"base64":"ascii");return u.type=r[0]||"text/plain",u.charset=a,u}}).call(this,t("buffer").Buffer)},{buffer:4}],25:[function(t,e,n){(function(n){t("assert"),t("events").EventEmitter;var r=t("readable-stream"),i=t("util"),a=t("./TypedNeuQuant.js"),o=t("./LZWEncoder.js");function s(t){r.call(this,t),this.okayToPush=!0,this.resetData()}function u(t,e,n){var r=(n=n||{}).highWaterMark;s.call(this,{highWaterMark:r||0===r?r:65536}),this.width=~~t,this.height=~~e,this.transparent=null,this.transIndex=0,this.repeat=-1,this.delay=0,this.pixels=null,this.indexedPixels=null,this.colorDepth=null,this.colorTab=null,this.usedEntry=[],this.palSize=7,this.dispose=-1,this.firstFrame=!0,this.sample=10;var i=this;function a(){i.flushData()}this.on("writeHeader#stop",a),this.on("frame#stop",a),this.on("finish#stop",function(){a(),i.push(null)})}i.inherits(s,r),s.prototype._read=function(){this.okayToPush=!0},s.prototype.resetData=function(){this.data=[]},s.prototype.flushData=function(){if(!this.okayToPush){var t=new Error("GIF memory limit exceeded. Please `read` from GIF before writing additional frames/information.");return this.emit("error",t)}var e=new n(this.data);this.resetData(),this.okayToPush=this.push(e)},s.prototype.writeByte=function(t){this.data.push(t)},s.prototype.writeUTFBytes=function(t){for(var e=t.length,n=0;n<e;n++)this.writeByte(t.charCodeAt(n))},s.prototype.writeBytes=function(t,e,n){for(var r=n||t.length,i=e||0;i<r;i++)this.writeByte(t[i])},i.inherits(u,s),u.prototype.setDelay=function(t){this.delay=Math.round(t/10)},u.prototype.setFrameRate=function(t){this.delay=Math.round(100/t)},u.prototype.setDispose=function(t){t>=0&&(this.dispose=t)},u.prototype.setRepeat=function(t){this.repeat=t},u.prototype.setTransparent=function(t){this.transparent=t},u.prototype.analyzeImage=function(t){this.setImagePixels(this.removeAlphaChannel(t)),this.analyzePixels()},u.prototype.writeImageInfo=function(){this.firstFrame&&(this.writeLSD(),this.writePalette(),this.repeat>=0&&this.writeNetscapeExt()),this.writeGraphicCtrlExt(),this.writeImageDesc(),this.firstFrame||this.writePalette(),this.firstFrame=!1},u.prototype.outputImage=function(){this.writePixels()},u.prototype.addFrame=function(t){this.emit("frame#start"),this.analyzeImage(t),this.writeImageInfo(),this.outputImage(),this.emit("frame#stop")},u.prototype.finish=function(){this.emit("finish#start"),this.writeByte(59),this.emit("finish#stop")},u.prototype.setQuality=function(t){t<1&&(t=1),this.sample=t},u.prototype.writeHeader=function(){this.emit("writeHeader#start"),this.writeUTFBytes("GIF89a"),this.emit("writeHeader#stop")},u.prototype.analyzePixels=function(){var t=this.pixels.length/3;this.indexedPixels=new Uint8Array(t);var e=new a(this.pixels,this.sample);e.buildColormap(),this.colorTab=e.getColormap();for(var n=0,r=0;r<t;r++){var i=e.lookupRGB(255&this.pixels[n++],255&this.pixels[n++],255&this.pixels[n++]);this.usedEntry[i]=!0,this.indexedPixels[r]=i}this.pixels=null,this.colorDepth=8,this.palSize=7,null!==this.transparent&&(this.transIndex=this.findClosest(this.transparent))},u.prototype.findClosest=function(t){if(null===this.colorTab)return-1;for(var e=(16711680&t)>>16,n=(65280&t)>>8,r=255&t,i=0,a=16777216,o=this.colorTab.length,s=0;s<o;){var u=e-(255&this.colorTab[s++]),l=n-(255&this.colorTab[s++]),c=r-(255&this.colorTab[s]),f=u*u+l*l+c*c,h=s/3;this.usedEntry[h]&&f<a&&(a=f,i=h),s++}return i},u.prototype.removeAlphaChannel=function(t){for(var e=this.width,n=this.height,r=new Uint8Array(e*n*3),i=0,a=0;a<n;a++)for(var o=0;o<e;o++){var s=a*e*4+4*o;r[i++]=t[s],r[i++]=t[s+1],r[i++]=t[s+2]}return r},u.prototype.setImagePixels=function(t){this.pixels=t},u.prototype.writeGraphicCtrlExt=function(){var t,e;this.writeByte(33),this.writeByte(249),this.writeByte(4),null===this.transparent?(t=0,e=0):(t=1,e=2),this.dispose>=0&&(e=7&dispose),e<<=2,this.writeByte(0|e|t),this.writeShort(this.delay),this.writeByte(this.transIndex),this.writeByte(0)},u.prototype.writeImageDesc=function(){this.writeByte(44),this.writeShort(0),this.writeShort(0),this.writeShort(this.width),this.writeShort(this.height),this.firstFrame?this.writeByte(0):this.writeByte(128|this.palSize)},u.prototype.writeLSD=function(){this.writeShort(this.width),this.writeShort(this.height),this.writeByte(240|this.palSize),this.writeByte(0),this.writeByte(0)},u.prototype.writeNetscapeExt=function(){this.writeByte(33),this.writeByte(255),this.writeByte(11),this.writeUTFBytes("NETSCAPE2.0"),this.writeByte(3),this.writeByte(1),this.writeShort(this.repeat),this.writeByte(0)},u.prototype.writePalette=function(){this.writeBytes(this.colorTab);for(var t=768-this.colorTab.length,e=0;e<t;e++)this.writeByte(0)},u.prototype.writeShort=function(t){this.writeByte(255&t),this.writeByte(t>>8&255)},u.prototype.writePixels=function(){new o(this.width,this.height,this.indexedPixels,this.colorDepth).encode(this)},u.prototype.stream=function(){return this},u.ByteCapacitor=s,e.exports=u}).call(this,t("buffer").Buffer)},{"./LZWEncoder.js":26,"./TypedNeuQuant.js":27,assert:36,buffer:4,events:40,"readable-stream":34,util:132}],26:[function(t,e,n){var r=-1,i=12,a=5003,o=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];e.exports=function(t,e,n,s){var u,l,c,f,h,p,d,g,v,m=Math.max(2,s),_=new Uint8Array(256),w=new Int32Array(a),b=new Int32Array(a),y=0,x=0,k=!1;function E(t,e){_[l++]=t,l>=254&&M(e)}function S(t){A(a),x=g+2,k=!0,j(g,t)}function A(t){for(var e=0;e<t;++e)w[e]=-1}function M(t){l>0&&(t.writeByte(l),t.writeBytes(_,0,l),l=0)}function T(t){return(1<<t)-1}function I(){return 0===f?r:(--f,255&n[h++])}function j(t,e){for(u&=o[y],y>0?u|=t<<y:u=t,y+=p;y>=8;)E(255&u,e),u>>=8,y-=8;if((x>c||k)&&(k?(c=T(p=d),k=!1):c=++p==i?1<<i:T(p)),t==v){for(;y>0;)E(255&u,e),u>>=8,y-=8;M(e)}}this.encode=function(n){n.writeByte(m),f=t*e,h=0,function(t,e){var n,o,s,u,f,h,m;for(k=!1,c=T(p=d=t),v=1+(g=1<<t-1),x=g+2,l=0,u=I(),m=0,n=a;n<65536;n*=2)++m;m=8-m,A(h=a),j(g,e);t:for(;(o=I())!=r;)if(n=(o<<i)+u,w[s=o<<m^u]!==n){if(w[s]>=0){f=h-s,0===s&&(f=1);do{if((s-=f)<0&&(s+=h),w[s]===n){u=b[s];continue t}}while(w[s]>=0)}j(u,e),u=o,x<1<<i?(b[s]=x++,w[s]=n):S(e)}else u=b[s];j(u,e),j(v,e)}(m+1,n),n.writeByte(0)}}},{}],27:[function(t,e,n){var r=100,i=256,a=i-1,o=4,s=16,u=1<<s,l=10,c=10,f=u>>c,h=u<<l-c,p=6,d=(i>>3)*(1<<p),g=30,v=1024,m=256,_=1<<18,w=499,b=491,y=487,x=503,k=3*x;e.exports=function(t,e){var n,E,S,A,M;function T(t,e,r,i,a){n[e][0]-=t*(n[e][0]-r)/v,n[e][1]-=t*(n[e][1]-i)/v,n[e][2]-=t*(n[e][2]-a)/v}function I(t,e,r,a,o){for(var s,u,l=Math.abs(e-t),c=Math.min(e+t,i),f=e+1,h=e-1,p=1;f<c||h>l;)u=M[p++],f<c&&((s=n[f++])[0]-=u*(s[0]-r)/_,s[1]-=u*(s[1]-a)/_,s[2]-=u*(s[2]-o)/_),h>l&&((s=n[h--])[0]-=u*(s[0]-r)/_,s[1]-=u*(s[1]-a)/_,s[2]-=u*(s[2]-o)/_)}function j(t,e,r){var a,u,p,d,g,v=~(1<<31),m=v,_=-1,w=_;for(a=0;a<i;a++)u=n[a],(p=Math.abs(u[0]-t)+Math.abs(u[1]-e)+Math.abs(u[2]-r))<v&&(v=p,_=a),(d=p-(S[a]>>s-o))<m&&(m=d,w=a),g=A[a]>>c,A[a]-=g,S[a]+=g<<l;return A[_]+=f,S[_]-=h,w}this.buildColormap=function(){!function(){var t,e;for(n=[],E=new Int32Array(256),S=new Int32Array(i),A=new Int32Array(i),M=new Int32Array(i>>3),t=0;t<i;t++)e=(t<<o+8)/i,n[t]=new Float64Array([e,e,e,0]),A[t]=u/i,S[t]=0}(),function(){var n,i,a,s,u,l,c=t.length,f=30+(e-1)/3,h=c/(3*e),_=~~(h/r),E=v,S=d,A=S>>p;for(A<=1&&(A=0),n=0;n<A;n++)M[n]=E*((A*A-n*n)*m/(A*A));c<k?(e=1,i=3):i=c%w!=0?3*w:c%b!=0?3*b:c%y!=0?3*y:3*x;var R=0;for(n=0;n<h;)if(T(E,l=j(a=(255&t[R])<<o,s=(255&t[R+1])<<o,u=(255&t[R+2])<<o),a,s,u),0!==A&&I(A,l,a,s,u),(R+=i)>=c&&(R-=c),n++,0===_&&(_=1),n%_==0)for(E-=E/f,(A=(S-=S/g)>>p)<=1&&(A=0),l=0;l<A;l++)M[l]=E*((A*A-l*l)*m/(A*A))}(),function(){for(var t=0;t<i;t++)n[t][0]>>=o,n[t][1]>>=o,n[t][2]>>=o,n[t][3]=t}(),function(){var t,e,r,o,s,u,l=0,c=0;for(t=0;t<i;t++){for(s=t,u=(r=n[t])[1],e=t+1;e<i;e++)(o=n[e])[1]<u&&(s=e,u=o[1]);if(o=n[s],t!=s&&(e=o[0],o[0]=r[0],r[0]=e,e=o[1],o[1]=r[1],r[1]=e,e=o[2],o[2]=r[2],r[2]=e,e=o[3],o[3]=r[3],r[3]=e),u!=l){for(E[l]=c+t>>1,e=l+1;e<u;e++)E[e]=t;l=u,c=t}}for(E[l]=c+a>>1,e=l+1;e<256;e++)E[e]=a}()},this.getColormap=function(){for(var t=[],e=[],r=0;r<i;r++)e[n[r][3]]=r;for(var a=0,o=0;o<i;o++){var s=e[o];t[a++]=n[s][0],t[a++]=n[s][1],t[a++]=n[s][2]}return t},this.lookupRGB=function(t,e,r){for(var a,o,s,u=1e3,l=-1,c=E[e],f=c-1;c<i||f>=0;)c<i&&((s=(o=n[c])[1]-e)>=u?c=i:(c++,s<0&&(s=-s),(a=o[0]-t)<0&&(a=-a),(s+=a)<u&&((a=o[2]-r)<0&&(a=-a),(s+=a)<u&&(u=s,l=o[3])))),f>=0&&((s=e-(o=n[f])[1])>=u?f=-1:(f--,s<0&&(s=-s),(a=o[0]-t)<0&&(a=-a),(s+=a)<u&&((a=o[2]-r)<0&&(a=-a),(s+=a)<u&&(u=s,l=o[3]))));return l}}},{}],28:[function(t,e,n){e.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},{}],29:[function(t,e,n){(function(n){e.exports=s;var r=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e},i=t("core-util-is");i.inherits=t("inherits");var a=t("./_stream_readable"),o=t("./_stream_writable");function s(t){if(!(this instanceof s))return new s(t);a.call(this,t),o.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",u)}function u(){this.allowHalfOpen||this._writableState.ended||n.nextTick(this.end.bind(this))}i.inherits(s,a),function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)}(r(o.prototype),function(t){s.prototype[t]||(s.prototype[t]=o.prototype[t])})}).call(this,t("_process"))},{"./_stream_readable":31,"./_stream_writable":33,_process:94,"core-util-is":8,inherits:53}],30:[function(t,e,n){e.exports=a;var r=t("./_stream_transform"),i=t("core-util-is");function a(t){if(!(this instanceof a))return new a(t);r.call(this,t)}i.inherits=t("inherits"),i.inherits(a,r),a.prototype._transform=function(t,e,n){n(null,t)}},{"./_stream_transform":32,"core-util-is":8,inherits:53}],31:[function(t,e,n){(function(n){e.exports=f;var r=t("isarray"),i=t("buffer").Buffer;f.ReadableState=c;var a=t("events").EventEmitter;a.listenerCount||(a.listenerCount=function(t,e){return t.listeners(e).length});var o,s=t("stream"),u=t("core-util-is");u.inherits=t("inherits");var l=t("util");function c(e,n){var r=t("./_stream_duplex"),i=(e=e||{}).highWaterMark,a=e.objectMode?16:16384;this.highWaterMark=i||0===i?i:a,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!e.objectMode,n instanceof r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(o||(o=t("string_decoder/").StringDecoder),this.decoder=new o(e.encoding),this.encoding=e.encoding)}function f(e){t("./_stream_duplex");if(!(this instanceof f))return new f(e);this._readableState=new c(e,this),this.readable=!0,s.call(this)}function h(t,e,r,i,a){var o=function(t,e){var n=null;u.isBuffer(e)||u.isString(e)||u.isNullOrUndefined(e)||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(e,r);if(o)t.emit("error",o);else if(u.isNullOrUndefined(r))e.reading=!1,e.ended||function(t,e){if(e.decoder&&!e.ended){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,g(t)}(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!a){var s=new Error("stream.push() after EOF");t.emit("error",s)}else if(e.endEmitted&&a){s=new Error("stream.unshift() after end event");t.emit("error",s)}else!e.decoder||a||i||(r=e.decoder.write(r)),a||(e.reading=!1),e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,a?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&g(t)),function(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(function(){!function(t,e){var n=e.length;for(;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(l("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}(t,e)}))}(t,e);else a||(e.reading=!1);return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(e)}l=l&&l.debuglog?l.debuglog("stream"):function(){},u.inherits(f,s),f.prototype.push=function(t,e){var n=this._readableState;return u.isString(t)&&!n.objectMode&&(e=e||n.defaultEncoding)!==n.encoding&&(t=new i(t,e),e=""),h(this,n,t,e,!1)},f.prototype.unshift=function(t){return h(this,this._readableState,t,"",!0)},f.prototype.setEncoding=function(e){return o||(o=t("string_decoder/").StringDecoder),this._readableState.decoder=new o(e),this._readableState.encoding=e,this};var p=8388608;function d(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:isNaN(t)||u.isNull(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:t<=0?0:(t>e.highWaterMark&&(e.highWaterMark=function(t){if(t>=p)t=p;else{t--;for(var e=1;e<32;e<<=1)t|=t>>e;t++}return t}(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function g(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(l("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?n.nextTick(function(){v(t)}):v(t))}function v(t){l("emit readable"),t.emit("readable"),m(t)}function m(t){var e=t._readableState;if(l("flow",e.flowing),e.flowing)do{var n=t.read()}while(null!==n&&e.flowing)}function _(t,e){var n,r=e.buffer,a=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===r.length)return null;if(0===a)n=null;else if(s)n=r.shift();else if(!t||t>=a)n=o?r.join(""):i.concat(r,a),r.length=0;else{if(t<r[0].length)n=(f=r[0]).slice(0,t),r[0]=f.slice(t);else if(t===r[0].length)n=r.shift();else{n=o?"":new i(t);for(var u=0,l=0,c=r.length;l<c&&u<t;l++){var f=r[0],h=Math.min(t-u,f.length);o?n+=f.slice(0,h):f.copy(n,u,0,h),h<f.length?r[0]=f.slice(h):r.shift(),u+=h}}}return n}function w(t){var e=t._readableState;if(e.length>0)throw new Error("endReadable called on non-empty stream");e.endEmitted||(e.ended=!0,n.nextTick(function(){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}))}f.prototype.read=function(t){l("read",t);var e=this._readableState,n=t;if((!u.isNumber(t)||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return l("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?w(this):g(this),null;if(0===(t=d(t,e))&&e.ended)return 0===e.length&&w(this),null;var r,i=e.needReadable;return l("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&l("length less than watermark",i=!0),(e.ended||e.reading)&&l("reading or ended",i=!1),i&&(l("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),i&&!e.reading&&(t=d(n,e)),r=t>0?_(t,e):null,u.isNull(r)&&(e.needReadable=!0,t=0),e.length-=t,0!==e.length||e.ended||(e.needReadable=!0),n!==t&&e.ended&&0===e.length&&w(this),u.isNull(r)||this.emit("data",r),r},f.prototype._read=function(t){this.emit("error",new Error("not implemented"))},f.prototype.pipe=function(t,e){var i=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,l("pipe count=%d opts=%j",o.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?c:h;function u(t){l("onunpipe"),t===i&&h()}function c(){l("onend"),t.end()}o.endEmitted?n.nextTick(s):i.once("end",s),t.on("unpipe",u);var f=function(t){return function(){var e=t._readableState;l("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a.listenerCount(t,"data")&&(e.flowing=!0,m(t))}}(i);function h(){l("cleanup"),t.removeListener("close",g),t.removeListener("finish",v),t.removeListener("drain",f),t.removeListener("error",d),t.removeListener("unpipe",u),i.removeListener("end",c),i.removeListener("end",h),i.removeListener("data",p),!o.awaitDrain||t._writableState&&!t._writableState.needDrain||f()}function p(e){l("ondata"),!1===t.write(e)&&(l("false write response, pause",i._readableState.awaitDrain),i._readableState.awaitDrain++,i.pause())}function d(e){l("onerror",e),_(),t.removeListener("error",d),0===a.listenerCount(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",v),_()}function v(){l("onfinish"),t.removeListener("close",g),_()}function _(){l("unpipe"),i.unpipe(t)}return t.on("drain",f),i.on("data",p),t._events&&t._events.error?r(t._events.error)?t._events.error.unshift(d):t._events.error=[d,t._events.error]:t.on("error",d),t.once("close",g),t.once("finish",v),t.emit("pipe",i),o.flowing||(l("pipe resume"),i.resume()),t},f.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var n=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}return-1===(i=function(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}(e.pipes,t))?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},f.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e);if("data"===t&&!1!==this._readableState.flowing&&this.resume(),"readable"===t&&this.readable){var i=this._readableState;if(!i.readableListening)if(i.readableListening=!0,i.emittedReadable=!1,i.needReadable=!0,i.reading)i.length&&g(this);else{var a=this;n.nextTick(function(){l("readable nexttick read 0"),a.read(0)})}}return r},f.prototype.addListener=f.prototype.on,f.prototype.resume=function(){var t=this._readableState;return t.flowing||(l("resume"),t.flowing=!0,t.reading||(l("resume read 0"),this.read(0)),function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(function(){!function(t,e){e.resumeScheduled=!1,t.emit("resume"),m(t),e.flowing&&!e.reading&&t.read(0)}(t,e)}))}(this,t)),this},f.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this},f.prototype.wrap=function(t){var e=this._readableState,n=!1,r=this;for(var i in t.on("end",function(){if(l("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&r.push(t)}r.push(null)}),t.on("data",function(i){(l("wrapped data"),e.decoder&&(i=e.decoder.write(i)),i&&(e.objectMode||i.length))&&(r.push(i)||(n=!0,t.pause()))}),t)u.isFunction(t[i])&&u.isUndefined(this[i])&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));return function(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)}(["error","close","destroy","pause","resume"],function(e){t.on(e,r.emit.bind(r,e))}),r._read=function(e){l("wrapped _read",e),n&&(n=!1,t.resume())},r},f._fromList=_}).call(this,t("_process"))},{"./_stream_duplex":29,_process:94,buffer:4,"core-util-is":8,events:40,inherits:53,isarray:28,stream:108,"string_decoder/":35,util:3}],32:[function(t,e,n){e.exports=o;var r=t("./_stream_duplex"),i=t("core-util-is");function a(t,e){this.afterTransform=function(t,n){return function(t,e,n){var r=t._transformState;r.transforming=!1;var a=r.writecb;if(!a)return t.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,i.isNullOrUndefined(n)||t.push(n);a&&a(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function o(t){if(!(this instanceof o))return new o(t);r.call(this,t),this._transformState=new a(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("prefinish",function(){i.isFunction(this._flush)?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var n=t._writableState,r=t._transformState;if(n.length)throw new Error("calling transform done when ws.length != 0");if(r.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}i.inherits=t("inherits"),i.inherits(o,r),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,r.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,n){throw new Error("not implemented")},o.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;i.isNull(e.writechunk)||!e.writecb||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))}},{"./_stream_duplex":29,"core-util-is":8,inherits:53}],33:[function(t,e,n){(function(n){e.exports=s;var r=t("buffer").Buffer;s.WritableState=o;var i=t("core-util-is");i.inherits=t("inherits");var a=t("stream");function o(e,r){var i=t("./_stream_duplex"),a=(e=e||{}).highWaterMark,o=e.objectMode?16:16384;this.highWaterMark=a||0===a?a:o,this.objectMode=!!e.objectMode,r instanceof i&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,a=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,a){r?n.nextTick(function(){e.pendingcb--,a(i)}):(e.pendingcb--,a(i));t._writableState.errorEmitted=!0,t.emit("error",i)}(t,r,i,e,a);else{var o=f(t,r);o||r.corked||r.bufferProcessing||!r.buffer.length||c(t,r),i?n.nextTick(function(){l(t,r,o,a)}):l(t,r,o,a)}}(r,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1}function s(e){var n=t("./_stream_duplex");if(!(this instanceof s||this instanceof n))return new s(e);this._writableState=new o(e,this),this.writable=!0,a.call(this)}function u(t,e,n,r,i,a,o){e.writelen=r,e.writecb=o,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,a,e.onwrite),e.sync=!1}function l(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),p(t,e)}function c(t,e){if(e.bufferProcessing=!0,t._writev&&e.buffer.length>1){for(var n=[],r=0;r<e.buffer.length;r++)n.push(e.buffer[r].callback);e.pendingcb++,u(t,e,!0,e.length,e.buffer,"",function(t){for(var r=0;r<n.length;r++)e.pendingcb--,n[r](t)}),e.buffer=[]}else{for(r=0;r<e.buffer.length;r++){var i=e.buffer[r],a=i.chunk,o=i.encoding,s=i.callback,l=e.objectMode?1:a.length;if(u(t,e,!1,l,a,o,s),e.writing){r++;break}}r<e.buffer.length?e.buffer=e.buffer.slice(r):e.buffer.length=0}e.bufferProcessing=!1}function f(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function h(t,e){e.prefinished||(e.prefinished=!0,t.emit("prefinish"))}function p(t,e){var n=f(0,e);return n&&(0===e.pendingcb?(h(t,e),e.finished=!0,t.emit("finish")):h(t,e)),n}i.inherits(s,a),s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},s.prototype.write=function(t,e,a){var o=this._writableState,s=!1;return i.isFunction(e)&&(a=e,e=null),i.isBuffer(t)?e="buffer":e||(e=o.defaultEncoding),i.isFunction(a)||(a=function(){}),o.ended?function(t,e,r){var i=new Error("write after end");t.emit("error",i),n.nextTick(function(){r(i)})}(this,0,a):function(t,e,r,a){var o=!0;if(!(i.isBuffer(r)||i.isString(r)||i.isNullOrUndefined(r)||e.objectMode)){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),n.nextTick(function(){a(s)}),o=!1}return o}(this,o,t,a)&&(o.pendingcb++,s=function(t,e,n,a,o){n=function(t,e,n){return!t.objectMode&&!1!==t.decodeStrings&&i.isString(e)&&(e=new r(e,n)),e}(e,n,a),i.isBuffer(n)&&(a="buffer");var s=e.objectMode?1:n.length;e.length+=s;var l=e.length<e.highWaterMark;l||(e.needDrain=!0);e.writing||e.corked?e.buffer.push(new function(t,e,n){this.chunk=t,this.encoding=e,this.callback=n}(n,a,o)):u(t,e,!1,s,n,a,o);return l}(this,o,t,e,a)),s},s.prototype.cork=function(){this._writableState.corked++},s.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.buffer.length||c(this,t))},s.prototype._write=function(t,e,n){n(new Error("not implemented"))},s.prototype._writev=null,s.prototype.end=function(t,e,r){var a=this._writableState;i.isFunction(t)?(r=t,t=null,e=null):i.isFunction(e)&&(r=e,e=null),i.isNullOrUndefined(t)||this.write(t,e),a.corked&&(a.corked=1,this.uncork()),a.ending||a.finished||function(t,e,r){e.ending=!0,p(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0}(this,a,r)}}).call(this,t("_process"))},{"./_stream_duplex":29,_process:94,buffer:4,"core-util-is":8,inherits:53,stream:108}],34:[function(t,e,n){(function(r){(n=e.exports=t("./lib/_stream_readable.js")).Stream=t("stream"),n.Readable=n,n.Writable=t("./lib/_stream_writable.js"),n.Duplex=t("./lib/_stream_duplex.js"),n.Transform=t("./lib/_stream_transform.js"),n.PassThrough=t("./lib/_stream_passthrough.js"),r.browser||"disable"!==r.env.READABLE_STREAM||(e.exports=t("stream"))}).call(this,t("_process"))},{"./lib/_stream_duplex.js":29,"./lib/_stream_passthrough.js":30,"./lib/_stream_readable.js":31,"./lib/_stream_transform.js":32,"./lib/_stream_writable.js":33,_process:94,stream:108}],35:[function(t,e,n){var r=t("buffer").Buffer,i=r.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};var a=n.StringDecoder=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!i(t))throw new Error("Unknown encoding: "+t)}(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=s;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=u;break;default:return void(this.write=o)}this.charBuffer=new r(6),this.charReceived=0,this.charLength=0};function o(t){return t.toString(this.encoding)}function s(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function u(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}a.prototype.write=function(t){for(var e="";this.charLength;){var n=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return"";if(t=t.slice(n,t.length),!((i=(e=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(e.length-1))>=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var r=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,r),r-=this.charReceived);var i;r=(e+=t.toString(this.encoding,0,r)).length-1;if((i=e.charCodeAt(r))>=55296&&i<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),t.copy(this.charBuffer,0,0,a),e.substring(0,r)}return e},a.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var n=t[t.length-e];if(1==e&&n>>5==6){this.charLength=2;break}if(e<=2&&n>>4==14){this.charLength=3;break}if(e<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=e},a.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;e+=r.slice(0,n).toString(i)}return e}},{buffer:4}],36:[function(t,e,n){(function(n){"use strict";function r(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,i=0,a=Math.min(n,r);i<a;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0}function i(t){return n.Buffer&&"function"==typeof n.Buffer.isBuffer?n.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var a=t("util/"),o=Object.prototype.hasOwnProperty,s=Array.prototype.slice,u="foo"===function(){}.name;function l(t){return Object.prototype.toString.call(t)}function c(t){return!i(t)&&("function"==typeof n.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var f=e.exports=m,h=/\s*function\s+([^\(\s]*)\s*/;function p(t){if(a.isFunction(t)){if(u)return t.name;var e=t.toString().match(h);return e&&e[1]}}function d(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function g(t){if(u||!a.isFunction(t))return a.inspect(t);var e=p(t);return"[Function"+(e?": "+e:"")+"]"}function v(t,e,n,r,i){throw new f.AssertionError({message:n,actual:t,expected:e,operator:r,stackStartFunction:i})}function m(t,e){t||v(t,!0,e,"==",f.ok)}function _(t,e,n,o){if(t===e)return!0;if(i(t)&&i(e))return 0===r(t,e);if(a.isDate(t)&&a.isDate(e))return t.getTime()===e.getTime();if(a.isRegExp(t)&&a.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(c(t)&&c(e)&&l(t)===l(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===r(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;var u=(o=o||{actual:[],expected:[]}).actual.indexOf(t);return-1!==u&&u===o.expected.indexOf(e)||(o.actual.push(t),o.expected.push(e),function(t,e,n,r){if(null===t||void 0===t||null===e||void 0===e)return!1;if(a.isPrimitive(t)||a.isPrimitive(e))return t===e;if(n&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=w(t),o=w(e);if(i&&!o||!i&&o)return!1;if(i)return t=s.call(t),e=s.call(e),_(t,e,n);var u,l,c=x(t),f=x(e);if(c.length!==f.length)return!1;for(c.sort(),f.sort(),l=c.length-1;l>=0;l--)if(c[l]!==f[l])return!1;for(l=c.length-1;l>=0;l--)if(u=c[l],!_(t[u],e[u],n,r))return!1;return!0}(t,e,n,o))}return n?t===e:t==e}function w(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function b(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function y(t,e,n,r){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&v(i,n,"Missing expected exception"+r);var o="string"==typeof r,s=!t&&a.isError(i),u=!t&&i&&!n;if((s&&o&&b(i,n)||u)&&v(i,n,"Got unwanted exception"+r),t&&i&&n&&!b(i,n)||!t&&i)throw i}f.AssertionError=function(t){var e;this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=d(g((e=this).actual),128)+" "+e.operator+" "+d(g(e.expected),128),this.generatedMessage=!0);var n=t.stackStartFunction||v;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var i=r.stack,a=p(n),o=i.indexOf("\n"+a);if(o>=0){var s=i.indexOf("\n",o+1);i=i.substring(s+1)}this.stack=i}}},a.inherits(f.AssertionError,Error),f.fail=v,f.ok=m,f.equal=function(t,e,n){t!=e&&v(t,e,n,"==",f.equal)},f.notEqual=function(t,e,n){t==e&&v(t,e,n,"!=",f.notEqual)},f.deepEqual=function(t,e,n){_(t,e,!1)||v(t,e,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(t,e,n){_(t,e,!0)||v(t,e,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(t,e,n){_(t,e,!1)&&v(t,e,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function t(e,n,r){_(e,n,!0)&&v(e,n,r,"notDeepStrictEqual",t)},f.strictEqual=function(t,e,n){t!==e&&v(t,e,n,"===",f.strictEqual)},f.notStrictEqual=function(t,e,n){t===e&&v(t,e,n,"!==",f.notStrictEqual)},f.throws=function(t,e,n){y(!0,t,e,n)},f.doesNotThrow=function(t,e,n){y(!1,t,e,n)},f.ifError=function(t){if(t)throw t};var x=Object.keys||function(t){var e=[];for(var n in t)o.call(t,n)&&e.push(n);return e}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":132}],37:[function(t,e,n){(function(e,r){"use strict";var i=t("assert"),a=t("pako/lib/zlib/zstream"),o=t("pako/lib/zlib/deflate.js"),s=t("pako/lib/zlib/inflate.js"),u=t("pako/lib/zlib/constants");for(var l in u)n[l]=u[l];n.NONE=0,n.DEFLATE=1,n.INFLATE=2,n.GZIP=3,n.GUNZIP=4,n.DEFLATERAW=5,n.INFLATERAW=6,n.UNZIP=7;function c(t){if("number"!=typeof t||t<n.DEFLATE||t>n.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=t,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}c.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,i(this.init_done,"close before init"),i(this.mode<=n.UNZIP),this.mode===n.DEFLATE||this.mode===n.GZIP||this.mode===n.DEFLATERAW?o.deflateEnd(this.strm):this.mode!==n.INFLATE&&this.mode!==n.GUNZIP&&this.mode!==n.INFLATERAW&&this.mode!==n.UNZIP||s.inflateEnd(this.strm),this.mode=n.NONE,this.dictionary=null)},c.prototype.write=function(t,e,n,r,i,a,o){return this._write(!0,t,e,n,r,i,a,o)},c.prototype.writeSync=function(t,e,n,r,i,a,o){return this._write(!1,t,e,n,r,i,a,o)},c.prototype._write=function(t,a,o,s,u,l,c,f){if(i.equal(arguments.length,8),i(this.init_done,"write before init"),i(this.mode!==n.NONE,"already finalized"),i.equal(!1,this.write_in_progress,"write already in progress"),i.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,i.equal(!1,void 0===a,"must provide flush value"),this.write_in_progress=!0,a!==n.Z_NO_FLUSH&&a!==n.Z_PARTIAL_FLUSH&&a!==n.Z_SYNC_FLUSH&&a!==n.Z_FULL_FLUSH&&a!==n.Z_FINISH&&a!==n.Z_BLOCK)throw new Error("Invalid flush value");if(null==o&&(o=r.alloc(0),u=0,s=0),this.strm.avail_in=u,this.strm.input=o,this.strm.next_in=s,this.strm.avail_out=f,this.strm.output=l,this.strm.next_out=c,this.flush=a,!t)return this._process(),this._checkError()?this._afterSync():void 0;var h=this;return e.nextTick(function(){h._process(),h._after()}),this},c.prototype._afterSync=function(){var t=this.strm.avail_out,e=this.strm.avail_in;return this.write_in_progress=!1,[e,t]},c.prototype._process=function(){var t=null;switch(this.mode){case n.DEFLATE:case n.GZIP:case n.DEFLATERAW:this.err=o.deflate(this.strm,this.flush);break;case n.UNZIP:switch(this.strm.avail_in>0&&(t=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===t)break;if(31!==this.strm.input[t]){this.mode=n.INFLATE;break}if(this.gzip_id_bytes_read=1,t++,1===this.strm.avail_in)break;case 1:if(null===t)break;139===this.strm.input[t]?(this.gzip_id_bytes_read=2,this.mode=n.GUNZIP):this.mode=n.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case n.INFLATE:case n.GUNZIP:case n.INFLATERAW:for(this.err=s.inflate(this.strm,this.flush),this.err===n.Z_NEED_DICT&&this.dictionary&&(this.err=s.inflateSetDictionary(this.strm,this.dictionary),this.err===n.Z_OK?this.err=s.inflate(this.strm,this.flush):this.err===n.Z_DATA_ERROR&&(this.err=n.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===n.GUNZIP&&this.err===n.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=s.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},c.prototype._checkError=function(){switch(this.err){case n.Z_OK:case n.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===n.Z_FINISH)return this._error("unexpected end of file"),!1;break;case n.Z_STREAM_END:break;case n.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},c.prototype._after=function(){if(this._checkError()){var t=this.strm.avail_out,e=this.strm.avail_in;this.write_in_progress=!1,this.callback(e,t),this.pending_close&&this.close()}},c.prototype._error=function(t){this.strm.msg&&(t=this.strm.msg),this.onerror(t,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},c.prototype.init=function(t,e,r,a,o){i(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),i(t>=8&&t<=15,"invalid windowBits"),i(e>=-1&&e<=9,"invalid compression level"),i(r>=1&&r<=9,"invalid memlevel"),i(a===n.Z_FILTERED||a===n.Z_HUFFMAN_ONLY||a===n.Z_RLE||a===n.Z_FIXED||a===n.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(e,t,r,a,o),this._setDictionary()},c.prototype.params=function(){throw new Error("deflateParams Not supported")},c.prototype.reset=function(){this._reset(),this._setDictionary()},c.prototype._init=function(t,e,r,i,u){switch(this.level=t,this.windowBits=e,this.memLevel=r,this.strategy=i,this.flush=n.Z_NO_FLUSH,this.err=n.Z_OK,this.mode!==n.GZIP&&this.mode!==n.GUNZIP||(this.windowBits+=16),this.mode===n.UNZIP&&(this.windowBits+=32),this.mode!==n.DEFLATERAW&&this.mode!==n.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new a,this.mode){case n.DEFLATE:case n.GZIP:case n.DEFLATERAW:this.err=o.deflateInit2(this.strm,this.level,n.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case n.INFLATE:case n.GUNZIP:case n.INFLATERAW:case n.UNZIP:this.err=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==n.Z_OK&&this._error("Init error"),this.dictionary=u,this.write_in_progress=!1,this.init_done=!0},c.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=n.Z_OK,this.mode){case n.DEFLATE:case n.DEFLATERAW:this.err=o.deflateSetDictionary(this.strm,this.dictionary)}this.err!==n.Z_OK&&this._error("Failed to set dictionary")}},c.prototype._reset=function(){switch(this.err=n.Z_OK,this.mode){case n.DEFLATE:case n.DEFLATERAW:case n.GZIP:this.err=o.deflateReset(this.strm);break;case n.INFLATE:case n.INFLATERAW:case n.GUNZIP:this.err=s.inflateReset(this.strm)}this.err!==n.Z_OK&&this._error("Failed to reset stream")},n.Zlib=c}).call(this,t("_process"),t("buffer").Buffer)},{_process:94,assert:36,buffer:4,"pako/lib/zlib/constants":43,"pako/lib/zlib/deflate.js":45,"pako/lib/zlib/inflate.js":47,"pako/lib/zlib/zstream":51}],38:[function(t,e,n){(function(e){"use strict";var r=t("buffer").Buffer,i=t("stream").Transform,a=t("./binding"),o=t("util"),s=t("assert").ok,u=t("buffer").kMaxLength,l="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";a.Z_MIN_WINDOWBITS=8,a.Z_MAX_WINDOWBITS=15,a.Z_DEFAULT_WINDOWBITS=15,a.Z_MIN_CHUNK=64,a.Z_MAX_CHUNK=1/0,a.Z_DEFAULT_CHUNK=16384,a.Z_MIN_MEMLEVEL=1,a.Z_MAX_MEMLEVEL=9,a.Z_DEFAULT_MEMLEVEL=8,a.Z_MIN_LEVEL=-1,a.Z_MAX_LEVEL=9,a.Z_DEFAULT_LEVEL=a.Z_DEFAULT_COMPRESSION;for(var c=Object.keys(a),f=0;f<c.length;f++){var h=c[f];h.match(/^Z/)&&Object.defineProperty(n,h,{enumerable:!0,value:a[h],writable:!1})}for(var p={Z_OK:a.Z_OK,Z_STREAM_END:a.Z_STREAM_END,Z_NEED_DICT:a.Z_NEED_DICT,Z_ERRNO:a.Z_ERRNO,Z_STREAM_ERROR:a.Z_STREAM_ERROR,Z_DATA_ERROR:a.Z_DATA_ERROR,Z_MEM_ERROR:a.Z_MEM_ERROR,Z_BUF_ERROR:a.Z_BUF_ERROR,Z_VERSION_ERROR:a.Z_VERSION_ERROR},d=Object.keys(p),g=0;g<d.length;g++){var v=d[g];p[p[v]]=v}function m(t,e,n){var i=[],a=0;function o(){for(var e;null!==(e=t.read());)i.push(e),a+=e.length;t.once("readable",o)}function s(){var e,o=null;a>=u?o=new RangeError(l):e=r.concat(i,a),i=[],t.close(),n(o,e)}t.on("error",function(e){t.removeListener("end",s),t.removeListener("readable",o),n(e)}),t.on("end",s),t.end(e),o()}function _(t,e){if("string"==typeof e&&(e=r.from(e)),!r.isBuffer(e))throw new TypeError("Not a string or buffer");var n=t._finishFlushFlag;return t._processChunk(e,n)}function w(t){if(!(this instanceof w))return new w(t);M.call(this,t,a.DEFLATE)}function b(t){if(!(this instanceof b))return new b(t);M.call(this,t,a.INFLATE)}function y(t){if(!(this instanceof y))return new y(t);M.call(this,t,a.GZIP)}function x(t){if(!(this instanceof x))return new x(t);M.call(this,t,a.GUNZIP)}function k(t){if(!(this instanceof k))return new k(t);M.call(this,t,a.DEFLATERAW)}function E(t){if(!(this instanceof E))return new E(t);M.call(this,t,a.INFLATERAW)}function S(t){if(!(this instanceof S))return new S(t);M.call(this,t,a.UNZIP)}function A(t){return t===a.Z_NO_FLUSH||t===a.Z_PARTIAL_FLUSH||t===a.Z_SYNC_FLUSH||t===a.Z_FULL_FLUSH||t===a.Z_FINISH||t===a.Z_BLOCK}function M(t,e){var o=this;if(this._opts=t=t||{},this._chunkSize=t.chunkSize||n.Z_DEFAULT_CHUNK,i.call(this,t),t.flush&&!A(t.flush))throw new Error("Invalid flush flag: "+t.flush);if(t.finishFlush&&!A(t.finishFlush))throw new Error("Invalid flush flag: "+t.finishFlush);if(this._flushFlag=t.flush||a.Z_NO_FLUSH,this._finishFlushFlag=void 0!==t.finishFlush?t.finishFlush:a.Z_FINISH,t.chunkSize&&(t.chunkSize<n.Z_MIN_CHUNK||t.chunkSize>n.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBits<n.Z_MIN_WINDOWBITS||t.windowBits>n.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.level<n.Z_MIN_LEVEL||t.level>n.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevel<n.Z_MIN_MEMLEVEL||t.memLevel>n.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+t.memLevel);if(t.strategy&&t.strategy!=n.Z_FILTERED&&t.strategy!=n.Z_HUFFMAN_ONLY&&t.strategy!=n.Z_RLE&&t.strategy!=n.Z_FIXED&&t.strategy!=n.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!r.isBuffer(t.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new a.Zlib(e);var s=this;this._hadError=!1,this._handle.onerror=function(t,e){T(s),s._hadError=!0;var r=new Error(t);r.errno=e,r.code=n.codes[e],s.emit("error",r)};var u=n.Z_DEFAULT_COMPRESSION;"number"==typeof t.level&&(u=t.level);var l=n.Z_DEFAULT_STRATEGY;"number"==typeof t.strategy&&(l=t.strategy),this._handle.init(t.windowBits||n.Z_DEFAULT_WINDOWBITS,u,t.memLevel||n.Z_DEFAULT_MEMLEVEL,l,t.dictionary),this._buffer=r.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=l,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!o._handle},configurable:!0,enumerable:!0})}function T(t,n){n&&e.nextTick(n),t._handle&&(t._handle.close(),t._handle=null)}function I(t){t.emit("close")}Object.defineProperty(n,"codes",{enumerable:!0,value:Object.freeze(p),writable:!1}),n.Deflate=w,n.Inflate=b,n.Gzip=y,n.Gunzip=x,n.DeflateRaw=k,n.InflateRaw=E,n.Unzip=S,n.createDeflate=function(t){return new w(t)},n.createInflate=function(t){return new b(t)},n.createDeflateRaw=function(t){return new k(t)},n.createInflateRaw=function(t){return new E(t)},n.createGzip=function(t){return new y(t)},n.createGunzip=function(t){return new x(t)},n.createUnzip=function(t){return new S(t)},n.deflate=function(t,e,n){return"function"==typeof e&&(n=e,e={}),m(new w(e),t,n)},n.deflateSync=function(t,e){return _(new w(e),t)},n.gzip=function(t,e,n){return"function"==typeof e&&(n=e,e={}),m(new y(e),t,n)},n.gzipSync=function(t,e){return _(new y(e),t)},n.deflateRaw=function(t,e,n){return"function"==typeof e&&(n=e,e={}),m(new k(e),t,n)},n.deflateRawSync=function(t,e){return _(new k(e),t)},n.unzip=function(t,e,n){return"function"==typeof e&&(n=e,e={}),m(new S(e),t,n)},n.unzipSync=function(t,e){return _(new S(e),t)},n.inflate=function(t,e,n){return"function"==typeof e&&(n=e,e={}),m(new b(e),t,n)},n.inflateSync=function(t,e){return _(new b(e),t)},n.gunzip=function(t,e,n){return"function"==typeof e&&(n=e,e={}),m(new x(e),t,n)},n.gunzipSync=function(t,e){return _(new x(e),t)},n.inflateRaw=function(t,e,n){return"function"==typeof e&&(n=e,e={}),m(new E(e),t,n)},n.inflateRawSync=function(t,e){return _(new E(e),t)},o.inherits(M,i),M.prototype.params=function(t,r,i){if(t<n.Z_MIN_LEVEL||t>n.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+t);if(r!=n.Z_FILTERED&&r!=n.Z_HUFFMAN_ONLY&&r!=n.Z_RLE&&r!=n.Z_FIXED&&r!=n.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==t||this._strategy!==r){var o=this;this.flush(a.Z_SYNC_FLUSH,function(){s(o._handle,"zlib binding closed"),o._handle.params(t,r),o._hadError||(o._level=t,o._strategy=r,i&&i())})}else e.nextTick(i)},M.prototype.reset=function(){return s(this._handle,"zlib binding closed"),this._handle.reset()},M.prototype._flush=function(t){this._transform(r.alloc(0),"",t)},M.prototype.flush=function(t,n){var i=this,o=this._writableState;("function"==typeof t||void 0===t&&!n)&&(n=t,t=a.Z_FULL_FLUSH),o.ended?n&&e.nextTick(n):o.ending?n&&this.once("end",n):o.needDrain?n&&this.once("drain",function(){return i.flush(t,n)}):(this._flushFlag=t,this.write(r.alloc(0),"",n))},M.prototype.close=function(t){T(this,t),e.nextTick(I,this)},M.prototype._transform=function(t,e,n){var i,o=this._writableState,s=(o.ending||o.ended)&&(!t||o.length===t.length);return null===t||r.isBuffer(t)?this._handle?(s?i=this._finishFlushFlag:(i=this._flushFlag,t.length>=o.length&&(this._flushFlag=this._opts.flush||a.Z_NO_FLUSH)),void this._processChunk(t,i,n)):n(new Error("zlib binding closed")):n(new Error("invalid input"))},M.prototype._processChunk=function(t,e,n){var i=t&&t.length,a=this._chunkSize-this._offset,o=0,c=this,f="function"==typeof n;if(!f){var h,p=[],d=0;this.on("error",function(t){h=t}),s(this._handle,"zlib binding closed");do{var g=this._handle.writeSync(e,t,o,i,this._buffer,this._offset,a)}while(!this._hadError&&_(g[0],g[1]));if(this._hadError)throw h;if(d>=u)throw T(this),new RangeError(l);var v=r.concat(p,d);return T(this),v}s(this._handle,"zlib binding closed");var m=this._handle.write(e,t,o,i,this._buffer,this._offset,a);function _(u,l){if(this&&(this.buffer=null,this.callback=null),!c._hadError){var h=a-l;if(s(h>=0,"have should not go down"),h>0){var g=c._buffer.slice(c._offset,c._offset+h);c._offset+=h,f?c.push(g):(p.push(g),d+=g.length)}if((0===l||c._offset>=c._chunkSize)&&(a=c._chunkSize,c._offset=0,c._buffer=r.allocUnsafe(c._chunkSize)),0===l){if(o+=i-u,i=u,!f)return!0;var v=c._handle.write(e,t,o,i,c._buffer,c._offset,c._chunkSize);return v.callback=_,void(v.buffer=t)}if(!f)return!1;n()}}m.buffer=t,m.callback=_},o.inherits(w,M),o.inherits(b,M),o.inherits(y,M),o.inherits(x,M),o.inherits(k,M),o.inherits(E,M),o.inherits(S,M)}).call(this,t("_process"))},{"./binding":37,_process:94,assert:36,buffer:4,stream:108,util:132}],39:[function(t,e,n){arguments[4][3][0].apply(n,arguments)},{dup:3}],40:[function(t,e,n){var r=Object.create||function(t){var e=function(){};return e.prototype=t,new e},i=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return n},a=Function.prototype.bind||function(t){var e=this;return function(){return e.apply(t,arguments)}};function o(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=r(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0;var s,u=10;try{var l={};Object.defineProperty&&Object.defineProperty(l,"x",{value:0}),s=0===l.x}catch(t){s=!1}function c(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function f(t,e,n,i){var a,o,s;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((o=t._events)?(o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),s=o[e]):(o=t._events=r(null),t._eventsCount=0),s){if("function"==typeof s?s=o[e]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),!s.warned&&(a=c(t))&&a>0&&s.length>a){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",u.name,u.message)}}else s=o[e]=n,++t._eventsCount;return t}function h(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e<t.length;++e)t[e]=arguments[e];this.listener.apply(this.target,t)}}function p(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=a.call(h,r);return i.listener=n,r.wrapFn=i,i}function d(t,e,n){var r=t._events;if(!r)return[];var i=r[e];return i?"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):v(i,i.length):[]}function g(t){var e=this._events;if(e){var n=e[t];if("function"==typeof n)return 1;if(n)return n.length}return 0}function v(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}s?Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t||t<0||t!=t)throw new TypeError('"defaultMaxListeners" must be a positive number');u=t}}):o.defaultMaxListeners=u,o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(t){var e,n,r,i,a,o,s="error"===t;if(o=this._events)s=s&&null==o.error;else if(!s)return!1;if(s){if(arguments.length>1&&(e=arguments[1]),e instanceof Error)throw e;var u=new Error('Unhandled "error" event. ('+e+")");throw u.context=e,u}if(!(n=o[t]))return!1;var l="function"==typeof n;switch(r=arguments.length){case 1:!function(t,e,n){if(e)t.call(n);else for(var r=t.length,i=v(t,r),a=0;a<r;++a)i[a].call(n)}(n,l,this);break;case 2:!function(t,e,n,r){if(e)t.call(n,r);else for(var i=t.length,a=v(t,i),o=0;o<i;++o)a[o].call(n,r)}(n,l,this,arguments[1]);break;case 3:!function(t,e,n,r,i){if(e)t.call(n,r,i);else for(var a=t.length,o=v(t,a),s=0;s<a;++s)o[s].call(n,r,i)}(n,l,this,arguments[1],arguments[2]);break;case 4:!function(t,e,n,r,i,a){if(e)t.call(n,r,i,a);else for(var o=t.length,s=v(t,o),u=0;u<o;++u)s[u].call(n,r,i,a)}(n,l,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(r-1),a=1;a<r;a++)i[a-1]=arguments[a];!function(t,e,n,r){if(e)t.apply(n,r);else for(var i=t.length,a=v(t,i),o=0;o<i;++o)a[o].apply(n,r)}(n,l,this,i)}return!0},o.prototype.addListener=function(t,e){return f(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return f(this,t,e,!0)},o.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,p(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,p(this,t,e)),this},o.prototype.removeListener=function(t,e){var n,i,a,o,s;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(i=this._events))return this;if(!(n=i[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=r(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(a=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){s=n[o].listener,a=o;break}if(a<0)return this;0===a?n.shift():function(t,e){for(var n=e,r=n+1,i=t.length;r<i;n+=1,r+=1)t[n]=t[r];t.pop()}(n,a),1===n.length&&(i[t]=n[0]),i.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.removeAllListeners=function(t){var e,n,a;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=r(null),this._eventsCount=0):n[t]&&(0==--this._eventsCount?this._events=r(null):delete n[t]),this;if(0===arguments.length){var o,s=i(n);for(a=0;a<s.length;++a)"removeListener"!==(o=s[a])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=r(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(e)for(a=e.length-1;a>=0;a--)this.removeListener(t,e[a]);return this},o.prototype.listeners=function(t){return d(this,t,!0)},o.prototype.rawListeners=function(t){return d(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},o.prototype.listenerCount=g,o.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],41:[function(t,e,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}n.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)i(n,r)&&(t[r]=n[r])}}return t},n.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var a={arraySet:function(t,e,n,r,i){if(e.subarray&&t.subarray)t.set(e.subarray(n,n+r),i);else for(var a=0;a<r;a++)t[i+a]=e[n+a]},flattenChunks:function(t){var e,n,r,i,a,o;for(r=0,e=0,n=t.length;e<n;e++)r+=t[e].length;for(o=new Uint8Array(r),i=0,e=0,n=t.length;e<n;e++)a=t[e],o.set(a,i),i+=a.length;return o}},o={arraySet:function(t,e,n,r,i){for(var a=0;a<r;a++)t[i+a]=e[n+a]},flattenChunks:function(t){return[].concat.apply([],t)}};n.setTyped=function(t){t?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,a)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,o))},n.setTyped(r)},{}],42:[function(t,e,n){"use strict";e.exports=function(t,e,n,r){for(var i=65535&t|0,a=t>>>16&65535|0,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{a=a+(i=i+e[r++]|0)|0}while(--o);i%=65521,a%=65521}return i|a<<16|0}},{}],43:[function(t,e,n){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],44:[function(t,e,n){"use strict";var r=function(){for(var t,e=[],n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=1&t?3988292384^t>>>1:t>>>1;e[n]=t}return e}();e.exports=function(t,e,n,i){var a=r,o=i+n;t^=-1;for(var s=i;s<o;s++)t=t>>>8^a[255&(t^e[s])];return-1^t}},{}],45:[function(t,e,n){"use strict";var r,i=t("../utils/common"),a=t("./trees"),o=t("./adler32"),s=t("./crc32"),u=t("./messages"),l=0,c=1,f=3,h=4,p=5,d=0,g=1,v=-2,m=-3,_=-5,w=-1,b=1,y=2,x=3,k=4,E=0,S=2,A=8,M=9,T=15,I=8,j=286,R=30,L=19,C=2*j+1,B=15,D=3,z=258,O=z+D+1,F=32,P=42,U=69,N=73,q=91,V=103,Z=113,W=666,G=1,H=2,Y=3,$=4,X=3;function K(t,e){return t.msg=u[e],e}function J(t){return(t<<1)-(t>4?9:0)}function Q(t){for(var e=t.length;--e>=0;)t[e]=0}function tt(t){var e=t.state,n=e.pending;n>t.avail_out&&(n=t.avail_out),0!==n&&(i.arraySet(t.output,e.pending_buf,e.pending_out,n,t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,0===e.pending&&(e.pending_out=0))}function et(t,e){a._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,tt(t.strm)}function nt(t,e){t.pending_buf[t.pending++]=e}function rt(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function it(t,e){var n,r,i=t.max_chain_length,a=t.strstart,o=t.prev_length,s=t.nice_match,u=t.strstart>t.w_size-O?t.strstart-(t.w_size-O):0,l=t.window,c=t.w_mask,f=t.prev,h=t.strstart+z,p=l[a+o-1],d=l[a+o];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(l[(n=e)+o]===d&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do{}while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&a<h);if(r=z-(h-a),a=h-z,r>o){if(t.match_start=e,o=r,r>=s)break;p=l[a+o-1],d=l[a+o]}}}while((e=f[e&c])>u&&0!=--i);return o<=t.lookahead?o:t.lookahead}function at(t){var e,n,r,a,u,l,c,f,h,p,d=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-O)){i.arraySet(t.window,t.window,d,d,0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=n=t.hash_size;do{r=t.head[--e],t.head[e]=r>=d?r-d:0}while(--n);e=n=d;do{r=t.prev[--e],t.prev[e]=r>=d?r-d:0}while(--n);a+=d}if(0===t.strm.avail_in)break;if(l=t.strm,c=t.window,f=t.strstart+t.lookahead,h=a,p=void 0,(p=l.avail_in)>h&&(p=h),n=0===p?0:(l.avail_in-=p,i.arraySet(c,l.input,l.next_in,p,f),1===l.state.wrap?l.adler=o(l.adler,c,p,f):2===l.state.wrap&&(l.adler=s(l.adler,c,p,f)),l.next_in+=p,l.total_in+=p,p),t.lookahead+=n,t.lookahead+t.insert>=D)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+D-1])&t.hash_mask,t.prev[u&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=u,u++,t.insert--,!(t.lookahead+t.insert<D)););}while(t.lookahead<O&&0!==t.strm.avail_in)}function ot(t,e){for(var n,r;;){if(t.lookahead<O){if(at(t),t.lookahead<O&&e===l)return G;if(0===t.lookahead)break}if(n=0,t.lookahead>=D&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+D-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==n&&t.strstart-n<=t.w_size-O&&(t.match_length=it(t,n)),t.match_length>=D)if(r=a._tr_tally(t,t.strstart-t.match_start,t.match_length-D),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=D){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+D-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else r=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(et(t,!1),0===t.strm.avail_out))return G}return t.insert=t.strstart<D-1?t.strstart:D-1,e===h?(et(t,!0),0===t.strm.avail_out?Y:$):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?G:H}function st(t,e){for(var n,r,i;;){if(t.lookahead<O){if(at(t),t.lookahead<O&&e===l)return G;if(0===t.lookahead)break}if(n=0,t.lookahead>=D&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+D-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=D-1,0!==n&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-O&&(t.match_length=it(t,n),t.match_length<=5&&(t.strategy===b||t.match_length===D&&t.strstart-t.match_start>4096)&&(t.match_length=D-1)),t.prev_length>=D&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-D,r=a._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-D),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+D-1])&t.hash_mask,n=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=D-1,t.strstart++,r&&(et(t,!1),0===t.strm.avail_out))return G}else if(t.match_available){if((r=a._tr_tally(t,0,t.window[t.strstart-1]))&&et(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return G}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=a._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<D-1?t.strstart:D-1,e===h?(et(t,!0),0===t.strm.avail_out?Y:$):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?G:H}function ut(t,e,n,r,i){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=r,this.func=i}function lt(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=S,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?P:Z,t.adler=2===e.wrap?0:1,e.last_flush=l,a._tr_init(e),d):K(t,v)}function ct(t){var e,n=lt(t);return n===d&&((e=t.state).window_size=2*e.w_size,Q(e.head),e.max_lazy_match=r[e.level].max_lazy,e.good_match=r[e.level].good_length,e.nice_match=r[e.level].nice_length,e.max_chain_length=r[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=D-1,e.match_available=0,e.ins_h=0),n}function ft(t,e,n,r,a,o){if(!t)return v;var s=1;if(e===w&&(e=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),a<1||a>M||n!==A||r<8||r>15||e<0||e>9||o<0||o>k)return K(t,v);8===r&&(r=9);var u=new function(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=A,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*C),this.dyn_dtree=new i.Buf16(2*(2*R+1)),this.bl_tree=new i.Buf16(2*(2*L+1)),Q(this.dyn_ltree),Q(this.dyn_dtree),Q(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(B+1),this.heap=new i.Buf16(2*j+1),Q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*j+1),Q(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0};return t.state=u,u.strm=t,u.wrap=s,u.gzhead=null,u.w_bits=r,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=a+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+D-1)/D),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<a+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=o,u.method=n,ct(t)}r=[new ut(0,0,0,0,function(t,e){var n=65535;for(n>t.pending_buf_size-5&&(n=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&e===l)return G;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var r=t.block_start+n;if((0===t.strstart||t.strstart>=r)&&(t.lookahead=t.strstart-r,t.strstart=r,et(t,!1),0===t.strm.avail_out))return G;if(t.strstart-t.block_start>=t.w_size-O&&(et(t,!1),0===t.strm.avail_out))return G}return t.insert=0,e===h?(et(t,!0),0===t.strm.avail_out?Y:$):(t.strstart>t.block_start&&(et(t,!1),t.strm.avail_out),G)}),new ut(4,4,8,4,ot),new ut(4,5,16,8,ot),new ut(4,6,32,32,ot),new ut(4,4,16,16,st),new ut(8,16,32,32,st),new ut(8,16,128,128,st),new ut(8,32,128,256,st),new ut(32,128,258,1024,st),new ut(32,258,258,4096,st)],n.deflateInit=function(t,e){return ft(t,e,A,T,I,E)},n.deflateInit2=ft,n.deflateReset=ct,n.deflateResetKeep=lt,n.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?v:(t.state.gzhead=e,d):v},n.deflate=function(t,e){var n,i,o,u;if(!t||!t.state||e>p||e<0)return t?K(t,v):v;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||i.status===W&&e!==h)return K(t,0===t.avail_out?_:v);if(i.strm=t,n=i.last_flush,i.last_flush=e,i.status===P)if(2===i.wrap)t.adler=0,nt(i,31),nt(i,139),nt(i,8),i.gzhead?(nt(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),nt(i,255&i.gzhead.time),nt(i,i.gzhead.time>>8&255),nt(i,i.gzhead.time>>16&255),nt(i,i.gzhead.time>>24&255),nt(i,9===i.level?2:i.strategy>=y||i.level<2?4:0),nt(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(nt(i,255&i.gzhead.extra.length),nt(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=s(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=U):(nt(i,0),nt(i,0),nt(i,0),nt(i,0),nt(i,0),nt(i,9===i.level?2:i.strategy>=y||i.level<2?4:0),nt(i,X),i.status=Z);else{var m=A+(i.w_bits-8<<4)<<8;m|=(i.strategy>=y||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(m|=F),m+=31-m%31,i.status=Z,rt(i,m),0!==i.strstart&&(rt(i,t.adler>>>16),rt(i,65535&t.adler)),t.adler=1}if(i.status===U)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),tt(t),o=i.pending,i.pending!==i.pending_buf_size));)nt(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=N)}else i.status=N;if(i.status===N)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),tt(t),o=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,nt(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),0===u&&(i.gzindex=0,i.status=q)}else i.status=q;if(i.status===q)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),tt(t),o=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,nt(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),0===u&&(i.status=V)}else i.status=V;if(i.status===V&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&tt(t),i.pending+2<=i.pending_buf_size&&(nt(i,255&t.adler),nt(i,t.adler>>8&255),t.adler=0,i.status=Z)):i.status=Z),0!==i.pending){if(tt(t),0===t.avail_out)return i.last_flush=-1,d}else if(0===t.avail_in&&J(e)<=J(n)&&e!==h)return K(t,_);if(i.status===W&&0!==t.avail_in)return K(t,_);if(0!==t.avail_in||0!==i.lookahead||e!==l&&i.status!==W){var w=i.strategy===y?function(t,e){for(var n;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(e===l)return G;break}if(t.match_length=0,n=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(et(t,!1),0===t.strm.avail_out))return G}return t.insert=0,e===h?(et(t,!0),0===t.strm.avail_out?Y:$):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?G:H}(i,e):i.strategy===x?function(t,e){for(var n,r,i,o,s=t.window;;){if(t.lookahead<=z){if(at(t),t.lookahead<=z&&e===l)return G;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=D&&t.strstart>0&&(r=s[i=t.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){o=t.strstart+z;do{}while(r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<o);t.match_length=z-(o-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=D?(n=a._tr_tally(t,1,t.match_length-D),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(et(t,!1),0===t.strm.avail_out))return G}return t.insert=0,e===h?(et(t,!0),0===t.strm.avail_out?Y:$):t.last_lit&&(et(t,!1),0===t.strm.avail_out)?G:H}(i,e):r[i.level].func(i,e);if(w!==Y&&w!==$||(i.status=W),w===G||w===Y)return 0===t.avail_out&&(i.last_flush=-1),d;if(w===H&&(e===c?a._tr_align(i):e!==p&&(a._tr_stored_block(i,0,0,!1),e===f&&(Q(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),tt(t),0===t.avail_out))return i.last_flush=-1,d}return e!==h?d:i.wrap<=0?g:(2===i.wrap?(nt(i,255&t.adler),nt(i,t.adler>>8&255),nt(i,t.adler>>16&255),nt(i,t.adler>>24&255),nt(i,255&t.total_in),nt(i,t.total_in>>8&255),nt(i,t.total_in>>16&255),nt(i,t.total_in>>24&255)):(rt(i,t.adler>>>16),rt(i,65535&t.adler)),tt(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?d:g)},n.deflateEnd=function(t){var e;return t&&t.state?(e=t.state.status)!==P&&e!==U&&e!==N&&e!==q&&e!==V&&e!==Z&&e!==W?K(t,v):(t.state=null,e===Z?K(t,m):d):v},n.deflateSetDictionary=function(t,e){var n,r,a,s,u,l,c,f,h=e.length;if(!t||!t.state)return v;if(2===(s=(n=t.state).wrap)||1===s&&n.status!==P||n.lookahead)return v;for(1===s&&(t.adler=o(t.adler,e,h,0)),n.wrap=0,h>=n.w_size&&(0===s&&(Q(n.head),n.strstart=0,n.block_start=0,n.insert=0),f=new i.Buf8(n.w_size),i.arraySet(f,e,h-n.w_size,n.w_size,0),e=f,h=n.w_size),u=t.avail_in,l=t.next_in,c=t.input,t.avail_in=h,t.next_in=0,t.input=e,at(n);n.lookahead>=D;){r=n.strstart,a=n.lookahead-(D-1);do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+D-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++}while(--a);n.strstart=r,n.lookahead=D-1,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=D-1,n.match_available=0,t.next_in=l,t.input=c,t.avail_in=u,n.wrap=s,d},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":42,"./crc32":44,"./messages":49,"./trees":50}],46:[function(t,e,n){"use strict";e.exports=function(t,e){var n,r,i,a,o,s,u,l,c,f,h,p,d,g,v,m,_,w,b,y,x,k,E,S,A;n=t.state,r=t.next_in,S=t.input,i=r+(t.avail_in-5),a=t.next_out,A=t.output,o=a-(e-t.avail_out),s=a+(t.avail_out-257),u=n.dmax,l=n.wsize,c=n.whave,f=n.wnext,h=n.window,p=n.hold,d=n.bits,g=n.lencode,v=n.distcode,m=(1<<n.lenbits)-1,_=(1<<n.distbits)-1;t:do{d<15&&(p+=S[r++]<<d,d+=8,p+=S[r++]<<d,d+=8),w=g[p&m];e:for(;;){if(p>>>=b=w>>>24,d-=b,0===(b=w>>>16&255))A[a++]=65535&w;else{if(!(16&b)){if(0==(64&b)){w=g[(65535&w)+(p&(1<<b)-1)];continue e}if(32&b){n.mode=12;break t}t.msg="invalid literal/length code",n.mode=30;break t}y=65535&w,(b&=15)&&(d<b&&(p+=S[r++]<<d,d+=8),y+=p&(1<<b)-1,p>>>=b,d-=b),d<15&&(p+=S[r++]<<d,d+=8,p+=S[r++]<<d,d+=8),w=v[p&_];n:for(;;){if(p>>>=b=w>>>24,d-=b,!(16&(b=w>>>16&255))){if(0==(64&b)){w=v[(65535&w)+(p&(1<<b)-1)];continue n}t.msg="invalid distance code",n.mode=30;break t}if(x=65535&w,d<(b&=15)&&(p+=S[r++]<<d,(d+=8)<b&&(p+=S[r++]<<d,d+=8)),(x+=p&(1<<b)-1)>u){t.msg="invalid distance too far back",n.mode=30;break t}if(p>>>=b,d-=b,x>(b=a-o)){if((b=x-b)>c&&n.sane){t.msg="invalid distance too far back",n.mode=30;break t}if(k=0,E=h,0===f){if(k+=l-b,b<y){y-=b;do{A[a++]=h[k++]}while(--b);k=a-x,E=A}}else if(f<b){if(k+=l+f-b,(b-=f)<y){y-=b;do{A[a++]=h[k++]}while(--b);if(k=0,f<y){y-=b=f;do{A[a++]=h[k++]}while(--b);k=a-x,E=A}}}else if(k+=f-b,b<y){y-=b;do{A[a++]=h[k++]}while(--b);k=a-x,E=A}for(;y>2;)A[a++]=E[k++],A[a++]=E[k++],A[a++]=E[k++],y-=3;y&&(A[a++]=E[k++],y>1&&(A[a++]=E[k++]))}else{k=a-x;do{A[a++]=A[k++],A[a++]=A[k++],A[a++]=A[k++],y-=3}while(y>2);y&&(A[a++]=A[k++],y>1&&(A[a++]=A[k++]))}break}}break}}while(r<i&&a<s);r-=y=d>>3,p&=(1<<(d-=y<<3))-1,t.next_in=r,t.next_out=a,t.avail_in=r<i?i-r+5:5-(r-i),t.avail_out=a<s?s-a+257:257-(a-s),n.hold=p,n.bits=d}},{}],47:[function(t,e,n){"use strict";var r=t("../utils/common"),i=t("./adler32"),a=t("./crc32"),o=t("./inffast"),s=t("./inftrees"),u=0,l=1,c=2,f=4,h=5,p=6,d=0,g=1,v=2,m=-2,_=-3,w=-4,b=-5,y=8,x=1,k=2,E=3,S=4,A=5,M=6,T=7,I=8,j=9,R=10,L=11,C=12,B=13,D=14,z=15,O=16,F=17,P=18,U=19,N=20,q=21,V=22,Z=23,W=24,G=25,H=26,Y=27,$=28,X=29,K=30,J=31,Q=32,tt=852,et=592,nt=15;function rt(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function it(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=x,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new r.Buf32(tt),e.distcode=e.distdyn=new r.Buf32(et),e.sane=1,e.back=-1,d):m}function at(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,it(t)):m}function ot(t,e){var n,r;return t&&t.state?(r=t.state,e<0?(n=0,e=-e):(n=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?m:(null!==r.window&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,at(t))):m}function st(t,e){var n,i;return t?(i=new function(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0},t.state=i,i.window=null,(n=ot(t,e))!==d&&(t.state=null),n):m}var ut,lt,ct=!0;function ft(t){if(ct){var e;for(ut=new r.Buf32(512),lt=new r.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(s(l,t.lens,0,288,ut,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;s(c,t.lens,0,32,lt,0,t.work,{bits:5}),ct=!1}t.lencode=ut,t.lenbits=9,t.distcode=lt,t.distbits=5}function ht(t,e,n,i){var a,o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new r.Buf8(o.wsize)),i>=o.wsize?(r.arraySet(o.window,e,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>i&&(a=i),r.arraySet(o.window,e,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,e,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0}n.inflateReset=at,n.inflateReset2=ot,n.inflateResetKeep=it,n.inflateInit=function(t){return st(t,nt)},n.inflateInit2=st,n.inflate=function(t,e){var n,tt,et,nt,it,at,ot,st,ut,lt,ct,pt,dt,gt,vt,mt,_t,wt,bt,yt,xt,kt,Et,St,At=0,Mt=new r.Buf8(4),Tt=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return m;(n=t.state).mode===C&&(n.mode=B),it=t.next_out,et=t.output,ot=t.avail_out,nt=t.next_in,tt=t.input,at=t.avail_in,st=n.hold,ut=n.bits,lt=at,ct=ot,kt=d;t:for(;;)switch(n.mode){case x:if(0===n.wrap){n.mode=B;break}for(;ut<16;){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}if(2&n.wrap&&35615===st){n.check=0,Mt[0]=255&st,Mt[1]=st>>>8&255,n.check=a(n.check,Mt,2,0),st=0,ut=0,n.mode=k;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&st)<<8)+(st>>8))%31){t.msg="incorrect header check",n.mode=K;break}if((15&st)!==y){t.msg="unknown compression method",n.mode=K;break}if(ut-=4,xt=8+(15&(st>>>=4)),0===n.wbits)n.wbits=xt;else if(xt>n.wbits){t.msg="invalid window size",n.mode=K;break}n.dmax=1<<xt,t.adler=n.check=1,n.mode=512&st?R:C,st=0,ut=0;break;case k:for(;ut<16;){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}if(n.flags=st,(255&n.flags)!==y){t.msg="unknown compression method",n.mode=K;break}if(57344&n.flags){t.msg="unknown header flags set",n.mode=K;break}n.head&&(n.head.text=st>>8&1),512&n.flags&&(Mt[0]=255&st,Mt[1]=st>>>8&255,n.check=a(n.check,Mt,2,0)),st=0,ut=0,n.mode=E;case E:for(;ut<32;){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}n.head&&(n.head.time=st),512&n.flags&&(Mt[0]=255&st,Mt[1]=st>>>8&255,Mt[2]=st>>>16&255,Mt[3]=st>>>24&255,n.check=a(n.check,Mt,4,0)),st=0,ut=0,n.mode=S;case S:for(;ut<16;){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}n.head&&(n.head.xflags=255&st,n.head.os=st>>8),512&n.flags&&(Mt[0]=255&st,Mt[1]=st>>>8&255,n.check=a(n.check,Mt,2,0)),st=0,ut=0,n.mode=A;case A:if(1024&n.flags){for(;ut<16;){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}n.length=st,n.head&&(n.head.extra_len=st),512&n.flags&&(Mt[0]=255&st,Mt[1]=st>>>8&255,n.check=a(n.check,Mt,2,0)),st=0,ut=0}else n.head&&(n.head.extra=null);n.mode=M;case M:if(1024&n.flags&&((pt=n.length)>at&&(pt=at),pt&&(n.head&&(xt=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,tt,nt,pt,xt)),512&n.flags&&(n.check=a(n.check,tt,pt,nt)),at-=pt,nt+=pt,n.length-=pt),n.length))break t;n.length=0,n.mode=T;case T:if(2048&n.flags){if(0===at)break t;pt=0;do{xt=tt[nt+pt++],n.head&&xt&&n.length<65536&&(n.head.name+=String.fromCharCode(xt))}while(xt&&pt<at);if(512&n.flags&&(n.check=a(n.check,tt,pt,nt)),at-=pt,nt+=pt,xt)break t}else n.head&&(n.head.name=null);n.length=0,n.mode=I;case I:if(4096&n.flags){if(0===at)break t;pt=0;do{xt=tt[nt+pt++],n.head&&xt&&n.length<65536&&(n.head.comment+=String.fromCharCode(xt))}while(xt&&pt<at);if(512&n.flags&&(n.check=a(n.check,tt,pt,nt)),at-=pt,nt+=pt,xt)break t}else n.head&&(n.head.comment=null);n.mode=j;case j:if(512&n.flags){for(;ut<16;){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}if(st!==(65535&n.check)){t.msg="header crc mismatch",n.mode=K;break}st=0,ut=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=C;break;case R:for(;ut<32;){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}t.adler=n.check=rt(st),st=0,ut=0,n.mode=L;case L:if(0===n.havedict)return t.next_out=it,t.avail_out=ot,t.next_in=nt,t.avail_in=at,n.hold=st,n.bits=ut,v;t.adler=n.check=1,n.mode=C;case C:if(e===h||e===p)break t;case B:if(n.last){st>>>=7&ut,ut-=7&ut,n.mode=Y;break}for(;ut<3;){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}switch(n.last=1&st,ut-=1,3&(st>>>=1)){case 0:n.mode=D;break;case 1:if(ft(n),n.mode=N,e===p){st>>>=2,ut-=2;break t}break;case 2:n.mode=F;break;case 3:t.msg="invalid block type",n.mode=K}st>>>=2,ut-=2;break;case D:for(st>>>=7&ut,ut-=7&ut;ut<32;){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}if((65535&st)!=(st>>>16^65535)){t.msg="invalid stored block lengths",n.mode=K;break}if(n.length=65535&st,st=0,ut=0,n.mode=z,e===p)break t;case z:n.mode=O;case O:if(pt=n.length){if(pt>at&&(pt=at),pt>ot&&(pt=ot),0===pt)break t;r.arraySet(et,tt,nt,pt,it),at-=pt,nt+=pt,ot-=pt,it+=pt,n.length-=pt;break}n.mode=C;break;case F:for(;ut<14;){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}if(n.nlen=257+(31&st),st>>>=5,ut-=5,n.ndist=1+(31&st),st>>>=5,ut-=5,n.ncode=4+(15&st),st>>>=4,ut-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=K;break}n.have=0,n.mode=P;case P:for(;n.have<n.ncode;){for(;ut<3;){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}n.lens[Tt[n.have++]]=7&st,st>>>=3,ut-=3}for(;n.have<19;)n.lens[Tt[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,Et={bits:n.lenbits},kt=s(u,n.lens,0,19,n.lencode,0,n.work,Et),n.lenbits=Et.bits,kt){t.msg="invalid code lengths set",n.mode=K;break}n.have=0,n.mode=U;case U:for(;n.have<n.nlen+n.ndist;){for(;mt=(At=n.lencode[st&(1<<n.lenbits)-1])>>>16&255,_t=65535&At,!((vt=At>>>24)<=ut);){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}if(_t<16)st>>>=vt,ut-=vt,n.lens[n.have++]=_t;else{if(16===_t){for(St=vt+2;ut<St;){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}if(st>>>=vt,ut-=vt,0===n.have){t.msg="invalid bit length repeat",n.mode=K;break}xt=n.lens[n.have-1],pt=3+(3&st),st>>>=2,ut-=2}else if(17===_t){for(St=vt+3;ut<St;){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}ut-=vt,xt=0,pt=3+(7&(st>>>=vt)),st>>>=3,ut-=3}else{for(St=vt+7;ut<St;){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}ut-=vt,xt=0,pt=11+(127&(st>>>=vt)),st>>>=7,ut-=7}if(n.have+pt>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=K;break}for(;pt--;)n.lens[n.have++]=xt}}if(n.mode===K)break;if(0===n.lens[256]){t.msg="invalid code -- missing end-of-block",n.mode=K;break}if(n.lenbits=9,Et={bits:n.lenbits},kt=s(l,n.lens,0,n.nlen,n.lencode,0,n.work,Et),n.lenbits=Et.bits,kt){t.msg="invalid literal/lengths set",n.mode=K;break}if(n.distbits=6,n.distcode=n.distdyn,Et={bits:n.distbits},kt=s(c,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,Et),n.distbits=Et.bits,kt){t.msg="invalid distances set",n.mode=K;break}if(n.mode=N,e===p)break t;case N:n.mode=q;case q:if(at>=6&&ot>=258){t.next_out=it,t.avail_out=ot,t.next_in=nt,t.avail_in=at,n.hold=st,n.bits=ut,o(t,ct),it=t.next_out,et=t.output,ot=t.avail_out,nt=t.next_in,tt=t.input,at=t.avail_in,st=n.hold,ut=n.bits,n.mode===C&&(n.back=-1);break}for(n.back=0;mt=(At=n.lencode[st&(1<<n.lenbits)-1])>>>16&255,_t=65535&At,!((vt=At>>>24)<=ut);){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}if(mt&&0==(240&mt)){for(wt=vt,bt=mt,yt=_t;mt=(At=n.lencode[yt+((st&(1<<wt+bt)-1)>>wt)])>>>16&255,_t=65535&At,!(wt+(vt=At>>>24)<=ut);){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}st>>>=wt,ut-=wt,n.back+=wt}if(st>>>=vt,ut-=vt,n.back+=vt,n.length=_t,0===mt){n.mode=H;break}if(32&mt){n.back=-1,n.mode=C;break}if(64&mt){t.msg="invalid literal/length code",n.mode=K;break}n.extra=15&mt,n.mode=V;case V:if(n.extra){for(St=n.extra;ut<St;){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}n.length+=st&(1<<n.extra)-1,st>>>=n.extra,ut-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Z;case Z:for(;mt=(At=n.distcode[st&(1<<n.distbits)-1])>>>16&255,_t=65535&At,!((vt=At>>>24)<=ut);){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}if(0==(240&mt)){for(wt=vt,bt=mt,yt=_t;mt=(At=n.distcode[yt+((st&(1<<wt+bt)-1)>>wt)])>>>16&255,_t=65535&At,!(wt+(vt=At>>>24)<=ut);){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}st>>>=wt,ut-=wt,n.back+=wt}if(st>>>=vt,ut-=vt,n.back+=vt,64&mt){t.msg="invalid distance code",n.mode=K;break}n.offset=_t,n.extra=15&mt,n.mode=W;case W:if(n.extra){for(St=n.extra;ut<St;){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}n.offset+=st&(1<<n.extra)-1,st>>>=n.extra,ut-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=K;break}n.mode=G;case G:if(0===ot)break t;if(pt=ct-ot,n.offset>pt){if((pt=n.offset-pt)>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=K;break}pt>n.wnext?(pt-=n.wnext,dt=n.wsize-pt):dt=n.wnext-pt,pt>n.length&&(pt=n.length),gt=n.window}else gt=et,dt=it-n.offset,pt=n.length;pt>ot&&(pt=ot),ot-=pt,n.length-=pt;do{et[it++]=gt[dt++]}while(--pt);0===n.length&&(n.mode=q);break;case H:if(0===ot)break t;et[it++]=n.length,ot--,n.mode=q;break;case Y:if(n.wrap){for(;ut<32;){if(0===at)break t;at--,st|=tt[nt++]<<ut,ut+=8}if(ct-=ot,t.total_out+=ct,n.total+=ct,ct&&(t.adler=n.check=n.flags?a(n.check,et,ct,it-ct):i(n.check,et,ct,it-ct)),ct=ot,(n.flags?st:rt(st))!==n.check){t.msg="incorrect data check",n.mode=K;break}st=0,ut=0}n.mode=$;case $:if(n.wrap&&n.flags){for(;ut<32;){if(0===at)break t;at--,st+=tt[nt++]<<ut,ut+=8}if(st!==(4294967295&n.total)){t.msg="incorrect length check",n.mode=K;break}st=0,ut=0}n.mode=X;case X:kt=g;break t;case K:kt=_;break t;case J:return w;case Q:default:return m}return t.next_out=it,t.avail_out=ot,t.next_in=nt,t.avail_in=at,n.hold=st,n.bits=ut,(n.wsize||ct!==t.avail_out&&n.mode<K&&(n.mode<Y||e!==f))&&ht(t,t.output,t.next_out,ct-t.avail_out)?(n.mode=J,w):(lt-=t.avail_in,ct-=t.avail_out,t.total_in+=lt,t.total_out+=ct,n.total+=ct,n.wrap&&ct&&(t.adler=n.check=n.flags?a(n.check,et,ct,t.next_out-ct):i(n.check,et,ct,t.next_out-ct)),t.data_type=n.bits+(n.last?64:0)+(n.mode===C?128:0)+(n.mode===N||n.mode===z?256:0),(0===lt&&0===ct||e===f)&&kt===d&&(kt=b),kt)},n.inflateEnd=function(t){if(!t||!t.state)return m;var e=t.state;return e.window&&(e.window=null),t.state=null,d},n.inflateGetHeader=function(t,e){var n;return t&&t.state?0==(2&(n=t.state).wrap)?m:(n.head=e,e.done=!1,d):m},n.inflateSetDictionary=function(t,e){var n,r=e.length;return t&&t.state?0!==(n=t.state).wrap&&n.mode!==L?m:n.mode===L&&i(1,e,r,0)!==n.check?_:ht(t,e,r,r)?(n.mode=J,w):(n.havedict=1,d):m},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":42,"./crc32":44,"./inffast":46,"./inftrees":48}],48:[function(t,e,n){"use strict";var r=t("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],o=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(t,e,n,u,l,c,f,h){var p,d,g,v,m,_,w,b,y,x=h.bits,k=0,E=0,S=0,A=0,M=0,T=0,I=0,j=0,R=0,L=0,C=null,B=0,D=new r.Buf16(16),z=new r.Buf16(16),O=null,F=0;for(k=0;k<=15;k++)D[k]=0;for(E=0;E<u;E++)D[e[n+E]]++;for(M=x,A=15;A>=1&&0===D[A];A--);if(M>A&&(M=A),0===A)return l[c++]=20971520,l[c++]=20971520,h.bits=1,0;for(S=1;S<A&&0===D[S];S++);for(M<S&&(M=S),j=1,k=1;k<=15;k++)if(j<<=1,(j-=D[k])<0)return-1;if(j>0&&(0===t||1!==A))return-1;for(z[1]=0,k=1;k<15;k++)z[k+1]=z[k]+D[k];for(E=0;E<u;E++)0!==e[n+E]&&(f[z[e[n+E]]++]=E);if(0===t?(C=O=f,_=19):1===t?(C=i,B-=257,O=a,F-=257,_=256):(C=o,O=s,_=-1),L=0,E=0,k=S,m=c,T=M,I=0,g=-1,v=(R=1<<M)-1,1===t&&R>852||2===t&&R>592)return 1;for(;;){w=k-I,f[E]<_?(b=0,y=f[E]):f[E]>_?(b=O[F+f[E]],y=C[B+f[E]]):(b=96,y=0),p=1<<k-I,S=d=1<<T;do{l[m+(L>>I)+(d-=p)]=w<<24|b<<16|y|0}while(0!==d);for(p=1<<k-1;L&p;)p>>=1;if(0!==p?(L&=p-1,L+=p):L=0,E++,0==--D[k]){if(k===A)break;k=e[n+f[E]]}if(k>M&&(L&v)!==g){for(0===I&&(I=M),m+=S,j=1<<(T=k-I);T+I<A&&!((j-=D[T+I])<=0);)T++,j<<=1;if(R+=1<<T,1===t&&R>852||2===t&&R>592)return 1;l[g=L&v]=M<<24|T<<16|m-c|0}}return 0!==L&&(l[m+L]=k-I<<24|64<<16|0),h.bits=M,0}},{"../utils/common":41}],49:[function(t,e,n){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],50:[function(t,e,n){"use strict";var r=t("../utils/common"),i=4,a=0,o=1,s=2;function u(t){for(var e=t.length;--e>=0;)t[e]=0}var l=0,c=1,f=2,h=29,p=256,d=p+1+h,g=30,v=19,m=2*d+1,_=15,w=16,b=7,y=256,x=16,k=17,E=18,S=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],A=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],M=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],T=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],I=new Array(2*(d+2));u(I);var j=new Array(2*g);u(j);var R=new Array(512);u(R);var L=new Array(256);u(L);var C=new Array(h);u(C);var B,D,z,O=new Array(g);function F(t,e,n,r,i){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=t&&t.length}function P(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function U(t){return t<256?R[t]:R[256+(t>>>7)]}function N(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function q(t,e,n){t.bi_valid>w-n?(t.bi_buf|=e<<t.bi_valid&65535,N(t,t.bi_buf),t.bi_buf=e>>w-t.bi_valid,t.bi_valid+=n-w):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)}function V(t,e,n){q(t,n[2*e],n[2*e+1])}function Z(t,e){var n=0;do{n|=1&t,t>>>=1,n<<=1}while(--e>0);return n>>>1}function W(t,e,n){var r,i,a=new Array(_+1),o=0;for(r=1;r<=_;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=Z(a[s]++,s))}}function G(t){var e;for(e=0;e<d;e++)t.dyn_ltree[2*e]=0;for(e=0;e<g;e++)t.dyn_dtree[2*e]=0;for(e=0;e<v;e++)t.bl_tree[2*e]=0;t.dyn_ltree[2*y]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function H(t){t.bi_valid>8?N(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function Y(t,e,n,r){var i=2*e,a=2*n;return t[i]<t[a]||t[i]===t[a]&&r[e]<=r[n]}function $(t,e,n){for(var r=t.heap[n],i=n<<1;i<=t.heap_len&&(i<t.heap_len&&Y(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!Y(e,r,t.heap[i],t.depth));)t.heap[n]=t.heap[i],n=i,i<<=1;t.heap[n]=r}function X(t,e,n){var r,i,a,o,s=0;if(0!==t.last_lit)do{r=t.pending_buf[t.d_buf+2*s]<<8|t.pending_buf[t.d_buf+2*s+1],i=t.pending_buf[t.l_buf+s],s++,0===r?V(t,i,e):(V(t,(a=L[i])+p+1,e),0!==(o=S[a])&&q(t,i-=C[a],o),V(t,a=U(--r),n),0!==(o=A[a])&&q(t,r-=O[a],o))}while(s<t.last_lit);V(t,y,e)}function K(t,e){var n,r,i,a=e.dyn_tree,o=e.stat_desc.static_tree,s=e.stat_desc.has_stree,u=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=m,n=0;n<u;n++)0!==a[2*n]?(t.heap[++t.heap_len]=l=n,t.depth[n]=0):a[2*n+1]=0;for(;t.heap_len<2;)a[2*(i=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[i]=0,t.opt_len--,s&&(t.static_len-=o[2*i+1]);for(e.max_code=l,n=t.heap_len>>1;n>=1;n--)$(t,a,n);i=u;do{n=t.heap[1],t.heap[1]=t.heap[t.heap_len--],$(t,a,1),r=t.heap[1],t.heap[--t.heap_max]=n,t.heap[--t.heap_max]=r,a[2*i]=a[2*n]+a[2*r],t.depth[i]=(t.depth[n]>=t.depth[r]?t.depth[n]:t.depth[r])+1,a[2*n+1]=a[2*r+1]=i,t.heap[1]=i++,$(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var n,r,i,a,o,s,u=e.dyn_tree,l=e.max_code,c=e.stat_desc.static_tree,f=e.stat_desc.has_stree,h=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,d=e.stat_desc.max_length,g=0;for(a=0;a<=_;a++)t.bl_count[a]=0;for(u[2*t.heap[t.heap_max]+1]=0,n=t.heap_max+1;n<m;n++)(a=u[2*u[2*(r=t.heap[n])+1]+1]+1)>d&&(a=d,g++),u[2*r+1]=a,r>l||(t.bl_count[a]++,o=0,r>=p&&(o=h[r-p]),s=u[2*r],t.opt_len+=s*(a+o),f&&(t.static_len+=s*(c[2*r+1]+o)));if(0!==g){do{for(a=d-1;0===t.bl_count[a];)a--;t.bl_count[a]--,t.bl_count[a+1]+=2,t.bl_count[d]--,g-=2}while(g>0);for(a=d;0!==a;a--)for(r=t.bl_count[a];0!==r;)(i=t.heap[--n])>l||(u[2*i+1]!==a&&(t.opt_len+=(a-u[2*i+1])*u[2*i],u[2*i+1]=a),r--)}}(t,e),W(a,l,t.bl_count)}function J(t,e,n){var r,i,a=-1,o=e[1],s=0,u=7,l=4;for(0===o&&(u=138,l=3),e[2*(n+1)+1]=65535,r=0;r<=n;r++)i=o,o=e[2*(r+1)+1],++s<u&&i===o||(s<l?t.bl_tree[2*i]+=s:0!==i?(i!==a&&t.bl_tree[2*i]++,t.bl_tree[2*x]++):s<=10?t.bl_tree[2*k]++:t.bl_tree[2*E]++,s=0,a=i,0===o?(u=138,l=3):i===o?(u=6,l=3):(u=7,l=4))}function Q(t,e,n){var r,i,a=-1,o=e[1],s=0,u=7,l=4;for(0===o&&(u=138,l=3),r=0;r<=n;r++)if(i=o,o=e[2*(r+1)+1],!(++s<u&&i===o)){if(s<l)do{V(t,i,t.bl_tree)}while(0!=--s);else 0!==i?(i!==a&&(V(t,i,t.bl_tree),s--),V(t,x,t.bl_tree),q(t,s-3,2)):s<=10?(V(t,k,t.bl_tree),q(t,s-3,3)):(V(t,E,t.bl_tree),q(t,s-11,7));s=0,a=i,0===o?(u=138,l=3):i===o?(u=6,l=3):(u=7,l=4)}}u(O);var tt=!1;function et(t,e,n,i){q(t,(l<<1)+(i?1:0),3),function(t,e,n,i){H(t),i&&(N(t,n),N(t,~n)),r.arraySet(t.pending_buf,t.window,e,n,t.pending),t.pending+=n}(t,e,n,!0)}n._tr_init=function(t){tt||(function(){var t,e,n,r,i,a=new Array(_+1);for(n=0,r=0;r<h-1;r++)for(C[r]=n,t=0;t<1<<S[r];t++)L[n++]=r;for(L[n-1]=r,i=0,r=0;r<16;r++)for(O[r]=i,t=0;t<1<<A[r];t++)R[i++]=r;for(i>>=7;r<g;r++)for(O[r]=i<<7,t=0;t<1<<A[r]-7;t++)R[256+i++]=r;for(e=0;e<=_;e++)a[e]=0;for(t=0;t<=143;)I[2*t+1]=8,t++,a[8]++;for(;t<=255;)I[2*t+1]=9,t++,a[9]++;for(;t<=279;)I[2*t+1]=7,t++,a[7]++;for(;t<=287;)I[2*t+1]=8,t++,a[8]++;for(W(I,d+1,a),t=0;t<g;t++)j[2*t+1]=5,j[2*t]=Z(t,5);B=new F(I,S,p+1,d,_),D=new F(j,A,0,g,_),z=new F(new Array(0),M,0,v,b)}(),tt=!0),t.l_desc=new P(t.dyn_ltree,B),t.d_desc=new P(t.dyn_dtree,D),t.bl_desc=new P(t.bl_tree,z),t.bi_buf=0,t.bi_valid=0,G(t)},n._tr_stored_block=et,n._tr_flush_block=function(t,e,n,r){var u,l,h=0;t.level>0?(t.strm.data_type===s&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return a;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return o;for(e=32;e<p;e++)if(0!==t.dyn_ltree[2*e])return o;return a}(t)),K(t,t.l_desc),K(t,t.d_desc),h=function(t){var e;for(J(t,t.dyn_ltree,t.l_desc.max_code),J(t,t.dyn_dtree,t.d_desc.max_code),K(t,t.bl_desc),e=v-1;e>=3&&0===t.bl_tree[2*T[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),u=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=u&&(u=l)):u=l=n+5,n+4<=u&&-1!==e?et(t,e,n,r):t.strategy===i||l===u?(q(t,(c<<1)+(r?1:0),3),X(t,I,j)):(q(t,(f<<1)+(r?1:0),3),function(t,e,n,r){var i;for(q(t,e-257,5),q(t,n-1,5),q(t,r-4,4),i=0;i<r;i++)q(t,t.bl_tree[2*T[i]+1],3);Q(t,t.dyn_ltree,e-1),Q(t,t.dyn_dtree,n-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),X(t,t.dyn_ltree,t.dyn_dtree)),G(t),r&&H(t)},n._tr_tally=function(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(L[n]+p+1)]++,t.dyn_dtree[2*U(e)]++),t.last_lit===t.lit_bufsize-1},n._tr_align=function(t){q(t,c<<1,3),V(t,y,I),function(t){16===t.bi_valid?(N(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],51:[function(t,e,n){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],52:[function(t,e,n){n.read=function(t,e,n,r,i){var a,o,s=8*i-r-1,u=(1<<s)-1,l=u>>1,c=-7,f=n?i-1:0,h=n?-1:1,p=t[e+f];for(f+=h,a=p&(1<<-c)-1,p>>=-c,c+=s;c>0;a=256*a+t[e+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+t[e+f],f+=h,c-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,r),a-=l}return(p?-1:1)*o*Math.pow(2,a-r)},n.write=function(t,e,n,r,i,a){var o,s,u,l=8*a-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:a-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=c):(o=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-o))<1&&(o--,u*=2),(e+=o+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(e*u-1)*Math.pow(2,i),o+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;t[n+p]=255&o,p+=d,o/=256,l-=8);t[n+p-d]|=128*g}},{}],53:[function(t,e,n){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},{}],54:[function(t,e,n){"use strict";e.exports=function(t){for(var e=new Array(t),n=0;n<t;++n)e[n]=n;return e}},{}],55:[function(t,e,n){function r(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}e.exports=function(t){return null!=t&&(r(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&r(t.slice(0,0))}(t)||!!t._isBuffer)}},{}],56:[function(t,e,n){var r={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},{}],57:[function(t,e,n){var r,i;r=this,i=function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=t,n.c=e,n.p="",n(0)}([function(t,e,n){"use strict";var r=n(1),i=n(3),a=n(4),o=n(9),s=n(2),u=r.binarize;e.binarizeImage=u;var l=i.locate;e.locateQRInBinaryImage=l;var c=a.extract;function f(t){var e="";if(null!=t&&void 0!=t)for(var n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e}function h(t,e,n){var r=u(t,e,n),s=i.locate(r);if(!s)return null;var l=a.extract(r,s);return l?o.decode(l):null}e.extractQRFromBinaryImage=c,e.decodeQR=function(t){return f(o.decode(t))},e.createBitMatrix=function(t,e){return new s.BitMatrix(t,e)},e.decodeQRFromImage=function(t,e,n){return f(h(t,e,n))},e.decodeQRFromImageAsByteArray=h},function(t,e,n){"use strict";var r=n(2),i=3,a=1<<i,o=a-1,s=24;e.binarize=function(t,e,n){if(t.length!==e*n*4)throw new Error("Binarizer data.length != width * height * 4");for(var u=new Array(e*n),l=0;l<e;l++)for(var c=0;c<n;c++){var f=4*(c*e+l),h=.2126*t[f]+.7152*t[f+1]+.0722*t[f+2];u[c*e+l]=h}var p=e>>i;0!=(e&o)&&p++;var d=n>>i;return 0!=(n&o)&&d++,function(t,e,n,o,s,u){function l(t,e,n){return t<e?e:t>n?n:t}var c=r.BitMatrix.createEmpty(o,s);function f(t,e,n,r,i){for(var o=n*i+e,s=0;s<a;s++,o+=i)for(var u=0;u<a;u++){var l=255&t[o+u];c.set(e+u,n+s,l<=r)}}for(var h=0;h<n;h++){var p=h<<i,d=s-a;p>d&&(p=d);for(var g=0;g<e;g++){var v=g<<i,m=o-a;v>m&&(v=m);for(var _=l(g,2,e-3),w=l(h,2,n-3),b=0,y=-2;y<=2;y++){var x=u[w+y];b+=x[_-2],b+=x[_-1],b+=x[_],b+=x[_+1],b+=x[_+2]}f(t,v,p,b/25,o)}}return c}(u,p,d,e,n,function(t,e,n,r,o){for(var u=new Array(n),l=0;l<n;l++)u[l]=new Array(e);for(var c=0;c<n;c++){var f=c<<i,h=o-a;f>h&&(f=h);for(var p=0;p<e;p++){var d=p<<i,g=r-a;d>g&&(d=g);for(var v=0,m=255,_=0,w=0,b=f*r+d;w<a;w++,b+=r){for(var y=0;y<a;y++){var x=255&t[b+y];v+=x,x<m&&(m=x),x>_&&(_=x)}if(_-m>s)for(w++,b+=r;w<a;w++,b+=r)for(y=0;y<a;y++)v+=255&t[b+y]}var k=v>>2*i;if(_-m<=s&&(k=m>>1,c>0&&p>0)){var E=u[c-1][p]+2*u[c][p-1]+u[c-1][p-1]>>2;m<E&&(k=E)}u[c][p]=k}}return u}(u,p,d,e,n))}},function(t,e){"use strict";var n=function(){function t(t,e){this.width=e,this.height=t.length/e,this.data=t}return t.createEmpty=function(e,n){for(var r=new Array(e*n),i=0;i<r.length;i++)r[i]=!1;return new t(r,e)},t.prototype.get=function(t,e){return this.data[e*this.width+t]},t.prototype.set=function(t,e,n){this.data[e*this.width+t]=n},t.prototype.copyBit=function(t,e,n){return this.get(t,e)?n<<1|1:n<<1},t.prototype.setRegion=function(t,e,n,r){for(var i=t+n,a=e+r,o=e;o<a;o++)for(var s=t;s<i;s++)this.set(s,o,!0)},t.prototype.mirror=function(){for(var t=0;t<this.width;t++)for(var e=t+1;e<this.height;e++)this.get(t,e)!=this.get(e,t)&&(this.set(t,e,!this.get(t,e)),this.set(e,t,!this.get(e,t)))},t}();e.BitMatrix=n},function(t,e){"use strict";var n=2,r=3,i=57,a=8,o=function(){function t(t,e,n,r){this.x=t,this.y=e,this.estimatedModuleSize=n,this.count=null==r?1:r}return t.prototype.aboutEquals=function(t,e,n){if(Math.abs(e-this.y)<=t&&Math.abs(n-this.x)<=t){var r=Math.abs(t-this.estimatedModuleSize);return r<=1||r<=this.estimatedModuleSize}return!1},t.prototype.combineEstimate=function(e,n,r){var i=this.count+1;return new t((this.count*this.x+n)/i,(this.count*this.y+e)/i,(this.count*this.estimatedModuleSize+r)/i,i)},t}();function s(t){for(var e=0,n=0;n<5;n++){var r=t[n];if(0===r)return!1;e+=r}if(e<7)return!1;var i=(e<<a)/7,o=i/2;return Math.abs(i-(t[0]<<a))<o&&Math.abs(i-(t[1]<<a))<o&&Math.abs(3*i-(t[2]<<a))<3*o&&Math.abs(i-(t[3]<<a))<o&&Math.abs(i-(t[4]<<a))<o}function u(t,e){var n=e-t[4]-t[3]-t[2]/2;return n!=n?null:n}function l(t,e){var n=t.x-e.x,r=t.y-e.y;return Math.sqrt(n*n+r*r)}e.locate=function(t){var e=[],a=!1;function c(e,n){return e=Math.floor(e),n=Math.floor(n),t.get(e,n)}function f(){var t=0,r=0,i=e.length;if(e.forEach(function(e){e.count>=n&&(t++,r+=e.estimatedModuleSize)}),t<3)return!1;for(var a=r/i,o=0,s=0;s<i;s++){var u=e[s];o+=Math.abs(u.estimatedModuleSize-a)}return o<=.05*r}function h(n,r,i,a){var l=n[0]+n[1]+n[2]+n[3]+n[4],f=u(n,i);if(null==f)return!1;var h=function(e,n,r,i){for(var a=t.height,o=[0,0,0,0,0],l=e;l>=0&&c(n,l);)o[2]++,l--;if(l<0)return null;for(;l>=0&&!c(n,l)&&o[1]<=r;)o[1]++,l--;if(l<0||o[1]>r)return null;for(;l>=0&&c(n,l)&&o[0]<=r;)o[0]++,l--;if(o[0]>r)return null;for(l=e+1;l<a&&c(n,l);)o[2]++,l++;if(l==a)return null;for(;l<a&&!c(n,l)&&o[3]<r;)o[3]++,l++;if(l==a||o[3]>=r)return null;for(;l<a&&c(n,l)&&o[4]<r;)o[4]++,l++;if(o[4]>=r)return null;var f=o[0]+o[1]+o[2]+o[3]+o[4];return 5*Math.abs(f-i)>=2*i?null:s(o)?u(o,l):null}(r,Math.floor(f),n[2],l);if(null!=h&&null!=(f=function(e,n,r,i){for(var a=t.width,o=[0,0,0,0,0],l=e;l>=0&&c(l,n);)o[2]++,l--;if(l<0)return null;for(;l>=0&&!c(l,n)&&o[1]<=r;)o[1]++,l--;if(l<0||o[1]>r)return null;for(;l>=0&&c(l,n)&&o[0]<=r;)o[0]++,l--;if(o[0]>r)return null;for(l=e+1;l<a&&c(l,n);)o[2]++,l++;if(l==a)return null;for(;l<a&&!c(l,n)&&o[3]<r;)o[3]++,l++;if(l==a||o[3]>=r)return null;for(;l<a&&c(l,n)&&o[4]<r;)o[4]++,l++;if(o[4]>=r)return null;var f=o[0]+o[1]+o[2]+o[3]+o[4];return 5*Math.abs(f-i)>=i?null:s(o)?u(o,l):null}(Math.floor(f),Math.floor(h),n[2],l))&&(!a||function(e,n,r,i){for(var a=t.height,o=t.width,u=[0,0,0,0,0],l=0;e-l>=0&&c(n-l,e-l);)u[2]++,l++;if(e-l<0||n-l<0)return!1;for(;e-l>=0&&n-l>=0&&!c(n-l,e-l)&&u[1]<=r;)u[1]++,l++;if(e-l<0||n-l<0||u[1]>r)return!1;for(;e-l>=0&&n-l>=0&&c(n-l,e-l)&&u[0]<=r;)u[0]++,l++;if(u[0]>r)return!1;for(l=1;e+l<a&&n+l<o&&c(n+l,e+l);)u[2]++,l++;if(e+l>=a||n+l>=o)return!1;for(;e+l<a&&n+l<o&&!c(n+l,e+l)&&u[3]<r;)u[3]++,l++;if(e+l>=a||n+l>=o||u[3]>=r)return!1;for(;e+l<a&&n+l<o&&c(n+l,e+l)&&u[4]<r;)u[4]++,l++;if(u[4]>=r)return!1;var f=u[0]+u[1]+u[2]+u[3]+u[4];return Math.abs(f-i)<2*i&&s(u)}(Math.floor(h),Math.floor(f),n[2],l))){for(var p=l/7,d=!1,g=0;g<e.length;g++){var v=e[g];if(v.aboutEquals(p,h,f)){e.splice(g,1,v.combineEstimate(h,f,p)),d=!0;break}}if(!d){var m=new o(f,h,p);e.push(m)}return!0}return!1}function p(){if(e.length<=1)return 0;var t=null;return e.forEach(function(e){if(e.count>=n){if(null!=t)return a=!0,Math.floor(Math.abs(t.x-e.x)-Math.abs(t.y-e.y))/2;t=e}}),0}var d=t.height,g=t.width,v=Math.floor(3*d/(4*i));v<r&&(v=r);for(var m=!1,_=[0,0,0,0,0],w=v-1;w<d&&!m;w+=v){_=[0,0,0,0,0];for(var b=0,y=0;y<g;y++)if(c(y,w))1==(1&b)&&b++,_[b]++;else if(0==(1&b))if(4===b)if(s(_)){if(!h(_,w,y,!1)){_=[_[2],_[3],_[4],1,0],b=3;continue}if(v=2,a)m=f();else{var x=p();x>_[2]&&(w+=x-_[2]-v,y=g-1)}_=[0,0,0,0,0],b=0}else _=[_[2],_[3],_[4],1,0],b=3;else _[++b]++;else _[b]++;s(_)&&h(_,w,g,!1)&&(v=_[0],a&&(m=f()))}var k=function(){var t=e.length;if(t<3)return null;if(t>3){var n=0,r=0;e.forEach(function(t){var e=t.estimatedModuleSize;n+=e,r+=e*e});var i=n/t,a=Math.sqrt(r/t-i*i);e.sort(function(t,e){var n=Math.abs(e.estimatedModuleSize-i),r=Math.abs(t.estimatedModuleSize-i);return n<r?-1:n==r?0:1});for(var o=Math.max(.2*i,a),s=0;s<e.length&&e.length>3;s++){var u=e[s];Math.abs(u.estimatedModuleSize-i)>o&&(e.splice(s,1),s--)}}return e.length>3&&(n=0,e.forEach(function(t){n+=t.estimatedModuleSize}),i=n/e.length,e.sort(function(t,e){if(e.count===t.count){var n=Math.abs(e.estimatedModuleSize-i),r=Math.abs(t.estimatedModuleSize-i);return n<r?1:n==r?0:-1}return e.count-t.count}),e=e.slice(0,3)),[e[0],e[1],e[2]]}();return k?function(t){var e,n,r,i=l(t[0],t[1]),a=l(t[1],t[2]),o=l(t[0],t[2]);if(a>=i&&a>=o?(n=t[0],e=t[1],r=t[2]):o>=a&&o>=i?(n=t[1],e=t[0],r=t[2]):(n=t[2],e=t[0],r=t[1]),function(t,e,n){var r=e.x,i=e.y;return(n.x-r)*(t.y-i)-(n.y-i)*(t.x-r)}(e,n,r)<0){var s=e;e=r,r=s}return{bottomLeft:{x:e.x,y:e.y},topLeft:{x:n.x,y:n.y},topRight:{x:r.x,y:r.y}}}(k):null}},function(t,e,n){"use strict";var r=n(5),i=n(7),a=n(8),o=n(2),s=n(6);function u(t,e,n){for(var r=!0,i=0;i<n.length&&r;i+=2){var a=Math.floor(n[i]),o=Math.floor(n[i+1]);if(a<-1||a>t||o<-1||o>e)throw new Error;r=!1,-1==a?(n[i]=0,r=!0):a==t&&(n[i]=t-1,r=!0),-1==o?(n[i+1]=0,r=!0):o==e&&(n[i+1]=e-1,r=!0)}r=!0;for(i=n.length-2;i>=0&&r;i-=2){a=Math.floor(n[i]),o=Math.floor(n[i+1]);if(a<-1||a>t||o<-1||o>e)throw new Error;r=!1,-1==a?(n[i]=0,r=!0):a==t&&(n[i]=t-1,r=!0),-1==o?(n[i+1]=0,r=!0):o==e&&(n[i+1]=e-1,r=!0)}return n}function l(t,e,n,r){return Math.sqrt((n-t)*(n-t)+(r-e)*(r-e))}function c(t,e,n,i,a){e=Math.floor(e),n=Math.floor(n);var o=Math.floor(i*t),s=Math.max(0,e-o),u=Math.min(a.width,e+o);if(u-s<3*t)return null;var l=Math.max(0,n-o),c=Math.min(a.height-1,n+o);return r.findAlignment(s,l,u-s,c-l,t,a)}function f(t,e,n,r,i){t=Math.floor(t),e=Math.floor(e),n=Math.floor(n),r=Math.floor(r);var a=Math.abs(r-e)>Math.abs(n-t);if(a){var o=t;t=e,e=o,o=n,n=r,r=o}for(var s=Math.abs(n-t),u=Math.abs(r-e),c=-s>>1,f=t<n?1:-1,h=e<r?1:-1,p=0,d=n+f,g=t,v=e;g!=d;g+=f){var m=a?v:g,_=a?g:v;if(1==p===i.get(m,_)){if(2==p)return l(g,v,t,e);p++}if((c+=u)>0){if(v==r)break;v+=h,c-=s}}return 2==p?l(n+f,r,t,e):NaN}function h(t,e,n,r,i){var a=f(t,e,n,r,i),o=1,s=t-(n-t);s<0?(o=t/(t-s),s=0):s>=i.width&&(o=(i.width-1-t)/(s-t),s=i.width-1);var u=e-(r-e)*o;return o=1,u<0?(o=e/(e-u),u=0):u>=i.height&&(o=(i.height-1-e)/(u-e),u=i.height-1),(a+=f(t,e,s=t+(s-t)*o,u,i))-1}function p(t,e,n){var r=h(t.x,t.y,e.x,e.y,n),i=h(e.x,e.y,t.x,t.y,n);return s.isNaN(r)?i/7:s.isNaN(i)?r/7:(r+i)/14}e.extract=function(t,e){var n=function(t,e,n,r){return(p(t,e,r)+p(t,n,r))/2}(e.topLeft,e.topRight,e.bottomLeft,t);if(n<1)return null;var r=function(t,e,n,r){var i=7+(Math.round(l(t.x,t.y,e.x,e.y)/r)+Math.round(l(t.x,t.y,n.x,n.y)/r)>>1);switch(3&i){case 0:i++;break;case 2:i--}return i}(e.topLeft,e.topRight,e.bottomLeft,n);if(!r)return null;var s=function(t){if(t%4!=1)return null;var e=t-17>>2;return e<1||e>40?null:a.getVersionForNumber(e)}(r);if(null==s)return null;var f=s.getDimensionForVersion()-7,h=null;if(s.alignmentPatternCenters.length>0)for(var d=e.topRight.x-e.topLeft.x+e.bottomLeft.x,g=e.topRight.y-e.topLeft.y+e.bottomLeft.y,v=1-3/f,m=e.topLeft.x+v*(d-e.topLeft.x),_=e.topLeft.y+v*(g-e.topLeft.y),w=4;w<=16&&!(h=c(n,m,_,w,t));w<<=1);return function(t,e,n){if(e<=0)return null;for(var r=o.BitMatrix.createEmpty(e,e),a=new Array(e<<1),s=0;s<e;s++){for(var l=a.length,c=s+.5,f=0;f<l;f+=2)a[f]=.5+(f>>1),a[f+1]=c;a=i.transformPoints(n,a);try{var h=u(t.width,t.height,a)}catch(t){return null}for(f=0;f<l;f+=2)r.set(f>>1,s,t.get(Math.floor(h[f]),Math.floor(h[f+1])))}return r}(t,r,function(t,e,n,r,a){var o,s,u,l,c=a-3.5;return null!=r?(o=r.x,s=r.y,u=l=c-3):(o=e.x-t.x+n.x,s=e.y-t.y+n.y,u=l=c),i.quadrilateralToQuadrilateral(3.5,3.5,c,3.5,u,l,3.5,c,t.x,t.y,e.x,e.y,o,s,n.x,n.y)}(e.topLeft,e.topRight,e.bottomLeft,h,r))}},function(t,e,n){"use strict";var r=n(6);function i(t,e,n,r){if(Math.abs(n-t.y)<=e&&Math.abs(r-t.x)<=e){var i=Math.abs(e-t.estimatedModuleSize);return i<=1||i<=t.estimatedModuleSize}return!1}function a(t,e,n,r){return{x:(t.x+n)/2,y:(t.y+e)/2,estimatedModuleSize:(t.estimatedModuleSize+r)/2}}function o(t,e){for(var n=e/2,r=0;r<3;r++)if(Math.abs(e-t[r])>=n)return!1;return!0}function s(t,e){var n=e-t[2]-t[1]/2;return r.isNaN(n)?null:n}e.findAlignment=function(t,e,n,r,u,l){var c=[];function f(t,e,n,r){var u=t[0]+t[1]+t[2],f=s(t,n);if(null==f)return null;var h=function(t,e,n,r,i,a){for(var u=a.height,l=[0,0,0],c=t;c>=0&&a.get(e,c)&&l[1]<=n;)l[1]++,c--;if(c<0||l[1]>n)return null;for(;c>=0&&!a.get(e,c)&&l[0]<=n;)l[0]++,c--;if(l[0]>n)return null;for(c=t+1;c<u&&a.get(e,c)&&l[1]<=n;)l[1]++,c++;if(c==u||l[1]>n)return null;for(;c<u&&!a.get(e,c)&&l[2]<=n;)l[2]++,c++;if(l[2]>n)return null;var f=l[0]+l[1]+l[2];return 5*Math.abs(f-r)>=2*r?null:o(l,i)?s(l,c):null}(e,Math.floor(f),2*t[1],u,r,l);if(null!=h){var p=(t[0]+t[1]+t[2])/3;for(var d in c){var g=c[d];if(i(g,p,h,f))return a(g,h,f,p)}var v={x:f,y:h,estimatedModuleSize:p};c.push(v)}return null}for(var h=t+n,p=e+(r>>1),d=[0,0,0],g=0;g<r;g++){var v=p+(0==(1&g)?g+1>>1:-(g+1>>1));d[0]=0,d[1]=0,d[2]=0;for(var m=t;m<h&&!l.get(m,v);)m++;for(var _=0;m<h;){if(l.get(m,v))if(1==_)d[_]++;else if(2==_){if(o(d,u)&&null!=(w=f(d,v,m,u)))return w;d[0]=d[2],d[1]=1,d[2]=0,_=1}else d[++_]++;else 1==_&&_++,d[_]++;m++}if(o(d,u)){var w=f(d,v,u,h);if(null!=w)return w}}return 0!=c.length?c[0]:null}},function(t,e){"use strict";var n=[0,1,1,2,1,2,2,3,1,2,2,3,2,3,3,4];e.numBitsDiffering=function(t,e){return n[15&(t^=e)]+n[t>>4&15]+n[t>>8&15]+n[t>>12&15]+n[t>>16&15]+n[t>>20&15]+n[t>>24&15]+n[t>>28&15]},e.isNaN=function(t){return"[object Number]"===Object.prototype.toString.call(t)&&t!==+t}},function(t,e){"use strict";function n(t,e,n,r,i,a,o,s){var u=t-n+i-o,l=e-r+a-s;if(0==u&&0==l)return{a11:n-t,a21:i-n,a31:t,a12:r-e,a22:a-r,a32:e,a13:0,a23:0,a33:1};var c=n-i,f=o-i,h=r-a,p=s-a,d=c*p-f*h,g=(u*p-f*l)/d,v=(c*l-u*h)/d;return{a11:n-t+g*n,a21:o-t+v*o,a31:t,a12:r-e+g*r,a22:s-e+v*s,a32:e,a13:g,a23:v,a33:1}}e.transformPoints=function(t,e){for(var n=e.length,r=t.a11,i=t.a12,a=t.a13,o=t.a21,s=t.a22,u=t.a23,l=t.a31,c=t.a32,f=t.a33,h=0;h<n;h+=2){var p=e[h],d=e[h+1],g=a*p+u*d+f;e[h]=(r*p+o*d+l)/g,e[h+1]=(i*p+s*d+c)/g}return e},e.quadrilateralToQuadrilateral=function(t,e,r,i,a,o,s,u,l,c,f,h,p,d,g,v){var m,_,w=function(t,e,r,i,a,o,s,u){return{a11:(l=n(t,e,r,i,a,o,s,u)).a22*l.a33-l.a23*l.a32,a21:l.a23*l.a31-l.a21*l.a33,a31:l.a21*l.a32-l.a22*l.a31,a12:l.a13*l.a32-l.a12*l.a33,a22:l.a11*l.a33-l.a13*l.a31,a32:l.a12*l.a31-l.a11*l.a32,a13:l.a12*l.a23-l.a13*l.a22,a23:l.a13*l.a21-l.a11*l.a23,a33:l.a11*l.a22-l.a12*l.a21};var l}(t,e,r,i,a,o,s,u),b=n(l,c,f,h,p,d,g,v);return _=w,{a11:(m=b).a11*_.a11+m.a21*_.a12+m.a31*_.a13,a21:m.a11*_.a21+m.a21*_.a22+m.a31*_.a23,a31:m.a11*_.a31+m.a21*_.a32+m.a31*_.a33,a12:m.a12*_.a11+m.a22*_.a12+m.a32*_.a13,a22:m.a12*_.a21+m.a22*_.a22+m.a32*_.a23,a32:m.a12*_.a31+m.a22*_.a32+m.a32*_.a33,a13:m.a13*_.a11+m.a23*_.a12+m.a33*_.a13,a23:m.a13*_.a21+m.a23*_.a22+m.a33*_.a23,a33:m.a13*_.a31+m.a23*_.a32+m.a33*_.a33}}},function(t,e,n){"use strict";var r=n(6),i=[31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136944,141498,145311,150283,152622,158308,161089,167017],a=function(){return function(t,e){this.count=t,this.dataCodewords=e}}(),o=function(){function t(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];this.ecCodewordsPerBlock=t,this.ecBlocks=e}return t.prototype.getNumBlocks=function(){return this.ecBlocks.reduce(function(t,e){return t+e.count},0)},t.prototype.getTotalECCodewords=function(){return this.ecCodewordsPerBlock*this.getNumBlocks()},t}(),s=function(){function t(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];this.versionNumber=t,this.alignmentPatternCenters=e,this.ecBlocks=n;var i=0,a=this.ecBlocks[0].ecCodewordsPerBlock;this.ecBlocks[0].ecBlocks.forEach(function(t){i+=t.count*(t.dataCodewords+a)}),this.totalCodewords=i}return t.prototype.getDimensionForVersion=function(){return 17+4*this.versionNumber},t.prototype.getECBlocksForLevel=function(t){return this.ecBlocks[t.ordinal]},t.decodeVersionInformation=function(t){for(var e=1/0,n=0,a=0;a<i.length;a++){var o=i[a];if(o==t)return l(a+7);var s=r.numBitsDiffering(t,o);s<e&&(n=a+7,e=s)}return e<=3?l(n):null},t}();e.Version=s;var u=[new s(1,[],new o(7,new a(1,19)),new o(10,new a(1,16)),new o(13,new a(1,13)),new o(17,new a(1,9))),new s(2,[6,18],new o(10,new a(1,34)),new o(16,new a(1,28)),new o(22,new a(1,22)),new o(28,new a(1,16))),new s(3,[6,22],new o(15,new a(1,55)),new o(26,new a(1,44)),new o(18,new a(2,17)),new o(22,new a(2,13))),new s(4,[6,26],new o(20,new a(1,80)),new o(18,new a(2,32)),new o(26,new a(2,24)),new o(16,new a(4,9))),new s(5,[6,30],new o(26,new a(1,108)),new o(24,new a(2,43)),new o(18,new a(2,15),new a(2,16)),new o(22,new a(2,11),new a(2,12))),new s(6,[6,34],new o(18,new a(2,68)),new o(16,new a(4,27)),new o(24,new a(4,19)),new o(28,new a(4,15))),new s(7,[6,22,38],new o(20,new a(2,78)),new o(18,new a(4,31)),new o(18,new a(2,14),new a(4,15)),new o(26,new a(4,13),new a(1,14))),new s(8,[6,24,42],new o(24,new a(2,97)),new o(22,new a(2,38),new a(2,39)),new o(22,new a(4,18),new a(2,19)),new o(26,new a(4,14),new a(2,15))),new s(9,[6,26,46],new o(30,new a(2,116)),new o(22,new a(3,36),new a(2,37)),new o(20,new a(4,16),new a(4,17)),new o(24,new a(4,12),new a(4,13))),new s(10,[6,28,50],new o(18,new a(2,68),new a(2,69)),new o(26,new a(4,43),new a(1,44)),new o(24,new a(6,19),new a(2,20)),new o(28,new a(6,15),new a(2,16))),new s(11,[6,30,54],new o(20,new a(4,81)),new o(30,new a(1,50),new a(4,51)),new o(28,new a(4,22),new a(4,23)),new o(24,new a(3,12),new a(8,13))),new s(12,[6,32,58],new o(24,new a(2,92),new a(2,93)),new o(22,new a(6,36),new a(2,37)),new o(26,new a(4,20),new a(6,21)),new o(28,new a(7,14),new a(4,15))),new s(13,[6,34,62],new o(26,new a(4,107)),new o(22,new a(8,37),new a(1,38)),new o(24,new a(8,20),new a(4,21)),new o(22,new a(12,11),new a(4,12))),new s(14,[6,26,46,66],new o(30,new a(3,115),new a(1,116)),new o(24,new a(4,40),new a(5,41)),new o(20,new a(11,16),new a(5,17)),new o(24,new a(11,12),new a(5,13))),new s(15,[6,26,48,70],new o(22,new a(5,87),new a(1,88)),new o(24,new a(5,41),new a(5,42)),new o(30,new a(5,24),new a(7,25)),new o(24,new a(11,12),new a(7,13))),new s(16,[6,26,50,74],new o(24,new a(5,98),new a(1,99)),new o(28,new a(7,45),new a(3,46)),new o(24,new a(15,19),new a(2,20)),new o(30,new a(3,15),new a(13,16))),new s(17,[6,30,54,78],new o(28,new a(1,107),new a(5,108)),new o(28,new a(10,46),new a(1,47)),new o(28,new a(1,22),new a(15,23)),new o(28,new a(2,14),new a(17,15))),new s(18,[6,30,56,82],new o(30,new a(5,120),new a(1,121)),new o(26,new a(9,43),new a(4,44)),new o(28,new a(17,22),new a(1,23)),new o(28,new a(2,14),new a(19,15))),new s(19,[6,30,58,86],new o(28,new a(3,113),new a(4,114)),new o(26,new a(3,44),new a(11,45)),new o(26,new a(17,21),new a(4,22)),new o(26,new a(9,13),new a(16,14))),new s(20,[6,34,62,90],new o(28,new a(3,107),new a(5,108)),new o(26,new a(3,41),new a(13,42)),new o(30,new a(15,24),new a(5,25)),new o(28,new a(15,15),new a(10,16))),new s(21,[6,28,50,72,94],new o(28,new a(4,116),new a(4,117)),new o(26,new a(17,42)),new o(28,new a(17,22),new a(6,23)),new o(30,new a(19,16),new a(6,17))),new s(22,[6,26,50,74,98],new o(28,new a(2,111),new a(7,112)),new o(28,new a(17,46)),new o(30,new a(7,24),new a(16,25)),new o(24,new a(34,13))),new s(23,[6,30,54,74,102],new o(30,new a(4,121),new a(5,122)),new o(28,new a(4,47),new a(14,48)),new o(30,new a(11,24),new a(14,25)),new o(30,new a(16,15),new a(14,16))),new s(24,[6,28,54,80,106],new o(30,new a(6,117),new a(4,118)),new o(28,new a(6,45),new a(14,46)),new o(30,new a(11,24),new a(16,25)),new o(30,new a(30,16),new a(2,17))),new s(25,[6,32,58,84,110],new o(26,new a(8,106),new a(4,107)),new o(28,new a(8,47),new a(13,48)),new o(30,new a(7,24),new a(22,25)),new o(30,new a(22,15),new a(13,16))),new s(26,[6,30,58,86,114],new o(28,new a(10,114),new a(2,115)),new o(28,new a(19,46),new a(4,47)),new o(28,new a(28,22),new a(6,23)),new o(30,new a(33,16),new a(4,17))),new s(27,[6,34,62,90,118],new o(30,new a(8,122),new a(4,123)),new o(28,new a(22,45),new a(3,46)),new o(30,new a(8,23),new a(26,24)),new o(30,new a(12,15),new a(28,16))),new s(28,[6,26,50,74,98,122],new o(30,new a(3,117),new a(10,118)),new o(28,new a(3,45),new a(23,46)),new o(30,new a(4,24),new a(31,25)),new o(30,new a(11,15),new a(31,16))),new s(29,[6,30,54,78,102,126],new o(30,new a(7,116),new a(7,117)),new o(28,new a(21,45),new a(7,46)),new o(30,new a(1,23),new a(37,24)),new o(30,new a(19,15),new a(26,16))),new s(30,[6,26,52,78,104,130],new o(30,new a(5,115),new a(10,116)),new o(28,new a(19,47),new a(10,48)),new o(30,new a(15,24),new a(25,25)),new o(30,new a(23,15),new a(25,16))),new s(31,[6,30,56,82,108,134],new o(30,new a(13,115),new a(3,116)),new o(28,new a(2,46),new a(29,47)),new o(30,new a(42,24),new a(1,25)),new o(30,new a(23,15),new a(28,16))),new s(32,[6,34,60,86,112,138],new o(30,new a(17,115)),new o(28,new a(10,46),new a(23,47)),new o(30,new a(10,24),new a(35,25)),new o(30,new a(19,15),new a(35,16))),new s(33,[6,30,58,86,114,142],new o(30,new a(17,115),new a(1,116)),new o(28,new a(14,46),new a(21,47)),new o(30,new a(29,24),new a(19,25)),new o(30,new a(11,15),new a(46,16))),new s(34,[6,34,62,90,118,146],new o(30,new a(13,115),new a(6,116)),new o(28,new a(14,46),new a(23,47)),new o(30,new a(44,24),new a(7,25)),new o(30,new a(59,16),new a(1,17))),new s(35,[6,30,54,78,102,126,150],new o(30,new a(12,121),new a(7,122)),new o(28,new a(12,47),new a(26,48)),new o(30,new a(39,24),new a(14,25)),new o(30,new a(22,15),new a(41,16))),new s(36,[6,24,50,76,102,128,154],new o(30,new a(6,121),new a(14,122)),new o(28,new a(6,47),new a(34,48)),new o(30,new a(46,24),new a(10,25)),new o(30,new a(2,15),new a(64,16))),new s(37,[6,28,54,80,106,132,158],new o(30,new a(17,122),new a(4,123)),new o(28,new a(29,46),new a(14,47)),new o(30,new a(49,24),new a(10,25)),new o(30,new a(24,15),new a(46,16))),new s(38,[6,32,58,84,110,136,162],new o(30,new a(4,122),new a(18,123)),new o(28,new a(13,46),new a(32,47)),new o(30,new a(48,24),new a(14,25)),new o(30,new a(42,15),new a(32,16))),new s(39,[6,26,54,82,110,138,166],new o(30,new a(20,117),new a(4,118)),new o(28,new a(40,47),new a(7,48)),new o(30,new a(43,24),new a(22,25)),new o(30,new a(10,15),new a(67,16))),new s(40,[6,30,58,86,114,142,170],new o(30,new a(19,118),new a(6,119)),new o(28,new a(18,47),new a(31,48)),new o(30,new a(34,24),new a(34,25)),new o(30,new a(20,15),new a(61,16)))];function l(t){if(t<1||t>40)throw new Error("Invalid version number "+t);return u[t-1]}e.getVersionForNumber=l},function(t,e,n){"use strict";var r=n(2),i=n(10),a=n(6),o=n(12),s=n(8),u=21522,l=[[21522,0],[20773,1],[24188,2],[23371,3],[17913,4],[16590,5],[20375,6],[19104,7],[30660,8],[29427,9],[32170,10],[30877,11],[26159,12],[25368,13],[27713,14],[26998,15],[5769,16],[5054,17],[7399,18],[6608,19],[1890,20],[597,21],[3340,22],[2107,23],[13663,24],[12392,25],[16177,26],[14854,27],[9396,28],[8579,29],[11994,30],[11245,31]],c=[function(t,e){return 0==(t+e&1)},function(t,e){return 0==(1&t)},function(t,e){return e%3==0},function(t,e){return(t+e)%3==0},function(t,e){return 0==((t>>1)+e/3&1)},function(t,e){return(t*e&1)+t*e%3==0},function(t,e){return 0==((t*e&1)+t*e%3&1)},function(t,e){return 0==((t+e&1)+t*e%3&1)}],f=[{ordinal:1,bits:0,name:"M"},{ordinal:0,bits:1,name:"L"},{ordinal:3,bits:2,name:"H"},{ordinal:2,bits:3,name:"Q"}];function h(t,e,n){for(var i=c[n.dataMask],a=t.height,o=function(t){for(var e=t.getDimensionForVersion(),n=new Array(e*e),i=0;i<n.length;i++)n[i]=!1;var a=new r.BitMatrix(n,e);a.setRegion(0,0,9,9),a.setRegion(e-8,0,8,9),a.setRegion(0,e-8,9,8);for(var o=t.alignmentPatternCenters.length,s=0;s<o;s++){i=t.alignmentPatternCenters[s]-2;for(var u=0;u<o;u++)0==s&&(0==u||u==o-1)||s==o-1&&0==u||a.setRegion(t.alignmentPatternCenters[u]-2,i,5,5)}return a.setRegion(6,9,1,e-17),a.setRegion(9,6,e-17,1),t.versionNumber>6&&(a.setRegion(e-11,0,3,6),a.setRegion(0,e-11,6,3)),a}(e),s=!0,u=[],l=0,f=0,h=0,p=a-1;p>0;p-=2){6==p&&p--;for(var d=0;d<a;d++)for(var g=s?a-1-d:d,v=0;v<2;v++)o.get(p-v,g)||(h++,f<<=1,t.get(p-v,g)!==i(g,p-v)&&(f|=1),8==h&&(u[l++]=255&f,h=0,f=0));s=!s}return l!=e.totalCodewords?null:u}function p(t){return{errorCorrectionLevel:f[t>>3&3],dataMask:7&t}}function d(t,e){for(var n=1/0,r=0,i=0;i<l.length;i++){var o=l[i],s=o[0];if(s==t||s==e)return p(o[1]);var u=a.numBitsDiffering(t,s);u<n&&(r=o[1],n=u),t!=e&&(u=a.numBitsDiffering(e,s))<n&&(r=o[1],n=u)}return n<=3?p(r):null}function g(t){for(var e=0,n=0;n<6;n++)e=t.copyBit(n,8,e);e=t.copyBit(7,8,e),e=t.copyBit(8,8,e),e=t.copyBit(8,7,e);for(var r=5;r>=0;r--)e=t.copyBit(8,r,e);var i=t.height,a=0,o=i-7;for(r=i-1;r>=o;r--)a=t.copyBit(8,r,a);for(n=i-8;n<i;n++)a=t.copyBit(n,8,a);var s,l,c=d(s=e,l=a)||d(s^u,l^u);return null!=c?c:null}function v(t,e){for(var n=new o.ReedSolomonDecoder,r=t.length,i=new Array(r),a=0;a<r;a++)i[a]=255&t[a];var s=t.length-e;if(!n.decode(i,s))return!1;for(a=0;a<e;a++)t[a]=i[a];return!0}function m(t){var e=function(t){var e=t.height,n=e-17>>2;if(n<=6)return s.getVersionForNumber(n);for(var r=0,i=e-11,a=5;a>=0;a--)for(var o=e-9;o>=i;o--)r=t.copyBit(o,a,r);var u=s.Version.decodeVersionInformation(r);if(null!=u&&u.getDimensionForVersion()==e)return u;for(r=0,o=5;o>=0;o--)for(a=e-9;a>=i;a--)r=t.copyBit(o,a,r);return null!=(u=s.Version.decodeVersionInformation(r))&&u.getDimensionForVersion()==e?u:null}(t);if(!e)return null;var n=g(t);if(!n)return null;var r=n.errorCorrectionLevel,a=h(t,e,n);if(!a)return null;var o=function(t,e,n){if(t.length!=e.totalCodewords)throw new Error("Invalid number of codewords for version; got "+t.length+" expected "+e.totalCodewords);var r=e.getECBlocksForLevel(n),i=0,a=r.ecBlocks;a.forEach(function(t){i+=t.count});var o=new Array(i),s=0;a.forEach(function(t){for(var e=0;e<t.count;e++){var n=t.dataCodewords,i=r.ecCodewordsPerBlock+n;o[s++]={numDataCodewords:n,codewords:new Array(i)}}});for(var u=o[0].codewords.length,l=o.length-1;l>=0&&o[l].codewords.length!=u;)l--;l++;for(var c=u-r.ecCodewordsPerBlock,f=0,h=0;h<c;h++)for(var p=0;p<s;p++)o[p].codewords[h]=t[f++];for(p=l;p<s;p++)o[p].codewords[c]=t[f++];var d=o[0].codewords.length;for(h=c;h<d;h++)for(p=0;p<s;p++){var g=p<l?h:h+1;o[p].codewords[g]=t[f++]}return o}(a,e,r),u=0;o.forEach(function(t){u+=t.numDataCodewords});for(var l=new Array(u),c=0,f=0,p=o;f<p.length;f++){var d=p[f],m=d.codewords,_=d.numDataCodewords;if(!v(m,_))return null;for(var w=0;w<_;w++)l[c++]=m[w]}return i.decodeQRdata(l,e.versionNumber,r.name)}e.decode=function(t){if(null==t)return null;var e=m(t);return e||(t.mirror(),m(t))}},function(t,e,n){"use strict";var r=n(11);function i(t){var e=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];if(t>=e.length)throw new Error("Could not decode alphanumeric char");return e[t].charCodeAt(0)}var a=function(){function t(t,e){this.characterCountBitsForVersions=t,this.bits=e}return t.prototype.getCharacterCountBits=function(t){if(null==this.characterCountBitsForVersions)throw new Error("Character count doesn't apply to this mode");var e;return e=t<=9?0:t<=26?1:2,this.characterCountBitsForVersions[e]},t}(),o=new a([0,0,0],0),s=new a([10,12,14],1),u=new a([9,11,13],2),l=new a([0,0,0],3),c=new a([8,16,16],4),f=new a(null,7),h=new a([8,10,12],8),p=new a(null,5),d=new a(null,9),g=new a([8,10,12],13);function v(t){switch(t){case 0:return o;case 1:return s;case 2:return u;case 3:return l;case 4:return c;case 5:return p;case 7:return f;case 8:return h;case 9:return d;case 13:return g;default:throw new Error("Couldn't decode mode from byte array")}}function m(t){var e=t.readBits(8);if(0==(128&e))return 127&e;if(128==(192&e))return(63&e)<<8|t.readBits(8);if(192==(224&e))return(31&e)<<16|t.readBits(16);throw new Error("Bad ECI bits starting with byte "+e)}function _(t,e,n){if(13*n>t.available())return!1;for(var r=new Array(2*n),i=0;n>0;){var a=t.readBits(13),o=Math.floor(a/96)<<8|a%96;o+=o<959?41377:42657,r[i]=o>>8&255,r[i+1]=255&o,i+=2,n--}return e.val=r,!0}function w(t,e,n){for(;n>=3;){if(t.available()<10)return!1;var r=t.readBits(10);if(r>=1e3)return!1;e.val.push(i(Math.floor(r/100))),e.val.push(i(Math.floor(r/10)%10)),e.val.push(i(r%10)),n-=3}if(2==n){if(t.available()<7)return!1;var a=t.readBits(7);if(a>=100)return!1;e.val.push(i(Math.floor(a/10))),e.val.push(i(a%10))}else if(1==n){if(t.available()<4)return!1;var o=t.readBits(4);if(o>=10)return!1;e.val.push(i(o))}return!0}function b(t,e,n,r){for(var a=e.val.length;n>1;){if(t.available()<11)return!1;var o=t.readBits(11);e.val.push(i(Math.floor(o/45))),e.val.push(i(o%45)),n-=2}if(1==n){if(t.available()<6)return!1;e.val.push(i(t.readBits(6)))}if(r)for(var s=a;s<e.val.length;s++)e.val[s]=="%".charCodeAt(0)&&(s<e.val.length-1&&e.val[s+1]=="%".charCodeAt(0)?e.val=e.val.slice(0,s+1).concat(e.val.slice(s+2)):e.val[s]=29);return!0}function y(t,e,n){if(n<<3>t.available())return!1;for(var r=new Array(n),i=0;i<n;i++)r[i]=t.readBits(8);return Array.prototype.push.apply(e.val,r),!0}var x=1;e.decodeQRdata=function(t,e,n){for(var i,a=new r.BitStream(t),k={val:[]},E=!1;i!=o;)if((i=a.available()<4?o:v(a.readBits(4)))!=o)if(i==p||i==d)E=!0;else if(i==l){if(a.available()<16)return null;a.readBits(8),a.readBits(8)}else if(i==f){var S=m(a);if(S<0||S>30)return null}else if(i==g){var A=a.readBits(4),M=a.readBits(i.getCharacterCountBits(e));if(A==x&&!_(a,k,M))return null}else{var T=a.readBits(i.getCharacterCountBits(e));if(i==s){if(!w(a,k,T))return null}else if(i==u){if(!b(a,k,T,E))return null}else if(i==c){if(!y(a,k,T))return null}else if(i!=h)return null}return k.val}},function(t,e){"use strict";var n=function(){function t(t){this.byteOffset=0,this.bitOffset=0,this.bytes=t}return t.prototype.readBits=function(t){if(t<1||t>32||t>this.available())throw new Error("Cannot read "+t.toString()+" bits");var e=0;if(this.bitOffset>0){var n=8-this.bitOffset,r=t<n?t:n,i=255>>8-r<<(a=n-r);e=(this.bytes[this.byteOffset]&i)>>a,t-=r,this.bitOffset+=r,8==this.bitOffset&&(this.bitOffset=0,this.byteOffset++)}if(t>0){for(;t>=8;)e=e<<8|255&this.bytes[this.byteOffset],this.byteOffset++,t-=8;if(t>0){var a;i=255>>(a=8-t)<<a;e=e<<t|(this.bytes[this.byteOffset]&i)>>a,this.bitOffset+=t}}return e},t.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},t}();e.BitStream=n},function(t,e){"use strict";var n=function(){function t(){this.field=new i(285,256,0)}return t.prototype.decode=function(t,e){for(var n=new r(this.field,t),a=new Array(e),o=!0,s=0;s<e;s++){var u=n.evaluateAt(this.field.exp(s+this.field.generatorBase));a[a.length-1-s]=u,0!=u&&(o=!1)}if(o)return!0;var l=new r(this.field,a),c=this.runEuclideanAlgorithm(this.field.buildMonomial(e,1),l,e);if(null==c)return!1;var f=c[0],h=this.findErrorLocations(f);if(null==h)return!1;var p=c[1],d=this.findErrorMagnitudes(p,h);for(s=0;s<h.length;s++){var g=t.length-1-this.field.log(h[s]);if(g<0)return!1;t[g]=i.addOrSubtract(t[g],d[s])}return!0},t.prototype.runEuclideanAlgorithm=function(t,e,n){if(t.degree()<e.degree()){var r=t;t=e,e=r}for(var i=t,a=e,o=this.field.zero,s=this.field.one;a.degree()>=n/2;){var u=i,l=o;if(o=s,(i=a).isZero())return null;a=u;for(var c=this.field.zero,f=i.getCoefficient(i.degree()),h=this.field.inverse(f);a.degree()>=i.degree()&&!a.isZero();){var p=a.degree()-i.degree(),d=this.field.multiply(a.getCoefficient(a.degree()),h);c=c.addOrSubtract(this.field.buildMonomial(p,d)),a=a.addOrSubtract(i.multiplyByMonomial(p,d))}if(s=c.multiplyPoly(o).addOrSubtract(l),a.degree()>=i.degree())return null}var g=s.getCoefficient(0);if(0==g)return null;var v=this.field.inverse(g);return[s.multiply(v),a.multiply(v)]},t.prototype.findErrorLocations=function(t){var e=t.degree();if(1==e)return[t.getCoefficient(1)];for(var n=new Array(e),r=0,i=1;i<this.field.size&&r<e;i++)0==t.evaluateAt(i)&&(n[r]=this.field.inverse(i),r++);return r!=e?null:n},t.prototype.findErrorMagnitudes=function(t,e){for(var n=e.length,r=new Array(n),i=0;i<n;i++){for(var a=this.field.inverse(e[i]),o=1,s=0;s<n;s++)if(i!=s){var u=this.field.multiply(e[s],a),l=0==(1&u)?1|u:-2&u;o=this.field.multiply(o,l)}r[i]=this.field.multiply(t.evaluateAt(a),this.field.inverse(o)),0!=this.field.generatorBase&&(r[i]=this.field.multiply(r[i],a))}return r},t}();e.ReedSolomonDecoder=n;var r=function(){function t(t,e){if(0==e.length)throw new Error("No coefficients.");this.field=t;var n=e.length;if(n>1&&0==e[0]){for(var r=1;r<n&&0==e[r];)r++;if(r==n)this.coefficients=t.zero.coefficients;else{this.coefficients=new Array(n-r);for(var i=0;i<this.coefficients.length;i++)this.coefficients[i]=e[r+i]}}else this.coefficients=e}return t.prototype.evaluateAt=function(t){var e=0;if(0==t)return this.getCoefficient(0);var n=this.coefficients.length;if(1==t)return this.coefficients.forEach(function(t){e=i.addOrSubtract(e,t)}),e;e=this.coefficients[0];for(var r=1;r<n;r++)e=i.addOrSubtract(this.field.multiply(t,e),this.coefficients[r]);return e},t.prototype.getCoefficient=function(t){return this.coefficients[this.coefficients.length-1-t]},t.prototype.degree=function(){return this.coefficients.length-1},t.prototype.isZero=function(){return 0==this.coefficients[0]},t.prototype.addOrSubtract=function(e){if(this.isZero())return e;if(e.isZero())return this;var n=this.coefficients,r=e.coefficients;if(n.length>r.length){var a=n;n=r,r=a}for(var o=new Array(r.length),s=r.length-n.length,u=0;u<s;u++)o[u]=r[u];for(u=s;u<r.length;u++)o[u]=i.addOrSubtract(n[u-s],r[u]);return new t(this.field,o)},t.prototype.multiply=function(e){if(0==e)return this.field.zero;if(1==e)return this;for(var n=this.coefficients.length,r=new Array(n),i=0;i<n;i++)r[i]=this.field.multiply(this.coefficients[i],e);return new t(this.field,r)},t.prototype.multiplyPoly=function(e){if(this.isZero()||e.isZero())return this.field.zero;for(var n=this.coefficients,r=n.length,a=e.coefficients,o=a.length,s=new Array(r+o-1),u=0;u<r;u++)for(var l=n[u],c=0;c<o;c++)s[u+c]=i.addOrSubtract(s[u+c],this.field.multiply(l,a[c]));return new t(this.field,s)},t.prototype.multiplyByMonomial=function(e,n){if(e<0)throw new Error("Invalid degree less than 0");if(0==n)return this.field.zero;for(var r=this.coefficients.length,i=new Array(r+e),a=0;a<r;a++)i[a]=this.field.multiply(this.coefficients[a],n);return new t(this.field,i)},t}(),i=function(){function t(t,e,n){this.INITIALIZATION_THRESHOLD=0,this.initialized=!1,this.primitive=t,this.size=e,this.generatorBase=n,e<=this.INITIALIZATION_THRESHOLD&&this.initialize()}return t.prototype.initialize=function(){this.expTable=new Array(this.size),this.logTable=new Array(this.size);for(var t=1,e=0;e<this.size;e++)this.expTable[e]=t,(t<<=1)>=this.size&&(t^=this.primitive,t&=this.size-1);for(e=0;e<this.size-1;e++)this.logTable[this.expTable[e]]=e;this.zero=new r(this,[0]),this.one=new r(this,[1]),this.initialized=!0},t.addOrSubtract=function(t,e){return t^e},t.prototype.checkInit=function(){this.initialized||this.initialize()},t.prototype.multiply=function(t,e){return this.checkInit(),0==t||0==e?0:this.expTable[(this.logTable[t]+this.logTable[e])%(this.size-1)]},t.prototype.exp=function(t){return this.checkInit(),this.expTable[t]},t.prototype.log=function(t){if(this.checkInit(),0==t)throw new Error("Can't take log(0)");return this.logTable[t]},t.prototype.inverse=function(t){if(this.checkInit(),0==t)throw new Error("Can't invert 0");return this.expTable[this.size-this.logTable[t]-1]},t.prototype.buildMonomial=function(t,e){if(this.checkInit(),t<0)throw new Error("Invalid monomial degree less than 0");if(0==e)return this.zero;var n=new Array(t+1);return n[0]=e,new r(this,n)},t}()}])},"object"==typeof n&&"object"==typeof e?e.exports=i():"function"==typeof define&&define.amd?define([],i):"object"==typeof n?n.jsQR=i():r.jsQR=i()},{}],58:[function(t,e,n){(function(t){(function(){var r,i=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",o="Expected a function",s="__lodash_hash_undefined__",u=500,l="__lodash_placeholder__",c=1,f=2,h=4,p=1,d=2,g=1,v=2,m=4,_=8,w=16,b=32,y=64,x=128,k=256,E=512,S=30,A="...",M=800,T=16,I=1,j=2,R=1/0,L=9007199254740991,C=1.7976931348623157e308,B=NaN,D=4294967295,z=D-1,O=D>>>1,F=[["ary",x],["bind",g],["bindKey",v],["curry",_],["curryRight",w],["flip",E],["partial",b],["partialRight",y],["rearg",k]],P="[object Arguments]",U="[object Array]",N="[object AsyncFunction]",q="[object Boolean]",V="[object Date]",Z="[object DOMException]",W="[object Error]",G="[object Function]",H="[object GeneratorFunction]",Y="[object Map]",$="[object Number]",X="[object Null]",K="[object Object]",J="[object Proxy]",Q="[object RegExp]",tt="[object Set]",et="[object String]",nt="[object Symbol]",rt="[object Undefined]",it="[object WeakMap]",at="[object WeakSet]",ot="[object ArrayBuffer]",st="[object DataView]",ut="[object Float32Array]",lt="[object Float64Array]",ct="[object Int8Array]",ft="[object Int16Array]",ht="[object Int32Array]",pt="[object Uint8Array]",dt="[object Uint8ClampedArray]",gt="[object Uint16Array]",vt="[object Uint32Array]",mt=/\b__p \+= '';/g,_t=/\b(__p \+=) '' \+/g,wt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,bt=/&(?:amp|lt|gt|quot|#39);/g,yt=/[&<>"']/g,xt=RegExp(bt.source),kt=RegExp(yt.source),Et=/<%-([\s\S]+?)%>/g,St=/<%([\s\S]+?)%>/g,At=/<%=([\s\S]+?)%>/g,Mt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tt=/^\w*$/,It=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jt=/[\\^$.*+?()[\]{}|]/g,Rt=RegExp(jt.source),Lt=/^\s+|\s+$/g,Ct=/^\s+/,Bt=/\s+$/,Dt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,zt=/\{\n\/\* \[wrapped with (.+)\] \*/,Ot=/,? & /,Ft=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Pt=/\\(\\)?/g,Ut=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Nt=/\w*$/,qt=/^[-+]0x[0-9a-f]+$/i,Vt=/^0b[01]+$/i,Zt=/^\[object .+?Constructor\]$/,Wt=/^0o[0-7]+$/i,Gt=/^(?:0|[1-9]\d*)$/,Ht=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Yt=/($^)/,$t=/['\n\r\u2028\u2029\\]/g,Xt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Kt="\\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",Jt="[\\ud800-\\udfff]",Qt="["+Kt+"]",te="["+Xt+"]",ee="\\d+",ne="[\\u2700-\\u27bf]",re="[a-z\\xdf-\\xf6\\xf8-\\xff]",ie="[^\\ud800-\\udfff"+Kt+ee+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",ae="\\ud83c[\\udffb-\\udfff]",oe="[^\\ud800-\\udfff]",se="(?:\\ud83c[\\udde6-\\uddff]){2}",ue="[\\ud800-\\udbff][\\udc00-\\udfff]",le="[A-Z\\xc0-\\xd6\\xd8-\\xde]",ce="(?:"+re+"|"+ie+")",fe="(?:"+le+"|"+ie+")",he="(?:"+te+"|"+ae+")"+"?",pe="[\\ufe0e\\ufe0f]?"+he+("(?:\\u200d(?:"+[oe,se,ue].join("|")+")[\\ufe0e\\ufe0f]?"+he+")*"),de="(?:"+[ne,se,ue].join("|")+")"+pe,ge="(?:"+[oe+te+"?",te,se,ue,Jt].join("|")+")",ve=RegExp("['’]","g"),me=RegExp(te,"g"),_e=RegExp(ae+"(?="+ae+")|"+ge+pe,"g"),we=RegExp([le+"?"+re+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[Qt,le,"$"].join("|")+")",fe+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[Qt,le+ce,"$"].join("|")+")",le+"?"+ce+"+(?:['’](?:d|ll|m|re|s|t|ve))?",le+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ee,de].join("|"),"g"),be=RegExp("[\\u200d\\ud800-\\udfff"+Xt+"\\ufe0e\\ufe0f]"),ye=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,xe=["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"],ke=-1,Ee={};Ee[ut]=Ee[lt]=Ee[ct]=Ee[ft]=Ee[ht]=Ee[pt]=Ee[dt]=Ee[gt]=Ee[vt]=!0,Ee[P]=Ee[U]=Ee[ot]=Ee[q]=Ee[st]=Ee[V]=Ee[W]=Ee[G]=Ee[Y]=Ee[$]=Ee[K]=Ee[Q]=Ee[tt]=Ee[et]=Ee[it]=!1;var Se={};Se[P]=Se[U]=Se[ot]=Se[st]=Se[q]=Se[V]=Se[ut]=Se[lt]=Se[ct]=Se[ft]=Se[ht]=Se[Y]=Se[$]=Se[K]=Se[Q]=Se[tt]=Se[et]=Se[nt]=Se[pt]=Se[dt]=Se[gt]=Se[vt]=!0,Se[W]=Se[G]=Se[it]=!1;var Ae={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Me=parseFloat,Te=parseInt,Ie="object"==typeof t&&t&&t.Object===Object&&t,je="object"==typeof self&&self&&self.Object===Object&&self,Re=Ie||je||Function("return this")(),Le="object"==typeof n&&n&&!n.nodeType&&n,Ce=Le&&"object"==typeof e&&e&&!e.nodeType&&e,Be=Ce&&Ce.exports===Le,De=Be&&Ie.process,ze=function(){try{var t=Ce&&Ce.require&&Ce.require("util").types;return t||De&&De.binding&&De.binding("util")}catch(t){}}(),Oe=ze&&ze.isArrayBuffer,Fe=ze&&ze.isDate,Pe=ze&&ze.isMap,Ue=ze&&ze.isRegExp,Ne=ze&&ze.isSet,qe=ze&&ze.isTypedArray;function Ve(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ze(t,e,n,r){for(var i=-1,a=null==t?0:t.length;++i<a;){var o=t[i];e(r,o,n(o),t)}return r}function We(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ge(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function He(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Ye(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}function $e(t,e){return!!(null==t?0:t.length)&&on(t,e,0)>-1}function Xe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function Ke(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function Je(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function Qe(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}function tn(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function en(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var nn=cn("length");function rn(t,e,n){var r;return n(t,function(t,n,i){if(e(t,n,i))return r=n,!1}),r}function an(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}function on(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):an(t,un,n)}function sn(t,e,n,r){for(var i=n-1,a=t.length;++i<a;)if(r(t[i],e))return i;return-1}function un(t){return t!=t}function ln(t,e){var n=null==t?0:t.length;return n?pn(t,e)/n:B}function cn(t){return function(e){return null==e?r:e[t]}}function fn(t){return function(e){return null==t?r:t[e]}}function hn(t,e,n,r,i){return i(t,function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)}),n}function pn(t,e){for(var n,i=-1,a=t.length;++i<a;){var o=e(t[i]);o!==r&&(n=n===r?o:n+o)}return n}function dn(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function gn(t){return function(e){return t(e)}}function vn(t,e){return Ke(e,function(e){return t[e]})}function mn(t,e){return t.has(e)}function _n(t,e){for(var n=-1,r=t.length;++n<r&&on(e,t[n],0)>-1;);return n}function wn(t,e){for(var n=t.length;n--&&on(e,t[n],0)>-1;);return n}var bn=fn({"À":"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"}),yn=fn({"&":"&","<":"<",">":">",'"':""","'":"'"});function xn(t){return"\\"+Ae[t]}function kn(t){return be.test(t)}function En(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function Sn(t,e){return function(n){return t(e(n))}}function An(t,e){for(var n=-1,r=t.length,i=0,a=[];++n<r;){var o=t[n];o!==e&&o!==l||(t[n]=l,a[i++]=n)}return a}function Mn(t,e){return"__proto__"==e?r:t[e]}function Tn(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function In(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=[t,t]}),n}function jn(t){return kn(t)?function(t){var e=_e.lastIndex=0;for(;_e.test(t);)++e;return e}(t):nn(t)}function Rn(t){return kn(t)?function(t){return t.match(_e)||[]}(t):function(t){return t.split("")}(t)}var Ln=fn({"&":"&","<":"<",">":">",""":'"',"'":"'"});var Cn=function t(e){var n,Xt=(e=null==e?Re:Cn.defaults(Re.Object(),e,Cn.pick(Re,xe))).Array,Kt=e.Date,Jt=e.Error,Qt=e.Function,te=e.Math,ee=e.Object,ne=e.RegExp,re=e.String,ie=e.TypeError,ae=Xt.prototype,oe=Qt.prototype,se=ee.prototype,ue=e["__core-js_shared__"],le=oe.toString,ce=se.hasOwnProperty,fe=0,he=(n=/[^.]+$/.exec(ue&&ue.keys&&ue.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",pe=se.toString,de=le.call(ee),ge=Re._,_e=ne("^"+le.call(ce).replace(jt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),be=Be?e.Buffer:r,Ae=e.Symbol,Ie=e.Uint8Array,je=be?be.allocUnsafe:r,Le=Sn(ee.getPrototypeOf,ee),Ce=ee.create,De=se.propertyIsEnumerable,ze=ae.splice,nn=Ae?Ae.isConcatSpreadable:r,fn=Ae?Ae.iterator:r,Bn=Ae?Ae.toStringTag:r,Dn=function(){try{var t=Pa(ee,"defineProperty");return t({},"",{}),t}catch(t){}}(),zn=e.clearTimeout!==Re.clearTimeout&&e.clearTimeout,On=Kt&&Kt.now!==Re.Date.now&&Kt.now,Fn=e.setTimeout!==Re.setTimeout&&e.setTimeout,Pn=te.ceil,Un=te.floor,Nn=ee.getOwnPropertySymbols,qn=be?be.isBuffer:r,Vn=e.isFinite,Zn=ae.join,Wn=Sn(ee.keys,ee),Gn=te.max,Hn=te.min,Yn=Kt.now,$n=e.parseInt,Xn=te.random,Kn=ae.reverse,Jn=Pa(e,"DataView"),Qn=Pa(e,"Map"),tr=Pa(e,"Promise"),er=Pa(e,"Set"),nr=Pa(e,"WeakMap"),rr=Pa(ee,"create"),ir=nr&&new nr,ar={},or=co(Jn),sr=co(Qn),ur=co(tr),lr=co(er),cr=co(nr),fr=Ae?Ae.prototype:r,hr=fr?fr.valueOf:r,pr=fr?fr.toString:r;function dr(t){if(Ts(t)&&!ms(t)&&!(t instanceof _r)){if(t instanceof mr)return t;if(ce.call(t,"__wrapped__"))return fo(t)}return new mr(t)}var gr=function(){function t(){}return function(e){if(!Ms(e))return{};if(Ce)return Ce(e);t.prototype=e;var n=new t;return t.prototype=r,n}}();function vr(){}function mr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=r}function _r(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=D,this.__views__=[]}function wr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function br(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function yr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function xr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new yr;++e<n;)this.add(t[e])}function kr(t){var e=this.__data__=new br(t);this.size=e.size}function Er(t,e){var n=ms(t),r=!n&&vs(t),i=!n&&!r&&ys(t),a=!n&&!r&&!i&&zs(t),o=n||r||i||a,s=o?dn(t.length,re):[],u=s.length;for(var l in t)!e&&!ce.call(t,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ga(l,u))||s.push(l);return s}function Sr(t){var e=t.length;return e?t[xi(0,e-1)]:r}function Ar(t,e){return so(ra(t),Dr(e,0,t.length))}function Mr(t){return so(ra(t))}function Tr(t,e,n){(n===r||ps(t[e],n))&&(n!==r||e in t)||Cr(t,e,n)}function Ir(t,e,n){var i=t[e];ce.call(t,e)&&ps(i,n)&&(n!==r||e in t)||Cr(t,e,n)}function jr(t,e){for(var n=t.length;n--;)if(ps(t[n][0],e))return n;return-1}function Rr(t,e,n,r){return Ur(t,function(t,i,a){e(r,t,n(t),a)}),r}function Lr(t,e){return t&&ia(e,iu(e),t)}function Cr(t,e,n){"__proto__"==e&&Dn?Dn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Br(t,e){for(var n=-1,i=e.length,a=Xt(i),o=null==t;++n<i;)a[n]=o?r:Qs(t,e[n]);return a}function Dr(t,e,n){return t==t&&(n!==r&&(t=t<=n?t:n),e!==r&&(t=t>=e?t:e)),t}function zr(t,e,n,i,a,o){var s,u=e&c,l=e&f,p=e&h;if(n&&(s=a?n(t,i,a,o):n(t)),s!==r)return s;if(!Ms(t))return t;var d=ms(t);if(d){if(s=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&ce.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!u)return ra(t,s)}else{var g=qa(t),v=g==G||g==H;if(ys(t))return Ki(t,u);if(g==K||g==P||v&&!a){if(s=l||v?{}:Za(t),!u)return l?function(t,e){return ia(t,Na(t),e)}(t,function(t,e){return t&&ia(e,au(e),t)}(s,t)):function(t,e){return ia(t,Ua(t),e)}(t,Lr(s,t))}else{if(!Se[g])return a?t:{};s=function(t,e,n){var r,i,a,o=t.constructor;switch(e){case ot:return Ji(t);case q:case V:return new o(+t);case st:return function(t,e){var n=e?Ji(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case ut:case lt:case ct:case ft:case ht:case pt:case dt:case gt:case vt:return Qi(t,n);case Y:return new o;case $:case et:return new o(t);case Q:return(a=new(i=t).constructor(i.source,Nt.exec(i))).lastIndex=i.lastIndex,a;case tt:return new o;case nt:return r=t,hr?ee(hr.call(r)):{}}}(t,g,u)}}o||(o=new kr);var m=o.get(t);if(m)return m;if(o.set(t,s),Cs(t))return t.forEach(function(r){s.add(zr(r,e,n,r,t,o))}),s;if(Is(t))return t.forEach(function(r,i){s.set(i,zr(r,e,n,i,t,o))}),s;var _=d?r:(p?l?La:Ra:l?au:iu)(t);return We(_||t,function(r,i){_&&(r=t[i=r]),Ir(s,i,zr(r,e,n,i,t,o))}),s}function Or(t,e,n){var i=n.length;if(null==t)return!i;for(t=ee(t);i--;){var a=n[i],o=e[a],s=t[a];if(s===r&&!(a in t)||!o(s))return!1}return!0}function Fr(t,e,n){if("function"!=typeof t)throw new ie(o);return ro(function(){t.apply(r,n)},e)}function Pr(t,e,n,r){var a=-1,o=$e,s=!0,u=t.length,l=[],c=e.length;if(!u)return l;n&&(e=Ke(e,gn(n))),r?(o=Xe,s=!1):e.length>=i&&(o=mn,s=!1,e=new xr(e));t:for(;++a<u;){var f=t[a],h=null==n?f:n(f);if(f=r||0!==f?f:0,s&&h==h){for(var p=c;p--;)if(e[p]===h)continue t;l.push(f)}else o(e,h,r)||l.push(f)}return l}dr.templateSettings={escape:Et,evaluate:St,interpolate:At,variable:"",imports:{_:dr}},dr.prototype=vr.prototype,dr.prototype.constructor=dr,mr.prototype=gr(vr.prototype),mr.prototype.constructor=mr,_r.prototype=gr(vr.prototype),_r.prototype.constructor=_r,wr.prototype.clear=function(){this.__data__=rr?rr(null):{},this.size=0},wr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},wr.prototype.get=function(t){var e=this.__data__;if(rr){var n=e[t];return n===s?r:n}return ce.call(e,t)?e[t]:r},wr.prototype.has=function(t){var e=this.__data__;return rr?e[t]!==r:ce.call(e,t)},wr.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rr&&e===r?s:e,this},br.prototype.clear=function(){this.__data__=[],this.size=0},br.prototype.delete=function(t){var e=this.__data__,n=jr(e,t);return!(n<0||(n==e.length-1?e.pop():ze.call(e,n,1),--this.size,0))},br.prototype.get=function(t){var e=this.__data__,n=jr(e,t);return n<0?r:e[n][1]},br.prototype.has=function(t){return jr(this.__data__,t)>-1},br.prototype.set=function(t,e){var n=this.__data__,r=jr(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},yr.prototype.clear=function(){this.size=0,this.__data__={hash:new wr,map:new(Qn||br),string:new wr}},yr.prototype.delete=function(t){var e=Oa(this,t).delete(t);return this.size-=e?1:0,e},yr.prototype.get=function(t){return Oa(this,t).get(t)},yr.prototype.has=function(t){return Oa(this,t).has(t)},yr.prototype.set=function(t,e){var n=Oa(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},xr.prototype.add=xr.prototype.push=function(t){return this.__data__.set(t,s),this},xr.prototype.has=function(t){return this.__data__.has(t)},kr.prototype.clear=function(){this.__data__=new br,this.size=0},kr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},kr.prototype.get=function(t){return this.__data__.get(t)},kr.prototype.has=function(t){return this.__data__.has(t)},kr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof br){var r=n.__data__;if(!Qn||r.length<i-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new yr(r)}return n.set(t,e),this.size=n.size,this};var Ur=sa(Yr),Nr=sa($r,!0);function qr(t,e){var n=!0;return Ur(t,function(t,r,i){return n=!!e(t,r,i)}),n}function Vr(t,e,n){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=e(o);if(null!=s&&(u===r?s==s&&!Ds(s):n(s,u)))var u=s,l=o}return l}function Zr(t,e){var n=[];return Ur(t,function(t,r,i){e(t,r,i)&&n.push(t)}),n}function Wr(t,e,n,r,i){var a=-1,o=t.length;for(n||(n=Wa),i||(i=[]);++a<o;){var s=t[a];e>0&&n(s)?e>1?Wr(s,e-1,n,r,i):Je(i,s):r||(i[i.length]=s)}return i}var Gr=ua(),Hr=ua(!0);function Yr(t,e){return t&&Gr(t,e,iu)}function $r(t,e){return t&&Hr(t,e,iu)}function Xr(t,e){return Ye(e,function(e){return Es(t[e])})}function Kr(t,e){for(var n=0,i=(e=Hi(e,t)).length;null!=t&&n<i;)t=t[lo(e[n++])];return n&&n==i?t:r}function Jr(t,e,n){var r=e(t);return ms(t)?r:Je(r,n(t))}function Qr(t){return null==t?t===r?rt:X:Bn&&Bn in ee(t)?function(t){var e=ce.call(t,Bn),n=t[Bn];try{t[Bn]=r;var i=!0}catch(t){}var a=pe.call(t);return i&&(e?t[Bn]=n:delete t[Bn]),a}(t):function(t){return pe.call(t)}(t)}function ti(t,e){return t>e}function ei(t,e){return null!=t&&ce.call(t,e)}function ni(t,e){return null!=t&&e in ee(t)}function ri(t,e,n){for(var i=n?Xe:$e,a=t[0].length,o=t.length,s=o,u=Xt(o),l=1/0,c=[];s--;){var f=t[s];s&&e&&(f=Ke(f,gn(e))),l=Hn(f.length,l),u[s]=!n&&(e||a>=120&&f.length>=120)?new xr(s&&f):r}f=t[0];var h=-1,p=u[0];t:for(;++h<a&&c.length<l;){var d=f[h],g=e?e(d):d;if(d=n||0!==d?d:0,!(p?mn(p,g):i(c,g,n))){for(s=o;--s;){var v=u[s];if(!(v?mn(v,g):i(t[s],g,n)))continue t}p&&p.push(g),c.push(d)}}return c}function ii(t,e,n){var i=null==(t=eo(t,e=Hi(e,t)))?t:t[lo(ko(e))];return null==i?r:Ve(i,t,n)}function ai(t){return Ts(t)&&Qr(t)==P}function oi(t,e,n,i,a){return t===e||(null==t||null==e||!Ts(t)&&!Ts(e)?t!=t&&e!=e:function(t,e,n,i,a,o){var s=ms(t),u=ms(e),l=s?U:qa(t),c=u?U:qa(e),f=(l=l==P?K:l)==K,h=(c=c==P?K:c)==K,g=l==c;if(g&&ys(t)){if(!ys(e))return!1;s=!0,f=!1}if(g&&!f)return o||(o=new kr),s||zs(t)?Ia(t,e,n,i,a,o):function(t,e,n,r,i,a,o){switch(n){case st:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case ot:return!(t.byteLength!=e.byteLength||!a(new Ie(t),new Ie(e)));case q:case V:case $:return ps(+t,+e);case W:return t.name==e.name&&t.message==e.message;case Q:case et:return t==e+"";case Y:var s=En;case tt:var u=r&p;if(s||(s=Tn),t.size!=e.size&&!u)return!1;var l=o.get(t);if(l)return l==e;r|=d,o.set(t,e);var c=Ia(s(t),s(e),r,i,a,o);return o.delete(t),c;case nt:if(hr)return hr.call(t)==hr.call(e)}return!1}(t,e,l,n,i,a,o);if(!(n&p)){var v=f&&ce.call(t,"__wrapped__"),m=h&&ce.call(e,"__wrapped__");if(v||m){var _=v?t.value():t,w=m?e.value():e;return o||(o=new kr),a(_,w,n,i,o)}}return!!g&&(o||(o=new kr),function(t,e,n,i,a,o){var s=n&p,u=Ra(t),l=u.length,c=Ra(e).length;if(l!=c&&!s)return!1;for(var f=l;f--;){var h=u[f];if(!(s?h in e:ce.call(e,h)))return!1}var d=o.get(t);if(d&&o.get(e))return d==e;var g=!0;o.set(t,e),o.set(e,t);for(var v=s;++f<l;){h=u[f];var m=t[h],_=e[h];if(i)var w=s?i(_,m,h,e,t,o):i(m,_,h,t,e,o);if(!(w===r?m===_||a(m,_,n,i,o):w)){g=!1;break}v||(v="constructor"==h)}if(g&&!v){var b=t.constructor,y=e.constructor;b!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y)&&(g=!1)}return o.delete(t),o.delete(e),g}(t,e,n,i,a,o))}(t,e,n,i,oi,a))}function si(t,e,n,i){var a=n.length,o=a,s=!i;if(null==t)return!o;for(t=ee(t);a--;){var u=n[a];if(s&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++a<o;){var l=(u=n[a])[0],c=t[l],f=u[1];if(s&&u[2]){if(c===r&&!(l in t))return!1}else{var h=new kr;if(i)var g=i(c,f,l,t,e,h);if(!(g===r?oi(f,c,p|d,i,h):g))return!1}}return!0}function ui(t){return!(!Ms(t)||he&&he in t)&&(Es(t)?_e:Zt).test(co(t))}function li(t){return"function"==typeof t?t:null==t?ju:"object"==typeof t?ms(t)?gi(t[0],t[1]):di(t):Pu(t)}function ci(t){if(!Ka(t))return Wn(t);var e=[];for(var n in ee(t))ce.call(t,n)&&"constructor"!=n&&e.push(n);return e}function fi(t){if(!Ms(t))return function(t){var e=[];if(null!=t)for(var n in ee(t))e.push(n);return e}(t);var e=Ka(t),n=[];for(var r in t)("constructor"!=r||!e&&ce.call(t,r))&&n.push(r);return n}function hi(t,e){return t<e}function pi(t,e){var n=-1,r=ws(t)?Xt(t.length):[];return Ur(t,function(t,i,a){r[++n]=e(t,i,a)}),r}function di(t){var e=Fa(t);return 1==e.length&&e[0][2]?Qa(e[0][0],e[0][1]):function(n){return n===t||si(n,t,e)}}function gi(t,e){return Ya(t)&&Ja(e)?Qa(lo(t),e):function(n){var i=Qs(n,t);return i===r&&i===e?tu(n,t):oi(e,i,p|d)}}function vi(t,e,n,i,a){t!==e&&Gr(e,function(o,s){if(Ms(o))a||(a=new kr),function(t,e,n,i,a,o,s){var u=Mn(t,n),l=Mn(e,n),c=s.get(l);if(c)Tr(t,n,c);else{var f=o?o(u,l,n+"",t,e,s):r,h=f===r;if(h){var p=ms(l),d=!p&&ys(l),g=!p&&!d&&zs(l);f=l,p||d||g?ms(u)?f=u:bs(u)?f=ra(u):d?(h=!1,f=Ki(l,!0)):g?(h=!1,f=Qi(l,!0)):f=[]:Rs(l)||vs(l)?(f=u,vs(u)?f=Zs(u):(!Ms(u)||i&&Es(u))&&(f=Za(l))):h=!1}h&&(s.set(l,f),a(f,l,i,o,s),s.delete(l)),Tr(t,n,f)}}(t,e,s,n,vi,i,a);else{var u=i?i(Mn(t,s),o,s+"",t,e,a):r;u===r&&(u=o),Tr(t,s,u)}},au)}function mi(t,e){var n=t.length;if(n)return Ga(e+=e<0?n:0,n)?t[e]:r}function _i(t,e,n){var r=-1;return e=Ke(e.length?e:[ju],gn(za())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(pi(t,function(t,n,i){return{criteria:Ke(e,function(e){return e(t)}),index:++r,value:t}}),function(t,e){return function(t,e,n){for(var r=-1,i=t.criteria,a=e.criteria,o=i.length,s=n.length;++r<o;){var u=ta(i[r],a[r]);if(u){if(r>=s)return u;var l=n[r];return u*("desc"==l?-1:1)}}return t.index-e.index}(t,e,n)})}function wi(t,e,n){for(var r=-1,i=e.length,a={};++r<i;){var o=e[r],s=Kr(t,o);n(s,o)&&Mi(a,Hi(o,t),s)}return a}function bi(t,e,n,r){var i=r?sn:on,a=-1,o=e.length,s=t;for(t===e&&(e=ra(e)),n&&(s=Ke(t,gn(n)));++a<o;)for(var u=0,l=e[a],c=n?n(l):l;(u=i(s,c,u,r))>-1;)s!==t&&ze.call(s,u,1),ze.call(t,u,1);return t}function yi(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==a){var a=i;Ga(i)?ze.call(t,i,1):Pi(t,i)}}return t}function xi(t,e){return t+Un(Xn()*(e-t+1))}function ki(t,e){var n="";if(!t||e<1||e>L)return n;do{e%2&&(n+=t),(e=Un(e/2))&&(t+=t)}while(e);return n}function Ei(t,e){return io(to(t,e,ju),t+"")}function Si(t){return Sr(pu(t))}function Ai(t,e){var n=pu(t);return so(n,Dr(e,0,n.length))}function Mi(t,e,n,i){if(!Ms(t))return t;for(var a=-1,o=(e=Hi(e,t)).length,s=o-1,u=t;null!=u&&++a<o;){var l=lo(e[a]),c=n;if(a!=s){var f=u[l];(c=i?i(f,l,u):r)===r&&(c=Ms(f)?f:Ga(e[a+1])?[]:{})}Ir(u,l,c),u=u[l]}return t}var Ti=ir?function(t,e){return ir.set(t,e),t}:ju,Ii=Dn?function(t,e){return Dn(t,"toString",{configurable:!0,enumerable:!1,value:Mu(e),writable:!0})}:ju;function ji(t){return so(pu(t))}function Ri(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=Xt(i);++r<i;)a[r]=t[r+e];return a}function Li(t,e){var n;return Ur(t,function(t,r,i){return!(n=e(t,r,i))}),!!n}function Ci(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=O){for(;r<i;){var a=r+i>>>1,o=t[a];null!==o&&!Ds(o)&&(n?o<=e:o<e)?r=a+1:i=a}return i}return Bi(t,e,ju,n)}function Bi(t,e,n,i){e=n(e);for(var a=0,o=null==t?0:t.length,s=e!=e,u=null===e,l=Ds(e),c=e===r;a<o;){var f=Un((a+o)/2),h=n(t[f]),p=h!==r,d=null===h,g=h==h,v=Ds(h);if(s)var m=i||g;else m=c?g&&(i||p):u?g&&p&&(i||!d):l?g&&p&&!d&&(i||!v):!d&&!v&&(i?h<=e:h<e);m?a=f+1:o=f}return Hn(o,z)}function Di(t,e){for(var n=-1,r=t.length,i=0,a=[];++n<r;){var o=t[n],s=e?e(o):o;if(!n||!ps(s,u)){var u=s;a[i++]=0===o?0:o}}return a}function zi(t){return"number"==typeof t?t:Ds(t)?B:+t}function Oi(t){if("string"==typeof t)return t;if(ms(t))return Ke(t,Oi)+"";if(Ds(t))return pr?pr.call(t):"";var e=t+"";return"0"==e&&1/t==-R?"-0":e}function Fi(t,e,n){var r=-1,a=$e,o=t.length,s=!0,u=[],l=u;if(n)s=!1,a=Xe;else if(o>=i){var c=e?null:ka(t);if(c)return Tn(c);s=!1,a=mn,l=new xr}else l=e?[]:u;t:for(;++r<o;){var f=t[r],h=e?e(f):f;if(f=n||0!==f?f:0,s&&h==h){for(var p=l.length;p--;)if(l[p]===h)continue t;e&&l.push(h),u.push(f)}else a(l,h,n)||(l!==u&&l.push(h),u.push(f))}return u}function Pi(t,e){return null==(t=eo(t,e=Hi(e,t)))||delete t[lo(ko(e))]}function Ui(t,e,n,r){return Mi(t,e,n(Kr(t,e)),r)}function Ni(t,e,n,r){for(var i=t.length,a=r?i:-1;(r?a--:++a<i)&&e(t[a],a,t););return n?Ri(t,r?0:a,r?a+1:i):Ri(t,r?a+1:0,r?i:a)}function qi(t,e){var n=t;return n instanceof _r&&(n=n.value()),Qe(e,function(t,e){return e.func.apply(e.thisArg,Je([t],e.args))},n)}function Vi(t,e,n){var r=t.length;if(r<2)return r?Fi(t[0]):[];for(var i=-1,a=Xt(r);++i<r;)for(var o=t[i],s=-1;++s<r;)s!=i&&(a[i]=Pr(a[i]||o,t[s],e,n));return Fi(Wr(a,1),e,n)}function Zi(t,e,n){for(var i=-1,a=t.length,o=e.length,s={};++i<a;){var u=i<o?e[i]:r;n(s,t[i],u)}return s}function Wi(t){return bs(t)?t:[]}function Gi(t){return"function"==typeof t?t:ju}function Hi(t,e){return ms(t)?t:Ya(t,e)?[t]:uo(Ws(t))}var Yi=Ei;function $i(t,e,n){var i=t.length;return n=n===r?i:n,!e&&n>=i?t:Ri(t,e,n)}var Xi=zn||function(t){return Re.clearTimeout(t)};function Ki(t,e){if(e)return t.slice();var n=t.length,r=je?je(n):new t.constructor(n);return t.copy(r),r}function Ji(t){var e=new t.constructor(t.byteLength);return new Ie(e).set(new Ie(t)),e}function Qi(t,e){var n=e?Ji(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ta(t,e){if(t!==e){var n=t!==r,i=null===t,a=t==t,o=Ds(t),s=e!==r,u=null===e,l=e==e,c=Ds(e);if(!u&&!c&&!o&&t>e||o&&s&&l&&!u&&!c||i&&s&&l||!n&&l||!a)return 1;if(!i&&!o&&!c&&t<e||c&&n&&a&&!i&&!o||u&&n&&a||!s&&a||!l)return-1}return 0}function ea(t,e,n,r){for(var i=-1,a=t.length,o=n.length,s=-1,u=e.length,l=Gn(a-o,0),c=Xt(u+l),f=!r;++s<u;)c[s]=e[s];for(;++i<o;)(f||i<a)&&(c[n[i]]=t[i]);for(;l--;)c[s++]=t[i++];return c}function na(t,e,n,r){for(var i=-1,a=t.length,o=-1,s=n.length,u=-1,l=e.length,c=Gn(a-s,0),f=Xt(c+l),h=!r;++i<c;)f[i]=t[i];for(var p=i;++u<l;)f[p+u]=e[u];for(;++o<s;)(h||i<a)&&(f[p+n[o]]=t[i++]);return f}function ra(t,e){var n=-1,r=t.length;for(e||(e=Xt(r));++n<r;)e[n]=t[n];return e}function ia(t,e,n,i){var a=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var u=e[o],l=i?i(n[u],t[u],u,n,t):r;l===r&&(l=t[u]),a?Cr(n,u,l):Ir(n,u,l)}return n}function aa(t,e){return function(n,r){var i=ms(n)?Ze:Rr,a=e?e():{};return i(n,t,za(r,2),a)}}function oa(t){return Ei(function(e,n){var i=-1,a=n.length,o=a>1?n[a-1]:r,s=a>2?n[2]:r;for(o=t.length>3&&"function"==typeof o?(a--,o):r,s&&Ha(n[0],n[1],s)&&(o=a<3?r:o,a=1),e=ee(e);++i<a;){var u=n[i];u&&t(e,u,i,o)}return e})}function sa(t,e){return function(n,r){if(null==n)return n;if(!ws(n))return t(n,r);for(var i=n.length,a=e?i:-1,o=ee(n);(e?a--:++a<i)&&!1!==r(o[a],a,o););return n}}function ua(t){return function(e,n,r){for(var i=-1,a=ee(e),o=r(e),s=o.length;s--;){var u=o[t?s:++i];if(!1===n(a[u],u,a))break}return e}}function la(t){return function(e){var n=kn(e=Ws(e))?Rn(e):r,i=n?n[0]:e.charAt(0),a=n?$i(n,1).join(""):e.slice(1);return i[t]()+a}}function ca(t){return function(e){return Qe(Eu(vu(e).replace(ve,"")),t,"")}}function fa(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=gr(t.prototype),r=t.apply(n,e);return Ms(r)?r:n}}function ha(t){return function(e,n,i){var a=ee(e);if(!ws(e)){var o=za(n,3);e=iu(e),n=function(t){return o(a[t],t,a)}}var s=t(e,n,i);return s>-1?a[o?e[s]:s]:r}}function pa(t){return ja(function(e){var n=e.length,i=n,a=mr.prototype.thru;for(t&&e.reverse();i--;){var s=e[i];if("function"!=typeof s)throw new ie(o);if(a&&!u&&"wrapper"==Ba(s))var u=new mr([],!0)}for(i=u?i:n;++i<n;){var l=Ba(s=e[i]),c="wrapper"==l?Ca(s):r;u=c&&$a(c[0])&&c[1]==(x|_|b|k)&&!c[4].length&&1==c[9]?u[Ba(c[0])].apply(u,c[3]):1==s.length&&$a(s)?u[l]():u.thru(s)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&ms(r))return u.plant(r).value();for(var i=0,a=n?e[i].apply(this,t):r;++i<n;)a=e[i].call(this,a);return a}})}function da(t,e,n,i,a,o,s,u,l,c){var f=e&x,h=e&g,p=e&v,d=e&(_|w),m=e&E,b=p?r:fa(t);return function g(){for(var v=arguments.length,_=Xt(v),w=v;w--;)_[w]=arguments[w];if(d)var y=Da(g),x=function(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}(_,y);if(i&&(_=ea(_,i,a,d)),o&&(_=na(_,o,s,d)),v-=x,d&&v<c){var k=An(_,y);return ya(t,e,da,g.placeholder,n,_,k,u,l,c-v)}var E=h?n:this,S=p?E[t]:t;return v=_.length,u?_=function(t,e){for(var n=t.length,i=Hn(e.length,n),a=ra(t);i--;){var o=e[i];t[i]=Ga(o,n)?a[o]:r}return t}(_,u):m&&v>1&&_.reverse(),f&&l<v&&(_.length=l),this&&this!==Re&&this instanceof g&&(S=b||fa(S)),S.apply(E,_)}}function ga(t,e){return function(n,r){return function(t,e,n,r){return Yr(t,function(t,i,a){e(r,n(t),i,a)}),r}(n,t,e(r),{})}}function va(t,e){return function(n,i){var a;if(n===r&&i===r)return e;if(n!==r&&(a=n),i!==r){if(a===r)return i;"string"==typeof n||"string"==typeof i?(n=Oi(n),i=Oi(i)):(n=zi(n),i=zi(i)),a=t(n,i)}return a}}function ma(t){return ja(function(e){return e=Ke(e,gn(za())),Ei(function(n){var r=this;return t(e,function(t){return Ve(t,r,n)})})})}function _a(t,e){var n=(e=e===r?" ":Oi(e)).length;if(n<2)return n?ki(e,t):e;var i=ki(e,Pn(t/jn(e)));return kn(e)?$i(Rn(i),0,t).join(""):i.slice(0,t)}function wa(t){return function(e,n,i){return i&&"number"!=typeof i&&Ha(e,n,i)&&(n=i=r),e=Us(e),n===r?(n=e,e=0):n=Us(n),function(t,e,n,r){for(var i=-1,a=Gn(Pn((e-t)/(n||1)),0),o=Xt(a);a--;)o[r?a:++i]=t,t+=n;return o}(e,n,i=i===r?e<n?1:-1:Us(i),t)}}function ba(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=Vs(e),n=Vs(n)),t(e,n)}}function ya(t,e,n,i,a,o,s,u,l,c){var f=e&_;e|=f?b:y,(e&=~(f?y:b))&m||(e&=~(g|v));var h=[t,e,a,f?o:r,f?s:r,f?r:o,f?r:s,u,l,c],p=n.apply(r,h);return $a(t)&&no(p,h),p.placeholder=i,ao(p,t,e)}function xa(t){var e=te[t];return function(t,n){if(t=Vs(t),n=null==n?0:Hn(Ns(n),292)){var r=(Ws(t)+"e").split("e");return+((r=(Ws(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var ka=er&&1/Tn(new er([,-0]))[1]==R?function(t){return new er(t)}:Du;function Ea(t){return function(e){var n=qa(e);return n==Y?En(e):n==tt?In(e):function(t,e){return Ke(e,function(e){return[e,t[e]]})}(e,t(e))}}function Sa(t,e,n,i,a,s,u,c){var f=e&v;if(!f&&"function"!=typeof t)throw new ie(o);var h=i?i.length:0;if(h||(e&=~(b|y),i=a=r),u=u===r?u:Gn(Ns(u),0),c=c===r?c:Ns(c),h-=a?a.length:0,e&y){var p=i,d=a;i=a=r}var E=f?r:Ca(t),S=[t,e,n,i,a,p,d,s,u,c];if(E&&function(t,e){var n=t[1],r=e[1],i=n|r,a=i<(g|v|x),o=r==x&&n==_||r==x&&n==k&&t[7].length<=e[8]||r==(x|k)&&e[7].length<=e[8]&&n==_;if(!a&&!o)return t;r&g&&(t[2]=e[2],i|=n&g?0:m);var s=e[3];if(s){var u=t[3];t[3]=u?ea(u,s,e[4]):s,t[4]=u?An(t[3],l):e[4]}(s=e[5])&&(u=t[5],t[5]=u?na(u,s,e[6]):s,t[6]=u?An(t[5],l):e[6]),(s=e[7])&&(t[7]=s),r&x&&(t[8]=null==t[8]?e[8]:Hn(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(S,E),t=S[0],e=S[1],n=S[2],i=S[3],a=S[4],!(c=S[9]=S[9]===r?f?0:t.length:Gn(S[9]-h,0))&&e&(_|w)&&(e&=~(_|w)),e&&e!=g)A=e==_||e==w?function(t,e,n){var i=fa(t);return function a(){for(var o=arguments.length,s=Xt(o),u=o,l=Da(a);u--;)s[u]=arguments[u];var c=o<3&&s[0]!==l&&s[o-1]!==l?[]:An(s,l);return(o-=c.length)<n?ya(t,e,da,a.placeholder,r,s,c,r,r,n-o):Ve(this&&this!==Re&&this instanceof a?i:t,this,s)}}(t,e,c):e!=b&&e!=(g|b)||a.length?da.apply(r,S):function(t,e,n,r){var i=e&g,a=fa(t);return function e(){for(var o=-1,s=arguments.length,u=-1,l=r.length,c=Xt(l+s),f=this&&this!==Re&&this instanceof e?a:t;++u<l;)c[u]=r[u];for(;s--;)c[u++]=arguments[++o];return Ve(f,i?n:this,c)}}(t,e,n,i);else var A=function(t,e,n){var r=e&g,i=fa(t);return function e(){return(this&&this!==Re&&this instanceof e?i:t).apply(r?n:this,arguments)}}(t,e,n);return ao((E?Ti:no)(A,S),t,e)}function Aa(t,e,n,i){return t===r||ps(t,se[n])&&!ce.call(i,n)?e:t}function Ma(t,e,n,i,a,o){return Ms(t)&&Ms(e)&&(o.set(e,t),vi(t,e,r,Ma,o),o.delete(e)),t}function Ta(t){return Rs(t)?r:t}function Ia(t,e,n,i,a,o){var s=n&p,u=t.length,l=e.length;if(u!=l&&!(s&&l>u))return!1;var c=o.get(t);if(c&&o.get(e))return c==e;var f=-1,h=!0,g=n&d?new xr:r;for(o.set(t,e),o.set(e,t);++f<u;){var v=t[f],m=e[f];if(i)var _=s?i(m,v,f,e,t,o):i(v,m,f,t,e,o);if(_!==r){if(_)continue;h=!1;break}if(g){if(!en(e,function(t,e){if(!mn(g,e)&&(v===t||a(v,t,n,i,o)))return g.push(e)})){h=!1;break}}else if(v!==m&&!a(v,m,n,i,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function ja(t){return io(to(t,r,_o),t+"")}function Ra(t){return Jr(t,iu,Ua)}function La(t){return Jr(t,au,Na)}var Ca=ir?function(t){return ir.get(t)}:Du;function Ba(t){for(var e=t.name+"",n=ar[e],r=ce.call(ar,e)?n.length:0;r--;){var i=n[r],a=i.func;if(null==a||a==t)return i.name}return e}function Da(t){return(ce.call(dr,"placeholder")?dr:t).placeholder}function za(){var t=dr.iteratee||Ru;return t=t===Ru?li:t,arguments.length?t(arguments[0],arguments[1]):t}function Oa(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Fa(t){for(var e=iu(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Ja(i)]}return e}function Pa(t,e){var n=function(t,e){return null==t?r:t[e]}(t,e);return ui(n)?n:r}var Ua=Nn?function(t){return null==t?[]:(t=ee(t),Ye(Nn(t),function(e){return De.call(t,e)}))}:qu,Na=Nn?function(t){for(var e=[];t;)Je(e,Ua(t)),t=Le(t);return e}:qu,qa=Qr;function Va(t,e,n){for(var r=-1,i=(e=Hi(e,t)).length,a=!1;++r<i;){var o=lo(e[r]);if(!(a=null!=t&&n(t,o)))break;t=t[o]}return a||++r!=i?a:!!(i=null==t?0:t.length)&&As(i)&&Ga(o,i)&&(ms(t)||vs(t))}function Za(t){return"function"!=typeof t.constructor||Ka(t)?{}:gr(Le(t))}function Wa(t){return ms(t)||vs(t)||!!(nn&&t&&t[nn])}function Ga(t,e){var n=typeof t;return!!(e=null==e?L:e)&&("number"==n||"symbol"!=n&&Gt.test(t))&&t>-1&&t%1==0&&t<e}function Ha(t,e,n){if(!Ms(n))return!1;var r=typeof e;return!!("number"==r?ws(n)&&Ga(e,n.length):"string"==r&&e in n)&&ps(n[e],t)}function Ya(t,e){if(ms(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Ds(t))||Tt.test(t)||!Mt.test(t)||null!=e&&t in ee(e)}function $a(t){var e=Ba(t),n=dr[e];if("function"!=typeof n||!(e in _r.prototype))return!1;if(t===n)return!0;var r=Ca(n);return!!r&&t===r[0]}(Jn&&qa(new Jn(new ArrayBuffer(1)))!=st||Qn&&qa(new Qn)!=Y||tr&&"[object Promise]"!=qa(tr.resolve())||er&&qa(new er)!=tt||nr&&qa(new nr)!=it)&&(qa=function(t){var e=Qr(t),n=e==K?t.constructor:r,i=n?co(n):"";if(i)switch(i){case or:return st;case sr:return Y;case ur:return"[object Promise]";case lr:return tt;case cr:return it}return e});var Xa=ue?Es:Vu;function Ka(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||se)}function Ja(t){return t==t&&!Ms(t)}function Qa(t,e){return function(n){return null!=n&&n[t]===e&&(e!==r||t in ee(n))}}function to(t,e,n){return e=Gn(e===r?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=Gn(r.length-e,0),o=Xt(a);++i<a;)o[i]=r[e+i];i=-1;for(var s=Xt(e+1);++i<e;)s[i]=r[i];return s[e]=n(o),Ve(t,this,s)}}function eo(t,e){return e.length<2?t:Kr(t,Ri(e,0,-1))}var no=oo(Ti),ro=Fn||function(t,e){return Re.setTimeout(t,e)},io=oo(Ii);function ao(t,e,n){var r=e+"";return io(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Dt,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return We(F,function(n){var r="_."+n[0];e&n[1]&&!$e(t,r)&&t.push(r)}),t.sort()}(function(t){var e=t.match(zt);return e?e[1].split(Ot):[]}(r),n)))}function oo(t){var e=0,n=0;return function(){var i=Yn(),a=T-(i-n);if(n=i,a>0){if(++e>=M)return arguments[0]}else e=0;return t.apply(r,arguments)}}function so(t,e){var n=-1,i=t.length,a=i-1;for(e=e===r?i:e;++n<e;){var o=xi(n,a),s=t[o];t[o]=t[n],t[n]=s}return t.length=e,t}var uo=function(t){var e=ss(t,function(t){return n.size===u&&n.clear(),t}),n=e.cache;return e}(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(It,function(t,n,r,i){e.push(r?i.replace(Pt,"$1"):n||t)}),e});function lo(t){if("string"==typeof t||Ds(t))return t;var e=t+"";return"0"==e&&1/t==-R?"-0":e}function co(t){if(null!=t){try{return le.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function fo(t){if(t instanceof _r)return t.clone();var e=new mr(t.__wrapped__,t.__chain__);return e.__actions__=ra(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var ho=Ei(function(t,e){return bs(t)?Pr(t,Wr(e,1,bs,!0)):[]}),po=Ei(function(t,e){var n=ko(e);return bs(n)&&(n=r),bs(t)?Pr(t,Wr(e,1,bs,!0),za(n,2)):[]}),go=Ei(function(t,e){var n=ko(e);return bs(n)&&(n=r),bs(t)?Pr(t,Wr(e,1,bs,!0),r,n):[]});function vo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Ns(n);return i<0&&(i=Gn(r+i,0)),an(t,za(e,3),i)}function mo(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var a=i-1;return n!==r&&(a=Ns(n),a=n<0?Gn(i+a,0):Hn(a,i-1)),an(t,za(e,3),a,!0)}function _o(t){return null!=t&&t.length?Wr(t,1):[]}function wo(t){return t&&t.length?t[0]:r}var bo=Ei(function(t){var e=Ke(t,Wi);return e.length&&e[0]===t[0]?ri(e):[]}),yo=Ei(function(t){var e=ko(t),n=Ke(t,Wi);return e===ko(n)?e=r:n.pop(),n.length&&n[0]===t[0]?ri(n,za(e,2)):[]}),xo=Ei(function(t){var e=ko(t),n=Ke(t,Wi);return(e="function"==typeof e?e:r)&&n.pop(),n.length&&n[0]===t[0]?ri(n,r,e):[]});function ko(t){var e=null==t?0:t.length;return e?t[e-1]:r}var Eo=Ei(So);function So(t,e){return t&&t.length&&e&&e.length?bi(t,e):t}var Ao=ja(function(t,e){var n=null==t?0:t.length,r=Br(t,e);return yi(t,Ke(e,function(t){return Ga(t,n)?+t:t}).sort(ta)),r});function Mo(t){return null==t?t:Kn.call(t)}var To=Ei(function(t){return Fi(Wr(t,1,bs,!0))}),Io=Ei(function(t){var e=ko(t);return bs(e)&&(e=r),Fi(Wr(t,1,bs,!0),za(e,2))}),jo=Ei(function(t){var e=ko(t);return e="function"==typeof e?e:r,Fi(Wr(t,1,bs,!0),r,e)});function Ro(t){if(!t||!t.length)return[];var e=0;return t=Ye(t,function(t){if(bs(t))return e=Gn(t.length,e),!0}),dn(e,function(e){return Ke(t,cn(e))})}function Lo(t,e){if(!t||!t.length)return[];var n=Ro(t);return null==e?n:Ke(n,function(t){return Ve(e,r,t)})}var Co=Ei(function(t,e){return bs(t)?Pr(t,e):[]}),Bo=Ei(function(t){return Vi(Ye(t,bs))}),Do=Ei(function(t){var e=ko(t);return bs(e)&&(e=r),Vi(Ye(t,bs),za(e,2))}),zo=Ei(function(t){var e=ko(t);return e="function"==typeof e?e:r,Vi(Ye(t,bs),r,e)}),Oo=Ei(Ro);var Fo=Ei(function(t){var e=t.length,n=e>1?t[e-1]:r;return Lo(t,n="function"==typeof n?(t.pop(),n):r)});function Po(t){var e=dr(t);return e.__chain__=!0,e}function Uo(t,e){return e(t)}var No=ja(function(t){var e=t.length,n=e?t[0]:0,i=this.__wrapped__,a=function(e){return Br(e,t)};return!(e>1||this.__actions__.length)&&i instanceof _r&&Ga(n)?((i=i.slice(n,+n+(e?1:0))).__actions__.push({func:Uo,args:[a],thisArg:r}),new mr(i,this.__chain__).thru(function(t){return e&&!t.length&&t.push(r),t})):this.thru(a)});var qo=aa(function(t,e,n){ce.call(t,n)?++t[n]:Cr(t,n,1)});var Vo=ha(vo),Zo=ha(mo);function Wo(t,e){return(ms(t)?We:Ur)(t,za(e,3))}function Go(t,e){return(ms(t)?Ge:Nr)(t,za(e,3))}var Ho=aa(function(t,e,n){ce.call(t,n)?t[n].push(e):Cr(t,n,[e])});var Yo=Ei(function(t,e,n){var r=-1,i="function"==typeof e,a=ws(t)?Xt(t.length):[];return Ur(t,function(t){a[++r]=i?Ve(e,t,n):ii(t,e,n)}),a}),$o=aa(function(t,e,n){Cr(t,n,e)});function Xo(t,e){return(ms(t)?Ke:pi)(t,za(e,3))}var Ko=aa(function(t,e,n){t[n?0:1].push(e)},function(){return[[],[]]});var Jo=Ei(function(t,e){if(null==t)return[];var n=e.length;return n>1&&Ha(t,e[0],e[1])?e=[]:n>2&&Ha(e[0],e[1],e[2])&&(e=[e[0]]),_i(t,Wr(e,1),[])}),Qo=On||function(){return Re.Date.now()};function ts(t,e,n){return e=n?r:e,e=t&&null==e?t.length:e,Sa(t,x,r,r,r,r,e)}function es(t,e){var n;if("function"!=typeof e)throw new ie(o);return t=Ns(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=r),n}}var ns=Ei(function(t,e,n){var r=g;if(n.length){var i=An(n,Da(ns));r|=b}return Sa(t,r,e,n,i)}),rs=Ei(function(t,e,n){var r=g|v;if(n.length){var i=An(n,Da(rs));r|=b}return Sa(e,r,t,n,i)});function is(t,e,n){var i,a,s,u,l,c,f=0,h=!1,p=!1,d=!0;if("function"!=typeof t)throw new ie(o);function g(e){var n=i,o=a;return i=a=r,f=e,u=t.apply(o,n)}function v(t){var n=t-c;return c===r||n>=e||n<0||p&&t-f>=s}function m(){var t=Qo();if(v(t))return _(t);l=ro(m,function(t){var n=e-(t-c);return p?Hn(n,s-(t-f)):n}(t))}function _(t){return l=r,d&&i?g(t):(i=a=r,u)}function w(){var t=Qo(),n=v(t);if(i=arguments,a=this,c=t,n){if(l===r)return function(t){return f=t,l=ro(m,e),h?g(t):u}(c);if(p)return l=ro(m,e),g(c)}return l===r&&(l=ro(m,e)),u}return e=Vs(e)||0,Ms(n)&&(h=!!n.leading,s=(p="maxWait"in n)?Gn(Vs(n.maxWait)||0,e):s,d="trailing"in n?!!n.trailing:d),w.cancel=function(){l!==r&&Xi(l),f=0,i=c=a=l=r},w.flush=function(){return l===r?u:_(Qo())},w}var as=Ei(function(t,e){return Fr(t,1,e)}),os=Ei(function(t,e,n){return Fr(t,Vs(e)||0,n)});function ss(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new ie(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(ss.Cache||yr),n}function us(t){if("function"!=typeof t)throw new ie(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ss.Cache=yr;var ls=Yi(function(t,e){var n=(e=1==e.length&&ms(e[0])?Ke(e[0],gn(za())):Ke(Wr(e,1),gn(za()))).length;return Ei(function(r){for(var i=-1,a=Hn(r.length,n);++i<a;)r[i]=e[i].call(this,r[i]);return Ve(t,this,r)})}),cs=Ei(function(t,e){var n=An(e,Da(cs));return Sa(t,b,r,e,n)}),fs=Ei(function(t,e){var n=An(e,Da(fs));return Sa(t,y,r,e,n)}),hs=ja(function(t,e){return Sa(t,k,r,r,r,e)});function ps(t,e){return t===e||t!=t&&e!=e}var ds=ba(ti),gs=ba(function(t,e){return t>=e}),vs=ai(function(){return arguments}())?ai:function(t){return Ts(t)&&ce.call(t,"callee")&&!De.call(t,"callee")},ms=Xt.isArray,_s=Oe?gn(Oe):function(t){return Ts(t)&&Qr(t)==ot};function ws(t){return null!=t&&As(t.length)&&!Es(t)}function bs(t){return Ts(t)&&ws(t)}var ys=qn||Vu,xs=Fe?gn(Fe):function(t){return Ts(t)&&Qr(t)==V};function ks(t){if(!Ts(t))return!1;var e=Qr(t);return e==W||e==Z||"string"==typeof t.message&&"string"==typeof t.name&&!Rs(t)}function Es(t){if(!Ms(t))return!1;var e=Qr(t);return e==G||e==H||e==N||e==J}function Ss(t){return"number"==typeof t&&t==Ns(t)}function As(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=L}function Ms(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Ts(t){return null!=t&&"object"==typeof t}var Is=Pe?gn(Pe):function(t){return Ts(t)&&qa(t)==Y};function js(t){return"number"==typeof t||Ts(t)&&Qr(t)==$}function Rs(t){if(!Ts(t)||Qr(t)!=K)return!1;var e=Le(t);if(null===e)return!0;var n=ce.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&le.call(n)==de}var Ls=Ue?gn(Ue):function(t){return Ts(t)&&Qr(t)==Q};var Cs=Ne?gn(Ne):function(t){return Ts(t)&&qa(t)==tt};function Bs(t){return"string"==typeof t||!ms(t)&&Ts(t)&&Qr(t)==et}function Ds(t){return"symbol"==typeof t||Ts(t)&&Qr(t)==nt}var zs=qe?gn(qe):function(t){return Ts(t)&&As(t.length)&&!!Ee[Qr(t)]};var Os=ba(hi),Fs=ba(function(t,e){return t<=e});function Ps(t){if(!t)return[];if(ws(t))return Bs(t)?Rn(t):ra(t);if(fn&&t[fn])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[fn]());var e=qa(t);return(e==Y?En:e==tt?Tn:pu)(t)}function Us(t){return t?(t=Vs(t))===R||t===-R?(t<0?-1:1)*C:t==t?t:0:0===t?t:0}function Ns(t){var e=Us(t),n=e%1;return e==e?n?e-n:e:0}function qs(t){return t?Dr(Ns(t),0,D):0}function Vs(t){if("number"==typeof t)return t;if(Ds(t))return B;if(Ms(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Ms(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Lt,"");var n=Vt.test(t);return n||Wt.test(t)?Te(t.slice(2),n?2:8):qt.test(t)?B:+t}function Zs(t){return ia(t,au(t))}function Ws(t){return null==t?"":Oi(t)}var Gs=oa(function(t,e){if(Ka(e)||ws(e))ia(e,iu(e),t);else for(var n in e)ce.call(e,n)&&Ir(t,n,e[n])}),Hs=oa(function(t,e){ia(e,au(e),t)}),Ys=oa(function(t,e,n,r){ia(e,au(e),t,r)}),$s=oa(function(t,e,n,r){ia(e,iu(e),t,r)}),Xs=ja(Br);var Ks=Ei(function(t,e){t=ee(t);var n=-1,i=e.length,a=i>2?e[2]:r;for(a&&Ha(e[0],e[1],a)&&(i=1);++n<i;)for(var o=e[n],s=au(o),u=-1,l=s.length;++u<l;){var c=s[u],f=t[c];(f===r||ps(f,se[c])&&!ce.call(t,c))&&(t[c]=o[c])}return t}),Js=Ei(function(t){return t.push(r,Ma),Ve(su,r,t)});function Qs(t,e,n){var i=null==t?r:Kr(t,e);return i===r?n:i}function tu(t,e){return null!=t&&Va(t,e,ni)}var eu=ga(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=pe.call(e)),t[e]=n},Mu(ju)),nu=ga(function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=pe.call(e)),ce.call(t,e)?t[e].push(n):t[e]=[n]},za),ru=Ei(ii);function iu(t){return ws(t)?Er(t):ci(t)}function au(t){return ws(t)?Er(t,!0):fi(t)}var ou=oa(function(t,e,n){vi(t,e,n)}),su=oa(function(t,e,n,r){vi(t,e,n,r)}),uu=ja(function(t,e){var n={};if(null==t)return n;var r=!1;e=Ke(e,function(e){return e=Hi(e,t),r||(r=e.length>1),e}),ia(t,La(t),n),r&&(n=zr(n,c|f|h,Ta));for(var i=e.length;i--;)Pi(n,e[i]);return n});var lu=ja(function(t,e){return null==t?{}:function(t,e){return wi(t,e,function(e,n){return tu(t,n)})}(t,e)});function cu(t,e){if(null==t)return{};var n=Ke(La(t),function(t){return[t]});return e=za(e),wi(t,n,function(t,n){return e(t,n[0])})}var fu=Ea(iu),hu=Ea(au);function pu(t){return null==t?[]:vn(t,iu(t))}var du=ca(function(t,e,n){return e=e.toLowerCase(),t+(n?gu(e):e)});function gu(t){return ku(Ws(t).toLowerCase())}function vu(t){return(t=Ws(t))&&t.replace(Ht,bn).replace(me,"")}var mu=ca(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),_u=ca(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),wu=la("toLowerCase");var bu=ca(function(t,e,n){return t+(n?"_":"")+e.toLowerCase()});var yu=ca(function(t,e,n){return t+(n?" ":"")+ku(e)});var xu=ca(function(t,e,n){return t+(n?" ":"")+e.toUpperCase()}),ku=la("toUpperCase");function Eu(t,e,n){return t=Ws(t),(e=n?r:e)===r?function(t){return ye.test(t)}(t)?function(t){return t.match(we)||[]}(t):function(t){return t.match(Ft)||[]}(t):t.match(e)||[]}var Su=Ei(function(t,e){try{return Ve(t,r,e)}catch(t){return ks(t)?t:new Jt(t)}}),Au=ja(function(t,e){return We(e,function(e){e=lo(e),Cr(t,e,ns(t[e],t))}),t});function Mu(t){return function(){return t}}var Tu=pa(),Iu=pa(!0);function ju(t){return t}function Ru(t){return li("function"==typeof t?t:zr(t,c))}var Lu=Ei(function(t,e){return function(n){return ii(n,t,e)}}),Cu=Ei(function(t,e){return function(n){return ii(t,n,e)}});function Bu(t,e,n){var r=iu(e),i=Xr(e,r);null!=n||Ms(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=Xr(e,iu(e)));var a=!(Ms(n)&&"chain"in n&&!n.chain),o=Es(t);return We(i,function(n){var r=e[n];t[n]=r,o&&(t.prototype[n]=function(){var e=this.__chain__;if(a||e){var n=t(this.__wrapped__);return(n.__actions__=ra(this.__actions__)).push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,Je([this.value()],arguments))})}),t}function Du(){}var zu=ma(Ke),Ou=ma(He),Fu=ma(en);function Pu(t){return Ya(t)?cn(lo(t)):function(t){return function(e){return Kr(e,t)}}(t)}var Uu=wa(),Nu=wa(!0);function qu(){return[]}function Vu(){return!1}var Zu=va(function(t,e){return t+e},0),Wu=xa("ceil"),Gu=va(function(t,e){return t/e},1),Hu=xa("floor");var Yu,$u=va(function(t,e){return t*e},1),Xu=xa("round"),Ku=va(function(t,e){return t-e},0);return dr.after=function(t,e){if("function"!=typeof e)throw new ie(o);return t=Ns(t),function(){if(--t<1)return e.apply(this,arguments)}},dr.ary=ts,dr.assign=Gs,dr.assignIn=Hs,dr.assignInWith=Ys,dr.assignWith=$s,dr.at=Xs,dr.before=es,dr.bind=ns,dr.bindAll=Au,dr.bindKey=rs,dr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return ms(t)?t:[t]},dr.chain=Po,dr.chunk=function(t,e,n){e=(n?Ha(t,e,n):e===r)?1:Gn(Ns(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var a=0,o=0,s=Xt(Pn(i/e));a<i;)s[o++]=Ri(t,a,a+=e);return s},dr.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var a=t[e];a&&(i[r++]=a)}return i},dr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=Xt(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return Je(ms(n)?ra(n):[n],Wr(e,1))},dr.cond=function(t){var e=null==t?0:t.length,n=za();return t=e?Ke(t,function(t){if("function"!=typeof t[1])throw new ie(o);return[n(t[0]),t[1]]}):[],Ei(function(n){for(var r=-1;++r<e;){var i=t[r];if(Ve(i[0],this,n))return Ve(i[1],this,n)}})},dr.conforms=function(t){return function(t){var e=iu(t);return function(n){return Or(n,t,e)}}(zr(t,c))},dr.constant=Mu,dr.countBy=qo,dr.create=function(t,e){var n=gr(t);return null==e?n:Lr(n,e)},dr.curry=function t(e,n,i){var a=Sa(e,_,r,r,r,r,r,n=i?r:n);return a.placeholder=t.placeholder,a},dr.curryRight=function t(e,n,i){var a=Sa(e,w,r,r,r,r,r,n=i?r:n);return a.placeholder=t.placeholder,a},dr.debounce=is,dr.defaults=Ks,dr.defaultsDeep=Js,dr.defer=as,dr.delay=os,dr.difference=ho,dr.differenceBy=po,dr.differenceWith=go,dr.drop=function(t,e,n){var i=null==t?0:t.length;return i?Ri(t,(e=n||e===r?1:Ns(e))<0?0:e,i):[]},dr.dropRight=function(t,e,n){var i=null==t?0:t.length;return i?Ri(t,0,(e=i-(e=n||e===r?1:Ns(e)))<0?0:e):[]},dr.dropRightWhile=function(t,e){return t&&t.length?Ni(t,za(e,3),!0,!0):[]},dr.dropWhile=function(t,e){return t&&t.length?Ni(t,za(e,3),!0):[]},dr.fill=function(t,e,n,i){var a=null==t?0:t.length;return a?(n&&"number"!=typeof n&&Ha(t,e,n)&&(n=0,i=a),function(t,e,n,i){var a=t.length;for((n=Ns(n))<0&&(n=-n>a?0:a+n),(i=i===r||i>a?a:Ns(i))<0&&(i+=a),i=n>i?0:qs(i);n<i;)t[n++]=e;return t}(t,e,n,i)):[]},dr.filter=function(t,e){return(ms(t)?Ye:Zr)(t,za(e,3))},dr.flatMap=function(t,e){return Wr(Xo(t,e),1)},dr.flatMapDeep=function(t,e){return Wr(Xo(t,e),R)},dr.flatMapDepth=function(t,e,n){return n=n===r?1:Ns(n),Wr(Xo(t,e),n)},dr.flatten=_o,dr.flattenDeep=function(t){return null!=t&&t.length?Wr(t,R):[]},dr.flattenDepth=function(t,e){return null!=t&&t.length?Wr(t,e=e===r?1:Ns(e)):[]},dr.flip=function(t){return Sa(t,E)},dr.flow=Tu,dr.flowRight=Iu,dr.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},dr.functions=function(t){return null==t?[]:Xr(t,iu(t))},dr.functionsIn=function(t){return null==t?[]:Xr(t,au(t))},dr.groupBy=Ho,dr.initial=function(t){return null!=t&&t.length?Ri(t,0,-1):[]},dr.intersection=bo,dr.intersectionBy=yo,dr.intersectionWith=xo,dr.invert=eu,dr.invertBy=nu,dr.invokeMap=Yo,dr.iteratee=Ru,dr.keyBy=$o,dr.keys=iu,dr.keysIn=au,dr.map=Xo,dr.mapKeys=function(t,e){var n={};return e=za(e,3),Yr(t,function(t,r,i){Cr(n,e(t,r,i),t)}),n},dr.mapValues=function(t,e){var n={};return e=za(e,3),Yr(t,function(t,r,i){Cr(n,r,e(t,r,i))}),n},dr.matches=function(t){return di(zr(t,c))},dr.matchesProperty=function(t,e){return gi(t,zr(e,c))},dr.memoize=ss,dr.merge=ou,dr.mergeWith=su,dr.method=Lu,dr.methodOf=Cu,dr.mixin=Bu,dr.negate=us,dr.nthArg=function(t){return t=Ns(t),Ei(function(e){return mi(e,t)})},dr.omit=uu,dr.omitBy=function(t,e){return cu(t,us(za(e)))},dr.once=function(t){return es(2,t)},dr.orderBy=function(t,e,n,i){return null==t?[]:(ms(e)||(e=null==e?[]:[e]),ms(n=i?r:n)||(n=null==n?[]:[n]),_i(t,e,n))},dr.over=zu,dr.overArgs=ls,dr.overEvery=Ou,dr.overSome=Fu,dr.partial=cs,dr.partialRight=fs,dr.partition=Ko,dr.pick=lu,dr.pickBy=cu,dr.property=Pu,dr.propertyOf=function(t){return function(e){return null==t?r:Kr(t,e)}},dr.pull=Eo,dr.pullAll=So,dr.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?bi(t,e,za(n,2)):t},dr.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?bi(t,e,r,n):t},dr.pullAt=Ao,dr.range=Uu,dr.rangeRight=Nu,dr.rearg=hs,dr.reject=function(t,e){return(ms(t)?Ye:Zr)(t,us(za(e,3)))},dr.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],a=t.length;for(e=za(e,3);++r<a;){var o=t[r];e(o,r,t)&&(n.push(o),i.push(r))}return yi(t,i),n},dr.rest=function(t,e){if("function"!=typeof t)throw new ie(o);return Ei(t,e=e===r?e:Ns(e))},dr.reverse=Mo,dr.sampleSize=function(t,e,n){return e=(n?Ha(t,e,n):e===r)?1:Ns(e),(ms(t)?Ar:Ai)(t,e)},dr.set=function(t,e,n){return null==t?t:Mi(t,e,n)},dr.setWith=function(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:Mi(t,e,n,i)},dr.shuffle=function(t){return(ms(t)?Mr:ji)(t)},dr.slice=function(t,e,n){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&Ha(t,e,n)?(e=0,n=i):(e=null==e?0:Ns(e),n=n===r?i:Ns(n)),Ri(t,e,n)):[]},dr.sortBy=Jo,dr.sortedUniq=function(t){return t&&t.length?Di(t):[]},dr.sortedUniqBy=function(t,e){return t&&t.length?Di(t,za(e,2)):[]},dr.split=function(t,e,n){return n&&"number"!=typeof n&&Ha(t,e,n)&&(e=n=r),(n=n===r?D:n>>>0)?(t=Ws(t))&&("string"==typeof e||null!=e&&!Ls(e))&&!(e=Oi(e))&&kn(t)?$i(Rn(t),0,n):t.split(e,n):[]},dr.spread=function(t,e){if("function"!=typeof t)throw new ie(o);return e=null==e?0:Gn(Ns(e),0),Ei(function(n){var r=n[e],i=$i(n,0,e);return r&&Je(i,r),Ve(t,this,i)})},dr.tail=function(t){var e=null==t?0:t.length;return e?Ri(t,1,e):[]},dr.take=function(t,e,n){return t&&t.length?Ri(t,0,(e=n||e===r?1:Ns(e))<0?0:e):[]},dr.takeRight=function(t,e,n){var i=null==t?0:t.length;return i?Ri(t,(e=i-(e=n||e===r?1:Ns(e)))<0?0:e,i):[]},dr.takeRightWhile=function(t,e){return t&&t.length?Ni(t,za(e,3),!1,!0):[]},dr.takeWhile=function(t,e){return t&&t.length?Ni(t,za(e,3)):[]},dr.tap=function(t,e){return e(t),t},dr.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new ie(o);return Ms(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),is(t,e,{leading:r,maxWait:e,trailing:i})},dr.thru=Uo,dr.toArray=Ps,dr.toPairs=fu,dr.toPairsIn=hu,dr.toPath=function(t){return ms(t)?Ke(t,lo):Ds(t)?[t]:ra(uo(Ws(t)))},dr.toPlainObject=Zs,dr.transform=function(t,e,n){var r=ms(t),i=r||ys(t)||zs(t);if(e=za(e,4),null==n){var a=t&&t.constructor;n=i?r?new a:[]:Ms(t)&&Es(a)?gr(Le(t)):{}}return(i?We:Yr)(t,function(t,r,i){return e(n,t,r,i)}),n},dr.unary=function(t){return ts(t,1)},dr.union=To,dr.unionBy=Io,dr.unionWith=jo,dr.uniq=function(t){return t&&t.length?Fi(t):[]},dr.uniqBy=function(t,e){return t&&t.length?Fi(t,za(e,2)):[]},dr.uniqWith=function(t,e){return e="function"==typeof e?e:r,t&&t.length?Fi(t,r,e):[]},dr.unset=function(t,e){return null==t||Pi(t,e)},dr.unzip=Ro,dr.unzipWith=Lo,dr.update=function(t,e,n){return null==t?t:Ui(t,e,Gi(n))},dr.updateWith=function(t,e,n,i){return i="function"==typeof i?i:r,null==t?t:Ui(t,e,Gi(n),i)},dr.values=pu,dr.valuesIn=function(t){return null==t?[]:vn(t,au(t))},dr.without=Co,dr.words=Eu,dr.wrap=function(t,e){return cs(Gi(e),t)},dr.xor=Bo,dr.xorBy=Do,dr.xorWith=zo,dr.zip=Oo,dr.zipObject=function(t,e){return Zi(t||[],e||[],Ir)},dr.zipObjectDeep=function(t,e){return Zi(t||[],e||[],Mi)},dr.zipWith=Fo,dr.entries=fu,dr.entriesIn=hu,dr.extend=Hs,dr.extendWith=Ys,Bu(dr,dr),dr.add=Zu,dr.attempt=Su,dr.camelCase=du,dr.capitalize=gu,dr.ceil=Wu,dr.clamp=function(t,e,n){return n===r&&(n=e,e=r),n!==r&&(n=(n=Vs(n))==n?n:0),e!==r&&(e=(e=Vs(e))==e?e:0),Dr(Vs(t),e,n)},dr.clone=function(t){return zr(t,h)},dr.cloneDeep=function(t){return zr(t,c|h)},dr.cloneDeepWith=function(t,e){return zr(t,c|h,e="function"==typeof e?e:r)},dr.cloneWith=function(t,e){return zr(t,h,e="function"==typeof e?e:r)},dr.conformsTo=function(t,e){return null==e||Or(t,e,iu(e))},dr.deburr=vu,dr.defaultTo=function(t,e){return null==t||t!=t?e:t},dr.divide=Gu,dr.endsWith=function(t,e,n){t=Ws(t),e=Oi(e);var i=t.length,a=n=n===r?i:Dr(Ns(n),0,i);return(n-=e.length)>=0&&t.slice(n,a)==e},dr.eq=ps,dr.escape=function(t){return(t=Ws(t))&&kt.test(t)?t.replace(yt,yn):t},dr.escapeRegExp=function(t){return(t=Ws(t))&&Rt.test(t)?t.replace(jt,"\\$&"):t},dr.every=function(t,e,n){var i=ms(t)?He:qr;return n&&Ha(t,e,n)&&(e=r),i(t,za(e,3))},dr.find=Vo,dr.findIndex=vo,dr.findKey=function(t,e){return rn(t,za(e,3),Yr)},dr.findLast=Zo,dr.findLastIndex=mo,dr.findLastKey=function(t,e){return rn(t,za(e,3),$r)},dr.floor=Hu,dr.forEach=Wo,dr.forEachRight=Go,dr.forIn=function(t,e){return null==t?t:Gr(t,za(e,3),au)},dr.forInRight=function(t,e){return null==t?t:Hr(t,za(e,3),au)},dr.forOwn=function(t,e){return t&&Yr(t,za(e,3))},dr.forOwnRight=function(t,e){return t&&$r(t,za(e,3))},dr.get=Qs,dr.gt=ds,dr.gte=gs,dr.has=function(t,e){return null!=t&&Va(t,e,ei)},dr.hasIn=tu,dr.head=wo,dr.identity=ju,dr.includes=function(t,e,n,r){t=ws(t)?t:pu(t),n=n&&!r?Ns(n):0;var i=t.length;return n<0&&(n=Gn(i+n,0)),Bs(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&on(t,e,n)>-1},dr.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:Ns(n);return i<0&&(i=Gn(r+i,0)),on(t,e,i)},dr.inRange=function(t,e,n){return e=Us(e),n===r?(n=e,e=0):n=Us(n),function(t,e,n){return t>=Hn(e,n)&&t<Gn(e,n)}(t=Vs(t),e,n)},dr.invoke=ru,dr.isArguments=vs,dr.isArray=ms,dr.isArrayBuffer=_s,dr.isArrayLike=ws,dr.isArrayLikeObject=bs,dr.isBoolean=function(t){return!0===t||!1===t||Ts(t)&&Qr(t)==q},dr.isBuffer=ys,dr.isDate=xs,dr.isElement=function(t){return Ts(t)&&1===t.nodeType&&!Rs(t)},dr.isEmpty=function(t){if(null==t)return!0;if(ws(t)&&(ms(t)||"string"==typeof t||"function"==typeof t.splice||ys(t)||zs(t)||vs(t)))return!t.length;var e=qa(t);if(e==Y||e==tt)return!t.size;if(Ka(t))return!ci(t).length;for(var n in t)if(ce.call(t,n))return!1;return!0},dr.isEqual=function(t,e){return oi(t,e)},dr.isEqualWith=function(t,e,n){var i=(n="function"==typeof n?n:r)?n(t,e):r;return i===r?oi(t,e,r,n):!!i},dr.isError=ks,dr.isFinite=function(t){return"number"==typeof t&&Vn(t)},dr.isFunction=Es,dr.isInteger=Ss,dr.isLength=As,dr.isMap=Is,dr.isMatch=function(t,e){return t===e||si(t,e,Fa(e))},dr.isMatchWith=function(t,e,n){return n="function"==typeof n?n:r,si(t,e,Fa(e),n)},dr.isNaN=function(t){return js(t)&&t!=+t},dr.isNative=function(t){if(Xa(t))throw new Jt(a);return ui(t)},dr.isNil=function(t){return null==t},dr.isNull=function(t){return null===t},dr.isNumber=js,dr.isObject=Ms,dr.isObjectLike=Ts,dr.isPlainObject=Rs,dr.isRegExp=Ls,dr.isSafeInteger=function(t){return Ss(t)&&t>=-L&&t<=L},dr.isSet=Cs,dr.isString=Bs,dr.isSymbol=Ds,dr.isTypedArray=zs,dr.isUndefined=function(t){return t===r},dr.isWeakMap=function(t){return Ts(t)&&qa(t)==it},dr.isWeakSet=function(t){return Ts(t)&&Qr(t)==at},dr.join=function(t,e){return null==t?"":Zn.call(t,e)},dr.kebabCase=mu,dr.last=ko,dr.lastIndexOf=function(t,e,n){var i=null==t?0:t.length;if(!i)return-1;var a=i;return n!==r&&(a=(a=Ns(n))<0?Gn(i+a,0):Hn(a,i-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,a):an(t,un,a,!0)},dr.lowerCase=_u,dr.lowerFirst=wu,dr.lt=Os,dr.lte=Fs,dr.max=function(t){return t&&t.length?Vr(t,ju,ti):r},dr.maxBy=function(t,e){return t&&t.length?Vr(t,za(e,2),ti):r},dr.mean=function(t){return ln(t,ju)},dr.meanBy=function(t,e){return ln(t,za(e,2))},dr.min=function(t){return t&&t.length?Vr(t,ju,hi):r},dr.minBy=function(t,e){return t&&t.length?Vr(t,za(e,2),hi):r},dr.stubArray=qu,dr.stubFalse=Vu,dr.stubObject=function(){return{}},dr.stubString=function(){return""},dr.stubTrue=function(){return!0},dr.multiply=$u,dr.nth=function(t,e){return t&&t.length?mi(t,Ns(e)):r},dr.noConflict=function(){return Re._===this&&(Re._=ge),this},dr.noop=Du,dr.now=Qo,dr.pad=function(t,e,n){t=Ws(t);var r=(e=Ns(e))?jn(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return _a(Un(i),n)+t+_a(Pn(i),n)},dr.padEnd=function(t,e,n){t=Ws(t);var r=(e=Ns(e))?jn(t):0;return e&&r<e?t+_a(e-r,n):t},dr.padStart=function(t,e,n){t=Ws(t);var r=(e=Ns(e))?jn(t):0;return e&&r<e?_a(e-r,n)+t:t},dr.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),$n(Ws(t).replace(Ct,""),e||0)},dr.random=function(t,e,n){if(n&&"boolean"!=typeof n&&Ha(t,e,n)&&(e=n=r),n===r&&("boolean"==typeof e?(n=e,e=r):"boolean"==typeof t&&(n=t,t=r)),t===r&&e===r?(t=0,e=1):(t=Us(t),e===r?(e=t,t=0):e=Us(e)),t>e){var i=t;t=e,e=i}if(n||t%1||e%1){var a=Xn();return Hn(t+a*(e-t+Me("1e-"+((a+"").length-1))),e)}return xi(t,e)},dr.reduce=function(t,e,n){var r=ms(t)?Qe:hn,i=arguments.length<3;return r(t,za(e,4),n,i,Ur)},dr.reduceRight=function(t,e,n){var r=ms(t)?tn:hn,i=arguments.length<3;return r(t,za(e,4),n,i,Nr)},dr.repeat=function(t,e,n){return e=(n?Ha(t,e,n):e===r)?1:Ns(e),ki(Ws(t),e)},dr.replace=function(){var t=arguments,e=Ws(t[0]);return t.length<3?e:e.replace(t[1],t[2])},dr.result=function(t,e,n){var i=-1,a=(e=Hi(e,t)).length;for(a||(a=1,t=r);++i<a;){var o=null==t?r:t[lo(e[i])];o===r&&(i=a,o=n),t=Es(o)?o.call(t):o}return t},dr.round=Xu,dr.runInContext=t,dr.sample=function(t){return(ms(t)?Sr:Si)(t)},dr.size=function(t){if(null==t)return 0;if(ws(t))return Bs(t)?jn(t):t.length;var e=qa(t);return e==Y||e==tt?t.size:ci(t).length},dr.snakeCase=bu,dr.some=function(t,e,n){var i=ms(t)?en:Li;return n&&Ha(t,e,n)&&(e=r),i(t,za(e,3))},dr.sortedIndex=function(t,e){return Ci(t,e)},dr.sortedIndexBy=function(t,e,n){return Bi(t,e,za(n,2))},dr.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Ci(t,e);if(r<n&&ps(t[r],e))return r}return-1},dr.sortedLastIndex=function(t,e){return Ci(t,e,!0)},dr.sortedLastIndexBy=function(t,e,n){return Bi(t,e,za(n,2),!0)},dr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var n=Ci(t,e,!0)-1;if(ps(t[n],e))return n}return-1},dr.startCase=yu,dr.startsWith=function(t,e,n){return t=Ws(t),n=null==n?0:Dr(Ns(n),0,t.length),e=Oi(e),t.slice(n,n+e.length)==e},dr.subtract=Ku,dr.sum=function(t){return t&&t.length?pn(t,ju):0},dr.sumBy=function(t,e){return t&&t.length?pn(t,za(e,2)):0},dr.template=function(t,e,n){var i=dr.templateSettings;n&&Ha(t,e,n)&&(e=r),t=Ws(t),e=Ys({},e,i,Aa);var a,o,s=Ys({},e.imports,i.imports,Aa),u=iu(s),l=vn(s,u),c=0,f=e.interpolate||Yt,h="__p += '",p=ne((e.escape||Yt).source+"|"+f.source+"|"+(f===At?Ut:Yt).source+"|"+(e.evaluate||Yt).source+"|$","g"),d="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++ke+"]")+"\n";t.replace(p,function(e,n,r,i,s,u){return r||(r=i),h+=t.slice(c,u).replace($t,xn),n&&(a=!0,h+="' +\n__e("+n+") +\n'"),s&&(o=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=u+e.length,e}),h+="';\n";var g=e.variable;g||(h="with (obj) {\n"+h+"\n}\n"),h=(o?h.replace(mt,""):h).replace(_t,"$1").replace(wt,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v=Su(function(){return Qt(u,d+"return "+h).apply(r,l)});if(v.source=h,ks(v))throw v;return v},dr.times=function(t,e){if((t=Ns(t))<1||t>L)return[];var n=D,r=Hn(t,D);e=za(e),t-=D;for(var i=dn(r,e);++n<t;)e(n);return i},dr.toFinite=Us,dr.toInteger=Ns,dr.toLength=qs,dr.toLower=function(t){return Ws(t).toLowerCase()},dr.toNumber=Vs,dr.toSafeInteger=function(t){return t?Dr(Ns(t),-L,L):0===t?t:0},dr.toString=Ws,dr.toUpper=function(t){return Ws(t).toUpperCase()},dr.trim=function(t,e,n){if((t=Ws(t))&&(n||e===r))return t.replace(Lt,"");if(!t||!(e=Oi(e)))return t;var i=Rn(t),a=Rn(e);return $i(i,_n(i,a),wn(i,a)+1).join("")},dr.trimEnd=function(t,e,n){if((t=Ws(t))&&(n||e===r))return t.replace(Bt,"");if(!t||!(e=Oi(e)))return t;var i=Rn(t);return $i(i,0,wn(i,Rn(e))+1).join("")},dr.trimStart=function(t,e,n){if((t=Ws(t))&&(n||e===r))return t.replace(Ct,"");if(!t||!(e=Oi(e)))return t;var i=Rn(t);return $i(i,_n(i,Rn(e))).join("")},dr.truncate=function(t,e){var n=S,i=A;if(Ms(e)){var a="separator"in e?e.separator:a;n="length"in e?Ns(e.length):n,i="omission"in e?Oi(e.omission):i}var o=(t=Ws(t)).length;if(kn(t)){var s=Rn(t);o=s.length}if(n>=o)return t;var u=n-jn(i);if(u<1)return i;var l=s?$i(s,0,u).join(""):t.slice(0,u);if(a===r)return l+i;if(s&&(u+=l.length-u),Ls(a)){if(t.slice(u).search(a)){var c,f=l;for(a.global||(a=ne(a.source,Ws(Nt.exec(a))+"g")),a.lastIndex=0;c=a.exec(f);)var h=c.index;l=l.slice(0,h===r?u:h)}}else if(t.indexOf(Oi(a),u)!=u){var p=l.lastIndexOf(a);p>-1&&(l=l.slice(0,p))}return l+i},dr.unescape=function(t){return(t=Ws(t))&&xt.test(t)?t.replace(bt,Ln):t},dr.uniqueId=function(t){var e=++fe;return Ws(t)+e},dr.upperCase=xu,dr.upperFirst=ku,dr.each=Wo,dr.eachRight=Go,dr.first=wo,Bu(dr,(Yu={},Yr(dr,function(t,e){ce.call(dr.prototype,e)||(Yu[e]=t)}),Yu),{chain:!1}),dr.VERSION="4.17.10",We(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){dr[t].placeholder=dr}),We(["drop","take"],function(t,e){_r.prototype[t]=function(n){n=n===r?1:Gn(Ns(n),0);var i=this.__filtered__&&!e?new _r(this):this.clone();return i.__filtered__?i.__takeCount__=Hn(n,i.__takeCount__):i.__views__.push({size:Hn(n,D),type:t+(i.__dir__<0?"Right":"")}),i},_r.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}}),We(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==I||3==n;_r.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:za(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}}),We(["head","last"],function(t,e){var n="take"+(e?"Right":"");_r.prototype[t]=function(){return this[n](1).value()[0]}}),We(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");_r.prototype[t]=function(){return this.__filtered__?new _r(this):this[n](1)}}),_r.prototype.compact=function(){return this.filter(ju)},_r.prototype.find=function(t){return this.filter(t).head()},_r.prototype.findLast=function(t){return this.reverse().find(t)},_r.prototype.invokeMap=Ei(function(t,e){return"function"==typeof t?new _r(this):this.map(function(n){return ii(n,t,e)})}),_r.prototype.reject=function(t){return this.filter(us(za(t)))},_r.prototype.slice=function(t,e){t=Ns(t);var n=this;return n.__filtered__&&(t>0||e<0)?new _r(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==r&&(n=(e=Ns(e))<0?n.dropRight(-e):n.take(e-t)),n)},_r.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},_r.prototype.toArray=function(){return this.take(D)},Yr(_r.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),a=dr[i?"take"+("last"==e?"Right":""):e],o=i||/^find/.test(e);a&&(dr.prototype[e]=function(){var e=this.__wrapped__,s=i?[1]:arguments,u=e instanceof _r,l=s[0],c=u||ms(e),f=function(t){var e=a.apply(dr,Je([t],s));return i&&h?e[0]:e};c&&n&&"function"==typeof l&&1!=l.length&&(u=c=!1);var h=this.__chain__,p=!!this.__actions__.length,d=o&&!h,g=u&&!p;if(!o&&c){e=g?e:new _r(this);var v=t.apply(e,s);return v.__actions__.push({func:Uo,args:[f],thisArg:r}),new mr(v,h)}return d&&g?t.apply(this,s):(v=this.thru(f),d?i?v.value()[0]:v.value():v)})}),We(["pop","push","shift","sort","splice","unshift"],function(t){var e=ae[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);dr.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(ms(i)?i:[],t)}return this[n](function(n){return e.apply(ms(n)?n:[],t)})}}),Yr(_r.prototype,function(t,e){var n=dr[e];if(n){var r=n.name+"";(ar[r]||(ar[r]=[])).push({name:e,func:n})}}),ar[da(r,v).name]=[{name:"wrapper",func:r}],_r.prototype.clone=function(){var t=new _r(this.__wrapped__);return t.__actions__=ra(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ra(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ra(this.__views__),t},_r.prototype.reverse=function(){if(this.__filtered__){var t=new _r(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},_r.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=ms(t),r=e<0,i=n?t.length:0,a=function(t,e,n){for(var r=-1,i=n.length;++r<i;){var a=n[r],o=a.size;switch(a.type){case"drop":t+=o;break;case"dropRight":e-=o;break;case"take":e=Hn(e,t+o);break;case"takeRight":t=Gn(t,e-o)}}return{start:t,end:e}}(0,i,this.__views__),o=a.start,s=a.end,u=s-o,l=r?s:o-1,c=this.__iteratees__,f=c.length,h=0,p=Hn(u,this.__takeCount__);if(!n||!r&&i==u&&p==u)return qi(t,this.__actions__);var d=[];t:for(;u--&&h<p;){for(var g=-1,v=t[l+=e];++g<f;){var m=c[g],_=m.iteratee,w=m.type,b=_(v);if(w==j)v=b;else if(!b){if(w==I)continue t;break t}}d[h++]=v}return d},dr.prototype.at=No,dr.prototype.chain=function(){return Po(this)},dr.prototype.commit=function(){return new mr(this.value(),this.__chain__)},dr.prototype.next=function(){this.__values__===r&&(this.__values__=Ps(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?r:this.__values__[this.__index__++]}},dr.prototype.plant=function(t){for(var e,n=this;n instanceof vr;){var i=fo(n);i.__index__=0,i.__values__=r,e?a.__wrapped__=i:e=i;var a=i;n=n.__wrapped__}return a.__wrapped__=t,e},dr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof _r){var e=t;return this.__actions__.length&&(e=new _r(this)),(e=e.reverse()).__actions__.push({func:Uo,args:[Mo],thisArg:r}),new mr(e,this.__chain__)}return this.thru(Mo)},dr.prototype.toJSON=dr.prototype.valueOf=dr.prototype.value=function(){return qi(this.__wrapped__,this.__actions__)},dr.prototype.first=dr.prototype.head,fn&&(dr.prototype[fn]=function(){return this}),dr}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Re._=Cn,define(function(){return Cn})):Ce?((Ce.exports=Cn)._=Cn,Le._=Cn):Re._=Cn}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],59:[function(t,e,n){(function(n){t("path");var r=t("fs");function i(){this.types=Object.create(null),this.extensions=Object.create(null)}i.prototype.define=function(t){for(var e in t){for(var r=t[e],i=0;i<r.length;i++)n.env.DEBUG_MIME&&this.types[r[i]]&&console.warn((this._loading||"define()").replace(/.*\//,""),'changes "'+r[i]+'" extension type from '+this.types[r[i]]+" to "+e),this.types[r[i]]=e;this.extensions[e]||(this.extensions[e]=r[0])}},i.prototype.load=function(t){this._loading=t;var e={};r.readFileSync(t,"ascii").split(/[\r\n]+/).forEach(function(t){var n=t.replace(/\s*#.*|^\s*|\s*$/g,"").split(/\s+/);e[n.shift()]=n}),this.define(e),this._loading=null},i.prototype.lookup=function(t,e){var n=t.replace(/^.*[\.\/\\]/,"").toLowerCase();return this.types[n]||e||this.default_type},i.prototype.extension=function(t){var e=t.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase();return this.extensions[e]};var a=new i;a.define(t("./types.json")),a.default_type=a.lookup("bin"),a.Mime=i,a.charsets={lookup:function(t,e){return/^text\/|^application\/(javascript|json)/.test(t)?"UTF-8":e}},e.exports=a}).call(this,t("_process"))},{"./types.json":60,_process:94,fs:39,path:71}],60:[function(t,e,n){e.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":[],"application/font-woff2":[],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/prs.cww":["cww"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"audio/xm":["xm"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/ktx":["ktx"],"image/png":["png"],"image/prs.btif":["btif"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/webp":["webp"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/prs.lines.tag":["dsc"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/vtt":["vtt"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/webm":["webm"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}},{}],61:[function(t,e,n){"use strict";var r=t("ndarray-ops"),i=t("ndarray"),a=t("typedarray-pool"),o=t("./lib/fft-matrix.js");e.exports=function(t,e,n){var s,u,l=e.shape,c=l.length,f=1,h=new Array(c),p=0;for(s=c-1;s>=0;--s)if(h[s]=f,f*=l[s],p=Math.max(p,o.scratchMemory(l[s])),e.shape[s]!==n.shape[s])throw new Error("Shape mismatch, real and imaginary arrays must have same size");var d,g=4*f+p;d="array"===e.dtype||"float64"===e.dtype||"custom"===e.dtype?a.mallocDouble(g):a.mallocFloat(g);var v,m,_,w,b=i(d,l.slice(0),h,0),y=i(d,l.slice(0),h.slice(0),f),x=i(d,l.slice(0),h.slice(0),2*f),k=i(d,l.slice(0),h.slice(0),3*f),E=4*f;for(r.assign(b,e),r.assign(y,n),s=c-1;s>=0&&(o(t,f/l[s],l[s],d,b.offset,y.offset,E),0!==s);--s){for(m=1,_=x.stride,w=k.stride,u=s-1;u<c;++u)w[u]=_[u]=m,m*=l[u];for(u=s-2;u>=0;--u)w[u]=_[u]=m,m*=l[u];r.assign(x,b),r.assign(k,y),v=b,b=x,x=v,v=y,y=k,k=v}r.assign(e,b),r.assign(n,y),a.free(d)}},{"./lib/fft-matrix.js":62,ndarray:67,"ndarray-ops":64,"typedarray-pool":126}],62:[function(t,e,n){var r=t("bit-twiddle");function i(t,e,n,i,a,o){var s,u,l,c,f,h,p,d,g,v,m,_,w,b,y,x,k,E,S,A,M,T,I,j;for(t|=0,e|=0,a|=0,o|=0,s=n|=0,u=r.log2(s),E=0;E<e;++E){for(p=s>>1,f=0,l=0;l<s-1;l++){for(l<f&&(w=i[a+l],i[a+l]=i[a+f],i[a+f]=w,w=i[o+l],i[o+l]=i[o+f],i[o+f]=w),h=p;h<=f;)f-=h,h>>=1;f+=h}for(m=-1,_=0,v=1,d=0;d<u;d++){for(g=v,v<<=1,x=1,k=0,f=0;f<g;f++){for(l=f;l<s;l+=v)S=i[a+(c=l+g)],A=i[o+c],M=i[a+l],T=i[o+l],b=(I=x*(S+A))-A*(x+k),y=I+(j=S*(k-x)),i[a+c]=M-b,i[o+c]=T-y,i[a+l]+=b,i[o+l]+=y;j=x*(_-m),x=(I=m*(x+k))-k*(m+_),k=I+j}_=Math.sqrt((1-m)/2),t<0&&(_=-_),m=Math.sqrt((1+m)/2)}if(t<0){var R=1/s;for(l=0;l<s;l++)i[a+l]*=R,i[o+l]*=R}a+=n,o+=n}}e.exports=function(t,e,n,a,o,s,u){t|=0,e|=0,n|=0,o|=0,s|=0,r.isPow2(n)?i(t,e,n,a,o,s):function(t,e,n,a,o,s,u){t|=0,e|=0,n|=0,o|=0,s|=0,u|=0;var l,c,f,h,p,d,g,v,m,_=r.nextPow2(2*n+1),w=u,b=w+n,y=b+n,x=y+_,k=x+_,E=k+_,S=-t*Math.PI/n;for(m=0;m<n;++m)c=S*(m*m%(2*n)),h=Math.cos(c),p=Math.sin(c),a[k+(_-m)]=a[k+m]=a[w+m]=h,a[E+(_-m)]=a[E+m]=a[b+m]=p;for(m=n;m<=_-n;++m)a[k+m]=0;for(m=n;m<=_-n;++m)a[E+m]=0;for(i(1,1,_,a,k,E),S=t<0?1/n:1,l=0;l<e;++l){for(m=0;m<n;++m)c=a[o+m],f=a[s+m],h=a[w+m],p=-a[b+m],d=h*(c+f),g=c*(p-h),v=f*(h+p),a[y+m]=d-v,a[x+m]=d+g;for(m=n;m<_;++m)a[y+m]=0;for(m=n;m<_;++m)a[x+m]=0;for(i(1,1,_,a,y,x),m=0;m<_;++m)c=a[y+m],f=a[x+m],h=a[k+m],p=a[E+m],d=h*(c+f),g=c*(p-h),v=f*(h+p),a[y+m]=d-v,a[x+m]=d+g;for(i(-1,1,_,a,y,x),m=0;m<n;++m)c=a[y+m],f=a[x+m],h=a[w+m],p=-a[b+m],d=h*(c+f),g=c*(p-h),v=f*(h+p),a[o+m]=S*(d-v),a[s+m]=S*(d+g);o+=n,s+=n}}(t,e,n,a,o,s,u)},e.exports.scratchMemory=function(t){return r.isPow2(t)?0:2*t+4*r.nextPow2(2*t+1)}},{"bit-twiddle":2}],63:[function(t,e,n){"use strict";e.exports=function(t,e,n){var c=new Array(t.dimension),f=1;Array.isArray(n)||(n=u(t.dimension,!!n));Array.isArray(e)||(e=u(t.dimension,e));for(var h=0;h<t.dimension;++h)n[h]?c[h]=t.shape[h]:c[h]=i(t.shape[h]+2*Math.ceil(3*e[h])),f*=c[h];var p=r(s.mallocDouble(f),c),d=p.hi.apply(p,t.shape.slice()),g=r(s.mallocDouble(f),c);return a.assigns(p,0),a.assign(d,t),a.assigns(g,0),o(1,p,g),l(p,g,e),o(-1,p,g),a.assign(t,d),s.freeDouble(p),s.freeDouble(g),t};var r=t("ndarray"),i=t("next-pow-2"),a=t("ndarray-ops"),o=t("ndarray-fft"),s=t("typedarray-pool"),u=t("dup"),l=t("cwise/lib/wrapper")({args:["array","array","scalar","index","shape"],pre:{body:"{this_w=new Array(_inline_0_arg2_.length);for(var _inline_0_w=0;_inline_0_w<_inline_0_arg2_.length;++_inline_0_w)_inline_0_arg2_[_inline_0_w]<1e-6?this_w[_inline_0_w]=0:this_w[_inline_0_w]=-2*Math.pow(Math.PI*_inline_0_arg2_[_inline_0_w]/_inline_0_arg4_[_inline_0_w],2)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:4},{name:"_inline_0_arg3_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg4_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_w"],localVars:["_inline_0_w"]},body:{body:"{for(var _inline_1_n=0,_inline_1_e=0;_inline_1_e<_inline_1_arg2_.length;++_inline_1_e){var _inline_1_f=.5*_inline_1_arg4_[_inline_1_e]-Math.abs(.5*_inline_1_arg4_[_inline_1_e]-_inline_1_arg3_[_inline_1_e]);_inline_1_n+=this_w[_inline_1_e]*_inline_1_f*_inline_1_f}var _inline_1_i=Math.exp(_inline_1_n);_inline_1_arg0_*=_inline_1_i,_inline_1_arg1_*=_inline_1_i}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!0,count:1},{name:"_inline_1_arg1_",lvalue:!0,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg3_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg4_",lvalue:!1,rvalue:!0,count:2}],thisVars:["this_w"],localVars:["_inline_1_e","_inline_1_f","_inline_1_i","_inline_1_n"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},debug:!1,funcName:"multiplyGaussian",blockSize:64})},{"cwise/lib/wrapper":12,dup:14,ndarray:67,"ndarray-fft":61,"ndarray-ops":64,"next-pow-2":68,"typedarray-pool":126}],64:[function(t,e,n){"use strict";var r=t("cwise-compiler"),i={body:"",args:[],thisVars:[],localVars:[]};function a(t){if(!t)return i;for(var e=0;e<t.args.length;++e){var n=t.args[e];t.args[e]=0===e?{name:n,lvalue:!0,rvalue:!!t.rvalue,count:t.count||1}:{name:n,lvalue:!1,rvalue:!0,count:1}}return t.thisVars||(t.thisVars=[]),t.localVars||(t.localVars=[]),t}function o(t){for(var e=[],n=0;n<t.args.length;++n)e.push("a"+n);return new Function("P",["return function ",t.funcName,"_ndarrayops(",e.join(","),") {P(",e.join(","),");return a0}"].join(""))(function(t){return r({args:t.args,pre:a(t.pre),body:a(t.body),post:a(t.proc),funcName:t.funcName})}(t))}var s={add:"+",sub:"-",mul:"*",div:"/",mod:"%",band:"&",bor:"|",bxor:"^",lshift:"<<",rshift:">>",rrshift:">>>"};!function(){for(var t in s){var e=s[t];n[t]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),n[t+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a"+e+"=b"},rvalue:!0,funcName:t+"eq"}),n[t+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),n[t+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a"+e+"=s"},rvalue:!0,funcName:t+"seq"})}}();var u={not:"!",bnot:"~",neg:"-",recip:"1.0/"};!function(){for(var t in u){var e=u[t];n[t]=o({args:["array","array"],body:{args:["a","b"],body:"a="+e+"b"},funcName:t}),n[t+"eq"]=o({args:["array"],body:{args:["a"],body:"a="+e+"a"},rvalue:!0,count:2,funcName:t+"eq"})}}();var l={and:"&&",or:"||",eq:"===",neq:"!==",lt:"<",gt:">",leq:"<=",geq:">="};!function(){for(var t in l){var e=l[t];n[t]=o({args:["array","array","array"],body:{args:["a","b","c"],body:"a=b"+e+"c"},funcName:t}),n[t+"s"]=o({args:["array","array","scalar"],body:{args:["a","b","s"],body:"a=b"+e+"s"},funcName:t+"s"}),n[t+"eq"]=o({args:["array","array"],body:{args:["a","b"],body:"a=a"+e+"b"},rvalue:!0,count:2,funcName:t+"eq"}),n[t+"seq"]=o({args:["array","scalar"],body:{args:["a","s"],body:"a=a"+e+"s"},rvalue:!0,count:2,funcName:t+"seq"})}}();var c=["abs","acos","asin","atan","ceil","cos","exp","floor","log","round","sin","sqrt","tan"];!function(){for(var t=0;t<c.length;++t){var e=c[t];n[e]=o({args:["array","array"],pre:{args:[],body:"this_f=Math."+e,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b)",thisVars:["this_f"]},funcName:e}),n[e+"eq"]=o({args:["array"],pre:{args:[],body:"this_f=Math."+e,thisVars:["this_f"]},body:{args:["a"],body:"a=this_f(a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:e+"eq"})}}();var f=["max","min","atan2","pow"];!function(){for(var t=0;t<f.length;++t){var e=f[t];n[e]=o({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+e,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:e}),n[e+"s"]=o({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+e,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(b,c)",thisVars:["this_f"]},funcName:e+"s"}),n[e+"eq"]=o({args:["array","array"],pre:{args:[],body:"this_f=Math."+e,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:e+"eq"}),n[e+"seq"]=o({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+e,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(a,b)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:e+"seq"})}}();var h=["atan2","pow"];!function(){for(var t=0;t<h.length;++t){var e=h[t];n[e+"op"]=o({args:["array","array","array"],pre:{args:[],body:"this_f=Math."+e,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:e+"op"}),n[e+"ops"]=o({args:["array","array","scalar"],pre:{args:[],body:"this_f=Math."+e,thisVars:["this_f"]},body:{args:["a","b","c"],body:"a=this_f(c,b)",thisVars:["this_f"]},funcName:e+"ops"}),n[e+"opeq"]=o({args:["array","array"],pre:{args:[],body:"this_f=Math."+e,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:e+"opeq"}),n[e+"opseq"]=o({args:["array","scalar"],pre:{args:[],body:"this_f=Math."+e,thisVars:["this_f"]},body:{args:["a","b"],body:"a=this_f(b,a)",thisVars:["this_f"]},rvalue:!0,count:2,funcName:e+"opseq"})}}(),n.any=r({args:["array"],pre:i,body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"if(a){return true}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return false"},funcName:"any"}),n.all=r({args:["array"],pre:i,body:{args:[{name:"x",lvalue:!1,rvalue:!0,count:1}],body:"if(!x){return false}",localVars:[],thisVars:[]},post:{args:[],localVars:[],thisVars:[],body:"return true"},funcName:"all"}),n.sum=r({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s+=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"sum"}),n.prod=r({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=1"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:1}],body:"this_s*=a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"prod"}),n.norm2squared=r({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return this_s"},funcName:"norm2squared"}),n.norm2=r({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:2}],body:"this_s+=a*a",localVars:[],thisVars:["this_s"]},post:{args:[],localVars:[],thisVars:["this_s"],body:"return Math.sqrt(this_s)"},funcName:"norm2"}),n.norminf=r({args:["array"],pre:{args:[],localVars:[],thisVars:["this_s"],body:"this_s=0"},body:{args:[{name:"a",lvalue:!1,rvalue:!0,count:4}],body:"if(-a>this_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"}),n.norm1=r({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"}),n.sup=r({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:[]}}),n.inf=r({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:[]}}),n.argmin=r({args:["index","array","shape"],pre:{body:"{this_v=Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_<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:[]}}),n.argmax=r({args:["index","array","shape"],pre:{body:"{this_v=-Infinity;this_i=_inline_0_arg2_.slice(0)}",args:[{name:"_inline_0_arg0_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg1_",lvalue:!1,rvalue:!1,count:0},{name:"_inline_0_arg2_",lvalue:!1,rvalue:!0,count:1}],thisVars:["this_i","this_v"],localVars:[]},body:{body:"{if(_inline_1_arg1_>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:[]}}),n.random=o({args:["array"],pre:{args:[],body:"this_f=Math.random",thisVars:["this_f"]},body:{args:["a"],body:"a=this_f()",thisVars:["this_f"]},funcName:"random"}),n.assign=o({args:["array","array"],body:{args:["a","b"],body:"a=b"},funcName:"assign"}),n.assigns=o({args:["array","scalar"],body:{args:["a","b"],body:"a=b"},funcName:"assigns"}),n.equals=r({args:["array","array"],pre:i,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":9}],65:[function(t,e,n){"use strict";var r=t("ndarray"),i=t("./doConvert.js");e.exports=function(t,e){for(var n=[],a=t,o=1;Array.isArray(a);)n.push(a.length),o*=a.length,a=a[0];return 0===n.length?r():(e||(e=r(new Float64Array(o),n)),i(e,t),e)}},{"./doConvert.js":66,ndarray:67}],66:[function(t,e,n){e.exports=t("cwise-compiler")({args:["array","scalar","index"],pre:{body:"{}",args:[],thisVars:[],localVars:[]},body:{body:"{\nvar _inline_1_v=_inline_1_arg1_,_inline_1_i\nfor(_inline_1_i=0;_inline_1_i<_inline_1_arg2_.length-1;++_inline_1_i) {\n_inline_1_v=_inline_1_v[_inline_1_arg2_[_inline_1_i]]\n}\n_inline_1_arg0_=_inline_1_v[_inline_1_arg2_[_inline_1_arg2_.length-1]]\n}",args:[{name:"_inline_1_arg0_",lvalue:!0,rvalue:!1,count:1},{name:"_inline_1_arg1_",lvalue:!1,rvalue:!0,count:1},{name:"_inline_1_arg2_",lvalue:!1,rvalue:!0,count:4}],thisVars:[],localVars:["_inline_1_i","_inline_1_v"]},post:{body:"{}",args:[],thisVars:[],localVars:[]},funcName:"convert",blockSize:64})},{"cwise-compiler":9}],67:[function(t,e,n){var r=t("iota-array"),i=t("is-buffer"),a="undefined"!=typeof Float64Array;function o(t,e){return t[0]-e[0]}function s(){var t,e=this.stride,n=new Array(e.length);for(t=0;t<n.length;++t)n[t]=[Math.abs(e[t]),t];n.sort(o);var r=new Array(n.length);for(t=0;t<r.length;++t)r[t]=n[t][1];return r}function u(t,e){var n=["View",e,"d",t].join("");e<0&&(n="View_Nil"+t);var i="generic"===t;if(-1===e){var a="function "+n+"(a){this.data=a;};var proto="+n+".prototype;proto.dtype='"+t+"';proto.index=function(){return -1};proto.size=0;proto.dimension=-1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function(){return new "+n+"(this.data);};proto.get=proto.set=function(){};proto.pick=function(){return null};return function construct_"+n+"(a){return new "+n+"(a);}";return new Function(a)()}if(0===e){a="function "+n+"(a,d) {this.data = a;this.offset = d};var proto="+n+".prototype;proto.dtype='"+t+"';proto.index=function(){return this.offset};proto.dimension=0;proto.size=1;proto.shape=proto.stride=proto.order=[];proto.lo=proto.hi=proto.transpose=proto.step=function "+n+"_copy() {return new "+n+"(this.data,this.offset)};proto.pick=function "+n+"_pick(){return TrivialArray(this.data);};proto.valueOf=proto.get=function "+n+"_get(){return "+(i?"this.data.get(this.offset)":"this.data[this.offset]")+"};proto.set=function "+n+"_set(v){return "+(i?"this.data.set(this.offset,v)":"this.data[this.offset]=v")+"};return function construct_"+n+"(a,b,c,d){return new "+n+"(a,d)}";return new Function("TrivialArray",a)(l[t][0])}a=["'use strict'"];var o=r(e),u=o.map(function(t){return"i"+t}),c="this.offset+"+o.map(function(t){return"this.stride["+t+"]*i"+t}).join("+"),f=o.map(function(t){return"b"+t}).join(","),h=o.map(function(t){return"c"+t}).join(",");a.push("function "+n+"(a,"+f+","+h+",d){this.data=a","this.shape=["+f+"]","this.stride=["+h+"]","this.offset=d|0}","var proto="+n+".prototype","proto.dtype='"+t+"'","proto.dimension="+e),a.push("Object.defineProperty(proto,'size',{get:function "+n+"_size(){return "+o.map(function(t){return"this.shape["+t+"]"}).join("*"),"}})"),1===e?a.push("proto.order=[0]"):(a.push("Object.defineProperty(proto,'order',{get:"),e<4?(a.push("function "+n+"_order(){"),2===e?a.push("return (Math.abs(this.stride[0])>Math.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===e&&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 "+n+"_set("+u.join(",")+",v){"),i?a.push("return this.data.set("+c+",v)}"):a.push("return this.data["+c+"]=v}"),a.push("proto.get=function "+n+"_get("+u.join(",")+"){"),i?a.push("return this.data.get("+c+")}"):a.push("return this.data["+c+"]}"),a.push("proto.index=function "+n+"_index(",u.join(),"){return "+c+"}"),a.push("proto.hi=function "+n+"_hi("+u.join(",")+"){return new "+n+"(this.data,"+o.map(function(t){return["(typeof i",t,"!=='number'||i",t,"<0)?this.shape[",t,"]:i",t,"|0"].join("")}).join(",")+","+o.map(function(t){return"this.stride["+t+"]"}).join(",")+",this.offset)}");var p=o.map(function(t){return"a"+t+"=this.shape["+t+"]"}),d=o.map(function(t){return"c"+t+"=this.stride["+t+"]"});a.push("proto.lo=function "+n+"_lo("+u.join(",")+"){var b=this.offset,d=0,"+p.join(",")+","+d.join(","));for(var g=0;g<e;++g)a.push("if(typeof i"+g+"==='number'&&i"+g+">=0){d=i"+g+"|0;b+=c"+g+"*d;a"+g+"-=d}");a.push("return new "+n+"(this.data,"+o.map(function(t){return"a"+t}).join(",")+","+o.map(function(t){return"c"+t}).join(",")+",b)}"),a.push("proto.step=function "+n+"_step("+u.join(",")+"){var "+o.map(function(t){return"a"+t+"=this.shape["+t+"]"}).join(",")+","+o.map(function(t){return"b"+t+"=this.stride["+t+"]"}).join(",")+",c=this.offset,d=0,ceil=Math.ceil");for(g=0;g<e;++g)a.push("if(typeof i"+g+"==='number'){d=i"+g+"|0;if(d<0){c+=b"+g+"*(a"+g+"-1);a"+g+"=ceil(-a"+g+"/d)}else{a"+g+"=ceil(a"+g+"/d)}b"+g+"*=d}");a.push("return new "+n+"(this.data,"+o.map(function(t){return"a"+t}).join(",")+","+o.map(function(t){return"b"+t}).join(",")+",c)}");var v=new Array(e),m=new Array(e);for(g=0;g<e;++g)v[g]="a[i"+g+"]",m[g]="b[i"+g+"]";a.push("proto.transpose=function "+n+"_transpose("+u+"){"+u.map(function(t,e){return t+"=("+t+"===undefined?"+e+":"+t+"|0)"}).join(";"),"var a=this.shape,b=this.stride;return new "+n+"(this.data,"+v.join(",")+","+m.join(",")+",this.offset)}"),a.push("proto.pick=function "+n+"_pick("+u+"){var a=[],b=[],c=this.offset");for(g=0;g<e;++g)a.push("if(typeof i"+g+"==='number'&&i"+g+">=0){c=(c+this.stride["+g+"]*i"+g+")|0}else{a.push(this.shape["+g+"]);b.push(this.stride["+g+"])}");return a.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),a.push("return function construct_"+n+"(data,shape,stride,offset){return new "+n+"(data,"+o.map(function(t){return"shape["+t+"]"}).join(",")+","+o.map(function(t){return"stride["+t+"]"}).join(",")+",offset)}"),new Function("CTOR_LIST","ORDER",a.join("\n"))(l[t],s)}var l={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],buffer:[],generic:[]};e.exports=function(t,e,n,r){if(void 0===t)return(0,l.array[0])([]);"number"==typeof t&&(t=[t]),void 0===e&&(e=[t.length]);var o=e.length;if(void 0===n){n=new Array(o);for(var s=o-1,c=1;s>=0;--s)n[s]=c,c*=e[s]}if(void 0===r)for(r=0,s=0;s<o;++s)n[s]<0&&(r-=(e[s]-1)*n[s]);for(var f=function(t){if(i(t))return"buffer";if(a)switch(Object.prototype.toString.call(t)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object Uint8ClampedArray]":return"uint8_clamped"}return Array.isArray(t)?"array":"generic"}(t),h=l[f];h.length<=o+1;)h.push(u(f,h.length-1));return(0,h[o+1])(t,e,n,r)}},{"iota-array":54,"is-buffer":55}],68:[function(t,e,n){e.exports=function(t){return t+=0===t,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1}},{}],69:[function(t,e,n){"use strict";function r(t,e,n,r){for(var i=t[e++],a=1<<i,o=a+1,s=o+1,u=i+1,l=(1<<u)-1,c=0,f=0,h=0,p=t[e++],d=new Int32Array(4096),g=null;;){for(;c<16&&0!==p;)f|=t[e++]<<c,c+=8,1===p?p=t[e++]:--p;if(c<u)break;var v=f&l;if(f>>=u,c-=u,v!==a){if(v===o)break;for(var m=v<s?v:g,_=0,w=m;w>a;)w=d[w]>>8,++_;var b=w;if(h+_+(m!==v?1:0)>r)return void console.log("Warning, gif stream longer than expected.");n[h++]=b;var y=h+=_;for(m!==v&&(n[h++]=b),w=m;_--;)w=d[w],n[--y]=255&w,w>>=8;null!==g&&s<4096&&(d[s++]=g<<8|b,s>=l+1&&u<12&&(++u,l=l<<1|1)),g=v}else s=o+1,l=(1<<(u=i+1))-1,g=null}return h!==r&&console.log("Warning, gif stream shorter than expected."),n}try{n.GifWriter=function(t,e,n,r){var i=0,a=void 0===(r=void 0===r?{}:r).loop?null:r.loop,o=void 0===r.palette?null:r.palette;if(e<=0||n<=0||e>65535||n>65535)throw new Error("Width/Height invalid.");function s(t){var e=t.length;if(e<2||e>256||e&e-1)throw new Error("Invalid code/color length, must be power of 2 and 2 .. 256.");return e}t[i++]=71,t[i++]=73,t[i++]=70,t[i++]=56,t[i++]=57,t[i++]=97;var u=0,l=0;if(null!==o){for(var c=s(o);c>>=1;)++u;if(c=1<<u,--u,void 0!==r.background){if((l=r.background)>=c)throw new Error("Background index out of range.");if(0===l)throw new Error("Background index explicitly passed as 0.")}}if(t[i++]=255&e,t[i++]=e>>8&255,t[i++]=255&n,t[i++]=n>>8&255,t[i++]=(null!==o?128:0)|u,t[i++]=l,t[i++]=0,null!==o)for(var f=0,h=o.length;f<h;++f){var p=o[f];t[i++]=p>>16&255,t[i++]=p>>8&255,t[i++]=255&p}if(null!==a){if(a<0||a>65535)throw new Error("Loop count invalid.");t[i++]=33,t[i++]=255,t[i++]=11,t[i++]=78,t[i++]=69,t[i++]=84,t[i++]=83,t[i++]=67,t[i++]=65,t[i++]=80,t[i++]=69,t[i++]=50,t[i++]=46,t[i++]=48,t[i++]=3,t[i++]=1,t[i++]=255&a,t[i++]=a>>8&255,t[i++]=0}var d=!1;this.addFrame=function(e,n,r,a,u,l){if(!0===d&&(--i,d=!1),l=void 0===l?{}:l,e<0||n<0||e>65535||n>65535)throw new Error("x/y invalid.");if(r<=0||a<=0||r>65535||a>65535)throw new Error("Width/Height invalid.");if(u.length<r*a)throw new Error("Not enough pixels for the frame size.");var c=!0,f=l.palette;if(void 0!==f&&null!==f||(c=!1,f=o),void 0===f||null===f)throw new Error("Must supply either a local or global palette.");for(var h=s(f),p=0;h>>=1;)++p;h=1<<p;var g=void 0===l.delay?0:l.delay,v=void 0===l.disposal?0:l.disposal;if(v<0||v>3)throw new Error("Disposal out of range.");var m=!1,_=0;if(void 0!==l.transparent&&null!==l.transparent&&(m=!0,(_=l.transparent)<0||_>=h))throw new Error("Transparent color index.");if((0!==v||m||0!==g)&&(t[i++]=33,t[i++]=249,t[i++]=4,t[i++]=v<<2|(!0===m?1:0),t[i++]=255&g,t[i++]=g>>8&255,t[i++]=_,t[i++]=0),t[i++]=44,t[i++]=255&e,t[i++]=e>>8&255,t[i++]=255&n,t[i++]=n>>8&255,t[i++]=255&r,t[i++]=r>>8&255,t[i++]=255&a,t[i++]=a>>8&255,t[i++]=!0===c?128|p-1:0,!0===c)for(var w=0,b=f.length;w<b;++w){var y=f[w];t[i++]=y>>16&255,t[i++]=y>>8&255,t[i++]=255&y}return i=function(t,e,n,r){t[e++]=n;var i=e++,a=1<<n,o=a-1,s=a+1,u=s+1,l=n+1,c=0,f=0;function h(n){for(;c>=n;)t[e++]=255&f,f>>=8,c-=8,e===i+256&&(t[i]=255,i=e++)}function p(t){f|=t<<c,c+=l,h(8)}var d=r[0]&o,g={};p(a);for(var v=1,m=r.length;v<m;++v){var _=r[v]&o,w=d<<8|_,b=g[w];if(void 0===b){for(f|=d<<c,c+=l;c>=8;)t[e++]=255&f,f>>=8,c-=8,e===i+256&&(t[i]=255,i=e++);4096===u?(p(a),u=s+1,l=n+1,g={}):(u>=1<<l&&++l,g[w]=u++),d=_}else d=b}return p(d),p(s),h(1),i+1===e?t[i]=0:(t[i]=e-i-1,t[e++]=0),e}(t,i,p<2?2:p,u)},this.end=function(){return!1===d&&(t[i++]=59,d=!0),i},this.getOutputBuffer=function(){return t},this.setOutputBuffer=function(e){t=e},this.getOutputBufferPosition=function(){return i},this.setOutputBufferPosition=function(t){i=t}},n.GifReader=function(t){var e=0;if(71!==t[e++]||73!==t[e++]||70!==t[e++]||56!==t[e++]||56!=(t[e++]+1&253)||97!==t[e++])throw new Error("Invalid GIF 87a/89a header.");var n=t[e++]|t[e++]<<8,i=t[e++]|t[e++]<<8,a=t[e++],o=a>>7,s=1<<1+(7&a);t[e++],t[e++];var u=null,l=null;o&&(u=e,l=s,e+=3*s);var c=!0,f=[],h=0,p=null,d=0,g=null;for(this.width=n,this.height=i;c&&e<t.length;)switch(t[e++]){case 33:switch(t[e++]){case 255:if(11!==t[e]||78==t[e+1]&&69==t[e+2]&&84==t[e+3]&&83==t[e+4]&&67==t[e+5]&&65==t[e+6]&&80==t[e+7]&&69==t[e+8]&&50==t[e+9]&&46==t[e+10]&&48==t[e+11]&&3==t[e+12]&&1==t[e+13]&&0==t[e+16])e+=14,g=t[e++]|t[e++]<<8,e++;else for(e+=12;;){if(!((T=t[e++])>=0))throw Error("Invalid block size");if(0===T)break;e+=T}break;case 249:if(4!==t[e++]||0!==t[e+4])throw new Error("Invalid graphics extension block.");var v=t[e++];h=t[e++]|t[e++]<<8,p=t[e++],0==(1&v)&&(p=null),d=v>>2&7,e++;break;case 254:for(;;){if(!((T=t[e++])>=0))throw Error("Invalid block size");if(0===T)break;e+=T}break;default:throw new Error("Unknown graphic control label: 0x"+t[e-1].toString(16))}break;case 44:var m=t[e++]|t[e++]<<8,_=t[e++]|t[e++]<<8,w=t[e++]|t[e++]<<8,b=t[e++]|t[e++]<<8,y=t[e++],x=y>>6&1,k=1<<1+(7&y),E=u,S=l,A=!1;y>>7&&(A=!0,E=e,S=k,e+=3*k);var M=e;for(e++;;){var T;if(!((T=t[e++])>=0))throw Error("Invalid block size");if(0===T)break;e+=T}f.push({x:m,y:_,width:w,height:b,has_local_palette:A,palette_offset:E,palette_size:S,data_offset:M,data_length:e-M,transparent_index:p,interlaced:!!x,delay:h,disposal:d});break;case 59:c=!1;break;default:throw new Error("Unknown gif block: 0x"+t[e-1].toString(16))}this.numFrames=function(){return f.length},this.loopCount=function(){return g},this.frameInfo=function(t){if(t<0||t>=f.length)throw new Error("Frame index out of range.");return f[t]},this.decodeAndBlitFrameBGRA=function(e,i){var a=this.frameInfo(e),o=a.width*a.height,s=new Uint8Array(o);r(t,a.data_offset,s,o);var u=a.palette_offset,l=a.transparent_index;null===l&&(l=256);var c=a.width,f=n-c,h=c,p=4*(a.y*n+a.x),d=4*((a.y+a.height)*n+a.x),g=p,v=4*f;!0===a.interlaced&&(v+=4*n*7);for(var m=8,_=0,w=s.length;_<w;++_){var b=s[_];if(0===h&&(h=c,(g+=v)>=d&&(v=4*f+4*n*(m-1),g=p+(c+f)*(m<<1),m>>=1)),b===l)g+=4;else{var y=t[u+3*b],x=t[u+3*b+1],k=t[u+3*b+2];i[g++]=k,i[g++]=x,i[g++]=y,i[g++]=255}--h}},this.decodeAndBlitFrameRGBA=function(e,i){var a=this.frameInfo(e),o=a.width*a.height,s=new Uint8Array(o);r(t,a.data_offset,s,o);var u=a.palette_offset,l=a.transparent_index;null===l&&(l=256);var c=a.width,f=n-c,h=c,p=4*(a.y*n+a.x),d=4*((a.y+a.height)*n+a.x),g=p,v=4*f;!0===a.interlaced&&(v+=4*n*7);for(var m=8,_=0,w=s.length;_<w;++_){var b=s[_];if(0===h&&(h=c,(g+=v)>=d&&(v=4*f+4*n*(m-1),g=p+(c+f)*(m<<1),m>>=1)),b===l)g+=4;else{var y=t[u+3*b],x=t[u+3*b+1],k=t[u+3*b+2];i[g++]=y,i[g++]=x,i[g++]=k,i[g++]=255}--h}}}}catch(t){}},{}],70:[function(t,e,n){(function(n){var r=t("charm");function i(t){if(!(t=t||{}).total)throw new Error("You MUST specify the total number of operations that will be processed.");this.total=t.total,this.current=0,this.max_burden=t.maxBurden||.5,this.show_burden=t.showBurden||!1,this.started=!1,this.size=50,this.inner_time=0,this.outer_time=0,this.elapsed=0,this.time_start=0,this.time_end=0,this.time_left=0,this.time_burden=0,this.skip_steps=0,this.skipped=0,this.aborted=!1,this.charm=r(),this.charm.pipe(n.stdout),this.charm.write("\n\n\n")}function a(t,e,n){for(n=n||" ";t.length<e;)t=n+t;return t}function o(t,e,n,r){t=(t+"").replace(/[^0-9+\-Ee.]/g,"");var i=isFinite(+t)?+t:0,a=isFinite(+e)?Math.abs(e):0,o=void 0===r?",":r,s=void 0===n?".":n,u="";return(u=(a?function(t,e){var n=Math.pow(10,e);return""+Math.round(t*n)/n}(i,a):""+Math.round(i)).split("."))[0].length>3&&(u[0]=u[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,o)),(u[1]||"").length<a&&(u[1]=u[1]||"",u[1]+=new Array(a-u[1].length+1).join("0")),u.join(s)}e.exports=function(t){return"number"==typeof t&&(t={total:t}),new i(t)},i.prototype.op=function(t){t?this.current=t:this.current++,this.burdenReached()||(this.started||(this.started=(new Date).getTime()),this.time_start=(new Date).getTime(),this.updateTimes(),this.clear(),this.outputProgress(),this.outputStats(),this.outputTimes(),this.current>=this.total&&this.finished(),this.time_end=(new Date).getTime(),this.inner_time=this.time_end-this.time_start)},i.prototype.updateTimes=function(){this.elapsed=this.time_start-this.started,this.time_end>0&&(this.outer_time=this.time_start-this.time_end),this.inner_time>0&&this.outer_time>0&&(this.time_burden=this.inner_time/(this.inner_time+this.outer_time)*100,this.time_left=this.elapsed/this.current*(this.total-this.current),this.time_left<0&&(this.time_left=0)),this.time_burden>this.max_burden&&this.skip_steps<this.total/this.size&&(this.skip_steps=Math.floor(1.3*++this.skip_steps))},i.prototype.clear=function(){this.charm.erase("line").up(1).erase("line").up(1).erase("line").write("\r")},i.prototype.outputProgress=function(){this.charm.write("Processing: "),this.charm.foreground("green").background("green");for(var t=0;t<this.current/this.total*this.size-1;t++)this.charm.write(" ");for(this.charm.foreground("white").background("white");t<this.size-1;)this.charm.write(" "),t++;this.charm.display("reset").down(1).left(100)},i.prototype.outputStats=function(){this.perc=this.current/this.total*100,this.perc=a(this.perc.toFixed(2),2),this.charm.write(" ").display("bright").write(this.perc+"%").display("reset"),this.total_len=o(this.total).length,this.charm.write(" ").display("bright").write(a(o(this.current),this.total_len)).display("reset"),this.charm.write("/"+o(this.total)),this.show_burden&&(this.charm.write(" ").display("bright").write("Burden: ").display("reset"),this.charm.write(this.time_burden.toFixed(2)+"% / "+this.skip_steps)),this.charm.display("reset").down(1).left(100)},i.prototype.outputTimes=function(){var t=Math.floor(this.elapsed/36e5),e=Math.floor(this.elapsed/1e3%3600/60),n=Math.floor(this.elapsed/1e3%60);this.charm.write(" ").display("bright").write("Elapsed: ").display("reset"),this.charm.write(t+"h "+e+"m "+n+"s"),this.time_left&&(t=Math.floor(this.time_left/36e5),e=Math.floor(this.time_left/1e3%3600/60),n=Math.ceil(this.time_left/1e3%60),this.charm.write(" ").display("bright").write("Remaining: ").display("reset"),this.charm.write(t+"h "+e+"m "+n+"s"))},i.prototype.finished=function(){this.charm.write("\n\n"),this.charm.write("Finished!"),this.charm.write("\n\n")},i.prototype.burdenReached=function(){if(this.skip_steps>0&&this.current<this.total){if(this.skipped<this.skip_steps)return this.skipped++,!0;this.skipped=0}return!1}}).call(this,t("_process"))},{_process:94,charm:5}],71:[function(t,e,n){(function(t){function e(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}var r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(t){return r.exec(t).slice(1)};function a(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}n.resolve=function(){for(var n="",r=!1,i=arguments.length-1;i>=-1&&!r;i--){var o=i>=0?arguments[i]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,r="/"===o.charAt(0))}return n=e(a(n.split("/"),function(t){return!!t}),!r).join("/"),(r?"/":"")+n||"."},n.normalize=function(t){var r=n.isAbsolute(t),i="/"===o(t,-1);return(t=e(a(t.split("/"),function(t){return!!t}),!r).join("/"))||r||(t="."),t&&i&&(t+="/"),(r?"/":"")+t},n.isAbsolute=function(t){return"/"===t.charAt(0)},n.join=function(){var t=Array.prototype.slice.call(arguments,0);return n.normalize(a(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},n.relative=function(t,e){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=n.resolve(t).substr(1),e=n.resolve(e).substr(1);for(var i=r(t.split("/")),a=r(e.split("/")),o=Math.min(i.length,a.length),s=o,u=0;u<o;u++)if(i[u]!==a[u]){s=u;break}var l=[];for(u=s;u<i.length;u++)l.push("..");return(l=l.concat(a.slice(s))).join("/")},n.sep="/",n.delimiter=":",n.dirname=function(t){var e=i(t),n=e[0],r=e[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},n.basename=function(t,e){var n=i(t)[2];return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},n.extname=function(t){return i(t)[3]};var o="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,t("_process"))},{_process:94}],72:[function(t,e,n){(function(e){"use strict";var r=t("./interlace"),i={1:{0:0,1:0,2:0,3:255},2:{0:0,1:0,2:0,3:1},3:{0:0,1:1,2:2,3:255},4:{0:0,1:1,2:2,3:3}};function a(t,e,n,r,a,o){for(var s=t.width,u=t.height,l=t.index,c=0;c<u;c++)for(var f=0;f<s;f++){for(var h=n(f,c,l),p=0;p<4;p++){var d=i[r][p];if(p===a.length)throw new Error("Ran out of data");e[h+p]=255!==d?a[d+o]:255}o+=r}return o}function o(t,e,n,r,a,o){for(var s=t.width,u=t.height,l=t.index,c=0;c<u;c++){for(var f=0;f<s;f++)for(var h=a.get(r),p=n(f,c,l),d=0;d<4;d++){var g=i[r][d];e[p+d]=255!==g?h[g]:o}a.resetAfterLine()}}n.dataToBitMap=function(t,n){var i,s=n.width,u=n.height,l=n.depth,c=n.bpp,f=n.interlace;if(8!==l)var h=function(t,e){var n=[],r=0;function i(){if(r===t.length)throw new Error("Ran out of data");var i,a,o,s,u,l,c,f,h=t[r];switch(r++,e){default:throw new Error("unrecognised depth");case 16:c=t[r],r++,n.push((h<<8)+c);break;case 4:c=15&h,f=h>>4,n.push(f,c);break;case 2:u=3&h,l=h>>2&3,c=h>>4&3,f=h>>6&3,n.push(f,c,l,u);break;case 1:i=1&h,a=h>>1&1,o=h>>2&1,s=h>>3&1,u=h>>4&1,l=h>>5&1,c=h>>6&1,f=h>>7&1,n.push(f,c,l,u,s,o,a,i)}}return{get:function(t){for(;n.length<t;)i();var e=n.slice(0,t);return n=n.slice(t),e},resetAfterLine:function(){n.length=0},end:function(){if(r!==t.length)throw new Error("extra data found")}}}(t,l);i=l<=8?new e(s*u*4):new Uint16Array(s*u*4);var p,d,g=Math.pow(2,l)-1,v=0;if(f)p=r.getImagePasses(s,u),d=r.getInterlaceIterator(s,u);else{var m=0;d=function(){var t=m;return m+=4,t},p=[{width:s,height:u}]}for(var _=0;_<p.length;_++)8===l?v=a(p[_],i,d,c,t,v):o(p[_],i,d,c,h,g);if(8===l){if(v!==t.length)throw new Error("extra data found")}else h.end();return i}}).call(this,t("buffer").Buffer)},{"./interlace":82,buffer:4}],73:[function(t,e,n){(function(n){"use strict";var r=t("./constants");e.exports=function(t,e,i,a){var o=a.colorType===r.COLORTYPE_COLOR_ALPHA;if(a.inputHasAlpha&&o)return t;if(!a.inputHasAlpha&&!o)return t;var s=o?4:3,u=new n(e*i*s),l=a.inputHasAlpha?4:3,c=0,f=0,h=a.bgColor||{};void 0===h.red&&(h.red=255),void 0===h.green&&(h.green=255),void 0===h.blue&&(h.blue=255);for(var p=0;p<i;p++)for(var d=0;d<e;d++){var g,v=t[c],m=t[c+1],_=t[c+2];a.inputHasAlpha?(g=t[c+3],o||(g/=255,v=Math.min(Math.max(Math.round((1-g)*h.red+g*v),0),255),m=Math.min(Math.max(Math.round((1-g)*h.green+g*m),0),255),_=Math.min(Math.max(Math.round((1-g)*h.blue+g*_),0),255))):g=255,u[f]=v,u[f+1]=m,u[f+2]=_,o&&(u[f+3]=g),c+=l,f+=s}return u}}).call(this,t("buffer").Buffer)},{"./constants":75,buffer:4}],74:[function(t,e,n){(function(n,r){"use strict";var i=t("util"),a=t("stream"),o=e.exports=function(){a.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};i.inherits(o,a),o.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e}),n.nextTick(function(){this._process(),this._paused&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}.bind(this))},o.prototype.write=function(t,e){return this.writable?(n=r.isBuffer(t)?t:new r(t,e||this._encoding),this._buffers.push(n),this._buffered+=n.length,this._process(),this._reads&&0===this._reads.length&&(this._paused=!0),this.writable&&!this._paused):(this.emit("error",new Error("Stream not writable")),!1);var n},o.prototype.end=function(t,e){t&&this.write(t,e),this.writable=!1,this._buffers&&(0===this._buffers.length?this._end():(this._buffers.push(null),this._process()))},o.prototype.destroySoon=o.prototype.end,o.prototype._end=function(){this._reads.length>0&&this.emit("error",new Error("There are some read requests waitng on finished stream")),this.destroy()},o.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))},o.prototype._processReadAllowingLess=function(t){this._reads.shift();var e=this._buffers[0];e.length>t.length?(this._buffered-=t.length,this._buffers[0]=e.slice(t.length),t.func.call(this,e.slice(0,t.length))):(this._buffered-=e.length,this._buffers.shift(),t.func.call(this,e))},o.prototype._processRead=function(t){this._reads.shift();for(var e=0,n=0,i=new r(t.length);e<t.length;){var a=this._buffers[n++],o=Math.min(a.length,t.length-e);a.copy(i,e,0,o),e+=o,o!==a.length&&(this._buffers[--n]=a.slice(o))}n>0&&this._buffers.splice(0,n),this._buffered-=t.length,t.func.call(this,i)},o.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){var t=this._reads[0];if(t.allowLess)this._processReadAllowingLess(t);else{if(!(this._buffered>=t.length))break;this._processRead(t)}}this._buffers&&this._buffers.length>0&&null===this._buffers[0]&&this._end()}catch(t){this.emit("error",t)}}}).call(this,t("_process"),t("buffer").Buffer)},{_process:94,buffer:4,stream:108,util:132}],75:[function(t,e,n){"use strict";e.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}},{}],76:[function(t,e,n){"use strict";var r=[];!function(){for(var t=0;t<256;t++){for(var e=t,n=0;n<8;n++)1&e?e=3988292384^e>>>1:e>>>=1;r[t]=e}}();var i=e.exports=function(){this._crc=-1};i.prototype.write=function(t){for(var e=0;e<t.length;e++)this._crc=r[255&(this._crc^t[e])]^this._crc>>>8;return!0},i.prototype.crc32=function(){return-1^this._crc},i.crc32=function(t){for(var e=-1,n=0;n<t.length;n++)e=r[255&(e^t[n])]^e>>>8;return-1^e}},{}],77:[function(t,e,n){(function(n){"use strict";var r=t("./paeth-predictor");var i={0:function(t,e,n,r,i){t.copy(r,i,e,e+n)},1:function(t,e,n,r,i,a){for(var o=0;o<n;o++){var s=o>=a?t[e+o-a]:0,u=t[e+o]-s;r[i+o]=u}},2:function(t,e,n,r,i){for(var a=0;a<n;a++){var o=e>0?t[e+a-n]:0,s=t[e+a]-o;r[i+a]=s}},3:function(t,e,n,r,i,a){for(var o=0;o<n;o++){var s=o>=a?t[e+o-a]:0,u=e>0?t[e+o-n]:0,l=t[e+o]-(s+u>>1);r[i+o]=l}},4:function(t,e,n,i,a,o){for(var s=0;s<n;s++){var u=s>=o?t[e+s-o]:0,l=e>0?t[e+s-n]:0,c=e>0&&s>=o?t[e+s-(n+o)]:0,f=t[e+s]-r(u,l,c);i[a+s]=f}}},a={0:function(t,e,n){for(var r=0,i=e+n,a=e;a<i;a++)r+=Math.abs(t[a]);return r},1:function(t,e,n,r){for(var i=0,a=0;a<n;a++){var o=a>=r?t[e+a-r]:0,s=t[e+a]-o;i+=Math.abs(s)}return i},2:function(t,e,n){for(var r=0,i=e+n,a=e;a<i;a++){var o=e>0?t[a-n]:0,s=t[a]-o;r+=Math.abs(s)}return r},3:function(t,e,n,r){for(var i=0,a=0;a<n;a++){var o=a>=r?t[e+a-r]:0,s=e>0?t[e+a-n]:0,u=t[e+a]-(o+s>>1);i+=Math.abs(u)}return i},4:function(t,e,n,i){for(var a=0,o=0;o<n;o++){var s=o>=i?t[e+o-i]:0,u=e>0?t[e+o-n]:0,l=e>0&&o>=i?t[e+o-(n+i)]:0,c=t[e+o]-r(s,u,l);a+=Math.abs(c)}return a}};e.exports=function(t,e,r,o,s){var u;if("filterType"in o&&-1!==o.filterType){if("number"!=typeof o.filterType)throw new Error("unrecognised filter types");u=[o.filterType]}else u=[0,1,2,3,4];for(var l=e*s,c=0,f=0,h=new n((l+1)*r),p=u[0],d=0;d<r;d++){if(u.length>1)for(var g=1/0,v=0;v<u.length;v++){var m=a[u[v]](t,f,l,s);m<g&&(p=u[v],g=m)}h[c]=p,c++,i[p](t,f,l,h,c,s),c+=l,f+=l}return h}}).call(this,t("buffer").Buffer)},{"./paeth-predictor":86,buffer:4}],78:[function(t,e,n){(function(n){"use strict";var r=t("util"),i=t("./chunkstream"),a=t("./filter-parse"),o=e.exports=function(t){i.call(this);var e=[],r=this;this._filter=new a(t,{read:this.read.bind(this),write:function(t){e.push(t)},complete:function(){r.emit("complete",n.concat(e))}}),this._filter.start()};r.inherits(o,i)}).call(this,t("buffer").Buffer)},{"./chunkstream":74,"./filter-parse":80,buffer:4,util:132}],79:[function(t,e,n){(function(e){"use strict";var r=t("./sync-reader"),i=t("./filter-parse");n.process=function(t,n){var a=[],o=new r(t);return new i(n,{read:o.read.bind(o),write:function(t){a.push(t)},complete:function(){}}).start(),o.process(),e.concat(a)}}).call(this,t("buffer").Buffer)},{"./filter-parse":80,"./sync-reader":92,buffer:4}],80:[function(t,e,n){(function(n){"use strict";var r=t("./interlace"),i=t("./paeth-predictor");function a(t,e,n){var r=t*e;return 8!==n&&(r=Math.ceil(r/(8/n))),r}var o=e.exports=function(t,e){var n=t.width,i=t.height,o=t.interlace,s=t.bpp,u=t.depth;if(this.read=e.read,this.write=e.write,this.complete=e.complete,this._imageIndex=0,this._images=[],o)for(var l=r.getImagePasses(n,i),c=0;c<l.length;c++)this._images.push({byteWidth:a(l[c].width,s,u),height:l[c].height,lineIndex:0});else this._images.push({byteWidth:a(n,s,u),height:i,lineIndex:0});this._xComparison=8===u?s:16===u?2*s:1};o.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))},o.prototype._unFilterType1=function(t,e,n){for(var r=this._xComparison,i=r-1,a=0;a<n;a++){var o=t[1+a],s=a>i?e[a-r]:0;e[a]=o+s}},o.prototype._unFilterType2=function(t,e,n){for(var r=this._lastLine,i=0;i<n;i++){var a=t[1+i],o=r?r[i]:0;e[i]=a+o}},o.prototype._unFilterType3=function(t,e,n){for(var r=this._xComparison,i=r-1,a=this._lastLine,o=0;o<n;o++){var s=t[1+o],u=a?a[o]:0,l=o>i?e[o-r]:0,c=Math.floor((l+u)/2);e[o]=s+c}},o.prototype._unFilterType4=function(t,e,n){for(var r=this._xComparison,a=r-1,o=this._lastLine,s=0;s<n;s++){var u=t[1+s],l=o?o[s]:0,c=s>a?e[s-r]:0,f=s>a&&o?o[s-r]:0,h=i(c,l,f);e[s]=u+h}},o.prototype._reverseFilterLine=function(t){var e,r=t[0],i=this._images[this._imageIndex],a=i.byteWidth;if(0===r)e=t.slice(1,a+1);else switch(e=new n(a),r){case 1:this._unFilterType1(t,e,a);break;case 2:this._unFilterType2(t,e,a);break;case 3:this._unFilterType3(t,e,a);break;case 4:this._unFilterType4(t,e,a);break;default:throw new Error("Unrecognised filter type - "+r)}this.write(e),i.lineIndex++,i.lineIndex>=i.height?(this._lastLine=null,this._imageIndex++,i=this._images[this._imageIndex]):this._lastLine=e,i?this.read(i.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}}).call(this,t("buffer").Buffer)},{"./interlace":82,"./paeth-predictor":86,buffer:4}],81:[function(t,e,n){(function(t){"use strict";e.exports=function(e,n){var r=n.depth,i=n.width,a=n.height,o=n.colorType,s=n.transColor,u=n.palette,l=e;return 3===o?function(t,e,n,r,i){for(var a=0,o=0;o<r;o++)for(var s=0;s<n;s++){var u=i[t[a]];if(!u)throw new Error("index "+t[a]+" not in palette");for(var l=0;l<4;l++)e[a+l]=u[l];a+=4}}(e,l,i,a,u):(s&&function(t,e,n,r,i){for(var a=0,o=0;o<r;o++)for(var s=0;s<n;s++){var u=!1;if(1===i.length?i[0]===t[a]&&(u=!0):i[0]===t[a]&&i[1]===t[a+1]&&i[2]===t[a+2]&&(u=!0),u)for(var l=0;l<4;l++)e[a+l]=0;a+=4}}(e,l,i,a,s),8!==r&&(16===r&&(l=new t(i*a*4)),function(t,e,n,r,i){for(var a=Math.pow(2,i)-1,o=0,s=0;s<r;s++)for(var u=0;u<n;u++){for(var l=0;l<4;l++)e[o+l]=Math.floor(255*t[o+l]/a+.5);o+=4}}(e,l,i,a,r))),l}}).call(this,t("buffer").Buffer)},{buffer:4}],82:[function(t,e,n){"use strict";var r=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];n.getImagePasses=function(t,e){for(var n=[],i=t%8,a=e%8,o=(t-i)/8,s=(e-a)/8,u=0;u<r.length;u++){for(var l=r[u],c=o*l.x.length,f=s*l.y.length,h=0;h<l.x.length&&l.x[h]<i;h++)c++;for(h=0;h<l.y.length&&l.y[h]<a;h++)f++;c>0&&f>0&&n.push({width:c,height:f,index:u})}return n},n.getInterlaceIterator=function(t){return function(e,n,i){var a=e%r[i].x.length,o=(e-a)/r[i].x.length*8+r[i].x[a],s=n%r[i].y.length;return 4*o+((n-s)/r[i].y.length*8+r[i].y[s])*t*4}}},{}],83:[function(t,e,n){(function(n){"use strict";var r=t("util"),i=t("stream"),a=t("./constants"),o=t("./packer"),s=e.exports=function(t){i.call(this);var e=t||{};this._packer=new o(e),this._deflate=this._packer.createDeflate(),this.readable=!0};r.inherits(s,i),s.prototype.pack=function(t,e,r,i){this.emit("data",new n(a.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(e,r)),i&&this.emit("data",this._packer.packGAMA(i));var o=this._packer.filterData(t,e,r);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(t){this.emit("data",this._packer.packIDAT(t))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(o)}}).call(this,t("buffer").Buffer)},{"./constants":75,"./packer":85,buffer:4,stream:108,util:132}],84:[function(t,e,n){(function(n){"use strict";var r=!0,i=t("zlib");i.deflateSync||(r=!1);var a=t("./constants"),o=t("./packer");e.exports=function(t,e){if(!r)throw new Error("To use the sync capability of this library in old node versions, please also add a dependency on node-zlb-backport");var s=new o(e||{}),u=[];u.push(new n(a.PNG_SIGNATURE)),u.push(s.packIHDR(t.width,t.height)),t.gamma&&u.push(s.packGAMA(t.gamma));var l=s.filterData(t.data,t.width,t.height),c=i.deflateSync(l,s.getDeflateOptions());if(l=null,!c||!c.length)throw new Error("bad png - invalid compressed data response");return u.push(s.packIDAT(c)),u.push(s.packIEND()),n.concat(u)}}).call(this,t("buffer").Buffer)},{"./constants":75,"./packer":85,buffer:4,zlib:38}],85:[function(t,e,n){(function(n){"use strict";var r=t("./constants"),i=t("./crc"),a=t("./bitpacker"),o=t("./filter-pack"),s=t("zlib"),u=e.exports=function(t){if(this._options=t,t.deflateChunkSize=t.deflateChunkSize||32768,t.deflateLevel=null!=t.deflateLevel?t.deflateLevel:9,t.deflateStrategy=null!=t.deflateStrategy?t.deflateStrategy:3,t.inputHasAlpha=null==t.inputHasAlpha||t.inputHasAlpha,t.deflateFactory=t.deflateFactory||s.createDeflate,t.bitDepth=t.bitDepth||8,t.colorType="number"==typeof t.colorType?t.colorType:r.COLORTYPE_COLOR_ALPHA,t.colorType!==r.COLORTYPE_COLOR&&t.colorType!==r.COLORTYPE_COLOR_ALPHA)throw new Error("option color type:"+t.colorType+" is not supported at present");if(8!==t.bitDepth)throw new Error("option bit depth:"+t.bitDepth+" is not supported at present")};u.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},u.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},u.prototype.filterData=function(t,e,n){var i=a(t,e,n,this._options),s=r.COLORTYPE_TO_BPP_MAP[this._options.colorType];return o(i,e,n,this._options,s)},u.prototype._packChunk=function(t,e){var r=e?e.length:0,a=new n(r+12);return a.writeUInt32BE(r,0),a.writeUInt32BE(t,4),e&&e.copy(a,8),a.writeInt32BE(i.crc32(a.slice(4,a.length-4)),a.length-4),a},u.prototype.packGAMA=function(t){var e=new n(4);return e.writeUInt32BE(Math.floor(t*r.GAMMA_DIVISION),0),this._packChunk(r.TYPE_gAMA,e)},u.prototype.packIHDR=function(t,e){var i=new n(13);return i.writeUInt32BE(t,0),i.writeUInt32BE(e,4),i[8]=this._options.bitDepth,i[9]=this._options.colorType,i[10]=0,i[11]=0,i[12]=0,this._packChunk(r.TYPE_IHDR,i)},u.prototype.packIDAT=function(t){return this._packChunk(r.TYPE_IDAT,t)},u.prototype.packIEND=function(){return this._packChunk(r.TYPE_IEND,null)}}).call(this,t("buffer").Buffer)},{"./bitpacker":73,"./constants":75,"./crc":76,"./filter-pack":77,buffer:4,zlib:38}],86:[function(t,e,n){"use strict";e.exports=function(t,e,n){var r=t+e-n,i=Math.abs(r-t),a=Math.abs(r-e),o=Math.abs(r-n);return i<=a&&i<=o?t:a<=o?e:n}},{}],87:[function(t,e,n){"use strict";var r=t("util"),i=t("zlib"),a=t("./chunkstream"),o=t("./filter-parse-async"),s=t("./parser"),u=t("./bitmapper"),l=t("./format-normaliser"),c=e.exports=function(t){a.call(this),this._parser=new s(t,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this)}),this._options=t,this.writable=!0,this._parser.start()};r.inherits(c,a),c.prototype._handleError=function(t){this.emit("error",t),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this.errord=!0},c.prototype._inflateData=function(t){this._inflate||(this._inflate=i.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter)),this._inflate.write(t)},c.prototype._handleMetaData=function(t){this.emit("metadata",t),this._bitmapInfo=Object.create(t),this._filter=new o(this._bitmapInfo)},c.prototype._handleTransColor=function(t){this._bitmapInfo.transColor=t},c.prototype._handlePalette=function(t){this._bitmapInfo.palette=t},c.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"),this.destroySoon())},c.prototype._complete=function(t){if(!this.errord){try{var e=u.dataToBitMap(t,this._bitmapInfo),n=l(e,this._bitmapInfo);e=null}catch(t){return void this._handleError(t)}this.emit("parsed",n)}}},{"./bitmapper":72,"./chunkstream":74,"./filter-parse-async":78,"./format-normaliser":81,"./parser":89,util:132,zlib:38}],88:[function(t,e,n){(function(n){"use strict";var r=!0,i=t("zlib");i.deflateSync||(r=!1);var a=t("./sync-reader"),o=t("./filter-parse-sync"),s=t("./parser"),u=t("./bitmapper"),l=t("./format-normaliser");e.exports=function(t,e){if(!r)throw new Error("To use the sync capability of this library in old node versions, please also add a dependency on node-zlb-backport");var c,f,h;var p=[];var d=new a(t);if(new s(e,{read:d.read.bind(d),error:function(t){c=t},metadata:function(t){f=t},gamma:function(t){h=t},palette:function(t){f.palette=t},transColor:function(t){f.transColor=t},inflateData:function(t){p.push(t)}}).start(),d.process(),c)throw c;var g=n.concat(p);p.length=0;var v=i.inflateSync(g);if(g=null,!v||!v.length)throw new Error("bad png - invalid inflate data response");var m=o.process(v,f);g=null;var _=u.dataToBitMap(m,f);m=null;var w=l(_,f);return f.data=w,f.gamma=h||0,f}}).call(this,t("buffer").Buffer)},{"./bitmapper":72,"./filter-parse-sync":79,"./format-normaliser":81,"./parser":89,"./sync-reader":92,buffer:4,zlib:38}],89:[function(t,e,n){(function(n){"use strict";var r=t("./constants"),i=t("./crc"),a=e.exports=function(t,e){this._options=t,t.checkCRC=!1!==t.checkCRC,this._hasIHDR=!1,this._hasIEND=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[r.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[r.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[r.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[r.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[r.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[r.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=e.read,this.error=e.error,this.metadata=e.metadata,this.gamma=e.gamma,this.transColor=e.transColor,this.palette=e.palette,this.parsed=e.parsed,this.inflateData=e.inflateData,this.inflateData=e.inflateData,this.finished=e.finished};a.prototype.start=function(){this.read(r.PNG_SIGNATURE.length,this._parseSignature.bind(this))},a.prototype._parseSignature=function(t){for(var e=r.PNG_SIGNATURE,n=0;n<e.length;n++)if(t[n]!==e[n])return void this.error(new Error("Invalid file signature"));this.read(8,this._parseChunkBegin.bind(this))},a.prototype._parseChunkBegin=function(t){for(var e=t.readUInt32BE(0),a=t.readUInt32BE(4),o="",s=4;s<8;s++)o+=String.fromCharCode(t[s]);var u=Boolean(32&t[4]);if(this._hasIHDR||a===r.TYPE_IHDR){if(this._crc=new i,this._crc.write(new n(o)),this._chunks[a])return this._chunks[a](e);u?this.read(e+4,this._skipChunk.bind(this)):this.error(new Error("Unsupported critical chunk type "+o))}else this.error(new Error("Expected IHDR on beggining"))},a.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))},a.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))},a.prototype._parseChunkEnd=function(t){var e=t.readInt32BE(0),n=this._crc.crc32();this._options.checkCRC&&n!==e?this.error(new Error("Crc error - "+e+" - "+n)):this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))},a.prototype._handleIHDR=function(t){this.read(t,this._parseIHDR.bind(this))},a.prototype._parseIHDR=function(t){this._crc.write(t);var e=t.readUInt32BE(0),n=t.readUInt32BE(4),i=t[8],a=t[9],o=t[10],s=t[11],u=t[12];if(8===i||4===i||2===i||1===i||16===i)if(a in r.COLORTYPE_TO_BPP_MAP)if(0===o)if(0===s)if(0===u||1===u){this._colorType=a;var l=r.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:e,height:n,depth:i,interlace:Boolean(u),palette:Boolean(a&r.COLORTYPE_PALETTE),color:Boolean(a&r.COLORTYPE_COLOR),alpha:Boolean(a&r.COLORTYPE_ALPHA),bpp:l,colorType:a}),this._handleChunkEnd()}else this.error(new Error("Unsupported interlace method"));else this.error(new Error("Unsupported filter method"));else this.error(new Error("Unsupported compression method"));else this.error(new Error("Unsupported color type"));else this.error(new Error("Unsupported bit depth "+i))},a.prototype._handlePLTE=function(t){this.read(t,this._parsePLTE.bind(this))},a.prototype._parsePLTE=function(t){this._crc.write(t);for(var e=Math.floor(t.length/3),n=0;n<e;n++)this._palette.push([t[3*n],t[3*n+1],t[3*n+2],255]);this.palette(this._palette),this._handleChunkEnd()},a.prototype._handleTRNS=function(t){this.read(t,this._parseTRNS.bind(this))},a.prototype._parseTRNS=function(t){if(this._crc.write(t),this._colorType===r.COLORTYPE_PALETTE_COLOR){if(0===this._palette.length)return void this.error(new Error("Transparency chunk must be after palette"));if(t.length>this._palette.length)return void this.error(new Error("More transparent colors than palette size"));for(var e=0;e<t.length;e++)this._palette[e][3]=t[e];this.palette(this._palette)}this._colorType===r.COLORTYPE_GRAYSCALE&&this.transColor([t.readUInt16BE(0)]),this._colorType===r.COLORTYPE_COLOR&&this.transColor([t.readUInt16BE(0),t.readUInt16BE(2),t.readUInt16BE(4)]),this._handleChunkEnd()},a.prototype._handleGAMA=function(t){this.read(t,this._parseGAMA.bind(this))},a.prototype._parseGAMA=function(t){this._crc.write(t),this.gamma(t.readUInt32BE(0)/r.GAMMA_DIVISION),this._handleChunkEnd()},a.prototype._handleIDAT=function(t){this.read(-t,this._parseIDAT.bind(this,t))},a.prototype._parseIDAT=function(t,e){if(this._crc.write(e),this._colorType===r.COLORTYPE_PALETTE_COLOR&&0===this._palette.length)throw new Error("Expected palette not found");this.inflateData(e);var n=t-e.length;n>0?this._handleIDAT(n):this._handleChunkEnd()},a.prototype._handleIEND=function(t){this.read(t,this._parseIEND.bind(this))},a.prototype._parseIEND=function(t){this._crc.write(t),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}}).call(this,t("buffer").Buffer)},{"./constants":75,"./crc":76,buffer:4}],90:[function(t,e,n){"use strict";var r=t("./parser-sync"),i=t("./packer-sync");n.read=function(t,e){return r(t,e||{})},n.write=function(t){return i(t)}},{"./packer-sync":84,"./parser-sync":88}],91:[function(t,e,n){(function(e,r){"use strict";var i=t("util"),a=t("stream"),o=t("./parser-async"),s=t("./packer-async"),u=t("./png-sync"),l=n.PNG=function(t){a.call(this),t=t||{},this.width=t.width||0,this.height=t.height||0,this.data=this.width>0&&this.height>0?new r(4*this.width*this.height):null,t.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new o(t),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(t){this.data=t,this.emit("parsed",t)}.bind(this)),this._packer=new s(t),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};i.inherits(l,a),l.sync=u,l.prototype.pack=function(){return this.data&&this.data.length?(e.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this):(this.emit("error","No data provided"),this)},l.prototype.parse=function(t,e){var n,r;e&&(n=function(t){this.removeListener("error",r),this.data=t,e(null,this)}.bind(this),r=function(t){this.removeListener("parsed",n),e(t,null)}.bind(this),this.once("parsed",n),this.once("error",r));return this.end(t),this},l.prototype.write=function(t){return this._parser.write(t),!0},l.prototype.end=function(t){this._parser.end(t)},l.prototype._metadata=function(t){this.width=t.width,this.height=t.height,this.emit("metadata",t)},l.prototype._gamma=function(t){this.gamma=t},l.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit("close")},l.bitblt=function(t,e,n,r,i,a,o,s){if(n>t.width||r>t.height||n+i>t.width||r+a>t.height)throw new Error("bitblt reading outside image");if(o>e.width||s>e.height||o+i>e.width||s+a>e.height)throw new Error("bitblt writing outside image");for(var u=0;u<a;u++)t.data.copy(e.data,(s+u)*e.width+o<<2,(r+u)*t.width+n<<2,(r+u)*t.width+n+i<<2)},l.prototype.bitblt=function(t,e,n,r,i,a,o){return l.bitblt(this,t,e,n,r,i,a,o),this},l.adjustGamma=function(t){if(t.gamma){for(var e=0;e<t.height;e++)for(var n=0;n<t.width;n++)for(var r=t.width*e+n<<2,i=0;i<3;i++){var a=t.data[r+i]/255;a=Math.pow(a,1/2.2/t.gamma),t.data[r+i]=Math.round(255*a)}t.gamma=0}},l.prototype.adjustGamma=function(){l.adjustGamma(this)}}).call(this,t("_process"),t("buffer").Buffer)},{"./packer-async":83,"./parser-async":87,"./png-sync":90,_process:94,buffer:4,stream:108,util:132}],92:[function(t,e,n){"use strict";var r=e.exports=function(t){this._buffer=t,this._reads=[]};r.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e})},r.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){var t=this._reads[0];if(!this._buffer.length||!(this._buffer.length>=t.length||t.allowLess))break;this._reads.shift();var e=this._buffer;this._buffer=e.slice(t.length),t.func.call(this,e.slice(0,t.length))}return this._reads.length>0?new Error("There are some read requests waitng on finished stream"):this._buffer.length>0?new Error("unrecognised content at end of stream"):void 0}},{}],93:[function(t,e,n){(function(t){"use strict";!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,r)});case 4:return t.nextTick(function(){e.call(null,n,r,i)});default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return t.nextTick(function(){e.apply(null,a)})}}}:e.exports=t}).call(this,t("_process"))},{_process:94}],94:[function(t,e,n){var r,i,a=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var l,c=[],f=!1,h=-1;function p(){f&&l&&(f=!1,l.length?c=l.concat(c):h=-1,c.length&&d())}function d(){if(!f){var t=u(p);f=!0;for(var e=c.length;e;){for(l=c,c=[];++h<e;)l&&l[h].run();h=-1,e=c.length}l=null,f=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function v(){}a.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new g(t,e)),1!==c.length||f||u(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=v,a.addListener=v,a.once=v,a.off=v,a.removeListener=v,a.removeAllListeners=v,a.emit=v,a.prependListener=v,a.prependOnceListener=v,a.listeners=function(t){return[]},a.binding=function(t){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(t){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],95:[function(t,e,n){arguments[4][29][0].apply(n,arguments)},{"./_stream_readable":97,"./_stream_writable":99,_process:94,"core-util-is":8,dup:29,inherits:53}],96:[function(t,e,n){arguments[4][30][0].apply(n,arguments)},{"./_stream_transform":98,"core-util-is":8,dup:30,inherits:53}],97:[function(t,e,n){(function(n){e.exports=c;var r=t("isarray"),i=t("buffer").Buffer;c.ReadableState=l;var a=t("events").EventEmitter;a.listenerCount||(a.listenerCount=function(t,e){return t.listeners(e).length});var o,s=t("stream"),u=t("core-util-is");function l(e,n){var r=(e=e||{}).highWaterMark;this.highWaterMark=r||0===r?r:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!e.objectMode,this.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(o||(o=t("string_decoder/").StringDecoder),this.decoder=new o(e.encoding),this.encoding=e.encoding)}function c(t){if(!(this instanceof c))return new c(t);this._readableState=new l(t,this),this.readable=!0,s.call(this)}function f(t,e,r,a,o){var s=function(t,e){var n=null;i.isBuffer(e)||"string"==typeof e||null===e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));return n}(e,r);if(s)t.emit("error",s);else if(null===r||void 0===r)e.reading=!1,e.ended||function(t,e){if(e.decoder&&!e.ended){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,e.length>0?d(t):b(t)}(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!o){var u=new Error("stream.push() after EOF");t.emit("error",u)}else if(e.endEmitted&&o){u=new Error("stream.unshift() after end event");t.emit("error",u)}else!e.decoder||o||a||(r=e.decoder.write(r)),e.length+=e.objectMode?1:r.length,o?e.buffer.unshift(r):(e.reading=!1,e.buffer.push(r)),e.needReadable&&d(t),function(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(function(){!function(t,e){var n=e.length;for(;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}(t,e)}))}(t,e);else o||(e.reading=!1);return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(e)}u.inherits=t("inherits"),u.inherits(c,s),c.prototype.push=function(t,e){var n=this._readableState;return"string"!=typeof t||n.objectMode||(e=e||n.defaultEncoding)!==n.encoding&&(t=new i(t,e),e=""),f(this,n,t,e,!1)},c.prototype.unshift=function(t){return f(this,this._readableState,t,"",!0)},c.prototype.setEncoding=function(e){o||(o=t("string_decoder/").StringDecoder),this._readableState.decoder=new o(e),this._readableState.encoding=e};var h=8388608;function p(t,e){return 0===e.length&&e.ended?0:e.objectMode?0===t?0:1:null===t||isNaN(t)?e.flowing&&e.buffer.length?e.buffer[0].length:e.length:t<=0?0:(t>e.highWaterMark&&(e.highWaterMark=function(t){if(t>=h)t=h;else{t--;for(var e=1;e<32;e<<=1)t|=t>>e;t++}return t}(t)),t>e.length?e.ended?e.length:(e.needReadable=!0,0):t)}function d(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,e.sync?n.nextTick(function(){g(t)}):g(t))}function g(t){t.emit("readable")}function v(t){var e,n=t._readableState;function r(t,r,i){!1===t.write(e)&&n.awaitDrain++}for(n.awaitDrain=0;n.pipesCount&&null!==(e=t.read());)if(1===n.pipesCount?r(n.pipes):y(n.pipes,r),t.emit("data",e),n.awaitDrain>0)return;if(0===n.pipesCount)return n.flowing=!1,void(a.listenerCount(t,"data")>0&&_(t));n.ranOut=!0}function m(){this._readableState.ranOut&&(this._readableState.ranOut=!1,v(this))}function _(t,e){if(t._readableState.flowing)throw new Error("Cannot switch to old mode now.");var r=e||!1,i=!1;t.readable=!0,t.pipe=s.prototype.pipe,t.on=t.addListener=s.prototype.on,t.on("readable",function(){var e;for(i=!0;!r&&null!==(e=t.read());)t.emit("data",e);null===e&&(i=!1,t._readableState.needReadable=!0)}),t.pause=function(){r=!0,this.emit("pause")},t.resume=function(){r=!1,i?n.nextTick(function(){t.emit("readable")}):this.read(0),this.emit("resume")},t.emit("readable")}function w(t,e){var n,r=e.buffer,a=e.length,o=!!e.decoder,s=!!e.objectMode;if(0===r.length)return null;if(0===a)n=null;else if(s)n=r.shift();else if(!t||t>=a)n=o?r.join(""):i.concat(r,a),r.length=0;else{if(t<r[0].length)n=(f=r[0]).slice(0,t),r[0]=f.slice(t);else if(t===r[0].length)n=r.shift();else{n=o?"":new i(t);for(var u=0,l=0,c=r.length;l<c&&u<t;l++){var f=r[0],h=Math.min(t-u,f.length);o?n+=f.slice(0,h):f.copy(n,u,0,h),h<f.length?r[0]=f.slice(h):r.shift(),u+=h}}}return n}function b(t){var e=t._readableState;if(e.length>0)throw new Error("endReadable called on non-empty stream");!e.endEmitted&&e.calledRead&&(e.ended=!0,n.nextTick(function(){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}))}function y(t,e){for(var n=0,r=t.length;n<r;n++)e(t[n],n)}c.prototype.read=function(t){var e=this._readableState;e.calledRead=!0;var n,r=t;if(("number"!=typeof t||t>0)&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return d(this),null;if(0===(t=p(t,e))&&e.ended)return n=null,e.length>0&&e.decoder&&(n=w(t,e),e.length-=n.length),0===e.length&&b(this),n;var i=e.needReadable;return e.length-t<=e.highWaterMark&&(i=!0),(e.ended||e.reading)&&(i=!1),i&&(e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1),i&&!e.reading&&(t=p(r,e)),null===(n=t>0?w(t,e):null)&&(e.needReadable=!0,t=0),e.length-=t,0!==e.length||e.ended||(e.needReadable=!0),e.ended&&!e.endEmitted&&0===e.length&&b(this),n},c.prototype._read=function(t){this.emit("error",new Error("not implemented"))},c.prototype.pipe=function(t,e){var i=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1;var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?l:f;function u(t){t===i&&f()}function l(){t.end()}o.endEmitted?n.nextTick(s):i.once("end",s),t.on("unpipe",u);var c=function(t){return function(){var e=t._readableState;e.awaitDrain--,0===e.awaitDrain&&v(t)}}(i);function f(){t.removeListener("close",p),t.removeListener("finish",d),t.removeListener("drain",c),t.removeListener("error",h),t.removeListener("unpipe",u),i.removeListener("end",l),i.removeListener("end",f),t._writableState&&!t._writableState.needDrain||c()}function h(e){g(),t.removeListener("error",h),0===a.listenerCount(t,"error")&&t.emit("error",e)}function p(){t.removeListener("finish",d),g()}function d(){t.removeListener("close",p),g()}function g(){i.unpipe(t)}return t.on("drain",c),t._events&&t._events.error?r(t._events.error)?t._events.error.unshift(h):t._events.error=[h,t._events.error]:t.on("error",h),t.once("close",p),t.once("finish",d),t.emit("pipe",i),o.flowing||(this.on("readable",m),o.flowing=!0,n.nextTick(function(){v(i)})),t},c.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,this.removeListener("readable",m),e.flowing=!1,t&&t.emit("unpipe",this),this);if(!t){var n=e.pipes,r=e.pipesCount;e.pipes=null,e.pipesCount=0,this.removeListener("readable",m),e.flowing=!1;for(var i=0;i<r;i++)n[i].emit("unpipe",this);return this}return-1===(i=function(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}(e.pipes,t))?this:(e.pipes.splice(i,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this),this)},c.prototype.on=function(t,e){var n=s.prototype.on.call(this,t,e);if("data"!==t||this._readableState.flowing||_(this),"readable"===t&&this.readable){var r=this._readableState;r.readableListening||(r.readableListening=!0,r.emittedReadable=!1,r.needReadable=!0,r.reading?r.length&&d(this):this.read(0))}return n},c.prototype.addListener=c.prototype.on,c.prototype.resume=function(){_(this),this.read(0),this.emit("resume")},c.prototype.pause=function(){_(this,!0),this.emit("pause")},c.prototype.wrap=function(t){var e=this._readableState,n=!1,r=this;for(var i in t.on("end",function(){if(e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&r.push(t)}r.push(null)}),t.on("data",function(i){(e.decoder&&(i=e.decoder.write(i)),!e.objectMode||null!==i&&void 0!==i)&&((e.objectMode||i&&i.length)&&(r.push(i)||(n=!0,t.pause())))}),t)"function"==typeof t[i]&&void 0===this[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));return y(["error","close","destroy","pause","resume"],function(e){t.on(e,r.emit.bind(r,e))}),r._read=function(e){n&&(n=!1,t.resume())},r},c._fromList=w}).call(this,t("_process"))},{_process:94,buffer:4,"core-util-is":8,events:40,inherits:53,isarray:100,stream:108,"string_decoder/":101}],98:[function(t,e,n){e.exports=o;var r=t("./_stream_duplex"),i=t("core-util-is");function a(t,e){this.afterTransform=function(t,n){return function(t,e,n){var r=t._transformState;r.transforming=!1;var i=r.writecb;if(!i)return t.emit("error",new Error("no writecb in Transform class"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&t.push(n);i&&i(e);var a=t._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&t._read(a.highWaterMark)}(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function o(t){if(!(this instanceof o))return new o(t);r.call(this,t);this._transformState=new a(t,this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("finish",function(){"function"==typeof this._flush?this._flush(function(t){s(e,t)}):s(e)})}function s(t,e){if(e)return t.emit("error",e);var n=t._writableState,r=(t._readableState,t._transformState);if(n.length)throw new Error("calling transform done when ws.length != 0");if(r.transforming)throw new Error("calling transform done when still transforming");return t.push(null)}i.inherits=t("inherits"),i.inherits(o,r),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,r.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,n){throw new Error("not implemented")},o.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0}},{"./_stream_duplex":95,"core-util-is":8,inherits:53}],99:[function(t,e,n){(function(n){e.exports=s;var r=t("buffer").Buffer;s.WritableState=o;var i=t("core-util-is");i.inherits=t("inherits");var a=t("stream");function o(t,e){var r=(t=t||{}).highWaterMark;this.highWaterMark=r||0===r?r:16384,this.objectMode=!!t.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=!1===t.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,a=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,a){r?n.nextTick(function(){a(i)}):a(i);t._writableState.errorEmitted=!0,t.emit("error",i)}(t,0,i,e,a);else{var o=c(t,r);o||r.bufferProcessing||!r.buffer.length||function(t,e){e.bufferProcessing=!0;for(var n=0;n<e.buffer.length;n++){var r=e.buffer[n],i=r.chunk,a=r.encoding,o=r.callback,s=e.objectMode?1:i.length;if(u(t,e,s,i,a,o),e.writing){n++;break}}e.bufferProcessing=!1,n<e.buffer.length?e.buffer=e.buffer.slice(n):e.buffer.length=0}(t,r),i?n.nextTick(function(){l(t,r,o,a)}):l(t,r,o,a)}}(e,t)},this.writecb=null,this.writelen=0,this.buffer=[],this.errorEmitted=!1}function s(e){var n=t("./_stream_duplex");if(!(this instanceof s||this instanceof n))return new s(e);this._writableState=new o(e,this),this.writable=!0,a.call(this)}function u(t,e,n,r,i,a){e.writelen=n,e.writecb=a,e.writing=!0,e.sync=!0,t._write(r,i,e.onwrite),e.sync=!1}function l(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),r(),n&&f(t,e)}function c(t,e){return e.ending&&0===e.length&&!e.finished&&!e.writing}function f(t,e){var n=c(0,e);return n&&(e.finished=!0,t.emit("finish")),n}i.inherits(s,a),s.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe. Not readable."))},s.prototype.write=function(t,e,i){var a=this._writableState,o=!1;return"function"==typeof e&&(i=e,e=null),r.isBuffer(t)?e="buffer":e||(e=a.defaultEncoding),"function"!=typeof i&&(i=function(){}),a.ended?function(t,e,r){var i=new Error("write after end");t.emit("error",i),n.nextTick(function(){r(i)})}(this,0,i):function(t,e,i,a){var o=!0;if(!r.isBuffer(i)&&"string"!=typeof i&&null!==i&&void 0!==i&&!e.objectMode){var s=new TypeError("Invalid non-string/buffer chunk");t.emit("error",s),n.nextTick(function(){a(s)}),o=!1}return o}(this,a,t,i)&&(o=function(t,e,n,i,a){n=function(t,e,n){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=new r(e,n)),e}(e,n,i),r.isBuffer(n)&&(i="buffer");var o=e.objectMode?1:n.length;e.length+=o;var s=e.length<e.highWaterMark;s||(e.needDrain=!0);e.writing?e.buffer.push(new function(t,e,n){this.chunk=t,this.encoding=e,this.callback=n}(n,i,a)):u(t,e,o,n,i,a);return s}(this,a,t,e,i)),o},s.prototype._write=function(t,e,n){n(new Error("not implemented"))},s.prototype.end=function(t,e,r){var i=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),void 0!==t&&null!==t&&this.write(t,e),i.ending||i.finished||function(t,e,r){e.ending=!0,f(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0}(this,i,r)}}).call(this,t("_process"))},{"./_stream_duplex":95,_process:94,buffer:4,"core-util-is":8,inherits:53,stream:108}],100:[function(t,e,n){arguments[4][28][0].apply(n,arguments)},{dup:28}],101:[function(t,e,n){arguments[4][35][0].apply(n,arguments)},{buffer:4,dup:35}],102:[function(t,e,n){(function(r){var i=t("stream");(n=e.exports=t("./lib/_stream_readable.js")).Stream=i,n.Readable=n,n.Writable=t("./lib/_stream_writable.js"),n.Duplex=t("./lib/_stream_duplex.js"),n.Transform=t("./lib/_stream_transform.js"),n.PassThrough=t("./lib/_stream_passthrough.js"),r.browser||"disable"!==r.env.READABLE_STREAM||(e.exports=t("stream"))}).call(this,t("_process"))},{"./lib/_stream_duplex.js":95,"./lib/_stream_passthrough.js":96,"./lib/_stream_readable.js":97,"./lib/_stream_transform.js":98,"./lib/_stream_writable.js":99,_process:94,stream:108}],103:[function(t,e,n){var r=t("buffer"),i=r.Buffer;function a(t,e){for(var n in t)e[n]=t[n]}function o(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=r:(a(r,n),n.Buffer=o),a(i,o),o.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},o.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},{buffer:4}],104:[function(t,e,n){var r=t("./lib/encoder"),i=t("./lib/decoder");e.exports={encode:r,decode:i}},{"./lib/decoder":105,"./lib/encoder":106}],105:[function(t,e,n){(function(t){var n=function(){"use strict";var t=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),e=4017,n=799,r=3406,i=2276,a=1567,o=3784,s=5793,u=2896;function l(){}function c(t,e){for(var n,r,i=0,a=[],o=16;o>0&&!t[o-1];)o--;a.push({children:[],index:0});var s,u=a[0];for(n=0;n<o;n++){for(r=0;r<t[n];r++){for((u=a.pop()).children[u.index]=e[i];u.index>0;)u=a.pop();for(u.index++,a.push(u);a.length<=n;)a.push(s={children:[],index:0}),u.children[u.index]=s.children,u=s;i++}n+1<o&&(a.push(s={children:[],index:0}),u.children[u.index]=s.children,u=s)}return a[0].children}function f(e,n,r,i,a,o,s,u,l){r.precision,r.samplesPerLine,r.scanLines;var c=r.mcusPerLine,f=r.progressive,h=(r.maxH,r.maxV,n),p=0,d=0;function g(){if(d>0)return p>>--d&1;if(255==(p=e[n++])){var t=e[n++];if(t)throw"unexpected marker: "+(p<<8|t).toString(16)}return d=7,p>>>7}function v(t){for(var e,n=t;null!==(e=g());){if("number"==typeof(n=n[e]))return n;if("object"!=typeof n)throw"invalid huffman sequence"}return null}function m(t){for(var e=0;t>0;){var n=g();if(null===n)return;e=e<<1|n,t--}return e}function _(t){var e=m(t);return e>=1<<t-1?e:e+(-1<<t)+1}var w=0;var b,y=0;function x(t,e,n,r,i){var a=n%c,o=(n/c|0)*t.v+r,s=a*t.h+i;e(t,t.blocks[o][s])}function k(t,e,n){var r=n/t.blocksPerLine|0,i=n%t.blocksPerLine;e(t,t.blocks[r][i])}var E,S,A,M,T,I,j=i.length;I=f?0===o?0===u?function(t,e){var n=v(t.huffmanTableDC),r=0===n?0:_(n)<<l;e[0]=t.pred+=r}:function(t,e){e[0]|=g()<<l}:0===u?function(e,n){if(w>0)w--;else for(var r=o,i=s;r<=i;){var a=v(e.huffmanTableAC),u=15&a,c=a>>4;if(0!==u)n[t[r+=c]]=_(u)*(1<<l),r++;else{if(c<15){w=m(c)+(1<<c)-1;break}r+=16}}}:function(e,n){for(var r=o,i=s,a=0;r<=i;){var u=t[r];switch(y){case 0:var c=v(e.huffmanTableAC),f=15&c;if(a=c>>4,0===f)a<15?(w=m(a)+(1<<a),y=4):(a=16,y=1);else{if(1!==f)throw"invalid ACn encoding";b=_(f),y=a?2:3}continue;case 1:case 2:n[u]?n[u]+=g()<<l:0==--a&&(y=2==y?3:0);break;case 3:n[u]?n[u]+=g()<<l:(n[u]=b<<l,y=0);break;case 4:n[u]&&(n[u]+=g()<<l)}r++}4===y&&0==--w&&(y=0)}:function(e,n){var r=v(e.huffmanTableDC),i=0===r?0:_(r);n[0]=e.pred+=i;for(var a=1;a<64;){var o=v(e.huffmanTableAC),s=15&o,u=o>>4;if(0!==s)n[t[a+=u]]=_(s),a++;else{if(u<15)break;a+=16}}};var R,L,C,B,D=0;for(L=1==j?i[0].blocksPerLine*i[0].blocksPerColumn:c*r.mcusPerColumn,a||(a=L);D<L;){for(S=0;S<j;S++)i[S].pred=0;if(w=0,1==j)for(E=i[0],T=0;T<a;T++)k(E,I,D),D++;else for(T=0;T<a;T++){for(S=0;S<j;S++)for(C=(E=i[S]).h,B=E.v,A=0;A<B;A++)for(M=0;M<C;M++)x(E,I,D,A,M);if(++D===L)break}if(d=0,(R=e[n]<<8|e[n+1])<65280)throw"marker was not found";if(!(R>=65488&&R<=65495))break;n+=2}return n-h}function h(t,l){var c,f,h=[],p=l.blocksPerLine,d=l.blocksPerColumn,g=p<<3,v=new Int32Array(64),m=new Uint8Array(64);function _(t,c,f){var h,p,d,g,v,m,_,w,b,y,x=l.quantizationTable,k=f;for(y=0;y<64;y++)k[y]=t[y]*x[y];for(y=0;y<8;++y){var E=8*y;0!=k[1+E]||0!=k[2+E]||0!=k[3+E]||0!=k[4+E]||0!=k[5+E]||0!=k[6+E]||0!=k[7+E]?(h=s*k[0+E]+128>>8,p=s*k[4+E]+128>>8,d=k[2+E],g=k[6+E],v=u*(k[1+E]-k[7+E])+128>>8,w=u*(k[1+E]+k[7+E])+128>>8,m=k[3+E]<<4,_=k[5+E]<<4,b=h-p+1>>1,h=h+p+1>>1,p=b,b=d*o+g*a+128>>8,d=d*a-g*o+128>>8,g=b,b=v-_+1>>1,v=v+_+1>>1,_=b,b=w+m+1>>1,m=w-m+1>>1,w=b,b=h-g+1>>1,h=h+g+1>>1,g=b,b=p-d+1>>1,p=p+d+1>>1,d=b,b=v*i+w*r+2048>>12,v=v*r-w*i+2048>>12,w=b,b=m*n+_*e+2048>>12,m=m*e-_*n+2048>>12,_=b,k[0+E]=h+w,k[7+E]=h-w,k[1+E]=p+_,k[6+E]=p-_,k[2+E]=d+m,k[5+E]=d-m,k[3+E]=g+v,k[4+E]=g-v):(b=s*k[0+E]+512>>10,k[0+E]=b,k[1+E]=b,k[2+E]=b,k[3+E]=b,k[4+E]=b,k[5+E]=b,k[6+E]=b,k[7+E]=b)}for(y=0;y<8;++y){var S=y;0!=k[8+S]||0!=k[16+S]||0!=k[24+S]||0!=k[32+S]||0!=k[40+S]||0!=k[48+S]||0!=k[56+S]?(h=s*k[0+S]+2048>>12,p=s*k[32+S]+2048>>12,d=k[16+S],g=k[48+S],v=u*(k[8+S]-k[56+S])+2048>>12,w=u*(k[8+S]+k[56+S])+2048>>12,m=k[24+S],_=k[40+S],b=h-p+1>>1,h=h+p+1>>1,p=b,b=d*o+g*a+2048>>12,d=d*a-g*o+2048>>12,g=b,b=v-_+1>>1,v=v+_+1>>1,_=b,b=w+m+1>>1,m=w-m+1>>1,w=b,b=h-g+1>>1,h=h+g+1>>1,g=b,b=p-d+1>>1,p=p+d+1>>1,d=b,b=v*i+w*r+2048>>12,v=v*r-w*i+2048>>12,w=b,b=m*n+_*e+2048>>12,m=m*e-_*n+2048>>12,_=b,k[0+S]=h+w,k[56+S]=h-w,k[8+S]=p+_,k[48+S]=p-_,k[16+S]=d+m,k[40+S]=d-m,k[24+S]=g+v,k[32+S]=g-v):(b=s*f[y+0]+8192>>14,k[0+S]=b,k[8+S]=b,k[16+S]=b,k[24+S]=b,k[32+S]=b,k[40+S]=b,k[48+S]=b,k[56+S]=b)}for(y=0;y<64;++y){var A=128+(k[y]+8>>4);c[y]=A<0?0:A>255?255:A}}for(var w=0;w<d;w++){var b=w<<3;for(c=0;c<8;c++)h.push(new Uint8Array(g));for(var y=0;y<p;y++){_(l.blocks[w][y],m,v);var x=0,k=y<<3;for(f=0;f<8;f++){var E=h[b+f];for(c=0;c<8;c++)E[k+c]=m[x++]}}}return h}function p(t){return t<0?0:t>255?255:t}return l.prototype={load:function(t){var e=new XMLHttpRequest;e.open("GET",t,!0),e.responseType="arraybuffer",e.onload=function(){var t=new Uint8Array(e.response||e.mozResponseArrayBuffer);this.parse(t),this.onload&&this.onload()}.bind(this),e.send(null)},parse:function(e){var n=0;e.length;function r(){var t=e[n]<<8|e[n+1];return n+=2,t}function i(){var t=r(),i=e.subarray(n,n+t-2);return n+=i.length,i}function a(t){var e,n,r=0,i=0;for(n in t.components)t.components.hasOwnProperty(n)&&(r<(e=t.components[n]).h&&(r=e.h),i<e.v&&(i=e.v));var a=Math.ceil(t.samplesPerLine/8/r),o=Math.ceil(t.scanLines/8/i);for(n in t.components)if(t.components.hasOwnProperty(n)){e=t.components[n];for(var s=Math.ceil(Math.ceil(t.samplesPerLine/8)*e.h/r),u=Math.ceil(Math.ceil(t.scanLines/8)*e.v/i),l=a*e.h,c=o*e.v,f=[],h=0;h<c;h++){for(var p=[],d=0;d<l;d++)p.push(new Int32Array(64));f.push(p)}e.blocksPerLine=s,e.blocksPerColumn=u,e.blocks=f}t.maxH=r,t.maxV=i,t.mcusPerLine=a,t.mcusPerColumn=o}var o,s,u=null,l=null,p=[],d=[],g=[],v=[],m=r();if(65496!=m)throw"SOI not found";for(m=r();65497!=m;){var _;switch(m){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var w=i();65504===m&&74===w[0]&&70===w[1]&&73===w[2]&&70===w[3]&&0===w[4]&&(u={version:{major:w[5],minor:w[6]},densityUnits:w[7],xDensity:w[8]<<8|w[9],yDensity:w[10]<<8|w[11],thumbWidth:w[12],thumbHeight:w[13],thumbData:w.subarray(14,14+3*w[12]*w[13])}),65518===m&&65===w[0]&&100===w[1]&&111===w[2]&&98===w[3]&&101===w[4]&&0===w[5]&&(l={version:w[6],flags0:w[7]<<8|w[8],flags1:w[9]<<8|w[10],transformCode:w[11]});break;case 65499:for(var b=r()+n-2;n<b;){var y=e[n++],x=new Int32Array(64);if(y>>4==0)for(_=0;_<64;_++){x[t[_]]=e[n++]}else{if(y>>4!=1)throw"DQT: invalid table spec";for(_=0;_<64;_++){x[t[_]]=r()}}p[15&y]=x}break;case 65472:case 65473:case 65474:r(),(o={}).extended=65473===m,o.progressive=65474===m,o.precision=e[n++],o.scanLines=r(),o.samplesPerLine=r(),o.components={},o.componentsOrder=[];var k,E=e[n++];for(U=0;U<E;U++){k=e[n];var S=e[n+1]>>4,A=15&e[n+1],M=e[n+2];o.componentsOrder.push(k),o.components[k]={h:S,v:A,quantizationTable:p[M]},n+=3}a(o),d.push(o);break;case 65476:var T=r();for(U=2;U<T;){var I=e[n++],j=new Uint8Array(16),R=0;for(_=0;_<16;_++,n++)R+=j[_]=e[n];var L=new Uint8Array(R);for(_=0;_<R;_++,n++)L[_]=e[n];U+=17+R,(I>>4==0?v:g)[15&I]=c(j,L)}break;case 65501:r(),s=r();break;case 65498:r();var C=e[n++],B=[];for(U=0;U<C;U++){N=o.components[e[n++]];var D=e[n++];N.huffmanTableDC=v[D>>4],N.huffmanTableAC=g[15&D],B.push(N)}var z=e[n++],O=e[n++],F=e[n++],P=f(e,n,o,B,s,z,O,F>>4,15&F);n+=P;break;default:if(255==e[n-3]&&e[n-2]>=192&&e[n-2]<=254){n-=3;break}throw"unknown JPEG marker "+m.toString(16)}m=r()}if(1!=d.length)throw"only single frame JPEGs supported";this.width=o.samplesPerLine,this.height=o.scanLines,this.jfif=u,this.adobe=l,this.components=[];for(var U=0;U<o.componentsOrder.length;U++){var N=o.components[o.componentsOrder[U]];this.components.push({lines:h(0,N),scaleX:N.h/o.maxH,scaleY:N.v/o.maxV})}},getData:function(t,e){var n,r,i,a,o,s,u,l,c,f,h,d,g,v,m,_,w,b,y,x,k,E=this.width/t,S=this.height/e,A=0,M=t*e*this.components.length,T=new Uint8Array(M);switch(this.components.length){case 1:for(n=this.components[0],f=0;f<e;f++)for(o=n.lines[0|f*n.scaleY*S],c=0;c<t;c++)h=o[0|c*n.scaleX*E],T[A++]=h;break;case 2:for(n=this.components[0],r=this.components[1],f=0;f<e;f++)for(o=n.lines[0|f*n.scaleY*S],s=r.lines[0|f*r.scaleY*S],c=0;c<t;c++)h=o[0|c*n.scaleX*E],T[A++]=h,h=s[0|c*r.scaleX*E],T[A++]=h;break;case 3:for(k=!0,this.adobe&&this.adobe.transformCode?k=!0:void 0!==this.colorTransform&&(k=!!this.colorTransform),n=this.components[0],r=this.components[1],i=this.components[2],f=0;f<e;f++)for(o=n.lines[0|f*n.scaleY*S],s=r.lines[0|f*r.scaleY*S],u=i.lines[0|f*i.scaleY*S],c=0;c<t;c++)k?(h=o[0|c*n.scaleX*E],d=s[0|c*r.scaleX*E],b=p(h+1.402*((g=u[0|c*i.scaleX*E])-128)),y=p(h-.3441363*(d-128)-.71413636*(g-128)),x=p(h+1.772*(d-128))):(b=o[0|c*n.scaleX*E],y=s[0|c*r.scaleX*E],x=u[0|c*i.scaleX*E]),T[A++]=b,T[A++]=y,T[A++]=x;break;case 4:if(!this.adobe)throw"Unsupported color mode (4 components)";for(k=!1,this.adobe&&this.adobe.transformCode?k=!0:void 0!==this.colorTransform&&(k=!!this.colorTransform),n=this.components[0],r=this.components[1],i=this.components[2],a=this.components[3],f=0;f<e;f++)for(o=n.lines[0|f*n.scaleY*S],s=r.lines[0|f*r.scaleY*S],u=i.lines[0|f*i.scaleY*S],l=a.lines[0|f*a.scaleY*S],c=0;c<t;c++)k?(h=o[0|c*n.scaleX*E],d=s[0|c*r.scaleX*E],g=u[0|c*i.scaleX*E],v=l[0|c*a.scaleX*E],m=255-p(h+1.402*(g-128)),_=255-p(h-.3441363*(d-128)-.71413636*(g-128)),w=255-p(h+1.772*(d-128))):(m=o[0|c*n.scaleX*E],_=s[0|c*r.scaleX*E],w=u[0|c*i.scaleX*E],v=l[0|c*a.scaleX*E]),T[A++]=m,T[A++]=_,T[A++]=w,T[A++]=v;break;default:throw"Unsupported color mode"}return T},copyToImageData:function(t){var e,n,r,i,a,o,s,u,l,c=t.width,f=t.height,h=t.data,d=this.getData(c,f),g=0,v=0;switch(this.components.length){case 1:for(n=0;n<f;n++)for(e=0;e<c;e++)r=d[g++],h[v++]=r,h[v++]=r,h[v++]=r,h[v++]=255;break;case 3:for(n=0;n<f;n++)for(e=0;e<c;e++)s=d[g++],u=d[g++],l=d[g++],h[v++]=s,h[v++]=u,h[v++]=l,h[v++]=255;break;case 4:for(n=0;n<f;n++)for(e=0;e<c;e++)a=d[g++],o=d[g++],r=d[g++],s=255-p(a*(1-(i=d[g++])/255)+i),u=255-p(o*(1-i/255)+i),l=255-p(r*(1-i/255)+i),h[v++]=s,h[v++]=u,h[v++]=l,h[v++]=255;break;default:throw"Unsupported color mode"}}},l}();e.exports=function(e){var r=new Uint8Array(e),i=new n;i.parse(r);for(var a=i.getData(i.width,i.height),o=new t(i.width*i.height*4),s=0,u=0;u<o.length;u++)o[u+(u/3|0)]=a[s++],u%4==3&&(o[u]=255);return{data:o,width:i.width,height:i.height}}}).call(this,t("buffer").Buffer)},{buffer:4}],106:[function(t,e,n){(function(t){function n(e){Math.round;var n,r,i,a,o,s=Math.floor,u=new Array(64),l=new Array(64),c=new Array(64),f=new Array(64),h=new Array(65535),p=new Array(65535),d=new Array(64),g=new Array(64),v=[],m=0,_=7,w=new Array(64),b=new Array(64),y=new Array(64),x=new Array(256),k=new Array(2048),E=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],S=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],A=[0,1,2,3,4,5,6,7,8,9,10,11],M=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],T=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],I=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],j=[0,1,2,3,4,5,6,7,8,9,10,11],R=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],L=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function C(t,e){for(var n=0,r=0,i=new Array,a=1;a<=16;a++){for(var o=1;o<=t[a];o++)i[e[r]]=[],i[e[r]][0]=n,i[e[r]][1]=a,r++,n++;n*=2}return i}function B(t){for(var e=t[0],n=t[1]-1;n>=0;)e&1<<n&&(m|=1<<_),n--,--_<0&&(255==m?(D(255),D(0)):D(m),_=7,m=0)}function D(t){v.push(t)}function z(t){D(t>>8&255),D(255&t)}function O(t,e,n,r,i){var a,o=i[0],s=i[240];for(var u=function(t,e){var n,r,i,a,o,s,u,l,c,f,h=0;for(c=0;c<8;++c){n=t[h],r=t[h+1],i=t[h+2],a=t[h+3],o=t[h+4],s=t[h+5],u=t[h+6];var p=n+(l=t[h+7]),g=n-l,v=r+u,m=r-u,_=i+s,w=i-s,b=a+o,y=a-o,x=p+b,k=p-b,E=v+_,S=v-_;t[h]=x+E,t[h+4]=x-E;var A=.707106781*(S+k);t[h+2]=k+A,t[h+6]=k-A;var M=.382683433*((x=y+w)-(S=m+g)),T=.5411961*x+M,I=1.306562965*S+M,j=.707106781*(E=w+m),R=g+j,L=g-j;t[h+5]=L+T,t[h+3]=L-T,t[h+1]=R+I,t[h+7]=R-I,h+=8}for(h=0,c=0;c<8;++c){n=t[h],r=t[h+8],i=t[h+16],a=t[h+24],o=t[h+32],s=t[h+40],u=t[h+48];var C=n+(l=t[h+56]),B=n-l,D=r+u,z=r-u,O=i+s,F=i-s,P=a+o,U=a-o,N=C+P,q=C-P,V=D+O,Z=D-O;t[h]=N+V,t[h+32]=N-V;var W=.707106781*(Z+q);t[h+16]=q+W,t[h+48]=q-W;var G=.382683433*((N=U+F)-(Z=z+B)),H=.5411961*N+G,Y=1.306562965*Z+G,$=.707106781*(V=F+z),X=B+$,K=B-$;t[h+40]=K+H,t[h+24]=K-H,t[h+8]=X+Y,t[h+56]=X-Y,h++}for(c=0;c<64;++c)f=t[c]*e[c],d[c]=f>0?f+.5|0:f-.5|0;return d}(t,e),l=0;l<64;++l)g[E[l]]=u[l];var c=g[0]-n;n=g[0],0==c?B(r[0]):(B(r[p[a=32767+c]]),B(h[a]));for(var f=63;f>0&&0==g[f];f--);if(0==f)return B(o),n;for(var v,m=1;m<=f;){for(var _=m;0==g[m]&&m<=f;++m);var w=m-_;if(w>=16){v=w>>4;for(var b=1;b<=v;++b)B(s);w&=15}a=32767+g[m],B(i[(w<<4)+p[a]]),B(h[a]),m++}return 63!=f&&B(o),n}function F(t){if(t<=0&&(t=1),t>100&&(t=100),o!=t){(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=s((e[n]*t+50)/100);r<1?r=1:r>255&&(r=255),u[E[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],a=0;a<64;a++){var o=s((i[a]*t+50)/100);o<1?o=1:o>255&&(o=255),l[E[a]]=o}for(var h=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],p=0,d=0;d<8;d++)for(var g=0;g<8;g++)c[p]=1/(u[E[p]]*h[d]*h[g]*8),f[p]=1/(l[E[p]]*h[d]*h[g]*8),p++})(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),o=t}}this.encode=function(e,o){(new Date).getTime();o&&F(o),v=new Array,m=0,_=7,z(65496),z(65504),z(16),D(74),D(70),D(73),D(70),D(0),D(1),D(1),D(0),z(1),z(1),D(0),D(0),function(){z(65499),z(132),D(0);for(var t=0;t<64;t++)D(u[t]);D(1);for(var e=0;e<64;e++)D(l[e])}(),function(t,e){z(65472),z(17),D(8),z(e),z(t),D(3),D(1),D(17),D(0),D(2),D(17),D(1),D(3),D(17),D(1)}(e.width,e.height),function(){z(65476),z(418),D(0);for(var t=0;t<16;t++)D(S[t+1]);for(var e=0;e<=11;e++)D(A[e]);D(16);for(var n=0;n<16;n++)D(M[n+1]);for(var r=0;r<=161;r++)D(T[r]);D(1);for(var i=0;i<16;i++)D(I[i+1]);for(var a=0;a<=11;a++)D(j[a]);D(17);for(var o=0;o<16;o++)D(R[o+1]);for(var s=0;s<=161;s++)D(L[s])}(),z(65498),z(12),D(3),D(1),D(0),D(2),D(17),D(3),D(17),D(0),D(63),D(0);var s=0,h=0,p=0;m=0,_=7,this.encode.displayName="_encode_";for(var d,g,x,E,C,P,U,N,q,V=e.data,Z=e.width,W=e.height,G=4*Z,H=0;H<W;){for(d=0;d<G;){for(P=C=G*H+d,U=-1,N=0,q=0;q<64;q++)P=C+(N=q>>3)*G+(U=4*(7&q)),H+N>=W&&(P-=G*(H+1+N-W)),d+U>=G&&(P-=d+U-G+4),g=V[P++],x=V[P++],E=V[P++],w[q]=(k[g]+k[x+256>>0]+k[E+512>>0]>>16)-128,b[q]=(k[g+768>>0]+k[x+1024>>0]+k[E+1280>>0]>>16)-128,y[q]=(k[g+1280>>0]+k[x+1536>>0]+k[E+1792>>0]>>16)-128;s=O(w,c,s,n,i),h=O(b,f,h,r,a),p=O(y,f,p,r,a),d+=32}H+=8}if(_>=0){var Y=[];Y[1]=_+1,Y[0]=(1<<_+1)-1,B(Y)}return z(65497),new t(v)},function(){(new Date).getTime();e||(e=50),function(){for(var t=String.fromCharCode,e=0;e<256;e++)x[e]=t(e)}(),n=C(S,A),r=C(I,j),i=C(M,T),a=C(R,L),function(){for(var t=1,e=2,n=1;n<=15;n++){for(var r=t;r<e;r++)p[32767+r]=n,h[32767+r]=[],h[32767+r][1]=n,h[32767+r][0]=r;for(var i=-(e-1);i<=-t;i++)p[32767+i]=n,h[32767+i]=[],h[32767+i][1]=n,h[32767+i][0]=e-1+i;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)k[t]=19595*t,k[t+256>>0]=38470*t,k[t+512>>0]=7471*t+32768,k[t+768>>0]=-11059*t,k[t+1024>>0]=-21709*t,k[t+1280>>0]=32768*t+8421375,k[t+1536>>0]=-27439*t,k[t+1792>>0]=-5329*t}(),F(e),(new Date).getTime()}()}e.exports=function(t,e){void 0===e&&(e=50);return{data:new n(e).encode(t,e),width:t.width,height:t.height}}}).call(this,t("buffer").Buffer)},{buffer:4}],107:[function(t,e,n){(function(n){"use strict";var r=t("contentstream"),i=t("gif-encoder"),a=t("jpeg-js"),o=t("pngjs-nozlib").PNG,s=t("ndarray"),u=t("ndarray-ops"),l=t("through");function c(t,e,n){if(4===t.shape.length)return c(t.pick(n),e,0);if(3===t.shape.length)if(3===t.shape[2])u.assign(s(e,[t.shape[0],t.shape[1],3],[4,4*t.shape[0],1]),t),u.assigns(s(e,[t.shape[0]*t.shape[1]],[4],3),255);else if(4===t.shape[2])u.assign(s(e,[t.shape[0],t.shape[1],4],[4,4*t.shape[0],1]),t);else{if(1!==t.shape[2])return new Error("Incompatible array shape");u.assign(s(e,[t.shape[0],t.shape[1],3],[4,4*t.shape[0],1]),s(t.data,[t.shape[0],t.shape[1],3],[t.stride[0],t.stride[1],0],t.offset)),u.assigns(s(e,[t.shape[0]*t.shape[1]],[4],3),255)}else{if(2!==t.shape.length)return new Error("Incompatible array shape");u.assign(s(e,[t.shape[0],t.shape[1],3],[4,4*t.shape[0],1]),s(t.data,[t.shape[0],t.shape[1],3],[t.stride[0],t.stride[1],0],t.offset)),u.assigns(s(e,[t.shape[0]*t.shape[1]],[4],3),255)}return e}function f(t){var e=l();return e.emit("error",t),e}e.exports=function(t,e,s){switch(s=s||{},e.toUpperCase()){case"JPG":case".JPG":case"JPEG":case".JPEG":case"JPE":case".JPE":var u=t.shape[0],l=t.shape[1],h={data:g=c(t,g=new n(u*l*4)),width:u,height:l},p=a.encode(h,s.quality);return new r(p.data);case"GIF":case".GIF":var d=4===t.shape.length?t.shape[0]:1,g=(u=4===t.shape.length?t.shape[1]:t.shape[0],l=4===t.shape.length?t.shape[2]:t.shape[1],new n(u*l*4)),v=new i(u,l);v.writeHeader();for(var m=0;m<d;m++)g=c(t,g,m),v.addFrame(g);return v.finish(),v;case"PNG":case".PNG":var _=new o({width:t.shape[0],height:t.shape[1]});return"Error"==typeof(g=c(t,_.data))?f(g):(_.data=g,_.pack());case"CANVAS":var w=document.createElement("canvas"),b=w.getContext("2d");w.width=t.shape[0],w.height=t.shape[1];var y=b.getImageData(0,0,w.width,w.height);return"Error"==typeof(g=c(t,g=y.data))?f(g):(b.putImageData(y,0,0),w);default:return f(new Error("Unsupported file type: "+e))}}}).call(this,t("buffer").Buffer)},{buffer:4,contentstream:7,"gif-encoder":25,"jpeg-js":104,ndarray:67,"ndarray-ops":64,"pngjs-nozlib":91,through:123}],108:[function(t,e,n){e.exports=i;var r=t("events").EventEmitter;function i(){r.call(this)}t("inherits")(i,r),i.Readable=t("readable-stream/readable.js"),i.Writable=t("readable-stream/writable.js"),i.Duplex=t("readable-stream/duplex.js"),i.Transform=t("readable-stream/transform.js"),i.PassThrough=t("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(t,e){var n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",a),t._isStdio||e&&!1===e.end||(n.on("end",s),n.on("close",u));var o=!1;function s(){o||(o=!0,t.end())}function u(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function l(t){if(c(),0===r.listenerCount(this,"error"))throw t}function c(){n.removeListener("data",i),t.removeListener("drain",a),n.removeListener("end",s),n.removeListener("close",u),n.removeListener("error",l),t.removeListener("error",l),n.removeListener("end",c),n.removeListener("close",c),t.removeListener("close",c)}return n.on("error",l),t.on("error",l),n.on("end",c),n.on("close",c),t.on("close",c),t.emit("pipe",n),t}},{events:40,inherits:53,"readable-stream/duplex.js":109,"readable-stream/passthrough.js":118,"readable-stream/readable.js":119,"readable-stream/transform.js":120,"readable-stream/writable.js":121}],109:[function(t,e,n){e.exports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":110}],110:[function(t,e,n){"use strict";var r=t("process-nextick-args"),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};e.exports=f;var a=t("core-util-is");a.inherits=t("inherits");var o=t("./_stream_readable"),s=t("./_stream_writable");a.inherits(f,o);for(var u=i(s.prototype),l=0;l<u.length;l++){var c=u[l];f.prototype[c]||(f.prototype[c]=s.prototype[c])}function f(t){if(!(this instanceof f))return new f(t);o.call(this,t),s.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(p,this)}function p(t){t.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),f.prototype._destroy=function(t,e){this.push(null),this.end(),r.nextTick(e,t)}},{"./_stream_readable":112,"./_stream_writable":114,"core-util-is":8,inherits:53,"process-nextick-args":93}],111:[function(t,e,n){"use strict";e.exports=a;var r=t("./_stream_transform"),i=t("core-util-is");function a(t){if(!(this instanceof a))return new a(t);r.call(this,t)}i.inherits=t("inherits"),i.inherits(a,r),a.prototype._transform=function(t,e,n){n(null,t)}},{"./_stream_transform":113,"core-util-is":8,inherits:53}],112:[function(t,e,n){(function(n,r){"use strict";var i=t("process-nextick-args");e.exports=w;var a,o=t("isarray");w.ReadableState=_;t("events").EventEmitter;var s=function(t,e){return t.listeners(e).length},u=t("./internal/streams/stream"),l=t("safe-buffer").Buffer,c=r.Uint8Array||function(){};var f=t("core-util-is");f.inherits=t("inherits");var h=t("util"),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,g=t("./internal/streams/BufferList"),v=t("./internal/streams/destroy");f.inherits(w,u);var m=["error","close","destroy","pause","resume"];function _(e,n){a=a||t("./_stream_duplex"),e=e||{};var r=n instanceof a;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=t("string_decoder/").StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function w(e){if(a=a||t("./_stream_duplex"),!(this instanceof w))return new w(e);this._readableState=new _(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function b(t,e,n,r,i){var a,o=t._readableState;null===e?(o.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,E(t)}(t,o)):(i||(a=function(t,e){var n;r=e,l.isBuffer(r)||r instanceof c||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(o,e)),a?t.emit("error",a):o.objectMode||e&&e.length>0?("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===l.prototype||(e=function(t){return l.from(t)}(e)),r?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):y(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!n?(e=o.decoder.write(e),o.objectMode||0!==e.length?y(t,o,e,!1):A(t,o)):y(t,o,e,!1))):r||(o.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(o)}function y(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&E(t)),A(t,e)}Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),w.prototype.destroy=v.destroy,w.prototype._undestroy=v.undestroy,w.prototype._destroy=function(t,e){this.push(null),e(t)},w.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=l.from(t,e),e=""),n=!0),b(this,t,e,!1,n)},w.prototype.unshift=function(t){return b(this,t,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(e){return d||(d=t("string_decoder/").StringDecoder),this._readableState.decoder=new d(e),this._readableState.encoding=e,this};var x=8388608;function k(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=x?t=x:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function E(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(S,t):S(t))}function S(t){p("emit readable"),t.emit("readable"),j(t)}function A(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(M,t,e))}function M(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function T(t){p("readable nexttick read 0"),t.read(0)}function I(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),j(t),e.flowing&&!e.reading&&t.read(0)}function j(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function R(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():n?function(t,e){var n=e.head,r=1,i=n.data;t-=i.length;for(;n=n.next;){var a=n.data,o=t>a.length?a.length:t;if(o===a.length?i+=a:i+=a.slice(0,t),0===(t-=o)){o===a.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=a.slice(o));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=l.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;for(;r=r.next;){var a=r.data,o=t>a.length?a.length:t;if(a.copy(n,n.length-t,0,o),0===(t-=o)){o===a.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(o));break}++i}return e.length-=i,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function L(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(C,e,t))}function C(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function B(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}w.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?L(this):E(this),null;if(0===(t=k(t,e))&&e.ended)return 0===e.length&&L(this),null;var r,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",i=!0),e.ended||e.reading?p("reading or ended",i=!1):i&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=k(n,e))),null===(r=t>0?R(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&L(this)),null!==r&&this.emit("data",r),r},w.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},w.prototype.pipe=function(t,e){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=t;break;case 1:a.pipes=[a.pipes,t];break;default:a.pipes.push(t)}a.pipesCount+=1,p("pipe count=%d opts=%j",a.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?c:w;function l(e,n){p("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,p("cleanup"),t.removeListener("close",m),t.removeListener("finish",_),t.removeListener("drain",f),t.removeListener("error",v),t.removeListener("unpipe",l),r.removeListener("end",c),r.removeListener("end",w),r.removeListener("data",g),h=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function c(){p("onend"),t.end()}a.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",l);var f=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,j(t))}}(r);t.on("drain",f);var h=!1;var d=!1;function g(e){p("ondata"),d=!1,!1!==t.write(e)||d||((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==B(a.pipes,t))&&!h&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,d=!0),r.pause())}function v(e){p("onerror",e),w(),t.removeListener("error",v),0===s(t,"error")&&t.emit("error",e)}function m(){t.removeListener("finish",_),w()}function _(){p("onfinish"),t.removeListener("close",m),w()}function w(){p("unpipe"),r.unpipe(t)}return r.on("data",g),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?o(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",v),t.once("close",m),t.once("finish",_),t.emit("pipe",r),a.flowing||(p("pipe resume"),r.resume()),t},w.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n),this);if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<i;a++)r[a].emit("unpipe",this,n);return this}var o=B(e.pipes,t);return-1===o?this:(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n),this)},w.prototype.on=function(t,e){var n=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&E(this):i.nextTick(T,this))}return n},w.prototype.addListener=w.prototype.on,w.prototype.resume=function(){var t=this._readableState;return t.flowing||(p("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(I,t,e))}(this,t)),this},w.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},w.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",function(){if(p("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(i){(p("wrapped data"),n.decoder&&(i=n.decoder.write(i)),!n.objectMode||null!==i&&void 0!==i)&&((n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause())))}),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var a=0;a<m.length;a++)t.on(m[a],this.emit.bind(this,m[a]));return this._read=function(e){p("wrapped _read",e),r&&(r=!1,t.resume())},this},Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),w._fromList=R}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":110,"./internal/streams/BufferList":115,"./internal/streams/destroy":116,"./internal/streams/stream":117,_process:94,"core-util-is":8,events:40,inherits:53,isarray:56,"process-nextick-args":93,"safe-buffer":103,"string_decoder/":122,util:3}],113:[function(t,e,n){"use strict";e.exports=a;var r=t("./_stream_duplex"),i=t("core-util-is");function a(t){if(!(this instanceof a))return new a(t);r.call(this,t),this._transformState={afterTransform:function(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",o)}function o(){var t=this;"function"==typeof this._flush?this._flush(function(e,n){s(t,e,n)}):s(this,null,null)}function s(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=t("inherits"),i.inherits(a,r),a.prototype.push=function(t,e){return this._transformState.needTransform=!1,r.prototype.push.call(this,t,e)},a.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")},a.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},a.prototype._destroy=function(t,e){var n=this;r.prototype._destroy.call(this,t,function(t){e(t),n.emit("close")})}},{"./_stream_duplex":110,"core-util-is":8,inherits:53}],114:[function(t,e,n){(function(n,r,i){"use strict";var a=t("process-nextick-args");function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}e.exports=_;var s,u=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?i:a.nextTick;_.WritableState=m;var l=t("core-util-is");l.inherits=t("inherits");var c={deprecate:t("util-deprecate")},f=t("./internal/streams/stream"),h=t("safe-buffer").Buffer,p=r.Uint8Array||function(){};var d,g=t("./internal/streams/destroy");function v(){}function m(e,n){s=s||t("./_stream_duplex"),e=e||{};var r=n instanceof s;this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,l=e.writableHighWaterMark,c=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(l||0===l)?l:c,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(a.nextTick(i,r),a.nextTick(E,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),E(t,e))}(t,n,r,e,i);else{var o=x(n);o||n.corked||n.bufferProcessing||!n.bufferedRequest||y(t,n),r?u(b,t,n,o,i):b(t,n,o,i)}}(n,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function _(e){if(s=s||t("./_stream_duplex"),!(d.call(_,this)||this instanceof s))return new _(e);this._writableState=new m(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function w(t,e,n,r,i,a,o){e.writelen=r,e.writecb=o,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,a,e.onwrite),e.sync=!1}function b(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),E(t,e)}function y(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),a=e.corkedRequestsFree;a.entry=n;for(var s=0,u=!0;n;)i[s]=n,n.isBuf||(u=!1),n=n.next,s+=1;i.allBuffers=u,w(t,e,!0,e.length,i,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,f=n.callback;if(w(t,e,!1,e.objectMode?1:l.length,l,c,f),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function x(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function k(t,e){t._final(function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),E(t,e)})}function E(t,e){var n=x(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,a.nextTick(k,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}l.inherits(_,f),m.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(m.prototype,"buffer",{get:c.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===_&&(t&&t._writableState instanceof m)}})):d=function(t){return t instanceof this},_.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},_.prototype.write=function(t,e,n){var r,i=this._writableState,o=!1,s=!i.objectMode&&(r=t,h.isBuffer(r)||r instanceof p);return s&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(n=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof n&&(n=v),i.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),a.nextTick(e,n)}(this,n):(s||function(t,e,n,r){var i=!0,o=!1;return null===n?o=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),a.nextTick(r,o),i=!1),i}(this,i,t,n))&&(i.pendingcb++,o=function(t,e,n,r,i,a){if(!n){var o=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,n));return e}(e,r,i);r!==o&&(n=!0,i="buffer",r=o)}var s=e.objectMode?1:r.length;e.length+=s;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:a,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else w(t,e,!1,s,r,i,a);return u}(this,i,s,t,e,n)),o},_.prototype.cork=function(){this._writableState.corked++},_.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||y(this,t))},_.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),_.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},_.prototype._writev=null,_.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!==t&&void 0!==t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,E(t,e),n&&(e.finished?a.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(_.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),_.prototype.destroy=g.destroy,_.prototype._undestroy=g.undestroy,_.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("timers").setImmediate)},{"./_stream_duplex":110,"./internal/streams/destroy":116,"./internal/streams/stream":117,_process:94,"core-util-is":8,inherits:53,"process-nextick-args":93,"safe-buffer":103,timers:124,"util-deprecate":129}],115:[function(t,e,n){"use strict";var r=t("safe-buffer").Buffer,i=t("util");e.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var e,n,i,a=r.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=o.data,n=a,i=s,e.copy(n,i),s+=o.data.length,o=o.next;return a},t}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},{"safe-buffer":103,util:3}],116:[function(t,e,n){"use strict";var r=t("process-nextick-args");function i(t,e){t.emit("error",e)}e.exports={destroy:function(t,e){var n=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(r.nextTick(i,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":93}],117:[function(t,e,n){e.exports=t("events").EventEmitter},{events:40}],118:[function(t,e,n){e.exports=t("./readable").PassThrough},{"./readable":119}],119:[function(t,e,n){(n=e.exports=t("./lib/_stream_readable.js")).Stream=n,n.Readable=n,n.Writable=t("./lib/_stream_writable.js"),n.Duplex=t("./lib/_stream_duplex.js"),n.Transform=t("./lib/_stream_transform.js"),n.PassThrough=t("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":110,"./lib/_stream_passthrough.js":111,"./lib/_stream_readable.js":112,"./lib/_stream_transform.js":113,"./lib/_stream_writable.js":114}],120:[function(t,e,n){e.exports=t("./readable").Transform},{"./readable":119}],121:[function(t,e,n){e.exports=t("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":114}],122:[function(t,e,n){"use strict";var r=t("safe-buffer").Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function a(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=l,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=c,this.end=f,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function o(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"<22>";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"<22>";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"<22>"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function l(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function c(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}n.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},a.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"<22>":e},a.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=o(e[r]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=o(e[r]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=o(e[r]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},a.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{"safe-buffer":103}],123:[function(t,e,n){(function(n){var r=t("stream");function i(t,e,i){t=t||function(t){this.queue(t)},e=e||function(){this.queue(null)};var a=!1,o=!1,s=[],u=!1,l=new r;function c(){for(;s.length&&!l.paused;){var t=s.shift();if(null===t)return l.emit("end");l.emit("data",t)}}return l.readable=l.writable=!0,l.paused=!1,l.autoDestroy=!(i&&!1===i.autoDestroy),l.write=function(e){return t.call(this,e),!l.paused},l.queue=l.push=function(t){return u?l:(null===t&&(u=!0),s.push(t),c(),l)},l.on("end",function(){l.readable=!1,!l.writable&&l.autoDestroy&&n.nextTick(function(){l.destroy()})}),l.end=function(t){if(!a)return a=!0,arguments.length&&l.write(t),l.writable=!1,e.call(l),!l.readable&&l.autoDestroy&&l.destroy(),l},l.destroy=function(){if(!o)return o=!0,a=!0,s.length=0,l.writable=l.readable=!1,l.emit("close"),l},l.pause=function(){if(!l.paused)return l.paused=!0,l},l.resume=function(){return l.paused&&(l.paused=!1,l.emit("resume")),c(),l.paused||l.emit("drain"),l},l}e.exports=i,i.through=i}).call(this,t("_process"))},{_process:94,stream:108}],124:[function(t,e,n){(function(e,r){var i=t("process/browser.js").nextTick,a=Function.prototype.apply,o=Array.prototype.slice,s={},u=0;function l(t,e){this._id=t,this._clearFn=e}n.setTimeout=function(){return new l(a.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new l(a.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(t){t.close()},l.prototype.unref=l.prototype.ref=function(){},l.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},n.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},n._unrefActive=n.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout(function(){t._onTimeout&&t._onTimeout()},e))},n.setImmediate="function"==typeof e?e:function(t){var e=u++,r=!(arguments.length<2)&&o.call(arguments,1);return s[e]=!0,i(function(){s[e]&&(r?t.apply(null,r):t.call(null),n.clearImmediate(e))}),e},n.clearImmediate="function"==typeof r?r:function(t){delete s[t]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":94,timers:124}],125:[function(t,e,n){n.isatty=function(){return!1},n.ReadStream=function(){throw new Error("tty.ReadStream is not implemented")},n.WriteStream=function(){throw new Error("tty.WriteStream is not implemented")}},{}],126:[function(t,e,n){(function(e,r){"use strict";var i=t("bit-twiddle"),a=t("dup");e.__TYPEDARRAY_POOL||(e.__TYPEDARRAY_POOL={UINT8:a([32,0]),UINT16:a([32,0]),UINT32:a([32,0]),INT8:a([32,0]),INT16:a([32,0]),INT32:a([32,0]),FLOAT:a([32,0]),DOUBLE:a([32,0]),DATA:a([32,0]),UINT8C:a([32,0]),BUFFER:a([32,0])});var o="undefined"!=typeof Uint8ClampedArray,s=e.__TYPEDARRAY_POOL;s.UINT8C||(s.UINT8C=a([32,0])),s.BUFFER||(s.BUFFER=a([32,0]));var u=s.DATA,l=s.BUFFER;function c(t){if(t){var e=t.length||t.byteLength,n=i.log2(e);u[n].push(t)}}function f(t){t=i.nextPow2(t);var e=i.log2(t),n=u[e];return n.length>0?n.pop():new ArrayBuffer(t)}function h(t){return new Uint8Array(f(t),0,t)}function p(t){return new Uint16Array(f(2*t),0,t)}function d(t){return new Uint32Array(f(4*t),0,t)}function g(t){return new Int8Array(f(t),0,t)}function v(t){return new Int16Array(f(2*t),0,t)}function m(t){return new Int32Array(f(4*t),0,t)}function _(t){return new Float32Array(f(4*t),0,t)}function w(t){return new Float64Array(f(8*t),0,t)}function b(t){return o?new Uint8ClampedArray(f(t),0,t):h(t)}function y(t){return new DataView(f(t),0,t)}function x(t){t=i.nextPow2(t);var e=i.log2(t),n=l[e];return n.length>0?n.pop():new r(t)}n.free=function(t){if(r.isBuffer(t))l[i.log2(t.length)].push(t);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(t)&&(t=t.buffer),!t)return;var e=t.length||t.byteLength,n=0|i.log2(e);u[n].push(t)}},n.freeUint8=n.freeUint16=n.freeUint32=n.freeInt8=n.freeInt16=n.freeInt32=n.freeFloat32=n.freeFloat=n.freeFloat64=n.freeDouble=n.freeUint8Clamped=n.freeDataView=function(t){c(t.buffer)},n.freeArrayBuffer=c,n.freeBuffer=function(t){l[i.log2(t.length)].push(t)},n.malloc=function(t,e){if(void 0===e||"arraybuffer"===e)return f(t);switch(e){case"uint8":return h(t);case"uint16":return p(t);case"uint32":return d(t);case"int8":return g(t);case"int16":return v(t);case"int32":return m(t);case"float":case"float32":return _(t);case"double":case"float64":return w(t);case"uint8_clamped":return b(t);case"buffer":return x(t);case"data":case"dataview":return y(t);default:return null}return null},n.mallocArrayBuffer=f,n.mallocUint8=h,n.mallocUint16=p,n.mallocUint32=d,n.mallocInt8=g,n.mallocInt16=v,n.mallocInt32=m,n.mallocFloat32=n.mallocFloat=_,n.mallocFloat64=n.mallocDouble=w,n.mallocUint8Clamped=b,n.mallocDataView=y,n.mallocBuffer=x,n.clearCache=function(){for(var t=0;t<32;++t)s.UINT8[t].length=0,s.UINT16[t].length=0,s.UINT32[t].length=0,s.INT8[t].length=0,s.INT16[t].length=0,s.INT32[t].length=0,s.FLOAT[t].length=0,s.DOUBLE[t].length=0,s.UINT8C[t].length=0,u[t].length=0,l[t].length=0}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},t("buffer").Buffer)},{"bit-twiddle":2,buffer:4,dup:14}],127:[function(t,e,n){"use strict";e.exports=function(t,e,n){return 0===t.length?t:e?(n||t.sort(e),function(t,e){for(var n=1,r=t.length,i=t[0],a=t[0],o=1;o<r;++o)if(a=i,e(i=t[o],a)){if(o===n){n++;continue}t[n++]=i}return t.length=n,t}(t,e)):(n||t.sort(),function(t){for(var e=1,n=t.length,r=t[0],i=t[0],a=1;a<n;++a,i=r)if(i=r,(r=t[a])!==i){if(a===e){e++;continue}t[e++]=r}return t.length=e,t}(t))}},{}],128:[function(t,e,n){var r=t("mime"),i=t("fs");e.exports=function(t){return"data:"+r.lookup(t)+";base64,"+i.readFileSync(t,"base64")}},{fs:39,mime:59}],129:[function(t,e,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(t){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],130:[function(t,e,n){arguments[4][53][0].apply(n,arguments)},{dup:53}],131:[function(t,e,n){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],132:[function(t,e,n){(function(e,r){var i=/%[sdj%]/g;n.format=function(t){if(!m(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(s(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,a=r.length,o=String(t).replace(i,function(t){if("%%"===t)return"%";if(n>=a)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}}),u=r[n];n<a;u=r[++n])g(u)||!b(u)?o+=" "+u:o+=" "+s(u);return o},n.deprecate=function(t,i){if(_(r.process))return function(){return n.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var a=!1;return function(){if(!a){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),a=!0}return t.apply(this,arguments)}};var a,o={};function s(t,e){var r={seen:[],stylize:l};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(e)?r.showHidden=e:e&&n._extend(r,e),_(r.showHidden)&&(r.showHidden=!1),_(r.depth)&&(r.depth=2),_(r.colors)&&(r.colors=!1),_(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),c(r,t,r.depth)}function u(t,e){var n=s.styles[e];return n?"["+s.colors[n][0]+"m"+t+"["+s.colors[n][1]+"m":t}function l(t,e){return t}function c(t,e,r){if(t.customInspect&&e&&k(e.inspect)&&e.inspect!==n.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(r,t);return m(i)||(i=c(t,i,r)),i}var a=function(t,e){if(_(e))return t.stylize("undefined","undefined");if(m(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(v(e))return t.stylize(""+e,"number");if(d(e))return t.stylize(""+e,"boolean");if(g(e))return t.stylize("null","null")}(t,e);if(a)return a;var o=Object.keys(e),s=function(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),x(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return f(e);if(0===o.length){if(k(e)){var u=e.name?": "+e.name:"";return t.stylize("[Function"+u+"]","special")}if(w(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(y(e))return t.stylize(Date.prototype.toString.call(e),"date");if(x(e))return f(e)}var l,b="",E=!1,S=["{","}"];(p(e)&&(E=!0,S=["[","]"]),k(e))&&(b=" [Function"+(e.name?": "+e.name:"")+"]");return w(e)&&(b=" "+RegExp.prototype.toString.call(e)),y(e)&&(b=" "+Date.prototype.toUTCString.call(e)),x(e)&&(b=" "+f(e)),0!==o.length||E&&0!=e.length?r<0?w(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),l=E?function(t,e,n,r,i){for(var a=[],o=0,s=e.length;o<s;++o)M(e,String(o))?a.push(h(t,e,n,r,String(o),!0)):a.push("");return i.forEach(function(i){i.match(/^\d+$/)||a.push(h(t,e,n,r,i,!0))}),a}(t,e,r,s,o):o.map(function(n){return h(t,e,r,s,n,E)}),t.seen.pop(),function(t,e,n){if(t.reduce(function(t,e){return 0,e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(l,b,S)):S[0]+b+S[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function h(t,e,n,r,i,a){var o,s,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(s=t.stylize("[Setter]","special")),M(r,i)||(o="["+i+"]"),s||(t.seen.indexOf(u.value)<0?(s=g(n)?c(t,u.value,null):c(t,u.value,n-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n")):s=t.stylize("[Circular]","special")),_(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=t.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=t.stylize(o,"string"))}return o+": "+s}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function g(t){return null===t}function v(t){return"number"==typeof t}function m(t){return"string"==typeof t}function _(t){return void 0===t}function w(t){return b(t)&&"[object RegExp]"===E(t)}function b(t){return"object"==typeof t&&null!==t}function y(t){return b(t)&&"[object Date]"===E(t)}function x(t){return b(t)&&("[object Error]"===E(t)||t instanceof Error)}function k(t){return"function"==typeof t}function E(t){return Object.prototype.toString.call(t)}function S(t){return t<10?"0"+t.toString(10):t.toString(10)}n.debuglog=function(t){if(_(a)&&(a=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!o[t])if(new RegExp("\\b"+t+"\\b","i").test(a)){var r=e.pid;o[t]=function(){var e=n.format.apply(n,arguments);console.error("%s %d: %s",t,r,e)}}else o[t]=function(){};return o[t]},n.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=p,n.isBoolean=d,n.isNull=g,n.isNullOrUndefined=function(t){return null==t},n.isNumber=v,n.isString=m,n.isSymbol=function(t){return"symbol"==typeof t},n.isUndefined=_,n.isRegExp=w,n.isObject=b,n.isDate=y,n.isError=x,n.isFunction=k,n.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},n.isBuffer=t("./support/isBuffer");var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function M(t,e){return Object.prototype.hasOwnProperty.call(t,e)}n.log=function(){var t,e;console.log("%s - %s",(t=new Date,e=[S(t.getHours()),S(t.getMinutes()),S(t.getSeconds())].join(":"),[t.getDate(),A[t.getMonth()],e].join(" ")),n.format.apply(n,arguments))},n.inherits=t("inherits"),n._extend=function(t,e){if(!e||!b(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":131,_process:94,inherits:130}],133:[function(t,e,n){e.exports=function(t,e,n,r){!function(e,n,r){if(t.modules[n])var i=t.modules[n][1];else console.log("Module "+n+" not found.");var a=t.copy(r);a.number=t.options.sequencerCounter++,a.name=r.name||n||i.name,a.description=r.description||i.description,a.selector=r.selector||"ismod-"+n,a.container=r.container||t.options.selector,a.image=e,a.inBrowser=t.options.inBrowser,a.step={name:a.name,description:a.description,ID:a.number,imageName:a.image,inBrowser:t.options.inBrowser,ui:t.options.ui,options:a};var o=t.events,s=t.modules[n][0](a,o);t.images[e].steps.push(s)}(e,n,r),t.steps=t.images[e].steps}},{}],134:[function(t,e,n){var r=t("fs");e.exports=function(e="./output/",n,i){if(e="/"==e[e.length-1]?e:e+"/",n.options.inBrowser)return!1;var a,o;r.access(e,function(t){t&&console.error(t)}),a=e,o=function(a){var o=1;for(var s in a)if(null!=a[s].match(/^sequencer(.*)$/)){var u=parseInt(a[s].match(/^sequencer(.*)$/)[1]);o=u>=o?u+1:o}r.mkdir(e+"sequencer"+o,function(){var a=e+"sequencer"+o+"/";for(var s in n.images){var u=n.images[s].steps;if(i){var l=u.slice(-1)[0].output.src,c=u.slice(-1)[0].output.format,f=t("data-uri-to-buffer")(l);r.writeFile(a+s+"_"+(u.length-1)+"."+c,f,function(){})}else for(var h in u){l=u[h].output.src,c=u[h].output.format,f=t("data-uri-to-buffer")(l);r.writeFile(a+s+"_"+h+"."+c,f,function(){})}}})},r.readdir(a,function(t,e){var n=[];if(void 0===e||0==e.length)return o(n),[];for(var i=0;i<e.length;++i){var s=e[i];if("."!==s[0]){var u=a+"/"+s;r.stat(u,function(t,r){if(r.isDirectory()&&n.push(this.file),e.length===this.index+1)return o(n)}.bind({index:i,file:s}))}}})}},{"data-uri-to-buffer":13,fs:39}],135:[function(t,e,n){function r(t){return Object.prototype.toString.call(t).split(" ")[1].slice(0,-1)}function i(t){return"Array"==r(t)?t:[t]}function a(t){if("Array"==r(t))return t.slice();if("Object"==r(t)){var e={};for(var n in t)e[n]=a(t[n]);return e}return t}e.exports=function(t,e,n){for(var o in n=[],this.images)n.push(o);var s,u={},l=e;if("+"==e?e=["o_string_a","string_a","o_object"]:"-"==e?e=["o_string_a","number_a"]:"^"==e?e=["o_string_a","number","string","o_object"]:"r"==e?e=["o_string_a","o_number"]:"l"==e&&(e=["o_string","string","o_function"]),"o_object"==e[e.length-1]?"Object"!=r(t[t.length-1])&&t.push({}):"o_number"==e[e.length-1]?"number"!=typeof t[t.length-1]&&"Object"!=r(t[0])&&t.push(1):"o_function"==e[e.length-1]&&"Function"!=r(t[t.length-1])&&"Object"!=r(t[0])&&t.push(function(){}),"o_string_a"==e[0]){if(t.length==e.length-1){var c=!1;for(var f in t){if(!e[parseInt(f)+1].includes((s=t[f],typeof("Array"==r(s)?s[0]:s)))){c=!1;break}c=!0}c&&t.splice(0,0,a(n))}}else if("o_string"==e[0]&&"l"==l&&2==t.length&&"string"==typeof t[0]){for(var h=1;this.images.hasOwnProperty("image"+h);)h++;t.splice(0,0,"image"+h)}if(t.length==e.length)for(var f in e)"_a"==e[f].substr(e[f].length-2,2)&&(t[f]=i(t[f]));if(1==t.length){if(u=a(t[0]),"r"!=l&&"l"!=l)for(var p in u)u[p]=i(u[p])}else if("r"==l)for(var p in t[0])u[t[0][p]]=t[1];else if("l"==l)(u={images:{},callback:t[2]}).images[t[0]]=t[1];else for(var p in t[0]){if(u[o=t[0][p]]=[],"+"==l)for(var d in t[1])u[o].push({name:t[1][d],o:t[2]});if("-"==l&&(u[o]=t[1]),"^"==l){var g=this.images[o].steps.length,v=t[1];(v=v==g?v:v%g)<0&&(v+=g+1),u[o].push({index:v,name:t[2],o:t[3]})}}if("l"==l)for(var f in u.loadedimages=[],u.images)u.loadedimages.push(f);return u}},{}],136:[function(t,e,n){if("undefined"!=typeof window)r=!0;else var r=!1;t("./util/getStep.js"),ImageSequencer=function(e){var n="ImageSequencer"==this.name?this:this.sequencer;function i(t){return Object.prototype.toString.call(t).split(" ")[1].slice(0,-1)}function a(t){if("Array"==i(t))return t.slice();if("Object"==i(t)){var e={};for(var n in t)e[n]=a(t[n]);return e}return t}(e=e||{}).inBrowser=e.inBrowser||r,e.sequencerCounter=0;var o=t("./Modules"),s=t("./FormatInput"),u={},l=[],c=t("./ui/UserInterface")();t("fs");function f(t,e){e>0&&(thisStep=u[t].steps[e],thisStep.UI.onRemove(thisStep.options.step),u[t].steps.splice(e,1))}function h(){var e=[],n=this;for(var r in arguments)e.push(a(arguments[r]));var i=s.call(this,e,"l");l.push({method:"loadImages",json_q:a(i)});var o=this.copy(i.loadedimages),u={name:"ImageSequencer Wrapper",sequencer:this,addSteps:this.addSteps,removeSteps:this.removeSteps,insertSteps:this.insertSteps,run:this.run,UI:this.UI,setUI:this.setUI,images:o};!function e(r){if(r!=o.length){var a=o[r];t("./ui/LoadImage")(n,a,i.images[a],function(){e(++r)})}else i.callback.call(u)}(0)}function p(t){var e={};if("load-image"==t)return{};if(0==arguments.length)for(var n in o)e[n]=o[n][1];else e=o[t][1];return e}function d(t){let e=a(p(t.options.name).inputs);e=e||{};for(let n in e)e[n]=t.options[n]||e[n].default;var n=Object.keys(e).map(t=>t+":"+e[t]).join(",");return`${t.options.name}(${n})`}return{name:"ImageSequencer",options:e,inputlog:l,modules:o,images:u,events:c,loadImages:h,loadImage:h,addSteps:function(){var e,n="ImageSequencer"==this.name?this:this.sequencer,r="ImageSequencer"==this.name?[]:[this.images];for(var i in arguments)r.push(a(arguments[i]));for(var o in e=s.call(n,r,"+"),l.push({method:"addSteps",json_q:a(e)}),e)for(var u in e[o])t("./AddStep")(n,o,e[o][u].name,e[o][u].o);return this},removeSteps:function(t,e){var n,r={},i="ImageSequencer"==this.name?this:this.sequencer,o="ImageSequencer"==this.name?[]:[this.images];for(var u in arguments)o.push(a(arguments[u]));var c=s.call(i,o,"-");for(var h in l.push({method:"removeSteps",json_q:a(c)}),c)for(var p in n=c[h].sort(function(t,e){return e-t}),r[h]=n[n.length-1],n)f(h,n[p]);return this},insertSteps:function(e,n,r,i){var o={},u="ImageSequencer"==this.name?this:this.sequencer,c="ImageSequencer"==this.name?[]:[this.images];for(var f in arguments)c.push(arguments[f]);var h=s.call(u,c,"^");for(var p in l.push({method:"insertSteps",json_q:a(h)}),h){var d=h[p];for(var g in d=d.sort(function(t,e){return e.index-t.index}))t("./InsertStep")(u,p,d[g].index,d[g].name,d[g].o);o[p]=d[d.length-1].index}return this},replaceImage:function(e,n,r){return(r=r||{}).callback=r.callback||function(){},t("./ReplaceImage")(this,e,n,r)},run:function(e,n,r){let o;"test"!=arguments[0]&&(o=e,delete arguments[0]);var u="ImageSequencer"==this.name?this:this.sequencer,l="ImageSequencer"==this.name?[]:[this.images];for(var c in arguments)l.push(a(arguments[c]));var f=function(){};for(var c in l)"Function"==i(l[c])&&(f=l.splice(c,1)[0]);var h=s.call(u,l,"r");return t("./Run")(u,h,f,o),!0},setUI:function(e){this.events=t("./ui/UserInterface")(e)},exportBin:function(e,n){return t("./ExportBin")(e,this,n)},modulesInfo:p,toString:function(t){return t?d(t):a(this.images.image1.steps).map(d).slice(1).join(",")},stepToString:d,log:function(t,n){"none"!=e.ui&&(1==arguments.length?console.log(arguments[0]):2==arguments.length&&console.log(t,n))},objTypeOf:i,copy:a,setInputStep:t("./ui/SetInputStep")(n)}},e.exports=ImageSequencer},{"./AddStep":133,"./ExportBin":134,"./FormatInput":135,"./InsertStep":137,"./Modules":138,"./ReplaceImage":139,"./Run":140,"./ui/LoadImage":178,"./ui/SetInputStep":179,"./ui/UserInterface":180,"./util/getStep.js":182,fs:39}],137:[function(t,e,n){t("./util/getStep.js");e.exports=function(t,e,n,r,i){!function(e,n,r,i){var a=t.copy(i);a.number=t.options.sequencerCounter++,a.name=i.name||r,a.selector=i.selector||"ismod-"+r,a.container=i.container||t.options.selector,a.image=e,-1==n&&(n=t.images[e].steps.length),a.step={name:a.name,description:a.description,url:a.url,ID:a.number,imageName:a.image,inBrowser:t.options.inBrowser,ui:t.options.ui,options:a};var o=t.events,s=t.modules[r][0](a,o);t.images[e].steps.splice(n,0,s)}(e,n,r,i)}},{"./util/getStep.js":182}],138:[function(t,e,n){e.exports={channel:[t("./modules/Channel/Module"),t("./modules/Channel/info")],brightness:[t("./modules/Brightness/Module"),t("./modules/Brightness/info")],"edge-detect":[t("./modules/EdgeDetect/Module"),t("./modules/EdgeDetect/info")],ndvi:[t("./modules/Ndvi/Module"),t("./modules/Ndvi/info")],invert:[t("./modules/Invert/Module"),t("./modules/Invert/info")],crop:[t("./modules/Crop/Module"),t("./modules/Crop/info")],colormap:[t("./modules/Colormap/Module"),t("./modules/Colormap/info")],"decode-qr":[t("./modules/DecodeQr/Module"),t("./modules/DecodeQr/info")],"fisheye-gl":[t("./modules/FisheyeGl/Module"),t("./modules/FisheyeGl/info")],dynamic:[t("./modules/Dynamic/Module"),t("./modules/Dynamic/info")],blur:[t("./modules/Blur/Module"),t("./modules/Blur/info")],saturation:[t("./modules/Saturation/Module"),t("./modules/Saturation/info")],average:[t("./modules/Average/Module"),t("./modules/Average/info")],blend:[t("./modules/Blend/Module"),t("./modules/Blend/info")],"import-image":[t("./modules/ImportImage/Module"),t("./modules/ImportImage/info")]}},{"./modules/Average/Module":141,"./modules/Average/info":142,"./modules/Blend/Module":143,"./modules/Blend/info":144,"./modules/Blur/Module":146,"./modules/Blur/info":147,"./modules/Brightness/Module":148,"./modules/Brightness/info":149,"./modules/Channel/Module":150,"./modules/Channel/info":151,"./modules/Colormap/Module":153,"./modules/Colormap/info":154,"./modules/Crop/Module":156,"./modules/Crop/info":158,"./modules/DecodeQr/Module":159,"./modules/DecodeQr/info":160,"./modules/Dynamic/Module":161,"./modules/Dynamic/info":162,"./modules/EdgeDetect/Module":164,"./modules/EdgeDetect/info":165,"./modules/FisheyeGl/Module":166,"./modules/FisheyeGl/info":167,"./modules/ImportImage/Module":168,"./modules/ImportImage/info":170,"./modules/Invert/Module":171,"./modules/Invert/info":172,"./modules/Ndvi/Module":173,"./modules/Ndvi/info":174,"./modules/Saturation/Module":175,"./modules/Saturation/info":176}],139:[function(t,e,n){e.exports=function(t,e,n,r){if(!t.options.inBrowser)return!1;var i=ImageSequencer({ui:!1});if(window.hasOwnProperty("$"))var a=$(e);else a=document.querySelectorAll(e);for(var o=[],s=0;s<a.length;s++)a[s]instanceof HTMLImageElement&&o.push(a[s]);function u(t,e){var n=t.src,r=n.split("?")[0].split(".").pop(),a=new XMLHttpRequest;function o(n){i.loadImage(n,function(){this.addSteps(e).run({stop:function(){}},function(e){t.src=e})})}a.open("GET",n,!0),a.responseType="arraybuffer",a.onload=function(t){var e,n,i,a=new Uint8Array(this.response),s="";for(e=0,n=a.length;e<n;e+=5e3)i=a.subarray(e,e+5e3),s+=String.fromCharCode.apply(null,i);var u=btoa(s);o("data:image/"+r+";base64,"+u)},"data:image/"!=n.substr(0,11).toLowerCase()?a.send():o(n)}for(s=0;s<o.length;s++)u(o[s],n),s==o.length-1&&r.callback()}},{}],140:[function(t,e,n){const r=t("./util/getStep.js");e.exports=function(t,e,n,i){return i||(i={stop:function(){}}),function(e){var a=[];for(var o in e)for(var s=t.images[o].steps.length,u=e[o],l=0;l<s-u;l++)a.push({image:o,i:u+l});!function e(a,o){if(o==a.length&&void 0!==a[o-1]){var s=a[o-1].image;if("Function"==t.objTypeOf(n)&&t.images[s].steps.slice(-1)[0].output){var u=t.images[s].steps,l=u[u.length-1].output.src;return n(l),!0}}if(void 0!==a[o]){s=a[o].image;var c=a[o].i,f=t.images[s].steps[c-1].output;for(var h in t.images[s].steps[c].getStep=function(e){return c+e>=t.images[s].steps.length?{options:{name:void 0}}:t.images[s].steps.slice(c+e)[0]},t.images[s].steps[c].getIndex=function(){return c},r)r.hasOwnProperty(h)&&(t.images[s].steps[c][h]=r[h]);t.images[s].steps[c].draw(t.copy(f),function(){e(a,++o)},i)}}(a,0)}(e=function(e){for(var n in e)0==e[n]&&1==t.images[n].steps.length?delete e[n]:0==e[n]&&e[n]++;for(var n in e)for(var r=t.images[n].steps[e[n]-1];void 0===r||void 0===r.output;)r=t.images[n].steps[--e[n]-1];return e}(e))}},{"./util/getStep.js":182}],141:[function(t,e,n){e.exports=function(e,n){return(e=e||{}).blur=e.blur||2,n.onSetup(e.step),e.step.metadata=e.step.metadata||{},{options:e,draw:function(r,i,a){a.stop(!0),a.overrideFlag=!0,n.onDraw(e.step);var o=this;return t("../_nomodule/PixelManipulation.js")(r,{output:function(t,r,i){o.output={src:r,format:i},e.step.output=r,n.onComplete(e.step)},changePixel:function(t,e,n,r){return[t,e,n,r]},extraManipulation:function(t){for(var n=[0,0,0,0],r=0;r<t.data.length;r+=4)n[0]+=t.data[r+0],n[1]+=t.data[r+1],n[2]+=t.data[r+2],n[3]+=t.data[r+3];for(n[0]=parseInt(n[0]/(t.data.length/4)),n[1]=parseInt(n[1]/(t.data.length/4)),n[2]=parseInt(n[2]/(t.data.length/4)),n[3]=parseInt(n[3]/(t.data.length/4)),r=0;r<t.data.length;r+=4)t.data[r+0]=n[0],t.data[r+1]=n[1],t.data[r+2]=n[2],t.data[r+3]=n[3];return e.step.metadata.averages=n,console.log("average: ",n),e.step.inBrowser&&e.step.ui&&$(e.step.ui).find(".details").append("<p><b>Averages</b> (r, g, b, a): "+n.join(", ")+"</p>"),t},format:r.format,image:e.image,callback:i})},output:void 0,UI:n}}},{"../_nomodule/PixelManipulation.js":177}],142:[function(t,e,n){e.exports={name:"Average",description:"Average all pixel color",inputs:{}}},{}],143:[function(require,module,exports){module.exports=function Dynamic(options,UI,util){var output;function draw(input,callback,progressObj){progressObj.stop(!0),progressObj.overrideFlag=!0,UI.onDraw(options.step);var step=this;"string"==typeof options.func&&eval("options.func = "+options.func);var getPixels=require("get-pixels"),priorStep=this.getStep(-2);getPixels(priorStep.output.src,function(t,e){return options.firstImagePixels=e,require("../_nomodule/PixelManipulation.js")(input,{output:function(t,e,n){step.output={src:e,format:n},options.step.output=e,UI.onComplete(options.step)},changePixel:function(t,e,n,r,i,a){var o=options.firstImagePixels;return options.func(t,e,n,r,o.get(i,a,0),o.get(i,a,1),o.get(i,a,2),o.get(i,a,3))},format:input.format,image:options.image,inBrowser:options.inBrowser,callback:callback})})}return options=options||{},options.func=options.func||"function(r1, g1, b1, a1, r2, g2, b2, a2) { return [ r1, g2, b2, a2 ] }",UI.onSetup(options.step),{options:options,draw:draw,output:output,UI:UI}}},{"../_nomodule/PixelManipulation.js":177,"get-pixels":23}],144:[function(t,e,n){e.exports={name:"Blend",description:"Blend the past two image steps with the given function. Defaults to using the red channel from image 1 and the green and blue and alpha channels of image 2. Easier to use interfaces coming soon!",inputs:{blend:{type:"input",desc:"Function to use to blend the two images.",default:"function(r1, g1, b1, a1, r2, g2, b2, a2) { return [ r1, g2, b2, a2 ] }"}}}},{}],145:[function(t,e,n){e.exports=function(t,e){let n=[[2/159,4/159,5/159,4/159,2/159],[4/159,9/159,12/159,9/159,4/159],[5/159,12/159,15/159,12/159,5/159],[4/159,9/159,12/159,9/159,4/159],[2/159,4/159,5/159,4/159,2/159]];n=function(t){let e=[];for(let n=t.length-1;n>=0;n--){let r=[];for(let e=t[n].length-1;e>=0;e--)r.push(t[n][e]);e.push(r)}return e}(n);var r=t;for(let e=0;e<t.shape[0];e++)for(let a=0;a<t.shape[1];a++){let o=i([e,a]),s=[0,0,0,0];for(let t=0;t<n.length;t++)for(let e=0;e<n.length;e++)s[0]+=r.get(o[t][e][0],o[t][e][1],0)*n[t][e],s[1]+=r.get(o[t][e][0],o[t][e][1],1)*n[t][e],s[2]+=r.get(o[t][e][0],o[t][e][1],2)*n[t][e],s[3]+=r.get(o[t][e][0],o[t][e][1],3)*n[t][e];t.set(e,a,0,s[0]),t.set(e,a,1,s[1]),t.set(e,a,2,s[2])}return t;function i(t){let e=t[0],n=t[1],r=[];for(let t=-2;t<=2;t++){let i=[];for(let r=-2;r<=2;r++)i.push([e+t,n+r]);r.push(i)}return r}}},{}],146:[function(t,e,n){e.exports=function(e,n){return(e=e||{}).blur=e.blur||2,n.onSetup(e.step),{options:e,draw:function(r,i,a){a.stop(!0),a.overrideFlag=!0,n.onDraw(e.step);var o=this;return t("../_nomodule/PixelManipulation.js")(r,{output:function(t,r,i){o.output={src:r,format:i},e.step.output=r,n.onComplete(e.step)},changePixel:function(t,e,n,r){return[t,e,n,r]},extraManipulation:function(n){return n=t("./Blur")(n,e.blur)},format:r.format,image:e.image,callback:i})},output:void 0,UI:n}}},{"../_nomodule/PixelManipulation.js":177,"./Blur":145}],147:[function(t,e,n){e.exports={name:"Blur",description:"Gaussian blur an image by a given value, typically 0-5",inputs:{blur:{type:"integer",desc:"amount of gaussian blur(Less blur gives more detail, typically 0-5)",default:2}}}},{}],148:[function(t,e,n){e.exports=function(e,n){return e=e||{},n.onSetup(e.step),{options:e,draw:function(r,i,a){a.stop(!0),a.overrideFlag=!0,n.onDraw(e.step);var o=this;return t("../_nomodule/PixelManipulation.js")(r,{output:function(t,r,i){o.output={src:r,format:i},e.step.output=r,n.onComplete(e.step)},changePixel:function(t,n,r,i){var a=e.brightness/100;return[t=a*t<255?a*t:255,n=a*n<255?a*n:255,r=a*r<255?a*r:255,i]},format:r.format,image:e.image,inBrowser:e.inBrowser,callback:i})},output:void 0,UI:n}}},{"../_nomodule/PixelManipulation.js":177}],149:[function(t,e,n){e.exports={name:"Brightness",description:"Change the brightness of the image by given percent value",inputs:{brightness:{type:"integer",desc:"% brightness for the new image",default:0}}}},{}],150:[function(t,e,n){e.exports=function(e,n){return(e=e||{}).channel=e.channel||"green",n.onSetup(e.step),{options:e,draw:function(r,i,a){a.stop(!0),a.overrideFlag=!0,n.onDraw(e.step);var o=this;return t("../_nomodule/PixelManipulation.js")(r,{output:function(t,r,i){o.output={src:r,format:i},e.step.output=r,n.onComplete(e.step)},changePixel:function(t,n,r,i){return"red"==e.channel?[t,0,0,i]:"green"==e.channel?[0,n,0,i]:"blue"==e.channel?[0,0,r,i]:void 0},format:r.format,image:e.image,inBrowser:e.inBrowser,callback:i})},output:void 0,UI:n}}},{"../_nomodule/PixelManipulation.js":177}],151:[function(t,e,n){e.exports={name:"Channel",description:"Displays only one color channel of an image -- default is green",inputs:{channel:{type:"select",desc:"Color channel",default:"green",values:["red","green","blue"]}}}},{}],152:[function(t,e,n){function r(t){return function(e){var n,r,i,a,o,s,u,l,c,f,h,p,d,g;if(s=(h=[0,0])[0],u=h[1],a=(p=[t[0][0],1])[1],e<(i=p[0]))return s;for(n=l=0,f=t.length;l<f;n=++l){if(o=(d=t[n])[0],s=d[1],u=d[2],i=o,n===t.length-1){a=1;break}if(a=t[n+1][0],o<=e&&e<a)break}for(r=[],n=c=0,g=s.length;0<=g?c<g:c>g;n=0<=g?++c:--c)r[n]=(e-i)/(a-i)*(u[n]-s[n])+s[n];return r}}e.exports=function(t,e){return e.colormap=e.colormap||i.default,"object"==typeof e.colormap?colormapFunction=r(e.colormap):i.hasOwnProperty(e.colormap)?colormapFunction=i[e.colormap]:colormapFunction=i.default,colormapFunction(t/255)};var i={greyscale:r([[0,[0,0,0],[255,255,255]],[1,[255,255,255],[255,255,255]]]),default:r([[0,[0,0,255],[0,255,0]],[.25,[0,255,0],[255,255,0]],[.5,[0,255,255],[255,255,0]],[.75,[255,255,0],[255,0,0]]]),ndvi:r([[0,[0,0,255],[38,195,195]],[.5,[0,150,0],[255,255,0]],[.75,[255,255,0],[255,50,50]]]),stretched:r([[0,[0,0,255],[0,0,255]],[.1,[0,0,255],[38,195,195]],[.5,[0,150,0],[255,255,0]],[.7,[255,255,0],[255,50,50]],[.9,[255,50,50],[255,50,50]]]),fastie:r([[0,[255,255,255],[0,0,0]],[.167,[0,0,0],[255,255,255]],[.33,[255,255,255],[0,0,0]],[.5,[0,0,0],[140,140,255]],[.55,[140,140,255],[0,255,0]],[.63,[0,255,0],[255,255,0]],[.75,[255,255,0],[255,0,0]],[.95,[255,0,0],[255,0,255]]])}},{}],153:[function(t,e,n){e.exports=function(e,n){return e=e||{},n.onSetup(e.step),{options:e,draw:function(r,i,a){a.stop(!0),a.overrideFlag=!0,n.onDraw(e.step);var o=this;return t("../_nomodule/PixelManipulation.js")(r,{output:function(t,r,i){o.output={src:r,format:i},e.step.output=r,n.onComplete(e.step)},changePixel:function(n,r,i,a){var o=(n+r+i)/3,s=t("./Colormap")(o,e);return[s[0],s[1],s[2],255]},format:r.format,image:e.image,inBrowser:e.inBrowser,callback:i})},output:void 0,UI:n}}},{"../_nomodule/PixelManipulation.js":177,"./Colormap":152}],154:[function(t,e,n){e.exports={name:"Colormap",description:"Maps brightness values (average of red, green & blue) to a given color lookup table, made up of a set of one more color gradients.\n\nFor example, 'cooler' colors like blue could represent low values, while 'hot' colors like red could represent high values.",inputs:{colormap:{type:"select",desc:"Name of the Colormap",default:"default",values:["default","greyscale","stretched","fastie"]}}}},{}],155:[function(t,e,n){(function(n){e.exports=function(e,r,i){var a=t("get-pixels"),o=t("save-pixels");r.x=parseInt(r.x)||0,r.y=parseInt(r.y)||0,a(e.src,function(t,a){r.w=parseInt(r.w)||Math.floor(.5*a.shape[0]),r.h=parseInt(r.h)||Math.floor(.5*a.shape[1]);for(var s=r.x,u=r.y,l=r.w,c=r.h,f=a.shape[0],h=new Uint8Array(4*l*c),p=u;p<u+c;p++)h.set(a.data.slice(4*p*f+s,4*p*f+s+4*l),4*l*(p-u));a.data=h,a.shape=[l,c,4],a.stride[1]=4*l,r.format=e.format;var d=[],g=0,v=o(a,r.format);v.on("data",function(t){g+=t.length,d.push(t)}),v.on("end",function(){var t=n.concat(d,g).toString("base64"),e="data:image/"+r.format+";base64,"+t;i(e,r.format)})})}}).call(this,t("buffer").Buffer)},{buffer:4,"get-pixels":23,"save-pixels":107}],156:[function(t,e,n){e.exports=function(e,n){if(e=e||{},n.onSetup(e.step),e.step.inBrowser)var r=t("./Ui.js")(e.step,n);var i=!1;return{options:e,draw:function(a,o){n.onDraw(e.step);var s=this;e.step.input=a.src,t("./Crop")(a,e,function(t,a){s.output={src:t,format:a},e.step.output=t,n.onComplete(e.step),r&&r.hide&&r.hide(),!1===i&&e.step.inBrowser&&(i=!0,r.setup()),o()})},output:void 0,UI:n}}},{"./Crop":155,"./Ui.js":157}],157:[function(t,e,n){e.exports=function(t,e){let n=0,r=0;function i(){return t.imgElement}function a(t,e,n,r){let a=$($(i()).parents()[2]).find("input");a[0].value=t,a[1].value=e,a[2].value=n,a[3].value=r}return{setup:function(){t.imgElement.src=t.input,n=Math.floor(i().naturalWidth),r=Math.floor(i().naturalHeight),a(0,0,n,r),$(i()).imgAreaSelect({handles:!0,x1:0,y1:0,x2:0+n/2,y2:0+r/2,onSelectEnd:function(t,e){let o=function(t,e,a,o){let s=$(i()).width(),u=$(i()).height();return[Math.floor(t/s*n),Math.floor(e/u*r),Math.floor(a/s*n),Math.floor(o/u*r)]}(e.x1,e.y1,e.width,e.height);a(o[0],o[1],o[2],o[3])}})},remove:function(){$(i()).imgAreaSelect({remove:!0})},hide:function(){$(i()).imgAreaSelect({hide:!0})}}}},{}],158:[function(t,e,n){e.exports={name:"Crop",description:"Crop image to given x, y, w, h in pixels, measured from top left",url:"https://github.com/publiclab/image-sequencer/tree/master/MODULES.md",inputs:{x:{type:"integer",desc:"X-position (measured from left) from where cropping starts",default:0},y:{type:"integer",desc:"Y-position (measured from top) from where cropping starts",default:0},w:{type:"integer",desc:"Width of crop",default:"(50%)"},h:{type:"integer",desc:"Height of crop",default:"(50%)"}}}},{}],159:[function(t,e,n){e.exports=function(e,n){e=e||{},n.onSetup(e.step);var r=t("jsqr"),i=t("get-pixels");return{options:e,draw:function(t,a){n.onDraw(e.step);var o=this;i(t.src,function(i,s){if(i)throw i;var u=s.shape[0],l=s.shape[1],c=r.decodeQRFromImage(s.data,u,l);o.output=t,o.output.data=c,a(),e.step.output=t.src,e.step.qrval=c,n.onComplete(e.step)})},output:void 0,UI:n}}},{"get-pixels":23,jsqr:57}],160:[function(t,e,n){e.exports={name:"Decode QR",description:"Search for and decode a QR code in the image",inputs:{},outputs:{qrval:{type:"text"}}}},{}],161:[function(require,module,exports){module.exports=function Dynamic(options,UI){var output;function draw(input,callback,progressObj){progressObj.stop(!0),progressObj.overrideFlag=!0,UI.onDraw(options.step);var step=this;function generator(expression){var func="f = function (r, g, b, a) { var R = r, G = g, B = b, A = a;",f;return func+="return ",func=func+expression+"}",eval(func),f}options.monochrome=options.monochrome||"(R+G+B)/3";var channels=["red","green","blue","alpha"];function changePixel(t,e,n,r){return[options.red_function(t,e,n,r),options.green_function(t,e,n,r),options.blue_function(t,e,n,r),options.alpha_function(t,e,n,r)]}function getNeighbourPixel(t,e,n,r,i){return[t.get(e+r,n+i,0),t.get(e+r,n+i,1),t.get(e+r,n+i,2),t.get(e+r,n+i,3)]}function output(t,e,n){step.output={src:e,format:n},options.step.output=e,UI.onComplete(options.step)}return channels.forEach(function(t){options.hasOwnProperty(t)?options[t+"_function"]=generator(options[t]):"alpha"===t?options.alpha_function=function(){return 255}:options[t+"_function"]=generator(options.monochrome)}),require("../_nomodule/PixelManipulation.js")(input,{output:output,changePixel:changePixel,getNeighbourPixel:getNeighbourPixel,getNeighborPixel:getNeighbourPixel,format:input.format,image:options.image,inBrowser:options.inBrowser,callback:callback})}return options=options||{},UI.onSetup(options.step),{options:options,draw:draw,output:output,UI:UI}}},{"../_nomodule/PixelManipulation.js":177}],162:[function(t,e,n){e.exports={name:"Dynamic",description:"A module which accepts JavaScript math expressions to produce each color channel based on the original image's color. See <a href='https://publiclab.org/wiki/infragram-sandbox'>Infragrammar</a>.",inputs:{red:{type:"input",desc:"Expression to return for red channel with R, G, B, and A inputs",default:"r"},green:{type:"input",desc:"Expression to return for green channel with R, G, B, and A inputs",default:"g"},blue:{type:"input",desc:"Expression to return for blue channel with R, G, B, and A inputs",default:"b"},"monochrome (fallback)":{type:"input",desc:"Expression to return with R, G, B, and A inputs; fallback for other channels if none provided",default:"r + g + b"}}}},{}],163:[function(t,e,n){const r=t("lodash"),i=[[-1,0,1],[-2,0,2],[-1,0,1]],a=[[-1,-2,-1],[0,0,0],[1,2,1]];let o,s=[],u=[],l=[],c=[];function f(t,e,n,r,o){let s=0;for(let e=0;e<3;e++)for(let n=0;n<3;n++){let a=r+e-1,u=o+n-1;s+=t.get(a,u,0)*i[e][n]}let u=0;for(let e=0;e<3;e++)for(let n=0;n<3;n++){let i=r+e-1,s=o+n-1;u+=t.get(i,s,0)*a[e][n]}return{pixel:[e,e,e,Math.sqrt(Math.pow(s,2)+Math.pow(u,2))],angle:Math.atan2(u,s)}}e.exports=function(t,e,n,i){o=!i;for(var a=0;a<t.shape[0];a++){s.push([]),u.push([]);for(var d=0;d<t.shape[1];d++){var g=f(t,t.get(a,d,0),t.get(a,d,3),a,d);let e=g.pixel;t.set(a,d,0,e[0]),t.set(a,d,1,e[1]),t.set(a,d,2,e[2]),t.set(a,d,3,e[3]),u.slice(-1)[0].push(e[3]),s.slice(-1)[0].push(g.angle)}}return function(t){function e(t){let e=t[0],n=t[1];return[[e+1,n+1],[e+1,n],[e+1,n-1],[e,n+1],[e,n-1],[e-1,n+1],[e-1,n],[e-1,n-1]]}for(weakPixel in c){let n=e(c[weakPixel]);for(pixel in n)if(l.find(t=>r.isEqual(t,n[pixel]))){t.set(weakPixel[0],weakPixel[1],3,255),c.splice(weakPixel,weakPixel);break}}return c.forEach(e=>t.set(e[0],e[1],3,0)),t}(function(t,e,n){const r=.2*p(u),i=r*n;for(let e=0;e<t.shape[0];e++)for(let n=0;n<t.shape[1];n++){let a=[e,n];u[e][n]>i?u[e][n]>r?l.push(a):c.push(a):t.set(e,n,3,0)}return l.forEach(e=>t.set(e[0],e[1],3,255)),t}(function(t){s=s.map(t=>t.map(h));for(let e=1;e<t.shape[0]-1;e++)for(let n=1;n<t.shape[1]-1;n++){let r=s[e][n];t.get(e,n);r>=-22.5&&r<=22.5||r<-157.5&&r>=-180?u[e][n]>=u[e][n+1]&&u[e][n]>=u[e][n-1]?t.set(e,n,3,u[e][n]):t.set(e,n,3,0):r>=22.5&&r<=67.5||r<-112.5&&r>=-157.5?u[e][n]>=u[e+1][n+1]&&u[e][n]>=u[e-1][n-1]?t.set(e,n,3,u[e][n]):t.set(e,n,3,0):r>=67.5&&r<=112.5||r<-67.5&&r>=-112.5?u[e][e]>=u[e+1][n]&&u[e][n]>=u[e][n]?t.set(e,n,3,u[e][n]):t.set(e,n,3,0):(r>=112.5&&r<=157.5||r<-22.5&&r>=-67.5)&&(u[e][n]>=u[e+1][n-1]&&u[e][n]>=u[e-1][n+1]?t.set(e,n,3,u[e][n]):t.set(e,n,3,0))}return t}(t),0,n))};var h=t=>180*t/Math.PI,p=t=>Math.max(...t.map(t=>t.map(t=>t||0)).map(t=>Math.max(...t)))},{lodash:58}],164:[function(t,e,n){e.exports=function(e,n){return(e=e||{}).blur=e.blur||2,e.highThresholdRatio=e.highThresholdRatio||.2,e.lowThresholdRatio=e.lowThresholdRatio||.15,n.onSetup(e.step),{options:e,draw:function(r,i,a){a.stop(!0),a.overrideFlag=!0,n.onDraw(e.step);var o=this;return t("../_nomodule/PixelManipulation.js")(r,{output:function(t,r,i){o.output={src:r,format:i},e.step.output=r,n.onComplete(e.step)},changePixel:function(t,e,n,r){return[(t+e+n)/3,(t+e+n)/3,(t+e+n)/3,r]},extraManipulation:function(n){return n=t("ndarray-gaussian-filter")(n,e.blur),t("./EdgeUtils")(n,e.highThresholdRatio,e.lowThresholdRatio,e.inBrowser)},format:r.format,image:e.image,inBrowser:e.inBrowser,callback:i})},output:void 0,UI:n}}},{"../_nomodule/PixelManipulation.js":177,"./EdgeUtils":163,"ndarray-gaussian-filter":63}],165:[function(t,e,n){e.exports={name:"Detect Edges",description:"this module detects edges using the Canny method, which first Gaussian blurs the image to reduce noise (amount of blur configurable in settings as `options.blur`), then applies a number of steps to highlight edges, resulting in a greyscale image where the brighter the pixel, the stronger the detected edge. Read more at: https://en.wikipedia.org/wiki/Canny_edge_detector",inputs:{blur:{type:"integer",desc:"amount of gaussian blur(Less blur gives more detail, typically 0-5)",default:2},highThresholdRatio:{type:"float",desc:"The high threshold ratio for the image",default:.2},lowThresholdRatio:{type:"float",desc:"The low threshold value for the image",default:.15}}}},{}],166:[function(t,e,n){e.exports=function(e,n){return e=e||{},n.onSetup(e.step),t("fisheyegl"),{options:e,draw:function(t,r){n.onDraw(e.step);var i=this;if(e.inBrowser){if(document.querySelector("#image-sequencer-canvas"))var a=document.querySelector("#image-sequencer-canvas");else(a=document.createElement("canvas")).style.display="none",a.setAttribute("id","image-sequencer-canvas"),document.body.append(a);distorter=FisheyeGl({selector:"#image-sequencer-canvas"}),e.a=parseFloat(e.a)||distorter.lens.a,e.b=parseFloat(e.b)||distorter.lens.b,e.Fx=parseFloat(e.Fx)||distorter.lens.Fx,e.Fy=parseFloat(e.Fy)||distorter.lens.Fy,e.scale=parseFloat(e.scale)||distorter.lens.scale,e.x=parseFloat(e.x)||distorter.fov.x,e.y=parseFloat(e.y)||distorter.fov.y,distorter.lens.a=e.a,distorter.lens.b=e.b,distorter.lens.Fx=e.Fx,distorter.lens.Fy=e.Fy,distorter.lens.scale=e.scale,distorter.fov.x=e.x,distorter.fov.y=e.y,distorter.setImage(t.src,function(){i.output={src:a.toDataURL(),format:t.format},e.step.output=i.output.src,r(),n.onComplete(e.step)})}else this.output=t,r()},output:void 0,UI:n}}},{fisheyegl:15}],167:[function(t,e,n){e.exports={name:"Fisheye GL",description:"Correct fisheye, or barrel distortion, in images (with WebGL -- adapted from fisheye-correction-webgl by @bluemir).",requires:["webgl"],inputs:{a:{type:"float",desc:"a parameter",default:1,min:1,max:4},b:{type:"float",desc:"b parameter",default:1,min:1,max:4},Fx:{type:"float",desc:"Fx parameter",default:0,min:0,max:4},Fy:{type:"float",desc:"Fy parameter",default:0,min:0,max:4},scale:{type:"float",desc:"Image Scaling",default:1.5,min:0,max:20},x:{type:"float",desc:"FOV x parameter",default:1.5,min:0,max:20},y:{type:"float",desc:"FOV y parameter",default:1.5,min:0,max:20},fragmentSrc:{type:"PATH",desc:"Patht to a WebGL fragment shader file",default:"(inbuilt)"},vertexSrc:{type:"PATH",desc:"Patht to a WebGL vertex shader file",default:"(inbuilt)"}}}},{}],168:[function(t,e,n){e.exports=function(e,n){(e=e||{}).imageUrl=e.imageUrl||"/examples/images/monarch.png";var r=new Image;(n.onSetup(e.step),e.step.inBrowser)&&t("./Ui.js")(e.step,n).setup();return{options:e,draw:function(i,a){n.onDraw(e.step);var o=this;o.metadata=o.metadata||{},o.metadata.input=i,e.format=t("../../util/GetFormat")(e.imageUrl),r.onload=function(){o.output={src:r.src,format:e.format},e.step.output=r.src,n.onComplete(e.step),a()},r.src=e.imageUrl},output:void 0,UI:n}}},{"../../util/GetFormat":181,"./Ui.js":169}],169:[function(t,e,n){e.exports=function(t,e){return{setup:function(e,n){var r="dropzone-import-image-"+t.ID,i=' <div style="padding: 30px;margin: 10px 20% 30px;border: 4px dashed #ccc;border-radius: 8px;text-align: center;color: #444;" id="'+r+'"> <p> <i>Select or drag in an image to overlay.</i> </p> <center> <input type="file" class="file-input" value=""> </center> </div>';$(t.ui).find(".details").prepend(i),sequencer.setInputStep({dropZoneSelector:"#"+r,fileInputSelector:"#"+r+" .file-input",onLoad:function(e){var n=e.target;t.options.imageUrl=n.result,sequencer.run()}}),$(t.ui).find(".btn-save").on("click",function(){var e=$(t.ui).find(".det input").val();t.options.imageUrl=e,sequencer.run()})}}}},{}],170:[function(t,e,n){e.exports={name:"Import Image",description:"Import a new image and replace the original with it. Future versions may enable a blend mode. Specify an image by URL or by file selector.",url:"https://github.com/publiclab/image-sequencer/tree/master/MODULES.md",inputs:{url:{type:"string",desc:"URL of image to import",default:"/examples/images/monarch.png"}}}},{}],171:[function(t,e,n){e.exports=function(e,n){return e=e||{},n.onSetup(e.step),{options:e,draw:function(r,i,a){a.stop(!0),a.overrideFlag=!0,n.onDraw(e.step);var o=this;return t("../_nomodule/PixelManipulation.js")(r,{output:function(t,r,i){o.output={src:r,format:i},e.step.output=r,n.onComplete(e.step)},changePixel:function(t,e,n,r){return[255-t,255-e,255-n,r]},format:r.format,image:e.image,inBrowser:e.inBrowser,callback:i})},output:void 0,UI:n}}},{"../_nomodule/PixelManipulation.js":177}],172:[function(t,e,n){e.exports={name:"Invert",description:"Inverts the image.",inputs:{}}},{}],173:[function(t,e,n){e.exports=function(e,n){return(e=e||{}).filter=e.filter||"red",n.onSetup(e.step),{options:e,draw:function(r,i,a){a.stop(!0),a.overrideFlag=!0,n.onDraw(e.step);var o=this;return t("../_nomodule/PixelManipulation.js")(r,{output:function(t,r,i){o.output={src:r,format:i},e.step.output=r,n.onComplete(e.step)},changePixel:function(t,n,r,i){if("red"==e.filter)var a=(r-t)/(1*r+t);"blue"==e.filter&&(a=(t-r)/(1*r+t));var o=255*(a+1)/2;return[o,o,o,i]},format:r.format,image:e.image,inBrowser:e.inBrowser,callback:i})},output:void 0,UI:n}}},{"../_nomodule/PixelManipulation.js":177}],174:[function(t,e,n){e.exports={name:"NDVI",description:"Normalized Difference Vegetation Index, or NDVI, is an image analysis technique used with aerial photography. It's a way to visualize the amounts of infrared and other wavelengths of light reflected from vegetation by comparing ratios of blue and red light absorbed versus green and IR light reflected. NDVI is used to evaluate the health of vegetation in satellite imagery, where it correlates with how much photosynthesis is happening. This is helpful in assessing vegetative health or stress. <a href='https://publiclab.org/ndvi'>Read more</a>.<br /><br/>This is designed for use with red-filtered single camera <a href='http://publiclab.org/infragram'>DIY Infragram cameras</a>; change to 'blue' for blue filters",inputs:{filter:{type:"select",desc:"Filter color",default:"red",values:["red","blue"]}}}},{}],175:[function(t,e,n){e.exports=function(e,n){return e=e||{},n.onSetup(e.step),{options:e,draw:function(r,i,a){a.stop(!0),a.overrideFlag=!0,n.onDraw(e.step);var o=this;return t("../_nomodule/PixelManipulation.js")(r,{output:function(t,r,i){o.output={src:r,format:i},e.step.output=r,n.onComplete(e.step)},changePixel:function(t,n,r,i){var a=Math.sqrt(t*t*.299+n*n*.587+n*n*.114);return t=a+(t-a)*e.saturation,n=a+(n-a)*e.saturation,r=a+(r-a)*e.saturation,[Math.round(t),Math.round(n),Math.round(r),i]},format:r.format,image:e.image,inBrowser:e.inBrowser,callback:i})},output:void 0,UI:n}}},{"../_nomodule/PixelManipulation.js":177}],176:[function(t,e,n){e.exports={name:"Saturation",description:"Change the saturation of the image by given value, from 0-1, with 1 being 100% saturated.",inputs:{saturation:{type:"integer",desc:"saturation for the new image between 0 and 2, 0 being black and white and 2 being highly saturated",default:0}}}},{}],177:[function(t,e,n){(function(n,r){e.exports=function(e,i){(i=i||{}).changePixel=i.changePixel||function(t,e,n,r){return[t,e,n,r]},i.extraManipulation=i.extraManipulation||function(t){return t};var a=t("get-pixels"),o=t("save-pixels");a(e.src,function(a,s){if(a)console.log("Bad image path",e);else{if(i.getNeighbourPixel&&(i.getNeighbourPixel.fun=function(t,e){return i.getNeighbourPixel(s,l,c,t,e)}),!i.inBrowser&&!n.env.TEST)try{var u=t("pace")(s.shape[0]*s.shape[1])}catch(t){i.inBrowser=!0}for(var l=0;l<s.shape[0];l++)for(var c=0;c<s.shape[1];c++){var f=i.changePixel(s.get(l,c,0),s.get(l,c,1),s.get(l,c,2),s.get(l,c,3),l,c);s.set(l,c,0,f[0]),s.set(l,c,1,f[1]),s.set(l,c,2,f[2]),s.set(l,c,3,f[3]),i.inBrowser||n.env.TEST||u.op()}i.extraManipulation&&(s=i.extraManipulation(s));var h=[],p=0,d=o(s,i.format,{quality:100});d.on("data",function(t){p+=t.length,h.push(t)}),d.on("end",function(){var t=r.concat(h,p).toString("base64"),e="data:image/"+i.format+";base64,"+t;i.output&&i.output(i.image,e,i.format),i.callback&&i.callback()})}})}}).call(this,t("_process"),t("buffer").Buffer)},{_process:94,buffer:4,"get-pixels":23,pace:70,"save-pixels":107}],178:[function(t,e,n){e.exports=function(e,n,r,i){function a(n,r){var i;if(n.match(/^data:/i))r(i=n);else if(!e.options.inBrowser&&n.match(/^https?:\/\//i))t(n.match(/^(https?):\/\//i)[1]).get(n,function(t){var e="",n=t.headers["content-type"];t.setEncoding("base64"),t.on("data",function(t){e+=t}),t.on("end",function(){r("data:"+n+";base64,"+e)})});else if(e.options.inBrowser){var a=n.split(".").pop(),o=document.createElement("img"),s=document.createElement("canvas"),u=s.getContext("2d");o.onload=function(){s.width=o.naturalWidth,s.height=o.naturalHeight,u.drawImage(o,0,0),i=s.toDataURL(a),r(i)},o.src=n}else i=t("urify")(n),r(i)}return function(t,n){var r={name:"load-image",description:"This initial step loads and displays the original image without any modifications.<br /><br />To work with a new or different image, drag one into the drop zone.",ID:e.options.sequencerCounter++,imageName:t,inBrowser:e.options.inBrowser,ui:e.options.ui},o={src:n,steps:[{options:{id:r.ID,name:"load-image",description:"This initial step loads and displays the original image without any modifications.",title:"Load Image",step:r},UI:e.events,draw:function(){return UI.onDraw(options.step),1==arguments.length?(this.output=a(arguments[0]),options.step.output=this.output,UI.onComplete(options.step),!0):2==arguments.length&&(this.output=a(arguments[0]),options.step.output=this.output,arguments[1](),UI.onComplete(options.step),!0)}}]};a(n,function(n){var r=function(t){return{src:t,format:t.split(":")[1].split(";")[0].split("/")[1]}}(n);e.images[t]=o;var a=e.images[t].steps[0];return a.output=r,a.options.step.output=a.output.src,a.UI.onSetup(a.options.step),a.UI.onDraw(a.options.step),a.UI.onComplete(a.options.step),i(),!0})}(n,r)}},{urify:128}],179:[function(t,e,n){e.exports=function(){return function(t){var e=$(t.dropZoneSelector),n=$(t.fileInputSelector),r=t.onLoad;function i(t){if(t.preventDefault(),t.stopPropagation(),t.target&&t.target.files)var e=t.target.files[0];else e=t.dataTransfer.files[0];if(e){var n=new FileReader;n.onload=r,n.readAsDataURL(e)}}new FileReader,n.on("change",i),e[0].addEventListener("drop",i,!1),e.on("dragover",function(t){t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy"},!1),e.on("dragenter",function(t){e.addClass("hover")}),e.on("dragleave",function(t){e.removeClass("hover")})}}},{}],180:[function(t,e,n){e.exports=function(t={}){return t.onSetup=t.onSetup||function(t){0==t.ui||(t.inBrowser?console.log('Added Step "'+t.name+'" to "'+t.imageName+'".'):console.log("[36m%s[0m",'Added Step "'+t.name+'" to "'+t.imageName+'".'))},t.onDraw=t.onDraw||function(t){0==t.ui||(t.inBrowser?console.log('Drawing Step "'+t.name+'" on "'+t.imageName+'".'):console.log("[33m%s[0m",'Drawing Step "'+t.name+'" on "'+t.imageName+'".'))},t.onComplete=t.onComplete||function(t){0==t.ui||(t.inBrowser?console.log('Drawn Step "'+t.name+'" on "'+t.imageName+'".'):console.log("[32m%s[0m",'Drawn Step "'+t.name+'" on "'+t.imageName+'".'))},t.onRemove=t.onRemove||function(t){0==t.ui||(t.inBrowser?console.log('Removing Step "'+t.name+'" of "'+t.imageName+'".'):console.log("[31m%s[0m",'Removing Step "'+t.name+'" of "'+t.imageName+'".'))},t}},{}],181:[function(t,e,n){e.exports=function(t){var e=void 0;return"jpeg"===(e=(e=function(t){return"data:image"===t.substr(0,10)}(t)?t.split(";")[0].split("/").pop():t.split(".").pop()).toLowerCase())&&(e="jpg"),e}},{}],182:[function(t,e,n){e.exports={getPreviousStep:function(){return this.getStep(-1)},getNextStep:function(){return this.getStep(1)},getInput:function(t){return t+this.getIndex()===0&&t++,this.getStep(t-1).output},getOuput:function(t){return this.getStep(t).output}}},{}]},{},[136]); |