// pow.live: Synchronized presentations across multiple devices. // Powered by http://usepow.com/live pow.bundle({ "data": "pow.module(\"live\",function(){(function(c){c.version=\"0.7.3\";c.protocol=1;c.transports=[];c.j=[];c.sockets={};c.connect=function(a,b){var g=c.util.parseUri(a),d,f;if(\"undefined\"!=typeof document)g.host=g.host||document.domain,g.port=g.port||document.location.port;d=c.util.uniqueUri(g);var e={host:g.host,secure:g.protocol==\"https\",port:g.port||80};c.util.merge(e,b);if(e[\"force new connection\"]||!c.sockets[d])f=new c.Socket(e);!e[\"force new connection\"]&&f&&(c.sockets[d]=f);f=f||c.sockets[d];return f.of(g.path.length>\n1?g.path:\"\")}})(\"object\"===typeof module?module.exports:window.io={});(function(c){var a=c.util={},b=/^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/,g=[\"source\",\"protocol\",\"authority\",\"userInfo\",\"user\",\"password\",\"host\",\"port\",\"relative\",\"path\",\"directory\",\"file\",\"query\",\"anchor\"];a.parseUri=function(a){for(var a=b.exec(a||\"\"),d={},h=14;h--;)d[g[h]]=a[h]||\n\"\";return d};a.uniqueUri=function(a){var d=a.protocol,b=a.host,a=a.port;\"undefined\"!=typeof document?(b=b||document.domain,a=a||(d==\"https\"&&document.location.protocol!==\"https:\"?443:document.location.port)):(b=b||\"localhost\",!a&&d==\"https\"&&(a=443));return(d||\"http\")+\"://\"+b+\":\"+(a||80)};var d=!1;a.load=function(f){if(document.readyState===\"complete\"||d)return f();a.on(window,\"load\",f,!1)};a.on=function(a,d,b,g){a.attachEvent?a.attachEvent(\"on\"+d,b):a.addEventListener(d,b,g)};a.request=function(d){if(\"undefined\"!=\ntypeof window){if(d&&window.XDomainRequest)return new XDomainRequest;if(window.XMLHttpRequest&&(!d||a.ua.hasCORS))return new XMLHttpRequest;if(!d)try{return new window.ActiveXObject(\"Microsoft.XMLHTTP\")}catch(b){}}return null};\"undefined\"!=typeof window&&a.load(function(){d=!0});a.defer=function(d){if(!a.ua.webkit)return d();a.load(function(){setTimeout(d,100)})};a.merge=function(d,b,g,c){var c=c||[],g=typeof g==\"undefined\"?2:g,l;for(l in b)b.hasOwnProperty(l)&&a.indexOf(c,l)<0&&(typeof d[l]!==\"object\"||\n!g?(d[l]=b[l],c.push(b[l])):a.merge(d[l],b[l],g-1,c));return d};a.mixin=function(d,b){a.merge(d.prototype,b.prototype)};a.inherit=function(d,b){d.prototype=new b;a.merge(d,b)};a.isArray=Array.isArray||function(a){return Object.prototype.toString.call(a)===\"[object Array]\"};a.intersect=function(d,b){for(var g=[],c=d.length>b.length?d:b,l=d.length>b.length?b:d,k=0,p=l.length;k
0&&a.splice(0,\n1)[0]!=f.transport.name;);if(a.length)f.transport=f.getTransport(a),f.connect()}(!f.remainingTransports||f.remainingTransports.length==0)&&f.publish(\"connect_failed\")}f.remainingTransports&&f.remainingTransports.length==0&&delete f.remainingTransports},f.options[\"connect timeout\"]);if(b&&typeof b==\"function\")f.once(\"connect\",b)}});return this};b.prototype.packet=function(a){this.connected&&!this.doBuffer?this.transport.packet(a):this.buffer.push(a);return this};b.prototype.setBuffer=function(a){this.doBuffer=\na;if(!a&&this.connected&&this.buffer.length)this.transport.payload(this.buffer),this.buffer=[]};b.prototype.disconnect=function(){this.connected&&(this.open&&this.of(\"\").packet({type:\"disconnect\"}),this.onDisconnect(\"booted\"));return this};b.prototype.disconnectSync=function(){a.util.request().open(\"GET\",this.resource+\"/\"+a.protocol+\"/\"+this.sessionid,!0);this.onDisconnect(\"booted\")};b.prototype.isXDomain=function(){var a=window.location.port||80;return this.options.host!==document.domain||this.options.port!=\na};b.prototype.onConnect=function(){this.connected=!0;this.connecting=!1;this.doBuffer||this.setBuffer(!1);this.emit(\"connect\")};b.prototype.onOpen=function(){this.open=!0};b.prototype.onClose=function(){this.open=!1};b.prototype.onPacket=function(a){this.of(a.endpoint).onPacket(a)};b.prototype.onError=function(a){a&&a.advice&&a.advice===\"reconnect\"&&(this.disconnect(),this.reconnect());this.publish(\"error\",a&&a.reason?a.reason:a)};b.prototype.onDisconnect=function(a){var b=this.connected;this.open=\nthis.connecting=this.connected=!1;b&&(this.transport.close(),this.transport.clearTimeouts(),this.publish(\"disconnect\",a),\"booted\"!=a&&this.options.reconnect&&!this.reconnecting&&this.reconnect())};b.prototype.reconnect=function(){function a(){e.connected&&e.publish(\"reconnect\",e.transport.name,e.reconnectionAttempts);e.removeListener(\"connect_failed\",b);e.removeListener(\"connect\",b);e.reconnecting=!1;delete e.reconnectionAttempts;delete e.reconnectionDelay;delete e.reconnectionTimer;delete e.redoTransports;\ne.options[\"try multiple transports\"]=c}function b(){if(e.reconnecting){if(e.connected)return a();if(e.connecting&&e.reconnecting)return e.reconnectionTimer=setTimeout(b,1E3);e.reconnectionAttempts++>=g?e.redoTransports?(e.publish(\"reconnect_failed\"),a()):(e.on(\"connect_failed\",b),e.options[\"try multiple transports\"]=!0,e.transport=e.getTransport(),e.redoTransports=!0,e.connect()):(e.reconnectionDelay*=2,e.connect(),e.publish(\"reconnecting\",e.reconnectionDelay,e.reconnectionAttempts),e.reconnectionTimer=\nsetTimeout(b,e.reconnectionDelay))}}this.reconnecting=!0;this.reconnectionAttempts=0;this.reconnectionDelay=this.options[\"reconnection delay\"];var e=this,g=this.options[\"max reconnection attempts\"],c=this.options[\"try multiple transports\"];this.options[\"try multiple transports\"]=!1;this.reconnectionTimer=setTimeout(b,this.reconnectionDelay);this.on(\"connect\",b)}})(\"undefined\"!=typeof io?io:module.exports,\"undefined\"!=typeof io?io:module.parent.exports);(function(c,a){function b(a,b){this.socket=a;\nthis.name=b||\"\";this.flags={};this.json=new g(this,\"json\");this.ackPackets=0;this.acks={}}function g(a,b){this.namespace=a;this.name=b}c.SocketNamespace=b;a.util.mixin(b,a.EventEmitter);b.prototype.$emit=a.EventEmitter.prototype.emit;b.prototype.packet=function(a){a.endpoint=this.name;this.socket.packet(a);this.flags={};return this};b.prototype.send=function(a,b){var e={type:this.flags.json?\"json\":\"message\",data:a};if(\"function\"==typeof b)e.id=++this.ackPackets,e.ack=!0,this.acks[e.id]=b;return this.packet(e)};\nb.prototype.emit=function(a){var b=Array.prototype.slice.call(arguments,1),e=b[b.length-1],g={type:\"event\",name:a};if(\"function\"==typeof e)g.id=++this.ackPackets,g.ack=\"data\",this.acks[g.id]=e,b=b.slice(0,b.length-1);g.args=b;return this.packet(g)};b.prototype.disconnect=function(){this.name===\"\"?this.socket.disconnect():(this.packet({type:\"disconnect\"}),this.$emit(\"disconnect\"));return this};b.prototype.onPacket=function(b){function g(){e.packet({type:\"ack\",args:a.util.toArray(arguments),ackId:b.id})}\nvar e=this;switch(b.type){case \"connect\":this.$emit(\"connect\");break;case \"disconnect\":if(this.name===\"\")this.socket.onDisconnect(b.reason||\"booted\");else this.$emit(\"disconnect\",b.reason);break;case \"message\":case \"json\":var c=[\"message\",b.data];b.ack==\"data\"?c.push(g):b.ack&&this.packet({type:\"ack\",ackId:b.id});this.$emit.apply(this,c);break;case \"event\":c=[b.name].concat(b.args);b.ack==\"data\"&&c.push(g);this.$emit.apply(this,c);break;case \"ack\":this.acks[b.ackId]&&(this.acks[b.ackId].apply(this,\nb.args),delete this.acks[b.ackId]);break;case \"error\":if(b.advice)this.socket.onError(b);else b.reason==\"unauthorized\"?this.$emit(\"connect_failed\",b.reason):this.$emit(\"error\",b.reason)}};g.prototype.send=function(){this.namespace.flags[this.name]=!0;this.namespace.send.apply(this.namespace,arguments)};g.prototype.emit=function(){this.namespace.flags[this.name]=!0;this.namespace.emit.apply(this.namespace,arguments)}})(\"undefined\"!=typeof io?io:module.exports,\"undefined\"!=typeof io?io:module.parent.exports);\n(function(c,a){function b(){a.Transport.apply(this,arguments)}c.websocket=b;a.util.inherit(b,a.Transport);b.prototype.name=\"websocket\";b.prototype.open=function(){this.websocket=new WebSocket(this.prepareUrl());var a=this;this.websocket.onopen=function(){a.onOpen();a.socket.setBuffer(!1)};this.websocket.onmessage=function(b){a.onData(b.data)};this.websocket.onclose=function(){a.onClose();a.socket.setBuffer(!0)};this.websocket.onerror=function(b){a.onError(b)};return this};b.prototype.send=function(a){this.websocket.send(a);\nreturn this};b.prototype.payload=function(a){for(var b=0,f=a.length;b