From 8986cde5847d8cf2b9d1622420b1bbd7817e5525 Mon Sep 17 00:00:00 2001 From: Chris Bautista Date: Wed, 27 Mar 2019 16:02:16 +0800 Subject: [PATCH] Update compiled nova-echo.js --- dist/js/nova-echo.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/js/nova-echo.js b/dist/js/nova-echo.js index 611628b..48c8dda 100644 --- a/dist/js/nova-echo.js +++ b/dist/js/nova-echo.js @@ -1 +1 @@ -!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(t,e){for(var n=0;n0)r.loading[t].push(n);else{r.loading[t]=[n];var o=i.default.createScriptRequest(r.getPath(t,e)),s=r.receivers.create(function(e){if(r.receivers.remove(s),r.loading[t]){var n=r.loading[t];delete r.loading[t];for(var i=function(t){t||o.cleanup()},a=0;a>>6)+r(128|63&e):r(224|e>>>12&15)+r(128|e>>>6&63)+r(128|63&e)},c=function(t){return t.replace(/[^\x00-\x7F]/g,u)},h=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[i.charAt(n>>>18),i.charAt(n>>>12&63),e>=2?"=":i.charAt(n>>>6&63),e>=1?"=":i.charAt(63&n)].join("")},f=window.btoa||function(t){return t.replace(/[\s\S]{1,3}/g,h)}},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;n0)for(n=0;n0&&t.onChunk(200,e.responseText)},e.onload=function(){e.responseText&&e.responseText.length>0&&t.onChunk(200,e.responseText),t.emit("finished",200),t.close()},e},abortRequest:function(t){t.ontimeout=t.onerror=t.onprogress=t.onload=null,t.abort()}};e.__esModule=!0,e.default=i},function(t,e){"use strict";var n=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},r=function(t){function e(){t.apply(this,arguments)}return n(e,t),e}(Error);e.BadEventName=r;var i=function(t){function e(){t.apply(this,arguments)}return n(e,t),e}(Error);e.RequestTimedOut=i;var o=function(t){function e(){t.apply(this,arguments)}return n(e,t),e}(Error);e.TransportPriorityTooLow=o;var s=function(t){function e(){t.apply(this,arguments)}return n(e,t),e}(Error);e.TransportClosed=s;var a=function(t){function e(){t.apply(this,arguments)}return n(e,t),e}(Error);e.UnsupportedFeature=a;var u=function(t){function e(){t.apply(this,arguments)}return n(e,t),e}(Error);e.UnsupportedTransport=u;var c=function(t){function e(){t.apply(this,arguments)}return n(e,t),e}(Error);e.UnsupportedStrategy=c},function(t,e,n){"use strict";var r=n(33),i=n(34),o=n(36),s=n(37),a=n(38),u={createStreamingSocket:function(t){return this.createSocket(o.default,t)},createPollingSocket:function(t){return this.createSocket(s.default,t)},createSocket:function(t,e){return new i.default(t,e)},createXHR:function(t,e){return this.createRequest(a.default,t,e)},createRequest:function(t,e,n){return new r.default(t,e,n)}};e.__esModule=!0,e.default=u},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=n(2),o=function(t){function e(e,n,r){t.call(this),this.hooks=e,this.method=n,this.url=r}return r(e,t),e.prototype.start=function(t){var e=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){e.close()},i.default.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(t)},e.prototype.close=function(){this.unloader&&(i.default.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},e.prototype.onChunk=function(t,e){for(;;){var n=this.advanceBuffer(e);if(!n)break;this.emit("chunk",{status:t,data:n})}this.isBufferTooLong(e)&&this.emit("buffer_too_long")},e.prototype.advanceBuffer=function(t){var e=t.slice(this.position),n=e.indexOf("\n");return-1!==n?(this.position+=n+1,e.slice(0,n)):null},e.prototype.isBufferTooLong=function(t){return this.position===t.length&&t.length>262144},e}(n(24).default);e.__esModule=!0,e.default=o},function(t,e,n){"use strict";var r=n(35),i=n(11),o=n(2),s=1,a=function(){function t(t,e){this.hooks=t,this.session=c(1e3)+"/"+function(t){for(var e=[],n=0;n0&&t.onChunk(e.status,e.responseText);break;case 4:e.responseText&&e.responseText.length>0&&t.onChunk(e.status,e.responseText),t.emit("finished",e.status),t.close()}},e},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[t.ERROR=3]="ERROR",t[t.INFO=6]="INFO",t[t.DEBUG=7]="DEBUG"}(n||(n={})),e.__esModule=!0,e.default=n},function(t,e,n){"use strict";var r=n(9),i=n(11),o=n(42),s=n(31),a=n(64),u=n(65),c=n(66),h=n(67),f=n(68),l=n(69),p=n(70),d=n(2).default.Transports;e.build=function(t,e){return w(t,r.extend({},g,e))[1].strategy};var y={isSupported:function(){return!1},connect:function(t,e){var n=i.default.defer(function(){e(new s.UnsupportedStrategy)});return{abort:function(){n.ensureAborted()},forceMinPriority:function(){}}}};function v(t){return function(e){return[t.apply(this,arguments),e]}}var g={extend:function(t,e,n){return[r.extend({},e,n),t]},def:function(t,e,n){if(void 0!==t[e])throw"Redefining symbol "+e;return t[e]=n,[void 0,t]},def_transport:function(t,e,n,i,o,u){var c,h=d[n];if(!h)throw new s.UnsupportedTransport(n);c=!(t.enabledTransports&&-1===r.arrayIndexOf(t.enabledTransports,e)||t.disabledTransports&&-1!==r.arrayIndexOf(t.disabledTransports,e))?new a.default(e,i,u?u.getAssistant(h):h,r.extend({key:t.key,useTLS:t.useTLS,timeline:t.timeline,ignoreNullOrigin:t.ignoreNullOrigin},o)):y;var f=t.def(t,e,c)[1];return f.Transports=t.Transports||{},f.Transports[e]=c,[void 0,f]},transport_manager:v(function(t,e){return new o.default(e)}),sequential:v(function(t,e){var n=Array.prototype.slice.call(arguments,2);return new u.default(n,e)}),cached:v(function(t,e,n){return new h.default(n,t.Transports,{ttl:e,timeline:t.timeline,useTLS:t.useTLS})}),first_connected:v(function(t,e){return new p.default(e)}),best_connected_ever:v(function(){var t=Array.prototype.slice.call(arguments,1);return new c.default(t)}),delayed:v(function(t,e,n){return new f.default(n,{delay:e})}),if:v(function(t,e,n,r){return new l.default(e,n,r)}),is_supported:v(function(t,e){return function(){return e.isSupported()}})};function b(t){return"string"==typeof t&&":"===t.charAt(0)}function m(t,e){return e[t.slice(1)]}function _(t,e){if(b(t[0])){var n=m(t[0],e);if(t.length>1){if("function"!=typeof n)throw"Calling non-function "+t[0];var i=[r.extend({},e)].concat(r.map(t.slice(1),function(t){return w(t,r.extend({},e))[0]}));return n.apply(this,i)}return[n,e]}return function t(e,n){if(0===e.length)return[[],n];var r=w(e[0],n),i=t(e.slice(1),r[1]);return[[r[0]].concat(i[0]),i[1]]}(t,e)}function w(t,e){return"string"==typeof t?function(t,e){if(!b(t))return[t,e];var n=m(t,e);if(void 0===n)throw"Undefined symbol "+t;return[n,e]}(t,e):"object"==typeof t&&t instanceof Array&&t.length>0?_(t,e):[t,e]}},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){var n;t.unbindListeners();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("pusher:connection_established"===(t=e.decodeMessage(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){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},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(r))},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(void 0===r.default.getAuthorizers()[n])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[n]);return e},t.prototype.authorize=function(e,n){return t.authorizers=t.authorizers||r.default.getAuthorizers(),t.authorizers[this.type].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){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},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){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=n(43),o=function(t){function e(){t.apply(this,arguments)}return r(e,t),e.prototype.authorize=function(t,e){return i.default.createAuthorizer(this,this.pusher.config).authorize(t,e)},e}(n(52).default);e.__esModule=!0,e.default=o},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},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[t]}:null},t.prototype.each=function(t){var e=this;r.objectApply(this.members,function(n,r){t(e.get(r))})},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_id]=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[t.user_id],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){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},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)n(!0,e);else{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){0!==e.indexOf("pusher_internal:")&&0!==e.indexOf("pusher:")?this.handleEncryptedEvent(e,n):t.prototype.handleEvent.call(this,e,n)},e.prototype.handleEncryptedEvent=function(t,e){var n=this;if(this.key)if(e.ciphertext&&e.nonce){var r=u.decodeBase64(e.ciphertext);if(r.length>24&255,t[e+1]=n>>16&255,t[e+2]=n>>8&255,t[e+3]=255&n,t[e+4]=r>>24&255,t[e+5]=r>>16&255,t[e+6]=r>>8&255,t[e+7]=255&r}function y(t,e,n,r,i){var o,s=0;for(o=0;o>>8)-1}function v(t,e,n,r){return y(t,e,n,r,16)}function g(t,e,n,r){return y(t,e,n,r,32)}function b(t,e,n,r){!function(t,e,n,r){for(var i,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,u=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,h=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,f=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,l=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,y=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,m=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,_=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,w=o,k=s,S=a,T=u,E=c,A=h,C=f,P=l,x=p,O=d,R=y,M=v,U=g,L=b,I=m,B=_,j=0;j<20;j+=2)w^=(i=(U^=(i=(x^=(i=(E^=(i=w+U|0)<<7|i>>>25)+w|0)<<9|i>>>23)+E|0)<<13|i>>>19)+x|0)<<18|i>>>14,A^=(i=(k^=(i=(L^=(i=(O^=(i=A+k|0)<<7|i>>>25)+A|0)<<9|i>>>23)+O|0)<<13|i>>>19)+L|0)<<18|i>>>14,R^=(i=(C^=(i=(S^=(i=(I^=(i=R+C|0)<<7|i>>>25)+R|0)<<9|i>>>23)+I|0)<<13|i>>>19)+S|0)<<18|i>>>14,B^=(i=(M^=(i=(P^=(i=(T^=(i=B+M|0)<<7|i>>>25)+B|0)<<9|i>>>23)+T|0)<<13|i>>>19)+P|0)<<18|i>>>14,w^=(i=(T^=(i=(S^=(i=(k^=(i=w+T|0)<<7|i>>>25)+w|0)<<9|i>>>23)+k|0)<<13|i>>>19)+S|0)<<18|i>>>14,A^=(i=(E^=(i=(P^=(i=(C^=(i=A+E|0)<<7|i>>>25)+A|0)<<9|i>>>23)+C|0)<<13|i>>>19)+P|0)<<18|i>>>14,R^=(i=(O^=(i=(x^=(i=(M^=(i=R+O|0)<<7|i>>>25)+R|0)<<9|i>>>23)+M|0)<<13|i>>>19)+x|0)<<18|i>>>14,B^=(i=(I^=(i=(L^=(i=(U^=(i=B+I|0)<<7|i>>>25)+B|0)<<9|i>>>23)+U|0)<<13|i>>>19)+L|0)<<18|i>>>14;w=w+o|0,k=k+s|0,S=S+a|0,T=T+u|0,E=E+c|0,A=A+h|0,C=C+f|0,P=P+l|0,x=x+p|0,O=O+d|0,R=R+y|0,M=M+v|0,U=U+g|0,L=L+b|0,I=I+m|0,B=B+_|0,t[0]=w>>>0&255,t[1]=w>>>8&255,t[2]=w>>>16&255,t[3]=w>>>24&255,t[4]=k>>>0&255,t[5]=k>>>8&255,t[6]=k>>>16&255,t[7]=k>>>24&255,t[8]=S>>>0&255,t[9]=S>>>8&255,t[10]=S>>>16&255,t[11]=S>>>24&255,t[12]=T>>>0&255,t[13]=T>>>8&255,t[14]=T>>>16&255,t[15]=T>>>24&255,t[16]=E>>>0&255,t[17]=E>>>8&255,t[18]=E>>>16&255,t[19]=E>>>24&255,t[20]=A>>>0&255,t[21]=A>>>8&255,t[22]=A>>>16&255,t[23]=A>>>24&255,t[24]=C>>>0&255,t[25]=C>>>8&255,t[26]=C>>>16&255,t[27]=C>>>24&255,t[28]=P>>>0&255,t[29]=P>>>8&255,t[30]=P>>>16&255,t[31]=P>>>24&255,t[32]=x>>>0&255,t[33]=x>>>8&255,t[34]=x>>>16&255,t[35]=x>>>24&255,t[36]=O>>>0&255,t[37]=O>>>8&255,t[38]=O>>>16&255,t[39]=O>>>24&255,t[40]=R>>>0&255,t[41]=R>>>8&255,t[42]=R>>>16&255,t[43]=R>>>24&255,t[44]=M>>>0&255,t[45]=M>>>8&255,t[46]=M>>>16&255,t[47]=M>>>24&255,t[48]=U>>>0&255,t[49]=U>>>8&255,t[50]=U>>>16&255,t[51]=U>>>24&255,t[52]=L>>>0&255,t[53]=L>>>8&255,t[54]=L>>>16&255,t[55]=L>>>24&255,t[56]=I>>>0&255,t[57]=I>>>8&255,t[58]=I>>>16&255,t[59]=I>>>24&255,t[60]=B>>>0&255,t[61]=B>>>8&255,t[62]=B>>>16&255,t[63]=B>>>24&255}(t,e,n,r)}function m(t,e,n,r){!function(t,e,n,r){for(var i,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,u=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,h=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,f=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,l=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,y=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,m=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,_=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,w=0;w<20;w+=2)o^=(i=(g^=(i=(p^=(i=(c^=(i=o+g|0)<<7|i>>>25)+o|0)<<9|i>>>23)+c|0)<<13|i>>>19)+p|0)<<18|i>>>14,h^=(i=(s^=(i=(b^=(i=(d^=(i=h+s|0)<<7|i>>>25)+h|0)<<9|i>>>23)+d|0)<<13|i>>>19)+b|0)<<18|i>>>14,y^=(i=(f^=(i=(a^=(i=(m^=(i=y+f|0)<<7|i>>>25)+y|0)<<9|i>>>23)+m|0)<<13|i>>>19)+a|0)<<18|i>>>14,_^=(i=(v^=(i=(l^=(i=(u^=(i=_+v|0)<<7|i>>>25)+_|0)<<9|i>>>23)+u|0)<<13|i>>>19)+l|0)<<18|i>>>14,o^=(i=(u^=(i=(a^=(i=(s^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+a|0)<<18|i>>>14,h^=(i=(c^=(i=(l^=(i=(f^=(i=h+c|0)<<7|i>>>25)+h|0)<<9|i>>>23)+f|0)<<13|i>>>19)+l|0)<<18|i>>>14,y^=(i=(d^=(i=(p^=(i=(v^=(i=y+d|0)<<7|i>>>25)+y|0)<<9|i>>>23)+v|0)<<13|i>>>19)+p|0)<<18|i>>>14,_^=(i=(m^=(i=(b^=(i=(g^=(i=_+m|0)<<7|i>>>25)+_|0)<<9|i>>>23)+g|0)<<13|i>>>19)+b|0)<<18|i>>>14;t[0]=o>>>0&255,t[1]=o>>>8&255,t[2]=o>>>16&255,t[3]=o>>>24&255,t[4]=h>>>0&255,t[5]=h>>>8&255,t[6]=h>>>16&255,t[7]=h>>>24&255,t[8]=y>>>0&255,t[9]=y>>>8&255,t[10]=y>>>16&255,t[11]=y>>>24&255,t[12]=_>>>0&255,t[13]=_>>>8&255,t[14]=_>>>16&255,t[15]=_>>>24&255,t[16]=f>>>0&255,t[17]=f>>>8&255,t[18]=f>>>16&255,t[19]=f>>>24&255,t[20]=l>>>0&255,t[21]=l>>>8&255,t[22]=l>>>16&255,t[23]=l>>>24&255,t[24]=p>>>0&255,t[25]=p>>>8&255,t[26]=p>>>16&255,t[27]=p>>>24&255,t[28]=d>>>0&255,t[29]=d>>>8&255,t[30]=d>>>16&255,t[31]=d>>>24&255}(t,e,n,r)}var _=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function w(t,e,n,r,i,o,s){var a,u,c=new Uint8Array(16),h=new Uint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=o[u];for(;i>=64;){for(b(h,c,s,_),u=0;u<64;u++)t[e+u]=n[r+u]^h[u];for(a=1,u=8;u<16;u++)a=a+(255&c[u])|0,c[u]=255&a,a>>>=8;i-=64,e+=64,r+=64}if(i>0)for(b(h,c,s,_),u=0;u=64;){for(b(u,a,i,_),s=0;s<64;s++)t[e+s]=u[s];for(o=1,s=8;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;n-=64,e+=64}if(n>0)for(b(u,a,i,_),s=0;s>>13|n<<3),r=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(n>>>10|r<<6),i=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(r>>>7|i<<9),o=255&t[8]|(255&t[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(s>>>11|a<<5),u=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(a>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function A(t,e,n,r,i,o){var s=new E(o);return s.update(n,r,i),s.finish(t,e),0}function C(t,e,n,r,i,o){var s=new Uint8Array(16);return A(s,0,n,r,i,o),v(t,e,s,0)}function P(t,e,n,r,i){var o;if(n<32)return-1;for(T(t,0,e,0,n,r,i),A(t,16,t,32,n-32,t),o=0;o<16;o++)t[o]=0;return 0}function x(t,e,n,r,i){var o,s=new Uint8Array(32);if(n<32)return-1;if(S(s,0,32,r,i),0!==C(e,16,e,32,n-32,s))return-1;for(T(t,0,e,0,n,r,i),o=0;o<32;o++)t[o]=0;return 0}function O(t,e){var n;for(n=0;n<16;n++)t[n]=0|e[n]}function R(t){var e,n,r=1;for(e=0;e<16;e++)n=t[e]+r+65535,r=Math.floor(n/65536),t[e]=n-65536*r;t[0]+=r-1+37*(r-1)}function M(t,e,n){for(var r,i=~(n-1),o=0;o<16;o++)r=i&(t[o]^e[o]),t[o]^=r,e[o]^=r}function U(t,n){var r,i,o,s=e(),a=e();for(r=0;r<16;r++)a[r]=n[r];for(R(a),R(a),R(a),i=0;i<2;i++){for(s[0]=a[0]-65517,r=1;r<15;r++)s[r]=a[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,M(a,s,1-o)}for(r=0;r<16;r++)t[2*r]=255&a[r],t[2*r+1]=a[r]>>8}function L(t,e){var n=new Uint8Array(32),r=new Uint8Array(32);return U(n,t),U(r,e),g(n,0,r,0)}function I(t){var e=new Uint8Array(32);return U(e,t),1&e[0]}function B(t,e){var n;for(n=0;n<16;n++)t[n]=e[2*n]+(e[2*n+1]<<8);t[15]&=32767}function j(t,e,n){for(var r=0;r<16;r++)t[r]=e[r]+n[r]}function N(t,e,n){for(var r=0;r<16;r++)t[r]=e[r]-n[r]}function D(t,e,n){var r,i,o=0,s=0,a=0,u=0,c=0,h=0,f=0,l=0,p=0,d=0,y=0,v=0,g=0,b=0,m=0,_=0,w=0,k=0,S=0,T=0,E=0,A=0,C=0,P=0,x=0,O=0,R=0,M=0,U=0,L=0,I=0,B=n[0],j=n[1],N=n[2],D=n[3],q=n[4],Y=n[5],z=n[6],F=n[7],H=n[8],X=n[9],J=n[10],K=n[11],W=n[12],G=n[13],V=n[14],Q=n[15];o+=(r=e[0])*B,s+=r*j,a+=r*N,u+=r*D,c+=r*q,h+=r*Y,f+=r*z,l+=r*F,p+=r*H,d+=r*X,y+=r*J,v+=r*K,g+=r*W,b+=r*G,m+=r*V,_+=r*Q,s+=(r=e[1])*B,a+=r*j,u+=r*N,c+=r*D,h+=r*q,f+=r*Y,l+=r*z,p+=r*F,d+=r*H,y+=r*X,v+=r*J,g+=r*K,b+=r*W,m+=r*G,_+=r*V,w+=r*Q,a+=(r=e[2])*B,u+=r*j,c+=r*N,h+=r*D,f+=r*q,l+=r*Y,p+=r*z,d+=r*F,y+=r*H,v+=r*X,g+=r*J,b+=r*K,m+=r*W,_+=r*G,w+=r*V,k+=r*Q,u+=(r=e[3])*B,c+=r*j,h+=r*N,f+=r*D,l+=r*q,p+=r*Y,d+=r*z,y+=r*F,v+=r*H,g+=r*X,b+=r*J,m+=r*K,_+=r*W,w+=r*G,k+=r*V,S+=r*Q,c+=(r=e[4])*B,h+=r*j,f+=r*N,l+=r*D,p+=r*q,d+=r*Y,y+=r*z,v+=r*F,g+=r*H,b+=r*X,m+=r*J,_+=r*K,w+=r*W,k+=r*G,S+=r*V,T+=r*Q,h+=(r=e[5])*B,f+=r*j,l+=r*N,p+=r*D,d+=r*q,y+=r*Y,v+=r*z,g+=r*F,b+=r*H,m+=r*X,_+=r*J,w+=r*K,k+=r*W,S+=r*G,T+=r*V,E+=r*Q,f+=(r=e[6])*B,l+=r*j,p+=r*N,d+=r*D,y+=r*q,v+=r*Y,g+=r*z,b+=r*F,m+=r*H,_+=r*X,w+=r*J,k+=r*K,S+=r*W,T+=r*G,E+=r*V,A+=r*Q,l+=(r=e[7])*B,p+=r*j,d+=r*N,y+=r*D,v+=r*q,g+=r*Y,b+=r*z,m+=r*F,_+=r*H,w+=r*X,k+=r*J,S+=r*K,T+=r*W,E+=r*G,A+=r*V,C+=r*Q,p+=(r=e[8])*B,d+=r*j,y+=r*N,v+=r*D,g+=r*q,b+=r*Y,m+=r*z,_+=r*F,w+=r*H,k+=r*X,S+=r*J,T+=r*K,E+=r*W,A+=r*G,C+=r*V,P+=r*Q,d+=(r=e[9])*B,y+=r*j,v+=r*N,g+=r*D,b+=r*q,m+=r*Y,_+=r*z,w+=r*F,k+=r*H,S+=r*X,T+=r*J,E+=r*K,A+=r*W,C+=r*G,P+=r*V,x+=r*Q,y+=(r=e[10])*B,v+=r*j,g+=r*N,b+=r*D,m+=r*q,_+=r*Y,w+=r*z,k+=r*F,S+=r*H,T+=r*X,E+=r*J,A+=r*K,C+=r*W,P+=r*G,x+=r*V,O+=r*Q,v+=(r=e[11])*B,g+=r*j,b+=r*N,m+=r*D,_+=r*q,w+=r*Y,k+=r*z,S+=r*F,T+=r*H,E+=r*X,A+=r*J,C+=r*K,P+=r*W,x+=r*G,O+=r*V,R+=r*Q,g+=(r=e[12])*B,b+=r*j,m+=r*N,_+=r*D,w+=r*q,k+=r*Y,S+=r*z,T+=r*F,E+=r*H,A+=r*X,C+=r*J,P+=r*K,x+=r*W,O+=r*G,R+=r*V,M+=r*Q,b+=(r=e[13])*B,m+=r*j,_+=r*N,w+=r*D,k+=r*q,S+=r*Y,T+=r*z,E+=r*F,A+=r*H,C+=r*X,P+=r*J,x+=r*K,O+=r*W,R+=r*G,M+=r*V,U+=r*Q,m+=(r=e[14])*B,_+=r*j,w+=r*N,k+=r*D,S+=r*q,T+=r*Y,E+=r*z,A+=r*F,C+=r*H,P+=r*X,x+=r*J,O+=r*K,R+=r*W,M+=r*G,U+=r*V,L+=r*Q,_+=(r=e[15])*B,s+=38*(k+=r*N),a+=38*(S+=r*D),u+=38*(T+=r*q),c+=38*(E+=r*Y),h+=38*(A+=r*z),f+=38*(C+=r*F),l+=38*(P+=r*H),p+=38*(x+=r*X),d+=38*(O+=r*J),y+=38*(R+=r*K),v+=38*(M+=r*W),g+=38*(U+=r*G),b+=38*(L+=r*V),m+=38*(I+=r*Q),o=(r=(o+=38*(w+=r*j))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),s=(r=s+i+65535)-65536*(i=Math.floor(r/65536)),a=(r=a+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),b=(r=b+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),_=(r=_+i+65535)-65536*(i=Math.floor(r/65536)),o=(r=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),s=(r=s+i+65535)-65536*(i=Math.floor(r/65536)),a=(r=a+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),b=(r=b+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),_=(r=_+i+65535)-65536*(i=Math.floor(r/65536)),o+=i-1+37*(i-1),t[0]=o,t[1]=s,t[2]=a,t[3]=u,t[4]=c,t[5]=h,t[6]=f,t[7]=l,t[8]=p,t[9]=d,t[10]=y,t[11]=v,t[12]=g,t[13]=b,t[14]=m,t[15]=_}function q(t,e){D(t,e,e)}function Y(t,n){var r,i=e();for(r=0;r<16;r++)i[r]=n[r];for(r=253;r>=0;r--)q(i,i),2!==r&&4!==r&&D(i,i,n);for(r=0;r<16;r++)t[r]=i[r]}function z(t,n,r){var i,o,s=new Uint8Array(32),a=new Float64Array(80),c=e(),h=e(),f=e(),l=e(),p=e(),d=e();for(o=0;o<31;o++)s[o]=n[o];for(s[31]=127&n[31]|64,s[0]&=248,B(a,r),o=0;o<16;o++)h[o]=a[o],l[o]=c[o]=f[o]=0;for(c[0]=l[0]=1,o=254;o>=0;--o)M(c,h,i=s[o>>>3]>>>(7&o)&1),M(f,l,i),j(p,c,f),N(c,c,f),j(f,h,l),N(h,h,l),q(l,p),q(d,c),D(c,f,c),D(f,h,p),j(p,c,f),N(c,c,f),q(h,c),N(f,l,d),D(c,f,u),j(c,c,l),D(f,f,c),D(c,l,d),D(l,h,a),q(h,p),M(c,h,i),M(f,l,i);for(o=0;o<16;o++)a[o+16]=c[o],a[o+32]=f[o],a[o+48]=h[o],a[o+64]=l[o];var y=a.subarray(32),v=a.subarray(16);return Y(y,y),D(v,v,y),U(t,v),0}function F(t,e){return z(t,e,o)}function H(t,e){return r(e,32),F(t,e)}function X(t,e,n){var r=new Uint8Array(32);return z(r,n,e),m(t,i,r,_)}E.prototype.blocks=function(t,e,n){for(var r,i,o,s,a,u,c,h,f,l,p,d,y,v,g,b,m,_,w,k=this.fin?0:2048,S=this.h[0],T=this.h[1],E=this.h[2],A=this.h[3],C=this.h[4],P=this.h[5],x=this.h[6],O=this.h[7],R=this.h[8],M=this.h[9],U=this.r[0],L=this.r[1],I=this.r[2],B=this.r[3],j=this.r[4],N=this.r[5],D=this.r[6],q=this.r[7],Y=this.r[8],z=this.r[9];n>=16;)S+=8191&(r=255&t[e+0]|(255&t[e+1])<<8),T+=8191&(r>>>13|(i=255&t[e+2]|(255&t[e+3])<<8)<<3),E+=8191&(i>>>10|(o=255&t[e+4]|(255&t[e+5])<<8)<<6),A+=8191&(o>>>7|(s=255&t[e+6]|(255&t[e+7])<<8)<<9),C+=8191&(s>>>4|(a=255&t[e+8]|(255&t[e+9])<<8)<<12),P+=a>>>1&8191,x+=8191&(a>>>14|(u=255&t[e+10]|(255&t[e+11])<<8)<<2),O+=8191&(u>>>11|(c=255&t[e+12]|(255&t[e+13])<<8)<<5),h=255&t[e+14]|(255&t[e+15])<<8,l=f=0,l+=S*U,l+=T*(5*z),l+=E*(5*Y),l+=A*(5*q),f=(l+=C*(5*D))>>>13,l&=8191,l+=P*(5*N),l+=x*(5*j),l+=O*(5*B),l+=(R+=8191&(c>>>8|h<<8))*(5*I),p=f+=(l+=(M+=h>>>5|k)*(5*L))>>>13,p+=S*L,p+=T*U,p+=E*(5*z),p+=A*(5*Y),f=(p+=C*(5*q))>>>13,p&=8191,p+=P*(5*D),p+=x*(5*N),p+=O*(5*j),p+=R*(5*B),f+=(p+=M*(5*I))>>>13,p&=8191,d=f,d+=S*I,d+=T*L,d+=E*U,d+=A*(5*z),f=(d+=C*(5*Y))>>>13,d&=8191,d+=P*(5*q),d+=x*(5*D),d+=O*(5*N),d+=R*(5*j),y=f+=(d+=M*(5*B))>>>13,y+=S*B,y+=T*I,y+=E*L,y+=A*U,f=(y+=C*(5*z))>>>13,y&=8191,y+=P*(5*Y),y+=x*(5*q),y+=O*(5*D),y+=R*(5*N),v=f+=(y+=M*(5*j))>>>13,v+=S*j,v+=T*B,v+=E*I,v+=A*L,f=(v+=C*U)>>>13,v&=8191,v+=P*(5*z),v+=x*(5*Y),v+=O*(5*q),v+=R*(5*D),g=f+=(v+=M*(5*N))>>>13,g+=S*N,g+=T*j,g+=E*B,g+=A*I,f=(g+=C*L)>>>13,g&=8191,g+=P*U,g+=x*(5*z),g+=O*(5*Y),g+=R*(5*q),b=f+=(g+=M*(5*D))>>>13,b+=S*D,b+=T*N,b+=E*j,b+=A*B,f=(b+=C*I)>>>13,b&=8191,b+=P*L,b+=x*U,b+=O*(5*z),b+=R*(5*Y),m=f+=(b+=M*(5*q))>>>13,m+=S*q,m+=T*D,m+=E*N,m+=A*j,f=(m+=C*B)>>>13,m&=8191,m+=P*I,m+=x*L,m+=O*U,m+=R*(5*z),_=f+=(m+=M*(5*Y))>>>13,_+=S*Y,_+=T*q,_+=E*D,_+=A*N,f=(_+=C*j)>>>13,_&=8191,_+=P*B,_+=x*I,_+=O*L,_+=R*U,w=f+=(_+=M*(5*z))>>>13,w+=S*z,w+=T*Y,w+=E*q,w+=A*D,f=(w+=C*N)>>>13,w&=8191,w+=P*j,w+=x*B,w+=O*I,w+=R*L,S=l=8191&(f=(f=((f+=(w+=M*U)>>>13)<<2)+f|0)+(l&=8191)|0),T=p+=f>>>=13,E=d&=8191,A=y&=8191,C=v&=8191,P=g&=8191,x=b&=8191,O=m&=8191,R=_&=8191,M=w&=8191,e+=16,n-=16;this.h[0]=S,this.h[1]=T,this.h[2]=E,this.h[3]=A,this.h[4]=C,this.h[5]=P,this.h[6]=x,this.h[7]=O,this.h[8]=R,this.h[9]=M},E.prototype.finish=function(t,e){var n,r,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=n,n=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,s[0]=this.h[0]+5,n=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+n,n=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,r=(1^n)-1,o=0;o<10;o++)s[o]&=r;for(r=~r,o=0;o<10;o++)this.h[o]=this.h[o]&r|s[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},E.prototype.update=function(t,e,n){var r,i;if(this.leftover){for((i=16-this.leftover)>n&&(i=n),r=0;r=16&&(i=n-n%16,this.blocks(t,e,i),e+=i,n-=i),n){for(r=0;r=128;){for(k=0;k<16;k++)S=8*k+G,O[k]=n[S+0]<<24|n[S+1]<<16|n[S+2]<<8|n[S+3],R[k]=n[S+4]<<24|n[S+5]<<16|n[S+6]<<8|n[S+7];for(k=0;k<80;k++)if(i=M,o=U,s=L,a=I,u=B,c=j,h=N,f=D,l=q,p=Y,d=z,y=F,v=H,g=X,b=J,m=K,A=65535&(E=K),C=E>>>16,P=65535&(T=D),x=T>>>16,A+=65535&(E=(H>>>14|B<<18)^(H>>>18|B<<14)^(B>>>9|H<<23)),C+=E>>>16,P+=65535&(T=(B>>>14|H<<18)^(B>>>18|H<<14)^(H>>>9|B<<23)),x+=T>>>16,A+=65535&(E=H&X^~H&J),C+=E>>>16,P+=65535&(T=B&j^~B&N),x+=T>>>16,T=W[2*k],A+=65535&(E=W[2*k+1]),C+=E>>>16,P+=65535&T,x+=T>>>16,T=O[k%16],C+=(E=R[k%16])>>>16,P+=65535&T,x+=T>>>16,P+=(C+=(A+=65535&E)>>>16)>>>16,A=65535&(E=w=65535&A|C<<16),C=E>>>16,P=65535&(T=_=65535&P|(x+=P>>>16)<<16),x=T>>>16,A+=65535&(E=(q>>>28|M<<4)^(M>>>2|q<<30)^(M>>>7|q<<25)),C+=E>>>16,P+=65535&(T=(M>>>28|q<<4)^(q>>>2|M<<30)^(q>>>7|M<<25)),x+=T>>>16,C+=(E=q&Y^q&z^Y&z)>>>16,P+=65535&(T=M&U^M&L^U&L),x+=T>>>16,f=65535&(P+=(C+=(A+=65535&E)>>>16)>>>16)|(x+=P>>>16)<<16,m=65535&A|C<<16,A=65535&(E=y),C=E>>>16,P=65535&(T=a),x=T>>>16,C+=(E=w)>>>16,P+=65535&(T=_),x+=T>>>16,U=i,L=o,I=s,B=a=65535&(P+=(C+=(A+=65535&E)>>>16)>>>16)|(x+=P>>>16)<<16,j=u,N=c,D=h,M=f,Y=l,z=p,F=d,H=y=65535&A|C<<16,X=v,J=g,K=b,q=m,k%16==15)for(S=0;S<16;S++)T=O[S],A=65535&(E=R[S]),C=E>>>16,P=65535&T,x=T>>>16,T=O[(S+9)%16],A+=65535&(E=R[(S+9)%16]),C+=E>>>16,P+=65535&T,x+=T>>>16,_=O[(S+1)%16],A+=65535&(E=((w=R[(S+1)%16])>>>1|_<<31)^(w>>>8|_<<24)^(w>>>7|_<<25)),C+=E>>>16,P+=65535&(T=(_>>>1|w<<31)^(_>>>8|w<<24)^_>>>7),x+=T>>>16,_=O[(S+14)%16],C+=(E=((w=R[(S+14)%16])>>>19|_<<13)^(_>>>29|w<<3)^(w>>>6|_<<26))>>>16,P+=65535&(T=(_>>>19|w<<13)^(w>>>29|_<<3)^_>>>6),x+=T>>>16,x+=(P+=(C+=(A+=65535&E)>>>16)>>>16)>>>16,O[S]=65535&P|x<<16,R[S]=65535&A|C<<16;A=65535&(E=q),C=E>>>16,P=65535&(T=M),x=T>>>16,T=t[0],C+=(E=e[0])>>>16,P+=65535&T,x+=T>>>16,x+=(P+=(C+=(A+=65535&E)>>>16)>>>16)>>>16,t[0]=M=65535&P|x<<16,e[0]=q=65535&A|C<<16,A=65535&(E=Y),C=E>>>16,P=65535&(T=U),x=T>>>16,T=t[1],C+=(E=e[1])>>>16,P+=65535&T,x+=T>>>16,x+=(P+=(C+=(A+=65535&E)>>>16)>>>16)>>>16,t[1]=U=65535&P|x<<16,e[1]=Y=65535&A|C<<16,A=65535&(E=z),C=E>>>16,P=65535&(T=L),x=T>>>16,T=t[2],C+=(E=e[2])>>>16,P+=65535&T,x+=T>>>16,x+=(P+=(C+=(A+=65535&E)>>>16)>>>16)>>>16,t[2]=L=65535&P|x<<16,e[2]=z=65535&A|C<<16,A=65535&(E=F),C=E>>>16,P=65535&(T=I),x=T>>>16,T=t[3],C+=(E=e[3])>>>16,P+=65535&T,x+=T>>>16,x+=(P+=(C+=(A+=65535&E)>>>16)>>>16)>>>16,t[3]=I=65535&P|x<<16,e[3]=F=65535&A|C<<16,A=65535&(E=H),C=E>>>16,P=65535&(T=B),x=T>>>16,T=t[4],C+=(E=e[4])>>>16,P+=65535&T,x+=T>>>16,x+=(P+=(C+=(A+=65535&E)>>>16)>>>16)>>>16,t[4]=B=65535&P|x<<16,e[4]=H=65535&A|C<<16,A=65535&(E=X),C=E>>>16,P=65535&(T=j),x=T>>>16,T=t[5],C+=(E=e[5])>>>16,P+=65535&T,x+=T>>>16,x+=(P+=(C+=(A+=65535&E)>>>16)>>>16)>>>16,t[5]=j=65535&P|x<<16,e[5]=X=65535&A|C<<16,A=65535&(E=J),C=E>>>16,P=65535&(T=N),x=T>>>16,T=t[6],C+=(E=e[6])>>>16,P+=65535&T,x+=T>>>16,x+=(P+=(C+=(A+=65535&E)>>>16)>>>16)>>>16,t[6]=N=65535&P|x<<16,e[6]=J=65535&A|C<<16,A=65535&(E=K),C=E>>>16,P=65535&(T=D),x=T>>>16,T=t[7],C+=(E=e[7])>>>16,P+=65535&T,x+=T>>>16,x+=(P+=(C+=(A+=65535&E)>>>16)>>>16)>>>16,t[7]=D=65535&P|x<<16,e[7]=K=65535&A|C<<16,G+=128,r-=128}return r}function V(t,e,n){var r,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=n;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,G(i,o,e,n),n%=128,r=0;r=0;--i)Z(t,e,r=n[i/8|0]>>(7&i)&1),Q(e,t),Q(t,t),Z(t,e,r)}function et(t,n){var r=[e(),e(),e(),e()];O(r[0],f),O(r[1],l),O(r[2],a),D(r[3],f,l),tt(t,r,n)}function nt(t,n,i){var o,s=new Uint8Array(64),a=[e(),e(),e(),e()];for(i||r(n,32),V(s,n,32),s[0]&=248,s[31]&=127,s[31]|=64,et(a,s),$(t,a),o=0;o<32;o++)n[o+32]=t[o];return 0}var rt=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function it(t,e){var n,r,i,o;for(r=63;r>=32;--r){for(n=0,i=r-32,o=r-12;i>8,e[i]-=256*n;e[i]+=n,e[r]=0}for(n=0,i=0;i<32;i++)e[i]+=n-(e[31]>>4)*rt[i],n=e[i]>>8,e[i]&=255;for(i=0;i<32;i++)e[i]-=n*rt[i];for(r=0;r<32;r++)e[r+1]+=e[r]>>8,t[r]=255&e[r]}function ot(t){var e,n=new Float64Array(64);for(e=0;e<64;e++)n[e]=t[e];for(e=0;e<64;e++)t[e]=0;it(t,n)}function st(t,n,r,i){var o,s,a=new Uint8Array(64),u=new Uint8Array(64),c=new Uint8Array(64),h=new Float64Array(64),f=[e(),e(),e(),e()];V(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var l=r+64;for(o=0;o=0;r--)q(i,i),1!==r&&D(i,i,n);for(r=0;r<16;r++)t[r]=i[r]}(r,r),D(r,r,o),D(r,r,u),D(r,r,u),D(t[0],r,u),q(i,t[0]),D(i,i,u),L(i,o)&&D(t[0],t[0],p),q(i,t[0]),D(i,i,u),L(i,o)?-1:(I(t[0])===n[31]>>7&&N(t[0],s,t[0]),D(t[3],t[0],t[1]),0)}function ut(t,n,r,i){var o,s=new Uint8Array(32),a=new Uint8Array(64),u=[e(),e(),e(),e()],c=[e(),e(),e(),e()];if(-1,r<64)return-1;if(at(c,i))return-1;for(o=0;o=0},t.sign.keyPair=function(){var t=new Uint8Array(32),e=new Uint8Array(64);return nt(t,e),{publicKey:t,secretKey:e}},t.sign.keyPair.fromSecretKey=function(t){if(yt(t),64!==t.length)throw new Error("bad secret key size");for(var e=new Uint8Array(32),n=0;n=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(r)return q(t).length;e=(""+e).toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:g(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var h=-1;for(o=n;oa&&(n=a-u),o=n;o>=0;o--){for(var f=!0,l=0;li&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function T(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(h=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(h=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u)}null===h?(h=65533,f=1):h>65535&&(h-=65536,r.push(h>>>10&1023|55296),h=56320|1023&h),r.push(h),i+=f}return function(t){var e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return C(this,e,n);case"latin1":case"binary":return P(this,e,n);case"base64":return T(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},u.prototype.compare=function(t,e,n,r,i){if(!u.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,s=n-e,a=Math.min(o,s),c=this.slice(r,i),h=t.slice(e,n),f=0;fi)&&(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(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return m(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return w(this,t,e,n);case"base64":return k(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function C(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ir)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function U(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function L(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function I(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(t,e,n,r,o){return o||I(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function j(t,e,n,r,o){return o||I(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if(t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||R(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||R(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||R(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||R(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||R(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||R(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||R(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||M(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):U(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):U(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);M(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);M(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):U(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):U(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return B(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return B(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return j(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return j(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Y(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(N,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}},function(t,e){"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){for(var e,n=u(t),o=n[0],s=n[1],a=new i(function(t,e,n){return 3*(e+n)/4-n}(0,o,s)),c=0,h=s>0?o-4:o,f=0;f>16&255,a[c++]=e>>8&255,a[c++]=255&e;2===s&&(e=r[t.charCodeAt(f)]<<2|r[t.charCodeAt(f+1)]>>4,a[c++]=255&e);1===s&&(e=r[t.charCodeAt(f)]<<10|r[t.charCodeAt(f+1)]<<4|r[t.charCodeAt(f+2)]>>2,a[c++]=e>>8&255,a[c++]=255&e);return a},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,r){for(var i,o,s=[],a=e;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<>1,h=-7,f=n?i-1:0,l=n?-1:1,p=t[e+f];for(f+=l,o=p&(1<<-h)-1,p>>=-h,h+=a;h>0;o=256*o+t[e+f],f+=l,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+t[e+f],f+=l,h-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,h=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?l/u:l*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=h?(a=0,s=h):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[n+p]=255&s,p+=d,s/=256,c-=8);t[n+p-d]|=128*y}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=n(24),o=n(12),s=n(8),a=n(9),u=n(2),c=function(t){function e(e,n){var r=this;t.call(this),this.key=e,this.options=n||{},this.state="initialized",this.connection=null,this.usingTLS=!!n.useTLS,this.timeline=this.options.timeline,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var i=u.default.getNetwork();i.bind("online",function(){r.timeline.info({netinfo:"online"}),"connecting"!==r.state&&"unavailable"!==r.state||r.retryIn(0)}),i.bind("offline",function(){r.timeline.info({netinfo:"offline"}),r.connection&&r.sendActivityCheck()}),this.updateStrategy()}return r(e,t),e.prototype.connect=function(){this.connection||this.runner||(this.strategy.isSupported()?(this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()):this.updateState("failed"))},e.prototype.send=function(t){return!!this.connection&&this.connection.send(t)},e.prototype.send_event=function(t,e,n){return!!this.connection&&this.connection.send_event(t,e,n)},e.prototype.disconnect=function(){this.disconnectInternally(),this.updateState("disconnected")},e.prototype.isUsingTLS=function(){return this.usingTLS},e.prototype.startConnecting=function(){var t=this,e=function(n,r){n?t.runner=t.strategy.connect(0,e):"error"===r.action?(t.emit("error",{type:"HandshakeError",error:r.error}),t.timeline.error({handshakeError:r.error})):(t.abortConnecting(),t.handshakeCallbacks[r.action](r))};this.runner=this.strategy.connect(0,e)},e.prototype.abortConnecting=function(){this.runner&&(this.runner.abort(),this.runner=null)},e.prototype.disconnectInternally=function(){(this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection)&&this.abandonConnection().close()},e.prototype.updateStrategy=function(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})},e.prototype.retryIn=function(t){var e=this;this.timeline.info({action:"retry",delay:t}),t>0&&this.emit("connecting_in",Math.round(t/1e3)),this.retryTimer=new o.OneOffTimer(t||0,function(){e.disconnectInternally(),e.connect()})},e.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},e.prototype.setUnavailableTimer=function(){var t=this;this.unavailableTimer=new o.OneOffTimer(this.options.unavailableTimeout,function(){t.updateState("unavailable")})},e.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},e.prototype.sendActivityCheck=function(){var t=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new o.OneOffTimer(this.options.pongTimeout,function(){t.timeline.error({pong_timed_out:t.options.pongTimeout}),t.retryIn(0)})},e.prototype.resetActivityCheck=function(){var t=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new o.OneOffTimer(this.activityTimeout,function(){t.sendActivityCheck()}))},e.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},e.prototype.buildConnectionCallbacks=function(t){var e=this;return a.extend({},t,{message:function(t){e.resetActivityCheck(),e.emit("message",t)},ping:function(){e.send_event("pusher:pong",{})},activity:function(){e.resetActivityCheck()},error:function(t){e.emit("error",{type:"WebSocketError",error:t})},closed:function(){e.abandonConnection(),e.shouldRetry()&&e.retryIn(1e3)}})},e.prototype.buildHandshakeCallbacks=function(t){var e=this;return a.extend({},t,{connected:function(t){e.activityTimeout=Math.min(e.options.activityTimeout,t.activityTimeout,t.connection.activityTimeout||1/0),e.clearUnavailableTimer(),e.setConnection(t.connection),e.socket_id=e.connection.id,e.updateState("connected",{socket_id:e.socket_id})}})},e.prototype.buildErrorCallbacks=function(){var t=this,e=function(e){return function(n){n.error&&t.emit("error",{type:"WebSocketError",error:n.error}),e(n)}};return{tls_only:e(function(){t.usingTLS=!0,t.updateStrategy(),t.retryIn(0)}),refused:e(function(){t.disconnect()}),backoff:e(function(){t.retryIn(1e3)}),retry:e(function(){t.retryIn(0)})}},e.prototype.setConnection=function(t){for(var e in this.connection=t,this.connectionCallbacks)this.connection.bind(e,this.connectionCallbacks[e]);this.resetActivityCheck()},e.prototype.abandonConnection=function(){if(this.connection){for(var t in this.stopActivityCheck(),this.connectionCallbacks)this.connection.unbind(t,this.connectionCallbacks[t]);var e=this.connection;return this.connection=null,e}},e.prototype.updateState=function(t,e){var n=this.state;if(this.state=t,n!==t){var r=t;"connected"===r&&(r+=" with new socket ID "+e.socket_id),s.default.debug("State changed",n+" -> "+r),this.timeline.info({state:t,params:e}),this.emit("state_change",{previous:n,current:t}),this.emit(t,e)}},e.prototype.shouldRetry=function(){return"connecting"===this.state||"connected"===this.state},e}(i.default);e.__esModule=!0,e.default=c},function(t,e,n){"use strict";var r=n(9),i=n(43),o=n(31),s=function(){function t(){this.channels={}}return t.prototype.add=function(t,e){return this.channels[t]||(this.channels[t]=function(t,e){if(0===t.indexOf("private-encrypted-")){if("ReactNative"==navigator.product){throw new o.UnsupportedFeature("Encrypted channels are not yet supported when using React Native builds.")}return i.default.createEncryptedChannel(t,e)}return 0===t.indexOf("private-")?i.default.createPrivateChannel(t,e):0===t.indexOf("presence-")?i.default.createPresenceChannel(t,e):i.default.createChannel(t,e)}(t,e)),this.channels[t]},t.prototype.all=function(){return r.values(this.channels)},t.prototype.find=function(t){return this.channels[t]},t.prototype.remove=function(t){var e=this.channels[t];return delete this.channels[t],e},t.prototype.disconnect=function(){r.objectApply(this.channels,function(t){t.disconnect()})},t}();e.__esModule=!0,e.default=s},function(t,e,n){"use strict";var r=n(43),i=n(11),o=n(31),s=n(9),a=function(){function t(t,e,n,r){this.name=t,this.priority=e,this.transport=n,this.options=r||{}}return t.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},t.prototype.connect=function(t,e){var n=this;if(!this.isSupported())return u(new o.UnsupportedStrategy,e);if(this.priority0&&(i=new o.OneOffTimer(n.timeout,function(){s.abort(),r(!0)})),s=t.connect(e,function(t,e){t&&i&&i.isRunning()&&!n.failFast||(i&&i.ensureAborted(),r(t,e))}),{abort:function(){i&&i.ensureAborted(),s.abort()},forceMinPriority:function(t){s.forceMinPriority(t)}}},t}();e.__esModule=!0,e.default=s},function(t,e,n){"use strict";var r=n(9),i=n(11),o=function(){function t(t){this.strategies=t}return t.prototype.isSupported=function(){return r.any(this.strategies,i.default.method("isSupported"))},t.prototype.connect=function(t,e){return function(t,e,n){var i=r.map(t,function(t,r,i,o){return t.connect(e,n(r,o))});return{abort:function(){r.apply(i,s)},forceMinPriority:function(t){r.apply(i,function(e){e.forceMinPriority(t)})}}}(this.strategies,t,function(t,n){return function(i,o){n[t].error=i,i?function(t){return r.all(t,function(t){return Boolean(t.error)})}(n)&&e(!0):(r.apply(n,function(t){t.forceMinPriority(o.transport.priority)}),e(null,o))}})},t}();function s(t){t.error||t.aborted||(t.abort(),t.aborted=!0)}e.__esModule=!0,e.default=o},function(t,e,n){"use strict";var r=n(11),i=n(2),o=n(65),s=n(9),a=function(){function t(t,e,n){this.strategy=t,this.transports=e,this.ttl=n.ttl||18e5,this.usingTLS=n.useTLS,this.timeline=n.timeline}return t.prototype.isSupported=function(){return this.strategy.isSupported()},t.prototype.connect=function(t,e){var n=this.usingTLS,a=function(t){var e=i.default.getLocalStorage();if(e)try{var n=e[u(t)];if(n)return JSON.parse(n)}catch(e){c(t)}return null}(n),h=[this.strategy];if(a&&a.timestamp+this.ttl>=r.default.now()){var f=this.transports[a.transport];f&&(this.timeline.info({cached:!0,transport:a.transport,latency:a.latency}),h.push(new o.default([f],{timeout:2*a.latency+1e3,failFast:!0})))}var l=r.default.now(),p=h.pop().connect(t,function o(a,f){a?(c(n),h.length>0?(l=r.default.now(),p=h.pop().connect(t,o)):e(a)):(!function(t,e,n){var o=i.default.getLocalStorage();if(o)try{o[u(t)]=s.safeJSONStringify({timestamp:r.default.now(),transport:e,latency:n})}catch(t){}}(n,f.transport.name,r.default.now()-l),e(null,f))});return{abort:function(){p.abort()},forceMinPriority:function(e){t=e,p&&p.forceMinPriority(e)}}},t}();function u(t){return"pusherTransport"+(t?"TLS":"NonTLS")}function c(t){var e=i.default.getLocalStorage();if(e)try{delete e[u(t)]}catch(t){}}e.__esModule=!0,e.default=a},function(t,e,n){"use strict";var r=n(12),i=function(){function t(t,e){var n=e.delay;this.strategy=t,this.options={delay:n}}return t.prototype.isSupported=function(){return this.strategy.isSupported()},t.prototype.connect=function(t,e){var n,i=this.strategy,o=new r.OneOffTimer(this.options.delay,function(){n=i.connect(t,e)});return{abort:function(){o.ensureAborted(),n&&n.abort()},forceMinPriority:function(e){t=e,n&&n.forceMinPriority(e)}}},t}();e.__esModule=!0,e.default=i},function(t,e){"use strict";var n=function(){function t(t,e,n){this.test=t,this.trueBranch=e,this.falseBranch=n}return t.prototype.isSupported=function(){return(this.test()?this.trueBranch:this.falseBranch).isSupported()},t.prototype.connect=function(t,e){return(this.test()?this.trueBranch:this.falseBranch).connect(t,e)},t}();e.__esModule=!0,e.default=n},function(t,e){"use strict";var n=function(){function t(t){this.strategy=t}return t.prototype.isSupported=function(){return this.strategy.isSupported()},t.prototype.connect=function(t,e){var n=this.strategy.connect(t,function(t,r){r&&n.abort(),e(t,r)});return n},t}();e.__esModule=!0,e.default=n},function(t,e,n){"use strict";var r=n(5);e.getGlobalConfig=function(){return{wsHost:r.default.host,wsPort:r.default.ws_port,wssPort:r.default.wss_port,wsPath:r.default.ws_path,httpHost:r.default.sockjs_host,httpPort:r.default.sockjs_http_port,httpsPort:r.default.sockjs_https_port,httpPath:r.default.sockjs_path,statsHost:r.default.stats_host,authEndpoint:r.default.channel_auth_endpoint,authTransport:r.default.channel_auth_transport,activity_timeout:r.default.activity_timeout,pong_timeout:r.default.pong_timeout,unavailable_timeout:r.default.unavailable_timeout}},e.getClusterConfig=function(t){return{wsHost:"ws-"+t+".pusher.com",httpHost:"sockjs-"+t+".pusher.com"}}}])},t.exports=r()}]); \ No newline at end of file +!function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){t.exports=n(1)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(t,e){for(var n=0;n0)r.loading[t].push(n);else{r.loading[t]=[n];var o=i.default.createScriptRequest(r.getPath(t,e)),s=r.receivers.create(function(e){if(r.receivers.remove(s),r.loading[t]){var n=r.loading[t];delete r.loading[t];for(var i=function(t){t||o.cleanup()},a=0;a>>6)+r(128|63&e):r(224|e>>>12&15)+r(128|e>>>6&63)+r(128|63&e)},c=function(t){return t.replace(/[^\x00-\x7F]/g,u)},h=function(t){var e=[0,2,1][t.length%3],n=t.charCodeAt(0)<<16|(t.length>1?t.charCodeAt(1):0)<<8|(t.length>2?t.charCodeAt(2):0);return[i.charAt(n>>>18),i.charAt(n>>>12&63),e>=2?"=":i.charAt(n>>>6&63),e>=1?"=":i.charAt(63&n)].join("")},f=window.btoa||function(t){return t.replace(/[\s\S]{1,3}/g,h)}},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;n0)for(n=0;n0&&t.onChunk(200,e.responseText)},e.onload=function(){e.responseText&&e.responseText.length>0&&t.onChunk(200,e.responseText),t.emit("finished",200),t.close()},e},abortRequest:function(t){t.ontimeout=t.onerror=t.onprogress=t.onload=null,t.abort()}};e.__esModule=!0,e.default=i},function(t,e){"use strict";var n=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},r=function(t){function e(){t.apply(this,arguments)}return n(e,t),e}(Error);e.BadEventName=r;var i=function(t){function e(){t.apply(this,arguments)}return n(e,t),e}(Error);e.RequestTimedOut=i;var o=function(t){function e(){t.apply(this,arguments)}return n(e,t),e}(Error);e.TransportPriorityTooLow=o;var s=function(t){function e(){t.apply(this,arguments)}return n(e,t),e}(Error);e.TransportClosed=s;var a=function(t){function e(){t.apply(this,arguments)}return n(e,t),e}(Error);e.UnsupportedFeature=a;var u=function(t){function e(){t.apply(this,arguments)}return n(e,t),e}(Error);e.UnsupportedTransport=u;var c=function(t){function e(){t.apply(this,arguments)}return n(e,t),e}(Error);e.UnsupportedStrategy=c},function(t,e,n){"use strict";var r=n(33),i=n(34),o=n(36),s=n(37),a=n(38),u={createStreamingSocket:function(t){return this.createSocket(o.default,t)},createPollingSocket:function(t){return this.createSocket(s.default,t)},createSocket:function(t,e){return new i.default(t,e)},createXHR:function(t,e){return this.createRequest(a.default,t,e)},createRequest:function(t,e,n){return new r.default(t,e,n)}};e.__esModule=!0,e.default=u},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=n(2),o=function(t){function e(e,n,r){t.call(this),this.hooks=e,this.method=n,this.url=r}return r(e,t),e.prototype.start=function(t){var e=this;this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=function(){e.close()},i.default.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(t)},e.prototype.close=function(){this.unloader&&(i.default.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)},e.prototype.onChunk=function(t,e){for(;;){var n=this.advanceBuffer(e);if(!n)break;this.emit("chunk",{status:t,data:n})}this.isBufferTooLong(e)&&this.emit("buffer_too_long")},e.prototype.advanceBuffer=function(t){var e=t.slice(this.position),n=e.indexOf("\n");return-1!==n?(this.position+=n+1,e.slice(0,n)):null},e.prototype.isBufferTooLong=function(t){return this.position===t.length&&t.length>262144},e}(n(24).default);e.__esModule=!0,e.default=o},function(t,e,n){"use strict";var r=n(35),i=n(11),o=n(2),s=1,a=function(){function t(t,e){this.hooks=t,this.session=c(1e3)+"/"+function(t){for(var e=[],n=0;n0&&t.onChunk(e.status,e.responseText);break;case 4:e.responseText&&e.responseText.length>0&&t.onChunk(e.status,e.responseText),t.emit("finished",e.status),t.close()}},e},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[t.ERROR=3]="ERROR",t[t.INFO=6]="INFO",t[t.DEBUG=7]="DEBUG"}(n||(n={})),e.__esModule=!0,e.default=n},function(t,e,n){"use strict";var r=n(9),i=n(11),o=n(42),s=n(31),a=n(64),u=n(65),c=n(66),h=n(67),f=n(68),l=n(69),p=n(70),d=n(2).default.Transports;e.build=function(t,e){return w(t,r.extend({},g,e))[1].strategy};var y={isSupported:function(){return!1},connect:function(t,e){var n=i.default.defer(function(){e(new s.UnsupportedStrategy)});return{abort:function(){n.ensureAborted()},forceMinPriority:function(){}}}};function v(t){return function(e){return[t.apply(this,arguments),e]}}var g={extend:function(t,e,n){return[r.extend({},e,n),t]},def:function(t,e,n){if(void 0!==t[e])throw"Redefining symbol "+e;return t[e]=n,[void 0,t]},def_transport:function(t,e,n,i,o,u){var c,h=d[n];if(!h)throw new s.UnsupportedTransport(n);c=!(t.enabledTransports&&-1===r.arrayIndexOf(t.enabledTransports,e)||t.disabledTransports&&-1!==r.arrayIndexOf(t.disabledTransports,e))?new a.default(e,i,u?u.getAssistant(h):h,r.extend({key:t.key,useTLS:t.useTLS,timeline:t.timeline,ignoreNullOrigin:t.ignoreNullOrigin},o)):y;var f=t.def(t,e,c)[1];return f.Transports=t.Transports||{},f.Transports[e]=c,[void 0,f]},transport_manager:v(function(t,e){return new o.default(e)}),sequential:v(function(t,e){var n=Array.prototype.slice.call(arguments,2);return new u.default(n,e)}),cached:v(function(t,e,n){return new h.default(n,t.Transports,{ttl:e,timeline:t.timeline,useTLS:t.useTLS})}),first_connected:v(function(t,e){return new p.default(e)}),best_connected_ever:v(function(){var t=Array.prototype.slice.call(arguments,1);return new c.default(t)}),delayed:v(function(t,e,n){return new f.default(n,{delay:e})}),if:v(function(t,e,n,r){return new l.default(e,n,r)}),is_supported:v(function(t,e){return function(){return e.isSupported()}})};function b(t){return"string"==typeof t&&":"===t.charAt(0)}function m(t,e){return e[t.slice(1)]}function _(t,e){if(b(t[0])){var n=m(t[0],e);if(t.length>1){if("function"!=typeof n)throw"Calling non-function "+t[0];var i=[r.extend({},e)].concat(r.map(t.slice(1),function(t){return w(t,r.extend({},e))[0]}));return n.apply(this,i)}return[n,e]}return function t(e,n){if(0===e.length)return[[],n];var r=w(e[0],n),i=t(e.slice(1),r[1]);return[[r[0]].concat(i[0]),i[1]]}(t,e)}function w(t,e){return"string"==typeof t?function(t,e){if(!b(t))return[t,e];var n=m(t,e);if(void 0===n)throw"Undefined symbol "+t;return[n,e]}(t,e):"object"==typeof t&&t instanceof Array&&t.length>0?_(t,e):[t,e]}},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){var n;t.unbindListeners();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("pusher:connection_established"===(t=e.decodeMessage(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){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},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(r))},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(void 0===r.default.getAuthorizers()[n])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[n]);return e},t.prototype.authorize=function(e,n){return t.authorizers=t.authorizers||r.default.getAuthorizers(),t.authorizers[this.type].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){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},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){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=n(43),o=function(t){function e(){t.apply(this,arguments)}return r(e,t),e.prototype.authorize=function(t,e){return i.default.createAuthorizer(this,this.pusher.config).authorize(t,e)},e}(n(52).default);e.__esModule=!0,e.default=o},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},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[t]}:null},t.prototype.each=function(t){var e=this;r.objectApply(this.members,function(n,r){t(e.get(r))})},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_id]=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[t.user_id],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){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},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)n(!0,e);else{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){0!==e.indexOf("pusher_internal:")&&0!==e.indexOf("pusher:")?this.handleEncryptedEvent(e,n):t.prototype.handleEvent.call(this,e,n)},e.prototype.handleEncryptedEvent=function(t,e){var n=this;if(this.key)if(e.ciphertext&&e.nonce){var r=u.decodeBase64(e.ciphertext);if(r.length>24&255,t[e+1]=n>>16&255,t[e+2]=n>>8&255,t[e+3]=255&n,t[e+4]=r>>24&255,t[e+5]=r>>16&255,t[e+6]=r>>8&255,t[e+7]=255&r}function y(t,e,n,r,i){var o,s=0;for(o=0;o>>8)-1}function v(t,e,n,r){return y(t,e,n,r,16)}function g(t,e,n,r){return y(t,e,n,r,32)}function b(t,e,n,r){!function(t,e,n,r){for(var i,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,u=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,h=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,f=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,l=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,y=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,m=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,_=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,w=o,k=s,S=a,T=u,E=c,A=h,P=f,C=l,x=p,O=d,R=y,M=v,U=g,L=b,I=m,B=_,j=0;j<20;j+=2)w^=(i=(U^=(i=(x^=(i=(E^=(i=w+U|0)<<7|i>>>25)+w|0)<<9|i>>>23)+E|0)<<13|i>>>19)+x|0)<<18|i>>>14,A^=(i=(k^=(i=(L^=(i=(O^=(i=A+k|0)<<7|i>>>25)+A|0)<<9|i>>>23)+O|0)<<13|i>>>19)+L|0)<<18|i>>>14,R^=(i=(P^=(i=(S^=(i=(I^=(i=R+P|0)<<7|i>>>25)+R|0)<<9|i>>>23)+I|0)<<13|i>>>19)+S|0)<<18|i>>>14,B^=(i=(M^=(i=(C^=(i=(T^=(i=B+M|0)<<7|i>>>25)+B|0)<<9|i>>>23)+T|0)<<13|i>>>19)+C|0)<<18|i>>>14,w^=(i=(T^=(i=(S^=(i=(k^=(i=w+T|0)<<7|i>>>25)+w|0)<<9|i>>>23)+k|0)<<13|i>>>19)+S|0)<<18|i>>>14,A^=(i=(E^=(i=(C^=(i=(P^=(i=A+E|0)<<7|i>>>25)+A|0)<<9|i>>>23)+P|0)<<13|i>>>19)+C|0)<<18|i>>>14,R^=(i=(O^=(i=(x^=(i=(M^=(i=R+O|0)<<7|i>>>25)+R|0)<<9|i>>>23)+M|0)<<13|i>>>19)+x|0)<<18|i>>>14,B^=(i=(I^=(i=(L^=(i=(U^=(i=B+I|0)<<7|i>>>25)+B|0)<<9|i>>>23)+U|0)<<13|i>>>19)+L|0)<<18|i>>>14;w=w+o|0,k=k+s|0,S=S+a|0,T=T+u|0,E=E+c|0,A=A+h|0,P=P+f|0,C=C+l|0,x=x+p|0,O=O+d|0,R=R+y|0,M=M+v|0,U=U+g|0,L=L+b|0,I=I+m|0,B=B+_|0,t[0]=w>>>0&255,t[1]=w>>>8&255,t[2]=w>>>16&255,t[3]=w>>>24&255,t[4]=k>>>0&255,t[5]=k>>>8&255,t[6]=k>>>16&255,t[7]=k>>>24&255,t[8]=S>>>0&255,t[9]=S>>>8&255,t[10]=S>>>16&255,t[11]=S>>>24&255,t[12]=T>>>0&255,t[13]=T>>>8&255,t[14]=T>>>16&255,t[15]=T>>>24&255,t[16]=E>>>0&255,t[17]=E>>>8&255,t[18]=E>>>16&255,t[19]=E>>>24&255,t[20]=A>>>0&255,t[21]=A>>>8&255,t[22]=A>>>16&255,t[23]=A>>>24&255,t[24]=P>>>0&255,t[25]=P>>>8&255,t[26]=P>>>16&255,t[27]=P>>>24&255,t[28]=C>>>0&255,t[29]=C>>>8&255,t[30]=C>>>16&255,t[31]=C>>>24&255,t[32]=x>>>0&255,t[33]=x>>>8&255,t[34]=x>>>16&255,t[35]=x>>>24&255,t[36]=O>>>0&255,t[37]=O>>>8&255,t[38]=O>>>16&255,t[39]=O>>>24&255,t[40]=R>>>0&255,t[41]=R>>>8&255,t[42]=R>>>16&255,t[43]=R>>>24&255,t[44]=M>>>0&255,t[45]=M>>>8&255,t[46]=M>>>16&255,t[47]=M>>>24&255,t[48]=U>>>0&255,t[49]=U>>>8&255,t[50]=U>>>16&255,t[51]=U>>>24&255,t[52]=L>>>0&255,t[53]=L>>>8&255,t[54]=L>>>16&255,t[55]=L>>>24&255,t[56]=I>>>0&255,t[57]=I>>>8&255,t[58]=I>>>16&255,t[59]=I>>>24&255,t[60]=B>>>0&255,t[61]=B>>>8&255,t[62]=B>>>16&255,t[63]=B>>>24&255}(t,e,n,r)}function m(t,e,n,r){!function(t,e,n,r){for(var i,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,u=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,h=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,f=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,l=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,y=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,m=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,_=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,w=0;w<20;w+=2)o^=(i=(g^=(i=(p^=(i=(c^=(i=o+g|0)<<7|i>>>25)+o|0)<<9|i>>>23)+c|0)<<13|i>>>19)+p|0)<<18|i>>>14,h^=(i=(s^=(i=(b^=(i=(d^=(i=h+s|0)<<7|i>>>25)+h|0)<<9|i>>>23)+d|0)<<13|i>>>19)+b|0)<<18|i>>>14,y^=(i=(f^=(i=(a^=(i=(m^=(i=y+f|0)<<7|i>>>25)+y|0)<<9|i>>>23)+m|0)<<13|i>>>19)+a|0)<<18|i>>>14,_^=(i=(v^=(i=(l^=(i=(u^=(i=_+v|0)<<7|i>>>25)+_|0)<<9|i>>>23)+u|0)<<13|i>>>19)+l|0)<<18|i>>>14,o^=(i=(u^=(i=(a^=(i=(s^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+a|0)<<18|i>>>14,h^=(i=(c^=(i=(l^=(i=(f^=(i=h+c|0)<<7|i>>>25)+h|0)<<9|i>>>23)+f|0)<<13|i>>>19)+l|0)<<18|i>>>14,y^=(i=(d^=(i=(p^=(i=(v^=(i=y+d|0)<<7|i>>>25)+y|0)<<9|i>>>23)+v|0)<<13|i>>>19)+p|0)<<18|i>>>14,_^=(i=(m^=(i=(b^=(i=(g^=(i=_+m|0)<<7|i>>>25)+_|0)<<9|i>>>23)+g|0)<<13|i>>>19)+b|0)<<18|i>>>14;t[0]=o>>>0&255,t[1]=o>>>8&255,t[2]=o>>>16&255,t[3]=o>>>24&255,t[4]=h>>>0&255,t[5]=h>>>8&255,t[6]=h>>>16&255,t[7]=h>>>24&255,t[8]=y>>>0&255,t[9]=y>>>8&255,t[10]=y>>>16&255,t[11]=y>>>24&255,t[12]=_>>>0&255,t[13]=_>>>8&255,t[14]=_>>>16&255,t[15]=_>>>24&255,t[16]=f>>>0&255,t[17]=f>>>8&255,t[18]=f>>>16&255,t[19]=f>>>24&255,t[20]=l>>>0&255,t[21]=l>>>8&255,t[22]=l>>>16&255,t[23]=l>>>24&255,t[24]=p>>>0&255,t[25]=p>>>8&255,t[26]=p>>>16&255,t[27]=p>>>24&255,t[28]=d>>>0&255,t[29]=d>>>8&255,t[30]=d>>>16&255,t[31]=d>>>24&255}(t,e,n,r)}var _=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function w(t,e,n,r,i,o,s){var a,u,c=new Uint8Array(16),h=new Uint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=o[u];for(;i>=64;){for(b(h,c,s,_),u=0;u<64;u++)t[e+u]=n[r+u]^h[u];for(a=1,u=8;u<16;u++)a=a+(255&c[u])|0,c[u]=255&a,a>>>=8;i-=64,e+=64,r+=64}if(i>0)for(b(h,c,s,_),u=0;u=64;){for(b(u,a,i,_),s=0;s<64;s++)t[e+s]=u[s];for(o=1,s=8;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;n-=64,e+=64}if(n>0)for(b(u,a,i,_),s=0;s>>13|n<<3),r=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(n>>>10|r<<6),i=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(r>>>7|i<<9),o=255&t[8]|(255&t[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(s>>>11|a<<5),u=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(a>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function A(t,e,n,r,i,o){var s=new E(o);return s.update(n,r,i),s.finish(t,e),0}function P(t,e,n,r,i,o){var s=new Uint8Array(16);return A(s,0,n,r,i,o),v(t,e,s,0)}function C(t,e,n,r,i){var o;if(n<32)return-1;for(T(t,0,e,0,n,r,i),A(t,16,t,32,n-32,t),o=0;o<16;o++)t[o]=0;return 0}function x(t,e,n,r,i){var o,s=new Uint8Array(32);if(n<32)return-1;if(S(s,0,32,r,i),0!==P(e,16,e,32,n-32,s))return-1;for(T(t,0,e,0,n,r,i),o=0;o<32;o++)t[o]=0;return 0}function O(t,e){var n;for(n=0;n<16;n++)t[n]=0|e[n]}function R(t){var e,n,r=1;for(e=0;e<16;e++)n=t[e]+r+65535,r=Math.floor(n/65536),t[e]=n-65536*r;t[0]+=r-1+37*(r-1)}function M(t,e,n){for(var r,i=~(n-1),o=0;o<16;o++)r=i&(t[o]^e[o]),t[o]^=r,e[o]^=r}function U(t,n){var r,i,o,s=e(),a=e();for(r=0;r<16;r++)a[r]=n[r];for(R(a),R(a),R(a),i=0;i<2;i++){for(s[0]=a[0]-65517,r=1;r<15;r++)s[r]=a[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,M(a,s,1-o)}for(r=0;r<16;r++)t[2*r]=255&a[r],t[2*r+1]=a[r]>>8}function L(t,e){var n=new Uint8Array(32),r=new Uint8Array(32);return U(n,t),U(r,e),g(n,0,r,0)}function I(t){var e=new Uint8Array(32);return U(e,t),1&e[0]}function B(t,e){var n;for(n=0;n<16;n++)t[n]=e[2*n]+(e[2*n+1]<<8);t[15]&=32767}function j(t,e,n){for(var r=0;r<16;r++)t[r]=e[r]+n[r]}function N(t,e,n){for(var r=0;r<16;r++)t[r]=e[r]-n[r]}function D(t,e,n){var r,i,o=0,s=0,a=0,u=0,c=0,h=0,f=0,l=0,p=0,d=0,y=0,v=0,g=0,b=0,m=0,_=0,w=0,k=0,S=0,T=0,E=0,A=0,P=0,C=0,x=0,O=0,R=0,M=0,U=0,L=0,I=0,B=n[0],j=n[1],N=n[2],D=n[3],q=n[4],Y=n[5],z=n[6],F=n[7],H=n[8],X=n[9],J=n[10],K=n[11],W=n[12],G=n[13],V=n[14],Q=n[15];o+=(r=e[0])*B,s+=r*j,a+=r*N,u+=r*D,c+=r*q,h+=r*Y,f+=r*z,l+=r*F,p+=r*H,d+=r*X,y+=r*J,v+=r*K,g+=r*W,b+=r*G,m+=r*V,_+=r*Q,s+=(r=e[1])*B,a+=r*j,u+=r*N,c+=r*D,h+=r*q,f+=r*Y,l+=r*z,p+=r*F,d+=r*H,y+=r*X,v+=r*J,g+=r*K,b+=r*W,m+=r*G,_+=r*V,w+=r*Q,a+=(r=e[2])*B,u+=r*j,c+=r*N,h+=r*D,f+=r*q,l+=r*Y,p+=r*z,d+=r*F,y+=r*H,v+=r*X,g+=r*J,b+=r*K,m+=r*W,_+=r*G,w+=r*V,k+=r*Q,u+=(r=e[3])*B,c+=r*j,h+=r*N,f+=r*D,l+=r*q,p+=r*Y,d+=r*z,y+=r*F,v+=r*H,g+=r*X,b+=r*J,m+=r*K,_+=r*W,w+=r*G,k+=r*V,S+=r*Q,c+=(r=e[4])*B,h+=r*j,f+=r*N,l+=r*D,p+=r*q,d+=r*Y,y+=r*z,v+=r*F,g+=r*H,b+=r*X,m+=r*J,_+=r*K,w+=r*W,k+=r*G,S+=r*V,T+=r*Q,h+=(r=e[5])*B,f+=r*j,l+=r*N,p+=r*D,d+=r*q,y+=r*Y,v+=r*z,g+=r*F,b+=r*H,m+=r*X,_+=r*J,w+=r*K,k+=r*W,S+=r*G,T+=r*V,E+=r*Q,f+=(r=e[6])*B,l+=r*j,p+=r*N,d+=r*D,y+=r*q,v+=r*Y,g+=r*z,b+=r*F,m+=r*H,_+=r*X,w+=r*J,k+=r*K,S+=r*W,T+=r*G,E+=r*V,A+=r*Q,l+=(r=e[7])*B,p+=r*j,d+=r*N,y+=r*D,v+=r*q,g+=r*Y,b+=r*z,m+=r*F,_+=r*H,w+=r*X,k+=r*J,S+=r*K,T+=r*W,E+=r*G,A+=r*V,P+=r*Q,p+=(r=e[8])*B,d+=r*j,y+=r*N,v+=r*D,g+=r*q,b+=r*Y,m+=r*z,_+=r*F,w+=r*H,k+=r*X,S+=r*J,T+=r*K,E+=r*W,A+=r*G,P+=r*V,C+=r*Q,d+=(r=e[9])*B,y+=r*j,v+=r*N,g+=r*D,b+=r*q,m+=r*Y,_+=r*z,w+=r*F,k+=r*H,S+=r*X,T+=r*J,E+=r*K,A+=r*W,P+=r*G,C+=r*V,x+=r*Q,y+=(r=e[10])*B,v+=r*j,g+=r*N,b+=r*D,m+=r*q,_+=r*Y,w+=r*z,k+=r*F,S+=r*H,T+=r*X,E+=r*J,A+=r*K,P+=r*W,C+=r*G,x+=r*V,O+=r*Q,v+=(r=e[11])*B,g+=r*j,b+=r*N,m+=r*D,_+=r*q,w+=r*Y,k+=r*z,S+=r*F,T+=r*H,E+=r*X,A+=r*J,P+=r*K,C+=r*W,x+=r*G,O+=r*V,R+=r*Q,g+=(r=e[12])*B,b+=r*j,m+=r*N,_+=r*D,w+=r*q,k+=r*Y,S+=r*z,T+=r*F,E+=r*H,A+=r*X,P+=r*J,C+=r*K,x+=r*W,O+=r*G,R+=r*V,M+=r*Q,b+=(r=e[13])*B,m+=r*j,_+=r*N,w+=r*D,k+=r*q,S+=r*Y,T+=r*z,E+=r*F,A+=r*H,P+=r*X,C+=r*J,x+=r*K,O+=r*W,R+=r*G,M+=r*V,U+=r*Q,m+=(r=e[14])*B,_+=r*j,w+=r*N,k+=r*D,S+=r*q,T+=r*Y,E+=r*z,A+=r*F,P+=r*H,C+=r*X,x+=r*J,O+=r*K,R+=r*W,M+=r*G,U+=r*V,L+=r*Q,_+=(r=e[15])*B,s+=38*(k+=r*N),a+=38*(S+=r*D),u+=38*(T+=r*q),c+=38*(E+=r*Y),h+=38*(A+=r*z),f+=38*(P+=r*F),l+=38*(C+=r*H),p+=38*(x+=r*X),d+=38*(O+=r*J),y+=38*(R+=r*K),v+=38*(M+=r*W),g+=38*(U+=r*G),b+=38*(L+=r*V),m+=38*(I+=r*Q),o=(r=(o+=38*(w+=r*j))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),s=(r=s+i+65535)-65536*(i=Math.floor(r/65536)),a=(r=a+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),b=(r=b+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),_=(r=_+i+65535)-65536*(i=Math.floor(r/65536)),o=(r=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(r/65536)),s=(r=s+i+65535)-65536*(i=Math.floor(r/65536)),a=(r=a+i+65535)-65536*(i=Math.floor(r/65536)),u=(r=u+i+65535)-65536*(i=Math.floor(r/65536)),c=(r=c+i+65535)-65536*(i=Math.floor(r/65536)),h=(r=h+i+65535)-65536*(i=Math.floor(r/65536)),f=(r=f+i+65535)-65536*(i=Math.floor(r/65536)),l=(r=l+i+65535)-65536*(i=Math.floor(r/65536)),p=(r=p+i+65535)-65536*(i=Math.floor(r/65536)),d=(r=d+i+65535)-65536*(i=Math.floor(r/65536)),y=(r=y+i+65535)-65536*(i=Math.floor(r/65536)),v=(r=v+i+65535)-65536*(i=Math.floor(r/65536)),g=(r=g+i+65535)-65536*(i=Math.floor(r/65536)),b=(r=b+i+65535)-65536*(i=Math.floor(r/65536)),m=(r=m+i+65535)-65536*(i=Math.floor(r/65536)),_=(r=_+i+65535)-65536*(i=Math.floor(r/65536)),o+=i-1+37*(i-1),t[0]=o,t[1]=s,t[2]=a,t[3]=u,t[4]=c,t[5]=h,t[6]=f,t[7]=l,t[8]=p,t[9]=d,t[10]=y,t[11]=v,t[12]=g,t[13]=b,t[14]=m,t[15]=_}function q(t,e){D(t,e,e)}function Y(t,n){var r,i=e();for(r=0;r<16;r++)i[r]=n[r];for(r=253;r>=0;r--)q(i,i),2!==r&&4!==r&&D(i,i,n);for(r=0;r<16;r++)t[r]=i[r]}function z(t,n,r){var i,o,s=new Uint8Array(32),a=new Float64Array(80),c=e(),h=e(),f=e(),l=e(),p=e(),d=e();for(o=0;o<31;o++)s[o]=n[o];for(s[31]=127&n[31]|64,s[0]&=248,B(a,r),o=0;o<16;o++)h[o]=a[o],l[o]=c[o]=f[o]=0;for(c[0]=l[0]=1,o=254;o>=0;--o)M(c,h,i=s[o>>>3]>>>(7&o)&1),M(f,l,i),j(p,c,f),N(c,c,f),j(f,h,l),N(h,h,l),q(l,p),q(d,c),D(c,f,c),D(f,h,p),j(p,c,f),N(c,c,f),q(h,c),N(f,l,d),D(c,f,u),j(c,c,l),D(f,f,c),D(c,l,d),D(l,h,a),q(h,p),M(c,h,i),M(f,l,i);for(o=0;o<16;o++)a[o+16]=c[o],a[o+32]=f[o],a[o+48]=h[o],a[o+64]=l[o];var y=a.subarray(32),v=a.subarray(16);return Y(y,y),D(v,v,y),U(t,v),0}function F(t,e){return z(t,e,o)}function H(t,e){return r(e,32),F(t,e)}function X(t,e,n){var r=new Uint8Array(32);return z(r,n,e),m(t,i,r,_)}E.prototype.blocks=function(t,e,n){for(var r,i,o,s,a,u,c,h,f,l,p,d,y,v,g,b,m,_,w,k=this.fin?0:2048,S=this.h[0],T=this.h[1],E=this.h[2],A=this.h[3],P=this.h[4],C=this.h[5],x=this.h[6],O=this.h[7],R=this.h[8],M=this.h[9],U=this.r[0],L=this.r[1],I=this.r[2],B=this.r[3],j=this.r[4],N=this.r[5],D=this.r[6],q=this.r[7],Y=this.r[8],z=this.r[9];n>=16;)S+=8191&(r=255&t[e+0]|(255&t[e+1])<<8),T+=8191&(r>>>13|(i=255&t[e+2]|(255&t[e+3])<<8)<<3),E+=8191&(i>>>10|(o=255&t[e+4]|(255&t[e+5])<<8)<<6),A+=8191&(o>>>7|(s=255&t[e+6]|(255&t[e+7])<<8)<<9),P+=8191&(s>>>4|(a=255&t[e+8]|(255&t[e+9])<<8)<<12),C+=a>>>1&8191,x+=8191&(a>>>14|(u=255&t[e+10]|(255&t[e+11])<<8)<<2),O+=8191&(u>>>11|(c=255&t[e+12]|(255&t[e+13])<<8)<<5),h=255&t[e+14]|(255&t[e+15])<<8,l=f=0,l+=S*U,l+=T*(5*z),l+=E*(5*Y),l+=A*(5*q),f=(l+=P*(5*D))>>>13,l&=8191,l+=C*(5*N),l+=x*(5*j),l+=O*(5*B),l+=(R+=8191&(c>>>8|h<<8))*(5*I),p=f+=(l+=(M+=h>>>5|k)*(5*L))>>>13,p+=S*L,p+=T*U,p+=E*(5*z),p+=A*(5*Y),f=(p+=P*(5*q))>>>13,p&=8191,p+=C*(5*D),p+=x*(5*N),p+=O*(5*j),p+=R*(5*B),f+=(p+=M*(5*I))>>>13,p&=8191,d=f,d+=S*I,d+=T*L,d+=E*U,d+=A*(5*z),f=(d+=P*(5*Y))>>>13,d&=8191,d+=C*(5*q),d+=x*(5*D),d+=O*(5*N),d+=R*(5*j),y=f+=(d+=M*(5*B))>>>13,y+=S*B,y+=T*I,y+=E*L,y+=A*U,f=(y+=P*(5*z))>>>13,y&=8191,y+=C*(5*Y),y+=x*(5*q),y+=O*(5*D),y+=R*(5*N),v=f+=(y+=M*(5*j))>>>13,v+=S*j,v+=T*B,v+=E*I,v+=A*L,f=(v+=P*U)>>>13,v&=8191,v+=C*(5*z),v+=x*(5*Y),v+=O*(5*q),v+=R*(5*D),g=f+=(v+=M*(5*N))>>>13,g+=S*N,g+=T*j,g+=E*B,g+=A*I,f=(g+=P*L)>>>13,g&=8191,g+=C*U,g+=x*(5*z),g+=O*(5*Y),g+=R*(5*q),b=f+=(g+=M*(5*D))>>>13,b+=S*D,b+=T*N,b+=E*j,b+=A*B,f=(b+=P*I)>>>13,b&=8191,b+=C*L,b+=x*U,b+=O*(5*z),b+=R*(5*Y),m=f+=(b+=M*(5*q))>>>13,m+=S*q,m+=T*D,m+=E*N,m+=A*j,f=(m+=P*B)>>>13,m&=8191,m+=C*I,m+=x*L,m+=O*U,m+=R*(5*z),_=f+=(m+=M*(5*Y))>>>13,_+=S*Y,_+=T*q,_+=E*D,_+=A*N,f=(_+=P*j)>>>13,_&=8191,_+=C*B,_+=x*I,_+=O*L,_+=R*U,w=f+=(_+=M*(5*z))>>>13,w+=S*z,w+=T*Y,w+=E*q,w+=A*D,f=(w+=P*N)>>>13,w&=8191,w+=C*j,w+=x*B,w+=O*I,w+=R*L,S=l=8191&(f=(f=((f+=(w+=M*U)>>>13)<<2)+f|0)+(l&=8191)|0),T=p+=f>>>=13,E=d&=8191,A=y&=8191,P=v&=8191,C=g&=8191,x=b&=8191,O=m&=8191,R=_&=8191,M=w&=8191,e+=16,n-=16;this.h[0]=S,this.h[1]=T,this.h[2]=E,this.h[3]=A,this.h[4]=P,this.h[5]=C,this.h[6]=x,this.h[7]=O,this.h[8]=R,this.h[9]=M},E.prototype.finish=function(t,e){var n,r,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=n,n=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,s[0]=this.h[0]+5,n=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+n,n=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,r=(1^n)-1,o=0;o<10;o++)s[o]&=r;for(r=~r,o=0;o<10;o++)this.h[o]=this.h[o]&r|s[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},E.prototype.update=function(t,e,n){var r,i;if(this.leftover){for((i=16-this.leftover)>n&&(i=n),r=0;r=16&&(i=n-n%16,this.blocks(t,e,i),e+=i,n-=i),n){for(r=0;r=128;){for(k=0;k<16;k++)S=8*k+G,O[k]=n[S+0]<<24|n[S+1]<<16|n[S+2]<<8|n[S+3],R[k]=n[S+4]<<24|n[S+5]<<16|n[S+6]<<8|n[S+7];for(k=0;k<80;k++)if(i=M,o=U,s=L,a=I,u=B,c=j,h=N,f=D,l=q,p=Y,d=z,y=F,v=H,g=X,b=J,m=K,A=65535&(E=K),P=E>>>16,C=65535&(T=D),x=T>>>16,A+=65535&(E=(H>>>14|B<<18)^(H>>>18|B<<14)^(B>>>9|H<<23)),P+=E>>>16,C+=65535&(T=(B>>>14|H<<18)^(B>>>18|H<<14)^(H>>>9|B<<23)),x+=T>>>16,A+=65535&(E=H&X^~H&J),P+=E>>>16,C+=65535&(T=B&j^~B&N),x+=T>>>16,T=W[2*k],A+=65535&(E=W[2*k+1]),P+=E>>>16,C+=65535&T,x+=T>>>16,T=O[k%16],P+=(E=R[k%16])>>>16,C+=65535&T,x+=T>>>16,C+=(P+=(A+=65535&E)>>>16)>>>16,A=65535&(E=w=65535&A|P<<16),P=E>>>16,C=65535&(T=_=65535&C|(x+=C>>>16)<<16),x=T>>>16,A+=65535&(E=(q>>>28|M<<4)^(M>>>2|q<<30)^(M>>>7|q<<25)),P+=E>>>16,C+=65535&(T=(M>>>28|q<<4)^(q>>>2|M<<30)^(q>>>7|M<<25)),x+=T>>>16,P+=(E=q&Y^q&z^Y&z)>>>16,C+=65535&(T=M&U^M&L^U&L),x+=T>>>16,f=65535&(C+=(P+=(A+=65535&E)>>>16)>>>16)|(x+=C>>>16)<<16,m=65535&A|P<<16,A=65535&(E=y),P=E>>>16,C=65535&(T=a),x=T>>>16,P+=(E=w)>>>16,C+=65535&(T=_),x+=T>>>16,U=i,L=o,I=s,B=a=65535&(C+=(P+=(A+=65535&E)>>>16)>>>16)|(x+=C>>>16)<<16,j=u,N=c,D=h,M=f,Y=l,z=p,F=d,H=y=65535&A|P<<16,X=v,J=g,K=b,q=m,k%16==15)for(S=0;S<16;S++)T=O[S],A=65535&(E=R[S]),P=E>>>16,C=65535&T,x=T>>>16,T=O[(S+9)%16],A+=65535&(E=R[(S+9)%16]),P+=E>>>16,C+=65535&T,x+=T>>>16,_=O[(S+1)%16],A+=65535&(E=((w=R[(S+1)%16])>>>1|_<<31)^(w>>>8|_<<24)^(w>>>7|_<<25)),P+=E>>>16,C+=65535&(T=(_>>>1|w<<31)^(_>>>8|w<<24)^_>>>7),x+=T>>>16,_=O[(S+14)%16],P+=(E=((w=R[(S+14)%16])>>>19|_<<13)^(_>>>29|w<<3)^(w>>>6|_<<26))>>>16,C+=65535&(T=(_>>>19|w<<13)^(w>>>29|_<<3)^_>>>6),x+=T>>>16,x+=(C+=(P+=(A+=65535&E)>>>16)>>>16)>>>16,O[S]=65535&C|x<<16,R[S]=65535&A|P<<16;A=65535&(E=q),P=E>>>16,C=65535&(T=M),x=T>>>16,T=t[0],P+=(E=e[0])>>>16,C+=65535&T,x+=T>>>16,x+=(C+=(P+=(A+=65535&E)>>>16)>>>16)>>>16,t[0]=M=65535&C|x<<16,e[0]=q=65535&A|P<<16,A=65535&(E=Y),P=E>>>16,C=65535&(T=U),x=T>>>16,T=t[1],P+=(E=e[1])>>>16,C+=65535&T,x+=T>>>16,x+=(C+=(P+=(A+=65535&E)>>>16)>>>16)>>>16,t[1]=U=65535&C|x<<16,e[1]=Y=65535&A|P<<16,A=65535&(E=z),P=E>>>16,C=65535&(T=L),x=T>>>16,T=t[2],P+=(E=e[2])>>>16,C+=65535&T,x+=T>>>16,x+=(C+=(P+=(A+=65535&E)>>>16)>>>16)>>>16,t[2]=L=65535&C|x<<16,e[2]=z=65535&A|P<<16,A=65535&(E=F),P=E>>>16,C=65535&(T=I),x=T>>>16,T=t[3],P+=(E=e[3])>>>16,C+=65535&T,x+=T>>>16,x+=(C+=(P+=(A+=65535&E)>>>16)>>>16)>>>16,t[3]=I=65535&C|x<<16,e[3]=F=65535&A|P<<16,A=65535&(E=H),P=E>>>16,C=65535&(T=B),x=T>>>16,T=t[4],P+=(E=e[4])>>>16,C+=65535&T,x+=T>>>16,x+=(C+=(P+=(A+=65535&E)>>>16)>>>16)>>>16,t[4]=B=65535&C|x<<16,e[4]=H=65535&A|P<<16,A=65535&(E=X),P=E>>>16,C=65535&(T=j),x=T>>>16,T=t[5],P+=(E=e[5])>>>16,C+=65535&T,x+=T>>>16,x+=(C+=(P+=(A+=65535&E)>>>16)>>>16)>>>16,t[5]=j=65535&C|x<<16,e[5]=X=65535&A|P<<16,A=65535&(E=J),P=E>>>16,C=65535&(T=N),x=T>>>16,T=t[6],P+=(E=e[6])>>>16,C+=65535&T,x+=T>>>16,x+=(C+=(P+=(A+=65535&E)>>>16)>>>16)>>>16,t[6]=N=65535&C|x<<16,e[6]=J=65535&A|P<<16,A=65535&(E=K),P=E>>>16,C=65535&(T=D),x=T>>>16,T=t[7],P+=(E=e[7])>>>16,C+=65535&T,x+=T>>>16,x+=(C+=(P+=(A+=65535&E)>>>16)>>>16)>>>16,t[7]=D=65535&C|x<<16,e[7]=K=65535&A|P<<16,G+=128,r-=128}return r}function V(t,e,n){var r,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=n;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,G(i,o,e,n),n%=128,r=0;r=0;--i)Z(t,e,r=n[i/8|0]>>(7&i)&1),Q(e,t),Q(t,t),Z(t,e,r)}function et(t,n){var r=[e(),e(),e(),e()];O(r[0],f),O(r[1],l),O(r[2],a),D(r[3],f,l),tt(t,r,n)}function nt(t,n,i){var o,s=new Uint8Array(64),a=[e(),e(),e(),e()];for(i||r(n,32),V(s,n,32),s[0]&=248,s[31]&=127,s[31]|=64,et(a,s),$(t,a),o=0;o<32;o++)n[o+32]=t[o];return 0}var rt=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function it(t,e){var n,r,i,o;for(r=63;r>=32;--r){for(n=0,i=r-32,o=r-12;i>8,e[i]-=256*n;e[i]+=n,e[r]=0}for(n=0,i=0;i<32;i++)e[i]+=n-(e[31]>>4)*rt[i],n=e[i]>>8,e[i]&=255;for(i=0;i<32;i++)e[i]-=n*rt[i];for(r=0;r<32;r++)e[r+1]+=e[r]>>8,t[r]=255&e[r]}function ot(t){var e,n=new Float64Array(64);for(e=0;e<64;e++)n[e]=t[e];for(e=0;e<64;e++)t[e]=0;it(t,n)}function st(t,n,r,i){var o,s,a=new Uint8Array(64),u=new Uint8Array(64),c=new Uint8Array(64),h=new Float64Array(64),f=[e(),e(),e(),e()];V(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var l=r+64;for(o=0;o=0;r--)q(i,i),1!==r&&D(i,i,n);for(r=0;r<16;r++)t[r]=i[r]}(r,r),D(r,r,o),D(r,r,u),D(r,r,u),D(t[0],r,u),q(i,t[0]),D(i,i,u),L(i,o)&&D(t[0],t[0],p),q(i,t[0]),D(i,i,u),L(i,o)?-1:(I(t[0])===n[31]>>7&&N(t[0],s,t[0]),D(t[3],t[0],t[1]),0)}function ut(t,n,r,i){var o,s=new Uint8Array(32),a=new Uint8Array(64),u=[e(),e(),e(),e()],c=[e(),e(),e(),e()];if(-1,r<64)return-1;if(at(c,i))return-1;for(o=0;o=0},t.sign.keyPair=function(){var t=new Uint8Array(32),e=new Uint8Array(64);return nt(t,e),{publicKey:t,secretKey:e}},t.sign.keyPair.fromSecretKey=function(t){if(yt(t),64!==t.length)throw new Error("bad secret key size");for(var e=new Uint8Array(32),n=0;n=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(t).length;default:if(r)return q(t).length;e=(""+e).toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:g(t,e,n,r,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):g(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function g(t,e,n,r,i){var o,s=1,a=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,n/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var h=-1;for(o=n;oa&&(n=a-u),o=n;o>=0;o--){for(var f=!0,l=0;li&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function T(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(h=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(h=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(h=u)}null===h?(h=65533,f=1):h>65535&&(h-=65536,r.push(h>>>10&1023|55296),h=56320|1023&h),r.push(h),i+=f}return function(t){var e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);var n="",r=0;for(;rthis.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return P(this,e,n);case"latin1":case"binary":return C(this,e,n);case"base64":return T(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}.apply(this,arguments)},u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},u.prototype.compare=function(t,e,n,r,i){if(!u.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,s=n-e,a=Math.min(o,s),c=this.slice(r,i),h=t.slice(e,n),f=0;fi)&&(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(r){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return m(this,t,e,n);case"ascii":return _(this,t,e,n);case"latin1":case"binary":return w(this,t,e,n);case"base64":return k(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function P(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;ir)&&(n=r);for(var i="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function M(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function U(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i>>8*(r?i:1-i)}function L(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i>>8*(r?i:3-i)&255}function I(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(t,e,n,r,o){return o||I(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function j(t,e,n,r,o){return o||I(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){var n,r=this.length;if(t=~~t,e=void 0===e?r:~~e,t<0?(t+=r)<0&&(t=0):t>r&&(t=r),e<0?(e+=r)<0&&(e=0):e>r&&(e=r),e0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUInt8=function(t,e){return e||R(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||R(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||R(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||R(t,e,this.length);for(var r=this[t],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||R(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||R(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){e||R(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||M(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):U(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):U(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);M(this,t,e,n,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);M(this,t,e,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):U(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):U(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||M(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,n){return B(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return B(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return j(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return j(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e=0;--i)t[i+e]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Y(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(N,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,n,r){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}},function(t,e){"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){for(var e,n=u(t),o=n[0],s=n[1],a=new i(function(t,e,n){return 3*(e+n)/4-n}(0,o,s)),c=0,h=s>0?o-4:o,f=0;f>16&255,a[c++]=e>>8&255,a[c++]=255&e;2===s&&(e=r[t.charCodeAt(f)]<<2|r[t.charCodeAt(f+1)]>>4,a[c++]=255&e);1===s&&(e=r[t.charCodeAt(f)]<<10|r[t.charCodeAt(f+1)]<<4|r[t.charCodeAt(f+2)]>>2,a[c++]=e>>8&255,a[c++]=255&e);return a},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;sa?a:s+16383));1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,r){for(var i,o,s=[],a=e;a>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<>1,h=-7,f=n?i-1:0,l=n?-1:1,p=t[e+f];for(f+=l,o=p&(1<<-h)-1,p>>=-h,h+=a;h>0;o=256*o+t[e+f],f+=l,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=r;h>0;s=256*s+t[e+f],f+=l,h-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,h=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+f>=1?l/u:l*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=h?(a=0,s=h):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<0;t[n+p]=255&s,p+=d,s/=256,c-=8);t[n+p-d]|=128*y}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);function r(){this.constructor=t}t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)},i=n(24),o=n(12),s=n(8),a=n(9),u=n(2),c=function(t){function e(e,n){var r=this;t.call(this),this.key=e,this.options=n||{},this.state="initialized",this.connection=null,this.usingTLS=!!n.useTLS,this.timeline=this.options.timeline,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var i=u.default.getNetwork();i.bind("online",function(){r.timeline.info({netinfo:"online"}),"connecting"!==r.state&&"unavailable"!==r.state||r.retryIn(0)}),i.bind("offline",function(){r.timeline.info({netinfo:"offline"}),r.connection&&r.sendActivityCheck()}),this.updateStrategy()}return r(e,t),e.prototype.connect=function(){this.connection||this.runner||(this.strategy.isSupported()?(this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()):this.updateState("failed"))},e.prototype.send=function(t){return!!this.connection&&this.connection.send(t)},e.prototype.send_event=function(t,e,n){return!!this.connection&&this.connection.send_event(t,e,n)},e.prototype.disconnect=function(){this.disconnectInternally(),this.updateState("disconnected")},e.prototype.isUsingTLS=function(){return this.usingTLS},e.prototype.startConnecting=function(){var t=this,e=function(n,r){n?t.runner=t.strategy.connect(0,e):"error"===r.action?(t.emit("error",{type:"HandshakeError",error:r.error}),t.timeline.error({handshakeError:r.error})):(t.abortConnecting(),t.handshakeCallbacks[r.action](r))};this.runner=this.strategy.connect(0,e)},e.prototype.abortConnecting=function(){this.runner&&(this.runner.abort(),this.runner=null)},e.prototype.disconnectInternally=function(){(this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection)&&this.abandonConnection().close()},e.prototype.updateStrategy=function(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})},e.prototype.retryIn=function(t){var e=this;this.timeline.info({action:"retry",delay:t}),t>0&&this.emit("connecting_in",Math.round(t/1e3)),this.retryTimer=new o.OneOffTimer(t||0,function(){e.disconnectInternally(),e.connect()})},e.prototype.clearRetryTimer=function(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)},e.prototype.setUnavailableTimer=function(){var t=this;this.unavailableTimer=new o.OneOffTimer(this.options.unavailableTimeout,function(){t.updateState("unavailable")})},e.prototype.clearUnavailableTimer=function(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()},e.prototype.sendActivityCheck=function(){var t=this;this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new o.OneOffTimer(this.options.pongTimeout,function(){t.timeline.error({pong_timed_out:t.options.pongTimeout}),t.retryIn(0)})},e.prototype.resetActivityCheck=function(){var t=this;this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new o.OneOffTimer(this.activityTimeout,function(){t.sendActivityCheck()}))},e.prototype.stopActivityCheck=function(){this.activityTimer&&this.activityTimer.ensureAborted()},e.prototype.buildConnectionCallbacks=function(t){var e=this;return a.extend({},t,{message:function(t){e.resetActivityCheck(),e.emit("message",t)},ping:function(){e.send_event("pusher:pong",{})},activity:function(){e.resetActivityCheck()},error:function(t){e.emit("error",{type:"WebSocketError",error:t})},closed:function(){e.abandonConnection(),e.shouldRetry()&&e.retryIn(1e3)}})},e.prototype.buildHandshakeCallbacks=function(t){var e=this;return a.extend({},t,{connected:function(t){e.activityTimeout=Math.min(e.options.activityTimeout,t.activityTimeout,t.connection.activityTimeout||1/0),e.clearUnavailableTimer(),e.setConnection(t.connection),e.socket_id=e.connection.id,e.updateState("connected",{socket_id:e.socket_id})}})},e.prototype.buildErrorCallbacks=function(){var t=this,e=function(e){return function(n){n.error&&t.emit("error",{type:"WebSocketError",error:n.error}),e(n)}};return{tls_only:e(function(){t.usingTLS=!0,t.updateStrategy(),t.retryIn(0)}),refused:e(function(){t.disconnect()}),backoff:e(function(){t.retryIn(1e3)}),retry:e(function(){t.retryIn(0)})}},e.prototype.setConnection=function(t){for(var e in this.connection=t,this.connectionCallbacks)this.connection.bind(e,this.connectionCallbacks[e]);this.resetActivityCheck()},e.prototype.abandonConnection=function(){if(this.connection){for(var t in this.stopActivityCheck(),this.connectionCallbacks)this.connection.unbind(t,this.connectionCallbacks[t]);var e=this.connection;return this.connection=null,e}},e.prototype.updateState=function(t,e){var n=this.state;if(this.state=t,n!==t){var r=t;"connected"===r&&(r+=" with new socket ID "+e.socket_id),s.default.debug("State changed",n+" -> "+r),this.timeline.info({state:t,params:e}),this.emit("state_change",{previous:n,current:t}),this.emit(t,e)}},e.prototype.shouldRetry=function(){return"connecting"===this.state||"connected"===this.state},e}(i.default);e.__esModule=!0,e.default=c},function(t,e,n){"use strict";var r=n(9),i=n(43),o=n(31),s=function(){function t(){this.channels={}}return t.prototype.add=function(t,e){return this.channels[t]||(this.channels[t]=function(t,e){if(0===t.indexOf("private-encrypted-")){if("ReactNative"==navigator.product){throw new o.UnsupportedFeature("Encrypted channels are not yet supported when using React Native builds.")}return i.default.createEncryptedChannel(t,e)}return 0===t.indexOf("private-")?i.default.createPrivateChannel(t,e):0===t.indexOf("presence-")?i.default.createPresenceChannel(t,e):i.default.createChannel(t,e)}(t,e)),this.channels[t]},t.prototype.all=function(){return r.values(this.channels)},t.prototype.find=function(t){return this.channels[t]},t.prototype.remove=function(t){var e=this.channels[t];return delete this.channels[t],e},t.prototype.disconnect=function(){r.objectApply(this.channels,function(t){t.disconnect()})},t}();e.__esModule=!0,e.default=s},function(t,e,n){"use strict";var r=n(43),i=n(11),o=n(31),s=n(9),a=function(){function t(t,e,n,r){this.name=t,this.priority=e,this.transport=n,this.options=r||{}}return t.prototype.isSupported=function(){return this.transport.isSupported({useTLS:this.options.useTLS})},t.prototype.connect=function(t,e){var n=this;if(!this.isSupported())return u(new o.UnsupportedStrategy,e);if(this.priority0&&(i=new o.OneOffTimer(n.timeout,function(){s.abort(),r(!0)})),s=t.connect(e,function(t,e){t&&i&&i.isRunning()&&!n.failFast||(i&&i.ensureAborted(),r(t,e))}),{abort:function(){i&&i.ensureAborted(),s.abort()},forceMinPriority:function(t){s.forceMinPriority(t)}}},t}();e.__esModule=!0,e.default=s},function(t,e,n){"use strict";var r=n(9),i=n(11),o=function(){function t(t){this.strategies=t}return t.prototype.isSupported=function(){return r.any(this.strategies,i.default.method("isSupported"))},t.prototype.connect=function(t,e){return function(t,e,n){var i=r.map(t,function(t,r,i,o){return t.connect(e,n(r,o))});return{abort:function(){r.apply(i,s)},forceMinPriority:function(t){r.apply(i,function(e){e.forceMinPriority(t)})}}}(this.strategies,t,function(t,n){return function(i,o){n[t].error=i,i?function(t){return r.all(t,function(t){return Boolean(t.error)})}(n)&&e(!0):(r.apply(n,function(t){t.forceMinPriority(o.transport.priority)}),e(null,o))}})},t}();function s(t){t.error||t.aborted||(t.abort(),t.aborted=!0)}e.__esModule=!0,e.default=o},function(t,e,n){"use strict";var r=n(11),i=n(2),o=n(65),s=n(9),a=function(){function t(t,e,n){this.strategy=t,this.transports=e,this.ttl=n.ttl||18e5,this.usingTLS=n.useTLS,this.timeline=n.timeline}return t.prototype.isSupported=function(){return this.strategy.isSupported()},t.prototype.connect=function(t,e){var n=this.usingTLS,a=function(t){var e=i.default.getLocalStorage();if(e)try{var n=e[u(t)];if(n)return JSON.parse(n)}catch(e){c(t)}return null}(n),h=[this.strategy];if(a&&a.timestamp+this.ttl>=r.default.now()){var f=this.transports[a.transport];f&&(this.timeline.info({cached:!0,transport:a.transport,latency:a.latency}),h.push(new o.default([f],{timeout:2*a.latency+1e3,failFast:!0})))}var l=r.default.now(),p=h.pop().connect(t,function o(a,f){a?(c(n),h.length>0?(l=r.default.now(),p=h.pop().connect(t,o)):e(a)):(!function(t,e,n){var o=i.default.getLocalStorage();if(o)try{o[u(t)]=s.safeJSONStringify({timestamp:r.default.now(),transport:e,latency:n})}catch(t){}}(n,f.transport.name,r.default.now()-l),e(null,f))});return{abort:function(){p.abort()},forceMinPriority:function(e){t=e,p&&p.forceMinPriority(e)}}},t}();function u(t){return"pusherTransport"+(t?"TLS":"NonTLS")}function c(t){var e=i.default.getLocalStorage();if(e)try{delete e[u(t)]}catch(t){}}e.__esModule=!0,e.default=a},function(t,e,n){"use strict";var r=n(12),i=function(){function t(t,e){var n=e.delay;this.strategy=t,this.options={delay:n}}return t.prototype.isSupported=function(){return this.strategy.isSupported()},t.prototype.connect=function(t,e){var n,i=this.strategy,o=new r.OneOffTimer(this.options.delay,function(){n=i.connect(t,e)});return{abort:function(){o.ensureAborted(),n&&n.abort()},forceMinPriority:function(e){t=e,n&&n.forceMinPriority(e)}}},t}();e.__esModule=!0,e.default=i},function(t,e){"use strict";var n=function(){function t(t,e,n){this.test=t,this.trueBranch=e,this.falseBranch=n}return t.prototype.isSupported=function(){return(this.test()?this.trueBranch:this.falseBranch).isSupported()},t.prototype.connect=function(t,e){return(this.test()?this.trueBranch:this.falseBranch).connect(t,e)},t}();e.__esModule=!0,e.default=n},function(t,e){"use strict";var n=function(){function t(t){this.strategy=t}return t.prototype.isSupported=function(){return this.strategy.isSupported()},t.prototype.connect=function(t,e){var n=this.strategy.connect(t,function(t,r){r&&n.abort(),e(t,r)});return n},t}();e.__esModule=!0,e.default=n},function(t,e,n){"use strict";var r=n(5);e.getGlobalConfig=function(){return{wsHost:r.default.host,wsPort:r.default.ws_port,wssPort:r.default.wss_port,wsPath:r.default.ws_path,httpHost:r.default.sockjs_host,httpPort:r.default.sockjs_http_port,httpsPort:r.default.sockjs_https_port,httpPath:r.default.sockjs_path,statsHost:r.default.stats_host,authEndpoint:r.default.channel_auth_endpoint,authTransport:r.default.channel_auth_transport,activity_timeout:r.default.activity_timeout,pong_timeout:r.default.pong_timeout,unavailable_timeout:r.default.unavailable_timeout}},e.getClusterConfig=function(t){return{wsHost:"ws-"+t+".pusher.com",httpHost:"sockjs-"+t+".pusher.com"}}}])},t.exports=r()}]); \ No newline at end of file