diff --git a/appbase.js b/appbase.js index 8d33b0e..f099002 100644 --- a/appbase.js +++ b/appbase.js @@ -105,7 +105,7 @@ appbaseClient.prototype.streamSearch = function streamSearch(args) { } if(typeof window !== 'undefined') { - window.appbase = appbaseClient + window.Appbase = appbaseClient } module.exports = appbaseClient \ No newline at end of file diff --git a/bower.json b/bower.json index 9c5b473..4390013 100644 --- a/bower.json +++ b/bower.json @@ -13,7 +13,8 @@ "stream", "data streams", "search", - "websockets" + "websockets", + "appbase" ], "license": "MIT", "ignore": [ diff --git a/browser/appbase.js b/browser/appbase.js index a3cbce7..4499a71 100644 --- a/browser/appbase.js +++ b/browser/appbase.js @@ -449,7 +449,7 @@ appbaseClient.prototype.streamSearch = function streamSearch(args) { } if(typeof window !== 'undefined') { - window.appbase = appbaseClient + window.Appbase = appbaseClient } module.exports = appbaseClient diff --git a/browser/appbase.min.js b/browser/appbase.min.js index b0929ed..b4abc6a 100644 --- a/browser/appbase.min.js +++ b/browser/appbase.min.js @@ -1,4 +1,4 @@ -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g0?new Error("fields missing: "+b):!0},b.exports=d},{}],2:[function(a,b,c){var d=function(a,b){this.args=b;var c=this.validate();if(c!==!0)throw c;var d=b.type,e=b.id;delete b.type,delete b.id;var f=d+"/"+e;return a.performStreamingRequest({method:"DELETE",path:f,params:b})};d.prototype.validate=function(){var a=[];("string"!=typeof this.args.type||""===this.args.type)&&a.push("type"),("string"!=typeof this.args.id||""===this.args.type)&&a.push("id");for(var b="",c=0;c0?new Error("fields missing: "+b):!0},b.exports=d},{}],3:[function(a,b,c){var d=function(a,b){this.args=b;var c=this.validate();if(c!==!0)throw c;var d=b.type,e=b.id,f=b.body;return delete b.type,delete b.id,delete b.body,e?path=d+"/"+e:path=d,a.performStreamingRequest({method:"POST",path:path,params:b,body:f})};d.prototype.validate=function(){var a=[];("string"!=typeof this.args.type||""===this.args.type)&&a.push("type"),("object"!=typeof this.args.body||null===this.args.body)&&a.push("body");for(var b="",c=0;c0?new Error("fields missing: "+b):!0},b.exports=d},{}],4:[function(a,b,c){var d=function(a,b){this.args=b;var c=this.validate();if(c!==!0)throw c;var d=b.type,e=b.body;return delete b.type,delete b.body,id?path=d+"/_search":path="/_search",a.performStreamingRequest({method:"POST",path:path,params:b,body:e})};d.prototype.validate=function(){var a=[];("object"!=typeof this.args.body||null===this.args.body)&&a.push("body");for(var b="",c=0;c0?new Error("fields missing: "+b):!0},b.exports=d},{}],5:[function(a,b,c){var d=function(a,b){this.args=b;var c=this.validate();if(c!==!0)throw c;var d=b.type,e=b.id;return delete b.type,delete b.id,delete b.stream,b.streamonly===!0||"true"===b.streamonly?b.streamonly="true":b.stream="true",a.performWsRequest({method:"GET",path:d+"/"+e,params:b})};d.prototype.validate=function(){var a=[];("string"!=typeof this.args.type||""===this.args.type)&&a.push("type"),("string"!=typeof this.args.id||""===this.args.id)&&a.push("id");for(var b="",c=0;c0?new Error("fields missing: "+b):!0},b.exports=d},{}],6:[function(a,b,c){var d=function(a,b){this.args=b;var c=this.validate();if(c!==!0)throw c;var d=b.type,e=b.body;return delete b.type,delete b.body,delete b.stream,b.streamonly===!0||"true"===b.streamonly?b.streamonly="true":b.stream="true",a.performWsRequest({method:"POST",path:d+"/_search",params:b,body:e})};d.prototype.validate=function(){var a=[];("string"!=typeof this.args.type||""===this.args.type)&&a.push("type"),("object"!=typeof this.args.body||null===this.args.body)&&a.push("body");for(var b="",c=0;c0?new Error("fields missing: "+b):!0},b.exports=d},{}],7:[function(a,b,c){var d=function(a,b){this.args=b;var c=this.validate();if(c!==!0)throw c;var d=b.type,e=b.id,f=b.body;delete b.type,delete b.id,delete b.body;var g=d+"/"+e+"/_update";return a.performStreamingRequest({method:"POST",path:g,params:b,body:f})};d.prototype.validate=function(){var a=[];("string"!=typeof this.args.type||""===this.args.type)&&a.push("type"),("string"!=typeof this.args.id||""===this.args.type)&&a.push("id"),("object"!=typeof this.args.body||null===this.args.body)&&a.push("body");for(var b="",c=0;c0?new Error("fields missing: "+b):!0},b.exports=d},{}],8:[function(a,b,c){var d=a("url"),e=a("./better_websocket.js"),f=a("./streaming_request.js"),g=a("./websocket_request.js"),h=a("./actions/index.js"),i=a("./actions/update.js"),j=a("./actions/delete.js"),k=a("./actions/bulk.js"),l=a("./actions/search.js"),m=a("./actions/stream_document.js"),n=a("./actions/stream_search.js"),o=function p(a){if(!(this instanceof p))return new p;if("string"!=typeof a.appname||""===a.appname)throw new Error("Appname not present is options.");if("string"!=typeof a.url||""===a.url)throw new Error("URL not present is options.");var b=d.parse(a.url);if(this.url=b.host,this.protocol=b.protocol,this.credentials=b.auth,this.appname=a.appname,"string"!=typeof this.protocol||""===this.protocol)throw new Error("Protocol not present in url. URL should be of the form https://scalr.api.appbase.io");if("string"==typeof a.username&&""!==a.username&&"string"==typeof a.password&&""!==a.password&&(this.credentials=a.username+":"+a.password),"string"!=typeof this.credentials||""===this.credentials)throw new Error("Authentication information not present.");"https:"===b.protocol?this.ws=new e("wss://"+b.host):this.ws=new e("ws://"+b.host),"/"===this.url.slice(-1)&&(this.url=this.url.slice(0,-1));var c={};return c.index=this.index.bind(this),c.update=this.update.bind(this),c["delete"]=this["delete"].bind(this),c.bulk=this.bulk.bind(this),c.search=this.search.bind(this),c.streamDocument=this.streamDocument.bind(this),c.streamSearch=this.streamSearch.bind(this),c};o.prototype.performWsRequest=function(a){return new g(this,a)},o.prototype.performStreamingRequest=function(a){return new f(this,a)},o.prototype.index=function(a){return new h(this,a)},o.prototype.update=function(a){return new i(this,a)},o.prototype["delete"]=function(a){return new j(this,a)},o.prototype.bulk=function(a){return new k(this,a)},o.prototype.search=function(a){return new l(this,a)},o.prototype.streamDocument=function(a){return new m(this,a)},o.prototype.streamSearch=function(a){return new n(this,a)},"undefined"!=typeof window&&(window.appbase=o),b.exports=o},{"./actions/bulk.js":1,"./actions/delete.js":2,"./actions/index.js":3,"./actions/search.js":4,"./actions/stream_document.js":5,"./actions/stream_search.js":6,"./actions/update.js":7,"./better_websocket.js":9,"./streaming_request.js":85,"./websocket_request.js":86,url:43}],9:[function(a,b,c){var d=a("ws"),e=a("events").EventEmitter,f=function(a){var b=new d(a),c=new e;return c.send=function(a){return 1===b.readyState?(b.send(JSON.stringify(a)),this):void c.on("open",function d(){b.send(JSON.stringify(a)),c.removeListener("open",d)})},b.onopen=function(){c.emit("open")},b.onmessage=function(a){var b=JSON.parse(a.data);c.emit("message",b)},b.onerror=function(a){c.emit("error",a)},b.onclose=function(a){c.emit("close",a)},c};b.exports=f},{events:17,ws:84}],10:[function(a,b,c){(function(d,e){function f(a,b){return"string"==typeof a?b==a:a&&"function"==typeof a.exec?a.exec(b):"boolean"==typeof a?a:"function"==typeof a?a(b):!1}var g=a("jsonparse"),h=a("through");c.parse=function(a,b){var c=new g,d=h(function(a){"string"==typeof a&&(a=new e(a)),c.write(a)},function(a){a&&d.write(a),d.queue(null)});"string"==typeof a&&(a=a.split(".").map(function(a){return"*"===a?!0:""===a?{recurse:!0}:a}));var i=0;return a&&a.length||(a=null),c.onValue=function(c){if(this.root||(d.root=c),a){for(var e=0,g=0;e-1&&(a.message="Invalid JSON ("+a.message+")"),d.emit("error",a)},d},c.stringify=function(a,b,c,d){d=d||0,a===!1?(a="",b="\n",c=""):null==a&&(a="[\n",b="\n,\n",c="\n]\n");var e,f=!0,g=!1;return e=h(function(c){g=!0;var h=JSON.stringify(c,null,d);f?(f=!1,e.queue(a+h)):e.queue(b+h)},function(b){g||e.queue(a),e.queue(c),e.queue(null)})},c.stringifyObject=function(a,b,c,d){d=d||0,a===!1?(a="",b="\n",c=""):null==a&&(a="{\n",b="\n,\n",c="\n}\n");var e=!0,f=!1;return stream=h(function(c){f=!0;var g=JSON.stringify(c[0])+":"+JSON.stringify(c[1],null,d);e?(e=!1,this.queue(a+g)):this.queue(b+g)},function(b){f||this.queue(a),this.queue(c),this.queue(null)}),stream},b.parent||"browser"===d.title||d.stdin.pipe(c.parse(d.argv[2])).pipe(c.stringify("[",",\n","]\n",2)).pipe(d.stdout)}).call(this,a("_process"),a("buffer").Buffer)},{_process:25,buffer:13,jsonparse:70,through:11}],11:[function(a,b,c){(function(d){function e(a,b,c){function e(){for(;j.length&&!l.paused;){var a=j.shift();if(null===a)return l.emit("end");l.emit("data",a)}}function g(){l.writable=!1,b.call(l),!l.readable&&l.autoDestroy&&l.destroy()}a=a||function(a){this.queue(a)},b=b||function(){this.queue(null)};var h=!1,i=!1,j=[],k=!1,l=new f;return l.readable=l.writable=!0,l.paused=!1,l.autoDestroy=!(c&&c.autoDestroy===!1),l.write=function(b){return a.call(this,b),!l.paused},l.queue=l.push=function(a){return k?l:(null===a&&(k=!0),j.push(a),e(),l)},l.on("end",function(){l.readable=!1,!l.writable&&l.autoDestroy&&d.nextTick(function(){l.destroy()})}),l.end=function(a){return h?void 0:(h=!0,arguments.length&&l.write(a),g(),l)},l.destroy=function(){return i?void 0:(i=!0,h=!0,j.length=0,l.writable=l.readable=!1,l.emit("close"),l)},l.pause=function(){return l.paused?void 0:(l.paused=!0,l)},l.resume=function(){return l.paused&&(l.paused=!1,l.emit("resume")),e(),l.paused||l.emit("drain"),l},l}var f=a("stream");c=b.exports=e,e.through=e}).call(this,a("_process"))},{_process:25,stream:41}],12:[function(a,b,c){},{}],13:[function(a,b,c){function d(){return e.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function e(a){return this instanceof e?(this.length=0,this.parent=void 0,"number"==typeof a?f(this,a):"string"==typeof a?g(this,a,arguments.length>1?arguments[1]:"utf8"):h(this,a)):arguments.length>1?new e(a,arguments[1]):new e(a)}function f(a,b){if(a=n(a,0>b?0:0|o(b)),!e.TYPED_ARRAY_SUPPORT)for(var c=0;b>c;c++)a[c]=0;return a}function g(a,b,c){("string"!=typeof c||""===c)&&(c="utf8");var d=0|q(b,c);return a=n(a,d),a.write(b,c),a}function h(a,b){if(e.isBuffer(b))return i(a,b);if(W(b))return j(a,b);if(null==b)throw new TypeError("must start with number, buffer, array or string");return"undefined"!=typeof ArrayBuffer&&b.buffer instanceof ArrayBuffer?k(a,b):b.length?l(a,b):m(a,b)}function i(a,b){var c=0|o(b.length);return a=n(a,c),b.copy(a,0,0,c),a}function j(a,b){var c=0|o(b.length);a=n(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function k(a,b){var c=0|o(b.length);a=n(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function l(a,b){var c=0|o(b.length);a=n(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function m(a,b){var c,d=0;"Buffer"===b.type&&W(b.data)&&(c=b.data,d=0|o(c.length)),a=n(a,d);for(var e=0;d>e;e+=1)a[e]=255&c[e];return a}function n(a,b){e.TYPED_ARRAY_SUPPORT?a=e._augment(new Uint8Array(b)):(a.length=b,a._isBuffer=!0);var c=0!==b&&b<=e.poolSize>>>1;return c&&(a.parent=X),a}function o(a){if(a>=d())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d().toString(16)+" bytes");return 0|a}function p(a,b){if(!(this instanceof p))return new p(a,b);var c=new e(a,b);return delete c.parent,c}function q(a,b){"string"!=typeof a&&(a=""+a);var c=a.length;if(0===c)return 0;for(var d=!1;;)switch(b){case"ascii":case"binary":case"raw":case"raws":return c;case"utf8":case"utf-8":return O(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*c;case"hex":return c>>>1;case"base64":return R(a).length;default:if(d)return O(a).length;b=(""+b).toLowerCase(),d=!0}}function r(a,b,c){var d=!1;if(b=0|b,c=void 0===c||c===1/0?this.length:0|c,a||(a="utf8"),0>b&&(b=0),c>this.length&&(c=this.length),b>=c)return"";for(;;)switch(a){case"hex":return C(this,b,c);case"utf8":case"utf-8":return z(this,b,c);case"ascii":return A(this,b,c);case"binary":return B(this,b,c);case"base64":return y(this,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,b,c);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),d=!0}}function s(a,b,c,d){c=Number(c)||0;var e=a.length-c;d?(d=Number(d),d>e&&(d=e)):d=e;var f=b.length;if(f%2!==0)throw new Error("Invalid hex string");d>f/2&&(d=f/2);for(var g=0;d>g;g++){var h=parseInt(b.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");a[c+g]=h}return g}function t(a,b,c,d){return S(O(b,a.length-c),a,c,d)}function u(a,b,c,d){return S(P(b),a,c,d)}function v(a,b,c,d){return u(a,b,c,d)}function w(a,b,c,d){return S(R(b),a,c,d)}function x(a,b,c,d){return S(Q(b,a.length-c),a,c,d)}function y(a,b,c){return 0===b&&c===a.length?U.fromByteArray(a):U.fromByteArray(a.slice(b,c))}function z(a,b,c){var d="",e="";c=Math.min(a.length,c);for(var f=b;c>f;f++)a[f]<=127?(d+=T(e)+String.fromCharCode(a[f]),e=""):e+="%"+a[f].toString(16);return d+T(e)}function A(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(127&a[e]);return d}function B(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(a[e]);return d}function C(a,b,c){var d=a.length;(!b||0>b)&&(b=0),(!c||0>c||c>d)&&(c=d);for(var e="",f=b;c>f;f++)e+=N(a[f]);return e}function D(a,b,c){for(var d=a.slice(b,c),e="",f=0;fa)throw new RangeError("offset is not uint");if(a+b>c)throw new RangeError("Trying to access beyond buffer length")}function F(a,b,c,d,f,g){if(!e.isBuffer(a))throw new TypeError("buffer must be a Buffer instance");if(b>f||g>b)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range")}function G(a,b,c,d){0>b&&(b=65535+b+1);for(var e=0,f=Math.min(a.length-c,2);f>e;e++)a[c+e]=(b&255<<8*(d?e:1-e))>>>8*(d?e:1-e)}function H(a,b,c,d){0>b&&(b=4294967295+b+1);for(var e=0,f=Math.min(a.length-c,4);f>e;e++)a[c+e]=b>>>8*(d?e:3-e)&255}function I(a,b,c,d,e,f){if(b>e||f>b)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range");if(0>c)throw new RangeError("index out of range")}function J(a,b,c,d,e){return e||I(a,b,c,4,3.4028234663852886e38,-3.4028234663852886e38),V.write(a,b,c,d,23,4),c+4}function K(a,b,c,d,e){return e||I(a,b,c,8,1.7976931348623157e308,-1.7976931348623157e308),V.write(a,b,c,d,52,8),c+8}function L(a){if(a=M(a).replace(Z,""),a.length<2)return"";for(;a.length%4!==0;)a+="=";return a}function M(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function N(a){return 16>a?"0"+a.toString(16):a.toString(16)}function O(a,b){b=b||1/0;for(var c,d=a.length,e=null,f=[],g=0;d>g;g++){if(c=a.charCodeAt(g),c>55295&&57344>c){if(!e){if(c>56319){(b-=3)>-1&&f.push(239,191,189);continue}if(g+1===d){(b-=3)>-1&&f.push(239,191,189);continue}e=c;continue}if(56320>c){(b-=3)>-1&&f.push(239,191,189),e=c;continue}c=e-55296<<10|c-56320|65536,e=null}else e&&((b-=3)>-1&&f.push(239,191,189),e=null);if(128>c){if((b-=1)<0)break;f.push(c)}else if(2048>c){if((b-=2)<0)break;f.push(c>>6|192,63&c|128)}else if(65536>c){if((b-=3)<0)break;f.push(c>>12|224,c>>6&63|128,63&c|128)}else{if(!(2097152>c))throw new Error("Invalid code point");if((b-=4)<0)break;f.push(c>>18|240,c>>12&63|128,c>>6&63|128,63&c|128)}}return f}function P(a){for(var b=[],c=0;c>8,e=c%256,f.push(e),f.push(d);return f}function R(a){return U.toByteArray(L(a))}function S(a,b,c,d){for(var e=0;d>e&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}function T(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}var U=a("base64-js"),V=a("ieee754"),W=a("is-array");c.Buffer=e,c.SlowBuffer=p,c.INSPECT_MAX_BYTES=50,e.poolSize=8192;var X={};e.TYPED_ARRAY_SUPPORT=function(){function a(){}try{var b=new ArrayBuffer(0),c=new Uint8Array(b);return c.foo=function(){return 42},c.constructor=a,42===c.foo()&&c.constructor===a&&"function"==typeof c.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(d){return!1}}(),e.isBuffer=function(a){return!(null==a||!a._isBuffer)},e.compare=function(a,b){if(!e.isBuffer(a)||!e.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var c=a.length,d=b.length,f=0,g=Math.min(c,d);g>f&&a[f]===b[f];)++f;return f!==g&&(c=a[f],d=b[f]),d>c?-1:c>d?1:0},e.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(a,b){if(!W(a))throw new TypeError("list argument must be an Array of Buffers.");if(0===a.length)return new e(0);if(1===a.length)return a[0];var c;if(void 0===b)for(b=0,c=0;c0&&(a=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(a+=" ... ")),""},e.prototype.compare=function(a){if(!e.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?0:e.compare(this,a)},e.prototype.indexOf=function(a,b){function c(a,b,c){for(var d=-1,e=0;c+e2147483647?b=2147483647:-2147483648>b&&(b=-2147483648),b>>=0,0===this.length)return-1;if(b>=this.length)return-1;if(0>b&&(b=Math.max(this.length+b,0)),"string"==typeof a)return 0===a.length?-1:String.prototype.indexOf.call(this,a,b);if(e.isBuffer(a))return c(this,a,b);if("number"==typeof a)return e.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,a,b):c(this,[a],b);throw new TypeError("val must be string, number or Buffer")},e.prototype.get=function(a){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(a)},e.prototype.set=function(a,b){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(a,b)},e.prototype.write=function(a,b,c,d){if(void 0===b)d="utf8",c=this.length,b=0;else if(void 0===c&&"string"==typeof b)d=b,c=this.length,b=0;else if(isFinite(b))b=0|b,isFinite(c)?(c=0|c,void 0===d&&(d="utf8")):(d=c,c=void 0);else{var e=d;d=b,b=0|c,c=e}var f=this.length-b;if((void 0===c||c>f)&&(c=f),a.length>0&&(0>c||0>b)||b>this.length)throw new RangeError("attempt to write outside buffer bounds");d||(d="utf8");for(var g=!1;;)switch(d){case"hex":return s(this,a,b,c);case"utf8":case"utf-8":return t(this,a,b,c);case"ascii":return u(this,a,b,c);case"binary":return v(this,a,b,c);case"base64":return w(this,a,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,a,b,c);default:if(g)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase(),g=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},e.prototype.slice=function(a,b){var c=this.length;a=~~a,b=void 0===b?c:~~b,0>a?(a+=c,0>a&&(a=0)):a>c&&(a=c),0>b?(b+=c,0>b&&(b=0)):b>c&&(b=c),a>b&&(b=a);var d;if(e.TYPED_ARRAY_SUPPORT)d=e._augment(this.subarray(a,b));else{var f=b-a;d=new e(f,void 0);for(var g=0;f>g;g++)d[g]=this[g+a]}return d.length&&(d.parent=this.parent||this),d},e.prototype.readUIntLE=function(a,b,c){a=0|a,b=0|b,c||E(a,b,this.length);for(var d=this[a],e=1,f=0;++f0&&(e*=256);)d+=this[a+--b]*e;return d},e.prototype.readUInt8=function(a,b){return b||E(a,1,this.length),this[a]},e.prototype.readUInt16LE=function(a,b){return b||E(a,2,this.length),this[a]|this[a+1]<<8},e.prototype.readUInt16BE=function(a,b){return b||E(a,2,this.length),this[a]<<8|this[a+1]},e.prototype.readUInt32LE=function(a,b){return b||E(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},e.prototype.readUInt32BE=function(a,b){return b||E(a,4,this.length),16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])},e.prototype.readIntLE=function(a,b,c){a=0|a,b=0|b,c||E(a,b,this.length);for(var d=this[a],e=1,f=0;++f=e&&(d-=Math.pow(2,8*b)),d},e.prototype.readIntBE=function(a,b,c){a=0|a,b=0|b,c||E(a,b,this.length);for(var d=b,e=1,f=this[a+--d];d>0&&(e*=256);)f+=this[a+--d]*e;return e*=128,f>=e&&(f-=Math.pow(2,8*b)),f},e.prototype.readInt8=function(a,b){return b||E(a,1,this.length),128&this[a]?-1*(255-this[a]+1):this[a]},e.prototype.readInt16LE=function(a,b){b||E(a,2,this.length);var c=this[a]|this[a+1]<<8;return 32768&c?4294901760|c:c},e.prototype.readInt16BE=function(a,b){b||E(a,2,this.length);var c=this[a+1]|this[a]<<8;return 32768&c?4294901760|c:c},e.prototype.readInt32LE=function(a,b){return b||E(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},e.prototype.readInt32BE=function(a,b){return b||E(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},e.prototype.readFloatLE=function(a,b){return b||E(a,4,this.length),V.read(this,a,!0,23,4)},e.prototype.readFloatBE=function(a,b){return b||E(a,4,this.length),V.read(this,a,!1,23,4)},e.prototype.readDoubleLE=function(a,b){return b||E(a,8,this.length),V.read(this,a,!0,52,8)},e.prototype.readDoubleBE=function(a,b){return b||E(a,8,this.length),V.read(this,a,!1,52,8)},e.prototype.writeUIntLE=function(a,b,c,d){a=+a,b=0|b,c=0|c,d||F(this,a,b,c,Math.pow(2,8*c),0);var e=1,f=0;for(this[b]=255&a;++f=0&&(f*=256);)this[b+e]=a/f&255;return b+c},e.prototype.writeUInt8=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,1,255,0),e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),this[b]=a,b+1},e.prototype.writeUInt16LE=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):G(this,a,b,!0),b+2},e.prototype.writeUInt16BE=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):G(this,a,b,!1),b+2},e.prototype.writeUInt32LE=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=a):H(this,a,b,!0),b+4},e.prototype.writeUInt32BE=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a):H(this,a,b,!1),b+4},e.prototype.writeIntLE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);F(this,a,b,c,e-1,-e)}var f=0,g=1,h=0>a?1:0;for(this[b]=255&a;++f>0)-h&255;return b+c},e.prototype.writeIntBE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);F(this,a,b,c,e-1,-e)}var f=c-1,g=1,h=0>a?1:0;for(this[b+f]=255&a;--f>=0&&(g*=256);)this[b+f]=(a/g>>0)-h&255;return b+c},e.prototype.writeInt8=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,1,127,-128),e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),0>a&&(a=255+a+1),this[b]=a,b+1},e.prototype.writeInt16LE=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):G(this,a,b,!0),b+2},e.prototype.writeInt16BE=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):G(this,a,b,!1),b+2},e.prototype.writeInt32LE=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,4,2147483647,-2147483648),e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):H(this,a,b,!0),b+4},e.prototype.writeInt32BE=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,4,2147483647,-2147483648),0>a&&(a=4294967295+a+1),e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a):H(this,a,b,!1),b+4},e.prototype.writeFloatLE=function(a,b,c){return J(this,a,b,!0,c)},e.prototype.writeFloatBE=function(a,b,c){return J(this,a,b,!1,c)},e.prototype.writeDoubleLE=function(a,b,c){return K(this,a,b,!0,c)},e.prototype.writeDoubleBE=function(a,b,c){return K(this,a,b,!1,c)},e.prototype.copy=function(a,b,c,d){if(c||(c=0),d||0===d||(d=this.length),b>=a.length&&(b=a.length),b||(b=0),d>0&&c>d&&(d=c),d===c)return 0;if(0===a.length||0===this.length)return 0;if(0>b)throw new RangeError("targetStart out of bounds");if(0>c||c>=this.length)throw new RangeError("sourceStart out of bounds");if(0>d)throw new RangeError("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-bf||!e.TYPED_ARRAY_SUPPORT)for(var g=0;f>g;g++)a[g+b]=this[g+c];else a._set(this.subarray(c,c+f),b);return f},e.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),b>c)throw new RangeError("end < start");if(c!==b&&0!==this.length){if(0>b||b>=this.length)throw new RangeError("start out of bounds");if(0>c||c>this.length)throw new RangeError("end out of bounds");var d;if("number"==typeof a)for(d=b;c>d;d++)this[d]=a;else{var e=O(a.toString()),f=e.length;for(d=b;c>d;d++)this[d]=e[d%f]}return this}},e.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(e.TYPED_ARRAY_SUPPORT)return new e(this).buffer;for(var a=new Uint8Array(this.length),b=0,c=a.length;c>b;b+=1)a[b]=this[b];return a.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Y=e.prototype;e._augment=function(a){return a.constructor=e,a._isBuffer=!0,a._set=a.set,a.get=Y.get,a.set=Y.set,a.write=Y.write,a.toString=Y.toString,a.toLocaleString=Y.toString,a.toJSON=Y.toJSON,a.equals=Y.equals,a.compare=Y.compare,a.indexOf=Y.indexOf,a.copy=Y.copy,a.slice=Y.slice,a.readUIntLE=Y.readUIntLE,a.readUIntBE=Y.readUIntBE,a.readUInt8=Y.readUInt8,a.readUInt16LE=Y.readUInt16LE,a.readUInt16BE=Y.readUInt16BE,a.readUInt32LE=Y.readUInt32LE,a.readUInt32BE=Y.readUInt32BE,a.readIntLE=Y.readIntLE,a.readIntBE=Y.readIntBE,a.readInt8=Y.readInt8,a.readInt16LE=Y.readInt16LE,a.readInt16BE=Y.readInt16BE,a.readInt32LE=Y.readInt32LE,a.readInt32BE=Y.readInt32BE,a.readFloatLE=Y.readFloatLE,a.readFloatBE=Y.readFloatBE,a.readDoubleLE=Y.readDoubleLE,a.readDoubleBE=Y.readDoubleBE,a.writeUInt8=Y.writeUInt8,a.writeUIntLE=Y.writeUIntLE,a.writeUIntBE=Y.writeUIntBE,a.writeUInt16LE=Y.writeUInt16LE,a.writeUInt16BE=Y.writeUInt16BE,a.writeUInt32LE=Y.writeUInt32LE,a.writeUInt32BE=Y.writeUInt32BE,a.writeIntLE=Y.writeIntLE,a.writeIntBE=Y.writeIntBE,a.writeInt8=Y.writeInt8,a.writeInt16LE=Y.writeInt16LE,a.writeInt16BE=Y.writeInt16BE,a.writeInt32LE=Y.writeInt32LE,a.writeInt32BE=Y.writeInt32BE,a.writeFloatLE=Y.writeFloatLE,a.writeFloatBE=Y.writeFloatBE,a.writeDoubleLE=Y.writeDoubleLE,a.writeDoubleBE=Y.writeDoubleBE,a.fill=Y.fill,a.inspect=Y.inspect,a.toArrayBuffer=Y.toArrayBuffer,a};var Z=/[^+\/0-9A-z\-]/g},{"base64-js":14,ieee754:15,"is-array":16}],14:[function(a,b,c){var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(a){"use strict";function b(a){var b=a.charCodeAt(0);return b===g||b===l?62:b===h||b===m?63:i>b?-1:i+10>b?b-i+26+26:k+26>b?b-k:j+26>b?b-j+26:void 0}function c(a){function c(a){j[l++]=a}var d,e,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new f(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,e=0;g>d;d+=4,e+=3)h=b(a.charAt(d))<<18|b(a.charAt(d+1))<<12|b(a.charAt(d+2))<<6|b(a.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function e(a){function b(a){return d.charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var e,f,g,h=a.length%3,i="";for(e=0,g=a.length-h;g>e;e+=3)f=(a[e]<<16)+(a[e+1]<<8)+a[e+2],i+=c(f);switch(h){case 1:f=a[a.length-1],i+=b(f>>2),i+=b(f<<4&63),i+="==";break;case 2:f=(a[a.length-2]<<8)+a[a.length-1],i+=b(f>>10),i+=b(f>>4&63),i+=b(f<<2&63),i+="="}return i}var f="undefined"!=typeof Uint8Array?Uint8Array:Array,g="+".charCodeAt(0),h="/".charCodeAt(0),i="0".charCodeAt(0),j="a".charCodeAt(0),k="A".charCodeAt(0),l="-".charCodeAt(0),m="_".charCodeAt(0);a.toByteArray=c,a.fromByteArray=e}("undefined"==typeof c?this.base64js={}:c)},{}],15:[function(a,b,c){c.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?NaN:(n?-1:1)*(1/0);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],16:[function(a,b,c){var d=Array.isArray,e=Object.prototype.toString;b.exports=d||function(a){return!!a&&"[object Array]"==e.call(a)}},{}],17:[function(a,b,c){function d(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function e(a){return"function"==typeof a}function f(a){return"number"==typeof a}function g(a){return"object"==typeof a&&null!==a}function h(a){return void 0===a}b.exports=d,d.EventEmitter=d,d.prototype._events=void 0,d.prototype._maxListeners=void 0,d.defaultMaxListeners=10,d.prototype.setMaxListeners=function(a){if(!f(a)||0>a||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},d.prototype.emit=function(a){var b,c,d,f,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||g(this._events.error)&&!this._events.error.length)){if(b=arguments[1],b instanceof Error)throw b;throw TypeError('Uncaught, unspecified "error" event.')}if(c=this._events[a],h(c))return!1;if(e(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(d=arguments.length,f=new Array(d-1),i=1;d>i;i++)f[i-1]=arguments[i];c.apply(this,f)}else if(g(c)){for(d=arguments.length,f=new Array(d-1),i=1;d>i;i++)f[i-1]=arguments[i];for(j=c.slice(),d=j.length,i=0;d>i;i++)j[i].apply(this,f)}return!0},d.prototype.addListener=function(a,b){var c;if(!e(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,e(b.listener)?b.listener:b),this._events[a]?g(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b, +!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g0?new Error("fields missing: "+b):!0},b.exports=d},{}],2:[function(a,b,c){var d=function(a,b){this.args=b;var c=this.validate();if(c!==!0)throw c;var d=b.type,e=b.id;delete b.type,delete b.id;var f=d+"/"+e;return a.performStreamingRequest({method:"DELETE",path:f,params:b})};d.prototype.validate=function(){var a=[];("string"!=typeof this.args.type||""===this.args.type)&&a.push("type"),("string"!=typeof this.args.id||""===this.args.type)&&a.push("id");for(var b="",c=0;c0?new Error("fields missing: "+b):!0},b.exports=d},{}],3:[function(a,b,c){var d=function(a,b){this.args=b;var c=this.validate();if(c!==!0)throw c;var d=b.type,e=b.id,f=b.body;return delete b.type,delete b.id,delete b.body,e?path=d+"/"+e:path=d,a.performStreamingRequest({method:"POST",path:path,params:b,body:f})};d.prototype.validate=function(){var a=[];("string"!=typeof this.args.type||""===this.args.type)&&a.push("type"),("object"!=typeof this.args.body||null===this.args.body)&&a.push("body");for(var b="",c=0;c0?new Error("fields missing: "+b):!0},b.exports=d},{}],4:[function(a,b,c){var d=function(a,b){this.args=b;var c=this.validate();if(c!==!0)throw c;var d=b.type,e=b.body;return delete b.type,delete b.body,id?path=d+"/_search":path="/_search",a.performStreamingRequest({method:"POST",path:path,params:b,body:e})};d.prototype.validate=function(){var a=[];("object"!=typeof this.args.body||null===this.args.body)&&a.push("body");for(var b="",c=0;c0?new Error("fields missing: "+b):!0},b.exports=d},{}],5:[function(a,b,c){var d=function(a,b){this.args=b;var c=this.validate();if(c!==!0)throw c;var d=b.type,e=b.id;return delete b.type,delete b.id,delete b.stream,b.streamonly===!0||"true"===b.streamonly?b.streamonly="true":b.stream="true",a.performWsRequest({method:"GET",path:d+"/"+e,params:b})};d.prototype.validate=function(){var a=[];("string"!=typeof this.args.type||""===this.args.type)&&a.push("type"),("string"!=typeof this.args.id||""===this.args.id)&&a.push("id");for(var b="",c=0;c0?new Error("fields missing: "+b):!0},b.exports=d},{}],6:[function(a,b,c){var d=function(a,b){this.args=b;var c=this.validate();if(c!==!0)throw c;var d=b.type,e=b.body;return delete b.type,delete b.body,delete b.stream,b.streamonly===!0||"true"===b.streamonly?b.streamonly="true":b.stream="true",a.performWsRequest({method:"POST",path:d+"/_search",params:b,body:e})};d.prototype.validate=function(){var a=[];("string"!=typeof this.args.type||""===this.args.type)&&a.push("type"),("object"!=typeof this.args.body||null===this.args.body)&&a.push("body");for(var b="",c=0;c0?new Error("fields missing: "+b):!0},b.exports=d},{}],7:[function(a,b,c){var d=function(a,b){this.args=b;var c=this.validate();if(c!==!0)throw c;var d=b.type,e=b.id,f=b.body;delete b.type,delete b.id,delete b.body;var g=d+"/"+e+"/_update";return a.performStreamingRequest({method:"POST",path:g,params:b,body:f})};d.prototype.validate=function(){var a=[];("string"!=typeof this.args.type||""===this.args.type)&&a.push("type"),("string"!=typeof this.args.id||""===this.args.type)&&a.push("id"),("object"!=typeof this.args.body||null===this.args.body)&&a.push("body");for(var b="",c=0;c0?new Error("fields missing: "+b):!0},b.exports=d},{}],8:[function(a,b,c){var d=a("url"),e=a("./better_websocket.js"),f=a("./streaming_request.js"),g=a("./websocket_request.js"),h=a("./actions/index.js"),i=a("./actions/update.js"),j=a("./actions/delete.js"),k=a("./actions/bulk.js"),l=a("./actions/search.js"),m=a("./actions/stream_document.js"),n=a("./actions/stream_search.js"),o=function p(a){if(!(this instanceof p))return new p;if("string"!=typeof a.appname||""===a.appname)throw new Error("Appname not present is options.");if("string"!=typeof a.url||""===a.url)throw new Error("URL not present is options.");var b=d.parse(a.url);if(this.url=b.host,this.protocol=b.protocol,this.credentials=b.auth,this.appname=a.appname,"string"!=typeof this.protocol||""===this.protocol)throw new Error("Protocol not present in url. URL should be of the form https://scalr.api.appbase.io");if("string"==typeof a.username&&""!==a.username&&"string"==typeof a.password&&""!==a.password&&(this.credentials=a.username+":"+a.password),"string"!=typeof this.credentials||""===this.credentials)throw new Error("Authentication information not present.");"https:"===b.protocol?this.ws=new e("wss://"+b.host):this.ws=new e("ws://"+b.host),"/"===this.url.slice(-1)&&(this.url=this.url.slice(0,-1));var c={};return c.index=this.index.bind(this),c.update=this.update.bind(this),c["delete"]=this["delete"].bind(this),c.bulk=this.bulk.bind(this),c.search=this.search.bind(this),c.streamDocument=this.streamDocument.bind(this),c.streamSearch=this.streamSearch.bind(this),c};o.prototype.performWsRequest=function(a){return new g(this,a)},o.prototype.performStreamingRequest=function(a){return new f(this,a)},o.prototype.index=function(a){return new h(this,a)},o.prototype.update=function(a){return new i(this,a)},o.prototype["delete"]=function(a){return new j(this,a)},o.prototype.bulk=function(a){return new k(this,a)},o.prototype.search=function(a){return new l(this,a)},o.prototype.streamDocument=function(a){return new m(this,a)},o.prototype.streamSearch=function(a){return new n(this,a)},"undefined"!=typeof window&&(window.Appbase=o),b.exports=o},{"./actions/bulk.js":1,"./actions/delete.js":2,"./actions/index.js":3,"./actions/search.js":4,"./actions/stream_document.js":5,"./actions/stream_search.js":6,"./actions/update.js":7,"./better_websocket.js":9,"./streaming_request.js":85,"./websocket_request.js":86,url:43}],9:[function(a,b,c){var d=a("ws"),e=a("events").EventEmitter,f=function(a){var b=new d(a),c=new e;return c.send=function(a){return 1===b.readyState?(b.send(JSON.stringify(a)),this):void c.on("open",function d(){b.send(JSON.stringify(a)),c.removeListener("open",d)})},b.onopen=function(){c.emit("open")},b.onmessage=function(a){var b=JSON.parse(a.data);c.emit("message",b)},b.onerror=function(a){c.emit("error",a)},b.onclose=function(a){c.emit("close",a)},c};b.exports=f},{events:17,ws:84}],10:[function(a,b,c){(function(d,e){function f(a,b){return"string"==typeof a?b==a:a&&"function"==typeof a.exec?a.exec(b):"boolean"==typeof a?a:"function"==typeof a?a(b):!1}var g=a("jsonparse"),h=a("through");c.parse=function(a,b){var c=new g,d=h(function(a){"string"==typeof a&&(a=new e(a)),c.write(a)},function(a){a&&d.write(a),d.queue(null)});"string"==typeof a&&(a=a.split(".").map(function(a){return"*"===a?!0:""===a?{recurse:!0}:a}));var i=0;return a&&a.length||(a=null),c.onValue=function(c){if(this.root||(d.root=c),a){for(var e=0,g=0;e-1&&(a.message="Invalid JSON ("+a.message+")"),d.emit("error",a)},d},c.stringify=function(a,b,c,d){d=d||0,a===!1?(a="",b="\n",c=""):null==a&&(a="[\n",b="\n,\n",c="\n]\n");var e,f=!0,g=!1;return e=h(function(c){g=!0;var h=JSON.stringify(c,null,d);f?(f=!1,e.queue(a+h)):e.queue(b+h)},function(b){g||e.queue(a),e.queue(c),e.queue(null)})},c.stringifyObject=function(a,b,c,d){d=d||0,a===!1?(a="",b="\n",c=""):null==a&&(a="{\n",b="\n,\n",c="\n}\n");var e=!0,f=!1;return stream=h(function(c){f=!0;var g=JSON.stringify(c[0])+":"+JSON.stringify(c[1],null,d);e?(e=!1,this.queue(a+g)):this.queue(b+g)},function(b){f||this.queue(a),this.queue(c),this.queue(null)}),stream},b.parent||"browser"===d.title||d.stdin.pipe(c.parse(d.argv[2])).pipe(c.stringify("[",",\n","]\n",2)).pipe(d.stdout)}).call(this,a("_process"),a("buffer").Buffer)},{_process:25,buffer:13,jsonparse:70,through:11}],11:[function(a,b,c){(function(d){function e(a,b,c){function e(){for(;j.length&&!l.paused;){var a=j.shift();if(null===a)return l.emit("end");l.emit("data",a)}}function g(){l.writable=!1,b.call(l),!l.readable&&l.autoDestroy&&l.destroy()}a=a||function(a){this.queue(a)},b=b||function(){this.queue(null)};var h=!1,i=!1,j=[],k=!1,l=new f;return l.readable=l.writable=!0,l.paused=!1,l.autoDestroy=!(c&&c.autoDestroy===!1),l.write=function(b){return a.call(this,b),!l.paused},l.queue=l.push=function(a){return k?l:(null===a&&(k=!0),j.push(a),e(),l)},l.on("end",function(){l.readable=!1,!l.writable&&l.autoDestroy&&d.nextTick(function(){l.destroy()})}),l.end=function(a){return h?void 0:(h=!0,arguments.length&&l.write(a),g(),l)},l.destroy=function(){return i?void 0:(i=!0,h=!0,j.length=0,l.writable=l.readable=!1,l.emit("close"),l)},l.pause=function(){return l.paused?void 0:(l.paused=!0,l)},l.resume=function(){return l.paused&&(l.paused=!1,l.emit("resume")),e(),l.paused||l.emit("drain"),l},l}var f=a("stream");c=b.exports=e,e.through=e}).call(this,a("_process"))},{_process:25,stream:41}],12:[function(a,b,c){},{}],13:[function(a,b,c){function d(){return e.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function e(a){return this instanceof e?(this.length=0,this.parent=void 0,"number"==typeof a?f(this,a):"string"==typeof a?g(this,a,arguments.length>1?arguments[1]:"utf8"):h(this,a)):arguments.length>1?new e(a,arguments[1]):new e(a)}function f(a,b){if(a=n(a,0>b?0:0|o(b)),!e.TYPED_ARRAY_SUPPORT)for(var c=0;b>c;c++)a[c]=0;return a}function g(a,b,c){("string"!=typeof c||""===c)&&(c="utf8");var d=0|q(b,c);return a=n(a,d),a.write(b,c),a}function h(a,b){if(e.isBuffer(b))return i(a,b);if(W(b))return j(a,b);if(null==b)throw new TypeError("must start with number, buffer, array or string");return"undefined"!=typeof ArrayBuffer&&b.buffer instanceof ArrayBuffer?k(a,b):b.length?l(a,b):m(a,b)}function i(a,b){var c=0|o(b.length);return a=n(a,c),b.copy(a,0,0,c),a}function j(a,b){var c=0|o(b.length);a=n(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function k(a,b){var c=0|o(b.length);a=n(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function l(a,b){var c=0|o(b.length);a=n(a,c);for(var d=0;c>d;d+=1)a[d]=255&b[d];return a}function m(a,b){var c,d=0;"Buffer"===b.type&&W(b.data)&&(c=b.data,d=0|o(c.length)),a=n(a,d);for(var e=0;d>e;e+=1)a[e]=255&c[e];return a}function n(a,b){e.TYPED_ARRAY_SUPPORT?a=e._augment(new Uint8Array(b)):(a.length=b,a._isBuffer=!0);var c=0!==b&&b<=e.poolSize>>>1;return c&&(a.parent=X),a}function o(a){if(a>=d())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d().toString(16)+" bytes");return 0|a}function p(a,b){if(!(this instanceof p))return new p(a,b);var c=new e(a,b);return delete c.parent,c}function q(a,b){"string"!=typeof a&&(a=""+a);var c=a.length;if(0===c)return 0;for(var d=!1;;)switch(b){case"ascii":case"binary":case"raw":case"raws":return c;case"utf8":case"utf-8":return O(a).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*c;case"hex":return c>>>1;case"base64":return R(a).length;default:if(d)return O(a).length;b=(""+b).toLowerCase(),d=!0}}function r(a,b,c){var d=!1;if(b=0|b,c=void 0===c||c===1/0?this.length:0|c,a||(a="utf8"),0>b&&(b=0),c>this.length&&(c=this.length),b>=c)return"";for(;;)switch(a){case"hex":return C(this,b,c);case"utf8":case"utf-8":return z(this,b,c);case"ascii":return A(this,b,c);case"binary":return B(this,b,c);case"base64":return y(this,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,b,c);default:if(d)throw new TypeError("Unknown encoding: "+a);a=(a+"").toLowerCase(),d=!0}}function s(a,b,c,d){c=Number(c)||0;var e=a.length-c;d?(d=Number(d),d>e&&(d=e)):d=e;var f=b.length;if(f%2!==0)throw new Error("Invalid hex string");d>f/2&&(d=f/2);for(var g=0;d>g;g++){var h=parseInt(b.substr(2*g,2),16);if(isNaN(h))throw new Error("Invalid hex string");a[c+g]=h}return g}function t(a,b,c,d){return S(O(b,a.length-c),a,c,d)}function u(a,b,c,d){return S(P(b),a,c,d)}function v(a,b,c,d){return u(a,b,c,d)}function w(a,b,c,d){return S(R(b),a,c,d)}function x(a,b,c,d){return S(Q(b,a.length-c),a,c,d)}function y(a,b,c){return 0===b&&c===a.length?U.fromByteArray(a):U.fromByteArray(a.slice(b,c))}function z(a,b,c){var d="",e="";c=Math.min(a.length,c);for(var f=b;c>f;f++)a[f]<=127?(d+=T(e)+String.fromCharCode(a[f]),e=""):e+="%"+a[f].toString(16);return d+T(e)}function A(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(127&a[e]);return d}function B(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(a[e]);return d}function C(a,b,c){var d=a.length;(!b||0>b)&&(b=0),(!c||0>c||c>d)&&(c=d);for(var e="",f=b;c>f;f++)e+=N(a[f]);return e}function D(a,b,c){for(var d=a.slice(b,c),e="",f=0;fa)throw new RangeError("offset is not uint");if(a+b>c)throw new RangeError("Trying to access beyond buffer length")}function F(a,b,c,d,f,g){if(!e.isBuffer(a))throw new TypeError("buffer must be a Buffer instance");if(b>f||g>b)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range")}function G(a,b,c,d){0>b&&(b=65535+b+1);for(var e=0,f=Math.min(a.length-c,2);f>e;e++)a[c+e]=(b&255<<8*(d?e:1-e))>>>8*(d?e:1-e)}function H(a,b,c,d){0>b&&(b=4294967295+b+1);for(var e=0,f=Math.min(a.length-c,4);f>e;e++)a[c+e]=b>>>8*(d?e:3-e)&255}function I(a,b,c,d,e,f){if(b>e||f>b)throw new RangeError("value is out of bounds");if(c+d>a.length)throw new RangeError("index out of range");if(0>c)throw new RangeError("index out of range")}function J(a,b,c,d,e){return e||I(a,b,c,4,3.4028234663852886e38,-3.4028234663852886e38),V.write(a,b,c,d,23,4),c+4}function K(a,b,c,d,e){return e||I(a,b,c,8,1.7976931348623157e308,-1.7976931348623157e308),V.write(a,b,c,d,52,8),c+8}function L(a){if(a=M(a).replace(Z,""),a.length<2)return"";for(;a.length%4!==0;)a+="=";return a}function M(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function N(a){return 16>a?"0"+a.toString(16):a.toString(16)}function O(a,b){b=b||1/0;for(var c,d=a.length,e=null,f=[],g=0;d>g;g++){if(c=a.charCodeAt(g),c>55295&&57344>c){if(!e){if(c>56319){(b-=3)>-1&&f.push(239,191,189);continue}if(g+1===d){(b-=3)>-1&&f.push(239,191,189);continue}e=c;continue}if(56320>c){(b-=3)>-1&&f.push(239,191,189),e=c;continue}c=e-55296<<10|c-56320|65536,e=null}else e&&((b-=3)>-1&&f.push(239,191,189),e=null);if(128>c){if((b-=1)<0)break;f.push(c)}else if(2048>c){if((b-=2)<0)break;f.push(c>>6|192,63&c|128)}else if(65536>c){if((b-=3)<0)break;f.push(c>>12|224,c>>6&63|128,63&c|128)}else{if(!(2097152>c))throw new Error("Invalid code point");if((b-=4)<0)break;f.push(c>>18|240,c>>12&63|128,c>>6&63|128,63&c|128)}}return f}function P(a){for(var b=[],c=0;c>8,e=c%256,f.push(e),f.push(d);return f}function R(a){return U.toByteArray(L(a))}function S(a,b,c,d){for(var e=0;d>e&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}function T(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}var U=a("base64-js"),V=a("ieee754"),W=a("is-array");c.Buffer=e,c.SlowBuffer=p,c.INSPECT_MAX_BYTES=50,e.poolSize=8192;var X={};e.TYPED_ARRAY_SUPPORT=function(){function a(){}try{var b=new ArrayBuffer(0),c=new Uint8Array(b);return c.foo=function(){return 42},c.constructor=a,42===c.foo()&&c.constructor===a&&"function"==typeof c.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(d){return!1}}(),e.isBuffer=function(a){return!(null==a||!a._isBuffer)},e.compare=function(a,b){if(!e.isBuffer(a)||!e.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var c=a.length,d=b.length,f=0,g=Math.min(c,d);g>f&&a[f]===b[f];)++f;return f!==g&&(c=a[f],d=b[f]),d>c?-1:c>d?1:0},e.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(a,b){if(!W(a))throw new TypeError("list argument must be an Array of Buffers.");if(0===a.length)return new e(0);if(1===a.length)return a[0];var c;if(void 0===b)for(b=0,c=0;c0&&(a=this.toString("hex",0,b).match(/.{2}/g).join(" "),this.length>b&&(a+=" ... ")),""},e.prototype.compare=function(a){if(!e.isBuffer(a))throw new TypeError("Argument must be a Buffer");return this===a?0:e.compare(this,a)},e.prototype.indexOf=function(a,b){function c(a,b,c){for(var d=-1,e=0;c+e2147483647?b=2147483647:-2147483648>b&&(b=-2147483648),b>>=0,0===this.length)return-1;if(b>=this.length)return-1;if(0>b&&(b=Math.max(this.length+b,0)),"string"==typeof a)return 0===a.length?-1:String.prototype.indexOf.call(this,a,b);if(e.isBuffer(a))return c(this,a,b);if("number"==typeof a)return e.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,a,b):c(this,[a],b);throw new TypeError("val must be string, number or Buffer")},e.prototype.get=function(a){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(a)},e.prototype.set=function(a,b){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(a,b)},e.prototype.write=function(a,b,c,d){if(void 0===b)d="utf8",c=this.length,b=0;else if(void 0===c&&"string"==typeof b)d=b,c=this.length,b=0;else if(isFinite(b))b=0|b,isFinite(c)?(c=0|c,void 0===d&&(d="utf8")):(d=c,c=void 0);else{var e=d;d=b,b=0|c,c=e}var f=this.length-b;if((void 0===c||c>f)&&(c=f),a.length>0&&(0>c||0>b)||b>this.length)throw new RangeError("attempt to write outside buffer bounds");d||(d="utf8");for(var g=!1;;)switch(d){case"hex":return s(this,a,b,c);case"utf8":case"utf-8":return t(this,a,b,c);case"ascii":return u(this,a,b,c);case"binary":return v(this,a,b,c);case"base64":return w(this,a,b,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,a,b,c);default:if(g)throw new TypeError("Unknown encoding: "+d);d=(""+d).toLowerCase(),g=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},e.prototype.slice=function(a,b){var c=this.length;a=~~a,b=void 0===b?c:~~b,0>a?(a+=c,0>a&&(a=0)):a>c&&(a=c),0>b?(b+=c,0>b&&(b=0)):b>c&&(b=c),a>b&&(b=a);var d;if(e.TYPED_ARRAY_SUPPORT)d=e._augment(this.subarray(a,b));else{var f=b-a;d=new e(f,void 0);for(var g=0;f>g;g++)d[g]=this[g+a]}return d.length&&(d.parent=this.parent||this),d},e.prototype.readUIntLE=function(a,b,c){a=0|a,b=0|b,c||E(a,b,this.length);for(var d=this[a],e=1,f=0;++f0&&(e*=256);)d+=this[a+--b]*e;return d},e.prototype.readUInt8=function(a,b){return b||E(a,1,this.length),this[a]},e.prototype.readUInt16LE=function(a,b){return b||E(a,2,this.length),this[a]|this[a+1]<<8},e.prototype.readUInt16BE=function(a,b){return b||E(a,2,this.length),this[a]<<8|this[a+1]},e.prototype.readUInt32LE=function(a,b){return b||E(a,4,this.length),(this[a]|this[a+1]<<8|this[a+2]<<16)+16777216*this[a+3]},e.prototype.readUInt32BE=function(a,b){return b||E(a,4,this.length),16777216*this[a]+(this[a+1]<<16|this[a+2]<<8|this[a+3])},e.prototype.readIntLE=function(a,b,c){a=0|a,b=0|b,c||E(a,b,this.length);for(var d=this[a],e=1,f=0;++f=e&&(d-=Math.pow(2,8*b)),d},e.prototype.readIntBE=function(a,b,c){a=0|a,b=0|b,c||E(a,b,this.length);for(var d=b,e=1,f=this[a+--d];d>0&&(e*=256);)f+=this[a+--d]*e;return e*=128,f>=e&&(f-=Math.pow(2,8*b)),f},e.prototype.readInt8=function(a,b){return b||E(a,1,this.length),128&this[a]?-1*(255-this[a]+1):this[a]},e.prototype.readInt16LE=function(a,b){b||E(a,2,this.length);var c=this[a]|this[a+1]<<8;return 32768&c?4294901760|c:c},e.prototype.readInt16BE=function(a,b){b||E(a,2,this.length);var c=this[a+1]|this[a]<<8;return 32768&c?4294901760|c:c},e.prototype.readInt32LE=function(a,b){return b||E(a,4,this.length),this[a]|this[a+1]<<8|this[a+2]<<16|this[a+3]<<24},e.prototype.readInt32BE=function(a,b){return b||E(a,4,this.length),this[a]<<24|this[a+1]<<16|this[a+2]<<8|this[a+3]},e.prototype.readFloatLE=function(a,b){return b||E(a,4,this.length),V.read(this,a,!0,23,4)},e.prototype.readFloatBE=function(a,b){return b||E(a,4,this.length),V.read(this,a,!1,23,4)},e.prototype.readDoubleLE=function(a,b){return b||E(a,8,this.length),V.read(this,a,!0,52,8)},e.prototype.readDoubleBE=function(a,b){return b||E(a,8,this.length),V.read(this,a,!1,52,8)},e.prototype.writeUIntLE=function(a,b,c,d){a=+a,b=0|b,c=0|c,d||F(this,a,b,c,Math.pow(2,8*c),0);var e=1,f=0;for(this[b]=255&a;++f=0&&(f*=256);)this[b+e]=a/f&255;return b+c},e.prototype.writeUInt8=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,1,255,0),e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),this[b]=a,b+1},e.prototype.writeUInt16LE=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):G(this,a,b,!0),b+2},e.prototype.writeUInt16BE=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,2,65535,0),e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):G(this,a,b,!1),b+2},e.prototype.writeUInt32LE=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[b+3]=a>>>24,this[b+2]=a>>>16,this[b+1]=a>>>8,this[b]=a):H(this,a,b,!0),b+4},e.prototype.writeUInt32BE=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,4,4294967295,0),e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a):H(this,a,b,!1),b+4},e.prototype.writeIntLE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);F(this,a,b,c,e-1,-e)}var f=0,g=1,h=0>a?1:0;for(this[b]=255&a;++f>0)-h&255;return b+c},e.prototype.writeIntBE=function(a,b,c,d){if(a=+a,b=0|b,!d){var e=Math.pow(2,8*c-1);F(this,a,b,c,e-1,-e)}var f=c-1,g=1,h=0>a?1:0;for(this[b+f]=255&a;--f>=0&&(g*=256);)this[b+f]=(a/g>>0)-h&255;return b+c},e.prototype.writeInt8=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,1,127,-128),e.TYPED_ARRAY_SUPPORT||(a=Math.floor(a)),0>a&&(a=255+a+1),this[b]=a,b+1},e.prototype.writeInt16LE=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8):G(this,a,b,!0),b+2},e.prototype.writeInt16BE=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,2,32767,-32768),e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>8,this[b+1]=a):G(this,a,b,!1),b+2},e.prototype.writeInt32LE=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,4,2147483647,-2147483648),e.TYPED_ARRAY_SUPPORT?(this[b]=a,this[b+1]=a>>>8,this[b+2]=a>>>16,this[b+3]=a>>>24):H(this,a,b,!0),b+4},e.prototype.writeInt32BE=function(a,b,c){return a=+a,b=0|b,c||F(this,a,b,4,2147483647,-2147483648),0>a&&(a=4294967295+a+1),e.TYPED_ARRAY_SUPPORT?(this[b]=a>>>24,this[b+1]=a>>>16,this[b+2]=a>>>8,this[b+3]=a):H(this,a,b,!1),b+4},e.prototype.writeFloatLE=function(a,b,c){return J(this,a,b,!0,c)},e.prototype.writeFloatBE=function(a,b,c){return J(this,a,b,!1,c)},e.prototype.writeDoubleLE=function(a,b,c){return K(this,a,b,!0,c)},e.prototype.writeDoubleBE=function(a,b,c){return K(this,a,b,!1,c)},e.prototype.copy=function(a,b,c,d){if(c||(c=0),d||0===d||(d=this.length),b>=a.length&&(b=a.length),b||(b=0),d>0&&c>d&&(d=c),d===c)return 0;if(0===a.length||0===this.length)return 0;if(0>b)throw new RangeError("targetStart out of bounds");if(0>c||c>=this.length)throw new RangeError("sourceStart out of bounds");if(0>d)throw new RangeError("sourceEnd out of bounds");d>this.length&&(d=this.length),a.length-bf||!e.TYPED_ARRAY_SUPPORT)for(var g=0;f>g;g++)a[g+b]=this[g+c];else a._set(this.subarray(c,c+f),b);return f},e.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),b>c)throw new RangeError("end < start");if(c!==b&&0!==this.length){if(0>b||b>=this.length)throw new RangeError("start out of bounds");if(0>c||c>this.length)throw new RangeError("end out of bounds");var d;if("number"==typeof a)for(d=b;c>d;d++)this[d]=a;else{var e=O(a.toString()),f=e.length;for(d=b;c>d;d++)this[d]=e[d%f]}return this}},e.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(e.TYPED_ARRAY_SUPPORT)return new e(this).buffer;for(var a=new Uint8Array(this.length),b=0,c=a.length;c>b;b+=1)a[b]=this[b];return a.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Y=e.prototype;e._augment=function(a){return a.constructor=e,a._isBuffer=!0,a._set=a.set,a.get=Y.get,a.set=Y.set,a.write=Y.write,a.toString=Y.toString,a.toLocaleString=Y.toString,a.toJSON=Y.toJSON,a.equals=Y.equals,a.compare=Y.compare,a.indexOf=Y.indexOf,a.copy=Y.copy,a.slice=Y.slice,a.readUIntLE=Y.readUIntLE,a.readUIntBE=Y.readUIntBE,a.readUInt8=Y.readUInt8,a.readUInt16LE=Y.readUInt16LE,a.readUInt16BE=Y.readUInt16BE,a.readUInt32LE=Y.readUInt32LE,a.readUInt32BE=Y.readUInt32BE,a.readIntLE=Y.readIntLE,a.readIntBE=Y.readIntBE,a.readInt8=Y.readInt8,a.readInt16LE=Y.readInt16LE,a.readInt16BE=Y.readInt16BE,a.readInt32LE=Y.readInt32LE,a.readInt32BE=Y.readInt32BE,a.readFloatLE=Y.readFloatLE,a.readFloatBE=Y.readFloatBE,a.readDoubleLE=Y.readDoubleLE,a.readDoubleBE=Y.readDoubleBE,a.writeUInt8=Y.writeUInt8,a.writeUIntLE=Y.writeUIntLE,a.writeUIntBE=Y.writeUIntBE,a.writeUInt16LE=Y.writeUInt16LE,a.writeUInt16BE=Y.writeUInt16BE,a.writeUInt32LE=Y.writeUInt32LE,a.writeUInt32BE=Y.writeUInt32BE,a.writeIntLE=Y.writeIntLE,a.writeIntBE=Y.writeIntBE,a.writeInt8=Y.writeInt8,a.writeInt16LE=Y.writeInt16LE,a.writeInt16BE=Y.writeInt16BE,a.writeInt32LE=Y.writeInt32LE,a.writeInt32BE=Y.writeInt32BE,a.writeFloatLE=Y.writeFloatLE,a.writeFloatBE=Y.writeFloatBE,a.writeDoubleLE=Y.writeDoubleLE,a.writeDoubleBE=Y.writeDoubleBE,a.fill=Y.fill,a.inspect=Y.inspect,a.toArrayBuffer=Y.toArrayBuffer,a};var Z=/[^+\/0-9A-z\-]/g},{"base64-js":14,ieee754:15,"is-array":16}],14:[function(a,b,c){var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(a){"use strict";function b(a){var b=a.charCodeAt(0);return b===g||b===l?62:b===h||b===m?63:i>b?-1:i+10>b?b-i+26+26:k+26>b?b-k:j+26>b?b-j+26:void 0}function c(a){function c(a){j[l++]=a}var d,e,g,h,i,j;if(a.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=a.length;i="="===a.charAt(k-2)?2:"="===a.charAt(k-1)?1:0,j=new f(3*a.length/4-i),g=i>0?a.length-4:a.length;var l=0;for(d=0,e=0;g>d;d+=4,e+=3)h=b(a.charAt(d))<<18|b(a.charAt(d+1))<<12|b(a.charAt(d+2))<<6|b(a.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=b(a.charAt(d))<<2|b(a.charAt(d+1))>>4,c(255&h)):1===i&&(h=b(a.charAt(d))<<10|b(a.charAt(d+1))<<4|b(a.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function e(a){function b(a){return d.charAt(a)}function c(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var e,f,g,h=a.length%3,i="";for(e=0,g=a.length-h;g>e;e+=3)f=(a[e]<<16)+(a[e+1]<<8)+a[e+2],i+=c(f);switch(h){case 1:f=a[a.length-1],i+=b(f>>2),i+=b(f<<4&63),i+="==";break;case 2:f=(a[a.length-2]<<8)+a[a.length-1],i+=b(f>>10),i+=b(f>>4&63),i+=b(f<<2&63),i+="="}return i}var f="undefined"!=typeof Uint8Array?Uint8Array:Array,g="+".charCodeAt(0),h="/".charCodeAt(0),i="0".charCodeAt(0),j="a".charCodeAt(0),k="A".charCodeAt(0),l="-".charCodeAt(0),m="_".charCodeAt(0);a.toByteArray=c,a.fromByteArray=e}("undefined"==typeof c?this.base64js={}:c)},{}],15:[function(a,b,c){c.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?NaN:(n?-1:1)*(1/0);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||b===1/0?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],16:[function(a,b,c){var d=Array.isArray,e=Object.prototype.toString;b.exports=d||function(a){return!!a&&"[object Array]"==e.call(a)}},{}],17:[function(a,b,c){function d(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function e(a){return"function"==typeof a}function f(a){return"number"==typeof a}function g(a){return"object"==typeof a&&null!==a}function h(a){return void 0===a}b.exports=d,d.EventEmitter=d,d.prototype._events=void 0,d.prototype._maxListeners=void 0,d.defaultMaxListeners=10,d.prototype.setMaxListeners=function(a){if(!f(a)||0>a||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},d.prototype.emit=function(a){var b,c,d,f,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||g(this._events.error)&&!this._events.error.length)){if(b=arguments[1],b instanceof Error)throw b;throw TypeError('Uncaught, unspecified "error" event.')}if(c=this._events[a],h(c))return!1;if(e(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(d=arguments.length,f=new Array(d-1),i=1;d>i;i++)f[i-1]=arguments[i];c.apply(this,f)}else if(g(c)){for(d=arguments.length,f=new Array(d-1),i=1;d>i;i++)f[i-1]=arguments[i];for(j=c.slice(),d=j.length,i=0;d>i;i++)j[i].apply(this,f)}return!0},d.prototype.addListener=function(a,b){var c;if(!e(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,e(b.listener)?b.listener:b),this._events[a]?g(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b, g(this._events[a])&&!this._events[a].warned){var c;c=h(this._maxListeners)?d.defaultMaxListeners:this._maxListeners,c&&c>0&&this._events[a].length>c&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),"function"==typeof console.trace&&console.trace())}return this},d.prototype.on=d.prototype.addListener,d.prototype.once=function(a,b){function c(){this.removeListener(a,c),d||(d=!0,b.apply(this,arguments))}if(!e(b))throw TypeError("listener must be a function");var d=!1;return c.listener=b,this.on(a,c),this},d.prototype.removeListener=function(a,b){var c,d,f,h;if(!e(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],f=c.length,d=-1,c===b||e(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(g(c)){for(h=f;h-->0;)if(c[h]===b||c[h].listener&&c[h].listener===b){d=h;break}if(0>d)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(d,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},d.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],e(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},d.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?e(this._events[a])?[this._events[a]]:this._events[a].slice():[]},d.listenerCount=function(a,b){var c;return c=a._events&&a._events[b]?e(a._events[b])?1:a._events[b].length:0}},{}],18:[function(a,b,c){var d=b.exports,e=(a("events").EventEmitter,a("./lib/request")),f=a("url");d.request=function(a,b){"string"==typeof a&&(a=f.parse(a)),a||(a={}),a.host||a.port||(a.port=parseInt(window.location.port,10)),!a.host&&a.hostname&&(a.host=a.hostname),a.protocol||(a.scheme?a.protocol=a.scheme+":":a.protocol=window.location.protocol),a.host||(a.host=window.location.hostname||window.location.host),/:/.test(a.host)&&(a.port||(a.port=a.host.split(":")[1]),a.host=a.host.split(":")[0]),a.port||(a.port="https:"==a.protocol?443:80);var c=new e(new g,a);return b&&c.on("response",b),c},d.get=function(a,b){a.method="GET";var c=d.request(a,b);return c.end(),c},d.Agent=function(){},d.Agent.defaultMaxSockets=4;var g=function(){if("undefined"==typeof window)throw new Error("no window object present");if(window.XMLHttpRequest)return window.XMLHttpRequest;if(window.ActiveXObject){for(var a=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Microsoft.XMLHTTP"],b=0;bthis.offset&&(this.emit("data",b.slice(this.offset)),this.offset=b.length))};var i=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}},{stream:41,util:45}],21:[function(a,b,c){!function(){function a(a){this.message=a}var b="undefined"!=typeof c?c:this,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a.prototype=new Error,a.prototype.name="InvalidCharacterError",b.btoa||(b.btoa=function(b){for(var c,e,f=0,g=d,h="";b.charAt(0|f)||(g="=",f%1);h+=g.charAt(63&c>>8-f%1*8)){if(e=b.charCodeAt(f+=.75),e>255)throw new a("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");c=c<<8|e}return h}),b.atob||(b.atob=function(b){if(b=b.replace(/=+$/,""),b.length%4==1)throw new a("'atob' failed: The string to be decoded is not correctly encoded.");for(var c,e,f=0,g=0,h="";e=b.charAt(g++);~e&&(c=f%4?64*c+e:e,f++%4)?h+=String.fromCharCode(255&c>>(-2*f&6)):0)e=d.indexOf(e);return h})}()},{}],22:[function(a,b,c){var d=a("http"),e=b.exports;for(var f in d)d.hasOwnProperty(f)&&(e[f]=d[f]);e.request=function(a,b){return a||(a={}),a.scheme="https",d.request.call(this,a,b)}},{http:18}],23:[function(a,b,c){"function"==typeof Object.create?b.exports=function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:b.exports=function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},{}],24:[function(a,b,c){b.exports=Array.isArray||function(a){return"[object Array]"==Object.prototype.toString.call(a)}},{}],25:[function(a,b,c){function d(){k=!1,h.length?j=h.concat(j):l=-1,j.length&&e()}function e(){if(!k){var a=setTimeout(d);k=!0;for(var b=j.length;b;){for(h=j,j=[];++l1)for(var c=1;c1&&(d=c[0]+"@",a=c[1]),a=a.replace(G,".");var e=a.split("."),g=f(e,b).join(".");return d+g}function h(a){for(var b,c,d=[],e=0,f=a.length;f>e;)b=a.charCodeAt(e++),b>=55296&&56319>=b&&f>e?(c=a.charCodeAt(e++),56320==(64512&c)?d.push(((1023&b)<<10)+(1023&c)+65536):(d.push(b),e--)):d.push(b);return d}function i(a){return f(a,function(a){var b="";return a>65535&&(a-=65536,b+=K(a>>>10&1023|55296),a=56320|1023&a),b+=K(a)}).join("")}function j(a){return 10>a-48?a-22:26>a-65?a-65:26>a-97?a-97:w}function k(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function l(a,b,c){var d=0;for(a=c?J(a/A):a>>1,a+=J(a/b);a>I*y>>1;d+=w)a=J(a/I);return J(d+(I+1)*a/(a+z))}function m(a){var b,c,d,f,g,h,k,m,n,o,p=[],q=a.length,r=0,s=C,t=B;for(c=a.lastIndexOf(D),0>c&&(c=0),d=0;c>d;++d)a.charCodeAt(d)>=128&&e("not-basic"),p.push(a.charCodeAt(d));for(f=c>0?c+1:0;q>f;){for(g=r,h=1,k=w;f>=q&&e("invalid-input"),m=j(a.charCodeAt(f++)),(m>=w||m>J((v-r)/h))&&e("overflow"),r+=m*h,n=t>=k?x:k>=t+y?y:k-t,!(n>m);k+=w)o=w-n,h>J(v/o)&&e("overflow"),h*=o;b=p.length+1,t=l(r-g,b,0==g),J(r/b)>v-s&&e("overflow"),s+=J(r/b),r%=b,p.splice(r++,0,s)}return i(p)}function n(a){var b,c,d,f,g,i,j,m,n,o,p,q,r,s,t,u=[];for(a=h(a),q=a.length,b=C,c=0,g=B,i=0;q>i;++i)p=a[i],128>p&&u.push(K(p));for(d=f=u.length,f&&u.push(D);q>d;){for(j=v,i=0;q>i;++i)p=a[i],p>=b&&j>p&&(j=p);for(r=d+1,j-b>J((v-c)/r)&&e("overflow"),c+=(j-b)*r,b=j,i=0;q>i;++i)if(p=a[i],b>p&&++c>v&&e("overflow"),p==b){for(m=c,n=w;o=g>=n?x:n>=g+y?y:n-g,!(o>m);n+=w)t=m-o,s=w-o,u.push(K(k(o+t%s,0))),m=J(t/s);u.push(K(k(m,0))),g=l(c,r,d==f),c=0,++d}++c,++b}return u.join("")}function o(a){return g(a,function(a){return E.test(a)?m(a.slice(4).toLowerCase()):a})}function p(a){return g(a,function(a){return F.test(a)?"xn--"+n(a):a})}var q="object"==typeof c&&c&&!c.nodeType&&c,r="object"==typeof b&&b&&!b.nodeType&&b,s="object"==typeof a&&a;(s.global===s||s.window===s||s.self===s)&&(d=s);var t,u,v=2147483647,w=36,x=1,y=26,z=38,A=700,B=72,C=128,D="-",E=/^xn--/,F=/[^\x20-\x7E]/,G=/[\x2E\u3002\uFF0E\uFF61]/g,H={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},I=w-x,J=Math.floor,K=String.fromCharCode;if(t={version:"1.3.2",ucs2:{decode:h,encode:i},decode:m,encode:n,toASCII:p,toUnicode:o},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return t});else if(q&&r)if(b.exports==q)r.exports=t;else for(u in t)t.hasOwnProperty(u)&&(q[u]=t[u]);else d.punycode=t}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],27:[function(a,b,c){"use strict";function d(a,b){return Object.prototype.hasOwnProperty.call(a,b)}b.exports=function(a,b,c,f){b=b||"&",c=c||"=";var g={};if("string"!=typeof a||0===a.length)return g;var h=/\+/g;a=a.split(b);var i=1e3;f&&"number"==typeof f.maxKeys&&(i=f.maxKeys);var j=a.length;i>0&&j>i&&(j=i);for(var k=0;j>k;++k){var l,m,n,o,p=a[k].replace(h,"%20"),q=p.indexOf(c);q>=0?(l=p.substr(0,q),m=p.substr(q+1)):(l=p,m=""),n=decodeURIComponent(l),o=decodeURIComponent(m),d(g,n)?e(g[n])?g[n].push(o):g[n]=[g[n],o]:g[n]=o}return g};var e=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}},{}],28:[function(a,b,c){"use strict";function d(a,b){if(a.map)return a.map(b);for(var c=[],d=0;dc;c++)b(a[c],c)}b.exports=d;var g=Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b},h=a("core-util-is");h.inherits=a("inherits");var i=a("./_stream_readable"),j=a("./_stream_writable");h.inherits(d,i),f(g(j.prototype),function(a){d.prototype[a]||(d.prototype[a]=j.prototype[a])})}).call(this,a("_process"))},{"./_stream_readable":33,"./_stream_writable":35,_process:25,"core-util-is":36,inherits:23}],32:[function(a,b,c){function d(a){return this instanceof d?void e.call(this,a):new d(a)}b.exports=d;var e=a("./_stream_transform"),f=a("core-util-is");f.inherits=a("inherits"),f.inherits(d,e),d.prototype._transform=function(a,b,c){c(null,a)}},{"./_stream_transform":34,"core-util-is":36,inherits:23}],33:[function(a,b,c){(function(c){function d(b,c){var d=a("./_stream_duplex");b=b||{};var e=b.highWaterMark,f=b.objectMode?16:16384;this.highWaterMark=e||0===e?e:f,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!b.objectMode,c instanceof d&&(this.objectMode=this.objectMode||!!b.readableObjectMode),this.defaultEncoding=b.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,b.encoding&&(C||(C=a("string_decoder/").StringDecoder),this.decoder=new C(b.encoding),this.encoding=b.encoding)}function e(b){a("./_stream_duplex");return this instanceof e?(this._readableState=new d(b,this),this.readable=!0,void A.call(this)):new e(b)}function f(a,b,c,d,e){var f=j(b,c);if(f)a.emit("error",f);else if(B.isNullOrUndefined(c))b.reading=!1,b.ended||k(a,b);else if(b.objectMode||c&&c.length>0)if(b.ended&&!e){var h=new Error("stream.push() after EOF");a.emit("error",h)}else if(b.endEmitted&&e){var h=new Error("stream.unshift() after end event");a.emit("error",h)}else!b.decoder||e||d||(c=b.decoder.write(c)),e||(b.reading=!1),b.flowing&&0===b.length&&!b.sync?(a.emit("data",c),a.read(0)):(b.length+=b.objectMode?1:c.length,e?b.buffer.unshift(c):b.buffer.push(c),b.needReadable&&l(a)),n(a,b);else e||(b.reading=!1);return g(b)}function g(a){return!a.ended&&(a.needReadable||a.length=E)a=E;else{a--;for(var b=1;32>b;b<<=1)a|=a>>b;a++}return a}function i(a,b){return 0===b.length&&b.ended?0:b.objectMode?0===a?0:1:isNaN(a)||B.isNull(a)?b.flowing&&b.buffer.length?b.buffer[0].length:b.length:0>=a?0:(a>b.highWaterMark&&(b.highWaterMark=h(a)),a>b.length?b.ended?b.length:(b.needReadable=!0,0):a)}function j(a,b){var c=null;return B.isBuffer(b)||B.isString(b)||B.isNullOrUndefined(b)||a.objectMode||(c=new TypeError("Invalid non-string/buffer chunk")),c}function k(a,b){if(b.decoder&&!b.ended){var c=b.decoder.end();c&&c.length&&(b.buffer.push(c),b.length+=b.objectMode?1:c.length)}b.ended=!0,l(a)}function l(a){var b=a._readableState;b.needReadable=!1,b.emittedReadable||(D("emitReadable",b.flowing),b.emittedReadable=!0,b.sync?c.nextTick(function(){m(a)}):m(a))}function m(a){D("emit readable"),a.emit("readable"),s(a)}function n(a,b){b.readingMore||(b.readingMore=!0,c.nextTick(function(){o(a,b)}))}function o(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length=e)c=f?d.join(""):y.concat(d,e),d.length=0;else if(aj&&a>i;j++){var h=d[0],l=Math.min(a-i,h.length);f?c+=h.slice(0,l):h.copy(c,i,0,l),l0)throw new Error("endReadable called on non-empty stream");b.endEmitted||(b.ended=!0,c.nextTick(function(){b.endEmitted||0!==b.length||(b.endEmitted=!0,a.readable=!1,a.emit("end"))}))}function v(a,b){for(var c=0,d=a.length;d>c;c++)b(a[c],c)}function w(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}b.exports=e;var x=a("isarray"),y=a("buffer").Buffer;e.ReadableState=d;var z=a("events").EventEmitter;z.listenerCount||(z.listenerCount=function(a,b){return a.listeners(b).length});var A=a("stream"),B=a("core-util-is");B.inherits=a("inherits");var C,D=a("util");D=D&&D.debuglog?D.debuglog("stream"):function(){},B.inherits(e,A),e.prototype.push=function(a,b){var c=this._readableState;return B.isString(a)&&!c.objectMode&&(b=b||c.defaultEncoding,b!==c.encoding&&(a=new y(a,b),b="")),f(this,c,a,b,!1)},e.prototype.unshift=function(a){var b=this._readableState;return f(this,b,a,"",!0)},e.prototype.setEncoding=function(b){return C||(C=a("string_decoder/").StringDecoder),this._readableState.decoder=new C(b),this._readableState.encoding=b,this};var E=8388608;e.prototype.read=function(a){D("read",a);var b=this._readableState,c=a;if((!B.isNumber(a)||a>0)&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return D("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?u(this):l(this),null;if(a=i(a,b),0===a&&b.ended)return 0===b.length&&u(this),null;var d=b.needReadable;D("need readable",d),(0===b.length||b.length-a0?t(a,b):null,B.isNull(e)&&(b.needReadable=!0,a=0),b.length-=a,0!==b.length||b.ended||(b.needReadable=!0),c!==a&&b.ended&&0===b.length&&u(this),B.isNull(e)||this.emit("data",e),e},e.prototype._read=function(a){this.emit("error",new Error("not implemented"))},e.prototype.pipe=function(a,b){function d(a){D("onunpipe"),a===l&&f()}function e(){D("onend"),a.end()}function f(){D("cleanup"),a.removeListener("close",i),a.removeListener("finish",j),a.removeListener("drain",q),a.removeListener("error",h),a.removeListener("unpipe",d),l.removeListener("end",e),l.removeListener("end",f),l.removeListener("data",g),!m.awaitDrain||a._writableState&&!a._writableState.needDrain||q()}function g(b){D("ondata");var c=a.write(b);!1===c&&(D("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,l.pause())}function h(b){D("onerror",b),k(),a.removeListener("error",h),0===z.listenerCount(a,"error")&&a.emit("error",b)}function i(){a.removeListener("finish",j),k()}function j(){D("onfinish"),a.removeListener("close",i),k()}function k(){D("unpipe"),l.unpipe(a)}var l=this,m=this._readableState;switch(m.pipesCount){case 0:m.pipes=a;break;case 1:m.pipes=[m.pipes,a];break;default:m.pipes.push(a)}m.pipesCount+=1,D("pipe count=%d opts=%j",m.pipesCount,b);var n=(!b||b.end!==!1)&&a!==c.stdout&&a!==c.stderr,o=n?e:f;m.endEmitted?c.nextTick(o):l.once("end",o),a.on("unpipe",d);var q=p(l);return a.on("drain",q),l.on("data",g),a._events&&a._events.error?x(a._events.error)?a._events.error.unshift(h):a._events.error=[h,a._events.error]:a.on("error",h),a.once("close",i),a.once("finish",j),a.emit("pipe",l),m.flowing||(D("pipe resume"),l.resume()),a},e.prototype.unpipe=function(a){var b=this._readableState;if(0===b.pipesCount)return this;if(1===b.pipesCount)return a&&a!==b.pipes?this:(a||(a=b.pipes),b.pipes=null,b.pipesCount=0,b.flowing=!1,a&&a.emit("unpipe",this),this);if(!a){var c=b.pipes,d=b.pipesCount;b.pipes=null,b.pipesCount=0,b.flowing=!1;for(var e=0;d>e;e++)c[e].emit("unpipe",this);return this}var e=w(b.pipes,a);return-1===e?this:(b.pipes.splice(e,1),b.pipesCount-=1,1===b.pipesCount&&(b.pipes=b.pipes[0]),a.emit("unpipe",this),this)},e.prototype.on=function(a,b){var d=A.prototype.on.call(this,a,b);if("data"===a&&!1!==this._readableState.flowing&&this.resume(),"readable"===a&&this.readable){var e=this._readableState;if(!e.readableListening)if(e.readableListening=!0,e.emittedReadable=!1,e.needReadable=!0,e.reading)e.length&&l(this,e);else{var f=this;c.nextTick(function(){D("readable nexttick read 0"),f.read(0)})}}return d},e.prototype.addListener=e.prototype.on,e.prototype.resume=function(){var a=this._readableState;return a.flowing||(D("resume"),a.flowing=!0,a.reading||(D("resume read 0"),this.read(0)),q(this,a)),this},e.prototype.pause=function(){return D("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(D("pause"),this._readableState.flowing=!1,this.emit("pause")),this},e.prototype.wrap=function(a){var b=this._readableState,c=!1,d=this;a.on("end",function(){if(D("wrapped end"),b.decoder&&!b.ended){var a=b.decoder.end();a&&a.length&&d.push(a)}d.push(null)}),a.on("data",function(e){if(D("wrapped data"),b.decoder&&(e=b.decoder.write(e)),e&&(b.objectMode||e.length)){var f=d.push(e);f||(c=!0,a.pause())}});for(var e in a)B.isFunction(a[e])&&B.isUndefined(this[e])&&(this[e]=function(b){return function(){return a[b].apply(a,arguments)}}(e));var f=["error","close","destroy","pause","resume"];return v(f,function(b){a.on(b,d.emit.bind(d,b))}),d._read=function(b){D("wrapped _read",b),c&&(c=!1,a.resume())},d},e._fromList=t}).call(this,a("_process"))},{"./_stream_duplex":31,_process:25,buffer:13,"core-util-is":36,events:17,inherits:23,isarray:24,stream:41,"string_decoder/":42,util:12}],34:[function(a,b,c){function d(a,b){this.afterTransform=function(a,c){return e(b,a,c)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function e(a,b,c){var d=a._transformState;d.transforming=!1;var e=d.writecb;if(!e)return a.emit("error",new Error("no writecb in Transform class"));d.writechunk=null,d.writecb=null,i.isNullOrUndefined(c)||a.push(c),e&&e(b);var f=a._readableState;f.reading=!1,(f.needReadable||f.length1){for(var c=[],d=0;d=this.charLength-this.charReceived?this.charLength-this.charReceived:a.length;if(a.copy(this.charBuffer,this.charReceived,0,c),this.charReceived+=c,this.charReceived=55296&&56319>=d)){if(this.charReceived=this.charLength=0,0===a.length)return b;break}this.charLength+=this.surrogateSize,b=""}this.detectIncompleteChar(a);var e=a.length;this.charLength&&(a.copy(this.charBuffer,0,a.length-this.charReceived,e),e-=this.charReceived),b+=a.toString(this.encoding,0,e);var e=b.length-1,d=b.charCodeAt(e);if(d>=55296&&56319>=d){var f=this.surrogateSize;return this.charLength+=f,this.charReceived+=f,this.charBuffer.copy(this.charBuffer,f,0,f),a.copy(this.charBuffer,0,0,f),b.substring(0,e)}return b},j.prototype.detectIncompleteChar=function(a){for(var b=a.length>=3?3:a.length;b>0;b--){var c=a[a.length-b];if(1==b&&c>>5==6){this.charLength=2;break}if(2>=b&&c>>4==14){this.charLength=3;break}if(3>=b&&c>>3==30){this.charLength=4;break}}this.charReceived=b},j.prototype.end=function(a){var b="";if(a&&a.length&&(b=this.write(a)),this.charReceived){var c=this.charReceived,d=this.charBuffer,e=this.encoding;b+=d.slice(0,c).toString(e)}return b}},{buffer:13}],43:[function(a,b,c){function d(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function e(a,b,c){if(a&&j(a)&&a instanceof d)return a;var e=new d;return e.parse(a,b,c),e}function f(a){return i(a)&&(a=e(a)),a instanceof d?a.format():d.prototype.format.call(a)}function g(a,b){return e(a,!1,!0).resolve(b)}function h(a,b){return a?e(a,!1,!0).resolveObject(b):b}function i(a){return"string"==typeof a}function j(a){return"object"==typeof a&&null!==a}function k(a){return null===a}function l(a){return null==a}var m=a("punycode");c.parse=e,c.resolve=g,c.resolveObject=h,c.format=f,c.Url=d;var n=/^([a-z0-9.+-]+:)/i,o=/:[0-9]*$/,p=["<",">",'"',"`"," ","\r","\n"," "],q=["{","}","|","\\","^","`"].concat(p),r=["'"].concat(q),s=["%","/","?",";","#"].concat(r),t=["/","?","#"],u=255,v=/^[a-z0-9A-Z_-]{0,63}$/,w=/^([a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},z={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},A=a("querystring");d.prototype.parse=function(a,b,c){if(!i(a))throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var d=a;d=d.trim();var e=n.exec(d);if(e){e=e[0];var f=e.toLowerCase();this.protocol=f,d=d.substr(e.length)}if(c||e||d.match(/^\/\/[^@\/]+@[^@\/]+/)){var g="//"===d.substr(0,2);!g||e&&y[e]||(d=d.substr(2),this.slashes=!0)}if(!y[e]&&(g||e&&!z[e])){for(var h=-1,j=0;jk)&&(h=k)}var l,o;o=-1===h?d.lastIndexOf("@"):d.lastIndexOf("@",h),-1!==o&&(l=d.slice(0,o),d=d.slice(o+1),this.auth=decodeURIComponent(l)),h=-1;for(var j=0;jk)&&(h=k)}-1===h&&(h=d.length),this.host=d.slice(0,h),d=d.slice(h),this.parseHost(),this.hostname=this.hostname||"";var p="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!p)for(var q=this.hostname.split(/\./),j=0,B=q.length;B>j;j++){var C=q[j];if(C&&!C.match(v)){for(var D="",E=0,F=C.length;F>E;E++)D+=C.charCodeAt(E)>127?"x":C[E];if(!D.match(v)){var G=q.slice(0,j),H=q.slice(j+1),I=C.match(w);I&&(G.push(I[1]),H.unshift(I[2])),H.length&&(d="/"+H.join(".")+d),this.hostname=G.join(".");break}}}if(this.hostname.length>u?this.hostname="":this.hostname=this.hostname.toLowerCase(),!p){for(var J=this.hostname.split("."),K=[],j=0;jj;j++){var O=r[j],P=encodeURIComponent(O);P===O&&(P=escape(O)),d=d.split(O).join(P)}var Q=d.indexOf("#");-1!==Q&&(this.hash=d.substr(Q),d=d.slice(0,Q));var R=d.indexOf("?");if(-1!==R?(this.search=d.substr(R),this.query=d.substr(R+1),b&&(this.query=A.parse(this.query)),d=d.slice(0,R)):b&&(this.search="",this.query={}),d&&(this.pathname=d),z[f]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var M=this.pathname||"",L=this.search||"";this.path=M+L}return this.href=this.format(),this},d.prototype.format=function(){var a=this.auth||"";a&&(a=encodeURIComponent(a),a=a.replace(/%3A/i,":"),a+="@");var b=this.protocol||"",c=this.pathname||"",d=this.hash||"",e=!1,f="";this.host?e=a+this.host:this.hostname&&(e=a+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(e+=":"+this.port)),this.query&&j(this.query)&&Object.keys(this.query).length&&(f=A.stringify(this.query));var g=this.search||f&&"?"+f||"";return b&&":"!==b.substr(-1)&&(b+=":"),this.slashes||(!b||z[b])&&e!==!1?(e="//"+(e||""),c&&"/"!==c.charAt(0)&&(c="/"+c)):e||(e=""),d&&"#"!==d.charAt(0)&&(d="#"+d),g&&"?"!==g.charAt(0)&&(g="?"+g),c=c.replace(/[?#]/g,function(a){return encodeURIComponent(a)}),g=g.replace("#","%23"),b+e+c+g+d},d.prototype.resolve=function(a){return this.resolveObject(e(a,!1,!0)).format()},d.prototype.resolveObject=function(a){if(i(a)){var b=new d;b.parse(a,!1,!0),a=b}var c=new d;if(Object.keys(this).forEach(function(a){c[a]=this[a]},this),c.hash=a.hash,""===a.href)return c.href=c.format(),c;if(a.slashes&&!a.protocol)return Object.keys(a).forEach(function(b){"protocol"!==b&&(c[b]=a[b])}),z[c.protocol]&&c.hostname&&!c.pathname&&(c.path=c.pathname="/"),c.href=c.format(),c;if(a.protocol&&a.protocol!==c.protocol){if(!z[a.protocol])return Object.keys(a).forEach(function(b){c[b]=a[b]}),c.href=c.format(),c;if(c.protocol=a.protocol,a.host||y[a.protocol])c.pathname=a.pathname;else{for(var e=(a.pathname||"").split("/");e.length&&!(a.host=e.shift()););a.host||(a.host=""),a.hostname||(a.hostname=""),""!==e[0]&&e.unshift(""),e.length<2&&e.unshift(""),c.pathname=e.join("/")}if(c.search=a.search,c.query=a.query,c.host=a.host||"",c.auth=a.auth,c.hostname=a.hostname||a.host,c.port=a.port,c.pathname||c.search){var f=c.pathname||"",g=c.search||"";c.path=f+g}return c.slashes=c.slashes||a.slashes,c.href=c.format(),c}var h=c.pathname&&"/"===c.pathname.charAt(0),j=a.host||a.pathname&&"/"===a.pathname.charAt(0),m=j||h||c.host&&a.pathname,n=m,o=c.pathname&&c.pathname.split("/")||[],e=a.pathname&&a.pathname.split("/")||[],p=c.protocol&&!z[c.protocol];if(p&&(c.hostname="",c.port=null,c.host&&(""===o[0]?o[0]=c.host:o.unshift(c.host)),c.host="",a.protocol&&(a.hostname=null,a.port=null,a.host&&(""===e[0]?e[0]=a.host:e.unshift(a.host)),a.host=null),m=m&&(""===e[0]||""===o[0])),j)c.host=a.host||""===a.host?a.host:c.host,c.hostname=a.hostname||""===a.hostname?a.hostname:c.hostname,c.search=a.search,c.query=a.query,o=e;else if(e.length)o||(o=[]),o.pop(),o=o.concat(e),c.search=a.search,c.query=a.query;else if(!l(a.search)){if(p){c.hostname=c.host=o.shift();var q=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;q&&(c.auth=q.shift(),c.host=c.hostname=q.shift())}return c.search=a.search,c.query=a.query,k(c.pathname)&&k(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.href=c.format(),c}if(!o.length)return c.pathname=null,c.search?c.path="/"+c.search:c.path=null,c.href=c.format(),c;for(var r=o.slice(-1)[0],s=(c.host||a.host)&&("."===r||".."===r)||""===r,t=0,u=o.length;u>=0;u--)r=o[u],"."==r?o.splice(u,1):".."===r?(o.splice(u,1),t++):t&&(o.splice(u,1),t--);if(!m&&!n)for(;t--;t)o.unshift("..");!m||""===o[0]||o[0]&&"/"===o[0].charAt(0)||o.unshift(""),s&&"/"!==o.join("/").substr(-1)&&o.push("");var v=""===o[0]||o[0]&&"/"===o[0].charAt(0);if(p){c.hostname=c.host=v?"":o.length?o.shift():"";var q=c.host&&c.host.indexOf("@")>0?c.host.split("@"):!1;q&&(c.auth=q.shift(),c.host=c.hostname=q.shift())}return m=m||c.host&&o.length,m&&!v&&o.unshift(""),o.length?c.pathname=o.join("/"):(c.pathname=null,c.path=null),k(c.pathname)&&k(c.search)||(c.path=(c.pathname?c.pathname:"")+(c.search?c.search:"")),c.auth=a.auth||c.auth,c.slashes=c.slashes||a.slashes,c.href=c.format(),c},d.prototype.parseHost=function(){var a=this.host,b=o.exec(a);b&&(b=b[0],":"!==b&&(this.port=b.substr(1)),a=a.substr(0,a.length-b.length)),a&&(this.hostname=a)}},{punycode:26,querystring:29}],44:[function(a,b,c){b.exports=function(a){return a&&"object"==typeof a&&"function"==typeof a.copy&&"function"==typeof a.fill&&"function"==typeof a.readUInt8}},{}],45:[function(a,b,c){(function(b,d){function e(a,b){var d={seen:[],stylize:g};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),p(b)?d.showHidden=b:b&&c._extend(d,b),v(d.showHidden)&&(d.showHidden=!1),v(d.depth)&&(d.depth=2),v(d.colors)&&(d.colors=!1),v(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=f),i(d,a,d.depth)}function f(a,b){var c=e.styles[b];return c?"["+e.colors[c][0]+"m"+a+"["+e.colors[c][1]+"m":a}function g(a,b){return a}function h(a){var b={};return a.forEach(function(a,c){b[a]=!0}),b}function i(a,b,d){if(a.customInspect&&b&&A(b.inspect)&&b.inspect!==c.inspect&&(!b.constructor||b.constructor.prototype!==b)){var e=b.inspect(d,a);return t(e)||(e=i(a,e,d)),e}var f=j(a,b);if(f)return f;var g=Object.keys(b),p=h(g);if(a.showHidden&&(g=Object.getOwnPropertyNames(b)),z(b)&&(g.indexOf("message")>=0||g.indexOf("description")>=0))return k(b);if(0===g.length){if(A(b)){var q=b.name?": "+b.name:"";return a.stylize("[Function"+q+"]","special")}if(w(b))return a.stylize(RegExp.prototype.toString.call(b),"regexp");if(y(b))return a.stylize(Date.prototype.toString.call(b),"date");if(z(b))return k(b)}var r="",s=!1,u=["{","}"];if(o(b)&&(s=!0,u=["[","]"]),A(b)){var v=b.name?": "+b.name:"";r=" [Function"+v+"]"}if(w(b)&&(r=" "+RegExp.prototype.toString.call(b)),y(b)&&(r=" "+Date.prototype.toUTCString.call(b)),z(b)&&(r=" "+k(b)),0===g.length&&(!s||0==b.length))return u[0]+r+u[1];if(0>d)return w(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);var x;return x=s?l(a,b,d,p,g):g.map(function(c){return m(a,b,d,p,c,s)}),a.seen.pop(),n(x,r,u)}function j(a,b){if(v(b))return a.stylize("undefined","undefined");if(t(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return s(b)?a.stylize(""+b,"number"):p(b)?a.stylize(""+b,"boolean"):q(b)?a.stylize("null","null"):void 0}function k(a){return"["+Error.prototype.toString.call(a)+"]"}function l(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)F(b,String(g))?f.push(m(a,b,c,d,String(g),!0)):f.push("");return e.forEach(function(e){e.match(/^\d+$/)||f.push(m(a,b,c,d,e,!0))}),f}function m(a,b,c,d,e,f){var g,h,j;if(j=Object.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?h=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(h=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),h||(a.seen.indexOf(j.value)<0?(h=q(c)?i(a,j.value,null):i(a,j.value,c-1),h.indexOf("\n")>-1&&(h=f?h.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+h.split("\n").map(function(a){return" "+a}).join("\n"))):h=a.stylize("[Circular]","special")),v(g)){if(f&&e.match(/^\d+$/))return h;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+h}function n(a,b,c){var d=0,e=a.reduce(function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function o(a){return Array.isArray(a)}function p(a){return"boolean"==typeof a}function q(a){return null===a}function r(a){return null==a}function s(a){return"number"==typeof a}function t(a){return"string"==typeof a}function u(a){return"symbol"==typeof a}function v(a){return void 0===a}function w(a){return x(a)&&"[object RegExp]"===C(a)}function x(a){return"object"==typeof a&&null!==a}function y(a){return x(a)&&"[object Date]"===C(a)}function z(a){return x(a)&&("[object Error]"===C(a)||a instanceof Error)}function A(a){return"function"==typeof a}function B(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),J[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=/%[sdj%]/g;c.format=function(a){if(!t(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(d[c++]);case"%d":return Number(d[c++]);case"%j":try{return JSON.stringify(d[c++])}catch(b){return"[Circular]"}default:return a}}),h=d[c];f>c;h=d[++c])g+=q(h)||!x(h)?" "+h:" "+e(h);return g},c.deprecate=function(a,e){function f(){if(!g){if(b.throwDeprecation)throw new Error(e);b.traceDeprecation?console.trace(e):console.error(e),g=!0}return a.apply(this,arguments)}if(v(d.process))return function(){return c.deprecate(a,e).apply(this,arguments)};if(b.noDeprecation===!0)return a;var g=!1;return f};var H,I={};c.debuglog=function(a){if(v(H)&&(H=b.env.NODE_DEBUG||""),a=a.toUpperCase(),!I[a])if(new RegExp("\\b"+a+"\\b","i").test(H)){var d=b.pid;I[a]=function(){var b=c.format.apply(c,arguments);console.error("%s %d: %s",a,d,b)}}else I[a]=function(){};return I[a]},c.inspect=e,e.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},e.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=o,c.isBoolean=p,c.isNull=q,c.isNullOrUndefined=r,c.isNumber=s,c.isString=t,c.isSymbol=u,c.isUndefined=v,c.isRegExp=w,c.isObject=x,c.isDate=y,c.isError=z,c.isFunction=A,c.isPrimitive=B,c.isBuffer=a("./support/isBuffer");var J=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];c.log=function(){console.log("%s - %s",E(),c.format.apply(c,arguments))},c.inherits=a("inherits"),c._extend=function(a,b){if(!b||!x(b))return a;for(var c=Object.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}}).call(this,a("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":44,_process:25,inherits:23}],46:[function(a,b,c){!function(){function a(a){for(var b="",c=0;a>c;c++)b+=(65536*(1+Math.random())|0).toString(16).substring(1);return b}function c(a){if(!a)throw new TypeError("Invalid argument; `value` has no value.");this.value=c.EMPTY,a&&a instanceof c?this.value=a.toString():a&&"[object String]"===Object.prototype.toString.call(a)&&c.isGuid(a)&&(this.value=a),this.equals=function(a){return c.isGuid(a)&&this.value==a},this.isEmpty=function(){return this.value===c.EMPTY},this.toString=function(){return this.value},this.toJSON=function(){return this.value}}var d=new RegExp("^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$","i");c.EMPTY="00000000-0000-0000-0000-000000000000",c.isGuid=function(a){return a&&(a instanceof c||d.test(a.toString()))},c.create=function(){return new c([a(2),a(1),a(1),a(1),a(3)].join("-"))},c.raw=function(){return[a(2),a(1),a(1),a(1),a(3)].join("-")},"undefined"!=typeof b&&b.exports?b.exports=c:"undefined"!=typeof window&&(window.Guid=c)}()},{}],47:[function(a,b,c){(function(c,d){function e(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){var d=c.concat(Array.prototype.slice.call(arguments));return b.apply(a,d)}}function f(a,b,d,f){"object"==typeof a&&(d=b,b=a,a=void 0),"function"==typeof b&&(d=b,b=void 0),b||(b={}),void 0!==a&&(b.uri=a),f&&(b.method=f.method);var h=new g(b),i=h.duplex&&k(),j=k(),m=h.duplex?l(i,j):j;h.duplex||(j.writable=!1),m.request=h,m.setHeader=e(h,h.setHeader),m.setLocation=e(h,h.setLocation);var n=!1;return m.on("close",function(){n=!0}),c.nextTick(function(){if(!n){m.on("close",function(){a.destroy()});var a=h._send();a.on("error",e(m,m.emit,"error")),m.emit("request",a),a.on("response",function(a){m.response=a,m.emit("response",a),h.duplex?a.pipe(j):(a.on("data",function(a){j.push(a)}),a.on("end",function(){j.push(null)}))}),h.duplex?i.pipe(a):a.end()}}),d&&(m.on("error",d),m.on("response",e(m,d,null))),m}function g(a){this.headers=a.headers||{};var b=(a.method||"GET").toUpperCase();this.method=b,this.duplex=!("GET"===b||"DELETE"===b||"HEAD"===b),this.auth=a.auth,this.options=a,a.uri&&this.setLocation(a.uri)}var h=a("url"),i=a("http"),j=a("https"),k=a("through2"),l=a("duplexer2");b.exports=f,f.get=f,f.post=function(a,b,c){return f(a,b,c,{method:"POST"})},f.put=function(a,b,c){return f(a,b,c,{method:"PUT"})},f["delete"]=function(a,b,c){return f(a,b,c,{method:"DELETE"})},g.prototype._send=function(){this._sent=!0;var a=this.headers||{},b=h.parse(this.uri),c=b.auth||this.auth;c&&(a.authorization="Basic "+d(c).toString("base64"));var e=b.protocol||"",f="https:"===e?j:i,g={scheme:e.replace(/:$/,""),method:this.method,host:b.hostname,port:Number(b.port)||("https:"===e?443:80),path:b.path,agent:this.options.agent||!1,headers:a,withCredentials:this.options.withCredentials};"https:"===e&&(g.pfx=this.options.pfx,g.key=this.options.key,g.cert=this.options.cert,g.ca=this.options.ca,g.ciphers=this.options.ciphers,g.rejectUnauthorized=this.options.rejectUnauthorized,g.secureProtocol=this.options.secureProtocol);var k=f.request(g);return k.setTimeout&&k.setTimeout(1e3*Math.pow(2,32)),k},g.prototype.setHeader=function(a,b){if(this._sent)throw new Error("request already sent");return this.headers[a]=b,this},g.prototype.setLocation=function(a){return this.uri=a,this}}).call(this,a("_process"),a("buffer").Buffer)},{_process:25,buffer:13,duplexer2:48,http:18,https:22,through2:69,url:43}],48:[function(a,b,c){var d=a("readable-stream"),e=(b.exports=function(a,b,c){return new e(a,b,c)},c.DuplexWrapper=function(a,b,c){"undefined"==typeof c&&(c=b,b=a,a=null),a=a||{},a.objectMode=!0,d.Duplex.call(this,a),this._bubbleErrors="undefined"==typeof a.bubbleErrors||!!a.bubbleErrors,this._writable=b,this._readable=c;var e=this;b.once("finish",function(){e.end()}),this.once("finish",function(){b.end()}),c.on("data",function(a){e.push(a)||c.pause()}),c.once("end",function(){return e.push(null)}),this._bubbleErrors&&(b.on("error",function(a){return e.emit("error",a)}),c.on("error",function(a){return e.emit("error",a)}))});e.prototype=Object.create(d.Duplex.prototype,{constructor:{value:e}}),e.prototype._write=function(a,b,c){this._writable.write(a,b,c)},e.prototype._read=function(a){this._readable.resume()}},{"readable-stream":58}],49:[function(a,b,c){arguments[4][31][0].apply(c,arguments)},{"./_stream_readable":51,"./_stream_writable":53,_process:25,"core-util-is":54,dup:31,inherits:55}],50:[function(a,b,c){arguments[4][32][0].apply(c,arguments)},{"./_stream_transform":52,"core-util-is":54,dup:32,inherits:55}],51:[function(a,b,c){arguments[4][33][0].apply(c,arguments)},{"./_stream_duplex":49,_process:25,buffer:13,"core-util-is":54,dup:33,events:17,inherits:55,isarray:56,stream:41,"string_decoder/":57,util:12}],52:[function(a,b,c){arguments[4][34][0].apply(c,arguments)},{"./_stream_duplex":49,"core-util-is":54,dup:34,inherits:55}],53:[function(a,b,c){arguments[4][35][0].apply(c,arguments)},{"./_stream_duplex":49,_process:25,buffer:13,"core-util-is":54,dup:35,inherits:55,stream:41}],54:[function(a,b,c){arguments[4][36][0].apply(c,arguments)},{buffer:13,dup:36}],55:[function(a,b,c){arguments[4][23][0].apply(c,arguments)},{dup:23}],56:[function(a,b,c){arguments[4][24][0].apply(c,arguments)},{dup:24}],57:[function(a,b,c){arguments[4][42][0].apply(c,arguments)},{buffer:13,dup:42}],58:[function(a,b,c){arguments[4][38][0].apply(c,arguments)},{"./lib/_stream_duplex.js":49,"./lib/_stream_passthrough.js":50,"./lib/_stream_readable.js":51,"./lib/_stream_transform.js":52,"./lib/_stream_writable.js":53,dup:38,stream:41}],59:[function(a,b,c){arguments[4][31][0].apply(c,arguments)},{"./_stream_readable":60,"./_stream_writable":62,_process:25,"core-util-is":63,dup:31,inherits:64}],60:[function(a,b,c){(function(c){function d(b,c){b=b||{};var d=b.highWaterMark;this.highWaterMark=d||0===d?d:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!b.objectMode,this.defaultEncoding=b.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,b.encoding&&(C||(C=a("string_decoder/").StringDecoder),this.decoder=new C(b.encoding),this.encoding=b.encoding)}function e(a){return this instanceof e?(this._readableState=new d(a,this),this.readable=!0,void A.call(this)):new e(a)}function f(a,b,c,d,e){var f=j(b,c);if(f)a.emit("error",f);else if(null===c||void 0===c)b.reading=!1,b.ended||k(a,b);else if(b.objectMode||c&&c.length>0)if(b.ended&&!e){var h=new Error("stream.push() after EOF");a.emit("error",h)}else if(b.endEmitted&&e){var h=new Error("stream.unshift() after end event");a.emit("error",h)}else!b.decoder||e||d||(c=b.decoder.write(c)),b.length+=b.objectMode?1:c.length,e?b.buffer.unshift(c):(b.reading=!1,b.buffer.push(c)),b.needReadable&&l(a),n(a,b);else e||(b.reading=!1);return g(b)}function g(a){return!a.ended&&(a.needReadable||a.length=D)a=D;else{a--;for(var b=1;32>b;b<<=1)a|=a>>b;a++}return a}function i(a,b){return 0===b.length&&b.ended?0:b.objectMode?0===a?0:1:null===a||isNaN(a)?b.flowing&&b.buffer.length?b.buffer[0].length:b.length:0>=a?0:(a>b.highWaterMark&&(b.highWaterMark=h(a)),a>b.length?b.ended?b.length:(b.needReadable=!0,0):a)}function j(a,b){var c=null;return y.isBuffer(b)||"string"==typeof b||null===b||void 0===b||a.objectMode||(c=new TypeError("Invalid non-string/buffer chunk")),c}function k(a,b){if(b.decoder&&!b.ended){var c=b.decoder.end();c&&c.length&&(b.buffer.push(c),b.length+=b.objectMode?1:c.length)}b.ended=!0,b.length>0?l(a):u(a)}function l(a){var b=a._readableState;b.needReadable=!1,b.emittedReadable||(b.emittedReadable=!0,b.sync?c.nextTick(function(){m(a)}):m(a))}function m(a){a.emit("readable")}function n(a,b){b.readingMore||(b.readingMore=!0,c.nextTick(function(){o(a,b)}))}function o(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length0)return;return 0===d.pipesCount?(d.flowing=!1,void(z.listenerCount(a,"data")>0&&s(a))):void(d.ranOut=!0)}function r(){this._readableState.ranOut&&(this._readableState.ranOut=!1,q(this))}function s(a,b){var d=a._readableState;if(d.flowing)throw new Error("Cannot switch to old mode now.");var e=b||!1,f=!1;a.readable=!0,a.pipe=A.prototype.pipe,a.on=a.addListener=A.prototype.on,a.on("readable",function(){f=!0;for(var b;!e&&null!==(b=a.read());)a.emit("data",b);null===b&&(f=!1,a._readableState.needReadable=!0)}),a.pause=function(){e=!0,this.emit("pause")},a.resume=function(){e=!1,f?c.nextTick(function(){a.emit("readable")}):this.read(0),this.emit("resume")},a.emit("readable")}function t(a,b){var c,d=b.buffer,e=b.length,f=!!b.decoder,g=!!b.objectMode;if(0===d.length)return null;if(0===e)c=null;else if(g)c=d.shift();else if(!a||a>=e)c=f?d.join(""):y.concat(d,e),d.length=0;else if(aj&&a>i;j++){var h=d[0],l=Math.min(a-i,h.length);f?c+=h.slice(0,l):h.copy(c,i,0,l),l0)throw new Error("endReadable called on non-empty stream");!b.endEmitted&&b.calledRead&&(b.ended=!0,c.nextTick(function(){b.endEmitted||0!==b.length||(b.endEmitted=!0,a.readable=!1,a.emit("end"))}))}function v(a,b){for(var c=0,d=a.length;d>c;c++)b(a[c],c)}function w(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}b.exports=e;var x=a("isarray"),y=a("buffer").Buffer;e.ReadableState=d;var z=a("events").EventEmitter;z.listenerCount||(z.listenerCount=function(a,b){return a.listeners(b).length});var A=a("stream"),B=a("core-util-is");B.inherits=a("inherits");var C;B.inherits(e,A),e.prototype.push=function(a,b){var c=this._readableState;return"string"!=typeof a||c.objectMode||(b=b||c.defaultEncoding,b!==c.encoding&&(a=new y(a,b),b="")),f(this,c,a,b,!1)},e.prototype.unshift=function(a){var b=this._readableState;return f(this,b,a,"",!0)},e.prototype.setEncoding=function(b){C||(C=a("string_decoder/").StringDecoder),this._readableState.decoder=new C(b),this._readableState.encoding=b};var D=8388608;e.prototype.read=function(a){var b=this._readableState;b.calledRead=!0;var c,d=a;if(("number"!=typeof a||a>0)&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return l(this),null;if(a=i(a,b),0===a&&b.ended)return c=null,b.length>0&&b.decoder&&(c=t(a,b),b.length-=c.length),0===b.length&&u(this),c;var e=b.needReadable;return b.length-a<=b.highWaterMark&&(e=!0),(b.ended||b.reading)&&(e=!1),e&&(b.reading=!0,b.sync=!0,0===b.length&&(b.needReadable=!0),this._read(b.highWaterMark),b.sync=!1),e&&!b.reading&&(a=i(d,b)),c=a>0?t(a,b):null,null===c&&(b.needReadable=!0,a=0),b.length-=a,0!==b.length||b.ended||(b.needReadable=!0),b.ended&&!b.endEmitted&&0===b.length&&u(this),c},e.prototype._read=function(a){this.emit("error",new Error("not implemented"))},e.prototype.pipe=function(a,b){function d(a){a===k&&f()}function e(){a.end()}function f(){a.removeListener("close",h),a.removeListener("finish",i),a.removeListener("drain",o),a.removeListener("error",g),a.removeListener("unpipe",d),k.removeListener("end",e),k.removeListener("end",f),(!a._writableState||a._writableState.needDrain)&&o()}function g(b){j(),a.removeListener("error",g),0===z.listenerCount(a,"error")&&a.emit("error",b)}function h(){a.removeListener("finish",i),j()}function i(){a.removeListener("close",h),j()}function j(){k.unpipe(a)}var k=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=a;break;case 1:l.pipes=[l.pipes,a];break;default:l.pipes.push(a)}l.pipesCount+=1;var m=(!b||b.end!==!1)&&a!==c.stdout&&a!==c.stderr,n=m?e:f;l.endEmitted?c.nextTick(n):k.once("end",n),a.on("unpipe",d);var o=p(k);return a.on("drain",o), a._events&&a._events.error?x(a._events.error)?a._events.error.unshift(g):a._events.error=[g,a._events.error]:a.on("error",g),a.once("close",h),a.once("finish",i),a.emit("pipe",k),l.flowing||(this.on("readable",r),l.flowing=!0,c.nextTick(function(){q(k)})),a},e.prototype.unpipe=function(a){var b=this._readableState;if(0===b.pipesCount)return this;if(1===b.pipesCount)return a&&a!==b.pipes?this:(a||(a=b.pipes),b.pipes=null,b.pipesCount=0,this.removeListener("readable",r),b.flowing=!1,a&&a.emit("unpipe",this),this);if(!a){var c=b.pipes,d=b.pipesCount;b.pipes=null,b.pipesCount=0,this.removeListener("readable",r),b.flowing=!1;for(var e=0;d>e;e++)c[e].emit("unpipe",this);return this}var e=w(b.pipes,a);return-1===e?this:(b.pipes.splice(e,1),b.pipesCount-=1,1===b.pipesCount&&(b.pipes=b.pipes[0]),a.emit("unpipe",this),this)},e.prototype.on=function(a,b){var c=A.prototype.on.call(this,a,b);if("data"!==a||this._readableState.flowing||s(this),"readable"===a&&this.readable){var d=this._readableState;d.readableListening||(d.readableListening=!0,d.emittedReadable=!1,d.needReadable=!0,d.reading?d.length&&l(this,d):this.read(0))}return c},e.prototype.addListener=e.prototype.on,e.prototype.resume=function(){s(this),this.read(0),this.emit("resume")},e.prototype.pause=function(){s(this,!0),this.emit("pause")},e.prototype.wrap=function(a){var b=this._readableState,c=!1,d=this;a.on("end",function(){if(b.decoder&&!b.ended){var a=b.decoder.end();a&&a.length&&d.push(a)}d.push(null)}),a.on("data",function(e){if(b.decoder&&(e=b.decoder.write(e)),(!b.objectMode||null!==e&&void 0!==e)&&(b.objectMode||e&&e.length)){var f=d.push(e);f||(c=!0,a.pause())}});for(var e in a)"function"==typeof a[e]&&"undefined"==typeof this[e]&&(this[e]=function(b){return function(){return a[b].apply(a,arguments)}}(e));var f=["error","close","destroy","pause","resume"];return v(f,function(b){a.on(b,d.emit.bind(d,b))}),d._read=function(b){c&&(c=!1,a.resume())},d},e._fromList=t}).call(this,a("_process"))},{_process:25,buffer:13,"core-util-is":63,events:17,inherits:64,isarray:65,stream:41,"string_decoder/":66}],61:[function(a,b,c){function d(a,b){this.afterTransform=function(a,c){return e(b,a,c)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function e(a,b,c){var d=a._transformState;d.transforming=!1;var e=d.writecb;if(!e)return a.emit("error",new Error("no writecb in Transform class"));d.writechunk=null,d.writecb=null,null!==c&&void 0!==c&&a.push(c),e&&e(b);var f=a._readableState;f.reading=!1,(f.needReadable||f.lengthc;c++){var f=b[c];if(e[f]===a)return f}return a&&"0x"+a.toString(16)}function d(){this.tState=q,this.value=void 0,this.string=void 0,this.unicode=void 0,this.negative=void 0,this.magnatude=void 0,this.position=void 0,this.exponent=void 0,this.negativeExponent=void 0,this.numberLength=0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=P,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:new a(2),3:new a(3),4:new a(4)},this.offset=-1}var e={},f=e.LEFT_BRACE=1,g=e.RIGHT_BRACE=2,h=e.LEFT_BRACKET=3,i=e.RIGHT_BRACKET=4,j=e.COLON=5,k=e.COMMA=6,l=e.TRUE=7,m=e.FALSE=8,n=e.NULL=9,o=e.STRING=10,p=e.NUMBER=11,q=e.START=17,r=e.TRUE1=33,s=e.TRUE2=34,t=e.TRUE3=35,u=e.FALSE1=49,v=e.FALSE2=50,w=e.FALSE3=51,x=e.FALSE4=52,y=e.NULL1=65,z=e.NULL2=66,A=e.NULL3=67,B=e.NUMBER1=81,C=e.NUMBER2=82,D=e.NUMBER3=83,E=e.NUMBER4=84,F=e.NUMBER5=85,G=e.NUMBER6=86,H=e.NUMBER7=87,I=e.NUMBER8=88,J=e.STRING1=97,K=e.STRING2=98,L=e.STRING3=99,M=e.STRING4=100,N=e.STRING5=101,O=e.STRING6=102,P=e.VALUE=113,Q=e.KEY=114,R=e.OBJECT=129,S=e.ARRAY=130,T=d.prototype;T.charError=function(a,b){this.onError(new Error("Unexpected "+JSON.stringify(String.fromCharCode(a[b]))+" at position "+b+" in state "+c(this.tState)))},T.onError=function(a){throw a},T.write=function(b){"string"==typeof b&&(b=new a(b));for(var d,e=0,P=b.length;P>e;e++)if(this.tState===q)d=b[e],this.offset++,123===d?this.onToken(f,"{"):125===d?this.onToken(g,"}"):91===d?this.onToken(h,"["):93===d?this.onToken(i,"]"):58===d?this.onToken(j,":"):44===d?this.onToken(k,","):116===d?this.tState=r:102===d?this.tState=u:110===d?this.tState=y:34===d?(this.string="",this.tState=J):45===d?(this.negative=!0,this.tState=B):48===d?(this.magnatude=0,this.tState=C):d>48&&64>d?(this.magnatude=d-48,this.tState=D):32===d||9===d||10===d||13===d||this.charError(b,e);else if(this.tState===J)if(d=b[e],this.bytes_remaining>0){for(var Q=0;Q=128){if(193>=d)return void this.onError(new Error("Invalid UTF-8 character at position "+e+" in state "+c(this.tState)));if(d>=194&&223>=d&&(this.bytes_in_sequence=2),d>=224&&239>=d&&(this.bytes_in_sequence=3),d>=240&&244>=d&&(this.bytes_in_sequence=4),this.bytes_in_sequence+e>b.length){for(var R=0;R<=b.length-1-e;R++)this.temp_buffs[this.bytes_in_sequence][R]=b[e+R];this.bytes_remaining=e+this.bytes_in_sequence-b.length,e=b.length-1}else this.string+=b.slice(e,e+this.bytes_in_sequence).toString(),e=e+this.bytes_in_sequence-1}else 34===d?(this.tState=q,this.onToken(o,this.string),this.offset+=a.byteLength(this.string,"utf8")+1,this.string=void 0):92===d?this.tState=K:d>=32?this.string+=String.fromCharCode(d):this.charError(b,e);else this.tState===K?(d=b[e],34===d?(this.string+='"',this.tState=J):92===d?(this.string+="\\",this.tState=J):47===d?(this.string+="/",this.tState=J):98===d?(this.string+="\b",this.tState=J):102===d?(this.string+="\f",this.tState=J):110===d?(this.string+="\n",this.tState=J):114===d?(this.string+="\r",this.tState=J):116===d?(this.string+=" ",this.tState=J):117===d?(this.unicode="",this.tState=L):this.charError(b,e)):this.tState===L||this.tState===M||this.tState===N||this.tState===O?(d=b[e],d>=48&&64>d||d>64&&70>=d||d>96&&102>=d?(this.unicode+=String.fromCharCode(d),this.tState++===O&&(this.string+=String.fromCharCode(parseInt(this.unicode,16)),this.unicode=void 0,this.tState=J)):this.charError(b,e)):this.tState===B?(d=b[e],this.numberLength++,48===d?(this.magnatude=0,this.tState=C):d>48&&64>d?(this.magnatude=d-48,this.tState=D):this.charError(b,e)):this.tState===C?(d=b[e],this.numberLength++,46===d?(this.position=.1,this.tState=E):101===d||69===d?(this.exponent=0,this.tState=G):(this.tState=q,this.onToken(p,0),this.offset+=this.numberLength-1,this.numberLength=0,this.magnatude=void 0,this.negative=void 0,e--)):this.tState===D?(d=b[e],this.numberLength++,46===d?(this.position=.1,this.tState=E):101===d||69===d?(this.exponent=0,this.tState=G):d>=48&&64>d?this.magnatude=10*this.magnatude+d-48:(this.tState=q,this.negative&&(this.magnatude=-this.magnatude,this.negative=void 0),this.onToken(p,this.magnatude),this.offset+=this.numberLength-1,this.numberLength=0,this.magnatude=void 0,e--)):this.tState===E?(d=b[e],this.numberLength++,d>=48&&64>d?(this.magnatude+=this.position*(d-48),this.position/=10,this.tState=F):this.charError(b,e)):this.tState===F?(d=b[e],this.numberLength++,d>=48&&64>d?(this.magnatude+=this.position*(d-48),this.position/=10):101===d||69===d?(this.exponent=0,this.tState=G):(this.tState=q,this.negative&&(this.magnatude=-this.magnatude,this.negative=void 0),this.onToken(p,this.negative?-this.magnatude:this.magnatude),this.offset+=this.numberLength-1,this.numberLength=0,this.magnatude=void 0,this.position=void 0,e--)):this.tState===G?(d=b[e],this.numberLength++,43===d||45===d?(45===d&&(this.negativeExponent=!0),this.tState=H):d>=48&&64>d?(this.exponent=10*this.exponent+(d-48),this.tState=I):this.charError(b,e)):this.tState===H?(d=b[e],this.numberLength++,d>=48&&64>d?(this.exponent=10*this.exponent+(d-48),this.tState=I):this.charError(b,e)):this.tState===I?(d=b[e],this.numberLength++,d>=48&&64>d?this.exponent=10*this.exponent+(d-48):(this.negativeExponent&&(this.exponent=-this.exponent,this.negativeExponent=void 0),this.magnatude*=Math.pow(10,this.exponent),this.exponent=void 0,this.negative&&(this.magnatude=-this.magnatude,this.negative=void 0),this.tState=q,this.onToken(p,this.magnatude),this.offset+=this.numberLength-1,this.numberLength=0,this.magnatude=void 0,e--)):this.tState===r?114===b[e]?this.tState=s:this.charError(b,e):this.tState===s?117===b[e]?this.tState=t:this.charError(b,e):this.tState===t?101===b[e]?(this.tState=q,this.onToken(l,!0),this.offset+=3):this.charError(b,e):this.tState===u?97===b[e]?this.tState=v:this.charError(b,e):this.tState===v?108===b[e]?this.tState=w:this.charError(b,e):this.tState===w?115===b[e]?this.tState=x:this.charError(b,e):this.tState===x?101===b[e]?(this.tState=q,this.onToken(m,!1),this.offset+=4):this.charError(b,e):this.tState===y?117===b[e]?this.tState=z:this.charError(b,e):this.tState===z?108===b[e]?this.tState=A:this.charError(b,e):this.tState===A&&(108===b[e]?(this.tState=q,this.onToken(n,null),this.offset+=3):this.charError(b,e))},T.onToken=function(a,b){},T.parseError=function(a,b){this.onError(new Error("Unexpected "+c(a)+(b?"("+JSON.stringify(b)+")":"")+" in state "+c(this.state)))},T.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},T.pop=function(){var a=this.value,b=this.stack.pop();this.value=b.value,this.key=b.key,this.mode=b.mode,this.emit(a),this.mode||(this.state=P)},T.emit=function(a){this.mode&&(this.state=k),this.onValue(a)},T.onValue=function(a){},T.onToken=function(a,b){this.state===P?a===o||a===p||a===l||a===m||a===n?(this.value&&(this.value[this.key]=b),this.emit(b)):a===f?(this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=Q,this.mode=R):a===h?(this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=S,this.state=P):a===g?this.mode===R?this.pop():this.parseError(a,b):a===i&&this.mode===S?this.pop():this.parseError(a,b):this.state===Q?a===o?(this.key=b,this.state=j):a===g?this.pop():this.parseError(a,b):this.state===j?a===j?this.state=P:this.parseError(a,b):this.state===k?a===k?this.mode===S?(this.key++,this.state=P):this.mode===R&&(this.state=Q):a===i&&this.mode===S||a===g&&this.mode===R?this.pop():this.parseError(a,b):this.parseError(a,b)},d.C=e,b.exports=d}).call(this,a("buffer").Buffer)},{buffer:13}],71:[function(a,b,c){"use strict";function d(a){return this instanceof d?(j.call(this,a),k.call(this,a),a&&a.readable===!1&&(this.readable=!1),a&&a.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,a&&a.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",e)):new d(a)}function e(){this.allowHalfOpen||this._writableState.ended||h(f,this)}function f(a){a.end()}var g=Object.keys||function(a){var b=[];for(var c in a)b.push(c);return b};b.exports=d;var h=a("process-nextick-args"),i=a("core-util-is");i.inherits=a("inherits");var j=a("./_stream_readable"),k=a("./_stream_writable");i.inherits(d,j);for(var l=g(k.prototype),m=0;m0)if(b.ended&&!e){var h=new Error("stream.push() after EOF");a.emit("error",h)}else if(b.endEmitted&&e){var h=new Error("stream.unshift() after end event");a.emit("error",h)}else!b.decoder||e||d||(c=b.decoder.write(c)),e||(b.reading=!1),b.flowing&&0===b.length&&!b.sync?(a.emit("data",c),a.read(0)):(b.length+=b.objectMode?1:c.length,e?b.buffer.unshift(c):b.buffer.push(c),b.needReadable&&l(a)),n(a,b);else e||(b.reading=!1);return g(b)}function g(a){return!a.ended&&(a.needReadable||a.length=H)a=H;else{a--;for(var b=1;32>b;b<<=1)a|=a>>b;a++}return a}function i(a,b){return 0===b.length&&b.ended?0:b.objectMode?0===a?0:1:null===a||isNaN(a)?b.flowing&&b.buffer.length?b.buffer[0].length:b.length:0>=a?0:(a>b.highWaterMark&&(b.highWaterMark=h(a)),a>b.length?b.ended?b.length:(b.needReadable=!0,0):a)}function j(a,b){var c=null;return B.isBuffer(b)||"string"==typeof b||null===b||void 0===b||a.objectMode||(c=new TypeError("Invalid non-string/buffer chunk")),c}function k(a,b){if(!b.ended){if(b.decoder){var c=b.decoder.end();c&&c.length&&(b.buffer.push(c),b.length+=b.objectMode?1:c.length)}b.ended=!0,l(a)}}function l(a){var b=a._readableState;b.needReadable=!1,b.emittedReadable||(F("emitReadable",b.flowing),b.emittedReadable=!0,b.sync?z(m,a):m(a))}function m(a){F("emit readable"),a.emit("readable"),t(a)}function n(a,b){b.readingMore||(b.readingMore=!0,z(o,a,b))}function o(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length=e)c=f?d.join(""):B.concat(d,e),d.length=0;else if(aj&&a>i;j++){var h=d[0],l=Math.min(a-i,h.length);f?c+=h.slice(0,l):h.copy(c,i,0,l),l0)throw new Error("endReadable called on non-empty stream");b.endEmitted||(b.ended=!0,z(w,b,a))}function w(a,b){a.endEmitted||0!==a.length||(a.endEmitted=!0,b.readable=!1,b.emit("end"))}function x(a,b){for(var c=0,d=a.length;d>c;c++)b(a[c],c)}function y(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}b.exports=e;var z=a("process-nextick-args"),A=a("isarray"),B=a("buffer").Buffer;e.ReadableState=d;var C=a("events").EventEmitter;C.listenerCount||(C.listenerCount=function(a,b){return a.listeners(b).length});var D;!function(){try{D=a("stream")}catch(b){}finally{D||(D=a("events").EventEmitter)}}();var B=a("buffer").Buffer,E=a("core-util-is");E.inherits=a("inherits");var F=a("util");F=F&&F.debuglog?F.debuglog("stream"):function(){};var G;E.inherits(e,D),e.prototype.push=function(a,b){var c=this._readableState;return c.objectMode||"string"!=typeof a||(b=b||c.defaultEncoding,b!==c.encoding&&(a=new B(a,b),b="")),f(this,c,a,b,!1)},e.prototype.unshift=function(a){var b=this._readableState;return f(this,b,a,"",!0)},e.prototype.isPaused=function(){return this._readableState.flowing===!1},e.prototype.setEncoding=function(b){return G||(G=a("string_decoder/").StringDecoder),this._readableState.decoder=new G(b),this._readableState.encoding=b,this};var H=8388608;e.prototype.read=function(a){F("read",a);var b=this._readableState,c=a;if(("number"!=typeof a||a>0)&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return F("read: emitReadable",b.length,b.ended),0===b.length&&b.ended?v(this):l(this),null;if(a=i(a,b),0===a&&b.ended)return 0===b.length&&v(this),null;var d=b.needReadable;F("need readable",d),(0===b.length||b.length-a0?u(a,b):null,null===e&&(b.needReadable=!0,a=0),b.length-=a,0!==b.length||b.ended||(b.needReadable=!0),c!==a&&b.ended&&0===b.length&&v(this),null!==e&&this.emit("data",e),e},e.prototype._read=function(a){this.emit("error",new Error("not implemented"))},e.prototype.pipe=function(a,b){function d(a){F("onunpipe"),a===l&&f()}function e(){F("onend"),a.end()}function f(){F("cleanup"),a.removeListener("close",i),a.removeListener("finish",j),a.removeListener("drain",q),a.removeListener("error",h),a.removeListener("unpipe",d),l.removeListener("end",e),l.removeListener("end",f),l.removeListener("data",g),!m.awaitDrain||a._writableState&&!a._writableState.needDrain||q()}function g(b){F("ondata");var c=a.write(b);!1===c&&(F("false write response, pause",l._readableState.awaitDrain),l._readableState.awaitDrain++,l.pause())}function h(b){F("onerror",b),k(),a.removeListener("error",h),0===C.listenerCount(a,"error")&&a.emit("error",b)}function i(){a.removeListener("finish",j),k()}function j(){F("onfinish"),a.removeListener("close",i),k()}function k(){F("unpipe"),l.unpipe(a)}var l=this,m=this._readableState;switch(m.pipesCount){case 0:m.pipes=a;break;case 1:m.pipes=[m.pipes,a];break;default:m.pipes.push(a)}m.pipesCount+=1,F("pipe count=%d opts=%j",m.pipesCount,b);var n=(!b||b.end!==!1)&&a!==c.stdout&&a!==c.stderr,o=n?e:f;m.endEmitted?z(o):l.once("end",o),a.on("unpipe",d);var q=p(l);return a.on("drain",q),l.on("data",g),a._events&&a._events.error?A(a._events.error)?a._events.error.unshift(h):a._events.error=[h,a._events.error]:a.on("error",h),a.once("close",i),a.once("finish",j),a.emit("pipe",l),m.flowing||(F("pipe resume"),l.resume()),a},e.prototype.unpipe=function(a){var b=this._readableState;if(0===b.pipesCount)return this;if(1===b.pipesCount)return a&&a!==b.pipes?this:(a||(a=b.pipes),b.pipes=null,b.pipesCount=0,b.flowing=!1,a&&a.emit("unpipe",this),this);if(!a){var c=b.pipes,d=b.pipesCount;b.pipes=null,b.pipesCount=0,b.flowing=!1;for(var e=0;d>e;e++)c[e].emit("unpipe",this);return this}var e=y(b.pipes,a);return-1===e?this:(b.pipes.splice(e,1),b.pipesCount-=1,1===b.pipesCount&&(b.pipes=b.pipes[0]),a.emit("unpipe",this),this)},e.prototype.on=function(a,b){var c=D.prototype.on.call(this,a,b);if("data"===a&&!1!==this._readableState.flowing&&this.resume(),"readable"===a&&this.readable){var d=this._readableState;d.readableListening||(d.readableListening=!0,d.emittedReadable=!1,d.needReadable=!0,d.reading?d.length&&l(this,d):z(q,this))}return c},e.prototype.addListener=e.prototype.on,e.prototype.resume=function(){var a=this._readableState;return a.flowing||(F("resume"),a.flowing=!0,r(this,a)),this},e.prototype.pause=function(){return F("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(F("pause"),this._readableState.flowing=!1,this.emit("pause")),this},e.prototype.wrap=function(a){var b=this._readableState,c=!1,d=this;a.on("end",function(){if(F("wrapped end"),b.decoder&&!b.ended){var a=b.decoder.end();a&&a.length&&d.push(a)}d.push(null)}),a.on("data",function(e){if(F("wrapped data"),b.decoder&&(e=b.decoder.write(e)),(!b.objectMode||null!==e&&void 0!==e)&&(b.objectMode||e&&e.length)){var f=d.push(e);f||(c=!0,a.pause())}});for(var e in a)void 0===this[e]&&"function"==typeof a[e]&&(this[e]=function(b){return function(){return a[b].apply(a,arguments)}}(e));var f=["error","close","destroy","pause","resume"];return x(f,function(b){a.on(b,d.emit.bind(d,b))}),d._read=function(b){F("wrapped _read",b),c&&(c=!1,a.resume())},d},e._fromList=u}).call(this,a("_process"))},{"./_stream_duplex":71,_process:25,buffer:13,"core-util-is":75,events:17,inherits:76,isarray:77,"process-nextick-args":78,"string_decoder/":79,util:12}],73:[function(a,b,c){"use strict";function d(a){this.afterTransform=function(b,c){return e(a,b,c)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function e(a,b,c){var d=a._transformState;d.transforming=!1;var e=d.writecb;if(!e)return a.emit("error",new Error("no writecb in Transform class"));d.writechunk=null,d.writecb=null,null!==c&&void 0!==c&&a.push(c),e&&e(b);var f=a._readableState;f.reading=!1,(f.needReadable||f.length