imsc
Version:
Renders IMSC documents to HTML5 fragments
110 lines (108 loc) • 143 kB
JavaScript
/*
The buffer module from node.js, for the browser.
@author Feross Aboukhadijeh <https://feross.org>
@license MIT
Determine if an object is a Buffer
@author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
@license MIT
http://mths.be/fromcodepoint v0.1.0 by @mathias */
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(c,u,l){c!=Array.prototype&&c!=Object.prototype&&(c[u]=l.value)};$jscomp.getGlobal=function(c){return"undefined"!=typeof window&&window===c?c:"undefined"!=typeof global&&null!=global?global:c};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(c,u,l,n){if(u){l=$jscomp.global;c=c.split(".");for(n=0;n<c.length-1;n++){var b=c[n];b in l||(l[b]={});l=l[b]}c=c[c.length-1];n=l[c];u=u(n);u!=n&&null!=u&&$jscomp.defineProperty(l,c,{configurable:!0,writable:!0,value:u})}};$jscomp.polyfill("Array.prototype.fill",function(c){return c?c:function(c,l,n){var b=this.length||0;0>l&&(l=Math.max(0,b+l));if(null==n||n>b)n=b;n=Number(n);0>n&&(n=Math.max(0,b+n));for(l=Number(l||0);l<n;l++)this[l]=c;return this}},"es6","es3");
$jscomp.SYMBOL_PREFIX="jscomp_symbol_";$jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var c=0;return function(u){return $jscomp.SYMBOL_PREFIX+(u||"")+c++}}();
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var c=$jscomp.global.Symbol.iterator;c||(c=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[c]&&$jscomp.defineProperty(Array.prototype,c,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};
$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var c=$jscomp.global.Symbol.asyncIterator;c||(c=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.arrayIterator=function(c){var u=0;return $jscomp.iteratorPrototype(function(){return u<c.length?{done:!1,value:c[u++]}:{done:!0}})};
$jscomp.iteratorPrototype=function(c){$jscomp.initSymbolIterator();c={next:c};c[$jscomp.global.Symbol.iterator]=function(){return this};return c};$jscomp.iteratorFromArray=function(c,u){$jscomp.initSymbolIterator();c instanceof String&&(c+="");var l=0,n={next:function(){if(l<c.length){var b=l++;return{value:u(b,c[b]),done:!1}}n.next=function(){return{done:!0,value:void 0}};return n.next()}};n[Symbol.iterator]=function(){return n};return n};
$jscomp.polyfill("Array.prototype.keys",function(c){return c?c:function(){return $jscomp.iteratorFromArray(this,function(c){return c})}},"es6","es3");$jscomp.polyfill("Object.getOwnPropertySymbols",function(c){return c?c:function(){return[]}},"es6","es5");
$jscomp.polyfill("Reflect.ownKeys",function(c){return c?c:function(c){var l=[],n=Object.getOwnPropertyNames(c);c=Object.getOwnPropertySymbols(c);for(var b=0;b<n.length;b++)("jscomp_symbol_"==n[b].substring(0,14)?c:l).push(n[b]);return l.concat(c)}},"es6","es5");
$jscomp.polyfill("String.fromCodePoint",function(c){return c?c:function(c){for(var l="",n=0;n<arguments.length;n++){var b=Number(arguments[n]);if(0>b||1114111<b||b!==Math.floor(b))throw new RangeError("invalid_code_point "+b);65535>=b?l+=String.fromCharCode(b):(b-=65536,l+=String.fromCharCode(b>>>10&1023|55296),l+=String.fromCharCode(b&1023|56320))}return l}},"es6","es3");$jscomp.polyfill("Object.is",function(c){return c?c:function(c,l){return c===l?0!==c||1/c===1/l:c!==c&&l!==l}},"es6","es3");
$jscomp.polyfill("Array.prototype.includes",function(c){return c?c:function(c,l){var n=this;n instanceof String&&(n=String(n));var b=n.length;l=l||0;for(0>l&&(l=Math.max(l+b,0));l<b;l++){var m=n[l];if(m===c||Object.is(m,c))return!0}return!1}},"es7","es3");
$jscomp.checkStringArgs=function(c,u,l){if(null==c)throw new TypeError("The 'this' value for String.prototype."+l+" must not be null or undefined");if(u instanceof RegExp)throw new TypeError("First argument to String.prototype."+l+" must not be a regular expression");return c+""};$jscomp.polyfill("String.prototype.includes",function(c){return c?c:function(c,l){return-1!==$jscomp.checkStringArgs(this,c,"includes").indexOf(c,l||0)}},"es6","es3");
$jscomp.polyfill("Math.sign",function(c){return c?c:function(c){c=Number(c);return 0===c||isNaN(c)?c:0<c?1:-1}},"es6","es3");
(function(c){"object"===typeof exports&&"undefined"!==typeof module?module.exports=c():"function"===typeof define&&define.amd?define([],c):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).imsc=c()})(function(){return function(){function c(u,l,n){function b(p,v){if(!l[p]){if(!u[p]){var a="function"==typeof require&&require;if(!v&&a)return a(p,!0);if(m)return m(p,!0);v=Error("Cannot find module '"+p+"'");throw v.code="MODULE_NOT_FOUND",v;}v=
l[p]={exports:{}};u[p][0].call(v.exports,function(a){return b(u[p][1][a]||a)},v,v.exports,c,u,l,n)}return l[p].exports}for(var m="function"==typeof require&&require,p=0;p<n.length;p++)b(n[p]);return b}return c}()({1:[function(c,u,l){function n(b){var a=b.length;if(0<a%4)throw Error("Invalid string. Length must be a multiple of 4");b=b.indexOf("=");-1===b&&(b=a);return[b,b===a?0:4-b%4]}function b(b,a,h){for(var c=[],k=a;k<h;k+=3)a=(b[k]<<16&16711680)+(b[k+1]<<8&65280)+(b[k+2]&255),c.push(m[a>>18&63]+
m[a>>12&63]+m[a>>6&63]+m[a&63]);return c.join("")}l.byteLength=function(b){b=n(b);var a=b[1];return 3*(b[0]+a)/4-a};l.toByteArray=function(b){var a=n(b);var h=a[0];a=a[1];for(var c=new D(3*(h+a)/4-a),m=0,v=0<a?h-4:h,x=0;x<v;x+=4)h=p[b.charCodeAt(x)]<<18|p[b.charCodeAt(x+1)]<<12|p[b.charCodeAt(x+2)]<<6|p[b.charCodeAt(x+3)],c[m++]=h>>16&255,c[m++]=h>>8&255,c[m++]=h&255;2===a&&(h=p[b.charCodeAt(x)]<<2|p[b.charCodeAt(x+1)]>>4,c[m++]=h&255);1===a&&(h=p[b.charCodeAt(x)]<<10|p[b.charCodeAt(x+1)]<<4|p[b.charCodeAt(x+
2)]>>2,c[m++]=h>>8&255,c[m++]=h&255);return c};l.fromByteArray=function(c){for(var a=c.length,h=a%3,n=[],k=0,v=a-h;k<v;k+=16383)n.push(b(c,k,k+16383>v?v:k+16383));1===h?(c=c[a-1],n.push(m[c>>2]+m[c<<4&63]+"==")):2===h&&(c=(c[a-2]<<8)+c[a-1],n.push(m[c>>10]+m[c>>4&63]+m[c<<2&63]+"="));return n.join("")};var m=[],p=[],D="undefined"!==typeof Uint8Array?Uint8Array:Array;for(c=0;64>c;++c)m[c]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[c],p["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(c)]=
c;p[45]=62;p[95]=63},{}],2:[function(c,u,l){},{}],3:[function(c,u,l){function n(a){if(!a)return"utf8";for(var b;;)switch(a){case "utf8":case "utf-8":return"utf8";case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return"utf16le";case "latin1":case "binary":return"latin1";case "base64":case "ascii":case "hex":return a;default:if(b)return;a=(""+a).toLowerCase();b=!0}}function b(b){var c=n(b);if("string"!==typeof c&&(x.isEncoding===F||!F(b)))throw Error("Unknown encoding: "+b);this.encoding=c||
b;switch(this.encoding){case "utf16le":this.text=v;this.end=a;b=4;break;case "utf8":this.fillLast=D;b=4;break;case "base64":this.text=h;this.end=z;b=3;break;default:this.write=k;this.end=E;return}this.lastTotal=this.lastNeed=0;this.lastChar=x.allocUnsafe(b)}function m(a){return 127>=a?0:6===a>>5?2:14===a>>4?3:30===a>>3?4:2===a>>6?-1:-2}function p(a,b,d){var c=b.length-1;if(c<d)return 0;var f=m(b[c]);if(0<=f)return 0<f&&(a.lastNeed=f-1),f;if(--c<d||-2===f)return 0;f=m(b[c]);if(0<=f)return 0<f&&(a.lastNeed=
f-2),f;if(--c<d||-2===f)return 0;f=m(b[c]);return 0<=f?(0<f&&(2===f?f=0:a.lastNeed=f-3),f):0}function D(a){var b=this.lastTotal-this.lastNeed;a:if(128!==(a[0]&192)){this.lastNeed=0;var d="\ufffd"}else{if(1<this.lastNeed&&1<a.length){if(128!==(a[1]&192)){this.lastNeed=1;d="\ufffd";break a}if(2<this.lastNeed&&2<a.length&&128!==(a[2]&192)){this.lastNeed=2;d="\ufffd";break a}}d=void 0}if(void 0!==d)return d;if(this.lastNeed<=a.length)return a.copy(this.lastChar,b,0,this.lastNeed),this.lastChar.toString(this.encoding,
0,this.lastTotal);a.copy(this.lastChar,b,0,a.length);this.lastNeed-=a.length}function v(a,b){if(0===(a.length-b)%2){if(b=a.toString("utf16le",b)){var d=b.charCodeAt(b.length-1);if(55296<=d&&56319>=d)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1],b.slice(0,-1)}return b}this.lastNeed=1;this.lastTotal=2;this.lastChar[0]=a[a.length-1];return a.toString("utf16le",b,a.length-1)}function a(a){a=a&&a.length?this.write(a):"";return this.lastNeed?a+this.lastChar.toString("utf16le",
0,this.lastTotal-this.lastNeed):a}function h(a,b){var d=(a.length-b)%3;if(0===d)return a.toString("base64",b);this.lastNeed=3-d;this.lastTotal=3;1===d?this.lastChar[0]=a[a.length-1]:(this.lastChar[0]=a[a.length-2],this.lastChar[1]=a[a.length-1]);return a.toString("base64",b,a.length-d)}function z(a){a=a&&a.length?this.write(a):"";return this.lastNeed?a+this.lastChar.toString("base64",0,3-this.lastNeed):a}function k(a){return a.toString(this.encoding)}function E(a){return a&&a.length?this.write(a):
""}var x=c("safe-buffer").Buffer,F=x.isEncoding||function(a){a=""+a;switch(a&&a.toLowerCase()){case "hex":case "utf8":case "utf-8":case "ascii":case "binary":case "base64":case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":case "raw":return!0;default:return!1}};l.StringDecoder=b;b.prototype.write=function(a){if(0===a.length)return"";if(this.lastNeed){var b=this.fillLast(a);if(void 0===b)return"";var d=this.lastNeed;this.lastNeed=0}else d=0;return d<a.length?b?b+this.text(a,d):this.text(a,d):
b||""};b.prototype.end=function(a){a=a&&a.length?this.write(a):"";return this.lastNeed?a+"\ufffd":a};b.prototype.text=function(a,b){var d=p(this,a,b);if(!this.lastNeed)return a.toString("utf8",b);this.lastTotal=d;d=a.length-(d-this.lastNeed);a.copy(this.lastChar,0,d);return a.toString("utf8",b,d)};b.prototype.fillLast=function(a){if(this.lastNeed<=a.length)return a.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);a.copy(this.lastChar,
this.lastTotal-this.lastNeed,0,a.length);this.lastNeed-=a.length}},{"safe-buffer":25}],4:[function(c,u,l){(function(n){var b=c("buffer"),m=b.Buffer,p=b.SlowBuffer,D=b.kMaxLength||2147483647;l.alloc=function(b,a,c){if("function"===typeof m.alloc)return m.alloc(b,a,c);if("number"===typeof c)throw new TypeError("encoding must not be number");if("number"!==typeof b)throw new TypeError("size must be a number");if(b>D)throw new RangeError("size is too large");var h=a;void 0===h&&(c=void 0,h=0);a=new m(b);
if("string"===typeof h){c=new m(h,c);h=c.length;for(var n=-1;++n<b;)a[n]=c[n%h]}else a.fill(h);return a};l.allocUnsafe=function(b){if("function"===typeof m.allocUnsafe)return m.allocUnsafe(b);if("number"!==typeof b)throw new TypeError("size must be a number");if(b>D)throw new RangeError("size is too large");return new m(b)};l.from=function(b,a,c){if("function"===typeof m.from&&(!n.Uint8Array||Uint8Array.from!==m.from))return m.from(b,a,c);if("number"===typeof b)throw new TypeError('"value" argument must not be a number');
if("string"===typeof b)return new m(b,a);if("undefined"!==typeof ArrayBuffer&&b instanceof ArrayBuffer){var h=a;if(1===arguments.length)return new m(b);"undefined"===typeof h&&(h=0);var k=c;"undefined"===typeof k&&(k=b.byteLength-h);if(h>=b.byteLength)throw new RangeError("'offset' is out of bounds");if(k>b.byteLength-h)throw new RangeError("'length' is out of bounds");return new m(b.slice(h,h+k))}if(m.isBuffer(b))return h=new m(b.length),b.copy(h,0,0,b.length),h;if(b){if(Array.isArray(b)||"undefined"!==
typeof ArrayBuffer&&b.buffer instanceof ArrayBuffer||"length"in b)return new m(b);if("Buffer"===b.type&&Array.isArray(b.data))return new m(b.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");};l.allocUnsafeSlow=function(b){if("function"===typeof m.allocUnsafeSlow)return m.allocUnsafeSlow(b);if("number"!==typeof b)throw new TypeError("size must be a number");if(b>=D)throw new RangeError("size is too large");return new p(b)}}).call(this,
"undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{})},{buffer:5}],5:[function(c,u,l){function n(e){if(e>C)throw new RangeError('The value "'+e+'" is invalid for option "size"');e=new Uint8Array(e);e.__proto__=b.prototype;return e}function b(e,g,a){if("number"===typeof e){if("string"===typeof g)throw new TypeError('The "string" argument must be of type string. Received type number');return D(e)}return m(e,g,a)}function m(e,g,d){if("string"===typeof e){var I=
g;if("string"!==typeof I||""===I)I="utf8";if(!b.isEncoding(I))throw new TypeError("Unknown encoding: "+I);g=z(e,I)|0;d=n(g);e=d.write(e,I);e!==g&&(d=d.slice(0,e));return d}if(ArrayBuffer.isView(e))return v(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(y(e,ArrayBuffer)||e&&y(e.buffer,ArrayBuffer)){if(0>g||e.byteLength<g)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<
g+(d||0))throw new RangeError('"length" is outside of buffer bounds');e=void 0===g&&void 0===d?new Uint8Array(e):void 0===d?new Uint8Array(e,g):new Uint8Array(e,g,d);e.__proto__=b.prototype;return e}if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');I=e.valueOf&&e.valueOf();if(null!=I&&I!==e)return b.from(I,g,d);if(I=a(e))return I;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return b.from(e[Symbol.toPrimitive]("string"),
g,d);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);}function p(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(0>e)throw new RangeError('The value "'+e+'" is invalid for option "size"');}function D(e){p(e);return n(0>e?0:h(e)|0)}function v(e){for(var g=0>e.length?0:h(e.length)|0,a=n(g),b=0;b<g;b+=1)a[b]=e[b]&255;return a}function a(e){if(b.isBuffer(e)){var g=
h(e.length)|0,a=n(g);if(0===a.length)return a;e.copy(a,0,0,g);return a}if(void 0!==e.length)return(g="number"!==typeof e.length)||(g=e.length,g=g!==g),g?n(0):v(e);if("Buffer"===e.type&&Array.isArray(e.data))return v(e.data)}function h(e){if(e>=C)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C.toString(16)+" bytes");return e|0}function z(e,g){if(b.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||y(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 a=e.length,d=2<arguments.length&&!0===arguments[2];if(!d&&0===a)return 0;for(var f=!1;;)switch(g){case "ascii":case "latin1":case "binary":return a;case "utf8":case "utf-8":return q(e).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return 2*a;case "hex":return a>>>1;case "base64":return A.toByteArray(K(e)).length;default:if(f)return d?-1:q(e).length;g=(""+g).toLowerCase();f=!0}}function k(e,g,a){var b=!1;if(void 0===g||0>g)g=0;if(g>this.length)return"";if(void 0===a||
a>this.length)a=this.length;if(0>=a)return"";a>>>=0;g>>>=0;if(a<=g)return"";for(e||(e="utf8");;)switch(e){case "hex":e=g;g=a;a=this.length;if(!e||0>e)e=0;if(!g||0>g||g>a)g=a;b="";for(a=e;a<g;++a)e=b,b=this[a],b=16>b?"0"+b.toString(16):b.toString(16),b=e+b;return b;case "utf8":case "utf-8":return J(this,g,a);case "ascii":e="";for(a=Math.min(this.length,a);g<a;++g)e+=String.fromCharCode(this[g]&127);return e;case "latin1":case "binary":e="";for(a=Math.min(this.length,a);g<a;++g)e+=String.fromCharCode(this[g]);
return e;case "base64":return g=0===g&&a===this.length?A.fromByteArray(this):A.fromByteArray(this.slice(g,a)),g;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":g=this.slice(g,a);a="";for(e=0;e<g.length;e+=2)a+=String.fromCharCode(g[e]+256*g[e+1]);return a;default:if(b)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase();b=!0}}function E(e,g,a){var b=e[g];e[g]=e[a];e[a]=b}function x(e,g,a,d,f){if(0===e.length)return-1;"string"===typeof a?(d=a,a=0):2147483647<a?a=2147483647:-2147483648>
a&&(a=-2147483648);a=+a;a!==a&&(a=f?0:e.length-1);0>a&&(a=e.length+a);if(a>=e.length){if(f)return-1;a=e.length-1}else if(0>a)if(f)a=0;else return-1;"string"===typeof g&&(g=b.from(g,d));if(b.isBuffer(g))return 0===g.length?-1:F(e,g,a,d,f);if("number"===typeof g)return g&=255,"function"===typeof Uint8Array.prototype.indexOf?f?Uint8Array.prototype.indexOf.call(e,g,a):Uint8Array.prototype.lastIndexOf.call(e,g,a):F(e,[g],a,d,f);throw new TypeError("val must be string, number or Buffer");}function F(e,
g,a,b,d){function f(e,g){return 1===I?e[g]:e.readUInt16BE(g*I)}var I=1,c=e.length,q=g.length;if(void 0!==b&&(b=String(b).toLowerCase(),"ucs2"===b||"ucs-2"===b||"utf16le"===b||"utf-16le"===b)){if(2>e.length||2>g.length)return-1;I=2;c/=2;q/=2;a/=2}if(d)for(b=-1;a<c;a++)if(f(e,a)===f(g,-1===b?0:a-b)){if(-1===b&&(b=a),a-b+1===q)return b*I}else-1!==b&&(a-=a-b),b=-1;else for(a+q>c&&(a=c-q);0<=a;a--){c=!0;for(b=0;b<q;b++)if(f(e,a+b)!==f(g,b)){c=!1;break}if(c)return a}return-1}function J(e,g,a){a=Math.min(e.length,
a);for(var b=[];g<a;){var d=e[g],f=null,I=239<d?4:223<d?3:191<d?2:1;if(g+I<=a)switch(I){case 1:128>d&&(f=d);break;case 2:var c=e[g+1];128===(c&192)&&(d=(d&31)<<6|c&63,127<d&&(f=d));break;case 3:c=e[g+1];var q=e[g+2];128===(c&192)&&128===(q&192)&&(d=(d&15)<<12|(c&63)<<6|q&63,2047<d&&(55296>d||57343<d)&&(f=d));break;case 4:c=e[g+1];q=e[g+2];var w=e[g+3];128===(c&192)&&128===(q&192)&&128===(w&192)&&(d=(d&15)<<18|(c&63)<<12|(q&63)<<6|w&63,65535<d&&1114112>d&&(f=d))}null===f?(f=65533,I=1):65535<f&&(f-=
65536,b.push(f>>>10&1023|55296),f=56320|f&1023);b.push(f);g+=I}e=b.length;if(e<=O)b=String.fromCharCode.apply(String,b);else{a="";for(g=0;g<e;)a+=String.fromCharCode.apply(String,b.slice(g,g+=O));b=a}return b}function B(e,g,a){if(0!==e%1||0>e)throw new RangeError("offset is not uint");if(e+g>a)throw new RangeError("Trying to access beyond buffer length");}function d(e,g,a,d,f,c){if(!b.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(g>f||g<c)throw new RangeError('"value" argument is out of bounds');
if(a+d>e.length)throw new RangeError("Index out of range");}function w(e,g,a,b,d,f){if(a+b>e.length)throw new RangeError("Index out of range");if(0>a)throw new RangeError("Index out of range");}function f(e,g,a,b,d){g=+g;a>>>=0;d||w(e,g,a,4,3.4028234663852886E38,-3.4028234663852886E38);L.write(e,g,a,b,23,4);return a+4}function t(e,g,a,b,d){g=+g;a>>>=0;d||w(e,g,a,8,1.7976931348623157E308,-1.7976931348623157E308);L.write(e,g,a,b,52,8);return a+8}function K(e){e=e.split("=")[0];e=e.trim().replace(Q,
"");if(2>e.length)return"";for(;0!==e.length%4;)e+="=";return e}function q(e,g){g=g||Infinity;for(var a,b=e.length,d=null,f=[],c=0;c<b;++c){a=e.charCodeAt(c);if(55295<a&&57344>a){if(!d){if(56319<a){-1<(g-=3)&&f.push(239,191,189);continue}else if(c+1===b){-1<(g-=3)&&f.push(239,191,189);continue}d=a;continue}if(56320>a){-1<(g-=3)&&f.push(239,191,189);d=a;continue}a=(d-55296<<10|a-56320)+65536}else d&&-1<(g-=3)&&f.push(239,191,189);d=null;if(128>a){if(0>--g)break;f.push(a)}else if(2048>a){if(0>(g-=2))break;
f.push(a>>6|192,a&63|128)}else if(65536>a){if(0>(g-=3))break;f.push(a>>12|224,a>>6&63|128,a&63|128)}else if(1114112>a){if(0>(g-=4))break;f.push(a>>18|240,a>>12&63|128,a>>6&63|128,a&63|128)}else throw Error("Invalid code point");}return f}function M(e){for(var a=[],b=0;b<e.length;++b)a.push(e.charCodeAt(b)&255);return a}function H(e,a,b,d){for(var g=0;g<d&&!(g+b>=a.length||g>=e.length);++g)a[g+b]=e[g];return g}function y(e,a){return e instanceof a||null!=e&&null!=e.constructor&&null!=e.constructor.name&&
e.constructor.name===a.name}var A=c("base64-js"),L=c("ieee754");l.Buffer=b;l.SlowBuffer=function(e){+e!=e&&(e=0);return b.alloc(+e)};l.INSPECT_MAX_BYTES=50;var C=2147483647;l.kMaxLength=C;b.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return 42===e.foo()}catch(g){return!1}}();b.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(b.prototype,"parent",{enumerable:!0,get:function(){if(b.isBuffer(this))return this.buffer}});Object.defineProperty(b.prototype,"offset",{enumerable:!0,get:function(){if(b.isBuffer(this))return this.byteOffset}});"undefined"!==typeof Symbol&&null!=Symbol.species&&b[Symbol.species]===b&&Object.defineProperty(b,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1});b.poolSize=8192;b.from=function(e,a,b){return m(e,a,b)};b.prototype.__proto__=Uint8Array.prototype;
b.__proto__=Uint8Array;b.alloc=function(e,a,b){p(e);e=0>=e?n(e):void 0!==a?"string"===typeof b?n(e).fill(a,b):n(e).fill(a):n(e);return e};b.allocUnsafe=function(e){return D(e)};b.allocUnsafeSlow=function(e){return D(e)};b.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==b.prototype};b.compare=function(e,a){y(e,Uint8Array)&&(e=b.from(e,e.offset,e.byteLength));y(a,Uint8Array)&&(a=b.from(a,a.offset,a.byteLength));if(!b.isBuffer(e)||!b.isBuffer(a))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
if(e===a)return 0;for(var g=e.length,d=a.length,f=0,c=Math.min(g,d);f<c;++f)if(e[f]!==a[f]){g=e[f];d=a[f];break}return g<d?-1:d<g?1:0};b.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}};b.concat=function(e,a){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return b.alloc(0);
var g;if(void 0===a)for(g=a=0;g<e.length;++g)a+=e[g].length;a=b.allocUnsafe(a);var d=0;for(g=0;g<e.length;++g){var f=e[g];y(f,Uint8Array)&&(f=b.from(f));if(!b.isBuffer(f))throw new TypeError('"list" argument must be an Array of Buffers');f.copy(a,d);d+=f.length}return a};b.byteLength=z;b.prototype._isBuffer=!0;b.prototype.swap16=function(){var e=this.length;if(0!==e%2)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var a=0;a<e;a+=2)E(this,a,a+1);return this};b.prototype.swap32=
function(){var e=this.length;if(0!==e%4)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var a=0;a<e;a+=4)E(this,a,a+3),E(this,a+1,a+2);return this};b.prototype.swap64=function(){var e=this.length;if(0!==e%8)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var a=0;a<e;a+=8)E(this,a,a+7),E(this,a+1,a+6),E(this,a+2,a+5),E(this,a+3,a+4);return this};b.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?J(this,0,e):k.apply(this,
arguments)};b.prototype.toLocaleString=b.prototype.toString;b.prototype.equals=function(e){if(!b.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===b.compare(this,e)};b.prototype.inspect=function(){var e=l.INSPECT_MAX_BYTES;var a=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim();this.length>e&&(a+=" ... ");return"<Buffer "+a+">"};b.prototype.compare=function(e,a,d,f,c){y(e,Uint8Array)&&(e=b.from(e,e.offset,e.byteLength));if(!b.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+
typeof e);void 0===a&&(a=0);void 0===d&&(d=e?e.length:0);void 0===f&&(f=0);void 0===c&&(c=this.length);if(0>a||d>e.length||0>f||c>this.length)throw new RangeError("out of range index");if(f>=c&&a>=d)return 0;if(f>=c)return-1;if(a>=d)return 1;a>>>=0;d>>>=0;f>>>=0;c>>>=0;if(this===e)return 0;var g=c-f,q=d-a,w=Math.min(g,q);f=this.slice(f,c);e=e.slice(a,d);for(a=0;a<w;++a)if(f[a]!==e[a]){g=f[a];q=e[a];break}return g<q?-1:q<g?1:0};b.prototype.includes=function(e,a,b){return-1!==this.indexOf(e,a,b)};b.prototype.indexOf=
function(e,a,b){return x(this,e,a,b,!0)};b.prototype.lastIndexOf=function(e,a,b){return x(this,e,a,b,!1)};b.prototype.write=function(a,g,b,d){if(void 0===g)d="utf8",b=this.length,g=0;else if(void 0===b&&"string"===typeof g)d=g,b=this.length,g=0;else if(isFinite(g))g>>>=0,isFinite(b)?(b>>>=0,void 0===d&&(d="utf8")):(d=b,b=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var e=this.length-g;if(void 0===b||b>e)b=e;if(0<a.length&&(0>b||0>g)||g>this.length)throw new RangeError("Attempt to write outside buffer bounds");
d||(d="utf8");for(e=!1;;)switch(d){case "hex":a:{g=Number(g)||0;d=this.length-g;b?(b=Number(b),b>d&&(b=d)):b=d;d=a.length;b>d/2&&(b=d/2);for(d=0;d<b;++d){e=parseInt(a.substr(2*d,2),16);if(e!==e){a=d;break a}this[g+d]=e}a=d}return a;case "utf8":case "utf-8":return H(q(a,this.length-g),this,g,b);case "ascii":return H(M(a),this,g,b);case "latin1":case "binary":return H(M(a),this,g,b);case "base64":return H(A.toByteArray(K(a)),this,g,b);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":d=a;e=this.length-
g;for(var f=[],c=0;c<d.length&&!(0>(e-=2));++c){var w=d.charCodeAt(c);a=w>>8;w%=256;f.push(w);f.push(a)}return H(f,this,g,b);default:if(e)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase();e=!0}};b.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;b.prototype.slice=function(a,g){var e=this.length;a=~~a;g=void 0===g?e:~~g;0>a?(a+=e,0>a&&(a=0)):a>e&&(a=e);0>g?(g+=e,0>g&&(g=0)):g>e&&(g=e);g<a&&(g=a);a=this.subarray(a,g);a.__proto__=
b.prototype;return a};b.prototype.readUIntLE=function(a,g,b){a>>>=0;g>>>=0;b||B(a,g,this.length);b=this[a];for(var e=1,d=0;++d<g&&(e*=256);)b+=this[a+d]*e;return b};b.prototype.readUIntBE=function(a,g,b){a>>>=0;g>>>=0;b||B(a,g,this.length);b=this[a+--g];for(var e=1;0<g&&(e*=256);)b+=this[a+--g]*e;return b};b.prototype.readUInt8=function(a,g){a>>>=0;g||B(a,1,this.length);return this[a]};b.prototype.readUInt16LE=function(a,g){a>>>=0;g||B(a,2,this.length);return this[a]|this[a+1]<<8};b.prototype.readUInt16BE=
function(a,g){a>>>=0;g||B(a,2,this.length);return this[a]<<8|this[a+1]};b.prototype.readUInt32LE=function(a,g){a>>>=0;g||B(a,4,this.length);return(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]};b.prototype.readUInt32BE=function(a,g){a>>>=0;g||B(a,4,this.length);return 16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])};b.prototype.readIntLE=function(a,g,b){a>>>=0;g>>>=0;b||B(a,g,this.length);b=this[a];for(var e=1,d=0;++d<g&&(e*=256);)b+=this[a+d]*e;b>=128*e&&(b-=Math.pow(2,8*g));return b};
b.prototype.readIntBE=function(a,g,b){a>>>=0;g>>>=0;b||B(a,g,this.length);b=g;for(var e=1,d=this[a+--b];0<b&&(e*=256);)d+=this[a+--b]*e;d>=128*e&&(d-=Math.pow(2,8*g));return d};b.prototype.readInt8=function(a,g){a>>>=0;g||B(a,1,this.length);return this[a]&128?-1*(255-this[a]+1):this[a]};b.prototype.readInt16LE=function(a,g){a>>>=0;g||B(a,2,this.length);a=this[a]|this[a+1]<<8;return a&32768?a|4294901760:a};b.prototype.readInt16BE=function(a,g){a>>>=0;g||B(a,2,this.length);a=this[a+1]|this[a]<<8;return a&
32768?a|4294901760:a};b.prototype.readInt32LE=function(a,g){a>>>=0;g||B(a,4,this.length);return this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24};b.prototype.readInt32BE=function(a,g){a>>>=0;g||B(a,4,this.length);return this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]};b.prototype.readFloatLE=function(a,g){a>>>=0;g||B(a,4,this.length);return L.read(this,a,!0,23,4)};b.prototype.readFloatBE=function(a,g){a>>>=0;g||B(a,4,this.length);return L.read(this,a,!1,23,4)};b.prototype.readDoubleLE=function(a,
g){a>>>=0;g||B(a,8,this.length);return L.read(this,a,!0,52,8)};b.prototype.readDoubleBE=function(a,g){a>>>=0;g||B(a,8,this.length);return L.read(this,a,!1,52,8)};b.prototype.writeUIntLE=function(a,g,b,f){a=+a;g>>>=0;b>>>=0;f||d(this,a,g,b,Math.pow(2,8*b)-1,0);f=1;var e=0;for(this[g]=a&255;++e<b&&(f*=256);)this[g+e]=a/f&255;return g+b};b.prototype.writeUIntBE=function(a,b,f,c){a=+a;b>>>=0;f>>>=0;c||d(this,a,b,f,Math.pow(2,8*f)-1,0);c=f-1;var e=1;for(this[b+c]=a&255;0<=--c&&(e*=256);)this[b+c]=a/e&
255;return b+f};b.prototype.writeUInt8=function(a,b,f){a=+a;b>>>=0;f||d(this,a,b,1,255,0);this[b]=a&255;return b+1};b.prototype.writeUInt16LE=function(a,b,f){a=+a;b>>>=0;f||d(this,a,b,2,65535,0);this[b]=a&255;this[b+1]=a>>>8;return b+2};b.prototype.writeUInt16BE=function(a,b,f){a=+a;b>>>=0;f||d(this,a,b,2,65535,0);this[b]=a>>>8;this[b+1]=a&255;return b+2};b.prototype.writeUInt32LE=function(a,b,f){a=+a;b>>>=0;f||d(this,a,b,4,4294967295,0);this[b+3]=a>>>24;this[b+2]=a>>>16;this[b+1]=a>>>8;this[b]=a&
255;return b+4};b.prototype.writeUInt32BE=function(a,b,f){a=+a;b>>>=0;f||d(this,a,b,4,4294967295,0);this[b]=a>>>24;this[b+1]=a>>>16;this[b+2]=a>>>8;this[b+3]=a&255;return b+4};b.prototype.writeIntLE=function(a,b,f,c){a=+a;b>>>=0;c||(c=Math.pow(2,8*f-1),d(this,a,b,f,c-1,-c));c=0;var e=1,g=0;for(this[b]=a&255;++c<f&&(e*=256);)0>a&&0===g&&0!==this[b+c-1]&&(g=1),this[b+c]=(a/e>>0)-g&255;return b+f};b.prototype.writeIntBE=function(a,b,f,c){a=+a;b>>>=0;c||(c=Math.pow(2,8*f-1),d(this,a,b,f,c-1,-c));c=f-
1;var e=1,g=0;for(this[b+c]=a&255;0<=--c&&(e*=256);)0>a&&0===g&&0!==this[b+c+1]&&(g=1),this[b+c]=(a/e>>0)-g&255;return b+f};b.prototype.writeInt8=function(a,b,f){a=+a;b>>>=0;f||d(this,a,b,1,127,-128);0>a&&(a=255+a+1);this[b]=a&255;return b+1};b.prototype.writeInt16LE=function(a,b,f){a=+a;b>>>=0;f||d(this,a,b,2,32767,-32768);this[b]=a&255;this[b+1]=a>>>8;return b+2};b.prototype.writeInt16BE=function(a,b,f){a=+a;b>>>=0;f||d(this,a,b,2,32767,-32768);this[b]=a>>>8;this[b+1]=a&255;return b+2};b.prototype.writeInt32LE=
function(a,b,f){a=+a;b>>>=0;f||d(this,a,b,4,2147483647,-2147483648);this[b]=a&255;this[b+1]=a>>>8;this[b+2]=a>>>16;this[b+3]=a>>>24;return b+4};b.prototype.writeInt32BE=function(a,b,f){a=+a;b>>>=0;f||d(this,a,b,4,2147483647,-2147483648);0>a&&(a=4294967295+a+1);this[b]=a>>>24;this[b+1]=a>>>16;this[b+2]=a>>>8;this[b+3]=a&255;return b+4};b.prototype.writeFloatLE=function(a,b,d){return f(this,a,b,!0,d)};b.prototype.writeFloatBE=function(a,b,d){return f(this,a,b,!1,d)};b.prototype.writeDoubleLE=function(a,
b,d){return t(this,a,b,!0,d)};b.prototype.writeDoubleBE=function(a,b,d){return t(this,a,b,!1,d)};b.prototype.copy=function(a,d,f,c){if(!b.isBuffer(a))throw new TypeError("argument should be a Buffer");f||(f=0);c||0===c||(c=this.length);d>=a.length&&(d=a.length);d||(d=0);0<c&&c<f&&(c=f);if(c===f||0===a.length||0===this.length)return 0;if(0>d)throw new RangeError("targetStart out of bounds");if(0>f||f>=this.length)throw new RangeError("Index out of range");if(0>c)throw new RangeError("sourceEnd out of bounds");
c>this.length&&(c=this.length);a.length-d<c-f&&(c=a.length-d+f);var e=c-f;if(this===a&&"function"===typeof Uint8Array.prototype.copyWithin)this.copyWithin(d,f,c);else if(this===a&&f<d&&d<c)for(c=e-1;0<=c;--c)a[c+d]=this[c+f];else Uint8Array.prototype.set.call(a,this.subarray(f,c),d);return e};b.prototype.fill=function(a,d,f,c){if("string"===typeof a){"string"===typeof d?(c=d,d=0,f=this.length):"string"===typeof f&&(c=f,f=this.length);if(void 0!==c&&"string"!==typeof c)throw new TypeError("encoding must be a string");
if("string"===typeof c&&!b.isEncoding(c))throw new TypeError("Unknown encoding: "+c);if(1===a.length){var e=a.charCodeAt(0);if("utf8"===c&&128>e||"latin1"===c)a=e}}else"number"===typeof a&&(a&=255);if(0>d||this.length<d||this.length<f)throw new RangeError("Out of range index");if(f<=d)return this;d>>>=0;f=void 0===f?this.length:f>>>0;a||(a=0);if("number"===typeof a)for(c=d;c<f;++c)this[c]=a;else{e=b.isBuffer(a)?a:b.from(a,c);var g=e.length;if(0===g)throw new TypeError('The value "'+a+'" is invalid for argument "value"');
for(c=0;c<f-d;++c)this[c+d]=e[c%g]}return this};var Q=/[^+/0-9A-Za-z-_]/g},{"base64-js":1,ieee754:8}],6:[function(c,u,l){(function(c){l.isArray=function(b){return Array.isArray?Array.isArray(b):"[object Array]"===Object.prototype.toString.call(b)};l.isBoolean=function(b){return"boolean"===typeof b};l.isNull=function(b){return null===b};l.isNullOrUndefined=function(b){return null==b};l.isNumber=function(b){return"number"===typeof b};l.isString=function(b){return"string"===typeof b};l.isSymbol=function(b){return"symbol"===
typeof b};l.isUndefined=function(b){return void 0===b};l.isRegExp=function(b){return"[object RegExp]"===Object.prototype.toString.call(b)};l.isObject=function(b){return"object"===typeof b&&null!==b};l.isDate=function(b){return"[object Date]"===Object.prototype.toString.call(b)};l.isError=function(b){return"[object Error]"===Object.prototype.toString.call(b)||b instanceof Error};l.isFunction=function(b){return"function"===typeof b};l.isPrimitive=function(b){return null===b||"boolean"===typeof b||"number"===
typeof b||"string"===typeof b||"symbol"===typeof b||"undefined"===typeof b};l.isBuffer=c.isBuffer}).call(this,{isBuffer:c("../../is-buffer/index.js")})},{"../../is-buffer/index.js":10}],7:[function(c,u,l){function n(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=E(null),this._eventsCount=0);this._maxListeners=this._maxListeners||void 0}function b(a,b,f,c){var d;if("function"!==typeof f)throw new TypeError('"listener" argument must be a function');if(d=a._events){d.newListener&&
(a.emit("newListener",b,f.listener?f.listener:f),d=a._events);var q=d[b]}else d=a._events=E(null),a._eventsCount=0;q?("function"===typeof q?q=d[b]=c?[f,q]:[q,f]:c?q.unshift(f):q.push(f),q.warned||(f=void 0===a._maxListeners?n.defaultMaxListeners:a._maxListeners)&&0<f&&q.length>f&&(q.warned=!0,f=Error("Possible EventEmitter memory leak detected. "+q.length+' "'+String(b)+'" listeners added. Use emitter.setMaxListeners() to increase limit.'),f.name="MaxListenersExceededWarning",f.emitter=a,f.type=b,
f.count=q.length,"object"===typeof console&&console.warn&&console.warn("%s: %s",f.name,f.message))):(d[b]=f,++a._eventsCount);return a}function m(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);
default:for(var a=Array(arguments.length),b=0;b<a.length;++b)a[b]=arguments[b];this.listener.apply(this.target,a)}}function p(a,b,f){a={fired:!1,wrapFn:void 0,target:a,type:b,listener:f};b=F.call(m,a);b.listener=f;return a.wrapFn=b}function D(b,c,f){b=b._events;if(!b)return[];c=b[c];if(!c)return[];if("function"===typeof c)return f?[c.listener||c]:[c];if(f)for(f=Array(c.length),b=0;b<f.length;++b)f[b]=c[b].listener||c[b];else f=a(c,c.length);return f}function v(a){var b=this._events;if(b){a=b[a];if("function"===
typeof a)return 1;if(a)return a.length}return 0}function a(a,b){for(var d=Array(b),c=0;c<b;++c)d[c]=a[c];return d}function h(a){var b=function(){};b.prototype=a;return new b}function z(a){var b=[],d;for(d in a)Object.prototype.hasOwnProperty.call(a,d)&&b.push(d);return d}function k(a){var b=this;return function(){return b.apply(a,arguments)}}var E=Object.create||h,x=Object.keys||z,F=Function.prototype.bind||k;u.exports=n;n.EventEmitter=n;n.prototype._events=void 0;n.prototype._maxListeners=void 0;
var J=10;try{c={};Object.defineProperty&&Object.defineProperty(c,"x",{value:0});var B=0===c.x}catch(d){B=!1}B?Object.defineProperty(n,"defaultMaxListeners",{enumerable:!0,get:function(){return J},set:function(a){if("number"!==typeof a||0>a||a!==a)throw new TypeError('"defaultMaxListeners" must be a positive number');J=a}}):n.defaultMaxListeners=J;n.prototype.setMaxListeners=function(a){if("number"!==typeof a||0>a||isNaN(a))throw new TypeError('"n" argument must be a positive number');this._maxListeners=
a;return this};n.prototype.getMaxListeners=function(){return void 0===this._maxListeners?n.defaultMaxListeners:this._maxListeners};n.prototype.emit=function(b){var d,f,c;var h="error"===b;if(c=this._events)h=h&&null==c.error;else if(!h)return!1;if(h){1<arguments.length&&(d=arguments[1]);if(d instanceof Error)throw d;c=Error('Unhandled "error" event. ('+d+")");c.context=d;throw c;}d=c[b];if(!d)return!1;c="function"===typeof d;var q=arguments.length;switch(q){case 1:if(c)d.call(this);else for(c=d.length,
d=a(d,c),h=0;h<c;++h)d[h].call(this);break;case 2:h=arguments[1];if(c)d.call(this,h);else for(c=d.length,d=a(d,c),q=0;q<c;++q)d[q].call(this,h);break;case 3:h=arguments[1];q=arguments[2];if(c)d.call(this,h,q);else for(c=d.length,d=a(d,c),f=0;f<c;++f)d[f].call(this,h,q);break;case 4:h=arguments[1];q=arguments[2];f=arguments[3];if(c)d.call(this,h,q,f);else{c=d.length;d=a(d,c);for(var m=0;m<c;++m)d[m].call(this,h,q,f)}break;default:h=Array(q-1);for(f=1;f<q;f++)h[f-1]=arguments[f];if(c)d.apply(this,h);
else for(c=d.length,d=a(d,c),q=0;q<c;++q)d[q].apply(this,h)}return!0};n.prototype.addListener=function(a,c){return b(this,a,c,!1)};n.prototype.on=n.prototype.addListener;n.prototype.prependListener=function(a,c){return b(this,a,c,!0)};n.prototype.once=function(a,b){if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');this.on(a,p(this,a,b));return this};n.prototype.prependOnceListener=function(a,b){if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');
this.prependListener(a,p(this,a,b));return this};n.prototype.removeListener=function(a,b){var d;if("function"!==typeof b)throw new TypeError('"listener" argument must be a function');var c=this._events;if(!c)return this;var h=c[a];if(!h)return this;if(h===b||h.listener===b)0===--this._eventsCount?this._events=E(null):(delete c[a],c.removeListener&&this.emit("removeListener",a,h.listener||b));else if("function"!==typeof h){var q=-1;for(d=h.length-1;0<=d;d--)if(h[d]===b||h[d].listener===b){var m=h[d].listener;
q=d;break}if(0>q)return this;if(0===q)h.shift();else{d=q+1;for(var n=h.length;d<n;q+=1,d+=1)h[q]=h[d];h.pop()}1===h.length&&(c[a]=h[0]);c.removeListener&&this.emit("removeListener",a,m||b)}return this};n.prototype.removeAllListeners=function(a){var b=this._events;if(!b)return this;if(!b.removeListener)return 0===arguments.length?(this._events=E(null),this._eventsCount=0):b[a]&&(0===--this._eventsCount?this._events=E(null):delete b[a]),this;if(0===arguments.length){var d=x(b);for(b=0;b<d.length;++b){var c=
d[b];"removeListener"!==c&&this.removeAllListeners(c)}this.removeAllListeners("removeListener");this._events=E(null);this._eventsCount=0;return this}d=b[a];if("function"===typeof d)this.removeListener(a,d);else if(d)for(b=d.length-1;0<=b;b--)this.removeListener(a,d[b]);return this};n.prototype.listeners=function(a){return D(this,a,!0)};n.prototype.rawListeners=function(a){return D(this,a,!1)};n.listenerCount=function(a,b){return"function"===typeof a.listenerCount?a.listenerCount(b):v.call(a,b)};n.prototype.listenerCount=
v;n.prototype.eventNames=function(){return 0<this._eventsCount?Reflect.ownKeys(this._events):[]}},{}],8:[function(c,u,l){l.read=function(c,b,m,p,l){var n=8*l-p-1;var a=(1<<n)-1,h=a>>1,z=-7;l=m?l-1:0;var k=m?-1:1,D=c[b+l];l+=k;m=D&(1<<-z)-1;D>>=-z;for(z+=n;0<z;m=256*m+c[b+l],l+=k,z-=8);n=m&(1<<-z)-1;m>>=-z;for(z+=p;0<z;n=256*n+c[b+l],l+=k,z-=8);if(0===m)m=1-h;else{if(m===a)return n?NaN:Infinity*(D?-1:1);n+=Math.pow(2,p);m-=h}return(D?-1:1)*n*Math.pow(2,m-p)};l.write=function(c,b,m,p,l,v){var a,h=8*
v-l-1,n=(1<<h)-1,k=n>>1,D=23===l?Math.pow(2,-24)-Math.pow(2,-77):0;v=p?0:v-1;var x=p?1:-1,u=0>b||0===b&&0>1/b?1:0;b=Math.abs(b);isNaN(b)||Infinity===b?(b=isNaN(b)?1:0,p=n):(p=Math.floor(Math.log(b)/Math.LN2),1>b*(a=Math.pow(2,-p))&&(p--,a*=2),b=1<=p+k?b+D/a:b+D*Math.pow(2,1-k),2<=b*a&&(p++,a/=2),p+k>=n?(b=0,p=n):1<=p+k?(b=(b*a-1)*Math.pow(2,l),p+=k):(b=b*Math.pow(2,k-1)*Math.pow(2,l),p=0));for(;8<=l;c[m+v]=b&255,v+=x,b/=256,l-=8);p=p<<l|b;for(h+=l;0<h;c[m+v]=p&255,v+=x,p/=256,h-=8);c[m+v-x]|=128*
u}},{}],9:[function(c,u,l){u.exports="function"===typeof Object.create?function(c,b){c.super_=b;c.prototype=Object.create(b.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}})}:function(c,b){c.super_=b;var m=function(){};m.prototype=b.prototype;c.prototype=new m;c.prototype.constructor=c}},{}],10:[function(c,u,l){function n(b){return!!b.constructor&&"function"===typeof b.constructor.isBuffer&&b.constructor.isBuffer(b)}u.exports=function(b){return null!=b&&(n(b)||"function"===
typeof b.readFloatLE&&"function"===typeof b.slice&&n(b.slice(0,0))||!!b._isBuffer)}},{}],11:[function(c,u,l){var n={}.toString;u.exports=Array.isArray||function(b){return"[object Array]"==n.call(b)}},{}],12:[function(c,u,l){(function(c){function b(b,n,l,v){if("function"!==typeof b)throw new TypeError('"callback" argument must be a function');var a=arguments.length;switch(a){case 0:case 1:return c.nextTick(b);case 2:return c.nextTick(function(){b.call(null,n)});case 3:return c.nextTick(function(){b.call(null,
n,l)});case 4:return c.nextTick(function(){b.call(null,n,l,v)});default:var h=Array(a-1);for(a=0;a<h.length;)h[a++]=arguments[a];return c.nextTick(function(){b.apply(null,h)})}}!c.version||0===c.version.indexOf("v0.")||0===c.version.indexOf("v1.")&&0!==c.version.indexOf("v1.8.")?u.exports=b:u.exports=c.nextTick}).call(this,c("_process"))},{_process:13}],13:[function(c,u,l){function n(){throw Error("setTimeout has not been defined");}function b(){throw Error("clearTimeout has not been defined");}function m(a){if(z===
setTimeout)return setTimeout(a,0);if((z===n||!z)&&setTimeout)return z=setTimeout,setTimeout(a,0);try{return z(a,0)}catch(d){try{return z.call(null,a,0)}catch(w){return z.call(this,a,0)}}}function p(a){if(k===clearTimeout)return clearTimeout(a);if((k===b||!k)&&clearTimeout)return k=clearTimeout,clearTimeout(a);try{return k(a)}catch(d){try{return k.call(null,a)}catch(w){return k.call(this,a)}}}function D(){x&&F&&(x=!1,F.length?E=F.concat(E):J=-1,E.length&&v())}function v(){if(!x){var a=m(D);x=!0;for(var b=
E.length;b;){F=E;for(E=[];++J<b;)F&&F[J].run();J=-1;b=E.length}F=null;x=!1;p(a)}}function a(a,b){this.fun=a;this.array=b}function h(){}c=u.exports={};try{var z="function"===typeof setTimeout?setTimeout:n}catch(B){z=n}try{var k="function"===typeof clearTimeout?clearTimeout:b}catch(B){k=b}var E=[],x=!1,F,J=-1;c.nextTick=function(b){var d=Array(arguments.length-1);if(1<arguments.length)for(var c=1;c<arguments.length;c++)d[c-1]=arguments[c];E.push(new a(b,d));1!==E.length||x||m(v)};a.prototype.run=function(){this.fun.apply(null,
this.array)};c.title="browser";c.browser=!0;c.env={};c.argv=[];c.version="";c.versions={};c.on=h;c.addListener=h;c.once=h;c.off=h;c.removeListener=h;c.removeAllListeners=h;c.emit=h;c.prependListener=h;c.prependOnceListener=h;c.listeners=function(a){return[]};c.binding=function(a){throw Error("process.binding is not supported");};c.cwd=function(){return"/"};c.chdir=function(a){throw Error("process.chdir is not supported");};c.umask=function(){return 0}},{}],14:[function(c,u,l){u.exports=c("./lib/_stream_duplex.js")},
{"./lib/_stream_duplex.js":15}],15:[function(c,u,l){function n(a){if(!(this instanceof n))return new n(a);D.call(this,a);v.call(this,a);a&&!1===a.readable&&(this.readable=!1);a&&!1===a.writable&&(this.writable=!1);this.allowHalfOpen=!0;a&&!1===a.allowHalfOpen&&(this.allowHalfOpen=!1);this.once("end",b)}function b(){this.allowHalfOpen||this._writableState.ended||p(m,this)}function m(a){a.end()}l=Object.keys||function(a){var b=[],c;for(c in a)b.push(c);return b};u.exports=n;var p=c("process-nextick-args");
u=c("core-util-is");u.inherits=c("inherits");var D=c("./_stream_readable"),v=c("./_stream_writable");u.inherits(n,D);c=l(v.prototype);for(u=0;u<c.length;u++)l=c[u],n.prototype[l]||(n.prototype[l]=v.prototype[l])},{"./_stream_readable":17,"./_stream_writable":19,"core-util-is":6,inherits:9,"process-nextick-args":12}],16:[function(c,u,l){function n(c){if(!(this instanceof n))return new n(c);b.call(this,c)}u.exports=n;var b=c("./_stream_transform");u=c("core-util-is");u.inherits=c("inherits");u.inherits(n,
b);n.prototype._transform=function(b,c,n){n(null,b)}},{"./_stream_transform":18,"core-util-is":6,inherits:9}],17:[function(c,u,l){(function(n){function b(a,b,d){if("function"===typeof a.prependListener)return a.prependListener(b,d);if(a._events&&a._events[b])K(a._events[b])?a._events[b].unshift(d):a._events[b]=[d,a._events[b]];else a.on(b,d)}function m(a,b){q=q||c("./_stream_duplex");a=a||{};this.objectMode=!!a.objectMode;b instanceof q&&(this.objectMode=this.objectMode||!!a.readableObjectMode);b=
a.highWaterMark;var d=this.objectMode?16:16384;this.highWaterMark=b||0===b?b:d;this.highWaterMark=~~this.highWaterMark;this.buffer=new O;this.length=0;this.pipes=null;this.pipesCount=0;this.flowing=null;this.reading=this.endEmitted=this.ended=!1;this.sync=!0;this.resumeScheduled=this.readableListening=this.emittedReadable=this.needReadable=!1;this.defaultEncoding=a.defaultEncoding||"utf8";this.ranOut=!1;this.awaitDrain=0;this.readingMore=!1;this.encoding=this.decoder=null;a.encoding&&(Q||(Q=c("string_decoder/").StringDecoder),
this.decoder=new Q(a.encoding),this.encoding=a.encoding)}function p(a){q=q||c("./_stream_duplex");if(!(this instanceof p))return new p(a);this._readableState=new m(a,this);this.readable=!0;a&&"function"===typeof a.read&&(this._read=a.read);M.call(this)}function l(b,d,c,f,h){var e=c;var g=null;H.isBuffer(e)||"string"===typeof e||null===e||void 0===e||d.objectMode||(g=new TypeError("Invalid non-string/buffer chunk"));if(e=g)b.emit("error",e);else if(null===c)d.reading=!1,d.ended||(d.decoder&&(c=d.decoder.end())&&
c.length&&(d.buffer.push(c),d.length+=d.objectMode?1:c.length),d.ended=!0,a(b));else if(d.objectMode||c&&0<c.length)if(d.ended&&!h)b.emit("error",Error("stream.push() after EOF"));else if(d.endEmitted&&h)b.emit("error",Error("stream.unshift() after end event"));else{if(d.decoder&&!h&&!f){c=d.decoder.write(c);var q=!d.objectMode&&0===c.length}h||(d.reading=!1);q||(d.flowing&&0===d.length&&!d.sync?(b.emit("data",c),b.read(0)):(d.length+=d.objectMode?1:c.length,h?d.buffer.unshift(c):d.buffer.push(c),
d.needReadable&&a(b)));d.readingMore||(d.readingMore=!0,t(z,b,d))}else h||(d.reading=!1);return!d.ended&&(d.needReadable||d.length<d.highWaterMark||0===d.length)}function v(a,b){if(0>=a||0===b.length&&b.ended)return 0;if(b.objectMode)return 1;if(a!==a)return b.flowing&&b.length?b.buffer.head.data.length:b.length;if(a>b.highWaterMark){var d=a;8388608<=d?d=8388608:(d--,d|=d>>>1,d|=d>>>2,d|=d>>>4,d|=d>>>8,d|=d>>>16,d++);b.highWaterMark=d}return a<=b.length?a:b.ended?b.length:(b.needReadable=!0,0)}function a(a){var b=
a._readableState;b.needReadable=!1;b.emittedReadable||(C("emitReadable",b.flowing),b.emittedReadable=!0,b.sync?t(h,a):h(a))}function h(a){C("emit readable");a.emit("readable");F(a)}function z(a,b){for(var d=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length<b.highWaterMark&&(C("maybeReadMore read 0"),a.read(0),d!==b.length);)d=b.length;b.readingMore=!1}function k(a){return function(){var b=a._readableState;C("pipeOnDrain",b.awaitDrain);b.awaitDrain&&b.awaitDrain--;0===b.awaitDrain&&a.listeners("data").length&&
(b.flowing=!0,F(a))}}function E(a){C("readable nexttick read 0");a.read(0)}function x(a,b){b.reading||(C("resume read 0"),a.read(0));b.resumeScheduled=!1;b.awaitDrain=0;a.emit("resume");F(a);b.flowing&&!b.reading&&a.read(0)}function F(a){var b=a._readableState;for(C("flow",b.flowing);b.flowing&&null!==a.read(););}function J(a,b){if(0===b.length)return null;if(b.objectMode)var d=b.buffer.shift();else if(!a||a>=b.length)d=b.decoder?b.buffer.join(""):1===b.buffer.length?b.buffer.head.data:b.buffer.concat(b.length),
b.buffer.clear();else{d=b.buffer;b=b.decoder;if(a<d.head.data.length)b=d.head.data.slice(0,a),d.head.data=d.head.data.slice(a);else{if(a===d.head.data.length)d=d.shift();else if(b){b=d.head;var c=1,f=b.data;for(a-=f.length;b=b.next;){var e=b.data,g=a>e.length?e.length:a;f=g===e.length?f+e:f+e.slice(0,a);a-=g;if(0===a){g===e.length?(++c,d.head=b.next?b.next:d.tail=null):(d.head=b,b.data=e.slice(g));break}++c}d.length-=c;d=f}else{b=y.allocUnsafe(a);c=d.head;f=1;c.data.copy(b);for(a-=c.data.length;c=
c.next;){e=c.data;g=a>e.length?e.length:a;e.copy(b,b.length-a,0,g);a-=g;if(0===a){g===e.length?(++f,d.head=c.next?c.next:d.tail=null):(d.head=c,c.data=e.slice(g));break}++f}d.length-=f;d=b}b=d}d=b}return d}function B(a){var b=a._readableState;if(0<b.length)throw Error('"endReadable()" called on non-empty stream');b.endEmitted||(b.ended=!0,t(d,b,a))}function d(a,b){a.endEmitted||0!==a.length||(a.endEmitted=!0,b.readable=!1,b.emit("end"))}function w(a,b){for(var d=0,c=a.length;d<c;d++)b(a[d],d)}function f(a,
b){for(var d=0,c=a.length;d<c;d++)if(a[d]===b)return d;return-1}u.exports=p;var t=c("process-nextick-args"),K=c("isarray"),q;p.ReadableState=m;c("events");try{var M=c("stream")}catch(e){}finally{M||(M=c("events").EventEmitter)}var H=c("buffer").Buffer,y=c("buffer-shims"),A=c("core-util-is");A.inherits=c("inherits");var L=c("util"),C=void 0;C=L&&L.debuglog?L.debuglog("stream"):function(){};var O=c("./internal/streams/BufferList"),Q;A.inherits(p,M);p.prototype.push=function(a,b){var d=this._readableState;
d.objectMode||"string"!==typeof a||(b=b||d.defaultEncoding,b!==d.encoding&&(a=y.from(a,b),b=""));return l(this,d,a,b,!1)};p.prototype.unshift=function(a){return l(this,this._readableState,a,"",!0)};p.prototype.isPaused=function(){return!1===this._readableState.flowing};p.prototype.setEncoding=function(a){Q||(Q=c("string_decoder/").StringDecoder);this._readableState.decoder=new Q(a);this._readableState.encoding=a;return this};p.prototype.read=function(b){C("read",b