Comparing version 0.7.0 to 0.7.1
/*! | ||
* icojs v0.7.0 | ||
* icojs v0.7.1 | ||
* (c) egy186 | ||
* https://github.com/egy186/icojs/blob/master/LICENSE | ||
*/ | ||
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.ICO=r():t.ICO=r()}(this,function(){return function(t){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}var e={};return r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get: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,r){return Object.prototype.hasOwnProperty.call(t,r)},r.p="",r(r.s=19)}([function(t,r){var e;e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,r,e){"use strict";var n=e(3),i=function(t){var r=n(t);if(!r)return!1;var e=new DataView(r);return 0===e.getUint16(0,!0)&&1===e.getUint16(2,!0)};t.exports=i},function(t,r,e){"use strict";var n={of1:function(t){for(var r=new Uint8Array(t),e="",n=0;n<r.byteLength;n++)e+=("000000000"+r[n].toString(2)).slice(-8);return e.split("").map(function(t){return parseInt(t,2)})},of4:function(t){for(var r=new Uint8Array(t),e="",n=0;n<r.byteLength;n++)e+=("00"+r[n].toString(16)).slice(-2);return e.split("").map(function(t){return parseInt(t,16)})},of8:function(t){var r=new Uint8Array(t);return Array.from(r)}};t.exports=n},function(t,r,e){"use strict";(function(r){var e=function(t){return r.isBuffer(t)?new Uint8Array(t).buffer:ArrayBuffer.isView(t)?t.buffer:t instanceof ArrayBuffer&&t};t.exports=e}).call(r,e(15).Buffer)},function(t,r,e){"use strict";var n=function(t){return new Array(t).fill(0).map(function(t,r){return r})};t.exports=n},function(t,r,e){"use strict";var n=function(t){var r=t%4;return t%4==0?t:t+4-r};t.exports=n},function(t,r,e){"use strict";t.exports=e(1)},function(t,r,e){"use strict";var n=e(9),i=e(14),o=function(t,r){return i(t,r,n)};t.exports=o},function(t,r,e){"use strict";var n=function(t){var r=new DataView(t),e=r.getUint8(24),n=r.getUint8(25);return 2===n?3*e:4===n?2*e:6===n?4*e:e};t.exports=n},function(t,r,e){"use strict";var n=function(t){for(var r=atob(t.replace(/.+,/,"")),e=new Uint8Array(r.length),n=0;n<r.length;n++)e[n]=r.charCodeAt(n);return e.buffer},i={decode:function(t){return new Promise(function(r){var e=URL.createObjectURL(new Blob([t])),n=document.createElement("img");n.src=e,n.onload=function(){var t=n.naturalWidth,e=n.naturalHeight,i=document.createElement("canvas");i.width=t,i.height=e;var o=i.getContext("2d");o.drawImage(n,0,0);var u=o.getImageData(0,0,t,e);r({width:u.width,height:u.height,data:u.data})}})},encode:function(t,r){return new Promise(function(e){var i=t.data,o=document.createElement("canvas");o.width=t.width,o.height=t.height;for(var u=o.getContext("2d"),f=u.createImageData(t.width,t.height),a=f.data,s=0;s<a.length;s++)a[s]=i[s];u.putImageData(f,0,0),e(n(o.toDataURL(r||"image/png")))})}};t.exports=i},function(t,r,e){"use strict";var n=e(2),i=e(5),o=function(t){for(var r=t.width,e=t.height,o=new Uint8ClampedArray(r*e*4),u=new Uint8Array(t.xor),f=n.of1(t.and),a=8*i(r*t.bit/8)/t.bit,s=8*i(r/8),h=function(t,n){return 4*((e-n-1)*r+t)},c=0;c<e;c++)for(var l=0;l<r;l++){var p=3*(c*a+l);o.set([u[p+2],u[p+1],u[p],f[c*s+l]?0:255],h(l,c))}return{data:o,height:e,width:r}},u=function(t){for(var r=t.width,e=t.height,o=new Uint8ClampedArray(r*e*4),u=new Uint8Array(t.xor),f=n.of1(t.and),a=8*i(r*t.bit/8)/t.bit,s=8*i(r/8),h=function(t,n){return 4*((e-n-1)*r+t)},c=0;c<e;c++)for(var l=0;l<r;l++){var p=4*(c*a+l);o.set([u[p+2],u[p+1],u[p],1===f[c*s+l]||1===u[p+3]?0:u[p+3]>1?u[p+3]:255],h(l,c))}return{data:o,height:e,width:r}},f=function(t){for(var r=t.width,e=t.height,o=new Uint8ClampedArray(r*e*4),u=n["of"+t.bit](t.xor),f=n.of1(t.and),a=8*i(r*t.bit/8)/t.bit,s=8*i(r/8),h=function(t,n){return 4*((e-n-1)*r+t)},c=0;c<e;c++)for(var l=0;l<r;l++){var p=c*a+l,g=t.colors[u[p]];o.set([g[2],g[1],g[0],f[c*s+l]?0:255],h(l,c))}return{data:o,height:e,width:r}},a=function(t){return 32===t.bit?u(t):24===t.bit?o(t):f(t)};t.exports=a},function(t,r,e){"use strict";var n=function(t){if(!(t instanceof ArrayBuffer))return!1;var r=new DataView(t);return 0===r.getUint16(0,!0)&&2===r.getUint16(2,!0)};t.exports=n},function(t,r,e){"use strict";var n=function(t){if(!(t instanceof ArrayBuffer))return!1;var r=new DataView(t);return 2303741511===r.getUint32(0,!1)&&218765834===r.getUint32(4,!1)};t.exports=n},function(t,r,e){"use strict";var n=e(2),i=e(4),o=e(5),u=e(10),f=function(t,r,e){var f=new DataView(e),a=f.getUint32(0,!0),s=f.getUint16(14,!0),h=f.getUint32(32,!0);0===h&&s<=8&&(h=1<<s);var c=a+4*h,l=c+o(t*s/8)*r,p={and:e.slice(l,l+o(t/8)*r),bit:s,colors:i(h).map(function(t){var r=4,i=a+t*r;return n.of8(e.slice(i,i+r))}),height:r,width:t,xor:e.slice(c,l)};return Object.assign(u(p),{bit:s})};t.exports=f},function(t,r,e){"use strict";var n=e(3),i=e(8),o=e(11),u=e(1),f=e(12),a=e(13),s=e(4),h=function(t,r,e){var h=n(t);if(!h)return Promise.reject(new TypeError('"buffer" argument must be a Buffer or ArrayBuffer'));if(!o(h)&&!u(h))return Promise.reject(new Error("buffer is not ico"));var c=new DataView(h),l=c.getUint16(4,!0),p=s(l).map(function(t){var r=16,e=6+t*r;return h.slice(e,e+r)}),g=s(l).map(function(t){var r=new DataView(p[t]),e=r.getUint32(8,!0),n=r.getUint32(12,!0);return h.slice(n,n+e)}),y=function(t,r,n){if(f(n)){var o=i(n);return e.decode(n).then(function(t){return Object.assign(t,{bit:o})})}return Promise.resolve(a(t,r,n))},w=s(l).map(function(t){var n=new DataView(p[t]);return y(n.getUint8(0)||256,n.getUint8(1)||256,g[t]).then(function(t){return o(h)&&(t.hotspot={x:n.getUint16(4,!0),y:n.getUint16(6,!0)}),e.encode(t,r).then(function(r){var e=Object.assign({buffer:r},t);return delete e.data,e})})});return Promise.all(w)};t.exports=h},function(t,r,e){"use strict";(function(t){function n(){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}}function i(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,r){if(i()<r)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r),t.__proto__=u.prototype):(null===t&&(t=new u(r)),t.length=r),t}function u(t,r,e){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return f(this,t,r,e)}function f(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?p(t,r,e,n):"string"==typeof r?c(t,r,e):g(t,r)}function a(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 s(t,r,e,n){return a(r),r<=0?o(t,r):void 0!==e?"string"==typeof n?o(t,r).fill(e,n):o(t,r).fill(e):o(t,r)}function h(t,r){if(a(r),t=o(t,r<0?0:0|y(r)),!u.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function c(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|d(r,e);t=o(t,n);var i=t.write(r,e);return i!==n&&(t=t.slice(0,i)),t}function l(t,r){var e=r.length<0?0:0|y(r.length);t=o(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function p(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),u.TYPED_ARRAY_SUPPORT?(t=r,t.__proto__=u.prototype):t=l(t,r),t}function g(t,r){if(u.isBuffer(r)){var e=0|y(r.length);return t=o(t,e),0===t.length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||G(r.length)?o(t,0):l(t,r);if("Buffer"===r.type&&$(r.data))return l(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function y(t){if(t>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function w(t){return+t!=t&&(t=0),u.alloc(+t)}function d(t,r){if(u.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 e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return W(t).length;default:if(n)return q(t).length;r=(""+r).toLowerCase(),n=!0}}function v(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if(e>>>=0,r>>>=0,e<=r)return"";for(t||(t="utf8");;)switch(t){case"hex":return C(this,r,e);case"utf8":case"utf-8":return S(this,r,e);case"ascii":return I(this,r,e);case"latin1":case"binary":return Y(this,r,e);case"base64":return T(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function A(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=u.from(r,n)),u.isBuffer(r))return 0===r.length?-1:m(t,r,e,n,i);if("number"==typeof r)return r&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):m(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function m(t,r,e,n,i){function o(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}var u=1,f=t.length,a=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,a/=2,e/=2}var s;if(i){var h=-1;for(s=e;s<f;s++)if(o(t,s)===o(r,h===-1?0:s-h)){if(h===-1&&(h=s),s-h+1===a)return h*u}else h!==-1&&(s-=s-h),h=-1}else for(e+a>f&&(e=f-a),s=e;s>=0;s--){for(var c=!0,l=0;l<a;l++)if(o(t,s+l)!==o(r,l)){c=!1;break}if(c)return s}return-1}function E(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var f=parseInt(r.substr(2*u,2),16);if(isNaN(f))return u;t[e+u]=f}return u}function R(t,r,e,n){return Z(q(r,t.length-e),t,e,n)}function U(t,r,e,n){return Z(H(r),t,e,n)}function _(t,r,e,n){return U(t,r,e,n)}function P(t,r,e,n){return Z(W(r),t,e,n)}function B(t,r,e,n){return Z(J(r,t.length-e),t,e,n)}function T(t,r,e){return 0===r&&e===t.length?K.fromByteArray(t):K.fromByteArray(t.slice(r,e))}function S(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o=t[i],u=null,f=o>239?4:o>223?3:o>191?2:1;if(i+f<=e){var a,s,h,c;switch(f){case 1:o<128&&(u=o);break;case 2:a=t[i+1],128==(192&a)&&(c=(31&o)<<6|63&a)>127&&(u=c);break;case 3:a=t[i+1],s=t[i+2],128==(192&a)&&128==(192&s)&&(c=(15&o)<<12|(63&a)<<6|63&s)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:a=t[i+1],s=t[i+2],h=t[i+3],128==(192&a)&&128==(192&s)&&128==(192&h)&&(c=(15&o)<<18|(63&a)<<12|(63&s)<<6|63&h)>65535&&c<1114112&&(u=c)}}null===u?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=f}return x(n)}function x(t){var r=t.length;if(r<=tt)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=tt));return e}function I(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function Y(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function C(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=X(t[o]);return i}function O(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function D(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function L(t,r,e,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function M(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function j(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>8*(n?i:3-i)&255}function N(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function k(t,r,e,n,i){return i||N(t,r,e,4,3.4028234663852886e38,-3.4028234663852886e38),Q.write(t,r,e,n,23,4),e+4}function V(t,r,e,n,i){return i||N(t,r,e,8,1.7976931348623157e308,-1.7976931348623157e308),Q.write(t,r,e,n,52,8),e+8}function z(t){if(t=F(t).replace(rt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function F(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function X(t){return t<16?"0"+t.toString(16):t.toString(16)}function q(t,r){r=r||1/0;for(var e,n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function H(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}function J(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)e=t.charCodeAt(u),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function W(t){return K.toByteArray(z(t))}function Z(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function G(t){return t!==t}/*! | ||
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.ICO=r():t.ICO=r()}(this,function(){return function(t){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}var e={};return r.m=t,r.c=e,r.i=function(t){return t},r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get: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,r){return Object.prototype.hasOwnProperty.call(t,r)},r.p="",r(r.s=10)}([function(t,r){var e;e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,r,e){"use strict";var n=e(3),i=function(t){var r=n(t);if(!r)return!1;var e=new DataView(r);return 0===e.getUint16(0,!0)&&1===e.getUint16(2,!0)};t.exports=i},function(t,r,e){"use strict";var n={of1:function(t){for(var r=new Uint8Array(t),e="",n=0;n<r.byteLength;n++)e+=("000000000"+r[n].toString(2)).slice(-8);return e.split("").map(function(t){return parseInt(t,2)})},of4:function(t){for(var r=new Uint8Array(t),e="",n=0;n<r.byteLength;n++)e+=("00"+r[n].toString(16)).slice(-2);return e.split("").map(function(t){return parseInt(t,16)})},of8:function(t){var r=new Uint8Array(t);return Array.from(r)}};t.exports=n},function(t,r,e){"use strict";(function(r){var e=function(t){return r.isBuffer(t)?new Uint8Array(t).buffer:ArrayBuffer.isView(t)?t.buffer:t instanceof ArrayBuffer&&t};t.exports=e}).call(r,e(17).Buffer)},function(t,r,e){"use strict";var n=function(t){return new Array(t).fill(0).map(function(t,r){return r})};t.exports=n},function(t,r,e){"use strict";var n=function(t){var r=t%4;return t%4==0?t:t+4-r};t.exports=n},function(t,r,e){"use strict";t.exports=e(1)},function(t,r,e){"use strict";var n=e(9),i=e(15),o=function(t,r){return i(t,r,n)};t.exports=o},function(t,r,e){"use strict";var n=function(t){var r=new DataView(t),e=r.getUint8(24),n=r.getUint8(25);return 2===n?3*e:4===n?2*e:6===n?4*e:e};t.exports=n},function(t,r,e){"use strict";var n=function(t){for(var r=atob(t.replace(/.+,/,"")),e=new Uint8Array(r.length),n=0;n<r.length;n++)e[n]=r.charCodeAt(n);return e.buffer},i={decode:function(t){return new Promise(function(r){var e=URL.createObjectURL(new Blob([t])),n=document.createElement("img");n.src=e,n.onload=function(){var t=n.naturalWidth,e=n.naturalHeight,i=document.createElement("canvas");i.width=t,i.height=e;var o=i.getContext("2d");o.drawImage(n,0,0);var u=o.getImageData(0,0,t,e);r({width:u.width,height:u.height,data:u.data})}})},encode:function(t,r){return new Promise(function(e){var i=t.data,o=document.createElement("canvas");o.width=t.width,o.height=t.height;for(var u=o.getContext("2d"),f=u.createImageData(t.width,t.height),a=f.data,s=0;s<a.length;s++)a[s]=i[s];u.putImageData(f,0,0),e(n(o.toDataURL(r||"image/png")))})}};t.exports=i},function(t,r,e){"use strict";(function(r){var n=e(6),i=e(7),o=r.ICO,u={isICO:n,noConflict:function(){return r.ICO=o,this},parse:i};t.exports=u}).call(r,e(0))},function(t,r,e){"use strict";var n=e(2),i=e(5),o=function(t){for(var r=t.width,e=t.height,o=new Uint8ClampedArray(r*e*4),u=new Uint8Array(t.xor),f=n.of1(t.and),a=8*i(r*t.bit/8)/t.bit,s=8*i(r/8),h=0;h<e;h++)for(var c=0;c<r;c++){var l=3*(h*a+c);o.set([u[l+2],u[l+1],u[l],f[h*s+c]?0:255],function(t,n){return 4*((e-n-1)*r+t)}(c,h))}return{data:o,height:e,width:r}},u=function(t){for(var r=t.width,e=t.height,o=new Uint8ClampedArray(r*e*4),u=new Uint8Array(t.xor),f=n.of1(t.and),a=8*i(r*t.bit/8)/t.bit,s=8*i(r/8),h=0;h<e;h++)for(var c=0;c<r;c++){var l=4*(h*a+c);o.set([u[l+2],u[l+1],u[l],1===f[h*s+c]||1===u[l+3]?0:u[l+3]>1?u[l+3]:255],function(t,n){return 4*((e-n-1)*r+t)}(c,h))}return{data:o,height:e,width:r}},f=function(t){for(var r=t.width,e=t.height,o=new Uint8ClampedArray(r*e*4),u=n["of"+t.bit](t.xor),f=n.of1(t.and),a=8*i(r*t.bit/8)/t.bit,s=8*i(r/8),h=0;h<e;h++)for(var c=0;c<r;c++){var l=h*a+c,p=t.colors[u[l]];o.set([p[2],p[1],p[0],f[h*s+c]?0:255],function(t,n){return 4*((e-n-1)*r+t)}(c,h))}return{data:o,height:e,width:r}},a=function(t){return 32===t.bit?u(t):24===t.bit?o(t):f(t)};t.exports=a},function(t,r,e){"use strict";var n=function(t){if(!(t instanceof ArrayBuffer))return!1;var r=new DataView(t);return 0===r.getUint16(0,!0)&&2===r.getUint16(2,!0)};t.exports=n},function(t,r,e){"use strict";var n=function(t){if(!(t instanceof ArrayBuffer))return!1;var r=new DataView(t);return 2303741511===r.getUint32(0,!1)&&218765834===r.getUint32(4,!1)};t.exports=n},function(t,r,e){"use strict";var n=e(2),i=e(4),o=e(5),u=e(11),f=function(t,r,e){var f=new DataView(e),a=f.getUint32(0,!0),s=f.getUint16(14,!0),h=f.getUint32(32,!0);0===h&&s<=8&&(h=1<<s);var c=a+4*h,l=c+o(t*s/8)*r,p={and:e.slice(l,l+o(t/8)*r),bit:s,colors:i(h).map(function(t){var r=a+4*t;return n.of8(e.slice(r,r+4))}),height:r,width:t,xor:e.slice(c,l)};return Object.assign(u(p),{bit:s})};t.exports=f},function(t,r,e){"use strict";var n=e(3),i=e(8),o=e(12),u=e(1),f=e(13),a=e(14),s=e(4),h=function(t,r,e){var h=n(t);if(!h)return Promise.reject(new TypeError('"buffer" argument must be a Buffer or ArrayBuffer'));if(!o(h)&&!u(h))return Promise.reject(new Error("buffer is not ico"));var c=new DataView(h),l=c.getUint16(4,!0),p=s(l).map(function(t){var r=6+16*t;return h.slice(r,r+16)}),g=s(l).map(function(t){var r=new DataView(p[t]),e=r.getUint32(8,!0),n=r.getUint32(12,!0);return h.slice(n,n+e)}),y=function(t,r,n){if(f(n)){var o=i(n);return e.decode(n).then(function(t){return Object.assign(t,{bit:o})})}return Promise.resolve(a(t,r,n))},w=s(l).map(function(t){var n=new DataView(p[t]),i=n.getUint8(0)||256,u=n.getUint8(1)||256;return y(i,u,g[t]).then(function(t){return o(h)&&(t.hotspot={x:n.getUint16(4,!0),y:n.getUint16(6,!0)}),e.encode(t,r).then(function(r){var e=Object.assign({buffer:r},t);return delete e.data,e})})});return Promise.all(w)};t.exports=h},function(t,r,e){"use strict";function n(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[r-2]?2:"="===t[r-1]?1:0}function i(t){return 3*t.length/4-n(t)}function o(t){var r,e,i,o,u,f,a=t.length;u=n(t),f=new c(3*a/4-u),i=u>0?a-4:a;var s=0;for(r=0,e=0;r<i;r+=4,e+=3)o=h[t.charCodeAt(r)]<<18|h[t.charCodeAt(r+1)]<<12|h[t.charCodeAt(r+2)]<<6|h[t.charCodeAt(r+3)],f[s++]=o>>16&255,f[s++]=o>>8&255,f[s++]=255&o;return 2===u?(o=h[t.charCodeAt(r)]<<2|h[t.charCodeAt(r+1)]>>4,f[s++]=255&o):1===u&&(o=h[t.charCodeAt(r)]<<10|h[t.charCodeAt(r+1)]<<4|h[t.charCodeAt(r+2)]>>2,f[s++]=o>>8&255,f[s++]=255&o),f}function u(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function f(t,r,e){for(var n,i=[],o=r;o<e;o+=3)n=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(u(n));return i.join("")}function a(t){for(var r,e=t.length,n=e%3,i="",o=[],u=0,a=e-n;u<a;u+=16383)o.push(f(t,u,u+16383>a?a:u+16383));return 1===n?(r=t[e-1],i+=s[r>>2],i+=s[r<<4&63],i+="=="):2===n&&(r=(t[e-2]<<8)+t[e-1],i+=s[r>>10],i+=s[r>>4&63],i+=s[r<<2&63],i+="="),o.push(i),o.join("")}r.byteLength=i,r.toByteArray=o,r.fromByteArray=a;for(var s=[],h=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,g=l.length;p<g;++p)s[p]=l[p],h[l.charCodeAt(p)]=p;h["-".charCodeAt(0)]=62,h["_".charCodeAt(0)]=63},function(t,r,e){"use strict";(function(t){function n(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(t,r){if(n()<r)throw new RangeError("Invalid typed array length");return o.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r),t.__proto__=o.prototype):(null===t&&(t=new o(r)),t.length=r),t}function o(t,r,e){if(!(o.TYPED_ARRAY_SUPPORT||this instanceof o))return new o(t,r,e);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return s(this,t)}return u(this,t,r,e)}function u(t,r,e,n){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?l(t,r,e,n):"string"==typeof r?h(t,r,e):p(t,r)}function f(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 a(t,r,e,n){return f(r),r<=0?i(t,r):void 0!==e?"string"==typeof n?i(t,r).fill(e,n):i(t,r).fill(e):i(t,r)}function s(t,r){if(f(r),t=i(t,r<0?0:0|g(r)),!o.TYPED_ARRAY_SUPPORT)for(var e=0;e<r;++e)t[e]=0;return t}function h(t,r,e){if("string"==typeof e&&""!==e||(e="utf8"),!o.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=0|w(r,e);t=i(t,n);var u=t.write(r,e);return u!==n&&(t=t.slice(0,u)),t}function c(t,r){var e=r.length<0?0:0|g(r.length);t=i(t,e);for(var n=0;n<e;n+=1)t[n]=255&r[n];return t}function l(t,r,e,n){if(r.byteLength,e<0||r.byteLength<e)throw new RangeError("'offset' is out of bounds");if(r.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return r=void 0===e&&void 0===n?new Uint8Array(r):void 0===n?new Uint8Array(r,e):new Uint8Array(r,e,n),o.TYPED_ARRAY_SUPPORT?(t=r,t.__proto__=o.prototype):t=c(t,r),t}function p(t,r){if(o.isBuffer(r)){var e=0|g(r.length);return t=i(t,e),0===t.length?t:(r.copy(t,0,0,e),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||Z(r.length)?i(t,0):c(t,r);if("Buffer"===r.type&&Q(r.data))return c(t,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function g(t){if(t>=n())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n().toString(16)+" bytes");return 0|t}function y(t){return+t!=t&&(t=0),o.alloc(+t)}function w(t,r){if(o.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 e=t.length;if(0===e)return 0;for(var n=!1;;)switch(r){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return X(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return J(t).length;default:if(n)return X(t).length;r=(""+r).toLowerCase(),n=!0}}function d(t,r,e){var n=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===e||e>this.length)&&(e=this.length),e<=0)return"";if(e>>>=0,r>>>=0,e<=r)return"";for(t||(t="utf8");;)switch(t){case"hex":return Y(this,r,e);case"utf8":case"utf-8":return T(this,r,e);case"ascii":return x(this,r,e);case"latin1":case"binary":return I(this,r,e);case"base64":return B(this,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,r,e);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,r,e){var n=t[r];t[r]=t[e],t[e]=n}function b(t,r,e,n,i){if(0===t.length)return-1;if("string"==typeof e?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:t.length-1),e<0&&(e=t.length+e),e>=t.length){if(i)return-1;e=t.length-1}else if(e<0){if(!i)return-1;e=0}if("string"==typeof r&&(r=o.from(r,n)),o.isBuffer(r))return 0===r.length?-1:A(t,r,e,n,i);if("number"==typeof r)return r&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,e):Uint8Array.prototype.lastIndexOf.call(t,r,e):A(t,[r],e,n,i);throw new TypeError("val must be string, number or Buffer")}function A(t,r,e,n,i){function o(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}var u=1,f=t.length,a=r.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||r.length<2)return-1;u=2,f/=2,a/=2,e/=2}var s;if(i){var h=-1;for(s=e;s<f;s++)if(o(t,s)===o(r,h===-1?0:s-h)){if(h===-1&&(h=s),s-h+1===a)return h*u}else h!==-1&&(s-=s-h),h=-1}else for(e+a>f&&(e=f-a),s=e;s>=0;s--){for(var c=!0,l=0;l<a;l++)if(o(t,s+l)!==o(r,l)){c=!1;break}if(c)return s}return-1}function m(t,r,e,n){e=Number(e)||0;var i=t.length-e;n?(n=Number(n))>i&&(n=i):n=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var u=0;u<n;++u){var f=parseInt(r.substr(2*u,2),16);if(isNaN(f))return u;t[e+u]=f}return u}function E(t,r,e,n){return W(X(r,t.length-e),t,e,n)}function R(t,r,e,n){return W(q(r),t,e,n)}function U(t,r,e,n){return R(t,r,e,n)}function _(t,r,e,n){return W(J(r),t,e,n)}function P(t,r,e,n){return W(H(r,t.length-e),t,e,n)}function B(t,r,e){return 0===r&&e===t.length?G.fromByteArray(t):G.fromByteArray(t.slice(r,e))}function T(t,r,e){e=Math.min(t.length,e);for(var n=[],i=r;i<e;){var o=t[i],u=null,f=o>239?4:o>223?3:o>191?2:1;if(i+f<=e){var a,s,h,c;switch(f){case 1:o<128&&(u=o);break;case 2:a=t[i+1],128==(192&a)&&(c=(31&o)<<6|63&a)>127&&(u=c);break;case 3:a=t[i+1],s=t[i+2],128==(192&a)&&128==(192&s)&&(c=(15&o)<<12|(63&a)<<6|63&s)>2047&&(c<55296||c>57343)&&(u=c);break;case 4:a=t[i+1],s=t[i+2],h=t[i+3],128==(192&a)&&128==(192&s)&&128==(192&h)&&(c=(15&o)<<18|(63&a)<<12|(63&s)<<6|63&h)>65535&&c<1114112&&(u=c)}}null===u?(u=65533,f=1):u>65535&&(u-=65536,n.push(u>>>10&1023|55296),u=56320|1023&u),n.push(u),i+=f}return S(n)}function S(t){var r=t.length;if(r<=$)return String.fromCharCode.apply(String,t);for(var e="",n=0;n<r;)e+=String.fromCharCode.apply(String,t.slice(n,n+=$));return e}function x(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(127&t[i]);return n}function I(t,r,e){var n="";e=Math.min(t.length,e);for(var i=r;i<e;++i)n+=String.fromCharCode(t[i]);return n}function Y(t,r,e){var n=t.length;(!r||r<0)&&(r=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=r;o<e;++o)i+=F(t[o]);return i}function C(t,r,e){for(var n=t.slice(r,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function O(t,r,e){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>e)throw new RangeError("Trying to access beyond buffer length")}function D(t,r,e,n,i,u){if(!o.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<u)throw new RangeError('"value" argument is out of bounds');if(e+n>t.length)throw new RangeError("Index out of range")}function L(t,r,e,n){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-e,2);i<o;++i)t[e+i]=(r&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function M(t,r,e,n){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-e,4);i<o;++i)t[e+i]=r>>>8*(n?i:3-i)&255}function j(t,r,e,n,i,o){if(e+n>t.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function N(t,r,e,n,i){return i||j(t,r,e,4,3.4028234663852886e38,-3.4028234663852886e38),K.write(t,r,e,n,23,4),e+4}function k(t,r,e,n,i){return i||j(t,r,e,8,1.7976931348623157e308,-1.7976931348623157e308),K.write(t,r,e,n,52,8),e+8}function V(t){if(t=z(t).replace(tt,""),t.length<2)return"";for(;t.length%4!=0;)t+="=";return t}function z(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function F(t){return t<16?"0"+t.toString(16):t.toString(16)}function X(t,r){r=r||1/0;for(var e,n=t.length,i=null,o=[],u=0;u<n;++u){if((e=t.charCodeAt(u))>55295&&e<57344){if(!i){if(e>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+1===n){(r-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(r-=3)>-1&&o.push(239,191,189),i=e;continue}e=65536+(i-55296<<10|e-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((r-=1)<0)break;o.push(e)}else if(e<2048){if((r-=2)<0)break;o.push(e>>6|192,63&e|128)}else if(e<65536){if((r-=3)<0)break;o.push(e>>12|224,e>>6&63|128,63&e|128)}else{if(!(e<1114112))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,63&e|128)}}return o}function q(t){for(var r=[],e=0;e<t.length;++e)r.push(255&t.charCodeAt(e));return r}function H(t,r){for(var e,n,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)e=t.charCodeAt(u),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function J(t){return G.toByteArray(V(t))}function W(t,r,e,n){for(var i=0;i<n&&!(i+e>=r.length||i>=t.length);++i)r[i+e]=t[i];return i}function Z(t){return t!==t}/*! | ||
* The buffer module from node.js, for the browser. | ||
@@ -12,3 +12,3 @@ * | ||
*/ | ||
var K=e(16),Q=e(17),$=e(18);r.Buffer=u,r.SlowBuffer=w,r.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:n(),r.kMaxLength=i(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,r,e){return f(null,t,r,e)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,r,e){return s(null,t,r,e)},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,r){if(!u.isBuffer(t)||!u.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,o=Math.min(e,n);i<o;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},u.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}},u.concat=function(t,r){if(!$(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=u.allocUnsafe(r),i=0;for(e=0;e<t.length;++e){var o=t[e];if(!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},u.byteLength=d,u.prototype._isBuffer=!0,u.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 r=0;r<t;r+=2)b(this,r,r+1);return this},u.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 r=0;r<t;r+=4)b(this,r,r+3),b(this,r+1,r+2);return this},u.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 r=0;r<t;r+=8)b(this,r,r+7),b(this,r+1,r+6),b(this,r+2,r+5),b(this,r+3,r+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?S(this,0,t):v.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,r,e,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(r>>>=0,e>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var o=i-n,f=e-r,a=Math.min(o,f),s=this.slice(n,i),h=t.slice(r,e),c=0;c<a;++c)if(s[c]!==h[c]){o=s[c],f=h[c];break}return o<f?-1:f<o?1:0},u.prototype.includes=function(t,r,e){return this.indexOf(t,r,e)!==-1},u.prototype.indexOf=function(t,r,e){return A(this,t,r,e,!0)},u.prototype.lastIndexOf=function(t,r,e){return A(this,t,r,e,!1)},u.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return E(this,t,r,e);case"utf8":case"utf-8":return R(this,t,r,e);case"ascii":return U(this,t,r,e);case"latin1":case"binary":return _(this,t,r,e);case"base64":return P(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;u.prototype.slice=function(t,r){var e=this.length;t=~~t,r=void 0===r?e:~~r,t<0?(t+=e)<0&&(t=0):t>e&&(t=e),r<0?(r+=e)<0&&(r=0):r>e&&(r=e),r<t&&(r=t);var n;if(u.TYPED_ARRAY_SUPPORT)n=this.subarray(t,r),n.__proto__=u.prototype;else{var i=r-t;n=new u(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},u.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||D(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||D(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},u.prototype.readUInt8=function(t,r){return r||D(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,r){return r||D(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,r){return r||D(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,r){return r||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,r){return r||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||D(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*r)),n},u.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||D(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o},u.prototype.readInt8=function(t,r){return r||D(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},u.prototype.readInt16LE=function(t,r){r||D(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},u.prototype.readInt16BE=function(t,r){r||D(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},u.prototype.readInt32LE=function(t,r){return r||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,r){return r||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,r){return r||D(t,4,this.length),Q.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,r){return r||D(t,4,this.length),Q.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,r){return r||D(t,8,this.length),Q.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,r){return r||D(t,8,this.length),Q.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,r,e,n){if(t=+t,r|=0,e|=0,!n){L(this,t,r,e,Math.pow(2,8*e)-1,0)}var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},u.prototype.writeUIntBE=function(t,r,e,n){if(t=+t,r|=0,e|=0,!n){L(this,t,r,e,Math.pow(2,8*e)-1,0)}var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},u.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||L(this,t,r,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},u.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||L(this,t,r,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):M(this,t,r,!0),r+2},u.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||L(this,t,r,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):M(this,t,r,!1),r+2},u.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||L(this,t,r,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):j(this,t,r,!0),r+4},u.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||L(this,t,r,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):j(this,t,r,!1),r+4},u.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);L(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o<e&&(u*=256);)t<0&&0===f&&0!==this[r+o-1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},u.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);L(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},u.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||L(this,t,r,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},u.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||L(this,t,r,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):M(this,t,r,!0),r+2},u.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||L(this,t,r,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):M(this,t,r,!1),r+2},u.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||L(this,t,r,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):j(this,t,r,!0),r+4},u.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||L(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):j(this,t,r,!1),r+4},u.prototype.writeFloatLE=function(t,r,e){return k(this,t,r,!0,e)},u.prototype.writeFloatBE=function(t,r,e){return k(this,t,r,!1,e)},u.prototype.writeDoubleLE=function(t,r,e){return V(this,t,r,!0,e)},u.prototype.writeDoubleBE=function(t,r,e){return V(this,t,r,!1,e)},u.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=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-r<n-e&&(n=t.length-r+e);var i,o=n-e;if(this===t&&e<r&&r<n)for(i=o-1;i>=0;--i)t[i+r]=this[i+e];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+o),r);return o},u.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=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&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0);var o;if("number"==typeof t)for(o=r;o<e;++o)this[o]=t;else{var f=u.isBuffer(t)?t:q(new u(t,n).toString()),a=f.length;for(o=0;o<e-r;++o)this[o+r]=f[o%a]}return this};var rt=/[^+\/0-9A-Za-z-_]/g}).call(r,e(0))},function(t,r,e){"use strict";function n(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[r-2]?2:"="===t[r-1]?1:0}function i(t){return 3*t.length/4-n(t)}function o(t){var r,e,i,o,u,f,a=t.length;u=n(t),f=new c(3*a/4-u),i=u>0?a-4:a;var s=0;for(r=0,e=0;r<i;r+=4,e+=3)o=h[t.charCodeAt(r)]<<18|h[t.charCodeAt(r+1)]<<12|h[t.charCodeAt(r+2)]<<6|h[t.charCodeAt(r+3)],f[s++]=o>>16&255,f[s++]=o>>8&255,f[s++]=255&o;return 2===u?(o=h[t.charCodeAt(r)]<<2|h[t.charCodeAt(r+1)]>>4,f[s++]=255&o):1===u&&(o=h[t.charCodeAt(r)]<<10|h[t.charCodeAt(r+1)]<<4|h[t.charCodeAt(r+2)]>>2,f[s++]=o>>8&255,f[s++]=255&o),f}function u(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function f(t,r,e){for(var n,i=[],o=r;o<e;o+=3)n=(t[o]<<16)+(t[o+1]<<8)+t[o+2],i.push(u(n));return i.join("")}function a(t){for(var r,e=t.length,n=e%3,i="",o=[],u=16383,a=0,h=e-n;a<h;a+=u)o.push(f(t,a,a+u>h?h:a+u));return 1===n?(r=t[e-1],i+=s[r>>2],i+=s[r<<4&63],i+="=="):2===n&&(r=(t[e-2]<<8)+t[e-1],i+=s[r>>10],i+=s[r>>4&63],i+=s[r<<2&63],i+="="),o.push(i),o.join("")}r.byteLength=i,r.toByteArray=o,r.fromByteArray=a;for(var s=[],h=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p=0,g=l.length;p<g;++p)s[p]=l[p],h[l.charCodeAt(p)]=p;h["-".charCodeAt(0)]=62,h["_".charCodeAt(0)]=63},function(t,r){r.read=function(t,r,e,n,i){var o,u,f=8*i-n-1,a=(1<<f)-1,s=a>>1,h=-7,c=e?i-1:0,l=e?-1:1,p=t[r+c];for(c+=l,o=p&(1<<-h)-1,p>>=-h,h+=f;h>0;o=256*o+t[r+c],c+=l,h-=8);for(u=o&(1<<-h)-1,o>>=-h,h+=n;h>0;u=256*u+t[r+c],c+=l,h-=8);if(0===o)o=1-s;else{if(o===a)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),o-=s}return(p?-1:1)*u*Math.pow(2,o-n)},r.write=function(t,r,e,n,i,o){var u,f,a,s=8*o-i-1,h=(1<<s)-1,c=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,g=n?1:-1,y=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(f=isNaN(r)?1:0,u=h):(u=Math.floor(Math.log(r)/Math.LN2),r*(a=Math.pow(2,-u))<1&&(u--,a*=2),r+=u+c>=1?l/a:l*Math.pow(2,1-c),r*a>=2&&(u++,a/=2),u+c>=h?(f=0,u=h):u+c>=1?(f=(r*a-1)*Math.pow(2,i),u+=c):(f=r*Math.pow(2,c-1)*Math.pow(2,i),u=0));i>=8;t[e+p]=255&f,p+=g,f/=256,i-=8);for(u=u<<i|f,s+=i;s>0;t[e+p]=255&u,p+=g,u/=256,s-=8);t[e+p-g]|=128*y}},function(t,r){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},function(t,r,e){"use strict";(function(r){var n=e(6),i=e(7),o=r.ICO,u={isICO:n,noConflict:function(){return r.ICO=o,this},parse:i};t.exports=u}).call(r,e(0))}])}); | ||
var G=e(16),K=e(18),Q=e(19);r.Buffer=o,r.SlowBuffer=y,r.INSPECT_MAX_BYTES=50,o.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}}(),r.kMaxLength=n(),o.poolSize=8192,o._augment=function(t){return t.__proto__=o.prototype,t},o.from=function(t,r,e){return u(null,t,r,e)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(t,r,e){return a(null,t,r,e)},o.allocUnsafe=function(t){return s(null,t)},o.allocUnsafeSlow=function(t){return s(null,t)},o.isBuffer=function(t){return!(null==t||!t._isBuffer)},o.compare=function(t,r){if(!o.isBuffer(t)||!o.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var e=t.length,n=r.length,i=0,u=Math.min(e,n);i<u;++i)if(t[i]!==r[i]){e=t[i],n=r[i];break}return e<n?-1:n<e?1:0},o.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}},o.concat=function(t,r){if(!Q(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return o.alloc(0);var e;if(void 0===r)for(r=0,e=0;e<t.length;++e)r+=t[e].length;var n=o.allocUnsafe(r),i=0;for(e=0;e<t.length;++e){var u=t[e];if(!o.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(n,i),i+=u.length}return n},o.byteLength=w,o.prototype._isBuffer=!0,o.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 r=0;r<t;r+=2)v(this,r,r+1);return this},o.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 r=0;r<t;r+=4)v(this,r,r+3),v(this,r+1,r+2);return this},o.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 r=0;r<t;r+=8)v(this,r,r+7),v(this,r+1,r+6),v(this,r+2,r+5),v(this,r+3,r+4);return this},o.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?T(this,0,t):d.apply(this,arguments)},o.prototype.equals=function(t){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===o.compare(this,t)},o.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},o.prototype.compare=function(t,r,e,n,i){if(!o.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===e&&(e=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),r<0||e>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&r>=e)return 0;if(n>=i)return-1;if(r>=e)return 1;if(r>>>=0,e>>>=0,n>>>=0,i>>>=0,this===t)return 0;for(var u=i-n,f=e-r,a=Math.min(u,f),s=this.slice(n,i),h=t.slice(r,e),c=0;c<a;++c)if(s[c]!==h[c]){u=s[c],f=h[c];break}return u<f?-1:f<u?1:0},o.prototype.includes=function(t,r,e){return this.indexOf(t,r,e)!==-1},o.prototype.indexOf=function(t,r,e){return b(this,t,r,e,!0)},o.prototype.lastIndexOf=function(t,r,e){return b(this,t,r,e,!1)},o.prototype.write=function(t,r,e,n){if(void 0===r)n="utf8",e=this.length,r=0;else if(void 0===e&&"string"==typeof r)n=r,e=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(e)?(e|=0,void 0===n&&(n="utf8")):(n=e,e=void 0)}var i=this.length-r;if((void 0===e||e>i)&&(e=i),t.length>0&&(e<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return m(this,t,r,e);case"utf8":case"utf-8":return E(this,t,r,e);case"ascii":return R(this,t,r,e);case"latin1":case"binary":return U(this,t,r,e);case"base64":return _(this,t,r,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,r,e);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var $=4096;o.prototype.slice=function(t,r){var e=this.length;t=~~t,r=void 0===r?e:~~r,t<0?(t+=e)<0&&(t=0):t>e&&(t=e),r<0?(r+=e)<0&&(r=0):r>e&&(r=e),r<t&&(r=t);var n;if(o.TYPED_ARRAY_SUPPORT)n=this.subarray(t,r),n.__proto__=o.prototype;else{var i=r-t;n=new o(i,void 0);for(var u=0;u<i;++u)n[u]=this[u+t]}return n},o.prototype.readUIntLE=function(t,r,e){t|=0,r|=0,e||O(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return n},o.prototype.readUIntBE=function(t,r,e){t|=0,r|=0,e||O(t,r,this.length);for(var n=this[t+--r],i=1;r>0&&(i*=256);)n+=this[t+--r]*i;return n},o.prototype.readUInt8=function(t,r){return r||O(t,1,this.length),this[t]},o.prototype.readUInt16LE=function(t,r){return r||O(t,2,this.length),this[t]|this[t+1]<<8},o.prototype.readUInt16BE=function(t,r){return r||O(t,2,this.length),this[t]<<8|this[t+1]},o.prototype.readUInt32LE=function(t,r){return r||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},o.prototype.readUInt32BE=function(t,r){return r||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},o.prototype.readIntLE=function(t,r,e){t|=0,r|=0,e||O(t,r,this.length);for(var n=this[t],i=1,o=0;++o<r&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*r)),n},o.prototype.readIntBE=function(t,r,e){t|=0,r|=0,e||O(t,r,this.length);for(var n=r,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o},o.prototype.readInt8=function(t,r){return r||O(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},o.prototype.readInt16LE=function(t,r){r||O(t,2,this.length);var e=this[t]|this[t+1]<<8;return 32768&e?4294901760|e:e},o.prototype.readInt16BE=function(t,r){r||O(t,2,this.length);var e=this[t+1]|this[t]<<8;return 32768&e?4294901760|e:e},o.prototype.readInt32LE=function(t,r){return r||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},o.prototype.readInt32BE=function(t,r){return r||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},o.prototype.readFloatLE=function(t,r){return r||O(t,4,this.length),K.read(this,t,!0,23,4)},o.prototype.readFloatBE=function(t,r){return r||O(t,4,this.length),K.read(this,t,!1,23,4)},o.prototype.readDoubleLE=function(t,r){return r||O(t,8,this.length),K.read(this,t,!0,52,8)},o.prototype.readDoubleBE=function(t,r){return r||O(t,8,this.length),K.read(this,t,!1,52,8)},o.prototype.writeUIntLE=function(t,r,e,n){if(t=+t,r|=0,e|=0,!n){D(this,t,r,e,Math.pow(2,8*e)-1,0)}var i=1,o=0;for(this[r]=255&t;++o<e&&(i*=256);)this[r+o]=t/i&255;return r+e},o.prototype.writeUIntBE=function(t,r,e,n){if(t=+t,r|=0,e|=0,!n){D(this,t,r,e,Math.pow(2,8*e)-1,0)}var i=e-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+e},o.prototype.writeUInt8=function(t,r,e){return t=+t,r|=0,e||D(this,t,r,1,255,0),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},o.prototype.writeUInt16LE=function(t,r,e){return t=+t,r|=0,e||D(this,t,r,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):L(this,t,r,!0),r+2},o.prototype.writeUInt16BE=function(t,r,e){return t=+t,r|=0,e||D(this,t,r,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):L(this,t,r,!1),r+2},o.prototype.writeUInt32LE=function(t,r,e){return t=+t,r|=0,e||D(this,t,r,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):M(this,t,r,!0),r+4},o.prototype.writeUInt32BE=function(t,r,e){return t=+t,r|=0,e||D(this,t,r,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):M(this,t,r,!1),r+4},o.prototype.writeIntLE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);D(this,t,r,e,i-1,-i)}var o=0,u=1,f=0;for(this[r]=255&t;++o<e&&(u*=256);)t<0&&0===f&&0!==this[r+o-1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},o.prototype.writeIntBE=function(t,r,e,n){if(t=+t,r|=0,!n){var i=Math.pow(2,8*e-1);D(this,t,r,e,i-1,-i)}var o=e-1,u=1,f=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===f&&0!==this[r+o+1]&&(f=1),this[r+o]=(t/u>>0)-f&255;return r+e},o.prototype.writeInt8=function(t,r,e){return t=+t,r|=0,e||D(this,t,r,1,127,-128),o.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},o.prototype.writeInt16LE=function(t,r,e){return t=+t,r|=0,e||D(this,t,r,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):L(this,t,r,!0),r+2},o.prototype.writeInt16BE=function(t,r,e){return t=+t,r|=0,e||D(this,t,r,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):L(this,t,r,!1),r+2},o.prototype.writeInt32LE=function(t,r,e){return t=+t,r|=0,e||D(this,t,r,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):M(this,t,r,!0),r+4},o.prototype.writeInt32BE=function(t,r,e){return t=+t,r|=0,e||D(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),o.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):M(this,t,r,!1),r+4},o.prototype.writeFloatLE=function(t,r,e){return N(this,t,r,!0,e)},o.prototype.writeFloatBE=function(t,r,e){return N(this,t,r,!1,e)},o.prototype.writeDoubleLE=function(t,r,e){return k(this,t,r,!0,e)},o.prototype.writeDoubleBE=function(t,r,e){return k(this,t,r,!1,e)},o.prototype.copy=function(t,r,e,n){if(e||(e=0),n||0===n||(n=this.length),r>=t.length&&(r=t.length),r||(r=0),n>0&&n<e&&(n=e),n===e)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(e<0||e>=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-r<n-e&&(n=t.length-r+e);var i,u=n-e;if(this===t&&e<r&&r<n)for(i=u-1;i>=0;--i)t[i+r]=this[i+e];else if(u<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i<u;++i)t[i+r]=this[i+e];else Uint8Array.prototype.set.call(t,this.subarray(e,e+u),r);return u},o.prototype.fill=function(t,r,e,n){if("string"==typeof t){if("string"==typeof r?(n=r,r=0,e=this.length):"string"==typeof e&&(n=e,e=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&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<e)throw new RangeError("Out of range index");if(e<=r)return this;r>>>=0,e=void 0===e?this.length:e>>>0,t||(t=0);var u;if("number"==typeof t)for(u=r;u<e;++u)this[u]=t;else{var f=o.isBuffer(t)?t:X(new o(t,n).toString()),a=f.length;for(u=0;u<e-r;++u)this[u+r]=f[u%a]}return this};var tt=/[^+\/0-9A-Za-z-_]/g}).call(r,e(0))},function(t,r){r.read=function(t,r,e,n,i){var o,u,f=8*i-n-1,a=(1<<f)-1,s=a>>1,h=-7,c=e?i-1:0,l=e?-1:1,p=t[r+c];for(c+=l,o=p&(1<<-h)-1,p>>=-h,h+=f;h>0;o=256*o+t[r+c],c+=l,h-=8);for(u=o&(1<<-h)-1,o>>=-h,h+=n;h>0;u=256*u+t[r+c],c+=l,h-=8);if(0===o)o=1-s;else{if(o===a)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,n),o-=s}return(p?-1:1)*u*Math.pow(2,o-n)},r.write=function(t,r,e,n,i,o){var u,f,a,s=8*o-i-1,h=(1<<s)-1,c=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,g=n?1:-1,y=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(f=isNaN(r)?1:0,u=h):(u=Math.floor(Math.log(r)/Math.LN2),r*(a=Math.pow(2,-u))<1&&(u--,a*=2),r+=u+c>=1?l/a:l*Math.pow(2,1-c),r*a>=2&&(u++,a/=2),u+c>=h?(f=0,u=h):u+c>=1?(f=(r*a-1)*Math.pow(2,i),u+=c):(f=r*Math.pow(2,c-1)*Math.pow(2,i),u=0));i>=8;t[e+p]=255&f,p+=g,f/=256,i-=8);for(u=u<<i|f,s+=i;s>0;t[e+p]=255&u,p+=g,u/=256,s-=8);t[e+p-g]|=128*y}},function(t,r){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}}])}); | ||
//# sourceMappingURL=ico.js.map |
{ | ||
"name": "icojs", | ||
"description": "parse ico file", | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"author": "egy186", | ||
@@ -20,3 +20,3 @@ "bugs": { | ||
"chai-as-promised": "^6.0.0", | ||
"eslint": "~3.17.0", | ||
"eslint": "~3.18.0", | ||
"istanbul": "^0.4.4", | ||
@@ -23,0 +23,0 @@ "jsdoc-to-markdown": "^3.0.0", |
@@ -15,3 +15,4 @@ 'use strict'; | ||
decode (arrayBuffer) { | ||
return Jimp.read(Buffer.from(arrayBuffer)).then(image => ({ | ||
const buffer = Buffer.from !== Uint8Array.from ? Buffer.from(arrayBuffer) : new Buffer(arrayBuffer); | ||
return Jimp.read(buffer).then(image => ({ | ||
width: image.bitmap.width, | ||
@@ -18,0 +19,0 @@ height: image.bitmap.height, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
673
247542