/*!
* Pusher JavaScript Library v4.3.1 * https://pusher.com/ * * Copyright 2017, Pusher * Released under the MIT licence. */
!function(t,e){“object”==typeof exports&&“object”==typeof module?module.exports=e():“function”==typeof define&&define.amd?define([],e):“object”==typeof exports?exports.Pusher=e():t.Pusher=e()}(this,function(){return function(t){function e®{if(n)return n.exports;var i=n={exports:{},id:r,loaded:!1};return t.call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p=“”,e(0)}([function(t,e,n){“use strict”;var r=n(1);t.exports=r.default},function(t,e,n){“use strict”;function r(t){if(null===t||void 0===t)throw“You must pass your app key when you instantiate Pusher.”}var i=n(2),o=n(9),s=n(24),a=n(39),u=n(40),c=n(41),h=n(12),f=n(5),l=n(71),p=n(8),d=n(43),y=n(14),g=function(){function t(e,n){var h=this;if(r(e),n=n||{},!n.cluster&&!n.wsHost&&!n.httpHost){var g=y.default.buildLogSuffix(“javascriptQuickStart”);p.default.warn(“You should always specify a cluster when connecting. ”+g)}this.key=e,this.config=o.extend(l.getGlobalConfig(),n.cluster?l.getClusterConfig(n.cluster):{},n),this.channels=d.default.createChannels(),this.global_emitter=new s.default,this.sessionID=Math.floor(1e9*Math.random()),this.timeline=new a.default(this.key,this.sessionID,{cluster:this.config.cluster,features:t.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:u.default.INFO,version:f.default.VERSION}),this.config.disableStats||(this.timelineSender=d.default.createTimelineSender(this.timeline,{host:this.config.statsHost,path:“/timeline/v2/”+i.default.TimelineTransport.name}));var v=function(t){var e=o.extend({},h.config,t);return c.build(i.default.getDefaultStrategy(e),e)};this.connection=d.default.createConnectionManager(this.key,o.extend({getStrategy:v,timeline:this.timeline,activityTimeout:this.config.activity_timeout,pongTimeout:this.config.pong_timeout,unavailableTimeout:this.config.unavailable_timeout},this.config,{useTLS:this.shouldUseTLS()})),this.connection.bind(“connected”,function(){h.subscribeAll(),h.timelineSender&&h.timelineSender.send(h.connection.isUsingTLS())}),this.connection.bind(“message”,function(t){var e=0===t.event.indexOf(“pusher_internal:”);if(t.channel){var n=h.channel(t.channel);n&&n.handleEvent(t.event,t.data)}e||h.global_emitter.emit(t.event,t.data)}),this.connection.bind(“connecting”,function(){h.channels.disconnect()}),this.connection.bind(“disconnected”,function(){h.channels.disconnect()}),this.connection.bind(“error”,function(t){p.default.warn(“Error”,t)}),t.instances.push(this),this.timeline.info({instances:t.instances.length}),t.isReady&&this.connect()}return t.ready=function(){t.isReady=!0;for(var e=0,n=t.instances.length;ee
“]”,i=!1,o=function(){i||(t.apply(null,arguments),i=!0)};return this=o,{number:e,id:n,name:r,callback:o}},t.prototype.remove=function(t){delete this},t}();e.ScriptReceiverFactory=n,e.ScriptReceivers=new n(“pusher_script”,“Pusher.ScriptReceivers”)},function(t,e){“use strict”;var n={VERSION:“4.3.1”,PROTOCOL:7,host:“ws.pusherapp.com”,ws_port:80,wss_port:443,ws_path:“”,sockjs_host:“sockjs.pusher.com”,sockjs_http_port:80,sockjs_https_port:443,sockjs_path:“/pusher”,stats_host:“stats.pusher.com”,channel_auth_endpoint:“/pusher/auth”,channel_auth_transport:“ajax”,activity_timeout:12e4,pong_timeout:3e4,unavailable_timeout:1e4,cdn_“http://js.pusher.com”,cdn_https:“https://js.pusher.com”,dependency_suffix:“.min”};e.__esModule=!0,e.default=n},function(t,e,n){“use strict”;var r=n(4),i=n(2),o=function(){function t(t){this.options=t,this.receivers=t.receivers||r.ScriptReceivers,this.loading={}}return t.prototype.load=function(t,e,n){var r=this;if(r.loading&&r.loading.length>0)r.loading.push(n);else{r.loading=[n];var o=i.default.createScriptRequest(r.getPath(t,e)),s=r.receivers.create(function(e){if(r.receivers.remove(s),r.loading){var n=r.loading;delete r.loading;for(var i=function(t){t||o.cleanup()},a=0;as.status
(“Clients must be authenticated to join private or presence channels. ”+i)),n(!0,s.status)}},s.send(this.composeQuery(e)),s};e.__esModule=!0,e.default=s},function(t,e,n){“use strict”;var r=n(9),i=n(1),o={debug:function(){for(var t=[],e=0;eo
“]”);else{a={};for(s in r)Object.prototype.hasOwnProperty.call(r,s)&&(a=t(r,i+“”))}return a;case“number”:case“string”:case“boolean”:return r}}(t,“$”)}function w(t){try{return JSON.stringify(t)}catch(e){return JSON.stringify(m(t))}}var _=n(10),S=n(11);e.extend=r,e.stringify=i,e.arrayIndexOf=o,e.objectApply=s,e.keys=a,e.values=u,e.apply=c,e.map=h,e.mapObject=f,e.filter=l,e.filterObject=p,e.flatten=d,e.any=y,e.all=g,e.encodeParamsObject=v,e.buildQueryString=b,e.decycleObject=m,e.safeJSONStringify=w},function(t,e,n){“use strict”;function r(t){return l(h(t))}e.__esModule=!0,e.default=r;for(var i=String.fromCharCode,o=“ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/”,s={},a=0,u=o.length;a=a;var c=function(t){var e=t.charCodeAt(0);return e<128?t:e<2048?i(192|e>>>6)+i(128|63&e):i(224|e>>>12&15)+i(128|e>>>6&63)+i(128|63&e)},h=function(t){return t.replace(//g,c)},f=function(t){var e=[t.replace(/{1,3}/g,f)}},function(t,e,n){”use strict“;var r=n(12),i={now:function(){return Date.now?Date.now():(new Date).valueOf()},defer:function(t){return new r.OneOffTimer(0,t)},method:function(t){for(var e=[],n=1;ni
”’]“;s.src=this.options.authEndpoint+”?callback=“+encodeURIComponent(a)+”&“+this.composeQuery(e);var u=o.getElementsByTagName(”head“)||o.documentElement;u.insertBefore(s,u.firstChild)};e.__esModule=!0,e.default=i},function(t,e){”use strict“;var n=function(){function t(t){this.src=t}return t.prototype.send=function(t){var e=this,n=”Error loading “+e.src;e.script=document.createElement(”script“),e.script.id=t.id,e.script.src=e.src,e.script.type=”text/javascript“,e.script.charset=”UTF-8“,e.script.addEventListener?(e.script.onerror=function(){t.callback(n)},e.script.onload=function(){t.callback(null)}):e.script.onreadystatechange=function(){”loaded“!==e.script.readyState&&”complete“!==e.script.readyState||t.callback(null)},void 0===e.script.async&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(e.errorScript=document.createElement(”script“),e.errorScript.id=t.id+”_error“,e.errorScript.text=t.name+”('“n
”');“,e.script.async=e.errorScript.async=!1):e.script.async=!0;var r=document.getElementsByTagName(”head“);r.insertBefore(e.script,r.firstChild),e.errorScript&&r.insertBefore(e.errorScript,e.script.nextSibling)},t.prototype.cleanup=function(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null},t}();e.__esModule=!0,e.default=n},function(t,e,n){”use strict“;var r=n(9),i=n(2),o=function(){function t(t,e){this.url=t,this.data=e}return t.prototype.send=function(t){if(!this.request){var e=r.buildQueryString(this.data),n=this.url+”/“t.number
”?“+e;this.request=i.default.createScriptRequest(n),this.request.send(t)}},t.prototype.cleanup=function(){this.request&&this.request.cleanup()},t}();e.__esModule=!0,e.default=o},function(t,e,n){”use strict“;var r=n(2),i=n(4),o=function(t,e){return function(n,o){var s=”http“+(e?”s“:”“)+”://“,a=s+(t.host||t.options.host)+t.options.path,u=r.default.createJSONPRequest(a,n),c=r.default.ScriptReceivers.create(function(e,n){i.ScriptReceivers.remove©,u.cleanup(),n&&n.host&&(t.host=n.host),o&&o(e,n)});u.send©}},s={name:”jsonp“,getAgent:o};e.__esModule=!0,e.default=s},function(t,e,n){”use strict“;var r=n(20),i=n(22),o=n(21),s=n(2),a=n(3),u=n(9),c=new i.default({file:”sockjs“,urls:o.sockjs,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return void 0!==window.SockJS},getSocket:function(t,e){return new window.SockJS(t,null,{js_path:a.Dependencies.getPath(”sockjs“,{useTLS:e.useTLS}),ignore_null_origin:e.ignoreNullOrigin})},beforeOpen:function(t,e){t.send(JSON.stringify({path:e}))}}),h={isSupported:function(t){var e=s.default.isXDRSupported(t.useTLS);return e}},f=new i.default(u.extend({},r.streamingConfiguration,h)),l=new i.default(u.extend({},r.pollingConfiguration,h));r.default.xdr_streaming=f,r.default.xdr_polling=l,r.default.sockjs=c,e.__esModule=!0,e.default=r.default},function(t,e,n){”use strict“;var r=n(21),i=n(22),o=n(9),s=n(2),a=new i.default({urls:r.ws,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return Boolean(s.default.getWebSocketAPI())},isSupported:function(){return Boolean(s.default.getWebSocketAPI())},getSocket:function(t){return s.default.createWebSocket(t)}}),u={urls:r.http,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}};e.streamingConfiguration=o.extend({getSocket:function(t){return s.default.HTTPFactory.createStreamingSocket(t)}},u),e.pollingConfiguration=o.extend({getSocket:function(t){return s.default.HTTPFactory.createPollingSocket(t)}},u);var c={isSupported:function(){return s.default.isXHRSupported()}},h=new i.default(o.extend({},e.streamingConfiguration,c)),f=new i.default(o.extend({},e.pollingConfiguration,c)),l={ws:a,xhr_streaming:h,xhr_polling:f};e.__esModule=!0,e.default=l},function(t,e,n){”use strict“;function r(t,e,n){var r=t+(e.useTLS?”s“:”“),i=e.useTLS?e.hostTLS:e.hostNonTLS;return r+”://“+i+n}function i(t,e){var n=”/app/“+t,r=”?protocol=“o.default.PROTOCOL
”&client=js&version=“o.default.VERSION
(e?”&“+e:”“);return n+r}var o=n(5);e.ws={getInitial:function(t,e){var n=(e.httpPath||”“)+i(t,”flash=false“);return r(”ws“,e,n)}},e.http={getInitial:function(t,e){var n=(e.httpPath||”/pusher“)+i(t);return r(”http“,e,n)}},e.sockjs={getInitial:function(t,e){return r(”http“,e,e.httpPath||”/pusher“)},getPath:function(t,e){return i(t)}}},function(t,e,n){”use strict“;var r=n(23),i=function(){function t(t){this.hooks=t}return t.prototype.isSupported=function(t){return this.hooks.isSupported(t)},t.prototype.createConnection=function(t,e,n,i){return new r.default(this.hooks,t,e,n,i)},t}();e.__esModule=!0,e.default=i},function(t,e,n){”use strict“;var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty®&&(t=e);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(11),o=n(9),s=n(24),a=n(8),u=n(2),c=function(t){function e(e,n,r,i,o){t.call(this),this.initialize=u.default.transportConnectionInitializer,this.hooks=e,this.name=n,this.priority=r,this.key=i,this.options=o,this.state=”new“,this.timeline=o.timeline,this.activityTimeout=o.activityTimeout,this.id=this.timeline.generateUniqueID()}return r(e,t),e.prototype.handlesActivityChecks=function(){return Boolean(this.hooks.handlesActivityChecks)},e.prototype.supportsPing=function(){return Boolean(this.hooks.supportsPing)},e.prototype.connect=function(){var t=this;if(this.socket||”initialized“!==this.state)return!1;var e=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(e,this.options)}catch(e){return i.default.defer(function(){t.onError(e),t.changeState(”closed“)}),!1}return this.bindListeners(),a.default.debug(”Connecting“,{transport:this.name,url:e}),this.changeState(”connecting“),!0},e.prototype.close=function(){return!!this.socket&&(this.socket.close(),!0)},e.prototype.send=function(t){var e=this;return”open“===this.state&&(i.default.defer(function(){e.socket&&e.socket.send(t)}),!0)},e.prototype.ping=function(){”open“===this.state&&this.supportsPing()&&this.socket.ping()},e.prototype.onOpen=function(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState(”open“),this.socket.onopen=void 0},e.prototype.onError=function(t){this.emit(”error“,{type:”WebSocketError“,error:t}),this.timeline.error(this.buildTimelineMessage({error:t.toString()}))},e.prototype.onClose=function(t){t?this.changeState(”closed“,{code:t.code,reason:t.reason,wasClean:t.wasClean}):this.changeState(”closed“),this.unbindListeners(),this.socket=void 0},e.prototype.onMessage=function(t){this.emit(”message“,t)},e.prototype.onActivity=function(){this.emit(”activity“)},e.prototype.bindListeners=function(){var t=this;this.socket.onopen=function(){t.onOpen()},this.socket.onerror=function(e){t.onError(e)},this.socket.onclose=function(e){t.onClose(e)},this.socket.onmessage=function(e){t.onMessage(e)},this.supportsPing()&&(this.socket.onactivity=function(){t.onActivity()})},e.prototype.unbindListeners=function(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))},e.prototype.changeState=function(t,e){this.state=t,this.timeline.info(this.buildTimelineMessage({state:t,params:e})),this.emit(t,e)},e.prototype.buildTimelineMessage=function(t){return o.extend({cid:this.id},t)},e}(s.default);e.__esModule=!0,e.default=c},function(t,e,n){”use strict“;var r=n(9),i=n(25),o=function(){function t(t){this.callbacks=new i.default,this.global_callbacks=[],this.failThrough=t}return t.prototype.bind=function(t,e,n){return this.callbacks.add(t,e,n),this},t.prototype.bind_global=function(t){return this.global_callbacks.push(t),this},t.prototype.unbind=function(t,e,n){return this.callbacks.remove(t,e,n),this},t.prototype.unbind_global=function(t){return t?(this.global_callbacks=r.filter(this.global_callbacks||[],function(e){return e!==t}),this):(this.global_callbacks=[],this)},t.prototype.unbind_all=function(){return this.unbind(),this.unbind_global(),this},t.prototype.emit=function(t,e){var n;for(n=0;ne
”/xhr_send“}function o(t){var e=t.indexOf(”?“)===-1?”?“:”&“;return t+e+”t=“+ +new Date+”&n=“l+
}function s(t,e){var n=/(https?://)(+)((/|:)?.*)/.exec(t);return n+e+n}function a(t){return Math.floor(Math.random()*t)}function u(t){for(var e=[],n=0;n<t;n++)e.push(a(32).toString(32));return e.join(”“)}var c=n(35),h=n(11),f=n(2),l=1,p=function(){function t(t,e){this.hooks=t,this.session=a(1e3)+”/“+u(8),this.location=r(e),this.readyState=c.default.CONNECTING,this.openStream()}return t.prototype.send=function(t){return this.sendRaw(JSON.stringify())},t.prototype.ping=function(){this.hooks.sendHeartbeat(this)},t.prototype.close=function(t,e){this.onClose(t,e,!0)},t.prototype.sendRaw=function(t){if(this.readyState!==c.default.OPEN)return!1;try{return f.default.createSocketRequest(”POST“,o(i(this.location,this.session))).start(t),!0}catch(t){return!1}},t.prototype.reconnect=function(){this.closeStream(),this.openStream()},t.prototype.onClose=function(t,e,n){this.closeStream(),this.readyState=c.default.CLOSED,this.onclose&&this.onclose({code:t,reason:e,wasClean:n})},t.prototype.onChunk=function(t){if(200===t.status){this.readyState===c.default.OPEN&&this.onActivity();var e,n=t.data.slice(0,1);switch(n){case”o“:e=JSON.parse(t.data.slice(1)||”{}“),this.onOpen(e);break;case”a“:e=JSON.parse(t.data.slice(1)||”[]“);for(var r=0;re
”/xhr_streaming“+t.queryString},onHeartbeat:function(t){t.sendRaw(”[]“)},sendHeartbeat:function(t){t.sendRaw(”“)},onFinished:function(t,e){t.onClose(1006,”Connection interrupted (“e
”)“,!1)}};e.__esModule=!0,e.default=n},function(t,e){”use strict“;var n={getReceiveURL:function(t,e){return t.base+”/“e
”/xhr“+t.queryString},onHeartbeat:function(){},sendHeartbeat:function(t){t.sendRaw(”[]“)},onFinished:function(t,e){200===e?t.reconnect():t.onClose(1006,”Connection interrupted (“e
”)“,!1)}};e.__esModule=!0,e.default=n},function(t,e,n){”use strict“;var r=n(2),i={getRequest:function(t){var e=r.default.getXHRAPI(),n=new e;return n.onreadystatechange=n.onprogress=function(){switch(n.readyState){case 3:n.responseText&&n.responseText.length>0&&t.onChunk(n.status,n.responseText);break;case 4:n.responseText&&n.responseText.length>0&&t.onChunk(n.status,n.responseText),t.emit(”finished“,n.status),t.close()}},n},abortRequest:function(t){t.onreadystatechange=null,t.abort()}};e.__esModule=!0,e.default=i},function(t,e,n){”use strict“;var r=n(9),i=n(11),o=n(40),s=function(){function t(t,e,n){this.key=t,this.session=e,this.events=[],this.options=n||{},this.sent=0,this.uniqueID=0}return t.prototype.log=function(t,e){t<=this.options.level&&(this.events.push(r.extend({},e,{timestamp:i.default.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())},t.prototype.error=function(t){this.log(o.default.ERROR,t)},t.prototype.info=function(t){this.log(o.default.INFO,t)},t.prototype.debug=function(t){this.log(o.default.DEBUG,t)},t.prototype.isEmpty=function(){return 0===this.events.length},t.prototype.send=function(t,e){var n=this,i=r.extend({session:this.session,bundle:this.sent+1,key:this.key,lib:”js“,version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],t(i,function(t,r){t||n.sent++,e&&e(t,r)}),!0},t.prototype.generateUniqueID=function(){return this.uniqueID++,this.uniqueID},t}();e.__esModule=!0,e.default=s},function(t,e){”use strict“;var n;!function(t){t=”ERROR“,t=”INFO“,t=”DEBUG“}(n||(n={})),e.__esModule=!0,e.default=n},function(t,e,n){”use strict“;function r(t){return function(e){return}}function i(t){return”string“==typeof t&&”:“===t.charAt(0)}function o(t,e){return e}function s(t,e){if(0===t.length)return[,e];var n=c(t,e),r=s(t.slice(1),n);return[[n].concat(r),r]}function a(t,e){if(!i(t))return;var n=o(t,e);if(void 0===n)throw”Undefined symbol “+t;return}function u(t,e){if(i(t)){var n=o(t,e);if(t.length>1){if(”function“!=typeof n)throw”Calling non-function “+t;var r=.concat(h.map(t.slice(1),function(t){return c(t,h.extend({},e))}));return n.apply(this,r)}return}return s(t,e)}function c(t,e){return”string“==typeof t?a(t,e):”object“==typeof t&&t instanceof Array&&t.length>0?u(t,e):}var h=n(9),f=n(11),l=n(42),p=n(31),d=n(64),y=n(65),g=n(66),v=n(67),b=n(68),m=n(69),w=n(70),_=n(2),S=_.default.Transports;e.build=function(t,e){var n=h.extend({},T,e);return c(t,n).strategy};var k={isSupported:function(){return!1},connect:function(t,e){var n=f.default.defer(function(){e(new p.UnsupportedStrategy)});return{abort:function(){n.ensureAborted()},forceMinPriority:function(){}}}},T={extend:function(t,e,n){return},def:function(t,e,n){if(void 0!==t)throw”Redefining symbol “+e;return t=n,[void 0,t]},def_transport:function(t,e,n,r,i,o){var s=S;if(!s)throw new p.UnsupportedTransport(n);var a,u=!(t.enabledTransports&&h.arrayIndexOf(t.enabledTransports,e)===-1||t.disabledTransports&&h.arrayIndexOf(t.disabledTransports,e)!==-1);a=u?new d.default(e,r,o?o.getAssistant(s):s,h.extend({key:t.key,useTLS:t.useTLS,timeline:t.timeline,ignoreNullOrigin:t.ignoreNullOrigin},i)):k;var c=t.def(t,e,a);return c.Transports=t.Transports||{},c.Transports=a,[void 0,c]},transport_manager:r(function(t,e){return new l.default(e)}),sequential:r(function(t,e){var n=Array.prototype.slice.call(arguments,2);return new y.default(n,e)}),cached:r(function(t,e,n){return new v.default(n,t.Transports,{ttl:e,timeline:t.timeline,useTLS:t.useTLS})}),first_connected:r(function(t,e){return new w.default(e)}),best_connected_ever:r(function(){var t=Array.prototype.slice.call(arguments,1);return new g.default(t)}),delayed:r(function(t,e,n){return new b.default(n,{delay:e})}),if:r(function(t,e,n,r){return new m.default(e,n,r)}),is_supported:r(function(t,e){return function(){return e.isSupported()}})}},function(t,e,n){”use strict“;var r=n(43),i=function(){function t(t){this.options=t||{},this.livesLeft=this.options.lives||1/0}return t.prototype.getAssistant=function(t){return r.default.createAssistantToTheTransportManager(this,t,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})},t.prototype.isAlive=function(){return this.livesLeft>0},t.prototype.reportDeath=function(){this.livesLeft-=1},t}();e.__esModule=!0,e.default=i},function(t,e,n){”use strict“;var r=n(44),i=n(45),o=n(48),s=n(49),a=n(50),u=n(51),c=n(54),h=n(52),f=n(62),l=n(63),p={createChannels:function(){return new l.default},createConnectionManager:function(t,e){return new f.default(t,e)},createChannel:function(t,e){return new h.default(t,e)},createPrivateChannel:function(t,e){return new u.default(t,e)},createPresenceChannel:function(t,e){return new a.default(t,e)},createEncryptedChannel:function(t,e){return new c.default(t,e)},createTimelineSender:function(t,e){return new s.default(t,e)},createAuthorizer:function(t,e){return e.authorizer?e.authorizer(t,e):new o.default(t,e)},createHandshake:function(t,e){return new i.default(t,e)},createAssistantToTheTransportManager:function(t,e,n){return new r.default(t,e,n)}};e.__esModule=!0,e.default=p},function(t,e,n){”use strict“;var r=n(11),i=n(9),o=function(){function t(t,e,n){this.manager=t,this.transport=e,this.minPingDelay=n.minPingDelay,this.maxPingDelay=n.maxPingDelay,this.pingDelay=void 0}return t.prototype.createConnection=function(t,e,n,o){var s=this;o=i.extend({},o,{activityTimeout:this.pingDelay});var a=this.transport.createConnection(t,e,n,o),u=null,c=function(){a.unbind(”open“,c),a.bind(”closed“,h),u=r.default.now()},h=function(t){if(a.unbind(”closed“,h),1002===t.code||1003===t.code)s.manager.reportDeath();else if(!t.wasClean&&u){var e=r.default.now()-u;e<2*s.maxPingDelay&&(s.manager.reportDeath(),s.pingDelay=Math.max(e/2,s.minPingDelay))}};return a.bind(”open“,c),a},t.prototype.isSupported=function(t){return this.manager.isAlive()&&this.transport.isSupported(t)},t}();e.__esModule=!0,e.default=o},function(t,e,n){”use strict“;var r=n(9),i=n(46),o=n(47),s=function(){function t(t,e){this.transport=t,this.callback=e,this.bindListeners()}return t.prototype.close=function(){this.unbindListeners(),this.transport.close()},t.prototype.bindListeners=function(){var t=this;this.onMessage=function(e){t.unbindListeners();var n;try{n=i.processHandshake(e)}catch(e){return t.finish(”error“,{error:e}),void t.transport.close()}”connected“===n.action?t.finish(”connected“,{connection:new o.default(n.id,t.transport),activityTimeout:n.activityTimeout}):(t.finish(n.action,{error:n.error}),t.transport.close())},this.onClosed=function(e){t.unbindListeners();var n=i.getCloseAction(e)||”backoff“,r=i.getCloseError(e);t.finish(n,{error:r})},this.transport.bind(”message“,this.onMessage),this.transport.bind(”closed“,this.onClosed)},t.prototype.unbindListeners=function(){this.transport.unbind(”message“,this.onMessage),this.transport.unbind(”closed“,this.onClosed)},t.prototype.finish=function(t,e){this.callback(r.extend({transport:this.transport,action:t},e))},t}();e.__esModule=!0,e.default=s},function(t,e){”use strict“;e.decodeMessage=function(t){try{var e=JSON.parse(t.data);if(”string“==typeof e.data)try{e.data=JSON.parse(e.data)}catch(t){if(!(t instanceof SyntaxError))throw t}return e}catch(e){throw{type:”MessageParseError“,error:e,data:t.data}}},e.encodeMessage=function(t){return JSON.stringify(t)},e.processHandshake=function(t){if(t=e.decodeMessage(t),”pusher:connection_established“===t.event){if(!t.data.activity_timeout)throw”No activity timeout specified in handshake“;return{action:”connected“,id:t.data.socket_id,activityTimeout:1e3*t.data.activity_timeout}}if(”pusher:error“===t.event)return{action:this.getCloseAction(t.data),error:this.getCloseError(t.data)};throw”Invalid handshake“},e.getCloseAction=function(t){return t.code<4e3?t.code>=1002&&t.code<=1004?”backoff“:null:4e3===t.code?”tls_only“:t.code<4100?”refused“:t.code<4200?”backoff“:t.code<4300?”retry“:”refused“},e.getCloseError=function(t){return 1e3!==t.code&&1001!==t.code?{type:”PusherError“,data:{code:t.code,message:t.reason||t.message}}:null}},function(t,e,n){”use strict“;var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty®&&(t=e);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(9),o=n(24),s=n(46),a=n(8),u=function(t){function e(e,n){t.call(this),this.id=e,this.transport=n,this.activityTimeout=n.activityTimeout,this.bindListeners()}return r(e,t),e.prototype.handlesActivityChecks=function(){return this.transport.handlesActivityChecks()},e.prototype.send=function(t){return this.transport.send(t)},e.prototype.send_event=function(t,e,n){var r={event:t,data:e};return n&&(r.channel=n),a.default.debug(”Event sent“,r),this.send(s.encodeMessage®)},e.prototype.ping=function(){this.transport.supportsPing()?this.transport.ping():this.send_event(”pusher:ping“,{})},e.prototype.close=function(){this.transport.close()},e.prototype.bindListeners=function(){var t=this,e={message:function(e){var n;try{n=s.decodeMessage(e)}catch(n){t.emit(”error“,{type:”MessageParseError“,error:n,data:e.data})}if(void 0!==n){switch(a.default.debug(”Event recd“,n),n.event){case”pusher:error“:t.emit(”error“,{type:”PusherError“,data:n.data});break;case”pusher:ping“:t.emit(”ping“);break;case”pusher:pong“:t.emit(”pong“)}t.emit(”message“,n)}},activity:function(){t.emit(”activity“)},error:function(e){t.emit(”error“,{type:”WebSocketError“,error:e})},closed:function(e){n(),e&&e.code&&t.handleCloseEvent(e),t.transport=null,t.emit(”closed“)}},n=function(){i.objectApply(e,function(e,n){t.transport.unbind(n,e)})};i.objectApply(e,function(e,n){t.transport.bind(n,e)})},e.prototype.handleCloseEvent=function(t){var e=s.getCloseAction(t),n=s.getCloseError(t);n&&this.emit(”error“,n),e&&this.emit(e,{action:e,error:n})},e}(o.default);e.__esModule=!0,e.default=u},function(t,e,n){”use strict“;var r=n(2),i=function(){function t(t,e){this.channel=t;var n=e.authTransport;if(”undefined“==typeof r.default.getAuthorizers())throw”'“n
”' is not a recognized auth transport“;this.type=n,this.options=e,this.authOptions=(e||{}).auth||{}}return t.prototype.composeQuery=function(t){var e=”socket_id=“+encodeURIComponent(t)+”&channel_name=“+encodeURIComponent(this.channel.name);for(var n in this.authOptions.params)e+=”&“+encodeURIComponent(n)+”=“+encodeURIComponent(this.authOptions.params);return e},t.prototype.authorize=function(e,n){return t.authorizers=t.authorizers||r.default.getAuthorizers(),t.authorizers.call(this,r.default,e,n)},t}();e.__esModule=!0,e.default=i},function(t,e,n){”use strict“;var r=n(2),i=function(){function t(t,e){this.timeline=t,this.options=e||{}}return t.prototype.send=function(t,e){this.timeline.isEmpty()||this.timeline.send(r.default.TimelineTransport.getAgent(this,t),e)},t}();e.__esModule=!0,e.default=i},function(t,e,n){”use strict“;var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty®&&(t=e);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(51),o=n(8),s=n(53),a=n(14),u=function(t){function e(e,n){t.call(this,e,n),this.members=new s.default}return r(e,t),e.prototype.authorize=function(e,n){var r=this;t.prototype.authorize.call(this,e,function(t,e){if(!t){if(void 0===e.channel_data){var i=a.default.buildLogSuffix(”authenticationEndpoint“);return o.default.warn(”Invalid auth response for channel '“r.name
”',expected 'channel_data' field. “+i),void n(”Invalid auth response“)}var s=JSON.parse(e.channel_data);r.members.setMyID(s.user_id)}n(t,e)})},e.prototype.handleEvent=function(t,e){switch(t){case”pusher_internal:subscription_succeeded“:this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(e),this.emit(”pusher:subscription_succeeded“,this.members));break;case”pusher_internal:member_added“:var n=this.members.addMember(e);this.emit(”pusher:member_added“,n);break;case”pusher_internal:member_removed“:var r=this.members.removeMember(e);r&&this.emit(”pusher:member_removed“,r);break;default:i.default.prototype.handleEvent.call(this,t,e)}},e.prototype.disconnect=function(){this.members.reset(),t.prototype.disconnect.call(this)},e}(i.default);e.__esModule=!0,e.default=u},function(t,e,n){”use strict“;var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty®&&(t=e);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(43),o=n(52),s=function(t){function e(){t.apply(this,arguments)}return r(e,t),e.prototype.authorize=function(t,e){var n=i.default.createAuthorizer(this,this.pusher.config);return n.authorize(t,e)},e}(o.default);e.__esModule=!0,e.default=s},function(t,e,n){”use strict“;var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty®&&(t=e);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(24),o=n(31),s=n(8),a=function(t){function e(e,n){t.call(this,function(t,n){s.default.debug(”No callbacks on “e
” for “+t)}),this.name=e,this.pusher=n,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}return r(e,t),e.prototype.authorize=function(t,e){return e(!1,{})},e.prototype.trigger=function(t,e){if(0!==t.indexOf(”client-“))throw new o.BadEventName(”Event '“t
”' does not start with 'client-'“);return this.pusher.send_event(t,e,this.name)},e.prototype.disconnect=function(){this.subscribed=!1,this.subscriptionPending=!1},e.prototype.handleEvent=function(t,e){0===t.indexOf(”pusher_internal:“)?”pusher_internal:subscription_succeeded“===t&&(this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit(”pusher:subscription_succeeded“,e)):this.emit(t,e)},e.prototype.subscribe=function(){var t=this;this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,function(e,n){e?t.handleEvent(”pusher:subscription_error“,n):t.pusher.send_event(”pusher:subscribe“,{auth:n.auth,channel_data:n.channel_data,channel:t.name})}))},e.prototype.unsubscribe=function(){this.subscribed=!1,this.pusher.send_event(”pusher:unsubscribe“,{channel:this.name})},e.prototype.cancelSubscription=function(){this.subscriptionCancelled=!0},e.prototype.reinstateSubscription=function(){this.subscriptionCancelled=!1},e}(i.default);e.__esModule=!0,e.default=a},function(t,e,n){”use strict“;var r=n(9),i=function(){function t(){this.reset()}return t.prototype.get=function(t){return Object.prototype.hasOwnProperty.call(this.members,t)?{id:t,info:this.members}:null},t.prototype.each=function(t){var e=this;r.objectApply(this.members,function(n,r){t(e.get®)})},t.prototype.setMyID=function(t){this.myID=t},t.prototype.onSubscription=function(t){this.members=t.presence.hash,this.count=t.presence.count,this.me=this.get(this.myID)},t.prototype.addMember=function(t){return null===this.get(t.user_id)&&this.count++,this.members=t.user_info,this.get(t.user_id)},t.prototype.removeMember=function(t){var e=this.get(t.user_id);return e&&(delete this.members,this.count–),e},t.prototype.reset=function(){this.members={},this.count=0,this.myID=null,this.me=null},t}();e.__esModule=!0,e.default=i},function(t,e,n){”use strict“;var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty®&&(t=e);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(51),o=n(31),s=n(8),a=n(55),u=n(57),c=function(t){function e(){t.apply(this,arguments),this.key=null}return r(e,t),e.prototype.authorize=function(e,n){var r=this;t.prototype.authorize.call(this,e,function(t,e){if(t)return void n(!0,e);var i=e.shared_secret;if(!i){var o=”No shared_secret key in auth payload for encrypted channel: “+r.name;return n(!0,o),void s.default.warn(”Error: “+o)}r.key=u.decodeBase64(i),delete e.shared_secret,n(!1,e)})},e.prototype.trigger=function(t,e){throw new o.UnsupportedFeature(”Client events are not currently supported for encrypted channels“)},e.prototype.handleEvent=function(e,n){return 0===e.indexOf(”pusher_internal:“)||0===e.indexOf(”pusher:“)?void t.prototype.handleEvent.call(this,e,n):void this.handleEncryptedEvent(e,n)},e.prototype.handleEncryptedEvent=function(t,e){var n=this;if(!this.key)return void s.default.debug(”Received encrypted event before key has been retrieved from the authEndpoint“);if(!e.ciphertext||!e.nonce)return void s.default.warn(”Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: “+e);var r=u.decodeBase64(e.ciphertext);if(r.length<a.secretbox.overheadLength)return void s.default.warn(”Expected encrypted event ciphertext length to be “a.secretbox.overheadLength
”, got: “+r.length);var i=u.decodeBase64(e.nonce);if(i.length<a.secretbox.nonceLength)return void s.default.warn(”Expected encrypted event nonce length to be “a.secretbox.nonceLength
”, got: “+i.length);var o=a.secretbox.open(r,i,this.key);return null===o?(s.default.debug(”Failed to decrypted an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint…“),void this.authorize(this.pusher.connection.socket_id,function(e,c){return e?void s.default.warn(”Failed to make a request to the authEndpoint: “c
”. Unable to fetch new key, so dropping encrypted event“):(o=a.secretbox.open(r,i,n.key),null===o?void s.default.warn(”Failed to decrypt event with new key. Dropping encrypted event“):void n.emitJSON(t,u.encodeUTF8(o)))})):void this.emitJSON(t,u.encodeUTF8(o))},e.prototype.emitJSON=function(t,e){try{this.emit(t,JSON.parse(e))}catch(n){this.emit(t,e)}return this},e}(i.default);e.__esModule=!0,e.default=c},function(t,e,n){!function(t){”use strict“;function e(t,e,n,r){t=n>>24&255,t=n>>16&255,t=n>>8&255,t=255&n,t=r>>24&255,t=r>>16&255,t=r>>8&255,t=255&r}function r(t,e,n,r,i){var o,s=0;for(o=0;o^n;return(1&s-1>>>8)-1}function i(t,e,n,i){return r(t,e,n,i,16)}function o(t,e,n,i){return r(t,e,n,i,32)}function s(t,e,n,r){for(var i,o=255&r|(255&r)<<8|(255&r)<<16|(255&r)<<24,s=255&n|(255&n)<<8|(255&n)<<16|(255&n)<<24,a=255&n|(255&n)<<8|(255&n)<<16|(255&n)<<24,u=255&n|(255&n)<<8|(255&n)<<16|(255&n)<<24,c=255&n|(255&n)<<8|(255&n)<<16|(255&n)<<24,h=255&r|(255&r)<<8|(255&r)<<16|(255&r)<<24,f=255&e|(255&e)<<8|(255&e)<<16|(255&e)<<24,l=255&e|(255&e)<<8|(255&e)<<16|(255&e)<<24,p=255&e|(255&e)<<8|(255&e)<<16|(255&e)<<24,d=255&e|(255&e)<<8|(255&e)<<16|(255&e)<<24,y=255&r|(255&r)<<8|(255&r)<<16|(255&r)<<24,g=255&n|(255&n)<<8|(255&n)<<16|(255&n)<<24,v=255&n|(255&n)<<8|(255&n)<<16|(255&n)<<24,b=255&n|(255&n)<<8|(255&n)<<16|(255&n)<<24,m=255&n|(255&n)<<8|(255&n)<<16|(255&n)<<24,w=255&r|(255&r)<<8|(255&r)<<16|(255&r)<<24,_=o,S=s,k=a,T=u,A=c,E=h,x=f,C=l,P=p,R=d,O=y,M=g,U=v,L=b,B=m,I=w,N=0;N<20;N+=2)i=_+U|0,A^=i<<7|i>>>25,i=A+_|0,P^=i<<9|i>>>23,i=P+A|0,U^=i<<13|i>>>19,i=U+P|0,_^=i<<18|i>>>14,i=E+S|0,R^=i<<7|i>>>25,i=R+E|0,L^=i<<9|i>>>23,i=L+R|0,S^=i<<13|i>>>19,i=S+L|0,E^=i<<18|i>>>14,i=O+x|0,B^=i<<7|i>>>25,i=B+O|0,k^=i<<9|i>>>23,i=k+B|0,x^=i<<13|i>>>19,i=x+k|0,O^=i<<18|i>>>14,i=I+M|0,T^=i<<7|i>>>25,i=T+I|0,C^=i<<9|i>>>23,i=C+T|0,M^=i<<13|i>>>19,i=M+C|0,I^=i<<18|i>>>14,i=_+T|0,S^=i<<7|i>>>25,i=S+_|0,k^=i<<9|i>>>23,i=k+S|0,T^=i<<13|i>>>19,i=T+k|0,_^=i<<18|i>>>14,i=E+A|0,x^=i<<7|i>>>25,i=x+E|0,C^=i<<9|i>>>23,i=C+x|0,A^=i<<13|i>>>19,i=A+C|0,E^=i<<18|i>>>14,i=O+R|0,M^=i<<7|i>>>25,i=M+O|0,P^=i<<9|i>>>23,i=P+M|0,R^=i<<13|i>>>19,i=R+P|0,O^=i<<18|i>>>14,i=I+B|0,U^=i<<7|i>>>25,i=U+I|0,L^=i<<9|i>>>23,i=L+U|0,B^=i<<13|i>>>19,i=B+L|0,I^=i<<18|i>>>14;_=_+o|0,S=S+s|0,k=k+a|0,T=T+u|0,A=A+c|0,E=E+h|0,x=x+f|0,C=C+l|0,P=P+p|0,R=R+d|0,O=O+y|0,M=M+g|0,U=U+v|0,L=L+b|0,B=B+m|0,I=I+w|0,t=_>>>0&255,t=_>>>8&255,t=_>>>16&255,t=_>>>24&255,t=S>>>0&255,t=S>>>8&255,t=S>>>16&255,t=S>>>24&255,t=k>>>0&255,t=k>>>8&255,t=k>>>16&255,t=k>>>24&255,t=T>>>0&255,t=T>>>8&255,t=T>>>16&255,t=T>>>24&255,t=A>>>0&255,t=A>>>8&255,t=A>>>16&255,t=A>>>24&255,t=E>>>0&255,t=E>>>8&255,t=E>>>16&255,t=E>>>24&255,t=x>>>0&255,t=x>>>8&255,t=x>>>16&255,t=x>>>24&255,t=C>>>0&255,t=C>>>8&255,t=C>>>16&255,t=C>>>24&255,t=P>>>0&255,t=P>>>8&255,t=P>>>16&255,t=P>>>24&255,t=R>>>0&255,t=R>>>8&255,t=R>>>16&255,t=R>>>24&255,t=O>>>0&255,t=O>>>8&255,t=O>>>16&255,t=O>>>24&255,t=M>>>0&255,t=M>>>8&255,t=M>>>16&255,t=M>>>24&255,t=U>>>0&255,t=U>>>8&255,t=U>>>16&255,t=U>>>24&255,t=L>>>0&255,t=L>>>8&255,t=L>>>16&255,t=L>>>24&255,t=B>>>0&255,t=B>>>8&255,t=B>>>16&255,t=B>>>24&255,t=I>>>0&255,t=I>>>8&255,t=I>>>16&255,t=I>>>24&255}function a(t,e,n,r){for(var i,o=255&r|(255&r)<<8|(255&r)<<16|(255&r)<<24,s=255&n|(255&n)<<8|(255&n)<<16|(255&n)<<24,a=255&n|(255&n)<<8|(255&n)<<16|(255&n)<<24,u=255&n|(255&n)<<8|(255&n)<<16|(255&n)<<24,c=255&n|(255&n)<<8|(255&n)<<16|(255&n)<<24,h=255&r|(255&r)<<8|(255&r)<<16|(255&r)<<24,f=255&e|(255&e)<<8|(255&e)<<16|(255&e)<<24,l=255&e|(255&e)<<8|(255&e)<<16|(255&e)<<24,p=255&e|(255&e)<<8|(255&e)<<16|(255&e)<<24,d=255&e|(255&e)<<8|(255&e)<<16|(255&e)<<24,y=255&r|(255&r)<<8|(255&r)<<16|(255&r)<<24,g=255&n|(255&n)<<8|(255&n)<<16|(255&n)<<24,v=255&n|(255&n)<<8|(255&n)<<16|(255&n)<<24,b=255&n|(255&n)<<8|(255&n)<<16|(255&n)<<24,m=255&n|(255&n)<<8|(255&n)<<16|(255&n)<<24,w=255&r|(255&r)<<8|(255&r)<<16|(255&r)<<24,_=o,S=s,k=a,T=u,A=c,E=h,x=f,C=l,P=p,R=d,O=y,M=g,U=v,L=b,B=m,I=w,N=0;N<20;N+=2)i=_+U|0,A^=i<<7|i>>>25,i=A+_|0,P^=i<<9|i>>>23,i=P+A|0,U^=i<<13|i>>>19,i=U+P|0,_^=i<<18|i>>>14,i=E+S|0,R^=i<<7|i>>>25,i=R+E|0,L^=i<<9|i>>>23,i=L+R|0,S^=i<<13|i>>>19,i=S+L|0,E^=i<<18|i>>>14,i=O+x|0,B^=i<<7|i>>>25,i=B+O|0,k^=i<<9|i>>>23,i=k+B|0,x^=i<<13|i>>>19,i=x+k|0,O^=i<<18|i>>>14,i=I+M|0,T^=i<<7|i>>>25,i=T+I|0,C^=i<<9|i>>>23,i=C+T|0,M^=i<<13|i>>>19,i=M+C|0,I^=i<<18|i>>>14,i=_+T|0,S^=i<<7|i>>>25,i=S+_|0,k^=i<<9|i>>>23,i=k+S|0,T^=i<<13|i>>>19,i=T+k|0,_^=i<<18|i>>>14,i=E+A|0,x^=i<<7|i>>>25,i=x+E|0,C^=i<<9|i>>>23,i=C+x|0,A^=i<<13|i>>>19,i=A+C|0,E^=i<<18|i>>>14,i=O+R|0,M^=i<<7|i>>>25,i=M+O|0,P^=i<<9|i>>>23,i=P+M|0,R^=i<<13|i>>>19,i=R+P|0,O^=i<<18|i>>>14,i=I+B|0,U^=i<<7|i>>>25,i=U+I|0,L^=i<<9|i>>>23,i=L+U|0,B^=i<<13|i>>>19,i=B+L|0,I^=i<<18|i>>>14;t=_>>>0&255,t=_>>>8&255,t=_>>>16&255,t=_>>>24&255,t=E>>>0&255,t=E>>>8&255,t=E>>>16&255,t=E>>>24&255,t=O>>>0&255,t=O>>>8&255,t=O>>>16&255,t=O>>>24&255,t=I>>>0&255,t=I>>>8&255,t=I>>>16&255,t=I>>>24&255,t=x>>>0&255,t=x>>>8&255,t=x>>>16&255,t=x>>>24&255,t=C>>>0&255,t=C>>>8&255,t=C>>>16&255,t=C>>>24&255,t=P>>>0&255,t=P>>>8&255,t=P>>>16&255,t=P>>>24&255,t=R>>>0&255,t=R>>>8&255,t=R>>>16&255,t=R>>>24&255}function u(t,e,n,r){s(t,e,n,r)}function c(t,e,n,r){a(t,e,n,r)}function h(t,e,n,r,i,o,s){var a,c,h=new Uint8Array(16),f=new Uint8Array(64);for(c=0;c<16;c++)h=0;for(c=0;c<8;c++)h=o;for(;i>=64;){for(u(f,h,s,lt),c=0;c<64;c++)t=n^f;for(a=1,c=8;c<16;c++)a=a+(255&h)|0,h=255&a,a>>>=8;i-=64,e+=64,r+=64}if(i>0)for(u(f,h,s,lt),c=0;c=n^f;return 0}function f(t,e,n,r,i){var o,s,a=new Uint8Array(16),c=new Uint8Array(64);for(s=0;s<16;s++)a=0;for(s=0;s<8;s++)a=r;for(;n>=64;){for(u(c,a,i,lt),s=0;s<64;s++)t=c;for(o=1,s=8;s<16;s++)o=o+(255&a)|0,a=255&o,o>>>=8;n-=64,e+=64}if(n>0)for(u(c,a,i,lt),s=0;s
* The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> * @license MIT */
“use strict”;function r(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&“function”==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function i(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(i()<e)throw new RangeError(“Invalid typed array length”);return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e),t.__proto__=s.prototype):(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,e,n);if(“number”==typeof t){if(“string”==typeof e)throw new Error(“If encoding is specified then the first argument must be a string”);return h(this,t)}return a(this,t,e,n)}function a(t,e,n,r){if(“number”==typeof e)throw new TypeError('“value” argument must not be a number');return“undefined”!=typeof ArrayBuffer&&e instanceof ArrayBuffer?p(t,e,n,r):“string”==typeof e?f(t,e,n):d(t,e)}function u(t){if(“number”!=typeof t)throw new TypeError('“size” argument must be a number');if(t<0)throw new RangeError('“size” argument must not be negative')}function c(t,e,n,r){return u(e),e<=0?o(t,e):void 0!==n?“string”==typeof r?o(t,e).fill(n,r):o(t,e).fill(n):o(t,e)}function h(t,e){if(u(e),t=o(t,e<0?0:0|y(e)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;nt
“>”},s.prototype.compare=function(t,e,n,r,i){if(!s.isBuffer(t))throw new TypeError(“Argument must be a Buffer”);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError(“out of range index”);if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,r>>>=0,i>>>=0,this===t)return 0;for(var o=i-r,a=n-e,u=Math.min(o,a),c=this.slice(r,i),h=t.slice(e,n),f=0;f!==h){o=c,a=h;break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1},s.prototype.indexOf=function(t,e,n){return w(this,t,e,n,!0)},s.prototype.lastIndexOf=function(t,e,n){return w(this,t,e,n,!1)},s.prototype.write=function(t,e,n,r){if(void 0===e)r=“utf8”,n=this.length,e=0;else if(void 0===n&&“string”==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error(“Buffer.write(string, encoding, offset[, length]) is no longer supported”);e|=0,isFinite(n)?(n|=0,void 0===r&&(r=“utf8”)):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError(“Attempt to write outside buffer bounds”);r||(r=“utf8”);for(var o=!1;;)switch®{case“hex”:return S(this,t,e,n);case“utf8”:case“utf-8”:return k(this,t,e,n);case“ascii”:return T(this,t,e,n);case“latin1”:case“binary”:return A(this,t,e,n);case“base64”:return E(this,t,e,n);case“ucs2”:case“ucs-2”:case“utf16le”:case“utf-16le”:return x(this,t,e,n);default:if(o)throw new TypeError(“Unknown encoding: ”+r);r=(“”+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:“Buffer”,data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;s.prototype.slice=function(t,e){var n=this.length;t=~~t,e=void 0===e?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var r;if(s.TYPED_ARRAY_SUPPORT)r=this.subarray(t,e),r.__proto__=s.prototype;else{var i=e-t;r=new s(i,void 0);for(var o=0;o=this}return r},s.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||B(t,e,this.length);for(var r=this,i=1,o=0;++ot
“.pusher.com”,httpHost:“sockjs-”t
“.pusher.com”}}}])});