@quotemedia.com/streamer 1.7.2 → 2.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,56 +0,0 @@
1
- !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;((t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).qmci||(t.qmci={})).Streamer=e()}}(function(){return function s(i,a,l){function u(t,e){if(!a[t]){if(!i[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(f)return f(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=a[t]={exports:{}};i[t][0].call(o.exports,function(e){return u(i[t][1][e]||e)},o,o.exports,s,i,a,l)}return a[t].exports}for(var f="function"==typeof require&&require,e=0;e<l.length;e++)u(l[e]);return u}({1:[function(y,e,b){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";b.__esModule=!0;var c,d=y("./logging.js"),p=y("./EventSupport.js"),h=(c=p)&&c.__esModule?c:{"default":c},m=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(y("./streamer-events.js"));var g=function(){function r(e,t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),this.openSocket=t,this.createTransmitter=e,this.log=(0,d.asLogger)(n),this.events=new h["default"](this)}return r.prototype.open=function(){var s=this,e={push:function(e){return s.socket.push(e)}};this.transmitter=this.createTransmitter(e),this.transmitter.on("sequence",function(e){s.events.fire("sequence",e)}).on("message",function(e){s.events.fire("message",e)}),this.socket=this.openSocket(function(e){var o=(s.request=e).url;return{onMessage:function(e){s.transmitter.onMessage(e.responseBody)},onMessagePublished:function(e){s.transmitter.onMessage(e.responseBody)},onOpen:function(e){var t=m.event("open",{url:o,code:e.status,transport:e.transport});s.log.info(t),s.events.fire("open",t)},onReopen:function(e){var t=m.event("reopen",{url:o,status:e.code,transport:e.transport});s.log.info(t)},onTransportFailure:function(e,t){var n=m.error("Transport failure",{url:o,code:-2,reason:e,fallback:t.fallbackTransport});s.log.error(msg),s.events.fire("error",n)},onError:function(e){var t=e.reason||e.reasonPhrase,n=e.status;t&&(""+t.stack).includes("Failed to execute 'send' on 'XMLHttpRequest")&&(t="Failed to send XMLHttpRequest to "+/Failed to load '(.*?)'/.exec(""+t.stack)[1],n=404);var r=m.error(e.reason,{transport:e.transport,reason:t,url:o,code:n});s.log.error(r),s.events.fire("error",r)},onClose:function(e){var t=e.status,n=e.reason||e.reasonPhrase;408===t&&"unsubscribe"===e.state&&(t=200,n="Unsubscribed");var r=m.close({url:o,transport:e.transport,code:t,reason:n});s.log.info(r),s.events.fire("close",r)},onSlow:function(e){var t=m.slow({timesExceeded:e.timesExceeded,maxExceeded:e.maxExceed});s.log.info(t),s.events.fire("slow",t)}}})},r.prototype.close=function(){if(this.socket)try{this.socket.close(),this.socket=null}catch(e){this.events.fire("error",m.error("Error closing",{reason:e.message,cause:e,code:-3}))}},r.prototype.send=function(e){try{this.transmitter.send(e)}catch(t){this.events.fire("error",m.error("Error sending message",{reason:t.message,cause:t,code:-4}))}},r.prototype.setServer=function(e){this.request.headers["X-Stream-Instance"]=e},r.prototype.isClosed=function(){return null==this.socket},r.prototype.on=function(e,t){return this.events.on(e,t)},r}();b["default"]=g}).call(this,y("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},y("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],y("timers").setImmediate,y("timers").clearImmediate,"/lib/Connection.js","/lib")},{"./EventSupport.js":2,"./logging.js":16,"./streamer-events.js":25,_process:43,buffer:34,timers:64}],2:[function(e,t,d){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";d.__esModule=!0;var c=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.listeners={},this.source=e||this}return t.prototype.on=function(e,t){return this.listeners[e]=this.listeners[e]||[],this.listeners[e].push(t),this.source},t.prototype.fire=function(e,t){var n=this.listeners[e];if(n){var r=n,o=Array.isArray(r),s=0;for(r=o?r:r[Symbol.iterator]();;){var i;if(o){if(s>=r.length)break;i=r[s++]}else{if((s=r.next()).done)break;i=s.value}i(t)}}},t}();d["default"]=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/EventSupport.js","/lib")},{_process:43,buffer:34,timers:64}],3:[function(g,e,y){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";y.__esModule=!0;var c,d=g("./LongSequence.js"),p=(c=d)&&c.__esModule?c:{"default":c},h=g("./streamer-api.js");var m=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.update=e,this.sendsequence=new p["default"],this.checkinterval=null,this.lastreceivedsequence=null}return t.prototype.next=function(){return this.sendsequence.next()},t.prototype.track=function(e){if(null!=this.checkinterval){if(e%this.checkinterval==0){var t=new h.messages.control.FlowMessage;t.sequence=e,this.update(t)}this.lastreceivedsequence=e}},t}();y["default"]=m}).call(this,g("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],g("timers").setImmediate,g("timers").clearImmediate,"/lib/FlowControl.js","/lib")},{"./LongSequence.js":4,"./streamer-api.js":24,_process:43,buffer:34,timers:64}],4:[function(e,t,d){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";d.__esModule=!0;var c=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.val=t.MIN_VALUE}return t.prototype.next=function(){var e=this.val;return e<t.MAX_VALUE?this.val++:this.val=t.MIN_VALUE,e},t}();c.MIN_VALUE=1,c.MAX_VALUE=Number.MAX_SAFE_INTEGER,d["default"]=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/LongSequence.js","/lib")},{_process:43,buffer:34,timers:64}],5:[function(h,e,m){(function(t,n,r,o,s,i,a,l,u,f,c){"use strict";m.__esModule=!0;p(h("./message.js"));var d=p(h("./serialization/v1/codec.js"));function p(e){return e&&e.__esModule?e:{"default":e}}m["default"]=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.type=d["default"].TYPE,this.sequencenumber=null,this.timestamp=null,this.id=null,this.encoding=null,this.mimetype=null,this.payload=null}}).call(this,h("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},h("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],h("timers").setImmediate,h("timers").clearImmediate,"/lib/SMessage.js","/lib")},{"./message.js":17,"./serialization/v1/codec.js":23,_process:43,buffer:34,timers:64}],6:[function(v,e,_){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";_.__esModule=!0;v("./message.js");var c=v("./streamer-api.js"),d=v("./streamer-utils.js"),p=(b(v("./LongSequence.js")),b(v("./UShortId.js"))),h=(b(v("./SMessage.js")),v("./auth/AuthService.js"),b(v("./transmission/JsonTransmitter.js")),b(v("./FlowControl.js"))),m=v("./logging.js"),g=b(v("./EventSupport.js"));v("./polyfills.js");var y=v("./formatting.js"),E=v("./utils.js"),O=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(v("./streamer-events.js"));function b(e){return e&&e.__esModule?e:{"default":e}}var w=function(){function o(e,t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),this.events=new g["default"],this.streamingService=e,this.format=t,this.log=(0,m.asLogger)(n),this.flowControl=new h["default"](function(e){r.send(e)}),this.conn=e.createConnection(),this.conn.on("message",function(e){r._handlejsonmsg(e)}).on("sequence",function(e){r.flowControl.track(e)}).on("close",function(e){r.doClose(e)}).on("error",function(e){r.pendingConnection&&r.pendingConnection(e),r.events.fire("error",e)}),this.requestid=new p["default"],this.pendingsubscriptions={},this.pendingUnsubscriptions={},this.on("error",function(e){r.log.warn(e)})}return o.prototype.open=function(e){try{this.pendingConnection=e,this.conn.open()}catch(t){e&&e(t)}},o.prototype.on=function(e,t){return this.events.on(e,t)},o.prototype.subscribe=function(e,t,n,r){var o=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()}),t=Array.isArray(t)?t:[t].map(function(e){return e.toUpperCase()});var s=n&&"function"!=typeof n?n:null,i=r||(n&&"function"==typeof n?n:null);if(this.isClosed()){var a=O.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",a),void(i&&i(a))}var l={ids:[],types:t,mimetype:this.format,callback:i,result:{subscribed:[],rejected:[],unentitled:[],invalidSymbols:[]}};0!==e.length&&0!==t.length?(0,E.forEachPartition)(e,100,function(e){var t=o.requestid.next();l.ids.push(t),o.pendingsubscriptions[t]=l;var n=new c.messages.control.SubscribeMessage;n.id=t,n.action=c.messages.control.Action.SUBSCRIBE,n.symbols=e,n.types=l.types,n.mimetype=l.mimetype,s&&s.skipHeavyInitialLoad&&(n.skipHeavyInitialLoad=!0),s&&(n.conflation=s.conflation),o.send(n)}):i(null,l.result)},o.prototype.unsubscribe=function(e,r,t,n){var o=this;e=(Array.isArray(e)?e:[e]).map(function(e){return e.toUpperCase()}),r=Array.isArray(r)?r:[r].map(function(e){return e.toUpperCase()});var s=t&&"function"!=typeof t?t:null,i=n||(t&&"function"==typeof t?t:null);if(this.isClosed()){var a=O.error("Stream is disconnected",{code:-1,reason:"Already disconnected"});return this.events.fire("error",a),void(i&&i(a))}var l={ids:[],type:r,mimetype:this.format,callback:i,result:{unsubscribed:[]}};0!==e.length&&0!==r.length||i&&i(null,l.result),(0,E.forEachPartition)(e,100,function(e){var t=o.requestid.next();l.ids.push(t),o.pendingUnsubscriptions[t]=l;var n=new c.messages.control.SubscribeMessage;n.id=t,n.action=c.messages.control.Action.UNSUBSCRIBE,n.symbols=e,n.types=r,n.mimetype=l.mimetype,s&&(n.conflation=s.conflation),o.send(n)})},o.prototype._handlejsonmsg=function(e){(0,d.iscontrolmessage)(e)?this.handlectrlmsg(e):(0,d.isdatamessage)(e)?this._handledatamsg(e):this.events.fire("error",e)},o.prototype.handlectrlmsg=function(e){switch(this.log.debug(y.msgfmt.fmt(e)),(0,d.messagetype)(e)){case c.messages.MessageTypeNames.ctrl.HEARTBEAT:this.onHeartbeat(e);break;case c.messages.MessageTypeNames.ctrl.SUBSCRIBE_RESPONSE:this.onSubscribeResponse(e);break;case c.messages.MessageTypeNames.ctrl.UNSUBSCRIBE_RESPONSE:this.onUnsubscribeResponse(e);break;case c.messages.MessageTypeNames.ctrl.CONNECT_RESPONSE:this.onConnectResponse(e);break;case c.messages.MessageTypeNames.ctrl.CONNECTION_CLOSE:this.onConnectionClose(e);break;case c.messages.MessageTypeNames.ctrl.SLOW_CONNECTION:this.onSlowConnection(e)}},o.prototype.onHeartbeat=function(e){},o.prototype.onSubscribeResponse=function(e){var t=this.pendingsubscriptions[e.__id],n=t.callback;if((0,E.removeFromArray)(t.ids,e.__id),delete this.pendingsubscriptions[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=O.error("Error subscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&t.callback(r))}var o=t.result;if(e.entitlements){var s=e.entitlements,i=Array.isArray(s),a=0;for(s=i?s:s[Symbol.iterator]();;){var l;if(i){if(a>=s.length)break;l=s[a++]}else{if((a=s.next()).done)break;l=a.value}var u=l,f=u,c=f.symbol,d=f.marketdatatype,p=f.entitlement;u={symbol:c,type:d},"NA"!==p?(this.log.debug("SUBSCRIBED <"+c+", "+d+">"),u.entitlement=p,o.subscribed.push(u)):(this.log.warn("NOT ENTITLED <"+c+","+d+">"),o.unentitled.push(u))}}if(e.rejectedSymbols){var h=e.rejectedSymbols,m=Array.isArray(h),g=0;for(h=m?h:h[Symbol.iterator]();;){var y;if(m){if(g>=h.length)break;y=h[g++]}else{if((g=h.next()).done)break;y=g.value}c=y;this.log.warn("REJECTED "+c),o.rejected.push(c)}}if(e.invalidSymbols){var b=e.invalidSymbols,w=Array.isArray(b),v=0;for(b=w?b:b[Symbol.iterator]();;){var _,S;if(w){if(v>=b.length)break;S=b[v++]}else{if((v=b.next()).done)break;S=v.value}var T=S;this.log.warn("INVALID SYMBOL "+T),(_=o.invalidSymbols).push.apply(_,e.invalidSymbols)}}0!==t.ids.length||t.failed||n&&n(null,t.result)},o.prototype.onUnsubscribeResponse=function(e){var t=this.pendingUnsubscriptions[e.__id],n=t.callback;if((0,E.removeFromArray)(t.ids,e.__id),delete this.pendingUnsubscriptions[e.__id],200!=e.code&&!t.failed){t.failed=!0;var r=O.error("Error unsubscribing",{code:e.code,reason:e.reason});return this.events.fire("error",r),void(n&&n(r))}for(var o=0;o<e.unsubscribed.length;++o){var s=t.result,i=e.unsubscribed[o],a=i.symbol,l=i.marketdatatype;this.log.debug("UNSUBSCRIBED <"+a+", "+l+">"),s.unsubscribed.push({symbol:a,type:l})}0!==t.ids.length||t.failed||n&&n(null,t.result)},o.prototype.onConnectResponse=function(e){if(200!=e.code){var t=O.error("Connection failed",{code:e.code,reason:e.reason});return this.events.fire("error",t),this.pendingConnection&&this.pendingConnection(t),void this.doClose(t)}this._serverversion=e.version,this.flowControl.checkinterval=e.flowControlCheckInterval,this.conn.setServer(e.serverInstance),this.pendingConnection&&this.pendingConnection(null,this)},o.prototype.onConnectionClose=function(e){this.doClose(O.close({reason:e.reason,code:e.code}))},o.prototype.onSlowConnection=function(e){this.log.debug(y.msgfmt.fmt(e)),this.events.fire("slow",e)},o.prototype._handledatamsg=function(e){this.log.debug(y.msgfmt.fmt(e)),this.events.fire("message",e)},o.prototype.send=function(e){this.conn&&(e.sequenceNumber=this.flowControl.next(),this.conn.send(e))},o.prototype.doClose=function(e){if(!this.isClosed()){var t=this.conn;this.conn=null,this.events.fire("close",e),t.close()}},o.prototype.close=function(e){this.doClose(O.close({reason:"Manually closed",code:200})),e&&e()},o.prototype.isClosed=function(){return null==this.conn},o}();_["default"]=w}).call(this,v("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},v("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],v("timers").setImmediate,v("timers").clearImmediate,"/lib/Stream.js","/lib")},{"./EventSupport.js":2,"./FlowControl.js":3,"./LongSequence.js":4,"./SMessage.js":5,"./UShortId.js":9,"./auth/AuthService.js":11,"./formatting.js":13,"./logging.js":16,"./message.js":17,"./polyfills.js":18,"./streamer-api.js":24,"./streamer-events.js":25,"./streamer-utils.js":26,"./transmission/JsonTransmitter.js":27,"./utils.js":29,_process:43,buffer:34,timers:64}],7:[function(v,e,_){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";_.__esModule=!0;var c=y(v("./atmosphere.js/lib/atmosphere.js")),d=y(v("./http.js")),p=v("./auth/AuthService.js"),h=(v("./Stream.js"),v("./logging.js")),m=y(v("./auth/EnduserAuthService.js"));v("./polyfills.js");var g=y(v("./StreamingService.js"));function y(e){return e&&e.__esModule?e:{"default":e}}var b={},w=void 0;Object.assign(b,{login:function(e,t){new m["default"](d["default"],e).login(t)},open:function(e,t){w||(w=(0,h.asLogger)(b.logger),c["default"].util.log=function(e,t){w.log.apply(w,[e].concat(Array.from(t)))});var n=void 0;try{n=(0,p.asCredentials)(e.credentials)}catch(o){return void t(o)}var r=Object.assign({},e);r.credentials=n,r.format=r.format||"application/json",new g["default"](d["default"],c["default"],w,r).openStream(t)},ping:function(e,t){new g["default"](d["default"],c["default"],w,{host:e}).ping(t)},getServerVersion:function(e,t){new g["default"](d["default"],c["default"],w,{host:e}).getVersion(t)}}),_["default"]=b}).call(this,v("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},v("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],v("timers").setImmediate,v("timers").clearImmediate,"/lib/Streamer.js","/lib")},{"./Stream.js":6,"./StreamingService.js":8,"./atmosphere.js/lib/atmosphere.js":10,"./auth/AuthService.js":11,"./auth/EnduserAuthService.js":12,"./http.js":14,"./logging.js":16,"./polyfills.js":18,_process:43,buffer:34,timers:64}],8:[function(O,e,C){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";C.__esModule=!0;var c=O("./streamer-api.js"),d=v(O("./serialization/SMessageDecoder.js")),p=v(O("./serialization/SMessageEncoder.js")),h=v(O("./transmission/SMessageTransmitter.js")),m=v(O("./transmission/JsonTransmitter.js")),g=(O("./streamer-utils.js"),O("./message.js"));O("./polyfills.js");var y=v(O("./Connection.js")),b=v(O("./Stream.js")),w=O("./logging.js");function v(e){return e&&e.__esModule?e:{"default":e}}var _="/ping/v1",S="/version/v1",T="/stream/v1",E=function(){function a(e,t,n,r){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),this.http=e,this.atmo=t,this.log=(0,w.asLogger)(n),this.config=r||{};var s=new p["default"],i=new d["default"];this.format=this.config.format,"application/json"===this.config.format?this.createTransmitter=function(e){return new m["default"](e,o.log)}:(this.createTransmitter=function(e){return new h["default"](e,s,i,o.log)},"application/json/legacy"===this.config.format&&(this.format=g.MimeTypes.JSON))}return a.prototype.openSocket=function(e){var t={"X-Stream-Version":c.VERSION,"X-Stream-Lib":c.LIBRARY_NAME},n=this.config.conflation;null!=n&&""!==n&&(t["X-Stream-Conflation"]=n),"application/json"===this.config.format&&(t["X-Stream-Format"]=this.format),Object.assign(t,this.config.credentials.getHeaders());var r={url:this.config.host+T,transport:this.config.transport||"websocket",fallbackTransport:this.config.fallbackTransport||"streaming",enableXDR:!0===this.config.cors,trackMessageLength:!0,headers:t,maxReconnectOnClose:1,reconnectInterval:1e3,closeAsync:!0,connectTimeout:6e4};Object.assign(r,e(r));var o=this.atmo.subscribe(r);return{push:function(e){o.push(e)},close:function(){o.close()}}},a.prototype.createConnection=function(){var t=this;return new y["default"](function(e){return t.createTransmitter(e)},function(e){return t.openSocket(e)},this.logger)},a.prototype.openStream=function(e){new b["default"](this,this.format,this.log).open(e)},a.prototype.ping=function(t){this.http({url:this.config.host+_,success:function(e){return t(null,e)},failure:t})},a.prototype.getVersion=function(t){this.http({url:this.config.host+S,success:function(e){return t(null,e)},failure:t})},a}();C["default"]=E}).call(this,O("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},O("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],O("timers").setImmediate,O("timers").clearImmediate,"/lib/StreamingService.js","/lib")},{"./Connection.js":1,"./Stream.js":6,"./logging.js":16,"./message.js":17,"./polyfills.js":18,"./serialization/SMessageDecoder.js":19,"./serialization/SMessageEncoder.js":20,"./streamer-api.js":24,"./streamer-utils.js":26,"./transmission/JsonTransmitter.js":27,"./transmission/SMessageTransmitter.js":28,_process:43,buffer:34,timers:64}],9:[function(e,t,d){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";d.__esModule=!0;var c=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.val=t.MIN_VALUE}return t.prototype.next=function(){var e=this.val;return e<t.MAX_VALUE?this.val++:this.val=t.MIN_VALUE,e},t}();c.NULL=0,c.MIN_VALUE=1,c.MAX_VALUE=65535,d["default"]=c}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/UShortId.js","/lib")},{_process:43,buffer:34,timers:64}],10:[function(e,p,h){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";var c,d,oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};
2
- /*
3
- * Copyright 2015 Async-IO.org
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
- /*
18
- * Copyright 2015 Async-IO.org
19
- *
20
- * Licensed under the Apache License, Version 2.0 (the "License");
21
- * you may not use this file except in compliance with the License.
22
- * You may obtain a copy of the License at
23
- *
24
- * http://www.apache.org/licenses/LICENSE-2.0
25
- *
26
- * Unless required by applicable law or agreed to in writing, software
27
- * distributed under the License is distributed on an "AS IS" BASIS,
28
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29
- * See the License for the specific language governing permissions and
30
- * limitations under the License.
31
- */
32
- c=undefined,d=function(){var e,t,ee={},te=!1,o=[],ne=[],re=0,c=Object.prototype.hasOwnProperty;return(ee={version:"2.3.3-javascript",onError:function(e){},onClose:function(e){},onOpen:function(e){},onReopen:function(e){},onMessage:function(e){},onReconnect:function(e,t){},onMessagePublished:function(e){},onTransportFailure:function(e,t){},onLocalMessage:function(e){},onFailureToReconnect:function(e,t){},onClientTimeout:function(e){},onOpenAfterResume:function(e){},WebsocketApiAdapter:function(e){var t,n;return e.onMessage=function(e){n.onmessage({data:e.responseBody})},e.onMessagePublished=function(e){n.onmessage({data:e.responseBody})},e.onOpen=function(e){n.onopen(e)},n={close:function(){t.close()},send:function(e){t.push(e)},onmessage:function(e){},onopen:function(e){},onclose:function(e){},onerror:function(e){}},t=new ee.subscribe(e),n},AtmosphereRequest:function(e){var a,u,l,d={timeout:3e5,method:"GET",headers:{},contentType:"",callback:null,url:"",data:"",suspend:!0,maxRequest:-1,reconnect:!0,maxStreamingLength:1e7,lastIndex:0,logLevel:"info",requestCount:0,fallbackMethod:"GET",fallbackTransport:"streaming",transport:"long-polling",webSocketImpl:null,webSocketBinaryType:null,dispatchUrl:null,webSocketPathDelimiter:"@@",enableXDR:!1,rewriteURL:!1,attachHeadersAsQueryString:!0,executeCallbackBeforeReconnect:!1,readyState:0,withCredentials:!1,trackMessageLength:!1,messageDelimiter:"|",connectTimeout:-1,reconnectInterval:0,dropHeaders:!0,uuid:0,async:!0,shared:!1,readResponsesHeaders:!1,maxReconnectOnClose:5,enableProtocol:!0,disableDisconnect:!1,pollingInterval:0,heartbeat:{client:null,server:null},ackInterval:0,closeAsync:!1,reconnectOnServerError:!0,handleOnlineOffline:!0,onError:function(e){},onClose:function(e){},onOpen:function(e){},onMessage:function(e){},onReopen:function(e,t){},onReconnect:function(e,t){},onMessagePublished:function(e){},onTransportFailure:function(e,t){},onLocalMessage:function(e){},onFailureToReconnect:function(e,t){},onClientTimeout:function(e){},onOpenAfterResume:function(e){}},p={status:200,reasonPhrase:"OK",responseBody:"",messages:[],headers:[],state:"messageReceived",transport:"polling",error:null,request:null,partialMessage:"",errorHandled:!1,closedByClientTimeout:!1,ffTryingReconnect:!1},s=null,i=null,n=null,r=null,f=null,o=!0,h=0,c=0,m="X",g=!1,y=null,b=null,w=ee.util.now();function t(){g=!(o=!0),h=0,r=n=i=s=null}function v(e){return"debug"==e?"debug"===d.logLevel:"info"==e?"info"===d.logLevel||"debug"===d.logLevel:"warn"==e?"warn"===d.logLevel||"info"===d.logLevel||"debug"===d.logLevel:"error"==e&&("error"===d.logLevel||"warn"===d.logLevel||"info"===d.logLevel||"debug"===d.logLevel)}function _(e){v("debug")&&ee.util.debug(new Date+" Atmosphere: "+e)}function S(e,t){return""===p.partialMessage&&"streaming"===t.transport&&e.responseText.length>t.maxStreamingLength}function T(){if(d.enableProtocol&&!d.disableDisconnect&&!d.firstMessage){var r="X-Atmosphere-Transport=close&X-Atmosphere-tracking-id="+d.uuid;ee.util.each(d.headers,function(e,t){var n=ee.util.isFunction(t)?t.call(this,d,d,p):t;null!=n&&(r+="&"+encodeURIComponent(e)+"="+encodeURIComponent(n))});var e=d.url.replace(/([?&])_=[^&]*/,r);e+=e===d.url?(/\?/.test(d.url)?"&":"?")+r:"";var t=new ee.AtmosphereRequest({connected:!1});t.connectTimeout=d.connectTimeout,t.attachHeadersAsQueryString=!1,t.dropHeaders=!0,t.url=e,t.contentType="text/plain",t.transport="polling",t.method="GET",t.data="",t.heartbeat=null,d.enableXDR&&(t.enableXDR=d.enableXDR),t.async=d.closeAsync,function(e,t){t||(t=G(e));t.transport="polling",t.method="GET",t.withCredentials=!1,t.reconnect=!1,t.force=!0,t.suspend=!1,t.timeout=1e3,U(t)}("",t)}}function E(){_("Closing (AtmosphereRequest._close() called)"),g=!0,d.reconnectId&&(clearTimeout(d.reconnectId),delete d.reconnectId),d.heartbeatTimer&&clearTimeout(d.heartbeatTimer),d.reconnect=!1,p.request=d,p.state="unsubscribe",p.responseBody="",p.status=408,p.partialMessage="",Z(),T(),O()}function O(){p.partialMessage="",d.id&&clearTimeout(d.id),d.heartbeatTimer&&clearTimeout(d.heartbeatTimer),d.reconnectId&&(clearTimeout(d.reconnectId),delete d.reconnectId),null!=r&&(r.close(),r=null),null!=f&&(f.abort(),f=null),null!=n&&(n.abort(),n=null),null!=s&&(s.canSendMessage&&(_("invoking .close() on WebSocket object"),s.close()),s=null),null!=i&&(i.close(),i=null),function(){null!=a&&(clearInterval(u),document.cookie=l+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/",a.signal("close",{reason:"",heir:g?(a.get("children")||[])[0]:w}),a.close());null!=b&&b.close()}()}function C(e){O(),t(),(d=ee.util.extend(d,e)).mrequest=d.reconnect,d.reconnect||(d.reconnect=!0)}function I(){if(d.shared){if(null!=(b=function(s){var t,n,r,i="atmosphere-"+s.url,e={storage:function(){function t(e){e.key===i&&e.newValue&&l(e.newValue)}if(ee.util.storage){var n=window.localStorage,r=function(e){var t=n.getItem(i+"-"+e);return null===t?[]:ee.util.parseJSON(t)},o=function(e,t){n.setItem(i+"-"+e,ee.util.stringifyJSON(t))};return{init:function(){return o("children",r("children").concat([w])),ee.util.on(window,"storage",t),r("opened")},signal:function(e,t){n.setItem(i,ee.util.stringifyJSON({target:"p",type:e,data:t}))},close:function(){var e=r("children");ee.util.off(window,"storage",t),e&&a(e,s.id)&&o("children",e)}}}},windowref:function(){var n=window.open("",i.replace(/\W/g,""));if(n&&!n.closed&&n.callbacks)return{init:function(){return n.callbacks.push(l),n.children.push(w),n.opened},signal:function(e,t){!n.closed&&n.fire&&n.fire(ee.util.stringifyJSON({target:"p",type:e,data:t}))},close:function(){r||(a(n.callbacks,l),a(n.children,w))}}}};function a(e,t){var n,r=e.length;for(n=0;n<r;n++)e[n]===t&&e.splice(n,1);return r!==e.length}function l(e){var t=ee.util.parseJSON(e),n=t.data;if("c"===t.target)switch(t.type){case"open":R("opening","local",d);break;case"close":r||(r=!0,"aborted"===n.reason?E():n.heir===w?I():setTimeout(function(){I()},100));break;case"message":z(n,"messageReceived",200,s.transport);break;case"localMessage":V(n)}}function o(){var e=new RegExp("(?:^|; )("+encodeURIComponent(i)+")=([^;]*)").exec(document.cookie);if(e)return ee.util.parseJSON(decodeURIComponent(e[2]))}if(!(t=o())||1e3<ee.util.now()-t.ts)return;if(!(n=e.storage()||e.windowref()))return;return{open:function(){var e;return u=setInterval(function(){var e=t;(t=o())&&e.ts!==t.ts||l(ee.util.stringifyJSON({target:"c",type:"close",data:{reason:"error",heir:e.heir}}))},1e3),(e=n.init())&&setTimeout(function(){R("opening","local",s)},50),e},send:function(e){n.signal("send",e)},localSend:function(e){n.signal("localSend",ee.util.stringifyJSON({id:w,event:e}))},close:function(){g||(clearInterval(u),n.signal("close"),n.close())}}}(d))&&(v("debug")&&ee.util.debug("Storage service available. All communication will be local"),b.open(d)))return;v("debug")&&ee.util.debug("No Storage service available."),b=null}var e,r,o;d.firstMessage=0==re,d.isOpen=!1,d.ctime=ee.util.now(),0===d.uuid&&(d.uuid=re),p.closedByClientTimeout=!1,"websocket"!==d.transport&&"sse"!==d.transport?U(d):"websocket"===d.transport?null!=d.webSocketImpl||window.WebSocket||window.MozWebSocket?function n(r){p.transport="websocket";var e=(d.url,B(d,ee.util.getAbsoluteURL(d.webSocketUrl||d.url)).replace(/^http/,"ws"));v("debug")&&ee.util.debug("Invoking executeWebSocket, using URL: "+e);if(r&&!d.reconnect)return void(null!=s&&O());s=function(e){{return null!=d.webSocketImpl?d.webSocketImpl:window.WebSocket?new WebSocket(e):new MozWebSocket(e)}}(e);null!=d.webSocketBinaryType&&(s.binaryType=d.webSocketBinaryType);0<d.connectTimeout&&(d.id=setTimeout(function(){if(r);else{s.onclose({code:1002,reason:"",wasClean:!1});try{O()}catch(e){}}},d.connectTimeout));s.onopen=function(e){_("websocket.onopen"),A(d),te=!1,v("debug")&&ee.util.debug("Websocket successfully opened");var t=r;null!=s&&(s.canSendMessage=!0),d.enableProtocol||(r=!0,R(t?"re-opening":"opening","websocket",d)),null!=s&&"POST"===d.method&&(p.state="messageReceived",s.send(d.data))};s.onmessage=function(e){_("websocket.onmessage"),A(d),d.enableProtocol&&(r=!0),p.state="messageReceived",p.status=200;var t="string"==typeof(e=e.data);if(t){var n=j(e,d,p);n||(Z(),p.responseBody="",p.messages=[])}else{if(""===(e=k(d,e)))return;p.responseBody=e,Z(),p.responseBody=null}};s.onerror=function(e){_("websocket.onerror"),clearTimeout(d.id),d.heartbeatTimer&&clearTimeout(d.heartbeatTimer),
33
- // Patched by QuoteMedia
34
- M(460,"Websocket error")};s.onclose=function(e){if(_("websocket.onclose"),clearTimeout(d.id),"closed"!==p.state){var t=e.reason;if(""===t)switch(e.code){case 1e3:t="Normal closure; the connection successfully completed whatever purpose for which it was created.";break;case 1001:t="The endpoint is going away, either because of a server failure or because the browser is navigating away from the page that opened the connection.";break;case 1002:t="The endpoint is terminating the connection due to a protocol error.";break;case 1003:t="The connection is being terminated because the endpoint received data of a type it cannot accept (for example, a text-only endpoint received binary data).";break;case 1004:t="The endpoint is terminating the connection because a data frame was received that is too large.";break;case 1005:t="Unknown: no status code was provided even though one was expected.";break;case 1006:t="Connection was closed abnormally (that is, with no close frame being sent)."}v("warn")&&ee.util.warn("Websocket closed, reason: "+t+" - wasClean: "+e.wasClean),p.closedByClientTimeout||d.handleOnlineOffline&&te?d.reconnectId&&(clearTimeout(d.reconnectId),delete d.reconnectId):($(r),p.state="closed",g?ee.util.log(d.logLevel,["Websocket closed normally"]):r?d.reconnect&&"websocket"===p.transport&&(O(),h++<d.maxReconnectOnClose?(R("re-connecting",d.transport,d),0<d.reconnectInterval?d.reconnectId=setTimeout(function(){p.responseBody="",p.messages=[],n(!0)},d.reconnectInterval):(p.responseBody="",p.messages=[],n(!0))):(ee.util.log(d.logLevel,["Websocket reconnect maximum try reached "+h]),v("warn")&&ee.util.warn("Websocket error, reason: "+e.reason),M(0,"maxReconnectOnClose reached"))):x("Websocket failed on first connection attempt. Downgrading to "+d.fallbackTransport+" and resending"))}};var t=navigator.userAgent.toLowerCase();var o=-1<t.indexOf("android");o&&s.url===undefined&&s.onclose({reason:"Android 4.1 does not support websockets.",wasClean:!1})}(!1):x("Websocket is not supported, using request.fallbackTransport ("+d.fallbackTransport+")"):"sse"===d.transport&&(e=ee.util.getAbsoluteURL(d.url.toLowerCase()),r=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/.exec(e),o=!(!r||r[1]==window.location.protocol&&r[2]==window.location.hostname&&(r[3]||("http:"===r[1]?80:443))==(window.location.port||("http:"===window.location.protocol?80:443))),!window.EventSource||o&&ee.util.browser.safari&&!(7<=ee.util.browser.vmajor)?x("Server Side Events(SSE) is not supported, using request.fallbackTransport ("+d.fallbackTransport+")"):function t(n){p.transport="sse";var e=B(d);v("debug")&&(ee.util.debug("Invoking executeSSE"),ee.util.debug("Using URL: "+e));if(n&&!d.reconnect)return void(null!=i&&O());try{i=new EventSource(e,{withCredentials:d.withCredentials})}catch(r){return M(0,r),void x("SSE failed. Downgrading to fallback transport and resending")}0<d.connectTimeout&&(d.id=setTimeout(function(){n||O()},d.connectTimeout));i.onopen=function(e){_("sse.onopen"),A(d),v("debug")&&ee.util.debug("SSE successfully opened"),d.enableProtocol?d.isReopen&&(d.isReopen=!1,R("re-opening",d.transport,d)):R(n?"re-opening":"opening","sse",d),n=!0,"POST"===d.method&&(p.state="messageReceived",i.send(d.data))};i.onmessage=function(e){if(_("sse.onmessage"),A(d),!d.enableXDR&&window.location.host&&e.origin&&e.origin!==window.location.protocol+"//"+window.location.host)ee.util.log(d.logLevel,["Origin was not "+window.location.protocol+"//"+window.location.host]);else{p.state="messageReceived",p.status=200;var t=j(e=e.data,d,p);t||(Z(),p.responseBody="",p.messages=[])}};i.onerror=function(e){_("sse.onerror"),clearTimeout(d.id),d.heartbeatTimer&&clearTimeout(d.heartbeatTimer),p.closedByClientTimeout||($(n),O(),g?ee.util.log(d.logLevel,["SSE closed normally"]):n?d.reconnect&&"sse"===p.transport&&(h++<d.maxReconnectOnClose?(R("re-connecting",d.transport,d),0<d.reconnectInterval?d.reconnectId=setTimeout(function(){t(!0)},d.reconnectInterval):t(!0),p.responseBody="",p.messages=[]):(ee.util.log(d.logLevel,["SSE reconnect maximum try reached "+h]),M(0,"maxReconnectOnClose reached"))):x("SSE failed. Downgrading to fallback transport and resending"))}}(!1))}function R(e,t,n){if(d.shared&&"local"!==t&&function(){var t,r="atmosphere-"+d.url,e=function(){var n,e=r.replace(/\W/g,""),t=document.getElementById(e);return t||((t=document.createElement("div")).id=e,t.style.display="none",t.innerHTML='<iframe name="'+e+'" />',document.body.appendChild(t)),n=t.firstChild.contentWindow,{init:function(){n.callbacks=[o],n.fire=function(e){var t;for(t=0;t<n.callbacks.length;t++)n.callbacks[t](e)}},signal:function(e,t){!n.closed&&n.fire&&n.fire(ee.util.stringifyJSON({target:"c",type:e,data:t}))},get:function(e){return n.closed?null:n[e]},set:function(e,t){n.closed||(n[e]=t)},close:function(){}}};function o(e){var t=ee.util.parseJSON(e),n=t.data;if("p"===t.target)switch(t.type){case"send":W(n);break;case"localSend":V(n);break;case"close":E()}}function n(){document.cookie=l+"="+encodeURIComponent(ee.util.stringifyJSON({ts:ee.util.now()+1,heir:(t.get("children")||[])[0]}))+"; path=/"}y=function(e){t.signal("message",e)},(t=function(){function e(e){e.key===r&&e.newValue&&o(e.newValue)}if(ee.util.storage){var n=window.localStorage;return{init:function(){ee.util.on(window,"storage",e)},signal:function(e,t){n.setItem(r,ee.util.stringifyJSON({target:"c",type:e,data:t}))},get:function(e){return ee.util.parseJSON(n.getItem(r+"-"+e))},set:function(e,t){n.setItem(r+"-"+e,ee.util.stringifyJSON(t))},close:function(){ee.util.off(window,"storage",e),n.removeItem(r),n.removeItem(r+"-opened"),n.removeItem(r+"-children")}}}}()||e()).init(),v("debug")&&ee.util.debug("Installed StorageService "+t),t.set("children",[]),null==t.get("opened")||t.get("opened")||t.set("opened",!1),l=encodeURIComponent(r),n(),u=setInterval(n,1e3),a=t}(),null!=a&&a.set("opened",!0),n.close=function(){E()},0<h&&"re-connecting"===e)n.isReopen=!0,(i=p).state="re-connecting",K(i);else if(null==p.error){p.request=n;var r=p.state;p.state=e;var o=p.transport;p.transport=t;var s=p.responseBody;Z(),p.responseBody=s,p.state=r,p.transport=o}var i}function N(o){o.transport="jsonp";var s,i=d;null!=o&&void 0!==o&&(i=o),(f={open:function(){var r="atmosphere"+ ++w;function e(){var e=i.url;null!=i.dispatchUrl&&(e+=i.dispatchUrl);var t=i.data;i.attachHeadersAsQueryString&&(e=B(i),""!==t&&(e+="&X-Atmosphere-Post-Body="+encodeURIComponent(t)),t="");var n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;(s=document.createElement("script")).src=e+"&jsonpTransport="+r,s.clean=function(){s.clean=s.onerror=s.onload=s.onreadystatechange=null,s.parentNode&&s.parentNode.removeChild(s),2==++o.scriptCount&&(o.scriptCount=1,i.lastIndex=0,i.openId&&clearTimeout(i.openId),i.heartbeatTimer&&clearTimeout(i.heartbeatTimer),i.reconnect&&h++<i.maxReconnectOnClose?(R("re-connecting",i.transport,i),P(f,i,o.reconnectInterval),i.openId=setTimeout(function(){L(i)},i.reconnectInterval+1e3)):M(0,"maxReconnectOnClose reached"))},s.onload=s.onreadystatechange=function(){_("jsonp.onload"),s.readyState&&!/loaded|complete/.test(s.readyState)||s.clean()},s.onerror=function(){_("jsonp.onerror"),o.scriptCount=1,s.clean()},n.insertBefore(s,n.firstChild)}window[r]=function(e){if(_("jsonp.window"),o.scriptCount=0,i.reconnect&&-1===i.maxRequest||i.requestCount++<i.maxRequest){if(i.executeCallbackBeforeReconnect||P(f,i,i.pollingInterval),null!=e&&"string"!=typeof e)try{e=e.message}catch(t){}j(e,i,p)||z(p.responseBody,"messageReceived",200,i.transport),i.executeCallbackBeforeReconnect&&P(f,i,i.pollingInterval),A(i)}else ee.util.log(d.logLevel,["JSONP reconnect maximum try reached "+d.requestCount]),M(0,"maxRequest reached")},setTimeout(function(){e()},50)},abort:function(){s&&s.clean&&s.clean()}}).open()}function k(e,t){var n=t;if("polling"===e.transport)return n;if(e.enableProtocol&&e.firstMessage&&0!==ee.util.trim(t).length){var r=e.trackMessageLength?1:0,o=t.split(e.messageDelimiter);if(o.length<=r+1)return n;if(e.firstMessage=!1,e.uuid=ee.util.trim(o[r]),o.length<=r+2&&ee.util.log("error",["Protocol data not sent by the server. If you enable protocol on client side be sure to install JavascriptProtocol interceptor on server side.Also note that atmosphere-runtime 2.2+ should be used."]),c=parseInt(ee.util.trim(o[r+1]),10),m=o[r+2],"long-polling"!==e.transport&&L(e),re=e.uuid,n="",r=e.trackMessageLength?4:3,o.length>r+1)for(var s=r;s<o.length;s++)n+=o[s],s+1!==o.length&&(n+=e.messageDelimiter);0!==e.ackInterval&&setTimeout(function(){W("...ACK...")},e.ackInterval)}else e.enableProtocol&&e.firstMessage&&ee.util.browser.msie&&+ee.util.browser.version.split(".")[0]<10?ee.util.log(d.logLevel,["Receiving unexpected data from IE"]):L(e);return n}function A(e){clearTimeout(e.id),0<e.timeout&&"polling"!==e.transport&&(e.id=setTimeout(function(){p.closedByClientTimeout=!0,p.state="closedByClient",p.responseBody="",p.status=408,p.messages=[],Z(),T(),O()},e.timeout))}function M(e,t){O(),clearTimeout(d.id),p.state="error",p.reasonPhrase=t,p.responseBody="",p.status=e,p.messages=[],Z()}function j(e,t,n){if(0===(e=k(t,e)).length)return!0;if(n.responseBody=e,t.trackMessageLength){var r=[],o=(e=n.partialMessage+e).indexOf(t.messageDelimiter);if(-1!=o){for(;-1!==o;){var s=e.substring(0,o),i=+s;if(isNaN(i))throw n.partialMessage="",new Error('message length "'+s+'" is not a number');(o+=t.messageDelimiter.length)+i>e.length?o=-1:(r.push(e.substring(o,o+i)),o=(e=e.substring(o+i,e.length)).indexOf(t.messageDelimiter))}return n.partialMessage=e,0!==r.length?(n.responseBody=r.join(t.messageDelimiter),n.messages=r,!1):(n.responseBody="",n.messages=[],!0)}}return n.responseBody=e,!(n.messages=[e])}function x(e){ee.util.log(d.logLevel,[e]),"undefined"!=typeof d.onTransportFailure?d.onTransportFailure(e,d):"undefined"!=typeof ee.util.onTransportFailure&&ee.util.onTransportFailure(e,d),d.transport=d.fallbackTransport;var t=-1===d.connectTimeout?0:d.connectTimeout;d.reconnect&&"none"!==d.transport||null==d.transport?(d.method=d.fallbackMethod,p.transport=d.fallbackTransport,d.fallbackTransport="none",0<t?d.reconnectId=setTimeout(function(){I()},t):I()):M(500,"Unable to reconnect with fallback transport")}function B(r,o){var s=d;return null!=r&&void 0!==r&&(s=r),null==o&&(o=s.url),s.attachHeadersAsQueryString&&(-1!==o.indexOf("X-Atmosphere-Framework")||(o+=-1!==o.indexOf("?")?"&":"?",o+="X-Atmosphere-tracking-id="+s.uuid,o+="&X-Atmosphere-Framework="+ee.version,o+="&X-Atmosphere-Transport="+s.transport,s.trackMessageLength&&(o+="&X-Atmosphere-TrackMessageSize=true"),null!==s.heartbeat&&null!==s.heartbeat.server&&(o+="&X-Heartbeat-Server="+s.heartbeat.server),""!==s.contentType&&(o+="&Content-Type="+("websocket"===s.transport?s.contentType:encodeURIComponent(s.contentType))),s.enableProtocol&&(o+="&X-atmo-protocol=true"),ee.util.each(s.headers,function(e,t){var n=ee.util.isFunction(t)?t.call(this,s,r,p):t;null!=n&&(o+="&"+encodeURIComponent(e)+"="+encodeURIComponent(n))}))),o}function L(e){if(e.isOpen)if(e.isReopen)e.isReopen=!1,R("re-opening",e.transport,e);else{if("messageReceived"!==p.state||"jsonp"!==e.transport&&"long-polling"!==e.transport)return;(t=p).state="openAfterResume",K(t),t.state="messageReceived"}else e.isOpen=!0,R("opening",e.transport,e);var t;!function(t){null!=t.heartbeatTimer&&clearTimeout(t.heartbeatTimer);if(!isNaN(c)&&0<c){t.heartbeatTimer=setTimeout(function e(){v("debug")&&ee.util.debug("Sending heartbeat");W(m),t.heartbeatTimer=setTimeout(e,c)},c)}}(e)}function U(l){var u=d;if(null==l&&void 0===l||(u=l),u.lastIndex=0,u.readyState=0,"jsonp"===u.transport||u.enableXDR&&ee.util.checkCORSSupport())N(u);else{if(ee.util.browser.msie&&+ee.util.browser.version.split(".")[0]<10){if("streaming"===u.transport)return void(u.enableXDR&&window.XDomainRequest?q(u):H(u));if(u.enableXDR&&window.XDomainRequest)return void q(u)}var t=function(e){if(u.lastIndex=0,h++,e||u.reconnect&&h<=u.maxReconnectOnClose){var t=e?0:l.reconnectInterval;p.ffTryingReconnect=!0,R("re-connecting",l.transport,l),P(c,u,t)}else M(0,"maxReconnectOnClose reached")},f=function(e){ee._beforeUnloadState?(ee.util.debug(new Date+" Atmosphere: reconnectF: execution delayed due to _beforeUnloadState flag"),setTimeout(function(){t(e)},5e3)):t(e)};if(u.force||u.reconnect&&(-1===u.maxRequest||u.requestCount++<u.maxRequest)){u.force=!1;var c=ee.util.xhr();c.hasData=!1,function(r,o,s){var e=o.url;null!=o.dispatchUrl&&"POST"===o.method&&(e+=o.dispatchUrl);e=B(o,e),e=ee.util.prepareURL(e),s&&(r.open(o.method,e,o.async),0<o.connectTimeout&&(o.id=setTimeout(function(){0===o.requestCount&&(O(),z("Connect timeout","closed",200,o.transport))},o.connectTimeout)));d.withCredentials&&"websocket"!==d.transport&&"withCredentials"in r&&(r.withCredentials=!0);d.dropHeaders||(r.setRequestHeader("X-Atmosphere-Framework",ee.version),r.setRequestHeader("X-Atmosphere-Transport",o.transport),null!==o.heartbeat&&null!==o.heartbeat.server&&r.setRequestHeader("X-Heartbeat-Server",r.heartbeat.server),o.trackMessageLength&&r.setRequestHeader("X-Atmosphere-TrackMessageSize","true"),r.setRequestHeader("X-Atmosphere-tracking-id",o.uuid),ee.util.each(o.headers,function(e,t){var n=ee.util.isFunction(t)?t.call(this,r,o,s,p):t;null!=n&&r.setRequestHeader(e,n)}));""!==o.contentType&&r.setRequestHeader("Content-Type",o.contentType)}(c,u,!0),u.suspend&&(n=c),"polling"!==u.transport&&(p.transport=u.transport,c.onabort=function(){_("ajaxrequest.onabort"),$(!0)},c.onerror=function(){_("ajaxrequest.onerror"),p.error=!0,p.ffTryingReconnect=!0;try{p.status=XMLHttpRequest.status}catch(e){p.status=500}p.status||(p.status=500),p.errorHandled||(O(),f(!1))}),c.onreadystatechange=function(){if(_("ajaxRequest.onreadystatechange, new state: "+c.readyState),g)_("onreadystatechange has been ignored due to _abortingConnection flag");else{p.error=null;var n=!1,e=!1;if("streaming"===u.transport&&2<u.readyState&&4===c.readyState)return O(),void f(!1);if(u.readyState=c.readyState,"streaming"===u.transport&&3<=c.readyState?e=!0:"long-polling"===u.transport&&4===c.readyState&&(e=!0),A(d),"polling"!==u.transport){var t=200;if(4===c.readyState&&(t=1e3<c.status?0:c.status),!u.reconnectOnServerError&&300<=t&&t<600)return void M(t,c.statusText);if(300<=t||0===t)return p.errorHandled=!0,O(),void f(!1);u.enableProtocol&&l.firstMessage||2!==c.readyState||(ee.util.browser.mozilla&&p.ffTryingReconnect?(p.ffTryingReconnect=!1,setTimeout(function(){p.ffTryingReconnect||L(u)},500)):L(u))}else 4===c.readyState&&(e=!0);if(e){var r=c.responseText;if(p.errorHandled=!1,"long-polling"===u.transport&&0===ee.util.trim(r).length)return void(c.hasData?c.hasData=!1:f(!0));if(c.hasData=!0,Y(c,d),"streaming"===u.transport)if(ee.util.browser.opera)ee.util.iterate(function(){if(500!==p.status&&c.responseText.length>u.lastIndex){try{p.status=c.status,p.headers=ee.util.parseHeaders(c.getAllResponseHeaders()),Y(c,d)}catch(t){p.status=404}A(d),p.state="messageReceived";var e=c.responseText.substring(u.lastIndex);if(u.lastIndex=c.responseText.length,(n=j(e,u,p))||Z(),S(c,u))return void D(c,u)}else if(400<p.status)return u.lastIndex=c.responseText.length,!1},0);else{var o=r.substring(u.lastIndex,r.length);if(n=j(o,u,p),u.lastIndex=r.length,n)return}else n=j(r,u,p);var s=S(c,u);try{p.status=c.status,p.headers=ee.util.parseHeaders(c.getAllResponseHeaders()),Y(c,u)}catch(a){p.status=404}u.suspend?p.state=0===p.status?"closed":"messageReceived":p.state="messagePublished";var i=!s&&"streaming"!==l.transport&&"polling"!==l.transport;i&&!u.executeCallbackBeforeReconnect&&P(c,u,u.pollingInterval),0===p.responseBody.length||n||Z(),i&&u.executeCallbackBeforeReconnect&&P(c,u,u.pollingInterval),s&&D(c,u)}}};try{c.send(u.data),o=!0}catch(e){ee.util.log(u.logLevel,["Unable to connect to "+u.url]),M(0,e)}}else"debug"===u.logLevel&&ee.util.log(u.logLevel,["Max re-connection reached."]),M(0,"maxRequest reached")}}function D(e,t){p.messages=[],t.isReopen=!0,E(),g=!1,P(e,t,500)}function P(e,t,n){if(!p.closedByClientTimeout&&(t.reconnect||t.suspend&&o)){var r=0;e&&1<e.readyState&&(r=1e3<e.status?0:e.status),p.status=0===r?204:r,p.reason=0===r?"Server resumed the connection or down.":"OK",clearTimeout(t.id),t.reconnectId&&(clearTimeout(t.reconnectId),delete t.reconnectId),0<n?d.reconnectId=setTimeout(function(){U(t)},n):U(t)}}function q(e){"polling"!==e.transport?(r=F(e)).open():F(e).open()}function F(e){var r=d;null!=e&&void 0!==e&&(r=e);var o=r.transport,s=0,t=new window.XDomainRequest,i=function(){"long-polling"===r.transport&&r.reconnect&&(-1===r.maxRequest||r.requestCount++<r.maxRequest)&&(t.status=200,q(r))},n=r.rewriteURL||function(e){var t=/(?:^|;\s*)(JSESSIONID|PHPSESSID)=([^;]*)/.exec(document.cookie);switch(t&&t[1]){case"JSESSIONID":return e.replace(/;jsessionid=[^\?]*|(\?)|$/,";jsessionid="+t[2]+"$1");case"PHPSESSID":return e.replace(/\?PHPSESSID=[^&]*&?|\?|$/,"?PHPSESSID="+t[2]+"&").replace(/&$/,"")}return e};t.onprogress=function(){a(t)},t.onerror=function(){"polling"!==r.transport&&(O(),h++<r.maxReconnectOnClose?0<r.reconnectInterval?r.reconnectId=setTimeout(function(){R("re-connecting",e.transport,e),q(r)},r.reconnectInterval):(R("re-connecting",e.transport,e),q(r)):M(0,"maxReconnectOnClose reached"))},t.onload=function(){};var a=function(e){clearTimeout(r.id);var t=e.responseText;if(t=t.substring(s),s+=t.length,"polling"!==o){A(r);var n=j(t,r,p);if("long-polling"===o&&0===ee.util.trim(t).length)return;r.executeCallbackBeforeReconnect&&i(),n||z(p.responseBody,"messageReceived",200,o),r.executeCallbackBeforeReconnect||i()}};return{open:function(){var e=r.url;null!=r.dispatchUrl&&(e+=r.dispatchUrl),e=B(r,e),t.open(r.method,n(e)),"GET"===r.method?t.send():t.send(r.data),0<r.connectTimeout&&(r.id=setTimeout(function(){0===r.requestCount&&(O(),z("Connect timeout","closed",200,r.transport))},r.connectTimeout))},close:function(){t.abort()}}}function H(e){(r=function(e){var s,i=d;null!=e&&void 0!==e&&(i=e);var a=new window.ActiveXObject("htmlfile");a.open(),a.close();var t=i.url;null!=i.dispatchUrl&&(t+=i.dispatchUrl);"polling"!==i.transport&&(p.transport=i.transport);return{open:function(){var e=a.createElement("iframe");t=B(i),""!==i.data&&(t+="&X-Atmosphere-Post-Body="+encodeURIComponent(i.data)),t=ee.util.prepareURL(t),e.src=t,a.body.appendChild(e);var o=e.contentDocument||e.contentWindow.document;s=ee.util.iterate(function(){try{if(!o.firstChild)return;var n=o.body?o.body.lastChild:o;n.omgThisIsBroken;if(!o.body||!o.body.firstChild||"pre"!==o.body.firstChild.nodeName.toLowerCase()){var e=o.head||o.getElementsByTagName("head")[0]||o.documentElement||o,t=o.createElement("script");t.text="document.write('<plaintext>')",e.insertBefore(t,e.firstChild),e.removeChild(t),n=o.body.lastChild}return i.closed&&(i.isReopen=!0),s=ee.util.iterate(function(){var e=function(){var e=n.cloneNode(!0);e.appendChild(o.createTextNode("."));var t=e.innerText;return t=t.substring(0,t.length-1)}();if(e.length>i.lastIndex){A(d),p.status=200,p.error=null,n.innerText="";var t=j(e,i,p);if(t)return"";z(p.responseBody,"messageReceived",200,i.transport)}if(i.lastIndex=0,"complete"===o.readyState)return $(!0),R("re-connecting",i.transport,i),0<i.reconnectInterval?i.reconnectId=setTimeout(function(){H(i)},i.reconnectInterval):H(i),!1},null),!1}catch(r){return p.error=!0,R("re-connecting",i.transport,i),h++<i.maxReconnectOnClose?0<i.reconnectInterval?i.reconnectId=setTimeout(function(){H(i)},i.reconnectInterval):H(i):M(0,"maxReconnectOnClose reached"),a.execCommand("Stop"),a.close(),!1}})},close:function(){s&&s(),a.execCommand("Stop"),$(!0)}}}(e)).open()}function W(e){var t;null!=b?(t=e,b.send(t)):null!=n||null!=i?X(e):null!=r?function(e){if(d.enableXDR&&ee.util.checkCORSSupport()){var t=G(e);t.reconnect=!1,N(t)}else X(e)}(e):null!=f?X(e):null!=s?function(e){var t,n=ee.util.isBinary(e)?e:J(e);try{if(t=null!=d.dispatchUrl?d.webSocketPathDelimiter+d.dispatchUrl+d.webSocketPathDelimiter+n:n,!s.canSendMessage)return ee.util.error("WebSocket not connected.");s.send(t)}catch(r){s.onclose=function(e){},O(),x("Websocket failed. Downgrading to "+d.fallbackTransport+" and resending "+e),X(e)}}(e):(M(0,"No suspended connection available"),ee.util.error("No suspended connection available. Make sure atmosphere.subscribe has been called and request.onOpen invoked before trying to push data"))}function X(e){U(G(e))}function J(e){var t=e;return"object"===(void 0===t?"undefined":oe(t))&&(t=e.data),t}function G(e){var t=J(e),n={connected:!1,timeout:6e4,method:"POST",url:d.url,contentType:d.contentType,headers:d.headers,reconnect:!0,callback:null,data:t,suspend:!1,maxRequest:-1,logLevel:"info",requestCount:0,withCredentials:d.withCredentials,async:d.async,transport:"polling",isOpen:!0,attachHeadersAsQueryString:!0,enableXDR:d.enableXDR,uuid:d.uuid,dispatchUrl:d.dispatchUrl,enableProtocol:!1,messageDelimiter:"|",trackMessageLength:d.trackMessageLength,maxReconnectOnClose:d.maxReconnectOnClose,heartbeatTimer:d.heartbeatTimer,heartbeat:d.heartbeat};return"object"===(void 0===e?"undefined":oe(e))&&(n=ee.util.extend(n,e)),n}function V(e){var t=ee.util.parseJSON(e);t.id!==w&&("undefined"!=typeof d.onLocalMessage?d.onLocalMessage(t.event):"undefined"!=typeof ee.util.onLocalMessage&&ee.util.onLocalMessage(t.event))}function z(e,t,n,r){p.responseBody=e,p.transport=r,p.status=n,p.state=t,Z()}function Y(e,t){if(t.readResponsesHeaders)try{var n=e.getResponseHeader("X-Atmosphere-tracking-id");n&&null!=n&&(t.uuid=n.split(" ").pop())}catch(r){}else t.enableProtocol||(t.uuid=w)}function K(e){Q(e,d),Q(e,ee.util)}function Q(e,t){switch(e.state){case"messageReceived":_("Firing onMessage"),h=0,"undefined"!=typeof t.onMessage&&t.onMessage(e),"undefined"!=typeof t.onmessage&&t.onmessage(e);break;case"error":_("Firing onError, reasonPhrase: "+("undefined"!=typeof e.reasonPhrase?e.reasonPhrase:"n/a")),"undefined"!=typeof t.onError&&t.onError(e),"undefined"!=typeof t.onerror&&t.onerror(e);break;case"opening":delete d.closed,_("Firing onOpen"),"undefined"!=typeof t.onOpen&&t.onOpen(e),"undefined"!=typeof t.onopen&&t.onopen(e);break;case"messagePublished":_("Firing messagePublished"),"undefined"!=typeof t.onMessagePublished&&t.onMessagePublished(e);break;case"re-connecting":_("Firing onReconnect"),"undefined"!=typeof t.onReconnect&&t.onReconnect(d,e);break;case"closedByClient":_("Firing closedByClient"),"undefined"!=typeof t.onClientTimeout&&t.onClientTimeout(d);break;case"re-opening":delete d.closed,_("Firing onReopen"),"undefined"!=typeof t.onReopen&&t.onReopen(d,e);break;case"fail-to-reconnect":_("Firing onFailureToReconnect"),"undefined"!=typeof t.onFailureToReconnect&&t.onFailureToReconnect(d,e);break;case"unsubscribe":case"closed":"undefined"!=typeof d.closed&&d.closed?_("Request already closed, not firing onClose ("+e.state+" case)"):(_("Firing onClose ("+e.state+" case)"),"undefined"!=typeof t.onClose&&t.onClose(e),"undefined"!=typeof t.onclose&&t.onclose(e)),d.closed=!0;break;case"openAfterResume":"undefined"!=typeof t.onOpenAfterResume&&t.onOpenAfterResume(d)}}function $(e){"closed"!==p.state&&(p.state="closed",p.responseBody="",p.messages=[],p.status=e?200:501,Z())}function Z(){var e=function(e,t){t(p)};null==b&&null!=y&&y(p.responseBody),d.reconnect=d.mrequest;for(var t="string"==typeof p.responseBody,n=t&&d.trackMessageLength?0<p.messages.length?p.messages:[""]:new Array(p.responseBody),r=0;r<n.length;r++)if(!(1<n.length&&0===n[r].length||(p.responseBody=t?ee.util.trim(n[r]):n[r],null==b&&null!=y&&y(p.responseBody),(0===p.responseBody.length||t&&m===p.responseBody)&&"messageReceived"===p.state))){if(K(p),0<ne.length){v("debug")&&ee.util.debug("Invoking "+ne.length+" global callbacks: "+p.state);try{ee.util.each(ne,e)}catch(o){ee.util.log(d.logLevel,["Callback exception"+o])}}if("function"==typeof d.callback){v("debug")&&ee.util.debug("Invoking request callbacks");try{d.callback(p)}catch(o){ee.util.log(d.logLevel,["Callback exception"+o])}}}}C(e),this.subscribe=function(e){C(e),I()},this.execute=function(){I()},this.close=function(){E()},this.disconnect=function(){T()},this.getUrl=function(){return d.url},this.push=function(e,t){if(null!=t){var n=d.dispatchUrl;d.dispatchUrl=t,W(e),d.dispatchUrl=n}else W(e)},this.getUUID=function(){return d.uuid},this.pushLocal=function(e){!function(e){if(0!==e.length)try{b?b.localSend(e):a&&a.signal("localMessage",ee.util.stringifyJSON({id:w,event:e}))}catch(t){ee.util.error(t)}}(e)},this.enableProtocol=function(e){return d.enableProtocol},this.init=function(){t()},this.request=d,this.response=p}}).subscribe=function(e,t,n){"function"==typeof t&&ee.addCallback(t),"string"!=typeof e?n=e:n.url=e,re=void 0!==n&&"undefined"!=typeof n.uuid?n.uuid:0;var r=new ee.AtmosphereRequest(n);return r.execute(),o[o.length]=r},ee.unsubscribe=function(){if(0<o.length)for(var e=[].concat(o),t=0;t<e.length;t++){var n=e[t];n.close(),clearTimeout(n.response.request.id),n.heartbeatTimer&&clearTimeout(n.heartbeatTimer)}o=[],ne=[]},ee.unsubscribeUrl=function(e){var t=-1;if(0<o.length)for(var n=0;n<o.length;n++){var r=o[n];if(r.getUrl()===e){r.close(),clearTimeout(r.response.request.id),r.heartbeatTimer&&clearTimeout(r.heartbeatTimer),t=n;break}}0<=t&&o.splice(t,1)},ee.addCallback=function(e){-1===ee.util.inArray(e,ne)&&ne.push(e)},ee.removeCallback=function(e){var t=ee.util.inArray(e,ne);-1!==t&&ne.splice(t,1)},ee.util={browser:{},parseHeaders:function(e){for(var t,n=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,r={};t=n.exec(e);)r[t[1]]=t[2];return r},now:function(){return(new Date).getTime()},isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},inArray:function(e,t){if(!Array.prototype.indexOf){for(var n=t.length,r=0;r<n;++r)if(t[r]===e)return r;return-1}return t.indexOf(e)},isBinary:function(e){return/^\[object\s(?:Blob|ArrayBuffer|.+Array)\]$/.test(Object.prototype.toString.call(e))},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)},getAbsoluteURL:function(e){if("undefined"==typeof document.createElement)return e;var t=document.createElement("div");return t.innerHTML='<a href="'+e+'"/>',encodeURI(decodeURI(t.firstChild.href))},prepareURL:function(e){var t=ee.util.now(),n=e.replace(/([?&])_=[^&]*/,"$1_="+t);return n+(n===e?(/\?/.test(e)?"&":"?")+"_="+t:"")},trim:function(e){return String.prototype.trim?e.toString().trim():e.toString().replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g,"").replace(/\s+/g," ")},param:function(e){var t,n=[];function r(e,t){t=ee.util.isFunction(t)?t():null==t?"":t,n.push(encodeURIComponent(e)+"="+encodeURIComponent(t))}function o(n,e){var t;if(ee.util.isArray(e))ee.util.each(e,function(e,t){/\[\]$/.test(n)?r(n,t):o(n+"["+("object"===(void 0===t?"undefined":oe(t))?e:"")+"]",t)});else if("[object Object]"===Object.prototype.toString.call(e))for(t in e)o(n+"["+t+"]",e[t]);else r(n,e)}for(t in e)o(t,e[t]);return n.join("&").replace(/%20/g,"+")},storage:function(){try{return!(!window.localStorage||!window.StorageEvent)}catch(e){return!1}},iterate:function(t,n){var r;return n=n||0,function e(){r=setTimeout(function(){!1!==t()&&e()},n)}(),function(){clearTimeout(r)}},each:function(e,t,n){if(e){var r=0,o=e.length,s=ee.util.isArray(e);if(n){if(s)for(;r<o&&!1!==t.apply(e[r],n);r++);else for(r in e)if(!1===t.apply(e[r],n))break}else if(s)for(;r<o&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e}},extend:function(e){var t,n,r;for(t=1;t<arguments.length;t++)if(null!=(n=arguments[t]))for(r in n)e[r]=n[r];return e},on:function(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)},off:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent&&e.detachEvent("on"+t,n)},log:function(e,t){if(window.console){var n=window.console[e];"function"==typeof n&&n.apply(window.console,t)}},warn:function(){ee.util.log("warn",arguments)},info:function(){ee.util.log("info",arguments)},debug:function(){ee.util.log("debug",arguments)},error:function(){ee.util.log("error",arguments)},xhr:function(){try{return new window.XMLHttpRequest}catch(e){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}},parseJSON:function(e){return e?window.JSON&&window.JSON.parse?window.JSON.parse(e):new Function("return "+e)():null},stringifyJSON:function(t){var n=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,r={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function u(e){return'"'+e.replace(n,function(e){var t=r[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"'}function f(e){return e<10?"0"+e:e}return window.JSON&&window.JSON.stringify?window.JSON.stringify(t):function e(t,n){var r,o,s,i,a=n[t],l=void 0===a?"undefined":oe(a);switch(a&&"object"===(void 0===a?"undefined":oe(a))&&"function"==typeof a.toJSON&&(l=void 0===(a=a.toJSON(t))?"undefined":oe(a)),l){case"string":return u(a);case"number":return isFinite(a)?String(a):"null";case"boolean":return String(a);case"object":if(!a)return"null";switch(Object.prototype.toString.call(a)){case"[object Date]":return isFinite(a.valueOf())?'"'+a.getUTCFullYear()+"-"+f(a.getUTCMonth()+1)+"-"+f(a.getUTCDate())+"T"+f(a.getUTCHours())+":"+f(a.getUTCMinutes())+":"+f(a.getUTCSeconds())+'Z"':"null";case"[object Array]":for(s=a.length,i=[],r=0;r<s;r++)i.push(e(r,a)||"null");return"["+i.join(",")+"]";default:for(r in i=[],a)c.call(a,r)&&(o=e(r,a))&&i.push(u(r)+":"+o);return"{"+i.join(",")+"}"}}}("",{"":t})},checkCORSSupport:function(){if(ee.util.browser.msie&&!window.XDomainRequest&&+ee.util.browser.version.split(".")[0]<11)return!0;if(ee.util.browser.opera&&+ee.util.browser.version.split(".")<12)return!0;if("KreaTVWebKit/531"===ee.util.trim(navigator.userAgent).slice(0,16))return!0;if("kreatel"===ee.util.trim(navigator.userAgent).slice(-7).toLowerCase())return!0;var e=navigator.userAgent.toLowerCase().match(/.+android ([0-9]{1,2})/i),t=parseInt(e&&e[0]||-1,10);return!isNaN(t)&&-1<t&&t<3}},ee.util.now(),e=navigator.userAgent.toLowerCase(),"safari"===(t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||/(trident)(?:.*? rv:([\w.]+)|)/.exec(e)||e.indexOf("android")<0&&/version\/(.+) (safari)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[])[2]&&(t[2]=t[1],t[1]="safari"),ee.util.browser[t[1]||""]=!0,ee.util.browser.version=t[2]||"0",ee.util.browser.vmajor=ee.util.browser.version.split(".")[0],ee.util.browser.trident&&(ee.util.browser.msie=!0),(ee.util.browser.msie||ee.util.browser.mozilla&&1==+ee.util.browser.version.split(".")[0])&&(ee.util.storage=!1),ee.callbacks={unload:function(){ee.util.debug(new Date+" Atmosphere: unload event"),ee.unsubscribe()},beforeUnload:function(){ee.util.debug(new Date+" Atmosphere: beforeunload event"),ee._beforeUnloadState=!0,setTimeout(function(){ee.util.debug(new Date+" Atmosphere: beforeunload event timeout reached. Reset _beforeUnloadState flag"),ee._beforeUnloadState=!1},5e3)},offline:function(){if(ee.util.debug(new Date+" Atmosphere: offline event"),te=!0,0<o.length)for(var e=[].concat(o),t=0;t<e.length;t++){var n=e[t];n.request.handleOnlineOffline&&(n.close(),clearTimeout(n.response.request.id),n.heartbeatTimer&&clearTimeout(n.heartbeatTimer))}},online:function(){if(ee.util.debug(new Date+" Atmosphere: online event"),0<o.length)for(var e=0;e<o.length;e++)o[e].request.handleOnlineOffline&&(o[e].init(),o[e].execute());te=!1}},ee.bindEvents=function(){ee.util.on(window,"unload",ee.callbacks.unload),ee.util.on(window,"beforeunload",ee.callbacks.beforeUnload),ee.util.on(window,"offline",ee.callbacks.offline),ee.util.on(window,"online",ee.callbacks.online)},ee.unbindEvents=function(){ee.util.off(window,"unload",ee.callbacks.unload),ee.util.off(window,"beforeunload",ee.callbacks.beforeUnload),ee.util.off(window,"offline",ee.callbacks.offline),ee.util.off(window,"online",ee.callbacks.online)},ee.bindEvents(),ee},void 0!==h?p.exports=d():c.atmosphere=d()}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/atmosphere.js/lib/atmosphere.js","/lib/atmosphere.js/lib")},{_process:43,buffer:34,timers:64}],11:[function(y,e,b){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";b.__esModule=!0,b.asCredentials=function(e){var t=Object.keys(e);{if((0,c["default"])(t,["sid"]))return new h(e.sid);if((0,c["default"])(t,["wmid","token"]))return new g(e.wmid,e.token);if((0,c["default"])(t,["wmid"]))return new m(e.wmid);throw new Error("Misconfigured credentials, should be one of {sid}, {wmid,token}, or {wmid}")}};d(y("./EnduserAuthService.js"));var c=d(y("array-equal"));function d(e){return e&&e.__esModule?e:{"default":e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var h=function(){function t(e){p(this,t),this.sid=e}return t.prototype.getHeaders=function(){return{"X-Stream-Sid":this.sid}},t}(),m=function(){function t(e){p(this,t),this.wmid=e}return t.prototype.getHeaders=function(){return{"X-Stream-Wmid":this.wmid}},t}(),g=function(){function n(e,t){p(this,n),this.wmid=e,this.token=t}return n.prototype.getHeaders=function(){return{"X-Stream-Wmid":this.wmid,Authorization:this.token}},n}()}).call(this,y("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},y("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],y("timers").setImmediate,y("timers").clearImmediate,"/lib/auth/AuthService.js","/lib/auth")},{"./EnduserAuthService.js":12,_process:43,"array-equal":30,buffer:34,timers:64}],12:[function(e,t,h){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";h.__esModule=!0;var c="/g/authenticate/v0",d="/p/authenticate/v0/legacy=false",p=function(){function r(e,t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),null==e)throw new Error("AJAX cannot be null.");var n=t.credentials;if(!n.wmid||!n.username||!n.password)throw new Error("Cannot login if any of sid, username or password is empty.");this.http=e,this.host=t.host||"app.quotemedia.com",this.credentials=n,this.method=t.method||"GET"}return r.prototype.login=function(e){"POST"==this.method?this.login_POST(e):this.login_GET(e)},r.prototype.login_POST=function(e){var t=this.host+d,n={wmId:this.credentials.wmid,username:this.credentials.username,password:this.credentials.password};this.http({url:t,type:"POST",contentType:"application/json",data:JSON.stringify(n),success:this.handleSuccess(e),failure:this.handleFailure(e)})},r.prototype.login_GET=function(e){var t=this.host+c;t+="/"+this.credentials.wmid+"/"+this.credentials.username+"/"+this.credentials.password+"/",this.http({url:t,dataType:"json",timeout:5e3,success:this.handleSuccess(e),failure:this.handleFailure(e)})},r.prototype.handleSuccess=function(t){return function(e){e.code&&"Ok"===e.code.name?t(null,e.sid):t(new Error("Login failed: "+e.code+", "+e.message))}},r.prototype.handleFailure=function(e){return function(){e(new Error("Auth HTTP error"))}},r}();h["default"]=p}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/auth/EnduserAuthService.js","/lib/auth")},{_process:43,buffer:34,timers:64}],13:[function(h,m,e){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";var c=h("./streamer-api.js"),d=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}}(h("./streamer-utils.js"));var p={Formatter:function(){this.formatters={},this.formatters[p.Formatter._UNKOWNTYPE]=this._fmtunknown,this.formatters[c.messages.MessageTypeNames.ctrl.HEARTBEAT]=this._fmtheartbeat,this.formatters[c.messages.MessageTypeNames.ctrl.SUBSCRIBE]=this._fmtsubscribe,this.formatters[c.messages.MessageTypeNames.ctrl.SUBSCRIBE_RESPONSE]=this._fmtsubscriberesponse,this.formatters[c.messages.MessageTypeNames.ctrl.UNSUBSCRIBE_RESPONSE]=this._fmtunsubscriberesponse,this.formatters[c.messages.MessageTypeNames.ctrl.CONNECT_RESPONSE]=this._fmtconnectresponse,this.formatters[c.messages.MessageTypeNames.ctrl.CONNECTION_CLOSE]=this._fmtconnectionclose,this.formatters[c.messages.MessageTypeNames.ctrl.FLOW]=this._fmtflowmessage,this.formatters[c.messages.MessageTypeNames.ctrl.SLOW_CONNECTION]=this._fmtslowconnection,this.formatters[c.messages.MessageTypeNames.data.QUOTE]=this._fmtquote,this.formatters[c.messages.MessageTypeNames.data.PRICEDATA]=this._fmtpricedata,this.formatters[c.messages.MessageTypeNames.data.TRADE]=this._fmttrade,this.formatters[c.messages.MessageTypeNames.data.INTERVAL]=this._fmtinterval,this.formatters[c.messages.MessageTypeNames.data.NETHOUSEPOSITION]=this._fmtnethouseposition,this.formatters[c.messages.MessageTypeNames.data.MMQUOTE]=this._fmtmmquote,this.formatters[c.messages.MessageTypeNames.data.BOOKORDER]=this._fmtbookorder,this.formatters[c.messages.MessageTypeNames.data.PURGEBOOK]=this._fmtpurgebook,this.formatters[c.messages.MessageTypeNames.data.BOOKDELETE]=this._fmtbookdelete,this.formatters[c.messages.MessageTypeNames.data.SYMBOLINFO]=this._fmtsymbolinfo,this.formatters[c.messages.MessageTypeNames.data.SYMBOLSTATUS]=this._fmtsymbolstatus,this.formatters[c.messages.MessageTypeNames.data.DERIVATIVEINFO]=this._fmtderivativeinfo,this.formatters[c.messages.MessageTypeNames.data.LASTSALE]=this._fmtlastsale,this.formatters[c.messages.MessageTypeNames.data.LIMITUPLIMITDOWN]=this._fmtlimituplimitdown}};p.Formatter._UNKOWNTYPE="__UNKNOWN__",p.Formatter.prototype.fmt=function(e){var t=d.messagetype(e);null==t&&(t=p.Formatter._UNKOWNTYPE);var n=this.formatters[t];return null==n&&(n=p.Formatter._UNKOWNTYPE),n.call(this,e)},p.Formatter.prototype._fmtunknown=function(e){return null==e?"null":e["@T"]?d.getMessageName(e):e.toString()},p.Formatter.prototype._fmtquote=function(e){var t=new p.StringBuilder;return t.append("Q"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.indicator),t.sep(),t.append(e.sharesPerSizeUnit),t.sep(),t.append(e.askPrice),t.sep(),t.append(e.askSize),t.sep(),t.append(e.askExcode),t.sep(),t.append(e.askCondition),t.sep(),t.append(e.bidPrice),t.sep(),t.append(e.bidSize),t.sep(),t.append(e.bidExcode),t.sep(),t.append(e.bidCondition),t.toString()},p.Formatter.prototype._fmtpricedata=function(e){var t=new p.StringBuilder;return t.append("P"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.last),t.sep(),t.append(e.lastTradeSize),t.sep(),t.append(e.change),t.sep(),t.append(e.percentChange),t.sep(),t.append(e.tick),t.sep(),t.append(e.tradeCount),t.sep(),t.append(e.close),t.sep(),t.append(e.previousClose),t.sep(),t.append(e.open),t.sep(),t.append(e.high),t.sep(),t.append(e.annualHigh),t.sep(),t.append(e.low),t.sep(),t.append(e.annualLow),t.sep(),t.datetime(e.lastTradeTime),t.sep(),t.append(e.accumulatedPrice),t.sep(),t.append(e.accumulatedVolume),t.sep(),t.append(e.accumulatedTradeValue),t.sep(),t.append(e.twap),t.sep(),t.append(e.vwap),t.sep(),t.datetime(e.preMarketTradeTime),t.sep(),t.append(e.preMarketLast),t.sep(),t.append(e.preMarketVolume),t.sep(),t.append(e.preMarketChange),t.sep(),t.append(e.preMarketPercentChange),t.sep(),t.datetime(e.postMarketTradeTime),t.sep(),t.append(e.postMarketLast),t.sep(),t.append(e.postMarketVolume),t.sep(),t.append(e.postMarketChange),t.sep(),t.append(e.postMarketPercentChange),t.toString()},p.Formatter.prototype._fmtlastsale=function(e){var t=new p.StringBuilder;return t.append("LS"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.last),t.sep(),t.append(e.change),t.sep(),t.append(e.percentChange),t.sep(),t.append(e.accumulatedVolume),t.sep(),t.append(e.tick),t.toString()},p.Formatter.prototype._fmtlimituplimitdown=function(e){var t=new p.StringBuilder;return t.append("LULD"),t.sep(),t.append(e.symbol),t.sep(),t.datetime(e.effectiveTime),t.sep(),t.append(e.lowerLimit),t.sep(),t.append(e.upperLimit),t.sep(),t.append(e.bidNotExecutable),t.sep(),t.append(e.askNotExecutable),t.toString()},p.Formatter.prototype._fmttrade=function(e){var t=new p.StringBuilder;return t.append("T"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.excode),t.sep(),t.append(e.sequenceNumber),t.sep(),t.append(e.accumulatedVolume),t.sep(),t.append(e.price),t.sep(),t.append(e.size),t.sep(),t.append(e.tick),t.sep(),t.append(e.rangeIndicator),t.sep(),t.append(e.matchID),t.sep(),t.append(e.buyerID),t.sep(),t.append(e.sellerID),t.sep(),t.append(e.vwap),t.toString()},p.Formatter.prototype._fmtinterval=function(e){var t=new p.StringBuilder;return t.append("I"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.last),t.sep(),t.datetime(e.lastTime),t.sep(),t.append(e.open),t.sep(),t.datetime(e.openTime),t.sep(),t.append(e.high),t.sep(),t.append(e.low),t.sep(),t.datetime(e.startTime),t.sep(),t.append(e.tradeValue),t.sep(),t.append(e.volume),t.sep(),t.append(e.vwap),t.toString()},p.Formatter.prototype._fmtnethouseposition=function(e){var t=new p.StringBuilder;return t.append("NHP"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.marketMakerID),t.sep(),t.append(e.buyValue),t.sep(),t.append(e.buyVolume),t.sep(),t.append(e.buyBlockTransactions),t.sep(),t.append(e.buyBlockValue),t.sep(),t.append(e.buyBlockVolume),t.sep(),t.append(e.sellValue),t.sep(),t.append(e.sellVolume),t.sep(),t.append(e.sellBlockTransactions),t.sep(),t.append(e.sellBlockValue),t.sep(),t.append(e.sellBlockVolume),t.toString()},p.Formatter.prototype._fmtmmquote=function(e){var t=new p.StringBuilder;return t.append("MMQ"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.bidPrice),t.sep(),t.append(e.bidSize),t.sep(),t.append(e.bidChange),t.sep(),t.append(e.askPrice),t.sep(),t.append(e.askSize),t.sep(),t.append(e.askChange),t.sep(),t.append(e.indicator),t.sep(),t.append(e.marketMakerID),t.sep(),t.append(e.sharesPerSizeUnit),t.toString()},p.Formatter.prototype._fmtbookorder=function(e){var t=new p.StringBuilder;return t.append("BO"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.orderID),t.sep(),t.append(e.orderReference),t.sep(),t.append(e.marketMakerID),t.sep(),t.append(e.orderSide),t.sep(),t.datetime(e.lastUpdate),t.sep(),t.append(e.price),t.sep(),t.append(e.size),t.sep(),t.append(e.display),t.sep(),t.append(e.orderChangeType),t.toString()},p.Formatter.prototype._fmtpurgebook=function(e){var t=new p.StringBuilder;return t.append("PB"),t.sep(),t.append(e.symbol),t.toString()},p.Formatter.prototype._fmtbookdelete=function(e){var t=new p.StringBuilder;return t.append("BD"),t.sep(),t.datetime(e.timestamp),t.sep(),t.append(e.symbol),t.sep(),t.append(e.orderReference),t.toString()},p.Formatter.prototype._fmtsymbolinfo=function(e){var t=new p.StringBuilder;return t.append("SI"),t.sep(),t.append(e.symbol),t.sep(),t.append(e.excode),t.sep(),t.append(e.instrumentType),t.sep(),t.append(e.currencyId),t.sep(),t.append(e.haltStatus),t.sep(),t.append(e.haltIndicator),t.sep(),t.append(e.regSHOStatus),t.toString()},p.Formatter.prototype._fmtsymbolstatus=function(e){var t=new p.StringBuilder;return t.append("SS"),t.sep(),t.append(e.symbol),t.sep(),t.append(e.haltStatus),t.sep(),t.append(e.haltIndicator),t.sep(),t.append(e.regSHOStatus),t.toString()},p.Formatter.prototype._fmtderivativeinfo=function(e){var t=new p.StringBuilder;return t.append("DI"),t.sep(),t.append(e.symbol),t.sep(),t.append(e.rootSymbol),t.sep(),t.datetime(e.expiration),t.sep(),t.append(e.openInterest),t.sep(),t.datetime(e.delivery),t.sep(),t.append(e.contractSize),t.sep(),t.append(e.callPutIndicator),t.toString()},p.Formatter.prototype._fmtheartbeat=function(e){var t=new p.StringBuilder;return t.append("HEARBEAT"),t.sep(),t.datetime(e.timestamp),t.toString()},p.Formatter.prototype._fmtsubscribe=function(e){var t=new p.StringBuilder;return t.append("SUBSCRIBE"),t.toString()},p.Formatter.prototype._fmtsubscriberesponse=function(e){var t=new p.StringBuilder;return t.append("SUBSCRIBED"),t.sep(),this.__baseresponse(e,t),t.toString()},p.Formatter.prototype._fmtunsubscriberesponse=function(e){var t=new p.StringBuilder;return t.append("UN-SUBSCRIBED"),t.sep(),this.__baseresponse(e,t),t.toString()},p.Formatter.prototype._fmtconnectresponse=function(e){var t=new p.StringBuilder;return t.append("CONNECT"),t.sep(),this.__baseresponse(e,t),t.sep(),t.append(e.version),t.sep(),t.append(e.flowControlCheckInterval),t.sep(),t.append(e.serverInstance),t.sep(),t.append(e.conflationMs),t.toString()},p.Formatter.prototype._fmtconnectionclose=function(e){var t=new p.StringBuilder;return t.append("CLOSE"),t.sep(),t.append(e.code),t.sep(),t.append(e.reason),t.toString()},p.Formatter.prototype._fmtslowconnection=function(e){var t=new p.StringBuilder;return t.append("SLOW"),t.sep(),t.append(e.timesExceeded),t.sep(),t.append(e.maxExceed),t.toString()},p.Formatter.prototype._fmtflowmessage=function(e){var t=new p.StringBuilder;return t.append("FLOW"),t.sep(),t.append(e.sequence),t.toString()},p.Formatter.prototype.__baseresponse=function(e,t){t.append(e.code),t.sep(),t.append(e.reason)},p.StringBuilder=function(){this._str=""},p.StringBuilder.SEP=", ",p.StringBuilder.prototype.append=function(e){this._str+=e},p.StringBuilder.prototype.sep=function(){this.append(p.StringBuilder.SEP)},p.StringBuilder.prototype.datetime=function(e){this._str+=null!=e?""+new Date(e):"null"},p.StringBuilder.prototype.toString=function(){return this._str},p.msgfmt=new p.Formatter,p.format=function(e){return p.msgfmt.fmt(e)},m.exports=p}).call(this,h("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},h("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],h("timers").setImmediate,h("timers").clearImmediate,"/lib/formatting.js","/lib")},{"./streamer-api.js":24,"./streamer-utils.js":26,_process:43,buffer:34,timers:64}],14:[function(m,e,g){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";g.__esModule=!0,g["default"]=function(e){var t=e.url,n=e.success||function(){},r=e.failure||function(){},o=e.type||"GET",s=e.applicationType,i=e.data,a=e.timeout,l=h(e.dataType),u=p();u.onreadystatechange=function(){4===u.readyState&&(200===u.status?n(l(u.responseText)):r(u.status))},s&&u.setRequestHeader("Content-Type",s);u.open(o,t,!0),a&&(u.timeout=a);u.send(i)};var c,d=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new(0,m("xmlhttprequest").XMLHttpRequest)}],p=(c=null,function(){if(null===c){for(c=0;c<d.length;c++)try{return d[c]()}catch(e){}if(c===d.length)throw c=null,new Error("No HTTP implementation found.")}return d[c]()}),h=function(e){switch(e?e.toLowerCase():e){case"json":return JSON.parse;default:return function(e){return e}}}}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/http.js","/lib")},{_process:43,buffer:34,timers:64,xmlhttprequest:69}],15:[function(b,w,e){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";var c=y(b("json3"));b("./polyfills");var d=g(b("./streamer-utils.js")),p=y(b("./Streamer.js")),h=g(b("./formatting.js")),m=b("./streamer-api.js");function g(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function y(e){return e&&e.__esModule?e:{"default":e}}window&&(window.JSON=window.JSON||c["default"]),p["default"].formatting=h,p["default"].dataTypes=m.messages.control.MarketdataType,p["default"].dataTypes.get=function(e){var t=d.getMessageName(e);return p["default"].dataTypes[t]?t:"UnknownType["+t+"]"},w.exports=p["default"]}).call(this,b("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},b("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],b("timers").setImmediate,b("timers").clearImmediate,"/lib/index.js","/lib")},{"./Streamer.js":7,"./formatting.js":13,"./polyfills":18,"./streamer-api.js":24,"./streamer-utils.js":26,_process:43,buffer:34,json3:41,timers:64}],16:[function(e,t,p){(function(t,n,r,o,s,i,a,l,u,f,c){"use strict";p.__esModule=!0;var d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};p.asLogger=function e(s){{if(!s)return e({log:function(){}});if("function"==typeof s)return e({log:s});var t=function(){for(var o={log:function(e){for(var t=arguments.length,n=Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];s[e]?s[e].apply(s,n):s.log&&s.log.apply(s,[e].concat(n))}},t=["info","error","warn","debug"],e=function(){var e=t[n],r=e;o[r]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];o.log.apply(o,[r].concat(t))}},n=0;n<t.length;n++)e();return{v:o}}();if("object"===(void 0===t?"undefined":d(t)))return t.v}}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/logging.js","/lib")},{_process:43,buffer:34,timers:64}],17:[function(p,e,h){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";h.__esModule=!0,h.lpad=h.MimeTypes=h.Encodings=undefined;var c,d=p("./SMessage.js");(c=d)&&c.__esModule;h.Encodings={UNDEFINED:"undefined",UNDEFINED_CHAR:"U",NONE:"none",NONE_CHAR:"N",BASE64:"base64",BASE64_CHAR:"B"},h.MimeTypes={UNDEFINED:"undefined",UNDEFINED_CHAR:"U",JSON:"application/json",JSON_CHAR:"J",QMCI:"application/qmci",QMCI_CHAR:"Q"},h.lpad=function(e,t){var n,r=e.toString();if(r.length==t)return r;if(r.length>t)throw"Number to long.";0<=e?n="0":(r=r.slice(1),n="-");for(var o=t-r.length,s=1;s<o;s++)n+="0";return n+r}}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/message.js","/lib")},{"./SMessage.js":5,_process:43,buffer:34,timers:64}],18:[function(e,t,n){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";var c,d,p,h;String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),"function"!=typeof Object.assign&&(Object.assign=function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),r=1;r<arguments.length;r++){var o=arguments[r];if(null!=o)for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n[s]=o[s])}return n}),"function"!=typeof Array.isArray&&(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),Array.prototype.map||(Array.prototype.map=function(e){var t,n,r;if(null==this)throw new TypeError("this is null or not defined");var o=Object(this),s=o.length>>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(1<arguments.length&&(t=arguments[1]),n=new Array(s),r=0;r<s;){var i,a;r in o&&(i=o[r],a=e.call(t,i,r,o),n[r]=a),r++}return n}),Array.from||(Array.from=(c=Object.prototype.toString,d=function(e){return"function"==typeof e||"[object Function]"===c.call(e)},p=Math.pow(2,53)-1,h=function(e){var t,n=(t=Number(e),isNaN(t)?0:0!==t&&isFinite(t)?(0<t?1:-1)*Math.floor(Math.abs(t)):t);return Math.min(Math.max(n,0),p)},function(e){var t=Object(e);if(null==e)throw new TypeError("Array.from requires an array-like object - not null or undefined");var n,r=1<arguments.length?arguments[1]:void undefined;if(void 0!==r){if(!d(r))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(n=arguments[2])}for(var o,s=h(t.length),i=d(this)?Object(new this(s)):new Array(s),a=0;a<s;)o=t[a],i[a]=r?void 0===n?r(o,a):r.call(n,o,a):o,a+=1;return i.length=s,i}))}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/polyfills.js","/lib")},{_process:43,buffer:34,timers:64}],19:[function(m,e,g){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";g.__esModule=!0;var c,d=m("./v1/SMessageDecoder_1.js"),p=(c=d)&&c.__esModule?c:{"default":c};var h=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._1=new p["default"]}return e.prototype.decode=function(e){if(null==e)throw"Argument cannot be null.";if(0==e.length)throw"Argument cannot be empty string.";var t=e.charAt(0),n=this["_"+t];if(null!=n)return n.decode(e);throw"Unsupported message type '"+t+"'."},e}();g["default"]=h}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/serialization/SMessageDecoder.js","/lib/serialization")},{"./v1/SMessageDecoder_1.js":21,_process:43,buffer:34,timers:64}],20:[function(m,e,g){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";g.__esModule=!0;var c,d=m("./v1/SMessageEncoder_1.js"),p=(c=d)&&c.__esModule?c:{"default":c};var h=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._1=new p["default"]}return e.prototype.encode=function(e){if(null==e)throw"Argument cannot be null.";var t=this["_"+e.type];if(null!=t)return t.encode(e);throw"Unsupported message type '"+e.type+"'."},e}();g["default"]=h}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/serialization/SMessageEncoder.js","/lib/serialization")},{"./v1/SMessageEncoder_1.js":22,_process:43,buffer:34,timers:64}],21:[function(m,e,g){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";g.__esModule=!0;var c=p(m("../../SMessage.js")),d=p(m("./codec.js"));function p(e){return e&&e.__esModule?e:{"default":e}}var h=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.decode=function(e){if(null==e)throw"Argument cannot be null.";if(0==e.length)throw"Argument cannot be empty string.";var t=new c["default"];t.type=d["default"].TYPE;var n=Number(e.substr(d["default"].HEADERLENGTH_OFFSET,d["default"].USHORT_LENGTH_CHAR));t.sequencenumber=Number(e.substr(d["default"].SEQUENCENUMBER_OFFSET,d["default"].LONG_LENGTH_CHAR)),t.timestamp=Number(e.substr(d["default"].TIMESTAMP_OFFSET,d["default"].LONG_LENGTH_CHAR)),t.id=Number(e.substr(d["default"].ID_OFFSET,d["default"].USHORT_LENGTH_CHAR)),t.encoding=e.charAt(d["default"].ENCODING_OFFSET),t.mimetype=e.charAt(d["default"].MIMETYPE_OFFSET);var r=Number(e.substr(d["default"].PAYLOADLENGTH_OFFSET,d["default"].UINT_LENGTH_CHAR));return t.payload=e.substr(n,r),t},e}();g["default"]=h}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/serialization/v1/SMessageDecoder_1.js","/lib/serialization/v1")},{"../../SMessage.js":5,"./codec.js":23,_process:43,buffer:34,timers:64}],22:[function(g,e,y){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";y.__esModule=!0;var c,d=g("../../message.js"),p=g("./codec.js"),h=(c=p)&&c.__esModule?c:{"default":c};var m=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.prototype.encode=function(e){if(null==e)throw"Argument cannot be null.";var t=h["default"].TYPE;return t+=(0,d.lpad)(h["default"].HEADER_LENGTH_CHAR,h["default"].USHORT_LENGTH_CHAR),t+=(0,d.lpad)(e.sequencenumber,h["default"].LONG_LENGTH_CHAR),t+=(0,d.lpad)(e.timestamp,h["default"].LONG_LENGTH_CHAR),t+=(0,d.lpad)(e.id,h["default"].USHORT_LENGTH_CHAR),t+=e.encoding,t+=e.mimetype,t+=(0,d.lpad)(null!=e.payload?e.payload.length:0,h["default"].UINT_LENGTH_CHAR),null!=e.payload&&(t+=e.payload),t},e}();y["default"]=m}).call(this,g("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],g("timers").setImmediate,g("timers").clearImmediate,"/lib/serialization/v1/SMessageEncoder_1.js","/lib/serialization/v1")},{"../../message.js":17,"./codec.js":23,_process:43,buffer:34,timers:64}],23:[function(e,t,c){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";c.__esModule=!0,c["default"]=new function(){this.TYPE="1",this.USHORT_LENGTH_CHAR=5,this.USHORT_MIN=0,this.USHORT_MAX=65535,this.UINT_LENGTH_CHAR=10,this.UINT_MIN=0,this.UINT_MAX=4294967295,this.LONG_LENGTH_CHAR=20,this.LONG_MIN=Number.MIN_SAFE_INTEGER,this.LONG_MAX=Number.MAX_SAFE_INTEGER,this.TYPE_OFFSET=0,this.HEADERLENGTH_OFFSET=this.TYPE_OFFSET+1,this.SEQUENCENUMBER_OFFSET=this.HEADERLENGTH_OFFSET+this.USHORT_LENGTH_CHAR,this.TIMESTAMP_OFFSET=this.SEQUENCENUMBER_OFFSET+this.LONG_LENGTH_CHAR,this.ID_OFFSET=this.TIMESTAMP_OFFSET+this.LONG_LENGTH_CHAR,this.ENCODING_OFFSET=this.ID_OFFSET+this.USHORT_LENGTH_CHAR,this.MIMETYPE_OFFSET=this.ENCODING_OFFSET+1,this.PAYLOADLENGTH_OFFSET=this.MIMETYPE_OFFSET+1,this.HEADER_LENGTH_CHAR=this.PAYLOADLENGTH_OFFSET+this.UINT_LENGTH_CHAR}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/serialization/v1/codec.js","/lib/serialization/v1")},{_process:43,buffer:34,timers:64}],24:[function(e,t,d){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";d.__esModule=!0;d.LIBRARY_NAME="JavaScript",d.VERSION="1.7.2";var c=d.messages={};c.control={},c.market={},c.JSON_TYPE_PROPERTY="@T",c.MessageTypeNames={ctrl:{HEARTBEAT:"C1",SUBSCRIBE:"C2",SUBSCRIBE_RESPONSE:"C3",UNSUBSCRIBE_RESPONSE:"C4",CONNECT_RESPONSE:"C5",CONNECTION_CLOSE:"C6",FLOW:"C7",SLOW_CONNECTION:"C8"},data:{QUOTE:"D1",PRICEDATA:"D2",TRADE:"D3",BOOKORDER:"D4",BOOKDELETE:"D5",PURGEBOOK:"D6",MMQUOTE:"D7",INTERVAL:"D8",NETHOUSEPOSITION:"D9",SYMBOLINFO:"D10",SYMBOLSTATUS:"D11",DERIVATIVEINFO:"D12",LASTSALE:"D13",LIMITUPLIMITDOWN:"D14"}},c.Message=function(){},c.Message.prototype.init=function(e){this[c.JSON_TYPE_PROPERTY]=e},c.control.CtrlMessage=function(){},c.control.CtrlMessage.prototype=new c.Message,c.control.Heartbeat=function(){this.init(c.MessageTypeNames.ctrl.HEARTBEAT),this.timestamp=null},c.control.Heartbeat.prototype=new c.control.CtrlMessage,c.control.SubscribeMessage=function(){this.init(c.MessageTypeNames.ctrl.SUBSCRIBE),this.action=null,this.symbols=[],this.types=[],this.mimetype=null,this.conflation=null},c.control.SubscribeMessage.prototype=new c.control.CtrlMessage,c.control.BaseResponse=function(){this.code=null,this.reason=null},c.control.BaseResponse.prototype=new c.control.CtrlMessage,c.control.SubscribeResponse=function(){this.init(c.MessageTypeNames.ctrl.SUBSCRIBE_RESPONSE),this.entitlements=null,this.invalidsymbols=null,this.rejectedsymbols=null},c.control.SubscribeResponse.prototype=new c.control.BaseResponse,c.control.UnsubscribeResponse=function(){this.init(c.MessageTypeNames.ctrl.UNSUBSCRIBE_RESPONSE),this.unsubscribed=null},c.control.UnsubscribeResponse.prototype=new c.control.BaseResponse,c.control.StreamEntitlement=function(){this.symbol=null,this.datatype=null,this.entitlement=null},c.control.ConnectResponse=function(){this.init(c.MessageTypeNames.ctrl.CONNECT_RESPONSE),this.version=null,this.flowControlCheckInterval=null,this.serverInstance=null,this.conflationMs=null},c.control.ConnectResponse.prototype=new c.control.BaseResponse,c.control.ConnectionClose=function(){this.init(c.MessageTypeNames.ctrl.CONNECTION_CLOSE),this.code=null,this.reason=null},c.control.ConnectionClose.prototype=new c.control.CtrlMessage,c.control.SlowConnection=function(){this.init(c.MessageTypeNames.ctrl.SLOW_CONNECTION),this.timesExceeded=null,this.maxExceed=null},c.control.SlowConnection.prototype=new c.control.CtrlMessage,c.control.FlowMessage=function(){this.init(c.MessageTypeNames.ctrl.FLOW),this.sequence=null},c.control.FlowMessage.prototype=new c.control.CtrlMessage,c.control.StreamEntitlementType={RT:"Realtime",RTN:"Realtime NASDAQ",RTB:"Realtime BATS",DL:"Delayed",NA:"Not Entitled"},c.control.Action={SUBSCRIBE:"SUBSCRIBE",UNSUBSCRIBE:"UNSUBSCRIBE"},c.control.MarketdataType={QUOTE:"QUOTE",PRICEDATA:"PRICEDATA",TRADE:"TRADE",MMQUOTE:"MMQUOTE",ORDERBOOK:"ORDERBOOK",INTERVAL:"INTERVAL",NETHOUSEPOSITION:"NETHOUSEPOSITION",LASTSALE:"LASTSALE",BOOKORDER:"BOOKORDER",BOOKDELETE:"BOOKDELETE",PURGEBOOK:"PURGEBOOK",LIMITUPLIMITDOWN:"LIMITUPLIMITDOWN"},c.control.ResponseCodes={OK_CODE:200,OK_REASON:"OK",BADREQUEST_CODE:400,BADREQUEST_REASON:"Bad Request",UNAUTHORIZED_CODE:401,UNAUTHORIZED_REASON:"Unauthorized",TOOSLOW_CODE:450,TOOSLOW_REASON:"Too slow",INTERNALSERVERERROR_CODE:500,INTERNALSERVERERROR_REASON:"Internal Server Error"},c.market.DataMessage=function(){this.messageType=null},c.market.DataMessage.prototype=new c.Message,c.market.Quote=function(){this.init(c.MessageTypeNames.data.QUOTE)},c.market.Quote.prototype=new c.market.DataMessage,c.market.PriceData=function(){this.init(c.MessageTypeNames.data.PRICEDATA)},c.market.PriceData.prototype=new c.market.DataMessage,c.market.Trade=function(){this.init(c.MessageTypeNames.data.TRADE)},c.market.Trade.prototype=new c.market.DataMessage,c.market.MMQuote=function(){this.init(c.MessageTypeNames.data.MMQUOTE)},c.market.MMQuote.prototype=new c.market.DataMessage,c.market.PurgeBook=function(){this.init(c.MessageTypeNames.data.PURGEBOOK)},c.market.PurgeBook.prototype=new c.market.DataMessage,c.market.BookOrder=function(){this.init(c.MessageTypeNames.data.BOOKORDER)},c.market.BookOrder.prototype=c.market.DataMessage(),c.market.BookDelete=function(){this.init(c.MessageTypeNames.data.BOOKDELETE)},c.market.BookDelete.prototype=new c.market.DataMessage,c.market.Interval=function(){this.init(c.MessageTypeNames.data.INTERVAL)},c.market.Interval.prototype=new c.market.DataMessage,c.market.NethousePosition=function(){this.init(c.MessageTypeNames.data.NETHOUSEPOSITION)},c.market.NethousePosition.prototype=new c.market.DataMessage,c.market.SymbolInfo=function(){this.init(c.MessageTypeNames.data.SYMBOLINFO)},c.market.SymbolInfo.prototype=new c.market.DataMessage,c.market.SymbolStatus=function(){this.init(c.MessageTypeNames.data.SYMBOLSTATUS)},c.market.SymbolStatus.prototype=new c.market.DataMessage,c.market.DerivativeInfo=function(){this.init(c.MessageTypeNames.data.DERIVATIVEINFO)},c.market.DerivativeInfo.prototype=new c.market.DataMessage,c.market.InstrumentType={1:"CASH",2:"BOND",3:"COMPOSITE",4:"FUTURE",5:"FUTURE_OPTION",6:"FOREX",7:"INDEX",8:"MUTUAL_FUND",9:"MONEY_MARKET_FUND",10:"MARKET_STAT",11:"EQUITY",12:"EQUITY_OPTION",13:"GOVT_BOND",14:"MUNI_BOND",15:"CORP_BOND",16:"ETF",17:"FUTURE_SPREAD",97:"OPTION_ROOT",98:"UNKNOWN",99:"RATE"},c.market.OrderSide={BUYSIDE:"B",SELLSIDE:"S"}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/streamer-api.js","/lib")},{_process:43,buffer:34,timers:64}],25:[function(p,e,h){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";h.__esModule=!0,p("./polyfills");var c=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Object.assign(this,e)}return t.prototype.toString=function(){var e=this.type+"{",t=!0;for(var n in this)"type"!==n&&"function"!=typeof this[n]&&(t||(e+=", "),e+=n+": "+JSON.stringify(this[n]),t=!1);return e+="}"},t}(),d=h.event=function(e,t){return new c(Object.assign({type:e},t))};h.error=function(e,t){return d("error",Object.assign({description:e},t))},h.close=function(e){return d("close",e)}}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/streamer-events.js","/lib")},{"./polyfills":18,_process:43,buffer:34,timers:64}],26:[function(p,e,h){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";h.__esModule=!0,h.getMessageName=h.entitlement=h.isvalid=h.iscontrolmessage=h.isdatamessage=h.messagetype=undefined;var c,d=p("./streamer-api.js");h.messagetype=function(e){return null===e?null:e[d.messages.JSON_TYPE_PROPERTY]},h.isdatamessage=function(e){if(null===e)return!1;var t=h.messagetype(e);return null!==t&&t.startsWith("D")},h.iscontrolmessage=function(e){if(null===e)return!1;var t=h.messagetype(e);return null!==t&&t.startsWith("C")},h.isvalid=function(e,t){var n=t.invalidSymbols;if(null==n)return!0;for(var r=0;r<n.length;r++){if(n[r]===e)return!1}return!0},h.entitlement=function(e,t,n){var r=n.entitlements;if(null!=r)for(var o=0;o<r.length;o++){var s=r[o];if(s.symbol===e&&s.marketdatatype===t)return s.entitlement}return null},h.getMessageName=(c={},function(e){var t=e[d.messages.JSON_TYPE_PROPERTY];if(!c[t]){var n=d.messages.MessageTypeNames.ctrl;for(var r in n)if(n[r]===t)return c[t]=r;var o=d.messages.MessageTypeNames.data;for(var s in o)if(o[s]===t)return c[t]=s;return c[t]=t}return c[t]})}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/lib/streamer-utils.js","/lib")},{"./streamer-api.js":24,_process:43,buffer:34,timers:64}],27:[function(m,e,g){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";g.__esModule=!0;m("../message.js");var c,d=m("../EventSupport.js"),p=(c=d)&&c.__esModule?c:{"default":c};var h=function(){function n(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),this.socket=e,this.log=t,this.events=new p["default"](this)}return n.prototype.send=function(e,t){this.socket.push({trackMessageLength:!0,data:JSON.stringify(e)})},n.prototype.onMessage=function(e){var t=null;try{t=JSON.parse(e)}catch(s){return void this.log.error(s)}this.events.fire("sequence",t.seq);for(var n=t.data.length,r=0;r<n;r++){var o=t.data[r];o.__id=o.requestId,this.events.fire("message",o)}},n.prototype.on=function(e,t){return this.events.on(e,t)},n}();g["default"]=h}).call(this,m("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},m("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],m("timers").setImmediate,m("timers").clearImmediate,"/lib/transmission/JsonTransmitter.js","/lib/transmission")},{"../EventSupport.js":2,"../message.js":17,_process:43,buffer:34,timers:64}],28:[function(y,e,b){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";b.__esModule=!0;var c=y("../message.js"),d=m(y("../SMessage.js")),p=m(y("../UShortId.js")),h=m(y("../EventSupport.js"));y("../formatting.js");function m(e){return e&&e.__esModule?e:{"default":e}}var g=function(){function o(e,t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),this.socket=e,this.encoder=t,this.decoder=n,this.log=r,this.events=new h["default"](this)}return o.prototype.send=function(e,t){var n=new d["default"];n.sequencenumber=e.sequenceNumber,n.timestamp=(new Date).getTime(),n.id=null!=t?t:p["default"].NULL,n.encoding=c.Encodings.NONE_CHAR,n.mimetype=c.MimeTypes.JSON_CHAR,n.payload=JSON.stringify(e);var r={trackMessageLength:!0,data:this.encoder.encode(n)};this.socket.push(r)},o.prototype.onMessage=function(e){var t=this.decoder.decode(e);if(this.events.fire("sequence",t.sequencenumber),t.encoding===c.Encodings.NONE_CHAR)if(t.mimetype===c.MimeTypes.JSON_CHAR){var n=null;try{n=JSON.parse(t.payload)}catch(r){return void this.log.error(r)}n.__id=t.id,this.events.fire("message",n)}else this.log.debug("Unhandled mimetype: "+t.mimeType+" - "+t.payload);else this.log.debug("Unhandled encoding: "+t.encoding+" - "+t.payload)},o.prototype.on=function(e,t){return this.events.on(e,t)},o}();b["default"]=g}).call(this,y("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},y("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],y("timers").setImmediate,y("timers").clearImmediate,"/lib/transmission/SMessageTransmitter.js","/lib/transmission")},{"../EventSupport.js":2,"../SMessage.js":5,"../UShortId.js":9,"../formatting.js":13,"../message.js":17,_process:43,buffer:34,timers:64}],29:[function(e,t,d){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";d.__esModule=!0;d.forEachPartition=function(e,t,n){if(e)for(var r=0;r<e.length;r+=t){n(e.slice(r,r+t))}};var c=d.indexOf=function(e,t){for(var n=e.length,r=0;r<n;++r)if(t===e[r])return r;return-1};d.removeFromArray=function(e){for(var t,n,r=arguments.length<=1?0:arguments.length-1;0<r&&e.length;){var o;for(o=1+--r,t=arguments.length<=o?undefined:arguments[o];-1!==(n=c(e,t));)e.splice(n,1)}return e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/lib/utils.js","/lib")},{_process:43,buffer:34,timers:64}],30:[function(e,c,t){(function(e,t,n,r,o,s,i,a,l,u,f){c.exports=function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/array-equal/index.js","/node_modules/array-equal")},{_process:43,buffer:34,timers:64}],31:[function(e,t,w){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";w.byteLength=function(e){var t=y(e),n=t[0],r=t[1];return 3*(n+r)/4-r},w.toByteArray=function(e){for(var t,n=y(e),r=n[0],o=n[1],s=new p((u=r,f=o,3*(u+f)/4-f)),i=0,a=0<o?r-4:r,l=0;l<a;l+=4)t=d[e.charCodeAt(l)]<<18|d[e.charCodeAt(l+1)]<<12|d[e.charCodeAt(l+2)]<<6|d[e.charCodeAt(l+3)],s[i++]=t>>16&255,s[i++]=t>>8&255,s[i++]=255&t;var u,f;2===o&&(t=d[e.charCodeAt(l)]<<2|d[e.charCodeAt(l+1)]>>4,s[i++]=255&t);1===o&&(t=d[e.charCodeAt(l)]<<10|d[e.charCodeAt(l+1)]<<4|d[e.charCodeAt(l+2)]>>2,s[i++]=t>>8&255,s[i++]=255&t);return s},w.fromByteArray=function(e){for(var t,n=e.length,r=n%3,o=[],s=0,i=n-r;s<i;s+=16383)o.push(b(e,s,i<s+16383?i:s+16383));1===r?(t=e[n-1],o.push(c[t>>2]+c[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(c[t>>10]+c[t>>4&63]+c[t<<2&63]+"="));return o.join("")};for(var c=[],d=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",m=0,g=h.length;m<g;++m)c[m]=h[m],d[h.charCodeAt(m)]=m;function y(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function b(e,t,n){for(var r,o,s=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),s.push(c[(o=r)>>18&63]+c[o>>12&63]+c[o>>6&63]+c[63&o]);return s.join("")}d["-".charCodeAt(0)]=62,d["_".charCodeAt(0)]=63}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/base64-js/index.js","/node_modules/base64-js")},{_process:43,buffer:34,timers:64}],32:[function(e,t,n){(function(e,t,n,r,o,s,i,a,l,u,f){}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/browser-resolve/empty.js","/node_modules/browser-resolve")},{_process:43,buffer:34,timers:64}],33:[function(e,t,n){(function(e,t,n,r,o,s,i,a,l,u,f){}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/browserify/lib/_empty.js","/node_modules/browserify/lib")},{_process:43,buffer:34,timers:64}],34:[function(J,e,G){(function(e,t,c,n,r,o,s,i,a,l,u){"use strict";var f=J("base64-js"),d=J("ieee754");G.Buffer=c,G.SlowBuffer=function(e){+e!=e&&(e=0);return c.alloc(+e)},G.INSPECT_MAX_BYTES=50;var p=2147483647;function h(e){if(p<e)throw new RangeError("Invalid typed array length");var t=new Uint8Array(e);return t.__proto__=c.prototype,t}function c(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return y(e)}return m(e,t,n)}function m(e,t,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return W(e)||e&&W(e.buffer)?function(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;r=t===undefined&&n===undefined?new Uint8Array(e):n===undefined?new Uint8Array(e,t):new Uint8Array(e,t,n);return r.__proto__=c.prototype,r}(e,t,n):"string"==typeof e?function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|v(e,t),r=h(n),o=r.write(e,t);o!==n&&(r=r.slice(0,o));return r}(e,t):function(e){if(c.isBuffer(e)){var t=0|w(e.length),n=h(t);return 0===n.length||e.copy(n,0,0,t),n}if(e){if(ArrayBuffer.isView(e)||"length"in e)return"number"!=typeof e.length||X(e.length)?h(0):b(e);if("Buffer"===e.type&&Array.isArray(e.data))return b(e.data)}throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object.")}(e)}function g(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('"size" argument must not be negative')}function y(e){return g(e),h(e<0?0:0|w(e))}function b(e){for(var t=e.length<0?0:0|w(e.length),n=h(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function w(e){if(p<=e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+p.toString(16)+" bytes");return 0|e}function v(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||W(e))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case undefined:return q(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return F(e).length;default:if(r)return q(e).length;t=(""+t).toLowerCase(),r=!0}}function _(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function S(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):2147483647<n?n=2147483647:n<-2147483648&&(n=-2147483648),X(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:T(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):T(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function T(e,t,n,r,o){var s,i=1,a=e.length,l=t.length;if(r!==undefined&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a/=i=2,l/=2,n/=2}function u(e,t){return 1===i?e[t]:e.readUInt16BE(t*i)}if(o){var f=-1;for(s=n;s<a;s++)if(u(e,s)===u(t,-1===f?0:s-f)){if(-1===f&&(f=s),s-f+1===l)return f*i}else-1!==f&&(s-=s-f),f=-1}else for(a<n+l&&(n=a-l),s=n;0<=s;s--){for(var c=!0,d=0;d<l;d++)if(u(e,s+d)!==u(t,d)){c=!1;break}if(c)return s}return-1}function E(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?o<(r=Number(r))&&(r=o):r=o;var s=t.length;s/2<r&&(r=s/2);for(var i=0;i<r;++i){var a=parseInt(t.substr(2*i,2),16);if(X(a))return i;e[n+i]=a}return i}function O(e,t,n,r){return H(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?f.fromByteArray(e):f.fromByteArray(e.slice(t,n))}function I(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var s,i,a,l,u=e[o],f=null,c=239<u?4:223<u?3:191<u?2:1;if(o+c<=n)switch(c){case 1:u<128&&(f=u);break;case 2:128==(192&(s=e[o+1]))&&127<(l=(31&u)<<6|63&s)&&(f=l);break;case 3:s=e[o+1],i=e[o+2],128==(192&s)&&128==(192&i)&&2047<(l=(15&u)<<12|(63&s)<<6|63&i)&&(l<55296||57343<l)&&(f=l);break;case 4:s=e[o+1],i=e[o+2],a=e[o+3],128==(192&s)&&128==(192&i)&&128==(192&a)&&65535<(l=(15&u)<<18|(63&s)<<12|(63&i)<<6|63&a)&&l<1114112&&(f=l)}null===f?(f=65533,c=1):65535<f&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),o+=c}return function(e){var t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=R));return n}(r)}G.kMaxLength=p,(c.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(t){return!1}}())||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{get:function(){return this instanceof c?this.buffer:undefined}}),Object.defineProperty(c.prototype,"offset",{get:function(){return this instanceof c?this.byteOffset:undefined}}),"undefined"!=typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),c.poolSize=8192,c.from=function(e,t,n){return m(e,t,n)},c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,c.alloc=function(e,t,n){return o=t,s=n,g(r=e),r<=0?h(r):o!==undefined?"string"==typeof s?h(r).fill(o,s):h(r).fill(o):h(r);var r,o,s},c.allocUnsafe=function(e){return y(e)},c.allocUnsafeSlow=function(e){return y(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,s=Math.min(n,r);o<s;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var n;if(t===undefined)for(n=t=0;n<e.length;++n)t+=e[n].length;var r=c.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var s=e[n];if(ArrayBuffer.isView(s)&&(s=c.from(s)),!c.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(r,o),o+=s.length}return r},c.byteLength=v,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)_(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)_(this,t,t+3),_(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)_(this,t,t+7),_(this,t+1,t+6),_(this,t+2,t+5),_(this,t+3,t+4);return this},c.prototype.toLocaleString=c.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?I(this,0,e):function(e,t,n){var r=!1;if((t===undefined||t<0)&&(t=0),t>this.length)return"";if((n===undefined||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return N(this,t,n);case"latin1":case"binary":return k(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",t=G.INSPECT_MAX_BYTES;return 0<this.length&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,n,r,o){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(t===undefined&&(t=0),n===undefined&&(n=e?e.length:0),r===undefined&&(r=0),o===undefined&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(o<=r&&n<=t)return 0;if(o<=r)return-1;if(n<=t)return 1;if(this===e)return 0;for(var s=(o>>>=0)-(r>>>=0),i=(n>>>=0)-(t>>>=0),a=Math.min(s,i),l=this.slice(r,o),u=e.slice(t,n),f=0;f<a;++f)if(l[f]!==u[f]){s=l[f],i=u[f];break}return s<i?-1:i<s?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return S(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return S(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(t===undefined)r="utf8",n=this.length,t=0;else if(n===undefined&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,r===undefined&&(r="utf8")):(r=n,n=undefined)}var o=this.length-t;if((n===undefined||o<n)&&(n=o),0<e.length&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var s,i,a,l,u,f,c,d,p,h=!1;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return d=t,p=n,H(q(e,(c=this).length-d),c,d,p);case"ascii":return O(this,e,t,n);case"latin1":case"binary":return O(this,e,t,n);case"base64":return l=this,u=t,f=n,H(F(e),l,u,f);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return i=t,a=n,H(function(e,t){for(var n,r,o,s=[],i=0;i<e.length&&!((t-=2)<0);++i)n=e.charCodeAt(i),r=n>>8,o=n%256,s.push(o),s.push(r);return s}(e,(s=this).length-i),s,i,a);default:if(h)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),h=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function N(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function k(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function A(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||r<n)&&(n=r);for(var o="",s=t;s<n;++s)o+=P(e[s]);return o}function M(e,t,n){for(var r=e.slice(t,n),o="",s=0;s<r.length;s+=2)o+=String.fromCharCode(r[s]+256*r[s+1]);return o}function j(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(n<e+t)throw new RangeError("Trying to access beyond buffer length")}function x(e,t,n,r,o,s){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(o<t||t<s)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function B(e,t,n,r,o,s){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(e,t,n,r,o){return t=+t,n>>>=0,o||B(e,0,n,4),d.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,o){return t=+t,n>>>=0,o||B(e,0,n,8),d.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):n<e&&(e=n),(t=t===undefined?n:~~t)<0?(t+=n)<0&&(t=0):n<t&&(t=n),t<e&&(t=e);var r=this.subarray(e,t);return r.__proto__=c.prototype,r},c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);for(var r=this[e],o=1,s=0;++s<t&&(o*=256);)r+=this[e+s]*o;return r},c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);for(var r=this[e+--t],o=1;0<t&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||j(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);for(var r=this[e],o=1,s=0;++s<t&&(o*=256);)r+=this[e+s]*o;return(o*=128)<=r&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||j(e,t,this.length);for(var r=t,o=1,s=this[e+--r];0<r&&(o*=256);)s+=this[e+--r]*o;return(o*=128)<=s&&(s-=Math.pow(2,8*t)),s},c.prototype.readInt8=function(e,t){return e>>>=0,t||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||j(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||j(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return e>>>=0,t||j(e,4,this.length),d.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||j(e,4,this.length),d.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||j(e,8,this.length),d.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||j(e,8,this.length),d.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||x(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,s=0;for(this[t]=255&e;++s<n&&(o*=256);)this[t+s]=e/o&255;return t+n},c.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||x(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,s=1;for(this[t+o]=255&e;0<=--o&&(s*=256);)this[t+o]=e/s&255;return t+n},c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);x(this,e,t,n,o-1,-o)}var s=0,i=1,a=0;for(this[t]=255&e;++s<n&&(i*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/i>>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);x(this,e,t,n,o-1,-o)}var s=n-1,i=1,a=0;for(this[t+s]=255&e;0<=--s&&(i*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/i>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeFloatLE=function(e,t,n){return L(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return L(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),0<r&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o=r-n;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,n,r);else if(this===e&&n<t&&t<r)for(var s=o-1;0<=s;--s)e[s+t]=this[s+n];else Uint8Array.prototype.set.call(e,this.subarray(n,r),t);return o},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),r!==undefined&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var o=e.charCodeAt(0);("utf8"===r&&o<128||"latin1"===r)&&(e=o)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var s;if(t>>>=0,n=n===undefined?this.length:n>>>0,e||(e=0),"number"==typeof e)for(s=t;s<n;++s)this[s]=e;else{var i=c.isBuffer(e)?e:new c(e,r),a=i.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(s=0;s<n-t;++s)this[s+t]=i[s%a]}return this};var D=/[^+/0-9A-Za-z-_]/g;function P(e){return e<16?"0"+e.toString(16):e.toString(16)}function q(e,t){var n;t=t||Infinity;for(var r=e.length,o=null,s=[],i=0;i<r;++i){if(55295<(n=e.charCodeAt(i))&&n<57344){if(!o){if(56319<n){-1<(t-=3)&&s.push(239,191,189);continue}if(i+1===r){-1<(t-=3)&&s.push(239,191,189);continue}o=n;continue}if(n<56320){-1<(t-=3)&&s.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&-1<(t-=3)&&s.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;s.push(n)}else if(n<2048){if((t-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function F(e){return f.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function H(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function W(e){return e instanceof ArrayBuffer||null!=e&&null!=e.constructor&&"ArrayBuffer"===e.constructor.name&&"number"==typeof e.byteLength}function X(e){return e!=e}}).call(this,J("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},J("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],J("timers").setImmediate,J("timers").clearImmediate,"/node_modules/buffer/index.js","/node_modules/buffer")},{_process:43,"base64-js":31,buffer:34,ieee754:39,timers:64}],35:[function(e,c,t){(function(e,t,n,r,o,s,i,a,l,u,f){c.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/builtin-status-codes/browser.js","/node_modules/builtin-status-codes")},{_process:43,buffer:34,timers:64}],36:[function(e,t,d){(function(e,t,n,r,o,s,i,a,l,u,f){function c(e){return Object.prototype.toString.call(e)}d.isArray=
35
- // Copyright Joyent, Inc. and other Node contributors.
36
- function(e){return Array.isArray?Array.isArray(e):"[object Array]"===c(e)},d.isBoolean=function(e){return"boolean"==typeof e},d.isNull=function(e){return null===e},d.isNullOrUndefined=function(e){return null==e},d.isNumber=function(e){return"number"==typeof e},d.isString=function(e){return"string"==typeof e},d.isSymbol=function(e){return"symbol"==typeof e},d.isUndefined=function(e){return void 0===e},d.isRegExp=function(e){return"[object RegExp]"===c(e)},d.isObject=function(e){return"object"==typeof e&&null!==e},d.isDate=function(e){return"[object Date]"===c(e)},d.isError=function(e){return"[object Error]"===c(e)||e instanceof Error},d.isFunction=function(e){return"function"==typeof e},d.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},d.isBuffer=n.isBuffer}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/core-util-is/lib/util.js","/node_modules/core-util-is/lib")},{_process:43,buffer:34,timers:64}],37:[function(e,C,t){(function(e,t,n,r,o,s,i,a,l,u,f){
37
- // Copyright Joyent, Inc. and other Node contributors.
38
- var c=Object.create||function(e){var t=function(){};return t.prototype=e,new t},d=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return n},p=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function h(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=c(null),this._eventsCount=0),this._maxListeners=this._maxListeners||undefined}((C.exports=h).EventEmitter=h).prototype._events=undefined,h.prototype._maxListeners=undefined;var m,g=10;try{var y={};Object.defineProperty&&Object.defineProperty(y,"x",{value:0}),m=0===y.x}catch(O){m=!1}function b(e){return e._maxListeners===undefined?h.defaultMaxListeners:e._maxListeners}function w(e,t,n,r){var o,s,i;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');if((s=e._events)?(s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),i=s[t]):(s=e._events=c(null),e._eventsCount=0),i){if("function"==typeof i?i=s[t]=r?[n,i]:[i,n]:r?i.unshift(n):i.push(n),!i.warned&&(o=b(e))&&0<o&&i.length>o){i.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+i.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=i.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",a.name,a.message)}}else i=s[t]=n,++e._eventsCount;return e}function v(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t<e.length;++t)e[t]=arguments[t];this.listener.apply(this.target,e)}}function _(e,t,n){var r={fired:!1,wrapFn:undefined,target:e,type:t,listener:n},o=p.call(v,r);return o.listener=n,r.wrapFn=o}function S(e,t,n){var r=e._events;if(!r)return[];var o=r[t];return o?"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):E(o,o.length):[]}function T(e){var t=this._events;if(t){var n=t[e];if("function"==typeof n)return 1;if(n)return n.length}return 0}function E(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}m?Object.defineProperty(h,"defaultMaxListeners",{enumerable:!0,get:function(){return g},set:function(e){if("number"!=typeof e||e<0||e!=e)throw new TypeError('"defaultMaxListeners" must be a positive number');g=e}}):h.defaultMaxListeners=g,h.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},h.prototype.getMaxListeners=function(){return b(this)},h.prototype.emit=function(e){var t,n,r,o,s,i,a="error"===e;if(i=this._events)a=a&&null==i.error;else if(!a)return!1;if(a){if(1<arguments.length&&(t=arguments[1]),t instanceof Error)throw t;var l=new Error('Unhandled "error" event. ('+t+")");throw l.context=t,l}if(!(n=i[e]))return!1;var u="function"==typeof n;switch(r=arguments.length){case 1:!function(e,t,n){if(t)e.call(n);else for(var r=e.length,o=E(e,r),s=0;s<r;++s)o[s].call(n)}(n,u,this);break;case 2:!function(e,t,n,r){if(t)e.call(n,r);else for(var o=e.length,s=E(e,o),i=0;i<o;++i)s[i].call(n,r)}(n,u,this,arguments[1]);break;case 3:!function(e,t,n,r,o){if(t)e.call(n,r,o);else for(var s=e.length,i=E(e,s),a=0;a<s;++a)i[a].call(n,r,o)}(n,u,this,arguments[1],arguments[2]);break;case 4:!function(e,t,n,r,o,s){if(t)e.call(n,r,o,s);else for(var i=e.length,a=E(e,i),l=0;l<i;++l)a[l].call(n,r,o,s)}(n,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(o=new Array(r-1),s=1;s<r;s++)o[s-1]=arguments[s];!function(e,t,n,r){if(t)e.apply(n,r);else for(var o=e.length,s=E(e,o),i=0;i<o;++i)s[i].apply(n,r)}(n,u,this,o)}return!0},h.prototype.on=h.prototype.addListener=function(e,t){return w(this,e,t,!1)},h.prototype.prependListener=function(e,t){return w(this,e,t,!0)},h.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,_(this,e,t)),this},h.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,_(this,e,t)),this},h.prototype.removeListener=function(e,t){var n,r,o,s,i;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if(!(r=this._events))return this;if(!(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=c(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,s=n.length-1;0<=s;s--)if(n[s]===t||n[s].listener===t){i=n[s].listener,o=s;break}if(o<0)return this;0===o?n.shift():function(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),r.removeListener&&this.emit("removeListener",e,i||t)}return this},h.prototype.removeAllListeners=function(e){var t,n,r;if(!(n=this._events))return this;if(!n.removeListener)return 0===arguments.length?(this._events=c(null),this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=c(null):delete n[e]),this;if(0===arguments.length){var o,s=d(n);for(r=0;r<s.length;++r)"removeListener"!==(o=s[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=c(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)for(r=t.length-1;0<=r;r--)this.removeListener(e,t[r]);return this},h.prototype.listeners=function(e){return S(this,e,!0)},h.prototype.rawListeners=function(e){return S(this,e,!1)},h.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):T.call(e,t)},h.prototype.listenerCount=T,h.prototype.eventNames=function(){return 0<this._eventsCount?Reflect.ownKeys(this._events):[]}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/events/events.js","/node_modules/events")},{_process:43,buffer:34,timers:64}],38:[function(g,y,e){(function(e,t,n,r,o,s,i,a,l,u,f){var c=g("http"),d=g("url"),p=y.exports;for(var h in c)c.hasOwnProperty(h)&&(p[h]=c[h]);function m(e){if("string"==typeof e&&(e=d.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}p.request=function(e,t){return e=m(e),c.request.call(this,e,t)},p.get=function(e,t){return e=m(e),c.get.call(this,e,t)}}).call(this,g("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],g("timers").setImmediate,g("timers").clearImmediate,"/node_modules/https-browserify/index.js","/node_modules/https-browserify")},{_process:43,buffer:34,http:49,timers:64,url:66}],39:[function(e,t,c){(function(e,t,n,r,o,s,i,a,l,u,f){c.read=function(e,t,n,r,o){var s,i,a=8*o-r-1,l=(1<<a)-1,u=l>>1,f=-7,c=n?o-1:0,d=n?-1:1,p=e[t+c];for(c+=d,s=p&(1<<-f)-1,p>>=-f,f+=a;0<f;s=256*s+e[t+c],c+=d,f-=8);for(i=s&(1<<-f)-1,s>>=-f,f+=r;0<f;i=256*i+e[t+c],c+=d,f-=8);if(0===s)s=1-u;else{if(s===l)return i?NaN:(p?-1:1)*Infinity;i+=Math.pow(2,r),s-=u}return(p?-1:1)*i*Math.pow(2,s-r)},c.write=function(e,t,n,r,o,s){var i,a,l,u=8*s-o-1,f=(1<<u)-1,c=f>>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:s-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===Infinity?(a=isNaN(t)?1:0,i=f):(i=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-i))<1&&(i--,l*=2),2<=(t+=1<=i+c?d/l:d*Math.pow(2,1-c))*l&&(i++,l/=2),f<=i+c?(a=0,i=f):1<=i+c?(a=(t*l-1)*Math.pow(2,o),i+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,o),i=0));8<=o;e[n+p]=255&a,p+=h,a/=256,o-=8);for(i=i<<o|a,u+=o;0<u;e[n+p]=255&i,p+=h,i/=256,u-=8);e[n+p-h]|=128*m}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/ieee754/index.js","/node_modules/ieee754")},{_process:43,buffer:34,timers:64}],40:[function(e,c,t){(function(e,t,n,r,o,s,i,a,l,u,f){"function"==typeof Object.create?c.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:c.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/inherits/inherits_browser.js","/node_modules/inherits")},{_process:43,buffer:34,timers:64}],41:[function(e,c,d){(function(e,i,t,n,r,o,s,a,l,u,f){(function(){var P={"function":!0,object:!0},e=P[typeof d]&&d&&!d.nodeType&&d,q=P[typeof window]&&window||this,t=e&&P[typeof c]&&c&&!c.nodeType&&"object"==typeof i&&i;function F(e,l){e||(e=q.Object()),l||(l=q.Object());var u=e.Number||q.Number,f=e.String||q.String,t=e.Object||q.Object,c=e.Date||q.Date,n=e.SyntaxError||q.SyntaxError,T=e.TypeError||q.TypeError,r=e.Math||q.Math,o=e.JSON||q.JSON;"object"==typeof o&&o&&(l.stringify=o.stringify,l.parse=o.parse);var E,O,C,s=t.prototype,I=s.toString,d=new c(-0xc782b5b800cec);try{d=-109252==d.getUTCFullYear()&&0===d.getUTCMonth()&&1===d.getUTCDate()&&10==d.getUTCHours()&&37==d.getUTCMinutes()&&6==d.getUTCSeconds()&&708==d.getUTCMilliseconds()}catch(D){}function p(e){if(p[e]!==C)return p[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=p("json-stringify")&&p("json-parse");else{var n,r='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var o=l.stringify,s="function"==typeof o&&d;if(s){(n=function(){return 1}).toJSON=n;try{s="0"===o(0)&&"0"===o(new u)&&'""'==o(new f)&&o(I)===C&&o(C)===C&&o()===C&&"1"===o(n)&&"[1]"==o([n])&&"[null]"==o([C])&&"null"==o(null)&&"[null,null,null]"==o([C,I,null])&&o({a:[n,!0,!1,null,"\0\b\n\f\r\t"]})==r&&"1"===o(null,n)&&"[\n 1,\n 2\n]"==o([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==o(new c(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==o(new c(864e13))&&'"-000001-01-01T00:00:00.000Z"'==o(new c(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==o(new c(-1))}catch(D){s=!1}}t=s}if("json-parse"==e){var i=l.parse;if("function"==typeof i)try{if(0===i("0")&&!i(!1)){var a=5==(n=i(r)).a.length&&1===n.a[0];if(a){try{a=!i('"\t"')}catch(D){}if(a)try{a=1!==i("01")}catch(D){}if(a)try{a=1!==i("1.")}catch(D){}}}}catch(D){a=!1}t=a}}return p[e]=!!t}if(!p("json")){var h="[object Function]",R="[object Number]",N="[object String]",k="[object Array]",a=p("bug-string-char-index");if(!d)var A=r.floor,i=[0,31,59,90,120,151,181,212,243,273,304,334],M=function(e,t){return i[t]+365*(e-1970)+A((e-1969+(t=+(1<t)))/4)-A((e-1901+t)/100)+A((e-1601+t)/400)};if((E=s.hasOwnProperty)||(E=function(e){var n,t={};return(t.__proto__=null,t.__proto__={toString:1},t).toString!=I?E=function(e){var t=this.__proto__,n=e in(this.__proto__=null,this);return this.__proto__=t,n}:(n=t.constructor,E=function(e){var t=(this.constructor||n).prototype;return e in this&&!(e in t&&this[e]===t[e])}),t=null,E.call(this,e)}),O=function(e,t){var n,i,r,o=0;for(r in(n=function(){this.valueOf=0}).prototype.valueOf=0,i=new n)E.call(i,r)&&o++;return n=i=null,o?O=2==o?function(e,t){var n,r={},o=I.call(e)==h;for(n in e)o&&"prototype"==n||E.call(r,n)||!(r[n]=1)||!E.call(e,n)||t(n)}:function(e,t){var n,r,o=I.call(e)==h;for(n in e)o&&"prototype"==n||!E.call(e,n)||(r="constructor"===n)||t(n);(r||E.call(e,n="constructor"))&&t(n)}:(i=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],O=function(e,t){var n,r,o=I.call(e)==h,s=!o&&"function"!=typeof e.constructor&&P[typeof e.hasOwnProperty]&&e.hasOwnProperty||E;for(n in e)o&&"prototype"==n||!s.call(e,n)||t(n);for(r=i.length;n=i[--r];s.call(e,n)&&t(n));}),O(e,t)},!p("json-stringify")){var m={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},j=function(e,t){return("000000"+(t||0)).slice(-e)},x=function(e){for(var t='"',n=0,r=e.length,o=!a||10<r,s=o&&(a?e.split(""):e);n<r;n++){var i=e.charCodeAt(n);switch(i){case 8:case 9:case 10:case 12:case 13:case 34:case 92:t+=m[i];break;default:if(i<32){t+="\\u00"+j(2,i.toString(16));break}t+=o?s[n]:e.charAt(n)}}return t+'"'},B=function(e,t,n,r,o,s,i){var a,l,u,f,c,d,p,h,m,g,y,b,w,v,_,S;try{a=t[e]}catch(D){}if("object"==typeof a&&a)if("[object Date]"!=(l=I.call(a))||E.call(a,"toJSON"))"function"==typeof a.toJSON&&(l!=R&&l!=N&&l!=k||E.call(a,"toJSON"))&&(a=a.toJSON(e));else if(-1/0<a&&a<1/0){if(M){for(c=A(a/864e5),u=A(c/365.2425)+1970-1;M(u+1,0)<=c;u++);for(f=A((c-M(u,0))/30.42);M(u,f+1)<=c;f++);c=1+c-M(u,f),p=A((d=(a%864e5+864e5)%864e5)/36e5)%24,h=A(d/6e4)%60,m=A(d/1e3)%60,g=d%1e3}else u=a.getUTCFullYear(),f=a.getUTCMonth(),c=a.getUTCDate(),p=a.getUTCHours(),h=a.getUTCMinutes(),m=a.getUTCSeconds(),g=a.getUTCMilliseconds();a=(u<=0||1e4<=u?(u<0?"-":"+")+j(6,u<0?-u:u):j(4,u))+"-"+j(2,f+1)+"-"+j(2,c)+"T"+j(2,p)+":"+j(2,h)+":"+j(2,m)+"."+j(3,g)+"Z"}else a=null;if(n&&(a=n.call(t,e,a)),null===a)return"null";if("[object Boolean]"==(l=I.call(a)))return""+a;if(l==R)return-1/0<a&&a<1/0?""+a:"null";if(l==N)return x(""+a);if("object"==typeof a){for(v=i.length;v--;)if(i[v]===a)throw T();if(i.push(a),y=[],_=s,s+=o,l==k){for(w=0,v=a.length;w<v;w++)b=B(w,a,n,r,o,s,i),y.push(b===C?"null":b);S=y.length?o?"[\n"+s+y.join(",\n"+s)+"\n"+_+"]":"["+y.join(",")+"]":"[]"}else O(r||a,function(e){var t=B(e,a,n,r,o,s,i);t!==C&&y.push(x(e)+":"+(o?" ":"")+t)}),S=y.length?o?"{\n"+s+y.join(",\n"+s)+"\n"+_+"}":"{"+y.join(",")+"}":"{}";return i.pop(),S}};l.stringify=function(e,t,n){var r,o,s,i;if(P[typeof t]&&t)if((i=I.call(t))==h)o=t;else if(i==k){s={};for(var a,l=0,u=t.length;l<u;a=t[l++],((i=I.call(a))==N||i==R)&&(s[a]=1));}if(n)if((i=I.call(n))==R){if(0<(n-=n%1))for(r="",10<n&&(n=10);r.length<n;r+=" ");}else i==N&&(r=n.length<=10?n:n.slice(0,10));return B("",((a={})[""]=e,a),o,s,r,"",[])}}if(!p("json-parse")){var g,y,b=f.fromCharCode,w={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},v=function(){throw g=y=null,n()},_=function(){for(var e,t,n,r,o,s=y,i=s.length;g<i;)switch(o=s.charCodeAt(g)){case 9:case 10:case 13:case 32:g++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=a?s.charAt(g):s[g],g++,e;case 34:for(e="@",g++;g<i;)if((o=s.charCodeAt(g))<32)v();else if(92==o)switch(o=s.charCodeAt(++g)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=w[o],g++;break;case 117:for(t=++g,n=g+4;g<n;g++)48<=(o=s.charCodeAt(g))&&o<=57||97<=o&&o<=102||65<=o&&o<=70||v();e+=b("0x"+s.slice(t,g));break;default:v()}else{if(34==o)break;for(o=s.charCodeAt(g),t=g;32<=o&&92!=o&&34!=o;)o=s.charCodeAt(++g);e+=s.slice(t,g)}if(34==s.charCodeAt(g))return g++,e;v();default:if(t=g,45==o&&(r=!0,o=s.charCodeAt(++g)),48<=o&&o<=57){for(48==o&&(48<=(o=s.charCodeAt(g+1))&&o<=57)&&v(),r=!1;g<i&&(48<=(o=s.charCodeAt(g))&&o<=57);g++);if(46==s.charCodeAt(g)){for(n=++g;n<i&&(48<=(o=s.charCodeAt(n))&&o<=57);n++);n==g&&v(),g=n}if(101==(o=s.charCodeAt(g))||69==o){for(43!=(o=s.charCodeAt(++g))&&45!=o||g++,n=g;n<i&&(48<=(o=s.charCodeAt(n))&&o<=57);n++);n==g&&v(),g=n}return+s.slice(t,g)}if(r&&v(),"true"==s.slice(g,g+4))return g+=4,!0;if("false"==s.slice(g,g+5))return g+=5,!1;if("null"==s.slice(g,g+4))return g+=4,null;v()}return"$"},S=function(e){var t,n;if("$"==e&&v(),"string"==typeof e){if("@"==(a?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];"]"!=(e=_());n||(n=!0))n&&(","==e?"]"==(e=_())&&v():v()),","==e&&v(),t.push(S(e));return t}if("{"==e){for(t={};"}"!=(e=_());n||(n=!0))n&&(","==e?"}"==(e=_())&&v():v()),","!=e&&"string"==typeof e&&"@"==(a?e.charAt(0):e[0])&&":"==_()||v(),t[e.slice(1)]=S(_());return t}v()}return e},L=function(e,t,n){var r=U(e,t,n);r===C?delete e[t]:e[t]=r},U=function(e,t,n){var r,o=e[t];if("object"==typeof o&&o)if(I.call(o)==k)for(r=o.length;r--;)L(o,r,n);else O(o,function(e){L(o,e,n)});return n.call(e,t,o)};l.parse=function(e,t){var n,r;return g=0,y=""+e,n=S(_()),"$"!=_()&&v(),g=y=null,t&&I.call(t)==h?U(((r={})[""]=n,r),"",t):n}}}return l.runInContext=F,l}if(!t||t.global!==t&&t.window!==t&&t.self!==t||(q=t),e)F(q,e);else{var n=q.JSON,r=q.JSON3,o=!1,s=F(q,q.JSON3={noConflict:function(){return o||(o=!0,q.JSON=n,q.JSON3=r,n=r=null),s}});q.JSON={parse:s.parse,stringify:s.stringify}}}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/json3/lib/json3.js","/node_modules/json3/lib")},{_process:43,buffer:34,timers:64}],42:[function(e,c,t){(function(a,e,t,n,r,o,s,i,l,u,f){"use strict";!a.version||0===a.version.indexOf("v0.")||0===a.version.indexOf("v1.")&&0!==a.version.indexOf("v1.8.")?c.exports={nextTick:function(e,t,n,r){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,i=arguments.length;switch(i){case 0:case 1:return a.nextTick(e);case 2:return a.nextTick(function(){e.call(null,t)});case 3:return a.nextTick(function(){e.call(null,t,n)});case 4:return a.nextTick(function(){e.call(null,t,n,r)});default:for(o=new Array(i-1),s=0;s<o.length;)o[s++]=arguments[s];return a.nextTick(function(){e.apply(null,o)})}}}:c.exports=a}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/process-nextick-args/index.js","/node_modules/process-nextick-args")},{_process:43,buffer:34,timers:64}],43:[function(e,E,t){(function(e,t,n,r,o,s,i,a,l,u,f){var c,d;e=E.exports={};function p(){throw new Error("setTimeout has not been defined")}function h(){throw new Error("clearTimeout has not been defined")}function m(e){if(c===setTimeout)return setTimeout(e,0);if((c===p||!c)&&setTimeout)return c=setTimeout,setTimeout(e,0);try{return c(e,0)}catch(t){try{return c.call(null,e,0)}catch(t){return c.call(this,e,0)}}}!function(){try{c="function"==typeof setTimeout?setTimeout:p}catch(e){c=p}try{d="function"==typeof clearTimeout?clearTimeout:h}catch(e){d=h}}();var g,y=[],b=!1,w=-1;function v(){b&&g&&(b=!1,g.length?y=g.concat(y):w=-1,y.length&&_())}function _(){if(!b){var e=m(v);b=!0;for(var t=y.length;t;){for(g=y,y=[];++w<t;)g&&g[w].run();w=-1,t=y.length}g=null,b=!1,function(e){if(d===clearTimeout)return clearTimeout(e);if((d===h||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(e);try{d(e)}catch(t){try{return d.call(null,e)}catch(t){return d.call(this,e)}}}(e)}}function S(e,t){this.fun=e,this.array=t}function T(){}e.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];y.push(new S(e,t)),1!==y.length||b||m(_)},S.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=T,e.addListener=T,e.once=T,e.off=T,e.removeListener=T,e.removeAllListeners=T,e.emit=T,e.prependListener=T,e.prependOnceListener=T,e.listeners=function(e){return[]},e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/process/browser.js","/node_modules/process")},{_process:43,buffer:34,timers:64}],44:[function(e,M,j){(function(e,A,t,n,r,o,s,i,a,l,u){!function(e){var t="object"==typeof j&&j&&!j.nodeType&&j,n="object"==typeof M&&M&&!M.nodeType&&M,r="object"==typeof A&&A;r.global!==r&&r.window!==r&&r.self!==r||(e=r);var o,s,y=2147483647,b=36,w=1,v=26,i=38,a=700,_=72,S=128,T="-",l=/^xn--/,u=/[^\x20-\x7E]/,f=/[\x2E\u3002\uFF0E\uFF61]/g,c={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},d=b-w,E=Math.floor,O=String.fromCharCode;function C(e){throw new RangeError(c[e])}function p(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function h(e,t){var n=e.split("@"),r="";return 1<n.length&&(r=n[0]+"@",e=n[1]),r+p((e=e.replace(f,".")).split("."),t).join(".")}function I(e){for(var t,n,r=[],o=0,s=e.length;o<s;)55296<=(t=e.charCodeAt(o++))&&t<=56319&&o<s?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function R(e){return p(e,function(e){var t="";return 65535<e&&(t+=O((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=O(e)}).join("")}function N(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function k(e,t,n){var r=0;for(e=n?E(e/a):e>>1,e+=E(e/t);d*v>>1<e;r+=b)e=E(e/d);return E(r+(d+1)*e/(e+i))}function m(e){var t,n,r,o,s,i,a,l,u,f,c,d=[],p=e.length,h=0,m=S,g=_;for((n=e.lastIndexOf(T))<0&&(n=0),r=0;r<n;++r)128<=e.charCodeAt(r)&&C("not-basic"),d.push(e.charCodeAt(r));for(o=0<n?n+1:0;o<p;){for(s=h,i=1,a=b;p<=o&&C("invalid-input"),c=e.charCodeAt(o++),(b<=(l=c-48<10?c-22:c-65<26?c-65:c-97<26?c-97:b)||l>E((y-h)/i))&&C("overflow"),h+=l*i,!(l<(u=a<=g?w:g+v<=a?v:a-g));a+=b)i>E(y/(f=b-u))&&C("overflow"),i*=f;g=k(h-s,t=d.length+1,0==s),E(h/t)>y-m&&C("overflow"),m+=E(h/t),h%=t,d.splice(h++,0,m)}return R(d)}function g(e){var t,n,r,o,s,i,a,l,u,f,c,d,p,h,m,g=[];for(d=(e=I(e)).length,t=S,s=_,i=n=0;i<d;++i)(c=e[i])<128&&g.push(O(c));for(r=o=g.length,o&&g.push(T);r<d;){for(a=y,i=0;i<d;++i)t<=(c=e[i])&&c<a&&(a=c);for(a-t>E((y-n)/(p=r+1))&&C("overflow"),n+=(a-t)*p,t=a,i=0;i<d;++i)if((c=e[i])<t&&++n>y&&C("overflow"),c==t){for(l=n,u=b;!(l<(f=u<=s?w:s+v<=u?v:u-s));u+=b)m=l-f,h=b-f,g.push(O(N(f+m%h,0))),l=E(m/h);g.push(O(N(l,0))),s=k(n,p,r==o),n=0,++r}++n,++t}return g.join("")}if(o={version:"1.4.1",ucs2:{decode:I,encode:R},decode:m,encode:g,toASCII:function(e){return h(e,function(e){return u.test(e)?"xn--"+g(e):e})},toUnicode:function(e){return h(e,function(e){return l.test(e)?m(e.slice(4).toLowerCase()):e})}},t&&n)if(M.exports==t)n.exports=o;else for(s in o)o.hasOwnProperty(s)&&(t[s]=o[s]);else e.punycode=o}(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/punycode/punycode.js","/node_modules/punycode")},{_process:43,buffer:34,timers:64}],45:[function(e,c,t){(function(e,t,n,r,o,s,i,a,l,u,f){
39
- // Copyright Joyent, Inc. and other Node contributors.
40
- "use strict";c.exports=function(e,t,n,r){t=t||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var i=1e3;r&&"number"==typeof r.maxKeys&&(i=r.maxKeys);var a,l,u=e.length;0<i&&i<u&&(u=i);for(var f=0;f<u;++f){var c,d,p,h,m=e[f].replace(s,"%20"),g=m.indexOf(n);0<=g?(c=m.substr(0,g),d=m.substr(g+1)):(c=m,d=""),p=decodeURIComponent(c),h=decodeURIComponent(d),a=o,l=p,Object.prototype.hasOwnProperty.call(a,l)?y(o[p])?o[p].push(h):o[p]=[o[p],h]:o[p]=h}return o};var y=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/querystring-es3/decode.js","/node_modules/querystring-es3")},{_process:43,buffer:34,timers:64}],46:[function(e,m,t){(function(e,t,n,r,o,s,i,a,l,u,f){
41
- // Copyright Joyent, Inc. and other Node contributors.
42
- "use strict";var c=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};m.exports=function(n,r,o,e){return r=r||"&",o=o||"=",null===n&&(n=undefined),"object"==typeof n?p(h(n),function(e){var t=encodeURIComponent(c(e))+o;return d(n[e])?p(n[e],function(e){return t+encodeURIComponent(c(e))}).join(r):t+encodeURIComponent(c(n[e]))}).join(r):e?encodeURIComponent(c(e))+o+encodeURIComponent(c(n)):""};var d=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function p(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var h=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/querystring-es3/encode.js","/node_modules/querystring-es3")},{_process:43,buffer:34,timers:64}],47:[function(c,e,d){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";d.decode=d.parse=c("./decode"),d.encode=d.stringify=c("./encode")}).call(this,c("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},c("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],c("timers").setImmediate,c("timers").clearImmediate,"/node_modules/querystring-es3/index.js","/node_modules/querystring-es3")},{"./decode":45,"./encode":46,_process:43,buffer:34,timers:64}],48:[function(h,m,g){(function(e,t,o,n,r,s,i,a,l,u,f){var c=h("buffer");function d(e,t){for(var n in e)t[n]=e[n]}function p(e,t,n){return o(e,t,n)}(o=c.Buffer).from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?m.exports=c:(d(c,g),g.Buffer=p),d(o,p),p.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},p.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return t!==undefined?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},p.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},p.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return c.SlowBuffer(e)}}).call(this,h("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},h("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],h("timers").setImmediate,h("timers").clearImmediate,"/node_modules/safe-buffer/index.js","/node_modules/safe-buffer")},{_process:43,buffer:34,timers:64}],49:[function(y,e,b){(function(e,l,t,n,r,o,s,i,a,u,f){var c=y("./lib/request"),d=y("./lib/response"),p=y("xtend"),h=y("builtin-status-codes"),m=y("url"),g=b;g.request=function(e,t){e="string"==typeof e?m.parse(e):p(e);var n=-1===l.location.protocol.search(/^https?:$/)?"http:":"",r=e.protocol||n,o=e.hostname||e.host,s=e.port,i=e.path||"/";o&&-1!==o.indexOf(":")&&(o="["+o+"]"),e.url=(o?r+"//"+o:"")+(s?":"+s:"")+i,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var a=new c(e);return t&&a.on("response",t),a},g.get=function(e,t){var n=g.request(e,t);return n.end(),n},g.ClientRequest=c,g.IncomingMessage=d.IncomingMessage,g.Agent=function(){},g.Agent.defaultMaxSockets=4,g.globalAgent=new g.Agent,g.STATUS_CODES=h,g.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,y("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},y("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],y("timers").setImmediate,y("timers").clearImmediate,"/node_modules/stream-http/index.js","/node_modules/stream-http")},{"./lib/request":51,"./lib/response":52,_process:43,buffer:34,"builtin-status-codes":35,timers:64,url:66,xtend:70}],50:[function(e,t,b){(function(e,t,n,r,o,s,i,a,l,u,f){b.fetch=g(t.fetch)&&g(t.ReadableStream),b.writableStream=g(t.WritableStream),b.abortController=g(t.AbortController),b.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),b.blobConstructor=!0}catch(y){}var c;function d(){if(c!==undefined)return c;if(t.XMLHttpRequest){c=new t.XMLHttpRequest;try{c.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(y){c=null}}else c=null;return c}function p(e){var t=d();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(y){}return!1}var h="undefined"!=typeof t.ArrayBuffer,m=h&&g(t.ArrayBuffer.prototype.slice);function g(e){return"function"==typeof e}b.arraybuffer=b.fetch||h&&p("arraybuffer"),b.msstream=!b.fetch&&m&&p("ms-stream"),b.mozchunkedarraybuffer=!b.fetch&&h&&p("moz-chunked-arraybuffer"),b.overrideMimeType=b.fetch||!!d()&&g(d().overrideMimeType),b.vbArray=g(t.VBArray),c=null}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/stream-http/lib/capability.js","/node_modules/stream-http/lib")},{_process:43,buffer:34,timers:64}],51:[function(v,_,e){(function(u,f,c,e,t,n,r,o,s,i,a){var d=v("./capability"),l=v("inherits"),p=v("./response"),h=v("readable-stream"),m=v("to-arraybuffer"),g=p.IncomingMessage,y=p.readyStates;var b=_.exports=function(t){var e,n=this;h.Writable.call(n),n._opts=t,n._body=[],n._headers={},t.auth&&n.setHeader("Authorization","Basic "+new c(t.auth).toString("base64")),Object.keys(t.headers).forEach(function(e){n.setHeader(e,t.headers[e])});var r,o,s=!0;if("disable-fetch"===t.mode||"requestTimeout"in t&&!d.abortController)e=!(s=!1);else if("prefer-streaming"===t.mode)e=!1;else if("allow-wrong-content-type"===t.mode)e=!d.overrideMimeType;else{if(t.mode&&"default"!==t.mode&&"prefer-fast"!==t.mode)throw new Error("Invalid value for opts.mode");e=!0}n._mode=(r=e,o=s,d.fetch&&o?"fetch":d.mozchunkedarraybuffer?"moz-chunked-arraybuffer":d.msstream?"ms-stream":d.arraybuffer&&r?"arraybuffer":d.vbArray&&r?"text:vbarray":"text"),n._fetchTimer=null,n.on("finish",function(){n._onFinish()})};l(b,h.Writable),b.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===w.indexOf(n)&&(this._headers[n]={name:e,value:t})},b.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},b.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},b.prototype._onFinish=function(){var t=this;if(!t._destroyed){var e=t._opts,r=t._headers,n=null;"GET"!==e.method&&"HEAD"!==e.method&&(n=d.arraybuffer?m(c.concat(t._body)):d.blobConstructor?new f.Blob(t._body.map(function(e){return m(e)}),{type:(r["content-type"]||{}).value||""}):c.concat(t._body).toString());var o=[];if(Object.keys(r).forEach(function(e){var t=r[e].name,n=r[e].value;Array.isArray(n)?n.forEach(function(e){o.push([t,e])}):o.push([t,n])}),"fetch"===t._mode){var s=null;if(d.abortController){var i=new AbortController;s=i.signal,t._fetchAbortController=i,"requestTimeout"in e&&0!==e.requestTimeout&&(t._fetchTimer=f.setTimeout(function(){t.emit("requestTimeout"),t._fetchAbortController&&t._fetchAbortController.abort()},e.requestTimeout))}f.fetch(t._opts.url,{method:t._opts.method,headers:o,body:n||undefined,mode:"cors",credentials:e.withCredentials?"include":"same-origin",signal:s}).then(function(e){t._fetchResponse=e,t._connect()},function(e){f.clearTimeout(t._fetchTimer),t._destroyed||t.emit("error",e)})}else{var a=t._xhr=new f.XMLHttpRequest;try{a.open(t._opts.method,t._opts.url,!0)}catch(l){return void u.nextTick(function(){t.emit("error",l)})}"responseType"in a&&(a.responseType=t._mode.split(":")[0]),"withCredentials"in a&&(a.withCredentials=!!e.withCredentials),"text"===t._mode&&"overrideMimeType"in a&&a.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in e&&(a.timeout=e.requestTimeout,a.ontimeout=function(){t.emit("requestTimeout")}),o.forEach(function(e){a.setRequestHeader(e[0],e[1])}),t._response=null,a.onreadystatechange=function(){switch(a.readyState){case y.LOADING:case y.DONE:t._onXHRProgress()}},"moz-chunked-arraybuffer"===t._mode&&(a.onprogress=function(){t._onXHRProgress()}),a.onerror=function(){t._destroyed||t.emit("error",new Error("XHR error"))};try{a.send(n)}catch(l){return void u.nextTick(function(){t.emit("error",l)})}}}},b.prototype._onXHRProgress=function(){var e=this;(function(e){try{var t=e.status;return null!==t&&0!==t}catch(n){return!1}})(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress())},b.prototype._connect=function(){var t=this;t._destroyed||(t._response=new g(t._xhr,t._fetchResponse,t._mode,t._fetchTimer),t._response.on("error",function(e){t.emit("error",e)}),t.emit("response",t._response))},b.prototype._write=function(e,t,n){this._body.push(e),n()},b.prototype.abort=b.prototype.destroy=function(){var e=this;e._destroyed=!0,f.clearTimeout(e._fetchTimer),e._response&&(e._response._destroyed=!0),e._xhr?e._xhr.abort():e._fetchAbortController&&e._fetchAbortController.abort()},b.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=undefined),h.Writable.prototype.end.call(this,e,t,n)},b.prototype.flushHeaders=function(){},b.prototype.setTimeout=function(){},b.prototype.setNoDelay=function(){},b.prototype.setSocketKeepAlive=function(){};var w=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]}).call(this,v("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},v("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],v("timers").setImmediate,v("timers").clearImmediate,"/node_modules/stream-http/lib/request.js","/node_modules/stream-http/lib")},{"./capability":50,"./response":52,_process:43,buffer:34,inherits:40,"readable-stream":62,timers:64,"to-arraybuffer":65}],52:[function(g,e,y){(function(c,d,p,e,t,n,r,o,s,i,a){var h=g("./capability"),l=g("inherits"),m=g("readable-stream"),u=y.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},f=y.IncomingMessage=function(e,n,r,o){var s=this;if(m.Readable.call(s),s._mode=r,s.headers={},s.rawHeaders=[],s.trailers={},s.rawTrailers=[],s.on("end",function(){c.nextTick(function(){s.emit("close")})}),"fetch"===r){if(s._fetchResponse=n,s.url=n.url,s.statusCode=n.status,s.statusMessage=n.statusText,n.headers.forEach(function(e,t){s.headers[t.toLowerCase()]=e,s.rawHeaders.push(t,e)}),h.writableStream){var i=new WritableStream({write:function(n){return new Promise(function(e,t){s._destroyed?t():s.push(new p(n))?e():s._resumeFetch=e})},close:function(){d.clearTimeout(o),s._destroyed||s.push(null)},abort:function(e){s._destroyed||s.emit("error",e)}});try{return void n.body.pipeTo(i)["catch"](function(e){d.clearTimeout(o),s._destroyed||s.emit("error",e)})}catch(f){}}var a=n.body.getReader();!function t(){a.read().then(function(e){if(!s._destroyed){if(e.done)return d.clearTimeout(o),void s.push(null);s.push(new p(e.value)),t()}})["catch"](function(e){d.clearTimeout(o),s._destroyed||s.emit("error",e)})}()}else{if(s._xhr=e,s._pos=0,s.url=e.responseURL,s.statusCode=e.status,s.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach(function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(s.headers[n]===undefined&&(s.headers[n]=[]),s.headers[n].push(t[2])):s.headers[n]!==undefined?s.headers[n]+=", "+t[2]:s.headers[n]=t[2],s.rawHeaders.push(t[1],t[2])}}),s._charset="x-user-defined",!h.overrideMimeType){var l=s.rawHeaders["mime-type"];if(l){var u=l.match(/;\s*charset=([^;])(;|$)/);u&&(s._charset=u[1].toLowerCase())}s._charset||(s._charset="utf-8")}}};l(f,m.Readable),f.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},f.prototype._onXHRProgress=function(){var e=this,t=e._xhr,n=null;switch(e._mode){case"text:vbarray":if(t.readyState!==u.DONE)break;try{n=new d.VBArray(t.responseBody).toArray()}catch(a){}if(null!==n){e.push(new p(n));break}case"text":try{n=t.responseText}catch(a){e._mode="text:vbarray";break}if(n.length>e._pos){var r=n.substr(e._pos);if("x-user-defined"===e._charset){for(var o=new p(r.length),s=0;s<r.length;s++)o[s]=255&r.charCodeAt(s);e.push(o)}else e.push(r,e._charset);e._pos=n.length}break;case"arraybuffer":if(t.readyState!==u.DONE||!t.response)break;n=t.response,e.push(new p(new Uint8Array(n)));break;case"moz-chunked-arraybuffer":if(n=t.response,t.readyState!==u.LOADING||!n)break;e.push(new p(new Uint8Array(n)));break;case"ms-stream":if(n=t.response,t.readyState!==u.LOADING)break;var i=new d.MSStreamReader;i.onprogress=function(){i.result.byteLength>e._pos&&(e.push(new p(new Uint8Array(i.result.slice(e._pos)))),e._pos=i.result.byteLength)},i.onload=function(){e.push(null)},i.readAsArrayBuffer(n)}e._xhr.readyState===u.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,g("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],g("timers").setImmediate,g("timers").clearImmediate,"/node_modules/stream-http/lib/response.js","/node_modules/stream-http/lib")},{"./capability":50,_process:43,buffer:34,inherits:40,"readable-stream":62,timers:64}],53:[function(e,d,t){(function(e,t,n,r,o,s,i,a,l,u,f){var c={}.toString;d.exports=Array.isArray||function(e){return"[object Array]"==c.call(e)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/stream-http/node_modules/isarray/index.js","/node_modules/stream-http/node_modules/isarray")},{_process:43,buffer:34,timers:64}],54:[function(S,T,e){(function(e,t,n,r,o,s,i,a,l,u,f){
43
- // Copyright Joyent, Inc. and other Node contributors.
44
- "use strict";var c=S("process-nextick-args"),d=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};T.exports=w;var p=S("core-util-is");p.inherits=S("inherits");var h=S("./_stream_readable"),m=S("./_stream_writable");p.inherits(w,h);for(var g=d(m.prototype),y=0;y<g.length;y++){var b=g[y];w.prototype[b]||(w.prototype[b]=m.prototype[b])}function w(e){if(!(this instanceof w))return new w(e);h.call(this,e),m.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",v)}function v(){this.allowHalfOpen||this._writableState.ended||c.nextTick(_,this)}function _(e){e.end()}Object.defineProperty(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(w.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){this._readableState!==undefined&&this._writableState!==undefined&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),w.prototype._destroy=function(e,t){this.push(null),this.end(),c.nextTick(t,e)}}).call(this,S("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},S("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],S("timers").setImmediate,S("timers").clearImmediate,"/node_modules/stream-http/node_modules/readable-stream/lib/_stream_duplex.js","/node_modules/stream-http/node_modules/readable-stream/lib")},{"./_stream_readable":56,"./_stream_writable":58,_process:43,buffer:34,"core-util-is":36,inherits:40,"process-nextick-args":42,timers:64}],55:[function(h,m,e){(function(e,t,n,r,o,s,i,a,l,u,f){
45
- // Copyright Joyent, Inc. and other Node contributors.
46
- "use strict";m.exports=p;var c=h("./_stream_transform"),d=h("core-util-is");function p(e){if(!(this instanceof p))return new p(e);c.call(this,e)}d.inherits=h("inherits"),d.inherits(p,c),p.prototype._transform=function(e,t,n){n(null,e)}}).call(this,h("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},h("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],h("timers").setImmediate,h("timers").clearImmediate,"/node_modules/stream-http/node_modules/readable-stream/lib/_stream_passthrough.js","/node_modules/stream-http/node_modules/readable-stream/lib")},{"./_stream_transform":57,_process:43,buffer:34,"core-util-is":36,inherits:40,timers:64}],56:[function(F,H,e){(function(g,e,u,t,n,r,o,s,i,a,l){
47
- // Copyright Joyent, Inc. and other Node contributors.
48
- "use strict";var y=F("process-nextick-args");H.exports=O;var f,b=F("isarray");O.ReadableState=E;F("events").EventEmitter;var w=function(e,t){return e.listeners(t).length},c=F("./internal/streams/stream"),d=(u=F("safe-buffer").Buffer,e.Uint8Array||function(){});var p=F("core-util-is");p.inherits=F("inherits");var h=F("util"),v=void 0;v=h&&h.debuglog?h.debuglog("stream"):function(){};var m,_=F("./internal/streams/BufferList"),S=F("./internal/streams/destroy");p.inherits(O,c);var T=["error","close","destroy","pause","resume"];function E(e,t){e=e||{};var n=t instanceof(f=f||F("./_stream_duplex"));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,o=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new _,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.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(m||(m=F("string_decoder/").StringDecoder),this.decoder=new m(e.encoding),this.encoding=e.encoding)}function O(e){if(f=f||F("./_stream_duplex"),!(this instanceof O))return new O(e);this._readableState=new E(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),c.call(this)}function C(e,t,n,r,o){var s,i,a,l=e._readableState;null===t?(l.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,k(e)}(e,l)):(o||(s=function(e,t){var n;r=t,u.isBuffer(r)||r instanceof d||"string"==typeof t||t===undefined||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(l,t)),s?e.emit("error",s):l.objectMode||t&&0<t.length?("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===u.prototype||(i=t,t=u.from(i)),r?l.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):I(e,l,t,!0):l.ended?e.emit("error",new Error("stream.push() after EOF")):(l.reading=!1,l.decoder&&!n?(t=l.decoder.write(t),l.objectMode||0!==t.length?I(e,l,t,!1):M(e,l)):I(e,l,t,!1))):r||(l.reading=!1));return!(a=l).ended&&(a.needReadable||a.length<a.highWaterMark||0===a.length)}function I(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&k(e)),M(e,t)}Object.defineProperty(O.prototype,"destroyed",{get:function(){return this._readableState!==undefined&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),O.prototype.destroy=S.destroy,O.prototype._undestroy=S.undestroy,O.prototype._destroy=function(e,t){this.push(null),t(e)},O.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=u.from(e,t),t=""),n=!0),C(this,e,t,!1,n)},O.prototype.unshift=function(e){return C(this,e,null,!0,!1)},O.prototype.isPaused=function(){return!1===this._readableState.flowing},O.prototype.setEncoding=function(e){return m||(m=F("string_decoder/").StringDecoder),this._readableState.decoder=new m(e),this._readableState.encoding=e,this};var R=8388608;function N(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=(R<=(n=e)?n=R:(n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++),n)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));var n}function k(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(v("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?y.nextTick(A,e):A(e))}function A(e){v("emit readable"),e.emit("readable"),L(e)}function M(e,t){t.readingMore||(t.readingMore=!0,y.nextTick(j,e,t))}function j(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(v("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function x(e){v("readable nexttick read 0"),e.read(0)}function B(e,t){t.reading||(v("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(v("flow",t.flowing);t.flowing&&null!==e.read(););}function U(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var n=t.head,r=1,o=n.data;e-=o.length;for(;n=n.next;){var s=n.data,i=e>s.length?s.length:e;if(i===s.length?o+=s:o+=s.slice(0,e),0===(e-=i)){i===s.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n).data=s.slice(i);break}++r}return t.length-=r,o}(e,t):function(e,t){var n=u.allocUnsafe(e),r=t.head,o=1;r.data.copy(n),e-=r.data.length;for(;r=r.next;){var s=r.data,i=e>s.length?s.length:e;if(s.copy(n,n.length-e,0,i),0===(e-=i)){i===s.length?(++o,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r).data=s.slice(i);break}++o}return t.length-=o,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function D(e){var t=e._readableState;if(0<t.length)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,y.nextTick(P,t,e))}function P(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function q(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}O.prototype.read=function(e){v("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return v("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):k(this),null;if(0===(e=N(e,t))&&t.ended)return 0===t.length&&D(this),null;var r,o=t.needReadable;return v("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&v("length less than watermark",o=!0),t.ended||t.reading?v("reading or ended",o=!1):o&&(v("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=N(n,t))),null===(r=0<e?U(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&D(this)),null!==r&&this.emit("data",r),r},O.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},O.prototype.pipe=function(n,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=n;break;case 1:o.pipes=[o.pipes,n];break;default:o.pipes.push(n)}o.pipesCount+=1,v("pipe count=%d opts=%j",o.pipesCount,e);var t=(!e||!1!==e.end)&&n!==g.stdout&&n!==g.stderr?i:m;function s(e,t){v("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,v("cleanup"),n.removeListener("close",p),n.removeListener("finish",h),n.removeListener("drain",l),n.removeListener("error",d),n.removeListener("unpipe",s),r.removeListener("end",i),r.removeListener("end",m),r.removeListener("data",c),u=!0,!o.awaitDrain||n._writableState&&!n._writableState.needDrain||l())}function i(){v("onend"),n.end()}o.endEmitted?y.nextTick(t):r.once("end",t),n.on("unpipe",s);var a,l=(a=r,function(){var e=a._readableState;v("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&w(a,"data")&&(e.flowing=!0,L(a))});n.on("drain",l);var u=!1;var f=!1;function c(e){v("ondata"),(f=!1)!==n.write(e)||f||((1===o.pipesCount&&o.pipes===n||1<o.pipesCount&&-1!==q(o.pipes,n))&&!u&&(v("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,f=!0),r.pause())}function d(e){v("onerror",e),m(),n.removeListener("error",d),0===w(n,"error")&&n.emit("error",e)}function p(){n.removeListener("finish",h),m()}function h(){v("onfinish"),n.removeListener("close",p),m()}function m(){v("unpipe"),r.unpipe(n)}return r.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?b(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(n,"error",d),n.once("close",p),n.once("finish",h),n.emit("pipe",r),o.flowing||(v("pipe resume"),r.resume()),n},O.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var s=0;s<o;s++)r[s].emit("unpipe",this,n);return this}var i=q(t.pipes,e);return-1===i||(t.pipes.splice(i,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},O.prototype.addListener=O.prototype.on=function(e,t){var n=c.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&k(this):y.nextTick(x,this))}return n},O.prototype.resume=function(){var e,t,n=this._readableState;return n.flowing||(v("resume"),n.flowing=!0,e=this,(t=n).resumeScheduled||(t.resumeScheduled=!0,y.nextTick(B,e,t))),this},O.prototype.pause=function(){return v("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(v("pause"),this._readableState.flowing=!1,this.emit("pause")),this},O.prototype.wrap=function(t){var n=this,r=this._readableState,o=!1;for(var e in t.on("end",function(){if(v("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&n.push(e)}n.push(null)}),t.on("data",function(e){(v("wrapped data"),r.decoder&&(e=r.decoder.write(e)),!r.objectMode||null!==e&&e!==undefined)&&((r.objectMode||e&&e.length)&&(n.push(e)||(o=!0,t.pause())))}),t)this[e]===undefined&&"function"==typeof t[e]&&(this[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e));for(var s=0;s<T.length;s++)t.on(T[s],this.emit.bind(this,T[s]));return this._read=function(e){v("wrapped _read",e),o&&(o=!1,t.resume())},this},Object.defineProperty(O.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),O._fromList=U}).call(this,F("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},F("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],F("timers").setImmediate,F("timers").clearImmediate,"/node_modules/stream-http/node_modules/readable-stream/lib/_stream_readable.js","/node_modules/stream-http/node_modules/readable-stream/lib")},{"./_stream_duplex":54,"./internal/streams/BufferList":59,"./internal/streams/destroy":60,"./internal/streams/stream":61,_process:43,buffer:34,"core-util-is":36,events:37,inherits:40,isarray:53,"process-nextick-args":42,"safe-buffer":48,"string_decoder/":63,timers:64,util:32}],57:[function(g,y,e){(function(e,t,n,r,o,s,i,a,l,u,f){
49
- // Copyright Joyent, Inc. and other Node contributors.
50
- "use strict";y.exports=p;var c=g("./_stream_duplex"),d=g("core-util-is");function p(e){if(!(this instanceof p))return new p(e);c.call(this,e),this._transformState={afterTransform:function(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,(n.writecb=null)!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",h)}function h(){var n=this;"function"==typeof this._flush?this._flush(function(e,t){m(n,e,t)}):m(this,null,null)}function m(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}d.inherits=g("inherits"),d.inherits(p,c),p.prototype.push=function(e,t){return this._transformState.needTransform=!1,c.prototype.push.call(this,e,t)},p.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},p.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var o=this._readableState;(r.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},p.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},p.prototype._destroy=function(e,t){var n=this;c.prototype._destroy.call(this,e,function(e){t(e),n.emit("close")})}}).call(this,g("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},g("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],g("timers").setImmediate,g("timers").clearImmediate,"/node_modules/stream-http/node_modules/readable-stream/lib/_stream_transform.js","/node_modules/stream-http/node_modules/readable-stream/lib")},{"./_stream_duplex":54,_process:43,buffer:34,"core-util-is":36,inherits:40,timers:64}],58:[function(k,A,e){(function(e,t,y,n,r,o,s,i,a,l,u){
51
- // Copyright Joyent, Inc. and other Node contributors.
52
- "use strict";var b=k("process-nextick-args");function c(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}A.exports=T;var f,d=!e.browser&&-1<["v0.10","v0.9."].indexOf(e.version.slice(0,5))?i:b.nextTick;T.WritableState=S;var p=k("core-util-is");p.inherits=k("inherits");var h={deprecate:k("util-deprecate")},m=k("./internal/streams/stream"),w=(y=k("safe-buffer").Buffer,t.Uint8Array||function(){});var g,v=k("./internal/streams/destroy");function _(){}function S(e,t){f=f||k("./_stream_duplex"),e=e||{};var n=t instanceof f;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,o=e.writableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=(this.destroyed=!1)===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if(c=n,c.writing=!1,c.writecb=null,c.length-=c.writelen,c.writelen=0,t)i=e,a=n,l=r,u=t,f=o,--a.pendingcb,l?(b.nextTick(f,u),b.nextTick(N,i,a),i._writableState.errorEmitted=!0,i.emit("error",u)):(f(u),i._writableState.errorEmitted=!0,i.emit("error",u),N(i,a));else{var s=I(n);s||n.corked||n.bufferProcessing||!n.bufferedRequest||C(e,n),r?d(O,e,n,s,o):O(e,n,s,o)}var i,a,l,u,f;var c}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new c(this)}function T(e){if(f=f||k("./_stream_duplex"),!(g.call(T,this)||this instanceof f))return new T(e);this._writableState=new S(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e["final"]&&(this._final=e["final"])),m.call(this)}function E(e,t,n,r,o,s,i){t.writelen=r,t.writecb=i,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,s,t.onwrite),t.sync=!1}function O(e,t,n,r){var o,s;n||(o=e,0===(s=t).length&&s.needDrain&&(s.needDrain=!1,o.emit("drain"))),t.pendingcb--,r(),N(e,t)}function C(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),s=t.corkedRequestsFree;s.entry=n;for(var i=0,a=!0;n;)(o[i]=n).isBuf||(a=!1),n=n.next,i+=1;o.allBuffers=a,E(e,t,!0,t.length,o,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new c(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,u=n.encoding,f=n.callback;if(E(e,t,!1,t.objectMode?1:l.length,l,u,f),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function R(t,n){t._final(function(e){n.pendingcb--,e&&t.emit("error",e),n.prefinished=!0,t.emit("prefinish"),N(t,n)})}function N(e,t){var n,r,o=I(t);return o&&(n=e,(r=t).prefinished||r.finalCalled||("function"==typeof n._final?(r.pendingcb++,r.finalCalled=!0,b.nextTick(R,n,r)):(r.prefinished=!0,n.emit("prefinish"))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),o}p.inherits(T,m),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:h.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(g=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(e){return!!g.call(this,e)||this===T&&(e&&e._writableState instanceof S)}})):g=function(e){return e instanceof this},T.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},T.prototype.write=function(e,t,n){var r,o,s,i,a,l,u,f,c,d,p,h=this._writableState,m=!1,g=!h.objectMode&&(r=e,y.isBuffer(r)||r instanceof w);return g&&!y.isBuffer(e)&&(o=e,e=y.from(o)),"function"==typeof t&&(n=t,t=null),g?t="buffer":t||(t=h.defaultEncoding),"function"!=typeof n&&(n=_),h.ended?(c=this,d=n,p=new Error("write after end"),c.emit("error",p),b.nextTick(d,p)):(g||(s=this,i=h,l=n,f=!(u=!0),null===(a=e)?f=new TypeError("May not write null values to stream"):"string"==typeof a||a===undefined||i.objectMode||(f=new TypeError("Invalid non-string/buffer chunk")),f&&(s.emit("error",f),b.nextTick(l,f),u=!1),u))&&(h.pendingcb++,m=function(e,t,n,r,o,s){if(!n){var i=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=y.from(t,n));return t}(t,r,o);r!==i&&(n=!0,o="buffer",r=i)}var a=t.objectMode?1:r.length;t.length+=a;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:o,isBuf:n,callback:s,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else E(e,t,!1,a,r,o,s);return l}(this,h,g,e,t,n)),m},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||C(this,e))},T.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(-1<["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},T.prototype._writev=null,T.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,t=e=null):"function"==typeof t&&(n=t,t=null),null!==e&&e!==undefined&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?b.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n)},Object.defineProperty(T.prototype,"destroyed",{get:function(){return this._writableState!==undefined&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),T.prototype.destroy=v.destroy,T.prototype._undestroy=v.undestroy,T.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,k("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},k("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],k("timers").setImmediate,k("timers").clearImmediate,"/node_modules/stream-http/node_modules/readable-stream/lib/_stream_writable.js","/node_modules/stream-http/node_modules/readable-stream/lib")},{"./_stream_duplex":54,"./internal/streams/destroy":60,"./internal/streams/stream":61,_process:43,buffer:34,"core-util-is":36,inherits:40,"process-nextick-args":42,"safe-buffer":48,timers:64,"util-deprecate":68}],59:[function(d,p,e){(function(e,t,a,n,r,o,s,i,l,u,f){"use strict";a=d("safe-buffer").Buffer;var c=d("util");p.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};0<this.length?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},e.prototype.concat=function(e){if(0===this.length)return a.alloc(0);if(1===this.length)return this.head.data;for(var t,n,r,o=a.allocUnsafe(e>>>0),s=this.head,i=0;s;)t=s.data,n=o,r=i,t.copy(n,r),i+=s.data.length,s=s.next;return o},e}(),c&&c.inspect&&c.inspect.custom&&(p.exports.prototype[c.inspect.custom]=function(){var e=c.inspect({length:this.length});return this.constructor.name+" "+e})}).call(this,d("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},d("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],d("timers").setImmediate,d("timers").clearImmediate,"/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/BufferList.js","/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams")},{_process:43,buffer:34,"safe-buffer":48,timers:64,util:32}],60:[function(p,h,e){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";var c=p("process-nextick-args");function d(e,t){e.emit("error",t)}h.exports={destroy:function(e,t){var n=this,r=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return r||o?t?t(e):!e||this._writableState&&this._writableState.errorEmitted||c.nextTick(d,this,e):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?(c.nextTick(d,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})),this},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}}).call(this,p("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},p("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],p("timers").setImmediate,p("timers").clearImmediate,"/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/destroy.js","/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams")},{_process:43,buffer:34,"process-nextick-args":42,timers:64}],61:[function(c,d,e){(function(e,t,n,r,o,s,i,a,l,u,f){d.exports=c("events").EventEmitter}).call(this,c("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},c("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],c("timers").setImmediate,c("timers").clearImmediate,"/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams/stream-browser.js","/node_modules/stream-http/node_modules/readable-stream/lib/internal/streams")},{_process:43,buffer:34,events:37,timers:64}],62:[function(c,d,p){(function(e,t,n,r,o,s,i,a,l,u,f){(((p=d.exports=c("./lib/_stream_readable.js")).Stream=p).Readable=p).Writable=c("./lib/_stream_writable.js"),p.Duplex=c("./lib/_stream_duplex.js"),p.Transform=c("./lib/_stream_transform.js"),p.PassThrough=c("./lib/_stream_passthrough.js")}).call(this,c("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},c("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],c("timers").setImmediate,c("timers").clearImmediate,"/node_modules/stream-http/node_modules/readable-stream/readable-browser.js","/node_modules/stream-http/node_modules/readable-stream")},{"./lib/_stream_duplex.js":54,"./lib/_stream_passthrough.js":55,"./lib/_stream_readable.js":56,"./lib/_stream_transform.js":57,"./lib/_stream_writable.js":58,_process:43,buffer:34,timers:64}],63:[function(_,e,S){(function(e,t,n,r,o,s,i,a,l,u,f){
53
- // Copyright Joyent, Inc. and other Node contributors.
54
- "use strict";var c=(n=_("safe-buffer").Buffer).isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function d(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===c||!c(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=m,this.end=g,t=4;break;case"utf8":this.fillLast=h,t=4;break;case"base64":this.text=y,this.end=b,t=3;break;default:return this.write=w,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function p(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function h(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(1<e.lastNeed&&1<t.length){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(2<e.lastNeed&&2<t.length&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return n!==undefined?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function m(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(55296<=r&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function g(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function y(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function b(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function w(e){return e.toString(this.encoding)}function v(e){return e&&e.length?this.write(e):""}(S.StringDecoder=d).prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if((t=this.fillLast(e))===undefined)return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},d.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},d.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var o=p(t[r]);if(0<=o)return 0<o&&(e.lastNeed=o-1),o;if(--r<n||-2===o)return 0;if(0<=(o=p(t[r])))return 0<o&&(e.lastNeed=o-2),o;if(--r<n||-2===o)return 0;if(0<=(o=p(t[r])))return 0<o&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},d.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}).call(this,_("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},_("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],_("timers").setImmediate,_("timers").clearImmediate,"/node_modules/stream-http/node_modules/string_decoder/lib/string_decoder.js","/node_modules/stream-http/node_modules/string_decoder/lib")},{_process:43,buffer:34,"safe-buffer":48,timers:64}],64:[function(y,e,b){(function(e,t,n,r,o,s,i,a,l,u,f){var c=y("process/browser.js").nextTick,d=Function.prototype.apply,p=Array.prototype.slice,h={},m=0;function g(e,t){this._id=e,this._clearFn=t}b.setTimeout=function(){return new g(d.call(setTimeout,window,arguments),clearTimeout)},b.setInterval=function(){return new g(d.call(setInterval,window,arguments),clearInterval)},b.clearTimeout=b.clearInterval=function(e){e.close()},g.prototype.unref=g.prototype.ref=function(){},g.prototype.close=function(){this._clearFn.call(window,this._id)},b.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},b.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},b._unrefActive=b.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},b.setImmediate="function"==typeof a?a:function(e){var t=m++,n=!(arguments.length<2)&&p.call(arguments,1);return h[t]=!0,c(function(){h[t]&&(n?e.apply(null,n):e.call(null),b.clearImmediate(t))}),t},b.clearImmediate="function"==typeof l?l:function(e){delete h[e]}}).call(this,y("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},y("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],y("timers").setImmediate,y("timers").clearImmediate,"/node_modules/timers-browserify/main.js","/node_modules/timers-browserify")},{_process:43,buffer:34,"process/browser.js":43,timers:64}],65:[function(c,d,e){(function(e,t,o,n,r,s,i,a,l,u,f){o=c("buffer").Buffer;d.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(o.isBuffer(e)){for(var t=new Uint8Array(e.length),n=e.length,r=0;r<n;r++)t[r]=e[r];return t.buffer}throw new Error("Argument must be a Buffer")}}).call(this,c("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},c("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],c("timers").setImmediate,c("timers").clearImmediate,"/node_modules/to-arraybuffer/index.js","/node_modules/to-arraybuffer")},{_process:43,buffer:34,timers:64}],66:[function(h,e,m){(function(e,t,n,r,o,s,i,a,l,u,f){
55
- // Copyright Joyent, Inc. and other Node contributors.
56
- "use strict";var j=h("punycode"),x=h("./util");function I(){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}m.parse=p,m.resolve=function(e,t){return p(e,!1,!0).resolve(t)},m.resolveObject=function(e,t){return e?p(e,!1,!0).resolveObject(t):t},m.format=function(e){x.isString(e)&&(e=p(e));return e instanceof I?e.format():I.prototype.format.call(e)},m.Url=I;var B=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,L=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),U=["'"].concat(d),D=["%","/","?",";","#"].concat(U),P=["/","?","#"],q=/^[+a-z0-9A-Z_-]{0,63}$/,F=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,H={javascript:!0,"javascript:":!0},W={javascript:!0,"javascript:":!0},X={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},J=h("querystring");function p(e,t,n){if(e&&x.isObject(e)&&e instanceof I)return e;var r=new I;return r.parse(e,t,n),r}I.prototype.parse=function(e,t,n){if(!x.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),o=-1!==r&&r<e.indexOf("#")?"?":"#",s=e.split(o);s[0]=s[0].replace(/\\/g,"/");var i=e=s.join(o);if(i=i.trim(),!n&&1===e.split("#").length){var a=L.exec(i);if(a)return this.path=i,this.href=i,this.pathname=a[1],a[2]?(this.search=a[2],this.query=t?J.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var l=B.exec(i);if(l){var u=(l=l[0]).toLowerCase();this.protocol=u,i=i.substr(l.length)}if(n||l||i.match(/^\/\/[^@\/]+@[^@\/]+/)){var f="//"===i.substr(0,2);!f||l&&W[l]||(i=i.substr(2),this.slashes=!0)}if(!W[l]&&(f||l&&!X[l])){for(var c,d,p=-1,h=0;h<P.length;h++){-1!==(m=i.indexOf(P[h]))&&(-1===p||m<p)&&(p=m)}-1!==(d=-1===p?i.lastIndexOf("@"):i.lastIndexOf("@",p))&&(c=i.slice(0,d),i=i.slice(d+1),this.auth=decodeURIComponent(c)),p=-1;for(h=0;h<D.length;h++){var m;-1!==(m=i.indexOf(D[h]))&&(-1===p||m<p)&&(p=m)}-1===p&&(p=i.length),this.host=i.slice(0,p),i=i.slice(p),this.parseHost(),this.hostname=this.hostname||"";var g="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!g)for(var y=this.hostname.split(/\./),b=(h=0,y.length);h<b;h++){var w=y[h];if(w&&!w.match(q)){for(var v="",_=0,S=w.length;_<S;_++)127<w.charCodeAt(_)?v+="x":v+=w[_];if(!v.match(q)){var T=y.slice(0,h),E=y.slice(h+1),O=w.match(F);O&&(T.push(O[1]),E.unshift(O[2])),E.length&&(i="/"+E.join(".")+i),this.hostname=T.join(".");break}}}255<this.hostname.length?this.hostname="":this.hostname=this.hostname.toLowerCase(),g||(this.hostname=j.toASCII(this.hostname));var C=this.port?":"+this.port:"",I=this.hostname||"";this.host=I+C,this.href+=this.host,g&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==i[0]&&(i="/"+i))}if(!H[u])for(h=0,b=U.length;h<b;h++){var R=U[h];if(-1!==i.indexOf(R)){var N=encodeURIComponent(R);N===R&&(N=escape(R)),i=i.split(R).join(N)}}var k=i.indexOf("#");-1!==k&&(this.hash=i.substr(k),i=i.slice(0,k));var A=i.indexOf("?");if(-1!==A?(this.search=i.substr(A),this.query=i.substr(A+1),t&&(this.query=J.parse(this.query)),i=i.slice(0,A)):t&&(this.search="",this.query={}),i&&(this.pathname=i),X[u]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){C=this.pathname||"";var M=this.search||"";this.path=C+M}return this.href=this.format(),this},I.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,s="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&x.isObject(this.query)&&Object.keys(this.query).length&&(s=J.stringify(this.query));var i=this.search||s&&"?"+s||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||X[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),i&&"?"!==i.charAt(0)&&(i="?"+i),t+o+(n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}))+(i=i.replace("#","%23"))+r},I.prototype.resolve=function(e){return this.resolveObject(p(e,!1,!0)).format()},I.prototype.resolveObject=function(e){if(x.isString(e)){var t=new I;t.parse(e,!1,!0),e=t}for(var n=new I,r=Object.keys(this),o=0;o<r.length;o++){var s=r[o];n[s]=this[s]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var i=Object.keys(e),a=0;a<i.length;a++){var l=i[a];"protocol"!==l&&(n[l]=e[l])}return X[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!X[e.protocol]){for(var u=Object.keys(e),f=0;f<u.length;f++){var c=u[f];n[c]=e[c]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||W[e.protocol])n.pathname=e.pathname;else{for(var d=(e.pathname||"").split("/");d.length&&!(e.host=d.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),n.pathname=d.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var p=n.pathname||"",h=n.search||"";n.path=p+h}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var m=n.pathname&&"/"===n.pathname.charAt(0),g=e.host||e.pathname&&"/"===e.pathname.charAt(0),y=g||m||n.host&&e.pathname,b=y,w=n.pathname&&n.pathname.split("/")||[],v=(d=e.pathname&&e.pathname.split("/")||[],n.protocol&&!X[n.protocol]);if(v&&(n.hostname="",n.port=null,n.host&&(""===w[0]?w[0]=n.host:w.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===d[0]?d[0]=e.host:d.unshift(e.host)),e.host=null),y=y&&(""===d[0]||""===w[0])),g)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,w=d;else if(d.length)w||(w=[]),w.pop(),w=w.concat(d),n.search=e.search,n.query=e.query;else if(!x.isNullOrUndefined(e.search)){if(v)n.hostname=n.host=w.shift(),(O=!!(n.host&&0<n.host.indexOf("@"))&&n.host.split("@"))&&(n.auth=O.shift(),n.host=n.hostname=O.shift());return n.search=e.search,n.query=e.query,x.isNull(n.pathname)&&x.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var _=w.slice(-1)[0],S=(n.host||e.host||1<w.length)&&("."===_||".."===_)||""===_,T=0,E=w.length;0<=E;E--)"."===(_=w[E])?w.splice(E,1):".."===_?(w.splice(E,1),T++):T&&(w.splice(E,1),T--);if(!y&&!b)for(;T--;T)w.unshift("..");!y||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),S&&"/"!==w.join("/").substr(-1)&&w.push("");var O,C=""===w[0]||w[0]&&"/"===w[0].charAt(0);v&&(n.hostname=n.host=C?"":w.length?w.shift():"",(O=!!(n.host&&0<n.host.indexOf("@"))&&n.host.split("@"))&&(n.auth=O.shift(),n.host=n.hostname=O.shift()));return(y=y||n.host&&w.length)&&!C&&w.unshift(""),w.length?n.pathname=w.join("/"):(n.pathname=null,n.path=null),x.isNull(n.pathname)&&x.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},I.prototype.parseHost=function(){var e=this.host,t=c.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}}).call(this,h("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},h("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],h("timers").setImmediate,h("timers").clearImmediate,"/node_modules/url/url.js","/node_modules/url")},{"./util":67,_process:43,buffer:34,punycode:44,querystring:47,timers:64}],67:[function(e,c,t){(function(e,t,n,r,o,s,i,a,l,u,f){"use strict";c.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/url/util.js","/node_modules/url")},{_process:43,buffer:34,timers:64}],68:[function(e,d,t){(function(e,r,t,n,o,s,i,a,l,u,f){function c(e){try{if(!r.localStorage)return!1}catch(n){return!1}var t=r.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}d.exports=function(e,t){if(c("noDeprecation"))return e;var n=!1;return function(){if(!n){if(c("throwDeprecation"))throw new Error(t);c("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/util-deprecate/browser.js","/node_modules/util-deprecate")},{_process:43,buffer:34,timers:64}],69:[function(u,e,f){(function(A,e,M,t,n,r,o,s,i,a,l){var j=u("url"),x=u("child_process").spawn,B=u("fs");f.XMLHttpRequest=function(){"use strict";var w,v,_=this,S=u("http"),T=u("https"),E={},r=!1,O={"User-Agent":"node-XMLHttpRequest",Accept:"*/*"},C={},I={},o=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","content-transfer-encoding","cookie","cookie2","date","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"],i=["TRACE","TRACK","CONNECT"],R=!1,N=!1,s={};this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.readyState=this.UNSENT,this.onreadystatechange=null,this.responseText="",this.responseXML="",this.status=null,this.statusText=null,this.withCredentials=!1;this.open=function(e,t,n,r,o){if(this.abort(),N=!1,!(s=e)||-1!==i.indexOf(s))throw new Error("SecurityError: Request method not allowed");var s;E={method:e,url:t.toString(),async:"boolean"!=typeof n||n,user:r||null,password:o||null},k(this.OPENED)},this.setDisableHeaderCheck=function(e){r=e},this.setRequestHeader=function(e,t){if(this.readyState!==this.OPENED)throw new Error("INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN");if(n=e,r||n&&-1===o.indexOf(n.toLowerCase())){var n;if(R)throw new Error("INVALID_STATE_ERR: send flag is true");e=I[e.toLowerCase()]||e,I[e.toLowerCase()]=e,C[e]=C[e]?C[e]+", "+t:t}else console.warn('Refused to set unsafe header "'+e+'"')},this.getResponseHeader=function(e){return"string"==typeof e&&this.readyState>this.OPENED&&v&&v.headers&&v.headers[e.toLowerCase()]&&!N?v.headers[e.toLowerCase()]:null},this.getAllResponseHeaders=function(){if(this.readyState<this.HEADERS_RECEIVED||N)return"";var e="";for(var t in v.headers)"set-cookie"!==t&&"set-cookie2"!==t&&(e+=t+": "+v.headers[t]+"\r\n");return e.substr(0,e.length-2)},this.getRequestHeader=function(e){return"string"==typeof e&&I[e.toLowerCase()]?C[I[e.toLowerCase()]]:""},this.send=function(t){if(this.readyState!==this.OPENED)throw new Error("INVALID_STATE_ERR: connection must be opened before send() is called");if(R)throw new Error("INVALID_STATE_ERR: send has already been called");var o,n=!1,r=!1,s=j.parse(E.url);switch(s.protocol){case"https:":n=!0;case"http:":o=s.hostname;break;case"file:":r=!0;break;case undefined:case null:case"":o="localhost";break;default:throw new Error("Protocol not supported.")}if(r){if("GET"!==E.method)throw new Error("XMLHttpRequest: Only GET method is supported");if(E.async)B.readFile(s.pathname,"utf8",function(e,t){e?_.handleError(e):(_.status=200,_.responseText=t,k(_.DONE))});else try{this.responseText=B.readFileSync(s.pathname,"utf8"),this.status=200,k(_.DONE)}catch(b){this.handleError(b)}}else{var i=s.port||(n?443:80),a=s.pathname+(s.search?s.search:"");for(var l in O)I[l.toLowerCase()]||(C[l]=O[l]);if(C.Host=o,n&&443===i||80===i||(C.Host+=":"+s.port),E.user){"undefined"==typeof E.password&&(E.password="");var u=new M(E.user+":"+E.password);C.Authorization="Basic "+u.toString("base64")}"GET"===E.method||"HEAD"===E.method?t=null:t?(C["Content-Length"]=M.isBuffer(t)?t.length:M.byteLength(t),C["Content-Type"]||(C["Content-Type"]="text/plain;charset=UTF-8")):"POST"===E.method&&(C["Content-Length"]=0);var f={host:o,port:i,path:a,method:E.method,headers:C,agent:!1,withCredentials:_.withCredentials};if(N=!1,E.async){var c=n?T.request:S.request;R=!0,_.dispatchEvent("readystatechange");var d=function(e){_.handleError(e)};w=c(f,function e(t){if(301!==(v=t).statusCode&&302!==v.statusCode&&303!==v.statusCode&&307!==v.statusCode)v.setEncoding("utf8"),k(_.HEADERS_RECEIVED),_.status=v.statusCode,v.on("data",function(e){e&&(_.responseText+=e),R&&k(_.LOADING)}),v.on("end",function(){R&&(k(_.DONE),R=!1)}),v.on("error",function(e){_.handleError(e)});else{E.url=v.headers.location;var n=j.parse(E.url);o=n.hostname;var r={hostname:n.hostname,port:n.port,path:n.path,method:303===v.statusCode?"GET":E.method,headers:C,withCredentials:_.withCredentials};(w=c(r,e).on("error",d)).end()}}).on("error",d),t&&w.write(t),w.end(),_.dispatchEvent("loadstart")}else{var p=".node-xmlhttprequest-content-"+A.pid,h=".node-xmlhttprequest-sync-"+A.pid;B.writeFileSync(h,"","utf8");for(var m="var http = require('http'), https = require('https'), fs = require('fs');var doRequest = http"+(n?"s":"")+".request;var options = "+JSON.stringify(f)+";var responseText = '';var req = doRequest(options, function(response) {response.setEncoding('utf8');response.on('data', function(chunk) { responseText += chunk;});response.on('end', function() {fs.writeFileSync('"+p+"', JSON.stringify({err: null, data: {statusCode: response.statusCode, headers: response.headers, text: responseText}}), 'utf8');fs.unlinkSync('"+h+"');});response.on('error', function(error) {fs.writeFileSync('"+p+"', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('"+h+"');});}).on('error', function(error) {fs.writeFileSync('"+p+"', JSON.stringify({err: error}), 'utf8');fs.unlinkSync('"+h+"');});"+(t?"req.write('"+JSON.stringify(t).slice(1,-1).replace(/'/g,"\\'")+"');":"")+"req.end();",g=x(A.argv[0],["-e",m]);B.existsSync(h););var y=JSON.parse(B.readFileSync(p,"utf8"));g.stdin.end(),B.unlinkSync(p),y.err?_.handleError(y.err):(v=y.data,_.status=y.data.statusCode,_.responseText=y.data.text,k(_.DONE))}}},this.handleError=function(e){this.status=0,this.statusText=e,this.responseText=e.stack,N=!0,k(this.DONE),this.dispatchEvent("error")},this.abort=function(){w&&(w.abort(),w=null),C=O,this.status=0,this.responseText="",this.responseXML="",N=!0,this.readyState===this.UNSENT||this.readyState===this.OPENED&&!R||this.readyState===this.DONE||(R=!1,k(this.DONE)),this.readyState=this.UNSENT,this.dispatchEvent("abort")},this.addEventListener=function(e,t){e in s||(s[e]=[]),s[e].push(t)},this.removeEventListener=function(e,t){e in s&&(s[e]=s[e].filter(function(e){return e!==t}))},this.dispatchEvent=function(e){if("function"==typeof _["on"+e]&&_["on"+e](),e in s)for(var t=0,n=s[e].length;t<n;t++)s[e][t].call(_)};var k=function(e){e!=_.LOADING&&_.readyState===e||(_.readyState=e,(E.async||_.readyState<_.OPENED||_.readyState===_.DONE)&&_.dispatchEvent("readystatechange"),_.readyState!==_.DONE||N||(_.dispatchEvent("load"),_.dispatchEvent("loadend")))}}}).call(this,u("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},u("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],u("timers").setImmediate,u("timers").clearImmediate,"/node_modules/xmlhttprequest/lib/XMLHttpRequest.js","/node_modules/xmlhttprequest/lib")},{_process:43,buffer:34,child_process:33,fs:33,http:49,https:38,timers:64,url:66}],70:[function(e,d,t){(function(e,t,n,r,o,s,i,a,l,u,f){d.exports=function(){for(var e={},t=0;t<arguments.length;t++){var n=arguments[t];for(var r in n)c.call(n,r)&&(e[r]=n[r])}return e};var c=Object.prototype.hasOwnProperty}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],e("timers").setImmediate,e("timers").clearImmediate,"/node_modules/xtend/immutable.js","/node_modules/xtend")},{_process:43,buffer:34,timers:64}]},{},[15])(15)});