-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
23 lines (23 loc) · 273 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Jimp=e():t.Jimp=e()}(self,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=58)}([function(t,e,r){"use strict";(function(t){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
var n=r(67),i=r(68),a=r(27);function o(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(o()<e)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=f.prototype:(null===t&&(t=new f(e)),t.length=e),t}function f(t,e,r){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return u(this,t,e,r)}function u(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);f.TYPED_ARRAY_SUPPORT?(t=e).__proto__=f.prototype:t=c(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!f.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,r),i=(t=s(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(f.isBuffer(e)){var r=0|d(e.length);return 0===(t=s(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?s(t,0):c(t,e);if("Buffer"===e.type&&a(e.data))return c(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function h(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 l(t,e){if(h(e),t=s(t,e<0?0:0|d(e)),!f.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function c(t,e){var r=e.length<0?0:0|d(e.length);t=s(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function d(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function p(t,e){if(f.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(t).length;default:if(n)return j(t).length;e=(""+e).toLowerCase(),n=!0}}function m(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return A(this,e,r);case"latin1":case"binary":return O(this,e,r);case"base64":return T(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=f.from(e,n)),f.isBuffer(e))return 0===e.length?-1:_(t,e,r,n,i);if("number"==typeof e)return e&=255,f.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):_(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,e,r,n,i){var a,o=1,s=t.length,f=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;o=2,s/=2,f/=2,r/=2}function u(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(i){var h=-1;for(a=r;a<s;a++)if(u(t,a)===u(e,-1===h?0:a-h)){if(-1===h&&(h=a),a-h+1===f)return h*o}else-1!==h&&(a-=a-h),h=-1}else for(r+f>s&&(r=s-f),a=r;a>=0;a--){for(var l=!0,c=0;c<f;c++)if(u(t,a+c)!==u(e,c)){l=!1;break}if(l)return a}return-1}function y(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=e.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(e.substr(2*o,2),16);if(isNaN(s))return o;t[r+o]=s}return o}function v(t,e,r,n){return H(j(e,t.length-r),t,r,n)}function w(t,e,r,n){return H(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return w(t,e,r,n)}function x(t,e,r,n){return H(z(e),t,r,n)}function S(t,e,r,n){return H(function(t,e){for(var r,n,i,a=[],o=0;o<t.length&&!((e-=2)<0);++o)r=t.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}(e,t.length-r),t,r,n)}function T(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function k(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var a,o,s,f,u=t[i],h=null,l=u>239?4:u>223?3:u>191?2:1;if(i+l<=r)switch(l){case 1:u<128&&(h=u);break;case 2:128==(192&(a=t[i+1]))&&(f=(31&u)<<6|63&a)>127&&(h=f);break;case 3:a=t[i+1],o=t[i+2],128==(192&a)&&128==(192&o)&&(f=(15&u)<<12|(63&a)<<6|63&o)>2047&&(f<55296||f>57343)&&(h=f);break;case 4:a=t[i+1],o=t[i+2],s=t[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(f=(15&u)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&f<1114112&&(h=f)}null===h?(h=65533,l=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=f,e.SlowBuffer=function(t){+t!=t&&(t=0);return f.alloc(+t)},e.INSPECT_MAX_BYTES=50,f.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=o(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,e,r){return u(null,t,e,r)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,e,r){return function(t,e,r,n){return h(e),e<=0?s(t,e):void 0!==r?"string"==typeof n?s(t,e).fill(r,n):s(t,e).fill(r):s(t,e)}(null,t,e,r)},f.allocUnsafe=function(t){return l(null,t)},f.allocUnsafeSlow=function(t){return l(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,e){if(!f.isBuffer(t)||!f.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i<a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},f.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}},f.concat=function(t,e){if(!a(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=f.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(!f.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},f.byteLength=p,f.prototype._isBuffer=!0,f.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)g(this,e,e+1);return this},f.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)g(this,e,e+3),g(this,e+1,e+2);return this},f.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)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},f.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?k(this,0,t):m.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},f.prototype.compare=function(t,e,r,n,i){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(e>>>=0),s=Math.min(a,o),u=this.slice(n,i),h=t.slice(e,r),l=0;l<s;++l)if(u[l]!==h[l]){a=u[l],o=h[l];break}return a<o?-1:o<a?1:0},f.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},f.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},f.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},f.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return y(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return E(this,t,e,r);case"base64":return x(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function O(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function I(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=e;a<r;++a)i+=U(t[a]);return i}function P(t,e,r){for(var n=t.slice(e,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function R(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,r,n,i,a){if(!f.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(r+n>t.length)throw new RangeError("Index out of range")}function C(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,a=Math.min(t.length-r,2);i<a;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function M(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,a=Math.min(t.length-r,4);i<a;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function D(t,e,r,n,i,a){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(t,e,r,n,a){return a||D(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function B(t,e,r,n,a){return a||D(t,0,r,8),i.write(t,e,r,n,52,8),r+8}f.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t),f.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=f.prototype;else{var i=e-t;r=new f(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+t]}return r},f.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n},f.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},f.prototype.readUInt8=function(t,e){return e||R(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,e){return e||R(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,e){return e||R(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,e){return e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,e){return e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=this[t],i=1,a=0;++a<e&&(i*=256);)n+=this[t+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},f.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=e,i=1,a=this[t+--n];n>0&&(i*=256);)a+=this[t+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*e)),a},f.prototype.readInt8=function(t,e){return e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,e){e||R(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(t,e){e||R(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(t,e){return e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[e]=255&t;++a<r&&(i*=256);)this[e+a]=t/i&255;return e+r},f.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||L(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[e+i]=255&t;--i>=0&&(a*=256);)this[e+i]=t/a&255;return e+r},f.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},f.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):C(this,t,e,!0),e+2},f.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):C(this,t,e,!1),e+2},f.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):M(this,t,e,!0),e+4},f.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},f.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var a=0,o=1,s=0;for(this[e]=255&t;++a<r&&(o*=256);)t<0&&0===s&&0!==this[e+a-1]&&(s=1),this[e+a]=(t/o>>0)-s&255;return e+r},f.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);L(this,t,e,r,i-1,-i)}var a=r-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+r},f.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},f.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):C(this,t,e,!0),e+2},f.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):C(this,t,e,!1),e+2},f.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):M(this,t,e,!0),e+4},f.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):M(this,t,e,!1),e+4},f.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},f.prototype.writeDoubleLE=function(t,e,r){return B(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return B(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,a=n-r;if(this===t&&r<e&&e<n)for(i=a-1;i>=0;--i)t[i+e]=this[i+r];else if(a<1e3||!f.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+a),e);return a},f.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!f.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var a;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(a=e;a<r;++a)this[a]=t;else{var o=f.isBuffer(t)?t:j(new f(t,n).toString()),s=o.length;for(a=0;a<r-e;++a)this[a+e]=o[a%s]}return this};var F=/[^+\/0-9A-Za-z-_]/g;function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function j(t,e){var r;e=e||1/0;for(var n=t.length,i=null,a=[],o=0;o<n;++o){if((r=t.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(e-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function z(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(F,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(2))},function(t,e){var r,n,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!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:a}catch(t){r=a}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var f,u=[],h=!1,l=-1;function c(){h&&f&&(h=!1,f.length?u=f.concat(u):l=-1,u.length&&d())}function d(){if(!h){var t=s(c);h=!0;for(var e=u.length;e;){for(f=u,u=[];++l<e;)f&&f[l].run();l=-1,e=u.length}f=null,h=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new p(t,e)),1!==u.length||h||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){(function(t){var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},i=/%[sdj%]/g;e.format=function(t){if(!b(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(s(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,a=n.length,o=String(t).replace(i,(function(t){if("%%"===t)return"%";if(r>=a)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),f=n[r];r<a;f=n[++r])m(f)||!v(f)?o+=" "+f:o+=" "+s(f);return o},e.deprecate=function(r,n){if(void 0!==t&&!0===t.noDeprecation)return r;if(void 0===t)return function(){return e.deprecate(r,n).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(n);t.traceDeprecation?console.trace(n):console.error(n),i=!0}return r.apply(this,arguments)}};var a,o={};function s(t,r){var n={seen:[],stylize:u};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&e._extend(n,r),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),h(n,t,n.depth)}function f(t,e){var r=s.styles[e];return r?"["+s.colors[r][0]+"m"+t+"["+s.colors[r][1]+"m":t}function u(t,e){return t}function h(t,r,n){if(t.customInspect&&r&&x(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return b(i)||(i=h(t,i,n)),i}var a=function(t,e){if(_(e))return t.stylize("undefined","undefined");if(b(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(g(e))return t.stylize(""+e,"number");if(p(e))return t.stylize(""+e,"boolean");if(m(e))return t.stylize("null","null")}(t,r);if(a)return a;var o=Object.keys(r),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(r)),E(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return l(r);if(0===o.length){if(x(r)){var f=r.name?": "+r.name:"";return t.stylize("[Function"+f+"]","special")}if(y(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return t.stylize(Date.prototype.toString.call(r),"date");if(E(r))return l(r)}var u,v="",S=!1,T=["{","}"];(d(r)&&(S=!0,T=["[","]"]),x(r))&&(v=" [Function"+(r.name?": "+r.name:"")+"]");return y(r)&&(v=" "+RegExp.prototype.toString.call(r)),w(r)&&(v=" "+Date.prototype.toUTCString.call(r)),E(r)&&(v=" "+l(r)),0!==o.length||S&&0!=r.length?n<0?y(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),u=S?function(t,e,r,n,i){for(var a=[],o=0,s=e.length;o<s;++o)O(e,String(o))?a.push(c(t,e,r,n,String(o),!0)):a.push("");return i.forEach((function(i){i.match(/^\d+$/)||a.push(c(t,e,r,n,i,!0))})),a}(t,r,n,s,o):o.map((function(e){return c(t,r,n,s,e,S)})),t.seen.pop(),function(t,e,r){if(t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(u,v,T)):T[0]+v+T[1]}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function c(t,e,r,n,i,a){var o,s,f;if((f=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?s=f.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):f.set&&(s=t.stylize("[Setter]","special")),O(n,i)||(o="["+i+"]"),s||(t.seen.indexOf(f.value)<0?(s=m(r)?h(t,f.value,null):h(t,f.value,r-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 d(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function m(t){return null===t}function g(t){return"number"==typeof t}function b(t){return"string"==typeof t}function _(t){return void 0===t}function y(t){return v(t)&&"[object RegExp]"===S(t)}function v(t){return"object"==typeof t&&null!==t}function w(t){return v(t)&&"[object Date]"===S(t)}function E(t){return v(t)&&("[object Error]"===S(t)||t instanceof Error)}function x(t){return"function"==typeof t}function S(t){return Object.prototype.toString.call(t)}function T(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(r){if(_(a)&&(a=t.env.NODE_DEBUG||""),r=r.toUpperCase(),!o[r])if(new RegExp("\\b"+r+"\\b","i").test(a)){var n=t.pid;o[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,n,t)}}else o[r]=function(){};return o[r]},e.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"},e.isArray=d,e.isBoolean=p,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=b,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=_,e.isRegExp=y,e.isObject=v,e.isDate=w,e.isError=E,e.isFunction=x,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(111);var k=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(){var t=new Date,e=[T(t.getHours()),T(t.getMinutes()),T(t.getSeconds())].join(":");return[t.getDate(),k[t.getMonth()],e].join(" ")}function O(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",A(),e.format.apply(e,arguments))},e.inherits=r(112),e._extend=function(t,e){if(!e||!v(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var I="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function P(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(I&&t[I]){var e;if("function"!=typeof(e=t[I]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,I,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],a=0;a<arguments.length;a++)i.push(arguments[a]);i.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,i)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),I&&Object.defineProperty(e,I,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,n(t))},e.promisify.custom=I,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var a=this,o=function(){return i.apply(a,arguments)};e.apply(this,r).then((function(e){t.nextTick(o,null,e)}),(function(e){t.nextTick(P,e,o)}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,n(e)),r}}).call(this,r(1))},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},function(t,e,r){"use strict";var n=r(15),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=l;var a=Object.create(r(9));a.inherits=r(4);var o=r(35),s=r(21);a.inherits(l,o);for(var f=i(s.prototype),u=0;u<f.length;u++){var h=f[u];l.prototype[h]||(l.prototype[h]=s.prototype[h])}function l(t){if(!(this instanceof l))return new l(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",c)}function c(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.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)}}),l.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e,r){"use strict";(function(t){var n=r(0).Buffer,i=r(16).Transform,a=r(109),o=r(3),s=r(23).ok,f=r(0).kMaxLength,u="Cannot create final Buffer. It would be larger than 0x"+f.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 h=Object.keys(a),l=0;l<h.length;l++){var c=h[l];c.match(/^Z/)&&Object.defineProperty(e,c,{enumerable:!0,value:a[c],writable:!1})}for(var d={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},p=Object.keys(d),m=0;m<p.length;m++){var g=p[m];d[d[g]]=g}function b(t,e,r){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>=f?o=new RangeError(u):e=n.concat(i,a),i=[],t.close(),r(o,e)}t.on("error",(function(e){t.removeListener("end",s),t.removeListener("readable",o),r(e)})),t.on("end",s),t.end(e),o()}function _(t,e){if("string"==typeof e&&(e=n.from(e)),!n.isBuffer(e))throw new TypeError("Not a string or buffer");var r=t._finishFlushFlag;return t._processChunk(e,r)}function y(t){if(!(this instanceof y))return new y(t);A.call(this,t,a.DEFLATE)}function v(t){if(!(this instanceof v))return new v(t);A.call(this,t,a.INFLATE)}function w(t){if(!(this instanceof w))return new w(t);A.call(this,t,a.GZIP)}function E(t){if(!(this instanceof E))return new E(t);A.call(this,t,a.GUNZIP)}function x(t){if(!(this instanceof x))return new x(t);A.call(this,t,a.DEFLATERAW)}function S(t){if(!(this instanceof S))return new S(t);A.call(this,t,a.INFLATERAW)}function T(t){if(!(this instanceof T))return new T(t);A.call(this,t,a.UNZIP)}function k(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 A(t,r){var o=this;if(this._opts=t=t||{},this._chunkSize=t.chunkSize||e.Z_DEFAULT_CHUNK,i.call(this,t),t.flush&&!k(t.flush))throw new Error("Invalid flush flag: "+t.flush);if(t.finishFlush&&!k(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<e.Z_MIN_CHUNK||t.chunkSize>e.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBits<e.Z_MIN_WINDOWBITS||t.windowBits>e.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.level<e.Z_MIN_LEVEL||t.level>e.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevel<e.Z_MIN_MEMLEVEL||t.memLevel>e.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+t.memLevel);if(t.strategy&&t.strategy!=e.Z_FILTERED&&t.strategy!=e.Z_HUFFMAN_ONLY&&t.strategy!=e.Z_RLE&&t.strategy!=e.Z_FIXED&&t.strategy!=e.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!n.isBuffer(t.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new a.Zlib(r);var s=this;this._hadError=!1,this._handle.onerror=function(t,r){O(s),s._hadError=!0;var n=new Error(t);n.errno=r,n.code=e.codes[r],s.emit("error",n)};var f=e.Z_DEFAULT_COMPRESSION;"number"==typeof t.level&&(f=t.level);var u=e.Z_DEFAULT_STRATEGY;"number"==typeof t.strategy&&(u=t.strategy),this._handle.init(t.windowBits||e.Z_DEFAULT_WINDOWBITS,f,t.memLevel||e.Z_DEFAULT_MEMLEVEL,u,t.dictionary),this._buffer=n.allocUnsafe(this._chunkSize),this._offset=0,this._level=f,this._strategy=u,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!o._handle},configurable:!0,enumerable:!0})}function O(e,r){r&&t.nextTick(r),e._handle&&(e._handle.close(),e._handle=null)}function I(t){t.emit("close")}Object.defineProperty(e,"codes",{enumerable:!0,value:Object.freeze(d),writable:!1}),e.Deflate=y,e.Inflate=v,e.Gzip=w,e.Gunzip=E,e.DeflateRaw=x,e.InflateRaw=S,e.Unzip=T,e.createDeflate=function(t){return new y(t)},e.createInflate=function(t){return new v(t)},e.createDeflateRaw=function(t){return new x(t)},e.createInflateRaw=function(t){return new S(t)},e.createGzip=function(t){return new w(t)},e.createGunzip=function(t){return new E(t)},e.createUnzip=function(t){return new T(t)},e.deflate=function(t,e,r){return"function"==typeof e&&(r=e,e={}),b(new y(e),t,r)},e.deflateSync=function(t,e){return _(new y(e),t)},e.gzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),b(new w(e),t,r)},e.gzipSync=function(t,e){return _(new w(e),t)},e.deflateRaw=function(t,e,r){return"function"==typeof e&&(r=e,e={}),b(new x(e),t,r)},e.deflateRawSync=function(t,e){return _(new x(e),t)},e.unzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),b(new T(e),t,r)},e.unzipSync=function(t,e){return _(new T(e),t)},e.inflate=function(t,e,r){return"function"==typeof e&&(r=e,e={}),b(new v(e),t,r)},e.inflateSync=function(t,e){return _(new v(e),t)},e.gunzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),b(new E(e),t,r)},e.gunzipSync=function(t,e){return _(new E(e),t)},e.inflateRaw=function(t,e,r){return"function"==typeof e&&(r=e,e={}),b(new S(e),t,r)},e.inflateRawSync=function(t,e){return _(new S(e),t)},o.inherits(A,i),A.prototype.params=function(r,n,i){if(r<e.Z_MIN_LEVEL||r>e.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+r);if(n!=e.Z_FILTERED&&n!=e.Z_HUFFMAN_ONLY&&n!=e.Z_RLE&&n!=e.Z_FIXED&&n!=e.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==r||this._strategy!==n){var o=this;this.flush(a.Z_SYNC_FLUSH,(function(){s(o._handle,"zlib binding closed"),o._handle.params(r,n),o._hadError||(o._level=r,o._strategy=n,i&&i())}))}else t.nextTick(i)},A.prototype.reset=function(){return s(this._handle,"zlib binding closed"),this._handle.reset()},A.prototype._flush=function(t){this._transform(n.alloc(0),"",t)},A.prototype.flush=function(e,r){var i=this,o=this._writableState;("function"==typeof e||void 0===e&&!r)&&(r=e,e=a.Z_FULL_FLUSH),o.ended?r&&t.nextTick(r):o.ending?r&&this.once("end",r):o.needDrain?r&&this.once("drain",(function(){return i.flush(e,r)})):(this._flushFlag=e,this.write(n.alloc(0),"",r))},A.prototype.close=function(e){O(this,e),t.nextTick(I,this)},A.prototype._transform=function(t,e,r){var i,o=this._writableState,s=(o.ending||o.ended)&&(!t||o.length===t.length);return null===t||n.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,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},A.prototype._processChunk=function(t,e,r){var i=t&&t.length,a=this._chunkSize-this._offset,o=0,h=this,l="function"==typeof r;if(!l){var c,d=[],p=0;this.on("error",(function(t){c=t})),s(this._handle,"zlib binding closed");do{var m=this._handle.writeSync(e,t,o,i,this._buffer,this._offset,a)}while(!this._hadError&&_(m[0],m[1]));if(this._hadError)throw c;if(p>=f)throw O(this),new RangeError(u);var g=n.concat(d,p);return O(this),g}s(this._handle,"zlib binding closed");var b=this._handle.write(e,t,o,i,this._buffer,this._offset,a);function _(f,u){if(this&&(this.buffer=null,this.callback=null),!h._hadError){var c=a-u;if(s(c>=0,"have should not go down"),c>0){var m=h._buffer.slice(h._offset,h._offset+c);h._offset+=c,l?h.push(m):(d.push(m),p+=m.length)}if((0===u||h._offset>=h._chunkSize)&&(a=h._chunkSize,h._offset=0,h._buffer=n.allocUnsafe(h._chunkSize)),0===u){if(o+=i-f,i=f,!l)return!0;var g=h._handle.write(e,t,o,i,h._buffer,h._offset,h._chunkSize);return g.callback=_,void(g.buffer=t)}if(!l)return!1;r()}}b.buffer=t,b.callback=_},o.inherits(y,A),o.inherits(v,A),o.inherits(w,A),o.inherits(E,A),o.inherits(x,A),o.inherits(S,A),o.inherits(T,A)}).call(this,r(1))},function(t,e,r){(e=t.exports=r(35)).Stream=e,e.Readable=e,e.Writable=r(21),e.Duplex=r(5),e.Transform=r(39),e.PassThrough=r(95)},function(t,e,r){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(0).Buffer.isBuffer},function(t,e,r){"use strict";t.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}},function(t,e,r){var n=r(18);function i(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==n(t)&&"function"!=typeof t)return{default:t};var e=i();if(e&&e.has(t))return e.get(t);var r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var s=a?Object.getOwnPropertyDescriptor(t,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=t[o]}return r.default=t,e&&e.set(t,r),r}},function(t,e){t.exports=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}},function(t,e,r){"use strict";var n,i="object"==typeof Reflect?Reflect:null,a=i&&"function"==typeof i.apply?i.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,a),n(r)}function a(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}b(t,e,a,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&b(t,"error",e,r)}(t,i,{once:!0})}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var f=10;function u(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function h(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function l(t,e,r,n){var i,a,o,s;if(u(r),void 0===(a=t._events)?(a=t._events=Object.create(null),t._eventsCount=0):(void 0!==a.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),o=a[e]),void 0===o)o=a[e]=r,++t._eventsCount;else if("function"==typeof o?o=a[e]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=h(t))>0&&o.length>i&&!o.warned){o.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=o.length,s=f,console&&console.warn&&console.warn(s)}return t}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function p(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):g(i,i.length)}function m(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function g(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function b(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(a){n.once&&t.removeEventListener(e,i),r(a)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return f},set:function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");f=t}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},s.prototype.getMaxListeners=function(){return h(this)},s.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(e.length>0&&(o=e[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var f=i[t];if(void 0===f)return!1;if("function"==typeof f)a(f,this,e);else{var u=f.length,h=g(f,u);for(r=0;r<u;++r)a(h[r],this,e)}return!0},s.prototype.addListener=function(t,e){return l(this,t,e,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(t,e){return l(this,t,e,!0)},s.prototype.once=function(t,e){return u(e),this.on(t,d(this,t,e)),this},s.prototype.prependOnceListener=function(t,e){return u(e),this.prependListener(t,d(this,t,e)),this},s.prototype.removeListener=function(t,e){var r,n,i,a,o;if(u(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,a=r.length-1;a>=0;a--)if(r[a]===e||r[a].listener===e){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,o||e)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,a=Object.keys(r);for(n=0;n<a.length;++n)"removeListener"!==(i=a[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},s.prototype.listeners=function(t){return p(this,t,!0)},s.prototype.rawListeners=function(t){return p(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(t,e,r){"use strict";var n=r(6);Object.defineProperty(e,"__esModule",{value:!0}),e.isNodePattern=function(t){if(void 0===t)return!1;if("function"!=typeof t)throw new TypeError("Callback must be a function");return!0},e.throwError=function(t,e){"string"==typeof t&&(t=new Error(t));if("function"==typeof e)return e.call(this,t);throw t},e.scan=function(t,e,r,n,i,a){e=Math.round(e),r=Math.round(r),n=Math.round(n),i=Math.round(i);for(var o=r;o<r+i;o++)for(var s=e;s<e+n;s++){var f=t.bitmap.width*o+s<<2;a.call(t,s,o,f)}return t},e.scanIterator=o;var i=n(r(76)),a=i.default.mark(o);function o(t,e,r,n,o){var s,f,u;return i.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:e=Math.round(e),r=Math.round(r),n=Math.round(n),o=Math.round(o),s=r;case 5:if(!(s<r+o)){i.next=17;break}f=e;case 7:if(!(f<e+n)){i.next=14;break}return u=t.bitmap.width*s+f<<2,i.next=11,{x:f,y:s,idx:u,image:t};case 11:f++,i.next=7;break;case 14:s++,i.next=5;break;case 17:case"end":return i.stop()}}),a)}},function(t,e,r){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,r)}));case 3:return e.nextTick((function(){t.call(null,r,n)}));case 4:return e.nextTick((function(){t.call(null,r,n,i)}));default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return e.nextTick((function(){t.apply(null,a)}))}}}:t.exports=e}).call(this,r(1))},function(t,e,r){t.exports=i;var n=r(13).EventEmitter;function i(){n.call(this)}r(4)(i,n),i.Readable=r(8),i.Writable=r(105),i.Duplex=r(106),i.Transform=r(107),i.PassThrough=r(108),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function a(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",a),t._isStdio||e&&!1===e.end||(r.on("end",s),r.on("close",f));var o=!1;function s(){o||(o=!0,t.end())}function f(){o||(o=!0,"function"==typeof t.destroy&&t.destroy())}function u(t){if(h(),0===n.listenerCount(this,"error"))throw t}function h(){r.removeListener("data",i),t.removeListener("drain",a),r.removeListener("end",s),r.removeListener("close",f),r.removeListener("error",u),t.removeListener("error",u),r.removeListener("end",h),r.removeListener("close",h),t.removeListener("close",h)}return r.on("error",u),t.on("error",u),r.on("end",h),r.on("close",h),t.on("close",h),t.emit("pipe",r),t}},function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(t[n]=r[n])}}return t},e.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,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var a=0;a<n;a++)t[i+a]=e[r+a]},flattenChunks:function(t){var e,r,n,i,a,o;for(n=0,e=0,r=t.length;e<r;e++)n+=t[e].length;for(o=new Uint8Array(n),i=0,e=0,r=t.length;e<r;e++)a=t[e],o.set(a,i),i+=a.length;return o}},o={arraySet:function(t,e,r,n,i){for(var a=0;a<n;a++)t[i+a]=e[r+a]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,a)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,o))},e.setTyped(n)},function(t,e){function r(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=r=function(t){return typeof t}:t.exports=r=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(e)}t.exports=r},function(t,e,r){var n=r(63),i=r(64),a=r(26),o=r(65);t.exports=function(t,e){return n(t)||i(t,e)||a(t,e)||o()}},function(t,e,r){var n=r(0),i=n.Buffer;function a(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(a(n,e),e.Buffer=o),a(i,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},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 n.SlowBuffer(t)}},function(t,e,r){"use strict";(function(e,n,i){var a=r(15);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=_;var s,f=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:a.nextTick;_.WritableState=b;var u=Object.create(r(9));u.inherits=r(4);var h={deprecate:r(93)},l=r(36),c=r(20).Buffer,d=i.Uint8Array||function(){};var p,m=r(37);function g(){}function b(t,e){s=s||r(5),t=t||{};var n=e instanceof s;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,u=t.writableHighWaterMark,h=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(u||0===u)?u:h,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 l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.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,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(a.nextTick(i,n),a.nextTick(S,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),S(t,e))}(t,r,n,e,i);else{var o=E(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),n?f(v,t,r,o,i):v(t,r,o,i)}}(e,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 _(t){if(s=s||r(5),!(p.call(_,this)||this instanceof s))return new _(t);this._writableState=new b(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function y(t,e,r,n,i,a,o){e.writelen=n,e.writecb=o,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,a,e.onwrite),e.sync=!1}function v(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),S(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),a=e.corkedRequestsFree;a.entry=r;for(var s=0,f=!0;r;)i[s]=r,r.isBuf||(f=!1),r=r.next,s+=1;i.allBuffers=f,y(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(;r;){var u=r.chunk,h=r.encoding,l=r.callback;if(y(t,e,!1,e.objectMode?1:u.length,u,h,l),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function E(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function x(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),S(t,e)}))}function S(t,e){var r=E(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,a.nextTick(x,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}u.inherits(_,l),b.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(b.prototype,"buffer",{get:h.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]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===_&&(t&&t._writableState instanceof b)}})):p=function(t){return t instanceof this},_.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},_.prototype.write=function(t,e,r){var n,i=this._writableState,o=!1,s=!i.objectMode&&(n=t,c.isBuffer(n)||n instanceof d);return s&&!c.isBuffer(t)&&(t=function(t){return c.from(t)}(t)),"function"==typeof e&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=g),i.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),a.nextTick(e,r)}(this,r):(s||function(t,e,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(t.emit("error",o),a.nextTick(n,o),i=!1),i}(this,i,t,r))&&(i.pendingcb++,o=function(t,e,r,n,i,a){if(!r){var o=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=c.from(e,r));return e}(e,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=e.objectMode?1:n.length;e.length+=s;var f=e.length<e.highWaterMark;f||(e.needDrain=!0);if(e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else y(t,e,!1,s,n,i,a);return f}(this,i,s,t,e,r)),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||w(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,r){r(new Error("_write() is not implemented"))},_.prototype._writev=null,_.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,S(t,e),r&&(e.finished?a.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},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=m.destroy,_.prototype._undestroy=m.undestroy,_.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(1),r(91).setImmediate,r(2))},function(t,e,r){"use strict";var n=r(99),i=r(101);function a(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=y,e.resolve=function(t,e){return y(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?y(t,!1,!0).resolveObject(e):e},e.format=function(t){i.isString(t)&&(t=y(t));return t instanceof a?t.format():a.prototype.format.call(t)},e.Url=a;var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,u=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),h=["'"].concat(u),l=["%","/","?",";","#"].concat(h),c=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},g={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},_=r(40);function y(t,e,r){if(t&&i.isObject(t)&&t instanceof a)return t;var n=new a;return n.parse(t,e,r),n}a.prototype.parse=function(t,e,r){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var a=t.indexOf("?"),s=-1!==a&&a<t.indexOf("#")?"?":"#",u=t.split(s);u[0]=u[0].replace(/\\/g,"/");var y=t=u.join(s);if(y=y.trim(),!r&&1===t.split("#").length){var v=f.exec(y);if(v)return this.path=y,this.href=y,this.pathname=v[1],v[2]?(this.search=v[2],this.query=e?_.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var w=o.exec(y);if(w){var E=(w=w[0]).toLowerCase();this.protocol=E,y=y.substr(w.length)}if(r||w||y.match(/^\/\/[^@\/]+@[^@\/]+/)){var x="//"===y.substr(0,2);!x||w&&g[w]||(y=y.substr(2),this.slashes=!0)}if(!g[w]&&(x||w&&!b[w])){for(var S,T,k=-1,A=0;A<c.length;A++){-1!==(O=y.indexOf(c[A]))&&(-1===k||O<k)&&(k=O)}-1!==(T=-1===k?y.lastIndexOf("@"):y.lastIndexOf("@",k))&&(S=y.slice(0,T),y=y.slice(T+1),this.auth=decodeURIComponent(S)),k=-1;for(A=0;A<l.length;A++){var O;-1!==(O=y.indexOf(l[A]))&&(-1===k||O<k)&&(k=O)}-1===k&&(k=y.length),this.host=y.slice(0,k),y=y.slice(k),this.parseHost(),this.hostname=this.hostname||"";var I="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!I)for(var P=this.hostname.split(/\./),R=(A=0,P.length);A<R;A++){var L=P[A];if(L&&!L.match(d)){for(var C="",M=0,D=L.length;M<D;M++)L.charCodeAt(M)>127?C+="x":C+=L[M];if(!C.match(d)){var N=P.slice(0,A),B=P.slice(A+1),F=L.match(p);F&&(N.push(F[1]),B.unshift(F[2])),B.length&&(y="/"+B.join(".")+y),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),I||(this.hostname=n.toASCII(this.hostname));var U=this.port?":"+this.port:"",j=this.hostname||"";this.host=j+U,this.href+=this.host,I&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!m[E])for(A=0,R=h.length;A<R;A++){var z=h[A];if(-1!==y.indexOf(z)){var H=encodeURIComponent(z);H===z&&(H=escape(z)),y=y.split(z).join(H)}}var G=y.indexOf("#");-1!==G&&(this.hash=y.substr(G),y=y.slice(0,G));var Z=y.indexOf("?");if(-1!==Z?(this.search=y.substr(Z),this.query=y.substr(Z+1),e&&(this.query=_.parse(this.query)),y=y.slice(0,Z)):e&&(this.search="",this.query={}),y&&(this.pathname=y),b[E]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){U=this.pathname||"";var q=this.search||"";this.path=U+q}return this.href=this.format(),this},a.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",a=!1,o="";this.host?a=t+this.host:this.hostname&&(a=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(a+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(o=_.stringify(this.query));var s=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||b[e])&&!1!==a?(a="//"+(a||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):a||(a=""),n&&"#"!==n.charAt(0)&&(n="#"+n),s&&"?"!==s.charAt(0)&&(s="?"+s),e+a+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(s=s.replace("#","%23"))+n},a.prototype.resolve=function(t){return this.resolveObject(y(t,!1,!0)).format()},a.prototype.resolveObject=function(t){if(i.isString(t)){var e=new a;e.parse(t,!1,!0),t=e}for(var r=new a,n=Object.keys(this),o=0;o<n.length;o++){var s=n[o];r[s]=this[s]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var f=Object.keys(t),u=0;u<f.length;u++){var h=f[u];"protocol"!==h&&(r[h]=t[h])}return b[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!b[t.protocol]){for(var l=Object.keys(t),c=0;c<l.length;c++){var d=l[c];r[d]=t[d]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||g[t.protocol])r.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),r.pathname=p.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var m=r.pathname||"",_=r.search||"";r.path=m+_}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var y=r.pathname&&"/"===r.pathname.charAt(0),v=t.host||t.pathname&&"/"===t.pathname.charAt(0),w=v||y||r.host&&t.pathname,E=w,x=r.pathname&&r.pathname.split("/")||[],S=(p=t.pathname&&t.pathname.split("/")||[],r.protocol&&!b[r.protocol]);if(S&&(r.hostname="",r.port=null,r.host&&(""===x[0]?x[0]=r.host:x.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),w=w&&(""===p[0]||""===x[0])),v)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,x=p;else if(p.length)x||(x=[]),x.pop(),x=x.concat(p),r.search=t.search,r.query=t.query;else if(!i.isNullOrUndefined(t.search)){if(S)r.hostname=r.host=x.shift(),(I=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift());return r.search=t.search,r.query=t.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!x.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var T=x.slice(-1)[0],k=(r.host||t.host||x.length>1)&&("."===T||".."===T)||""===T,A=0,O=x.length;O>=0;O--)"."===(T=x[O])?x.splice(O,1):".."===T?(x.splice(O,1),A++):A&&(x.splice(O,1),A--);if(!w&&!E)for(;A--;A)x.unshift("..");!w||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),k&&"/"!==x.join("/").substr(-1)&&x.push("");var I,P=""===x[0]||x[0]&&"/"===x[0].charAt(0);S&&(r.hostname=r.host=P?"":x.length?x.shift():"",(I=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift()));return(w=w||r.host&&x.length)&&!P&&x.unshift(""),x.length?r.pathname=x.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},a.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},function(t,e,r){"use strict";(function(e){var n=r(110);
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <[email protected]> <http://feross.org>
* @license MIT
*/function i(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,a=Math.min(r,n);i<a;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function a(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var o=r(3),s=Object.prototype.hasOwnProperty,f=Array.prototype.slice,u="foo"===function(){}.name;function h(t){return Object.prototype.toString.call(t)}function l(t){return!a(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var c=t.exports=_,d=/\s*function\s+([^\(\s]*)\s*/;function p(t){if(o.isFunction(t)){if(u)return t.name;var e=t.toString().match(d);return e&&e[1]}}function m(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function g(t){if(u||!o.isFunction(t))return o.inspect(t);var e=p(t);return"[Function"+(e?": "+e:"")+"]"}function b(t,e,r,n,i){throw new c.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function _(t,e){t||b(t,!0,e,"==",c.ok)}function y(t,e,r,n){if(t===e)return!0;if(a(t)&&a(e))return 0===i(t,e);if(o.isDate(t)&&o.isDate(e))return t.getTime()===e.getTime();if(o.isRegExp(t)&&o.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(l(t)&&l(e)&&h(t)===h(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===i(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(a(t)!==a(e))return!1;var s=(n=n||{actual:[],expected:[]}).actual.indexOf(t);return-1!==s&&s===n.expected.indexOf(e)||(n.actual.push(t),n.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(o.isPrimitive(t)||o.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=v(t),a=v(e);if(i&&!a||!i&&a)return!1;if(i)return t=f.call(t),e=f.call(e),y(t,e,r);var s,u,h=x(t),l=x(e);if(h.length!==l.length)return!1;for(h.sort(),l.sort(),u=h.length-1;u>=0;u--)if(h[u]!==l[u])return!1;for(u=h.length-1;u>=0;u--)if(s=h[u],!y(t[s],e[s],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function v(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function w(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 E(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&b(i,r,"Missing expected exception"+n);var a="string"==typeof n,s=!t&&i&&!r;if((!t&&o.isError(i)&&a&&w(i,r)||s)&&b(i,r,"Got unwanted exception"+n),t&&i&&r&&!w(i,r)||!t&&i)throw i}c.AssertionError=function(t){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=function(t){return m(g(t.actual),128)+" "+t.operator+" "+m(g(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=p(e),a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},o.inherits(c.AssertionError,Error),c.fail=b,c.ok=_,c.equal=function(t,e,r){t!=e&&b(t,e,r,"==",c.equal)},c.notEqual=function(t,e,r){t==e&&b(t,e,r,"!=",c.notEqual)},c.deepEqual=function(t,e,r){y(t,e,!1)||b(t,e,r,"deepEqual",c.deepEqual)},c.deepStrictEqual=function(t,e,r){y(t,e,!0)||b(t,e,r,"deepStrictEqual",c.deepStrictEqual)},c.notDeepEqual=function(t,e,r){y(t,e,!1)&&b(t,e,r,"notDeepEqual",c.notDeepEqual)},c.notDeepStrictEqual=function t(e,r,n){y(e,r,!0)&&b(e,r,n,"notDeepStrictEqual",t)},c.strictEqual=function(t,e,r){t!==e&&b(t,e,r,"===",c.strictEqual)},c.notStrictEqual=function(t,e,r){t===e&&b(t,e,r,"!==",c.notStrictEqual)},c.throws=function(t,e,r){E(!0,t,e,r)},c.doesNotThrow=function(t,e,r){E(!1,t,e,r)},c.ifError=function(t){if(t)throw t},c.strict=n((function t(e,r){e||b(e,!0,r,"==",t)}),c,{equal:c.strictEqual,deepEqual:c.deepStrictEqual,notEqual:c.notStrictEqual,notDeepEqual:c.notDeepStrictEqual}),c.strict.strict=c.strict;var x=Object.keys||function(t){var e=[];for(var r in t)s.call(t,r)&&e.push(r);return e}}).call(this,r(2))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EDGE_CROP=e.EDGE_WRAP=e.EDGE_EXTEND=e.BLEND_EXCLUSION=e.BLEND_DIFFERENCE=e.BLEND_HARDLIGHT=e.BLEND_LIGHTEN=e.BLEND_DARKEN=e.BLEND_OVERLAY=e.BLEND_SCREEN=e.BLEND_ADD=e.BLEND_MULTIPLY=e.BLEND_DESTINATION_OVER=e.BLEND_SOURCE_OVER=e.VERTICAL_ALIGN_BOTTOM=e.VERTICAL_ALIGN_MIDDLE=e.VERTICAL_ALIGN_TOP=e.HORIZONTAL_ALIGN_RIGHT=e.HORIZONTAL_ALIGN_CENTER=e.HORIZONTAL_ALIGN_LEFT=e.AUTO=void 0;e.AUTO=-1;e.HORIZONTAL_ALIGN_LEFT=1;e.HORIZONTAL_ALIGN_CENTER=2;e.HORIZONTAL_ALIGN_RIGHT=4;e.VERTICAL_ALIGN_TOP=8;e.VERTICAL_ALIGN_MIDDLE=16;e.VERTICAL_ALIGN_BOTTOM=32;e.BLEND_SOURCE_OVER="srcOver";e.BLEND_DESTINATION_OVER="dstOver";e.BLEND_MULTIPLY="multiply";e.BLEND_ADD="add";e.BLEND_SCREEN="screen";e.BLEND_OVERLAY="overlay";e.BLEND_DARKEN="darken";e.BLEND_LIGHTEN="lighten";e.BLEND_HARDLIGHT="hardLight";e.BLEND_DIFFERENCE="difference";e.BLEND_EXCLUSION="exclusion";e.EDGE_EXTEND=1;e.EDGE_WRAP=2;e.EDGE_CROP=3},function(t,e){t.exports=function(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}},function(t,e,r){var n=r(25);t.exports=function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e){function r(e,n){return t.exports=r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},r(e,n)}t.exports=r},function(t,e){t.exports=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}},function(t,e){},function(t,e,r){(function(t){function r(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}e.resolve=function(){for(var e="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(e=o+"/"+e,i="/"===o.charAt(0))}return(i?"/":"")+(e=r(n(e.split("/"),(function(t){return!!t})),!i).join("/"))||"."},e.normalize=function(t){var a=e.isAbsolute(t),o="/"===i(t,-1);return(t=r(n(t.split("/"),(function(t){return!!t})),!a).join("/"))||a||(t="."),t&&o&&(t+="/"),(a?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(n(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,r){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=e.resolve(t).substr(1),r=e.resolve(r).substr(1);for(var i=n(t.split("/")),a=n(r.split("/")),o=Math.min(i.length,a.length),s=o,f=0;f<o;f++)if(i[f]!==a[f]){s=f;break}var u=[];for(f=s;f<i.length;f++)u.push("..");return(u=u.concat(a.slice(s))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),r=47===e,n=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!i){n=a;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"/":t.slice(0,n)},e.basename=function(t,e){var r=function(t){"string"!=typeof t&&(t+="");var e,r=0,n=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){r=e+1;break}}else-1===n&&(i=!1,n=e+1);return-1===n?"":t.slice(r,n)}(t);return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,r=0,n=-1,i=!0,a=0,o=t.length-1;o>=0;--o){var s=t.charCodeAt(o);if(47!==s)-1===n&&(i=!1,n=o+1),46===s?-1===e?e=o:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){r=o+1;break}}return-1===e||-1===n||0===a||1===a&&e===n-1&&e===r+1?"":t.slice(e,n)};var i="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,r(1))},function(t,e,r){(function(t){var n=r(87),i=r(34),a=r(97),o=r(98),s=r(22),f=e;f.request=function(e,r){e="string"==typeof e?s.parse(e):a(e);var i=-1===t.location.protocol.search(/^https?:$/)?"http:":"",o=e.protocol||i,f=e.hostname||e.host,u=e.port,h=e.path||"/";f&&-1!==f.indexOf(":")&&(f="["+f+"]"),e.url=(f?o+"//"+f:"")+(u?":"+u:"")+h,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var l=new n(e);return r&&l.on("response",r),l},f.get=function(t,e){var r=f.request(t,e);return r.end(),r},f.ClientRequest=n,f.IncomingMessage=i.IncomingMessage,f.Agent=function(){},f.Agent.defaultMaxSockets=4,f.globalAgent=new f.Agent,f.STATUS_CODES=o,f.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,r(2))},function(t,e,r){(function(t){e.fetch=s(t.fetch)&&s(t.ReadableStream),e.writableStream=s(t.WritableStream),e.abortController=s(t.AbortController),e.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),e.blobConstructor=!0}catch(t){}var r;function n(){if(void 0!==r)return r;if(t.XMLHttpRequest){r=new t.XMLHttpRequest;try{r.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(t){r=null}}else r=null;return r}function i(t){var e=n();if(!e)return!1;try{return e.responseType=t,e.responseType===t}catch(t){}return!1}var a=void 0!==t.ArrayBuffer,o=a&&s(t.ArrayBuffer.prototype.slice);function s(t){return"function"==typeof t}e.arraybuffer=e.fetch||a&&i("arraybuffer"),e.msstream=!e.fetch&&o&&i("ms-stream"),e.mozchunkedarraybuffer=!e.fetch&&a&&i("moz-chunked-arraybuffer"),e.overrideMimeType=e.fetch||!!n()&&s(n().overrideMimeType),e.vbArray=s(t.VBArray),r=null}).call(this,r(2))},function(t,e,r){(function(t,n,i){var a=r(33),o=r(4),s=r(8),f=e.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},u=e.IncomingMessage=function(e,r,o,f){var u=this;if(s.Readable.call(u),u._mode=o,u.headers={},u.rawHeaders=[],u.trailers={},u.rawTrailers=[],u.on("end",(function(){t.nextTick((function(){u.emit("close")}))})),"fetch"===o){if(u._fetchResponse=r,u.url=r.url,u.statusCode=r.status,u.statusMessage=r.statusText,r.headers.forEach((function(t,e){u.headers[e.toLowerCase()]=t,u.rawHeaders.push(e,t)})),a.writableStream){var h=new WritableStream({write:function(t){return new Promise((function(e,r){u._destroyed?r():u.push(new n(t))?e():u._resumeFetch=e}))},close:function(){i.clearTimeout(f),u._destroyed||u.push(null)},abort:function(t){u._destroyed||u.emit("error",t)}});try{return void r.body.pipeTo(h).catch((function(t){i.clearTimeout(f),u._destroyed||u.emit("error",t)}))}catch(t){}}var l=r.body.getReader();!function t(){l.read().then((function(e){if(!u._destroyed){if(e.done)return i.clearTimeout(f),void u.push(null);u.push(new n(e.value)),t()}})).catch((function(t){i.clearTimeout(f),u._destroyed||u.emit("error",t)}))}()}else{if(u._xhr=e,u._pos=0,u.url=e.responseURL,u.statusCode=e.status,u.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(t){var e=t.match(/^([^:]+):\s*(.*)/);if(e){var r=e[1].toLowerCase();"set-cookie"===r?(void 0===u.headers[r]&&(u.headers[r]=[]),u.headers[r].push(e[2])):void 0!==u.headers[r]?u.headers[r]+=", "+e[2]:u.headers[r]=e[2],u.rawHeaders.push(e[1],e[2])}})),u._charset="x-user-defined",!a.overrideMimeType){var c=u.rawHeaders["mime-type"];if(c){var d=c.match(/;\s*charset=([^;])(;|$)/);d&&(u._charset=d[1].toLowerCase())}u._charset||(u._charset="utf-8")}}};o(u,s.Readable),u.prototype._read=function(){var t=this._resumeFetch;t&&(this._resumeFetch=null,t())},u.prototype._onXHRProgress=function(){var t=this,e=t._xhr,r=null;switch(t._mode){case"text:vbarray":if(e.readyState!==f.DONE)break;try{r=new i.VBArray(e.responseBody).toArray()}catch(t){}if(null!==r){t.push(new n(r));break}case"text":try{r=e.responseText}catch(e){t._mode="text:vbarray";break}if(r.length>t._pos){var a=r.substr(t._pos);if("x-user-defined"===t._charset){for(var o=new n(a.length),s=0;s<a.length;s++)o[s]=255&a.charCodeAt(s);t.push(o)}else t.push(a,t._charset);t._pos=r.length}break;case"arraybuffer":if(e.readyState!==f.DONE||!e.response)break;r=e.response,t.push(new n(new Uint8Array(r)));break;case"moz-chunked-arraybuffer":if(r=e.response,e.readyState!==f.LOADING||!r)break;t.push(new n(new Uint8Array(r)));break;case"ms-stream":if(r=e.response,e.readyState!==f.LOADING)break;var u=new i.MSStreamReader;u.onprogress=function(){u.result.byteLength>t._pos&&(t.push(new n(new Uint8Array(u.result.slice(t._pos)))),t._pos=u.result.byteLength)},u.onload=function(){t.push(null)},u.readAsArrayBuffer(r)}t._xhr.readyState===f.DONE&&"ms-stream"!==t._mode&&t.push(null)}}).call(this,r(1),r(0).Buffer,r(2))},function(t,e,r){"use strict";(function(e,n){var i=r(15);t.exports=y;var a,o=r(27);y.ReadableState=_;r(13).EventEmitter;var s=function(t,e){return t.listeners(e).length},f=r(36),u=r(20).Buffer,h=e.Uint8Array||function(){};var l=Object.create(r(9));l.inherits=r(4);var c=r(88),d=void 0;d=c&&c.debuglog?c.debuglog("stream"):function(){};var p,m=r(89),g=r(37);l.inherits(y,f);var b=["error","close","destroy","pause","resume"];function _(t,e){t=t||{};var n=e instanceof(a=a||r(5));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,o=t.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,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=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(38).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function y(t){if(a=a||r(5),!(this instanceof y))return new y(t);this._readableState=new _(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),f.call(this)}function v(t,e,r,n,i){var a,o=t._readableState;null===e?(o.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,x(t)}(t,o)):(i||(a=function(t,e){var r;n=e,u.isBuffer(n)||n instanceof h||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(o,e)),a?t.emit("error",a):o.objectMode||e&&e.length>0?("string"==typeof e||o.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),n?o.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,o,e,!0):o.ended?t.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(e=o.decoder.write(e),o.objectMode||0!==e.length?w(t,o,e,!1):T(t,o)):w(t,o,e,!1))):n||(o.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(o)}function w(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&x(t)),T(t,e)}Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(t,e){this.push(null),e(t)},y.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=u.from(t,e),e=""),r=!0),v(this,t,e,!1,r)},y.prototype.unshift=function(t){return v(this,t,null,!0,!1)},y.prototype.isPaused=function(){return!1===this._readableState.flowing},y.prototype.setEncoding=function(t){return p||(p=r(38).StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};function E(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>=8388608?t=8388608:(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 x(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(S,t):S(t))}function S(t){d("emit readable"),t.emit("readable"),I(t)}function T(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(k,t,e))}function k(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(d("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function A(t){d("readable nexttick read 0"),t.read(0)}function O(t,e){e.reading||(d("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),I(t),e.flowing&&!e.reading&&t.read(0)}function I(t){var e=t._readableState;for(d("flow",e.flowing);e.flowing&&null!==t.read(););}function P(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var a=r.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?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(o));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=u.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var a=n.data,o=t>a.length?a.length:t;if(a.copy(r,r.length-t,0,o),0===(t-=o)){o===a.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=a.slice(o));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function R(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(L,e,t))}function L(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function C(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}y.prototype.read=function(t){d("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?R(this):x(this),null;if(0===(t=E(t,e))&&e.ended)return 0===e.length&&R(this),null;var n,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&d("length less than watermark",i=!0),e.ended||e.reading?d("reading or ended",i=!1):i&&(d("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=E(r,e))),null===(n=t>0?P(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&R(this)),null!==n&&this.emit("data",n),n},y.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},y.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,d("pipe count=%d opts=%j",a.pipesCount,e);var f=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?h:y;function u(e,n){d("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),t.removeListener("close",b),t.removeListener("finish",_),t.removeListener("drain",l),t.removeListener("error",g),t.removeListener("unpipe",u),r.removeListener("end",h),r.removeListener("end",y),r.removeListener("data",m),c=!0,!a.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function h(){d("onend"),t.end()}a.endEmitted?i.nextTick(f):r.once("end",f),t.on("unpipe",u);var l=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,I(t))}}(r);t.on("drain",l);var c=!1;var p=!1;function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===a.pipesCount&&a.pipes===t||a.pipesCount>1&&-1!==C(a.pipes,t))&&!c&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function g(e){d("onerror",e),y(),t.removeListener("error",g),0===s(t,"error")&&t.emit("error",e)}function b(){t.removeListener("finish",_),y()}function _(){d("onfinish"),t.removeListener("close",b),y()}function y(){d("unpipe"),r.unpipe(t)}return r.on("data",m),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?o(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",g),t.once("close",b),t.once("finish",_),t.emit("pipe",r),a.flowing||(d("pipe resume"),r.resume()),t},y.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,r);return this}var o=C(e.pipes,t);return-1===o||(e.pipes.splice(o,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},y.prototype.on=function(t,e){var r=f.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&x(this):i.nextTick(A,this))}return r},y.prototype.addListener=y.prototype.on,y.prototype.resume=function(){var t=this._readableState;return t.flowing||(d("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(O,t,e))}(this,t)),this},y.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},y.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!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<b.length;a++)t.on(b[a],this.emit.bind(this,b[a]));return this._read=function(e){d("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(y.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),y._fromList=P}).call(this,r(2),r(1))},function(t,e,r){t.exports=r(13).EventEmitter},function(t,e,r){"use strict";var n=r(15);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=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||n.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?(n.nextTick(i,r,t),r._writableState&&(r._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)}}},function(t,e,r){"use strict";var n=r(94).Buffer,i=n.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&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=f,this.end=u,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=h,this.end=l,e=3;break;default:return this.write=c,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.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,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r: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 f(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function h(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?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-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function c(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},a.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},a.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=o(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=o(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=o(e[n]))>=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=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},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}},function(t,e,r){"use strict";t.exports=o;var n=r(5),i=Object.create(r(9));function a(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function o(t){if(!(this instanceof o))return new o(t);n.call(this,t),this._transformState={afterTransform:a.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",s)}function s(){var t=this;"function"==typeof this._flush?this._flush((function(e,r){f(t,e,r)})):f(this,null,null)}function f(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),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=r(4),i.inherits(o,n),o.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},o.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.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},o.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,(function(t){e(t),r.emit("close")}))}},function(t,e,r){"use strict";e.decode=e.parse=r(102),e.encode=e.stringify=r(103)},function(t,e,r){"use strict";t.exports=function(t,e,r,n){for(var i=65535&t|0,a=t>>>16&65535|0,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{a=a+(i=i+e[n++]|0)|0}while(--o);i%=65521,a%=65521}return i|a<<16|0}},function(t,e,r){"use strict";var n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,e,r,i){var a=n,o=i+r;t^=-1;for(var s=i;s<o;s++)t=t>>>8^a[255&(t^e[s])];return-1^t}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=function(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return new Promise((function(r,i){n.push((function(t,e){t&&i(t),r(e)})),t.bind(e).apply(void 0,n)}))};e.default=n},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getExtension=e.getType=e.addType=void 0;var n={};e.addType=function(t,e){n[t]=e};e.getType=function(t){var e=t.split("/").slice(-1);return function(t){return Object.entries(n).find((function(e){return e[1].includes(t)}))||[]}(e[e.length-1].split(".").pop())[0]};e.getExtension=function(t){return(n[t.toLowerCase()]||[])[0]}},function(t,e){function r(t,e){switch(t){case 1:return e.nextUInt8();case 3:return e.nextUInt16();case 4:return e.nextUInt32();case 5:return[e.nextUInt32(),e.nextUInt32()];case 6:return e.nextInt8();case 8:return e.nextUInt16();case 9:return e.nextUInt32();case 10:return[e.nextInt32(),e.nextInt32()];case 11:return e.nextFloat();case 12:return e.nextDouble();default:throw new Error("Invalid format while decoding: "+t)}}function n(t,e){var n,i,a=e.nextUInt16(),o=e.nextUInt16(),s=function(t){switch(t){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}}(o),f=e.nextUInt32(),u=s*f;if(u>4&&(e=t.openWithOffset(e.nextUInt32())),2===o){var h=(n=e.nextString(f)).indexOf("\0");-1!==h&&(n=n.substr(0,h))}else if(7===o)n=e.nextBuffer(f);else if(0!==o)for(n=[],i=0;i<f;++i)n.push(r(o,e));return u<4&&e.skip(4-u),[a,n,o]}function i(t,e,r){var i,a,o=e.nextUInt16();for(a=0;a<o;++a)r((i=n(t,e))[0],i[1],i[2])}t.exports={IFD0:1,IFD1:2,GPSIFD:3,SubIFD:4,InteropIFD:5,parseTags:function(t,e){var r,n,a,o;try{r=function(t){if("Exif\0\0"!==t.nextString(6))throw new Error("Invalid EXIF header");var e=t.mark(),r=t.nextUInt16();if(18761===r)t.setBigEndian(!1);else{if(19789!==r)throw new Error("Invalid TIFF header");t.setBigEndian(!0)}if(42!==t.nextUInt16())throw new Error("Invalid TIFF data");return e}(t)}catch(t){return!1}var s=r.openWithOffset(t.nextUInt32()),f=this.IFD0;i(r,s,(function(t,r,i){switch(t){case 34853:a=r[0];break;case 34665:n=r[0];break;default:e(f,t,r,i)}}));var u=s.nextUInt32();if(0!==u){var h=r.openWithOffset(u);i(r,h,e.bind(null,this.IFD1))}if(a){var l=r.openWithOffset(a);i(r,l,e.bind(null,this.GPSIFD))}if(n){var c=r.openWithOffset(n),d=this.InteropIFD;i(r,c,(function(t,r,n){40965===t?o=r[0]:e(d,t,r,n)}))}if(o){var p=r.openWithOffset(o);i(r,p,e.bind(null,this.InteropIFD))}return!0}}},function(t,e,r){"use strict";(function(e,n){var i=r(3),a=r(16),o=t.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,r){this._reads.push({length:Math.abs(t),allowLess:t<0,func:r}),e.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?(r=n.isBuffer(t)?t:new n(t,e||this._encoding),this._buffers.push(r),this._buffered+=r.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 r},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("Unexpected end of input")),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,r=0,i=new n(t.length);e<t.length;){var a=this._buffers[r++],o=Math.min(a.length,t.length-e);a.copy(i,e,0,o),e+=o,o!==a.length&&(this._buffers[--r]=a.slice(o))}r>0&&this._buffers.splice(0,r),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.writable&&this._end()}catch(t){this.emit("error",t)}}}).call(this,r(1),r(0).Buffer)},function(t,e,r){"use strict";(function(e){var n=r(48),i=r(49);function a(t,e,r){var n=t*e;return 8!==r&&(n=Math.ceil(n/(8/r))),n}var o=t.exports=function(t,e){var r=t.width,i=t.height,o=t.interlace,s=t.bpp,f=t.depth;if(this.read=e.read,this.write=e.write,this.complete=e.complete,this._imageIndex=0,this._images=[],o)for(var u=n.getImagePasses(r,i),h=0;h<u.length;h++)this._images.push({byteWidth:a(u[h].width,s,f),height:u[h].height,lineIndex:0});else this._images.push({byteWidth:a(r,s,f),height:i,lineIndex:0});this._xComparison=8===f?s:16===f?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,r){for(var n=this._xComparison,i=n-1,a=0;a<r;a++){var o=t[1+a],s=a>i?e[a-n]:0;e[a]=o+s}},o.prototype._unFilterType2=function(t,e,r){for(var n=this._lastLine,i=0;i<r;i++){var a=t[1+i],o=n?n[i]:0;e[i]=a+o}},o.prototype._unFilterType3=function(t,e,r){for(var n=this._xComparison,i=n-1,a=this._lastLine,o=0;o<r;o++){var s=t[1+o],f=a?a[o]:0,u=o>i?e[o-n]:0,h=Math.floor((u+f)/2);e[o]=s+h}},o.prototype._unFilterType4=function(t,e,r){for(var n=this._xComparison,a=n-1,o=this._lastLine,s=0;s<r;s++){var f=t[1+s],u=o?o[s]:0,h=s>a?e[s-n]:0,l=s>a&&o?o[s-n]:0,c=i(h,u,l);e[s]=f+c}},o.prototype._reverseFilterLine=function(t){var r,n=t[0],i=this._images[this._imageIndex],a=i.byteWidth;if(0===n)r=t.slice(1,a+1);else switch(r=new e(a),n){case 1:this._unFilterType1(t,r,a);break;case 2:this._unFilterType2(t,r,a);break;case 3:this._unFilterType3(t,r,a);break;case 4:this._unFilterType4(t,r,a);break;default:throw new Error("Unrecognised filter type - "+n)}this.write(r),i.lineIndex++,i.lineIndex>=i.height?(this._lastLine=null,this._imageIndex++,i=this._images[this._imageIndex]):this._lastLine=r,i?this.read(i.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var n=[{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]}];e.getImagePasses=function(t,e){for(var r=[],i=t%8,a=e%8,o=(t-i)/8,s=(e-a)/8,f=0;f<n.length;f++){for(var u=n[f],h=o*u.x.length,l=s*u.y.length,c=0;c<u.x.length&&u.x[c]<i;c++)h++;for(c=0;c<u.y.length&&u.y[c]<a;c++)l++;h>0&&l>0&&r.push({width:h,height:l,index:f})}return r},e.getInterlaceIterator=function(t){return function(e,r,i){var a=e%n[i].x.length,o=(e-a)/n[i].x.length*8+n[i].x[a],s=r%n[i].y.length;return 4*o+((r-s)/n[i].y.length*8+n[i].y[s])*t*4}}},function(t,e,r){"use strict";t.exports=function(t,e,r){var n=t+e-r,i=Math.abs(n-t),a=Math.abs(n-e),o=Math.abs(n-r);return i<=a&&i<=o?t:a<=o?e:r}},function(t,e,r){"use strict";(function(e){var n=r(10),i=r(51),a=t.exports=function(t,e){this._options=t,t.checkCRC=!1!==t.checkCRC,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[n.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[n.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[n.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[n.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[n.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[n.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.finished=e.finished,this.simpleTransparency=e.simpleTransparency,this.headersFinished=e.headersFinished||function(){}};a.prototype.start=function(){this.read(n.PNG_SIGNATURE.length,this._parseSignature.bind(this))},a.prototype._parseSignature=function(t){for(var e=n.PNG_SIGNATURE,r=0;r<e.length;r++)if(t[r]!==e[r])return void this.error(new Error("Invalid file signature"));this.read(8,this._parseChunkBegin.bind(this))},a.prototype._parseChunkBegin=function(t){for(var r=t.readUInt32BE(0),a=t.readUInt32BE(4),o="",s=4;s<8;s++)o+=String.fromCharCode(t[s]);var f=Boolean(32&t[4]);if(this._hasIHDR||a===n.TYPE_IHDR){if(this._crc=new i,this._crc.write(new e(o)),this._chunks[a])return this._chunks[a](r);f?this.read(r+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),r=this._crc.crc32();this._options.checkCRC&&r!==e?this.error(new Error("Crc error - "+e+" - "+r)):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),r=t.readUInt32BE(4),i=t[8],a=t[9],o=t[10],s=t[11],f=t[12];if(8===i||4===i||2===i||1===i||16===i)if(a in n.COLORTYPE_TO_BPP_MAP)if(0===o)if(0===s)if(0===f||1===f){this._colorType=a;var u=n.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:e,height:r,depth:i,interlace:Boolean(f),palette:Boolean(a&n.COLORTYPE_PALETTE),color:Boolean(a&n.COLORTYPE_COLOR),alpha:Boolean(a&n.COLORTYPE_ALPHA),bpp:u,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),r=0;r<e;r++)this._palette.push([t[3*r],t[3*r+1],t[3*r+2],255]);this.palette(this._palette),this._handleChunkEnd()},a.prototype._handleTRNS=function(t){this.simpleTransparency(),this.read(t,this._parseTRNS.bind(this))},a.prototype._parseTRNS=function(t){if(this._crc.write(t),this._colorType===n.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===n.COLORTYPE_GRAYSCALE&&this.transColor([t.readUInt16BE(0)]),this._colorType===n.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)/n.GAMMA_DIVISION),this._handleChunkEnd()},a.prototype._handleIDAT=function(t){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-t,this._parseIDAT.bind(this,t))},a.prototype._parseIDAT=function(t,e){if(this._crc.write(e),this._colorType===n.COLORTYPE_PALETTE_COLOR&&0===this._palette.length)throw new Error("Expected palette not found");this.inflateData(e);var r=t-e.length;r>0?this._handleIDAT(r):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,r(0).Buffer)},function(t,e,r){"use strict";var n=[];!function(){for(var t=0;t<256;t++){for(var e=t,r=0;r<8;r++)1&e?e=3988292384^e>>>1:e>>>=1;n[t]=e}}();var i=t.exports=function(){this._crc=-1};i.prototype.write=function(t){for(var e=0;e<t.length;e++)this._crc=n[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,r=0;r<t.length;r++)e=n[255&(e^t[r])]^e>>>8;return-1^e}},function(t,e,r){"use strict";(function(t){var n=r(48),i=[function(){},function(t,e,r,n){if(n===e.length)throw new Error("Ran out of data");var i=e[n];t[r]=i,t[r+1]=i,t[r+2]=i,t[r+3]=255},function(t,e,r,n){if(n+1>=e.length)throw new Error("Ran out of data");var i=e[n];t[r]=i,t[r+1]=i,t[r+2]=i,t[r+3]=e[n+1]},function(t,e,r,n){if(n+2>=e.length)throw new Error("Ran out of data");t[r]=e[n],t[r+1]=e[n+1],t[r+2]=e[n+2],t[r+3]=255},function(t,e,r,n){if(n+3>=e.length)throw new Error("Ran out of data");t[r]=e[n],t[r+1]=e[n+1],t[r+2]=e[n+2],t[r+3]=e[n+3]}],a=[function(){},function(t,e,r,n){var i=e[0];t[r]=i,t[r+1]=i,t[r+2]=i,t[r+3]=n},function(t,e,r){var n=e[0];t[r]=n,t[r+1]=n,t[r+2]=n,t[r+3]=e[1]},function(t,e,r,n){t[r]=e[0],t[r+1]=e[1],t[r+2]=e[2],t[r+3]=n},function(t,e,r){t[r]=e[0],t[r+1]=e[1],t[r+2]=e[2],t[r+3]=e[3]}];function o(t,e,r,n,a,o){for(var s=t.width,f=t.height,u=t.index,h=0;h<f;h++)for(var l=0;l<s;l++){var c=r(l,h,u);i[n](e,a,c,o),o+=n}return o}function s(t,e,r,n,i,o){for(var s=t.width,f=t.height,u=t.index,h=0;h<f;h++){for(var l=0;l<s;l++){var c=i.get(n),d=r(l,h,u);a[n](e,c,d,o)}i.resetAfterLine()}}e.dataToBitMap=function(e,r){var i,a=r.width,f=r.height,u=r.depth,h=r.bpp,l=r.interlace;if(8!==u)var c=function(t,e){var r=[],n=0;function i(){if(n===t.length)throw new Error("Ran out of data");var i,a,o,s,f,u,h,l,c=t[n];switch(n++,e){default:throw new Error("unrecognised depth");case 16:h=t[n],n++,r.push((c<<8)+h);break;case 4:h=15&c,l=c>>4,r.push(l,h);break;case 2:f=3&c,u=c>>2&3,h=c>>4&3,l=c>>6&3,r.push(l,h,u,f);break;case 1:i=1&c,a=c>>1&1,o=c>>2&1,s=c>>3&1,f=c>>4&1,u=c>>5&1,h=c>>6&1,l=c>>7&1,r.push(l,h,u,f,s,o,a,i)}}return{get:function(t){for(;r.length<t;)i();var e=r.slice(0,t);return r=r.slice(t),e},resetAfterLine:function(){r.length=0},end:function(){if(n!==t.length)throw new Error("extra data found")}}}(e,u);i=u<=8?new t(a*f*4):new Uint16Array(a*f*4);var d,p,m=Math.pow(2,u)-1,g=0;if(l)d=n.getImagePasses(a,f),p=n.getInterlaceIterator(a,f);else{var b=0;p=function(){var t=b;return b+=4,t},d=[{width:a,height:f}]}for(var _=0;_<d.length;_++)8===u?g=o(d[_],i,p,h,e,g):s(d[_],i,p,h,c,m);if(8===u){if(g!==e.length)throw new Error("extra data found")}else c.end();return i}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){t.exports=function(t,r){var n=r.depth,i=r.width,a=r.height,o=r.colorType,s=r.transColor,f=r.palette,u=t;return 3===o?function(t,e,r,n,i){for(var a=0,o=0;o<n;o++)for(var s=0;s<r;s++){var f=i[t[a]];if(!f)throw new Error("index "+t[a]+" not in palette");for(var u=0;u<4;u++)e[a+u]=f[u];a+=4}}(t,u,i,a,f):(s&&function(t,e,r,n,i){for(var a=0,o=0;o<n;o++)for(var s=0;s<r;s++){var f=!1;if(1===i.length?i[0]===t[a]&&(f=!0):i[0]===t[a]&&i[1]===t[a+1]&&i[2]===t[a+2]&&(f=!0),f)for(var u=0;u<4;u++)e[a+u]=0;a+=4}}(t,u,i,a,s),8!==n&&(16===n&&(u=new e(i*a*4)),function(t,e,r,n,i){for(var a=Math.pow(2,i)-1,o=0,s=0;s<n;s++)for(var f=0;f<r;f++){for(var u=0;u<4;u++)e[o+u]=Math.floor(255*t[o+u]/a+.5);o+=4}}(t,u,i,a,n))),u}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){var n=r(10),i=r(51),a=r(137),o=r(138),s=r(7),f=t.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:n.COLORTYPE_COLOR_ALPHA,t.inputColorType="number"==typeof t.inputColorType?t.inputColorType:n.COLORTYPE_COLOR_ALPHA,-1===[n.COLORTYPE_GRAYSCALE,n.COLORTYPE_COLOR,n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(t.colorType))throw new Error("option color type:"+t.colorType+" is not supported at present");if(-1===[n.COLORTYPE_GRAYSCALE,n.COLORTYPE_COLOR,n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(t.inputColorType))throw new Error("option input color type:"+t.inputColorType+" is not supported at present");if(8!==t.bitDepth&&16!==t.bitDepth)throw new Error("option bit depth:"+t.bitDepth+" is not supported at present")};f.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},f.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},f.prototype.filterData=function(t,e,r){var i=a(t,e,r,this._options),s=n.COLORTYPE_TO_BPP_MAP[this._options.colorType];return o(i,e,r,this._options,s)},f.prototype._packChunk=function(t,r){var n=r?r.length:0,a=new e(n+12);return a.writeUInt32BE(n,0),a.writeUInt32BE(t,4),r&&r.copy(a,8),a.writeInt32BE(i.crc32(a.slice(4,a.length-4)),a.length-4),a},f.prototype.packGAMA=function(t){var r=new e(4);return r.writeUInt32BE(Math.floor(t*n.GAMMA_DIVISION),0),this._packChunk(n.TYPE_gAMA,r)},f.prototype.packIHDR=function(t,r){var i=new e(13);return i.writeUInt32BE(t,0),i.writeUInt32BE(r,4),i[8]=this._options.bitDepth,i[9]=this._options.colorType,i[10]=0,i[11]=0,i[12]=0,this._packChunk(n.TYPE_IHDR,i)},f.prototype.packIDAT=function(t){return this._packChunk(n.TYPE_IDAT,t)},f.prototype.packIEND=function(){return this._packChunk(n.TYPE_IEND,null)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var n=t.exports=function(t){this._buffer=t,this._reads=[]};n.prototype.read=function(t,e){this._reads.push({length:Math.abs(t),allowLess:t<0,func:e})},n.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}},function(t,e,r){"use strict";var n=r(11),i=r(6);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:f.default,r={hasAlpha:{},encoders:{},decoders:{},class:{},constants:{}};function n(t){Object.entries(t).forEach((function(t){var e=(0,s.default)(t,2),n=e[0],i=e[1];r[n]=h({},r[n],{},i)}))}function i(t){var e=t();Array.isArray(e.mime)?f.addType.apply(void 0,(0,a.default)(e.mime)):Object.entries(e.mime).forEach((function(t){return f.addType.apply(void 0,(0,a.default)(t))})),delete e.mime,n(e)}function o(t){var e=t(f.jimpEvChange)||{};e.class||e.constants?n(e):n({class:e})}t.types&&(t.types.forEach(i),e.decoders=h({},e.decoders,{},r.decoders),e.encoders=h({},e.encoders,{},r.encoders),e.hasAlpha=h({},e.hasAlpha,{},r.hasAlpha));t.plugins&&t.plugins.forEach(o);return(0,f.addJimpMethods)(r.class,e),(0,f.addConstants)(r.constants,e),f.default};var a=i(r(59)),o=i(r(12)),s=i(r(19)),f=n(r(66));function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(r,!0).forEach((function(e){(0,o.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}},function(t,e,r){"use strict";var n=r(6);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r(12)),a=r(133),o=r(14);e.default=function(){return{mime:(0,i.default)({},"image/png",["png"]),constants:{MIME_PNG:"image/png",PNG_FILTER_AUTO:-1,PNG_FILTER_NONE:0,PNG_FILTER_SUB:1,PNG_FILTER_UP:2,PNG_FILTER_AVERAGE:3,PNG_FILTER_PATH:4},hasAlpha:(0,i.default)({},"image/png",!0),decoders:(0,i.default)({},"image/png",a.PNG.sync.read),encoders:(0,i.default)({},"image/png",(function(t){var e=new a.PNG({width:t.bitmap.width,height:t.bitmap.height});return e.data=t.bitmap.data,a.PNG.sync.write(e,{width:t.bitmap.width,height:t.bitmap.height,deflateLevel:t._deflateLevel,deflateStrategy:t._deflateStrategy,filterType:t._filterType,colorType:"number"==typeof t._colorType?t._colorType:t._rgba?6:2,inputHasAlpha:t._rgba})})),class:{_deflateLevel:9,_deflateStrategy:3,_filterType:-1,_colorType:null,deflateLevel:function(t,e){return"number"!=typeof t?o.throwError.call(this,"l must be a number",e):t<0||t>9?o.throwError.call(this,"l must be a number 0 - 9",e):(this._deflateLevel=Math.round(t),(0,o.isNodePattern)(e)&&e.call(this,null,this),this)},deflateStrategy:function(t,e){return"number"!=typeof t?o.throwError.call(this,"s must be a number",e):t<0||t>3?o.throwError.call(this,"s must be a number 0 - 3",e):(this._deflateStrategy=Math.round(t),(0,o.isNodePattern)(e)&&e.call(this,null,this),this)},filterType:function(t,e){return"number"!=typeof t?o.throwError.call(this,"n must be a number",e):t<-1||t>4?o.throwError.call(this,"n must be -1 (auto) or a number 0 - 4",e):(this._filterType=Math.round(t),(0,o.isNodePattern)(e)&&e.call(this,null,this),this)},colorType:function(t,e){return"number"!=typeof t?o.throwError.call(this,"s must be a number",e):0!==t&&2!==t&&4!==t&&6!==t?o.throwError.call(this,"s must be a number 0, 2, 4, 6.",e):(this._colorType=Math.round(t),(0,o.isNodePattern)(e)&&e.call(this,null,this),this)}}}}},function(t,e,r){"use strict";r.r(e);var n=r(56),i=r.n(n),a=r(57),o=r.n(a);e.default=i()({types:[o.a]})},function(t,e,r){var n=r(60),i=r(61),a=r(26),o=r(62);t.exports=function(t){return n(t)||i(t)||a(t)||o()}},function(t,e,r){var n=r(25);t.exports=function(t){if(Array.isArray(t))return n(t)}},function(t,e){t.exports=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},function(t,e){t.exports=function(t,e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t)){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(n=(o=s.next()).done)&&(r.push(o.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw a}}return r}}},function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},function(t,e,r){"use strict";(function(t,n){var i=r(11),a=r(6);Object.defineProperty(e,"__esModule",{value:!0}),e.addConstants=q,e.addJimpMethods=Y,e.jimpEvMethod=W,e.jimpEvChange=V,Object.defineProperty(e,"addType",{enumerable:!0,get:function(){return O.addType}}),e.default=void 0;for(var o=a(r(69)),s=a(r(19)),f=a(r(71)),u=a(r(72)),h=a(r(73)),l=a(r(74)),c=a(r(29)),d=a(r(75)),p=a(r(12)),m=a(r(18)),g=a(r(30)),b=a(r(31)),_=a(r(13)),y=r(14),v=a(r(78)),w=a(r(80)),E=a(r(81)),x=a(r(82)),S=a(r(83)),T=a(r(84)),k=a(r(121)),A=a(r(43)),O=i(r(44)),I=r(123),P=i(r(24)),R="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",L=[NaN,NaN],C=2;C<65;C++){var M=(0,v.default)(v.default.BIN,R.slice(0,C))(new Array(65).join("1"));L.push(M.length)}function D(){}function N(t){return Object.prototype.toString.call(t).toLowerCase().indexOf("arraybuffer")>-1}function B(e){for(var r=t.alloc(e.byteLength),n=new Uint8Array(e),i=0;i<r.length;++i)r[i]=n[i];return r}function F(e,r){(0,T.default)(e,(function(n,i,a){if(n)return r(n);if("headers"in i&&"location"in i.headers)return e.url=i.headers.location,F(e,r);if("object"===(0,m.default)(a)&&t.isBuffer(a))return r(null,a);var o="Could not load Buffer from <"+e.url+"> (HTTP: "+i.statusCode+")";return new Error(o)}))}function U(t,e){g.default&&"function"==typeof g.default.readFile&&!t.match(/^(http|ftp)s?:\/\/./)?g.default.readFile(t,e):F({url:t},e)}function j(e){return e&&"object"===(0,m.default)(e)&&"number"==typeof e.width&&"number"==typeof e.height&&(t.isBuffer(e.data)||e.data instanceof Uint8Array||"function"==typeof Uint8ClampedArray&&e.data instanceof Uint8ClampedArray)&&(e.data.length===e.width*e.height*4||e.data.length===e.width*e.height*3)}function z(e){if(e.length%3!=0)throw new Error("Buffer length is incorrect");for(var r=t.allocUnsafe(e.length/3*4),n=0,i=0;i<e.length;i++)r[n]=e[i],(i+1)%3==0&&(r[++n]=255),n++;return r}var H,G={data:null,width:null,height:null},Z=function(e){function r(){for(var e,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];(0,f.default)(this,r),e=(0,h.default)(this,(0,l.default)(r).call(this)),(0,p.default)((0,c.default)(e),"bitmap",G),(0,p.default)((0,c.default)(e),"_background",0),(0,p.default)((0,c.default)(e),"_originalMime",r.MIME_PNG),(0,p.default)((0,c.default)(e),"_exif",null),(0,p.default)((0,c.default)(e),"_rgba",!0),(0,p.default)((0,c.default)(e),"writeAsync",(function(t){return(0,A.default)(e.write,(0,c.default)(e),t)})),(0,p.default)((0,c.default)(e),"getBase64Async",(function(t){return(0,A.default)(e.getBase64,(0,c.default)(e),t)})),(0,p.default)((0,c.default)(e),"getBuffer",I.getBuffer),(0,p.default)((0,c.default)(e),"getBufferAsync",I.getBufferAsync),(0,p.default)((0,c.default)(e),"getPixelColour",e.getPixelColor),(0,p.default)((0,c.default)(e),"setPixelColour",e.setPixelColor);var o=(0,c.default)(e),s=D;function u(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=e[0],i=n||{};i.methodName="constructor",setTimeout((function(){var t;n&&s===D?o.emitError("constructor",n):n||o.emitMulti("constructor","initialized"),(t=s).call.apply(t,[o].concat(e))}),1)}if(N(i[0])&&(i[0]=B(i[0])),"number"==typeof i[0]&&"number"==typeof i[1]||parseInt(i[0],10)&&parseInt(i[1],10)){var d=parseInt(i[0],10),g=parseInt(i[1],10);if(s=i[2],"number"==typeof i[2]&&(e._background=i[2],s=i[3]),"string"==typeof i[2]&&(e._background=r.cssColorToHex(i[2]),s=i[3]),void 0===s&&(s=D),"function"!=typeof s)return(0,h.default)(e,y.throwError.call((0,c.default)(e),"cb must be a function",u));e.bitmap={data:t.alloc(d*g*4),width:d,height:g};for(var b=0;b<e.bitmap.data.length;b+=4)e.bitmap.data.writeUInt32BE(e._background,b);u(null,(0,c.default)(e))}else if("object"===(0,m.default)(i[0])&&i[0].url){if("function"!=typeof(s=i[1]||D))return(0,h.default)(e,y.throwError.call((0,c.default)(e),"cb must be a function",u));F(i[0],(function(t,r){if(t)return y.throwError.call((0,c.default)(e),t,u);e.parseBitmap(r,i[0].url,u)}))}else if(i[0]instanceof r){var _=i[0];if(void 0===(s=i[1])&&(s=D),"function"!=typeof s)return(0,h.default)(e,y.throwError.call((0,c.default)(e),"cb must be a function",u));e.bitmap={data:t.from(_.bitmap.data),width:_.bitmap.width,height:_.bitmap.height},e._quality=_._quality,e._deflateLevel=_._deflateLevel,e._deflateStrategy=_._deflateStrategy,e._filterType=_._filterType,e._rgba=_._rgba,e._background=_._background,e._originalMime=_._originalMime,u(null,(0,c.default)(e))}else if(j(i[0])){var v=i[0];s=i[1]||D;var w=v.width*v.height*4===v.data.length,E=w?t.from(v.data):z(v.data);e.bitmap={data:E,width:v.width,height:v.height},u(null,(0,c.default)(e))}else if("string"==typeof i[0]){var x=i[0];if(void 0===(s=i[1])&&(s=D),"function"!=typeof s)return(0,h.default)(e,y.throwError.call((0,c.default)(e),"cb must be a function",u));U(x,(function(t,r){if(t)return y.throwError.call((0,c.default)(e),t,u);e.parseBitmap(r,x,u)}))}else if("object"===(0,m.default)(i[0])&&t.isBuffer(i[0])){var S=i[0];if("function"!=typeof(s=i[1]))return(0,h.default)(e,y.throwError.call((0,c.default)(e),"cb must be a function",u));e.parseBitmap(S,null,u)}else{"function"!=typeof(s=i[i.length-1])&&"function"!=typeof(s=i[i.length-2])&&(s=D);var T=r.__extraConstructors.find((function(t){return t.test.apply(t,i)}));if(!T)return(0,h.default)(e,y.throwError.call((0,c.default)(e),"No matching constructor overloading was found. Please see the docs for how to call the Jimp constructor.",u));new Promise((function(t,r){var n;return(n=T.run).call.apply(n,[(0,c.default)(e),t,r].concat(i))})).then((function(){return u(null,(0,c.default)(e))})).catch(u)}return e}return(0,d.default)(r,e),(0,u.default)(r,[{key:"parseBitmap",value:function(t,e,r){I.parseBitmap.call(this,t,null,r)}},{key:"rgba",value:function(t,e){return"boolean"!=typeof t?y.throwError.call(this,"bool must be a boolean, true for RGBA or false for RGB",e):(this._rgba=t,(0,y.isNodePattern)(e)&&e.call(this,null,this),this)}},{key:"emitMulti",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r=Object.assign(r,{methodName:t,eventName:e}),this.emit("any",r),t&&this.emit(t,r),this.emit(e,r)}},{key:"emitError",value:function(t,e){this.emitMulti(t,"error",e)}},{key:"getHeight",value:function(){return this.bitmap.height}},{key:"getWidth",value:function(){return this.bitmap.width}},{key:"inspect",value:function(){return"<Jimp "+(this.bitmap===G?"pending...":this.bitmap.width+"x"+this.bitmap.height)+">"}},{key:"toString",value:function(){return"[object Jimp]"}},{key:"getMIME",value:function(){return this._originalMime||r.MIME_PNG}},{key:"getExtension",value:function(){var t=this.getMIME();return O.getExtension(t)}},{key:"write",value:function(t,e){var r=this;if(!g.default||!g.default.createWriteStream)throw new Error("Cant access the filesystem. You can use the getBase64 method.");if("string"!=typeof t)return y.throwError.call(this,"path must be a string",e);if(void 0===e&&(e=D),"function"!=typeof e)return y.throwError.call(this,"cb must be a function",e);var n=O.getType(t)||this.getMIME(),i=b.default.parse(t);return i.dir&&w.default.sync(i.dir),this.getBuffer(n,(function(n,i){if(n)return y.throwError.call(r,n,e);var a=g.default.createWriteStream(t);a.on("open",(function(){a.write(i),a.end()})).on("error",(function(t){return y.throwError.call(r,t,e)})),a.on("finish",(function(){e.call(r,null,r)}))})),this}},{key:"getBase64",value:function(t,e){return t===r.AUTO&&(t=this.getMIME()),"string"!=typeof t?y.throwError.call(this,"mime must be a string",e):"function"!=typeof e?y.throwError.call(this,"cb must be a function",e):(this.getBuffer(t,(function(r,n){if(r)return y.throwError.call(this,r,e);var i="data:"+t+";base64,"+n.toString("base64");e.call(this,null,i)})),this)}},{key:"hash",value:function(t,e){if("function"==typeof(t=t||64)&&(e=t,t=64),"number"!=typeof t)return y.throwError.call(this,"base must be a number",e);if(t<2||t>64)return y.throwError.call(this,"base must be a number between 2 and 64",e);var r=this.pHash();for(r=(0,v.default)(v.default.BIN,R.slice(0,t))(r);r.length<L[t];)r="0"+r;return(0,y.isNodePattern)(e)&&e.call(this,null,r),r}},{key:"pHash",value:function(){var t=new S.default;return t.getHash(this)}},{key:"distanceFromHash",value:function(t){var e=new S.default,r=e.getHash(this);return e.distance(r,t)}},{key:"getPixelIndex",value:function(t,e,n,i){var a,o;if("function"==typeof n&&void 0===i&&(i=n,n=null),n||(n=r.EDGE_EXTEND),"number"!=typeof t||"number"!=typeof e)return y.throwError.call(this,"x and y must be numbers",i);a=t=Math.round(t),o=e=Math.round(e),n===r.EDGE_EXTEND&&(t<0&&(a=0),t>=this.bitmap.width&&(a=this.bitmap.width-1),e<0&&(o=0),e>=this.bitmap.height&&(o=this.bitmap.height-1)),n===r.EDGE_WRAP&&(t<0&&(a=this.bitmap.width+t),t>=this.bitmap.width&&(a=t%this.bitmap.width),e<0&&(a=this.bitmap.height+e),e>=this.bitmap.height&&(o=e%this.bitmap.height));var s=this.bitmap.width*o+a<<2;return(a<0||a>=this.bitmap.width)&&(s=-1),(o<0||o>=this.bitmap.height)&&(s=-1),(0,y.isNodePattern)(i)&&i.call(this,null,s),s}},{key:"getPixelColor",value:function(t,e,r){if("number"!=typeof t||"number"!=typeof e)return y.throwError.call(this,"x and y must be numbers",r);t=Math.round(t),e=Math.round(e);var n=this.getPixelIndex(t,e),i=this.bitmap.data.readUInt32BE(n);return(0,y.isNodePattern)(r)&&r.call(this,null,i),i}},{key:"setPixelColor",value:function(t,e,r,n){if("number"!=typeof t||"number"!=typeof e||"number"!=typeof r)return y.throwError.call(this,"hex, x and y must be numbers",n);e=Math.round(e),r=Math.round(r);var i=this.getPixelIndex(e,r);return this.bitmap.data.writeUInt32BE(t,i),(0,y.isNodePattern)(n)&&n.call(this,null,this),this}},{key:"hasAlpha",value:function(){for(var t=0;t<this.bitmap.height;t++)for(var e=0;e<this.bitmap.width;e++){var r=this.bitmap.width*t+e<<2;if(255!==this.bitmap.data[r+3])return!0}return!1}},{key:"scanIterator",value:function(t,e,r,n){return"number"!=typeof t||"number"!=typeof e?y.throwError.call(this,"x and y must be numbers"):"number"!=typeof r||"number"!=typeof n?y.throwError.call(this,"w and h must be numbers"):(0,y.scanIterator)(this,t,e,r,n)}}]),r}(_.default);function q(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z;Object.entries(t).forEach((function(t){var r=(0,s.default)(t,2),n=r[0],i=r[1];e[n]=i}))}function Y(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z;Object.entries(t).forEach((function(t){var r=(0,s.default)(t,2),n=r[0],i=r[1];e.prototype[n]=i}))}function W(t,e,r){var n="before-"+e,i=e.replace(/e$/,"")+"ed";Z.prototype[t]=function(){for(var e,a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];var f,u=o[r.length-1],h=this;"function"==typeof u?(e=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var a=r[0],o=r[1];a?h.emitError(t,a):h.emitMulti(t,i,(0,p.default)({},t,o)),u.apply(this,r)},o[o.length-1]=e):e=!1,this.emitMulti(t,n);try{f=r.apply(this,o),e||this.emitMulti(t,i,(0,p.default)({},t,f))}catch(e){e.methodName=t,this.emitError(t,e)}return f},Z.prototype[t+"Quiet"]=r}function V(t,e){W(t,"change",e)}(q(P),Y({composite:k.default}),Z.__extraConstructors=[],Z.appendConstructorOption=function(t,e,r){Z.__extraConstructors.push({name:t,test:e,run:r})},Z.read=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return new Promise((function(t,r){(0,o.default)(Z,e.concat([function(e,n){e?r(e):t(n)}]))}))},Z.create=Z.read,Z.rgbaToInt=function(t,e,r,n,i){if("number"!=typeof t||"number"!=typeof e||"number"!=typeof r||"number"!=typeof n)return y.throwError.call(this,"r, g, b and a must be numbers",i);if(t<0||t>255)return y.throwError.call(this,"r must be between 0 and 255",i);if((e<0||e>255)&&y.throwError.call(this,"g must be between 0 and 255",i),r<0||r>255)return y.throwError.call(this,"b must be between 0 and 255",i);if(n<0||n>255)return y.throwError.call(this,"a must be between 0 and 255",i);t=Math.round(t),r=Math.round(r),e=Math.round(e),n=Math.round(n);var a=t*Math.pow(256,3)+e*Math.pow(256,2)+r*Math.pow(256,1)+n*Math.pow(256,0);return(0,y.isNodePattern)(i)&&i.call(this,null,a),a},Z.intToRGBA=function(t,e){if("number"!=typeof t)return y.throwError.call(this,"i must be a number",e);var r={};return r.r=Math.floor(t/Math.pow(256,3)),r.g=Math.floor((t-r.r*Math.pow(256,3))/Math.pow(256,2)),r.b=Math.floor((t-r.r*Math.pow(256,3)-r.g*Math.pow(256,2))/Math.pow(256,1)),r.a=Math.floor((t-r.r*Math.pow(256,3)-r.g*Math.pow(256,2)-r.b*Math.pow(256,1))/Math.pow(256,0)),(0,y.isNodePattern)(e)&&e.call(this,null,r),r},Z.cssColorToHex=function(t){return"number"==typeof(t=t||0)?Number(t):parseInt((0,x.default)(t).toHex8(),16)},Z.limit255=function(t){return t=Math.max(t,0),t=Math.min(t,255)},Z.diff=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.1;if(!(t instanceof Z&&e instanceof Z))return y.throwError.call(this,"img1 and img2 must be an Jimp images");var n=t.bitmap,i=e.bitmap;if(n.width===i.width&&n.height===i.height||(n.width*n.height>i.width*i.height?t=t.cloneQuiet().resize(i.width,i.height):e=e.cloneQuiet().resize(n.width,n.height)),"number"!=typeof r||r<0||r>1)return y.throwError.call(this,"threshold must be a number between 0 and 1");var a=new Z(n.width,n.height,4294967295),o=(0,E.default)(n.data,i.data,a.bitmap.data,a.bitmap.width,a.bitmap.height,{threshold:r});return{percent:o/(a.bitmap.width*a.bitmap.height),image:a}},Z.distance=function(t,e){var r=new S.default,n=r.getHash(t),i=r.getHash(e);return r.distance(n,i)},Z.compareHashes=function(t,e){return(new S.default).distance(t,e)},Z.colorDiff=function(t,e){var r=function(t){return Math.pow(t,2)},n=Math.max;return 0===t.a||t.a||(t.a=255),0===e.a||e.a||(e.a=255),(n(r(t.r-e.r),r(t.r-e.r-t.a+e.a))+n(r(t.g-e.g),r(t.g-e.g-t.a+e.a))+n(r(t.b-e.b),r(t.b-e.b-t.a+e.a)))/195075},W("clone","clone",(function(t){var e=new Z(this);return(0,y.isNodePattern)(t)&&t.call(e,null,e),e})),V("background",(function(t,e){return"number"!=typeof t?y.throwError.call(this,"hex must be a hexadecimal rgba value",e):(this._background=t,(0,y.isNodePattern)(e)&&e.call(this,null,this),this)})),V("scan",(function(t,e,r,n,i,a){if("number"!=typeof t||"number"!=typeof e)return y.throwError.call(this,"x and y must be numbers",a);if("number"!=typeof r||"number"!=typeof n)return y.throwError.call(this,"w and h must be numbers",a);if("function"!=typeof i)return y.throwError.call(this,"f must be a function",a);var o=(0,y.scan)(this,t,e,r,n,i);return(0,y.isNodePattern)(a)&&a.call(this,null,o),o})),"BROWSER"===n.env.ENVIRONMENT)&&("undefined"!=typeof window&&"object"===("undefined"==typeof window?"undefined":(0,m.default)(window))&&(H=window),"undefined"!=typeof self&&"object"===("undefined"==typeof self?"undefined":(0,m.default)(self))&&(H=self),H.Jimp=Z,H.Buffer=t);var X=Z;e.default=X}).call(this,r(0).Buffer,r(1))},function(t,e,r){"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=u(t),o=n[0],s=n[1],f=new a(function(t,e,r){return 3*(e+r)/4-r}(0,o,s)),h=0,l=s>0?o-4:o;for(r=0;r<l;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],f[h++]=e>>16&255,f[h++]=e>>8&255,f[h++]=255&e;2===s&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,f[h++]=255&e);1===s&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,f[h++]=e>>8&255,f[h++]=255&e);return f},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,a=[],o=0,s=r-i;o<s;o+=16383)a.push(h(t,o,o+16383>s?s:o+16383));1===i?(e=t[r-1],a.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],a.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,f=o.length;s<f;++s)n[s]=o[s],i[o.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t,e,r){for(var i,a,o=[],s=e;s<r;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),o.push(n[(a=i)>>18&63]+n[a>>12&63]+n[a>>6&63]+n[63&a]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
e.read=function(t,e,r,n,i){var a,o,s=8*i-n-1,f=(1<<s)-1,u=f>>1,h=-7,l=r?i-1:0,c=r?-1:1,d=t[e+l];for(l+=c,a=d&(1<<-h)-1,d>>=-h,h+=s;h>0;a=256*a+t[e+l],l+=c,h-=8);for(o=a&(1<<-h)-1,a>>=-h,h+=n;h>0;o=256*o+t[e+l],l+=c,h-=8);if(0===a)a=1-u;else{if(a===f)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=u}return(d?-1:1)*o*Math.pow(2,a-n)},e.write=function(t,e,r,n,i,a){var o,s,f,u=8*a-i-1,h=(1<<u)-1,l=h>>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,m=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=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-o))<1&&(o--,f*=2),(e+=o+l>=1?c/f:c*Math.pow(2,1-l))*f>=2&&(o++,f/=2),o+l>=h?(s=0,o=h):o+l>=1?(s=(e*f-1)*Math.pow(2,i),o+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),o=0));i>=8;t[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<<i|s,u+=i;u>0;t[r+d]=255&o,d+=p,o/=256,u-=8);t[r+d-p]|=128*m}},function(t,e,r){var n=r(28),i=r(70);function a(e,r,o){return i()?t.exports=a=Reflect.construct:t.exports=a=function(t,e,r){var i=[null];i.push.apply(i,e);var a=new(Function.bind.apply(t,i));return r&&n(a,r.prototype),a},a.apply(null,arguments)}t.exports=a},function(t,e){t.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function r(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}t.exports=function(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}},function(t,e,r){var n=r(18),i=r(29);t.exports=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?i(t):e}},function(t,e){function r(e){return t.exports=r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},r(e)}t.exports=r},function(t,e,r){var n=r(28);t.exports=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&n(t,e)}},function(t,e,r){t.exports=r(77)},function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},i=n.iterator||"@@iterator",a=n.asyncIterator||"@@asyncIterator",o=n.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var i=e&&e.prototype instanceof l?e:l,a=Object.create(i.prototype),o=new x(n||[]);return a._invoke=function(t,e,r){var n="suspendedStart";return function(i,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw a;return T()}for(r.method=i,r.arg=a;;){var o=r.delegate;if(o){var s=v(o,r);if(s){if(s===h)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var f=u(t,e,r);if("normal"===f.type){if(n=r.done?"completed":"suspendedYield",f.arg===h)continue;return{value:f.arg,done:r.done}}"throw"===f.type&&(n="completed",r.method="throw",r.arg=f.arg)}}}(t,r,o),a}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var h={};function l(){}function c(){}function d(){}var p={};p[i]=function(){return this};var m=Object.getPrototypeOf,g=m&&m(m(S([])));g&&g!==e&&r.call(g,i)&&(p=g);var b=d.prototype=l.prototype=Object.create(p);function _(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function y(t,e){var n;this._invoke=function(i,a){function o(){return new e((function(n,o){!function n(i,a,o,s){var f=u(t[i],t,a);if("throw"!==f.type){var h=f.arg,l=h.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,o,s)}),(function(t){n("throw",t,o,s)})):e.resolve(l).then((function(t){h.value=t,o(h)}),(function(t){return n("throw",t,o,s)}))}s(f.arg)}(i,a,n,o)}))}return n=n?n.then(o,o):o()}}function v(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,v(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=u(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var i=n.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function w(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function S(t){if(t){var e=t[i];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:T}}function T(){return{value:void 0,done:!0}}return c.prototype=b.constructor=d,d.constructor=c,c.displayName=s(d,o,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===c||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,o,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},_(y.prototype),y.prototype[a]=function(){return this},t.AsyncIterator=y,t.async=function(e,r,n,i,a){void 0===a&&(a=Promise);var o=new y(f(e,r,n,i),a);return t.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},_(b),s(b,o,"Generator"),b[i]=function(){return this},b.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=S,x.prototype={constructor:x,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return o.type="throw",o.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],o=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var s=r.call(a,"catchLoc"),f=r.call(a,"finallyLoc");if(s&&f){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(s){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var a=i;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,h):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),h},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:S(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,r){var n=r(79);function i(t,e){var r=new n(t,e);return function(t){return r.convert(t)}}i.BIN="01",i.OCT="01234567",i.DEC="0123456789",i.HEX="0123456789abcdef",t.exports=i},function(t,e,r){"use strict";function n(t,e){if(!(t&&e&&t.length&&e.length))throw new Error("Bad alphabet");this.srcAlphabet=t,this.dstAlphabet=e}n.prototype.convert=function(t){var e,r,n,i={},a=this.srcAlphabet.length,o=this.dstAlphabet.length,s=t.length,f="string"==typeof t?"":[];if(!this.isValid(t))throw new Error('Number "'+t+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return t;for(e=0;e<s;e++)i[e]=this.srcAlphabet.indexOf(t[e]);do{for(r=0,n=0,e=0;e<s;e++)(r=r*a+i[e])>=o?(i[n++]=parseInt(r/o,10),r%=o):n>0&&(i[n++]=0);s=n,f=this.dstAlphabet.slice(r,r+1).concat(f)}while(0!==n);return f},n.prototype.isValid=function(t){for(var e=0;e<t.length;++e)if(-1===this.srcAlphabet.indexOf(t[e]))return!1;return!0},t.exports=n},function(t,e,r){var n=r(31),i=r(30),a=parseInt("0777",8);function o(t,e,r,s){"function"==typeof e?(r=e,e={}):e&&"object"==typeof e||(e={mode:e});var f=e.mode,u=e.fs||i;void 0===f&&(f=a),s||(s=null);var h=r||function(){};t=n.resolve(t),u.mkdir(t,f,(function(r){if(!r)return h(null,s=s||t);switch(r.code){case"ENOENT":if(n.dirname(t)===t)return h(r);o(n.dirname(t),e,(function(r,n){r?h(r,n):o(t,e,h,n)}));break;default:u.stat(t,(function(t,e){t||!e.isDirectory()?h(r,s):h(null,s)}))}}))}t.exports=o.mkdirp=o.mkdirP=o,o.sync=function t(e,r,o){r&&"object"==typeof r||(r={mode:r});var s=r.mode,f=r.fs||i;void 0===s&&(s=a),o||(o=null),e=n.resolve(e);try{f.mkdirSync(e,s),o=o||e}catch(i){switch(i.code){case"ENOENT":o=t(n.dirname(e),r,o),t(e,r,o);break;default:var u;try{u=f.statSync(e)}catch(t){throw i}if(!u.isDirectory())throw i}}return o}},function(t,e,r){"use strict";function n(t,e,r,a,o,s){for(var f,u,h,l,c=Math.max(e-1,0),d=Math.max(r-1,0),p=Math.min(e+1,a-1),m=Math.min(r+1,o-1),g=4*(r*a+e),b=0,_=0,y=0,v=0,w=0,E=c;E<=p;E++)for(var x=d;x<=m;x++)if(E!==e||x!==r){var S=i(t,t,g,4*(x*a+E),!0);if(0===S?b++:S<0?y++:S>0&&_++,b>2)return!1;s&&(S<v&&(v=S,f=E,u=x),S>w&&(w=S,h=E,l=x))}return!s||0!==y&&0!==_&&(!n(t,f,u,a,o)&&!n(s,f,u,a,o)||!n(t,h,l,a,o)&&!n(s,h,l,a,o))}function i(t,e,r,n,i){var u=t[r+3]/255,h=e[n+3]/255,l=f(t[r+0],u),c=f(t[r+1],u),d=f(t[r+2],u),p=f(e[n+0],h),m=f(e[n+1],h),g=f(e[n+2],h),b=a(l,c,d)-a(p,m,g);if(i)return b;var _=o(l,c,d)-o(p,m,g),y=s(l,c,d)-s(p,m,g);return.5053*b*b+.299*_*_+.1957*y*y}function a(t,e,r){return.29889531*t+.58662247*e+.11448223*r}function o(t,e,r){return.59597799*t-.2741761*e-.32180189*r}function s(t,e,r){return.21147017*t-.52261711*e+.31114694*r}function f(t,e){return 255+(t-255)*e}function u(t,e,r,n,i){t[e+0]=r,t[e+1]=n,t[e+2]=i,t[e+3]=255}t.exports=function(t,e,r,o,s,h){h||(h={});for(var l=void 0===h.threshold?.1:h.threshold,c=35215*l*l,d=0,p=0;p<s;p++)for(var m=0;m<o;m++){var g=4*(p*o+m);if(i(t,e,g,g)>c)h.includeAA||!n(t,m,p,o,s,e)&&!n(e,m,p,o,s,t)?(r&&u(r,g,255,0,0),d++):r&&u(r,g,255,255,0);else if(r){var b=f((v=void 0,w=void 0,E=void 0,x=void 0,v=(_=t)[(y=g)+3]/255,w=f(_[y+0],v),E=f(_[y+1],v),x=f(_[y+2],v),a(w,E,x)),.1);u(r,g,b,b,b)}}var _,y,v,w,E,x;return d}},function(t,e,r){var n;!function(i){var a=/^\s+/,o=/\s+$/,s=0,f=i.round,u=i.min,h=i.max,l=i.random;function c(t,e){if(e=e||{},(t=t||"")instanceof c)return t;if(!(this instanceof c))return new c(t,e);var r=function(t){var e={r:0,g:0,b:0},r=1,n=null,s=null,f=null,l=!1,c=!1;"string"==typeof t&&(t=function(t){t=t.replace(a,"").replace(o,"").toLowerCase();var e,r=!1;if(P[t])t=P[t],r=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(e=G.rgb.exec(t))return{r:e[1],g:e[2],b:e[3]};if(e=G.rgba.exec(t))return{r:e[1],g:e[2],b:e[3],a:e[4]};if(e=G.hsl.exec(t))return{h:e[1],s:e[2],l:e[3]};if(e=G.hsla.exec(t))return{h:e[1],s:e[2],l:e[3],a:e[4]};if(e=G.hsv.exec(t))return{h:e[1],s:e[2],v:e[3]};if(e=G.hsva.exec(t))return{h:e[1],s:e[2],v:e[3],a:e[4]};if(e=G.hex8.exec(t))return{r:D(e[1]),g:D(e[2]),b:D(e[3]),a:U(e[4]),format:r?"name":"hex8"};if(e=G.hex6.exec(t))return{r:D(e[1]),g:D(e[2]),b:D(e[3]),format:r?"name":"hex"};if(e=G.hex4.exec(t))return{r:D(e[1]+""+e[1]),g:D(e[2]+""+e[2]),b:D(e[3]+""+e[3]),a:U(e[4]+""+e[4]),format:r?"name":"hex8"};if(e=G.hex3.exec(t))return{r:D(e[1]+""+e[1]),g:D(e[2]+""+e[2]),b:D(e[3]+""+e[3]),format:r?"name":"hex"};return!1}(t));"object"==typeof t&&(Z(t.r)&&Z(t.g)&&Z(t.b)?(d=t.r,p=t.g,m=t.b,e={r:255*C(d,255),g:255*C(p,255),b:255*C(m,255)},l=!0,c="%"===String(t.r).substr(-1)?"prgb":"rgb"):Z(t.h)&&Z(t.s)&&Z(t.v)?(n=B(t.s),s=B(t.v),e=function(t,e,r){t=6*C(t,360),e=C(e,100),r=C(r,100);var n=i.floor(t),a=t-n,o=r*(1-e),s=r*(1-a*e),f=r*(1-(1-a)*e),u=n%6;return{r:255*[r,s,o,o,f,r][u],g:255*[f,r,r,s,o,o][u],b:255*[o,o,f,r,r,s][u]}}(t.h,n,s),l=!0,c="hsv"):Z(t.h)&&Z(t.s)&&Z(t.l)&&(n=B(t.s),f=B(t.l),e=function(t,e,r){var n,i,a;function o(t,e,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}if(t=C(t,360),e=C(e,100),r=C(r,100),0===e)n=i=a=r;else{var s=r<.5?r*(1+e):r+e-r*e,f=2*r-s;n=o(f,s,t+1/3),i=o(f,s,t),a=o(f,s,t-1/3)}return{r:255*n,g:255*i,b:255*a}}(t.h,n,f),l=!0,c="hsl"),t.hasOwnProperty("a")&&(r=t.a));var d,p,m;return r=L(r),{ok:l,format:t.format||c,r:u(255,h(e.r,0)),g:u(255,h(e.g,0)),b:u(255,h(e.b,0)),a:r}}(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=f(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=f(this._r)),this._g<1&&(this._g=f(this._g)),this._b<1&&(this._b=f(this._b)),this._ok=r.ok,this._tc_id=s++}function d(t,e,r){t=C(t,255),e=C(e,255),r=C(r,255);var n,i,a=h(t,e,r),o=u(t,e,r),s=(a+o)/2;if(a==o)n=i=0;else{var f=a-o;switch(i=s>.5?f/(2-a-o):f/(a+o),a){case t:n=(e-r)/f+(e<r?6:0);break;case e:n=(r-t)/f+2;break;case r:n=(t-e)/f+4}n/=6}return{h:n,s:i,l:s}}function p(t,e,r){t=C(t,255),e=C(e,255),r=C(r,255);var n,i,a=h(t,e,r),o=u(t,e,r),s=a,f=a-o;if(i=0===a?0:f/a,a==o)n=0;else{switch(a){case t:n=(e-r)/f+(e<r?6:0);break;case e:n=(r-t)/f+2;break;case r:n=(t-e)/f+4}n/=6}return{h:n,s:i,v:s}}function m(t,e,r,n){var i=[N(f(t).toString(16)),N(f(e).toString(16)),N(f(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function g(t,e,r,n){return[N(F(n)),N(f(t).toString(16)),N(f(e).toString(16)),N(f(r).toString(16))].join("")}function b(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.s-=e/100,r.s=M(r.s),c(r)}function _(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.s+=e/100,r.s=M(r.s),c(r)}function y(t){return c(t).desaturate(100)}function v(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.l+=e/100,r.l=M(r.l),c(r)}function w(t,e){e=0===e?0:e||10;var r=c(t).toRgb();return r.r=h(0,u(255,r.r-f(-e/100*255))),r.g=h(0,u(255,r.g-f(-e/100*255))),r.b=h(0,u(255,r.b-f(-e/100*255))),c(r)}function E(t,e){e=0===e?0:e||10;var r=c(t).toHsl();return r.l-=e/100,r.l=M(r.l),c(r)}function x(t,e){var r=c(t).toHsl(),n=(r.h+e)%360;return r.h=n<0?360+n:n,c(r)}function S(t){var e=c(t).toHsl();return e.h=(e.h+180)%360,c(e)}function T(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+120)%360,s:e.s,l:e.l}),c({h:(r+240)%360,s:e.s,l:e.l})]}function k(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+90)%360,s:e.s,l:e.l}),c({h:(r+180)%360,s:e.s,l:e.l}),c({h:(r+270)%360,s:e.s,l:e.l})]}function A(t){var e=c(t).toHsl(),r=e.h;return[c(t),c({h:(r+72)%360,s:e.s,l:e.l}),c({h:(r+216)%360,s:e.s,l:e.l})]}function O(t,e,r){e=e||6,r=r||30;var n=c(t).toHsl(),i=360/r,a=[c(t)];for(n.h=(n.h-(i*e>>1)+720)%360;--e;)n.h=(n.h+i)%360,a.push(c(n));return a}function I(t,e){e=e||6;for(var r=c(t).toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/e;e--;)o.push(c({h:n,s:i,v:a})),a=(a+s)%1;return o}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,n=this.toRgb();return t=n.r/255,e=n.g/255,r=n.b/255,.2126*(t<=.03928?t/12.92:i.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:i.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:i.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=L(t),this._roundA=f(100*this._a)/100,this},toHsv:function(){var t=p(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=p(this._r,this._g,this._b),e=f(360*t.h),r=f(100*t.s),n=f(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+n+"%)":"hsva("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var t=d(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=d(this._r,this._g,this._b),e=f(360*t.h),r=f(100*t.s),n=f(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+n+"%)":"hsla("+e+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(t){return m(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,n,i){var a=[N(f(t).toString(16)),N(f(e).toString(16)),N(f(r).toString(16)),N(F(n))];if(i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:f(this._r),g:f(this._g),b:f(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+f(this._r)+", "+f(this._g)+", "+f(this._b)+")":"rgba("+f(this._r)+", "+f(this._g)+", "+f(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:f(100*C(this._r,255))+"%",g:f(100*C(this._g,255))+"%",b:f(100*C(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+f(100*C(this._r,255))+"%, "+f(100*C(this._g,255))+"%, "+f(100*C(this._b,255))+"%)":"rgba("+f(100*C(this._r,255))+"%, "+f(100*C(this._g,255))+"%, "+f(100*C(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(R[m(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+g(this._r,this._g,this._b,this._a),r=e,n=this._gradientType?"GradientType = 1, ":"";if(t){var i=c(t);r="#"+g(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,n=this._a<1&&this._a>=0;return e||!n||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(r=this.toRgbString()),"prgb"===t&&(r=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(r=this.toHexString()),"hex3"===t&&(r=this.toHexString(!0)),"hex4"===t&&(r=this.toHex8String(!0)),"hex8"===t&&(r=this.toHex8String()),"name"===t&&(r=this.toName()),"hsl"===t&&(r=this.toHslString()),"hsv"===t&&(r=this.toHsvString()),r||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,e){var r=t.apply(null,[this].concat([].slice.call(e)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(b,arguments)},saturate:function(){return this._applyModification(_,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(x,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(O,arguments)},complement:function(){return this._applyCombination(S,arguments)},monochromatic:function(){return this._applyCombination(I,arguments)},splitcomplement:function(){return this._applyCombination(A,arguments)},triad:function(){return this._applyCombination(T,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},c.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var n in t)t.hasOwnProperty(n)&&(r[n]="a"===n?t[n]:B(t[n]));t=r}return c(t,e)},c.equals=function(t,e){return!(!t||!e)&&c(t).toRgbString()==c(e).toRgbString()},c.random=function(){return c.fromRatio({r:l(),g:l(),b:l()})},c.mix=function(t,e,r){r=0===r?0:r||50;var n=c(t).toRgb(),i=c(e).toRgb(),a=r/100;return c({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})},c.readability=function(t,e){var r=c(t),n=c(e);return(i.max(r.getLuminance(),n.getLuminance())+.05)/(i.min(r.getLuminance(),n.getLuminance())+.05)},c.isReadable=function(t,e,r){var n,i,a=c.readability(t,e);switch(i=!1,(n=function(t){var e,r;e=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(t.size||"small").toLowerCase(),"AA"!==e&&"AAA"!==e&&(e="AA");"small"!==r&&"large"!==r&&(r="small");return{level:e,size:r}}(r)).level+n.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},c.mostReadable=function(t,e,r){var n,i,a,o,s=null,f=0;i=(r=r||{}).includeFallbackColors,a=r.level,o=r.size;for(var u=0;u<e.length;u++)(n=c.readability(t,e[u]))>f&&(f=n,s=c(e[u]));return c.isReadable(t,s,{level:a,size:o})||!i?s:(r.includeFallbackColors=!1,c.mostReadable(t,["#fff","#000"],r))};var P=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},R=c.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(P);function L(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function C(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=u(e,h(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),i.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function M(t){return u(1,h(0,t))}function D(t){return parseInt(t,16)}function N(t){return 1==t.length?"0"+t:""+t}function B(t){return t<=1&&(t=100*t+"%"),t}function F(t){return i.round(255*parseFloat(t)).toString(16)}function U(t){return D(t)/255}var j,z,H,G=(z="[\\s|\\(]+("+(j="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+j+")[,|\\s]+("+j+")\\s*\\)?",H="[\\s|\\(]+("+j+")[,|\\s]+("+j+")[,|\\s]+("+j+")[,|\\s]+("+j+")\\s*\\)?",{CSS_UNIT:new RegExp(j),rgb:new RegExp("rgb"+z),rgba:new RegExp("rgba"+H),hsl:new RegExp("hsl"+z),hsla:new RegExp("hsla"+H),hsv:new RegExp("hsv"+z),hsva:new RegExp("hsva"+H),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function Z(t){return!!G.CSS_UNIT.exec(t)}t.exports?t.exports=c:void 0===(n=function(){return c}.call(e,r,e,t))||(t.exports=n)}(Math)},function(t,e,r){"use strict";function n(t,e){this.size=this.size||t,this.smallerSize=this.smallerSize||e,function(t){for(var e=1;e<t;e++)a[e]=1;a[0]=1/Math.sqrt(2)}(this.size)}function i(t){var e={};return e.r=Math.floor(t/Math.pow(256,3)),e.g=Math.floor((t-e.r*Math.pow(256,3))/Math.pow(256,2)),e.b=Math.floor((t-e.r*Math.pow(256,3)-e.g*Math.pow(256,2))/Math.pow(256,1)),e.a=Math.floor((t-e.r*Math.pow(256,3)-e.g*Math.pow(256,2)-e.b*Math.pow(256,1))/Math.pow(256,0)),e}n.prototype.size=32,n.prototype.smallerSize=8,n.prototype.distance=function(t,e){for(var r=0,n=0;n<t.length;n++)t[n]!==e[n]&&r++;return r/t.length},n.prototype.getHash=function(t){(t=t.clone().resize(this.size,this.size)).grayscale();for(var e=[],r=0;r<t.bitmap.width;r++){e[r]=[];for(var n=0;n<t.bitmap.height;n++)e[r][n]=i(t.getPixelColor(r,n)).b}for(var o=function(t,e){for(var r=e,n=[],i=0;i<r;i++){n[i]=[];for(var o=0;o<r;o++){for(var s=0,f=0;f<r;f++)for(var u=0;u<r;u++)s+=Math.cos((2*f+1)/(2*r)*i*Math.PI)*Math.cos((2*u+1)/(2*r)*o*Math.PI)*t[f][u];s*=a[i]*a[o]/4,n[i][o]=s}}return n}(e,this.size),s=0,f=0;f<this.smallerSize;f++)for(var u=0;u<this.smallerSize;u++)s+=o[f][u];for(var h=s/(this.smallerSize*this.smallerSize),l="",c=0;c<this.smallerSize;c++)for(var d=0;d<this.smallerSize;d++)l+=o[c][d]>h?"1":"0";return l};var a=[];t.exports=n},function(t,e,r){"use strict";(function(e,n){var i=r(6),a=i(r(12)),o=i(r(85));function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}e.browser||"BROWSER"===e.env.ENVIRONMENT||void 0!==e.versions.electron&&"renderer"===e.type&&"function"==typeof XMLHttpRequest?t.exports=function(t,e){var r=new XMLHttpRequest;r.open("GET",t.url,!0),r.responseType="arraybuffer",r.addEventListener("load",(function(){if(r.status<400)try{var i=n.from(this.response);e(null,r,i)}catch(r){return e(new Error("Response is not a buffer for url "+t.url+". Error: "+r.message))}else e(new Error("HTTP Status "+r.status+" for url "+t.url))})),r.addEventListener("error",(function(t){e(t)})),r.send()}:t.exports=function(t,e){var n=(0,o.default)({},t);r(86)(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(r,!0).forEach((function(e){(0,a.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(r).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({compression:!0},n),(function(t,r){null===t?e(null,r,r.body):e(t)}))}}).call(this,r(1),r(0).Buffer)},function(t,e){function r(){return t.exports=r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},r.apply(this,arguments)}t.exports=r},function(t,e,r){"use strict";(function(e){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=r(32),a=r(104),o=r(22),s=r(40),f=r(7),u=r(3),h=function(t,r){if("string"!=typeof t&&!t.hasOwnProperty("url"))throw new Error("Missing url option from options for request method.");var u="object"===(void 0===t?"undefined":n(t))?o.parse(t.url):o.parse(t),h={hostname:u.hostname,port:u.port||("http:"===u.protocol.toLowerCase()?80:443),path:u.path,method:"GET",headers:{},auth:u.auth||null,parse:"none",stream:!1};if("object"===(void 0===t?"undefined":n(t))&&(h=Object.assign(h,t)),h.port=Number(h.port),h.hasOwnProperty("timeout")&&delete h.timeout,!0===h.compressed&&(h.headers["accept-encoding"]="gzip, deflate"),t.hasOwnProperty("form")){if("object"!==n(t.form))throw new Error("phin 'form' option must be of type Object if present.");var l=s.stringify(t.form);h.headers["Content-Type"]="application/x-www-form-urlencoded",h.headers["Content-Length"]=e.byteLength(l),t.data=l}var c=void 0,d=function(t){var n=t;!0===h.compressed&&("gzip"===t.headers["content-encoding"]?n=t.pipe(f.createGunzip()):"deflate"===t.headers["content-encoding"]&&(n=t.pipe(f.createInflate()))),!0===h.stream?(t.stream=n,r&&r(null,t)):(t.body=new e([]),n.on("data",(function(r){t.body=e.concat([t.body,r])})),n.on("end",(function(){if(r){if("json"===h.parse)try{t.body=JSON.parse(t.body.toString())}catch(e){return void r("Invalid JSON received.",t)}r(null,t)}})))};switch(u.protocol.toLowerCase()){case"http:":c=i.request(h,d);break;case"https:":c=a.request(h,d);break;default:return void(r&&r(new Error("Invalid / unknown URL protocol. Expected HTTP or HTTPS."),null))}if("number"==typeof t.timeout&&c.setTimeout(t.timeout,(function(){c.abort(),r&&r(new Error("Timeout has been reached."),null),r=null})),c.on("error",(function(t){r&&r(t,null)})),t.hasOwnProperty("data")){var p=t.data;if(!(t.data instanceof e)&&"object"===n(t.data))if("application/x-www-form-urlencoded"===(h.headers["content-type"]||h.headers["Content-Type"]))p=s.stringify(t.data);else try{p=JSON.stringify(t.data)}catch(t){r&&r(new Error("Couldn't stringify object. (Likely due to a circular reference.)"),null)}c.write(p)}c.end()};h.promisified=function(t,e){return new Promise((function(e,r){h(t,(function(t,n){t?r(t):e(n)}))}))},u.promisify&&(h[u.promisify.custom]=h.promisified),t.exports=h}).call(this,r(0).Buffer)},function(t,e,r){(function(e,n,i){var a=r(33),o=r(4),s=r(34),f=r(8),u=r(96),h=s.IncomingMessage,l=s.readyStates;var c=t.exports=function(t){var r,n=this;f.Writable.call(n),n._opts=t,n._body=[],n._headers={},t.auth&&n.setHeader("Authorization","Basic "+new e(t.auth).toString("base64")),Object.keys(t.headers).forEach((function(e){n.setHeader(e,t.headers[e])}));var i=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!a.abortController)i=!1,r=!0;else if("prefer-streaming"===t.mode)r=!1;else if("allow-wrong-content-type"===t.mode)r=!a.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");r=!0}n._mode=function(t,e){return a.fetch&&e?"fetch":a.mozchunkedarraybuffer?"moz-chunked-arraybuffer":a.msstream?"ms-stream":a.arraybuffer&&t?"arraybuffer":a.vbArray&&t?"text:vbarray":"text"}(r,i),n._fetchTimer=null,n.on("finish",(function(){n._onFinish()}))};o(c,f.Writable),c.prototype.setHeader=function(t,e){var r=t.toLowerCase();-1===d.indexOf(r)&&(this._headers[r]={name:t,value:e})},c.prototype.getHeader=function(t){var e=this._headers[t.toLowerCase()];return e?e.value:null},c.prototype.removeHeader=function(t){delete this._headers[t.toLowerCase()]},c.prototype._onFinish=function(){var t=this;if(!t._destroyed){var r=t._opts,o=t._headers,s=null;"GET"!==r.method&&"HEAD"!==r.method&&(s=a.arraybuffer?u(e.concat(t._body)):a.blobConstructor?new n.Blob(t._body.map((function(t){return u(t)})),{type:(o["content-type"]||{}).value||""}):e.concat(t._body).toString());var f=[];if(Object.keys(o).forEach((function(t){var e=o[t].name,r=o[t].value;Array.isArray(r)?r.forEach((function(t){f.push([e,t])})):f.push([e,r])})),"fetch"===t._mode){var h=null;if(a.abortController){var c=new AbortController;h=c.signal,t._fetchAbortController=c,"requestTimeout"in r&&0!==r.requestTimeout&&(t._fetchTimer=n.setTimeout((function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()}),r.requestTimeout))}n.fetch(t._opts.url,{method:t._opts.method,headers:f,body:s||void 0,mode:"cors",credentials:r.withCredentials?"include":"same-origin",signal:h}).then((function(e){t._fetchResponse=e,t._connect()}),(function(e){n.clearTimeout(t._fetchTimer),t._destroyed||t.emit("error",e)}))}else{var d=t._xhr=new n.XMLHttpRequest;try{d.open(t._opts.method,t._opts.url,!0)}catch(e){return void i.nextTick((function(){t.emit("error",e)}))}"responseType"in d&&(d.responseType=t._mode.split(":")[0]),"withCredentials"in d&&(d.withCredentials=!!r.withCredentials),"text"===t._mode&&"overrideMimeType"in d&&d.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in r&&(d.timeout=r.requestTimeout,d.ontimeout=function(){t.emit("requestTimeout")}),f.forEach((function(t){d.setRequestHeader(t[0],t[1])})),t._response=null,d.onreadystatechange=function(){switch(d.readyState){case l.LOADING:case l.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(d.onprogress=function(){t._onXHRProgress()}),d.onerror=function(){t._destroyed||t.emit("error",new Error("XHR error"))};try{d.send(s)}catch(e){return void i.nextTick((function(){t.emit("error",e)}))}}}},c.prototype._onXHRProgress=function(){(function(t){try{var e=t.status;return null!==e&&0!==e}catch(t){return!1}})(this._xhr)&&!this._destroyed&&(this._response||this._connect(),this._response._onXHRProgress())},c.prototype._connect=function(){var t=this;t._destroyed||(t._response=new h(t._xhr,t._fetchResponse,t._mode,t._fetchTimer),t._response.on("error",(function(e){t.emit("error",e)})),t.emit("response",t._response))},c.prototype._write=function(t,e,r){this._body.push(t),r()},c.prototype.abort=c.prototype.destroy=function(){this._destroyed=!0,n.clearTimeout(this._fetchTimer),this._response&&(this._response._destroyed=!0),this._xhr?this._xhr.abort():this._fetchAbortController&&this._fetchAbortController.abort()},c.prototype.end=function(t,e,r){"function"==typeof t&&(r=t,t=void 0),f.Writable.prototype.end.call(this,t,e,r)},c.prototype.flushHeaders=function(){},c.prototype.setTimeout=function(){},c.prototype.setNoDelay=function(){},c.prototype.setSocketKeepAlive=function(){};var d=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,r(0).Buffer,r(2),r(1))},function(t,e){},function(t,e,r){"use strict";var n=r(20).Buffer,i=r(90);t.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,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,r,i,a=n.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=o.data,r=a,i=s,e.copy(r,i),s+=o.data.length,o=o.next;return a},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function a(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new a(i.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new a(i.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},a.prototype.unref=a.prototype.ref=function(){},a.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(92),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(2))},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var n,i,a,o,s,f=1,u={},h=!1,l=t.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(t);c=c&&c.setTimeout?c:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?t.MessageChannel?((a=new MessageChannel).port1.onmessage=function(t){p(t.data)},n=function(t){a.port2.postMessage(t)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,n=function(t){var e=l.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):n=function(t){setTimeout(p,0,t)}:(o="setImmediate$"+Math.random()+"$",s=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(o)&&p(+e.data.slice(o.length))},t.addEventListener?t.addEventListener("message",s,!1):t.attachEvent("onmessage",s),n=function(e){t.postMessage(o+e,"*")}),c.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var i={callback:t,args:e};return u[f]=i,n(f),f++},c.clearImmediate=d}function d(t){delete u[t]}function p(t){if(h)setTimeout(p,0,t);else{var e=u[t];if(e){h=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(void 0,r)}}(e)}finally{d(t),h=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,r(2),r(1))},function(t,e,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this,r(2))},function(t,e,r){
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
var n=r(0),i=n.Buffer;function a(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(a(n,e),e.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},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 n.SlowBuffer(t)}},function(t,e,r){"use strict";t.exports=a;var n=r(39),i=Object.create(r(9));function a(t){if(!(this instanceof a))return new a(t);n.call(this,t)}i.inherits=r(4),i.inherits(a,n),a.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){var n=r(0).Buffer;t.exports=function(t){if(t instanceof Uint8Array){if(0===t.byteOffset&&t.byteLength===t.buffer.byteLength)return t.buffer;if("function"==typeof t.buffer.slice)return t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}if(n.isBuffer(t)){for(var e=new Uint8Array(t.length),r=t.length,i=0;i<r;i++)e[i]=t[i];return e.buffer}throw new Error("Argument must be a Buffer")}},function(t,e){t.exports=function(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var i in n)r.call(n,i)&&(t[i]=n[i])}return t};var r=Object.prototype.hasOwnProperty},function(t,e){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},function(t,e,r){(function(t,n){var i;/*! https://mths.be/punycode v1.4.1 by @mathias */!function(a){e&&e.nodeType,t&&t.nodeType;var o="object"==typeof n&&n;o.global!==o&&o.window!==o&&o.self;var s,f=2147483647,u=/^xn--/,h=/[^\x20-\x7E]/,l=/[\x2E\u3002\uFF0E\uFF61]/g,c={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=Math.floor,p=String.fromCharCode;function m(t){throw new RangeError(c[t])}function g(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function b(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+g((t=t.replace(l,".")).split("."),e).join(".")}function _(t){for(var e,r,n=[],i=0,a=t.length;i<a;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<a?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function y(t){return g(t,(function(t){var e="";return t>65535&&(e+=p((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=p(t)})).join("")}function v(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function w(t,e,r){var n=0;for(t=r?d(t/700):t>>1,t+=d(t/e);t>455;n+=36)t=d(t/35);return d(n+36*t/(t+38))}function E(t){var e,r,n,i,a,o,s,u,h,l,c,p=[],g=t.length,b=0,_=128,v=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&m("not-basic"),p.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<g;){for(a=b,o=1,s=36;i>=g&&m("invalid-input"),((u=(c=t.charCodeAt(i++))-48<10?c-22:c-65<26?c-65:c-97<26?c-97:36)>=36||u>d((f-b)/o))&&m("overflow"),b+=u*o,!(u<(h=s<=v?1:s>=v+26?26:s-v));s+=36)o>d(f/(l=36-h))&&m("overflow"),o*=l;v=w(b-a,e=p.length+1,0==a),d(b/e)>f-_&&m("overflow"),_+=d(b/e),b%=e,p.splice(b++,0,_)}return y(p)}function x(t){var e,r,n,i,a,o,s,u,h,l,c,g,b,y,E,x=[];for(g=(t=_(t)).length,e=128,r=0,a=72,o=0;o<g;++o)(c=t[o])<128&&x.push(p(c));for(n=i=x.length,i&&x.push("-");n<g;){for(s=f,o=0;o<g;++o)(c=t[o])>=e&&c<s&&(s=c);for(s-e>d((f-r)/(b=n+1))&&m("overflow"),r+=(s-e)*b,e=s,o=0;o<g;++o)if((c=t[o])<e&&++r>f&&m("overflow"),c==e){for(u=r,h=36;!(u<(l=h<=a?1:h>=a+26?26:h-a));h+=36)E=u-l,y=36-l,x.push(p(v(l+E%y,0))),u=d(E/y);x.push(p(v(u,0))),a=w(r,b,n==i),r=0,++n}++r,++e}return x.join("")}s={version:"1.4.1",ucs2:{decode:_,encode:y},decode:E,encode:x,toASCII:function(t){return b(t,(function(t){return h.test(t)?"xn--"+x(t):t}))},toUnicode:function(t){return b(t,(function(t){return u.test(t)?E(t.slice(4).toLowerCase()):t}))}},void 0===(i=function(){return s}.call(e,r,e,t))||(t.exports=i)}()}).call(this,r(100)(t),r(2))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,r){"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},function(t,e,r){"use strict";function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,e,r,a){e=e||"&",r=r||"=";var o={};if("string"!=typeof t||0===t.length)return o;var s=/\+/g;t=t.split(e);var f=1e3;a&&"number"==typeof a.maxKeys&&(f=a.maxKeys);var u=t.length;f>0&&u>f&&(u=f);for(var h=0;h<u;++h){var l,c,d,p,m=t[h].replace(s,"%20"),g=m.indexOf(r);g>=0?(l=m.substr(0,g),c=m.substr(g+1)):(l=m,c=""),d=decodeURIComponent(l),p=decodeURIComponent(c),n(o,d)?i(o[d])?o[d].push(p):o[d]=[o[d],p]:o[d]=p}return o};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,r){"use strict";var n=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,r,s){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?a(o(t),(function(o){var s=encodeURIComponent(n(o))+r;return i(t[o])?a(t[o],(function(t){return s+encodeURIComponent(n(t))})).join(e):s+encodeURIComponent(n(t[o]))})).join(e):s?encodeURIComponent(n(s))+r+encodeURIComponent(n(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function a(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var o=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},function(t,e,r){var n=r(32),i=r(22),a=t.exports;for(var o in n)n.hasOwnProperty(o)&&(a[o]=n[o]);function s(t){if("string"==typeof t&&(t=i.parse(t)),t.protocol||(t.protocol="https:"),"https:"!==t.protocol)throw new Error('Protocol "'+t.protocol+'" not supported. Expected "https:"');return t}a.request=function(t,e){return t=s(t),n.request.call(this,t,e)},a.get=function(t,e){return t=s(t),n.get.call(this,t,e)}},function(t,e,r){t.exports=r(21)},function(t,e,r){t.exports=r(5)},function(t,e,r){t.exports=r(8).Transform},function(t,e,r){t.exports=r(8).PassThrough},function(t,e,r){"use strict";(function(t,n){var i=r(23),a=r(113),o=r(114),s=r(117),f=r(120);for(var u in f)e[u]=f[u];e.NONE=0,e.DEFLATE=1,e.INFLATE=2,e.GZIP=3,e.GUNZIP=4,e.DEFLATERAW=5,e.INFLATERAW=6,e.UNZIP=7;function h(t){if("number"!=typeof t||t<e.DEFLATE||t>e.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}h.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<=e.UNZIP),this.mode===e.DEFLATE||this.mode===e.GZIP||this.mode===e.DEFLATERAW?o.deflateEnd(this.strm):this.mode!==e.INFLATE&&this.mode!==e.GUNZIP&&this.mode!==e.INFLATERAW&&this.mode!==e.UNZIP||s.inflateEnd(this.strm),this.mode=e.NONE,this.dictionary=null)},h.prototype.write=function(t,e,r,n,i,a,o){return this._write(!0,t,e,r,n,i,a,o)},h.prototype.writeSync=function(t,e,r,n,i,a,o){return this._write(!1,t,e,r,n,i,a,o)},h.prototype._write=function(r,a,o,s,f,u,h,l){if(i.equal(arguments.length,8),i(this.init_done,"write before init"),i(this.mode!==e.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!==e.Z_NO_FLUSH&&a!==e.Z_PARTIAL_FLUSH&&a!==e.Z_SYNC_FLUSH&&a!==e.Z_FULL_FLUSH&&a!==e.Z_FINISH&&a!==e.Z_BLOCK)throw new Error("Invalid flush value");if(null==o&&(o=t.alloc(0),f=0,s=0),this.strm.avail_in=f,this.strm.input=o,this.strm.next_in=s,this.strm.avail_out=l,this.strm.output=u,this.strm.next_out=h,this.flush=a,!r)return this._process(),this._checkError()?this._afterSync():void 0;var c=this;return n.nextTick((function(){c._process(),c._after()})),this},h.prototype._afterSync=function(){var t=this.strm.avail_out,e=this.strm.avail_in;return this.write_in_progress=!1,[e,t]},h.prototype._process=function(){var t=null;switch(this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=o.deflate(this.strm,this.flush);break;case e.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=e.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=e.GUNZIP):this.mode=e.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:for(this.err=s.inflate(this.strm,this.flush),this.err===e.Z_NEED_DICT&&this.dictionary&&(this.err=s.inflateSetDictionary(this.strm,this.dictionary),this.err===e.Z_OK?this.err=s.inflate(this.strm,this.flush):this.err===e.Z_DATA_ERROR&&(this.err=e.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===e.GUNZIP&&this.err===e.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)}},h.prototype._checkError=function(){switch(this.err){case e.Z_OK:case e.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===e.Z_FINISH)return this._error("unexpected end of file"),!1;break;case e.Z_STREAM_END:break;case e.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},h.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()}},h.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()},h.prototype.init=function(t,r,n,a,o){i(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),i(t>=8&&t<=15,"invalid windowBits"),i(r>=-1&&r<=9,"invalid compression level"),i(n>=1&&n<=9,"invalid memlevel"),i(a===e.Z_FILTERED||a===e.Z_HUFFMAN_ONLY||a===e.Z_RLE||a===e.Z_FIXED||a===e.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,t,n,a,o),this._setDictionary()},h.prototype.params=function(){throw new Error("deflateParams Not supported")},h.prototype.reset=function(){this._reset(),this._setDictionary()},h.prototype._init=function(t,r,n,i,f){switch(this.level=t,this.windowBits=r,this.memLevel=n,this.strategy=i,this.flush=e.Z_NO_FLUSH,this.err=e.Z_OK,this.mode!==e.GZIP&&this.mode!==e.GUNZIP||(this.windowBits+=16),this.mode===e.UNZIP&&(this.windowBits+=32),this.mode!==e.DEFLATERAW&&this.mode!==e.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new a,this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=o.deflateInit2(this.strm,this.level,e.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:case e.UNZIP:this.err=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==e.Z_OK&&this._error("Init error"),this.dictionary=f,this.write_in_progress=!1,this.init_done=!0},h.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:this.err=o.deflateSetDictionary(this.strm,this.dictionary)}this.err!==e.Z_OK&&this._error("Failed to set dictionary")}},h.prototype._reset=function(){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:case e.GZIP:this.err=o.deflateReset(this.strm);break;case e.INFLATE:case e.INFLATERAW:case e.GUNZIP:this.err=s.inflateReset(this.strm)}this.err!==e.Z_OK&&this._error("Failed to reset stream")},e.Zlib=h}).call(this,r(0).Buffer,r(1))},function(t,e,r){"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;function o(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,s,f=o(t),u=1;u<arguments.length;u++){for(var h in r=Object(arguments[u]))i.call(r,h)&&(f[h]=r[h]);if(n){s=n(r);for(var l=0;l<s.length;l++)a.call(r,s[l])&&(f[s[l]]=r[s[l]])}}return f}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){"use strict";t.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}},function(t,e,r){"use strict";var n,i=r(17),a=r(115),o=r(41),s=r(42),f=r(116);function u(t,e){return t.msg=f[e],e}function h(t){return(t<<1)-(t>4?9:0)}function l(t){for(var e=t.length;--e>=0;)t[e]=0}function c(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function d(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,c(t.strm)}function p(t,e){t.pending_buf[t.pending++]=e}function m(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function g(t,e){var r,n,i=t.max_chain_length,a=t.strstart,o=t.prev_length,s=t.nice_match,f=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,u=t.window,h=t.w_mask,l=t.prev,c=t.strstart+258,d=u[a+o-1],p=u[a+o];t.prev_length>=t.good_match&&(i>>=2),s>t.lookahead&&(s=t.lookahead);do{if(u[(r=e)+o]===p&&u[r+o-1]===d&&u[r]===u[a]&&u[++r]===u[a+1]){a+=2,r++;do{}while(u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&a<c);if(n=258-(c-a),a=c-258,n>o){if(t.match_start=e,o=n,n>=s)break;d=u[a+o-1],p=u[a+o]}}}while((e=l[e&h])>f&&0!=--i);return o<=t.lookahead?o:t.lookahead}function b(t){var e,r,n,a,f,u,h,l,c,d,p=t.w_size;do{if(a=t.window_size-t.lookahead-t.strstart,t.strstart>=p+(p-262)){i.arraySet(t.window,t.window,p,p,0),t.match_start-=p,t.strstart-=p,t.block_start-=p,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=p?n-p:0}while(--r);e=r=p;do{n=t.prev[--e],t.prev[e]=n>=p?n-p:0}while(--r);a+=p}if(0===t.strm.avail_in)break;if(u=t.strm,h=t.window,l=t.strstart+t.lookahead,c=a,d=void 0,(d=u.avail_in)>c&&(d=c),r=0===d?0:(u.avail_in-=d,i.arraySet(h,u.input,u.next_in,d,l),1===u.state.wrap?u.adler=o(u.adler,h,d,l):2===u.state.wrap&&(u.adler=s(u.adler,h,d,l)),u.next_in+=d,u.total_in+=d,d),t.lookahead+=r,t.lookahead+t.insert>=3)for(f=t.strstart-t.insert,t.ins_h=t.window[f],t.ins_h=(t.ins_h<<t.hash_shift^t.window[f+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[f+3-1])&t.hash_mask,t.prev[f&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=f,f++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)}function _(t,e){for(var r,n;;){if(t.lookahead<262){if(b(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-262&&(t.match_length=g(t,r)),t.match_length>=3)if(n=a._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=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 n=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}function y(t,e){for(var r,n,i;;){if(t.lookahead<262){if(b(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=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=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-262&&(t.match_length=g(t,r),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=a._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),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+3-1])&t.hash_mask,r=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=2,t.strstart++,n&&(d(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=a._tr_tally(t,0,t.window[t.strstart-1]))&&d(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=a._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}function v(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}function w(){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=8,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(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),l(this.dyn_ltree),l(this.dyn_dtree),l(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),l(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),l(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}function E(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=0,a._tr_init(e),0):u(t,-2)}function x(t){var e,r=E(t);return 0===r&&((e=t.state).window_size=2*e.w_size,l(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),r}function S(t,e,r,n,a,o){if(!t)return-2;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),a<1||a>9||8!==r||n<8||n>15||e<0||e>9||o<0||o>4)return u(t,-2);8===n&&(n=9);var f=new w;return t.state=f,f.strm=t,f.wrap=s,f.gzhead=null,f.w_bits=n,f.w_size=1<<f.w_bits,f.w_mask=f.w_size-1,f.hash_bits=a+7,f.hash_size=1<<f.hash_bits,f.hash_mask=f.hash_size-1,f.hash_shift=~~((f.hash_bits+3-1)/3),f.window=new i.Buf8(2*f.w_size),f.head=new i.Buf16(f.hash_size),f.prev=new i.Buf16(f.w_size),f.lit_bufsize=1<<a+6,f.pending_buf_size=4*f.lit_bufsize,f.pending_buf=new i.Buf8(f.pending_buf_size),f.d_buf=1*f.lit_bufsize,f.l_buf=3*f.lit_bufsize,f.level=e,f.strategy=o,f.method=r,x(t)}n=[new v(0,0,0,0,(function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(b(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,d(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(d(t,!1),t.strm.avail_out),1)})),new v(4,4,8,4,_),new v(4,5,16,8,_),new v(4,6,32,32,_),new v(4,4,16,16,y),new v(8,16,32,32,y),new v(8,16,128,128,y),new v(8,32,128,256,y),new v(32,128,258,1024,y),new v(32,258,258,4096,y)],e.deflateInit=function(t,e){return S(t,e,8,15,8,0)},e.deflateInit2=S,e.deflateReset=x,e.deflateResetKeep=E,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?-2:(t.state.gzhead=e,0):-2},e.deflate=function(t,e){var r,i,o,f;if(!t||!t.state||e>5||e<0)return t?u(t,-2):-2;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&4!==e)return u(t,0===t.avail_out?-5:-2);if(i.strm=t,r=i.last_flush,i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,p(i,31),p(i,139),p(i,8),i.gzhead?(p(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)),p(i,255&i.gzhead.time),p(i,i.gzhead.time>>8&255),p(i,i.gzhead.time>>16&255),p(i,i.gzhead.time>>24&255),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(p(i,255&i.gzhead.extra.length),p(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=69):(p(i,0),p(i,0),p(i,0),p(i,0),p(i,0),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,3),i.status=113);else{var g=8+(i.w_bits-8<<4)<<8;g|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(g|=32),g+=31-g%31,i.status=113,m(i,g),0!==i.strstart&&(m(i,t.adler>>>16),m(i,65535&t.adler)),t.adler=1}if(69===i.status)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)),c(t),o=i.pending,i.pending!==i.pending_buf_size));)p(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=73)}else i.status=73;if(73===i.status)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)),c(t),o=i.pending,i.pending===i.pending_buf_size)){f=1;break}f=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,p(i,f)}while(0!==f);i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),0===f&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)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)),c(t),o=i.pending,i.pending===i.pending_buf_size)){f=1;break}f=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,p(i,f)}while(0!==f);i.gzhead.hcrc&&i.pending>o&&(t.adler=s(t.adler,i.pending_buf,i.pending-o,o)),0===f&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&c(t),i.pending+2<=i.pending_buf_size&&(p(i,255&t.adler),p(i,t.adler>>8&255),t.adler=0,i.status=113)):i.status=113),0!==i.pending){if(c(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&h(e)<=h(r)&&4!==e)return u(t,-5);if(666===i.status&&0!==t.avail_in)return u(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&666!==i.status){var _=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(b(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,o,s=t.window;;){if(t.lookahead<=258){if(b(t),t.lookahead<=258&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[i=t.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){o=t.strstart+258;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<o);t.match_length=258-(o-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=a._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=a._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==_&&4!==_||(i.status=666),1===_||3===_)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===_&&(1===e?a._tr_align(i):5!==e&&(a._tr_stored_block(i,0,0,!1),3===e&&(l(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),c(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(p(i,255&t.adler),p(i,t.adler>>8&255),p(i,t.adler>>16&255),p(i,t.adler>>24&255),p(i,255&t.total_in),p(i,t.total_in>>8&255),p(i,t.total_in>>16&255),p(i,t.total_in>>24&255)):(m(i,t.adler>>>16),m(i,65535&t.adler)),c(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},e.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?u(t,-2):(t.state=null,113===e?u(t,-3):0):-2},e.deflateSetDictionary=function(t,e){var r,n,a,s,f,u,h,c,d=e.length;if(!t||!t.state)return-2;if(2===(s=(r=t.state).wrap)||1===s&&42!==r.status||r.lookahead)return-2;for(1===s&&(t.adler=o(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===s&&(l(r.head),r.strstart=0,r.block_start=0,r.insert=0),c=new i.Buf8(r.w_size),i.arraySet(c,e,d-r.w_size,r.w_size,0),e=c,d=r.w_size),f=t.avail_in,u=t.next_in,h=t.input,t.avail_in=d,t.next_in=0,t.input=e,b(r);r.lookahead>=3;){n=r.strstart,a=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--a);r.strstart=n,r.lookahead=2,b(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=u,t.input=h,t.avail_in=f,r.wrap=s,0},e.deflateInfo="pako deflate (from Nodeca project)"},function(t,e,r){"use strict";var n=r(17);function i(t){for(var e=t.length;--e>=0;)t[e]=0}var a=[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],o=[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],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],f=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],u=new Array(576);i(u);var h=new Array(60);i(h);var l=new Array(512);i(l);var c=new Array(256);i(c);var d=new Array(29);i(d);var p,m,g,b=new Array(30);function _(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function y(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function v(t){return t<256?l[t]:l[256+(t>>>7)]}function w(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function E(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function x(t,e,r){E(t,r[2*e],r[2*e+1])}function S(t,e){var r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1}function T(t,e,r){var n,i,a=new Array(16),o=0;for(n=1;n<=15;n++)a[n]=o=o+r[n-1]<<1;for(i=0;i<=e;i++){var s=t[2*i+1];0!==s&&(t[2*i]=S(a[s]++,s))}}function k(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function A(t){t.bi_valid>8?w(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 O(t,e,r,n){var i=2*e,a=2*r;return t[i]<t[a]||t[i]===t[a]&&n[e]<=n[r]}function I(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&O(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!O(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function P(t,e,r){var n,i,s,f,u=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*u]<<8|t.pending_buf[t.d_buf+2*u+1],i=t.pending_buf[t.l_buf+u],u++,0===n?x(t,i,e):(x(t,(s=c[i])+256+1,e),0!==(f=a[s])&&E(t,i-=d[s],f),x(t,s=v(--n),r),0!==(f=o[s])&&E(t,n-=b[s],f))}while(u<t.last_lit);x(t,256,e)}function R(t,e){var r,n,i,a=e.dyn_tree,o=e.stat_desc.static_tree,s=e.stat_desc.has_stree,f=e.stat_desc.elems,u=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<f;r++)0!==a[2*r]?(t.heap[++t.heap_len]=u=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)a[2*(i=t.heap[++t.heap_len]=u<2?++u:0)]=1,t.depth[i]=0,t.opt_len--,s&&(t.static_len-=o[2*i+1]);for(e.max_code=u,r=t.heap_len>>1;r>=1;r--)I(t,a,r);i=f;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],I(t,a,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,a[2*i]=a[2*r]+a[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,a[2*r+1]=a[2*n+1]=i,t.heap[1]=i++,I(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,a,o,s,f=e.dyn_tree,u=e.max_code,h=e.stat_desc.static_tree,l=e.stat_desc.has_stree,c=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(a=0;a<=15;a++)t.bl_count[a]=0;for(f[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(a=f[2*f[2*(n=t.heap[r])+1]+1]+1)>p&&(a=p,m++),f[2*n+1]=a,n>u||(t.bl_count[a]++,o=0,n>=d&&(o=c[n-d]),s=f[2*n],t.opt_len+=s*(a+o),l&&(t.static_len+=s*(h[2*n+1]+o)));if(0!==m){do{for(a=p-1;0===t.bl_count[a];)a--;t.bl_count[a]--,t.bl_count[a+1]+=2,t.bl_count[p]--,m-=2}while(m>0);for(a=p;0!==a;a--)for(n=t.bl_count[a];0!==n;)(i=t.heap[--r])>u||(f[2*i+1]!==a&&(t.opt_len+=(a-f[2*i+1])*f[2*i],f[2*i+1]=a),n--)}}(t,e),T(a,u,t.bl_count)}function L(t,e,r){var n,i,a=-1,o=e[1],s=0,f=7,u=4;for(0===o&&(f=138,u=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=e[2*(n+1)+1],++s<f&&i===o||(s<u?t.bl_tree[2*i]+=s:0!==i?(i!==a&&t.bl_tree[2*i]++,t.bl_tree[32]++):s<=10?t.bl_tree[34]++:t.bl_tree[36]++,s=0,a=i,0===o?(f=138,u=3):i===o?(f=6,u=3):(f=7,u=4))}function C(t,e,r){var n,i,a=-1,o=e[1],s=0,f=7,u=4;for(0===o&&(f=138,u=3),n=0;n<=r;n++)if(i=o,o=e[2*(n+1)+1],!(++s<f&&i===o)){if(s<u)do{x(t,i,t.bl_tree)}while(0!=--s);else 0!==i?(i!==a&&(x(t,i,t.bl_tree),s--),x(t,16,t.bl_tree),E(t,s-3,2)):s<=10?(x(t,17,t.bl_tree),E(t,s-3,3)):(x(t,18,t.bl_tree),E(t,s-11,7));s=0,a=i,0===o?(f=138,u=3):i===o?(f=6,u=3):(f=7,u=4)}}i(b);var M=!1;function D(t,e,r,i){E(t,0+(i?1:0),3),function(t,e,r,i){A(t),i&&(w(t,r),w(t,~r)),n.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r,!0)}e._tr_init=function(t){M||(!function(){var t,e,r,n,i,f=new Array(16);for(r=0,n=0;n<28;n++)for(d[n]=r,t=0;t<1<<a[n];t++)c[r++]=n;for(c[r-1]=n,i=0,n=0;n<16;n++)for(b[n]=i,t=0;t<1<<o[n];t++)l[i++]=n;for(i>>=7;n<30;n++)for(b[n]=i<<7,t=0;t<1<<o[n]-7;t++)l[256+i++]=n;for(e=0;e<=15;e++)f[e]=0;for(t=0;t<=143;)u[2*t+1]=8,t++,f[8]++;for(;t<=255;)u[2*t+1]=9,t++,f[9]++;for(;t<=279;)u[2*t+1]=7,t++,f[7]++;for(;t<=287;)u[2*t+1]=8,t++,f[8]++;for(T(u,287,f),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=S(t,5);p=new _(u,a,257,286,15),m=new _(h,o,0,30,15),g=new _(new Array(0),s,0,19,7)}(),M=!0),t.l_desc=new y(t.dyn_ltree,p),t.d_desc=new y(t.dyn_dtree,m),t.bl_desc=new y(t.bl_tree,g),t.bi_buf=0,t.bi_valid=0,k(t)},e._tr_stored_block=D,e._tr_flush_block=function(t,e,r,n){var i,a,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),R(t,t.l_desc),R(t,t.d_desc),o=function(t){var e;for(L(t,t.dyn_ltree,t.l_desc.max_code),L(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*f[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(a=t.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==e?D(t,e,r,n):4===t.strategy||a===i?(E(t,2+(n?1:0),3),P(t,u,h)):(E(t,4+(n?1:0),3),function(t,e,r,n){var i;for(E(t,e-257,5),E(t,r-1,5),E(t,n-4,4),i=0;i<n;i++)E(t,t.bl_tree[2*f[i]+1],3);C(t,t.dyn_ltree,e-1),C(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),P(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&A(t)},e._tr_tally=function(t,e,r){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&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(c[r]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){E(t,2,3),x(t,256,u),function(t){16===t.bi_valid?(w(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)}},function(t,e,r){"use strict";t.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"}},function(t,e,r){"use strict";var n=r(17),i=r(41),a=r(42),o=r(118),s=r(119);function f(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function u(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function h(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=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):-2}function l(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,h(t)):-2}function c(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?-2:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,l(t))):-2}function d(t,e){var r,n;return t?(n=new u,t.state=n,n.window=null,0!==(r=c(t,e))&&(t.state=null),r):-2}var p,m,g=!0;function b(t){if(g){var e;for(p=new n.Buf32(512),m=new n.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(1,t.lens,0,288,p,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;s(2,t.lens,0,32,m,0,t.work,{bits:5}),g=!1}t.lencode=p,t.lenbits=9,t.distcode=m,t.distbits=5}function _(t,e,r,i){var a,o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new n.Buf8(o.wsize)),i>=o.wsize?(n.arraySet(o.window,e,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>i&&(a=i),n.arraySet(o.window,e,r-i,a,o.wnext),(i-=a)?(n.arraySet(o.window,e,r-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}e.inflateReset=l,e.inflateReset2=c,e.inflateResetKeep=h,e.inflateInit=function(t){return d(t,15)},e.inflateInit2=d,e.inflate=function(t,e){var r,u,h,l,c,d,p,m,g,y,v,w,E,x,S,T,k,A,O,I,P,R,L,C,M=0,D=new n.Buf8(4),N=[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-2;12===(r=t.state).mode&&(r.mode=13),c=t.next_out,h=t.output,p=t.avail_out,l=t.next_in,u=t.input,d=t.avail_in,m=r.hold,g=r.bits,y=d,v=p,R=0;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;g<16;){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}if(2&r.wrap&&35615===m){r.check=0,D[0]=255&m,D[1]=m>>>8&255,r.check=a(r.check,D,2,0),m=0,g=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&m)<<8)+(m>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&m)){t.msg="unknown compression method",r.mode=30;break}if(g-=4,P=8+(15&(m>>>=4)),0===r.wbits)r.wbits=P;else if(P>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<P,t.adler=r.check=1,r.mode=512&m?10:12,m=0,g=0;break;case 2:for(;g<16;){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}if(r.flags=m,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=m>>8&1),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,r.check=a(r.check,D,2,0)),m=0,g=0,r.mode=3;case 3:for(;g<32;){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}r.head&&(r.head.time=m),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,D[2]=m>>>16&255,D[3]=m>>>24&255,r.check=a(r.check,D,4,0)),m=0,g=0,r.mode=4;case 4:for(;g<16;){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}r.head&&(r.head.xflags=255&m,r.head.os=m>>8),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,r.check=a(r.check,D,2,0)),m=0,g=0,r.mode=5;case 5:if(1024&r.flags){for(;g<16;){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}r.length=m,r.head&&(r.head.extra_len=m),512&r.flags&&(D[0]=255&m,D[1]=m>>>8&255,r.check=a(r.check,D,2,0)),m=0,g=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((w=r.length)>d&&(w=d),w&&(r.head&&(P=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,u,l,w,P)),512&r.flags&&(r.check=a(r.check,u,w,l)),d-=w,l+=w,r.length-=w),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===d)break t;w=0;do{P=u[l+w++],r.head&&P&&r.length<65536&&(r.head.name+=String.fromCharCode(P))}while(P&&w<d);if(512&r.flags&&(r.check=a(r.check,u,w,l)),d-=w,l+=w,P)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===d)break t;w=0;do{P=u[l+w++],r.head&&P&&r.length<65536&&(r.head.comment+=String.fromCharCode(P))}while(P&&w<d);if(512&r.flags&&(r.check=a(r.check,u,w,l)),d-=w,l+=w,P)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;g<16;){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}if(m!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}m=0,g=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;g<32;){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}t.adler=r.check=f(m),m=0,g=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=c,t.avail_out=p,t.next_in=l,t.avail_in=d,r.hold=m,r.bits=g,2;t.adler=r.check=1,r.mode=12;case 12:if(5===e||6===e)break t;case 13:if(r.last){m>>>=7&g,g-=7&g,r.mode=27;break}for(;g<3;){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}switch(r.last=1&m,g-=1,3&(m>>>=1)){case 0:r.mode=14;break;case 1:if(b(r),r.mode=20,6===e){m>>>=2,g-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}m>>>=2,g-=2;break;case 14:for(m>>>=7&g,g-=7&g;g<32;){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}if((65535&m)!=(m>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&m,m=0,g=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(w=r.length){if(w>d&&(w=d),w>p&&(w=p),0===w)break t;n.arraySet(h,u,l,w,c),d-=w,l+=w,p-=w,c+=w,r.length-=w;break}r.mode=12;break;case 17:for(;g<14;){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}if(r.nlen=257+(31&m),m>>>=5,g-=5,r.ndist=1+(31&m),m>>>=5,g-=5,r.ncode=4+(15&m),m>>>=4,g-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;g<3;){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}r.lens[N[r.have++]]=7&m,m>>>=3,g-=3}for(;r.have<19;)r.lens[N[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,L={bits:r.lenbits},R=s(0,r.lens,0,19,r.lencode,0,r.work,L),r.lenbits=L.bits,R){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;T=(M=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,k=65535&M,!((S=M>>>24)<=g);){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}if(k<16)m>>>=S,g-=S,r.lens[r.have++]=k;else{if(16===k){for(C=S+2;g<C;){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}if(m>>>=S,g-=S,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}P=r.lens[r.have-1],w=3+(3&m),m>>>=2,g-=2}else if(17===k){for(C=S+3;g<C;){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}g-=S,P=0,w=3+(7&(m>>>=S)),m>>>=3,g-=3}else{for(C=S+7;g<C;){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}g-=S,P=0,w=11+(127&(m>>>=S)),m>>>=7,g-=7}if(r.have+w>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;w--;)r.lens[r.have++]=P}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,L={bits:r.lenbits},R=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,L),r.lenbits=L.bits,R){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,L={bits:r.distbits},R=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,L),r.distbits=L.bits,R){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(d>=6&&p>=258){t.next_out=c,t.avail_out=p,t.next_in=l,t.avail_in=d,r.hold=m,r.bits=g,o(t,v),c=t.next_out,h=t.output,p=t.avail_out,l=t.next_in,u=t.input,d=t.avail_in,m=r.hold,g=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;T=(M=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,k=65535&M,!((S=M>>>24)<=g);){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}if(T&&0==(240&T)){for(A=S,O=T,I=k;T=(M=r.lencode[I+((m&(1<<A+O)-1)>>A)])>>>16&255,k=65535&M,!(A+(S=M>>>24)<=g);){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}m>>>=A,g-=A,r.back+=A}if(m>>>=S,g-=S,r.back+=S,r.length=k,0===T){r.mode=26;break}if(32&T){r.back=-1,r.mode=12;break}if(64&T){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&T,r.mode=22;case 22:if(r.extra){for(C=r.extra;g<C;){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}r.length+=m&(1<<r.extra)-1,m>>>=r.extra,g-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;T=(M=r.distcode[m&(1<<r.distbits)-1])>>>16&255,k=65535&M,!((S=M>>>24)<=g);){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}if(0==(240&T)){for(A=S,O=T,I=k;T=(M=r.distcode[I+((m&(1<<A+O)-1)>>A)])>>>16&255,k=65535&M,!(A+(S=M>>>24)<=g);){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}m>>>=A,g-=A,r.back+=A}if(m>>>=S,g-=S,r.back+=S,64&T){t.msg="invalid distance code",r.mode=30;break}r.offset=k,r.extra=15&T,r.mode=24;case 24:if(r.extra){for(C=r.extra;g<C;){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}r.offset+=m&(1<<r.extra)-1,m>>>=r.extra,g-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===p)break t;if(w=v-p,r.offset>w){if((w=r.offset-w)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}w>r.wnext?(w-=r.wnext,E=r.wsize-w):E=r.wnext-w,w>r.length&&(w=r.length),x=r.window}else x=h,E=c-r.offset,w=r.length;w>p&&(w=p),p-=w,r.length-=w;do{h[c++]=x[E++]}while(--w);0===r.length&&(r.mode=21);break;case 26:if(0===p)break t;h[c++]=r.length,p--,r.mode=21;break;case 27:if(r.wrap){for(;g<32;){if(0===d)break t;d--,m|=u[l++]<<g,g+=8}if(v-=p,t.total_out+=v,r.total+=v,v&&(t.adler=r.check=r.flags?a(r.check,h,v,c-v):i(r.check,h,v,c-v)),v=p,(r.flags?m:f(m))!==r.check){t.msg="incorrect data check",r.mode=30;break}m=0,g=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;g<32;){if(0===d)break t;d--,m+=u[l++]<<g,g+=8}if(m!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}m=0,g=0}r.mode=29;case 29:R=1;break t;case 30:R=-3;break t;case 31:return-4;case 32:default:return-2}return t.next_out=c,t.avail_out=p,t.next_in=l,t.avail_in=d,r.hold=m,r.bits=g,(r.wsize||v!==t.avail_out&&r.mode<30&&(r.mode<27||4!==e))&&_(t,t.output,t.next_out,v-t.avail_out)?(r.mode=31,-4):(y-=t.avail_in,v-=t.avail_out,t.total_in+=y,t.total_out+=v,r.total+=v,r.wrap&&v&&(t.adler=r.check=r.flags?a(r.check,h,v,t.next_out-v):i(r.check,h,v,t.next_out-v)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0===y&&0===v||4===e)&&0===R&&(R=-5),R)},e.inflateEnd=function(t){if(!t||!t.state)return-2;var e=t.state;return e.window&&(e.window=null),t.state=null,0},e.inflateGetHeader=function(t,e){var r;return t&&t.state?0==(2&(r=t.state).wrap)?-2:(r.head=e,e.done=!1,0):-2},e.inflateSetDictionary=function(t,e){var r,n=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?-2:11===r.mode&&i(1,e,n,0)!==r.check?-3:_(t,e,n,n)?(r.mode=31,-4):(r.havedict=1,0):-2},e.inflateInfo="pako inflate (from Nodeca project)"},function(t,e,r){"use strict";t.exports=function(t,e){var r,n,i,a,o,s,f,u,h,l,c,d,p,m,g,b,_,y,v,w,E,x,S,T,k;r=t.state,n=t.next_in,T=t.input,i=n+(t.avail_in-5),a=t.next_out,k=t.output,o=a-(e-t.avail_out),s=a+(t.avail_out-257),f=r.dmax,u=r.wsize,h=r.whave,l=r.wnext,c=r.window,d=r.hold,p=r.bits,m=r.lencode,g=r.distcode,b=(1<<r.lenbits)-1,_=(1<<r.distbits)-1;t:do{p<15&&(d+=T[n++]<<p,p+=8,d+=T[n++]<<p,p+=8),y=m[d&b];e:for(;;){if(d>>>=v=y>>>24,p-=v,0===(v=y>>>16&255))k[a++]=65535&y;else{if(!(16&v)){if(0==(64&v)){y=m[(65535&y)+(d&(1<<v)-1)];continue e}if(32&v){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}w=65535&y,(v&=15)&&(p<v&&(d+=T[n++]<<p,p+=8),w+=d&(1<<v)-1,d>>>=v,p-=v),p<15&&(d+=T[n++]<<p,p+=8,d+=T[n++]<<p,p+=8),y=g[d&_];r:for(;;){if(d>>>=v=y>>>24,p-=v,!(16&(v=y>>>16&255))){if(0==(64&v)){y=g[(65535&y)+(d&(1<<v)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(E=65535&y,p<(v&=15)&&(d+=T[n++]<<p,(p+=8)<v&&(d+=T[n++]<<p,p+=8)),(E+=d&(1<<v)-1)>f){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=v,p-=v,E>(v=a-o)){if((v=E-v)>h&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(x=0,S=c,0===l){if(x+=u-v,v<w){w-=v;do{k[a++]=c[x++]}while(--v);x=a-E,S=k}}else if(l<v){if(x+=u+l-v,(v-=l)<w){w-=v;do{k[a++]=c[x++]}while(--v);if(x=0,l<w){w-=v=l;do{k[a++]=c[x++]}while(--v);x=a-E,S=k}}}else if(x+=l-v,v<w){w-=v;do{k[a++]=c[x++]}while(--v);x=a-E,S=k}for(;w>2;)k[a++]=S[x++],k[a++]=S[x++],k[a++]=S[x++],w-=3;w&&(k[a++]=S[x++],w>1&&(k[a++]=S[x++]))}else{x=a-E;do{k[a++]=k[x++],k[a++]=k[x++],k[a++]=k[x++],w-=3}while(w>2);w&&(k[a++]=k[x++],w>1&&(k[a++]=k[x++]))}break}}break}}while(n<i&&a<s);n-=w=p>>3,d&=(1<<(p-=w<<3))-1,t.next_in=n,t.next_out=a,t.avail_in=n<i?i-n+5:5-(n-i),t.avail_out=a<s?s-a+257:257-(a-s),r.hold=d,r.bits=p}},function(t,e,r){"use strict";var n=r(17),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];t.exports=function(t,e,r,f,u,h,l,c){var d,p,m,g,b,_,y,v,w,E=c.bits,x=0,S=0,T=0,k=0,A=0,O=0,I=0,P=0,R=0,L=0,C=null,M=0,D=new n.Buf16(16),N=new n.Buf16(16),B=null,F=0;for(x=0;x<=15;x++)D[x]=0;for(S=0;S<f;S++)D[e[r+S]]++;for(A=E,k=15;k>=1&&0===D[k];k--);if(A>k&&(A=k),0===k)return u[h++]=20971520,u[h++]=20971520,c.bits=1,0;for(T=1;T<k&&0===D[T];T++);for(A<T&&(A=T),P=1,x=1;x<=15;x++)if(P<<=1,(P-=D[x])<0)return-1;if(P>0&&(0===t||1!==k))return-1;for(N[1]=0,x=1;x<15;x++)N[x+1]=N[x]+D[x];for(S=0;S<f;S++)0!==e[r+S]&&(l[N[e[r+S]]++]=S);if(0===t?(C=B=l,_=19):1===t?(C=i,M-=257,B=a,F-=257,_=256):(C=o,B=s,_=-1),L=0,S=0,x=T,b=h,O=A,I=0,m=-1,g=(R=1<<A)-1,1===t&&R>852||2===t&&R>592)return 1;for(;;){y=x-I,l[S]<_?(v=0,w=l[S]):l[S]>_?(v=B[F+l[S]],w=C[M+l[S]]):(v=96,w=0),d=1<<x-I,T=p=1<<O;do{u[b+(L>>I)+(p-=d)]=y<<24|v<<16|w|0}while(0!==p);for(d=1<<x-1;L&d;)d>>=1;if(0!==d?(L&=d-1,L+=d):L=0,S++,0==--D[x]){if(x===k)break;x=e[r+l[S]]}if(x>A&&(L&g)!==m){for(0===I&&(I=A),b+=T,P=1<<(O=x-I);O+I<k&&!((P-=D[O+I])<=0);)O++,P<<=1;if(R+=1<<O,1===t&&R>852||2===t&&R>592)return 1;u[m=L&g]=A<<24|O<<16|b-h|0}}return 0!==L&&(u[b+L]=x-I<<24|64<<16|0),c.bits=A,0}},function(t,e,r){"use strict";t.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}},function(t,e,r){"use strict";var n=r(11);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=arguments.length>4?arguments[4]:void 0;"function"==typeof n&&(s=n,n={});if(!(t instanceof this.constructor))return i.throwError.call(this,"The source must be a Jimp image",s);if("number"!=typeof e||"number"!=typeof r)return i.throwError.call(this,"x and y must be numbers",s);var f=n,u=f.mode,h=f.opacitySource,l=f.opacityDest;u||(u=a.BLEND_SOURCE_OVER);("number"!=typeof h||h<0||h>1)&&(h=1);("number"!=typeof l||l<0||l>1)&&(l=1);var c=o[u];e=Math.round(e),r=Math.round(r);var d=this;1!==l&&d.opacity(l);t.scanQuiet(0,0,t.bitmap.width,t.bitmap.height,(function(t,n,i){var o=d.getPixelIndex(e+t,r+n,a.EDGE_CROP),s=c({r:this.bitmap.data[i+0]/255,g:this.bitmap.data[i+1]/255,b:this.bitmap.data[i+2]/255,a:this.bitmap.data[i+3]/255},{r:d.bitmap.data[o+0]/255,g:d.bitmap.data[o+1]/255,b:d.bitmap.data[o+2]/255,a:d.bitmap.data[o+3]/255},h);d.bitmap.data[o+0]=this.constructor.limit255(255*s.r),d.bitmap.data[o+1]=this.constructor.limit255(255*s.g),d.bitmap.data[o+2]=this.constructor.limit255(255*s.b),d.bitmap.data[o+3]=this.constructor.limit255(255*s.a)})),(0,i.isNodePattern)(s)&&s.call(this,null,this);return this};var i=r(14),a=n(r(24)),o=n(r(122))},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.srcOver=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var n=e.a+t.a-e.a*t.a,i=(t.r*t.a+e.r*e.a*(1-t.a))/n,a=(t.g*t.a+e.g*e.a*(1-t.a))/n,o=(t.b*t.a+e.b*e.a*(1-t.a))/n;return{r:i,g:a,b:o,a:n}},e.dstOver=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var n=e.a+t.a-e.a*t.a,i=(e.r*e.a+t.r*t.a*(1-e.a))/n,a=(e.g*e.a+t.g*t.a*(1-e.a))/n,o=(e.b*e.a+t.b*t.a*(1-e.a))/n;return{r:i,g:a,b:o,a:n}},e.multiply=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var n=e.a+t.a-e.a*t.a,i=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,f=e.g*e.a,u=e.b*e.a,h=(i*s+i*(1-e.a)+s*(1-t.a))/n,l=(a*f+a*(1-e.a)+f*(1-t.a))/n,c=(o*u+o*(1-e.a)+u*(1-t.a))/n;return{r:h,g:l,b:c,a:n}},e.add=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var n=e.a+t.a-e.a*t.a,i=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,f=e.g*e.a,u=e.b*e.a,h=(i+s)/n,l=(a+f)/n,c=(o+u)/n;return{r:h,g:l,b:c,a:n}},e.screen=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var n=e.a+t.a-e.a*t.a,i=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,f=e.g*e.a,u=e.b*e.a,h=(i*e.a+s*t.a-i*s+i*(1-e.a)+s*(1-t.a))/n,l=(a*e.a+f*t.a-a*f+a*(1-e.a)+f*(1-t.a))/n,c=(o*e.a+u*t.a-o*u+o*(1-e.a)+u*(1-t.a))/n;return{r:h,g:l,b:c,a:n}},e.overlay=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var n=e.a+t.a-e.a*t.a,i=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,f=e.g*e.a,u=e.b*e.a,h=(2*s<=e.a?2*i*s+i*(1-e.a)+s*(1-t.a):i*(1+e.a)+s*(1+t.a)-2*s*i-e.a*t.a)/n,l=(2*f<=e.a?2*a*f+a*(1-e.a)+f*(1-t.a):a*(1+e.a)+f*(1+t.a)-2*f*a-e.a*t.a)/n,c=(2*u<=e.a?2*o*u+o*(1-e.a)+u*(1-t.a):o*(1+e.a)+u*(1+t.a)-2*u*o-e.a*t.a)/n;return{r:h,g:l,b:c,a:n}},e.darken=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var n=e.a+t.a-e.a*t.a,i=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,f=e.g*e.a,u=e.b*e.a,h=(Math.min(i*e.a,s*t.a)+i*(1-e.a)+s*(1-t.a))/n,l=(Math.min(a*e.a,f*t.a)+a*(1-e.a)+f*(1-t.a))/n,c=(Math.min(o*e.a,u*t.a)+o*(1-e.a)+u*(1-t.a))/n;return{r:h,g:l,b:c,a:n}},e.lighten=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var n=e.a+t.a-e.a*t.a,i=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,f=e.g*e.a,u=e.b*e.a,h=(Math.max(i*e.a,s*t.a)+i*(1-e.a)+s*(1-t.a))/n,l=(Math.max(a*e.a,f*t.a)+a*(1-e.a)+f*(1-t.a))/n,c=(Math.max(o*e.a,u*t.a)+o*(1-e.a)+u*(1-t.a))/n;return{r:h,g:l,b:c,a:n}},e.hardLight=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var n=e.a+t.a-e.a*t.a,i=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,f=e.g*e.a,u=e.b*e.a,h=(2*i<=t.a?2*i*s+i*(1-e.a)+s*(1-t.a):i*(1+e.a)+s*(1+t.a)-2*s*i-e.a*t.a)/n,l=(2*a<=t.a?2*a*f+a*(1-e.a)+f*(1-t.a):a*(1+e.a)+f*(1+t.a)-2*f*a-e.a*t.a)/n,c=(2*o<=t.a?2*o*u+o*(1-e.a)+u*(1-t.a):o*(1+e.a)+u*(1+t.a)-2*u*o-e.a*t.a)/n;return{r:h,g:l,b:c,a:n}},e.difference=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var n=e.a+t.a-e.a*t.a,i=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,f=e.g*e.a,u=e.b*e.a,h=(i+s-2*Math.min(i*e.a,s*t.a))/n,l=(a+f-2*Math.min(a*e.a,f*t.a))/n,c=(o+u-2*Math.min(o*e.a,u*t.a))/n;return{r:h,g:l,b:c,a:n}},e.exclusion=function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t.a*=r;var n=e.a+t.a-e.a*t.a,i=t.r*t.a,a=t.g*t.a,o=t.b*t.a,s=e.r*e.a,f=e.g*e.a,u=e.b*e.a,h=(i*e.a+s*t.a-2*i*s+i*(1-e.a)+s*(1-t.a))/n,l=(a*e.a+f*t.a-2*a*f+a*(1-e.a)+f*(1-t.a))/n,c=(o*e.a+u*t.a-2*o*u+o*(1-e.a)+u*(1-t.a))/n;return{r:h,g:l,b:c,a:n}}},function(t,e,r){"use strict";(function(t){var n=r(11),i=r(6);Object.defineProperty(e,"__esModule",{value:!0}),e.parseBitmap=function(e,r,n){var i=function(t,e){var r=(0,o.default)(t);if(r)return r.mime;if(e)return h.getType(e);return null}(e,r);if("string"!=typeof i)return n(new Error("Could not find MIME for Buffer <"+r+">"));this._originalMime=i.toLowerCase();try{var u=this.getMIME();if(!this.constructor.decoders[u])return f.throwError.call(this,"Unsupported MIME type: "+u,n);this.bitmap=this.constructor.decoders[u](e)}catch(t){return n.call(this,t,this)}try{this._exif=s.default.create(e).parse(),function(e){if(c(e)<2)return;var r=function(t){var e=t.getWidth(),r=t.getHeight();switch(c(t)){case 1:return null;case 2:return function(t,r){return[e-t-1,r]};case 3:return function(t,n){return[e-t-1,r-n-1]};case 4:return function(t,e){return[t,r-e-1]};case 5:return function(t,e){return[e,t]};case 6:return function(t,e){return[e,r-t-1]};case 7:return function(t,n){return[e-n-1,r-t-1]};case 8:return function(t,r){return[e-r-1,t]};default:return null}}(e),n=c(e)>4,i=n?e.bitmap.height:e.bitmap.width,o=n?e.bitmap.width:e.bitmap.height;!function(e,r,n,i){for(var o=e.bitmap.data,s=e.bitmap.width,f=t.alloc(o.length),u=0;u<r;u++)for(var h=0;h<n;h++){var l=i(u,h),c=(0,a.default)(l,2),d=c[0],p=c[1],m=r*h+u<<2,g=s*p+d<<2,b=o.readUInt32BE(g);f.writeUInt32BE(b,m)}e.bitmap.data=f,e.bitmap.width=r,e.bitmap.height=n}(e,i,o,r)}(this)}catch(t){}return n.call(this,null,this),this},e.getBuffer=d,e.getBufferAsync=function(t){return(0,l.default)(d,this,t)};var a=i(r(19)),o=i(r(124)),s=i(r(125)),f=r(14),u=n(r(24)),h=n(r(44)),l=i(r(43));function c(t){return t._exif&&t._exif.tags&&t._exif.tags.Orientation||1}function d(e,r){if(e===u.AUTO&&(e=this.getMIME()),"string"!=typeof e)return f.throwError.call(this,"mime must be a string",r);if("function"!=typeof r)return f.throwError.call(this,"cb must be a function",r);var n,i;if(e=e.toLowerCase(),this._rgba&&this.constructor.hasAlpha[e]?this.bitmap.data=t.from(this.bitmap.data):this.bitmap.data=(n=this.constructor,i=this,new n(i.bitmap.width,i.bitmap.height,i._background).composite(i,0,0).bitmap).data,this.constructor.encoders[e]){var a=this.constructor.encoders[e](this);r.call(this,null,a)}else r.call(this,"Unsupported MIME type: "+e);return this}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";const n=t=>[...t].map(t=>t.charCodeAt(0)),i=n("META-INF/mozilla.rsa"),a=n("[Content_Types].xml"),o=n("_rels/.rels");t.exports=t=>{const e=t instanceof Uint8Array?t:new Uint8Array(t);if(!(e&&e.length>1))return null;const r=(t,r)=>{r=Object.assign({offset:0},r);for(let n=0;n<t.length;n++)if(r.mask){if(t[n]!==(r.mask[n]&e[n+r.offset]))return!1}else if(t[n]!==e[n+r.offset])return!1;return!0},s=(t,e)=>r(n(t),e);if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([137,80,78,71,13,10,26,10]))return{ext:"png",mime:"image/png"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(r([87,69,66,80],{offset:8}))return{ext:"webp",mime:"image/webp"};if(r([70,76,73,70]))return{ext:"flif",mime:"image/flif"};if((r([73,73,42,0])||r([77,77,0,42]))&&r([67,82],{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r([73,73,42,0])||r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([56,66,80,83]))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(r([80,75,3,4])){if(r([109,105,109,101,116,121,112,101,97,112,112,108,105,99,97,116,105,111,110,47,101,112,117,98,43,122,105,112],{offset:30}))return{ext:"epub",mime:"application/epub+zip"};if(r(i,{offset:30}))return{ext:"xpi",mime:"application/x-xpinstall"};if(s("mimetypeapplication/vnd.oasis.opendocument.text",{offset:30}))return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};if(s("mimetypeapplication/vnd.oasis.opendocument.spreadsheet",{offset:30}))return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};if(s("mimetypeapplication/vnd.oasis.opendocument.presentation",{offset:30}))return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"};const t=(t,e=0)=>t.findIndex((t,r,n)=>r>=e&&80===n[r]&&75===n[r+1]&&3===n[r+2]&&4===n[r+3]);let n=0,f=!1,u=null;do{const i=n+30;if(f||(f=r(a,{offset:i})||r(o,{offset:i})),u||(s("word/",{offset:i})?u={ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}:s("ppt/",{offset:i})?u={ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"}:s("xl/",{offset:i})&&(u={ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})),f&&u)return u;n=t(e,i)}while(n>=0);if(u)return u}if(r([80,75])&&(3===e[2]||5===e[2]||7===e[2])&&(4===e[3]||6===e[3]||8===e[3]))return{ext:"zip",mime:"application/zip"};if(r([117,115,116,97,114],{offset:257}))return{ext:"tar",mime:"application/x-tar"};if(r([82,97,114,33,26,7])&&(0===e[6]||1===e[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([51,103,112,53])||r([0,0,0])&&r([102,116,121,112],{offset:4})&&(r([109,112,52,49],{offset:8})||r([109,112,52,50],{offset:8})||r([105,115,111,109],{offset:8})||r([105,115,111,50],{offset:8})||r([109,109,112,52],{offset:8})||r([77,52,86],{offset:8})||r([100,97,115,104],{offset:8})))return{ext:"mp4",mime:"video/mp4"};if(r([77,84,104,100]))return{ext:"mid",mime:"audio/midi"};if(r([26,69,223,163])){const t=e.subarray(4,4100),r=t.findIndex((t,e,r)=>66===r[e]&&130===r[e+1]);if(-1!==r){const e=r+3,n=r=>[...r].every((r,n)=>t[e+n]===r.charCodeAt(0));if(n("matroska"))return{ext:"mkv",mime:"video/x-matroska"};if(n("webm"))return{ext:"webm",mime:"video/webm"}}}if(r([0,0,0,20,102,116,121,112,113,116,32,32])||r([102,114,101,101],{offset:4})||r([102,116,121,112,113,116,32,32],{offset:4})||r([109,100,97,116],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([82,73,70,70])){if(r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(r([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/vnd.wave"};if(r([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(r([48,38,178,117,142,102,207,17,166,217]))return{ext:"wmv",mime:"video/x-ms-wmv"};if(r([0,0,1,186])||r([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(r([102,116,121,112,51,103],{offset:4}))return{ext:"3gp",mime:"video/3gpp"};for(let t=0;t<2&&t<e.length-16;t++){if(r([73,68,51],{offset:t})||r([255,226],{offset:t,mask:[255,226]}))return{ext:"mp3",mime:"audio/mpeg"};if(r([255,228],{offset:t,mask:[255,228]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([255,248],{offset:t,mask:[255,252]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([255,240],{offset:t,mask:[255,252]}))return{ext:"mp4",mime:"audio/mpeg"}}if(r([102,116,121,112,77,52,65],{offset:4})||r([77,52,65,32]))return{ext:"m4a",mime:"audio/mp4"};if(r([79,112,117,115,72,101,97,100],{offset:28}))return{ext:"opus",mime:"audio/opus"};if(r([79,103,103,83]))return r([128,116,104,101,111,114,97],{offset:28})?{ext:"ogv",mime:"video/ogg"}:r([1,118,105,100,101,111,0],{offset:28})?{ext:"ogm",mime:"video/ogg"}:r([127,70,76,65,67],{offset:28})?{ext:"oga",mime:"audio/ogg"}:r([83,112,101,101,120,32,32],{offset:28})?{ext:"spx",mime:"audio/ogg"}:r([1,118,111,114,98,105,115],{offset:28})?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"};if(r([102,76,97,67]))return{ext:"flac",mime:"audio/x-flac"};if(r([77,65,67,32]))return{ext:"ape",mime:"audio/ape"};if(r([119,118,112,107]))return{ext:"wv",mime:"audio/wavpack"};if(r([35,33,65,77,82,10]))return{ext:"amr",mime:"audio/amr"};if(r([37,80,68,70]))return{ext:"pdf",mime:"application/pdf"};if(r([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if((67===e[0]||70===e[0])&&r([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(r([123,92,114,116,102]))return{ext:"rtf",mime:"application/rtf"};if(r([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(r([119,79,70,70])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4})))return{ext:"woff",mime:"font/woff"};if(r([119,79,70,50])&&(r([0,1,0,0],{offset:4})||r([79,84,84,79],{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(r([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(r([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(r([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(r([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(r([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(r([37,33]))return{ext:"ps",mime:"application/postscript"};if(r([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(r([83,81,76,105]))return{ext:"sqlite",mime:"application/x-sqlite3"};if(r([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(r([67,114,50,52]))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(r([77,83,67,70])||r([73,83,99,40]))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(r([33,60,97,114,99,104,62,10,100,101,98,105,97,110,45,98,105,110,97,114,121]))return{ext:"deb",mime:"application/x-deb"};if(r([33,60,97,114,99,104,62]))return{ext:"ar",mime:"application/x-unix-archive"};if(r([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(r([31,160])||r([31,157]))return{ext:"Z",mime:"application/x-compress"};if(r([76,90,73,80]))return{ext:"lz",mime:"application/x-lzip"};if(r([208,207,17,224,161,177,26,225]))return{ext:"msi",mime:"application/x-msi"};if(r([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196})))return{ext:"mts",mime:"video/mp2t"};if(r([66,76,69,78,68,69,82]))return{ext:"blend",mime:"application/x-blender"};if(r([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(r([0,0,0,12,106,80,32,32,13,10,135,10])){if(r([106,112,50,32],{offset:20}))return{ext:"jp2",mime:"image/jp2"};if(r([106,112,120,32],{offset:20}))return{ext:"jpx",mime:"image/jpx"};if(r([106,112,109,32],{offset:20}))return{ext:"jpm",mime:"image/jpm"};if(r([109,106,112,50],{offset:20}))return{ext:"mj2",mime:"image/mj2"}}if(r([70,79,82,77,0]))return{ext:"aif",mime:"audio/aiff"};if(s("<?xml "))return{ext:"xml",mime:"application/xml"};if(r([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(r([102,116,121,112],{offset:4})){if(r([109,105,102,49],{offset:8}))return{ext:"heic",mime:"image/heif"};if(r([109,115,102,49],{offset:8}))return{ext:"heic",mime:"image/heif-sequence"};if(r([104,101,105,99],{offset:8})||r([104,101,105,120],{offset:8}))return{ext:"heic",mime:"image/heic"};if(r([104,101,118,99],{offset:8})||r([104,101,118,120],{offset:8}))return{ext:"heic",mime:"image/heic-sequence"}}return r([171,75,84,88,32,49,49,187,13,10,26,10])?{ext:"ktx",mime:"image/ktx"}:null}},function(t,e,r){var n=r(126);t.exports={create:function(t,e){if(t instanceof(e=e||(0,eval)("this")).ArrayBuffer){var i=r(131);return new n(new i(t,0,t.byteLength,!0,e))}var a=r(132);return new n(new a(t,0,t.length,!0))}}},function(t,e,r){var n=r(127),i=r(45),a=r(128);function o(t,e,r,n,i,a,o){this.startMarker=t,this.tags=e,this.imageSize=r,this.thumbnailOffset=n,this.thumbnailLength=i,this.thumbnailType=a,this.app1Offset=o}function s(t){this.stream=t,this.flags={readBinaryTags:!1,resolveTagNames:!0,simplifyValues:!0,imageSize:!0,hidePointers:!0,returnTags:!0}}o.prototype={hasThumbnail:function(t){return!(!this.thumbnailOffset||!this.thumbnailLength)&&("string"!=typeof t||("image/jpeg"===t.toLowerCase().trim()?6===this.thumbnailType:"image/tiff"===t.toLowerCase().trim()&&1===this.thumbnailType))},getThumbnailOffset:function(){return this.app1Offset+6+this.thumbnailOffset},getThumbnailLength:function(){return this.thumbnailLength},getThumbnailBuffer:function(){return this._getThumbnailStream().nextBuffer(this.thumbnailLength)},_getThumbnailStream:function(){return this.startMarker.openWithOffset(this.getThumbnailOffset())},getImageSize:function(){return this.imageSize},getThumbnailSize:function(){var t,e=this._getThumbnailStream();return n.parseSections(e,(function(e,r){"SOF"===n.getSectionName(e).name&&(t=n.getSizeFromSOFSection(r))})),t}},s.prototype={enableBinaryFields:function(t){return this.flags.readBinaryTags=!!t,this},enablePointers:function(t){return this.flags.hidePointers=!t,this},enableTagNames:function(t){return this.flags.resolveTagNames=!!t,this},enableImageSize:function(t){return this.flags.imageSize=!!t,this},enableReturnTags:function(t){return this.flags.returnTags=!!t,this},enableSimpleValues:function(t){return this.flags.simplifyValues=!!t,this},parse:function(){var t,e,s,f,u,h,l,c,d,p=this.stream.mark(),m=p.openWithOffset(0),g=this.flags;return g.resolveTagNames&&(l=r(130)),g.resolveTagNames?(t={},c=function(e){return t[e.name]},d=function(e,r){t[e.name]=r}):(t=[],c=function(e){var r;for(r=0;r<t.length;++r)if(t[r].type===e.type&&t[r].section===e.section)return t.value},d=function(e,r){var n;for(n=0;n<t.length;++n)if(t[n].type===e.type&&t[n].section===e.section)return void(t.value=r)}),n.parseSections(m,(function(r,o){var c=o.offsetFrom(p);225===r?i.parseTags(o,(function(e,r,n,o){if(g.readBinaryTags||7!==o){if(513===r){if(s=n[0],g.hidePointers)return}else if(514===r){if(f=n[0],g.hidePointers)return}else if(259===r&&(u=n[0],g.hidePointers))return;if(g.returnTags)if(g.simplifyValues&&(n=a.simplifyValue(n,o)),g.resolveTagNames){var h=(e===i.GPSIFD?l.gps:l.exif)[r];h||(h=l.exif[r]),t.hasOwnProperty(h)||(t[h]=n)}else t.push({section:e,type:r,value:n})}}))&&(h=c):g.imageSize&&"SOF"===n.getSectionName(r).name&&(e=n.getSizeFromSOFSection(o))})),g.simplifyValues&&(a.castDegreeValues(c,d),a.castDateValues(c,d)),new o(p,t,e,s,f,u,h)}},t.exports=s},function(t,e){t.exports={parseSections:function(t,e){var r,n;for(t.setBigEndian(!0);t.remainingLength()>0&&218!==n;){if(255!==t.nextUInt8())throw new Error("Invalid JPEG section offset");r=(n=t.nextUInt8())>=208&&n<=217||218===n?0:t.nextUInt16()-2,e(n,t.branch(0,r)),t.skip(r)}},getSizeFromSOFSection:function(t){return t.skip(1),{height:t.nextUInt16(),width:t.nextUInt16()}},getSectionName:function(t){var e,r;switch(t){case 216:e="SOI";break;case 196:e="DHT";break;case 219:e="DQT";break;case 221:e="DRI";break;case 218:e="SOS";break;case 254:e="COM";break;case 217:e="EOI";break;default:t>=224&&t<=239?(e="APP",r=t-224):t>=192&&t<=207&&196!==t&&200!==t&&204!==t?(e="SOF",r=t-192):t>=208&&t<=215&&(e="RST",r=t-208)}var n={name:e};return"number"==typeof r&&(n.index=r),n}}},function(t,e,r){var n=r(45),i=r(129),a=[{section:n.GPSIFD,type:2,name:"GPSLatitude",refType:1,refName:"GPSLatitudeRef",posVal:"N"},{section:n.GPSIFD,type:4,name:"GPSLongitude",refType:3,refName:"GPSLongitudeRef",posVal:"E"}],o=[{section:n.SubIFD,type:306,name:"ModifyDate"},{section:n.SubIFD,type:36867,name:"DateTimeOriginal"},{section:n.SubIFD,type:36868,name:"CreateDate"},{section:n.SubIFD,type:306,name:"ModifyDate"}];t.exports={castDegreeValues:function(t,e){a.forEach((function(r){var n=t(r);if(n){var i=t({section:r.section,type:r.refType,name:r.refName})===r.posVal?1:-1,a=(n[0]+n[1]/60+n[2]/3600)*i;e(r,a)}}))},castDateValues:function(t,e){o.forEach((function(r){var n=t(r);if(n){var a=i.parseExifDate(n);void 0!==a&&e(r,a)}}))},simplifyValue:function(t,e){return Array.isArray(t)&&1===(t=t.map((function(t){return 10===e||5===e?t[0]/t[1]:t}))).length&&(t=t[0]),t}}},function(t,e){function r(t){return parseInt(t,10)}function n(t,e){t=t.map(r),e=e.map(r);var n=t[0],i=t[1]-1,a=t[2],o=e[0],s=e[1],f=e[2];return Date.UTC(n,i,a,o,s,f,0)/1e3}function i(t){var e=t.substr(0,10).split("-"),i=t.substr(11,8).split(":"),a=t.substr(19,6).split(":").map(r),o=3600*a[0]+60*a[1],s=n(e,i);if("number"==typeof(s-=o)&&!isNaN(s))return s}function a(t){var e=t.split(" "),r=n(e[0].split(":"),e[1].split(":"));if("number"==typeof r&&!isNaN(r))return r}t.exports={parseDateWithSpecFormat:a,parseDateWithTimezoneFormat:i,parseExifDate:function(t){var e=19===t.length&&":"===t.charAt(4);return 25===t.length&&"T"===t.charAt(10)?i(t):e?a(t):void 0}}},function(t,e){t.exports={exif:{1:"InteropIndex",2:"InteropVersion",11:"ProcessingSoftware",254:"SubfileType",255:"OldSubfileType",256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:"Thresholding",264:"CellWidth",265:"CellLength",266:"FillOrder",269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",285:"PageName",286:"XPosition",287:"YPosition",288:"FreeOffsets",289:"FreeByteCounts",290:"GrayResponseUnit",291:"GrayResponseCurve",292:"T4Options",293:"T6Options",296:"ResolutionUnit",297:"PageNumber",300:"ColorResponseUnit",301:"TransferFunction",305:"Software",306:"ModifyDate",315:"Artist",316:"HostComputer",317:"Predictor",318:"WhitePoint",319:"PrimaryChromaticities",320:"ColorMap",321:"HalftoneHints",322:"TileWidth",323:"TileLength",324:"TileOffsets",325:"TileByteCounts",326:"BadFaxLines",327:"CleanFaxData",328:"ConsecutiveBadFaxLines",330:"SubIFD",332:"InkSet",333:"InkNames",334:"NumberofInks",336:"DotRange",337:"TargetPrinter",338:"ExtraSamples",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",342:"TransferRange",343:"ClipPath",344:"XClipPathUnits",345:"YClipPathUnits",346:"Indexed",347:"JPEGTables",351:"OPIProxy",400:"GlobalParametersIFD",401:"ProfileType",402:"FaxProfile",403:"CodingMethods",404:"VersionYear",405:"ModeNumber",433:"Decode",434:"DefaultImageColor",435:"T82Options",437:"JPEGTables",512:"JPEGProc",513:"ThumbnailOffset",514:"ThumbnailLength",515:"JPEGRestartInterval",517:"JPEGLosslessPredictors",518:"JPEGPointTransforms",519:"JPEGQTables",520:"JPEGDCTables",521:"JPEGACTables",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite",559:"StripRowCounts",700:"ApplicationNotes",999:"USPTOMiscellaneous",4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight",18246:"Rating",18247:"XP_DIP_XML",18248:"StitchInfo",18249:"RatingPercent",32781:"ImageID",32931:"WangTag1",32932:"WangAnnotation",32933:"WangTag3",32934:"WangTag4",32995:"Matteing",32996:"DataType",32997:"ImageDepth",32998:"TileDepth",33405:"Model2",33421:"CFARepeatPatternDim",33422:"CFAPattern2",33423:"BatteryLevel",33424:"KodakIFD",33432:"Copyright",33434:"ExposureTime",33437:"FNumber",33445:"MDFileTag",33446:"MDScalePixel",33447:"MDColorTable",33448:"MDLabName",33449:"MDSampleInfo",33450:"MDPrepDate",33451:"MDPrepTime",33452:"MDFileUnits",33550:"PixelScale",33589:"AdventScale",33590:"AdventRevision",33628:"UIC1Tag",33629:"UIC2Tag",33630:"UIC3Tag",33631:"UIC4Tag",33723:"IPTC-NAA",33918:"IntergraphPacketData",33919:"IntergraphFlagRegisters",33920:"IntergraphMatrix",33921:"INGRReserved",33922:"ModelTiePoint",34016:"Site",34017:"ColorSequence",34018:"IT8Header",34019:"RasterPadding",34020:"BitsPerRunLength",34021:"BitsPerExtendedRunLength",34022:"ColorTable",34023:"ImageColorIndicator",34024:"BackgroundColorIndicator",34025:"ImageColorValue",34026:"BackgroundColorValue",34027:"PixelIntensityRange",34028:"TransparencyIndicator",34029:"ColorCharacterization",34030:"HCUsage",34031:"TrapIndicator",34032:"CMYKEquivalent",34118:"SEMInfo",34152:"AFCP_IPTC",34232:"PixelMagicJBIGOptions",34264:"ModelTransform",34306:"WB_GRGBLevels",34310:"LeafData",34377:"PhotoshopSettings",34665:"ExifOffset",34675:"ICC_Profile",34687:"TIFF_FXExtensions",34688:"MultiProfiles",34689:"SharedData",34690:"T88Options",34732:"ImageLayer",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34850:"ExposureProgram",34852:"SpectralSensitivity",34853:"GPSInfo",34855:"ISO",34856:"Opto-ElectricConvFactor",34857:"Interlace",34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",34908:"FaxRecvParams",34909:"FaxSubAddress",34910:"FaxRecvTime",34954:"LeafSubIFD",36864:"ExifVersion",36867:"DateTimeOriginal",36868:"CreateDate",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureCompensation",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37386:"FocalLength",37387:"FlashEnergy",37388:"SpatialFrequencyResponse",37389:"Noise",37390:"FocalPlaneXResolution",37391:"FocalPlaneYResolution",37392:"FocalPlaneResolutionUnit",37393:"ImageNumber",37394:"SecurityClassification",37395:"ImageHistory",37396:"SubjectArea",37397:"ExposureIndex",37398:"TIFF-EPStandardID",37399:"SensingMethod",37434:"CIP3DataFile",37435:"CIP3Sheet",37436:"CIP3Side",37439:"StoNits",37500:"MakerNote",37510:"UserComment",37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37679:"MSDocumentText",37680:"MSPropertySetStorage",37681:"MSDocumentTextPosition",37724:"ImageSourceData",40091:"XPTitle",40092:"XPComment",40093:"XPAuthor",40094:"XPKeywords",40095:"XPSubject",40960:"FlashpixVersion",40961:"ColorSpace",40962:"ExifImageWidth",40963:"ExifImageHeight",40964:"RelatedSoundFile",40965:"InteropOffset",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41485:"Noise",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41489:"ImageNumber",41490:"SecurityClassification",41491:"ImageHistory",41492:"SubjectLocation",41493:"ExposureIndex",41494:"TIFF-EPStandardID",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFormat",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"OwnerName",42033:"SerialNumber",42034:"LensInfo",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42112:"GDALMetadata",42113:"GDALNoData",42240:"Gamma",44992:"ExpandSoftware",44993:"ExpandLens",44994:"ExpandFilm",44995:"ExpandFilterLens",44996:"ExpandScanner",44997:"ExpandFlashLamp",48129:"PixelFormat",48130:"Transformation",48131:"Uncompressed",48132:"ImageType",48256:"ImageWidth",48257:"ImageHeight",48258:"WidthResolution",48259:"HeightResolution",48320:"ImageOffset",48321:"ImageByteCount",48322:"AlphaOffset",48323:"AlphaByteCount",48324:"ImageDataDiscard",48325:"AlphaDataDiscard",50215:"OceScanjobDesc",50216:"OceApplicationSelector",50217:"OceIDNumber",50218:"OceImageLogic",50255:"Annotations",50341:"PrintIM",50560:"USPTOOriginalContentType",50706:"DNGVersion",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50710:"CFAPlaneColor",50711:"CFALayout",50712:"LinearizationTable",50713:"BlackLevelRepeatDim",50714:"BlackLevel",50715:"BlackLevelDeltaH",50716:"BlackLevelDeltaV",50717:"WhiteLevel",50718:"DefaultScale",50719:"DefaultCropOrigin",50720:"DefaultCropSize",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50733:"BayerGreenSplit",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50737:"ChromaBlurRadius",50738:"AntiAliasStrength",50739:"ShadowScale",50740:"DNGPrivateData",50741:"MakerNoteSafety",50752:"RawImageSegmentation",50778:"CalibrationIlluminant1",50779:"CalibrationIlluminant2",50780:"BestQualityScale",50781:"RawDataUniqueID",50784:"AliasLayerMetadata",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50829:"ActiveArea",50830:"MaskedAreas",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50935:"NoiseReductionApplied",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:"ProfileEmbedPolicy",50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:"PreviewColorSpace",50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50974:"SubTileBlockSize",50975:"RowInterleaveFactor",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51008:"OpcodeList1",51009:"OpcodeList2",51022:"OpcodeList3",51041:"NoiseProfile",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:"ProfileHueSatMapEncoding",51108:"ProfileLookTableEncoding",51109:"BaselineExposureOffset",51110:"DefaultBlackRender",51111:"NewRawImageDigest",51112:"RawToPreviewGain",51125:"DefaultUserCrop",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65024:"KDC_IFD",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"}}},function(t,e){function r(t,e,r,n,i,a){this.global=i,e=e||0,r=r||t.byteLength-e,this.arrayBuffer=t.slice(e,e+r),this.view=new i.DataView(this.arrayBuffer,0,this.arrayBuffer.byteLength),this.setBigEndian(n),this.offset=0,this.parentOffset=(a||0)+e}r.prototype={setBigEndian:function(t){this.littleEndian=!t},nextUInt8:function(){var t=this.view.getUint8(this.offset);return this.offset+=1,t},nextInt8:function(){var t=this.view.getInt8(this.offset);return this.offset+=1,t},nextUInt16:function(){var t=this.view.getUint16(this.offset,this.littleEndian);return this.offset+=2,t},nextUInt32:function(){var t=this.view.getUint32(this.offset,this.littleEndian);return this.offset+=4,t},nextInt16:function(){var t=this.view.getInt16(this.offset,this.littleEndian);return this.offset+=2,t},nextInt32:function(){var t=this.view.getInt32(this.offset,this.littleEndian);return this.offset+=4,t},nextFloat:function(){var t=this.view.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t},nextDouble:function(){var t=this.view.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t},nextBuffer:function(t){var e=this.arrayBuffer.slice(this.offset,this.offset+t);return this.offset+=t,e},remainingLength:function(){return this.arrayBuffer.byteLength-this.offset},nextString:function(t){var e=this.arrayBuffer.slice(this.offset,this.offset+t);return e=String.fromCharCode.apply(null,new this.global.Uint8Array(e)),this.offset+=t,e},mark:function(){var t=this;return{openWithOffset:function(e){return e=(e||0)+this.offset,new r(t.arrayBuffer,e,t.arrayBuffer.byteLength-e,!t.littleEndian,t.global,t.parentOffset)},offset:this.offset,getParentOffset:function(){return t.parentOffset}}},offsetFrom:function(t){return this.parentOffset+this.offset-(t.offset+t.getParentOffset())},skip:function(t){this.offset+=t},branch:function(t,e){return e="number"==typeof e?e:this.arrayBuffer.byteLength-(this.offset+t),new r(this.arrayBuffer,this.offset+t,e,!this.littleEndian,this.global,this.parentOffset)}},t.exports=r},function(t,e){function r(t,e,r,n){this.buffer=t,this.offset=e||0,r="number"==typeof r?r:t.length,this.endPosition=this.offset+r,this.setBigEndian(n)}r.prototype={setBigEndian:function(t){this.bigEndian=!!t},nextUInt8:function(){var t=this.buffer.readUInt8(this.offset);return this.offset+=1,t},nextInt8:function(){var t=this.buffer.readInt8(this.offset);return this.offset+=1,t},nextUInt16:function(){var t=this.bigEndian?this.buffer.readUInt16BE(this.offset):this.buffer.readUInt16LE(this.offset);return this.offset+=2,t},nextUInt32:function(){var t=this.bigEndian?this.buffer.readUInt32BE(this.offset):this.buffer.readUInt32LE(this.offset);return this.offset+=4,t},nextInt16:function(){var t=this.bigEndian?this.buffer.readInt16BE(this.offset):this.buffer.readInt16LE(this.offset);return this.offset+=2,t},nextInt32:function(){var t=this.bigEndian?this.buffer.readInt32BE(this.offset):this.buffer.readInt32LE(this.offset);return this.offset+=4,t},nextFloat:function(){var t=this.bigEndian?this.buffer.readFloatBE(this.offset):this.buffer.readFloatLE(this.offset);return this.offset+=4,t},nextDouble:function(){var t=this.bigEndian?this.buffer.readDoubleBE(this.offset):this.buffer.readDoubleLE(this.offset);return this.offset+=8,t},nextBuffer:function(t){var e=this.buffer.slice(this.offset,this.offset+t);return this.offset+=t,e},remainingLength:function(){return this.endPosition-this.offset},nextString:function(t){var e=this.buffer.toString("utf8",this.offset,this.offset+t);return this.offset+=t,e},mark:function(){var t=this;return{openWithOffset:function(e){return e=(e||0)+this.offset,new r(t.buffer,e,t.endPosition-e,t.bigEndian)},offset:this.offset}},offsetFrom:function(t){return this.offset-t.offset},skip:function(t){this.offset+=t},branch:function(t,e){return e="number"==typeof e?e:this.endPosition-(this.offset+t),new r(this.buffer,this.offset+t,e,this.bigEndian)}},t.exports=r},function(t,e,r){"use strict";(function(t,n){var i=r(3),a=r(16),o=r(134),s=r(136),f=r(139),u=e.PNG=function(e){a.call(this),e=e||{},this.width=0|e.width,this.height=0|e.height,this.data=this.width>0&&this.height>0?new t(4*this.width*this.height):null,e.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new o(e),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(e),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(u,a),u.sync=f,u.prototype.pack=function(){return this.data&&this.data.length?(n.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this):(this.emit("error","No data provided"),this)},u.prototype.parse=function(t,e){var r,n;e&&(r=function(t){this.removeListener("error",n),this.data=t,e(null,this)}.bind(this),n=function(t){this.removeListener("parsed",r),e(t,null)}.bind(this),this.once("parsed",r),this.once("error",n));return this.end(t),this},u.prototype.write=function(t){return this._parser.write(t),!0},u.prototype.end=function(t){this._parser.end(t)},u.prototype._metadata=function(t){this.width=t.width,this.height=t.height,this.emit("metadata",t)},u.prototype._gamma=function(t){this.gamma=t},u.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit("close")},u.bitblt=function(t,e,r,n,i,a,o,s){if(n|=0,i|=0,a|=0,o|=0,s|=0,(r|=0)>t.width||n>t.height||r+i>t.width||n+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 f=0;f<a;f++)t.data.copy(e.data,(s+f)*e.width+o<<2,(n+f)*t.width+r<<2,(n+f)*t.width+r+i<<2)},u.prototype.bitblt=function(t,e,r,n,i,a,o){return u.bitblt(this,t,e,r,n,i,a,o),this},u.adjustGamma=function(t){if(t.gamma){for(var e=0;e<t.height;e++)for(var r=0;r<t.width;r++)for(var n=t.width*e+r<<2,i=0;i<3;i++){var a=t.data[n+i]/255;a=Math.pow(a,1/2.2/t.gamma),t.data[n+i]=Math.round(255*a)}t.gamma=0}},u.prototype.adjustGamma=function(){u.adjustGamma(this)}}).call(this,r(0).Buffer,r(1))},function(t,e,r){"use strict";var n=r(3),i=r(7),a=r(46),o=r(135),s=r(50),f=r(52),u=r(53),h=t.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),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=t,this.writable=!0,this._parser.start()};n.inherits(h,a),h.prototype._handleError=function(t){this.emit("error",t),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",(function(){}))),this.errord=!0},h.prototype._inflateData=function(t){if(!this._inflate)if(this._bitmapInfo.interlace)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);else{var e=(1+(this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3))*this._bitmapInfo.height,r=Math.max(e,i.Z_MIN_CHUNK);this._inflate=i.createInflate({chunkSize:r});var n=e,a=this.emit.bind(this,"error");this._inflate.on("error",(function(t){n&&a(t)})),this._filter.on("complete",this._complete.bind(this));var o=this._filter.write.bind(this._filter);this._inflate.on("data",(function(t){n&&(t.length>n&&(t=t.slice(0,n)),n-=t.length,o(t))})),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(t)},h.prototype._handleMetaData=function(t){this._metaData=t,this._bitmapInfo=Object.create(t),this._filter=new o(this._bitmapInfo)},h.prototype._handleTransColor=function(t){this._bitmapInfo.transColor=t},h.prototype._handlePalette=function(t){this._bitmapInfo.palette=t},h.prototype._simpleTransparency=function(){this._metaData.alpha=!0},h.prototype._headersFinished=function(){this.emit("metadata",this._metaData)},h.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"),this.destroySoon())},h.prototype._complete=function(t){if(!this.errord){try{var e=f.dataToBitMap(t,this._bitmapInfo),r=u(e,this._bitmapInfo);e=null}catch(t){return void this._handleError(t)}this.emit("parsed",r)}}},function(t,e,r){"use strict";(function(e){var n=r(3),i=r(46),a=r(47),o=t.exports=function(t){i.call(this);var r=[],n=this;this._filter=new a(t,{read:this.read.bind(this),write:function(t){r.push(t)},complete:function(){n.emit("complete",e.concat(r))}}),this._filter.start()};n.inherits(o,i)}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){var n=r(3),i=r(16),a=r(10),o=r(54),s=t.exports=function(t){i.call(this);var e=t||{};this._packer=new o(e),this._deflate=this._packer.createDeflate(),this.readable=!0};n.inherits(s,i),s.prototype.pack=function(t,r,n,i){this.emit("data",new e(a.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(r,n)),i&&this.emit("data",this._packer.packGAMA(i));var o=this._packer.filterData(t,r,n);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,r(0).Buffer)},function(t,e,r){"use strict";(function(e){var n=r(10);t.exports=function(t,r,i,a){var o,s=-1!==[n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(a.colorType);if(a.colorType===a.inputColorType){var f=(o=new ArrayBuffer(2),new DataView(o).setInt16(0,256,!0),256!==new Int16Array(o)[0]);if(8===a.bitDepth||16===a.bitDepth&&f)return t}var u=16!==a.bitDepth?t:new Uint16Array(t.buffer),h=255,l=n.COLORTYPE_TO_BPP_MAP[a.inputColorType];4!==l||a.inputHasAlpha||(l=3);var c=n.COLORTYPE_TO_BPP_MAP[a.colorType];16===a.bitDepth&&(h=65535,c*=2);var d=new e(r*i*c),p=0,m=0,g=a.bgColor||{};function b(){var t,e,r,i=h;switch(a.inputColorType){case n.COLORTYPE_COLOR_ALPHA:i=u[p+3],t=u[p],e=u[p+1],r=u[p+2];break;case n.COLORTYPE_COLOR:t=u[p],e=u[p+1],r=u[p+2];break;case n.COLORTYPE_ALPHA:i=u[p+1],e=t=u[p],r=t;break;case n.COLORTYPE_GRAYSCALE:e=t=u[p],r=t;break;default:throw new Error("input color type:"+a.inputColorType+" is not supported at present")}return a.inputHasAlpha&&(s||(i/=h,t=Math.min(Math.max(Math.round((1-i)*g.red+i*t),0),h),e=Math.min(Math.max(Math.round((1-i)*g.green+i*e),0),h),r=Math.min(Math.max(Math.round((1-i)*g.blue+i*r),0),h))),{red:t,green:e,blue:r,alpha:i}}void 0===g.red&&(g.red=h),void 0===g.green&&(g.green=h),void 0===g.blue&&(g.blue=h);for(var _=0;_<i;_++)for(var y=0;y<r;y++){var v=b();switch(a.colorType){case n.COLORTYPE_COLOR_ALPHA:case n.COLORTYPE_COLOR:8===a.bitDepth?(d[m]=v.red,d[m+1]=v.green,d[m+2]=v.blue,s&&(d[m+3]=v.alpha)):(d.writeUInt16BE(v.red,m),d.writeUInt16BE(v.green,m+2),d.writeUInt16BE(v.blue,m+4),s&&d.writeUInt16BE(v.alpha,m+6));break;case n.COLORTYPE_ALPHA:case n.COLORTYPE_GRAYSCALE:var w=(v.red+v.green+v.blue)/3;8===a.bitDepth?(d[m]=w,s&&(d[m+1]=v.alpha)):(d.writeUInt16BE(w,m),s&&d.writeUInt16BE(v.alpha,m+2));break;default:throw new Error("unrecognised color Type "+a.colorType)}p+=l,m+=c}return d}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){var n=r(49);var i={0:function(t,e,r,n,i){for(var a=0;a<r;a++)n[i+a]=t[e+a]},1:function(t,e,r,n,i,a){for(var o=0;o<r;o++){var s=o>=a?t[e+o-a]:0,f=t[e+o]-s;n[i+o]=f}},2:function(t,e,r,n,i){for(var a=0;a<r;a++){var o=e>0?t[e+a-r]:0,s=t[e+a]-o;n[i+a]=s}},3:function(t,e,r,n,i,a){for(var o=0;o<r;o++){var s=o>=a?t[e+o-a]:0,f=e>0?t[e+o-r]:0,u=t[e+o]-(s+f>>1);n[i+o]=u}},4:function(t,e,r,i,a,o){for(var s=0;s<r;s++){var f=s>=o?t[e+s-o]:0,u=e>0?t[e+s-r]:0,h=e>0&&s>=o?t[e+s-(r+o)]:0,l=t[e+s]-n(f,u,h);i[a+s]=l}}},a={0:function(t,e,r){for(var n=0,i=e+r,a=e;a<i;a++)n+=Math.abs(t[a]);return n},1:function(t,e,r,n){for(var i=0,a=0;a<r;a++){var o=a>=n?t[e+a-n]:0,s=t[e+a]-o;i+=Math.abs(s)}return i},2:function(t,e,r){for(var n=0,i=e+r,a=e;a<i;a++){var o=e>0?t[a-r]:0,s=t[a]-o;n+=Math.abs(s)}return n},3:function(t,e,r,n){for(var i=0,a=0;a<r;a++){var o=a>=n?t[e+a-n]:0,s=e>0?t[e+a-r]:0,f=t[e+a]-(o+s>>1);i+=Math.abs(f)}return i},4:function(t,e,r,i){for(var a=0,o=0;o<r;o++){var s=o>=i?t[e+o-i]:0,f=e>0?t[e+o-r]:0,u=e>0&&o>=i?t[e+o-(r+i)]:0,h=t[e+o]-n(s,f,u);a+=Math.abs(h)}return a}};t.exports=function(t,r,n,o,s){var f;if("filterType"in o&&-1!==o.filterType){if("number"!=typeof o.filterType)throw new Error("unrecognised filter types");f=[o.filterType]}else f=[0,1,2,3,4];16===o.bitDepth&&(s*=2);for(var u=r*s,h=0,l=0,c=new e((u+1)*n),d=f[0],p=0;p<n;p++){if(f.length>1)for(var m=1/0,g=0;g<f.length;g++){var b=a[f[g]](t,l,u,s);b<m&&(d=f[g],m=b)}c[h]=d,h++,i[d](t,l,u,c,h,s),h+=u,l+=u}return c}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";var n=r(140),i=r(143);e.read=function(t,e){return n(t,e||{})},e.write=function(t,e){return i(t,e)}},function(t,e,r){"use strict";(function(e){var n=!0,i=r(7),a=r(141);i.deflateSync||(n=!1);var o=r(55),s=r(142),f=r(50),u=r(52),h=r(53);t.exports=function(t,r){if(!n)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");var l,c,d;var p=[];var m=new o(t);if(new f(r,{read:m.read.bind(m),error:function(t){l=t},metadata:function(t){c=t},gamma:function(t){d=t},palette:function(t){c.palette=t},transColor:function(t){c.transColor=t},inflateData:function(t){p.push(t)},simpleTransparency:function(){c.alpha=!0}}).start(),m.process(),l)throw l;var g,b=e.concat(p);if(p.length=0,c.interlace)g=i.inflateSync(b);else{var _=(1+(c.width*c.bpp*c.depth+7>>3))*c.height;g=a(b,{chunkSize:_,maxLength:_})}if(b=null,!g||!g.length)throw new Error("bad png - invalid inflate data response");var y=s.process(g,c);b=null;var v=u.dataToBitMap(y,c);y=null;var w=h(v,c);return c.data=w,c.gamma=d||0,c}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(n,i){var a=r(23).ok,o=r(7),s=r(3),f=r(0).kMaxLength;function u(t){if(!(this instanceof u))return new u(t);t&&t.chunkSize<o.Z_MIN_CHUNK&&(t.chunkSize=o.Z_MIN_CHUNK),o.Inflate.call(this,t),this._offset=void 0===this._offset?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,t&&null!=t.maxLength&&(this._maxLength=t.maxLength)}function h(t,e){e&&n.nextTick(e),t._handle&&(t._handle.close(),t._handle=null)}function l(t,e){return function(t,e){if("string"==typeof e&&(e=i.from(e)),!(e instanceof i))throw new TypeError("Not a string or buffer");var r=t._finishFlushFlag;return null==r&&(r=o.Z_FINISH),t._processChunk(e,r)}(new u(e),t)}u.prototype._processChunk=function(t,e,r){if("function"==typeof r)return o.Inflate._processChunk.call(this,t,e,r);var n,s=this,u=t&&t.length,l=this._chunkSize-this._offset,c=this._maxLength,d=0,p=[],m=0;function g(t,e){if(!s._hadError){var r=l-e;if(a(r>=0,"have should not go down"),r>0){var n=s._buffer.slice(s._offset,s._offset+r);if(s._offset+=r,n.length>c&&(n=n.slice(0,c)),p.push(n),m+=n.length,0===(c-=n.length))return!1}return(0===e||s._offset>=s._chunkSize)&&(l=s._chunkSize,s._offset=0,s._buffer=i.allocUnsafe(s._chunkSize)),0===e&&(d+=u-t,u=t,!0)}}this.on("error",(function(t){n=t})),a(this._handle,"zlib binding closed");do{var b=this._handle.writeSync(e,t,d,u,this._buffer,this._offset,l);b=b||this._writeState}while(!this._hadError&&g(b[0],b[1]));if(this._hadError)throw n;if(m>=f)throw h(this),new RangeError("Cannot create final Buffer. It would be larger than 0x"+f.toString(16)+" bytes");var _=i.concat(p,m);return h(this),_},s.inherits(u,o.Inflate),t.exports=e=l,e.Inflate=u,e.createInflate=function(t){return new u(t)},e.inflateSync=l}).call(this,r(1),r(0).Buffer)},function(t,e,r){"use strict";(function(t){var n=r(55),i=r(47);e.process=function(e,r){var a=[],o=new n(e);return new i(r,{read:o.read.bind(o),write:function(t){a.push(t)},complete:function(){}}).start(),o.process(),t.concat(a)}}).call(this,r(0).Buffer)},function(t,e,r){"use strict";(function(e){var n=!0,i=r(7);i.deflateSync||(n=!1);var a=r(10),o=r(54);t.exports=function(t,r){if(!n)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");var s=new o(r||{}),f=[];f.push(new e(a.PNG_SIGNATURE)),f.push(s.packIHDR(t.width,t.height)),t.gamma&&f.push(s.packGAMA(t.gamma));var u=s.filterData(t.data,t.width,t.height),h=i.deflateSync(u,s.getDeflateOptions());if(u=null,!h||!h.length)throw new Error("bad png - invalid compressed data response");return f.push(s.packIDAT(h)),f.push(s.packIEND()),e.concat(f)}}).call(this,r(0).Buffer)}]).default}));