text: !function(b){if("object"==typeof exports&&"undefined"!=typeof module){module.exports=b()}else{if("function"==typeof define&&define.amd){define([],b)}else{var a;"undefined"!=typeof window?a=window:"undefined"!=typeof global?a=global:"undefined"!=typeof self&&(a=self),a.io=b()}}}(function(){var d,b,a;return(function c(f,k,h){function g(n,l){if(!k[n]){if(!f[n]){var i=typeof require=="function"&&require;if(!l&&i){return i(n,!0)}if(e){return e(n,!0)}throw new Error("Cannot find module '"+n+"'")}var m=k[n]={exports:{}};f[n][0].call(m.exports,function(o){var p=f[n][1][o];return g(p?p:o)},m,m.exports,c,f,k,h)}return k[n].exports}var e=typeof require=="function"&&require;for(var j=0;j<h.length;j++){g(h[j])}return g})({1:[function(g,f,e){f.exports=g("./lib/")},{"./lib/":2}],2:[function(j,k,m){var h=j("./url");var g=j("socket.io-parser");var e=j("./manager");var i=j("debug")("socket.io-client");k.exports=m=l;var f=m.managers={};function l(r,o){if(typeof r=="object"){o=r;r=undefined}o=o||{};var u=h(r);var n=u.source;var q=u.id;var v=u.path;var s=(f[q]&&f[q].nsps[v]&&v==f[q].nsps[v].nsp);var p=o.forceNew||o["force new connection"]||false===o.multiplex||s;var t;if(p){i("ignoring socket cache for %s",n);t=e(n,o)}else{if(!f[q]){i("new io instance for %s",n);f[q]=e(n,o)}t=f[q]}return t.socket(u.path)}m.protocol=g.protocol;m.connect=l;m.Manager=j("./manager");m.Socket=j("./socket")},{"./manager":3,"./socket":5,"./url":6,debug:10,"socket.io-parser":44}],3:[function(j,k,n){var h=j("./url");var p=j("engine.io-client");var i=j("./socket");var s=j("component-emitter");var g=j("socket.io-parser");var o=j("./on");var q=j("component-bind");var m=j("object-component");var f=j("debug")("socket.io-client:manager");var r=j("indexof");var l=j("backo2");k.exports=e;function e(u,t){if(!(this instanceof e)){return new e(u,t)}if(u&&("object"==typeof u)){t=u;u=undefined}t=t||{};t.path=t.path||"/socket.io";this.nsps={};this.subs=[];this.opts=t;this.reconnection(t.reconnection!==false);this.reconnectionAttempts(t.reconnectionAttempts||Infinity);this.reconnectionDelay(t.reconnectionDelay||1000);this.reconnectionDelayMax(t.reconnectionDelayMax||5000);this.randomizationFactor(t.randomizationFactor||0.5);this.backoff=new l({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()});this.timeout(null==t.timeout?20000:t.timeout);this.readyState="closed";this.uri=u;this.connected=[];this.encoding=false;this.packetBuffer=[];this.encoder=new g.Encoder();this.decoder=new g.Decoder();this.autoConnect=t.autoConnect!==false;if(this.autoConnect){this.open()}}e.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var t in this.nsps){this.nsps[t].emit.apply(this.nsps[t],arguments)}};e.prototype.updateSocketIds=function(){for(var t in this.nsps){this.nsps[t].id=this.engine.id}};s(e.prototype);e.prototype.reconnection=function(t){if(!arguments.length){return this._reconnection}this._reconnection=!!t;return this};e.prototype.reconnectionAttempts=function(t){if(!arguments.length){return this._reconnectionAttempts}this._reconnectionAttempts=t;return this};e.prototype.reconnectionDelay=function(t){if(!arguments.length){return this._reconnectionDelay}this._reconnectionDelay=t;this.backoff&&this.backoff.setMin(t);return this};e.prototype.randomizationFactor=function(t){if(!arguments.length){return this._randomizationFactor}this._randomizationFactor=t;this.backoff&&this.backoff.setJitter(t);return this};e.prototype.reconnectionDelayMax=function(t){if(!arguments.length){return this._reconnectionDelayMax}this._reconnectionDelayMax=t;this.backoff&&this.backoff.setMax(t);return this};e.prototype.timeout=function(t){if(!arguments.length){return this._timeout}this._timeout=t;return this};e.prototype.maybeReconnectOnOpen=function(){if(!this.reconnecting&&this._reconnection&&this.backoff.attempts===0){this.reconnect()}};e.prototype.open=e.prototype.connect=function(w){f("readyState %s",this.readyState);if(~this.readyState.indexOf("open")){return this}f("opening %s",this.uri);this.engine=p(this.uri,this.opts);var t=this.engine;var v=this;this.readyState="opening";this.skipReconnect=false;var y=o(t,"open",function(){v.onopen();w&&w()});var u=o(t,"error",function(B){f("connect_error");v.cleanup();v.readyState="closed";v.emitAll("connect_error",B);if(w){var A=new Error("Connection error");A.data=B;w(A)}else{v.maybeReconnectOnOpen()}});if(false!==this._timeout){var x=this._timeout;f("connect attempt will timeout after %d",x);var z=setTimeout(function(){f("connect attempt timed out after %d",x);y.destroy();t.close();t.emit("error","timeout");v.emitAll("connect_timeout",x)},x);this.subs.push({destroy:function(){clearTimeout(z)}})}this.subs.push(y);this.subs.push(u);return this};e.prototype.onopen=function(){f("open");this.cleanup();this.readyState="open";this.emit("open");var t=this.engine;this.subs.push(o(t,"data",q(this,"ondata")));this.subs.push(o(this.decoder,"decoded",q(this,"ondecoded")));this.subs.push(o(t,"error",q(this,"onerror")));this.subs.push(o(t,"close",q(this,"onclose")))};e.prototype.ondata=function(t){this.decoder.add(t)};e.prototype.ondecoded=function(t){this.emit("packet",t)};e.prototype.onerror=function(t){f("error",t);this.emitAll("error",t)};e.prototype.socket=function(v){var t=this.nsps[v];if(!t){t=new i(this,v);this.nsps[v]=t;var u=this;t.on("connect",function(){t.id=u.engine.id;if(!~r(u.connected,t)){u.connected.push(t)}})}return t};e.prototype.destroy=function(t){var u=r(this.connected,t);if(~u){this.connected.splice(u,1)}if(this.connected.length){return}this.close()};e.prototype.packet=function(u){f("writing packet %j",u);var t=this;if(!t.encoding){t.encoding=true;this.encoder.encode(u,function(w){for(var v=0;v<w.length;v++){t.engine.write(w[v])}t.encoding=false;t.processPacketQueue()})}else{t.packetBuffer.push(u)}};e.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var t=this.packetBuffer.shift();this.packet(t)}};e.prototype.cleanup=function(){var t;while(t=this.subs.shift()){t.destroy()}this.packetBuffer=[];this.encoding=false;this.decoder.destroy()};e.prototype.close=e.prototype.disconnect=function(){this.skipReconnect=true;this.backoff.reset();this.readyState="closed";this.engine&&this.engine.close()};e.prototype.onclose=function(t){f("close");this.cleanup();this.backoff.reset();this.readyState="closed";this.emit("close",t);if(this._reconnection&&!this.skipReconnect){this.reconnect()}};e.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect){return this}var t=this;if(this.backoff.attempts>=this._reconnectionAttempts){f("reconnect failed");this.backoff.reset();this.emitAll("reconnect_failed");this.reconnecting=false}else{var u=this.backoff.duration();f("will wait %dms before reconnect attempt",u);this.reconnecting=true;var v=setTimeout(function(){if(t.skipReconnect){return}f("attempting reconnect");t.emitAll("reconnect_attempt",t.backoff.attempts);t.emitAll("reconnecting",t.backoff.attempts);if(t.skipReconnect){return}t.open(function(w){if(w){f("reconnect attempt error");t.reconnecting=false;t.reconnect();t.emitAll("reconnect_error",w.data)}else{f("reconnect success");t.onreconnect()}})},u);this.subs.push({destroy:function(){clearTimeout(v)}})}};e.prototype.onreconnect=function(){var t=this.backoff.attempts;this.reconnecting=false;this.backoff.reset();this.updateSocketIds();this.emitAll("reconnect",t)}},{"./on":4,"./socket":5,"./url":6,backo2:7,"component-bind":8,"component-emitter":9,debug:10,"engine.io-client":11,indexof:40,"object-component":41,"socket.io-parser":44}],4:[function(h,g,f){g.exports=e;function e(k,j,i){k.on(j,i);return{destroy:function(){k.removeListener(j,i)}}}},{}],5:[function(h,i,k){var f=h("socket.io-parser");var o=h("component-emitter");var j=h("to-array");var m=h("./on");var n=h("component-bind");var e=h("debug")("socket.io-client:socket");var l=h("has-binary");i.exports=k=g;var q={connect:1,connect_error:1,connect_timeout:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1};var p=o.prototype.emit;function g(s,r){this.io=s;this.nsp=r;this.json=this;this.ids=0;this.acks={};if(this.io.autoConnect){this.open()}this.receiveBuffer=[];this.sendBuffer=[];this.connected=false;this.disconnected=true}o(g.prototype);g.prototype.subEvents=function(){if(this.subs){return}var r=this.io;this.subs=[m(r,"open",n(this,"onopen")),m(r,"packet",n(this,"onpacket")),m(r,"close",n(this,"onclose"))]};g.prototype.open=g.prototype.connect=function(){if(this.connected){return this}this.subEvents();this.io.open();if("open"==this.io.readyState){this.onopen()}return this};g.prototype.send=function(){var r=j(arguments);r.unshift("message");this.emit.apply(this,r);return this};g.prototype.emit=function(t){if(q.hasOwnProperty(t)){p.apply(this,arguments);return this}var s=j(arguments);var r=f.EVENT;if(l(s)){r=f.BINARY_EVENT}var u={type:r,data:s};if("function"==typeof s[s.length-1]){e("emitting packet with ack id %d",this.ids);this.acks[this.ids]=s.pop();u.id=this.ids++}if(this.connected){this.packet(u)}else{this.sendBuffer.push(u)}return this};g.prototype.packet=function(r){r.nsp=this.nsp;this.io.packet(r)};g.prototype.onopen=function(){e("transport is open - connecting");if("/"!=this.nsp){this.packet({type:f.CONNECT})}};g.prototype.onclose=function(r){e("close (%s)",r);this.connected=false;this.disconnected=true;delete this.id;this.emit("disconnect",r)};g.prototype.onpacket=function(r){if(r.nsp!=this.nsp){return}switch(r.type){case f.CONNECT:this.onconnect();break;case f.EVENT:this.onevent(r);break;case f.BINARY_EVENT:this.onevent(r);break;case f.ACK:this.onack(r);break;case f.BINARY_ACK:this.onack(r);break;case f.DISCONNECT:this.ondisconnect();break;case f.ERROR:this.emit("error",r.data);break}};g.prototype.onevent=function(s){var r=s.data||[];e("emitting event %j",r);if(null!=s.id){e("attaching ack callback to event");r.push(this.ack(s.id))}if(this.connected){p.apply(this,r)}else{this.receiveBuffer.push(r)}};g.prototype.ack=function(t){var r=this;var s=false;return function(){if(s){return}s=true;var u=j(arguments);e("sending ack %j",u);var v=l(u)?f.BINARY_ACK:f.ACK;r.packet({type:v,id:t,data:u})}};g.prototype.onack=function(s){e("calling ack %s with %j",s.id,s.data);var r=this.acks[s.id];r.apply(this,s.data);delete this.acks[s.id]};g.prototype.onconnect=function(){this.connected=true;this.disconnected=false;this.emit("connect");this.emitBuffered()};g.prototype.emitBuffered=function(){var r;for(r=0;r<this.receiveBuffer.length;r++){p.apply(this,this.receiveBuffer[r])}this.receiveBuffer=[];for(r=0;r<this.sendBuffer.length;r++){this.packet(this.sendBuffer[r])}this.sendBuffer=[]};g.prototype.ondisconnect=function(){e("server disconnect (%s)",this.nsp);this.destroy();this.onclose("io server disconnect")};g.prototype.destroy=function(){if(this.subs){for(var r=0;r<this.subs.length;r++){this.subs[r].destroy()}this.subs=null}this.io.destroy(this)};g.prototype.close=g.prototype.disconnect=function(){if(this.connected){e("performing disconnect (%s)",this.nsp);this.packet({type:f.DISCONNECT})}this.destroy();if(this.connected){this.onclose("io client disconnect")}return this}},{"./on":4,"component-bind":8,"component-emitter":9,debug:10,"has-binary":36,"socket.io-parser":44,"to-array":48}],6:[function(g,f,e){(function(j){var k=g("parseuri");var h=g("debug")("socket.io-client:url");f.exports=i;function i(l,n){var m=l;var n=n||j.location;if(null==l){l=n.protocol+"//"+n.host}if("string"==typeof l){if("/"==l.charAt(0)){if("/"==l.charAt(1)){l=n.protocol+l}else{l=n.hostname+l}}if(!/^(https?|wss?):\/\//.test(l)){h("protocol-less url %s",l);if("undefined"!=typeof n){l=n.protocol+"//"+l}else{l="https://"+l}}h("parse %s",l);m=k(l)}if(!m.port){if(/^(http|ws)$/.test(m.protocol)){m.port="80"}else{if(/^(http|ws)s$/.test(m.protocol)){m.port="443"}}}m.path=m.path||"/";m.id=m.protocol+"://"+m.host+":"+m.port;m.href=m.protocol+"://"+m.host+(n&&n.port==m.port?"":(":"+m.port));return m}}).call(this,typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{debug:10,parseuri:42}],7:[function(g,f,e){f.exports=h;function h(i){i=i||{};this.ms=i.min||100;this.max=i.max||10000;this.factor=i.factor||2;this.jitter=i.jitter>0&&i.jitter<=1?i.jitter:0;this.attempts=0}h.prototype.duration=function(){var i=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var j=Math.random();var k=Math.floor(j*this.jitter*i);i=(Math.floor(j*10)&1)==0?i-k:i+k}return Math.min(i,this.max)|0};h.prototype.reset=function(){this.attempts=0};h.prototype.setMin=function(i){this.ms=i};h.prototype.setMax=function(i){this.max=i};h.prototype.setJitter=function(i){this.jitter=i}},{}],8:[function(g,f,e){var h=[].slice;f.exports=function(k,j){if("string"==typeof j){j=k[j]}if("function"!=typeof j){throw new Error("bind() requires a function")}var i=h.call(arguments,2);return function(){return j.apply(k,i.concat(h.call(arguments)))}}},{}],9:[function(i,g,f){g.exports=h;function h(j){if(j){return e(j)}}function e(k){for(var j in h.prototype){k[j]=h.prototype[j]}return k}h.prototype.on=h.prototype.addEventListener=function(k,j){this._callbacks=this._callbacks||{};(this._callbacks[k]=this._callbacks[k]||[]).push(j);return this};h.prototype.once=function(m,l){var k=this;this._callbacks=this._callbacks||{};function j(){k.off(m,j);l.apply(this,arguments)}j.fn=l;this.on(m,j);return this};h.prototype.off=h.prototype.removeListener=h.prototype.removeAllListeners=h.prototype.removeEventListener=function(n,l){this._callbacks=this._callbacks||{};if(0==arguments.length){this._callbacks={};return this}var m=this._callbacks[n];if(!m){return this}if(1==arguments.length){delete this._callbacks[n];return this}var j;for(var k=0;k<m.length;k++){j=m[k];if(j===l||j.fn===l){m.splice(k,1);break}}return this};h.prototype.emit=function(n){this._callbacks=this._callbacks||{};var k=[].slice.call(arguments,1),m=this._callbacks[n];if(m){m=m.slice(0);for(var l=0,j=m.length;l<j;++l){m[l].apply(this,k)}}return this};h.prototype.listeners=function(j){this._callbacks=this._callbacks||{};return this._callbacks[j]||[]};h.prototype.hasListeners=function(j){return !!this.listeners(j).length}},{}],10:[function(j,h,g){h.exports=f;function f(e){if(!f.enabled(e)){return function(){}}return function(l){l=i(l);var n=new Date;var m=n-(f[e]||n);f[e]=n;l=e+" "+l+" +"+f.humanize(m);window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}}f.names=[];f.skips=[];f.enable=function(m){try{localStorage.debug=m}catch(p){}var o=(m||"").split(/[\s,]+/),l=o.length;for(var n=0;n<l;n++){m=o[n].replace("*",".*?");if(m[0]==="-"){f.skips.push(new RegExp("^"+m.substr(1)+"$"))}else{f.names.push(new RegExp("^"+m+"$"))}}};f.disable=function(){f.enable("")};f.humanize=function(l){var n=1000,m=60*1000,e=60*m;if(l>=e){return(l/e).toFixed(1)+"h"}if(l>=m){return(l/m).toFixed(1)+"m"}if(l>=n){return(l/n|0)+"s"}return l+"ms"};f.enabled=function(l){for(var m=0,e=f.skips.length;m<e;m++){if(f.skips[m].test(l)){return false}}for(var m=0,e=f.names.length;m<e;m++){if(f.names[m].test(l)){return true}}return false};function i(e){if(e instanceof Error){return e.stack||e.message}return e}try{if(window.localStorage){f.enable(localStorage.debug)}}catch(k){}},{}],11:[function(g,f,e){f.exports=g("./lib/")},{"./lib/":12}],12:[function(g,f,e){f.exports=g("./socket");f.exports.parser=g("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(g,f,e){(function(k){var n=g("./transports");var r=g("component-emitter");var i=g("debug")("engine.io-client:socket");var p=g("indexof");var h=g("engine.io-parser");var m=g("parseuri");var o=g("parsejson");var l=g("parseqs");f.exports=j;function s(){}function j(v,u){if(!(this instanceof j)){return new j(v,u)}u=u||{};if(v&&"object"==typeof v){u=v;v=null}if(v){v=m(v);u.host=v.host;u.secure=v.protocol=="https"||v.protocol=="wss";u.port=v.port;if(v.query){u.query=v.query}}this.secure=null!=u.secure?u.secure:(k.location&&"https:"==location.protocol);if(u.host){var t=u.host.split(":");u.hostname=t.shift();if(t.length){u.port=t.pop()}else{if(!u.port){u.port=this.secure?"443":"80"}}}this.agent=u.agent||false;this.hostname=u.hostname||(k.location?location.hostname:"localhost");this.port=u.port||(k.location&&location.port?location.port:(this.secure?443:80));this.query=u.query||{};if("string"==typeof this.query){this.query=l.decode(this.query)}this.upgrade=false!==u.upgrade;this.path=(u.path||"/engine.io").replace(/\/$/,"")+"/";this.forceJSONP=!!u.forceJSONP;this.jsonp=false!==u.jsonp;this.forceBase64=!!u.forceBase64;this.enablesXDR=!!u.enablesXDR;this.timestampParam=u.timestampParam||"t";this.timestampRequests=u.timestampRequests;this.transports=u.transports||["polling","websocket"];this.readyState="";this.writeBuffer=[];this.callbackBuffer=[];this.policyPort=u.policyPort||843;this.rememberUpgrade=u.rememberUpgrade||false;this.binaryType=null;this.onlyBinaryUpgrades=u.onlyBinaryUpgrades;this.pfx=u.pfx||null;this.key=u.key||null;this.passphrase=u.passphrase||null;this.cert=u.cert||null;this.ca=u.ca||null;this.ciphers=u.ciphers||null;this.rejectUnauthorized=u.rejectUnauthorized||null;this.open()}j.priorWebsocketSuccess=false;r(j.prototype);j.protocol=h.protocol;j.Socket=j;j.Transport=g("./transport");j.transports=g("./transports");j.parser=g("engine.io-parser");j.prototype.createTransport=function(t){i('creating transport "%s"',t);var u=q(this.query);u.EIO=h.protocol;u.transport=t;if(this.id){u.sid=this.id}var v=new n[t]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:u,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized});return v};function q(u){var v={};for(var t in u){if(u.hasOwnProperty(t)){v[t]=u[t]}}return v}j.prototype.open=function(){var v;if(this.rememberUpgrade&&j.priorWebsocketSuccess&&this.transports.indexOf("websocket")!=-1){v="websocket"}else{if(0==this.transports.length){var t=this;setTimeout(function(){t.emit("error","No transports available")},0);return}else{v=this.transports[0]}}this.readyState="opening";var v;try{v=this.createTransport(v)}catch(u){this.transports.shift();this.open();return}v.open();this.setTransport(v)};j.prototype.setTransport=function(u){i("setting transport %s",u.name);var t=this;if(this.transport){i("clearing existing transport %s",this.transport.name);this.transport.removeAllListeners()}this.transport=u;u.on("drain",function(){t.onDrain()}).on("packet",function(v){t.onPacket(v)}).on("error",function(v){t.onError(v)}).on("close",function(){t.onClose("transport close")})};j.prototype.probe=function(t){i('probing transport "%s"',t);var w=this.createTransport(t,{probe:1}),y=false,C=this;j.priorWebsocketSuccess=false;function x(){if(C.onlyBinaryUpgrades){var E=!this.supportsBinary&&C.transport.supportsBinary;y=y||E}if(y){return}i('probe transport "%s" opened',t);w.send([{type:"ping",data:"probe"}]);w.once("packet",function(G){if(y){return}if("pong"==G.type&&"probe"==G.data){i('probe transport "%s" pong',t);C.upgrading=true;C.emit("upgrading",w);if(!w){return}j.priorWebsocketSuccess="websocket"==w.name;i('pausing current transport "%s"',C.transport.name);C.transport.pause(function(){if(y){return}if("closed"==C.readyState){return}i("changing transport and sending upgrade packet");u();C.setTransport(w);w.send([{type:"upgrade"}]);C.emit("upgrade",w);w=null;C.upgrading=false;C.flush()})}else{i('probe transport "%s" failed',t);var F=new Error("probe error");F.transport=w.name;C.emit("upgradeError",F)}})}function A(){if(y){return}y=true;u();w.close();w=null}function z(F){var E=new Error("probe error: "+F);E.transport=w.name;A();i('probe transport "%s" failed because of error: %s',t,F);C.emit("upgradeError",E)}function D(){z("transport closed")}function B(){z("socket closed")}function v(E){if(w&&E.name!=w.name){i('"%s" works - aborting "%s"',E.name,w.name);A()}}function u(){w.removeListener("open",x);w.removeListener("error",z);w.removeListener("close",D);C.removeListener("close",B);C.removeListener("upgrading",v)}w.once("open",x);w.once("error",z);w.once("close",D);this.once("close",B);this.once("upgrading",v);w.open()};j.prototype.onOpen=function(){i("socket open");this.readyState="open";j.priorWebsocketSuccess="websocket"==this.transport.name;this.emit("open");this.flush();if("open"==this.readyState&&this.upgrade&&this.transport.pause){i("starting upgrade probes");for(var u=0,t=this.upgrades.length;u<t;u++){this.probe(this.upgrades[u])}}};j.prototype.onPacket=function(u){if("opening"==this.readyState||"open"==this.readyState){i('socket receive: type "%s", data "%s"',u.type,u.data);this.emit("packet",u);this.emit("heartbeat");switch(u.type){case"open":this.onHandshake(o(u.data));break;case"pong":this.setPing();break;case"error":var t=new Error("server error");t.code=u.data;this.emit("error",t);break;case"message":this.emit("data",u.data);this.emit("message",u.data);break}}else{i('packet received with socket readyState "%s"',this.readyState)}};j.prototype.onHandshake=function(t){this.emit("handshake",t);this.id=t.sid;this.transport.query.sid=t.sid;this.upgrades=this.filterUpgrades(t.upgrades);this.pingInterval=t.pingInterval;this.pingTimeout=t.pingTimeout;this.onOpen();if("closed"==this.readyState){return}this.setPing();this.removeListener("heartbeat",this.onHeartbeat);this.on("heartbeat",this.onHeartbeat)};j.prototype.onHeartbeat=function(u){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){if("closed"==t.readyState){return}t.onClose("ping timeout")},u||(t.pingInterval+t.pingTimeout))};j.prototype.setPing=function(){var t=this;clearTimeout(t.pingIntervalTimer);t.pingIntervalTimer=setTimeout(function(){i("writing ping packet - expecting pong within %sms",t.pingTimeout);t.ping();t.onHeartbeat(t.pingTimeout)},t.pingInterval)};j.prototype.ping=function(){this.sendPacket("ping")};j.prototype.onDrain=function(){for(var t=0;t<this.prevBufferLen;t++){if(this.callbackBuffer[t]){this.callbackBuffer[t]()}}this.writeBuffer.splice(0,this.prevBufferLen);this.callbackBuffer.splice(0,this.prevBufferLen);this.prevBufferLen=0;if(this.writeBuffer.length==0){this.emit("drain")}else{this.flush()}};j.prototype.flush=function(){if("closed"!=this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){i("flushing %d packets in socket",this.writeBuffer.length);this.transport.send(this.writeBuffer);this.prevBufferLen=this.writeBuffer.length;this.emit("flush")}};j.prototype.write=j.prototype.send=function(u,t){this.sendPacket("message",u,t);return this};j.prototype.sendPacket=function(u,v,t){if("closing"==this.readyState||"closed"==this.readyState){return}var w={type:u,data:v};this.emit("packetCreate",w);this.writeBuffer.push(w);this.callbackBuffer.push(t);this.flush()};j.prototype.close=function(){if("opening"==this.readyState||"open"==this.readyState){this.readyState="closing";var t=this;function w(){t.onClose("forced close");i("socket closing - telling transport to close");t.transport.close()}function u(){t.removeListener("upgrade",u);t.removeListener("upgradeError",u);w()}function v(){t.once("upgrade",u);t.once("upgradeError",u)}if(this.writeBuffer.length){this.once("drain",function(){if(this.upgrading){v()}else{w()}})}else{if(this.upgrading){v()}else{w()}}}return this};j.prototype.onError=function(t){i("socket error %j",t);j.priorWebsocketSuccess=false;this.emit("error",t);this.onClose("transport error",t)};j.prototype.onClose=function(u,v){if("opening"==this.readyState||"open"==this.readyState||"closing"==this.readyState){i('socket close with reason: "%s"',u);var t=this;clearTimeout(this.pingIntervalTimer);clearTimeout(this.pingTimeoutTimer);setTimeout(function(){t.writeBuffer=[];t.callbackBuffer=[];t.prevBufferLen=0},0);this.transport.removeAllListeners("close");this.transport.close();this.transport.removeAllListeners();this.readyState="closed";this.id=null;this.emit("close",u,v)}};j.prototype.filterUpgrades=function(v){var w=[];for(var u=0,t=v.length;u<t;u++){if(~p(this.transports,v[u])){w.push(v[u])}}return w}}).call(this,typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./transport":14,"./transports":15,"component-emitter":9,debug:22,"engine.io-parser":25,indexof:40,parsejson:32,parseqs:33,parseuri:34}],14:[function(h,f,e){var j=h("engine.io-parser");var g=h("component-emitter");f.exports=i;function i(k){this.path=k.path;this.hostname=k.hostname;this.port=k.port;this.secure=k.secure;this.query=k.query;this.timestampParam=k.timestampParam;this.timestampRequests=k.timestampRequests;this.readyState="";this.agent=k.agent||false;this.socket=k.socket;this.enablesXDR=k.enablesXDR;this.pfx=k.pfx;this.key=k.key;this.passphrase=k.passphrase;this.cert=k.cert;this.ca=k.ca;this.ciphers=k.ciphers;this.rejectUnauthorized=k.rejectUnauthorized}g(i.prototype);i.timestamps=0;i.prototype.onError=function(m,l){var k=new Error(m);k.type="TransportError";k.description=l;this.emit("error",k);return this};i.prototype.open=function(){if("closed"==this.readyState||""==this.readyState){this.readyState="opening";this.doOpen()}return this};i.prototype.close=function(){if("opening"==this.readyState||"open"==this.readyState){this.doClose();this.onClose()}return this};i.prototype.send=function(k){if("open"==this.readyState){this.write(k)}else{throw new Error("Transport not open")}};i.prototype.onOpen=function(){this.readyState="open";this.writable=true;this.emit("open")};i.prototype.onData=function(k){var l=j.decodePacket(k,this.socket.binaryType);this.onPacket(l)};i.prototype.onPacket=function(k){this.emit("packet",k)};i.prototype.onClose=function(){this.readyState="closed";this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(g,f,e){(function(k){var j=g("xmlhttprequest");var i=g("./polling-xhr");var m=g("./polling-jsonp");var h=g("./websocket");e.polling=l;e.websocket=h;function l(p){var t;var q=false;var o=false;var s=false!==p.jsonp;if(k.location){var r="https:"==location.protocol;var n=location.port;if(!n){n=r?443:80}q=p.hostname!=location.hostname||n!=p.port;o=p.secure!=r}p.xdomain=q;p.xscheme=o;t=new j(p);if("open" in t&&!p.forceJSONP){return new i(p)}else{if(!s){throw new Error("JSONP disabled")}return new m(p)}}}).call(this,typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(g,f,e){(function(h){var p=g("./polling");var j=g("component-inherit");f.exports=l;var n=/\n/g;var i=/\\n/g;var o;var m=0;function k(){}function l(r){p.call(this,r);this.query=this.query||{};if(!o){if(!h.___eio){h.___eio=[]}o=h.___eio}this.index=o.length;var q=this;o.push(function(s){q.onData(s)});this.query.j=this.index;if(h.document&&h.addEventListener){h.addEventListener("beforeunload",function(){if(q.script){q.script.onerror=k}},false)}}j(l,p);l.prototype.supportsBinary=false;l.prototype.doClose=function(){if(this.script){this.script.parentNode.removeChild(this.script);this.script=null}if(this.form){this.form.parentNode.removeChild(this.form);this.form=null;this.iframe=null}p.prototype.doClose.call(this)};l.prototype.doPoll=function(){var r=this;var q=document.createElement("script");if(this.script){this.script.parentNode.removeChild(this.script);this.script=null}q.async=true;q.src=this.uri();q.onerror=function(u){r.onError("jsonp poll error",u)};var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(q,t);this.script=q;var s="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);if(s){setTimeout(function(){var u=document.createElement("iframe");document.body.appendChild(u);document.body.removeChild(u)},100)}};l.prototype.doWrite=function(w,y){var z=this;if(!this.form){var r=document.createElement("form");var s=document.createElement("textarea");var q=this.iframeId="eio_iframe_"+this.index;var v;r.className="socketio";r.style.position="absolute";r.style.top="-1000px";r.style.left="-1000px";r.target=q;r.method="POST";r.setAttribute("accept-charset","utf-8");s.name="d";r.appendChild(s);document.body.appendChild(r);this.form=r;this.area=s}this.form.action=this.uri();function t(){u();y()}function u(){if(z.iframe){try{z.form.removeChild(z.iframe)}catch(B){z.onError("jsonp polling iframe removal error",B)}}try{var A='<iframe src="javascript:0" name="'+z.iframeId+'">';v=document.createElement(A)}catch(B){v=document.createElement("iframe");v.name=z.iframeId;v.src="javascript:0"}v.id=z.iframeId;z.form.appendChild(v);z.iframe=v}u();w=w.replace(i,"\\\n");this.area.value=w.replace(n,"\\n");try{this.form.submit()}catch(x){}if(this.iframe.attachEvent){this.iframe.onreadystatechange=function(){if(z.iframe.readyState=="complete"){t()}}}else{this.iframe.onload=t}}}).call(this,typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./polling":18,"component-inherit":21}],17:[function(g,f,e){(function(j){var o=g("xmlhttprequest");var p=g("./polling");var n=g("component-emitter");var k=g("component-inherit");var i=g("debug")("engine.io-client:polling-xhr");f.exports=m;f.exports.Request=h;function l(){}function m(s){p.call(this,s);if(j.location){var t="https:"==location.protocol;var r=location.port;if(!r){r=t?443:80}this.xd=s.hostname!=j.location.hostname||r!=s.port;this.xs=s.secure!=t}}k(m,p);m.prototype.supportsBinary=true;m.prototype.request=function(r){r=r||{};r.uri=this.uri();r.xd=this.xd;r.xs=this.xs;r.agent=this.agent||false;r.supportsBinary=this.supportsBinary;r.enablesXDR=this.enablesXDR;r.pfx=this.pfx;r.key=this.key;r.passphrase=this.passphrase;r.cert=this.cert;r.ca=this.ca;r.ciphers=this.ciphers;r.rejectUnauthorized=this.rejectUnauthorized;return new h(r)};m.prototype.doWrite=function(v,s){var u=typeof v!=="string"&&v!==undefined;var t=this.request({method:"POST",data:v,isBinary:u});var r=this;t.on("success",s);t.on("error",function(w){r.onError("xhr post error",w)});this.sendXhr=t};m.prototype.doPoll=function(){i("xhr poll");var s=this.request();var r=this;s.on("data",function(t){r.onData(t)});s.on("error",function(t){r.onError("xhr poll error",t)});this.pollXhr=s};function h(r){this.method=r.method||"GET";this.uri=r.uri;this.xd=!!r.xd;this.xs=!!r.xs;this.async=false!==r.async;this.data=undefined!=r.data?r.data:null;this.agent=r.agent;this.isBinary=r.isBinary;this.supportsBinary=r.supportsBinary;this.enablesXDR=r.enablesXDR;this.pfx=r.pfx;this.key=r.key;this.passphrase=r.passphrase;this.cert=r.cert;this.ca=r.ca;this.ciphers=r.ciphers;this.rejectUnauthorized=r.rejectUnauthorized;this.create()}n(h.prototype);h.prototype.create=function(){var s={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};s.pfx=this.pfx;s.key=this.key;s.passphrase=this.passphrase;s.cert=this.cert;s.ca=this.ca;s.ciphers=this.ciphers;s.rejectUnauthorized=this.rejectUnauthorized;var u=this.xhr=new o(s);var r=this;try{i("xhr open %s: %s",this.method,this.uri);u.open(this.method,this.uri,this.async);if(this.supportsBinary){u.responseType="arraybuffer"}if("POST"==this.method){try{if(this.isBinary){u.setRequestHeader("Content-type","application/octet-stream")}else{u.setRequestHeader("Content-type","text/plain;charset=UTF-8")}}catch(t){}}if("withCredentials" in u){u.withCredentials=true}if(this.hasXDR()){u.onload=function(){r.onLoad()};u.onerror=function(){r.onError(u.responseText)}}else{u.onreadystatechange=function(){if(4!=u.readyState){return}if(200==u.status||1223==u.status){r.onLoad()}else{setTimeout(function(){r.onError(u.status)},0)}}}i("xhr data %s",this.data);u.send(this.data)}catch(t){setTimeout(function(){r.onError(t)},0);return}if(j.document){this.index=h.requestsCount++;h.requests[this.index]=this}};h.prototype.onSuccess=function(){this.emit("success");this.cleanup()};h.prototype.onData=function(r){this.emit("data",r);this.onSuccess()};h.prototype.onError=function(r){this.emit("error",r);this.cleanup(true)};h.prototype.cleanup=function(r){if("undefined"==typeof this.xhr||null===this.xhr){return}if(this.hasXDR()){this.xhr.onload=this.xhr.onerror=l}else{this.xhr.onreadystatechange=l}if(r){try{this.xhr.abort()}catch(s){}}if(j.document){delete h.requests[this.index]}this.xhr=null};h.prototype.onLoad=function(){var r;try{var t;try{t=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch(s){}if(t==="application/octet-stream"){r=this.xhr.response}else{if(!this.supportsBinary){r=this.xhr.responseText}else{r="ok"}}}catch(s){this.onError(s)}if(null!=r){this.onData(r)}};h.prototype.hasXDR=function(){return"undefined"!==typeof j.XDomainRequest&&!this.xs&&this.enablesXDR};h.prototype.abort=function(){this.cleanup()};if(j.document){h.requestsCount=0;h.requests={};if(j.attachEvent){j.attachEvent("onunload",q)}else{if(j.addEventListener){j.addEventListener("beforeunload",q,false)}}}function q(){for(var r in h.requests){if(h.requests.hasOwnProperty(r)){h.requests[r].abort()}}}}).call(this,typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./polling":18,"component-emitter":9,"component-inherit":21,debug:22,xmlhttprequest:20}],18:[function(g,h,k){var m=g("../transport");var j=g("parseqs");var e=g("engine.io-parser");var l=g("component-inherit");var f=g("debug")("engine.io-client:polling");h.exports=n;var i=(function(){var o=g("xmlhttprequest");var p=new o({xdomain:false});return null!=p.responseType})();function n(p){var o=(p&&p.forceBase64);if(!i||o){this.supportsBinary=false}m.call(this,p)}l(n,m);n.prototype.name="polling";n.prototype.doOpen=function(){this.poll()};n.prototype.pause=function(o){var s=0;var p=this;this.readyState="pausing";function r(){f("paused");p.readyState="paused";o()}if(this.polling||!this.writable){var q=0;if(this.polling){f("we are currently polling - waiting to pause");q++;this.once("pollComplete",function(){f("pre-pause polling complete");--q||r()})}if(!this.writable){f("we are currently writing - waiting to pause");q++;this.once("drain",function(){f("pre-pause writing complete");--q||r()})}}else{r()}};n.prototype.poll=function(){f("polling");this.polling=true;this.doPoll();this.emit("poll")};n.prototype.onData=function(p){var o=this;f("polling got data %s",p);var q=function(t,r,s){if("opening"==o.readyState){o.onOpen()}if("close"==t.type){o.onClose();return false}o.onPacket(t)};e.decodePayload(p,this.socket.binaryType,q);if("closed"!=this.readyState){this.polling=false;this.emit("pollComplete");if("open"==this.readyState){this.poll()}else{f('ignoring poll - transport state "%s"',this.readyState)}}};n.prototype.doClose=function(){var o=this;function p(){f("writing close packet");o.write([{type:"close"}])}if("open"==this.readyState){f("transport open - closing");p()}else{f("transport not open - deferring close");this.once("open",p)}};n.prototype.write=function(q){var p=this;this.writable=false;var o=function(){p.writable=true;p.emit("drain")};var p=this;e.encodePayload(q,this.supportsBinary,function(r){p.doWrite(r,o)})};n.prototype.uri=function(){var q=this.query||{};var p=this.secure?"https":"http";var o="";if(false!==this.timestampRequests){q[this.timestampParam]=+new Date+"-"+m.timestamps++}if(!this.supportsBinary&&!q.sid){q.b64=1}q=j.encode(q);if(this.port&&(("https"==p&&this.port!=443)||("http"==p&&this.port!=80))){o=":"+this.port}if(q.length){q="?"+q}return p+"://"+this.hostname+o+this.path+q}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,xmlhttprequest:20}],19:[function(h,i,k){var m=h("../transport");var e=h("engine.io-parser");var j=h("parseqs");var l=h("component-inherit");var f=h("debug")("engine.io-client:websocket");var n=h("ws");i.exports=g;function g(p){var o=(p&&p.forceBase64);if(o){this.supportsBinary=false}m.call(this,p)}l(g,m);g.prototype.name="websocket";g.prototype.supportsBinary=true;g.prototype.doOpen=function(){if(!this.check()){return}var o=this;var r=this.uri();var q=void (0);var p={agent:this.agent};p.pfx=this.pfx;p.key=this.key;p.passphrase=this.passphrase;p.cert=this.cert;p.ca=this.ca;p.ciphers=this.ciphers;p.rejectUnauthorized=this.rejectUnauthorized;this.ws=new n(r,q,p);if(this.ws.binaryType===undefined){this.supportsBinary=false}this.ws.binaryType="arraybuffer";this.addEventListeners()};g.prototype.addEventListeners=function(){var o=this;this.ws.onopen=function(){o.onOpen()};this.ws.onclose=function(){o.onClose()};this.ws.onmessage=function(p){o.onData(p.data)};this.ws.onerror=function(p){o.onError("websocket error",p)}};if("undefined"!=typeof navigator&&/iPad|iPhone|iPod/i.test(navigator.userAgent)){g.prototype.onData=function(p){var o=this;setTimeout(function(){m.prototype.onData.call(o,p)},0)}}g.prototype.write=function(r){var p=this;this.writable=false;for(var q=0,o=r.length;q<o;q++){e.encodePacket(r[q],this.supportsBinary,function(t){try{p.ws.send(t)}catch(u){f("websocket closed before onclose event")}})}function s(){p.writable=true;p.emit("drain")}setTimeout(s,0)};g.prototype.onClose=function(){m.prototype.onClose.call(this)};g.prototype.doClose=function(){if(typeof this.ws!=="undefined"){this.ws.close()}};g.prototype.uri=function(){var q=this.query||{};var p=this.secure?"wss":"ws";var o="";if(this.port&&(("wss"==p&&this.port!=443)||("ws"==p&&this.port!=80))){o=":"+this.port}if(this.timestampRequests){q[this.timestampParam]=+new Date}if(!this.supportsBinary){q.b64=1}q=j.encode(q);if(q.length){q="?"+q}return p+"://"+this.hostname+o+this.path+q};g.prototype.check=function(){return !!n&&!("__initialize" in n&&this.name===g.prototype.name)}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:33,ws:35}],20:[function(h,g,f){var e=h("has-cors");g.exports=function(l){var k=l.xdomain;var i=l.xscheme;var j=l.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!k||e)){return new XMLHttpRequest()}}catch(m){}try{if("undefined"!=typeof XDomainRequest&&!i&&j){return new XDomainRequest()}}catch(m){}if(!k){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(m){}}}},{"has-cors":38}],21:[function(g,f,e){f.exports=function(i,h){var j=function(){};j.prototype=h.prototype;i.prototype=new j;i.prototype.constructor=i}},{}],22:[function(j,f,e){e=f.exports=j("./debug");e.log=g;e.formatArgs=h;e.save=i;e.load=k;e.useColors=l;e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function l(){return("WebkitAppearance" in document.documentElement.style)||(window.console&&(console.firebug||(console.exception&&console.table)))||(navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31)}e.formatters.j=function(m){return JSON.stringify(m)};function h(){var n=arguments;var p=this.useColors;n[0]=(p?"%c":"")+this.namespace+(p?" %c":" ")+n[0]+(p?"%c ":" ")+"+"+e.humanize(this.diff);if(!p){return n}var q="color: "+this.color;n=[n[0],q,"color: inherit"].concat(Array.prototype.slice.call(n,1));var m=0;var o=0;n[0].replace(/%[a-z%]/g,function(r){if("%%"===r){return}m++;if("%c"===r){o=m}});n.splice(o,0,q);return n}function g(){return"object"==typeof console&&"function"==typeof console.log&&Function.prototype.apply.call(console.log,console,arguments)}function i(m){try{if(null==m){localStorage.removeItem("debug")}else{localStorage.debug=m}}catch(n){}}function k(){var m;try{m=localStorage.debug}catch(n){}return m}e.enable(k())},{"./debug":23}],23:[function(h,i,k){k=i.exports=g;k.coerce=j;k.disable=l;k.enable=m;k.enabled=o;k.humanize=h("ms");k.names=[];k.skips=[];k.formatters={};var e=0;var f;function n(){return k.colors[e++%k.colors.length]}function g(s){function r(){}r.enabled=false;function p(){var t=p;var x=+new Date();var w=x-(f||x);t.diff=w;t.prev=f;t.curr=x;f=x;if(null==t.useColors){t.useColors=k.useColors()}if(null==t.color&&t.useColors){t.color=n()}var v=Array.prototype.slice.call(arguments);v[0]=k.coerce(v[0]);if("string"!==typeof v[0]){v=["%o"].concat(v)}var u=0;v[0]=v[0].replace(/%([a-z%])/g,function(z,B){if(z==="%%"){return z}u++;var A=k.formatters[B];if("function"===typeof A){var C=v[u];z=A.call(t,C);v.splice(u,1);u--}return z});if("function"===typeof k.formatArgs){v=k.formatArgs.apply(t,v)}var y=p.log||k.log||console.log.bind(console);y.apply(t,v)}p.enabled=true;var q=k.enabled(s)?p:r;q.namespace=s;return q}function m(s){k.save(s);var r=(s||"").split(/[\s,]+/);var p=r.length;for(var q=0;q<p;q++){if(!r[q]){continue}s=r[q].replace(/\*/g,".*?");if(s[0]==="-"){k.skips.push(new RegExp("^"+s.substr(1)+"$"))}else{k.names.push(new RegExp("^"+s+"$"))}}}function l(){k.enable("")}function o(q){var r,p;for(r=0,p=k.skips.length;r<p;r++){if(k.skips[r].test(q)){return false}}for(r=0,p=k.names.length;r<p;r++){if(k.names[r].test(q)){return true}}return false}function j(p){if(p instanceof Error){return p.stack||p.message}return p}},{ms:24}],24:[function(e,f,j){var r=1000;var g=r*60;var l=g*60;var n=l*24;var o=n*365.25;f.exports=function(m,h){h=h||{};if("string"==typeof m){return i(m)}return h["long"]?q(m):k(m)};function i(s){var h=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(s);if(!h){return}var t=parseFloat(h[1]);var m=(h[2]||"ms").toLowerCase();switch(m){case"years":case"year":case"y":return t*o;case"days":case"day":case"d":return t*n;case"hours":case"hour":case"h":return t*l;case"minutes":case"minute":case"m":return t*g;case"seconds":case"second":case"s":return t*r;case"ms":return t}}function k(h){if(h>=n){return Math.round(h/n)+"d"}if(h>=l){return Math.round(h/l)+"h"}if(h>=g){return Math.round(h/g)+"m"}if(h>=r){return Math.round(h/r)+"s"}return h+"ms"}function q(h){return p(h,n,"day")||p(h,l,"hour")||p(h,g,"minute")||p(h,r,"second")||h+" ms"}function p(m,s,h){if(m<s){return}if(m<s*1.5){return Math.floor(m/s)+" "+h}return Math.ceil(m/s)+" "+h+"s"}},{}],25:[function(g,f,e){(function(t){var q=g("./keys");var p=g("has-binary");var n=g("arraybuffer.slice");var v=g("base64-arraybuffer");var j=g("after");var h=g("utf8");var y=navigator.userAgent.match(/Android/i);var s=/PhantomJS/i.test(navigator.userAgent);var o=y||s;e.protocol=3;var r=e.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6};var k=q(r);var l={type:"error",data:"parser error"};var m=g("blob");e.encodePacket=function(C,F,D,E){if("function"==typeof F){E=F;F=false}if("function"==typeof D){E=D;D=null}var A=(C.data===undefined)?undefined:C.data.buffer||C.data;if(t.ArrayBuffer&&A instanceof ArrayBuffer){return i(C,F,E)}else{if(m&&A instanceof t.Blob){return w(C,F,E)}}if(A&&A.base64){return u(C,E)}var B=r[C.type];if(undefined!==C.data){B+=D?h.encode(String(C.data)):String(C.data)}return E(""+B)};function u(B,C){var A="b"+e.packets[B.type]+B.data.data;return C(A)}function i(E,G,F){if(!G){return e.encodeBase64Packet(E,F)}var D=E.data;var C=new Uint8Array(D);var B=new Uint8Array(1+D.byteLength);B[0]=r[E.type];for(var A=0;A<C.length;A++){B[A+1]=C[A]}return F(B.buffer)}function x(B,D,C){if(!D){return e.encodeBase64Packet(B,C)}var A=new FileReader();A.onload=function(){B.data=A.result;e.encodePacket(B,D,true,C)};return A.readAsArrayBuffer(B.data)}function w(C,E,D){if(!E){return e.encodeBase64Packet(C,D)}if(o){return x(C,E,D)}var B=new Uint8Array(1);B[0]=r[C.type];var A=new m([B.buffer,C.data]);return D(A)}e.encodeBase64Packet=function(A,H){var I="b"+e.packets[A.type];if(m&&A.data instanceof m){var E=new FileReader();E.onload=function(){var J=E.result.split(",")[1];H(I+J)};return E.readAsDataURL(A.data)}var G;try{G=String.fromCharCode.apply(null,new Uint8Array(A.data))}catch(F){var B=new Uint8Array(A.data);var C=new Array(B.length);for(var D=0;D<B.length;D++){C[D]=B[D]}G=String.fromCharCode.apply(null,C)}I+=t.btoa(G);return H(I)};e.decodePacket=function(E,G,A){if(typeof E=="string"||E===undefined){if(E.charAt(0)=="b"){return e.decodeBase64Packet(E.substr(1),G)}if(A){try{E=h.decode(E)}catch(F){return l}}var D=E.charAt(0);if(Number(D)!=D||!k[D]){return l}if(E.length>1){return{type:k[D],data:E.substring(1)}}else{return{type:k[D]}}}var B=new Uint8Array(E);var D=B[0];var C=n(E,1);if(m&&G==="blob"){C=new m([C])}return{type:k[D],data:C}};e.decodeBase64Packet=function(C,D){var A=k[C.charAt(0)];if(!t.ArrayBuffer){return{type:A,data:{base64:true,data:C.substr(1)}}}var B=v.decode(C.substr(1));if(D==="blob"&&m){B=new m([B])}return{type:A,data:B}};e.encodePayload=function(D,F,E){if(typeof F=="function"){E=F;F=null}var C=p(D);if(F&&C){if(m&&!o){return e.encodePayloadAsBlob(D,E)}return e.encodePayloadAsArrayBuffer(D,E)}if(!D.length){return E("0:")}function A(G){return G.length+":"+G}function B(H,G){e.encodePacket(H,!C?false:F,true,function(I){G(null,A(I))})}z(D,B,function(H,G){return E(G.join(""))})};function z(E,G,B){var A=new Array(E.length);var F=j(E.length,B);var C=function(I,J,H){G(J,function(K,L){A[I]=L;H(K,A)})};for(var D=0;D<E.length;D++){C(D,E[D],F)}}e.decodePayload=function(H,A,K){if(typeof H!="string"){return e.decodePayloadAsBinary(H,A,K)}if(typeof A==="function"){K=A;A=null}var B;if(H==""){return K(l,0,1)}var C="",D,E;for(var I=0,F=H.length;I<F;I++){var G=H.charAt(I);if(":"!=G){C+=G}else{if(""==C||(C!=(D=Number(C)))){return K(l,0,1)}E=H.substr(I+1,D);if(C!=E.length){return K(l,0,1)}if(E.length){B=e.decodePacket(E,A,true);if(l.type==B.type&&l.data==B.data){return K(l,0,1)}var J=K(B,I+D,F);if(false===J){return}}I+=D;C=""}}if(C!=""){return K(l,0,1)}};e.encodePayloadAsArrayBuffer=function(B,C){if(!B.length){return C(new ArrayBuffer(0))}function A(E,D){e.encodePacket(E,true,true,function(F){return D(null,F)})}z(B,A,function(E,G){var H=G.reduce(function(J,K){var I;if(typeof K==="string"){I=K.length}else{I=K.byteLength}return J+I.toString().length+I+2},0);var F=new Uint8Array(H);var D=0;G.forEach(function(M){var I=typeof M==="string";var L=M;if(I){var J=new Uint8Array(M.length);for(var K=0;K<M.length;K++){J[K]=M.charCodeAt(K)}L=J.buffer}if(I){F[D++]=0}else{F[D++]=1}var N=L.byteLength.toString();for(var K=0;K<N.length;K++){F[D++]=parseInt(N[K])}F[D++]=255;var J=new Uint8Array(L);for(var K=0;K<J.length;K++){F[D++]=J[K]}});return C(F.buffer)})};e.encodePayloadAsBlob=function(B,C){function A(E,D){e.encodePacket(E,true,true,function(L){var J=new Uint8Array(1);J[0]=1;if(typeof L==="string"){var G=new Uint8Array(L.length);for(var I=0;I<L.length;I++){G[I]=L.charCodeAt(I)}L=G.buffer;J[0]=0}var F=(L instanceof ArrayBuffer)?L.byteLength:L.size;var M=F.toString();var K=new Uint8Array(M.length+1);for(var I=0;I<M.length;I++){K[I]=parseInt(M[I])}K[M.length]=255;if(m){var H=new m([J.buffer,K.buffer,L]);D(null,H)}})}z(B,A,function(E,D){return C(new m(D))})};e.decodePayloadAsBinary=function(G,A,M){if(typeof A==="function"){M=A;A=null}var L=G;var N=[];var J=false;while(L.byteLength>0){var B=new Uint8Array(L);var C=B[0]===0;var K="";for(var F=1;;F++){if(B[F]==255){break}if(K.length>310){J=true;break}K+=B[F]}if(J){return M(l,0,1)}L=n(L,2+K.length);K=parseInt(K);var E=n(L,0,K);if(C){try{E=String.fromCharCode.apply(null,new Uint8Array(E))}catch(H){var D=new Uint8Array(E);E="";for(var F=0;F<D.length;F++){E+=String.fromCharCode(D[F])}}}N.push(E);L=n(L,K)}var I=N.length;N.forEach(function(O,P){M(e.decodePacket(O,A,true),P,I)})}}).call(this,typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./keys":26,after:27,"arraybuffer.slice":28,"base64-arraybuffer":29,blob:30,"has-binary":36,utf8:31}],26:[function(h,f,e){f.exports=Object.keys||function g(m){var j=[];var k=Object.prototype.hasOwnProperty;for(var l in m){if(k.call(m,l)){j.push(l)}}return j}},{}],27:[function(h,f,e){f.exports=i;function i(m,n,l){var j=false;l=l||g;k.count=m;return(m===0)?n():k;function k(p,o){if(k.count<=0){throw new Error("after called too many times")}--k.count;if(p){j=true;n(p);n=l}else{if(k.count===0&&!j){n(null,o)}}}}function g(){}},{}],28:[function(g,f,e){f.exports=function(n,p,k){var j=n.byteLength;p=p||0;k=k||j;if(n.slice){return n.slice(p,k)}if(p<0){p+=j}if(k<0){k+=j}if(k>j){k=j}if(p>=j||p>=k||j===0){return new ArrayBuffer(0)}var o=new Uint8Array(n);var h=new Uint8Array(k-p);for(var l=p,m=0;l<k;l++,m++){h[m]=o[l]}return h.buffer}},{}],29:[function(g,f,e){(function(h){e.encode=function(n){var l=new Uint8Array(n),m,j=l.length,k="";for(m=0;m<j;m+=3){k+=h[l[m]>>2];k+=h[((l[m]&3)<<4)|(l[m+1]>>4)];k+=h[((l[m+1]&15)<<2)|(l[m+2]>>6)];k+=h[l[m+2]&63]}if((j%3)===2){k=k.substring(0,k.length-1)+"="}else{if(j%3===1){k=k.substring(0,k.length-2)+"=="}}return k};e.decode=function(r){var k=r.length*0.75,s=r.length,q,m=0,n,l,j,u;if(r[r.length-1]==="="){k--;if(r[r.length-2]==="="){k--}}var o=new ArrayBuffer(k),t=new Uint8Array(o);for(q=0;q<s;q+=4){n=h.indexOf(r[q]);l=h.indexOf(r[q+1]);j=h.indexOf(r[q+2]);u=h.indexOf(r[q+3]);t[m++]=(n<<2)|(l>>4);t[m++]=((l&15)<<4)|(j>>2);t[m++]=((j&3)<<6)|(u&63)}return o}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],30:[function(g,f,e){(function(m){var l=m.BlobBuilder||m.WebKitBlobBuilder||m.MSBlobBuilder||m.MozBlobBuilder;var j=(function(){try{var p=new Blob(["hi"]);return p.size===2}catch(q){return false}})();var n=j&&(function(){try{var p=new Blob([new Uint8Array([1,2])]);return p.size===2}catch(q){return false}})();var k=l&&l.prototype.append&&l.prototype.getBlob;function o(s){for(var r=0;r<s.length;r++){var q=s[r];if(q.buffer instanceof ArrayBuffer){var p=q.buffer;if(q.byteLength!==p.byteLength){var t=new Uint8Array(q.byteLength);t.set(new Uint8Array(p,q.byteOffset,q.byteLength));p=t.buffer}s[r]=p}}}function i(r,p){p=p||{};var s=new l();o(r);for(var q=0;q<r.length;q++){s.append(r[q])}return(p.type)?s.getBlob(p.type):s.getBlob()}function h(q,p){o(q);return new Blob(q,p||{})}f.exports=(function(){if(j){return n?m.Blob:h}else{if(k){return i}else{return undefined}}})()}).call(this,typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],31:[function(g,f,e){(function(h){
  /*! https://mths.be/utf8js v2.0.0 by @mathias */
  (function(v){var o=typeof e=="object"&&e;var C=typeof f=="object"&&f&&f.exports==o&&f;var u=typeof h=="object"&&h;if(u.global===u||u.window===u){v=u}var t=String.fromCharCode;function n(G){var F=[];var E=0;var H=G.length;var I;var D;while(E<H){I=G.charCodeAt(E++);if(I>=55296&&I<=56319&&E<H){D=G.charCodeAt(E++);if((D&64512)==56320){F.push(((I&1023)<<10)+(D&1023)+65536)}else{F.push(I);E--}}else{F.push(I)}}return F}function z(H){var F=H.length;var E=-1;var G;var D="";while(++E<F){G=H[E];if(G>65535){G-=65536;D+=t(G>>>10&1023|55296);G=56320|G&1023}D+=t(G)}return D}function y(D){if(D>=55296&&D<=57343){throw Error("Lone surrogate U+"+D.toString(16).toUpperCase()+" is not a scalar value")}}function m(E,D){return t(((E>>D)&63)|128)}function x(D){if((D&4294967168)==0){return t(D)}var E="";if((D&4294965248)==0){E=t(((D>>6)&31)|192)}else{if((D&4294901760)==0){y(D);E=t(((D>>12)&15)|224);E+=m(D,6)}else{if((D&4292870144)==0){E=t(((D>>18)&7)|240);E+=m(D,12);E+=m(D,6)}}}E+=t((D&63)|128);return E}function w(G){var F=n(G);var H=F.length;var E=-1;var D;var I="";while(++E<H){D=F[E];I+=x(D)}return I}function i(){if(r>=q){throw Error("Invalid byte index")}var D=s[r]&255;r++;if((D&192)==128){return D&63}throw Error("Invalid continuation byte")}function k(){var E;var D;var H;var G;var F;if(r>q){throw Error("Invalid byte index")}if(r==q){return false}E=s[r]&255;r++;if((E&128)==0){return E}if((E&224)==192){var D=i();F=((E&31)<<6)|D;if(F>=128){return F}else{throw Error("Invalid continuation byte")}}if((E&240)==224){D=i();H=i();F=((E&15)<<12)|(D<<6)|H;if(F>=2048){y(F);return F}else{throw Error("Invalid continuation byte")}}if((E&248)==240){D=i();H=i();G=i();F=((E&15)<<18)|(D<<12)|(H<<6)|G;if(F>=65536&&F<=1114111){return F}}throw Error("Invalid UTF-8 detected")}var s;var q;var r;function j(F){s=n(F);q=s.length;r=0;var D=[];var E;while((E=k())!==false){D.push(E)}return z(D)}var l={version:"2.0.0",encode:w,decode:j};if(typeof d=="function"&&typeof d.amd=="object"&&d.amd){d(function(){return l})}else{if(o&&!o.nodeType){if(C){C.exports=l}else{var A={};var p=A.hasOwnProperty;for(var B in l){p.call(l,B)&&(o[B]=l[B])}}}else{v.utf8=l}}}(this))}).call(this,typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],32:[function(g,f,e){(function(l){var h=/^[\],:{}\s]*$/;var k=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g;var n=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;var o=/(?:^|:|,)(?:\s*\[)+/g;var m=/^\s+/;var j=/\s+$/;f.exports=function i(p){if("string"!=typeof p||!p){return null}p=p.replace(m,"").replace(j,"");if(l.JSON&&JSON.parse){return JSON.parse(p)}if(h.test(p.replace(k,"@").replace(n,"]").replace(o,""))){return(new Function("return "+p))()}}}).call(this,typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],33:[function(g,f,e){e.encode=function(j){var k="";for(var h in j){if(j.hasOwnProperty(h)){if(k.length){k+="&"}k+=encodeURIComponent(h)+"="+encodeURIComponent(j[h])}}return k};e.decode=function(h){var m={};var n=h.split("&");for(var k=0,j=n.length;k<j;k++){var o=n[k].split("=");m[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return m}},{}],34:[function(h,f,e){var g=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;var j=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];f.exports=function i(r){var q=r,l=r.indexOf("["),p=r.indexOf("]");if(l!=-1&&p!=-1){r=r.substring(0,l)+r.substring(l,p).replace(/:/g,";")+r.substring(p,r.length)}var k=g.exec(r||""),o={},n=14;while(n--){o[j[n]]=k[n]||""}if(l!=-1&&p!=-1){o.source=q;o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":");o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":");o.ipv6uri=true}return o}},{}],35:[function(j,h,f){var i=(function(){return this})();var g=i.WebSocket||i.MozWebSocket;h.exports=g?e:null;function e(n,m,l){var k;if(m){k=new g(n,m)}else{k=new g(n)}return k}if(g){e.prototype=g.prototype}},{}],36:[function(g,f,e){(function(j){var h=g("isarray");f.exports=i;function i(l){function k(o){if(!o){return false}if((j.Buffer&&j.Buffer.isBuffer(o))||(j.ArrayBuffer&&o instanceof ArrayBuffer)||(j.Blob&&o instanceof Blob)||(j.File&&o instanceof File)){return true}if(h(o)){for(var n=0;n<o.length;n++){if(k(o[n])){return true}}}else{if(o&&"object"==typeof o){if(o.toJSON){o=o.toJSON()}for(var m in o){if(Object.prototype.hasOwnProperty.call(o,m)&&k(o[m])){return true}}}}return false}return k(l)}}).call(this,typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{isarray:37}],37:[function(g,f,e){f.exports=Array.isArray||function(h){return Object.prototype.toString.call(h)=="[object Array]"}},{}],38:[function(i,f,e){var h=i("global");try{f.exports="XMLHttpRequest" in h&&"withCredentials" in new h.XMLHttpRequest()}catch(g){f.exports=false}},{global:39}],39:[function(g,f,e){f.exports=(function(){return this})()},{}],40:[function(h,f,e){var g=[].indexOf;f.exports=function(j,l){if(g){return j.indexOf(l)}for(var k=0;k<j.length;++k){if(j[k]===l){return k}}return -1}},{}],41:[function(h,g,e){var f=Object.prototype.hasOwnProperty;e.keys=Object.keys||function(k){var j=[];for(var i in k){if(f.call(k,i)){j.push(i)}}return j};e.values=function(k){var j=[];for(var i in k){if(f.call(k,i)){j.push(k[i])}}return j};e.merge=function(j,i){for(var k in i){if(f.call(i,k)){j[k]=i[k]}}return j};e.length=function(i){return e.keys(i).length};e.isEmpty=function(i){return 0==e.length(i)}},{}],42:[function(h,f,e){var g=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;var j=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];f.exports=function i(o){var k=g.exec(o||""),n={},l=14;while(l--){n[j[l]]=k[l]||""}return n}},{}],43:[function(g,f,e){(function(i){var h=g("isarray");var j=g("./is-buffer");e.deconstructPacket=function(o){var l=[];var k=o.data;function n(s){if(!s){return s}if(j(s)){var t={_placeholder:true,num:l.length};l.push(s);return t}else{if(h(s)){var r=new Array(s.length);for(var q=0;q<s.length;q++){r[q]=n(s[q])}return r}else{if("object"==typeof s&&!(s instanceof Date)){var r={};for(var p in s){r[p]=n(s[p])}return r}}}return s}var m=o;m.data=n(k);m.attachments=l.length;return{packet:m,buffers:l}};e.reconstructPacket=function(n,l){var k=0;function m(r){if(r&&r._placeholder){var o=l[r.num];return o}else{if(h(r)){for(var q=0;q<r.length;q++){r[q]=m(r[q])}return r}else{if(r&&"object"==typeof r){for(var p in r){r[p]=m(r[p])}return r}}}return r}n.data=m(n.data);n.attachments=undefined;return n};e.removeBlobs=function(m,o){function n(t,u,q){if(!t){return t}if((i.Blob&&t instanceof Blob)||(i.File&&t instanceof File)){k++;var p=new FileReader();p.onload=function(){if(q){q[u]=this.result}else{l=this.result}if(!--k){o(l)}};p.readAsArrayBuffer(t)}else{if(h(t)){for(var s=0;s<t.length;s++){n(t[s],s,t)}}else{if(t&&"object"==typeof t&&!j(t)){for(var r in t){n(t[r],r,t)}}}}}var k=0;var l=m;n(l);if(!k){o(l)}}}).call(this,typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{"./is-buffer":45,isarray:46}],44:[function(g,h,l){var f=g("debug")("socket.io-parser");var t=g("json3");var o=g("isarray");var q=g("component-emitter");var n=g("./binary");var e=g("./is-buffer");l.protocol=4;l.types=["CONNECT","DISCONNECT","EVENT","BINARY_EVENT","ACK","BINARY_ACK","ERROR"];l.CONNECT=0;l.DISCONNECT=1;l.EVENT=2;l.ACK=3;l.ERROR=4;l.BINARY_EVENT=5;l.BINARY_ACK=6;l.Encoder=k;l.Decoder=s;function k(){}k.prototype.encode=function(v,w){f("encoding packet %j",v);if(l.BINARY_EVENT==v.type||l.BINARY_ACK==v.type){i(v,w)}else{var u=j(v);w([u])}};function j(v){var w="";var u=false;w+=v.type;if(l.BINARY_EVENT==v.type||l.BINARY_ACK==v.type){w+=v.attachments;w+="-"}if(v.nsp&&"/"!=v.nsp){u=true;w+=v.nsp}if(null!=v.id){if(u){w+=",";u=false}w+=v.id}if(null!=v.data){if(u){w+=","}w+=t.stringify(v.data)}f("encoded %j as %s",v,w);return w}function i(v,w){function u(A){var y=n.deconstructPacket(A);var z=j(y.packet);var x=y.buffers;x.unshift(z);w(x)}n.removeBlobs(v,u)}function s(){this.reconstructor=null}q(s.prototype);s.prototype.add=function(v){var u;if("string"==typeof v){u=m(v);if(l.BINARY_EVENT==u.type||l.BINARY_ACK==u.type){this.reconstructor=new r(u);if(this.reconstructor.reconPack.attachments===0){this.emit("decoded",u)}}else{this.emit("decoded",u)}}else{if(e(v)||v.base64){if(!this.reconstructor){throw new Error("got binary data when not reconstructing a packet")}else{u=this.reconstructor.takeBinaryData(v);if(u){this.reconstructor=null;this.emit("decoded",u)}}}else{throw new Error("Unknown type: "+v)}}};function m(z){var y={};var v=0;y.type=Number(z.charAt(0));if(null==l.types[y.type]){return p()}if(l.BINARY_EVENT==y.type||l.BINARY_ACK==y.type){var u="";while(z.charAt(++v)!="-"){u+=z.charAt(v);if(v==z.length){break}}if(u!=Number(u)||z.charAt(v)!="-"){throw new Error("Illegal attachments")}y.attachments=Number(u)}if("/"==z.charAt(v+1)){y.nsp="";while(++v){var A=z.charAt(v);if(","==A){break}y.nsp+=A;if(v==z.length){break}}}else{y.nsp="/"}var w=z.charAt(v+1);if(""!==w&&Number(w)==w){y.id="";while(++v){var A=z.charAt(v);if(null==A||Number(A)!=A){--v;break}y.id+=z.charAt(v);if(v==z.length){break}}y.id=Number(y.id)}if(z.charAt(++v)){try{y.data=t.parse(z.substr(v))}catch(x){return p()}}f("decoded %s as %j",z,y);return y}s.prototype.destroy=function(){if(this.reconstructor){this.reconstructor.finishedReconstruction()}};function r(u){this.reconPack=u;this.buffers=[]}r.prototype.takeBinaryData=function(u){this.buffers.push(u);if(this.buffers.length==this.reconPack.attachments){var v=n.reconstructPacket(this.reconPack,this.buffers);this.finishedReconstruction();return v}return null};r.prototype.finishedReconstruction=function(){this.reconPack=null;this.buffers=[]};function p(u){return{type:l.ERROR,data:"parser error"}}},{"./binary":43,"./is-buffer":45,"component-emitter":9,debug:10,isarray:46,json3:47}],45:[function(g,f,e){(function(h){f.exports=i;function i(j){return(h.Buffer&&h.Buffer.isBuffer(j))||(h.ArrayBuffer&&j instanceof ArrayBuffer)}}).call(this,typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}],46:[function(g,f,e){f.exports=g(37)},{}],47:[function(g,f,e){
  /*! JSON v3.2.6 | http://bestiejs.github.io/json3 | Copyright 2012-2013, Kit Cambridge | http://kit.mit-license.org */
  (function(M){var q={}.toString,m,h,F;var D=typeof d==="function"&&d.amd;var R=typeof JSON=="object"&&JSON;var L=typeof e=="object"&&e&&!e.nodeType&&e;if(L&&R){L.stringify=R.stringify;L.parse=R.parse}else{L=M.JSON=R||{}}var w=new Date(-3509827334573292);try{w=w.getUTCFullYear()==-109252&&w.getUTCMonth()===0&&w.getUTCDate()===1&&w.getUTCHours()==10&&w.getUTCMinutes()==37&&w.getUTCSeconds()==6&&w.getUTCMilliseconds()==708}catch(r){}function j(T){if(j[T]!==F){return j[T]}var U;if(T=="bug-string-char-index"){U="a"[0]!="a"}else{if(T=="json"){U=j("json-stringify")&&j("json-parse")}else{var ab,Y='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if(T=="json-stringify"){var Z=L.stringify,aa=typeof Z=="function"&&w;if(aa){(ab=function(){return 1}).toJSON=ab;try{aa=Z(0)==="0"&&Z(new Number())==="0"&&Z(new String())=='""'&&Z(q)===F&&Z(F)===F&&Z()===F&&Z(ab)==="1"&&Z([ab])=="[1]"&&Z([F])=="[null]"&&Z(null)=="null"&&Z([F,q,null])=="[null,null,null]"&&Z({a:[ab,true,false,null,"\x00\b\n\f\r\t"]})==Y&&Z(null,ab)==="1"&&Z([1,2],null,1)=="[\n 1,\n 2\n]"&&Z(new Date(-8640000000000000))=='"-271821-04-20T00:00:00.000Z"'&&Z(new Date(8640000000000000))=='"+275760-09-13T00:00:00.000Z"'&&Z(new Date(-62198755200000))=='"-000001-01-01T00:00:00.000Z"'&&Z(new Date(-1))=='"1969-12-31T23:59:59.999Z"'}catch(V){aa=false}}U=aa}if(T=="json-parse"){var X=L.parse;if(typeof X=="function"){try{if(X("0")===0&&!X(false)){ab=X(Y);var W=ab.a.length==5&&ab.a[0]===1;if(W){try{W=!X('"\t"')}catch(V){}if(W){try{W=X("01")!==1}catch(V){}}if(W){try{W=X("1.")!==1}catch(V){}}}}}catch(V){W=false}}U=W}}}return j[T]=!!U}if(!j("json")){var N="[object Function]";var K="[object Date]";var H="[object Number]";var I="[object String]";var z="[object Array]";var v="[object Boolean]";var A=j("bug-string-char-index");if(!w){var n=Math.floor;var S=[0,31,59,90,120,151,181,212,243,273,304,334];var y=function(T,U){return S[U]+365*(T-1970)+n((T-1969+(U=+(U>1)))/4)-n((T-1901+U)/100)+n((T-1601+U)/400)}}if(!(m={}.hasOwnProperty)){m=function(V){var T={},U;if((T.__proto__=null,T.__proto__={toString:1},T).toString!=q){m=function(Y){var X=this.__proto__,W=Y in (this.__proto__=null,this);this.__proto__=X;return W}}else{U=T.constructor;m=function(X){var W=(this.constructor||U).prototype;return X in this&&!(X in W&&this[X]===W[X])}}T=null;return m.call(this,V)}}var O={"boolean":1,number:1,string:1,"undefined":1};var p=function(T,V){var U=typeof T[V];return U=="object"?!!T[V]:!O[U]};h=function(V,Y){var W=0,T,U,X;(T=function(){this.valueOf=0}).prototype.valueOf=0;U=new T();for(X in U){if(m.call(U,X)){W++}}T=U=null;if(!W){U=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"];h=function(aa,ae){var ad=q.call(aa)==N,ac,ab;var Z=!ad&&typeof aa.constructor!="function"&&p(aa,"hasOwnProperty")?aa.hasOwnProperty:m;for(ac in aa){if(!(ad&&ac=="prototype")&&Z.call(aa,ac)){ae(ac)}}for(ab=U.length;ac=U[--ab];Z.call(aa,ac)&&ae(ac)){}}}else{if(W==2){h=function(aa,ad){var Z={},ac=q.call(aa)==N,ab;for(ab in aa){if(!(ac&&ab=="prototype")&&!m.call(Z,ab)&&(Z[ab]=1)&&m.call(aa,ab)){ad(ab)}}}}else{h=function(aa,ad){var ac=q.call(aa)==N,ab,Z;for(ab in aa){if(!(ac&&ab=="prototype")&&m.call(aa,ab)&&!(Z=ab==="constructor")){ad(ab)}}if(Z||m.call(aa,(ab="constructor"))){ad(ab)}}}}return h(V,Y)};if(!j("json-stringify")){var l={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"};var E="000000";var o=function(T,U){return(E+(U||0)).slice(-T)};var t="\\u00";var x=function(Z){var T='"',W=0,X=Z.length,Y=X>10&&A,V;if(Y){V=Z.split("")}for(;W<X;W++){var U=Z.charCodeAt(W);switch(U){case 8:case 9:case 10:case 12:case 13:case 34:case 92:T+=l[U];break;default:if(U<32){T+=t+o(2,U.toString(16));break}T+=Y?V[W]:A?Z.charAt(W):Z[W]}}return T+'"'};var k=function(Z,aq,X,ac,an,T,aa){var aj,V,ag,ap,ao,ab,am,ak,ah,ae,ai,U,Y,W,al,af;try{aj=aq[Z]}catch(ad){}if(typeof aj=="object"&&aj){V=q.call(aj);if(V==K&&!m.call(aj,"toJSON")){if(aj>-1/0&&aj<1/0){if(y){ao=n(aj/86400000);for(ag=n(ao/365.2425)+1970-1;y(ag+1,0)<=ao;ag++){}for(ap=n((ao-y(ag,0))/30.42);y(ag,ap+1)<=ao;ap++){}ao=1+ao-y(ag,ap);ab=(aj%86400000+86400000)%86400000;am=n(ab/3600000)%24;ak=n(ab/60000)%60;ah=n(ab/1000)%60;ae=ab%1000}else{ag=aj.getUTCFullYear();ap=aj.getUTCMonth();ao=aj.getUTCDate();am=aj.getUTCHours();ak=aj.getUTCMinutes();ah=aj.getUTCSeconds();ae=aj.getUTCMilliseconds()}aj=(ag<=0||ag>=10000?(ag<0?"-":"+")+o(6,ag<0?-ag:ag):o(4,ag))+"-"+o(2,ap+1)+"-"+o(2,ao)+"T"+o(2,am)+":"+o(2,ak)+":"+o(2,ah)+"."+o(3,ae)+"Z"}else{aj=null}}else{if(typeof aj.toJSON=="function"&&((V!=H&&V!=I&&V!=z)||m.call(aj,"toJSON"))){aj=aj.toJSON(Z)}}}if(X){aj=X.call(aq,Z,aj)}if(aj===null){return"null"}V=q.call(aj);if(V==v){return""+aj}else{if(V==H){return aj>-1/0&&aj<1/0?""+aj:"null"}else{if(V==I){return x(""+aj)}}}if(typeof aj=="object"){for(W=aa.length;W--;){if(aa[W]===aj){throw TypeError()}}aa.push(aj);ai=[];al=T;T+=an;if(V==z){for(Y=0,W=aj.length;Y<W;Y++){U=k(Y,aj,X,ac,an,T,aa);ai.push(U===F?"null":U)}af=ai.length?(an?"[\n"+T+ai.join(",\n"+T)+"\n"+al+"]":("["+ai.join(",")+"]")):"[]"}else{h(ac||aj,function(at){var ar=k(at,aj,X,ac,an,T,aa);if(ar!==F){ai.push(x(at)+":"+(an?" ":"")+ar)}});af=ai.length?(an?"{\n"+T+ai.join(",\n"+T)+"\n"+al+"}":("{"+ai.join(",")+"}")):"{}"}aa.pop();return af}};L.stringify=function(T,V,W){var U,ac,aa,Z;if(typeof V=="function"||typeof V=="object"&&V){if((Z=q.call(V))==N){ac=V}else{if(Z==z){aa={};for(var Y=0,X=V.length,ab;Y<X;ab=V[Y++],((Z=q.call(ab)),Z==I||Z==H)&&(aa[ab]=1)){}}}}if(W){if((Z=q.call(W))==H){if((W-=W%1)>0){for(U="",W>10&&(W=10);U.length<W;U+=" "){}}}else{if(Z==I){U=W.length<=10?W:W.slice(0,10)}}}return k("",(ab={},ab[""]=T,ab),ac,aa,U,"",[])}}if(!j("json-parse")){var G=String.fromCharCode;var i={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"};var B,Q;var C=function(){B=Q=null;throw SyntaxError()};var u=function(){var Y=Q,W=Y.length,X,V,T,Z,U;while(B<W){U=Y.charCodeAt(B);switch(U){case 9:case 10:case 13:case 32:B++;break;case 123:case 125:case 91:case 93:case 58:case 44:X=A?Y.charAt(B):Y[B];B++;return X;case 34:for(X="@",B++;B<W;){U=Y.charCodeAt(B);if(U<32){C()}else{if(U==92){U=Y.charCodeAt(++B);switch(U){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:X+=i[U];B++;break;case 117:V=++B;for(T=B+4;B<T;B++){U=Y.charCodeAt(B);if(!(U>=48&&U<=57||U>=97&&U<=102||U>=65&&U<=70)){C()}}X+=G("0x"+Y.slice(V,B));break;default:C()}}else{if(U==34){break}U=Y.charCodeAt(B);V=B;while(U>=32&&U!=92&&U!=34){U=Y.charCodeAt(++B)}X+=Y.slice(V,B)}}}if(Y.charCodeAt(B)==34){B++;return X}C();default:V=B;if(U==45){Z=true;U=Y.charCodeAt(++B)}if(U>=48&&U<=57){if(U==48&&((U=Y.charCodeAt(B+1)),U>=48&&U<=57)){C()}Z=false;for(;B<W&&((U=Y.charCodeAt(B)),U>=48&&U<=57);B++){}if(Y.charCodeAt(B)==46){T=++B;for(;T<W&&((U=Y.charCodeAt(T)),U>=48&&U<=57);T++){}if(T==B){C()}B=T}U=Y.charCodeAt(B);if(U==101||U==69){U=Y.charCodeAt(++B);if(U==43||U==45){B++}for(T=B;T<W&&((U=Y.charCodeAt(T)),U>=48&&U<=57);T++){}if(T==B){C()}B=T}return +Y.slice(V,B)}if(Z){C()}if(Y.slice(B,B+4)=="true"){B+=4;return true}else{if(Y.slice(B,B+5)=="false"){B+=5;return false}else{if(Y.slice(B,B+4)=="null"){B+=4;return null}}}C()}}return"$"};var P=function(U){var T,V;if(U=="$"){C()}if(typeof U=="string"){if((A?U.charAt(0):U[0])=="@"){return U.slice(1)}if(U=="["){T=[];for(;;V||(V=true)){U=u();if(U=="]"){break}if(V){if(U==","){U=u();if(U=="]"){C()}}else{C()}}if(U==","){C()}T.push(P(U))}return T}else{if(U=="{"){T={};for(;;V||(V=true)){U=u();if(U=="}"){break}if(V){if(U==","){U=u();if(U=="}"){C()}}else{C()}}if(U==","||typeof U!="string"||(A?U.charAt(0):U[0])!="@"||u()!=":"){C()}T[U.slice(1)]=P(u())}return T}}C()}return U};var J=function(V,U,W){var T=s(V,U,W);if(T===F){delete V[U]}else{V[U]=T}};var s=function(W,V,X){var U=W[V],T;if(typeof U=="object"&&U){if(q.call(U)==z){for(T=U.length;T--;){J(U,T,X)}}else{h(U,function(Y){J(U,Y,X)})}}return X.call(W,V,U)};L.parse=function(V,W){var T,U;B=0;Q=""+V;T=P(u());if(u()!="$"){C()}B=Q=null;return W&&q.call(W)==N?s((U={},U[""]=T,U),"",W):T}}}if(D){d(function(){return L})}}(this))},{}],48:[function(h,g,e){g.exports=f;function f(l,j){var m=[];j=j||0;for(var k=j||0;k<l.length;k++){m[k-j]=l[k]}return m}},{}]},{},[1])(1)});