/* SockJS client, http://sockjs.org, MIT License * * Copyright (c) 2011-2012 VMware, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ var JSON;JSON||(JSON={}); (function(){function p(d,n){var s,x,t,u,A=m,k,l=n[d];l&&"object"==typeof l&&"function"==typeof l.toJSON&&(l=l.toJSON(d));"function"==typeof w&&(l=w.call(n,d,l));switch(typeof l){case "string":return h(l);case "number":return isFinite(l)?String(l):"null";case "boolean":case "null":return String(l);case "object":if(!l)return"null";m+=z;k=[];if("[object Array]"===Object.prototype.toString.apply(l)){u=l.length;for(s=0;sd?"0"+d:d}"use strict";"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(h){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+d(this.getUTCMonth()+1)+"-"+d(this.getUTCDate())+"T"+d(this.getUTCHours())+":"+d(this.getUTCMinutes())+":"+d(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(d){return this.valueOf()});var u=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, n=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,m,z,G={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},w;"function"!=typeof JSON.stringify&&(JSON.stringify=function(d,h,s){var n;z=m="";if("number"==typeof s)for(n=0;n=a};d.countRTO=function(a){return 100b;b++)e.push(String.fromCharCode(b));a.lastIndex=0;e.join("").replace(a,function(a){c[a]="\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);return""});a.lastIndex=0;return c};d.quote=function(a){a=P(a);w.lastIndex=0;if(!w.test(a))return a;E||(E=s(w));return a.replace(w,function(a){return E[a]})};var x=["iframe-eventsource","iframe-htmlfile", "iframe-xhr-polling","jsonp-polling"];d.probeProtocols=function(a){for(var b={},c=0;c