UNPKG

libzotero

Version:
2 lines 559 kB
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Zotero=e()}}(function(){var e;return function t(e,r,n){function i(a,s){if(!r[a]){if(!e[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[a]={exports:{}};e[a][0].call(l.exports,function(t){var r=e[a][1][t];return i(r?r:t)},l,l.exports,t,e,r,n)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a<n.length;a++)i(n[a]);return i}({1:[function(e,t,r){(function(r){"use strict";function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);o>i;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return n>r?-1:r>n?1:0}function i(e){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}function o(e){return Object.prototype.toString.call(e)}function a(e){return i(e)?!1:"function"!=typeof r.ArrayBuffer?!1:"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e?e instanceof DataView?!0:e.buffer&&e.buffer instanceof ArrayBuffer?!0:!1:!1}function s(e){if(w.isFunction(e)){if(j)return e.name;var t=e.toString(),r=t.match(S);return r&&r[1]}}function c(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function u(e){if(j||!w.isFunction(e))return w.inspect(e);var t=s(e),r=t?": "+t:"";return"[Function"+r+"]"}function l(e){return c(u(e.actual),128)+" "+e.operator+" "+c(u(e.expected),128)}function f(e,t,r,n,i){throw new k.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function d(e,t){e||f(e,!0,t,"==",k.ok)}function h(e,t,r,s){if(e===t)return!0;if(i(e)&&i(t))return 0===n(e,t);if(w.isDate(e)&&w.isDate(t))return e.getTime()===t.getTime();if(w.isRegExp(e)&&w.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(a(e)&&a(t)&&o(e)===o(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===n(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(i(e)!==i(t))return!1;s=s||{actual:[],expected:[]};var c=s.actual.indexOf(e);return-1!==c&&c===s.expected.indexOf(t)?!0:(s.actual.push(e),s.expected.push(t),b(e,t,r,s))}return r?e===t:e==t}function p(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function b(e,t,r,n){if(null===e||void 0===e||null===t||void 0===t)return!1;if(w.isPrimitive(e)||w.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=p(e),o=p(t);if(i&&!o||!i&&o)return!1;if(i)return e=x.call(e),t=x.call(t),h(e,t,r);var a,s,c=T(e),u=T(t);if(c.length!==u.length)return!1;for(c.sort(),u.sort(),s=c.length-1;s>=0;s--)if(c[s]!==u[s])return!1;for(s=c.length-1;s>=0;s--)if(a=c[s],!h(e[a],t[a],r,n))return!1;return!0}function g(e,t,r){h(e,t,!0)&&f(e,t,r,"notDeepStrictEqual",g)}function y(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(r){}return Error.isPrototypeOf(t)?!1:t.call({},e)===!0}function m(e){var t;try{e()}catch(r){t=r}return t}function v(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=m(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&f(i,r,"Missing expected exception"+n);var o="string"==typeof n,a=!e&&w.isError(i),s=!e&&i&&!r;if((a&&o&&y(i,r)||s)&&f(i,r,"Got unwanted exception"+n),e&&i&&r&&!y(i,r)||!e&&i)throw i}var w=e("util/"),_=Object.prototype.hasOwnProperty,x=Array.prototype.slice,j=function(){return"foo"===function(){}.name}(),k=t.exports=d,S=/\s*function\s+([^\(\s]*)\s*/;k.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=l(this),this.generatedMessage=!0);var t=e.stackStartFunction||f;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=s(t),o=n.indexOf("\n"+i);if(o>=0){var a=n.indexOf("\n",o+1);n=n.substring(a+1)}this.stack=n}}},w.inherits(k.AssertionError,Error),k.fail=f,k.ok=d,k.equal=function(e,t,r){e!=t&&f(e,t,r,"==",k.equal)},k.notEqual=function(e,t,r){e==t&&f(e,t,r,"!=",k.notEqual)},k.deepEqual=function(e,t,r){h(e,t,!1)||f(e,t,r,"deepEqual",k.deepEqual)},k.deepStrictEqual=function(e,t,r){h(e,t,!0)||f(e,t,r,"deepStrictEqual",k.deepStrictEqual)},k.notDeepEqual=function(e,t,r){h(e,t,!1)&&f(e,t,r,"notDeepEqual",k.notDeepEqual)},k.notDeepStrictEqual=g,k.strictEqual=function(e,t,r){e!==t&&f(e,t,r,"===",k.strictEqual)},k.notStrictEqual=function(e,t,r){e===t&&f(e,t,r,"!==",k.notStrictEqual)},k["throws"]=function(e,t,r){v(!0,e,t,r)},k.doesNotThrow=function(e,t,r){v(!1,e,t,r)},k.ifError=function(e){if(e)throw e};var T=Object.keys||function(e){var t=[];for(var r in e)_.call(e,r)&&t.push(r);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":89}],2:[function(e,t,r){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-n(e)}function o(e){var t,r,i,o,a,s,c=e.length;a=n(e),s=new f(3*c/4-a),i=a>0?c-4:c;var u=0;for(t=0,r=0;i>t;t+=4,r+=3)o=l[e.charCodeAt(t)]<<18|l[e.charCodeAt(t+1)]<<12|l[e.charCodeAt(t+2)]<<6|l[e.charCodeAt(t+3)],s[u++]=o>>16&255,s[u++]=o>>8&255,s[u++]=255&o;return 2===a?(o=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,s[u++]=255&o):1===a&&(o=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,s[u++]=o>>8&255,s[u++]=255&o),s}function a(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function s(e,t,r){for(var n,i=[],o=t;r>o;o+=3)n=(e[o]<<16)+(e[o+1]<<8)+e[o+2],i.push(a(n));return i.join("")}function c(e){for(var t,r=e.length,n=r%3,i="",o=[],a=16383,c=0,l=r-n;l>c;c+=a)o.push(s(e,c,c+a>l?l:c+a));return 1===n?(t=e[r-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),o.push(i),o.join("")}r.byteLength=i,r.toByteArray=o,r.fromByteArray=c;for(var u=[],l=[],f="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,p=d.length;p>h;++h)u[h]=d[h],l[d.charCodeAt(h)]=h;l["-".charCodeAt(0)]=62,l["_".charCodeAt(0)]=63},{}],3:[function(e,t,r){},{}],4:[function(e,t,r){(function(t,n){function i(e){if(e<r.DEFLATE||e>r.UNZIP)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function o(e,t){for(var r=0;r<e.length;r++)this[t+r]=e[r]}var a=e("pako/lib/zlib/messages"),s=e("pako/lib/zlib/zstream"),c=e("pako/lib/zlib/deflate.js"),u=e("pako/lib/zlib/inflate.js"),l=e("pako/lib/zlib/constants");for(var f in l)r[f]=l[f];r.NONE=0,r.DEFLATE=1,r.INFLATE=2,r.GZIP=3,r.GUNZIP=4,r.DEFLATERAW=5,r.INFLATERAW=6,r.UNZIP=7,i.prototype.init=function(e,t,n,i,o){switch(this.windowBits=e,this.level=t,this.memLevel=n,this.strategy=i,(this.mode===r.GZIP||this.mode===r.GUNZIP)&&(this.windowBits+=16),this.mode===r.UNZIP&&(this.windowBits+=32),(this.mode===r.DEFLATERAW||this.mode===r.INFLATERAW)&&(this.windowBits=-this.windowBits),this.strm=new s,this.mode){case r.DEFLATE:case r.GZIP:case r.DEFLATERAW:var a=c.deflateInit2(this.strm,this.level,r.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case r.INFLATE:case r.GUNZIP:case r.INFLATERAW:case r.UNZIP:var a=u.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}return a!==r.Z_OK?void this._error(a):(this.write_in_progress=!1,void(this.init_done=!0))},i.prototype.params=function(){throw new Error("deflateParams Not supported")},i.prototype._writeCheck=function(){if(!this.init_done)throw new Error("write before init");if(this.mode===r.NONE)throw new Error("already finalized");if(this.write_in_progress)throw new Error("write already in progress");if(this.pending_close)throw new Error("close is pending")},i.prototype.write=function(e,r,n,i,o,a,s){this._writeCheck(),this.write_in_progress=!0;var c=this;return t.nextTick(function(){c.write_in_progress=!1;var t=c._write(e,r,n,i,o,a,s);c.callback(t[0],t[1]),c.pending_close&&c.close()}),this},i.prototype.writeSync=function(e,t,r,n,i,o,a){return this._writeCheck(),this._write(e,t,r,n,i,o,a)},i.prototype._write=function(e,t,i,a,s,l,f){if(this.write_in_progress=!0,e!==r.Z_NO_FLUSH&&e!==r.Z_PARTIAL_FLUSH&&e!==r.Z_SYNC_FLUSH&&e!==r.Z_FULL_FLUSH&&e!==r.Z_FINISH&&e!==r.Z_BLOCK)throw new Error("Invalid flush value");null==t&&(t=new n(0),a=0,i=0),s._set?s.set=s._set:s.set=o;var d=this.strm;switch(d.avail_in=a,d.input=t,d.next_in=i,d.avail_out=f,d.output=s,d.next_out=l,this.mode){case r.DEFLATE:case r.GZIP:case r.DEFLATERAW:var h=c.deflate(d,e);break;case r.UNZIP:case r.INFLATE:case r.GUNZIP:case r.INFLATERAW:var h=u.inflate(d,e);break;default:throw new Error("Unknown mode "+this.mode)}return h!==r.Z_STREAM_END&&h!==r.Z_OK&&this._error(h),this.write_in_progress=!1,[d.avail_in,d.avail_out]},i.prototype.close=function(){return this.write_in_progress?void(this.pending_close=!0):(this.pending_close=!1,this.mode===r.DEFLATE||this.mode===r.GZIP||this.mode===r.DEFLATERAW?c.deflateEnd(this.strm):u.inflateEnd(this.strm),void(this.mode=r.NONE))},i.prototype.reset=function(){switch(this.mode){case r.DEFLATE:case r.DEFLATERAW:var e=c.deflateReset(this.strm);break;case r.INFLATE:case r.INFLATERAW:var e=u.inflateReset(this.strm)}e!==r.Z_OK&&this._error(e)},i.prototype._error=function(e){this.onerror(a[e]+": "+this.strm.msg,e),this.write_in_progress=!1,this.pending_close&&this.close()},r.Zlib=i}).call(this,e("_process"),e("buffer").Buffer)},{_process:59,buffer:7,"pako/lib/zlib/constants":49,"pako/lib/zlib/deflate.js":51,"pako/lib/zlib/inflate.js":53,"pako/lib/zlib/messages":55,"pako/lib/zlib/zstream":57}],5:[function(e,t,r){(function(t,n){function i(e,t,r){function i(){for(var t;null!==(t=e.read());)s.push(t),c+=t.length;e.once("readable",i)}function o(t){e.removeListener("end",a),e.removeListener("readable",i),r(t)}function a(){var t=n.concat(s,c);s=[],r(null,t),e.close()}var s=[],c=0;e.on("error",o),e.on("end",a),e.end(t),i()}function o(e,t){if("string"==typeof t&&(t=new n(t)),!n.isBuffer(t))throw new TypeError("Not a string or buffer");var r=b.Z_FINISH;return e._processChunk(t,r)}function a(e){return this instanceof a?void h.call(this,e,b.DEFLATE):new a(e)}function s(e){return this instanceof s?void h.call(this,e,b.INFLATE):new s(e)}function c(e){return this instanceof c?void h.call(this,e,b.GZIP):new c(e)}function u(e){return this instanceof u?void h.call(this,e,b.GUNZIP):new u(e)}function l(e){return this instanceof l?void h.call(this,e,b.DEFLATERAW):new l(e)}function f(e){return this instanceof f?void h.call(this,e,b.INFLATERAW):new f(e)}function d(e){return this instanceof d?void h.call(this,e,b.UNZIP):new d(e)}function h(e,t){if(this._opts=e=e||{},this._chunkSize=e.chunkSize||r.Z_DEFAULT_CHUNK,p.call(this,e),e.flush&&e.flush!==b.Z_NO_FLUSH&&e.flush!==b.Z_PARTIAL_FLUSH&&e.flush!==b.Z_SYNC_FLUSH&&e.flush!==b.Z_FULL_FLUSH&&e.flush!==b.Z_FINISH&&e.flush!==b.Z_BLOCK)throw new Error("Invalid flush flag: "+e.flush);if(this._flushFlag=e.flush||b.Z_NO_FLUSH,e.chunkSize&&(e.chunkSize<r.Z_MIN_CHUNK||e.chunkSize>r.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<r.Z_MIN_WINDOWBITS||e.windowBits>r.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<r.Z_MIN_LEVEL||e.level>r.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<r.Z_MIN_MEMLEVEL||e.memLevel>r.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=r.Z_FILTERED&&e.strategy!=r.Z_HUFFMAN_ONLY&&e.strategy!=r.Z_RLE&&e.strategy!=r.Z_FIXED&&e.strategy!=r.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!n.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new b.Zlib(t);var i=this;this._hadError=!1,this._binding.onerror=function(e,t){i._binding=null,i._hadError=!0;var n=new Error(e);n.errno=t,n.code=r.codes[t],i.emit("error",n)};var o=r.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(o=e.level);var a=r.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(a=e.strategy),this._binding.init(e.windowBits||r.Z_DEFAULT_WINDOWBITS,o,e.memLevel||r.Z_DEFAULT_MEMLEVEL,a,e.dictionary),this._buffer=new n(this._chunkSize),this._offset=0,this._closed=!1,this._level=o,this._strategy=a,this.once("end",this.close)}var p=e("_stream_transform"),b=e("./binding"),g=e("util"),y=e("assert").ok;b.Z_MIN_WINDOWBITS=8,b.Z_MAX_WINDOWBITS=15,b.Z_DEFAULT_WINDOWBITS=15,b.Z_MIN_CHUNK=64,b.Z_MAX_CHUNK=1/0,b.Z_DEFAULT_CHUNK=16384,b.Z_MIN_MEMLEVEL=1,b.Z_MAX_MEMLEVEL=9,b.Z_DEFAULT_MEMLEVEL=8,b.Z_MIN_LEVEL=-1,b.Z_MAX_LEVEL=9,b.Z_DEFAULT_LEVEL=b.Z_DEFAULT_COMPRESSION,Object.keys(b).forEach(function(e){e.match(/^Z/)&&(r[e]=b[e])}),r.codes={Z_OK:b.Z_OK,Z_STREAM_END:b.Z_STREAM_END,Z_NEED_DICT:b.Z_NEED_DICT,Z_ERRNO:b.Z_ERRNO,Z_STREAM_ERROR:b.Z_STREAM_ERROR,Z_DATA_ERROR:b.Z_DATA_ERROR,Z_MEM_ERROR:b.Z_MEM_ERROR,Z_BUF_ERROR:b.Z_BUF_ERROR,Z_VERSION_ERROR:b.Z_VERSION_ERROR},Object.keys(r.codes).forEach(function(e){r.codes[r.codes[e]]=e}),r.Deflate=a,r.Inflate=s,r.Gzip=c,r.Gunzip=u,r.DeflateRaw=l,r.InflateRaw=f,r.Unzip=d,r.createDeflate=function(e){return new a(e)},r.createInflate=function(e){return new s(e)},r.createDeflateRaw=function(e){return new l(e)},r.createInflateRaw=function(e){return new f(e)},r.createGzip=function(e){return new c(e)},r.createGunzip=function(e){return new u(e)},r.createUnzip=function(e){return new d(e)},r.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new a(t),e,r)},r.deflateSync=function(e,t){return o(new a(t),e)},r.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new c(t),e,r)},r.gzipSync=function(e,t){return o(new c(t),e)},r.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new l(t),e,r)},r.deflateRawSync=function(e,t){return o(new l(t),e)},r.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new d(t),e,r)},r.unzipSync=function(e,t){return o(new d(t),e)},r.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new s(t),e,r)},r.inflateSync=function(e,t){return o(new s(t),e)},r.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new u(t),e,r)},r.gunzipSync=function(e,t){return o(new u(t),e)},r.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new f(t),e,r)},r.inflateRawSync=function(e,t){return o(new f(t),e)},g.inherits(h,p),h.prototype.params=function(e,n,i){if(e<r.Z_MIN_LEVEL||e>r.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(n!=r.Z_FILTERED&&n!=r.Z_HUFFMAN_ONLY&&n!=r.Z_RLE&&n!=r.Z_FIXED&&n!=r.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==e||this._strategy!==n){var o=this;this.flush(b.Z_SYNC_FLUSH,function(){o._binding.params(e,n),o._hadError||(o._level=e,o._strategy=n,i&&i())})}else t.nextTick(i)},h.prototype.reset=function(){return this._binding.reset()},h.prototype._flush=function(e){this._transform(new n(0),"",e)},h.prototype.flush=function(e,r){var i=this._writableState;if(("function"==typeof e||void 0===e&&!r)&&(r=e,e=b.Z_FULL_FLUSH),i.ended)r&&t.nextTick(r);else if(i.ending)r&&this.once("end",r);else if(i.needDrain){var o=this;this.once("drain",function(){o.flush(r)})}else this._flushFlag=e,this.write(new n(0),"",r)},h.prototype.close=function(e){if(e&&t.nextTick(e),!this._closed){this._closed=!0,this._binding.close();var r=this;t.nextTick(function(){r.emit("close")})}},h.prototype._transform=function(e,t,r){var i,o=this._writableState,a=o.ending||o.ended,s=a&&(!e||o.length===e.length);if(null===!e&&!n.isBuffer(e))return r(new Error("invalid input"));s?i=b.Z_FINISH:(i=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||b.Z_NO_FLUSH));this._processChunk(e,i,r)},h.prototype._processChunk=function(e,t,r){function i(l,h){if(!c._hadError){var p=a-h;if(y(p>=0,"have should not go down"),p>0){var b=c._buffer.slice(c._offset,c._offset+p);c._offset+=p,u?c.push(b):(f.push(b),d+=b.length)}if((0===h||c._offset>=c._chunkSize)&&(a=c._chunkSize,c._offset=0,c._buffer=new n(c._chunkSize)),0===h){if(s+=o-l,o=l,!u)return!0;var g=c._binding.write(t,e,s,o,c._buffer,c._offset,c._chunkSize);return g.callback=i,void(g.buffer=e)}return u?void r():!1}}var o=e&&e.length,a=this._chunkSize-this._offset,s=0,c=this,u="function"==typeof r;if(!u){var l,f=[],d=0;this.on("error",function(e){l=e});do var h=this._binding.writeSync(t,e,s,o,this._buffer,this._offset,a);while(!this._hadError&&i(h[0],h[1]));if(this._hadError)throw l;var p=n.concat(f,d);return this.close(),p}var b=this._binding.write(t,e,s,o,this._buffer,this._offset,a);b.buffer=e,b.callback=i},g.inherits(a,h),g.inherits(s,h),g.inherits(c,h),g.inherits(u,h),g.inherits(l,h),g.inherits(f,h),g.inherits(d,h)}).call(this,e("_process"),e("buffer").Buffer)},{"./binding":4,_process:59,_stream_transform:73,assert:1,buffer:7,util:89}],6:[function(e,t,r){(function(t){"use strict";var n=e("buffer"),i=n.Buffer,o=n.SlowBuffer,a=n.kMaxLength||2147483647;r.alloc=function(e,t,r){if("function"==typeof i.alloc)return i.alloc(e,t,r);if("number"==typeof r)throw new TypeError("encoding must not be number");if("number"!=typeof e)throw new TypeError("size must be a number");if(e>a)throw new RangeError("size is too large");var n=r,o=t;void 0===o&&(n=void 0,o=0);var s=new i(e);if("string"==typeof o)for(var c=new i(o,n),u=c.length,l=-1;++l<e;)s[l]=c[l%u];else s.fill(o);return s},r.allocUnsafe=function(e){if("function"==typeof i.allocUnsafe)return i.allocUnsafe(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>a)throw new RangeError("size is too large");return new i(e)},r.from=function(e,r,n){if("function"==typeof i.from&&(!t.Uint8Array||Uint8Array.from!==i.from))return i.from(e,r,n);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new i(e,r);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var o=r;if(1===arguments.length)return new i(e);"undefined"==typeof o&&(o=0);var a=n;if("undefined"==typeof a&&(a=e.byteLength-o),o>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(a>e.byteLength-o)throw new RangeError("'length' is out of bounds");return new i(e.slice(o,o+a))}if(i.isBuffer(e)){var s=new i(e.length);return e.copy(s,0,0,e.length),s}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new i(e);if("Buffer"===e.type&&Array.isArray(e.data))return new i(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},r.allocUnsafeSlow=function(e){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=a)throw new RangeError("size is too large");return new o(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:7}],7:[function(e,t,r){(function(t){"use strict";function n(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function i(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(e,t){if(i()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=a.prototype):(null===e&&(e=new a(t)),e.length=t),e}function a(e,t,r){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return s(this,e,t,r)}function s(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?h(e,t,r,n):"string"==typeof t?f(e,t,r):p(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(0>e)throw new RangeError('"size" argument must not be negative')}function u(e,t,r,n){return c(t),0>=t?o(e,t):void 0!==r?"string"==typeof n?o(e,t).fill(r,n):o(e,t).fill(r):o(e,t)}function l(e,t){if(c(t),e=o(e,0>t?0:0|b(t)),!a.TYPED_ARRAY_SUPPORT)for(var r=0;t>r;++r)e[r]=0;return e}function f(e,t,r){if(("string"!=typeof r||""===r)&&(r="utf8"),!a.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|y(t,r);e=o(e,n);var i=e.write(t,r);return i!==n&&(e=e.slice(0,i)),e}function d(e,t){var r=t.length<0?0:0|b(t.length);e=o(e,r);for(var n=0;r>n;n+=1)e[n]=255&t[n];return e}function h(e,t,r,n){if(t.byteLength,0>r||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),a.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=a.prototype):e=d(e,t),e}function p(e,t){if(a.isBuffer(t)){var r=0|b(t.length);return e=o(e,r),0===e.length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||Y(t.length)?o(e,0):d(e,t);if("Buffer"===t.type&&Q(t.data))return d(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function b(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),a.alloc(+e)}function y(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(e).length;default:if(n)return K(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){var n=!1;if((void 0===t||0>t)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),0>=r)return"";if(r>>>=0,t>>>=0,t>=r)return"";for(e||(e="utf8");;)switch(e){case"hex":return R(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 C(this,t,r);case"base64":return O(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:-2147483648>r&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),0>r&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(0>r){if(!i)return-1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,i);if("number"==typeof t)return t=255&t,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,i){function o(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,c=t.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,r/=2}var u;if(i){var l=-1;for(u=r;s>u;u++)if(o(e,u)===o(t,-1===l?0:u-l)){if(-1===l&&(l=u),u-l+1===c)return l*a}else-1!==l&&(u-=u-l),l=-1}else for(r+c>s&&(r=s-c),u=r;u>=0;u--){for(var f=!0,d=0;c>d;d++)if(o(e,u+d)!==o(t,d)){f=!1;break}if(f)return u}return-1}function x(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;n>a;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function j(e,t,r,n){return J(K(t,e.length-r),e,r,n)}function k(e,t,r,n){return J(W(t),e,r,n)}function S(e,t,r,n){return k(e,t,r,n)}function T(e,t,r,n){return J(H(t),e,r,n)}function E(e,t,r,n){return J(G(t,e.length-r),e,r,n)}function O(e,t,r){return 0===t&&r===e.length?$.fromByteArray(e):$.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;r>i;){var o=e[i],a=null,s=o>239?4:o>223?3:o>191?2:1;if(r>=i+s){var c,u,l,f;switch(s){case 1:128>o&&(a=o);break;case 2:c=e[i+1],128===(192&c)&&(f=(31&o)<<6|63&c,f>127&&(a=f));break;case 3:c=e[i+1],u=e[i+2],128===(192&c)&&128===(192&u)&&(f=(15&o)<<12|(63&c)<<6|63&u,f>2047&&(55296>f||f>57343)&&(a=f));break;case 4:c=e[i+1],u=e[i+2],l=e[i+3],128===(192&c)&&128===(192&u)&&128===(192&l)&&(f=(15&o)<<18|(63&c)<<12|(63&u)<<6|63&l,f>65535&&1114112>f&&(a=f))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=s}return L(n)}function L(e){var t=e.length;if(ee>=t)return String.fromCharCode.apply(String,e);for(var r="",n=0;t>n;)r+=String.fromCharCode.apply(String,e.slice(n,n+=ee));return r}function I(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;r>i;++i)n+=String.fromCharCode(127&e[i]);return n}function C(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;r>i;++i)n+=String.fromCharCode(e[i]);return n}function R(e,t,r){var n=e.length;(!t||0>t)&&(t=0),(!r||0>r||r>n)&&(r=n);for(var i="",o=t;r>o;++o)i+=V(e[o]);return i}function D(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function Z(e,t,r){if(e%1!==0||0>e)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function B(e,t,r,n,i,o){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||o>t)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function P(e,t,r,n){0>t&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);o>i;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function U(e,t,r,n){0>t&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);o>i;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function N(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(0>r)throw new RangeError("Index out of range")}function M(e,t,r,n,i){return i||N(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),X.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,i){return i||N(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),X.write(e,t,r,n,52,8),r+8}function q(e){if(e=z(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function z(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function V(e){return 16>e?"0"+e.toString(16):e.toString(16)}function K(e,t){t=t||1/0;for(var r,n=e.length,i=null,o=[],a=0;n>a;++a){if(r=e.charCodeAt(a),r>55295&&57344>r){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(56320>r){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,128>r){if((t-=1)<0)break;o.push(r)}else if(2048>r){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(65536>r){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(1114112>r))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function G(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}function H(e){return $.toByteArray(q(e))}function J(e,t,r,n){for(var i=0;n>i&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function Y(e){return e!==e}var $=e("base64-js"),X=e("ieee754"),Q=e("isarray");r.Buffer=a,r.SlowBuffer=g,r.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:n(),r.kMaxLength=i(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,r){return s(null,e,t,r)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,r){return u(null,e,t,r)},a.allocUnsafe=function(e){return l(null,e)},a.allocUnsafeSlow=function(e){return l(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);o>i;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return n>r?-1:r>n?1:0},a.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}},a.concat=function(e,t){if(!Q(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=a.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},a.byteLength=y,a.prototype._isBuffer=!0,a.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;e>t;t+=2)v(this,t,t+1);return this},a.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;e>t;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},a.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;e>t;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},a.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?A(this,0,e):m.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===a.compare(this,e)},a.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},a.prototype.compare=function(e,t,r,n,i){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),0>t||r>e.length||0>n||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var o=i-n,s=r-t,c=Math.min(o,s),u=this.slice(n,i),l=e.slice(t,r),f=0;c>f;++f)if(u[f]!==l[f]){o=u[f],s=l[f];break}return s>o?-1:o>s?1:0},a.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return w(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return w(this,e,t,r,!1)},a.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length, t=0;else if(void 0===r&&"string"==typeof t)n=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|t,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(0>r||0>t)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return x(this,e,t,r);case"utf8":case"utf-8":return j(this,e,t,r);case"ascii":return k(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return T(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;a.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,0>e?(e+=r,0>e&&(e=0)):e>r&&(e=r),0>t?(t+=r,0>t&&(t=0)):t>r&&(t=r),e>t&&(t=e);var n;if(a.TYPED_ARRAY_SUPPORT)n=this.subarray(e,t),n.__proto__=a.prototype;else{var i=t-e;n=new a(i,void 0);for(var o=0;i>o;++o)n[o]=this[o+e]}return n},a.prototype.readUIntLE=function(e,t,r){e=0|e,t=0|t,r||Z(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},a.prototype.readUIntBE=function(e,t,r){e=0|e,t=0|t,r||Z(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUInt8=function(e,t){return t||Z(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||Z(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||Z(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||Z(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||Z(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e=0|e,t=0|t,r||Z(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e=0|e,t=0|t,r||Z(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},a.prototype.readInt8=function(e,t){return t||Z(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},a.prototype.readInt16LE=function(e,t){t||Z(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){t||Z(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return t||Z(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||Z(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||Z(e,4,this.length),X.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||Z(e,4,this.length),X.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||Z(e,8,this.length),X.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||Z(e,8,this.length),X.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=0|t,r=0|r,!n){var i=Math.pow(2,8*r)-1;B(this,e,t,r,i,0)}var o=1,a=0;for(this[t]=255&e;++a<r&&(o*=256);)this[t+a]=e/o&255;return t+r},a.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t=0|t,r=0|r,!n){var i=Math.pow(2,8*r)-1;B(this,e,t,r,i,0)}var o=r-1,a=1;for(this[t+o]=255&e;--o>=0&&(a*=256);)this[t+o]=e/a&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e=+e,t=0|t,r||B(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=0|t,r||B(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=0|t,r||B(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=0|t,r||B(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):U(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=0|t,r||B(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=0|t,!n){var i=Math.pow(2,8*r-1);B(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)0>e&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=0|t,!n){var i=Math.pow(2,8*r-1);B(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)0>e&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t=0|t,r||B(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t=0|t,r||B(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):P(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t=0|t,r||B(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):P(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t=0|t,r||B(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):U(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t=0|t,r||B(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&r>n&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>r||r>=this.length)throw new RangeError("sourceStart out of bounds");if(0>n)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&t>r&&n>t)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(1e3>o||!a.TYPED_ARRAY_SUPPORT)for(i=0;o>i;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);256>i&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e=255&e);if(0>t||this.length<t||this.length<r)throw new RangeError("Out of range index");if(t>=r)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var o;if("number"==typeof e)for(o=t;r>o;++o)this[o]=e;else{var s=a.isBuffer(e)?e:K(new a(e,n).toString()),c=s.length;for(o=0;r-t>o;++o)this[o+t]=s[o%c]}return this};var te=/[^+\/0-9A-Za-z-_]/g}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"base64-js":2,ieee754:36,isarray:40}],8:[function(e,t,r){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],9:[function(e,t,r){(function(e){function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===g(e)}function n(e){return"boolean"==typeof e}function i(e){return null===e}function o(e){return null==e}function a(e){return"number"==typeof e}function s(e){return"string"==typeof e}function c(e){return"symbol"==typeof e}function u(e){return void 0===e}function l(e){return"[object RegExp]"===g(e)}function f(e){return"object"==typeof e&&null!==e}function d(e){return"[object Date]"===g(e)}function h(e){return"[object Error]"===g(e)||e instanceof Error}function p(e){return"function"==typeof e}function b(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function g(e){return Object.prototype.toString.call(e)}r.isArray=t,r.isBoolean=n,r.isNull=i,r.isNullOrUndefined=o,r.isNumber=a,r.isString=s,r.isSymbol=c,r.isUndefined=u,r.isRegExp=l,r.isObject=f,r.isDate=d,r.isError=h,r.isFunction=p,r.isPrimitive=b,r.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":38}],10:[function(e,t,r){(function(r){"use strict";function n(e,t,n,s){n=a(n||"UTF-8"),t=a(t||"UTF-8"),e=e||"";var u;if("UTF-8"!==n&&"string"==typeof e&&(e=new r(e,"binary")),n===t)u="string"==typeof e?new r(e):e;else if(c&&!s)try{u=i(e,t,n)}catch(l){console.error(l);try{u=o(e,t,n)}catch(l){console.error(l),u=e}}else try{u=o(e,t,n)}catch(l){console.error(l),u=e}return"string"==typeof u&&(u=new r(u,"utf-8")),u}function i(e,t,r){var n,i;return i=new c(r,t+"//TRANSLIT//IGNORE"),n=i.convert(e),n.slice(0,n.length)}function o(e,t,r){return"UTF-8"===t?s.decode(e,r):"UTF-8"===r?s.encode(e,t):s.encode(s.decode(e,r),t)}function a(e){return(e||"").toString().trim().replace(/^latin[\-_]?(\d+)$/i,"ISO-8859-$1").replace(/^win(?:dows)?[\-_]?(\d+)$/i,"WINDOWS-$1").replace(/^utf[\-_]?(\d+)$/i,"UTF-$1").replace(/^ks_c_5601\-1987$/i,"CP949").replace(/^us[\-_]?ascii$/i,"ASCII").toUpperCase()}var s=e("iconv-lite"),c=e("./iconv-loader");t.exports.convert=n}).call(this,e("buffer").Buffer)},{"./iconv-loader":11,buffer:7,"iconv-lite":34}],11:[function(e,t,r){"use strict";var n,i;try{n="iconv",i=e(n).Iconv}catch(o){}t.exports=i},{}],12:[function(t,r,n){(function(i,o){!function(t,i){"object"==typeof n&&"undefined"!=typeof r?r.exports=i():"function"==typeof e&&e.amd?e(i):t.ES6Promise=i()}(this,function(){"use strict";function e(e){return"function"==typeof e||"object"==typeof e&&null!==e}function r(e){return"function"==typeof e}function n(e){J=e}function a(e){Y=e}function s(){return function(){return i.nextTick(d)}}function c(){return function(){H(d)}}function u(){var e=0,t=new Q(d),r=document.createTextNode("");return t.observe(r,{characterData:!0}),function(){r.data=e=++e%2}}function l(){var e=new MessageChannel;return e.port1.onmessage=d,function(){return e.port2.postMessage(0)}}function f(){var e=setTimeout;return function(){return e(d,1)}}function d(){for(var e=0;G>e;e+=2){var t=re[e],r=re[e+1];t(r),re[e]=void 0,re[e+1]=void 0}G=0}function h(){try{var e=t,r=e("vertx");return H=r.runOnLoop||r.runOnContext,c()}catch(n){return f()}}function p(e,t){var r=arguments,n=this,i=new this.constructor(g);void 0===i[ie]&&Z(i);var o=n._state;return o?!function(){var e=r[o-1];Y(function(){return C(o,i,e,n._result)})}():O(n,i,e,t),i}function b(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var r=new t(g);return k(r,e),r}function g(){}function y(){return new TypeError("You cannot resolve a promise with itself")}function m(){return new TypeError("A promises callback cannot return that same promise.")}function v(e){try{return e.then}catch(t){return ce.error=t,ce}}function w(e,t,r,n){try{e.call(t,r,n)}catch(i){return i}}function _(e,t,r){Y(function(e){var n=!1,i=w(r,t,function(r){n||(n=!0,t!==r?k(e,r):T(e,r))},function(t){n||(n=!0,E(e,t))},"Settle: "+(e._label||" unknown promise"));!n&&i&&(n=!0,E(e,i))},e)}function x(e,t){t._state===ae?T(e,t._result):t._state===se?E(e,t._result):O(t,void 0,function(t){return k(e,t)},function(t){return E(e,t)})}function j(e,t,n){t.constructor===e.constructor&&n===p&&t.constructor.resolve===b?x(e,t):n===ce?E(e,ce.error):void 0===n?T(e,t):r(n)?_(e,t,n):T(e,t)}function k(t,r){t===r?E(t,y()):e(r)?j(t,r,v(r)):T(t,r)}function S(e){e._onerror&&e._onerror(e._result),A(e)}function T(e,t){e._state===oe&&(e._result=t,e._state=ae,0!==e._subscribers.length&&Y(A,e))}function E(e,t){e._state===oe&&(e._state=se,e._result=t,Y(S,e))}function O(e,t,r,n){var i=e._subscribers,o=i.length;e._onerror=null,i[o]=t,i[o+ae]=r,i[o+se]=n,0===o&&e._state&&Y(A,e)}function A(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n=void 0,i=void 0,o=e._result,a=0;a<t.length;a+=3)n=t[a],i=t[a+r],n?C(r,n,i,o):i(o);e._subscribers.length=0}}function L(){this.error=null}function I(e,t){try{return e(t)}catch(r){return ue.error=r,ue}}function C(e,t,n,i){var o=r(n),a=void 0,s=void 0,c=void 0,u=void 0;if(o){if(a=I(n,i),a===ue?(u=!0,s=a.error,a=null):c=!0,t===a)return void E(t,m())}else a=i,c=!0;t._state!==oe||(o&&c?k(t,a):u?E(t,s):e===ae?T(t,a):e===se&&E(t,a))}function R(e,t){try{t(function(t){k(e,t)},function(t){E(e,t)})}catch(r){E(e,r)}}function D(){return le++}function Z(e){e[ie]=le++,e._state=void 0,e._result=void 0,e._subscribers=[]}function B(e,t){this._instanceConstructor=e,this.promise=new e(g),this.promise[ie]||Z(this.promise),W(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?T(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&T(this.promise,this._result))):E(this.promise,P())}function P(){return new Error("Array Methods must be provided an Array")}function U(e){return new B(this,e).promise}function N(e){var t=this;return new t(W(e)?function(r,n){for(var i=e.length,o=0;i>o;o++)t.resolve(e[o]).then(r,n)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function M(e){var t=this,r=new t(g);return E(r,e),r}function F(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function q(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function z(e){this[ie]=D(),this._result=this._state=void 0,this._subscribers=[],g!==e&&("function"!=typeof e&&F(),this instanceof z?R(this,e):q())}function V(){var e=void 0;if("undefined"!=typeof o)e=o;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=e.Promise;if(r){var n=null;try{n=Object.prototype.toString.call(r.resolve())}catch(t){}if("[object Promise]"===n&&!r.cast)return}e.Promise=z}var K=void 0;K=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var W=K,G=0,H=void 0,J=void 0,Y=function(e,t){re[G]=e,re[G+1]=t,G+=2,2===G&&(J?J(d):ne())},$="undefined"!=typeof window?window:void 0,X=$||{},Q=X.MutationObserver||X.WebKitMutationObserver,ee="undefined"==typeof self&&"undefined"!=typeof i&&"[object process]"==={}.toString.call(i),te="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,re=new Array(1e3),ne=void 0;ne=ee?s():Q?u():te?l():void 0===$&&"function"==typeof t?h():f();var ie=Math.random().toString(36).substring(16),oe=void 0,ae=1,se=2,ce=new L,ue=new L,le=0;return B.prototype._enumerate=function(){for(var e=this.length,t=this._input,r=0;this._state===oe&&e>r;r++)this._eachEntry(t[r],r)},B.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,n=r.resolve;if(n===b){var i=v(e);if(i===p&&e._state!==oe)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(r===z){var o=new r(g);j(o,e,i),this._willSettleAt(o,t)}else this._willSettleAt(new r(function(t){return t(e)}),t)}else this._willSettleAt(n(e),t)},B.prototype._settledAt=function(e,t,r){var n=this.promise;n._state===oe&&(this._remaining--,e===se?E(n,r):this._result[t]=r),0===this._remaining&&T(n,this._result)},B.prototype._willSettleAt=function(e,t){var r=this;O(e,void 0,function(e){return r._settledAt(ae,t,e)},function(e){return r._settledAt(se,t,e)})},z.all=U,z.race=N,z.resolve=b,z.reject=M,z._setScheduler=n,z._setAsap=a,z._asap=Y,z.prototype={constructor:z,then:p,"catch":function(e){return this.then(null,e)}},V(),z.polyfill=V,z.Promise=z,z})}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:59}],13:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function o(e){return"number"==typeof e}function a(e){return"