faye-ouvrages 1.1.2 → 1.1.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,7 +33,7 @@ module Faye
33
33
  @endpoint_re = Regexp.new('^' + @endpoint.gsub(/\/$/, '') + '(/[^/]*)*(\\.[^\\.]+)?$')
34
34
  @server = Server.new(@options)
35
35
 
36
- @static = StaticServer.new(File.join(ROOT, 'client'), /\.(?:js|map)$/)
36
+ @static = StaticServer.new(ROOT, /\.(?:js|map)$/)
37
37
  @static.map(File.basename(@endpoint) + '.js', SCRIPT_PATH)
38
38
  @static.map('client.js', SCRIPT_PATH)
39
39
 
@@ -25,8 +25,9 @@ module Faye
25
25
  super()
26
26
  info('New client created for ?', endpoint)
27
27
 
28
+ @endpoint = endpoint || RackAdapter::DEFAULT_ENDPOINT
28
29
  @channels = Channel::Set.new
29
- @dispatcher = Dispatcher.new(self, endpoint || RackAdapter::DEFAULT_ENDPOINT, options)
30
+ @dispatcher = Dispatcher.new(self, @endpoint, options)
30
31
 
31
32
  @message_id = 0
32
33
  @state = UNCONNECTED
@@ -68,7 +69,7 @@ module Faye
68
69
 
69
70
  @state = CONNECTING
70
71
 
71
- info('Initiating handshake with ?', @dispatcher.endpoint.to_s)
72
+ info('Initiating handshake with ?', @endpoint)
72
73
  @dispatcher.select_transport(MANDATORY_CONNECTION_TYPES)
73
74
 
