what-the-pack
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -578,3 +578,4 @@ | ||
MessagePack.log = console.log; | ||
MessagePack.Buffer = Buffer; | ||
module.exports = MessagePack; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.MessagePack=t()}(this,function(){"use strict";const e=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],t=(e,t)=>{let r=e;return"string"==typeof t?r=e.toLocaleString(t):!0===t&&(r=e.toLocaleString()),r};var r=(r,f)=>{if(!Number.isFinite(r))throw new TypeError(`Expected a finite number, got ${typeof r}: ${r}`);if((f=Object.assign({},f)).signed&&0===r)return" 0 B";const o=r<0,n=o?"-":f.signed?"+":"";if(o&&(r=-r),r<1){return n+t(r,f.locale)+" B"}const i=Math.min(Math.floor(Math.log10(r)/3),e.length-1);return r=Number((r/Math.pow(1e3,i)).toPrecision(3)),n+t(r,f.locale)+" "+e[i]};for(var f=function(e){var t=l(e),r=t[0],f=t[1];return 3*(r+f)/4-f},o=function(e){for(var t,r=l(e),f=r[0],o=r[1],n=new u(function(e,t,r){return 3*(t+r)/4-r}(0,f,o)),i=0,a=o>0?f-4:f,h=0;h<a;h+=4)t=s[e.charCodeAt(h)]<<18|s[e.charCodeAt(h+1)]<<12|s[e.charCodeAt(h+2)]<<6|s[e.charCodeAt(h+3)],n[i++]=t>>16&255,n[i++]=t>>8&255,n[i++]=255&t;2===o&&(t=s[e.charCodeAt(h)]<<2|s[e.charCodeAt(h+1)]>>4,n[i++]=255&t);1===o&&(t=s[e.charCodeAt(h)]<<10|s[e.charCodeAt(h+1)]<<4|s[e.charCodeAt(h+2)]>>2,n[i++]=t>>8&255,n[i++]=255&t);return n},n=function(e){for(var t,r=e.length,f=r%3,o=[],n=0,s=r-f;n<s;n+=16383)o.push(p(e,n,n+16383>s?s:n+16383));1===f?(t=e[r-1],o.push(i[t>>2]+i[t<<4&63]+"==")):2===f&&(t=(e[r-2]<<8)+e[r-1],o.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return o.join("")},i=[],s=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,c=a.length;h<c;++h)i[h]=a[h],s[a.charCodeAt(h)]=h;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function p(e,t,r){for(var f,o,n=[],s=t;s<r;s+=3)f=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),n.push(i[(o=f)>>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return n.join("")}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63;var b,y={byteLength:f,toByteArray:o,fromByteArray:n},g={read:function(e,t,r,f,o){var n,i,s=8*o-f-1,u=(1<<s)-1,a=u>>1,h=-7,c=r?o-1:0,l=r?-1:1,p=e[t+c];for(c+=l,n=p&(1<<-h)-1,p>>=-h,h+=s;h>0;n=256*n+e[t+c],c+=l,h-=8);for(i=n&(1<<-h)-1,n>>=-h,h+=f;h>0;i=256*i+e[t+c],c+=l,h-=8);if(0===n)n=1-a;else{if(n===u)return i?NaN:1/0*(p?-1:1);i+=Math.pow(2,f),n-=a}return(p?-1:1)*i*Math.pow(2,n-f)},write:function(e,t,r,f,o,n){var i,s,u,a=8*n-o-1,h=(1<<a)-1,c=h>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=f?0:n-1,b=f?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,i=h):(i=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-i))<1&&(i--,u*=2),(t+=i+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(i++,u/=2),i+c>=h?(s=0,i=h):i+c>=1?(s=(t*u-1)*Math.pow(2,o),i+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,o),i=0));o>=8;e[r+p]=255&s,p+=b,s/=256,o-=8);for(i=i<<o|s,a+=o;a>0;e[r+p]=255&i,p+=b,i/=256,a-=8);e[r+p-b]|=128*y}},d=(function(e,t){t.Buffer=o,t.SlowBuffer=function(e){+e!=e&&(e=0);return o.alloc(+e)},t.INSPECT_MAX_BYTES=50;var r=2147483647;function f(e){if(e>r)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=o.prototype,t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return s(e)}return n(e,t,r)}function n(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|h(e,t),n=f(r),i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return u(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var f;f=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r);return f.__proto__=o.prototype,f}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);var i=function(e){if(o.isBuffer(e)){var t=0|a(e.length),r=f(t);return 0===r.length?r:(e.copy(r,0,0,t),r)}if(void 0!==e.length)return"number"!=typeof e.length||z(e.length)?f(0):u(e);if("Buffer"===e.type&&Array.isArray(e.data))return u(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function i(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function s(e){return i(e),f(e<0?0:0|a(e))}function u(e){for(var t=e.length<0?0:0|a(e.length),r=f(t),o=0;o<t;o+=1)r[o]=255&e[o];return r}function a(e){if(e>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function h(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,f=arguments.length>2&&!0===arguments[2];if(!f&&0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return P(e).length;default:if(n)return f?-1:N(e).length;t=(""+t).toLowerCase(),n=!0}}function c(e,t,r){var f=e[t];e[t]=e[r],e[r]=f}function l(e,t,r,f,n){if(0===e.length)return-1;if("string"==typeof r?(f=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),z(r=+r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=o.from(t,f)),o.isBuffer(t))return 0===t.length?-1:p(e,t,r,f,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):p(e,[t],r,f,n);throw new TypeError("val must be string, number or Buffer")}function p(e,t,r,f,o){var n,i=1,s=e.length,u=t.length;if(void 0!==f&&("ucs2"===(f=String(f).toLowerCase())||"ucs-2"===f||"utf16le"===f||"utf-16le"===f)){if(e.length<2||t.length<2)return-1;i=2,s/=2,u/=2,r/=2}function a(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var h=-1;for(n=r;n<s;n++)if(a(e,n)===a(t,-1===h?0:n-h)){if(-1===h&&(h=n),n-h+1===u)return h*i}else-1!==h&&(n-=n-h),h=-1}else for(r+u>s&&(r=s-u),n=r;n>=0;n--){for(var c=!0,l=0;l<u;l++)if(a(e,n+l)!==a(t,l)){c=!1;break}if(c)return n}return-1}function b(e,t,r,f){r=Number(r)||0;var o=e.length-r;f?(f=Number(f))>o&&(f=o):f=o;var n=t.length;f>n/2&&(f=n/2);for(var i=0;i<f;++i){var s=parseInt(t.substr(2*i,2),16);if(z(s))return i;e[r+i]=s}return i}function d(e,t,r,f){return j(N(t,e.length-r),e,r,f)}function w(e,t,r,f){return j(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,f)}function v(e,t,r,f){return w(e,t,r,f)}function E(e,t,r,f){return j(P(t),e,r,f)}function m(e,t,r,f){return j(function(e,t){for(var r,f,o,n=[],i=0;i<e.length&&!((t-=2)<0);++i)r=e.charCodeAt(i),f=r>>8,o=r%256,n.push(o),n.push(f);return n}(t,e.length-r),e,r,f)}function B(e,t,r){return 0===t&&r===e.length?y.fromByteArray(e):y.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var f=[],o=t;o<r;){var n,i,s,u,a=e[o],h=null,c=a>239?4:a>223?3:a>191?2:1;if(o+c<=r)switch(c){case 1:a<128&&(h=a);break;case 2:128==(192&(n=e[o+1]))&&(u=(31&a)<<6|63&n)>127&&(h=u);break;case 3:n=e[o+1],i=e[o+2],128==(192&n)&&128==(192&i)&&(u=(15&a)<<12|(63&n)<<6|63&i)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:n=e[o+1],i=e[o+2],s=e[o+3],128==(192&n)&&128==(192&i)&&128==(192&s)&&(u=(15&a)<<18|(63&n)<<12|(63&i)<<6|63&s)>65535&&u<1114112&&(h=u)}null===h?(h=65533,c=1):h>65535&&(h-=65536,f.push(h>>>10&1023|55296),h=56320|1023&h),f.push(h),o+=c}return function(e){var t=e.length;if(t<=U)return String.fromCharCode.apply(String,e);var r="",f=0;for(;f<t;)r+=String.fromCharCode.apply(String,e.slice(f,f+=U));return r}(f)}t.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),o.poolSize=8192,o.from=function(e,t,r){return n(e,t,r)},o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,o.alloc=function(e,t,r){return function(e,t,r){return i(e),e<=0?f(e):void 0!==t?"string"==typeof r?f(e).fill(t,r):f(e).fill(t):f(e)}(e,t,r)},o.allocUnsafe=function(e){return s(e)},o.allocUnsafeSlow=function(e){return s(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(F(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,f=t.length,n=0,i=Math.min(r,f);n<i;++n)if(e[n]!==t[n]){r=e[n],f=t[n];break}return r<f?-1:f<r?1:0},o.isEncoding=function(e){switch(String(e).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(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var f=o.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){var i=e[r];if(F(i,Uint8Array)&&(i=o.from(i)),!o.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(f,n),n+=i.length}return f},o.byteLength=h,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)c(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)c(this,t,t+3),c(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)c(this,t,t+7),c(this,t+1,t+6),c(this,t+2,t+5),c(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?A(this,0,e):function(e,t,r){var f=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return S(this,t,r);case"base64":return B(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(f)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),f=!0}}.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o.prototype.compare=function(e,t,r,f,n){if(F(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===f&&(f=0),void 0===n&&(n=this.length),t<0||r>e.length||f<0||n>this.length)throw new RangeError("out of range index");if(f>=n&&t>=r)return 0;if(f>=n)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(n>>>=0)-(f>>>=0),s=(r>>>=0)-(t>>>=0),u=Math.min(i,s),a=this.slice(f,n),h=e.slice(t,r),c=0;c<u;++c)if(a[c]!==h[c]){i=a[c],s=h[c];break}return i<s?-1:s<i?1:0},o.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return l(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return l(this,e,t,r,!1)},o.prototype.write=function(e,t,r,f){if(void 0===t)f="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)f=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===f&&(f="utf8")):(f=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");f||(f="utf8");for(var n=!1;;)switch(f){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return d(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return v(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,e,t,r);default:if(n)throw new TypeError("Unknown encoding: "+f);f=(""+f).toLowerCase(),n=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var U=4096;function I(e,t,r){var f="";r=Math.min(e.length,r);for(var o=t;o<r;++o)f+=String.fromCharCode(127&e[o]);return f}function S(e,t,r){var f="";r=Math.min(e.length,r);for(var o=t;o<r;++o)f+=String.fromCharCode(e[o]);return f}function k(e,t,r){var f=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>f)&&(r=f);for(var o="",n=t;n<r;++n)o+=O(e[n]);return o}function M(e,t,r){for(var f=e.slice(t,r),o="",n=0;n<f.length;n+=2)o+=String.fromCharCode(f[n]+256*f[n+1]);return o}function T(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function _(e,t,r,f,n,i){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<i)throw new RangeError('"value" argument is out of bounds');if(r+f>e.length)throw new RangeError("Index out of range")}function L(e,t,r,f,o,n){if(r+f>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,f,o){return t=+t,r>>>=0,o||L(e,0,r,4),g.write(e,t,r,f,23,4),r+4}function x(e,t,r,f,o){return t=+t,r>>>=0,o||L(e,0,r,8),g.write(e,t,r,f,52,8),r+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var f=this.subarray(e,t);return f.__proto__=o.prototype,f},o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var f=this[e],o=1,n=0;++n<t&&(o*=256);)f+=this[e+n]*o;return f},o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var f=this[e+--t],o=1;t>0&&(o*=256);)f+=this[e+--t]*o;return f},o.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var f=this[e],o=1,n=0;++n<t&&(o*=256);)f+=this[e+n]*o;return f>=(o*=128)&&(f-=Math.pow(2,8*t)),f},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var f=t,o=1,n=this[e+--f];f>0&&(o*=256);)n+=this[e+--f]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||T(e,4,this.length),g.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),g.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),g.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),g.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,f){(e=+e,t>>>=0,r>>>=0,f)||_(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,n=0;for(this[t]=255&e;++n<r&&(o*=256);)this[t+n]=e/o&255;return t+r},o.prototype.writeUIntBE=function(e,t,r,f){(e=+e,t>>>=0,r>>>=0,f)||_(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,n=1;for(this[t+o]=255&e;--o>=0&&(n*=256);)this[t+o]=e/n&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,f){if(e=+e,t>>>=0,!f){var o=Math.pow(2,8*r-1);_(this,e,t,r,o-1,-o)}var n=0,i=1,s=0;for(this[t]=255&e;++n<r&&(i*=256);)e<0&&0===s&&0!==this[t+n-1]&&(s=1),this[t+n]=(e/i>>0)-s&255;return t+r},o.prototype.writeIntBE=function(e,t,r,f){if(e=+e,t>>>=0,!f){var o=Math.pow(2,8*r-1);_(this,e,t,r,o-1,-o)}var n=r-1,i=1,s=0;for(this[t+n]=255&e;--n>=0&&(i*=256);)e<0&&0===s&&0!==this[t+n+1]&&(s=1),this[t+n]=(e/i>>0)-s&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return x(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return x(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,f){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),f||0===f||(f=this.length),t>=e.length&&(t=e.length),t||(t=0),f>0&&f<r&&(f=r),f===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("sourceEnd out of bounds");f>this.length&&(f=this.length),e.length-t<f-r&&(f=e.length-t+r);var n=f-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,f);else if(this===e&&r<t&&t<f)for(var i=n-1;i>=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,f),t);return n},o.prototype.fill=function(e,t,r,f){if("string"==typeof e){if("string"==typeof t?(f=t,t=0,r=this.length):"string"==typeof r&&(f=r,r=this.length),void 0!==f&&"string"!=typeof f)throw new TypeError("encoding must be a string");if("string"==typeof f&&!o.isEncoding(f))throw new TypeError("Unknown encoding: "+f);if(1===e.length){var n=e.charCodeAt(0);("utf8"===f&&n<128||"latin1"===f)&&(e=n)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=o.isBuffer(e)?e:o.from(e,f),u=s.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%u]}return this};var R=/[^+\/0-9A-Za-z-_]/g;function O(e){return e<16?"0"+e.toString(16):e.toString(16)}function N(e,t){var r;t=t||1/0;for(var f=e.length,o=null,n=[],i=0;i<f;++i){if((r=e.charCodeAt(i))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&n.push(239,191,189);continue}if(i+1===f){(t-=3)>-1&&n.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&n.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&n.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;n.push(r)}else if(r<2048){if((t-=2)<0)break;n.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;n.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;n.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return n}function P(e){return y.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,t,r,f){for(var o=0;o<f&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function z(e){return e!=e}}(b={exports:{}},b.exports),b.exports);d.Buffer,d.SlowBuffer,d.INSPECT_MAX_BYTES,d.kMaxLength;const w=d.Buffer;class v{constructor(e){this.buffer=w.allocUnsafe(e||w.poolSize).fill(0),this.offset=-1}copy(){const e=w.allocUnsafe(this.offset+1).fill(0);return this.buffer.copy(e,0,0,this.offset+1),e}}let E=new v;const m=new class{constructor(e){this.buffer=e,this.offset=0}},B={};let A=!1,U=-33;class I{static register(...e){A=!0,e.forEach(e=>{B[U+=1]=e,B[e]=U})}static get dictionary(){return B}static reallocate(e){I.log("MessagePack: Setting buffer limit to",r(e||w.poolSize)),E=new v(e)}static get allocator(){return E}static get iterator(){return m}static encode(e,t){!0!==t&&(E.offset=-1);let r=0;switch(typeof e){case"string":if((r=w.byteLength(e))<32){r=0;for(let t=0,f=0,o=e.length;t<o;t+=1)(f=e.charCodeAt(t))<128?r+=1:f<1280?r+=2:f<55296||f>=57344?r+=3:(t+=1,r+=4);E.buffer[E.offset+=1]=160|r;for(let t=0,r=0,f=e.length;t<f;t+=1)(r=e.charCodeAt(t))<128?E.buffer[E.offset+=1]=r:r<1280?(E.buffer[E.offset+=1]=192|r>>6,E.buffer[E.offset+=1]=128|63&r):r<55296||r>=57344?(E.buffer[E.offset+=1]=224|r>>12,E.buffer[E.offset+=1]=128|r>>6&63,E.buffer[E.offset+=1]=128|63&r):(t+=1,r=65536+((1023&r)<<10|1023&e.charCodeAt(t)),E.buffer[E.offset+=1]=240|r>>18,E.buffer[E.offset+=1]=128|r>>12&63,E.buffer[E.offset+=1]=128|r>>6&63,E.buffer[E.offset+=1]=128|63&r)}else if(r<256)E.buffer[E.offset+=1]=217,E.buffer[E.offset+=1]=r,E.buffer.write(e,E.offset+=1,r,"utf8"),E.offset+=r-1;else if(r<65536)E.buffer[E.offset+=1]=218,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r,E.buffer.write(e,E.offset+=1,r,"utf8"),E.offset+=r-1;else{if(!(r<4294967296))throw Error("Max supported string length (4294967296) exceeded, encoding failure.");E.buffer[E.offset+=1]=219,E.buffer[E.offset+=1]=r>>24,E.buffer[E.offset+=1]=r>>16,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r,E.buffer.write(e,E.offset+=1,r,"utf8"),E.offset+=r-1}break;case"number":if(!1===Number.isFinite(e)){if(!0===Number.isNaN(e)){E.buffer[E.offset+=1]=212,E.buffer[E.offset+=1]=0,E.buffer[E.offset+=1]=1;break}if(e===1/0){E.buffer[E.offset+=1]=212,E.buffer[E.offset+=1]=0,E.buffer[E.offset+=1]=2;break}if(e===-1/0){E.buffer[E.offset+=1]=212,E.buffer[E.offset+=1]=0,E.buffer[E.offset+=1]=3;break}}if(Math.floor(e)!==e){if(Math.fround(e)===e){E.buffer[E.offset+=1]=202,E.buffer.writeFloatBE(e,E.offset+=1),E.offset+=3;break}E.buffer[E.offset+=1]=203,E.buffer.writeDoubleBE(e,E.offset+=1),E.offset+=7;break}if(e>=0){if(e<128){E.buffer[E.offset+=1]=e;break}if(e<256){E.buffer[E.offset+=1]=204,E.buffer[E.offset+=1]=e;break}if(e<65536){E.buffer[E.offset+=1]=205,E.buffer[E.offset+=1]=e>>8,E.buffer[E.offset+=1]=e;break}if(e<4294967296){E.buffer[E.offset+=1]=206,E.buffer[E.offset+=1]=e>>24,E.buffer[E.offset+=1]=e>>16,E.buffer[E.offset+=1]=e>>8,E.buffer[E.offset+=1]=e;break}let t=e/Math.pow(2,32)>>0,r=e>>>0;E.buffer[E.offset+=1]=207,E.buffer[E.offset+=1]=t>>24,E.buffer[E.offset+=1]=t>>16,E.buffer[E.offset+=1]=t>>8,E.buffer[E.offset+=1]=t,E.buffer[E.offset+=1]=r>>24,E.buffer[E.offset+=1]=r>>16,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r}else{if(e>=-32){E.buffer[E.offset+=1]=e;break}if(e>=-128){E.buffer[E.offset+=1]=208,E.buffer[E.offset+=1]=e;break}if(e>=-12800){E.buffer[E.offset+=1]=209,E.buffer[E.offset+=1]=e>>8,E.buffer[E.offset+=1]=e;break}if(e>=-128e6){E.buffer[E.offset+=1]=210,E.buffer[E.offset+=1]=e>>24,E.buffer[E.offset+=1]=e>>16,E.buffer[E.offset+=1]=e>>8,E.buffer[E.offset+=1]=e;break}let t=Math.floor(e/Math.pow(2,32)),r=e>>>0;E.buffer[E.offset+=1]=211,E.buffer[E.offset+=1]=t>>24,E.buffer[E.offset+=1]=t>>16,E.buffer[E.offset+=1]=t>>8,E.buffer[E.offset+=1]=t,E.buffer[E.offset+=1]=r>>24,E.buffer[E.offset+=1]=r>>16,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r}break;case"object":if(null===e){E.buffer[E.offset+=1]=192;break}if(!0===Array.isArray(e)){if((r=e.length)<16)E.buffer[E.offset+=1]=144|r;else if(r<65536)E.buffer[E.offset+=1]=220,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r;else{if(!(r<4294967296))throw new Error("Array too large");E.buffer[E.offset+=1]=221,E.buffer[E.offset+=1]=r>>24,E.buffer[E.offset+=1]=r>>16,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r}for(let t=0;t<r;t+=1)I.encode(e[t],!0);break}if(e instanceof ArrayBuffer&&(e=w.from(e)),e instanceof w==!1&&(e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)){let t=w.from(e.buffer);e.byteLength!==e.buffer.byteLength&&(t=t.slice(e.byteOffset,e.byteOffset+e.byteLength)),e=t}if(e instanceof w){if((r=e.length)<256)if(E.buffer[E.offset+=1]=196,E.buffer[E.offset+=1]=r,r>32)e.copy(E.buffer,E.offset+=1,0,r),E.offset+=r-1;else for(let t=0;t<r;t++)E.buffer[E.offset+=1]=e[t];else if(r<65536)E.buffer[E.offset+=1]=197,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r,e.copy(E.buffer,E.offset+=1,0,r),E.offset+=r-1;else{if(!(r<4294967296))throw Error("Max supported buffer length (4294967296) exceeded, encoding failure.");E.buffer[E.offset+=1]=198,E.buffer[E.offset+=1]=r>>24,E.buffer[E.offset+=1]=r>>16,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r,e.copy(E.buffer,E.offset+=1,0,r),E.offset+=r-1}break}{let t=Object.keys(e);if((r=t.length)<16)E.buffer[E.offset+=1]=128|r;else if(r<65536)E.buffer[E.offset+=1]=222,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r;else{if(!(r<4294967296))throw new Error("Object too large");E.buffer[E.offset+=1]=223,E.buffer[E.offset+=1]=r>>24,E.buffer[E.offset+=1]=r>>16,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r}if(!0===A)for(let f=0;f<r;f+=1)I.encode(B[t[f]]||t[f],!0),I.encode(e[t[f]],!0);else for(let f=0;f<r;f+=1)I.encode(t[f],!0),I.encode(e[t[f]],!0)}break;default:switch(e){case!0:E.buffer[E.offset+=1]=195;break;case!1:E.buffer[E.offset+=1]=194;break;case void 0:E.buffer[E.offset+=1]=212,E.buffer[E.offset+=1]=0,E.buffer[E.offset+=1]=0;break;default:throw Error("Error encoding value.")}}if(!0!==t)return E.copy()}static decode(e,t){let r,f;if(!0!==t&&(m.buffer=e,m.offset=0),m.buffer[m.offset]<192){if(m.buffer[m.offset]<128)return r=m.buffer[m.offset],m.offset+=1,r;if(m.buffer[m.offset]<144){if(f=31&m.buffer[m.offset],r={},m.offset+=1,!0===A)for(let e,t=0;t<f;t++)e=I.decode(void 0,!0),r[B[e]||e]=I.decode(void 0,!0);else for(let e=0;e<f;e++)r[I.decode(void 0,!0)]=I.decode(void 0,!0);return r}if(m.buffer[m.offset]<160){f=15&m.buffer[m.offset],m.offset+=1,r=new Array(f);for(let e=0;e<f;e+=1)r[e]=I.decode(void 0,!0);return r}return f=31&m.buffer[m.offset],m.offset+=1,r=m.buffer.toString("utf8",m.offset,m.offset+f),m.offset+=f,r}if(m.buffer[m.offset]>223)return r=-1*(255-m.buffer[m.offset]+1),m.offset+=1,r;switch(m.buffer[m.offset]){case 202:return r=m.buffer.readFloatBE(m.offset+=1),m.offset+=4,r;case 203:return r=m.buffer.readDoubleBE(m.offset+=1),m.offset+=8,r;case 204:return r=m.buffer.readUInt8(m.offset+=1),m.offset+=1,r;case 205:return r=m.buffer.readUInt16BE(m.offset+=1),m.offset+=2,r;case 206:return r=m.buffer.readUInt32BE(m.offset+=1),m.offset+=4,r;case 207:return r=m.buffer.readUInt32BE(m.offset+=1)*Math.pow(2,32)+m.buffer.readUInt32BE(m.offset+=4),m.offset+=4,r;case 208:return r=m.buffer.readInt8(m.offset+=1),m.offset+=1,r;case 209:return r=m.buffer.readInt16BE(m.offset+=1),m.offset+=2,r;case 210:return r=m.buffer.readInt32BE(m.offset+=1),m.offset+=4,r;case 211:return r=m.buffer.readInt32BE(m.offset+=1)*Math.pow(2,32)+m.buffer.readUInt32BE(m.offset+=4),m.offset+=4,r;case 217:return f=m.buffer.readUInt8(m.offset+=1),m.offset+=1,r=m.buffer.toString("utf8",m.offset,m.offset+f),m.offset+=f,r;case 218:return f=m.buffer.readUInt16BE(m.offset+=1),m.offset+=2,r=m.buffer.toString("utf8",m.offset,m.offset+f),m.offset+=f,r;case 219:return f=m.buffer.readUInt32BE(m.offset+=1),m.offset+=4,r=m.buffer.toString("utf8",m.offset,m.offset+f),m.offset+=f,r;case 212:switch(m.buffer.readInt8(m.offset+=1)){case 0:switch(m.buffer.readInt8(m.offset+=1)){case 0:return r=void 0,m.offset+=1,r;case 1:return r=NaN,m.offset+=1,r;case 2:return r=1/0,m.offset+=1,r;case 3:return r=-1/0,m.offset+=1,r}}break;case 192:return r=null,m.offset+=1,r;case 194:return r=!1,m.offset+=1,r;case 195:return r=!0,m.offset+=1,r;case 220:f=m.buffer.readUInt16BE(m.offset+=1),m.offset+=2,r=new Array(f);for(let e=0;e<f;e+=1)r[e]=I.decode(void 0,!0);return r;case 221:f=m.buffer.readUInt32BE(m.offset+=1),m.offset+=4,r=new Array(f);for(let e=0;e<f;e+=1)r[e]=I.decode(void 0,!0);return r;case 222:if(f=m.buffer.readUInt16BE(m.offset+=1),r={},m.offset+=2,!0===A)for(let e,t=0;t<f;t++)e=I.decode(void 0,!0),r[B[e]||e]=I.decode(void 0,!0);else for(let e=0;e<f;e++)r[I.decode(void 0,!0)]=I.decode(void 0,!0);return r;case 223:if(f=m.buffer.readUInt32BE(m.offset+=1),r={},m.offset+=4,!0===A)for(let e,t=0;t<f;t++)e=I.decode(void 0,!0),r[B[e]||e]=I.decode(void 0,!0);else for(let e=0;e<f;e++)r[I.decode(void 0,!0)]=I.decode(void 0,!0);return r;case 196:return f=m.buffer.readUInt8(m.offset+=1),m.offset+=1,r=m.buffer.slice(m.offset,m.offset+f),m.offset+=f,r;case 197:return f=m.buffer.readUInt16BE(m.offset+=1),m.offset+=2,r=m.buffer.slice(m.offset,m.offset+f),m.offset+=f,r;case 198:return f=m.buffer.readUInt32BE(m.offset+=1),m.offset+=4,r=m.buffer.slice(m.offset,m.offset+f),m.offset+=f,r}throw Error("Error decoding value.")}}return I.log=console.log,I}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.MessagePack=t()}(this,function(){"use strict";const e=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],t=(e,t)=>{let r=e;return"string"==typeof t?r=e.toLocaleString(t):!0===t&&(r=e.toLocaleString()),r};var r=(r,f)=>{if(!Number.isFinite(r))throw new TypeError(`Expected a finite number, got ${typeof r}: ${r}`);if((f=Object.assign({},f)).signed&&0===r)return" 0 B";const o=r<0,n=o?"-":f.signed?"+":"";if(o&&(r=-r),r<1){return n+t(r,f.locale)+" B"}const i=Math.min(Math.floor(Math.log10(r)/3),e.length-1);return r=Number((r/Math.pow(1e3,i)).toPrecision(3)),n+t(r,f.locale)+" "+e[i]};for(var f=function(e){var t=l(e),r=t[0],f=t[1];return 3*(r+f)/4-f},o=function(e){for(var t,r=l(e),f=r[0],o=r[1],n=new u(function(e,t,r){return 3*(t+r)/4-r}(0,f,o)),i=0,a=o>0?f-4:f,h=0;h<a;h+=4)t=s[e.charCodeAt(h)]<<18|s[e.charCodeAt(h+1)]<<12|s[e.charCodeAt(h+2)]<<6|s[e.charCodeAt(h+3)],n[i++]=t>>16&255,n[i++]=t>>8&255,n[i++]=255&t;2===o&&(t=s[e.charCodeAt(h)]<<2|s[e.charCodeAt(h+1)]>>4,n[i++]=255&t);1===o&&(t=s[e.charCodeAt(h)]<<10|s[e.charCodeAt(h+1)]<<4|s[e.charCodeAt(h+2)]>>2,n[i++]=t>>8&255,n[i++]=255&t);return n},n=function(e){for(var t,r=e.length,f=r%3,o=[],n=0,s=r-f;n<s;n+=16383)o.push(p(e,n,n+16383>s?s:n+16383));1===f?(t=e[r-1],o.push(i[t>>2]+i[t<<4&63]+"==")):2===f&&(t=(e[r-2]<<8)+e[r-1],o.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return o.join("")},i=[],s=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,c=a.length;h<c;++h)i[h]=a[h],s[a.charCodeAt(h)]=h;function l(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function p(e,t,r){for(var f,o,n=[],s=t;s<r;s+=3)f=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),n.push(i[(o=f)>>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return n.join("")}s["-".charCodeAt(0)]=62,s["_".charCodeAt(0)]=63;var b,y={byteLength:f,toByteArray:o,fromByteArray:n},g={read:function(e,t,r,f,o){var n,i,s=8*o-f-1,u=(1<<s)-1,a=u>>1,h=-7,c=r?o-1:0,l=r?-1:1,p=e[t+c];for(c+=l,n=p&(1<<-h)-1,p>>=-h,h+=s;h>0;n=256*n+e[t+c],c+=l,h-=8);for(i=n&(1<<-h)-1,n>>=-h,h+=f;h>0;i=256*i+e[t+c],c+=l,h-=8);if(0===n)n=1-a;else{if(n===u)return i?NaN:1/0*(p?-1:1);i+=Math.pow(2,f),n-=a}return(p?-1:1)*i*Math.pow(2,n-f)},write:function(e,t,r,f,o,n){var i,s,u,a=8*n-o-1,h=(1<<a)-1,c=h>>1,l=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=f?0:n-1,b=f?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,i=h):(i=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-i))<1&&(i--,u*=2),(t+=i+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(i++,u/=2),i+c>=h?(s=0,i=h):i+c>=1?(s=(t*u-1)*Math.pow(2,o),i+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,o),i=0));o>=8;e[r+p]=255&s,p+=b,s/=256,o-=8);for(i=i<<o|s,a+=o;a>0;e[r+p]=255&i,p+=b,i/=256,a-=8);e[r+p-b]|=128*y}},d=(function(e,t){t.Buffer=o,t.SlowBuffer=function(e){+e!=e&&(e=0);return o.alloc(+e)},t.INSPECT_MAX_BYTES=50;var r=2147483647;function f(e){if(e>r)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=o.prototype,t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return s(e)}return n(e,t,r)}function n(e,t,r){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|h(e,t),n=f(r),i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return u(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(F(e,ArrayBuffer)||e&&F(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var f;f=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r);return f.__proto__=o.prototype,f}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);var i=function(e){if(o.isBuffer(e)){var t=0|a(e.length),r=f(t);return 0===r.length?r:(e.copy(r,0,0,t),r)}if(void 0!==e.length)return"number"!=typeof e.length||z(e.length)?f(0):u(e);if("Buffer"===e.type&&Array.isArray(e.data))return u(e.data)}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function i(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function s(e){return i(e),f(e<0?0:0|a(e))}function u(e){for(var t=e.length<0?0:0|a(e.length),r=f(t),o=0;o<t;o+=1)r[o]=255&e[o];return r}function a(e){if(e>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|e}function h(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||F(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,f=arguments.length>2&&!0===arguments[2];if(!f&&0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return N(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return P(e).length;default:if(n)return f?-1:N(e).length;t=(""+t).toLowerCase(),n=!0}}function c(e,t,r){var f=e[t];e[t]=e[r],e[r]=f}function l(e,t,r,f,n){if(0===e.length)return-1;if("string"==typeof r?(f=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),z(r=+r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=o.from(t,f)),o.isBuffer(t))return 0===t.length?-1:p(e,t,r,f,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):p(e,[t],r,f,n);throw new TypeError("val must be string, number or Buffer")}function p(e,t,r,f,o){var n,i=1,s=e.length,u=t.length;if(void 0!==f&&("ucs2"===(f=String(f).toLowerCase())||"ucs-2"===f||"utf16le"===f||"utf-16le"===f)){if(e.length<2||t.length<2)return-1;i=2,s/=2,u/=2,r/=2}function a(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var h=-1;for(n=r;n<s;n++)if(a(e,n)===a(t,-1===h?0:n-h)){if(-1===h&&(h=n),n-h+1===u)return h*i}else-1!==h&&(n-=n-h),h=-1}else for(r+u>s&&(r=s-u),n=r;n>=0;n--){for(var c=!0,l=0;l<u;l++)if(a(e,n+l)!==a(t,l)){c=!1;break}if(c)return n}return-1}function b(e,t,r,f){r=Number(r)||0;var o=e.length-r;f?(f=Number(f))>o&&(f=o):f=o;var n=t.length;f>n/2&&(f=n/2);for(var i=0;i<f;++i){var s=parseInt(t.substr(2*i,2),16);if(z(s))return i;e[r+i]=s}return i}function d(e,t,r,f){return j(N(t,e.length-r),e,r,f)}function w(e,t,r,f){return j(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,f)}function v(e,t,r,f){return w(e,t,r,f)}function E(e,t,r,f){return j(P(t),e,r,f)}function m(e,t,r,f){return j(function(e,t){for(var r,f,o,n=[],i=0;i<e.length&&!((t-=2)<0);++i)r=e.charCodeAt(i),f=r>>8,o=r%256,n.push(o),n.push(f);return n}(t,e.length-r),e,r,f)}function B(e,t,r){return 0===t&&r===e.length?y.fromByteArray(e):y.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var f=[],o=t;o<r;){var n,i,s,u,a=e[o],h=null,c=a>239?4:a>223?3:a>191?2:1;if(o+c<=r)switch(c){case 1:a<128&&(h=a);break;case 2:128==(192&(n=e[o+1]))&&(u=(31&a)<<6|63&n)>127&&(h=u);break;case 3:n=e[o+1],i=e[o+2],128==(192&n)&&128==(192&i)&&(u=(15&a)<<12|(63&n)<<6|63&i)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:n=e[o+1],i=e[o+2],s=e[o+3],128==(192&n)&&128==(192&i)&&128==(192&s)&&(u=(15&a)<<18|(63&n)<<12|(63&i)<<6|63&s)>65535&&u<1114112&&(h=u)}null===h?(h=65533,c=1):h>65535&&(h-=65536,f.push(h>>>10&1023|55296),h=56320|1023&h),f.push(h),o+=c}return function(e){var t=e.length;if(t<=U)return String.fromCharCode.apply(String,e);var r="",f=0;for(;f<t;)r+=String.fromCharCode.apply(String,e.slice(f,f+=U));return r}(f)}t.kMaxLength=r,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),o.poolSize=8192,o.from=function(e,t,r){return n(e,t,r)},o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,o.alloc=function(e,t,r){return function(e,t,r){return i(e),e<=0?f(e):void 0!==t?"string"==typeof r?f(e).fill(t,r):f(e).fill(t):f(e)}(e,t,r)},o.allocUnsafe=function(e){return s(e)},o.allocUnsafeSlow=function(e){return s(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(F(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),F(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,f=t.length,n=0,i=Math.min(r,f);n<i;++n)if(e[n]!==t[n]){r=e[n],f=t[n];break}return r<f?-1:f<r?1:0},o.isEncoding=function(e){switch(String(e).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(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var f=o.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){var i=e[r];if(F(i,Uint8Array)&&(i=o.from(i)),!o.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(f,n),n+=i.length}return f},o.byteLength=h,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)c(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)c(this,t,t+3),c(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)c(this,t,t+7),c(this,t+1,t+6),c(this,t+2,t+5),c(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?A(this,0,e):function(e,t,r){var f=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return k(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return S(this,t,r);case"base64":return B(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(f)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),f=!0}}.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o.prototype.compare=function(e,t,r,f,n){if(F(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===f&&(f=0),void 0===n&&(n=this.length),t<0||r>e.length||f<0||n>this.length)throw new RangeError("out of range index");if(f>=n&&t>=r)return 0;if(f>=n)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(n>>>=0)-(f>>>=0),s=(r>>>=0)-(t>>>=0),u=Math.min(i,s),a=this.slice(f,n),h=e.slice(t,r),c=0;c<u;++c)if(a[c]!==h[c]){i=a[c],s=h[c];break}return i<s?-1:s<i?1:0},o.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return l(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return l(this,e,t,r,!1)},o.prototype.write=function(e,t,r,f){if(void 0===t)f="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)f=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===f&&(f="utf8")):(f=r,r=void 0)}var o=this.length-t;if((void 0===r||r>o)&&(r=o),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");f||(f="utf8");for(var n=!1;;)switch(f){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return d(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return v(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,e,t,r);default:if(n)throw new TypeError("Unknown encoding: "+f);f=(""+f).toLowerCase(),n=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var U=4096;function I(e,t,r){var f="";r=Math.min(e.length,r);for(var o=t;o<r;++o)f+=String.fromCharCode(127&e[o]);return f}function S(e,t,r){var f="";r=Math.min(e.length,r);for(var o=t;o<r;++o)f+=String.fromCharCode(e[o]);return f}function k(e,t,r){var f=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>f)&&(r=f);for(var o="",n=t;n<r;++n)o+=O(e[n]);return o}function M(e,t,r){for(var f=e.slice(t,r),o="",n=0;n<f.length;n+=2)o+=String.fromCharCode(f[n]+256*f[n+1]);return o}function T(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function _(e,t,r,f,n,i){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<i)throw new RangeError('"value" argument is out of bounds');if(r+f>e.length)throw new RangeError("Index out of range")}function L(e,t,r,f,o,n){if(r+f>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(e,t,r,f,o){return t=+t,r>>>=0,o||L(e,0,r,4),g.write(e,t,r,f,23,4),r+4}function x(e,t,r,f,o){return t=+t,r>>>=0,o||L(e,0,r,8),g.write(e,t,r,f,52,8),r+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var f=this.subarray(e,t);return f.__proto__=o.prototype,f},o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var f=this[e],o=1,n=0;++n<t&&(o*=256);)f+=this[e+n]*o;return f},o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var f=this[e+--t],o=1;t>0&&(o*=256);)f+=this[e+--t]*o;return f},o.prototype.readUInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||T(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var f=this[e],o=1,n=0;++n<t&&(o*=256);)f+=this[e+n]*o;return f>=(o*=128)&&(f-=Math.pow(2,8*t)),f},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||T(e,t,this.length);for(var f=t,o=1,n=this[e+--f];f>0&&(o*=256);)n+=this[e+--f]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readInt8=function(e,t){return e>>>=0,t||T(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||T(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||T(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||T(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||T(e,4,this.length),g.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||T(e,4,this.length),g.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||T(e,8,this.length),g.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||T(e,8,this.length),g.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,f){(e=+e,t>>>=0,r>>>=0,f)||_(this,e,t,r,Math.pow(2,8*r)-1,0);var o=1,n=0;for(this[t]=255&e;++n<r&&(o*=256);)this[t+n]=e/o&255;return t+r},o.prototype.writeUIntBE=function(e,t,r,f){(e=+e,t>>>=0,r>>>=0,f)||_(this,e,t,r,Math.pow(2,8*r)-1,0);var o=r-1,n=1;for(this[t+o]=255&e;--o>=0&&(n*=256);)this[t+o]=e/n&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,f){if(e=+e,t>>>=0,!f){var o=Math.pow(2,8*r-1);_(this,e,t,r,o-1,-o)}var n=0,i=1,s=0;for(this[t]=255&e;++n<r&&(i*=256);)e<0&&0===s&&0!==this[t+n-1]&&(s=1),this[t+n]=(e/i>>0)-s&255;return t+r},o.prototype.writeIntBE=function(e,t,r,f){if(e=+e,t>>>=0,!f){var o=Math.pow(2,8*r-1);_(this,e,t,r,o-1,-o)}var n=r-1,i=1,s=0;for(this[t+n]=255&e;--n>=0&&(i*=256);)e<0&&0===s&&0!==this[t+n+1]&&(s=1),this[t+n]=(e/i>>0)-s&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||_(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return x(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return x(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,f){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),f||0===f||(f=this.length),t>=e.length&&(t=e.length),t||(t=0),f>0&&f<r&&(f=r),f===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(f<0)throw new RangeError("sourceEnd out of bounds");f>this.length&&(f=this.length),e.length-t<f-r&&(f=e.length-t+r);var n=f-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,f);else if(this===e&&r<t&&t<f)for(var i=n-1;i>=0;--i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,f),t);return n},o.prototype.fill=function(e,t,r,f){if("string"==typeof e){if("string"==typeof t?(f=t,t=0,r=this.length):"string"==typeof r&&(f=r,r=this.length),void 0!==f&&"string"!=typeof f)throw new TypeError("encoding must be a string");if("string"==typeof f&&!o.isEncoding(f))throw new TypeError("Unknown encoding: "+f);if(1===e.length){var n=e.charCodeAt(0);("utf8"===f&&n<128||"latin1"===f)&&(e=n)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var s=o.isBuffer(e)?e:o.from(e,f),u=s.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=s[i%u]}return this};var R=/[^+\/0-9A-Za-z-_]/g;function O(e){return e<16?"0"+e.toString(16):e.toString(16)}function N(e,t){var r;t=t||1/0;for(var f=e.length,o=null,n=[],i=0;i<f;++i){if((r=e.charCodeAt(i))>55295&&r<57344){if(!o){if(r>56319){(t-=3)>-1&&n.push(239,191,189);continue}if(i+1===f){(t-=3)>-1&&n.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&n.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(t-=3)>-1&&n.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;n.push(r)}else if(r<2048){if((t-=2)<0)break;n.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;n.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;n.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return n}function P(e){return y.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function j(e,t,r,f){for(var o=0;o<f&&!(o+r>=t.length||o>=e.length);++o)t[o+r]=e[o];return o}function F(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function z(e){return e!=e}}(b={exports:{}},b.exports),b.exports);d.Buffer,d.SlowBuffer,d.INSPECT_MAX_BYTES,d.kMaxLength;const w=d.Buffer;class v{constructor(e){this.buffer=w.allocUnsafe(e||w.poolSize).fill(0),this.offset=-1}copy(){const e=w.allocUnsafe(this.offset+1).fill(0);return this.buffer.copy(e,0,0,this.offset+1),e}}let E=new v;const m=new class{constructor(e){this.buffer=e,this.offset=0}},B={};let A=!1,U=-33;class I{static register(...e){A=!0,e.forEach(e=>{B[U+=1]=e,B[e]=U})}static get dictionary(){return B}static reallocate(e){I.log("MessagePack: Setting buffer limit to",r(e||w.poolSize)),E=new v(e)}static get allocator(){return E}static get iterator(){return m}static encode(e,t){!0!==t&&(E.offset=-1);let r=0;switch(typeof e){case"string":if((r=w.byteLength(e))<32){r=0;for(let t=0,f=0,o=e.length;t<o;t+=1)(f=e.charCodeAt(t))<128?r+=1:f<1280?r+=2:f<55296||f>=57344?r+=3:(t+=1,r+=4);E.buffer[E.offset+=1]=160|r;for(let t=0,r=0,f=e.length;t<f;t+=1)(r=e.charCodeAt(t))<128?E.buffer[E.offset+=1]=r:r<1280?(E.buffer[E.offset+=1]=192|r>>6,E.buffer[E.offset+=1]=128|63&r):r<55296||r>=57344?(E.buffer[E.offset+=1]=224|r>>12,E.buffer[E.offset+=1]=128|r>>6&63,E.buffer[E.offset+=1]=128|63&r):(t+=1,r=65536+((1023&r)<<10|1023&e.charCodeAt(t)),E.buffer[E.offset+=1]=240|r>>18,E.buffer[E.offset+=1]=128|r>>12&63,E.buffer[E.offset+=1]=128|r>>6&63,E.buffer[E.offset+=1]=128|63&r)}else if(r<256)E.buffer[E.offset+=1]=217,E.buffer[E.offset+=1]=r,E.buffer.write(e,E.offset+=1,r,"utf8"),E.offset+=r-1;else if(r<65536)E.buffer[E.offset+=1]=218,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r,E.buffer.write(e,E.offset+=1,r,"utf8"),E.offset+=r-1;else{if(!(r<4294967296))throw Error("Max supported string length (4294967296) exceeded, encoding failure.");E.buffer[E.offset+=1]=219,E.buffer[E.offset+=1]=r>>24,E.buffer[E.offset+=1]=r>>16,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r,E.buffer.write(e,E.offset+=1,r,"utf8"),E.offset+=r-1}break;case"number":if(!1===Number.isFinite(e)){if(!0===Number.isNaN(e)){E.buffer[E.offset+=1]=212,E.buffer[E.offset+=1]=0,E.buffer[E.offset+=1]=1;break}if(e===1/0){E.buffer[E.offset+=1]=212,E.buffer[E.offset+=1]=0,E.buffer[E.offset+=1]=2;break}if(e===-1/0){E.buffer[E.offset+=1]=212,E.buffer[E.offset+=1]=0,E.buffer[E.offset+=1]=3;break}}if(Math.floor(e)!==e){if(Math.fround(e)===e){E.buffer[E.offset+=1]=202,E.buffer.writeFloatBE(e,E.offset+=1),E.offset+=3;break}E.buffer[E.offset+=1]=203,E.buffer.writeDoubleBE(e,E.offset+=1),E.offset+=7;break}if(e>=0){if(e<128){E.buffer[E.offset+=1]=e;break}if(e<256){E.buffer[E.offset+=1]=204,E.buffer[E.offset+=1]=e;break}if(e<65536){E.buffer[E.offset+=1]=205,E.buffer[E.offset+=1]=e>>8,E.buffer[E.offset+=1]=e;break}if(e<4294967296){E.buffer[E.offset+=1]=206,E.buffer[E.offset+=1]=e>>24,E.buffer[E.offset+=1]=e>>16,E.buffer[E.offset+=1]=e>>8,E.buffer[E.offset+=1]=e;break}let t=e/Math.pow(2,32)>>0,r=e>>>0;E.buffer[E.offset+=1]=207,E.buffer[E.offset+=1]=t>>24,E.buffer[E.offset+=1]=t>>16,E.buffer[E.offset+=1]=t>>8,E.buffer[E.offset+=1]=t,E.buffer[E.offset+=1]=r>>24,E.buffer[E.offset+=1]=r>>16,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r}else{if(e>=-32){E.buffer[E.offset+=1]=e;break}if(e>=-128){E.buffer[E.offset+=1]=208,E.buffer[E.offset+=1]=e;break}if(e>=-12800){E.buffer[E.offset+=1]=209,E.buffer[E.offset+=1]=e>>8,E.buffer[E.offset+=1]=e;break}if(e>=-128e6){E.buffer[E.offset+=1]=210,E.buffer[E.offset+=1]=e>>24,E.buffer[E.offset+=1]=e>>16,E.buffer[E.offset+=1]=e>>8,E.buffer[E.offset+=1]=e;break}let t=Math.floor(e/Math.pow(2,32)),r=e>>>0;E.buffer[E.offset+=1]=211,E.buffer[E.offset+=1]=t>>24,E.buffer[E.offset+=1]=t>>16,E.buffer[E.offset+=1]=t>>8,E.buffer[E.offset+=1]=t,E.buffer[E.offset+=1]=r>>24,E.buffer[E.offset+=1]=r>>16,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r}break;case"object":if(null===e){E.buffer[E.offset+=1]=192;break}if(!0===Array.isArray(e)){if((r=e.length)<16)E.buffer[E.offset+=1]=144|r;else if(r<65536)E.buffer[E.offset+=1]=220,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r;else{if(!(r<4294967296))throw new Error("Array too large");E.buffer[E.offset+=1]=221,E.buffer[E.offset+=1]=r>>24,E.buffer[E.offset+=1]=r>>16,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r}for(let t=0;t<r;t+=1)I.encode(e[t],!0);break}if(e instanceof ArrayBuffer&&(e=w.from(e)),e instanceof w==!1&&(e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)){let t=w.from(e.buffer);e.byteLength!==e.buffer.byteLength&&(t=t.slice(e.byteOffset,e.byteOffset+e.byteLength)),e=t}if(e instanceof w){if((r=e.length)<256)if(E.buffer[E.offset+=1]=196,E.buffer[E.offset+=1]=r,r>32)e.copy(E.buffer,E.offset+=1,0,r),E.offset+=r-1;else for(let t=0;t<r;t++)E.buffer[E.offset+=1]=e[t];else if(r<65536)E.buffer[E.offset+=1]=197,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r,e.copy(E.buffer,E.offset+=1,0,r),E.offset+=r-1;else{if(!(r<4294967296))throw Error("Max supported buffer length (4294967296) exceeded, encoding failure.");E.buffer[E.offset+=1]=198,E.buffer[E.offset+=1]=r>>24,E.buffer[E.offset+=1]=r>>16,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r,e.copy(E.buffer,E.offset+=1,0,r),E.offset+=r-1}break}{let t=Object.keys(e);if((r=t.length)<16)E.buffer[E.offset+=1]=128|r;else if(r<65536)E.buffer[E.offset+=1]=222,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r;else{if(!(r<4294967296))throw new Error("Object too large");E.buffer[E.offset+=1]=223,E.buffer[E.offset+=1]=r>>24,E.buffer[E.offset+=1]=r>>16,E.buffer[E.offset+=1]=r>>8,E.buffer[E.offset+=1]=r}if(!0===A)for(let f=0;f<r;f+=1)I.encode(B[t[f]]||t[f],!0),I.encode(e[t[f]],!0);else for(let f=0;f<r;f+=1)I.encode(t[f],!0),I.encode(e[t[f]],!0)}break;default:switch(e){case!0:E.buffer[E.offset+=1]=195;break;case!1:E.buffer[E.offset+=1]=194;break;case void 0:E.buffer[E.offset+=1]=212,E.buffer[E.offset+=1]=0,E.buffer[E.offset+=1]=0;break;default:throw Error("Error encoding value.")}}if(!0!==t)return E.copy()}static decode(e,t){let r,f;if(!0!==t&&(m.buffer=e,m.offset=0),m.buffer[m.offset]<192){if(m.buffer[m.offset]<128)return r=m.buffer[m.offset],m.offset+=1,r;if(m.buffer[m.offset]<144){if(f=31&m.buffer[m.offset],r={},m.offset+=1,!0===A)for(let e,t=0;t<f;t++)e=I.decode(void 0,!0),r[B[e]||e]=I.decode(void 0,!0);else for(let e=0;e<f;e++)r[I.decode(void 0,!0)]=I.decode(void 0,!0);return r}if(m.buffer[m.offset]<160){f=15&m.buffer[m.offset],m.offset+=1,r=new Array(f);for(let e=0;e<f;e+=1)r[e]=I.decode(void 0,!0);return r}return f=31&m.buffer[m.offset],m.offset+=1,r=m.buffer.toString("utf8",m.offset,m.offset+f),m.offset+=f,r}if(m.buffer[m.offset]>223)return r=-1*(255-m.buffer[m.offset]+1),m.offset+=1,r;switch(m.buffer[m.offset]){case 202:return r=m.buffer.readFloatBE(m.offset+=1),m.offset+=4,r;case 203:return r=m.buffer.readDoubleBE(m.offset+=1),m.offset+=8,r;case 204:return r=m.buffer.readUInt8(m.offset+=1),m.offset+=1,r;case 205:return r=m.buffer.readUInt16BE(m.offset+=1),m.offset+=2,r;case 206:return r=m.buffer.readUInt32BE(m.offset+=1),m.offset+=4,r;case 207:return r=m.buffer.readUInt32BE(m.offset+=1)*Math.pow(2,32)+m.buffer.readUInt32BE(m.offset+=4),m.offset+=4,r;case 208:return r=m.buffer.readInt8(m.offset+=1),m.offset+=1,r;case 209:return r=m.buffer.readInt16BE(m.offset+=1),m.offset+=2,r;case 210:return r=m.buffer.readInt32BE(m.offset+=1),m.offset+=4,r;case 211:return r=m.buffer.readInt32BE(m.offset+=1)*Math.pow(2,32)+m.buffer.readUInt32BE(m.offset+=4),m.offset+=4,r;case 217:return f=m.buffer.readUInt8(m.offset+=1),m.offset+=1,r=m.buffer.toString("utf8",m.offset,m.offset+f),m.offset+=f,r;case 218:return f=m.buffer.readUInt16BE(m.offset+=1),m.offset+=2,r=m.buffer.toString("utf8",m.offset,m.offset+f),m.offset+=f,r;case 219:return f=m.buffer.readUInt32BE(m.offset+=1),m.offset+=4,r=m.buffer.toString("utf8",m.offset,m.offset+f),m.offset+=f,r;case 212:switch(m.buffer.readInt8(m.offset+=1)){case 0:switch(m.buffer.readInt8(m.offset+=1)){case 0:return r=void 0,m.offset+=1,r;case 1:return r=NaN,m.offset+=1,r;case 2:return r=1/0,m.offset+=1,r;case 3:return r=-1/0,m.offset+=1,r}}break;case 192:return r=null,m.offset+=1,r;case 194:return r=!1,m.offset+=1,r;case 195:return r=!0,m.offset+=1,r;case 220:f=m.buffer.readUInt16BE(m.offset+=1),m.offset+=2,r=new Array(f);for(let e=0;e<f;e+=1)r[e]=I.decode(void 0,!0);return r;case 221:f=m.buffer.readUInt32BE(m.offset+=1),m.offset+=4,r=new Array(f);for(let e=0;e<f;e+=1)r[e]=I.decode(void 0,!0);return r;case 222:if(f=m.buffer.readUInt16BE(m.offset+=1),r={},m.offset+=2,!0===A)for(let e,t=0;t<f;t++)e=I.decode(void 0,!0),r[B[e]||e]=I.decode(void 0,!0);else for(let e=0;e<f;e++)r[I.decode(void 0,!0)]=I.decode(void 0,!0);return r;case 223:if(f=m.buffer.readUInt32BE(m.offset+=1),r={},m.offset+=4,!0===A)for(let e,t=0;t<f;t++)e=I.decode(void 0,!0),r[B[e]||e]=I.decode(void 0,!0);else for(let e=0;e<f;e++)r[I.decode(void 0,!0)]=I.decode(void 0,!0);return r;case 196:return f=m.buffer.readUInt8(m.offset+=1),m.offset+=1,r=m.buffer.slice(m.offset,m.offset+f),m.offset+=f,r;case 197:return f=m.buffer.readUInt16BE(m.offset+=1),m.offset+=2,r=m.buffer.slice(m.offset,m.offset+f),m.offset+=f,r;case 198:return f=m.buffer.readUInt32BE(m.offset+=1),m.offset+=4,r=m.buffer.slice(m.offset,m.offset+f),m.offset+=f,r}throw Error("Error decoding value.")}}return I.log=console.log,I.Buffer=w,I}); | ||
//# sourceMappingURL=MessagePack.min.js.map |
{ | ||
"name": "what-the-pack", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"description": "The fastest MessagePack implementation in JS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
388285
1630