forked from jeromeetienne/EasyWebsocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheasyWebSocket.min.js
108 lines (108 loc) · 40.6 KB
/
easyWebSocket.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/*
The MIT license.
@copyright Copyright (c) 2010 LearnBoost <[email protected]>
The MIT license.
@copyright Copyright (c) 2010 LearnBoost <[email protected]>
The MIT license.
@copyright Copyright (c) 2010 LearnBoost <[email protected]>
The MIT license.
@copyright Copyright (c) 2010 LearnBoost <[email protected]>
The MIT license.
@copyright Copyright (c) 2010 LearnBoost <[email protected]>
The MIT license.
@copyright Copyright (c) 2010 LearnBoost <[email protected]>
The MIT license.
@copyright Copyright (c) 2010 LearnBoost <[email protected]>
The MIT license.
@copyright Copyright (c) 2010 LearnBoost <[email protected]>
The MIT license.
@copyright Copyright (c) 2010 LearnBoost <[email protected]>
The MIT license.
@copyright Copyright (c) 2010 LearnBoost <[email protected]>
The MIT license.
@copyright Copyright (c) 2010 LearnBoost <[email protected]>
*/
this.io={version:"0.6.2",setPath:function(a){window.console&&console.error&&console.error("io.setPath will be removed. Please set the variable WEB_SOCKET_SWF_LOCATION pointing to WebSocketMain.swf");this.path=/\/$/.test(a)?a:a+"/";WEB_SOCKET_SWF_LOCATION=a+"lib/vendor/web-socket-js/WebSocketMain.swf"}};if("jQuery"in this)jQuery.io=this.io;if(typeof window!="undefined")if(typeof WEB_SOCKET_SWF_LOCATION==="undefined")WEB_SOCKET_SWF_LOCATION="/socket.io/lib/vendor/web-socket-js/WebSocketMain.swf";
(function(){var a=false;io.util={ios:false,load:function(b){if(/loaded|complete/.test(document.readyState)||a)return b();"attachEvent"in window?window.attachEvent("onload",b):window.addEventListener("load",b,false)},inherit:function(b,c){for(var e in c.prototype)b.prototype[e]=c.prototype[e]},indexOf:function(b,c,e){var g=b.length;for(e=e<0?Math.max(0,g+e):e||0;e<g;e++)if(b[e]===c)return e;return-1},isArray:function(b){return Object.prototype.toString.call(b)==="[object Array]"},merge:function(b,
c){for(var e in c)if(c.hasOwnProperty(e))b[e]=c[e]}};io.util.ios=/iphone|ipad/i.test(navigator.userAgent);io.util.android=/android/i.test(navigator.userAgent);io.util.opera=/opera/i.test(navigator.userAgent);io.util.load(function(){a=true})})();
(function(){Transport=io.Transport=function(a,b){this.base=a;this.options={timeout:15E3};io.util.merge(this.options,b)};Transport.prototype.send=function(){throw Error("Missing send() implementation");};Transport.prototype.connect=function(){throw Error("Missing connect() implementation");};Transport.prototype.disconnect=function(){throw Error("Missing disconnect() implementation");};Transport.prototype._encode=function(a){var b="",c;a=io.util.isArray(a)?a:[a];for(var e=0,g=a.length;e<g;e++){if(a[e]===
null||a[e]===undefined)c="";else{c=a[e];if(Object.prototype.toString.call(c)=="[object Object]")if("JSON"in window)c="~j~"+JSON.stringify(c);else{"console"in window&&console.error&&console.error("Trying to encode as JSON, but JSON.stringify is missing.");c='{ "$error": "Invalid message" }'}else c=String(c)}c=c;b+="~m~"+c.length+"~m~"+c}return b};Transport.prototype._decode=function(a){var b=[],c,e;do{if(a.substr(0,3)!=="~m~")return b;a=a.substr(3);c="";for(var g=0,k=a.length;g<k;g++){e=Number(a.substr(g,
1));if(a.substr(g,1)==e)c+=e;else{a=a.substr(c.length+3);c=Number(c);break}}b.push(a.substr(0,c));a=a.substr(c)}while(a!=="");return b};Transport.prototype._onData=function(a){this._setTimeout();if((a=this._decode(a))&&a.length)for(var b=0,c=a.length;b<c;b++)this._onMessage(a[b])};Transport.prototype._setTimeout=function(){var a=this;this._timeout&&clearTimeout(this._timeout);this._timeout=setTimeout(function(){a._onTimeout()},this.options.timeout)};Transport.prototype._onTimeout=function(){this._onDisconnect()};
Transport.prototype._onMessage=function(a){if(this.sessionid)if(a.substr(0,3)=="~h~")this._onHeartbeat(a.substr(3));else a.substr(0,3)=="~j~"?this.base._onMessage(JSON.parse(a.substr(3))):this.base._onMessage(a);else{this.sessionid=a;this._onConnect()}};Transport.prototype._onHeartbeat=function(a){this.send("~h~"+a)};Transport.prototype._onConnect=function(){this.connected=true;this.connecting=false;this.base._onConnect();this._setTimeout()};Transport.prototype._onDisconnect=function(){this.connected=
this.connecting=false;this.sessionid=null;this.base._onDisconnect()};Transport.prototype._prepareUrl=function(){return(this.base.options.secure?"https":"http")+"://"+this.base.host+":"+this.base.options.port+"/"+this.base.options.resource+"/"+this.type+(this.sessionid?"/"+this.sessionid:"/")}})();
(function(){var a=new Function,b;b="XMLHttpRequest"in window?(new XMLHttpRequest).withCredentials!=undefined:false;var c=function(g){if("XDomainRequest"in window&&g)return new XDomainRequest;if("XMLHttpRequest"in window&&(!g||b))return new XMLHttpRequest;if(!g){try{return new ActiveXObject("MSXML2.XMLHTTP")}catch(k){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(q){}}return false},e=io.Transport.XHR=function(){io.Transport.apply(this,arguments);this._sendBuffer=[]};io.util.inherit(e,io.Transport);
e.prototype.connect=function(){this._get();return this};e.prototype._checkSend=function(){if(!this._posting&&this._sendBuffer.length){var g=this._encode(this._sendBuffer);this._sendBuffer=[];this._send(g)}};e.prototype.send=function(g){io.util.isArray(g)?this._sendBuffer.push.apply(this._sendBuffer,g):this._sendBuffer.push(g);this._checkSend();return this};e.prototype._send=function(g){var k=this;this._posting=true;this._sendXhr=this._request("send","POST");this._sendXhr.onreadystatechange=function(){var q;
if(k._sendXhr.readyState==4){k._sendXhr.onreadystatechange=a;try{q=k._sendXhr.status}catch(o){}k._posting=false;q==200?k._checkSend():k._onDisconnect()}};this._sendXhr.send("data="+encodeURIComponent(g))};e.prototype.disconnect=function(){this._onDisconnect();return this};e.prototype._onDisconnect=function(){if(this._xhr){this._xhr.onreadystatechange=a;try{this._xhr.abort()}catch(g){}this._xhr=null}if(this._sendXhr){this._sendXhr.onreadystatechange=a;try{this._sendXhr.abort()}catch(k){}this._sendXhr=
null}this._sendBuffer=[];io.Transport.prototype._onDisconnect.call(this)};e.prototype._request=function(g,k,q){var o=c(this.base._isXDomain());if(q)o.multipart=true;o.open(k||"GET",this._prepareUrl()+(g?"/"+g:""));k=="POST"&&"setRequestHeader"in o&&o.setRequestHeader("Content-type","application/x-www-form-urlencoded; charset=utf-8");return o};e.check=function(g){try{if(c(g))return true}catch(k){}return false};e.xdomainCheck=function(){return e.check(true)};e.request=c})();
(function(){var a=io.Transport.websocket=function(){io.Transport.apply(this,arguments)};io.util.inherit(a,io.Transport);a.prototype.type="websocket";a.prototype.connect=function(){var b=this;this.socket=new WebSocket(this._prepareUrl());this.socket.onmessage=function(c){b._onData(c.data)};this.socket.onclose=function(){b._onClose()};this.socket.onerror=function(c){b._onError(c)};return this};a.prototype.send=function(b){this.socket&&this.socket.send(this._encode(b));return this};a.prototype.disconnect=
function(){this.socket&&this.socket.close();return this};a.prototype._onClose=function(){this._onDisconnect();return this};a.prototype._onError=function(b){this.base.emit("error",[b])};a.prototype._prepareUrl=function(){return(this.base.options.secure?"wss":"ws")+"://"+this.base.host+":"+this.base.options.port+"/"+this.base.options.resource+"/"+this.type+(this.sessionid?"/"+this.sessionid:"")};a.check=function(){return"WebSocket"in window&&WebSocket.prototype&&WebSocket.prototype.send&&!!WebSocket.prototype.send.toString().match(/native/i)&&
typeof WebSocket!=="undefined"};a.xdomainCheck=function(){return true}})();
(function(){var a=io.Transport.flashsocket=function(){io.Transport.websocket.apply(this,arguments)};io.util.inherit(a,io.Transport.websocket);a.prototype.type="flashsocket";a.prototype.connect=function(){var b=this,c=arguments;WebSocket.__addTask(function(){io.Transport.websocket.prototype.connect.apply(b,c)});return this};a.prototype.send=function(){var b=this,c=arguments;WebSocket.__addTask(function(){io.Transport.websocket.prototype.send.apply(b,c)});return this};a.check=function(){if(typeof WebSocket==
"undefined"||!("__addTask"in WebSocket))return false;if(io.util.opera)return false;if("navigator"in window&&"plugins"in navigator&&navigator.plugins["Shockwave Flash"])return!!navigator.plugins["Shockwave Flash"].description;if("ActiveXObject"in window)try{return!!(new ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}catch(b){}return false};a.xdomainCheck=function(){return true}})();
(function(){var a=io.Transport.htmlfile=function(){io.Transport.XHR.apply(this,arguments)};io.util.inherit(a,io.Transport.XHR);a.prototype.type="htmlfile";a.prototype._get=function(){var b=this;this._open();window.attachEvent("onunload",function(){b._destroy()})};a.prototype._open=function(){this._doc=new ActiveXObject("htmlfile");this._doc.open();this._doc.write("<html></html>");this._doc.parentWindow.s=this;this._doc.close();var b=this._doc.createElement("div");this._doc.body.appendChild(b);this._iframe=
this._doc.createElement("iframe");b.appendChild(this._iframe);this._iframe.src=this._prepareUrl()+"/"+ +new Date};a.prototype._=function(b,c){this._onData(b);var e=c.getElementsByTagName("script")[0];e.parentNode.removeChild(e)};a.prototype._destroy=function(){if(this._iframe){this._iframe.src="about:blank";this._doc=null;CollectGarbage()}};a.prototype.disconnect=function(){this._destroy();return io.Transport.XHR.prototype.disconnect.call(this)};a.check=function(){if("ActiveXObject"in window)try{return new ActiveXObject("htmlfile")&&
io.Transport.XHR.check()}catch(b){}return false};a.xdomainCheck=function(){return false}})();
(function(){var a=io.Transport["xhr-multipart"]=function(){io.Transport.XHR.apply(this,arguments)};io.util.inherit(a,io.Transport.XHR);a.prototype.type="xhr-multipart";a.prototype._get=function(){var b=this;this._xhr=this._request("","GET",true);this._xhr.onreadystatechange=function(){b._xhr.readyState==4&&b._onData(b._xhr.responseText)};this._xhr.send(null)};a.check=function(){return"XMLHttpRequest"in window&&"prototype"in XMLHttpRequest&&"multipart"in XMLHttpRequest.prototype};a.xdomainCheck=function(){return true}})();
(function(){var a=new Function,b=io.Transport["xhr-polling"]=function(){io.Transport.XHR.apply(this,arguments)};io.util.inherit(b,io.Transport.XHR);b.prototype.type="xhr-polling";b.prototype.connect=function(){if(io.util.ios||io.util.android){var c=this;io.util.load(function(){setTimeout(function(){io.Transport.XHR.prototype.connect.call(c)},10)})}else io.Transport.XHR.prototype.connect.call(this)};b.prototype._get=function(){var c=this;this._xhr=this._request(+new Date,"GET");this._xhr.onreadystatechange=
function(){var e;if(c._xhr.readyState==4){c._xhr.onreadystatechange=a;try{e=c._xhr.status}catch(g){}if(e==200){c._onData(c._xhr.responseText);c._get()}else c._onDisconnect()}};this._xhr.send(null)};b.check=function(){return io.Transport.XHR.check()};b.xdomainCheck=function(){return io.Transport.XHR.xdomainCheck()}})();io.JSONP=[];
JSONPPolling=io.Transport["jsonp-polling"]=function(){io.Transport.XHR.apply(this,arguments);this._insertAt=document.getElementsByTagName("script")[0];this._index=io.JSONP.length;io.JSONP.push(this)};io.util.inherit(JSONPPolling,io.Transport["xhr-polling"]);JSONPPolling.prototype.type="jsonp-polling";
JSONPPolling.prototype._send=function(a){function b(){c();e._posting=false;e._checkSend()}function c(){e._iframe&&e._form.removeChild(e._iframe);try{o=document.createElement('<iframe name="'+e._iframeId+'">')}catch(z){o=document.createElement("iframe");o.name=e._iframeId}o.id=e._iframeId;e._form.appendChild(o);e._iframe=o}var e=this;if(!("_form"in this)){var g=document.createElement("FORM"),k=document.createElement("TEXTAREA"),q=this._iframeId="socket_io_iframe_"+this._index,o;g.style.position="absolute";
g.style.top="-1000px";g.style.left="-1000px";g.target=q;g.method="POST";g.action=this._prepareUrl()+"/"+ +new Date+"/"+this._index;k.name="data";g.appendChild(k);this._insertAt.parentNode.insertBefore(g,this._insertAt);document.body.appendChild(g);this._form=g;this._area=k}c();this._posting=true;this._area.value=a;try{this._form.submit()}catch(H){}if(this._iframe.attachEvent)o.onreadystatechange=function(){e._iframe.readyState=="complete"&&b()};else this._iframe.onload=b};
JSONPPolling.prototype._get=function(){var a=this,b=document.createElement("SCRIPT");if(this._script){this._script.parentNode.removeChild(this._script);this._script=null}b.async=true;b.src=this._prepareUrl()+"/"+ +new Date+"/"+this._index;b.onerror=function(){a._onDisconnect()};this._insertAt.parentNode.insertBefore(b,this._insertAt);this._script=b};JSONPPolling.prototype._=function(){this._onData.apply(this,arguments);this._get();return this};JSONPPolling.check=function(){return true};
JSONPPolling.xdomainCheck=function(){return true};
(function(){var a=io.Socket=function(b,c){this.host=b||document.domain;this.options={secure:false,document:document,port:document.location.port||80,resource:"socket.io",transports:["websocket","flashsocket","htmlfile","xhr-multipart","xhr-polling","jsonp-polling"],transportOptions:{"xhr-polling":{timeout:25E3},"jsonp-polling":{timeout:25E3}},connectTimeout:5E3,tryTransportsOnConnectTimeout:true,rememberTransport:true};io.util.merge(this.options,c);this.connecting=this.connected=false;this._events=
{};this.transport=this.getTransport();!this.transport&&"console"in window&&console.error("No transport available")};a.prototype.getTransport=function(b){var c=b||this.options.transports;if(this.options.rememberTransport&&!b)if(b=this.options.document.cookie.match("(?:^|;)\\s*socketio=([^;]*)")){this._rememberedTransport=true;c=[decodeURIComponent(b[1])]}b=0;for(var e;e=c[b];b++)if(io.Transport[e]&&io.Transport[e].check()&&(!this._isXDomain()||io.Transport[e].xdomainCheck()))return new io.Transport[e](this,
this.options.transportOptions[e]||{});return null};a.prototype.connect=function(){if(this.transport&&!this.connected){this.connecting&&this.disconnect();this.connecting=true;this.emit("connecting",[this.transport.type]);this.transport.connect();if(this.options.connectTimeout){var b=this;this.connectTimeoutTimer=setTimeout(function(){if(!b.connected){b.disconnect();if(b.options.tryTransportsOnConnectTimeout&&!b._rememberedTransport){if(!b._remainingTransports)b._remainingTransports=b.options.transports.slice(0);
for(var c=b._remainingTransports;c.length>0&&c.splice(0,1)[0]!=b.transport.type;);if(c.length){b.transport=b.getTransport(c);b.connect()}}if(!b._remainingTransports||b._remainingTransports.length==0)b.emit("connect_failed")}b._remainingTransports&&b._remainingTransports.length==0&&delete b._remainingTransports},this.options.connectTimeout)}}return this};a.prototype.send=function(b){if(!this.transport||!this.transport.connected)return this._queue(b);this.transport.send(b);return this};a.prototype.disconnect=
function(){this.connectTimeoutTimer&&clearTimeout(this.connectTimeoutTimer);this.transport.disconnect();return this};a.prototype.on=function(b,c){b in this._events||(this._events[b]=[]);this._events[b].push(c);return this};a.prototype.emit=function(b,c){if(b in this._events)for(var e=this._events[b].concat(),g=0,k=e.length;g<k;g++)e[g].apply(this,c===undefined?[]:c);return this};a.prototype.removeEvent=function(b,c){if(b in this._events)for(var e=0,g=this._events[b].length;e<g;e++)this._events[b][e]==
c&&this._events[b].splice(e,1);return this};a.prototype._queue=function(b){if(!("_queueStack"in this))this._queueStack=[];this._queueStack.push(b);return this};a.prototype._doQueue=function(){if(!("_queueStack"in this)||!this._queueStack.length)return this;this.transport.send(this._queueStack);this._queueStack=[];return this};a.prototype._isXDomain=function(){return this.host!==document.domain};a.prototype._onConnect=function(){this.connected=true;this.connecting=false;this._doQueue();if(this.options.rememberTransport)this.options.document.cookie=
"socketio="+encodeURIComponent(this.transport.type);this.emit("connect")};a.prototype._onMessage=function(b){this.emit("message",[b])};a.prototype._onDisconnect=function(){var b=this.connected;this.connecting=this.connected=false;this._queueStack=[];b&&this.emit("disconnect")};a.prototype.fire=a.prototype.emit;a.prototype.addListener=a.prototype.addEvent=a.prototype.addEventListener=a.prototype.on})();
var swfobject=function(){function a(){if(!E){try{var d=m.getElementsByTagName("body")[0].appendChild(m.createElement("span"));d.parentNode.removeChild(d)}catch(f){return}E=true;d=K.length;for(var h=0;h<d;h++)K[h]()}}function b(d){if(E)d();else K[K.length]=d}function c(d){if(typeof u.addEventListener!=r)u.addEventListener("load",d,false);else if(typeof m.addEventListener!=r)m.addEventListener("load",d,false);else if(typeof u.attachEvent!=r)ba(u,"onload",d);else if(typeof u.onload=="function"){var f=
u.onload;u.onload=function(){f();d()}}else u.onload=d}function e(){var d=m.getElementsByTagName("body")[0],f=m.createElement(w);f.setAttribute("type",L);var h=d.appendChild(f);if(h){var i=0;(function(){if(typeof h.GetVariable!=r){var j=h.GetVariable("$version");if(j){j=j.split(" ")[1].split(",");l.pv=[parseInt(j[0],10),parseInt(j[1],10),parseInt(j[2],10)]}}else if(i<10){i++;setTimeout(arguments.callee,10);return}d.removeChild(f);h=null;g()})()}else g()}function g(){var d=A.length;if(d>0)for(var f=
0;f<d;f++){var h=A[f].id,i=A[f].callbackFn,j={success:false,id:h};if(l.pv[0]>0){var p=v(h);if(p)if(M(A[f].swfVersion)&&!(l.wk&&l.wk<312)){F(h,true);if(i){j.success=true;j.ref=k(h);i(j)}}else if(A[f].expressInstall&&q()){j={};j.data=A[f].expressInstall;j.width=p.getAttribute("width")||"0";j.height=p.getAttribute("height")||"0";if(p.getAttribute("class"))j.styleclass=p.getAttribute("class");if(p.getAttribute("align"))j.align=p.getAttribute("align");var n={};p=p.getElementsByTagName("param");for(var s=
p.length,t=0;t<s;t++)if(p[t].getAttribute("name").toLowerCase()!="movie")n[p[t].getAttribute("name")]=p[t].getAttribute("value");o(j,n,h,i)}else{H(p);i&&i(j)}}else{F(h,true);if(i){if((h=k(h))&&typeof h.SetVariable!=r){j.success=true;j.ref=h}i(j)}}}}function k(d){var f=null;if((d=v(d))&&d.nodeName=="OBJECT")if(typeof d.SetVariable!=r)f=d;else if(d=d.getElementsByTagName(w)[0])f=d;return f}function q(){return!N&&M("6.0.65")&&(l.win||l.mac)&&!(l.wk&&l.wk<312)}function o(d,f,h,i){N=true;T=i||null;V={success:false,
id:h};var j=v(h);if(j){if(j.nodeName=="OBJECT"){I=z(j);O=null}else{I=j;O=h}d.id=W;if(typeof d.width==r||!/%$/.test(d.width)&&parseInt(d.width,10)<310)d.width="310";if(typeof d.height==r||!/%$/.test(d.height)&&parseInt(d.height,10)<137)d.height="137";m.title=m.title.slice(0,47)+" - Flash Player Installation";i=l.ie&&l.win?"ActiveX":"PlugIn";i="MMredirectURL="+u.location.toString().replace(/&/g,"%26")+"&MMplayerType="+i+"&MMdoctitle="+m.title;if(typeof f.flashvars!=r)f.flashvars+="&"+i;else f.flashvars=
i;if(l.ie&&l.win&&j.readyState!=4){i=m.createElement("div");h+="SWFObjectNew";i.setAttribute("id",h);j.parentNode.insertBefore(i,j);j.style.display="none";(function(){j.readyState==4?j.parentNode.removeChild(j):setTimeout(arguments.callee,10)})()}B(d,f,h)}}function H(d){if(l.ie&&l.win&&d.readyState!=4){var f=m.createElement("div");d.parentNode.insertBefore(f,d);f.parentNode.replaceChild(z(d),f);d.style.display="none";(function(){d.readyState==4?d.parentNode.removeChild(d):setTimeout(arguments.callee,
10)})()}else d.parentNode.replaceChild(z(d),d)}function z(d){var f=m.createElement("div");if(l.win&&l.ie)f.innerHTML=d.innerHTML;else if(d=d.getElementsByTagName(w)[0])if(d=d.childNodes)for(var h=d.length,i=0;i<h;i++)!(d[i].nodeType==1&&d[i].nodeName=="PARAM")&&d[i].nodeType!=8&&f.appendChild(d[i].cloneNode(true));return f}function B(d,f,h){var i,j=v(h);if(l.wk&&l.wk<312)return i;if(j){if(typeof d.id==r)d.id=h;if(l.ie&&l.win){var p="";for(var n in d)if(d[n]!=Object.prototype[n])if(n.toLowerCase()==
"data")f.movie=d[n];else if(n.toLowerCase()=="styleclass")p+=' class="'+d[n]+'"';else if(n.toLowerCase()!="classid")p+=" "+n+'="'+d[n]+'"';n="";for(var s in f)if(f[s]!=Object.prototype[s])n+='<param name="'+s+'" value="'+f[s]+'" />';j.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+p+">"+n+"</object>";P[P.length]=d.id;i=v(d.id)}else{s=m.createElement(w);s.setAttribute("type",L);for(var t in d)if(d[t]!=Object.prototype[t])if(t.toLowerCase()=="styleclass")s.setAttribute("class",
d[t]);else t.toLowerCase()!="classid"&&s.setAttribute(t,d[t]);for(p in f)if(f[p]!=Object.prototype[p]&&p.toLowerCase()!="movie"){d=s;n=p;t=f[p];h=m.createElement("param");h.setAttribute("name",n);h.setAttribute("value",t);d.appendChild(h)}j.parentNode.replaceChild(s,j);i=s}}return i}function X(d){var f=v(d);if(f&&f.nodeName=="OBJECT")if(l.ie&&l.win){f.style.display="none";(function(){if(f.readyState==4){var h=v(d);if(h){for(var i in h)if(typeof h[i]=="function")h[i]=null;h.parentNode.removeChild(h)}}else setTimeout(arguments.callee,
10)})()}else f.parentNode.removeChild(f)}function v(d){var f=null;try{f=m.getElementById(d)}catch(h){}return f}function ba(d,f,h){d.attachEvent(f,h);G[G.length]=[d,f,h]}function M(d){var f=l.pv;d=d.split(".");d[0]=parseInt(d[0],10);d[1]=parseInt(d[1],10)||0;d[2]=parseInt(d[2],10)||0;return f[0]>d[0]||f[0]==d[0]&&f[1]>d[1]||f[0]==d[0]&&f[1]==d[1]&&f[2]>=d[2]?true:false}function Y(d,f,h,i){if(!(l.ie&&l.mac)){var j=m.getElementsByTagName("head")[0];if(j){h=h&&typeof h=="string"?h:"screen";if(i)U=x=null;
if(!x||U!=h){i=m.createElement("style");i.setAttribute("type","text/css");i.setAttribute("media",h);x=j.appendChild(i);if(l.ie&&l.win&&typeof m.styleSheets!=r&&m.styleSheets.length>0)x=m.styleSheets[m.styleSheets.length-1];U=h}if(l.ie&&l.win)x&&typeof x.addRule==w&&x.addRule(d,f);else x&&typeof m.createTextNode!=r&&x.appendChild(m.createTextNode(d+" {"+f+"}"))}}}function F(d,f){if(Z){var h=f?"visible":"hidden";if(E&&v(d))v(d).style.visibility=h;else Y("#"+d,"visibility:"+h)}}function $(d){return/[\\\"<>\.;]/.exec(d)!=
null&&typeof encodeURIComponent!=r?encodeURIComponent(d):d}var r="undefined",w="object",L="application/x-shockwave-flash",W="SWFObjectExprInst",u=window,m=document,C=navigator,aa=false,K=[function(){aa?e():g()}],A=[],P=[],G=[],I,O,T,V,E=false,N=false,x,U,Z=true,l=function(){var d=typeof m.getElementById!=r&&typeof m.getElementsByTagName!=r&&typeof m.createElement!=r,f=C.userAgent.toLowerCase(),h=C.platform.toLowerCase(),i=h?/win/.test(h):/win/.test(f);h=h?/mac/.test(h):/mac/.test(f);f=/webkit/.test(f)?
parseFloat(f.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false;var j=!+"\u000b1",p=[0,0,0],n=null;if(typeof C.plugins!=r&&typeof C.plugins["Shockwave Flash"]==w){if((n=C.plugins["Shockwave Flash"].description)&&!(typeof C.mimeTypes!=r&&C.mimeTypes[L]&&!C.mimeTypes[L].enabledPlugin)){aa=true;j=false;n=n.replace(/^.*\s+(\S+\s+\S+$)/,"$1");p[0]=parseInt(n.replace(/^(.*)\..*$/,"$1"),10);p[1]=parseInt(n.replace(/^.*\.(.*)\s.*$/,"$1"),10);p[2]=/[a-zA-Z]/.test(n)?parseInt(n.replace(/^.*[a-zA-Z]+(.*)$/,
"$1"),10):0}}else if(typeof u.ActiveXObject!=r)try{var s=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(s)if(n=s.GetVariable("$version")){j=true;n=n.split(" ")[1].split(",");p=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]}}catch(t){}return{w3:d,pv:p,wk:f,ie:j,win:i,mac:h}}();(function(){if(l.w3){if(typeof m.readyState!=r&&m.readyState=="complete"||typeof m.readyState==r&&(m.getElementsByTagName("body")[0]||m.body))a();if(!E){typeof m.addEventListener!=r&&m.addEventListener("DOMContentLoaded",
a,false);if(l.ie&&l.win){m.attachEvent("onreadystatechange",function(){if(m.readyState=="complete"){m.detachEvent("onreadystatechange",arguments.callee);a()}});u==top&&function(){if(!E){try{m.documentElement.doScroll("left")}catch(d){setTimeout(arguments.callee,0);return}a()}}()}l.wk&&function(){E||(/loaded|complete/.test(m.readyState)?a():setTimeout(arguments.callee,0))}();c(a)}}})();(function(){l.ie&&l.win&&window.attachEvent("onunload",function(){for(var d=G.length,f=0;f<d;f++)G[f][0].detachEvent(G[f][1],
G[f][2]);d=P.length;for(f=0;f<d;f++)X(P[f]);for(var h in l)l[h]=null;l=null;for(var i in swfobject)swfobject[i]=null;swfobject=null})})();return{registerObject:function(d,f,h,i){if(l.w3&&d&&f){var j={};j.id=d;j.swfVersion=f;j.expressInstall=h;j.callbackFn=i;A[A.length]=j;F(d,false)}else i&&i({success:false,id:d})},getObjectById:function(d){if(l.w3)return k(d)},embedSWF:function(d,f,h,i,j,p,n,s,t,J){var Q={success:false,id:f};if(l.w3&&!(l.wk&&l.wk<312)&&d&&f&&h&&i&&j){F(f,false);b(function(){h+="";
i+="";var D={};if(t&&typeof t===w)for(var y in t)D[y]=t[y];D.data=d;D.width=h;D.height=i;y={};if(s&&typeof s===w)for(var R in s)y[R]=s[R];if(n&&typeof n===w)for(var S in n)if(typeof y.flashvars!=r)y.flashvars+="&"+S+"="+n[S];else y.flashvars=S+"="+n[S];if(M(j)){R=B(D,y,f);D.id==f&&F(f,true);Q.success=true;Q.ref=R}else if(p&&q()){D.data=p;o(D,y,f,J);return}else F(f,true);J&&J(Q)})}else J&&J(Q)},switchOffAutoHideShow:function(){Z=false},ua:l,getFlashPlayerVersion:function(){return{major:l.pv[0],minor:l.pv[1],
release:l.pv[2]}},hasFlashPlayerVersion:M,createSWF:function(d,f,h){if(l.w3)return B(d,f,h)},showExpressInstall:function(d,f,h,i){l.w3&&q()&&o(d,f,h,i)},removeSWF:function(d){l.w3&&X(d)},createCSS:function(d,f,h,i){l.w3&&Y(d,f,h,i)},addDomLoadEvent:b,addLoadEvent:c,getQueryParamValue:function(d){var f=m.location.search||m.location.hash;if(f){if(/\?/.test(f))f=f.split("?")[1];if(d==null)return $(f);f=f.split("&");for(var h=0;h<f.length;h++)if(f[h].substring(0,f[h].indexOf("="))==d)return $(f[h].substring(f[h].indexOf("=")+
1))}return""},expressInstallCallback:function(){if(N){var d=v(W);if(d&&I){d.parentNode.replaceChild(I,d);if(O){F(O,true);if(l.ie&&l.win)I.style.display="block"}T&&T(V)}N=false}}}}();function FABridge(a,b){this.target=a;this.remoteTypeCache={};this.remoteInstanceCache={};this.remoteFunctionCache={};this.localFunctionCache={};this.bridgeID=FABridge.nextBridgeID++;this.name=b;this.nextLocalFuncID=0;FABridge.instances[this.name]=this;FABridge.idMap[this.bridgeID]=this;return this}
FABridge.TYPE_ASINSTANCE=1;FABridge.TYPE_ASFUNCTION=2;FABridge.TYPE_JSFUNCTION=3;FABridge.TYPE_ANONYMOUS=4;FABridge.initCallbacks={};FABridge.userTypes={};FABridge.addToUserTypes=function(){for(var a=0;a<arguments.length;a++)FABridge.userTypes[arguments[a]]={typeName:arguments[a],enriched:false}};FABridge.argsToArray=function(a){for(var b=[],c=0;c<a.length;c++)b[c]=a[c];return b};function instanceFactory(a){this.fb_instance_id=a;return this}
function FABridge__invokeJSFunction(a){var b=a[0];a=a.concat();a.shift();return FABridge.extractBridgeFromID(b).invokeLocalFunction(b,a)}FABridge.addInitializationCallback=function(a,b){var c=FABridge.instances[a];if(c!=undefined)b.call(c);else{c=FABridge.initCallbacks[a];if(c==null)FABridge.initCallbacks[a]=c=[];c.push(b)}};
function FABridge__bridgeInitialized(a){var b=document.getElementsByTagName("object"),c=b.length,e=[];if(c>0)for(var g=0;g<c;g++)if(typeof b[g].SetVariable!="undefined")e[e.length]=b[g];c=document.getElementsByTagName("embed");g=c.length;b=[];if(g>0)for(var k=0;k<g;k++)if(typeof c[k].SetVariable!="undefined")b[b.length]=c[k];k=e.length;c=b.length;g="bridgeName="+a;if(k==1&&!c||k==1&&c==1)FABridge.attachBridge(e[0],a);else if(c==1&&!k)FABridge.attachBridge(b[0],a);else{var q=false;if(k>1)for(var o=
0;o<k;o++){for(var H=e[o].childNodes,z=0;z<H.length;z++){var B=H[z];if(B.nodeType==1&&B.tagName.toLowerCase()=="param"&&B.name.toLowerCase()=="flashvars"&&B.value.indexOf(g)>=0){FABridge.attachBridge(e[o],a);q=true;break}}if(q)break}if(!q&&c>1)for(e=0;e<c;e++)if(b[e].attributes.getNamedItem("flashVars").nodeValue.indexOf(g)>=0){FABridge.attachBridge(b[e],a);break}}return true}FABridge.nextBridgeID=0;FABridge.instances={};FABridge.idMap={};FABridge.refCount=0;
FABridge.extractBridgeFromID=function(a){return FABridge.idMap[a>>16]};FABridge.attachBridge=function(a,b){var c=new FABridge(a,b);FABridge[b]=c;var e=FABridge.initCallbacks[b];if(e!=null){for(var g=0;g<e.length;g++)e[g].call(c);delete FABridge.initCallbacks[b]}};FABridge.blockedMethods={toString:true,get:true,set:true,call:true};
FABridge.prototype={root:function(){return this.deserialize(this.target.getRoot())},releaseASObjects:function(){return this.target.releaseASObjects()},releaseNamedASObject:function(a){return typeof a!="object"?false:this.target.releaseNamedASObject(a.fb_instance_id)},create:function(a){return this.deserialize(this.target.create(a))},makeID:function(a){return(this.bridgeID<<16)+a},getPropertyFromAS:function(a,b){if(FABridge.refCount>0)throw Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");
else{FABridge.refCount++;retVal=this.target.getPropFromAS(a,b);retVal=this.handleError(retVal);FABridge.refCount--;return retVal}},setPropertyInAS:function(a,b,c){if(FABridge.refCount>0)throw Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");else{FABridge.refCount++;retVal=this.target.setPropInAS(a,b,this.serialize(c));retVal=this.handleError(retVal);FABridge.refCount--;return retVal}},
callASFunction:function(a,b){if(FABridge.refCount>0)throw Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");else{FABridge.refCount++;retVal=this.target.invokeASFunction(a,this.serialize(b));retVal=this.handleError(retVal);FABridge.refCount--;return retVal}},callASMethod:function(a,b,c){if(FABridge.refCount>0)throw Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");
else{FABridge.refCount++;c=this.serialize(c);retVal=this.target.invokeASMethod(a,b,c);retVal=this.handleError(retVal);FABridge.refCount--;return retVal}},invokeLocalFunction:function(a,b){var c,e=this.localFunctionCache[a];if(e!=undefined)c=this.serialize(e.apply(null,this.deserialize(b)));return c},getTypeFromName:function(a){return this.remoteTypeCache[a]},createProxy:function(a,b){var c=this.getTypeFromName(b);instanceFactory.prototype=c;c=new instanceFactory(a);return this.remoteInstanceCache[a]=
c},getProxy:function(a){return this.remoteInstanceCache[a]},addTypeDataToCache:function(a){for(var b=new ASProxy(this,a.name),c=a.accessors,e=0;e<c.length;e++)this.addPropertyToType(b,c[e]);a=a.methods;for(e=0;e<a.length;e++)FABridge.blockedMethods[a[e]]==undefined&&this.addMethodToType(b,a[e]);return this.remoteTypeCache[b.typeName]=b},addPropertyToType:function(a,b){var c=b.charAt(0),e;if(c>="a"&&c<="z"){e="get"+c.toUpperCase()+b.substr(1);c="set"+c.toUpperCase()+b.substr(1)}else{e="get"+b;c="set"+
b}a[c]=function(g){this.bridge.setPropertyInAS(this.fb_instance_id,b,g)};a[e]=function(){return this.bridge.deserialize(this.bridge.getPropertyFromAS(this.fb_instance_id,b))}},addMethodToType:function(a,b){a[b]=function(){return this.bridge.deserialize(this.bridge.callASMethod(this.fb_instance_id,b,FABridge.argsToArray(arguments)))}},getFunctionProxy:function(a){var b=this;if(this.remoteFunctionCache[a]==null)this.remoteFunctionCache[a]=function(){b.callASFunction(a,FABridge.argsToArray(arguments))};
return this.remoteFunctionCache[a]},getFunctionID:function(a){if(a.__bridge_id__==undefined){a.__bridge_id__=this.makeID(this.nextLocalFuncID++);this.localFunctionCache[a.__bridge_id__]=a}return a.__bridge_id__},serialize:function(a){var b={},c=typeof a;if(c=="number"||c=="string"||c=="boolean"||c==null||c==undefined)b=a;else if(a instanceof Array){b=[];for(c=0;c<a.length;c++)b[c]=this.serialize(a[c])}else if(c=="function"){b.type=FABridge.TYPE_JSFUNCTION;b.value=this.getFunctionID(a)}else if(a instanceof
ASProxy){b.type=FABridge.TYPE_ASINSTANCE;b.value=a.fb_instance_id}else{b.type=FABridge.TYPE_ANONYMOUS;b.value=a}return b},deserialize:function(a){var b,c=typeof a;if(c=="number"||c=="string"||c=="boolean"||a==null||a==undefined)b=this.handleError(a);else if(a instanceof Array){b=[];for(c=0;c<a.length;c++)b[c]=this.deserialize(a[c])}else if(c=="object"){for(c=0;c<a.newTypes.length;c++)this.addTypeDataToCache(a.newTypes[c]);for(var e in a.newRefs)this.createProxy(e,a.newRefs[e]);if(a.type==FABridge.TYPE_PRIMITIVE)b=
a.value;else if(a.type==FABridge.TYPE_ASFUNCTION)b=this.getFunctionProxy(a.value);else if(a.type==FABridge.TYPE_ASINSTANCE)b=this.getProxy(a.value);else if(a.type==FABridge.TYPE_ANONYMOUS)b=a.value}return b},addRef:function(a){this.target.incRef(a.fb_instance_id)},release:function(a){this.target.releaseRef(a.fb_instance_id)},handleError:function(a){if(typeof a=="string"&&a.indexOf("__FLASHERROR")==0){a=a.split("||");FABridge.refCount>0&&FABridge.refCount--;throw Error(a[1]);}return a}};
ASProxy=function(a,b){this.bridge=a;this.typeName=b;return this};ASProxy.prototype={get:function(a){return this.bridge.deserialize(this.bridge.getPropertyFromAS(this.fb_instance_id,a))},set:function(a,b){this.bridge.setPropertyInAS(this.fb_instance_id,a,b)},call:function(a,b){this.bridge.callASMethod(this.fb_instance_id,a,b)},addRef:function(){this.bridge.addRef(this)},release:function(){this.bridge.release(this)}};
(function(){function a(){}if(!window.WebSocket){var b=window.console;if(!b||!b.log||!b.error)b={log:function(){},error:function(){}};if(swfobject.hasFlashPlayerVersion("9.0.0")){location.protocol=="file:"&&b.error("WARNING: web-socket-js doesn't work in file:///... URL unless you set Flash Security Settings properly. Open the page via Web server i.e. http://...");WebSocket=function(c,e,g,k,q){var o=this;o.readyState=WebSocket.CONNECTING;o.bufferedAmount=0;setTimeout(function(){WebSocket.__addTask(function(){o.__createFlash(c,
e,g,k,q)})},0)};WebSocket.prototype.__createFlash=function(c,e,g,k,q){var o=this;o.__flash=WebSocket.__flash.create(c,e,g||null,k||0,q||null);o.__flash.addEventListener("event",function(){setTimeout(function(){o.__handleEvents()},0)})};WebSocket.prototype.send=function(c){if(!this.__flash||this.readyState==WebSocket.CONNECTING)throw"INVALID_STATE_ERR: Web Socket connection has not been established";c=this.__flash.send(encodeURIComponent(c));if(c<0)return true;else{this.bufferedAmount+=c;return false}};
WebSocket.prototype.close=function(){if(this.__flash)if(!(this.readyState==WebSocket.CLOSED||this.readyState==WebSocket.CLOSING)){this.__flash.close();this.readyState=WebSocket.CLOSED;this.__timer&&clearInterval(this.__timer);this.onclose&&setTimeout(this.onclose,0)}};WebSocket.prototype.addEventListener=function(c,e){if(!("__events"in this))this.__events={};if(!(c in this.__events)){this.__events[c]=[];if("function"==typeof this["on"+c]){this.__events[c].defaultHandler=this["on"+c];this["on"+c]=
this.__createEventHandler(this,c)}}this.__events[c].push(e)};WebSocket.prototype.removeEventListener=function(c,e){if(!("__events"in this))this.__events={};if(c in this.__events)for(var g=this.__events.length;g>-1;--g)if(e===this.__events[c][g]){this.__events[c].splice(g,1);break}};WebSocket.prototype.dispatchEvent=function(c){if(!("__events"in this))throw"UNSPECIFIED_EVENT_TYPE_ERR";if(!(c.type in this.__events))throw"UNSPECIFIED_EVENT_TYPE_ERR";for(var e=0,g=this.__events[c.type].length;e<g;++e){this.__events[c.type][e](c);
if(c.cancelBubble)break}false!==c.returnValue&&"function"==typeof this.__events[c.type].defaultHandler&&this.__events[c.type].defaultHandler(c)};WebSocket.prototype.__handleEvents=function(){for(var c=this.__flash.receiveEvents(),e=0;e<c.length;e++)try{var g=c[e];if("readyState"in g)this.readyState=g.readyState;if(g.type=="open"){this.__timer&&clearInterval(this.__timer);if(window.opera)this.__timer=setInterval(function(){this.__handleEvents()},500);this.onopen&&this.onopen()}else if(g.type=="close"){this.__timer&&
clearInterval(this.__timer);this.onclose&&this.onclose()}else if(g.type=="message"){if(this.onmessage){var k=decodeURIComponent(g.data),q;if(window.MessageEvent&&!window.opera){q=document.createEvent("MessageEvent");q.initMessageEvent("message",false,false,k,null,null,window,null)}else q={data:k};this.onmessage(q)}}else if(g.type=="error"){this.__timer&&clearInterval(this.__timer);this.onerror&&this.onerror()}else throw"unknown event type: "+g.type;}catch(o){b.error(o.toString())}};WebSocket.prototype.__createEventHandler=
function(c,e){return function(g){var k=new a;k.initEvent(e,true,true);k.target=k.currentTarget=c;for(var q in g)k[q]=g[q];c.dispatchEvent(k,arguments)}};a.prototype.cancelable=true;a.prototype.cancelBubble=false;a.prototype.preventDefault=function(){if(this.cancelable)this.returnValue=false};a.prototype.stopPropagation=function(){this.cancelBubble=true};a.prototype.initEvent=function(c,e,g){this.type=c;this.cancelable=g;this.timeStamp=new Date};WebSocket.CONNECTING=0;WebSocket.OPEN=1;WebSocket.CLOSING=
2;WebSocket.CLOSED=3;WebSocket.__tasks=[];WebSocket.loadFlashPolicyFile=function(c){WebSocket.__addTask(function(){WebSocket.__flash.loadManualPolicyFile(c)})};WebSocket.__initialize=function(){if(WebSocket.__swfLocation)window.WEB_SOCKET_SWF_LOCATION=WebSocket.__swfLocation;if(window.WEB_SOCKET_SWF_LOCATION){var c=document.createElement("div");c.id="webSocketContainer";c.style.position="absolute";if(WebSocket.__isFlashLite()){c.style.left="0px";c.style.top="0px"}else{c.style.left="-100px";c.style.top=
"-100px"}var e=document.createElement("div");e.id="webSocketFlash";c.appendChild(e);document.body.appendChild(c);swfobject.embedSWF(WEB_SOCKET_SWF_LOCATION,"webSocketFlash","1","1","9.0.0",null,{bridgeName:"webSocket"},{hasPriority:true,allowScriptAccess:"always"},null,function(g){g.success||b.error("[WebSocket] swfobject.embedSWF failed")});FABridge.addInitializationCallback("webSocket",function(){try{WebSocket.__flash=FABridge.webSocket.root();WebSocket.__flash.setCallerUrl(location.href);WebSocket.__flash.setDebug(!!window.WEB_SOCKET_DEBUG);
for(var g=0;g<WebSocket.__tasks.length;++g)WebSocket.__tasks[g]();WebSocket.__tasks=[]}catch(k){b.error("[WebSocket] "+k.toString())}})}else b.error("[WebSocket] set WEB_SOCKET_SWF_LOCATION to location of WebSocketMain.swf")};WebSocket.__addTask=function(c){WebSocket.__flash?c():WebSocket.__tasks.push(c)};WebSocket.__isFlashLite=function(){if(!window.navigator||!window.navigator.mimeTypes)return false;var c=window.navigator.mimeTypes["application/x-shockwave-flash"];if(!c||!c.enabledPlugin||!c.enabledPlugin.filename)return false;
return c.enabledPlugin.filename.match(/flashlite/i)?true:false};window.webSocketLog=function(c){b.log(decodeURIComponent(c))};window.webSocketError=function(c){b.error(decodeURIComponent(c))};window.WEB_SOCKET_DISABLE_AUTO_INITIALIZATION||(window.addEventListener?window.addEventListener("load",WebSocket.__initialize,false):window.attachEvent("onload",WebSocket.__initialize))}else b.error("Flash Player is not installed.")}})();EasyWebSocket=function(a){var b=this;this.url=a;this.bufferedAmount=0;this.readyState=EasyWebSocket.CONNECTING;this._clientId="clientid-sio-"+this.url+"-"+Math.floor(Math.random()*999999).toString(36);this.log=EasyWebSocket.logFunction;this.onopen=function(){b.log("default onopen method")};this.onmessage=function(){b.log("default onmessage method")};this.onerror=function(){b.log("default onerror method")};this.onclose=function(){b.log("default onclose method")};this._sioCtor()};
EasyWebSocket.prototype._sioCtor=function(){var a=this,b=this.parseUri(EasyWebSocket.serverUrl),c=b.host;b=parseInt(b.port);WEB_SOCKET_SWF_LOCATION="http://easywebsocket.org/node/server/node_modules/socket.io/support/socket.io-client/lib/vendor/web-socket-js/WebSocketMainInsecure.swf";this._sockio=new io.Socket(c,{port:b});this._sockio.connect();this._sockio.on("connect",function(){a.log("socket connected",a._sockio,a._clientId);a._sockio.send({type:"connect",data:{wsUrl:a.url,clientId:a._clientId}});
a.readyState=EasyWebSocket.CONNECTED;a.onopen()});this._sockio.on("connect_failed",function(){a.onerror()});this._sockio.on("message",function(e){a.log("received message",e);a.onmessage({data:e})});this._sockio.on("disconnect",function(){a.log("socket disconnected");a.onclose()})};EasyWebSocket.prototype.send=function(a){this._sockio.send({type:"message",data:{clientId:this._clientId,message:a}})};EasyWebSocket.prototype.close=function(){this._sockio.disconnect()};EasyWebSocket.CONNECTING=0;
EasyWebSocket.OPEN=1;EasyWebSocket.CLOSING=2;EasyWebSocket.CLOSED=3;EasyWebSocket.serverUrl="http://88.191.76.230:8667";EasyWebSocket.logFunction=function(){};EasyWebSocket.prototype.parseUri=function(a){var b=this.parseUri.options;a=b.parser[b.strictMode?"strict":"loose"].exec(a);for(var c={},e=14;e--;)c[b.key[e]]=a[e]||"";c[b.q.name]={};c[b.key[12]].replace(b.q.parser,function(g,k,q){if(k)c[b.q.name][k]=q});return c};
EasyWebSocket.prototype.parseUri.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};