74
75
  send_message({
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faye-ouvrages
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Coglan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-20 00:00:00.000000000 Z
11
+ date: 2016-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cookiejar
@@ -355,9 +355,9 @@ extra_rdoc_files:
355
355
  files:
356
356
  - CHANGELOG.md
357
357
  - README.md
358
- - lib/client/faye-browser-min.js
359
- - lib/client/faye-browser-min.js.map
360
- - lib/client/faye-browser.js
358
+ - lib/faye-browser-min.js
359
+ - lib/faye-browser-min.js.map
360
+ - lib/faye-browser.js
361
361
  - lib/faye.rb
362
362
  - lib/faye/adapters/rack_adapter.rb
363
363
  - lib/faye/adapters/static_server.rb
@@ -1,4 +0,0 @@
1
- var Faye=function(t){function e(i){if(n[i])return n[i].exports;var s=n[i]={exports:{},id:i,loaded:!1};return t[i].call(s.exports,s,s.exports,e),s.loaded=!0,s.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){var i=n(1),s=n(2),r={VERSION:i.VERSION,Client:n(4),Scheduler:n(30)};s.wrapper=r,t.exports=r},function(t){t.exports={VERSION:"1.1.2",BAYEUX_VERSION:"1.0",ID_LENGTH:160,JSONP_CALLBACK:"jsonpcallback",CONNECTION_TYPES:["long-polling","cross-origin-long-polling","callback-polling","websocket","eventsource","in-process"],MANDATORY_CONNECTION_TYPES:["long-polling","callback-polling","in-process"]}},function(t,e,n){var i=n(3),s={LOG_LEVELS:{fatal:4,error:3,warn:2,info:1,debug:0},writeLog:function(t,e){var n=s.logger||(s.wrapper||s).logger;if(n){var r=Array.prototype.slice.apply(t),o="[Faye",c=this.className,a=r.shift().replace(/\?/g,function(){try{return i(r.shift())}catch(t){return"[Object]"}});c&&(o+="."+c),o+="] ","function"==typeof n[e]?n[e](o+a):"function"==typeof n&&n(o+a)}}};for(var r in s.LOG_LEVELS)(function(t){s[t]=function(){this.writeLog(arguments,t)}})(r);t.exports=s},function(t){t.exports=function(t){return JSON.stringify(t,function(t,e){return this[t]instanceof Array?this[t]:e})}},function(t,e,n){(function(e){var i=n(5),s=n(7),r=n(8),o=n(9),c=n(10),a=n(1),h=n(6),u=n(11),l=n(12),f=n(2),d=n(13),p=n(15),_=n(17),v=n(31),g=n(32),m=n(33),y=n(34),E=i({className:"Client",UNCONNECTED:1,CONNECTING:2,CONNECTED:3,DISCONNECTED:4,HANDSHAKE:"handshake",RETRY:"retry",NONE:"none",CONNECTION_TIMEOUT:60,DEFAULT_ENDPOINT:"/bayeux",INTERVAL:0,initialize:function(t,n){this.info("New client created for ?",t),n=n||{},u(n,["interval","timeout","endpoints","proxy","retry","scheduler","websocketExtensions","tls","ca"]),this._channels=new p.Set,this._dispatcher=_.create(this,t||this.DEFAULT_ENDPOINT,n),this._messageId=0,this._state=this.UNCONNECTED,this._responseCallbacks={},this._advice={reconnect:this.RETRY,interval:1e3*(n.interval||this.INTERVAL),timeout:1e3*(n.timeout||this.CONNECTION_TIMEOUT)},this._dispatcher.timeout=this._advice.timeout/1e3,this._dispatcher.bind("message",this._receiveMessage,this),c.Event&&void 0!==e.onbeforeunload&&c.Event.on(e,"beforeunload",function(){o.indexOf(this._dispatcher._disabled,"autodisconnect")<0&&this.disconnect()},this)},addWebsocketExtension:function(t){return this._dispatcher.addWebsocketExtension(t)},disable:function(t){return this._dispatcher.disable(t)},setHeader:function(t,e){return this._dispatcher.setHeader(t,e)},handshake:function(t,n){if(this._advice.reconnect!==this.NONE&&this._state===this.UNCONNECTED){this._state=this.CONNECTING;var i=this;this.info("Initiating handshake with ?",r.stringify(this._dispatcher.endpoint)),this._dispatcher.selectTransport(a.MANDATORY_CONNECTION_TYPES),this._sendMessage({channel:p.HANDSHAKE,version:a.BAYEUX_VERSION,supportedConnectionTypes:this._dispatcher.getConnectionTypes()},{},function(r){r.successful?(this._state=this.CONNECTED,this._dispatcher.clientId=r.clientId,this._dispatcher.selectTransport(r.supportedConnectionTypes),this.info("Handshake successful: ?",this._dispatcher.clientId),this.subscribe(this._channels.getKeys(),!0),t&&s.defer(function(){t.call(n)})):(this.info("Handshake unsuccessful"),e.setTimeout(function(){i.handshake(t,n)},1e3*this._dispatcher.retry),this._state=this.UNCONNECTED)},this)}},connect:function(t,e){if(this._advice.reconnect!==this.NONE&&this._state!==this.DISCONNECTED){if(this._state===this.UNCONNECTED)return this.handshake(function(){this.connect(t,e)},this);this.callback(t,e),this._state===this.CONNECTED&&(this.info("Calling deferred actions for ?",this._dispatcher.clientId),this.setDeferredStatus("succeeded"),this.setDeferredStatus("unknown"),this._connectRequest||(this._connectRequest=!0,this.info("Initiating connection for ?",this._dispatcher.clientId),this._sendMessage({channel:p.CONNECT,clientId:this._dispatcher.clientId,connectionType:this._dispatcher.connectionType},{},this._cycleConnection,this)))}},disconnect:function(){if(this._state===this.CONNECTED){this._state=this.DISCONNECTED,this.info("Disconnecting ?",this._dispatcher.clientId);var t=new m;return this._sendMessage({channel:p.DISCONNECT,clientId:this._dispatcher.clientId},{},function(e){e.successful?(this._dispatcher.close(),t.setDeferredStatus("succeeded")):t.setDeferredStatus("failed",v.parse(e.error))},this),this.info("Clearing channel listeners for ?",this._dispatcher.clientId),this._channels=new p.Set,t}},subscribe:function(t,e,n){if(t instanceof Array)return o.map(t,function(t){return this.subscribe(t,e,n)},this);var i=new y(this,t,e,n),s=e===!0,r=this._channels.hasSubscription(t);return r&&!s?(this._channels.subscribe([t],e,n),i.setDeferredStatus("succeeded"),i):(this.connect(function(){this.info("Client ? attempting to subscribe to ?",this._dispatcher.clientId,t),s||this._channels.subscribe([t],e,n),this._sendMessage({channel:p.SUBSCRIBE,clientId:this._dispatcher.clientId,subscription:t},{},function(s){if(!s.successful)return i.setDeferredStatus("failed",v.parse(s.error)),this._channels.unsubscribe(t,e,n);var r=[].concat(s.subscription);this.info("Subscription acknowledged for ? to ?",this._dispatcher.clientId,r),i.setDeferredStatus("succeeded")},this)},this),i)},unsubscribe:function(t,e,n){if(t instanceof Array)return o.map(t,function(t){return this.unsubscribe(t,e,n)},this);var i=this._channels.unsubscribe(t,e,n);i&&this.connect(function(){this.info("Client ? attempting to unsubscribe from ?",this._dispatcher.clientId,t),this._sendMessage({channel:p.UNSUBSCRIBE,clientId:this._dispatcher.clientId,subscription:t},{},function(t){if(t.successful){var e=[].concat(t.subscription);this.info("Unsubscription acknowledged for ? from ?",this._dispatcher.clientId,e)}},this)},this)},publish:function(t,e,n){u(n||{},["attempts","deadline"]);var i=new m;return this.connect(function(){this.info("Client ? queueing published message to ?: ?",this._dispatcher.clientId,t,e),this._sendMessage({channel:t,data:e,clientId:this._dispatcher.clientId},n,function(t){t.successful?i.setDeferredStatus("succeeded"):i.setDeferredStatus("failed",v.parse(t.error))},this)},this),i},_sendMessage:function(t,e,n,i){t.id=this._generateMessageId();var s=this._advice.timeout?1.2*this._advice.timeout/1e3:1.2*this._dispatcher.retry;this.pipeThroughExtensions("outgoing",t,null,function(t){t&&(n&&(this._responseCallbacks[t.id]=[n,i]),this._dispatcher.sendMessage(t,s,e||{}))},this)},_generateMessageId:function(){return this._messageId+=1,this._messageId>=Math.pow(2,32)&&(this._messageId=0),this._messageId.toString(36)},_receiveMessage:function(t){var e,n=t.id;void 0!==t.successful&&(e=this._responseCallbacks[n],delete this._responseCallbacks[n]),this.pipeThroughExtensions("incoming",t,null,function(t){t&&(t.advice&&this._handleAdvice(t.advice),this._deliverMessage(t),e&&e[0].call(e[1],t))},this)},_handleAdvice:function(t){h(this._advice,t),this._dispatcher.timeout=this._advice.timeout/1e3,this._advice.reconnect===this.HANDSHAKE&&this._state!==this.DISCONNECTED&&(this._state=this.UNCONNECTED,this._dispatcher.clientId=null,this._cycleConnection())},_deliverMessage:function(t){t.channel&&void 0!==t.data&&(this.info("Client ? calling listeners for ? with ?",this._dispatcher.clientId,t.channel,t.data),this._channels.distributeMessage(t))},_cycleConnection:function(){this._connectRequest&&(this._connectRequest=null,this.info("Closed connection for ?",this._dispatcher.clientId));var t=this;e.setTimeout(function(){t.connect()},this._advice.interval)}});h(E.prototype,l),h(E.prototype,d),h(E.prototype,f),h(E.prototype,g),t.exports=E}).call(e,function(){return this}())},function(t,e,n){var i=n(6);t.exports=function(t,e){"function"!=typeof t&&(e=t,t=Object);var n=function(){return this.initialize?this.initialize.apply(this,arguments)||this:this},s=function(){};return s.prototype=t.prototype,n.prototype=new s,i(n.prototype,e),n}},function(t){t.exports=function(t,e,n){if(!e)return t;for(var i in e)e.hasOwnProperty(i)&&(t.hasOwnProperty(i)&&n===!1||t[i]!==e[i]&&(t[i]=e[i]));return t}},function(t){var e,n=setTimeout;e="object"==typeof process&&process.nextTick?function(t){process.nextTick(t)}:"function"==typeof setImmediate?function(t){setImmediate(t)}:function(t){n(t,0)};var i=0,s=1,r=2,o=function(t){return t},c=function(t){throw t},a=function(t){if(this._state=i,this._onFulfilled=[],this._onRejected=[],"function"==typeof t){var e=this;t(function(t){d(e,t)},function(t){_(e,t)})}};a.prototype.then=function(t,e){var n=new a;return h(this,t,n),u(this,e,n),n};var h=function(t,e,n){"function"!=typeof e&&(e=o);var r=function(t){l(e,t,n)};t._state===i?t._onFulfilled.push(r):t._state===s&&r(t._value)},u=function(t,e,n){"function"!=typeof e&&(e=c);var s=function(t){l(e,t,n)};t._state===i?t._onRejected.push(s):t._state===r&&s(t._reason)},l=function(t,n,i){e(function(){f(t,n,i)})},f=function(t,e,n){var i;try{i=t(e)}catch(s){return _(n,s)}i===n?_(n,new TypeError("Recursive promise chain detected")):d(n,i)},d=a.fulfill=a.resolve=function(t,e){var n,i,s=!1;try{if(n=typeof e,i=null!==e&&("function"===n||"object"===n)&&e.then,"function"!=typeof i)return p(t,e);i.call(e,function(e){s^(s=!0)&&d(t,e)},function(e){s^(s=!0)&&_(t,e)})}catch(r){if(!(s^(s=!0)))return;_(t,r)}},p=function(t,e){if(t._state===i){t._state=s,t._value=e,t._onRejected=[];for(var n,r=t._onFulfilled;n=r.shift();)n(e)}},_=a.reject=function(t,e){if(t._state===i){t._state=r,t._reason=e,t._onFulfilled=[];for(var n,s=t._onRejected;n=s.shift();)n(e)}};a.all=function(t){return new a(function(e,n){var i,s=[],r=t.length;if(0===r)return e(s);for(i=0;r>i;i++)(function(t,i){a.fulfilled(t).then(function(t){s[i]=t,0===--r&&e(s)},n)})(t[i],i)})},a.defer=e,a.deferred=a.pending=function(){var t={};return t.promise=new a(function(e,n){t.fulfill=t.resolve=e,t.reject=n}),t},a.fulfilled=a.resolved=function(t){return new a(function(e){e(t)})},a.rejected=function(t){return new a(function(e,n){n(t)})},t.exports=a},function(t){t.exports={isURI:function(t){return t&&t.protocol&&t.host&&t.path},isSameOrigin:function(t){return t.protocol===location.protocol&&t.hostname===location.hostname&&t.port===location.port},parse:function(t){if("string"!=typeof t)return t;var e,n,i,s,r,o,c={},a=function(e,n){t=t.replace(n,function(t){return c[e]=t,""}),c[e]=c[e]||""};for(a("protocol",/^[a-z]+\:/i),a("host",/^\/\/[^\/\?#]+/),/^\//.test(t)||c.host||(t=location.pathname.replace(/[^\/]*$/,"")+t),a("pathname",/^[^\?#]*/),a("search",/^\?[^#]*/),a("hash",/^#.*/),c.protocol=c.protocol||location.protocol,c.host?(c.host=c.host.substr(2),e=c.host.split(":"),c.hostname=e[0],c.port=e[1]||""):(c.host=location.host,c.hostname=location.hostname,c.port=location.port),c.pathname=c.pathname||"/",c.path=c.pathname+c.search,n=c.search.replace(/^\?/,""),i=n?n.split("&"):[],o={},s=0,r=i.length;r>s;s++)e=i[s].split("="),o[decodeURIComponent(e[0]||"")]=decodeURIComponent(e[1]||"");return c.query=o,c.href=this.stringify(c),c},stringify:function(t){var e=t.protocol+"//"+t.hostname;return t.port&&(e+=":"+t.port),e+=t.pathname+this.queryString(t.query)+(t.hash||"")},queryString:function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return 0===e.length?"":"?"+e.join("&")}}},function(t){t.exports={commonElement:function(t,e){for(var n=0,i=t.length;i>n;n++)if(-1!==this.indexOf(e,t[n]))return t[n];return null},indexOf:function(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;i>n;n++)if(t[n]===e)return n;return-1},map:function(t,e,n){if(t.map)return t.map(e,n);var i=[];if(t instanceof Array)for(var s=0,r=t.length;r>s;s++)i.push(e.call(n||null,t[s],s));else for(var o in t)t.hasOwnProperty(o)&&i.push(e.call(n||null,o,t[o]));return i},filter:function(t,e,n){if(t.filter)return t.filter(e,n);for(var i=[],s=0,r=t.length;r>s;s++)e.call(n||null,t[s],s)&&i.push(t[s]);return i},asyncEach:function(t,e,n,i){var s=t.length,r=-1,o=0,c=!1,a=function(){return o-=1,r+=1,r===s?n&&n.call(i):void e(t[r],u)},h=function(){if(!c){for(c=!0;o>0;)a();c=!1}},u=function(){o+=1,h()};u()}}},function(t){var e={_registry:[],on:function(t,e,n,i){var s=function(){n.call(i)};t.addEventListener?t.addEventListener(e,s,!1):t.attachEvent("on"+e,s),this._registry.push({_element:t,_type:e,_callback:n,_context:i,_handler:s})},detach:function(t,e,n,i){for(var s,r=this._registry.length;r--;)s=this._registry[r],t&&t!==s._element||e&&e!==s._type||n&&n!==s._callback||i&&i!==s._context||(s._element.removeEventListener?s._element.removeEventListener(s._type,s._handler,!1):s._element.detachEvent("on"+s._type,s._handler),this._registry.splice(r,1),s=null)}};void 0!==window.onunload&&e.on(window,"unload",e.detach,e),t.exports={Event:e}},function(t,e,n){var i=n(9);t.exports=function(t,e){for(var n in t)if(i.indexOf(e,n)<0)throw new Error("Unrecognized option: "+n)}},function(t,e,n){(function(e){var i=n(7);t.exports={then:function(t,e){var n=this;return this._promise||(this._promise=new i(function(t,e){n._fulfill=t,n._reject=e})),0===arguments.length?this._promise:this._promise.then(t,e)},callback:function(t,e){return this.then(function(n){t.call(e,n)})},errback:function(t,e){return this.then(null,function(n){t.call(e,n)})},timeout:function(t,n){this.then();var i=this;this._timer=e.setTimeout(function(){i._reject(n)},1e3*t)},setDeferredStatus:function(t,n){this._timer&&e.clearTimeout(this._timer),this.then(),"succeeded"===t?this._fulfill(n):"failed"===t?this._reject(n):delete this._promise}}}).call(e,function(){return this}())},function(t,e,n){var i=n(6),s=n(14),r={countListeners:function(t){return this.listeners(t).length},bind:function(t,e,n){var i=Array.prototype.slice,s=function(){e.apply(n,i.call(arguments))};return this._listeners=this._listeners||[],this._listeners.push([t,e,n,s]),this.on(t,s)},unbind:function(t,e,n){this._listeners=this._listeners||[];for(var i,s=this._listeners.length;s--;)i=this._listeners[s],i[0]===t&&(!e||i[1]===e&&i[2]===n)&&(this._listeners.splice(s,1),this.removeListener(t,i[3]))}};i(r,s.prototype),r.trigger=r.emit,t.exports=r},function(t){function e(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0;n<t.length;n++)if(e===t[n])return n;return-1}function n(){}var i="function"==typeof Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};t.exports=n,n.prototype.emit=function(t){if("error"===t&&(!this._events||!this._events.error||i(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var e=this._events[t];if(!e)return!1;if("function"==typeof e){switch(arguments.length){case 1:e.call(this);break;case 2:e.call(this,arguments[1]);break;case 3:e.call(this,arguments[1],arguments[2]);break;default:var n=Array.prototype.slice.call(arguments,1);e.apply(this,n)}return!0}if(i(e)){for(var n=Array.prototype.slice.call(arguments,1),s=e.slice(),r=0,o=s.length;o>r;r++)s[r].apply(this,n);return!0}return!1},n.prototype.addListener=function(t,e){if("function"!=typeof e)throw new Error("addListener only takes instances of Function");return this._events||(this._events={}),this.emit("newListener",t,e),this._events[t]?i(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){var n=this;return n.on(t,function i(){n.removeListener(t,i),e.apply(this,arguments)}),this},n.prototype.removeListener=function(t,n){if("function"!=typeof n)throw new Error("removeListener only takes instances of Function");if(!this._events||!this._events[t])return this;var s=this._events[t];if(i(s)){var r=e(s,n);if(0>r)return this;s.splice(r,1),0==s.length&&delete this._events[t]}else this._events[t]===n&&delete this._events[t];return this},n.prototype.removeAllListeners=function(t){return 0===arguments.length?(this._events={},this):(t&&this._events&&this._events[t]&&(this._events[t]=null),this)},n.prototype.listeners=function(t){return this._events||(this._events={}),this._events[t]||(this._events[t]=[]),i(this._events[t])||(this._events[t]=[this._events[t]]),this._events[t]}},function(t,e,n){var i=n(5),s=n(6),r=n(13),o=n(16),c=i({initialize:function(t){this.id=this.name=t},push:function(t){this.trigger("message",t)},isUnused:function(){return 0===this.countListeners("message")}});s(c.prototype,r),s(c,{HANDSHAKE:"/meta/handshake",CONNECT:"/meta/connect",SUBSCRIBE:"/meta/subscribe",UNSUBSCRIBE:"/meta/unsubscribe",DISCONNECT:"/meta/disconnect",META:"meta",SERVICE:"service",expand:function(t){var e=this.parse(t),n=["/**",t],i=e.slice();i[i.length-1]="*",n.push(this.unparse(i));for(var s=1,r=e.length;r>s;s++)i=e.slice(0,s),i.push("**"),n.push(this.unparse(i));return n},isValid:function(t){return o.CHANNEL_NAME.test(t)||o.CHANNEL_PATTERN.test(t)},parse:function(t){return this.isValid(t)?t.split("/").slice(1):null},unparse:function(t){return"/"+t.join("/")},isMeta:function(t){var e=this.parse(t);return e?e[0]===this.META:null},isService:function(t){var e=this.parse(t);return e?e[0]===this.SERVICE:null},isSubscribable:function(t){return this.isValid(t)?!this.isMeta(t)&&!this.isService(t):null},Set:i({initialize:function(){this._channels={}},getKeys:function(){var t=[];for(var e in this._channels)t.push(e);return t},remove:function(t){delete this._channels[t]},hasSubscription:function(t){return this._channels.hasOwnProperty(t)},subscribe:function(t,e,n){for(var i,s=0,r=t.length;r>s;s++){i=t[s];var o=this._channels[i]=this._channels[i]||new c(i);e&&o.bind("message",e,n)}},unsubscribe:function(t,e,n){var i=this._channels[t];return i?(i.unbind("message",e,n),i.isUnused()?(this.remove(t),!0):!1):!1},distributeMessage:function(t){for(var e=c.expand(t.channel),n=0,i=e.length;i>n;n++){var s=this._channels[e[n]];s&&s.trigger("message",t.data)}}})}),t.exports=c},function(t){t.exports={CHANNEL_NAME:/^\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+(\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+)*$/,CHANNEL_PATTERN:/^(\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+)*\/\*{1,2}$/,ERROR:/^([0-9][0-9][0-9]:(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*(,(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*)*:(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*|[0-9][0-9][0-9]::(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*)$/,VERSION:/^([0-9])+(\.(([a-z]|[A-Z])|[0-9])(((([a-z]|[A-Z])|[0-9])|\-|\_))*)*$/}},function(t,e,n){(function(e){var i=n(5),s=n(8),r=n(18),o=n(6),c=n(2),a=n(13),h=n(19),u=n(30),l=i({className:"Dispatcher",MAX_REQUEST_SIZE:2048,DEFAULT_RETRY:5,UP:1,DOWN:2,initialize:function(t,e,n){this._client=t,this.endpoint=s.parse(e),this._alternates=n.endpoints||{},this.cookies=r.CookieJar&&new r.CookieJar,this._disabled=[],this._envelopes={},this.headers={},this.retry=n.retry||this.DEFAULT_RETRY,this._scheduler=n.scheduler||u,this._state=0,this.transports={},this.wsExtensions=[],this.proxy=n.proxy||{},"string"==typeof this._proxy&&(this._proxy={origin:this._proxy});var i=n.websocketExtensions;if(i){i=[].concat(i);for(var o=0,c=i.length;c>o;o++)this.addWebsocketExtension(i[o])}this.tls=n.tls||{},this.tls.ca=this.tls.ca||n.ca;for(var a in this._alternates)this._alternates[a]=s.parse(this._alternates[a]);this.maxRequestSize=this.MAX_REQUEST_SIZE},endpointFor:function(t){return this._alternates[t]||this.endpoint},addWebsocketExtension:function(t){this.wsExtensions.push(t)},disable:function(t){this._disabled.push(t)},setHeader:function(t,e){this.headers[t]=e},close:function(){var t=this._transport;delete this._transport,t&&t.close()},getConnectionTypes:function(){return h.getConnectionTypes()},selectTransport:function(t){h.get(this,t,this._disabled,function(t){this.debug("Selected ? transport for ?",t.connectionType,s.stringify(t.endpoint)),t!==this._transport&&(this._transport&&this._transport.close(),this._transport=t,this.connectionType=t.connectionType)},this)},sendMessage:function(t,e,n){n=n||{};var i,s=t.id,r=n.attempts,o=n.deadline&&(new Date).getTime()+1e3*n.deadline,c=this._envelopes[s];c||(i=new this._scheduler(t,{timeout:e,interval:this.retry,attempts:r,deadline:o}),c=this._envelopes[s]={message:t,scheduler:i}),this._sendEnvelope(c)},_sendEnvelope:function(t){if(this._transport&&!t.request&&!t.timer){var n=t.message,i=t.scheduler,s=this;if(!i.isDeliverable())return i.abort(),void delete this._envelopes[n.id];t.timer=e.setTimeout(function(){s.handleError(n)},1e3*i.getTimeout()),i.send(),t.request=this._transport.sendMessage(n)}},handleResponse:function(t){var n=this._envelopes[t.id];void 0!==t.successful&&n&&(n.scheduler.succeed(),delete this._envelopes[t.id],e.clearTimeout(n.timer)),this.trigger("message",t),this._state!==this.UP&&(this._state=this.UP,this._client.trigger("transport:up"))},handleError:function(t,n){var i=this._envelopes[t.id],s=i&&i.request,r=this;if(s){s.then(function(t){t&&t.abort&&t.abort()});var o=i.scheduler;o.fail(),e.clearTimeout(i.timer),i.request=i.timer=null,n?this._sendEnvelope(i):i.timer=e.setTimeout(function(){i.timer=null,r._sendEnvelope(i)},1e3*o.getInterval()),this._state!==this.DOWN&&(this._state=this.DOWN,this._client.trigger("transport:down"))}}});l.create=function(t,e,n){return new l(t,e,n)},o(l.prototype,a),o(l.prototype,c),t.exports=l}).call(e,function(){return this}())},function(t){t.exports={}},function(t,e,n){var i=n(20);i.register("websocket",n(22)),i.register("eventsource",n(26)),i.register("long-polling",n(27)),i.register("cross-origin-long-polling",n(28)),i.register("callback-polling",n(29)),t.exports=i},function(t,e,n){var i=n(5),s=n(18).Cookie,r=n(7),o=n(8),c=n(9),a=n(6),h=n(2),u=n(21),l=n(15),f=a(i({className:"Transport",DEFAULT_PORTS:{"http:":80,"https:":443,"ws:":80,"wss:":443},SECURE_PROTOCOLS:["https:","wss:"],MAX_DELAY:0,batching:!0,initialize:function(t,e){this._dispatcher=t,this.endpoint=e,this._outbox=[],this._proxy=a({},this._dispatcher.proxy),this._proxy.origin||"undefined"==typeof process||(this._proxy.origin=c.indexOf(this.SECURE_PROTOCOLS,this.endpoint.protocol)>=0?process.env.HTTPS_PROXY||process.env.https_proxy:process.env.HTTP_PROXY||process.env.http_proxy)},close:function(){},encode:function(){return""},sendMessage:function(t){return this.debug("Client ? sending message to ?: ?",this._dispatcher.clientId,o.stringify(this.endpoint),t),this.batching?(this._outbox.push(t),this._flushLargeBatch(),t.channel===l.HANDSHAKE?this._publish(.01):(t.channel===l.CONNECT&&(this._connectMessage=t),this._publish(this.MAX_DELAY))):r.fulfilled(this.request([t]))},_publish:function(t){return this._promise=this._promise||new r,this.addTimeout("publish",t,function(){this._flush(),delete this._promise},this),this._promise},_flush:function(){this.removeTimeout("publish"),this._outbox.length>1&&this._connectMessage&&(this._connectMessage.advice={timeout:0}),r.fulfill(this._promise,this.request(this._outbox)),this._connectMessage=null,this._outbox=[]},_flushLargeBatch:function(){var t=this.encode(this._outbox);if(!(t.length<this._dispatcher.maxRequestSize)){var e=this._outbox.pop();this._promise=this._promise||new r,this._flush(),e&&this._outbox.push(e)}},_receive:function(t){if(t){t=[].concat(t),this.debug("Client ? received from ? via ?: ?",this._dispatcher.clientId,o.stringify(this.endpoint),this.connectionType,t);for(var e=0,n=t.length;n>e;e++)this._dispatcher.handleResponse(t[e])}},_handleError:function(t){t=[].concat(t),this.debug("Client ? failed to send to ? via ?: ?",this._dispatcher.clientId,o.stringify(this.endpoint),this.connectionType,t);for(var e=0,n=t.length;n>e;e++)this._dispatcher.handleError(t[e])},_getCookies:function(){var t=this._dispatcher.cookies,e=o.stringify(this.endpoint);return t?c.map(t.getCookiesSync(e),function(t){return t.cookieString()}).join("; "):""},_storeCookies:function(t){var e,n=this._dispatcher.cookies,i=o.stringify(this.endpoint);if(t&&n){t=[].concat(t);for(var r=0,c=t.length;c>r;r++)e=s.parse(t[r]),n.setCookieSync(e,i)}}}),{get:function(t,e,n,i,s){var r=t.endpoint;c.asyncEach(this._transports,function(r,o){var a=r[0],h=r[1],u=t.endpointFor(a);return c.indexOf(n,a)>=0?o():c.indexOf(e,a)<0?(h.isUsable(t,u,function(){}),o()):void h.isUsable(t,u,function(e){if(!e)return o();var n=h.hasOwnProperty("create")?h.create(t,u):new h(t,u);i.call(s,n)})},function(){throw new Error("Could not find a usable connection type for "+o.stringify(r))})},register:function(t,e){this._transports.push([t,e]),e.prototype.connectionType=t},getConnectionTypes:function(){return c.map(this._transports,function(t){return t[0]})},_transports:[]});a(f.prototype,h),a(f.prototype,u),t.exports=f},function(t,e){(function(e){t.exports={addTimeout:function(t,n,i,s){if(this._timeouts=this._timeouts||{},!this._timeouts.hasOwnProperty(t)){var r=this;this._timeouts[t]=e.setTimeout(function(){delete r._timeouts[t],i.call(s)},1e3*n)}},removeTimeout:function(t){this._timeouts=this._timeouts||{};var n=this._timeouts[t];n&&(e.clearTimeout(n),delete this._timeouts[t])},removeAllTimeouts:function(){this._timeouts=this._timeouts||{};for(var t in this._timeouts)this.removeTimeout(t)}}}).call(e,function(){return this}())},function(t,e,n){(function(e){var i=n(5),s=n(7),r=n(23),o=n(8),c=n(10),a=n(24),h=n(6),u=n(3),l=n(25),f=n(12),d=n(20),p=h(i(d,{UNCONNECTED:1,CONNECTING:2,CONNECTED:3,batching:!1,isUsable:function(t,e){this.callback(function(){t.call(e,!0)}),this.errback(function(){t.call(e,!1)}),this.connect()},request:function(t){this._pending=this._pending||new r;for(var e=0,n=t.length;n>e;e++)this._pending.add(t[e]);var i=new s;return this.callback(function(e){e&&1===e.readyState&&(e.send(u(t)),s.fulfill(i,e))},this),this.connect(),{abort:function(){i.then(function(t){t.close()})}}},connect:function(){if(!p._unloaded&&(this._state=this._state||this.UNCONNECTED,this._state===this.UNCONNECTED)){this._state=this.CONNECTING;var t=this._createSocket();if(!t)return this.setDeferredStatus("failed");var e=this;t.onopen=function(){t.headers&&e._storeCookies(t.headers["set-cookie"]),e._socket=t,e._state=e.CONNECTED,e._everConnected=!0,e._ping(),e.setDeferredStatus("succeeded",t)};var n=!1;t.onclose=t.onerror=function(){if(!n){n=!0;var i=e._state===e.CONNECTED;t.onopen=t.onclose=t.onerror=t.onmessage=null,delete e._socket,e._state=e.UNCONNECTED,e.removeTimeout("ping");var s=e._pending?e._pending.toArray():[];delete e._pending,i||e._everConnected?(e.setDeferredStatus("unknown"),e._handleError(s,i)):e.setDeferredStatus("failed")}},t.onmessage=function(t){var n=JSON.parse(t.data);if(n){n=[].concat(n);for(var i=0,s=n.length;s>i;i++)void 0!==n[i].successful&&e._pending.remove(n[i]);e._receive(n)}}}},close:function(){this._socket&&this._socket.close()},_createSocket:function(){var t=p.getSocketUrl(this.endpoint),e=this._dispatcher.headers,n=this._dispatcher.wsExtensions,i=this._getCookies(),s=this._dispatcher.tls,r={extensions:n,headers:e,proxy:this._proxy,tls:s};return""!==i&&(r.headers.Cookie=i),l.create(t,[],r)},_ping:function(){this._socket&&1===this._socket.readyState&&(this._socket.send("[]"),this.addTimeout("ping",this._dispatcher.timeout/2,this._ping,this))}}),{PROTOCOLS:{"http:":"ws:","https:":"wss:"},create:function(t,e){var n=t.transports.websocket=t.transports.websocket||{};return n[e.href]=n[e.href]||new this(t,e),n[e.href]},getSocketUrl:function(t){return t=a(t),t.protocol=this.PROTOCOLS[t.protocol],o.stringify(t)},isUsable:function(t,e,n,i){this.create(t,e).isUsable(n,i)}});h(p.prototype,f),c.Event&&void 0!==e.onbeforeunload&&c.Event.on(e,"beforeunload",function(){p._unloaded=!0}),t.exports=p}).call(e,function(){return this}())},function(t,e,n){var i=n(5);t.exports=i({initialize:function(){this._index={}},add:function(t){var e=void 0!==t.id?t.id:t;return this._index.hasOwnProperty(e)?!1:(this._index[e]=t,!0)},forEach:function(t,e){for(var n in this._index)this._index.hasOwnProperty(n)&&t.call(e,this._index[n])},isEmpty:function(){for(var t in this._index)if(this._index.hasOwnProperty(t))return!1;return!0},member:function(t){for(var e in this._index)if(this._index[e]===t)return!0;return!1},remove:function(t){var e=void 0!==t.id?t.id:t,n=this._index[e];return delete this._index[e],n},toArray:function(){var t=[];return this.forEach(function(e){t.push(e)}),t}})},function(t){var e=function(t){var n,i,s;if(t instanceof Array){for(n=[],i=t.length;i--;)n[i]=e(t[i]);return n}if("object"==typeof t){n=null===t?null:{};for(s in t)n[s]=e(t[s]);return n}return t};t.exports=e},function(t){var e=window.MozWebSocket||window.WebSocket;t.exports={create:function(t){return new e(t)}}},function(t,e,n){var i=n(5),s=n(8),r=n(24),o=n(6),c=n(12),a=n(20),h=n(27),u=o(i(a,{initialize:function(t,e){if(a.prototype.initialize.call(this,t,e),!window.EventSource)return this.setDeferredStatus("failed");this._xhr=new h(t,e),e=r(e),e.pathname+="/"+t.clientId;var n=new u(s.stringify(e)),i=this;n.onopen=function(){i._everConnected=!0,i.setDeferredStatus("succeeded")},n.onerror=function(){i._everConnected?i._handleError([]):(i.setDeferredStatus("failed"),n.close())},n.onmessage=function(t){i._receive(JSON.parse(t.data))},this._socket=n},close:function(){this._socket&&(this._socket.onopen=this._socket.onerror=this._socket.onmessage=null,this._socket.close(),delete this._socket)},isUsable:function(t,e){this.callback(function(){t.call(e,!0)}),this.errback(function(){t.call(e,!1)})},encode:function(t){return this._xhr.encode(t)},request:function(t){return this._xhr.request(t)}}),{isUsable:function(t,e,n,i){var s=t.clientId;return s?void h.isUsable(t,e,function(s){return s?void this.create(t,e).isUsable(n,i):n.call(i,!1)},this):n.call(i,!1)},create:function(t,e){var n=t.transports.eventsource=t.transports.eventsource||{},i=t.clientId,o=r(e);return o.pathname+="/"+(i||""),o=s.stringify(o),n[o]=n[o]||new this(t,e),n[o]}});o(u.prototype,c),t.exports=u},function(t,e,n){var i=n(5),s=n(8),r=n(10),o=n(6),c=n(3),a=n(20),h=o(i(a,{encode:function(t){return c(t)},request:function(t){var e=this.endpoint.href,n=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest,i=this;n.open("POST",e,!0),n.setRequestHeader("Content-Type","application/json"),n.setRequestHeader("Pragma","no-cache"),n.setRequestHeader("X-Requested-With","XMLHttpRequest");var s=this._dispatcher.headers;for(var o in s)s.hasOwnProperty(o)&&n.setRequestHeader(o,s[o]);var c=function(){n.abort()};return void 0!==window.onbeforeunload&&r.Event.on(window,"beforeunload",c),n.onreadystatechange=function(){if(n&&4===n.readyState){var e=null,s=n.status,o=n.responseText,a=s>=200&&300>s||304===s||1223===s;if(void 0!==window.onbeforeunload&&r.Event.detach(window,"beforeunload",c),n.onreadystatechange=function(){},n=null,!a)return i._handleError(t);try{e=JSON.parse(o)}catch(h){}e?i._receive(e):i._handleError(t)}},n.send(this.encode(t)),n}}),{isUsable:function(t,e,n,i){n.call(i,s.isSameOrigin(e))}});t.exports=h},function(t,e,n){var i=n(5),s=n(23),r=n(8),o=n(6),c=n(3),a=n(20),h=o(i(a,{encode:function(t){return"message="+encodeURIComponent(c(t))},request:function(t){var e,n=window.XDomainRequest?XDomainRequest:XMLHttpRequest,i=new n,s=++h._id,o=this._dispatcher.headers,c=this;if(i.open("POST",r.stringify(this.endpoint),!0),i.setRequestHeader){i.setRequestHeader("Pragma","no-cache");for(e in o)o.hasOwnProperty(e)&&i.setRequestHeader(e,o[e])}var a=function(){return i?(h._pending.remove(s),i.onload=i.onerror=i.ontimeout=i.onprogress=null,void(i=null)):!1};return i.onload=function(){var e=null;try{e=JSON.parse(i.responseText)}catch(n){}a(),e?c._receive(e):c._handleError(t)},i.onerror=i.ontimeout=function(){a(),c._handleError(t)},i.onprogress=function(){},n===window.XDomainRequest&&h._pending.add({id:s,xhr:i}),i.send(this.encode(t)),i}}),{_id:0,_pending:new s,isUsable:function(t,e,n,i){if(r.isSameOrigin(e))return n.call(i,!1);if(window.XDomainRequest)return n.call(i,e.protocol===location.protocol);if(window.XMLHttpRequest){var s=new XMLHttpRequest;return n.call(i,void 0!==s.withCredentials);
2
-
3
- }return n.call(i,!1)}});t.exports=h},function(t,e,n){var i=n(5),s=n(8),r=n(24),o=n(6),c=n(3),a=n(20),h=o(i(a,{encode:function(t){var e=r(this.endpoint);return e.query.message=c(t),e.query.jsonp="__jsonp"+h._cbCount+"__",s.stringify(e)},request:function(t){var e=document.getElementsByTagName("head")[0],n=document.createElement("script"),i=h.getCallbackName(),o=r(this.endpoint),a=this;o.query.message=c(t),o.query.jsonp=i;var u=function(){if(!window[i])return!1;window[i]=void 0;try{delete window[i]}catch(t){}n.parentNode.removeChild(n)};return window[i]=function(t){u(),a._receive(t)},n.type="text/javascript",n.src=s.stringify(o),e.appendChild(n),n.onerror=function(){u(),a._handleError(t)},{abort:u}}}),{_cbCount:0,getCallbackName:function(){return this._cbCount+=1,"__jsonp"+this._cbCount+"__"},isUsable:function(t,e,n,i){n.call(i,!0)}});t.exports=h},function(t,e,n){var i=n(6),s=function(t,e){this.message=t,this.options=e,this.attempts=0};i(s.prototype,{getTimeout:function(){return this.options.timeout},getInterval:function(){return this.options.interval},isDeliverable:function(){var t=this.options.attempts,e=this.attempts,n=this.options.deadline,i=(new Date).getTime();return void 0!==t&&e>=t?!1:void 0!==n&&i>n?!1:!0},send:function(){this.attempts+=1},succeed:function(){},fail:function(){},abort:function(){}}),t.exports=s},function(t,e,n){var i=n(5),s=n(16),r=i({initialize:function(t,e,n){this.code=t,this.params=Array.prototype.slice.call(e),this.message=n},toString:function(){return this.code+":"+this.params.join(",")+":"+this.message}});r.parse=function(t){if(t=t||"",!s.ERROR.test(t))return new r(null,[],t);var e=t.split(":"),n=parseInt(e[0]),i=e[1].split(","),t=e[2];return new r(n,i,t)};var o={versionMismatch:[300,"Version mismatch"],conntypeMismatch:[301,"Connection types not supported"],extMismatch:[302,"Extension mismatch"],badRequest:[400,"Bad request"],clientUnknown:[401,"Unknown client"],parameterMissing:[402,"Missing required parameter"],channelForbidden:[403,"Forbidden channel"],channelUnknown:[404,"Unknown channel"],channelInvalid:[405,"Invalid channel"],extUnknown:[406,"Unknown extension"],publishFailed:[407,"Failed to publish"],serverError:[500,"Internal server error"]};for(var c in o)(function(t){r[t]=function(){return new r(o[t][0],arguments,o[t][1]).toString()}})(c);t.exports=r},function(t,e,n){var i=n(6),s=n(2),r={addExtension:function(t){this._extensions=this._extensions||[],this._extensions.push(t),t.added&&t.added(this)},removeExtension:function(t){if(this._extensions)for(var e=this._extensions.length;e--;)this._extensions[e]===t&&(this._extensions.splice(e,1),t.removed&&t.removed(this))},pipeThroughExtensions:function(t,e,n,i,s){if(this.debug("Passing through ? extensions: ?",t,e),!this._extensions)return i.call(s,e);var r=this._extensions.slice(),o=function(e){if(!e)return i.call(s,e);var c=r.shift();if(!c)return i.call(s,e);var a=c[t];return a?void(a.length>=3?c[t](e,n,o):c[t](e,o)):o(e)};o(e)}};i(r,s),t.exports=r},function(t,e,n){var i=n(5),s=n(12);t.exports=i(s)},function(t,e,n){var i=n(5),s=n(6),r=n(12),o=i({initialize:function(t,e,n,i){this._client=t,this._channels=e,this._callback=n,this._context=i,this._cancelled=!1},cancel:function(){this._cancelled||(this._client.unsubscribe(this._channels,this._callback,this._context),this._cancelled=!0)},unsubscribe:function(){this.cancel()}});s(o.prototype,r),t.exports=o}]);
4
- //# sourceMappingURL=faye-browser-min.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"faye-browser.js","sources":["webpack:///webpack/bootstrap 8eb555d66419845b2f55","webpack:///./javascript/faye_browser.js","webpack:///./javascript/util/constants.js","webpack:///./javascript/mixins/logging.js","webpack:///./javascript/util/to_json.js","webpack:///./javascript/protocol/client.js","webpack:///./javascript/util/class.js","webpack:///./javascript/util/extend.js","webpack:///./javascript/util/promise.js","webpack:///./javascript/util/uri.js","webpack:///./javascript/util/array.js","webpack:///./javascript/util/browser/event.js","webpack:///./javascript/util/validate_options.js","webpack:///./javascript/mixins/deferrable.js","webpack:///./javascript/mixins/publisher.js","webpack:///./javascript/util/event_emitter.js","webpack:///./javascript/protocol/channel.js","webpack:///./javascript/protocol/grammar.js","webpack:///./javascript/protocol/dispatcher.js","webpack:///./javascript/util/cookies/browser_cookies.js","webpack:///./javascript/transport/browser_transports.js","webpack:///./javascript/transport/transport.js","webpack:///./javascript/mixins/timeouts.js","webpack:///./javascript/transport/web_socket.js","webpack:///./javascript/util/set.js","webpack:///./javascript/util/copy_object.js","webpack:///./javascript/util/websocket/browser_websocket.js","webpack:///./javascript/transport/event_source.js","webpack:///./javascript/transport/xhr.js","webpack:///./javascript/transport/cors.js","webpack:///./javascript/transport/jsonp.js","webpack:///./javascript/protocol/scheduler.js","webpack:///./javascript/protocol/error.js","webpack:///./javascript/protocol/extensible.js","webpack:///./javascript/protocol/publication.js","webpack:///./javascript/protocol/subscription.js"],"names":["__webpack_require__","moduleId","installedModules","exports","module","id","loaded","modules","call","m","c","p","constants","Logging","Faye","VERSION","Client","Scheduler","wrapper","BAYEUX_VERSION","ID_LENGTH","JSONP_CALLBACK","CONNECTION_TYPES","MANDATORY_CONNECTION_TYPES","toJSON","LOG_LEVELS","fatal","error","warn","info","debug","writeLog","messageArgs","level","logger","args","Array","prototype","slice","apply","banner","klass","this","className","message","shift","replace","e","key","arguments","object","JSON","stringify","value","global","Class","Promise","URI","array","browser","extend","validateOptions","Deferrable","Publisher","Channel","Dispatcher","Error","Extensible","Publication","Subscription","UNCONNECTED","CONNECTING","CONNECTED","DISCONNECTED","HANDSHAKE","RETRY","NONE","CONNECTION_TIMEOUT","DEFAULT_ENDPOINT","INTERVAL","initialize","endpoint","options","_channels","Set","_dispatcher","create","_messageId","_state","_responseCallbacks","_advice","reconnect","interval","timeout","bind","_receiveMessage","Event","undefined","onbeforeunload","on","indexOf","_disabled","disconnect","addWebsocketExtension","extension","disable","feature","setHeader","name","handshake","callback","context","self","selectTransport","_sendMessage","channel","version","supportedConnectionTypes","getConnectionTypes","response","successful","clientId","subscribe","getKeys","defer","setTimeout","retry","connect","setDeferredStatus","_connectRequest","CONNECT","connectionType","_cycleConnection","promise","DISCONNECT","close","parse","map","subscription","force","hasSubscribe","hasSubscription","SUBSCRIBE","unsubscribe","channels","concat","dead","UNSUBSCRIBE","publish","data","publication","_generateMessageId","pipeThroughExtensions","sendMessage","Math","pow","toString","advice","_handleAdvice","_deliverMessage","distributeMessage","parent","methods","Object","bridge","dest","source","overwrite","hasOwnProperty","process","nextTick","fn","setImmediate","PENDING","FULFILLED","REJECTED","RETURN","x","THROW","task","_onFulfilled","_onRejected","fulfill","reason","reject","then","onFulfilled","onRejected","next","registerOnFulfilled","registerOnRejected","handler","invoke","push","_value","_reason","_invoke","outcome","TypeError","resolve","type","called","_fulfill","v","r","all","promises","i","list","n","length","fulfilled","deferred","pending","tuple","resolved","rejected","isURI","uri","protocol","host","path","isSameOrigin","location","hostname","port","url","parts","query","pairs","consume","pattern","match","test","pathname","substr","split","search","decodeURIComponent","href","string","queryString","hash","encodeURIComponent","join","commonElement","lista","listb","needle","result","filter","asyncEach","iterator","calls","looping","iterate","resume","loop","_registry","element","eventName","wrapped","addEventListener","attachEvent","_element","_type","_callback","_context","_handler","detach","register","removeEventListener","detachEvent","splice","window","onunload","validKeys","errback","_promise","_reject","seconds","_timer","status","clearTimeout","EventEmitter","countListeners","eventType","listeners","listener","_listeners","unbind","removeListener","trigger","emit","xs","isArray","_events","l","addListener","once","g","removeAllListeners","Grammar","isUnused","META","SERVICE","expand","segments","copy","unparse","isValid","CHANNEL_NAME","CHANNEL_PATTERN","isMeta","isService","isSubscribable","keys","remove","names","ERROR","cookies","Transport","MAX_REQUEST_SIZE","DEFAULT_RETRY","UP","DOWN","client","_client","_alternates","endpoints","CookieJar","_envelopes","headers","_scheduler","scheduler","transports","wsExtensions","proxy","_proxy","origin","exts","websocketExtensions","tls","ca","maxRequestSize","endpointFor","transport","_transport","transportTypes","get","attempts","deadline","Date","getTime","envelope","_sendEnvelope","request","timer","isDeliverable","abort","handleError","getTimeout","send","handleResponse","reply","succeed","immediate","req","fail","getInterval","Cookie","Timeouts","DEFAULT_PORTS","http:","https:","ws:","wss:","SECURE_PROTOCOLS","MAX_DELAY","batching","dispatcher","_outbox","env","HTTPS_PROXY","https_proxy","HTTP_PROXY","http_proxy","encode","_flushLargeBatch","_publish","_connectMessage","delay","addTimeout","_flush","removeTimeout","last","pop","_receive","replies","_handleError","messages","_getCookies","getCookiesSync","cookie","cookieString","_storeCookies","setCookie","setCookieSync","allowed","disabled","_transports","pair","connType","connEndpoint","isUsable","t","_timeouts","removeAllTimeouts","copyObject","ws","WebSocket","_pending","add","socket","readyState","_unloaded","_createSocket","onopen","_socket","_everConnected","_ping","closed","onclose","onerror","wasConnected","onmessage","toArray","event","getSocketUrl","extensions","PROTOCOLS","sockets","websocket","_index","item","forEach","block","isEmpty","member","removed","clone","WS","MozWebSocket","XHR","EventSource","_xhr","usable","eventsource","xhr","ActiveXObject","XMLHttpRequest","open","setRequestHeader","onreadystatechange","text","responseText","CORS","xhrClass","XDomainRequest","_id","cleanUp","onload","ontimeout","onprogress","withCredentials","JSONP","jsonp","_cbCount","head","document","getElementsByTagName","script","createElement","callbackName","getCallbackName","cleanup","parentNode","removeChild","src","appendChild","made","now","code","params","parseInt","errors","versionMismatch","conntypeMismatch","extMismatch","badRequest","clientUnknown","parameterMissing","channelForbidden","channelUnknown","channelInvalid","extUnknown","publishFailed","serverError","addExtension","_extensions","added","removeExtension","stage","pipe","_cancelled","cancel"],"mappings":"qBAIA,QAAAA,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAE,OAGA,IAAAC,GAAAF,EAAAD,IACAE,WACAE,GAAAJ,EACAK,QAAA,EAUA,OANAC,GAAAN,GAAAO,KAAAJ,EAAAD,QAAAC,EAAAA,EAAAD,QAAAH,GAGAI,EAAAE,QAAA,EAGAF,EAAAD,QAvBA,GAAAD,KAqCA,OATAF,GAAAS,EAAAF,EAGAP,EAAAU,EAAAR,EAGAF,EAAAW,EAAA,GAGAX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A;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;;;;;;;;ACjBA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;ACZA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,YAAW;AACX;AACA;AACA,UAAS;;AAET;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;;;;;;;;ACjDA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;AACH;;;;;;;;ACXA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,qBAAoB;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,MAAK,IAAI;;AAET;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA,iDAAgD,yBAAyB;;AAEzE,QAAO;AACP;AACA,uCAAsC,oCAAoC;AAC1E;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yCAAwC,kCAAkC;;AAE1E;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA,MAAK,IAAI;AACT,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,MAAK,IAAI;AACT;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,QAAO,IAAI;AACX;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP,MAAK;;AAEL;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;;AAEP;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,QAAO,IAAI;AACX;;AAEA;AACA;AACA,QAAO;AACP,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAiC;AACjC;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,QAAO;AACP;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;;AAEL;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,mEAAkE;AAClE,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,mCAAkC,iBAAiB;AACnD;AACA,EAAC;;AAED;AACA;AACA;AACA;;AAEA;;;;;;;;;ACnYA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;ACzBA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACdA;AACA;;AAEA;;AAEA;;AAEA;AACA,yBAAwB;AACxB;AACA,yBAAwB;AACxB;AACA,yBAAwB;;AAExB;AACA;AACA;;AAEA,2BAA0B,WAAW;AACrC,2BAA0B;;AAE1B;AACA;AACA;AACA;;AAEA;AACA;;AAEA,0BAAyB,uBAAuB;AAChD,0BAAyB,uBAAuB;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,kCAAiC;;AAEjC;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA,mCAAkC;;AAElC;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA,qBAAoB,2BAA2B;AAC/C;;AAEA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,gBAAe,OAAO;AACtB;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL,IAAG;AACH;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA,iDAAgD,iBAAiB;AACjE;;AAEA;AACA,iDAAgD,iBAAiB;AACjE;;AAEA;;;;;;;;ACnKA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,iBAAgB;;AAEhB;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA,kCAAiC,OAAO;AACxC;AACA;AACA;;AAEA;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACrFA;AACA;;AAEA;;AAEA;AACA;AACA,sCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA,qCAAoC,OAAO;AAC3C;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA,yCAAwC,OAAO;AAC/C;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,sCAAqC,OAAO;AAC5C;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC5EA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA,+BAA8B;;AAE9B;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;;;;;;ACpDA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACZA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;;AAEP;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA,uCAAsC,gCAAgC;AACtE,IAAG;;AAEH;AACA,8CAA6C,iCAAiC;AAC9E,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AClDA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,+BAA8B;;AAE9B;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;ACvCA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAmB,eAAe;AAClC;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA2B;AAC3B,QAAO;AACP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAG;AACH;;AAEA;AACA,0CAAyC,OAAO;AAChD;AACA;AACA;;AAEA,IAAG;AACH;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC7KA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,EAAC;;AAED;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,yCAAwC,OAAO;AAC/C;AACA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,MAAK;;AAEL;AACA;AACA,wCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA,MAAK;;AAEL;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;;AAEL;AACA;;AAEA,2CAA0C,OAAO;AACjD;AACA;AACA;AACA;AACA,IAAG;AACH,EAAC;;AAED;;;;;;;;ACtIA;AACA;;AAEA;;AAEA;AACA;AACA,qFAAoF,IAAI;AACxF;AACA;AACA;;;;;;;;ACVA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yBAAwB;AACxB;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,yDAAwD;;AAExD;AACA;AACA;AACA,uCAAsC,OAAO;AAC7C;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,iDAAgD,+EAA+E;AAC/H,0CAAyC;AACzC;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,MAAK;;AAEL;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAK;;AAEL;AACA;;AAEA;AACA;;AAEA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;AC3LA;AACA;;AAEA;;AAEA;;;;;;;;ACLA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;ACbA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+BAA8B;AAC9B,sBAAqB,mDAAmD;AACxE;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,iCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH,uBAAsB;;AAEtB;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;AACA,MAAK;;AAEL;AACA,IAAG;;AAEH;AACA;;AAEA;AACA,sCAAqC;;AAErC;;AAEA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;AACA;;AAEA,wCAAuC,OAAO;AAC9C;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;;AAEA,yCAAwC,OAAO;AAC/C;AACA,IAAG;;AAEH;AACA;AACA;;AAEA;;AAEA;AACA;AACA,MAAK,SAAS;AACd,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;;AAEA,0CAAyC,OAAO;AAChD;AACA;AACA;AACA;;AAEA,EAAC;AACD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA,+DAA8D;AAC9D;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;AACP,MAAK;AACL;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA,IAAG;;AAEH;AACA,qDAAoD,cAAc;AAClE,IAAG;;AAEH;AACA,EAAC;;AAED;AACA;;AAEA;;;;;;;;ACpLA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;;;;;;;;AC5BA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,+BAA8B,+BAA+B;AAC7D,8BAA6B,gCAAgC;AAC7D;AACA,IAAG;;AAEH;AACA;AACA,yCAAwC,OAAO;;AAE/C;;AAEA;AACA;AACA;AACA;AACA,MAAK;;AAEL;;AAEA;AACA,0BAAyB,4BAA4B,aAAa;AAClE;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA,0CAAyC,OAAO;AAChD;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,uBAAsB;;AAEtB;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA,EAAC;AACD;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,EAAC;;AAED;;AAEA;AACA,wDAAuD,6BAA6B;;AAEpF;;;;;;;;;AC/JA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,kCAAiC,mBAAmB;AACpD;AACA;AACA,EAAC;;;;;;;;ACpDD;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;;AAEA;;;;;;;;ACrBA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;ACXA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA,+BAA8B,+BAA+B;AAC7D,8BAA6B,gCAAgC;AAC7D,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;;AAEA,EAAC;AACD;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAK;AACL,IAAG;;AAEH;AACA,8FAA6F;AAC7F;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;;AAED;;AAEA;;;;;;;;AC7FA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,6BAA4B;AAC5B;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA,QAAO;;AAEP;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,EAAC;AACD;AACA;AACA;AACA,EAAC;;AAED;;;;;;;;ACxEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,QAAO;;AAEP;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,0BAAyB,iBAAiB;;AAE1C;AACA;AACA;AACA,EAAC;AACD;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;;;;;;;;ACxFA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,YAAW,8BAA8B;AACzC;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA,aAAY;AACZ;AACA,EAAC;AACD;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,EAAC;;AAED;;;;;;;;AClEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA,IAAG;;AAEH;AACA;AACA,IAAG;;AAEH,yBAAwB;;AAExB,sBAAqB;;AAErB;AACA,EAAC;;AAED;;;;;;;;AChDA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;;;;;;;;ACzDA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;;;;;;;ACjDA;AACA;;AAEA;;AAEA;AACA;;AAEA;;;;;;;;ACRA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA;AACA,IAAG;;AAEH;AACA;AACA;AACA,EAAC;;AAED;;AAEA","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap 8eb555d66419845b2f55\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar constants = require('./util/constants'),\n Logging = require('./mixins/logging');\n\nvar Faye = {\n VERSION: constants.VERSION,\n\n Client: require('./protocol/client'),\n Scheduler: require('./protocol/scheduler')\n};\n\nLogging.wrapper = Faye;\n\nmodule.exports = Faye;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/faye_browser.js\n ** module id = 0\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\nmodule.exports = {\n VERSION: '1.1.2',\n\n BAYEUX_VERSION: '1.0',\n ID_LENGTH: 160,\n JSONP_CALLBACK: 'jsonpcallback',\n CONNECTION_TYPES: ['long-polling', 'cross-origin-long-polling', 'callback-polling', 'websocket', 'eventsource', 'in-process'],\n\n MANDATORY_CONNECTION_TYPES: ['long-polling', 'callback-polling', 'in-process']\n};\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/util/constants.js\n ** module id = 1\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar toJSON = require('../util/to_json');\n\nvar Logging = {\n LOG_LEVELS: {\n fatal: 4,\n error: 3,\n warn: 2,\n info: 1,\n debug: 0\n },\n\n writeLog: function(messageArgs, level) {\n var logger = Logging.logger || (Logging.wrapper || Logging).logger;\n if (!logger) return;\n\n var args = Array.prototype.slice.apply(messageArgs),\n banner = '[Faye',\n klass = this.className,\n\n message = args.shift().replace(/\\?/g, function() {\n try {\n return toJSON(args.shift());\n } catch (e) {\n return '[Object]';\n }\n });\n\n if (klass) banner += '.' + klass;\n banner += '] ';\n\n if (typeof logger[level] === 'function')\n logger[level](banner + message);\n else if (typeof logger === 'function')\n logger(banner + message);\n }\n};\n\nfor (var key in Logging.LOG_LEVELS)\n (function(level) {\n Logging[level] = function() {\n this.writeLog(arguments, level);\n };\n })(key);\n\nmodule.exports = Logging;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/mixins/logging.js\n ** module id = 2\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\n// http://assanka.net/content/tech/2009/09/02/json2-js-vs-prototype/\n\nmodule.exports = function(object) {\n return JSON.stringify(object, function(key, value) {\n return (this[key] instanceof Array) ? this[key] : value;\n });\n};\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/util/to_json.js\n ** module id = 3\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar Class = require('../util/class'),\n Promise = require('../util/promise'),\n URI = require('../util/uri'),\n array = require('../util/array'),\n browser = require('../util/browser'),\n constants = require('../util/constants'),\n extend = require('../util/extend'),\n validateOptions = require('../util/validate_options'),\n Deferrable = require('../mixins/deferrable'),\n Logging = require('../mixins/logging'),\n Publisher = require('../mixins/publisher'),\n Channel = require('./channel'),\n Dispatcher = require('./dispatcher'),\n Error = require('./error'),\n Extensible = require('./extensible'),\n Publication = require('./publication'),\n Subscription = require('./subscription');\n\nvar Client = Class({ className: 'Client',\n UNCONNECTED: 1,\n CONNECTING: 2,\n CONNECTED: 3,\n DISCONNECTED: 4,\n\n HANDSHAKE: 'handshake',\n RETRY: 'retry',\n NONE: 'none',\n\n CONNECTION_TIMEOUT: 60,\n\n DEFAULT_ENDPOINT: '/bayeux',\n INTERVAL: 0,\n\n initialize: function(endpoint, options) {\n this.info('New client created for ?', endpoint);\n options = options || {};\n\n validateOptions(options, ['interval', 'timeout', 'endpoints', 'proxy', 'retry', 'scheduler', 'websocketExtensions', 'tls', 'ca']);\n\n this._channels = new Channel.Set();\n this._dispatcher = Dispatcher.create(this, endpoint || this.DEFAULT_ENDPOINT, options);\n\n this._messageId = 0;\n this._state = this.UNCONNECTED;\n\n this._responseCallbacks = {};\n\n this._advice = {\n reconnect: this.RETRY,\n interval: 1000 * (options.interval || this.INTERVAL),\n timeout: 1000 * (options.timeout || this.CONNECTION_TIMEOUT)\n };\n this._dispatcher.timeout = this._advice.timeout / 1000;\n\n this._dispatcher.bind('message', this._receiveMessage, this);\n\n if (browser.Event && global.onbeforeunload !== undefined)\n browser.Event.on(global, 'beforeunload', function() {\n if (array.indexOf(this._dispatcher._disabled, 'autodisconnect') < 0)\n this.disconnect();\n }, this);\n },\n\n addWebsocketExtension: function(extension) {\n return this._dispatcher.addWebsocketExtension(extension);\n },\n\n disable: function(feature) {\n return this._dispatcher.disable(feature);\n },\n\n setHeader: function(name, value) {\n return this._dispatcher.setHeader(name, value);\n },\n\n // Request\n // MUST include: * channel\n // * version\n // * supportedConnectionTypes\n // MAY include: * minimumVersion\n // * ext\n // * id\n //\n // Success Response Failed Response\n // MUST include: * channel MUST include: * channel\n // * version * successful\n // * supportedConnectionTypes * error\n // * clientId MAY include: * supportedConnectionTypes\n // * successful * advice\n // MAY include: * minimumVersion * version\n // * advice * minimumVersion\n // * ext * ext\n // * id * id\n // * authSuccessful\n handshake: function(callback, context) {\n if (this._advice.reconnect === this.NONE) return;\n if (this._state !== this.UNCONNECTED) return;\n\n this._state = this.CONNECTING;\n var self = this;\n\n this.info('Initiating handshake with ?', URI.stringify(this._dispatcher.endpoint));\n this._dispatcher.selectTransport(constants.MANDATORY_CONNECTION_TYPES);\n\n this._sendMessage({\n channel: Channel.HANDSHAKE,\n version: constants.BAYEUX_VERSION,\n supportedConnectionTypes: this._dispatcher.getConnectionTypes()\n\n }, {}, function(response) {\n\n if (response.successful) {\n this._state = this.CONNECTED;\n this._dispatcher.clientId = response.clientId;\n\n this._dispatcher.selectTransport(response.supportedConnectionTypes);\n\n this.info('Handshake successful: ?', this._dispatcher.clientId);\n\n this.subscribe(this._channels.getKeys(), true);\n if (callback) Promise.defer(function() { callback.call(context) });\n\n } else {\n this.info('Handshake unsuccessful');\n global.setTimeout(function() { self.handshake(callback, context) }, this._dispatcher.retry * 1000);\n this._state = this.UNCONNECTED;\n }\n }, this);\n },\n\n // Request Response\n // MUST include: * channel MUST include: * channel\n // * clientId * successful\n // * connectionType * clientId\n // MAY include: * ext MAY include: * error\n // * id * advice\n // * ext\n // * id\n // * timestamp\n connect: function(callback, context) {\n if (this._advice.reconnect === this.NONE) return;\n if (this._state === this.DISCONNECTED) return;\n\n if (this._state === this.UNCONNECTED)\n return this.handshake(function() { this.connect(callback, context) }, this);\n\n this.callback(callback, context);\n if (this._state !== this.CONNECTED) return;\n\n this.info('Calling deferred actions for ?', this._dispatcher.clientId);\n this.setDeferredStatus('succeeded');\n this.setDeferredStatus('unknown');\n\n if (this._connectRequest) return;\n this._connectRequest = true;\n\n this.info('Initiating connection for ?', this._dispatcher.clientId);\n\n this._sendMessage({\n channel: Channel.CONNECT,\n clientId: this._dispatcher.clientId,\n connectionType: this._dispatcher.connectionType\n\n }, {}, this._cycleConnection, this);\n },\n\n // Request Response\n // MUST include: * channel MUST include: * channel\n // * clientId * successful\n // MAY include: * ext * clientId\n // * id MAY include: * error\n // * ext\n // * id\n disconnect: function() {\n if (this._state !== this.CONNECTED) return;\n this._state = this.DISCONNECTED;\n\n this.info('Disconnecting ?', this._dispatcher.clientId);\n var promise = new Publication();\n\n this._sendMessage({\n channel: Channel.DISCONNECT,\n clientId: this._dispatcher.clientId\n\n }, {}, function(response) {\n if (response.successful) {\n this._dispatcher.close();\n promise.setDeferredStatus('succeeded');\n } else {\n promise.setDeferredStatus('failed', Error.parse(response.error));\n }\n }, this);\n\n this.info('Clearing channel listeners for ?', this._dispatcher.clientId);\n this._channels = new Channel.Set();\n\n return promise;\n },\n\n // Request Response\n // MUST include: * channel MUST include: * channel\n // * clientId * successful\n // * subscription * clientId\n // MAY include: * ext * subscription\n // * id MAY include: * error\n // * advice\n // * ext\n // * id\n // * timestamp\n subscribe: function(channel, callback, context) {\n if (channel instanceof Array)\n return array.map(channel, function(c) {\n return this.subscribe(c, callback, context);\n }, this);\n\n var subscription = new Subscription(this, channel, callback, context),\n force = (callback === true),\n hasSubscribe = this._channels.hasSubscription(channel);\n\n if (hasSubscribe && !force) {\n this._channels.subscribe([channel], callback, context);\n subscription.setDeferredStatus('succeeded');\n return subscription;\n }\n\n this.connect(function() {\n this.info('Client ? attempting to subscribe to ?', this._dispatcher.clientId, channel);\n if (!force) this._channels.subscribe([channel], callback, context);\n\n this._sendMessage({\n channel: Channel.SUBSCRIBE,\n clientId: this._dispatcher.clientId,\n subscription: channel\n\n }, {}, function(response) {\n if (!response.successful) {\n subscription.setDeferredStatus('failed', Error.parse(response.error));\n return this._channels.unsubscribe(channel, callback, context);\n }\n\n var channels = [].concat(response.subscription);\n this.info('Subscription acknowledged for ? to ?', this._dispatcher.clientId, channels);\n subscription.setDeferredStatus('succeeded');\n }, this);\n }, this);\n\n return subscription;\n },\n\n // Request Response\n // MUST include: * channel MUST include: * channel\n // * clientId * successful\n // * subscription * clientId\n // MAY include: * ext * subscription\n // * id MAY include: * error\n // * advice\n // * ext\n // * id\n // * timestamp\n unsubscribe: function(channel, callback, context) {\n if (channel instanceof Array)\n return array.map(channel, function(c) {\n return this.unsubscribe(c, callback, context);\n }, this);\n\n var dead = this._channels.unsubscribe(channel, callback, context);\n if (!dead) return;\n\n this.connect(function() {\n this.info('Client ? attempting to unsubscribe from ?', this._dispatcher.clientId, channel);\n\n this._sendMessage({\n channel: Channel.UNSUBSCRIBE,\n clientId: this._dispatcher.clientId,\n subscription: channel\n\n }, {}, function(response) {\n if (!response.successful) return;\n\n var channels = [].concat(response.subscription);\n this.info('Unsubscription acknowledged for ? from ?', this._dispatcher.clientId, channels);\n }, this);\n }, this);\n },\n\n // Request Response\n // MUST include: * channel MUST include: * channel\n // * data * successful\n // MAY include: * clientId MAY include: * id\n // * id * error\n // * ext * ext\n publish: function(channel, data, options) {\n validateOptions(options || {}, ['attempts', 'deadline']);\n var publication = new Publication();\n\n this.connect(function() {\n this.info('Client ? queueing published message to ?: ?', this._dispatcher.clientId, channel, data);\n\n this._sendMessage({\n channel: channel,\n data: data,\n clientId: this._dispatcher.clientId\n\n }, options, function(response) {\n if (response.successful)\n publication.setDeferredStatus('succeeded');\n else\n publication.setDeferredStatus('failed', Error.parse(response.error));\n }, this);\n }, this);\n\n return publication;\n },\n\n _sendMessage: function(message, options, callback, context) {\n message.id = this._generateMessageId();\n\n var timeout = this._advice.timeout\n ? 1.2 * this._advice.timeout / 1000\n : 1.2 * this._dispatcher.retry;\n\n this.pipeThroughExtensions('outgoing', message, null, function(message) {\n if (!message) return;\n if (callback) this._responseCallbacks[message.id] = [callback, context];\n this._dispatcher.sendMessage(message, timeout, options || {});\n }, this);\n },\n\n _generateMessageId: function() {\n this._messageId += 1;\n if (this._messageId >= Math.pow(2,32)) this._messageId = 0;\n return this._messageId.toString(36);\n },\n\n _receiveMessage: function(message) {\n var id = message.id, callback;\n\n if (message.successful !== undefined) {\n callback = this._responseCallbacks[id];\n delete this._responseCallbacks[id];\n }\n\n this.pipeThroughExtensions('incoming', message, null, function(message) {\n if (!message) return;\n if (message.advice) this._handleAdvice(message.advice);\n this._deliverMessage(message);\n if (callback) callback[0].call(callback[1], message);\n }, this);\n },\n\n _handleAdvice: function(advice) {\n extend(this._advice, advice);\n this._dispatcher.timeout = this._advice.timeout / 1000;\n\n if (this._advice.reconnect === this.HANDSHAKE && this._state !== this.DISCONNECTED) {\n this._state = this.UNCONNECTED;\n this._dispatcher.clientId = null;\n this._cycleConnection();\n }\n },\n\n _deliverMessage: function(message) {\n if (!message.channel || message.data === undefined) return;\n this.info('Client ? calling listeners for ? with ?', this._dispatcher.clientId, message.channel, message.data);\n this._channels.distributeMessage(message);\n },\n\n _cycleConnection: function() {\n if (this._connectRequest) {\n this._connectRequest = null;\n this.info('Closed connection for ?', this._dispatcher.clientId);\n }\n var self = this;\n global.setTimeout(function() { self.connect() }, this._advice.interval);\n }\n});\n\nextend(Client.prototype, Deferrable);\nextend(Client.prototype, Publisher);\nextend(Client.prototype, Logging);\nextend(Client.prototype, Extensible);\n\nmodule.exports = Client;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/protocol/client.js\n ** module id = 4\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar extend = require('./extend');\n\nmodule.exports = function(parent, methods) {\n if (typeof parent !== 'function') {\n methods = parent;\n parent = Object;\n }\n\n var klass = function() {\n if (!this.initialize) return this;\n return this.initialize.apply(this, arguments) || this;\n };\n\n var bridge = function() {};\n bridge.prototype = parent.prototype;\n\n klass.prototype = new bridge();\n extend(klass.prototype, methods);\n\n return klass;\n};\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/util/class.js\n ** module id = 5\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nmodule.exports = function(dest, source, overwrite) {\n if (!source) return dest;\n for (var key in source) {\n if (!source.hasOwnProperty(key)) continue;\n if (dest.hasOwnProperty(key) && overwrite === false) continue;\n if (dest[key] !== source[key])\n dest[key] = source[key];\n }\n return dest;\n};\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/util/extend.js\n ** module id = 6\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar timeout = setTimeout, defer;\n\nif (typeof process === 'object' && process.nextTick)\n defer = function(fn) { process.nextTick(fn) };\nelse if (typeof setImmediate === 'function')\n defer = function(fn) { setImmediate(fn) };\nelse\n defer = function(fn) { timeout(fn, 0) };\n\nvar PENDING = 0,\n FULFILLED = 1,\n REJECTED = 2;\n\nvar RETURN = function(x) { return x },\n THROW = function(x) { throw x };\n\nvar Promise = function(task) {\n this._state = PENDING;\n this._onFulfilled = [];\n this._onRejected = [];\n\n if (typeof task !== 'function') return;\n var self = this;\n\n task(function(value) { fulfill(self, value) },\n function(reason) { reject(self, reason) });\n};\n\nPromise.prototype.then = function(onFulfilled, onRejected) {\n var next = new Promise();\n registerOnFulfilled(this, onFulfilled, next);\n registerOnRejected(this, onRejected, next);\n return next;\n};\n\nvar registerOnFulfilled = function(promise, onFulfilled, next) {\n if (typeof onFulfilled !== 'function') onFulfilled = RETURN;\n var handler = function(value) { invoke(onFulfilled, value, next) };\n\n if (promise._state === PENDING) {\n promise._onFulfilled.push(handler);\n } else if (promise._state === FULFILLED) {\n handler(promise._value);\n }\n};\n\nvar registerOnRejected = function(promise, onRejected, next) {\n if (typeof onRejected !== 'function') onRejected = THROW;\n var handler = function(reason) { invoke(onRejected, reason, next) };\n\n if (promise._state === PENDING) {\n promise._onRejected.push(handler);\n } else if (promise._state === REJECTED) {\n handler(promise._reason);\n }\n};\n\nvar invoke = function(fn, value, next) {\n defer(function() { _invoke(fn, value, next) });\n};\n\nvar _invoke = function(fn, value, next) {\n var outcome;\n\n try {\n outcome = fn(value);\n } catch (error) {\n return reject(next, error);\n }\n\n if (outcome === next) {\n reject(next, new TypeError('Recursive promise chain detected'));\n } else {\n fulfill(next, outcome);\n }\n};\n\nvar fulfill = Promise.fulfill = Promise.resolve = function(promise, value) {\n var called = false, type, then;\n\n try {\n type = typeof value;\n then = value !== null && (type === 'function' || type === 'object') && value.then;\n\n if (typeof then !== 'function') return _fulfill(promise, value);\n\n then.call(value, function(v) {\n if (!(called ^ (called = true))) return;\n fulfill(promise, v);\n }, function(r) {\n if (!(called ^ (called = true))) return;\n reject(promise, r);\n });\n } catch (error) {\n if (!(called ^ (called = true))) return;\n reject(promise, error);\n }\n};\n\nvar _fulfill = function(promise, value) {\n if (promise._state !== PENDING) return;\n\n promise._state = FULFILLED;\n promise._value = value;\n promise._onRejected = [];\n\n var onFulfilled = promise._onFulfilled, fn;\n while (fn = onFulfilled.shift()) fn(value);\n};\n\nvar reject = Promise.reject = function(promise, reason) {\n if (promise._state !== PENDING) return;\n\n promise._state = REJECTED;\n promise._reason = reason;\n promise._onFulfilled = [];\n\n var onRejected = promise._onRejected, fn;\n while (fn = onRejected.shift()) fn(reason);\n};\n\nPromise.all = function(promises) {\n return new Promise(function(fulfill, reject) {\n var list = [],\n n = promises.length,\n i;\n\n if (n === 0) return fulfill(list);\n\n for (i = 0; i < n; i++) (function(promise, i) {\n Promise.fulfilled(promise).then(function(value) {\n list[i] = value;\n if (--n === 0) fulfill(list);\n }, reject);\n })(promises[i], i);\n });\n};\n\nPromise.defer = defer;\n\nPromise.deferred = Promise.pending = function() {\n var tuple = {};\n\n tuple.promise = new Promise(function(fulfill, reject) {\n tuple.fulfill = tuple.resolve = fulfill;\n tuple.reject = reject;\n });\n return tuple;\n};\n\nPromise.fulfilled = Promise.resolved = function(value) {\n return new Promise(function(fulfill, reject) { fulfill(value) });\n};\n\nPromise.rejected = function(reason) {\n return new Promise(function(fulfill, reject) { reject(reason) });\n};\n\nmodule.exports = Promise;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/util/promise.js\n ** module id = 7\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nmodule.exports = {\n isURI: function(uri) {\n return uri && uri.protocol && uri.host && uri.path;\n },\n\n isSameOrigin: function(uri) {\n return uri.protocol === location.protocol &&\n uri.hostname === location.hostname &&\n uri.port === location.port;\n },\n\n parse: function(url) {\n if (typeof url !== 'string') return url;\n var uri = {}, parts, query, pairs, i, n, data;\n\n var consume = function(name, pattern) {\n url = url.replace(pattern, function(match) {\n uri[name] = match;\n return '';\n });\n uri[name] = uri[name] || '';\n };\n\n consume('protocol', /^[a-z]+\\:/i);\n consume('host', /^\\/\\/[^\\/\\?#]+/);\n\n if (!/^\\//.test(url) && !uri.host)\n url = location.pathname.replace(/[^\\/]*$/, '') + url;\n\n consume('pathname', /^[^\\?#]*/);\n consume('search', /^\\?[^#]*/);\n consume('hash', /^#.*/);\n\n uri.protocol = uri.protocol || location.protocol;\n\n if (uri.host) {\n uri.host = uri.host.substr(2);\n parts = uri.host.split(':');\n uri.hostname = parts[0];\n uri.port = parts[1] || '';\n } else {\n uri.host = location.host;\n uri.hostname = location.hostname;\n uri.port = location.port;\n }\n\n uri.pathname = uri.pathname || '/';\n uri.path = uri.pathname + uri.search;\n\n query = uri.search.replace(/^\\?/, '');\n pairs = query ? query.split('&') : [];\n data = {};\n\n for (i = 0, n = pairs.length; i < n; i++) {\n parts = pairs[i].split('=');\n data[decodeURIComponent(parts[0] || '')] = decodeURIComponent(parts[1] || '');\n }\n\n uri.query = data;\n\n uri.href = this.stringify(uri);\n return uri;\n },\n\n stringify: function(uri) {\n var string = uri.protocol + '//' + uri.hostname;\n if (uri.port) string += ':' + uri.port;\n string += uri.pathname + this.queryString(uri.query) + (uri.hash || '');\n return string;\n },\n\n queryString: function(query) {\n var pairs = [];\n for (var key in query) {\n if (!query.hasOwnProperty(key)) continue;\n pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(query[key]));\n }\n if (pairs.length === 0) return '';\n return '?' + pairs.join('&');\n }\n};\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/util/uri.js\n ** module id = 8\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nmodule.exports = {\n commonElement: function(lista, listb) {\n for (var i = 0, n = lista.length; i < n; i++) {\n if (this.indexOf(listb, lista[i]) !== -1)\n return lista[i];\n }\n return null;\n },\n\n indexOf: function(list, needle) {\n if (list.indexOf) return list.indexOf(needle);\n\n for (var i = 0, n = list.length; i < n; i++) {\n if (list[i] === needle) return i;\n }\n return -1;\n },\n\n map: function(object, callback, context) {\n if (object.map) return object.map(callback, context);\n var result = [];\n\n if (object instanceof Array) {\n for (var i = 0, n = object.length; i < n; i++) {\n result.push(callback.call(context || null, object[i], i));\n }\n } else {\n for (var key in object) {\n if (!object.hasOwnProperty(key)) continue;\n result.push(callback.call(context || null, key, object[key]));\n }\n }\n return result;\n },\n\n filter: function(array, callback, context) {\n if (array.filter) return array.filter(callback, context);\n var result = [];\n for (var i = 0, n = array.length; i < n; i++) {\n if (callback.call(context || null, array[i], i))\n result.push(array[i]);\n }\n return result;\n },\n\n asyncEach: function(list, iterator, callback, context) {\n var n = list.length,\n i = -1,\n calls = 0,\n looping = false;\n\n var iterate = function() {\n calls -= 1;\n i += 1;\n if (i === n) return callback && callback.call(context);\n iterator(list[i], resume);\n };\n\n var loop = function() {\n if (looping) return;\n looping = true;\n while (calls > 0) iterate();\n looping = false;\n };\n\n var resume = function() {\n calls += 1;\n loop();\n };\n resume();\n }\n};\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/util/array.js\n ** module id = 9\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar Event = {\n _registry: [],\n\n on: function(element, eventName, callback, context) {\n var wrapped = function() { callback.call(context) };\n\n if (element.addEventListener)\n element.addEventListener(eventName, wrapped, false);\n else\n element.attachEvent('on' + eventName, wrapped);\n\n this._registry.push({\n _element: element,\n _type: eventName,\n _callback: callback,\n _context: context,\n _handler: wrapped\n });\n },\n\n detach: function(element, eventName, callback, context) {\n var i = this._registry.length, register;\n while (i--) {\n register = this._registry[i];\n\n if ((element && element !== register._element) ||\n (eventName && eventName !== register._type) ||\n (callback && callback !== register._callback) ||\n (context && context !== register._context))\n continue;\n\n if (register._element.removeEventListener)\n register._element.removeEventListener(register._type, register._handler, false);\n else\n register._element.detachEvent('on' + register._type, register._handler);\n\n this._registry.splice(i,1);\n register = null;\n }\n }\n};\n\nif (window.onunload !== undefined)\n Event.on(window, 'unload', Event.detach, Event);\n\nmodule.exports = {\n Event: Event\n};\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/util/browser/event.js\n ** module id = 10\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar array = require('./array');\n\nmodule.exports = function(options, validKeys) {\n for (var key in options) {\n if (array.indexOf(validKeys, key) < 0)\n throw new Error('Unrecognized option: ' + key);\n }\n};\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/util/validate_options.js\n ** module id = 11\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar Promise = require('../util/promise');\n\nmodule.exports = {\n then: function(callback, errback) {\n var self = this;\n if (!this._promise)\n this._promise = new Promise(function(fulfill, reject) {\n self._fulfill = fulfill;\n self._reject = reject;\n });\n\n if (arguments.length === 0)\n return this._promise;\n else\n return this._promise.then(callback, errback);\n },\n\n callback: function(callback, context) {\n return this.then(function(value) { callback.call(context, value) });\n },\n\n errback: function(callback, context) {\n return this.then(null, function(reason) { callback.call(context, reason) });\n },\n\n timeout: function(seconds, message) {\n this.then();\n var self = this;\n this._timer = global.setTimeout(function() {\n self._reject(message);\n }, seconds * 1000);\n },\n\n setDeferredStatus: function(status, value) {\n if (this._timer) global.clearTimeout(this._timer);\n\n this.then();\n\n if (status === 'succeeded')\n this._fulfill(value);\n else if (status === 'failed')\n this._reject(value);\n else\n delete this._promise;\n }\n};\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/mixins/deferrable.js\n ** module id = 12\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar extend = require('../util/extend'),\n EventEmitter = require('../util/event_emitter');\n\nvar Publisher = {\n countListeners: function(eventType) {\n return this.listeners(eventType).length;\n },\n\n bind: function(eventType, listener, context) {\n var slice = Array.prototype.slice,\n handler = function() { listener.apply(context, slice.call(arguments)) };\n\n this._listeners = this._listeners || [];\n this._listeners.push([eventType, listener, context, handler]);\n return this.on(eventType, handler);\n },\n\n unbind: function(eventType, listener, context) {\n this._listeners = this._listeners || [];\n var n = this._listeners.length, tuple;\n\n while (n--) {\n tuple = this._listeners[n];\n if (tuple[0] !== eventType) continue;\n if (listener && (tuple[1] !== listener || tuple[2] !== context)) continue;\n this._listeners.splice(n, 1);\n this.removeListener(eventType, tuple[3]);\n }\n }\n};\n\nextend(Publisher, EventEmitter.prototype);\nPublisher.trigger = Publisher.emit;\n\nmodule.exports = Publisher;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/mixins/publisher.js\n ** module id = 13\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n/*\nCopyright Joyent, Inc. and other Node contributors. All rights reserved.\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n*/\n\nvar isArray = typeof Array.isArray === 'function'\n ? Array.isArray\n : function (xs) {\n return Object.prototype.toString.call(xs) === '[object Array]'\n }\n;\nfunction indexOf (xs, x) {\n if (xs.indexOf) return xs.indexOf(x);\n for (var i = 0; i < xs.length; i++) {\n if (x === xs[i]) return i;\n }\n return -1;\n}\n\nfunction EventEmitter() {}\nmodule.exports = EventEmitter;\n\nEventEmitter.prototype.emit = function(type) {\n // If there is no 'error' event listener then throw.\n if (type === 'error') {\n if (!this._events || !this._events.error ||\n (isArray(this._events.error) && !this._events.error.length))\n {\n if (arguments[1] instanceof Error) {\n throw arguments[1]; // Unhandled 'error' event\n } else {\n throw new Error(\"Uncaught, unspecified 'error' event.\");\n }\n return false;\n }\n }\n\n if (!this._events) return false;\n var handler = this._events[type];\n if (!handler) return false;\n\n if (typeof handler == 'function') {\n switch (arguments.length) {\n // fast cases\n case 1:\n handler.call(this);\n break;\n case 2:\n handler.call(this, arguments[1]);\n break;\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n // slower\n default:\n var args = Array.prototype.slice.call(arguments, 1);\n handler.apply(this, args);\n }\n return true;\n\n } else if (isArray(handler)) {\n var args = Array.prototype.slice.call(arguments, 1);\n\n var listeners = handler.slice();\n for (var i = 0, l = listeners.length; i < l; i++) {\n listeners[i].apply(this, args);\n }\n return true;\n\n } else {\n return false;\n }\n};\n\n// EventEmitter is defined in src/node_events.cc\n// EventEmitter.prototype.emit() is also defined there.\nEventEmitter.prototype.addListener = function(type, listener) {\n if ('function' !== typeof listener) {\n throw new Error('addListener only takes instances of Function');\n }\n\n if (!this._events) this._events = {};\n\n // To avoid recursion in the case that type == \"newListeners\"! Before\n // adding it to the listeners, first emit \"newListeners\".\n this.emit('newListener', type, listener);\n\n if (!this._events[type]) {\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n } else if (isArray(this._events[type])) {\n // If we've already got an array, just append.\n this._events[type].push(listener);\n } else {\n // Adding the second element, need to change to array.\n this._events[type] = [this._events[type], listener];\n }\n\n return this;\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.once = function(type, listener) {\n var self = this;\n self.on(type, function g() {\n self.removeListener(type, g);\n listener.apply(this, arguments);\n });\n\n return this;\n};\n\nEventEmitter.prototype.removeListener = function(type, listener) {\n if ('function' !== typeof listener) {\n throw new Error('removeListener only takes instances of Function');\n }\n\n // does not use listeners(), so no side effect of creating _events[type]\n if (!this._events || !this._events[type]) return this;\n\n var list = this._events[type];\n\n if (isArray(list)) {\n var i = indexOf(list, listener);\n if (i < 0) return this;\n list.splice(i, 1);\n if (list.length == 0)\n delete this._events[type];\n } else if (this._events[type] === listener) {\n delete this._events[type];\n }\n\n return this;\n};\n\nEventEmitter.prototype.removeAllListeners = function(type) {\n if (arguments.length === 0) {\n this._events = {};\n return this;\n }\n\n // does not use listeners(), so no side effect of creating _events[type]\n if (type && this._events && this._events[type]) this._events[type] = null;\n return this;\n};\n\nEventEmitter.prototype.listeners = function(type) {\n if (!this._events) this._events = {};\n if (!this._events[type]) this._events[type] = [];\n if (!isArray(this._events[type])) {\n this._events[type] = [this._events[type]];\n }\n return this._events[type];\n};\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/util/event_emitter.js\n ** module id = 14\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar Class = require('../util/class'),\n extend = require('../util/extend'),\n Publisher = require('../mixins/publisher'),\n Grammar = require('./grammar');\n\nvar Channel = Class({\n initialize: function(name) {\n this.id = this.name = name;\n },\n\n push: function(message) {\n this.trigger('message', message);\n },\n\n isUnused: function() {\n return this.countListeners('message') === 0;\n }\n});\n\nextend(Channel.prototype, Publisher);\n\nextend(Channel, {\n HANDSHAKE: '/meta/handshake',\n CONNECT: '/meta/connect',\n SUBSCRIBE: '/meta/subscribe',\n UNSUBSCRIBE: '/meta/unsubscribe',\n DISCONNECT: '/meta/disconnect',\n\n META: 'meta',\n SERVICE: 'service',\n\n expand: function(name) {\n var segments = this.parse(name),\n channels = ['/**', name];\n\n var copy = segments.slice();\n copy[copy.length - 1] = '*';\n channels.push(this.unparse(copy));\n\n for (var i = 1, n = segments.length; i < n; i++) {\n copy = segments.slice(0, i);\n copy.push('**');\n channels.push(this.unparse(copy));\n }\n\n return channels;\n },\n\n isValid: function(name) {\n return Grammar.CHANNEL_NAME.test(name) ||\n Grammar.CHANNEL_PATTERN.test(name);\n },\n\n parse: function(name) {\n if (!this.isValid(name)) return null;\n return name.split('/').slice(1);\n },\n\n unparse: function(segments) {\n return '/' + segments.join('/');\n },\n\n isMeta: function(name) {\n var segments = this.parse(name);\n return segments ? (segments[0] === this.META) : null;\n },\n\n isService: function(name) {\n var segments = this.parse(name);\n return segments ? (segments[0] === this.SERVICE) : null;\n },\n\n isSubscribable: function(name) {\n if (!this.isValid(name)) return null;\n return !this.isMeta(name) && !this.isService(name);\n },\n\n Set: Class({\n initialize: function() {\n this._channels = {};\n },\n\n getKeys: function() {\n var keys = [];\n for (var key in this._channels) keys.push(key);\n return keys;\n },\n\n remove: function(name) {\n delete this._channels[name];\n },\n\n hasSubscription: function(name) {\n return this._channels.hasOwnProperty(name);\n },\n\n subscribe: function(names, callback, context) {\n var name;\n for (var i = 0, n = names.length; i < n; i++) {\n name = names[i];\n var channel = this._channels[name] = this._channels[name] || new Channel(name);\n if (callback) channel.bind('message', callback, context);\n }\n },\n\n unsubscribe: function(name, callback, context) {\n var channel = this._channels[name];\n if (!channel) return false;\n channel.unbind('message', callback, context);\n\n if (channel.isUnused()) {\n this.remove(name);\n return true;\n } else {\n return false;\n }\n },\n\n distributeMessage: function(message) {\n var channels = Channel.expand(message.channel);\n\n for (var i = 0, n = channels.length; i < n; i++) {\n var channel = this._channels[channels[i]];\n if (channel) channel.trigger('message', message.data);\n }\n }\n })\n});\n\nmodule.exports = Channel;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/protocol/channel.js\n ** module id = 15\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nmodule.exports = {\n CHANNEL_NAME: /^\\/(((([a-z]|[A-Z])|[0-9])|(\\-|\\_|\\!|\\~|\\(|\\)|\\$|\\@)))+(\\/(((([a-z]|[A-Z])|[0-9])|(\\-|\\_|\\!|\\~|\\(|\\)|\\$|\\@)))+)*$/,\n CHANNEL_PATTERN: /^(\\/(((([a-z]|[A-Z])|[0-9])|(\\-|\\_|\\!|\\~|\\(|\\)|\\$|\\@)))+)*\\/\\*{1,2}$/,\n ERROR: /^([0-9][0-9][0-9]:(((([a-z]|[A-Z])|[0-9])|(\\-|\\_|\\!|\\~|\\(|\\)|\\$|\\@)| |\\/|\\*|\\.))*(,(((([a-z]|[A-Z])|[0-9])|(\\-|\\_|\\!|\\~|\\(|\\)|\\$|\\@)| |\\/|\\*|\\.))*)*:(((([a-z]|[A-Z])|[0-9])|(\\-|\\_|\\!|\\~|\\(|\\)|\\$|\\@)| |\\/|\\*|\\.))*|[0-9][0-9][0-9]::(((([a-z]|[A-Z])|[0-9])|(\\-|\\_|\\!|\\~|\\(|\\)|\\$|\\@)| |\\/|\\*|\\.))*)$/,\n VERSION: /^([0-9])+(\\.(([a-z]|[A-Z])|[0-9])(((([a-z]|[A-Z])|[0-9])|\\-|\\_))*)*$/\n};\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/protocol/grammar.js\n ** module id = 16\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar Class = require('../util/class'),\n URI = require('../util/uri'),\n cookies = require('../util/cookies'),\n extend = require('../util/extend'),\n Logging = require('../mixins/logging'),\n Publisher = require('../mixins/publisher'),\n Transport = require('../transport'),\n Scheduler = require('./scheduler');\n\nvar Dispatcher = Class({ className: 'Dispatcher',\n MAX_REQUEST_SIZE: 2048,\n DEFAULT_RETRY: 5,\n\n UP: 1,\n DOWN: 2,\n\n initialize: function(client, endpoint, options) {\n this._client = client;\n this.endpoint = URI.parse(endpoint);\n this._alternates = options.endpoints || {};\n\n this.cookies = cookies.CookieJar && new cookies.CookieJar();\n this._disabled = [];\n this._envelopes = {};\n this.headers = {};\n this.retry = options.retry || this.DEFAULT_RETRY;\n this._scheduler = options.scheduler || Scheduler;\n this._state = 0;\n this.transports = {};\n this.wsExtensions = [];\n\n this.proxy = options.proxy || {};\n if (typeof this._proxy === 'string') this._proxy = {origin: this._proxy};\n\n var exts = options.websocketExtensions;\n if (exts) {\n exts = [].concat(exts);\n for (var i = 0, n = exts.length; i < n; i++)\n this.addWebsocketExtension(exts[i]);\n }\n\n this.tls = options.tls || {};\n this.tls.ca = this.tls.ca || options.ca;\n\n for (var type in this._alternates)\n this._alternates[type] = URI.parse(this._alternates[type]);\n\n this.maxRequestSize = this.MAX_REQUEST_SIZE;\n },\n\n endpointFor: function(connectionType) {\n return this._alternates[connectionType] || this.endpoint;\n },\n\n addWebsocketExtension: function(extension) {\n this.wsExtensions.push(extension);\n },\n\n disable: function(feature) {\n this._disabled.push(feature);\n },\n\n setHeader: function(name, value) {\n this.headers[name] = value;\n },\n\n close: function() {\n var transport = this._transport;\n delete this._transport;\n if (transport) transport.close();\n },\n\n getConnectionTypes: function() {\n return Transport.getConnectionTypes();\n },\n\n selectTransport: function(transportTypes) {\n Transport.get(this, transportTypes, this._disabled, function(transport) {\n this.debug('Selected ? transport for ?', transport.connectionType, URI.stringify(transport.endpoint));\n\n if (transport === this._transport) return;\n if (this._transport) this._transport.close();\n\n this._transport = transport;\n this.connectionType = transport.connectionType;\n }, this);\n },\n\n sendMessage: function(message, timeout, options) {\n options = options || {};\n\n var id = message.id,\n attempts = options.attempts,\n deadline = options.deadline && new Date().getTime() + (options.deadline * 1000),\n envelope = this._envelopes[id],\n scheduler;\n\n if (!envelope) {\n scheduler = new this._scheduler(message, {timeout: timeout, interval: this.retry, attempts: attempts, deadline: deadline});\n envelope = this._envelopes[id] = {message: message, scheduler: scheduler};\n }\n\n this._sendEnvelope(envelope);\n },\n\n _sendEnvelope: function(envelope) {\n if (!this._transport) return;\n if (envelope.request || envelope.timer) return;\n\n var message = envelope.message,\n scheduler = envelope.scheduler,\n self = this;\n\n if (!scheduler.isDeliverable()) {\n scheduler.abort();\n delete this._envelopes[message.id];\n return;\n }\n\n envelope.timer = global.setTimeout(function() {\n self.handleError(message);\n }, scheduler.getTimeout() * 1000);\n\n scheduler.send();\n envelope.request = this._transport.sendMessage(message);\n },\n\n handleResponse: function(reply) {\n var envelope = this._envelopes[reply.id];\n\n if (reply.successful !== undefined && envelope) {\n envelope.scheduler.succeed();\n delete this._envelopes[reply.id];\n global.clearTimeout(envelope.timer);\n }\n\n this.trigger('message', reply);\n\n if (this._state === this.UP) return;\n this._state = this.UP;\n this._client.trigger('transport:up');\n },\n\n handleError: function(message, immediate) {\n var envelope = this._envelopes[message.id],\n request = envelope && envelope.request,\n self = this;\n\n if (!request) return;\n\n request.then(function(req) {\n if (req && req.abort) req.abort();\n });\n\n var scheduler = envelope.scheduler;\n scheduler.fail();\n\n global.clearTimeout(envelope.timer);\n envelope.request = envelope.timer = null;\n\n if (immediate) {\n this._sendEnvelope(envelope);\n } else {\n envelope.timer = global.setTimeout(function() {\n envelope.timer = null;\n self._sendEnvelope(envelope);\n }, scheduler.getInterval() * 1000);\n }\n\n if (this._state === this.DOWN) return;\n this._state = this.DOWN;\n this._client.trigger('transport:down');\n }\n});\n\nDispatcher.create = function(client, endpoint, options) {\n return new Dispatcher(client, endpoint, options);\n};\n\nextend(Dispatcher.prototype, Publisher);\nextend(Dispatcher.prototype, Logging);\n\nmodule.exports = Dispatcher;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/protocol/dispatcher.js\n ** module id = 17\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nmodule.exports = {};\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/util/cookies/browser_cookies.js\n ** module id = 18\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar Transport = require('./transport');\n\nTransport.register('websocket', require('./web_socket'));\nTransport.register('eventsource', require('./event_source'));\nTransport.register('long-polling', require('./xhr'));\nTransport.register('cross-origin-long-polling', require('./cors'));\nTransport.register('callback-polling', require('./jsonp'));\n\nmodule.exports = Transport;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/transport/browser_transports.js\n ** module id = 19\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar Class = require('../util/class'),\n Cookie = require('../util/cookies').Cookie,\n Promise = require('../util/promise'),\n URI = require('../util/uri'),\n array = require('../util/array'),\n extend = require('../util/extend'),\n Logging = require('../mixins/logging'),\n Timeouts = require('../mixins/timeouts'),\n Channel = require('../protocol/channel');\n\nvar Transport = extend(Class({ className: 'Transport',\n DEFAULT_PORTS: {'http:': 80, 'https:': 443, 'ws:': 80, 'wss:': 443},\n SECURE_PROTOCOLS: ['https:', 'wss:'],\n MAX_DELAY: 0,\n\n batching: true,\n\n initialize: function(dispatcher, endpoint) {\n this._dispatcher = dispatcher;\n this.endpoint = endpoint;\n this._outbox = [];\n this._proxy = extend({}, this._dispatcher.proxy);\n\n if (!this._proxy.origin && typeof process !== 'undefined') {\n this._proxy.origin = array.indexOf(this.SECURE_PROTOCOLS, this.endpoint.protocol) >= 0\n ? (process.env.HTTPS_PROXY || process.env.https_proxy)\n : (process.env.HTTP_PROXY || process.env.http_proxy);\n }\n },\n\n close: function() {},\n\n encode: function(messages) {\n return '';\n },\n\n sendMessage: function(message) {\n this.debug('Client ? sending message to ?: ?',\n this._dispatcher.clientId, URI.stringify(this.endpoint), message);\n\n if (!this.batching) return Promise.fulfilled(this.request([message]));\n\n this._outbox.push(message);\n this._flushLargeBatch();\n\n if (message.channel === Channel.HANDSHAKE)\n return this._publish(0.01);\n\n if (message.channel === Channel.CONNECT)\n this._connectMessage = message;\n\n return this._publish(this.MAX_DELAY);\n },\n\n _publish: function(delay) {\n this._promise = this._promise || new Promise();\n\n this.addTimeout('publish', delay, function() {\n this._flush();\n delete this._promise;\n }, this);\n\n return this._promise;\n },\n\n _flush: function() {\n this.removeTimeout('publish');\n\n if (this._outbox.length > 1 && this._connectMessage)\n this._connectMessage.advice = {timeout: 0};\n\n Promise.fulfill(this._promise, this.request(this._outbox));\n\n this._connectMessage = null;\n this._outbox = [];\n },\n\n _flushLargeBatch: function() {\n var string = this.encode(this._outbox);\n if (string.length < this._dispatcher.maxRequestSize) return;\n var last = this._outbox.pop();\n\n this._promise = this._promise || new Promise();\n this._flush();\n\n if (last) this._outbox.push(last);\n },\n\n _receive: function(replies) {\n if (!replies) return;\n replies = [].concat(replies);\n\n this.debug('Client ? received from ? via ?: ?',\n this._dispatcher.clientId, URI.stringify(this.endpoint), this.connectionType, replies);\n\n for (var i = 0, n = replies.length; i < n; i++)\n this._dispatcher.handleResponse(replies[i]);\n },\n\n _handleError: function(messages, immediate) {\n messages = [].concat(messages);\n\n this.debug('Client ? failed to send to ? via ?: ?',\n this._dispatcher.clientId, URI.stringify(this.endpoint), this.connectionType, messages);\n\n for (var i = 0, n = messages.length; i < n; i++)\n this._dispatcher.handleError(messages[i]);\n },\n\n _getCookies: function() {\n var cookies = this._dispatcher.cookies,\n url = URI.stringify(this.endpoint);\n\n if (!cookies) return '';\n\n return array.map(cookies.getCookiesSync(url), function(cookie) {\n return cookie.cookieString();\n }).join('; ');\n },\n\n _storeCookies: function(setCookie) {\n var cookies = this._dispatcher.cookies,\n url = URI.stringify(this.endpoint),\n cookie;\n\n if (!setCookie || !cookies) return;\n setCookie = [].concat(setCookie);\n\n for (var i = 0, n = setCookie.length; i < n; i++) {\n cookie = Cookie.parse(setCookie[i]);\n cookies.setCookieSync(cookie, url);\n }\n }\n\n}), {\n get: function(dispatcher, allowed, disabled, callback, context) {\n var endpoint = dispatcher.endpoint;\n\n array.asyncEach(this._transports, function(pair, resume) {\n var connType = pair[0], klass = pair[1],\n connEndpoint = dispatcher.endpointFor(connType);\n\n if (array.indexOf(disabled, connType) >= 0)\n return resume();\n\n if (array.indexOf(allowed, connType) < 0) {\n klass.isUsable(dispatcher, connEndpoint, function() {});\n return resume();\n }\n\n klass.isUsable(dispatcher, connEndpoint, function(isUsable) {\n if (!isUsable) return resume();\n var transport = klass.hasOwnProperty('create') ? klass.create(dispatcher, connEndpoint) : new klass(dispatcher, connEndpoint);\n callback.call(context, transport);\n });\n }, function() {\n throw new Error('Could not find a usable connection type for ' + URI.stringify(endpoint));\n });\n },\n\n register: function(type, klass) {\n this._transports.push([type, klass]);\n klass.prototype.connectionType = type;\n },\n\n getConnectionTypes: function() {\n return array.map(this._transports, function(t) { return t[0] });\n },\n\n _transports: []\n});\n\nextend(Transport.prototype, Logging);\nextend(Transport.prototype, Timeouts);\n\nmodule.exports = Transport;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/transport/transport.js\n ** module id = 20\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nmodule.exports = {\n addTimeout: function(name, delay, callback, context) {\n this._timeouts = this._timeouts || {};\n if (this._timeouts.hasOwnProperty(name)) return;\n var self = this;\n this._timeouts[name] = global.setTimeout(function() {\n delete self._timeouts[name];\n callback.call(context);\n }, 1000 * delay);\n },\n\n removeTimeout: function(name) {\n this._timeouts = this._timeouts || {};\n var timeout = this._timeouts[name];\n if (!timeout) return;\n global.clearTimeout(timeout);\n delete this._timeouts[name];\n },\n\n removeAllTimeouts: function() {\n this._timeouts = this._timeouts || {};\n for (var name in this._timeouts) this.removeTimeout(name);\n }\n};\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/mixins/timeouts.js\n ** module id = 21\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar Class = require('../util/class'),\n Promise = require('../util/promise'),\n Set = require('../util/set'),\n URI = require('../util/uri'),\n browser = require('../util/browser'),\n copyObject = require('../util/copy_object'),\n extend = require('../util/extend'),\n toJSON = require('../util/to_json'),\n ws = require('../util/websocket'),\n Deferrable = require('../mixins/deferrable'),\n Transport = require('./transport');\n\nvar WebSocket = extend(Class(Transport, {\n UNCONNECTED: 1,\n CONNECTING: 2,\n CONNECTED: 3,\n\n batching: false,\n\n isUsable: function(callback, context) {\n this.callback(function() { callback.call(context, true) });\n this.errback(function() { callback.call(context, false) });\n this.connect();\n },\n\n request: function(messages) {\n this._pending = this._pending || new Set();\n for (var i = 0, n = messages.length; i < n; i++) this._pending.add(messages[i]);\n\n var promise = new Promise();\n\n this.callback(function(socket) {\n if (!socket || socket.readyState !== 1) return;\n socket.send(toJSON(messages));\n Promise.fulfill(promise, socket);\n }, this);\n\n this.connect();\n\n return {\n abort: function() { promise.then(function(ws) { ws.close() }) }\n };\n },\n\n connect: function() {\n if (WebSocket._unloaded) return;\n\n this._state = this._state || this.UNCONNECTED;\n if (this._state !== this.UNCONNECTED) return;\n this._state = this.CONNECTING;\n\n var socket = this._createSocket();\n if (!socket) return this.setDeferredStatus('failed');\n\n var self = this;\n\n socket.onopen = function() {\n if (socket.headers) self._storeCookies(socket.headers['set-cookie']);\n self._socket = socket;\n self._state = self.CONNECTED;\n self._everConnected = true;\n self._ping();\n self.setDeferredStatus('succeeded', socket);\n };\n\n var closed = false;\n socket.onclose = socket.onerror = function() {\n if (closed) return;\n closed = true;\n\n var wasConnected = (self._state === self.CONNECTED);\n socket.onopen = socket.onclose = socket.onerror = socket.onmessage = null;\n\n delete self._socket;\n self._state = self.UNCONNECTED;\n self.removeTimeout('ping');\n\n var pending = self._pending ? self._pending.toArray() : [];\n delete self._pending;\n\n if (wasConnected || self._everConnected) {\n self.setDeferredStatus('unknown');\n self._handleError(pending, wasConnected);\n } else {\n self.setDeferredStatus('failed');\n }\n };\n\n socket.onmessage = function(event) {\n var replies = JSON.parse(event.data);\n if (!replies) return;\n\n replies = [].concat(replies);\n\n for (var i = 0, n = replies.length; i < n; i++) {\n if (replies[i].successful === undefined) continue;\n self._pending.remove(replies[i]);\n }\n self._receive(replies);\n };\n },\n\n close: function() {\n if (!this._socket) return;\n this._socket.close();\n },\n\n _createSocket: function() {\n var url = WebSocket.getSocketUrl(this.endpoint),\n headers = this._dispatcher.headers,\n extensions = this._dispatcher.wsExtensions,\n cookie = this._getCookies(),\n tls = this._dispatcher.tls,\n options = {extensions: extensions, headers: headers, proxy: this._proxy, tls: tls};\n\n if (cookie !== '') options.headers['Cookie'] = cookie;\n\n return ws.create(url, [], options);\n },\n\n _ping: function() {\n if (!this._socket || this._socket.readyState !== 1) return;\n this._socket.send('[]');\n this.addTimeout('ping', this._dispatcher.timeout / 2, this._ping, this);\n }\n\n}), {\n PROTOCOLS: {\n 'http:': 'ws:',\n 'https:': 'wss:'\n },\n\n create: function(dispatcher, endpoint) {\n var sockets = dispatcher.transports.websocket = dispatcher.transports.websocket || {};\n sockets[endpoint.href] = sockets[endpoint.href] || new this(dispatcher, endpoint);\n return sockets[endpoint.href];\n },\n\n getSocketUrl: function(endpoint) {\n endpoint = copyObject(endpoint);\n endpoint.protocol = this.PROTOCOLS[endpoint.protocol];\n return URI.stringify(endpoint);\n },\n\n isUsable: function(dispatcher, endpoint, callback, context) {\n this.create(dispatcher, endpoint).isUsable(callback, context);\n }\n});\n\nextend(WebSocket.prototype, Deferrable);\n\nif (browser.Event && global.onbeforeunload !== undefined)\n browser.Event.on(global, 'beforeunload', function() { WebSocket._unloaded = true });\n\nmodule.exports = WebSocket;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/transport/web_socket.js\n ** module id = 22\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar Class = require('./class');\n\nmodule.exports = Class({\n initialize: function() {\n this._index = {};\n },\n\n add: function(item) {\n var key = (item.id !== undefined) ? item.id : item;\n if (this._index.hasOwnProperty(key)) return false;\n this._index[key] = item;\n return true;\n },\n\n forEach: function(block, context) {\n for (var key in this._index) {\n if (this._index.hasOwnProperty(key))\n block.call(context, this._index[key]);\n }\n },\n\n isEmpty: function() {\n for (var key in this._index) {\n if (this._index.hasOwnProperty(key)) return false;\n }\n return true;\n },\n\n member: function(item) {\n for (var key in this._index) {\n if (this._index[key] === item) return true;\n }\n return false;\n },\n\n remove: function(item) {\n var key = (item.id !== undefined) ? item.id : item;\n var removed = this._index[key];\n delete this._index[key];\n return removed;\n },\n\n toArray: function() {\n var array = [];\n this.forEach(function(item) { array.push(item) });\n return array;\n }\n});\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/util/set.js\n ** module id = 23\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar copyObject = function(object) {\n var clone, i, key;\n if (object instanceof Array) {\n clone = [];\n i = object.length;\n while (i--) clone[i] = copyObject(object[i]);\n return clone;\n } else if (typeof object === 'object') {\n clone = (object === null) ? null : {};\n for (key in object) clone[key] = copyObject(object[key]);\n return clone;\n } else {\n return object;\n }\n};\n\nmodule.exports = copyObject;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/util/copy_object.js\n ** module id = 24\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar WS = window.MozWebSocket || window.WebSocket;\n\nmodule.exports = {\n create: function(url, protocols, options) {\n return new WS(url);\n }\n};\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/util/websocket/browser_websocket.js\n ** module id = 25\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar Class = require('../util/class'),\n URI = require('../util/uri'),\n copyObject = require('../util/copy_object'),\n extend = require('../util/extend'),\n Deferrable = require('../mixins/deferrable'),\n Transport = require('./transport'),\n XHR = require('./xhr');\n\nvar EventSource = extend(Class(Transport, {\n initialize: function(dispatcher, endpoint) {\n Transport.prototype.initialize.call(this, dispatcher, endpoint);\n if (!window.EventSource) return this.setDeferredStatus('failed');\n\n this._xhr = new XHR(dispatcher, endpoint);\n\n endpoint = copyObject(endpoint);\n endpoint.pathname += '/' + dispatcher.clientId;\n\n var socket = new EventSource(URI.stringify(endpoint)),\n self = this;\n\n socket.onopen = function() {\n self._everConnected = true;\n self.setDeferredStatus('succeeded');\n };\n\n socket.onerror = function() {\n if (self._everConnected) {\n self._handleError([]);\n } else {\n self.setDeferredStatus('failed');\n socket.close();\n }\n };\n\n socket.onmessage = function(event) {\n self._receive(JSON.parse(event.data));\n };\n\n this._socket = socket;\n },\n\n close: function() {\n if (!this._socket) return;\n this._socket.onopen = this._socket.onerror = this._socket.onmessage = null;\n this._socket.close();\n delete this._socket;\n },\n\n isUsable: function(callback, context) {\n this.callback(function() { callback.call(context, true) });\n this.errback(function() { callback.call(context, false) });\n },\n\n encode: function(messages) {\n return this._xhr.encode(messages);\n },\n\n request: function(messages) {\n return this._xhr.request(messages);\n }\n\n}), {\n isUsable: function(dispatcher, endpoint, callback, context) {\n var id = dispatcher.clientId;\n if (!id) return callback.call(context, false);\n\n XHR.isUsable(dispatcher, endpoint, function(usable) {\n if (!usable) return callback.call(context, false);\n this.create(dispatcher, endpoint).isUsable(callback, context);\n }, this);\n },\n\n create: function(dispatcher, endpoint) {\n var sockets = dispatcher.transports.eventsource = dispatcher.transports.eventsource || {},\n id = dispatcher.clientId;\n\n var url = copyObject(endpoint);\n url.pathname += '/' + (id || '');\n url = URI.stringify(url);\n\n sockets[url] = sockets[url] || new this(dispatcher, endpoint);\n return sockets[url];\n }\n});\n\nextend(EventSource.prototype, Deferrable);\n\nmodule.exports = EventSource;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/transport/event_source.js\n ** module id = 26\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar Class = require('../util/class'),\n URI = require('../util/uri'),\n browser = require('../util/browser'),\n extend = require('../util/extend'),\n toJSON = require('../util/to_json'),\n Transport = require('./transport');\n\nvar XHR = extend(Class(Transport, {\n encode: function(messages) {\n return toJSON(messages);\n },\n\n request: function(messages) {\n var href = this.endpoint.href,\n xhr = window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest(),\n self = this;\n\n xhr.open('POST', href, true);\n xhr.setRequestHeader('Content-Type', 'application/json');\n xhr.setRequestHeader('Pragma', 'no-cache');\n xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n\n var headers = this._dispatcher.headers;\n for (var key in headers) {\n if (!headers.hasOwnProperty(key)) continue;\n xhr.setRequestHeader(key, headers[key]);\n }\n\n var abort = function() { xhr.abort() };\n if (window.onbeforeunload !== undefined)\n browser.Event.on(window, 'beforeunload', abort);\n\n xhr.onreadystatechange = function() {\n if (!xhr || xhr.readyState !== 4) return;\n\n var replies = null,\n status = xhr.status,\n text = xhr.responseText,\n successful = (status >= 200 && status < 300) || status === 304 || status === 1223;\n\n if (window.onbeforeunload !== undefined)\n browser.Event.detach(window, 'beforeunload', abort);\n\n xhr.onreadystatechange = function() {};\n xhr = null;\n\n if (!successful) return self._handleError(messages);\n\n try {\n replies = JSON.parse(text);\n } catch (e) {}\n\n if (replies)\n self._receive(replies);\n else\n self._handleError(messages);\n };\n\n xhr.send(this.encode(messages));\n return xhr;\n }\n}), {\n isUsable: function(dispatcher, endpoint, callback, context) {\n callback.call(context, URI.isSameOrigin(endpoint));\n }\n});\n\nmodule.exports = XHR;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/transport/xhr.js\n ** module id = 27\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar Class = require('../util/class'),\n Set = require('../util/set'),\n URI = require('../util/uri'),\n extend = require('../util/extend'),\n toJSON = require('../util/to_json'),\n Transport = require('./transport');\n\nvar CORS = extend(Class(Transport, {\n encode: function(messages) {\n return 'message=' + encodeURIComponent(toJSON(messages));\n },\n\n request: function(messages) {\n var xhrClass = window.XDomainRequest ? XDomainRequest : XMLHttpRequest,\n xhr = new xhrClass(),\n id = ++CORS._id,\n headers = this._dispatcher.headers,\n self = this,\n key;\n\n xhr.open('POST', URI.stringify(this.endpoint), true);\n\n if (xhr.setRequestHeader) {\n xhr.setRequestHeader('Pragma', 'no-cache');\n for (key in headers) {\n if (!headers.hasOwnProperty(key)) continue;\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n\n var cleanUp = function() {\n if (!xhr) return false;\n CORS._pending.remove(id);\n xhr.onload = xhr.onerror = xhr.ontimeout = xhr.onprogress = null;\n xhr = null;\n };\n\n xhr.onload = function() {\n var replies = null;\n try {\n replies = JSON.parse(xhr.responseText);\n } catch (e) {}\n\n cleanUp();\n\n if (replies)\n self._receive(replies);\n else\n self._handleError(messages);\n };\n\n xhr.onerror = xhr.ontimeout = function() {\n cleanUp();\n self._handleError(messages);\n };\n\n xhr.onprogress = function() {};\n\n if (xhrClass === window.XDomainRequest)\n CORS._pending.add({id: id, xhr: xhr});\n\n xhr.send(this.encode(messages));\n return xhr;\n }\n}), {\n _id: 0,\n _pending: new Set(),\n\n isUsable: function(dispatcher, endpoint, callback, context) {\n if (URI.isSameOrigin(endpoint))\n return callback.call(context, false);\n\n if (window.XDomainRequest)\n return callback.call(context, endpoint.protocol === location.protocol);\n\n if (window.XMLHttpRequest) {\n var xhr = new XMLHttpRequest();\n return callback.call(context, xhr.withCredentials !== undefined);\n }\n return callback.call(context, false);\n }\n});\n\nmodule.exports = CORS;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/transport/cors.js\n ** module id = 28\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar Class = require('../util/class'),\n URI = require('../util/uri'),\n copyObject = require('../util/copy_object'),\n extend = require('../util/extend'),\n toJSON = require('../util/to_json'),\n Transport = require('./transport');\n\nvar JSONP = extend(Class(Transport, {\n encode: function(messages) {\n var url = copyObject(this.endpoint);\n url.query.message = toJSON(messages);\n url.query.jsonp = '__jsonp' + JSONP._cbCount + '__';\n return URI.stringify(url);\n },\n\n request: function(messages) {\n var head = document.getElementsByTagName('head')[0],\n script = document.createElement('script'),\n callbackName = JSONP.getCallbackName(),\n endpoint = copyObject(this.endpoint),\n self = this;\n\n endpoint.query.message = toJSON(messages);\n endpoint.query.jsonp = callbackName;\n\n var cleanup = function() {\n if (!window[callbackName]) return false;\n window[callbackName] = undefined;\n try { delete window[callbackName] } catch (e) {}\n script.parentNode.removeChild(script);\n };\n\n window[callbackName] = function(replies) {\n cleanup();\n self._receive(replies);\n };\n\n script.type = 'text/javascript';\n script.src = URI.stringify(endpoint);\n head.appendChild(script);\n\n script.onerror = function() {\n cleanup();\n self._handleError(messages);\n };\n\n return {abort: cleanup};\n }\n}), {\n _cbCount: 0,\n\n getCallbackName: function() {\n this._cbCount += 1;\n return '__jsonp' + this._cbCount + '__';\n },\n\n isUsable: function(dispatcher, endpoint, callback, context) {\n callback.call(context, true);\n }\n});\n\nmodule.exports = JSONP;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/transport/jsonp.js\n ** module id = 29\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar extend = require('../util/extend');\n\nvar Scheduler = function(message, options) {\n this.message = message;\n this.options = options;\n this.attempts = 0;\n};\n\nextend(Scheduler.prototype, {\n getTimeout: function() {\n return this.options.timeout;\n },\n\n getInterval: function() {\n return this.options.interval;\n },\n\n isDeliverable: function() {\n var attempts = this.options.attempts,\n made = this.attempts,\n deadline = this.options.deadline,\n now = new Date().getTime();\n\n if (attempts !== undefined && made >= attempts)\n return false;\n\n if (deadline !== undefined && now > deadline)\n return false;\n\n return true;\n },\n\n send: function() {\n this.attempts += 1;\n },\n\n succeed: function() {},\n\n fail: function() {},\n\n abort: function() {}\n});\n\nmodule.exports = Scheduler;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/protocol/scheduler.js\n ** module id = 30\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar Class = require('../util/class'),\n Grammar = require('./grammar');\n\nvar Error = Class({\n initialize: function(code, params, message) {\n this.code = code;\n this.params = Array.prototype.slice.call(params);\n this.message = message;\n },\n\n toString: function() {\n return this.code + ':' +\n this.params.join(',') + ':' +\n this.message;\n }\n});\n\nError.parse = function(message) {\n message = message || '';\n if (!Grammar.ERROR.test(message)) return new Error(null, [], message);\n\n var parts = message.split(':'),\n code = parseInt(parts[0]),\n params = parts[1].split(','),\n message = parts[2];\n\n return new Error(code, params, message);\n};\n\n// http://code.google.com/p/cometd/wiki/BayeuxCodes\nvar errors = {\n versionMismatch: [300, 'Version mismatch'],\n conntypeMismatch: [301, 'Connection types not supported'],\n extMismatch: [302, 'Extension mismatch'],\n badRequest: [400, 'Bad request'],\n clientUnknown: [401, 'Unknown client'],\n parameterMissing: [402, 'Missing required parameter'],\n channelForbidden: [403, 'Forbidden channel'],\n channelUnknown: [404, 'Unknown channel'],\n channelInvalid: [405, 'Invalid channel'],\n extUnknown: [406, 'Unknown extension'],\n publishFailed: [407, 'Failed to publish'],\n serverError: [500, 'Internal server error']\n};\n\nfor (var name in errors)\n (function(name) {\n Error[name] = function() {\n return new Error(errors[name][0], arguments, errors[name][1]).toString();\n };\n })(name);\n\nmodule.exports = Error;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/protocol/error.js\n ** module id = 31\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar extend = require('../util/extend'),\n Logging = require('../mixins/logging');\n\nvar Extensible = {\n addExtension: function(extension) {\n this._extensions = this._extensions || [];\n this._extensions.push(extension);\n if (extension.added) extension.added(this);\n },\n\n removeExtension: function(extension) {\n if (!this._extensions) return;\n var i = this._extensions.length;\n while (i--) {\n if (this._extensions[i] !== extension) continue;\n this._extensions.splice(i,1);\n if (extension.removed) extension.removed(this);\n }\n },\n\n pipeThroughExtensions: function(stage, message, request, callback, context) {\n this.debug('Passing through ? extensions: ?', stage, message);\n\n if (!this._extensions) return callback.call(context, message);\n var extensions = this._extensions.slice();\n\n var pipe = function(message) {\n if (!message) return callback.call(context, message);\n\n var extension = extensions.shift();\n if (!extension) return callback.call(context, message);\n\n var fn = extension[stage];\n if (!fn) return pipe(message);\n\n if (fn.length >= 3) extension[stage](message, request, pipe);\n else extension[stage](message, pipe);\n };\n pipe(message);\n }\n};\n\nextend(Extensible, Logging);\n\nmodule.exports = Extensible;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/protocol/extensible.js\n ** module id = 32\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar Class = require('../util/class'),\n Deferrable = require('../mixins/deferrable');\n\nmodule.exports = Class(Deferrable);\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/protocol/publication.js\n ** module id = 33\n ** module chunks = 0\n **/","/*** IMPORTS FROM imports-loader ***/\nvar define = false;\n\n'use strict';\n\nvar Class = require('../util/class'),\n extend = require('../util/extend'),\n Deferrable = require('../mixins/deferrable');\n\nvar Subscription = Class({\n initialize: function(client, channels, callback, context) {\n this._client = client;\n this._channels = channels;\n this._callback = callback;\n this._context = context;\n this._cancelled = false;\n },\n\n cancel: function() {\n if (this._cancelled) return;\n this._client.unsubscribe(this._channels, this._callback, this._context);\n this._cancelled = true;\n },\n\n unsubscribe: function() {\n this.cancel();\n }\n});\n\nextend(Subscription.prototype, Deferrable);\n\nmodule.exports = Subscription;\n\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./javascript/protocol/subscription.js\n ** module id = 34\n ** module chunks = 0\n **/"]}
@@ -1,2808 +0,0 @@
1
- var Faye =
2
- /******/ (function(modules) { // webpackBootstrap
3
- /******/ // The module cache
4
- /******/ var installedModules = {};
5
- /******/
6
- /******/ // The require function
7
- /******/ function __webpack_require__(moduleId) {
8
- /******/
9
- /******/ // Check if module is in cache
10
- /******/ if(installedModules[moduleId])
11
- /******/ return installedModules[moduleId].exports;
12
- /******/
13
- /******/ // Create a new module (and put it into the cache)
14
- /******/ var module = installedModules[moduleId] = {
15
- /******/ exports: {},
16
- /******/ id: moduleId,
17
- /******/ loaded: false
18
- /******/ };
19
- /******/
20
- /******/ // Execute the module function
21
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
22
- /******/
23
- /******/ // Flag the module as loaded
24
- /******/ module.loaded = true;
25
- /******/
26
- /******/ // Return the exports of the module
27
- /******/ return module.exports;
28
- /******/ }
29
- /******/
30
- /******/
31
- /******/ // expose the modules object (__webpack_modules__)
32
- /******/ __webpack_require__.m = modules;
33
- /******/
34
- /******/ // expose the module cache
35
- /******/ __webpack_require__.c = installedModules;
36
- /******/
37
- /******/ // __webpack_public_path__
38
- /******/ __webpack_require__.p = "";
39
- /******/
40
- /******/ // Load entry module and return exports
41
- /******/ return __webpack_require__(0);
42
- /******/ })
43
- /************************************************************************/
44
- /******/ ([
45
- /* 0 */
46
- /***/ function(module, exports, __webpack_require__) {
47
-
48
- /*** IMPORTS FROM imports-loader ***/
49
- var define = false;
50
-
51
- 'use strict';
52
-
53
- var constants = __webpack_require__(1),
54
- Logging = __webpack_require__(2);
55
-
56
- var Faye = {
57
- VERSION: constants.VERSION,
58
-
59
- Client: __webpack_require__(4),
60
- Scheduler: __webpack_require__(30)
61
- };
62
-
63
- Logging.wrapper = Faye;
64
-
65
- module.exports = Faye;
66
-
67
-
68
-
69
- /***/ },
70
- /* 1 */
71
- /***/ function(module, exports) {
72
-
73
- /*** IMPORTS FROM imports-loader ***/
74
- var define = false;
75
-
76
- module.exports = {
77
- VERSION: '1.1.2',
78
-
79
- BAYEUX_VERSION: '1.0',
80
- ID_LENGTH: 160,
81
- JSONP_CALLBACK: 'jsonpcallback',
82
- CONNECTION_TYPES: ['long-polling', 'cross-origin-long-polling', 'callback-polling', 'websocket', 'eventsource', 'in-process'],
83
-
84
- MANDATORY_CONNECTION_TYPES: ['long-polling', 'callback-polling', 'in-process']
85
- };
86
-
87
-
88
-
89
- /***/ },
90
- /* 2 */
91
- /***/ function(module, exports, __webpack_require__) {
92
-
93
- /*** IMPORTS FROM imports-loader ***/
94
- var define = false;
95
-
96
- 'use strict';
97
-
98
- var toJSON = __webpack_require__(3);
99
-
100
- var Logging = {
101
- LOG_LEVELS: {
102
- fatal: 4,
103
- error: 3,
104
- warn: 2,
105
- info: 1,
106
- debug: 0
107
- },
108
-
109
- writeLog: function(messageArgs, level) {
110
- var logger = Logging.logger || (Logging.wrapper || Logging).logger;
111
- if (!logger) return;
112
-
113
- var args = Array.prototype.slice.apply(messageArgs),
114
- banner = '[Faye',
115
- klass = this.className,
116
-
117
- message = args.shift().replace(/\?/g, function() {
118
- try {
119
- return toJSON(args.shift());
120
- } catch (e) {
121
- return '[Object]';
122
- }
123
- });
124
-
125
- if (klass) banner += '.' + klass;
126
- banner += '] ';
127
-
128
- if (typeof logger[level] === 'function')
129
- logger[level](banner + message);
130
- else if (typeof logger === 'function')
131
- logger(banner + message);
132
- }
133
- };
134
-
135
- for (var key in Logging.LOG_LEVELS)
136
- (function(level) {
137
- Logging[level] = function() {
138
- this.writeLog(arguments, level);
139
- };
140
- })(key);
141
-
142
- module.exports = Logging;
143
-
144
-
145
-
146
- /***/ },
147
- /* 3 */
148
- /***/ function(module, exports) {
149
-
150
- /*** IMPORTS FROM imports-loader ***/
151
- var define = false;
152
-
153
- 'use strict';
154
-
155
- // http://assanka.net/content/tech/2009/09/02/json2-js-vs-prototype/
156
-
157
- module.exports = function(object) {
158
- return JSON.stringify(object, function(key, value) {
159
- return (this[key] instanceof Array) ? this[key] : value;
160
- });
161
- };
162
-
163
-
164
-
165
- /***/ },
166
- /* 4 */
167
- /***/ function(module, exports, __webpack_require__) {
168
-
169
- /* WEBPACK VAR INJECTION */(function(global) {/*** IMPORTS FROM imports-loader ***/
170
- var define = false;
171
-
172
- 'use strict';
173
-
174
- var Class = __webpack_require__(5),
175
- Promise = __webpack_require__(7),
176
- URI = __webpack_require__(8),
177
- array = __webpack_require__(9),
178
- browser = __webpack_require__(10),
179
- constants = __webpack_require__(1),
180
- extend = __webpack_require__(6),
181
- validateOptions = __webpack_require__(11),
182
- Deferrable = __webpack_require__(12),
183
- Logging = __webpack_require__(2),
184
- Publisher = __webpack_require__(13),
185
- Channel = __webpack_require__(15),
186
- Dispatcher = __webpack_require__(17),
187
- Error = __webpack_require__(31),
188
- Extensible = __webpack_require__(32),
189
- Publication = __webpack_require__(33),
190
- Subscription = __webpack_require__(34);
191
-
192
- var Client = Class({ className: 'Client',
193
- UNCONNECTED: 1,
194
- CONNECTING: 2,
195
- CONNECTED: 3,
196
- DISCONNECTED: 4,
197
-
198
- HANDSHAKE: 'handshake',
199
- RETRY: 'retry',
200
- NONE: 'none',
201
-
202
- CONNECTION_TIMEOUT: 60,
203
-
204
- DEFAULT_ENDPOINT: '/bayeux',
205
- INTERVAL: 0,
206
-
207
- initialize: function(endpoint, options) {
208
- this.info('New client created for ?', endpoint);
209
- options = options || {};
210
-
211
- validateOptions(options, ['interval', 'timeout', 'endpoints', 'proxy', 'retry', 'scheduler', 'websocketExtensions', 'tls', 'ca']);
212
-
213
- this._channels = new Channel.Set();
214
- this._dispatcher = Dispatcher.create(this, endpoint || this.DEFAULT_ENDPOINT, options);
215
-
216
- this._messageId = 0;
217
- this._state = this.UNCONNECTED;
218
-
219
- this._responseCallbacks = {};
220
-
221
- this._advice = {
222
- reconnect: this.RETRY,
223
- interval: 1000 * (options.interval || this.INTERVAL),
224
- timeout: 1000 * (options.timeout || this.CONNECTION_TIMEOUT)
225
- };
226
- this._dispatcher.timeout = this._advice.timeout / 1000;
227
-
228
- this._dispatcher.bind('message', this._receiveMessage, this);
229
-
230
- if (browser.Event && global.onbeforeunload !== undefined)
231
- browser.Event.on(global, 'beforeunload', function() {
232
- if (array.indexOf(this._dispatcher._disabled, 'autodisconnect') < 0)
233
- this.disconnect();
234
- }, this);
235
- },
236
-
237
- addWebsocketExtension: function(extension) {
238
- return this._dispatcher.addWebsocketExtension(extension);
239
- },
240
-
241
- disable: function(feature) {
242
- return this._dispatcher.disable(feature);
243
- },
244
-
245
- setHeader: function(name, value) {
246
- return this._dispatcher.setHeader(name, value);
247
- },
248
-
249
- // Request
250
- // MUST include: * channel
251
- // * version
252
- // * supportedConnectionTypes
253
- // MAY include: * minimumVersion
254
- // * ext
255
- // * id
256
- //
257
- // Success Response Failed Response
258
- // MUST include: * channel MUST include: * channel
259
- // * version * successful
260
- // * supportedConnectionTypes * error
261
- // * clientId MAY include: * supportedConnectionTypes
262
- // * successful * advice
263
- // MAY include: * minimumVersion * version
264
- // * advice * minimumVersion
265
- // * ext * ext
266
- // * id * id
267
- // * authSuccessful
268
- handshake: function(callback, context) {
269
- if (this._advice.reconnect === this.NONE) return;
270
- if (this._state !== this.UNCONNECTED) return;
271
-
272
- this._state = this.CONNECTING;
273
- var self = this;
274
-
275
- this.info('Initiating handshake with ?', URI.stringify(this._dispatcher.endpoint));
276
- this._dispatcher.selectTransport(constants.MANDATORY_CONNECTION_TYPES);
277
-
278
- this._sendMessage({
279
- channel: Channel.HANDSHAKE,
280
- version: constants.BAYEUX_VERSION,
281
- supportedConnectionTypes: this._dispatcher.getConnectionTypes()
282
-
283
- }, {}, function(response) {
284
-
285
- if (response.successful) {
286
- this._state = this.CONNECTED;
287
- this._dispatcher.clientId = response.clientId;
288
-
289
- this._dispatcher.selectTransport(response.supportedConnectionTypes);
290
-
291
- this.info('Handshake successful: ?', this._dispatcher.clientId);
292
-
293
- this.subscribe(this._channels.getKeys(), true);
294
- if (callback) Promise.defer(function() { callback.call(context) });
295
-
296
- } else {
297
- this.info('Handshake unsuccessful');
298
- global.setTimeout(function() { self.handshake(callback, context) }, this._dispatcher.retry * 1000);
299
- this._state = this.UNCONNECTED;
300
- }
301
- }, this);
302
- },
303
-
304
- // Request Response
305
- // MUST include: * channel MUST include: * channel
306
- // * clientId * successful
307
- // * connectionType * clientId
308
- // MAY include: * ext MAY include: * error
309
- // * id * advice
310
- // * ext
311
- // * id
312
- // * timestamp
313
- connect: function(callback, context) {
314
- if (this._advice.reconnect === this.NONE) return;
315
- if (this._state === this.DISCONNECTED) return;
316
-
317
- if (this._state === this.UNCONNECTED)
318
- return this.handshake(function() { this.connect(callback, context) }, this);
319
-
320
- this.callback(callback, context);
321
- if (this._state !== this.CONNECTED) return;
322
-
323
- this.info('Calling deferred actions for ?', this._dispatcher.clientId);
324
- this.setDeferredStatus('succeeded');
325
- this.setDeferredStatus('unknown');
326
-
327
- if (this._connectRequest) return;
328
- this._connectRequest = true;
329
-
330
- this.info('Initiating connection for ?', this._dispatcher.clientId);
331
-
332
- this._sendMessage({
333
- channel: Channel.CONNECT,
334
- clientId: this._dispatcher.clientId,
335
- connectionType: this._dispatcher.connectionType
336
-
337
- }, {}, this._cycleConnection, this);
338
- },
339
-
340
- // Request Response
341
- // MUST include: * channel MUST include: * channel
342
- // * clientId * successful
343
- // MAY include: * ext * clientId
344
- // * id MAY include: * error
345
- // * ext
346
- // * id
347
- disconnect: function() {
348
- if (this._state !== this.CONNECTED) return;
349
- this._state = this.DISCONNECTED;
350
-
351
- this.info('Disconnecting ?', this._dispatcher.clientId);
352
- var promise = new Publication();
353
-
354
- this._sendMessage({
355
- channel: Channel.DISCONNECT,
356
- clientId: this._dispatcher.clientId
357
-
358
- }, {}, function(response) {
359
- if (response.successful) {
360
- this._dispatcher.close();
361
- promise.setDeferredStatus('succeeded');
362
- } else {
363
- promise.setDeferredStatus('failed', Error.parse(response.error));
364
- }
365
- }, this);
366
-
367
- this.info('Clearing channel listeners for ?', this._dispatcher.clientId);
368
- this._channels = new Channel.Set();
369
-
370
- return promise;
371
- },
372
-
373
- // Request Response
374
- // MUST include: * channel MUST include: * channel
375
- // * clientId * successful
376
- // * subscription * clientId
377
- // MAY include: * ext * subscription
378
- // * id MAY include: * error
379
- // * advice
380
- // * ext
381
- // * id
382
- // * timestamp
383
- subscribe: function(channel, callback, context) {
384
- if (channel instanceof Array)
385
- return array.map(channel, function(c) {
386
- return this.subscribe(c, callback, context);
387
- }, this);
388
-
389
- var subscription = new Subscription(this, channel, callback, context),
390
- force = (callback === true),
391
- hasSubscribe = this._channels.hasSubscription(channel);
392
-
393
- if (hasSubscribe && !force) {
394
- this._channels.subscribe([channel], callback, context);
395
- subscription.setDeferredStatus('succeeded');
396
- return subscription;
397
- }
398
-
399
- this.connect(function() {
400
- this.info('Client ? attempting to subscribe to ?', this._dispatcher.clientId, channel);
401
- if (!force) this._channels.subscribe([channel], callback, context);
402
-
403
- this._sendMessage({
404
- channel: Channel.SUBSCRIBE,
405
- clientId: this._dispatcher.clientId,
406
- subscription: channel
407
-
408
- }, {}, function(response) {
409
- if (!response.successful) {
410
- subscription.setDeferredStatus('failed', Error.parse(response.error));
411
- return this._channels.unsubscribe(channel, callback, context);
412
- }
413
-
414
- var channels = [].concat(response.subscription);
415
- this.info('Subscription acknowledged for ? to ?', this._dispatcher.clientId, channels);
416
- subscription.setDeferredStatus('succeeded');
417
- }, this);
418
- }, this);
419
-
420
- return subscription;
421
- },
422
-
423
- // Request Response
424
- // MUST include: * channel MUST include: * channel
425
- // * clientId * successful
426
- // * subscription * clientId
427
- // MAY include: * ext * subscription
428
- // * id MAY include: * error
429
- // * advice
430
- // * ext
431
- // * id
432
- // * timestamp
433
- unsubscribe: function(channel, callback, context) {
434
- if (channel instanceof Array)
435
- return array.map(channel, function(c) {
436
- return this.unsubscribe(c, callback, context);
437
- }, this);
438
-
439
- var dead = this._channels.unsubscribe(channel, callback, context);
440
- if (!dead) return;
441
-
442
- this.connect(function() {
443
- this.info('Client ? attempting to unsubscribe from ?', this._dispatcher.clientId, channel);
444
-
445
- this._sendMessage({
446
- channel: Channel.UNSUBSCRIBE,
447
- clientId: this._dispatcher.clientId,
448
- subscription: channel
449
-
450
- }, {}, function(response) {
451
- if (!response.successful) return;
452
-
453
- var channels = [].concat(response.subscription);
454
- this.info('Unsubscription acknowledged for ? from ?', this._dispatcher.clientId, channels);
455
- }, this);
456
- }, this);
457
- },
458
-
459
- // Request Response
460
- // MUST include: * channel MUST include: * channel
461
- // * data * successful
462
- // MAY include: * clientId MAY include: * id
463
- // * id * error
464
- // * ext * ext
465
- publish: function(channel, data, options) {
466
- validateOptions(options || {}, ['attempts', 'deadline']);
467
- var publication = new Publication();
468
-
469
- this.connect(function() {
470
- this.info('Client ? queueing published message to ?: ?', this._dispatcher.clientId, channel, data);
471
-
472
- this._sendMessage({
473
- channel: channel,
474
- data: data,
475
- clientId: this._dispatcher.clientId
476
-
477
- }, options, function(response) {
478
- if (response.successful)
479
- publication.setDeferredStatus('succeeded');
480
- else
481
- publication.setDeferredStatus('failed', Error.parse(response.error));
482
- }, this);
483
- }, this);
484
-
485
- return publication;
486
- },
487
-
488
- _sendMessage: function(message, options, callback, context) {
489
- message.id = this._generateMessageId();
490
-
491
- var timeout = this._advice.timeout
492
- ? 1.2 * this._advice.timeout / 1000
493
- : 1.2 * this._dispatcher.retry;
494
-
495
- this.pipeThroughExtensions('outgoing', message, null, function(message) {
496
- if (!message) return;
497
- if (callback) this._responseCallbacks[message.id] = [callback, context];
498
- this._dispatcher.sendMessage(message, timeout, options || {});
499
- }, this);
500
- },
501
-
502
- _generateMessageId: function() {
503
- this._messageId += 1;
504
- if (this._messageId >= Math.pow(2,32)) this._messageId = 0;
505
- return this._messageId.toString(36);
506
- },
507
-
508
- _receiveMessage: function(message) {
509
- var id = message.id, callback;
510
-
511
- if (message.successful !== undefined) {
512
- callback = this._responseCallbacks[id];
513
- delete this._responseCallbacks[id];
514
- }
515
-
516
- this.pipeThroughExtensions('incoming', message, null, function(message) {
517
- if (!message) return;
518
- if (message.advice) this._handleAdvice(message.advice);
519
- this._deliverMessage(message);
520
- if (callback) callback[0].call(callback[1], message);
521
- }, this);
522
- },
523
-
524
- _handleAdvice: function(advice) {
525
- extend(this._advice, advice);
526
- this._dispatcher.timeout = this._advice.timeout / 1000;
527
-
528
- if (this._advice.reconnect === this.HANDSHAKE && this._state !== this.DISCONNECTED) {
529
- this._state = this.UNCONNECTED;
530
- this._dispatcher.clientId = null;
531
- this._cycleConnection();
532
- }
533
- },
534
-
535
- _deliverMessage: function(message) {
536
- if (!message.channel || message.data === undefined) return;
537
- this.info('Client ? calling listeners for ? with ?', this._dispatcher.clientId, message.channel, message.data);
538
- this._channels.distributeMessage(message);
539
- },
540
-
541
- _cycleConnection: function() {
542
- if (this._connectRequest) {
543
- this._connectRequest = null;
544
- this.info('Closed connection for ?', this._dispatcher.clientId);
545
- }
546
- var self = this;
547
- global.setTimeout(function() { self.connect() }, this._advice.interval);
548
- }
549
- });
550
-
551
- extend(Client.prototype, Deferrable);
552
- extend(Client.prototype, Publisher);
553
- extend(Client.prototype, Logging);
554
- extend(Client.prototype, Extensible);
555
-
556
- module.exports = Client;
557
-
558
-
559
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
560
-
561
- /***/ },
562
- /* 5 */
563
- /***/ function(module, exports, __webpack_require__) {
564
-
565
- /*** IMPORTS FROM imports-loader ***/
566
- var define = false;
567
-
568
- 'use strict';
569
-
570
- var extend = __webpack_require__(6);
571
-
572
- module.exports = function(parent, methods) {
573
- if (typeof parent !== 'function') {
574
- methods = parent;
575
- parent = Object;
576
- }
577
-
578
- var klass = function() {
579
- if (!this.initialize) return this;
580
- return this.initialize.apply(this, arguments) || this;
581
- };
582
-
583
- var bridge = function() {};
584
- bridge.prototype = parent.prototype;
585
-
586
- klass.prototype = new bridge();
587
- extend(klass.prototype, methods);
588
-
589
- return klass;
590
- };
591
-
592
-
593
-
594
- /***/ },
595
- /* 6 */
596
- /***/ function(module, exports) {
597
-
598
- /*** IMPORTS FROM imports-loader ***/
599
- var define = false;
600
-
601
- 'use strict';
602
-
603
- module.exports = function(dest, source, overwrite) {
604
- if (!source) return dest;
605
- for (var key in source) {
606
- if (!source.hasOwnProperty(key)) continue;
607
- if (dest.hasOwnProperty(key) && overwrite === false) continue;
608
- if (dest[key] !== source[key])
609
- dest[key] = source[key];
610
- }
611
- return dest;
612
- };
613
-
614
-
615
-
616
- /***/ },
617
- /* 7 */
618
- /***/ function(module, exports) {
619
-
620
- /*** IMPORTS FROM imports-loader ***/
621
- var define = false;
622
-
623
- 'use strict';
624
-
625
- var timeout = setTimeout, defer;
626
-
627
- if (typeof process === 'object' && process.nextTick)
628
- defer = function(fn) { process.nextTick(fn) };
629
- else if (typeof setImmediate === 'function')
630
- defer = function(fn) { setImmediate(fn) };
631
- else
632
- defer = function(fn) { timeout(fn, 0) };
633
-
634
- var PENDING = 0,
635
- FULFILLED = 1,
636
- REJECTED = 2;
637
-
638
- var RETURN = function(x) { return x },
639
- THROW = function(x) { throw x };
640
-
641
- var Promise = function(task) {
642
- this._state = PENDING;
643
- this._onFulfilled = [];
644
- this._onRejected = [];
645
-
646
- if (typeof task !== 'function') return;
647
- var self = this;
648
-
649
- task(function(value) { fulfill(self, value) },
650
- function(reason) { reject(self, reason) });
651
- };
652
-
653
- Promise.prototype.then = function(onFulfilled, onRejected) {
654
- var next = new Promise();
655
- registerOnFulfilled(this, onFulfilled, next);
656
- registerOnRejected(this, onRejected, next);
657
- return next;
658
- };
659
-
660
- var registerOnFulfilled = function(promise, onFulfilled, next) {
661
- if (typeof onFulfilled !== 'function') onFulfilled = RETURN;
662
- var handler = function(value) { invoke(onFulfilled, value, next) };
663
-
664
- if (promise._state === PENDING) {
665
- promise._onFulfilled.push(handler);
666
- } else if (promise._state === FULFILLED) {
667
- handler(promise._value);
668
- }
669
- };
670
-
671
- var registerOnRejected = function(promise, onRejected, next) {
672
- if (typeof onRejected !== 'function') onRejected = THROW;
673
- var handler = function(reason) { invoke(onRejected, reason, next) };
674
-
675
- if (promise._state === PENDING) {
676
- promise._onRejected.push(handler);
677
- } else if (promise._state === REJECTED) {
678
- handler(promise._reason);
679
- }
680
- };
681
-
682
- var invoke = function(fn, value, next) {
683
- defer(function() { _invoke(fn, value, next) });
684
- };
685
-
686
- var _invoke = function(fn, value, next) {
687
- var outcome;
688
-
689
- try {
690
- outcome = fn(value);
691
- } catch (error) {
692
- return reject(next, error);
693
- }
694
-
695
- if (outcome === next) {
696
- reject(next, new TypeError('Recursive promise chain detected'));
697
- } else {
698
- fulfill(next, outcome);
699
- }
700
- };
701
-
702
- var fulfill = Promise.fulfill = Promise.resolve = function(promise, value) {
703
- var called = false, type, then;
704
-
705
- try {
706
- type = typeof value;
707
- then = value !== null && (type === 'function' || type === 'object') && value.then;
708
-
709
- if (typeof then !== 'function') return _fulfill(promise, value);
710
-
711
- then.call(value, function(v) {
712
- if (!(called ^ (called = true))) return;
713
- fulfill(promise, v);
714
- }, function(r) {
715
- if (!(called ^ (called = true))) return;
716
- reject(promise, r);
717
- });
718
- } catch (error) {
719
- if (!(called ^ (called = true))) return;
720
- reject(promise, error);
721
- }
722
- };
723
-
724
- var _fulfill = function(promise, value) {
725
- if (promise._state !== PENDING) return;
726
-
727
- promise._state = FULFILLED;
728
- promise._value = value;
729
- promise._onRejected = [];
730
-
731
- var onFulfilled = promise._onFulfilled, fn;
732
- while (fn = onFulfilled.shift()) fn(value);
733
- };
734
-
735
- var reject = Promise.reject = function(promise, reason) {
736
- if (promise._state !== PENDING) return;
737
-
738
- promise._state = REJECTED;
739
- promise._reason = reason;
740
- promise._onFulfilled = [];
741
-
742
- var onRejected = promise._onRejected, fn;
743
- while (fn = onRejected.shift()) fn(reason);
744
- };
745
-
746
- Promise.all = function(promises) {
747
- return new Promise(function(fulfill, reject) {
748
- var list = [],
749
- n = promises.length,
750
- i;
751
-
752
- if (n === 0) return fulfill(list);
753
-
754
- for (i = 0; i < n; i++) (function(promise, i) {
755
- Promise.fulfilled(promise).then(function(value) {
756
- list[i] = value;
757
- if (--n === 0) fulfill(list);
758
- }, reject);
759
- })(promises[i], i);
760
- });
761
- };
762
-
763
- Promise.defer = defer;
764
-
765
- Promise.deferred = Promise.pending = function() {
766
- var tuple = {};
767
-
768
- tuple.promise = new Promise(function(fulfill, reject) {
769
- tuple.fulfill = tuple.resolve = fulfill;
770
- tuple.reject = reject;
771
- });
772
- return tuple;
773
- };
774
-
775
- Promise.fulfilled = Promise.resolved = function(value) {
776
- return new Promise(function(fulfill, reject) { fulfill(value) });
777
- };
778
-
779
- Promise.rejected = function(reason) {
780
- return new Promise(function(fulfill, reject) { reject(reason) });
781
- };
782
-
783
- module.exports = Promise;
784
-
785
-
786
-
787
- /***/ },
788
- /* 8 */
789
- /***/ function(module, exports) {
790
-
791
- /*** IMPORTS FROM imports-loader ***/
792
- var define = false;
793
-
794
- 'use strict';
795
-
796
- module.exports = {
797
- isURI: function(uri) {
798
- return uri && uri.protocol && uri.host && uri.path;
799
- },
800
-
801
- isSameOrigin: function(uri) {
802
- return uri.protocol === location.protocol &&
803
- uri.hostname === location.hostname &&
804
- uri.port === location.port;
805
- },
806
-
807
- parse: function(url) {
808
- if (typeof url !== 'string') return url;
809
- var uri = {}, parts, query, pairs, i, n, data;
810
-
811
- var consume = function(name, pattern) {
812
- url = url.replace(pattern, function(match) {
813
- uri[name] = match;
814
- return '';
815
- });
816
- uri[name] = uri[name] || '';
817
- };
818
-
819
- consume('protocol', /^[a-z]+\:/i);
820
- consume('host', /^\/\/[^\/\?#]+/);
821
-
822
- if (!/^\//.test(url) && !uri.host)
823
- url = location.pathname.replace(/[^\/]*$/, '') + url;
824
-
825
- consume('pathname', /^[^\?#]*/);
826
- consume('search', /^\?[^#]*/);
827
- consume('hash', /^#.*/);
828
-
829
- uri.protocol = uri.protocol || location.protocol;
830
-
831
- if (uri.host) {
832
- uri.host = uri.host.substr(2);
833
- parts = uri.host.split(':');
834
- uri.hostname = parts[0];
835
- uri.port = parts[1] || '';
836
- } else {
837
- uri.host = location.host;
838
- uri.hostname = location.hostname;
839
- uri.port = location.port;
840
- }
841
-
842
- uri.pathname = uri.pathname || '/';
843
- uri.path = uri.pathname + uri.search;
844
-
845
- query = uri.search.replace(/^\?/, '');
846
- pairs = query ? query.split('&') : [];
847
- data = {};
848
-
849
- for (i = 0, n = pairs.length; i < n; i++) {
850
- parts = pairs[i].split('=');
851
- data[decodeURIComponent(parts[0] || '')] = decodeURIComponent(parts[1] || '');
852
- }
853
-
854
- uri.query = data;
855
-
856
- uri.href = this.stringify(uri);
857
- return uri;
858
- },
859
-
860
- stringify: function(uri) {
861
- var string = uri.protocol + '//' + uri.hostname;
862
- if (uri.port) string += ':' + uri.port;
863
- string += uri.pathname + this.queryString(uri.query) + (uri.hash || '');
864
- return string;
865
- },
866
-
867
- queryString: function(query) {
868
- var pairs = [];
869
- for (var key in query) {
870
- if (!query.hasOwnProperty(key)) continue;
871
- pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(query[key]));
872
- }
873
- if (pairs.length === 0) return '';
874
- return '?' + pairs.join('&');
875
- }
876
- };
877
-
878
-
879
-
880
- /***/ },
881
- /* 9 */
882
- /***/ function(module, exports) {
883
-
884
- /*** IMPORTS FROM imports-loader ***/
885
- var define = false;
886
-
887
- 'use strict';
888
-
889
- module.exports = {
890
- commonElement: function(lista, listb) {
891
- for (var i = 0, n = lista.length; i < n; i++) {
892
- if (this.indexOf(listb, lista[i]) !== -1)
893
- return lista[i];
894
- }
895
- return null;
896
- },
897
-
898
- indexOf: function(list, needle) {
899
- if (list.indexOf) return list.indexOf(needle);
900
-
901
- for (var i = 0, n = list.length; i < n; i++) {
902
- if (list[i] === needle) return i;
903
- }
904
- return -1;
905
- },
906
-
907
- map: function(object, callback, context) {
908
- if (object.map) return object.map(callback, context);
909
- var result = [];
910
-
911
- if (object instanceof Array) {
912
- for (var i = 0, n = object.length; i < n; i++) {
913
- result.push(callback.call(context || null, object[i], i));
914
- }
915
- } else {
916
- for (var key in object) {
917
- if (!object.hasOwnProperty(key)) continue;
918
- result.push(callback.call(context || null, key, object[key]));
919
- }
920
- }
921
- return result;
922
- },
923
-
924
- filter: function(array, callback, context) {
925
- if (array.filter) return array.filter(callback, context);
926
- var result = [];
927
- for (var i = 0, n = array.length; i < n; i++) {
928
- if (callback.call(context || null, array[i], i))
929
- result.push(array[i]);
930
- }
931
- return result;
932
- },
933
-
934
- asyncEach: function(list, iterator, callback, context) {
935
- var n = list.length,
936
- i = -1,
937
- calls = 0,
938
- looping = false;
939
-
940
- var iterate = function() {
941
- calls -= 1;
942
- i += 1;
943
- if (i === n) return callback && callback.call(context);
944
- iterator(list[i], resume);
945
- };
946
-
947
- var loop = function() {
948
- if (looping) return;
949
- looping = true;
950
- while (calls > 0) iterate();
951
- looping = false;
952
- };
953
-
954
- var resume = function() {
955
- calls += 1;
956
- loop();
957
- };
958
- resume();
959
- }
960
- };
961
-
962
-
963
-
964
- /***/ },
965
- /* 10 */
966
- /***/ function(module, exports) {
967
-
968
- /*** IMPORTS FROM imports-loader ***/
969
- var define = false;
970
-
971
- 'use strict';
972
-
973
- var Event = {
974
- _registry: [],
975
-
976
- on: function(element, eventName, callback, context) {
977
- var wrapped = function() { callback.call(context) };
978
-
979
- if (element.addEventListener)
980
- element.addEventListener(eventName, wrapped, false);
981
- else
982
- element.attachEvent('on' + eventName, wrapped);
983
-
984
- this._registry.push({
985
- _element: element,
986
- _type: eventName,
987
- _callback: callback,
988
- _context: context,
989
- _handler: wrapped
990
- });
991
- },
992
-
993
- detach: function(element, eventName, callback, context) {
994
- var i = this._registry.length, register;
995
- while (i--) {
996
- register = this._registry[i];
997
-
998
- if ((element && element !== register._element) ||
999
- (eventName && eventName !== register._type) ||
1000
- (callback && callback !== register._callback) ||
1001
- (context && context !== register._context))
1002
- continue;
1003
-
1004
- if (register._element.removeEventListener)
1005
- register._element.removeEventListener(register._type, register._handler, false);
1006
- else
1007
- register._element.detachEvent('on' + register._type, register._handler);
1008
-
1009
- this._registry.splice(i,1);
1010
- register = null;
1011
- }
1012
- }
1013
- };
1014
-
1015
- if (window.onunload !== undefined)
1016
- Event.on(window, 'unload', Event.detach, Event);
1017
-
1018
- module.exports = {
1019
- Event: Event
1020
- };
1021
-
1022
-
1023
-
1024
- /***/ },
1025
- /* 11 */
1026
- /***/ function(module, exports, __webpack_require__) {
1027
-
1028
- /*** IMPORTS FROM imports-loader ***/
1029
- var define = false;
1030
-
1031
- 'use strict';
1032
-
1033
- var array = __webpack_require__(9);
1034
-
1035
- module.exports = function(options, validKeys) {
1036
- for (var key in options) {
1037
- if (array.indexOf(validKeys, key) < 0)
1038
- throw new Error('Unrecognized option: ' + key);
1039
- }
1040
- };
1041
-
1042
-
1043
-
1044
- /***/ },
1045
- /* 12 */
1046
- /***/ function(module, exports, __webpack_require__) {
1047
-
1048
- /* WEBPACK VAR INJECTION */(function(global) {/*** IMPORTS FROM imports-loader ***/
1049
- var define = false;
1050
-
1051
- 'use strict';
1052
-
1053
- var Promise = __webpack_require__(7);
1054
-
1055
- module.exports = {
1056
- then: function(callback, errback) {
1057
- var self = this;
1058
- if (!this._promise)
1059
- this._promise = new Promise(function(fulfill, reject) {
1060
- self._fulfill = fulfill;
1061
- self._reject = reject;
1062
- });
1063
-
1064
- if (arguments.length === 0)
1065
- return this._promise;
1066
- else
1067
- return this._promise.then(callback, errback);
1068
- },
1069
-
1070
- callback: function(callback, context) {
1071
- return this.then(function(value) { callback.call(context, value) });
1072
- },
1073
-
1074
- errback: function(callback, context) {
1075
- return this.then(null, function(reason) { callback.call(context, reason) });
1076
- },
1077
-
1078
- timeout: function(seconds, message) {
1079
- this.then();
1080
- var self = this;
1081
- this._timer = global.setTimeout(function() {
1082
- self._reject(message);
1083
- }, seconds * 1000);
1084
- },
1085
-
1086
- setDeferredStatus: function(status, value) {
1087
- if (this._timer) global.clearTimeout(this._timer);
1088
-
1089
- this.then();
1090
-
1091
- if (status === 'succeeded')
1092
- this._fulfill(value);
1093
- else if (status === 'failed')
1094
- this._reject(value);
1095
- else
1096
- delete this._promise;
1097
- }
1098
- };
1099
-
1100
-
1101
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
1102
-
1103
- /***/ },
1104
- /* 13 */
1105
- /***/ function(module, exports, __webpack_require__) {
1106
-
1107
- /*** IMPORTS FROM imports-loader ***/
1108
- var define = false;
1109
-
1110
- 'use strict';
1111
-
1112
- var extend = __webpack_require__(6),
1113
- EventEmitter = __webpack_require__(14);
1114
-
1115
- var Publisher = {
1116
- countListeners: function(eventType) {
1117
- return this.listeners(eventType).length;
1118
- },
1119
-
1120
- bind: function(eventType, listener, context) {
1121
- var slice = Array.prototype.slice,
1122
- handler = function() { listener.apply(context, slice.call(arguments)) };
1123
-
1124
- this._listeners = this._listeners || [];
1125
- this._listeners.push([eventType, listener, context, handler]);
1126
- return this.on(eventType, handler);
1127
- },
1128
-
1129
- unbind: function(eventType, listener, context) {
1130
- this._listeners = this._listeners || [];
1131
- var n = this._listeners.length, tuple;
1132
-
1133
- while (n--) {
1134
- tuple = this._listeners[n];
1135
- if (tuple[0] !== eventType) continue;
1136
- if (listener && (tuple[1] !== listener || tuple[2] !== context)) continue;
1137
- this._listeners.splice(n, 1);
1138
- this.removeListener(eventType, tuple[3]);
1139
- }
1140
- }
1141
- };
1142
-
1143
- extend(Publisher, EventEmitter.prototype);
1144
- Publisher.trigger = Publisher.emit;
1145
-
1146
- module.exports = Publisher;
1147
-
1148
-
1149
-
1150
- /***/ },
1151
- /* 14 */
1152
- /***/ function(module, exports) {
1153
-
1154
- /*** IMPORTS FROM imports-loader ***/
1155
- var define = false;
1156
-
1157
- /*
1158
- Copyright Joyent, Inc. and other Node contributors. All rights reserved.
1159
- Permission is hereby granted, free of charge, to any person obtaining a copy of
1160
- this software and associated documentation files (the "Software"), to deal in
1161
- the Software without restriction, including without limitation the rights to
1162
- use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
1163
- of the Software, and to permit persons to whom the Software is furnished to do
1164
- so, subject to the following conditions:
1165
-
1166
- The above copyright notice and this permission notice shall be included in all
1167
- copies or substantial portions of the Software.
1168
-
1169
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1170
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1171
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1172
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1173
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1174
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1175
- SOFTWARE.
1176
- */
1177
-
1178
- var isArray = typeof Array.isArray === 'function'
1179
- ? Array.isArray
1180
- : function (xs) {
1181
- return Object.prototype.toString.call(xs) === '[object Array]'
1182
- }
1183
- ;
1184
- function indexOf (xs, x) {
1185
- if (xs.indexOf) return xs.indexOf(x);
1186
- for (var i = 0; i < xs.length; i++) {
1187
- if (x === xs[i]) return i;
1188
- }
1189
- return -1;
1190
- }
1191
-
1192
- function EventEmitter() {}
1193
- module.exports = EventEmitter;
1194
-
1195
- EventEmitter.prototype.emit = function(type) {
1196
- // If there is no 'error' event listener then throw.
1197
- if (type === 'error') {
1198
- if (!this._events || !this._events.error ||
1199
- (isArray(this._events.error) && !this._events.error.length))
1200
- {
1201
- if (arguments[1] instanceof Error) {
1202
- throw arguments[1]; // Unhandled 'error' event
1203
- } else {
1204
- throw new Error("Uncaught, unspecified 'error' event.");
1205
- }
1206
- return false;
1207
- }
1208
- }
1209
-
1210
- if (!this._events) return false;
1211
- var handler = this._events[type];
1212
- if (!handler) return false;
1213
-
1214
- if (typeof handler == 'function') {
1215
- switch (arguments.length) {
1216
- // fast cases
1217
- case 1:
1218
- handler.call(this);
1219
- break;
1220
- case 2:
1221
- handler.call(this, arguments[1]);
1222
- break;
1223
- case 3:
1224
- handler.call(this, arguments[1], arguments[2]);
1225
- break;
1226
- // slower
1227
- default:
1228
- var args = Array.prototype.slice.call(arguments, 1);
1229
- handler.apply(this, args);
1230
- }
1231
- return true;
1232
-
1233
- } else if (isArray(handler)) {
1234
- var args = Array.prototype.slice.call(arguments, 1);
1235
-
1236
- var listeners = handler.slice();
1237
- for (var i = 0, l = listeners.length; i < l; i++) {
1238
- listeners[i].apply(this, args);
1239
- }
1240
- return true;
1241
-
1242
- } else {
1243
- return false;
1244
- }
1245
- };
1246
-
1247
- // EventEmitter is defined in src/node_events.cc
1248
- // EventEmitter.prototype.emit() is also defined there.
1249
- EventEmitter.prototype.addListener = function(type, listener) {
1250
- if ('function' !== typeof listener) {
1251
- throw new Error('addListener only takes instances of Function');
1252
- }
1253
-
1254
- if (!this._events) this._events = {};
1255
-
1256
- // To avoid recursion in the case that type == "newListeners"! Before
1257
- // adding it to the listeners, first emit "newListeners".
1258
- this.emit('newListener', type, listener);
1259
-
1260
- if (!this._events[type]) {
1261
- // Optimize the case of one listener. Don't need the extra array object.
1262
- this._events[type] = listener;
1263
- } else if (isArray(this._events[type])) {
1264
- // If we've already got an array, just append.
1265
- this._events[type].push(listener);
1266
- } else {
1267
- // Adding the second element, need to change to array.
1268
- this._events[type] = [this._events[type], listener];
1269
- }
1270
-
1271
- return this;
1272
- };
1273
-
1274
- EventEmitter.prototype.on = EventEmitter.prototype.addListener;
1275
-
1276
- EventEmitter.prototype.once = function(type, listener) {
1277
- var self = this;
1278
- self.on(type, function g() {
1279
- self.removeListener(type, g);
1280
- listener.apply(this, arguments);
1281
- });
1282
-
1283
- return this;
1284
- };
1285
-
1286
- EventEmitter.prototype.removeListener = function(type, listener) {
1287
- if ('function' !== typeof listener) {
1288
- throw new Error('removeListener only takes instances of Function');
1289
- }
1290
-
1291
- // does not use listeners(), so no side effect of creating _events[type]
1292
- if (!this._events || !this._events[type]) return this;
1293
-
1294
- var list = this._events[type];
1295
-
1296
- if (isArray(list)) {
1297
- var i = indexOf(list, listener);
1298
- if (i < 0) return this;
1299
- list.splice(i, 1);
1300
- if (list.length == 0)
1301
- delete this._events[type];
1302
- } else if (this._events[type] === listener) {
1303
- delete this._events[type];
1304
- }
1305
-
1306
- return this;
1307
- };
1308
-
1309
- EventEmitter.prototype.removeAllListeners = function(type) {
1310
- if (arguments.length === 0) {
1311
- this._events = {};
1312
- return this;
1313
- }
1314
-
1315
- // does not use listeners(), so no side effect of creating _events[type]
1316
- if (type && this._events && this._events[type]) this._events[type] = null;
1317
- return this;
1318
- };
1319
-
1320
- EventEmitter.prototype.listeners = function(type) {
1321
- if (!this._events) this._events = {};
1322
- if (!this._events[type]) this._events[type] = [];
1323
- if (!isArray(this._events[type])) {
1324
- this._events[type] = [this._events[type]];
1325
- }
1326
- return this._events[type];
1327
- };
1328
-
1329
-
1330
-
1331
- /***/ },
1332
- /* 15 */
1333
- /***/ function(module, exports, __webpack_require__) {
1334
-
1335
- /*** IMPORTS FROM imports-loader ***/
1336
- var define = false;
1337
-
1338
- 'use strict';
1339
-
1340
- var Class = __webpack_require__(5),
1341
- extend = __webpack_require__(6),
1342
- Publisher = __webpack_require__(13),
1343
- Grammar = __webpack_require__(16);
1344
-
1345
- var Channel = Class({
1346
- initialize: function(name) {
1347
- this.id = this.name = name;
1348
- },
1349
-
1350
- push: function(message) {
1351
- this.trigger('message', message);
1352
- },
1353
-
1354
- isUnused: function() {
1355
- return this.countListeners('message') === 0;
1356
- }
1357
- });
1358
-
1359
- extend(Channel.prototype, Publisher);
1360
-
1361
- extend(Channel, {
1362
- HANDSHAKE: '/meta/handshake',
1363
- CONNECT: '/meta/connect',
1364
- SUBSCRIBE: '/meta/subscribe',
1365
- UNSUBSCRIBE: '/meta/unsubscribe',
1366
- DISCONNECT: '/meta/disconnect',
1367
-
1368
- META: 'meta',
1369
- SERVICE: 'service',
1370
-
1371
- expand: function(name) {
1372
- var segments = this.parse(name),
1373
- channels = ['/**', name];
1374
-
1375
- var copy = segments.slice();
1376
- copy[copy.length - 1] = '*';
1377
- channels.push(this.unparse(copy));
1378
-
1379
- for (var i = 1, n = segments.length; i < n; i++) {
1380
- copy = segments.slice(0, i);
1381
- copy.push('**');
1382
- channels.push(this.unparse(copy));
1383
- }
1384
-
1385
- return channels;
1386
- },
1387
-
1388
- isValid: function(name) {
1389
- return Grammar.CHANNEL_NAME.test(name) ||
1390
- Grammar.CHANNEL_PATTERN.test(name);
1391
- },
1392
-
1393
- parse: function(name) {
1394
- if (!this.isValid(name)) return null;
1395
- return name.split('/').slice(1);
1396
- },
1397
-
1398
- unparse: function(segments) {
1399
- return '/' + segments.join('/');
1400
- },
1401
-
1402
- isMeta: function(name) {
1403
- var segments = this.parse(name);
1404
- return segments ? (segments[0] === this.META) : null;
1405
- },
1406
-
1407
- isService: function(name) {
1408
- var segments = this.parse(name);
1409
- return segments ? (segments[0] === this.SERVICE) : null;
1410
- },
1411
-
1412
- isSubscribable: function(name) {
1413
- if (!this.isValid(name)) return null;
1414
- return !this.isMeta(name) && !this.isService(name);
1415
- },
1416
-
1417
- Set: Class({
1418
- initialize: function() {
1419
- this._channels = {};
1420
- },
1421
-
1422
- getKeys: function() {
1423
- var keys = [];
1424
- for (var key in this._channels) keys.push(key);
1425
- return keys;
1426
- },
1427
-
1428
- remove: function(name) {
1429
- delete this._channels[name];
1430
- },
1431
-
1432
- hasSubscription: function(name) {
1433
- return this._channels.hasOwnProperty(name);
1434
- },
1435
-
1436
- subscribe: function(names, callback, context) {
1437
- var name;
1438
- for (var i = 0, n = names.length; i < n; i++) {
1439
- name = names[i];
1440
- var channel = this._channels[name] = this._channels[name] || new Channel(name);
1441
- if (callback) channel.bind('message', callback, context);
1442
- }
1443
- },
1444
-
1445
- unsubscribe: function(name, callback, context) {
1446
- var channel = this._channels[name];
1447
- if (!channel) return false;
1448
- channel.unbind('message', callback, context);
1449
-
1450
- if (channel.isUnused()) {
1451
- this.remove(name);
1452
- return true;
1453
- } else {
1454
- return false;
1455
- }
1456
- },
1457
-
1458
- distributeMessage: function(message) {
1459
- var channels = Channel.expand(message.channel);
1460
-
1461
- for (var i = 0, n = channels.length; i < n; i++) {
1462
- var channel = this._channels[channels[i]];
1463
- if (channel) channel.trigger('message', message.data);
1464
- }
1465
- }
1466
- })
1467
- });
1468
-
1469
- module.exports = Channel;
1470
-
1471
-
1472
-
1473
- /***/ },
1474
- /* 16 */
1475
- /***/ function(module, exports) {
1476
-
1477
- /*** IMPORTS FROM imports-loader ***/
1478
- var define = false;
1479
-
1480
- 'use strict';
1481
-
1482
- module.exports = {
1483
- CHANNEL_NAME: /^\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+(\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+)*$/,
1484
- CHANNEL_PATTERN: /^(\/(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)))+)*\/\*{1,2}$/,
1485
- ERROR: /^([0-9][0-9][0-9]:(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*(,(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*)*:(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*|[0-9][0-9][0-9]::(((([a-z]|[A-Z])|[0-9])|(\-|\_|\!|\~|\(|\)|\$|\@)| |\/|\*|\.))*)$/,
1486
- VERSION: /^([0-9])+(\.(([a-z]|[A-Z])|[0-9])(((([a-z]|[A-Z])|[0-9])|\-|\_))*)*$/
1487
- };
1488
-
1489
-
1490
-
1491
- /***/ },
1492
- /* 17 */
1493
- /***/ function(module, exports, __webpack_require__) {
1494
-
1495
- /* WEBPACK VAR INJECTION */(function(global) {/*** IMPORTS FROM imports-loader ***/
1496
- var define = false;
1497
-
1498
- 'use strict';
1499
-
1500
- var Class = __webpack_require__(5),
1501
- URI = __webpack_require__(8),
1502
- cookies = __webpack_require__(18),
1503
- extend = __webpack_require__(6),
1504
- Logging = __webpack_require__(2),
1505
- Publisher = __webpack_require__(13),
1506
- Transport = __webpack_require__(19),
1507
- Scheduler = __webpack_require__(30);
1508
-
1509
- var Dispatcher = Class({ className: 'Dispatcher',
1510
- MAX_REQUEST_SIZE: 2048,
1511
- DEFAULT_RETRY: 5,
1512
-
1513
- UP: 1,
1514
- DOWN: 2,
1515
-
1516
- initialize: function(client, endpoint, options) {
1517
- this._client = client;
1518
- this.endpoint = URI.parse(endpoint);
1519
- this._alternates = options.endpoints || {};
1520
-
1521
- this.cookies = cookies.CookieJar && new cookies.CookieJar();
1522
- this._disabled = [];
1523
- this._envelopes = {};
1524
- this.headers = {};
1525
- this.retry = options.retry || this.DEFAULT_RETRY;
1526
- this._scheduler = options.scheduler || Scheduler;
1527
- this._state = 0;
1528
- this.transports = {};
1529
- this.wsExtensions = [];
1530
-
1531
- this.proxy = options.proxy || {};
1532
- if (typeof this._proxy === 'string') this._proxy = {origin: this._proxy};
1533
-
1534
- var exts = options.websocketExtensions;
1535
- if (exts) {
1536
- exts = [].concat(exts);
1537
- for (var i = 0, n = exts.length; i < n; i++)
1538
- this.addWebsocketExtension(exts[i]);
1539
- }
1540
-
1541
- this.tls = options.tls || {};
1542
- this.tls.ca = this.tls.ca || options.ca;
1543
-
1544
- for (var type in this._alternates)
1545
- this._alternates[type] = URI.parse(this._alternates[type]);
1546
-
1547
- this.maxRequestSize = this.MAX_REQUEST_SIZE;
1548
- },
1549
-
1550
- endpointFor: function(connectionType) {
1551
- return this._alternates[connectionType] || this.endpoint;
1552
- },
1553
-
1554
- addWebsocketExtension: function(extension) {
1555
- this.wsExtensions.push(extension);
1556
- },
1557
-
1558
- disable: function(feature) {
1559
- this._disabled.push(feature);
1560
- },
1561
-
1562
- setHeader: function(name, value) {
1563
- this.headers[name] = value;
1564
- },
1565
-
1566
- close: function() {
1567
- var transport = this._transport;
1568
- delete this._transport;
1569
- if (transport) transport.close();
1570
- },
1571
-
1572
- getConnectionTypes: function() {
1573
- return Transport.getConnectionTypes();
1574
- },
1575
-
1576
- selectTransport: function(transportTypes) {
1577
- Transport.get(this, transportTypes, this._disabled, function(transport) {
1578
- this.debug('Selected ? transport for ?', transport.connectionType, URI.stringify(transport.endpoint));
1579
-
1580
- if (transport === this._transport) return;
1581
- if (this._transport) this._transport.close();
1582
-
1583
- this._transport = transport;
1584
- this.connectionType = transport.connectionType;
1585
- }, this);
1586
- },
1587
-
1588
- sendMessage: function(message, timeout, options) {
1589
- options = options || {};
1590
-
1591
- var id = message.id,
1592
- attempts = options.attempts,
1593
- deadline = options.deadline && new Date().getTime() + (options.deadline * 1000),
1594
- envelope = this._envelopes[id],
1595
- scheduler;
1596
-
1597
- if (!envelope) {
1598
- scheduler = new this._scheduler(message, {timeout: timeout, interval: this.retry, attempts: attempts, deadline: deadline});
1599
- envelope = this._envelopes[id] = {message: message, scheduler: scheduler};
1600
- }
1601
-
1602
- this._sendEnvelope(envelope);
1603
- },
1604
-
1605
- _sendEnvelope: function(envelope) {
1606
- if (!this._transport) return;
1607
- if (envelope.request || envelope.timer) return;
1608
-
1609
- var message = envelope.message,
1610
- scheduler = envelope.scheduler,
1611
- self = this;
1612
-
1613
- if (!scheduler.isDeliverable()) {
1614
- scheduler.abort();
1615
- delete this._envelopes[message.id];
1616
- return;
1617
- }
1618
-
1619
- envelope.timer = global.setTimeout(function() {
1620
- self.handleError(message);
1621
- }, scheduler.getTimeout() * 1000);
1622
-
1623
- scheduler.send();
1624
- envelope.request = this._transport.sendMessage(message);
1625
- },
1626
-
1627
- handleResponse: function(reply) {
1628
- var envelope = this._envelopes[reply.id];
1629
-
1630
- if (reply.successful !== undefined && envelope) {
1631
- envelope.scheduler.succeed();
1632
- delete this._envelopes[reply.id];
1633
- global.clearTimeout(envelope.timer);
1634
- }
1635
-
1636
- this.trigger('message', reply);
1637
-
1638
- if (this._state === this.UP) return;
1639
- this._state = this.UP;
1640
- this._client.trigger('transport:up');
1641
- },
1642
-
1643
- handleError: function(message, immediate) {
1644
- var envelope = this._envelopes[message.id],
1645
- request = envelope && envelope.request,
1646
- self = this;
1647
-
1648
- if (!request) return;
1649
-
1650
- request.then(function(req) {
1651
- if (req && req.abort) req.abort();
1652
- });
1653
-
1654
- var scheduler = envelope.scheduler;
1655
- scheduler.fail();
1656
-
1657
- global.clearTimeout(envelope.timer);
1658
- envelope.request = envelope.timer = null;
1659
-
1660
- if (immediate) {
1661
- this._sendEnvelope(envelope);
1662
- } else {
1663
- envelope.timer = global.setTimeout(function() {
1664
- envelope.timer = null;
1665
- self._sendEnvelope(envelope);
1666
- }, scheduler.getInterval() * 1000);
1667
- }
1668
-
1669
- if (this._state === this.DOWN) return;
1670
- this._state = this.DOWN;
1671
- this._client.trigger('transport:down');
1672
- }
1673
- });
1674
-
1675
- Dispatcher.create = function(client, endpoint, options) {
1676
- return new Dispatcher(client, endpoint, options);
1677
- };
1678
-
1679
- extend(Dispatcher.prototype, Publisher);
1680
- extend(Dispatcher.prototype, Logging);
1681
-
1682
- module.exports = Dispatcher;
1683
-
1684
-
1685
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
1686
-
1687
- /***/ },
1688
- /* 18 */
1689
- /***/ function(module, exports) {
1690
-
1691
- /*** IMPORTS FROM imports-loader ***/
1692
- var define = false;
1693
-
1694
- 'use strict';
1695
-
1696
- module.exports = {};
1697
-
1698
-
1699
-
1700
- /***/ },
1701
- /* 19 */
1702
- /***/ function(module, exports, __webpack_require__) {
1703
-
1704
- /*** IMPORTS FROM imports-loader ***/
1705
- var define = false;
1706
-
1707
- 'use strict';
1708
-
1709
- var Transport = __webpack_require__(20);
1710
-
1711
- Transport.register('websocket', __webpack_require__(22));
1712
- Transport.register('eventsource', __webpack_require__(26));
1713
- Transport.register('long-polling', __webpack_require__(27));
1714
- Transport.register('cross-origin-long-polling', __webpack_require__(28));
1715
- Transport.register('callback-polling', __webpack_require__(29));
1716
-
1717
- module.exports = Transport;
1718
-
1719
-
1720
-
1721
- /***/ },
1722
- /* 20 */
1723
- /***/ function(module, exports, __webpack_require__) {
1724
-
1725
- /*** IMPORTS FROM imports-loader ***/
1726
- var define = false;
1727
-
1728
- 'use strict';
1729
-
1730
- var Class = __webpack_require__(5),
1731
- Cookie = __webpack_require__(18).Cookie,
1732
- Promise = __webpack_require__(7),
1733
- URI = __webpack_require__(8),
1734
- array = __webpack_require__(9),
1735
- extend = __webpack_require__(6),
1736
- Logging = __webpack_require__(2),
1737
- Timeouts = __webpack_require__(21),
1738
- Channel = __webpack_require__(15);
1739
-
1740
- var Transport = extend(Class({ className: 'Transport',
1741
- DEFAULT_PORTS: {'http:': 80, 'https:': 443, 'ws:': 80, 'wss:': 443},
1742
- SECURE_PROTOCOLS: ['https:', 'wss:'],
1743
- MAX_DELAY: 0,
1744
-
1745
- batching: true,
1746
-
1747
- initialize: function(dispatcher, endpoint) {
1748
- this._dispatcher = dispatcher;
1749
- this.endpoint = endpoint;
1750
- this._outbox = [];
1751
- this._proxy = extend({}, this._dispatcher.proxy);
1752
-
1753
- if (!this._proxy.origin && typeof process !== 'undefined') {
1754
- this._proxy.origin = array.indexOf(this.SECURE_PROTOCOLS, this.endpoint.protocol) >= 0
1755
- ? (process.env.HTTPS_PROXY || process.env.https_proxy)
1756
- : (process.env.HTTP_PROXY || process.env.http_proxy);
1757
- }
1758
- },
1759
-
1760
- close: function() {},
1761
-
1762
- encode: function(messages) {
1763
- return '';
1764
- },
1765
-
1766
- sendMessage: function(message) {
1767
- this.debug('Client ? sending message to ?: ?',
1768
- this._dispatcher.clientId, URI.stringify(this.endpoint), message);
1769
-
1770
- if (!this.batching) return Promise.fulfilled(this.request([message]));
1771
-
1772
- this._outbox.push(message);
1773
- this._flushLargeBatch();
1774
-
1775
- if (message.channel === Channel.HANDSHAKE)
1776
- return this._publish(0.01);
1777
-
1778
- if (message.channel === Channel.CONNECT)
1779
- this._connectMessage = message;
1780
-
1781
- return this._publish(this.MAX_DELAY);
1782
- },
1783
-
1784
- _publish: function(delay) {
1785
- this._promise = this._promise || new Promise();
1786
-
1787
- this.addTimeout('publish', delay, function() {
1788
- this._flush();
1789
- delete this._promise;
1790
- }, this);
1791
-
1792
- return this._promise;
1793
- },
1794
-
1795
- _flush: function() {
1796
- this.removeTimeout('publish');
1797
-
1798
- if (this._outbox.length > 1 && this._connectMessage)
1799
- this._connectMessage.advice = {timeout: 0};
1800
-
1801
- Promise.fulfill(this._promise, this.request(this._outbox));
1802
-
1803
- this._connectMessage = null;
1804
- this._outbox = [];
1805
- },
1806
-
1807
- _flushLargeBatch: function() {
1808
- var string = this.encode(this._outbox);
1809
- if (string.length < this._dispatcher.maxRequestSize) return;
1810
- var last = this._outbox.pop();
1811
-
1812
- this._promise = this._promise || new Promise();
1813
- this._flush();
1814
-
1815
- if (last) this._outbox.push(last);
1816
- },
1817
-
1818
- _receive: function(replies) {
1819
- if (!replies) return;
1820
- replies = [].concat(replies);
1821
-
1822
- this.debug('Client ? received from ? via ?: ?',
1823
- this._dispatcher.clientId, URI.stringify(this.endpoint), this.connectionType, replies);
1824
-
1825
- for (var i = 0, n = replies.length; i < n; i++)
1826
- this._dispatcher.handleResponse(replies[i]);
1827
- },
1828
-
1829
- _handleError: function(messages, immediate) {
1830
- messages = [].concat(messages);
1831
-
1832
- this.debug('Client ? failed to send to ? via ?: ?',
1833
- this._dispatcher.clientId, URI.stringify(this.endpoint), this.connectionType, messages);
1834
-
1835
- for (var i = 0, n = messages.length; i < n; i++)
1836
- this._dispatcher.handleError(messages[i]);
1837
- },
1838
-
1839
- _getCookies: function() {
1840
- var cookies = this._dispatcher.cookies,
1841
- url = URI.stringify(this.endpoint);
1842
-
1843
- if (!cookies) return '';
1844
-
1845
- return array.map(cookies.getCookiesSync(url), function(cookie) {
1846
- return cookie.cookieString();
1847
- }).join('; ');
1848
- },
1849
-
1850
- _storeCookies: function(setCookie) {
1851
- var cookies = this._dispatcher.cookies,
1852
- url = URI.stringify(this.endpoint),
1853
- cookie;
1854
-
1855
- if (!setCookie || !cookies) return;
1856
- setCookie = [].concat(setCookie);
1857
-
1858
- for (var i = 0, n = setCookie.length; i < n; i++) {
1859
- cookie = Cookie.parse(setCookie[i]);
1860
- cookies.setCookieSync(cookie, url);
1861
- }
1862
- }
1863
-
1864
- }), {
1865
- get: function(dispatcher, allowed, disabled, callback, context) {
1866
- var endpoint = dispatcher.endpoint;
1867
-
1868
- array.asyncEach(this._transports, function(pair, resume) {
1869
- var connType = pair[0], klass = pair[1],
1870
- connEndpoint = dispatcher.endpointFor(connType);
1871
-
1872
- if (array.indexOf(disabled, connType) >= 0)
1873
- return resume();
1874
-
1875
- if (array.indexOf(allowed, connType) < 0) {
1876
- klass.isUsable(dispatcher, connEndpoint, function() {});
1877
- return resume();
1878
- }
1879
-
1880
- klass.isUsable(dispatcher, connEndpoint, function(isUsable) {
1881
- if (!isUsable) return resume();
1882
- var transport = klass.hasOwnProperty('create') ? klass.create(dispatcher, connEndpoint) : new klass(dispatcher, connEndpoint);
1883
- callback.call(context, transport);
1884
- });
1885
- }, function() {
1886
- throw new Error('Could not find a usable connection type for ' + URI.stringify(endpoint));
1887
- });
1888
- },
1889
-
1890
- register: function(type, klass) {
1891
- this._transports.push([type, klass]);
1892
- klass.prototype.connectionType = type;
1893
- },
1894
-
1895
- getConnectionTypes: function() {
1896
- return array.map(this._transports, function(t) { return t[0] });
1897
- },
1898
-
1899
- _transports: []
1900
- });
1901
-
1902
- extend(Transport.prototype, Logging);
1903
- extend(Transport.prototype, Timeouts);
1904
-
1905
- module.exports = Transport;
1906
-
1907
-
1908
-
1909
- /***/ },
1910
- /* 21 */
1911
- /***/ function(module, exports) {
1912
-
1913
- /* WEBPACK VAR INJECTION */(function(global) {/*** IMPORTS FROM imports-loader ***/
1914
- var define = false;
1915
-
1916
- 'use strict';
1917
-
1918
- module.exports = {
1919
- addTimeout: function(name, delay, callback, context) {
1920
- this._timeouts = this._timeouts || {};
1921
- if (this._timeouts.hasOwnProperty(name)) return;
1922
- var self = this;
1923
- this._timeouts[name] = global.setTimeout(function() {
1924
- delete self._timeouts[name];
1925
- callback.call(context);
1926
- }, 1000 * delay);
1927
- },
1928
-
1929
- removeTimeout: function(name) {
1930
- this._timeouts = this._timeouts || {};
1931
- var timeout = this._timeouts[name];
1932
- if (!timeout) return;
1933
- global.clearTimeout(timeout);
1934
- delete this._timeouts[name];
1935
- },
1936
-
1937
- removeAllTimeouts: function() {
1938
- this._timeouts = this._timeouts || {};
1939
- for (var name in this._timeouts) this.removeTimeout(name);
1940
- }
1941
- };
1942
-
1943
-
1944
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
1945
-
1946
- /***/ },
1947
- /* 22 */
1948
- /***/ function(module, exports, __webpack_require__) {
1949
-
1950
- /* WEBPACK VAR INJECTION */(function(global) {/*** IMPORTS FROM imports-loader ***/
1951
- var define = false;
1952
-
1953
- 'use strict';
1954
-
1955
- var Class = __webpack_require__(5),
1956
- Promise = __webpack_require__(7),
1957
- Set = __webpack_require__(23),
1958
- URI = __webpack_require__(8),
1959
- browser = __webpack_require__(10),
1960
- copyObject = __webpack_require__(24),
1961
- extend = __webpack_require__(6),
1962
- toJSON = __webpack_require__(3),
1963
- ws = __webpack_require__(25),
1964
- Deferrable = __webpack_require__(12),
1965
- Transport = __webpack_require__(20);
1966
-
1967
- var WebSocket = extend(Class(Transport, {
1968
- UNCONNECTED: 1,
1969
- CONNECTING: 2,
1970
- CONNECTED: 3,
1971
-
1972
- batching: false,
1973
-
1974
- isUsable: function(callback, context) {
1975
- this.callback(function() { callback.call(context, true) });
1976
- this.errback(function() { callback.call(context, false) });
1977
- this.connect();
1978
- },
1979
-
1980
- request: function(messages) {
1981
- this._pending = this._pending || new Set();
1982
- for (var i = 0, n = messages.length; i < n; i++) this._pending.add(messages[i]);
1983
-
1984
- var promise = new Promise();
1985
-
1986
- this.callback(function(socket) {
1987
- if (!socket || socket.readyState !== 1) return;
1988
- socket.send(toJSON(messages));
1989
- Promise.fulfill(promise, socket);
1990
- }, this);
1991
-
1992
- this.connect();
1993
-
1994
- return {
1995
- abort: function() { promise.then(function(ws) { ws.close() }) }
1996
- };
1997
- },
1998
-
1999
- connect: function() {
2000
- if (WebSocket._unloaded) return;
2001
-
2002
- this._state = this._state || this.UNCONNECTED;
2003
- if (this._state !== this.UNCONNECTED) return;
2004
- this._state = this.CONNECTING;
2005
-
2006
- var socket = this._createSocket();
2007
- if (!socket) return this.setDeferredStatus('failed');
2008
-
2009
- var self = this;
2010
-
2011
- socket.onopen = function() {
2012
- if (socket.headers) self._storeCookies(socket.headers['set-cookie']);
2013
- self._socket = socket;
2014
- self._state = self.CONNECTED;
2015
- self._everConnected = true;
2016
- self._ping();
2017
- self.setDeferredStatus('succeeded', socket);
2018
- };
2019
-
2020
- var closed = false;
2021
- socket.onclose = socket.onerror = function() {
2022
- if (closed) return;
2023
- closed = true;
2024
-
2025
- var wasConnected = (self._state === self.CONNECTED);
2026
- socket.onopen = socket.onclose = socket.onerror = socket.onmessage = null;
2027
-
2028
- delete self._socket;
2029
- self._state = self.UNCONNECTED;
2030
- self.removeTimeout('ping');
2031
-
2032
- var pending = self._pending ? self._pending.toArray() : [];
2033
- delete self._pending;
2034
-
2035
- if (wasConnected || self._everConnected) {
2036
- self.setDeferredStatus('unknown');
2037
- self._handleError(pending, wasConnected);
2038
- } else {
2039
- self.setDeferredStatus('failed');
2040
- }
2041
- };
2042
-
2043
- socket.onmessage = function(event) {
2044
- var replies = JSON.parse(event.data);
2045
- if (!replies) return;
2046
-
2047
- replies = [].concat(replies);
2048
-
2049
- for (var i = 0, n = replies.length; i < n; i++) {
2050
- if (replies[i].successful === undefined) continue;
2051
- self._pending.remove(replies[i]);
2052
- }
2053
- self._receive(replies);
2054
- };
2055
- },
2056
-
2057
- close: function() {
2058
- if (!this._socket) return;
2059
- this._socket.close();
2060
- },
2061
-
2062
- _createSocket: function() {
2063
- var url = WebSocket.getSocketUrl(this.endpoint),
2064
- headers = this._dispatcher.headers,
2065
- extensions = this._dispatcher.wsExtensions,
2066
- cookie = this._getCookies(),
2067
- tls = this._dispatcher.tls,
2068
- options = {extensions: extensions, headers: headers, proxy: this._proxy, tls: tls};
2069
-
2070
- if (cookie !== '') options.headers['Cookie'] = cookie;
2071
-
2072
- return ws.create(url, [], options);
2073
- },
2074
-
2075
- _ping: function() {
2076
- if (!this._socket || this._socket.readyState !== 1) return;
2077
- this._socket.send('[]');
2078
- this.addTimeout('ping', this._dispatcher.timeout / 2, this._ping, this);
2079
- }
2080
-
2081
- }), {
2082
- PROTOCOLS: {
2083
- 'http:': 'ws:',
2084
- 'https:': 'wss:'
2085
- },
2086
-
2087
- create: function(dispatcher, endpoint) {
2088
- var sockets = dispatcher.transports.websocket = dispatcher.transports.websocket || {};
2089
- sockets[endpoint.href] = sockets[endpoint.href] || new this(dispatcher, endpoint);
2090
- return sockets[endpoint.href];
2091
- },
2092
-
2093
- getSocketUrl: function(endpoint) {
2094
- endpoint = copyObject(endpoint);
2095
- endpoint.protocol = this.PROTOCOLS[endpoint.protocol];
2096
- return URI.stringify(endpoint);
2097
- },
2098
-
2099
- isUsable: function(dispatcher, endpoint, callback, context) {
2100
- this.create(dispatcher, endpoint).isUsable(callback, context);
2101
- }
2102
- });
2103
-
2104
- extend(WebSocket.prototype, Deferrable);
2105
-
2106
- if (browser.Event && global.onbeforeunload !== undefined)
2107
- browser.Event.on(global, 'beforeunload', function() { WebSocket._unloaded = true });
2108
-
2109
- module.exports = WebSocket;
2110
-
2111
-
2112
- /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
2113
-
2114
- /***/ },
2115
- /* 23 */
2116
- /***/ function(module, exports, __webpack_require__) {
2117
-
2118
- /*** IMPORTS FROM imports-loader ***/
2119
- var define = false;
2120
-
2121
- 'use strict';
2122
-
2123
- var Class = __webpack_require__(5);
2124
-
2125
- module.exports = Class({
2126
- initialize: function() {
2127
- this._index = {};
2128
- },
2129
-
2130
- add: function(item) {
2131
- var key = (item.id !== undefined) ? item.id : item;
2132
- if (this._index.hasOwnProperty(key)) return false;
2133
- this._index[key] = item;
2134
- return true;
2135
- },
2136
-
2137
- forEach: function(block, context) {
2138
- for (var key in this._index) {
2139
- if (this._index.hasOwnProperty(key))
2140
- block.call(context, this._index[key]);
2141
- }
2142
- },
2143
-
2144
- isEmpty: function() {
2145
- for (var key in this._index) {
2146
- if (this._index.hasOwnProperty(key)) return false;
2147
- }
2148
- return true;
2149
- },
2150
-
2151
- member: function(item) {
2152
- for (var key in this._index) {
2153
- if (this._index[key] === item) return true;
2154
- }
2155
- return false;
2156
- },
2157
-
2158
- remove: function(item) {
2159
- var key = (item.id !== undefined) ? item.id : item;
2160
- var removed = this._index[key];
2161
- delete this._index[key];
2162
- return removed;
2163
- },
2164
-
2165
- toArray: function() {
2166
- var array = [];
2167
- this.forEach(function(item) { array.push(item) });
2168
- return array;
2169
- }
2170
- });
2171
-
2172
-
2173
-
2174
- /***/ },
2175
- /* 24 */
2176
- /***/ function(module, exports) {
2177
-
2178
- /*** IMPORTS FROM imports-loader ***/
2179
- var define = false;
2180
-
2181
- 'use strict';
2182
-
2183
- var copyObject = function(object) {
2184
- var clone, i, key;
2185
- if (object instanceof Array) {
2186
- clone = [];
2187
- i = object.length;
2188
- while (i--) clone[i] = copyObject(object[i]);
2189
- return clone;
2190
- } else if (typeof object === 'object') {
2191
- clone = (object === null) ? null : {};
2192
- for (key in object) clone[key] = copyObject(object[key]);
2193
- return clone;
2194
- } else {
2195
- return object;
2196
- }
2197
- };
2198
-
2199
- module.exports = copyObject;
2200
-
2201
-
2202
-
2203
- /***/ },
2204
- /* 25 */
2205
- /***/ function(module, exports) {
2206
-
2207
- /*** IMPORTS FROM imports-loader ***/
2208
- var define = false;
2209
-
2210
- 'use strict';
2211
-
2212
- var WS = window.MozWebSocket || window.WebSocket;
2213
-
2214
- module.exports = {
2215
- create: function(url, protocols, options) {
2216
- return new WS(url);
2217
- }
2218
- };
2219
-
2220
-
2221
-
2222
- /***/ },
2223
- /* 26 */
2224
- /***/ function(module, exports, __webpack_require__) {
2225
-
2226
- /*** IMPORTS FROM imports-loader ***/
2227
- var define = false;
2228
-
2229
- 'use strict';
2230
-
2231
- var Class = __webpack_require__(5),
2232
- URI = __webpack_require__(8),
2233
- copyObject = __webpack_require__(24),
2234
- extend = __webpack_require__(6),
2235
- Deferrable = __webpack_require__(12),
2236
- Transport = __webpack_require__(20),
2237
- XHR = __webpack_require__(27);
2238
-
2239
- var EventSource = extend(Class(Transport, {
2240
- initialize: function(dispatcher, endpoint) {
2241
- Transport.prototype.initialize.call(this, dispatcher, endpoint);
2242
- if (!window.EventSource) return this.setDeferredStatus('failed');
2243
-
2244
- this._xhr = new XHR(dispatcher, endpoint);
2245
-
2246
- endpoint = copyObject(endpoint);
2247
- endpoint.pathname += '/' + dispatcher.clientId;
2248
-
2249
- var socket = new EventSource(URI.stringify(endpoint)),
2250
- self = this;
2251
-
2252
- socket.onopen = function() {
2253
- self._everConnected = true;
2254
- self.setDeferredStatus('succeeded');
2255
- };
2256
-
2257
- socket.onerror = function() {
2258
- if (self._everConnected) {
2259
- self._handleError([]);
2260
- } else {
2261
- self.setDeferredStatus('failed');
2262
- socket.close();
2263
- }
2264
- };
2265
-
2266
- socket.onmessage = function(event) {
2267
- self._receive(JSON.parse(event.data));
2268
- };
2269
-
2270
- this._socket = socket;
2271
- },
2272
-
2273
- close: function() {
2274
- if (!this._socket) return;
2275
- this._socket.onopen = this._socket.onerror = this._socket.onmessage = null;
2276
- this._socket.close();
2277
- delete this._socket;
2278
- },
2279
-
2280
- isUsable: function(callback, context) {
2281
- this.callback(function() { callback.call(context, true) });
2282
- this.errback(function() { callback.call(context, false) });
2283
- },
2284
-
2285
- encode: function(messages) {
2286
- return this._xhr.encode(messages);
2287
- },
2288
-
2289
- request: function(messages) {
2290
- return this._xhr.request(messages);
2291
- }
2292
-
2293
- }), {
2294
- isUsable: function(dispatcher, endpoint, callback, context) {
2295
- var id = dispatcher.clientId;
2296
- if (!id) return callback.call(context, false);
2297
-
2298
- XHR.isUsable(dispatcher, endpoint, function(usable) {
2299
- if (!usable) return callback.call(context, false);
2300
- this.create(dispatcher, endpoint).isUsable(callback, context);
2301
- }, this);
2302
- },
2303
-
2304
- create: function(dispatcher, endpoint) {
2305
- var sockets = dispatcher.transports.eventsource = dispatcher.transports.eventsource || {},
2306
- id = dispatcher.clientId;
2307
-
2308
- var url = copyObject(endpoint);
2309
- url.pathname += '/' + (id || '');
2310
- url = URI.stringify(url);
2311
-
2312
- sockets[url] = sockets[url] || new this(dispatcher, endpoint);
2313
- return sockets[url];
2314
- }
2315
- });
2316
-
2317
- extend(EventSource.prototype, Deferrable);
2318
-
2319
- module.exports = EventSource;
2320
-
2321
-
2322
-
2323
- /***/ },
2324
- /* 27 */
2325
- /***/ function(module, exports, __webpack_require__) {
2326
-
2327
- /*** IMPORTS FROM imports-loader ***/
2328
- var define = false;
2329
-
2330
- 'use strict';
2331
-
2332
- var Class = __webpack_require__(5),
2333
- URI = __webpack_require__(8),
2334
- browser = __webpack_require__(10),
2335
- extend = __webpack_require__(6),
2336
- toJSON = __webpack_require__(3),
2337
- Transport = __webpack_require__(20);
2338
-
2339
- var XHR = extend(Class(Transport, {
2340
- encode: function(messages) {
2341
- return toJSON(messages);
2342
- },
2343
-
2344
- request: function(messages) {
2345
- var href = this.endpoint.href,
2346
- xhr = window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest(),
2347
- self = this;
2348
-
2349
- xhr.open('POST', href, true);
2350
- xhr.setRequestHeader('Content-Type', 'application/json');
2351
- xhr.setRequestHeader('Pragma', 'no-cache');
2352
- xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
2353
-
2354
- var headers = this._dispatcher.headers;
2355
- for (var key in headers) {
2356
- if (!headers.hasOwnProperty(key)) continue;
2357
- xhr.setRequestHeader(key, headers[key]);
2358
- }
2359
-
2360
- var abort = function() { xhr.abort() };
2361
- if (window.onbeforeunload !== undefined)
2362
- browser.Event.on(window, 'beforeunload', abort);
2363
-
2364
- xhr.onreadystatechange = function() {
2365
- if (!xhr || xhr.readyState !== 4) return;
2366
-
2367
- var replies = null,
2368
- status = xhr.status,
2369
- text = xhr.responseText,
2370
- successful = (status >= 200 && status < 300) || status === 304 || status === 1223;
2371
-
2372
- if (window.onbeforeunload !== undefined)
2373
- browser.Event.detach(window, 'beforeunload', abort);
2374
-
2375
- xhr.onreadystatechange = function() {};
2376
- xhr = null;
2377
-
2378
- if (!successful) return self._handleError(messages);
2379
-
2380
- try {
2381
- replies = JSON.parse(text);
2382
- } catch (e) {}
2383
-
2384
- if (replies)
2385
- self._receive(replies);
2386
- else
2387
- self._handleError(messages);
2388
- };
2389
-
2390
- xhr.send(this.encode(messages));
2391
- return xhr;
2392
- }
2393
- }), {
2394
- isUsable: function(dispatcher, endpoint, callback, context) {
2395
- callback.call(context, URI.isSameOrigin(endpoint));
2396
- }
2397
- });
2398
-
2399
- module.exports = XHR;
2400
-
2401
-
2402
-
2403
- /***/ },
2404
- /* 28 */
2405
- /***/ function(module, exports, __webpack_require__) {
2406
-
2407
- /*** IMPORTS FROM imports-loader ***/
2408
- var define = false;
2409
-
2410
- 'use strict';
2411
-
2412
- var Class = __webpack_require__(5),
2413
- Set = __webpack_require__(23),
2414
- URI = __webpack_require__(8),
2415
- extend = __webpack_require__(6),
2416
- toJSON = __webpack_require__(3),
2417
- Transport = __webpack_require__(20);
2418
-
2419
- var CORS = extend(Class(Transport, {
2420
- encode: function(messages) {
2421
- return 'message=' + encodeURIComponent(toJSON(messages));
2422
- },
2423
-
2424
- request: function(messages) {
2425
- var xhrClass = window.XDomainRequest ? XDomainRequest : XMLHttpRequest,
2426
- xhr = new xhrClass(),
2427
- id = ++CORS._id,
2428
- headers = this._dispatcher.headers,
2429
- self = this,
2430
- key;
2431
-
2432
- xhr.open('POST', URI.stringify(this.endpoint), true);
2433
-
2434
- if (xhr.setRequestHeader) {
2435
- xhr.setRequestHeader('Pragma', 'no-cache');
2436
- for (key in headers) {
2437
- if (!headers.hasOwnProperty(key)) continue;
2438
- xhr.setRequestHeader(key, headers[key]);
2439
- }
2440
- }
2441
-
2442
- var cleanUp = function() {
2443
- if (!xhr) return false;
2444
- CORS._pending.remove(id);
2445
- xhr.onload = xhr.onerror = xhr.ontimeout = xhr.onprogress = null;
2446
- xhr = null;
2447
- };
2448
-
2449
- xhr.onload = function() {
2450
- var replies = null;
2451
- try {
2452
- replies = JSON.parse(xhr.responseText);
2453
- } catch (e) {}
2454
-
2455
- cleanUp();
2456
-
2457
- if (replies)
2458
- self._receive(replies);
2459
- else
2460
- self._handleError(messages);
2461
- };
2462
-
2463
- xhr.onerror = xhr.ontimeout = function() {
2464
- cleanUp();
2465
- self._handleError(messages);
2466
- };
2467
-
2468
- xhr.onprogress = function() {};
2469
-
2470
- if (xhrClass === window.XDomainRequest)
2471
- CORS._pending.add({id: id, xhr: xhr});
2472
-
2473
- xhr.send(this.encode(messages));
2474
- return xhr;
2475
- }
2476
- }), {
2477
- _id: 0,
2478
- _pending: new Set(),
2479
-
2480
- isUsable: function(dispatcher, endpoint, callback, context) {
2481
- if (URI.isSameOrigin(endpoint))
2482
- return callback.call(context, false);
2483
-
2484
- if (window.XDomainRequest)
2485
- return callback.call(context, endpoint.protocol === location.protocol);
2486
-
2487
- if (window.XMLHttpRequest) {
2488
- var xhr = new XMLHttpRequest();
2489
- return callback.call(context, xhr.withCredentials !== undefined);
2490
- }
2491
- return callback.call(context, false);
2492
- }
2493
- });
2494
-
2495
- module.exports = CORS;
2496
-
2497
-
2498
-
2499
- /***/ },
2500
- /* 29 */
2501
- /***/ function(module, exports, __webpack_require__) {
2502
-
2503
- /*** IMPORTS FROM imports-loader ***/
2504
- var define = false;
2505
-
2506
- 'use strict';
2507
-
2508
- var Class = __webpack_require__(5),
2509
- URI = __webpack_require__(8),
2510
- copyObject = __webpack_require__(24),
2511
- extend = __webpack_require__(6),
2512
- toJSON = __webpack_require__(3),
2513
- Transport = __webpack_require__(20);
2514
-
2515
- var JSONP = extend(Class(Transport, {
2516
- encode: function(messages) {
2517
- var url = copyObject(this.endpoint);
2518
- url.query.message = toJSON(messages);
2519
- url.query.jsonp = '__jsonp' + JSONP._cbCount + '__';
2520
- return URI.stringify(url);
2521
- },
2522
-
2523
- request: function(messages) {
2524
- var head = document.getElementsByTagName('head')[0],
2525
- script = document.createElement('script'),
2526
- callbackName = JSONP.getCallbackName(),
2527
- endpoint = copyObject(this.endpoint),
2528
- self = this;
2529
-
2530
- endpoint.query.message = toJSON(messages);
2531
- endpoint.query.jsonp = callbackName;
2532
-
2533
- var cleanup = function() {
2534
- if (!window[callbackName]) return false;
2535
- window[callbackName] = undefined;
2536
- try { delete window[callbackName] } catch (e) {}
2537
- script.parentNode.removeChild(script);
2538
- };
2539
-
2540
- window[callbackName] = function(replies) {
2541
- cleanup();
2542
- self._receive(replies);
2543
- };
2544
-
2545
- script.type = 'text/javascript';
2546
- script.src = URI.stringify(endpoint);
2547
- head.appendChild(script);
2548
-
2549
- script.onerror = function() {
2550
- cleanup();
2551
- self._handleError(messages);
2552
- };
2553
-
2554
- return {abort: cleanup};
2555
- }
2556
- }), {
2557
- _cbCount: 0,
2558
-
2559
- getCallbackName: function() {
2560
- this._cbCount += 1;
2561
- return '__jsonp' + this._cbCount + '__';
2562
- },
2563
-
2564
- isUsable: function(dispatcher, endpoint, callback, context) {
2565
- callback.call(context, true);
2566
- }
2567
- });
2568
-
2569
- module.exports = JSONP;
2570
-
2571
-
2572
-
2573
- /***/ },
2574
- /* 30 */
2575
- /***/ function(module, exports, __webpack_require__) {
2576
-
2577
- /*** IMPORTS FROM imports-loader ***/
2578
- var define = false;
2579
-
2580
- 'use strict';
2581
-
2582
- var extend = __webpack_require__(6);
2583
-
2584
- var Scheduler = function(message, options) {
2585
- this.message = message;
2586
- this.options = options;
2587
- this.attempts = 0;
2588
- };
2589
-
2590
- extend(Scheduler.prototype, {
2591
- getTimeout: function() {
2592
- return this.options.timeout;
2593
- },
2594
-
2595
- getInterval: function() {
2596
- return this.options.interval;
2597
- },
2598
-
2599
- isDeliverable: function() {
2600
- var attempts = this.options.attempts,
2601
- made = this.attempts,
2602
- deadline = this.options.deadline,
2603
- now = new Date().getTime();
2604
-
2605
- if (attempts !== undefined && made >= attempts)
2606
- return false;
2607
-
2608
- if (deadline !== undefined && now > deadline)
2609
- return false;
2610
-
2611
- return true;
2612
- },
2613
-
2614
- send: function() {
2615
- this.attempts += 1;
2616
- },
2617
-
2618
- succeed: function() {},
2619
-
2620
- fail: function() {},
2621
-
2622
- abort: function() {}
2623
- });
2624
-
2625
- module.exports = Scheduler;
2626
-
2627
-
2628
-
2629
- /***/ },
2630
- /* 31 */
2631
- /***/ function(module, exports, __webpack_require__) {
2632
-
2633
- /*** IMPORTS FROM imports-loader ***/
2634
- var define = false;
2635
-
2636
- 'use strict';
2637
-
2638
- var Class = __webpack_require__(5),
2639
- Grammar = __webpack_require__(16);
2640
-
2641
- var Error = Class({
2642
- initialize: function(code, params, message) {
2643
- this.code = code;
2644
- this.params = Array.prototype.slice.call(params);
2645
- this.message = message;
2646
- },
2647
-
2648
- toString: function() {
2649
- return this.code + ':' +
2650
- this.params.join(',') + ':' +
2651
- this.message;
2652
- }
2653
- });
2654
-
2655
- Error.parse = function(message) {
2656
- message = message || '';
2657
- if (!Grammar.ERROR.test(message)) return new Error(null, [], message);
2658
-
2659
- var parts = message.split(':'),
2660
- code = parseInt(parts[0]),
2661
- params = parts[1].split(','),
2662
- message = parts[2];
2663
-
2664
- return new Error(code, params, message);
2665
- };
2666
-
2667
- // http://code.google.com/p/cometd/wiki/BayeuxCodes
2668
- var errors = {
2669
- versionMismatch: [300, 'Version mismatch'],
2670
- conntypeMismatch: [301, 'Connection types not supported'],
2671
- extMismatch: [302, 'Extension mismatch'],
2672
- badRequest: [400, 'Bad request'],
2673
- clientUnknown: [401, 'Unknown client'],
2674
- parameterMissing: [402, 'Missing required parameter'],
2675
- channelForbidden: [403, 'Forbidden channel'],
2676
- channelUnknown: [404, 'Unknown channel'],
2677
- channelInvalid: [405, 'Invalid channel'],
2678
- extUnknown: [406, 'Unknown extension'],
2679
- publishFailed: [407, 'Failed to publish'],
2680
- serverError: [500, 'Internal server error']
2681
- };
2682
-
2683
- for (var name in errors)
2684
- (function(name) {
2685
- Error[name] = function() {
2686
- return new Error(errors[name][0], arguments, errors[name][1]).toString();
2687
- };
2688
- })(name);
2689
-
2690
- module.exports = Error;
2691
-
2692
-
2693
-
2694
- /***/ },
2695
- /* 32 */
2696
- /***/ function(module, exports, __webpack_require__) {
2697
-
2698
- /*** IMPORTS FROM imports-loader ***/
2699
- var define = false;
2700
-
2701
- 'use strict';
2702
-
2703
- var extend = __webpack_require__(6),
2704
- Logging = __webpack_require__(2);
2705
-
2706
- var Extensible = {
2707
- addExtension: function(extension) {
2708
- this._extensions = this._extensions || [];
2709
- this._extensions.push(extension);
2710
- if (extension.added) extension.added(this);
2711
- },
2712
-
2713
- removeExtension: function(extension) {
2714
- if (!this._extensions) return;
2715
- var i = this._extensions.length;
2716
- while (i--) {
2717
- if (this._extensions[i] !== extension) continue;
2718
- this._extensions.splice(i,1);
2719
- if (extension.removed) extension.removed(this);
2720
- }
2721
- },
2722
-
2723
- pipeThroughExtensions: function(stage, message, request, callback, context) {
2724
- this.debug('Passing through ? extensions: ?', stage, message);
2725
-
2726
- if (!this._extensions) return callback.call(context, message);
2727
- var extensions = this._extensions.slice();
2728
-
2729
- var pipe = function(message) {
2730
- if (!message) return callback.call(context, message);
2731
-
2732
- var extension = extensions.shift();
2733
- if (!extension) return callback.call(context, message);
2734
-
2735
- var fn = extension[stage];
2736
- if (!fn) return pipe(message);
2737
-
2738
- if (fn.length >= 3) extension[stage](message, request, pipe);
2739
- else extension[stage](message, pipe);
2740
- };
2741
- pipe(message);
2742
- }
2743
- };
2744
-
2745
- extend(Extensible, Logging);
2746
-
2747
- module.exports = Extensible;
2748
-
2749
-
2750
-
2751
- /***/ },
2752
- /* 33 */
2753
- /***/ function(module, exports, __webpack_require__) {
2754
-
2755
- /*** IMPORTS FROM imports-loader ***/
2756
- var define = false;
2757
-
2758
- 'use strict';
2759
-
2760
- var Class = __webpack_require__(5),
2761
- Deferrable = __webpack_require__(12);
2762
-
2763
- module.exports = Class(Deferrable);
2764
-
2765
-
2766
-
2767
- /***/ },
2768
- /* 34 */
2769
- /***/ function(module, exports, __webpack_require__) {
2770
-
2771
- /*** IMPORTS FROM imports-loader ***/
2772
- var define = false;
2773
-
2774
- 'use strict';
2775
-
2776
- var Class = __webpack_require__(5),
2777
- extend = __webpack_require__(6),
2778
- Deferrable = __webpack_require__(12);
2779
-
2780
- var Subscription = Class({
2781
- initialize: function(client, channels, callback, context) {
2782
- this._client = client;
2783
- this._channels = channels;
2784
- this._callback = callback;
2785
- this._context = context;
2786
- this._cancelled = false;
2787
- },
2788
-
2789
- cancel: function() {
2790
- if (this._cancelled) return;
2791
- this._client.unsubscribe(this._channels, this._callback, this._context);
2792
- this._cancelled = true;
2793
- },
2794
-
2795
- unsubscribe: function() {
2796
- this.cancel();
2797
- }
2798
- });
2799
-
2800
- extend(Subscription.prototype, Deferrable);
2801
-
2802
- module.exports = Subscription;
2803
-
2804
-
2805
-
2806
- /***/ }
2807
- /******/ ]);
2808
- //# sourceMappingURL=faye-browser.js.map