imsc
Version:
Renders IMSC documents to HTML5 fragments
106 lines (105 loc) • 155 kB
JavaScript
/*
The buffer module from node.js, for the browser.
@author Feross Aboukhadijeh <https://feross.org>
@license MIT
ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> 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(f,v,l){f!=Array.prototype&&f!=Object.prototype&&(f[v]=l.value)};$jscomp.getGlobal=function(f){return"undefined"!=typeof window&&window===f?f:"undefined"!=typeof global&&null!=global?global:f};$jscomp.global=$jscomp.getGlobal(this);
$jscomp.polyfill=function(f,v,l,m){if(v){l=$jscomp.global;f=f.split(".");for(m=0;m<f.length-1;m++){var h=f[m];h in l||(l[h]={});l=l[h]}f=f[f.length-1];m=l[f];v=v(m);v!=m&&null!=v&&$jscomp.defineProperty(l,f,{configurable:!0,writable:!0,value:v})}};$jscomp.polyfill("Array.prototype.fill",function(f){return f?f:function(f,l,m){var h=this.length||0;0>l&&(l=Math.max(0,h+l));if(null==m||m>h)m=h;m=Number(m);0>m&&(m=Math.max(0,h+m));for(l=Number(l||0);l<m;l++)this[l]=f;return this}},"es6","es3");
$jscomp.polyfill("Number.isNaN",function(f){return f?f:function(f){return"number"===typeof f&&isNaN(f)}},"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 f=0;return function(v){return $jscomp.SYMBOL_PREFIX+(v||"")+f++}}();
$jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var f=$jscomp.global.Symbol.iterator;f||(f=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[f]&&$jscomp.defineProperty(Array.prototype,f,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};
$jscomp.initSymbolAsyncIterator=function(){$jscomp.initSymbol();var f=$jscomp.global.Symbol.asyncIterator;f||(f=$jscomp.global.Symbol.asyncIterator=$jscomp.global.Symbol("asyncIterator"));$jscomp.initSymbolAsyncIterator=function(){}};$jscomp.arrayIterator=function(f){var v=0;return $jscomp.iteratorPrototype(function(){return v<f.length?{done:!1,value:f[v++]}:{done:!0}})};
$jscomp.iteratorPrototype=function(f){$jscomp.initSymbolIterator();f={next:f};f[$jscomp.global.Symbol.iterator]=function(){return this};return f};$jscomp.iteratorFromArray=function(f,v){$jscomp.initSymbolIterator();f instanceof String&&(f+="");var l=0,m={next:function(){if(l<f.length){var h=l++;return{value:v(h,f[h]),done:!1}}m.next=function(){return{done:!0,value:void 0}};return m.next()}};m[Symbol.iterator]=function(){return m};return m};
$jscomp.polyfill("Array.prototype.keys",function(f){return f?f:function(){return $jscomp.iteratorFromArray(this,function(f){return f})}},"es6","es3");$jscomp.makeIterator=function(f){$jscomp.initSymbolIterator();var v=f[Symbol.iterator];return v?v.call(f):$jscomp.arrayIterator(f)};$jscomp.FORCE_POLYFILL_PROMISE=!1;
$jscomp.polyfill("Promise",function(f){function v(){this.batch_=null}function l(a){return a instanceof h?a:new h(function(c,h){c(a)})}if(f&&!$jscomp.FORCE_POLYFILL_PROMISE)return f;v.prototype.asyncExecute=function(a){null==this.batch_&&(this.batch_=[],this.asyncExecuteBatch_());this.batch_.push(a);return this};v.prototype.asyncExecuteBatch_=function(){var a=this;this.asyncExecuteFunction(function(){a.executeBatch_()})};var m=$jscomp.global.setTimeout;v.prototype.asyncExecuteFunction=function(a){m(a,
0)};v.prototype.executeBatch_=function(){for(;this.batch_&&this.batch_.length;){var a=this.batch_;this.batch_=[];for(var c=0;c<a.length;++c){var h=a[c];a[c]=null;try{h()}catch(b){this.asyncThrow_(b)}}}this.batch_=null};v.prototype.asyncThrow_=function(a){this.asyncExecuteFunction(function(){throw a;})};var h=function(a){this.state_=0;this.result_=void 0;this.onSettledCallbacks_=[];var c=this.createResolveAndReject_();try{a(c.resolve,c.reject)}catch(x){c.reject(x)}};h.prototype.createResolveAndReject_=
function(){function a(b){return function(a){h||(h=!0,b.call(c,a))}}var c=this,h=!1;return{resolve:a(this.resolveTo_),reject:a(this.reject_)}};h.prototype.resolveTo_=function(a){if(a===this)this.reject_(new TypeError("A Promise cannot resolve to itself"));else if(a instanceof h)this.settleSameAsPromise_(a);else{a:switch(typeof a){case "object":var c=null!=a;break a;case "function":c=!0;break a;default:c=!1}c?this.resolveToNonPromiseObj_(a):this.fulfill_(a)}};h.prototype.resolveToNonPromiseObj_=function(a){var c=
void 0;try{c=a.then}catch(x){this.reject_(x);return}"function"==typeof c?this.settleSameAsThenable_(c,a):this.fulfill_(a)};h.prototype.reject_=function(a){this.settle_(2,a)};h.prototype.fulfill_=function(a){this.settle_(1,a)};h.prototype.settle_=function(a,c){if(0!=this.state_)throw Error("Cannot settle("+a+", "+c+"): Promise already settled in state"+this.state_);this.state_=a;this.result_=c;this.executeOnSettledCallbacks_()};h.prototype.executeOnSettledCallbacks_=function(){if(null!=this.onSettledCallbacks_){for(var h=
0;h<this.onSettledCallbacks_.length;++h)a.asyncExecute(this.onSettledCallbacks_[h]);this.onSettledCallbacks_=null}};var a=new v;h.prototype.settleSameAsPromise_=function(a){var c=this.createResolveAndReject_();a.callWhenSettled_(c.resolve,c.reject)};h.prototype.settleSameAsThenable_=function(a,c){var h=this.createResolveAndReject_();try{a.call(c,h.resolve,h.reject)}catch(b){h.reject(b)}};h.prototype.then=function(a,c){function f(a,c){return"function"==typeof a?function(d){try{b(a(d))}catch(H){y(H)}}:
c}var b,y,u=new h(function(a,c){b=a;y=c});this.callWhenSettled_(f(a,b),f(c,y));return u};h.prototype.catch=function(a){return this.then(void 0,a)};h.prototype.callWhenSettled_=function(h,c){function f(){switch(b.state_){case 1:h(b.result_);break;case 2:c(b.result_);break;default:throw Error("Unexpected state: "+b.state_);}}var b=this;null==this.onSettledCallbacks_?a.asyncExecute(f):this.onSettledCallbacks_.push(f)};h.resolve=l;h.reject=function(a){return new h(function(c,h){h(a)})};h.race=function(a){return new h(function(c,
h){for(var b=$jscomp.makeIterator(a),y=b.next();!y.done;y=b.next())l(y.value).callWhenSettled_(c,h)})};h.all=function(a){var c=$jscomp.makeIterator(a),f=c.next();return f.done?l([]):new h(function(b,a){function u(a){return function(c){d[a]=c;h--;0==h&&b(d)}}var d=[],h=0;do d.push(void 0),h++,l(f.value).callWhenSettled_(u(d.length-1),a),f=c.next();while(!f.done)})};return h},"es6","es3");$jscomp.underscoreProtoCanBeSet=function(){var f={a:!0},v={};try{return v.__proto__=f,v.a}catch(l){}return!1};
$jscomp.setPrototypeOf="function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(f,v){f.__proto__=v;if(f.__proto__!==v)throw new TypeError(f+" is not extensible");return f}:null;$jscomp.polyfill("Object.setPrototypeOf",function(f){return f||$jscomp.setPrototypeOf},"es6","es5");
$jscomp.polyfill("String.fromCodePoint",function(f){return f?f:function(f){for(var l="",m=0;m<arguments.length;m++){var h=Number(arguments[m]);if(0>h||1114111<h||h!==Math.floor(h))throw new RangeError("invalid_code_point "+h);65535>=h?l+=String.fromCharCode(h):(h-=65536,l+=String.fromCharCode(h>>>10&1023|55296),l+=String.fromCharCode(h&1023|56320))}return l}},"es6","es3");$jscomp.polyfill("Object.is",function(f){return f?f:function(f,l){return f===l?0!==f||1/f===1/l:f!==f&&l!==l}},"es6","es3");
$jscomp.polyfill("Array.prototype.includes",function(f){return f?f:function(f,l){var m=this;m instanceof String&&(m=String(m));var h=m.length;l=l||0;for(0>l&&(l=Math.max(l+h,0));l<h;l++){var a=m[l];if(a===f||Object.is(a,f))return!0}return!1}},"es7","es3");
$jscomp.checkStringArgs=function(f,v,l){if(null==f)throw new TypeError("The 'this' value for String.prototype."+l+" must not be null or undefined");if(v instanceof RegExp)throw new TypeError("First argument to String.prototype."+l+" must not be a regular expression");return f+""};$jscomp.polyfill("String.prototype.includes",function(f){return f?f:function(f,l){return-1!==$jscomp.checkStringArgs(this,f,"includes").indexOf(f,l||0)}},"es6","es3");
$jscomp.polyfill("Math.sign",function(f){return f?f:function(f){f=Number(f);return 0===f||isNaN(f)?f:0<f?1:-1}},"es6","es3");
(function(f){"object"===typeof exports&&"undefined"!==typeof module?module.exports=f():"function"===typeof define&&define.amd?define([],f):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).imsc=f()})(function(){return function(){function f(v,l,m){function h(c,x){if(!l[c]){if(!v[c]){var b="function"==typeof require&&require;if(!x&&b)return b(c,!0);if(a)return a(c,!0);x=Error("Cannot find module '"+c+"'");throw x.code="MODULE_NOT_FOUND",x;}x=
l[c]={exports:{}};v[c][0].call(x.exports,function(b){return h(v[c][1][b]||b)},x,x.exports,f,v,l,m)}return l[c].exports}for(var a="function"==typeof require&&require,A=0;A<m.length;A++)h(m[A]);return h}return f}()({1:[function(f,v,l){function m(a){var b=a.length;if(0<b%4)throw Error("Invalid string. Length must be a multiple of 4");a=a.indexOf("=");-1===a&&(a=b);return[a,a===b?0:4-a%4]}function h(c,b,h){for(var u=[],d=b;d<h;d+=3)b=(c[d]<<16&16711680)+(c[d+1]<<8&65280)+(c[d+2]&255),u.push(a[b>>18&63]+
a[b>>12&63]+a[b>>6&63]+a[b&63]);return u.join("")}l.byteLength=function(a){a=m(a);var b=a[1];return 3*(a[0]+b)/4-b};l.toByteArray=function(a){var b=m(a);var h=b[0];b=b[1];var u=new c(3*(h+b)/4-b),d=0,f=0<b?h-4:h,p;for(p=0;p<f;p+=4)h=A[a.charCodeAt(p)]<<18|A[a.charCodeAt(p+1)]<<12|A[a.charCodeAt(p+2)]<<6|A[a.charCodeAt(p+3)],u[d++]=h>>16&255,u[d++]=h>>8&255,u[d++]=h&255;2===b&&(h=A[a.charCodeAt(p)]<<2|A[a.charCodeAt(p+1)]>>4,u[d++]=h&255);1===b&&(h=A[a.charCodeAt(p)]<<10|A[a.charCodeAt(p+1)]<<4|A[a.charCodeAt(p+
2)]>>2,u[d++]=h>>8&255,u[d++]=h&255);return u};l.fromByteArray=function(c){for(var b=c.length,f=b%3,u=[],d=0,q=b-f;d<q;d+=16383)u.push(h(c,d,d+16383>q?q:d+16383));1===f?(c=c[b-1],u.push(a[c>>2]+a[c<<4&63]+"==")):2===f&&(c=(c[b-2]<<8)+c[b-1],u.push(a[c>>10]+a[c>>4&63]+a[c<<2&63]+"="));return u.join("")};var a=[],A=[],c="undefined"!==typeof Uint8Array?Uint8Array:Array;for(f=0;64>f;++f)a[f]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[f],A["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(f)]=
f;A[45]=62;A[95]=63},{}],2:[function(f,v,l){},{}],3:[function(f,v,l){(function(m){(function(){function h(g){if(g>L)throw new RangeError('The value "'+g+'" is invalid for option "size"');g=new Uint8Array(g);g.__proto__=a.prototype;return g}function a(g,n,a){if("number"===typeof g){if("string"===typeof n)throw new TypeError('The "string" argument must be of type string. Received type number');return x(g)}return m(g,n,a)}function m(g,n,e){if("string"===typeof g){var J=n;if("string"!==typeof J||""===
J)J="utf8";if(!a.isEncoding(J))throw new TypeError("Unknown encoding: "+J);n=d(g,J)|0;e=h(n);g=e.write(g,J);g!==n&&(e=e.slice(0,g));return e}if(ArrayBuffer.isView(g))return b(g);if(null==g)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof g);if(v(g,ArrayBuffer)||g&&v(g.buffer,ArrayBuffer)){if(0>n||g.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(g.byteLength<n+(e||0))throw new RangeError('"length" is outside of buffer bounds');
g=void 0===n&&void 0===e?new Uint8Array(g):void 0===e?new Uint8Array(g,n):new Uint8Array(g,n,e);g.__proto__=a.prototype;return g}if("number"===typeof g)throw new TypeError('The "value" argument must not be of type number. Received type number');J=g.valueOf&&g.valueOf();if(null!=J&&J!==g)return a.from(J,n,e);if(J=y(g))return J;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof g[Symbol.toPrimitive])return a.from(g[Symbol.toPrimitive]("string"),n,e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+
typeof g);}function c(g){if("number"!==typeof g)throw new TypeError('"size" argument must be of type number');if(0>g)throw new RangeError('The value "'+g+'" is invalid for option "size"');}function x(g){c(g);return h(0>g?0:u(g)|0)}function b(g){for(var n=0>g.length?0:u(g.length)|0,a=h(n),e=0;e<n;e+=1)a[e]=g[e]&255;return a}function y(g){if(a.isBuffer(g)){var n=u(g.length)|0,e=h(n);if(0===e.length)return e;g.copy(e,0,0,n);return e}if(void 0!==g.length)return(n="number"!==typeof g.length)||(n=g.length,
n=n!==n),n?h(0):b(g);if("Buffer"===g.type&&Array.isArray(g.data))return b(g.data)}function u(g){if(g>=L)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+L.toString(16)+" bytes");return g|0}function d(g,n){if(a.isBuffer(g))return g.length;if(ArrayBuffer.isView(g)||v(g,ArrayBuffer))return g.byteLength;if("string"!==typeof g)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof g);var e=g.length,b=2<arguments.length&&
!0===arguments[2];if(!b&&0===e)return 0;for(var d=!1;;)switch(n){case "ascii":case "latin1":case "binary":return e;case "utf8":case "utf-8":return R(g).length;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":return 2*e;case "hex":return e>>>1;case "base64":return B.toByteArray(D(g)).length;default:if(d)return b?-1:R(g).length;n=(""+n).toLowerCase();d=!0}}function q(g,n,a){var e=!1;if(void 0===n||0>n)n=0;if(n>this.length)return"";if(void 0===a||a>this.length)a=this.length;if(0>=a)return"";a>>>=
0;n>>>=0;if(a<=n)return"";for(g||(g="utf8");;)switch(g){case "hex":g=n;n=a;a=this.length;if(!g||0>g)g=0;if(!n||0>n||n>a)n=a;e="";for(a=g;a<n;++a)g=e,e=this[a],e=16>e?"0"+e.toString(16):e.toString(16),e=g+e;return e;case "utf8":case "utf-8":return F(this,n,a);case "ascii":g="";for(a=Math.min(this.length,a);n<a;++n)g+=String.fromCharCode(this[n]&127);return g;case "latin1":case "binary":g="";for(a=Math.min(this.length,a);n<a;++n)g+=String.fromCharCode(this[n]);return g;case "base64":return n=0===n&&
a===this.length?B.fromByteArray(this):B.fromByteArray(this.slice(n,a)),n;case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":n=this.slice(n,a);a="";for(g=0;g<n.length;g+=2)a+=String.fromCharCode(n[g]+256*n[g+1]);return a;default:if(e)throw new TypeError("Unknown encoding: "+g);g=(g+"").toLowerCase();e=!0}}function p(g,n,a){var e=g[n];g[n]=g[a];g[a]=e}function H(g,n,e,b,d){if(0===g.length)return-1;"string"===typeof e?(b=e,e=0):2147483647<e?e=2147483647:-2147483648>e&&(e=-2147483648);e=+e;e!==e&&
(e=d?0:g.length-1);0>e&&(e=g.length+e);if(e>=g.length){if(d)return-1;e=g.length-1}else if(0>e)if(d)e=0;else return-1;"string"===typeof n&&(n=a.from(n,b));if(a.isBuffer(n))return 0===n.length?-1:K(g,n,e,b,d);if("number"===typeof n)return n&=255,"function"===typeof Uint8Array.prototype.indexOf?d?Uint8Array.prototype.indexOf.call(g,n,e):Uint8Array.prototype.lastIndexOf.call(g,n,e):K(g,[n],e,b,d);throw new TypeError("val must be string, number or Buffer");}function K(g,n,e,a,b){function d(g,n){return 1===
k?g[n]:g.readUInt16BE(n*k)}var k=1,c=g.length,h=n.length;if(void 0!==a&&(a=String(a).toLowerCase(),"ucs2"===a||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(2>g.length||2>n.length)return-1;k=2;c/=2;h/=2;e/=2}if(b)for(a=-1;e<c;e++)if(d(g,e)===d(n,-1===a?0:e-a)){if(-1===a&&(a=e),e-a+1===h)return a*k}else-1!==a&&(e-=e-a),a=-1;else for(e+h>c&&(e=c-h);0<=e;e--){c=!0;for(a=0;a<h;a++)if(d(g,e+a)!==d(n,a)){c=!1;break}if(c)return e}return-1}function F(g,n,a){a=Math.min(g.length,a);for(var e=[];n<a;){var b=
g[n],d=null,k=239<b?4:223<b?3:191<b?2:1;if(n+k<=a)switch(k){case 1:128>b&&(d=b);break;case 2:var c=g[n+1];128===(c&192)&&(b=(b&31)<<6|c&63,127<b&&(d=b));break;case 3:c=g[n+1];var h=g[n+2];128===(c&192)&&128===(h&192)&&(b=(b&15)<<12|(c&63)<<6|h&63,2047<b&&(55296>b||57343<b)&&(d=b));break;case 4:c=g[n+1];h=g[n+2];var M=g[n+3];128===(c&192)&&128===(h&192)&&128===(M&192)&&(b=(b&15)<<18|(c&63)<<12|(h&63)<<6|M&63,65535<b&&1114112>b&&(d=b))}null===d?(d=65533,k=1):65535<d&&(d-=65536,e.push(d>>>10&1023|55296),
d=56320|d&1023);e.push(d);n+=k}g=e.length;if(g<=P)e=String.fromCharCode.apply(String,e);else{a="";for(n=0;n<g;)a+=String.fromCharCode.apply(String,e.slice(n,n+=P));e=a}return e}function E(g,n,a){if(0!==g%1||0>g)throw new RangeError("offset is not uint");if(g+n>a)throw new RangeError("Trying to access beyond buffer length");}function e(g,n,e,b,d,k){if(!a.isBuffer(g))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>d||n<k)throw new RangeError('"value" argument is out of bounds');
if(e+b>g.length)throw new RangeError("Index out of range");}function z(g,n,a,e,b,d){if(a+e>g.length)throw new RangeError("Index out of range");if(0>a)throw new RangeError("Index out of range");}function k(g,n,a,e,b){n=+n;a>>>=0;b||z(g,n,a,4,3.4028234663852886E38,-3.4028234663852886E38);C.write(g,n,a,e,23,4);return a+4}function t(g,n,a,e,b){n=+n;a>>>=0;b||z(g,n,a,8,1.7976931348623157E308,-1.7976931348623157E308);C.write(g,n,a,e,52,8);return a+8}function D(g){g=g.split("=")[0];g=g.trim().replace(N,
"");if(2>g.length)return"";for(;0!==g.length%4;)g+="=";return g}function R(g,n){n=n||Infinity;for(var a,e=g.length,b=null,d=[],k=0;k<e;++k){a=g.charCodeAt(k);if(55295<a&&57344>a){if(!b){if(56319<a){-1<(n-=3)&&d.push(239,191,189);continue}else if(k+1===e){-1<(n-=3)&&d.push(239,191,189);continue}b=a;continue}if(56320>a){-1<(n-=3)&&d.push(239,191,189);b=a;continue}a=(b-55296<<10|a-56320)+65536}else b&&-1<(n-=3)&&d.push(239,191,189);b=null;if(128>a){if(0>--n)break;d.push(a)}else if(2048>a){if(0>(n-=2))break;
d.push(a>>6|192,a&63|128)}else if(65536>a){if(0>(n-=3))break;d.push(a>>12|224,a>>6&63|128,a&63|128)}else if(1114112>a){if(0>(n-=4))break;d.push(a>>18|240,a>>12&63|128,a>>6&63|128,a&63|128)}else throw Error("Invalid code point");}return d}function I(g){for(var a=[],e=0;e<g.length;++e)a.push(g.charCodeAt(e)&255);return a}function w(g,a,e,b){for(var n=0;n<b&&!(n+e>=a.length||n>=g.length);++n)a[n+e]=g[n];return n}function v(g,a){return g instanceof a||null!=g&&null!=g.constructor&&null!=g.constructor.name&&
g.constructor.name===a.name}var B=f("base64-js"),C=f("ieee754");l.Buffer=a;l.SlowBuffer=function(g){+g!=g&&(g=0);return a.alloc(+g)};l.INSPECT_MAX_BYTES=50;var L=2147483647;l.kMaxLength=L;a.TYPED_ARRAY_SUPPORT=function(){try{var g=new Uint8Array(1);g.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}};return 42===g.foo()}catch(n){return!1}}();a.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(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}});Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});"undefined"!==typeof Symbol&&null!=Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1});a.poolSize=8192;a.from=function(g,a,e){return m(g,a,e)};a.prototype.__proto__=Uint8Array.prototype;
a.__proto__=Uint8Array;a.alloc=function(g,a,e){c(g);g=0>=g?h(g):void 0!==a?"string"===typeof e?h(g).fill(a,e):h(g).fill(a):h(g);return g};a.allocUnsafe=function(g){return x(g)};a.allocUnsafeSlow=function(g){return x(g)};a.isBuffer=function(g){return null!=g&&!0===g._isBuffer&&g!==a.prototype};a.compare=function(g,e){v(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength));v(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength));if(!a.isBuffer(g)||!a.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
if(g===e)return 0;for(var n=g.length,b=e.length,d=0,k=Math.min(n,b);d<k;++d)if(g[d]!==e[d]){n=g[d];b=e[d];break}return n<b?-1:b<n?1:0};a.isEncoding=function(g){switch(String(g).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(g,e){if(!Array.isArray(g))throw new TypeError('"list" argument must be an Array of Buffers');if(0===g.length)return a.alloc(0);
var n;if(void 0===e)for(n=e=0;n<g.length;++n)e+=g[n].length;e=a.allocUnsafe(e);var b=0;for(n=0;n<g.length;++n){var d=g[n];v(d,Uint8Array)&&(d=a.from(d));if(!a.isBuffer(d))throw new TypeError('"list" argument must be an Array of Buffers');d.copy(e,b);b+=d.length}return e};a.byteLength=d;a.prototype._isBuffer=!0;a.prototype.swap16=function(){var g=this.length;if(0!==g%2)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var a=0;a<g;a+=2)p(this,a,a+1);return this};a.prototype.swap32=
function(){var g=this.length;if(0!==g%4)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var a=0;a<g;a+=4)p(this,a,a+3),p(this,a+1,a+2);return this};a.prototype.swap64=function(){var g=this.length;if(0!==g%8)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var a=0;a<g;a+=8)p(this,a,a+7),p(this,a+1,a+6),p(this,a+2,a+5),p(this,a+3,a+4);return this};a.prototype.toString=function(){var g=this.length;return 0===g?"":0===arguments.length?F(this,0,g):q.apply(this,
arguments)};a.prototype.toLocaleString=a.prototype.toString;a.prototype.equals=function(g){if(!a.isBuffer(g))throw new TypeError("Argument must be a Buffer");return this===g?!0:0===a.compare(this,g)};a.prototype.inspect=function(){var g=l.INSPECT_MAX_BYTES;var a=this.toString("hex",0,g).replace(/(.{2})/g,"$1 ").trim();this.length>g&&(a+=" ... ");return"<Buffer "+a+">"};a.prototype.compare=function(g,e,b,d,k){v(g,Uint8Array)&&(g=a.from(g,g.offset,g.byteLength));if(!a.isBuffer(g))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+
typeof g);void 0===e&&(e=0);void 0===b&&(b=g?g.length:0);void 0===d&&(d=0);void 0===k&&(k=this.length);if(0>e||b>g.length||0>d||k>this.length)throw new RangeError("out of range index");if(d>=k&&e>=b)return 0;if(d>=k)return-1;if(e>=b)return 1;e>>>=0;b>>>=0;d>>>=0;k>>>=0;if(this===g)return 0;var n=k-d,c=b-e,h=Math.min(n,c);d=this.slice(d,k);g=g.slice(e,b);for(e=0;e<h;++e)if(d[e]!==g[e]){n=d[e];c=g[e];break}return n<c?-1:c<n?1:0};a.prototype.includes=function(g,a,e){return-1!==this.indexOf(g,a,e)};a.prototype.indexOf=
function(g,a,e){return H(this,g,a,e,!0)};a.prototype.lastIndexOf=function(g,a,e){return H(this,g,a,e,!1)};a.prototype.write=function(g,a,e,b){if(void 0===a)b="utf8",e=this.length,a=0;else if(void 0===e&&"string"===typeof a)b=a,e=this.length,a=0;else if(isFinite(a))a>>>=0,isFinite(e)?(e>>>=0,void 0===b&&(b="utf8")):(b=e,e=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var n=this.length-a;if(void 0===e||e>n)e=n;if(0<g.length&&(0>e||0>a)||a>this.length)throw new RangeError("Attempt to write outside buffer bounds");
b||(b="utf8");for(n=!1;;)switch(b){case "hex":a:{a=Number(a)||0;b=this.length-a;e?(e=Number(e),e>b&&(e=b)):e=b;b=g.length;e>b/2&&(e=b/2);for(b=0;b<e;++b){n=parseInt(g.substr(2*b,2),16);if(n!==n){g=b;break a}this[a+b]=n}g=b}return g;case "utf8":case "utf-8":return w(R(g,this.length-a),this,a,e);case "ascii":return w(I(g),this,a,e);case "latin1":case "binary":return w(I(g),this,a,e);case "base64":return w(B.toByteArray(D(g)),this,a,e);case "ucs2":case "ucs-2":case "utf16le":case "utf-16le":b=g;n=this.length-
a;for(var d=[],k=0;k<b.length&&!(0>(n-=2));++k){var c=b.charCodeAt(k);g=c>>8;c%=256;d.push(c);d.push(g)}return w(d,this,a,e);default:if(n)throw new TypeError("Unknown encoding: "+b);b=(""+b).toLowerCase();n=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var P=4096;a.prototype.slice=function(g,e){var b=this.length;g=~~g;e=void 0===e?b:~~e;0>g?(g+=b,0>g&&(g=0)):g>b&&(g=b);0>e?(e+=b,0>e&&(e=0)):e>b&&(e=b);e<g&&(e=g);g=this.subarray(g,e);g.__proto__=
a.prototype;return g};a.prototype.readUIntLE=function(g,a,e){g>>>=0;a>>>=0;e||E(g,a,this.length);e=this[g];for(var b=1,d=0;++d<a&&(b*=256);)e+=this[g+d]*b;return e};a.prototype.readUIntBE=function(g,a,e){g>>>=0;a>>>=0;e||E(g,a,this.length);e=this[g+--a];for(var b=1;0<a&&(b*=256);)e+=this[g+--a]*b;return e};a.prototype.readUInt8=function(g,a){g>>>=0;a||E(g,1,this.length);return this[g]};a.prototype.readUInt16LE=function(g,a){g>>>=0;a||E(g,2,this.length);return this[g]|this[g+1]<<8};a.prototype.readUInt16BE=
function(g,a){g>>>=0;a||E(g,2,this.length);return this[g]<<8|this[g+1]};a.prototype.readUInt32LE=function(g,a){g>>>=0;a||E(g,4,this.length);return(this[g]|this[g+1]<<8|this[g+2]<<16)+16777216*this[g+3]};a.prototype.readUInt32BE=function(g,a){g>>>=0;a||E(g,4,this.length);return 16777216*this[g]+(this[g+1]<<16|this[g+2]<<8|this[g+3])};a.prototype.readIntLE=function(g,a,e){g>>>=0;a>>>=0;e||E(g,a,this.length);e=this[g];for(var b=1,d=0;++d<a&&(b*=256);)e+=this[g+d]*b;e>=128*b&&(e-=Math.pow(2,8*a));return e};
a.prototype.readIntBE=function(g,a,e){g>>>=0;a>>>=0;e||E(g,a,this.length);e=a;for(var b=1,d=this[g+--e];0<e&&(b*=256);)d+=this[g+--e]*b;d>=128*b&&(d-=Math.pow(2,8*a));return d};a.prototype.readInt8=function(g,a){g>>>=0;a||E(g,1,this.length);return this[g]&128?-1*(255-this[g]+1):this[g]};a.prototype.readInt16LE=function(g,a){g>>>=0;a||E(g,2,this.length);g=this[g]|this[g+1]<<8;return g&32768?g|4294901760:g};a.prototype.readInt16BE=function(g,a){g>>>=0;a||E(g,2,this.length);g=this[g+1]|this[g]<<8;return g&
32768?g|4294901760:g};a.prototype.readInt32LE=function(g,a){g>>>=0;a||E(g,4,this.length);return this[g]|this[g+1]<<8|this[g+2]<<16|this[g+3]<<24};a.prototype.readInt32BE=function(g,a){g>>>=0;a||E(g,4,this.length);return this[g]<<24|this[g+1]<<16|this[g+2]<<8|this[g+3]};a.prototype.readFloatLE=function(g,a){g>>>=0;a||E(g,4,this.length);return C.read(this,g,!0,23,4)};a.prototype.readFloatBE=function(g,a){g>>>=0;a||E(g,4,this.length);return C.read(this,g,!1,23,4)};a.prototype.readDoubleLE=function(a,
e){a>>>=0;e||E(a,8,this.length);return C.read(this,a,!0,52,8)};a.prototype.readDoubleBE=function(a,e){a>>>=0;e||E(a,8,this.length);return C.read(this,a,!1,52,8)};a.prototype.writeUIntLE=function(a,b,d,k){a=+a;b>>>=0;d>>>=0;k||e(this,a,b,d,Math.pow(2,8*d)-1,0);k=1;var g=0;for(this[b]=a&255;++g<d&&(k*=256);)this[b+g]=a/k&255;return b+d};a.prototype.writeUIntBE=function(a,b,d,k){a=+a;b>>>=0;d>>>=0;k||e(this,a,b,d,Math.pow(2,8*d)-1,0);k=d-1;var g=1;for(this[b+k]=a&255;0<=--k&&(g*=256);)this[b+k]=a/g&
255;return b+d};a.prototype.writeUInt8=function(a,b,d){a=+a;b>>>=0;d||e(this,a,b,1,255,0);this[b]=a&255;return b+1};a.prototype.writeUInt16LE=function(a,b,d){a=+a;b>>>=0;d||e(this,a,b,2,65535,0);this[b]=a&255;this[b+1]=a>>>8;return b+2};a.prototype.writeUInt16BE=function(a,b,d){a=+a;b>>>=0;d||e(this,a,b,2,65535,0);this[b]=a>>>8;this[b+1]=a&255;return b+2};a.prototype.writeUInt32LE=function(a,b,d){a=+a;b>>>=0;d||e(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};a.prototype.writeUInt32BE=function(a,b,d){a=+a;b>>>=0;d||e(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};a.prototype.writeIntLE=function(a,b,d,k){a=+a;b>>>=0;k||(k=Math.pow(2,8*d-1),e(this,a,b,d,k-1,-k));k=0;var g=1,c=0;for(this[b]=a&255;++k<d&&(g*=256);)0>a&&0===c&&0!==this[b+k-1]&&(c=1),this[b+k]=(a/g>>0)-c&255;return b+d};a.prototype.writeIntBE=function(a,b,d,k){a=+a;b>>>=0;k||(k=Math.pow(2,8*d-1),e(this,a,b,d,k-1,-k));k=d-
1;var g=1,c=0;for(this[b+k]=a&255;0<=--k&&(g*=256);)0>a&&0===c&&0!==this[b+k+1]&&(c=1),this[b+k]=(a/g>>0)-c&255;return b+d};a.prototype.writeInt8=function(a,b,d){a=+a;b>>>=0;d||e(this,a,b,1,127,-128);0>a&&(a=255+a+1);this[b]=a&255;return b+1};a.prototype.writeInt16LE=function(a,b,d){a=+a;b>>>=0;d||e(this,a,b,2,32767,-32768);this[b]=a&255;this[b+1]=a>>>8;return b+2};a.prototype.writeInt16BE=function(a,b,d){a=+a;b>>>=0;d||e(this,a,b,2,32767,-32768);this[b]=a>>>8;this[b+1]=a&255;return b+2};a.prototype.writeInt32LE=
function(a,b,d){a=+a;b>>>=0;d||e(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};a.prototype.writeInt32BE=function(a,b,d){a=+a;b>>>=0;d||e(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};a.prototype.writeFloatLE=function(a,e,b){return k(this,a,e,!0,b)};a.prototype.writeFloatBE=function(a,e,b){return k(this,a,e,!1,b)};a.prototype.writeDoubleLE=function(a,
e,b){return t(this,a,e,!0,b)};a.prototype.writeDoubleBE=function(a,e,b){return t(this,a,e,!1,b)};a.prototype.copy=function(e,b,d,k){if(!a.isBuffer(e))throw new TypeError("argument should be a Buffer");d||(d=0);k||0===k||(k=this.length);b>=e.length&&(b=e.length);b||(b=0);0<k&&k<d&&(k=d);if(k===d||0===e.length||0===this.length)return 0;if(0>b)throw new RangeError("targetStart out of bounds");if(0>d||d>=this.length)throw new RangeError("Index out of range");if(0>k)throw new RangeError("sourceEnd out of bounds");
k>this.length&&(k=this.length);e.length-b<k-d&&(k=e.length-b+d);var g=k-d;if(this===e&&"function"===typeof Uint8Array.prototype.copyWithin)this.copyWithin(b,d,k);else if(this===e&&d<b&&b<k)for(k=g-1;0<=k;--k)e[k+b]=this[k+d];else Uint8Array.prototype.set.call(e,this.subarray(d,k),b);return g};a.prototype.fill=function(e,b,d,k){if("string"===typeof e){"string"===typeof b?(k=b,b=0,d=this.length):"string"===typeof d&&(k=d,d=this.length);if(void 0!==k&&"string"!==typeof k)throw new TypeError("encoding must be a string");
if("string"===typeof k&&!a.isEncoding(k))throw new TypeError("Unknown encoding: "+k);if(1===e.length){var g=e.charCodeAt(0);if("utf8"===k&&128>g||"latin1"===k)e=g}}else"number"===typeof e&&(e&=255);if(0>b||this.length<b||this.length<d)throw new RangeError("Out of range index");if(d<=b)return this;b>>>=0;d=void 0===d?this.length:d>>>0;e||(e=0);if("number"===typeof e)for(k=b;k<d;++k)this[k]=e;else{g=a.isBuffer(e)?e:a.from(e,k);var c=g.length;if(0===c)throw new TypeError('The value "'+e+'" is invalid for argument "value"');
for(k=0;k<d-b;++k)this[k+b]=g[k%c]}return this};var N=/[^+/0-9A-Za-z-_]/g}).call(this)}).call(this,f("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:20}],4:[function(f,v,l){function m(){m.init.call(this)}function h(a){if("function"!==typeof a)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof a);}function a(a,b,e,d){h(e);var k=a._events;if(void 0===k)k=a._events=Object.create(null),a._eventsCount=0;else{void 0!==k.newListener&&(a.emit("newListener",b,
e.listener?e.listener:e),k=a._events);var c=k[b]}void 0===c?(k[b]=e,++a._eventsCount):("function"===typeof c?c=k[b]=d?[e,c]:[c,e]:d?c.unshift(e):c.push(e),e=void 0===a._maxListeners?m.defaultMaxListeners:a._maxListeners,0<e&&c.length>e&&!c.warned&&(c.warned=!0,e=Error("Possible EventEmitter memory leak detected. "+c.length+" "+String(b)+" listeners added. Use emitter.setMaxListeners() to increase limit"),e.name="MaxListenersExceededWarning",e.emitter=a,e.type=b,e.count=c.length,console&&console.warn&&
console.warn(e)));return a}function A(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(a,b,e){a={fired:!1,wrapFn:void 0,target:a,type:b,listener:e};b=A.bind(a);b.listener=e;return a.wrapFn=b}function x(a,b,e){a=a._events;if(void 0===a)return[];b=a[b];if(void 0===b)return[];if("function"===typeof b)return e?[b.listener||b]:[b];if(e)for(e=Array(b.length),
a=0;a<e.length;++a)e[a]=b[a].listener||b[a];else e=y(b,b.length);return e}function b(a){var b=this._events;if(void 0!==b){a=b[a];if("function"===typeof a)return 1;if(void 0!==a)return a.length}return 0}function y(a,b){for(var e=Array(b),d=0;d<b;++d)e[d]=a[d];return e}function u(a,b,e){"function"===typeof a.on&&d(a,"error",b,e)}function d(a,b,e,d){if("function"===typeof a.on)if(d.once)a.once(b,e);else a.on(b,e);else if("function"===typeof a.addEventListener)a.addEventListener(b,function D(c){d.once&&
a.removeEventListener(b,D);e(c)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof a);}var q=(f="object"===typeof Reflect?Reflect:null)&&"function"===typeof f.apply?f.apply:function(a,b,e){return Function.prototype.apply.call(a,b,e)};var p=f&&"function"===typeof f.ownKeys?f.ownKeys:Object.getOwnPropertySymbols?function(a){return Object.getOwnPropertyNames(a).concat(Object.getOwnPropertySymbols(a))}:function(a){return Object.getOwnPropertyNames(a)};
var H=Number.isNaN||function(a){return a!==a};v.exports=m;v.exports.once=function(a,b){return new Promise(function(e,c){function k(e){a.removeListener(b,h);c(e)}function h(){"function"===typeof a.removeListener&&a.removeListener("error",k);e([].slice.call(arguments))}d(a,b,h,{once:!0});"error"!==b&&u(a,k,{once:!0})})};m.EventEmitter=m;m.prototype._events=void 0;m.prototype._eventsCount=0;m.prototype._maxListeners=void 0;var K=10;Object.defineProperty(m,"defaultMaxListeners",{enumerable:!0,get:function(){return K},
set:function(a){if("number"!==typeof a||0>a||H(a))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+a+".");K=a}});m.init=function(){if(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)this._events=Object.create(null),this._eventsCount=0;this._maxListeners=this._maxListeners||void 0};m.prototype.setMaxListeners=function(a){if("number"!==typeof a||0>a||H(a))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+
a+".");this._maxListeners=a;return this};m.prototype.getMaxListeners=function(){return void 0===this._maxListeners?m.defaultMaxListeners:this._maxListeners};m.prototype.emit=function(a){for(var b=[],e=1;e<arguments.length;e++)b.push(arguments[e]);e="error"===a;var d=this._events;if(void 0!==d)e=e&&void 0===d.error;else if(!e)return!1;if(e){var k;0<b.length&&(k=b[0]);if(k instanceof Error)throw k;b=Error("Unhandled error."+(k?" ("+k.message+")":""));b.context=k;throw b;}e=d[a];if(void 0===e)return!1;
if("function"===typeof e)q(e,this,b);else for(k=e.length,d=y(e,k),e=0;e<k;++e)q(d[e],this,b);return!0};m.prototype.addListener=function(b,d){return a(this,b,d,!1)};m.prototype.on=m.prototype.addListener;m.prototype.prependListener=function(b,d){return a(this,b,d,!0)};m.prototype.once=function(a,b){h(b);this.on(a,c(this,a,b));return this};m.prototype.prependOnceListener=function(a,b){h(b);this.prependListener(a,c(this,a,b));return this};m.prototype.removeListener=function(a,b){var e;h(b);var d=this._events;
if(void 0===d)return this;var k=d[a];if(void 0===k)return this;if(k===b||k.listener===b)0===--this._eventsCount?this._events=Object.create(null):(delete d[a],d.removeListener&&this.emit("removeListener",a,k.listener||b));else if("function"!==typeof k){var c=-1;for(e=k.length-1;0<=e;e--)if(k[e]===b||k[e].listener===b){var u=k[e].listener;c=e;break}if(0>c)return this;if(0===c)k.shift();else{for(;c+1<k.length;c++)k[c]=k[c+1];k.pop()}1===k.length&&(d[a]=k[0]);void 0!==d.removeListener&&this.emit("removeListener",
a,u||b)}return this};m.prototype.off=m.prototype.removeListener;m.prototype.removeAllListeners=function(a){var b=this._events;if(void 0===b)return this;if(void 0===b.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==b[a]&&(0===--this._eventsCount?this._events=Object.create(null):delete b[a]),this;if(0===arguments.length){var e=Object.keys(b);for(b=0;b<e.length;++b){var d=e[b];"removeListener"!==d&&this.removeAllListeners(d)}this.removeAllListeners("removeListener");
this._events=Object.create(null);this._eventsCount=0;return this}e=b[a];if("function"===typeof e)this.removeListener(a,e);else if(void 0!==e)for(b=e.length-1;0<=b;b--)this.removeListener(a,e[b]);return this};m.prototype.listeners=function(a){return x(this,a,!0)};m.prototype.rawListeners=function(a){return x(this,a,!1)};m.listenerCount=function(a,d){return"function"===typeof a.listenerCount?a.listenerCount(d):b.call(a,d)};m.prototype.listenerCount=b;m.prototype.eventNames=function(){return 0<this._eventsCount?
p(this._events):[]}},{}],5:[function(f,v,l){function m(){h.call(this)}v.exports=m;var h=f("events").EventEmitter;f("inherits")(m,h);m.Readable=f("readable-stream/lib/_stream_readable.js");m.Writable=f("readable-stream/lib/_stream_writable.js");m.Duplex=f("readable-stream/lib/_stream_duplex.js");m.Transform=f("readable-stream/lib/_stream_transform.js");m.PassThrough=f("readable-stream/lib/_stream_passthrough.js");m.finished=f("readable-stream/lib/internal/streams/end-of-stream.js");m.pipeline=f("readable-stream/lib/internal/streams/pipeline.js");
m.Stream=m;m.prototype.pipe=function(a,f){function c(b){a.writable&&!1===a.write(b)&&q.pause&&q.pause()}function m(){q.readable&&q.resume&&q.resume()}function b(){p||(p=!0,a.end())}function y(){p||(p=!0,"function"===typeof a.destroy&&a.destroy())}function u(a){d();if(0===h.listenerCount(this,"error"))throw a;}function d(){q.removeListener("data",c);a.removeListener("drain",m);q.removeListener("end",b);q.removeListener("close",y);q.removeListener("error",u);a.removeListener("error",u);q.removeListener("end",
d);q.removeListener("close",d);a.removeListener("close",d)}var q=this;q.on("data",c);a.on("drain",m);a._isStdio||f&&!1===f.end||(q.on("end",b),q.on("close",y));var p=!1;q.on("error",u);a.on("error",u);q.on("end",d);q.on("close",d);a.on("close",d);a.emit("pipe",q);return a}},{events:4,inherits:21,"readable-stream/lib/_stream_duplex.js":7,"readable-stream/lib/_stream_passthrough.js":8,"readable-stream/lib/_stream_readable.js":9,"readable-stream/lib/_stream_transform.js":10,"readable-stream/lib/_stream_writable.js":11,
"readable-stream/lib/internal/streams/end-of-stream.js":15,"readable-stream/lib/internal/streams/pipeline.js":17}],6:[function(f,v,l){function m(a,h){a.prototype=Object.create(h.prototype);a.prototype.constructor=a;a.__proto__=h}function h(a,h,b){b||(b=Error);var c=function(a){function b(b,d,c){return a.call(this,"string"===typeof h?h:h(b,d,c))||this}m(b,a);return b}(b);c.prototype.name=b.name;c.prototype.code=a;A[a]=c}function a(a,h){if(Array.isArray(a)){var b=a.length;a=a.map(function(a){return String(a)});
return 2<b?"one of ".concat(h," ").concat(a.slice(0,b-1).join(", "),", or ")+a[b-1]:2===b?"one of ".concat(h," ").concat(a[0]," or ").concat(a[1]):"of ".concat(h," ").concat(a[0])}return"of ".concat(h," ").concat(String(a))}var A={};h("ERR_INVALID_OPT_VALUE",function(a,h){return'The value "'+h+'" is invalid for option "'+a+'"'},TypeError);h("ERR_INVALID_ARG_TYPE",function(c,h,b){var f;if(f="string"===typeof h)f="not "===h.substr(0,4);f?(f="must not be",h=h.replace(/^not /,"")):f="must be";var u=void 0;
if(void 0===u||u>c.length)u=c.length;" argument"===c.substring(u-9,u)?c="The ".concat(c," ").concat(f," ").concat(a(h,"type")):(u=void 0,"number"!==typeof u&&(u=0),u=u+1>c.length?!1:-1!==c.indexOf(".",u),u=u?"property":"argument",c='The "'.concat(c,'" ').concat(u," ").concat(f," ").concat(a(h,"type")));return c+=". Received type ".concat(typeof b)},TypeError);h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");h("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"});
h("ERR_STREAM_PREMATURE_CLOSE","Premature close");h("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"});h("ERR_MULTIPLE_CALLBACK","Callback called multiple times");h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");h("ERR_STREAM_WRITE_AFTER_END","write after end");h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);h("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError);h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT",
"stream.unshift() after end event");v.exports.codes=A},{}],7:[function(f,v,l){(function(m){(function(){function h(d){if(!(this instanceof h))return new h(d);x.call(this,d);b.call(this,d);this.allowHalfOpen=!0;d&&(!1===d.readable&&(this.readable=!1),!1===d.writable&&(this.writable=!1),!1===d.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",a)))}function a(){this._writableState.ended||m.nextTick(A,this)}function A(a){a.end()}var c=Object.keys||function(a){var b=[],d;for(d in a)b.push(d);return b};
v.exports=h;var x=f("./_stream_readable"),b=f("./_stream_writable");f("inherits")(h,x);c=c(b.prototype);for(var y=0;y<c.length;y++){var u=c[y];h.prototype[u]||(h.prototype[u]=b.prototype[u])}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(h.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(h.prototype,
"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});Object.defineProperty(h.prototype,"destroyed",{enumerable:!1,get:function(){return void 0===this._readableState||void 0===this._writableState?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(a){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=a,this._writableState.destroyed=a)}})}).call(this)}).call(this,f("_process"))},{"./_stream_readable":9,
"./_stream_writable":11,_process:22,inherits:21}],8:[function(f,v,l){function m(a){if(!(this instanceof m))return new m(a);h.call(this,a)}v.exports=m;var h=f("./_stream_transform");f("inherits")(m,h);m.prototype._transform=function(a,h,c){c(null,a)}},{"./_stream_transform":10,inherits:21}],9:[function(f,v,l){(function(m,h){(function(){function a(a,b,e){if("function"===typeof a.prependListener)return a.prependListener(b,e);if(a._events&&a._events[b])Array.isArray(a._events[b])?a._events[b].unshift(e):
a._events[b]=[e,a._events[b]];else a.on(b,e)}function A(a,b,e){l=l||f("./_stream_duplex");a=a||{};"boolean"!==typeof e&&(e=b instanceof l);this.objectMode=!!a.objectMode;e&&(this.objectMode=this.objectMode||!!a.readableObjectMode);this.highWaterMark=P(this,a,"readableHighWaterMark",e);this.buffer=new L;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.paused=!0;this.emitClose=!1!==a.emitClose;this.autoDestroy=!!a.autoDestroy;this.destroyed=!1;this.defaultEncoding=a.defaultEncoding||"utf8";this.awaitDrain=0;this.readingMore=!1;this.encoding=this.decoder=null;a.encoding&&(S||(S=f("string_decoder/").StringDecoder),this.decoder=new S(a.encoding),this.encoding=a.encoding)}function c(a){l=l||f("./_stream_duplex");if(!(this instanceof c))return new c(a);this._readableState=new A(a,this,this instanceof l);this.readable=!0;a&&("function"===typeof a.read&&
(this._read=a.read),"function"===typeof a.destroy&&(this._destroy=a.destroy));I.call(this)}function x(a,e,k,c,h){C("readableAddChunk",e);var G=a._readableState;if(null===e)G.reading=!1,C("onEofChunk"),G.ended||(G.decoder&&(e=G.decoder.end())&&e.length&&(G.buffer.push(e),G.length+=G.objectMode?1:e.length),G.ended=!0,G.sync?u(a):(G.needReadable=!1,G.emittedReadable||(G.emittedReadable=!0,d(a))));else{if(!h){h=e;var f;w.isBuffer(h)||h instanceof O||"string"===typeof h||void 0===h||G.objectMode||(f=new g("chunk",
["string","Buffer","Uint8Array"],h));var M=f}if(M)T(a,M);else if(G.objectMode||e&&0<e.length)if("string"===typeof e||G.objectMode||Object.getPrototypeOf(e)===w.prototype||(e=w.from(e)),c)G.endEmitted?T(a,new V):b(a,G,e,!0);else if(G.ended)T(a,new n);else{if(G.destroyed)return!1;G.reading=!1;G.decoder&&!k?(e=G.decoder.write(e),G.objectMode||0!==e.length?b(a,G,e,!1):q(a,G)):b(a,G,e,!1)}else c||(G.reading=!1,q(a,G))}return!G.ended&&(G.length<G.highWaterMark||0===G.length)}function b(a,b,e,d){b.flowing&&
0===b.length&&!b.sync?(b.awaitDrain=0,a.emit("data",e)):(b.length+=b.objectMode?1:e.length,d?b.buffer.unshift(e):b.buffer.push(e),b.needReadable&&u(a));q(a,b)}function y(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 e=a;1073741824<=e?e=1073741824:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++);b.highWaterMark=e}return a<=b.length?a:b.ended?b.length:(b.needReadable=!0,0)}
function u(a){var b=a._readableState;C("emitReadable",b.needReadable,b.emittedReadable);b.needReadable=!1;b.emittedReadable||(C("emitReadable",b.flowing),b.emittedReadable=!0,m.nextTick(d,a))}function d(a){var b=a._readableState;C("emitReadable_",b.destroyed,b.length,b.ended);b.destroyed||!b.length&&!b.ended||(a.emit("readable"),b.emittedReadable=!1);b.needReadable=!b.flowing&&!b.ended&&b.length<=b.highWaterMark;e(a)}function q(a,b){b.readingMore||(b.readingMore=!0,m.nextTick(p,a,b))}function p(a,
b){for(;!b.reading&&!b.ended&&(b.length<b.highWaterMark||b.flowing&&0===b.length);){var e=b.length;C("maybeReadMore read 0");a.read(0);if(e===b.length)break}b.readingMore=!1}function H(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,e(a))}}function K(a){var b=a._readableState;b.readableListening=0<a.listenerCount("readable");b.resumeScheduled&&!b.paused?b.flowing=!0:0<a.listenerCount("data")&&
a.resume()}function F(a){C("readable nexttick read 0");a.read(0)}function E(a,b){C("resume",b.reading);b.reading||a.read(0);b.resumeScheduled=!1;a.emit("resume");e(a);b.flowing&&!b.reading&&a.read(0)}function e(a){var b=a._readableState;for(C("flow",b.flowing);b.flowing&&null!==a.read(););}function z(a,b){if(0===b.length)return null;b.objectMode?a=b.buffer.shift():!a||a>=b.length?(a=b.decoder?b.buffer.join(""):1===b.buffer.length?b.buffer.first():b.buffer.concat(b.length),b.buffer.clear()):a=b.buffer.consume(a,
b.decoder);return a}function k(a){var b=a._readableState;C("endReadable",b.endEmitted);b.endEmitted||(b.ended=!0,m.nextTick(t,b,a))}function t(a,b){C("endReadableNT",a.endEmitted,a.length);a.endEmitted||0!==a.length||(a.endEmitted=!0,b.readable=!1,b.emit("end"),a.autoDestroy&&(a=b._writableState,(!a||a.autoDestroy&&a.finished)&&b.destroy()))}function D(a,b){for(var e=0,d=a.length;e<d;e++)if(a[e]===b)return e;return-1}v.exports=c;var l;c.ReadableState=A;f("events");var I=f("./internal/streams/stream"),
w=f("buffer").Buffer,O=("undefined"!==typeof h?h:"undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).Uint8Array||function(){},B=f("util");var C=B&&B.debuglog?B.debuglog("stream"):function(){};var L=f("./internal/streams/buffer_list");B=f("./internal/streams/destroy");var P=f("./internal/streams/state").getHighWaterMark,N=f("../errors").codes,g=N.ERR_INVALID_ARG_TYPE,n=N.ERR_STREAM_PUSH_AFTER_EOF,J=N.ERR_METHOD_NOT_IMPLEMENTED,V=N.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,S,U,r;f("inherits")(c,
I);var T=B.errorOrDestroy,Q=["error","close","destroy","pause","resume"];Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0===this._readableState?!1:this._readableState.destroyed},set:function(a){this._readableState&&(this._readableState.destroyed=a)}});c.prototype.destroy=B.destroy;c.prototype._undestroy=B.undestroy;c.prototype._destroy=function(a,b){b(a)};c.prototype.push=function(a,b){var e=this._readableState;if(e.objectMode)var d=!0;else"string"===typeof a&&
(b=b||e.defaultEncoding,b!==e.encoding&&(a=w.from(a,b),b=""),d=!0);return x(this,a,b,!1,d)};c.prototype.unshift=function(a){return x(this,a,null,!0,!1)};c.prototype.isPaused=function(){return!1===this._readableState.flowing};c.prototype.setEncoding=function(a){S||(S=f("string_decoder/").StringDecoder);a=new S(a);this._readableState.decoder=a;this._readableState.encoding=this._readableState.decoder.encoding;for(var b=this._readableState.buffer.head,e="";null!==b;)e+=a.write(b.data),b=b.next;this._readableState.buffer.clear();
""!==e&&this._readableState.buffer.push(e);this._readableState.length=e.length;return this};c.prototype.read=function(a){C("read",a);a=parseInt(a,10);var b=this._readableState,e=a;0!==a&&(b.emittedReadable=!1);if(0===a&&b.needReadable&&((0!==b.highWaterMark?b.length>=b.highWaterMark:0<b.length)||b.ended))return C("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?k(this):u(this),null;a=y(a,b);if(0===a&&b.ended)return 0===b.length&&k(this),null;var d=b.needReadable;C("need readable",d);if(0===
b.length||b.length-a<b.highWaterMark)d=!0,C("length less than watermark",d);b.ended||b.reading?C("reading or ended",!1):d&&(C("do read"),b.reading=!0,b.sync=!0,0===b.length&&(b.needReadable=!0),this._read(b.highWaterMark),b.sync=!1,b.reading||(a=y(e,b)));d=0<a?z(a,b):null;null===d?(b.needReadable=b.length<=b.highWaterMark,a=0):(b.length-=a,b.awaitDrain=0);0===b.length&&(b.ended||(b.needReadable=!0),e!==a&&b.ended&&k(this));null!==d&&this.emit("data",d);return d};c.prototype._read=function(a){T(this,
new J("_read()"))};c.prototype.pipe=function(b,e){function d(a,e){C("onunpipe");a===G&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,C("cleanup"),b.removeListener("close",h),b.removeListener("finish",f),b.removeListener("drain",n),b.removeListener("error",c),b.removeListener("unpipe",d),G.removeListener("end",g),G.removeListener("end",u),G.removeListener("data",k),p=!0,!t.awaitDrain||b._writableState&&!b._writableState.needDrain||n())}function g(){C("onend");b.end()}function k(a){C("ondata");a=b.write(a);
C("dest.write",a);!1===a&&((1===t.pipesCount&&t.pipes===b||1<t.pipesCount&&-1!==D(t.pipes,b))&&!p&&(C("false write response, pause",t.awaitDrain),t.awaitDrain++),G.pause())}function c(a){C("onerror",a);u();b.removeListener("error",c);0===b.listeners("e