﻿if (!document.getElementById) { throw ("Browser not compatible"); } if (window.Lightstreamer) { throw ("Warning: Lightstreamer singleton already on the page; lscommons.js should be the first Lightstreamer file included"); } window.Lightstreamer = { HiG: false, TNp: "211  24324 $", KbK: false, MoJ: "CONNECTING", JsO: "STREAMING", smu: "STALLED", rgV: "POLLING", sgl: "DISCONNECTED", TjM: { length: -1 }, bEl: new RegExp("^[a-zA-Z0-9]*$"), rgP: function() { }, vHI: function(SIV) { var kZj = ""; for (var CtU in SIV) { if (!this[CtU]) { this[CtU] = SIV[CtU]; } else { } } }, svV: function(sQW, vgp, gST) { var TlR = {}; for (var CtU in vgp.prototype) { if (sQW.prototype[CtU]) { if (!gST) { var Njb = "super_" + CtU; while (vgp.prototype["_" + Njb]) { Njb = "super_" + Njb; } sQW.prototype["_" + Njb] = vgp.prototype[CtU]; } else if (gST === "O") { sQW.prototype[CtU] = vgp.prototype[CtU]; } } else { if (CtU.indexOf("_super_") != 0 || !gST) { sQW.prototype[CtU] = vgp.prototype[CtU]; } } } if (!gST) { var Dxw = "_super"; while (sQW.prototype[Dxw]) { Dxw += "_super"; } sQW.prototype[Dxw] = vgp; } if (!sQW.prototype.Hwd) { sQW.prototype.Hwd = this.TdQ; } if (!sQW.prototype.uAp) { sQW.prototype.uAp = this.Jkb; } }, TdQ: function(Boq, Jqm) { if (Boq.prototype["_super_" + Jqm]) { while (Boq.prototype["_super_" + Jqm]) { Jqm = "super_" + Jqm; } Jqm = "_" + Jqm; } else { return; } if (this[Jqm].apply) { return this[Jqm].apply(this, Lightstreamer.jaN(arguments, 2)); } }, Jkb: function(Boq) { var Jqm = "_super"; if (Boq.prototype[Jqm]) { while (Boq.prototype[Jqm + "_super"]) { Jqm += "_super"; } if (this[Jqm].apply) { this[Jqm].apply(this, Lightstreamer.jaN(arguments, 1)); } } }, wcq: function(rah) { if (rah.shift) { return rah.shift(); } var PHn = rah[0]; for (var CtU = 0, YSk = rah.length - 1; CtU < YSk; CtU++) { rah[CtU] = rah[CtU + 1]; } delete (rah[rah.length - 1]); return PHn; }, jaN: function(ldc, wPO) { var rQk = []; for (var xmH = wPO, YSk = ldc.length; xmH < YSk; xmH++) { rQk[xmH - wPO] = ldc[xmH]; } return rQk; }, AsQ: function(PVa) { if (window.encodeURIComponent) { return encodeURIComponent(PVa); } else { PVa = escape(PVa); return PVa.replace(this.pfT, "%2B"); } }, FbV: function(rvT) { if (window.decodeURIComponent) { return decodeURIComponent(rvT); } else { return unescape(rvT); } }, hIT: function(svi, iTs) { if (typeof window.addEventListener != "undefined") { window.addEventListener(svi, iTs, false); return true; } else if (typeof document.addEventListener != "undefined") { document.addEventListener(svi, iTs, false); return true; } else if (typeof window.attachEvent != "undefined") { return window.attachEvent("on" + svi, iTs); } else { return false; } }, BZa: function(wNQ, ZHY, Jfr, vFj, min, max) { var DMa = new Number(wNQ); var OLf = this.wae ? this.wae : Lightstreamer.PaW; if (isNaN(DMa)) { OLf.CVC("This is a not valid value for " + ZHY + ": " + '"' + wNQ + '"' + ". Please use a number", ZHY); return Jfr; } else if (vFj == true && DMa != Math.round(DMa)) { OLf.CVC("This is a not valid value for " + ZHY + ": " + wNQ + ". Please use an integer", ZHY); return Jfr; } else if (!isNaN(min) && DMa < min) { OLf.CVC("This is a not valid value for " + ZHY + ": " + wNQ + ". The minimum value allowed is " + min, ZHY); return Jfr; } else if (!isNaN(max) && DMa > max) { OLf.CVC("This is a not valid value for " + ZHY + ": " + wNQ + ". The maximum value allowed is " + max, ZHY); return Jfr; } else { OLf.log(ZHY, DMa); return DMa; } }, rfG: function(wNQ, ZHY, Jfr) { var OLf = this.wae ? this.wae : Lightstreamer.PaW; if (wNQ === true || wNQ === false) { OLf.log(ZHY, wNQ); return wNQ; } else { OLf.CVC("This is a not valid value for " + ZHY + ": " + '"' + wNQ + '"' + ". Please use true or false", ZHY); return Jfr; } }, getLogger: function() { return Lightstreamer.QcC; }, Sxl: function(wBA) { if (this.pAj != null && this.pAj != "") { if (wBA.indexOf(this.pAj) == -1) { return false; } } return true; }, waO: function(wNQ) { if (typeof wNQ != "undefined") { if (wNQ === true || wNQ === false) { return wNQ === true; } else if (wNQ == null) { return null; } else if (!isNaN(wNQ) && wNQ != "") { return parseFloat(wNQ, 10); } else if ((wNQ || wNQ == "") && wNQ.toString) { return wNQ.toString(); } else if (isNaN(wNQ)) { return NaN; } else { Lightstreamer.PaW.EPl(false, 'waO'); return wNQ; } } return null; }, EIb: new RegExp("^\\s*([\\s\\S]*?)\\s*$"), fKc: function(DpK) { return DpK.replace(Lightstreamer.EIb, "$1"); }, GSE: function(OBN, Kps) { if (!OBN) { return true; } if (Kps.toLowerCase() == "http:") { return OBN == 80; } if (Kps.toLowerCase() == "https:") { return OBN == 443; } return false; }, uFO: function(qUQ, ifx) { var pLV = []; for (var XLZ = 0, YSk = qUQ.length; CtU < YSk; CtU++) { if (qUQ[XLZ] == null) { pLV[XLZ] = null; } else if (ifx) { pLV[XLZ] = new Number(qUQ[XLZ]); } else { pLV[XLZ] = new String(qUQ[XLZ]); } } return jNP; }, asm: function(qUQ, ifx) { var jNP = {}; for (var XLZ in qUQ) { if (qUQ[XLZ] == null) { jNP[XLZ] = null; } else if (ifx) { jNP[XLZ] = new Number(qUQ[XLZ]); } else { jNP[XLZ] = new String(qUQ[XLZ]); } } return jNP; }, aIL: function(max) { max = max ? max : 1000; return Math.round(Math.random() * max); }, IcY: function(uNU, QAv) { return function() { var ldc = arguments; return function() { uNU.apply(QAv, ldc); }; }; }, EoJ: function(uNU, QAv) { return function() { uNU.apply(QAv); }; } }; with (Lightstreamer) { Lightstreamer.TXV = "gi_buf"; Lightstreamer.Afp = TXV.substring(1, 2); Lightstreamer.Hdx = TXV.substring(0, 1); Lightstreamer.Ylr = TXV.substring(0, 2); Lightstreamer.pfT = new RegExp("\\+", Ylr); } Lightstreamer.avoidLSGlobals = false; Lightstreamer.ZEn = ["div", "span", "input"]; Lightstreamer.ZZa = function() { return Lightstreamer.ZEn; }; Lightstreamer.vUO = function(BiD, Lml) { Lightstreamer.ZEn = BiD; }; Lightstreamer.lWs = function(AmD) { Lightstreamer.ZEn.push(AmD); }; Lightstreamer.MaR = function() { this.oce(["ChartLine", "ChartTable", "DynaMetapushTable", "DynaScrollTable", "FieldNameDescriptor", "FieldPositionDescriptor", "GroupIdDescriptor", "GroupListDescriptor", "ItemNameDescriptor", "ItemPositionDescriptor", "LabelFormatter", "MetapushTable", "MultiDynaMetapushTable", "NonVisualTable", "OverwriteTable", "PushPage", "SchemaIdDescriptor", "SchemaListDescriptor", "ScreenTableHelper", "ScrollTable", "FlashBridge", "MessageListener"], true, true); }; Lightstreamer.oce = function(xJL, vjl, nho) { for (var CtU = 0; CtU < xJL.length; CtU++) { this.ZEC(xJL[CtU]); } if (vjl) { window.LS_cell = Lightstreamer.cellOverwrite; window.LS_cs = Lightstreamer.cellScroll; window.LS_cM = Lightstreamer.cellMetapush; } if (nho) { window.LS_fadeCell = Lightstreamer.PMQ; } }; Lightstreamer.ZEC = function(ZHY) { if (Lightstreamer[ZHY]) { window[ZHY] = Lightstreamer[ZHY]; } }; Lightstreamer.OWa = function() { var sbt = document.getElementsByTagName("script"); for (var CtU = 0; CtU < sbt.length; CtU++) { var huN = null; if ((huN = /lspushpage\.js\?(.*)$/.exec(sbt[CtU].src)) != null) { Lightstreamer.avoidLSGlobals = (huN[1] == "avoidLSGlobals=true"); } } }; Lightstreamer.vHI({ iqb: null, uMi: null, vNa: function() { if (this.iqb != null) { return this.iqb; } if ((document.childNodes) && (!document.all) && (!navigator.taintEnabled) && (!navigator.accentColorName)) { this.iqb = true; return true; } this.iqb = false; return false; }, IKL: function() { if (this.uMi != null) { return this.uMi; } if (this.vNa()) { KjE = navigator.userAgent; if (KjE) { if (KjE.indexOf(" Version/") > -1) { if (KjE.indexOf(" Version/3.0") <= -1) { this.uMi = false; return false; } } else if (KjE.indexOf("Chrome/") > -1) { this.uMi = false; return false; } } this.uMi = true; return true; } this.uMi = false; return false; }, UsB: new RegExp("[^0-9.]+", Lightstreamer.Hdx), smV: null, NIS: function(DKH, PQQ) { if (window.opera) { if (!DKH) { return true; } if (this.smV === null) { if (!window.opera.version) { this.smV = 7; } else { var vqB = window.opera.version(); vqB = vqB.replace(this.UsB, ""); this.smV = parseFloat(vqB); } } if (PQQ === true) { return this.smV <= DKH; } else if (PQQ === false) { return this.smV >= DKH; } else { return this.smV == DKH; } } return false; }, fVj: null, bfJ: function() { if (this.fVj !== null) { return this.fVj; } if (window.ActiveXObject) { this.fVj = true; } else { this.fVj = false; } return this.fVj; }, BFh: null, vOS: function() { if (this.BFh !== null) { return this.BFh; } var RsO = navigator.userAgent.toLowerCase(); if (window.ScriptEngine && (ScriptEngine().indexOf("InScript") > -1)) { if (RsO.indexOf("icab") > -1) { Lightstreamer.Eem.log('vOS', "iCab"); this.BFh = true; return true; } } if (document.all) { crD = RsO.indexOf("msie"); if (crD > -1) { vGY = RsO.substring(crD + 5, crD + 8); if (vGY.indexOf(5) > -1) { Lightstreamer.Eem.log('vOS', "IE5"); this.BFh = true; return true; } } } Lightstreamer.Eem.log('vOS', false); this.BFh = false; return false; }, ahg: {}, PoS: new RegExp("Firefox\\/(\\d+\\.?\\d*)"), tSW: function(DKH, PQQ) { if (this.ahg === null) { return false; } if (!DKH) { DKH = -1; PQQ = false; } else { PQQ = PQQ === true || PQQ === false ? PQQ : ""; } if (this.ahg[DKH + "" + PQQ] || this.ahg[DKH + "" + PQQ] === false) { return this.ahg[DKH + "" + PQQ]; } var Gwq = navigator.userAgent; if (Gwq.indexOf("Firefox") <= -1) { this.ahg = null; return false; } var kcg = 0; if (Gwq.indexOf("Firefox/") > -1) { var EkQ = this.PoS.exec(Gwq); if (EkQ) { kcg = Number(EkQ[1]); } } var huN; if (PQQ === true) { huN = kcg <= DKH; } else if (PQQ === false) { huN = kcg >= DKH; } else { huN = kcg == DKH; } this.ahg[DKH + "" + PQQ] = huN; return huN; }, awA: null, iAH: function() { if (this.awA !== null) { return this.awA; } var Gwq = navigator.userAgent; this.awA = Gwq.indexOf("Chrome/") > -1; return this.awA; } }); Lightstreamer.vHI({ MnN: function(GhI, pSX) { Lightstreamer.Zxs.log('MnN', GhI, pSX); this.rHi(GhI, pSX, ""); }, rHi: function(GhI, pSX, FbE) { var hvV = ""; if (Lightstreamer.pAj != null && Lightstreamer.pAj != "") { hvV = "domain=." + Lightstreamer.pAj + "; "; } var xBH = GhI + "=" + pSX + "; "; var UIi = xBH + hvV + FbE + "path=/;"; document.cookie = UIi; Lightstreamer.Zxs.log('rHi', UIi); }, DPv: function(GhI) { GhI += "="; var gHo = document.cookie.toString(); gHo = gHo.split(";"); var OLf = Lightstreamer.Zxs; for (var CtU = 0; CtU < gHo.length; CtU++) { gHo[CtU] = Lightstreamer.fKc(gHo[CtU]); OLf.log('DPv', GhI, "?", gHo[CtU]); if (gHo[CtU].indexOf(GhI) == 0) { var hpg = gHo[CtU].substring(GhI.length, gHo[CtU].length); OLf.log('DPv', GhI, hpg); return hpg; } } OLf.log('DPv', GhI, null); return null; }, DQu: function(GhI) { Lightstreamer.Zxs.log('DQu', GhI); var abG = new Date(); abG.setTime(abG.getTime() - 86400000); var FbE = "expires=" + abG.toGMTString() + "; "; this.rHi(GhI, "deleting", FbE); }, ILZ: false, uYw: function() { var OLf = Lightstreamer.Zxs; OLf.log('uYw', 0); var AsJ = Lightstreamer.aIL(); var gfh = "LS__cookie_test" + AsJ; this.MnN(gfh, "testing"); var fvh = this.DPv(gfh); if (fvh == "testing") { OLf.log('uYw', 1); this.DQu(gfh); fvh = this.DPv(gfh); if (fvh == null) { OLf.log('uYw', 2); this.ILZ = true; } } }, TcX: function() { return new Date().getTime(); }, YYX: 1000 }); Lightstreamer.vHI({ EIh: "|", FdX: function(GhI) { var EFK = this.DPv(GhI); if (!EFK) { return null; } var XwV = EFK.split(this.EIh); if (XwV[0] == "") { XwV.shift(); } if (XwV[XwV.length - 1] == "") { XwV.pop(); } return XwV.length > 0 ? XwV : null; }, jnY: function(GhI, id) { var pSX = this.DPv(GhI); if (!pSX) { pSX = this.EIh; } else if (pSX.indexOf(this.EIh + id + this.EIh) > -1) { return false; } pSX += id + this.EIh; this.MnN(GhI, pSX); return true; }, wSH: function(GhI, id) { var pSX = this.DPv(GhI); if (!pSX) { return; } var WsB = this.EIh + id + this.EIh; if (pSX.indexOf(WsB) > -1) { pSX = pSX.replace(WsB, this.EIh); if (pSX == this.EIh) { this.DQu(GhI); } else { this.MnN(GhI, pSX); } } }, okV: function(GhI, ZrX) { var pSX = ZrX.join(this.EIh); this.MnN(GhI, pSX); } }); Lightstreamer.Whu = function(uZs) { this.vEq = null; if (typeof uZs != "undefined") { this.vEq = uZs; } else { this.vEq = {}; } }; Lightstreamer.Whu.adw = function(qUQ, ifx) { var xGl = {}; var vEq = qUQ.wMQ(); for (var fmY in vEq) { xGl[fmY] = {}; for (var SVg in vEq[fmY]) { if (vEq[fmY][SVg] == null) { xGl[fmY][SVg] = null; } else if (ifx) { xGl[fmY][SVg] = new Number(vEq[fmY][SVg]); } else { xGl[fmY][SVg] = new String(vEq[fmY][SVg]); } } } return new this(xGl); }; Lightstreamer.Whu.prototype = { VKq: function(Wnr, fmY, SVg) { if (!this.vEq[fmY]) { this.vEq[fmY] = {}; } this.vEq[fmY][SVg] = Wnr; }, bqs: function(fmY, SVg) { if (!this.vEq[fmY]) { return null; } if (typeof this.vEq[fmY][SVg] == "undefined") { return null; } return this.vEq[fmY][SVg]; }, EAA: function(fmY, SVg) { if (!this.vEq[fmY]) { return; } if (this.vEq[fmY][SVg]) { delete (this.vEq[fmY][SVg]); } for (var CtU in this.vEq[fmY]) { return; } delete (this.vEq[fmY]); }, insertRow: function(NVg, fmY) { this.vEq[fmY] = NVg; }, lLS: function(fmY) { if (!this.vEq[fmY]) { return null; } return this.vEq[fmY]; }, TwV: function(fmY) { var xDn = this.lLS(fmY); this.eWU(fmY); return xDn; }, eWU: function(fmY) { if (!this.vEq[fmY]) { return; } delete (this.vEq[fmY]); }, wMQ: function() { return this.vEq; } }; Lightstreamer.jpi = function(taA) { this.inS = taA ? taA : "GE"; }; Lightstreamer.jpi.prototype = { woX: function(eWk) { var huN = false; if (eWk) { huN = Lightstreamer.QcC.woX(eWk); } return huN || Lightstreamer.QcC.woX(this.inS); }, ZcB: function(CvY) { if (Lightstreamer.Ben) { this.log(CvY, arguments, Lightstreamer.Ben); } else { this.log(CvY, arguments); } }, log: function(CvY) { if (!this.woX()) { return; } if (Lightstreamer.obfMap) { CvY = Lightstreamer.obfMap.SxW(CvY); } var bHP = this.wDL(arguments); Lightstreamer.QcC.RwA(this.inS, bHP); }, MKn: function(aGq, CvY, inS, LPg, ldc) { if (!this.woX(inS)) { return; } if (Lightstreamer.obfMap) { ldc[LPg] = Lightstreamer.obfMap.SxW(ldc[LPg]); } var bHP = aGq + " " + this.wDL(ldc, LPg); if (this.inS != inS) { Lightstreamer.QcC.RwA(this.inS, bHP, aGq); } Lightstreamer.QcC.RwA(inS, bHP, aGq); }, nKI: function(lSX, CvY) { this.MKn(this.TQH(lSX), CvY, "EX", 1, arguments); }, aqK: function(CvY, EKx) { this.MKn(EKx, CvY, "EX", 1, arguments); }, PhQ: function(UME, CvY) { this.MKn(UME, CvY, "ER", 1, arguments); }, CVC: function(UME, CvY) { this.PhQ(UME, CvY); throw (UME); }, cst: function(UME, CvY) { if (!this.woX("ER")) { return; } var VQa = this; setTimeout(function() { VQa.PhQ(UME, CvY); }, 2); }, hHu: function(lSX, EKx, CvY) { this.MKn(this.TQH(lSX, EKx), CvY, "ER", 2, arguments); }, EPl: function(XXe, CvY) { if (!XXe) { this.MKn("", CvY, "AS", 1, arguments); } }, wDL: function(ldc, TmY) { TmY = TmY ? TmY : 0; var bHP = " "; for (var CtU = TmY; CtU < ldc.length; CtU++) { try { var ExG = ldc[CtU]; if (ExG == null) { bHP += "NULL"; } else if (ExG.prototype) { bHP += ExG.apply(); } else if (ExG.length < 0) { bHP += "*"; } else if (ExG.charAt != null) { bHP += ExG; } else if (ExG[0] == ExG) { bHP += ExG; } else if (ExG.length != null && ExG.top == null) { bHP += "("; bHP += this.wDL(ExG); bHP += ")"; } else { bHP += ExG; } bHP += " "; } catch (lSX) { bHP += "missing-parameter "; } } return bHP; }, TQH: function(lSX, Gja) { var FqB = lSX.message; if (typeof FqB == "undefined") { if (lSX.getMessage) { FqB = lSX.getMessage(); } if (typeof FqB == "undefined") { FqB = lSX; } } var huN = "exception\n" + FqB + " \n\n"; if (Gja) { huN += "thrown by your callback\n\n" + Gja; } if (lSX.stack) { huN += lSX.stack; huN += "\n"; } else if (!Lightstreamer.NIS()) { huN += "(Exception stack trace only available on Firefox and Opera)\n\n"; } return huN; } }; Lightstreamer.LogSystem = function() { this.TSk = ""; this.hMs = {}; this.hMs.length = 0; this.YQl = 0; this.LWe = new Lightstreamer.BufferConsumer(); this.addConsumer(this.LWe, true); this.LWe.Njb++; this.LWe.KDX[0] = "START OF LOG"; this.LWe.KDX[0 + "_C"] = "GE"; this.jca = {}; this.wae = this.getLogger("LS"); }; Lightstreamer.LogSystem.prototype = { getLogger: function(taA) { if (!this.jca[taA]) { this.jca[taA] = new Lightstreamer.jpi(taA); } return this.jca[taA]; }, getInternalLog: function() { return this.LWe; }, addConsumer: function(dpT, EMS) { this.hMs[this.hMs.length] = dpT; this.hMs.length++; dpT.ReN = this; if (EMS != true) { this.LWe.sendLogToConsumer(dpT); } var CCV = dpT.fqi.split(" "); this.WIF(CCV); }, removeConsumer: function(dpT) { Rvv = false; var CtU = 0; while ((CtU < this.hMs.length) && (!Rvv)) { if (this.hMs[CtU] == dpT) { this.CvG(CtU); Rvv = true; } CtU++; } return Rvv; }, CvG: function(CtU) { ATb = this.hMs.length - 1; if (CtU != ATb) { this.hMs[CtU] = this.hMs[ATb]; } delete (this.hMs[ATb]); this.hMs.length--; this.XeU(); }, xwW: function(inS) { if (!inS) { return; } if (this.TSk.indexOf(inS) > -1) { return; } if (this.TSk == "") { this.TSk += inS; } else { this.TSk += " " + inS; } this.LWe.addLogCategory(inS); }, WIF: function(fqi) { for (var inS in fqi) { this.xwW(fqi[inS]); } }, XeU: function() { this.TSk = ""; for (var CtU = 0; CtU < this.hMs.length; CtU++) { var CCV = this.hMs[CtU].fqi.split(" "); this.WIF(CCV); } }, RwA: function(taA, bHP, FQU) { if (!this.woX(taA)) { return; } var djZ = ++this.YQl; bHP = this.pAs(djZ) + taA + " " + bHP; this.ZjA(taA, bHP, FQU); return bHP; }, woX: function(taA) { if (this.TSk.length == 0 || this.TSk.indexOf(taA) == -1) { return false; } return true; }, pAs: function(djZ) { var GaF = new Date(); var bHP = window.name; bHP += " "; bHP += djZ; bHP += ": "; bHP += GaF.getHours(); bHP += ":"; bHP += GaF.getMinutes(); bHP += ":"; bHP += GaF.getSeconds(); bHP += ","; bHP += GaF.getMilliseconds(); bHP += " "; return bHP; }, ZjA: function(taA, bHP, FQU) { var CtU; for (CtU = 0; CtU < this.hMs.length; CtU++) { var dpT = this.hMs[CtU]; if (dpT.fqi.indexOf(taA) > -1) { if (dpT.XrT == true) { dpT.SOS(FQU, taA); } else { dpT.SOS(bHP, taA); } } } }, cNS: function(dpT, kLL) { this.wae.PhQ("Sorry, the " + dpT + " is not compatible with this Browser", kLL); }, xTx: function(inS) { return (inS == "ER" || inS == "AS" || inS == "EX"); }, UPw: function() { for (var CtU = 0; CtU < this.hMs.length; CtU++) { if (this.hMs[CtU].PLR) { this.hMs[CtU].PLR(); } } }, hNY: function(QAv, EKx, aGq) { var YQY = true; if ((typeof mIn != "undefined") && (mIn)) { YQY = !KmP.pTi("onClientAlert", 'dtJ', { EKx: EKx, aGq: aGq }); } if (YQY && QAv.onClientAlert) { try { QAv.onClientAlert(EKx, aGq); } catch (lSX) { this.wae.hHu(lSX, QAv.onClientAlert, "onClientAlert"); } } }, StT: function() { var KDX = new Lightstreamer.BufferConsumer(); KDX.setHistoryDim(10); KDX.addLogCategory("ER"); KDX.XrT = true; Lightstreamer.QhF = KDX; this.addConsumer(KDX); }, aEc: function(RJP, object) { with (Lightstreamer) { if (vEf == null && QhF != null) { vEf = new FunctionConsumer(RJP, object); vEf.addLogCategory("ER"); vEf.XrT = true; this.removeConsumer(QhF); QhF.sendLogToConsumer(vEf); this.addConsumer(vEf, true); QhF = null; } } } }; Lightstreamer.wup = null; Lightstreamer.ZRG = null; Lightstreamer.vEf = null; Lightstreamer.QhF = null; Lightstreamer.LogConsumer = function() { this.ReN; this.fqi = ""; this.XrT = false; }; Lightstreamer.LogConsumer.prototype = { SOS: function(bHP, inS) { }, isCompatible: function() { return false; }, addLogCategory: function(inS) { if (!inS) { return; } if (this.fqi.indexOf(inS) > -1) { return; } if (this.fqi == "") { this.fqi += inS; } else { this.fqi += " " + inS; } if (this.ReN) { this.ReN.xwW(inS); } }, getLogCategories: function() { return this.fqi; } }; Lightstreamer.BufferConsumer = function() { this.uAp(Lightstreamer.BufferConsumer); this.hNt = 0; this.PQL = 0; this.Njb = -1; this.KDX = {}; }; Lightstreamer.BufferConsumer.prototype = { isCompatible: function() { return true; }, extractLog: function(pBS, eEs, OKG, hXQ) { var CtU; var Mic = 1; if (pBS == null) { CtU = this.PQL; } else { CtU = this.Njb - pBS + 1; if (CtU < this.PQL) { CtU = this.PQL; } } if (eEs == null) { eEs = "\n"; } var cxc = ""; if (typeof hXQ != "undefined" && hXQ) { hXQ = true; } else { hXQ = false; } while (CtU <= this.Njb) { if (typeof OKG != "undefined" && OKG) { cxc += OKG; if (hXQ) { cxc += Mic + "="; } } if (hXQ) { cxc += Lightstreamer.AsQ(this.KDX[CtU]); } else { cxc += this.KDX[CtU]; } cxc += eEs; CtU++; Mic++; } return cxc; }, sendLogToConsumer: function(dpT) { var CtU = this.PQL; while (CtU <= this.Njb) { if (dpT.fqi.indexOf(this.KDX[CtU + "_C"]) > -1) { dpT.SOS(this.KDX[CtU], this.KDX[CtU + "_C"]); } CtU++; } }, setHistoryDim: function(mpn) { this.hNt = mpn; }, SOS: function(bHP, inS) { var djZ = ++this.Njb; var TmY = djZ - this.hNt + 1; while (this.PQL < TmY) { delete (this.KDX[this.PQL]); delete (this.KDX[this.PQL + "_C"]); this.PQL++; } this.KDX[djZ] = bHP; this.KDX[djZ + "_C"] = inS; } }; Lightstreamer.svV(Lightstreamer.BufferConsumer, Lightstreamer.LogConsumer); Lightstreamer.RemoteConsumer = function(bNt, gbO, oPC) { this.uAp(Lightstreamer.RemoteConsumer); this.bNt = bNt; this.gbO = gbO ? gbO : 0; this.oPC = oPC ? oPC : 0; this.oDC = 0; this.reG = 0; this.LnT = 100; this.KDX = new Lightstreamer.BufferConsumer(); this.KDX.setHistoryDim(this.bNt); }; Lightstreamer.RemoteConsumer.prototype = { lWg: function() { var Csk = false; if ((typeof mIn != "undefined") && (mIn)) { Csk = true; } else if (!Lightstreamer.kRs || !Lightstreamer.kRs.Iin) { if (this.reG < this.LnT) { this.KDX.setHistoryDim(this.reG + 1); } return; } var uNh = this.KDX.extractLog(this.reG, "&", "LS_log", true); if (uNh != "") { if (Csk) { mIn.Rpo(uNh); } else { Lightstreamer.kRs.qof('Rpo', uNh); } } this.reG = 0; this.KDX = new Lightstreamer.BufferConsumer(); this.KDX.setHistoryDim(this.bNt); }, PLR: function() { setTimeout(Lightstreamer.EoJ(this.lWg, this), 1); }, SOS: function(bHP, inS) { if (this.oPC > 0 && this.oDC >= this.oPC) { if (this.reG > 0) { this.PLR(); } return; } if (this.gbO > 0 && bHP.length > this.gbO) { bHP = bHP.substr(0, this.gbO); } this.reG++; this.KDX.SOS(bHP, inS); this.oDC++; if (this.reG >= this.bNt) { this.PLR(); } }, rGG: function(NpR) { if (!NpR) { this.gbO = 0; } else { this.gbO = NpR; } }, aMh: function(max) { if (!max) { this.oPC = 0; } else { this.oPC = max; } }, isCompatible: function() { return true; } }; Lightstreamer.svV(Lightstreamer.RemoteConsumer, Lightstreamer.LogConsumer); Lightstreamer.FunctionConsumer = function(hhA, eur, tpf) { this.uAp(Lightstreamer.FunctionConsumer); this.hhA = hhA; this.tpf = tpf ? tpf : hhA; this.eur = eur; }; Lightstreamer.FunctionConsumer.prototype = { isCompatible: function() { if (!this.hhA) { return false; } return (this.hhA.apply) ? true : false; }, SOS: function(bHP, inS) { var oYo = new Array(bHP); var Jqm = this.hhA; if (Lightstreamer.QcC.xTx(inS)) { Jqm = this.tpf; } if (Jqm.apply) { try { Jqm.apply(this.eur, oYo); } catch (lSX) { } } } }; Lightstreamer.svV(Lightstreamer.FunctionConsumer, Lightstreamer.LogConsumer); Lightstreamer.AlertConsumer = function(bNt) { this.uAp(Lightstreamer.AlertConsumer); this.cDX = bNt; this.reG = 0; this.KDX = new Lightstreamer.BufferConsumer(); this.KDX.setHistoryDim(this.cDX); }; Lightstreamer.AlertConsumer.prototype = { isCompatible: function() { return window.alert; }, SOS: function(bHP, inS) { this.reG++; this.KDX.SOS(bHP, inS); if (this.reG >= this.cDX) { this.reG = 0; vDV = this.xiv(this.KDX, this.cDX); setTimeout(vDV, 10); this.KDX = new Lightstreamer.BufferConsumer(); this.KDX.setHistoryDim(this.cDX); } }, xiv: function(KDX, reG) { return function() { alert(KDX.extractLog(reG, "\n")); }; } }; Lightstreamer.svV(Lightstreamer.AlertConsumer, Lightstreamer.LogConsumer); Lightstreamer.RQE = function(Vwx) { this.EqE = Vwx; this.wae = Lightstreamer.QcC.getLogger("FM"); }; Lightstreamer.RQE.prototype = { xrQ: function(Csk, nxw) { var huN = this.QrL(Csk, nxw); this.wae.ZcB('xrQ', Csk, nxw, huN.GGh, huN.log, huN.Yqx); return huN; }, QrL: function(Csk, nxw) { var rOO = {}; var ujf = 1; try { if (this.EqE == null) { ujf = 2; rOO.log = "null"; rOO.Yqx = true; return rOO; } else if (this.EqE.closed) { ujf = 3; this.EqE = null; rOO.log = "closed"; rOO.Yqx = true; return rOO; } else if (!this.EqE.Lightstreamer || (Csk && !this.EqE.Lightstreamer.HiG)) { ujf = 4; rOO.log = (!this.EqE.Lightstreamer) ? "not global" : "not active"; this.EqE = null; rOO.Yqx = false; return rOO; } else if (Csk) { if (this.EqE.KmP) { ujf = 5; if (!this.EqE.mIn) { ujf = 11; this.EqE = null; rOO.log = "too young"; rOO.Yqx = false; return rOO; } else if (nxw && !this.EqE.mIn.oxl) { ujf = 6; this.EqE = null; rOO.log = "wait conf"; rOO.Yqx = false; return rOO; } } else if (this.EqE.Lightstreamer.ldq) { if (this.EqE.Lightstreamer.ldq.jiW) { ujf = 7; var nQt = this.EqE.Lightstreamer.ldq.jiW; if (Lightstreamer.ldq) { Lightstreamer.ldq.jiW = nQt; } this.EqE = nQt; var jLH = this.xrQ(true); jLH.log = "linked: " + jLH.log; return jLH; } else { ujf = 8; this.EqE = null; rOO.log = "linked w/o reference"; rOO.Yqx = false; return rOO; } } else { ujf = 9; this.wae.EPl(false, 'xrQ', this.EqE); this.EqE = null; rOO.log = "not engine"; rOO.Yqx = true; return rOO; } } ujf = 10; rOO.log = "OK"; rOO.GGh = true; return rOO; } catch (lSX) { this.EqE = null; rOO.log = "exception " + ujf + " " + lSX; rOO.Yqx = true; return rOO; } }, PJc: function(SOI, Lup) { var OYv = SOI + "__TRASH"; var niJ = this.jUi(SOI, OYv); var SNv = "eval(" + '"' + niJ + "; " + '"' + ")"; this.wae.log('PJc', 1); var XvJ = Lightstreamer.Kvb("javascript:" + SNv, SOI); this.wae.log('PJc', 2, XvJ != null); if (XvJ === false) { return false; } else if (!XvJ) { var XvJ = Lightstreamer.Kvb(Lightstreamer.bQj, SOI); Lightstreamer.aml.log('PJc', 3); this.wae.log('PJc', 4, XvJ != null); if (XvJ === false) { return false; } else if (XvJ == null) { return true; } } try { this.wae.log('PJc', 5, XvJ.closed); if (XvJ.closed) { return true; } if (Lup) { this.wae.log('PJc', 6, (XvJ == XvJ.top)); if (XvJ == XvJ.top && !XvJ.Lightstreamer) { try { this.PDw(XvJ, SOI, OYv); } catch (lSX) { this.wae.nKI(lSX, 'PJc', 10); } return true; } XvJ = XvJ.parent; this.wae.log('PJc', 7, XvJ != null); if (XvJ == null) { return true; } } this.wae.log('PJc', 8, (XvJ.Lightstreamer != null)); if (!XvJ.Lightstreamer) { return true; } this.wae.log('PJc', 9, (XvJ.Lightstreamer.QcC != null)); if (!XvJ.Lightstreamer.QcC) { return true; } this.EqE = XvJ; } catch (lSX) { this.wae.nKI(lSX, 'PJc', 11); } return true; }, OWl: function(CZg, XaK) { if (this.PJc("LS__" + CZg, true) === false) { return false; } var kZj = this.xrQ(true, !XaK); return kZj; }, jUi: function(ZHY, QXt) { var YZP = function(ZHY, QXt) { if (window.name == ZHY) { if (window == top && !(window.Lightstreamer && window.Lightstreamer.QcC)) { window.name = QXt; window.close(); } } }; var mMh = "callFun"; return "var " + mMh + " = " + YZP.toString() + "; " + mMh + "('" + ZHY + "', '" + QXt + "');"; }, PDw: function(XvJ, SOI, OYv) { if (XvJ.name != SOI && XvJ.name != OYv) { return; } XvJ.close(); } }; Lightstreamer.vHI({ kAq: 0, ZQV: 0, pGQ: false, Hnd: "You have Norton Internet Security or Norton\nPersonal Firewall installed on this computer.\nIf no real-time data show up, then you need\nto disable Ad Blocking in Norton Internet\nSecurity and then refresh this page", Kvb: function(kuB, SOI) { var rOO = null; Lightstreamer.Eem.log('Kvb', document.cookie); try { rOO = this.Gps(kuB, SOI); } catch (lSX) { Lightstreamer.Eem.nKI(lSX); return false; } if (rOO) { try { this.ZQV++; } catch (aWg) { this.KbK = true; } } return rOO; }, Gps: function(kuB, SOI) { if (window.SymError) { var mBp = true; if ((this.ZQV - this.kAq) < -5) { mBp = false; } if (window.SymRealWinOpen && mBp) { this.kAq++; Lightstreamer.Eem.log('Gps', 1); return window.SymRealWinOpen(kuB, SOI, "height=100,width=100", true); } else if (!this.pGQ) { this.pGQ = true; Lightstreamer.Eem.cst(this.Hnd, "window.open"); var uek = null; if (window.mIn) { uek = mIn; } else if (Lightstreamer.ldq) { uek = Lightstreamer.ldq; } if (uek != null) { Lightstreamer.QcC.hNY(uek, 100, this.Hnd); } } mBp = true; this.kAq = 0; return null; } else { if (Lightstreamer.TcX() - Lightstreamer.eGJ > Lightstreamer.PiL) { return false; } return window.open(kuB, SOI, "height=100,width=100", true); } } }); Lightstreamer.vHI({ FfY: function(ujE) { var XEI = 0; var aDn = ujE.length; for (var CtU = 0; CtU < aDn; CtU++) { XEI += ujE.charCodeAt(CtU); } return parseInt(XEI); }, UWq: function(uJm, GhI, TmY, ulH, MMg) { var YeI = 3; var uYC; var QMw = TmY; var vPZ = TmY - ulH; var huN = ""; var XEI = this.FfY(GhI.toString()); if (XEI > 0) { var Nbg = uJm.length; if (Nbg > 0) { var CtU; for (CtU = 0; QMw + YeI - CtU <= Nbg; CtU += 3) { var FIY = CtU; if (vPZ > 0) { for (FIY = XEI * 3; FIY >= vPZ; FIY -= vPZ); } var FeF = uJm.substring(CtU, YeI - 1); var seG = uJm.substring(FIY, FIY + 2); var khU = uJm.substring(QMw, QMw + YeI - CtU); uYC = parseInt(FeF) - parseInt(seG) + MMg - parseInt(khU); var bvJ = unescape("%" + uYC.toString(16)); huN = bvJ + huN; YeI += 3; QMw += 3; XEI += uYC; } } } return huN; } }); Lightstreamer.MessageListener = function() { }; Lightstreamer.MessageListener.prototype = { onAbort: function() { return; }, onError: function() { return; }, onDiscarded: function() { return; }, onDeny: function(code, message) { return; }, onProcessed: function() { return; } }; Lightstreamer.mBC = function(FbN) { this.name = null; this.parent = null; this.wae = Lightstreamer.QcC.getLogger("OP"); if (FbN) { this.aOS(FbN); } }; Lightstreamer.mBC.prototype = { xQx: Lightstreamer.BZa, Hul: Lightstreamer.rfG, eZs: function(OZb, wNQ) { this[OZb] = Lightstreamer.waO(wNQ); if (this.parent == window.mIn) { this.YOH(OZb); } }, YOH: function(wJs, olZ, ZPb) { var NQT = 'DAh'; var CdX = { object: this.name, OZb: wJs }; CdX.wNQ = Lightstreamer.waO(this[wJs]); this.wae.log('YOH', wJs, (wJs != 'vgv' ? this[wJs] : "[...]")); if (this.parent == window.mIn) { var pcS = KmP.hPO(); for (var CtU in pcS) { pcS[CtU].qof(NQT, CdX); } } else { if (!Lightstreamer.kRs.NLu(NQT, CdX)) { this.wae.PhQ("The LightstreamerEngine instance is not available", olZ); this[wJs] = ZPb; return false; } } return true; }, aOS: function(WAK) { var vvd = this.vSO; for (var CtU = 0; CtU < vvd.length; CtU++) { this[vvd[CtU]] = Lightstreamer.waO(WAK[vvd[CtU]]); } } }; Lightstreamer.pAj = null; Lightstreamer.bQj = "lsblank.html?"; Lightstreamer.Context = function() { this.cUS = null; this.mWV = null; this.ejJ = null; this.gbO = 0; this.oPC = 0; this.QcC = null; this.vSO = Lightstreamer.Context.vSO; this.uAp(Lightstreamer.Context, arguments[0]); this.name = "context"; }; Lightstreamer.Context.vSO = ['cUS', 'mWV', 'ejJ', 'gbO', 'oPC']; Lightstreamer.Context.prototype = { getLogger: function() { return this.QcC; }, aOS: function(WAK) { this.Hwd(Lightstreamer.Context, 'aOS', WAK); if (!this.QcC && WAK.QcC) { this.QcC = WAK.QcC; } }, bind: function() { if (this.parent && this.parent != window.mIn) { return; } if (Lightstreamer.pAj != null && Lightstreamer.pAj != "") { document.domain = Lightstreamer.pAj; var SWJ = "domain=" + Lightstreamer.pAj + "&"; Lightstreamer.bQj += SWJ; if (Lightstreamer.LSX) { Lightstreamer.LSX.ZgN = SWJ; } } Lightstreamer.BQn = this; Lightstreamer.uYw(); return true; }, setDebugAlertsOnClientError: function(ueT) { var ZPb = this.mWV; this.mWV = ueT === true; if (this.parent == null) { this.Iao(); } else { this.YOH('mWV', "setDebugAlertsOnClientError", ZPb); } }, Iao: function() { if (this.mWV) { if (!Lightstreamer.wup) { var wup = new Lightstreamer.AlertConsumer(1); wup.addLogCategory("ER"); Lightstreamer.QcC.addConsumer(wup, true); Lightstreamer.wup = wup; this.wae.log('Iao', 1); } else { this.wae.log('Iao', 2); } } else if (Lightstreamer.wup) { Lightstreamer.QcC.removeConsumer(Lightstreamer.wup); Lightstreamer.wup = null; this.wae.log('Iao', 3); } else { this.wae.log('Iao', 4); } }, setRemoteAlertsOnClientError: function(ueT, gbO, oPC) { var gHq = this.ejJ; var FBk = this.oPC; var cxu = this.gbO; this.ejJ = ueT === true; if (oPC) { this.oPC = this.xQx(oPC, "setRemoteAlertsOnClientError", this.oPC, true, 0); } if (gbO) { this.gbO = this.xQx(gbO, "setRemoteAlertsOnClientError", this.gbO, true, 0); } if (this.parent == null) { this.rCL(); } else { var huN = this.YOH('oPC', "setRemoteAlertsOnClientError"); huN &= this.YOH('gbO', "setRemoteAlertsOnClientError"); huN &= this.YOH('ejJ', "setRemoteAlertsOnClientError"); if (!huN) { this.ejJ = gHq; this.oPC = FBk; this.gbO = cxu; } } }, rCL: function() { if (this.ejJ) { if (Lightstreamer.ZRG) { Lightstreamer.ZRG.rGG(this.gbO); Lightstreamer.ZRG.aMh(this.oPC); this.wae.log('rCL', 2); } else { var ZRG = new Lightstreamer.RemoteConsumer(1, this.gbO, this.oPC); ZRG.addLogCategory("ER"); Lightstreamer.QcC.addConsumer(ZRG, true); Lightstreamer.ZRG = ZRG; this.wae.log('rCL', 1); } } else if (Lightstreamer.ZRG) { Lightstreamer.QcC.removeConsumer(Lightstreamer.ZRG); Lightstreamer.ZRG = null; this.wae.log('rCL', 3); } else { this.wae.log('rCL', 4); } }, setDomain: function(domain) { if (this.parent == window.mIn || this.parent == null) { if (domain != null && domain != "" && Lightstreamer.BQn != this) { Lightstreamer.pAj = domain; this.cUS = Lightstreamer.pAj; this.wae.log("setDomain", Lightstreamer.pAj); } if (!Lightstreamer.Sxl(location.hostname)) { this.wae.PhQ("The domain set is inconsistent with the hostname used", "setDomain"); } } } }; with (Lightstreamer) { svV(Context, mBC); } Lightstreamer.Policy = function() { this.hCj = 0; this.IxF = NaN; this.mTP = NaN; this.HYb = 2000; this.Dkw = 15000; this.vlu = NaN; this.oOI = 0; this.QLK = 30000; this.PWc = true; this.SbH = true; this.qqI = false; this.QCq = 4000; this.esB = 30000; this.vLQ = 1000; this.lsw = 300; this.vSO = Lightstreamer.Policy.vSO; this.uAp(Lightstreamer.Policy, arguments[0]); this.name = "policy"; }; Lightstreamer.Policy.vSO = ['hCj', 'IxF', 'mTP', 'HYb', 'Dkw', 'vlu', 'oOI', 'QLK', 'PWc', 'SbH', 'qqI', 'QCq', 'esB', 'vLQ', 'lsw']; Lightstreamer.Policy.prototype = { setRequestSerializationTimeout: function(ppN) { var ZPb = this.lsw; this.lsw = this.xQx(ppN, "setRequestSerializationTimeout", this.lsw, true, 0); this.YOH('lsw', "setRequestSerializationTimeout", ZPb); }, getRequestSerializationTimeout: function() { return this.lsw; }, setMaxBandwidth: function(hCj) { var ZPb = this.hCj; var JLj = new String(hCj); if (JLj.toLowerCase() == "unlimited") { this.hCj = 0; } else { this.hCj = this.xQx(hCj, "setMaxBandwidth", this.hCj, false, 0); } this.YOH('hCj', "setMaxBandwidth", ZPb); }, getMaxBandwidth: function() { return this.hCj; }, setKeepaliveInterval: function(IxF) { var ZPb = this.IxF; this.IxF = this.xQx(IxF, "setKeepaliveInterval", this.IxF, true, 1); this.YOH('IxF', "setKeepaliveInterval", ZPb); }, getKeepaliveInterval: function() { if (!isNaN(this.mTP)) { return this.mTP; } return this.IxF; }, setTimeoutForStalled: function(HYb) { var ZPb = this.HYb; this.HYb = this.xQx(HYb, "setTimeoutForStalled", this.HYb, true, 1); this.YOH('HYb', "setTimeoutForStalled", ZPb); }, getTimeoutForStalled: function() { return this.HYb; }, setTimeoutForReconnect: function(Dkw) { var ZPb = this.Dkw; this.Dkw = this.xQx(Dkw, "setTimeoutForReconnect", this.Dkw, true, 1); this.YOH('Dkw', "setTimeoutForReconnect", ZPb); }, getTimeoutForReconnect: function() { return this.Dkw; }, setPollingInterval: function(oOI) { var ZPb = this.oOI; this.oOI = this.xQx(oOI, "setPollingInterval", this.oOI, true, 0); this.YOH('oOI', "setPollingInterval", ZPb); }, getPollingInterval: function() { if (!isNaN(this.vlu)) { return this.vlu; } return this.oOI; }, setIdleTimeout: function(QLK) { var ZPb = this.QLK; this.QLK = this.xQx(QLK, "setIdleTimeout", this.QLK, true, 0); this.YOH('QLK', "setIdleTimeout", ZPb); }, getIdleTimeout: function() { return this.QLK; }, setSlowingEnabled: function(PWc) { var ZPb = this.PWc; this.PWc = this.Hul(PWc, "setSlowingEnabled", this.PWc); this.YOH('PWc', "setSlowingEnabled", ZPb); }, isSlowingEnabled: function() { return this.PWc; }, setCanUseGetForStreaming: function(SbH) { var ZPb = this.SbH; this.SbH = this.Hul(SbH, "setCanUseGetForStreaming", this.SbH); this.YOH('SbH', "setCanUseGetForStreaming", ZPb); }, canUseGetForStreaming: function() { return this.SbH; }, setBufferedStreamingHandled: function(qqI) { var ZPb = this.qqI; this.qqI = this.Hul(qqI, "setBufferedStreamingHandled", this.qqI); this.YOH('qqI', "setBufferedStreamingHandled", ZPb); }, cbi: function() { return this.qqI; }, setConnectTimeout: function(mDw) { var ZPb = this.QCq; this.QCq = this.xQx(mDw, "setConnectTimeout", this.QCq, true, 1); this.YOH('QCq', "setConnectTimeout", ZPb); }, getConnectTimeout: function() { return this.QCq; }, setStreamingTimeout: function(KCB) { var ZPb = this.esB; this.esB = this.xQx(KCB, "setStreamingTimeout", this.esB, true, 1); this.YOH('esB', "setStreamingTimeout", ZPb); }, getStreamingTimeout: function() { return this.esB; }, setFirstPollInterval: function(jPq) { var ZPb = this.vLQ; this.vLQ = this.xQx(jPq, "setFirstPollInterval", this.vLQ, true, 0); this.YOH('vLQ', "setFirstPollInterval", ZPb); }, getFirstPollInterval: function() { return this.vLQ; } }; with (Lightstreamer) { svV(Policy, mBC); } Lightstreamer.Connection = function() { this.VIL = "/lightstreamer"; this.fsw = false; this.ctY = location.hostname; this.Htf = location.port; this.uUQ = null; this.Epi = "STREAMING_IN_PROGRESS"; this.dGF = null; this.vgv = null; this.vSO = Lightstreamer.Connection.vSO; this.uAp(Lightstreamer.Connection, arguments[0]); this.name = "connection"; }; Lightstreamer.Connection.vSO = ['VIL', 'fsw', 'ctY', 'Htf', 'uUQ', 'dGF', 'vgv', 'Epi']; Lightstreamer.Connection.prototype = { setServerUrlPath: function(AcW) { var ZPb = this.VIL; if (AcW) { if (AcW.indexOf("/") != 0) { AcW = "/" + AcW; } while (AcW.length > 0 && AcW.lastIndexOf("/") == AcW.length - 1) { AcW = AcW.substring(0, AcW.length - 1); } this.VIL = AcW; } else { this.VIL = "/lightstreamer"; } this.YOH('VIL', "setServerUrlPath", ZPb); }, getServerUrlPath: function() { return this.VIL; }, setLSHost: function(weD) { var gwf = this.ctY; if (weD) { if (weD.indexOf("://") > 0) { weD = weD.substring(weD.indexOf("://") + 3); } if (!Lightstreamer.Sxl(weD) && arguments[1] !== true) { this.wae.PhQ(gNk() + " Server hostname inconsistent with the domain set", "setLSHost"); } this.ctY = weD; vhG = weD; } else { this.ctY = location.hostname; vhG = location.hostname; } this.YOH('ctY', "setLSHost", gwf); }, getLSHost: function() { return this.ctY; }, setLSPort: function(port) { var ZPb = this.Htf; if (port) { this.Htf = this.xQx(port, "setLSPort", this.Htf, true, 0); } else { this.Htf = location.port; } this.YOH('Htf', "setLSPort", ZPb); }, getLSPort: function() { return this.Htf; }, setAdapterName: function(uUQ) { var ZPb = this.uUQ; this.uUQ = uUQ; this.YOH('uUQ', "setAdapterName", ZPb); }, getAdapterName: function() { return this.uUQ; }, setStatusBarUrlPortion: function(Chq) { var ZPb = this.Epi; this.Epi = Lightstreamer.AsQ("_" + Chq); this.YOH('Epi', "setStatusBarUrlPortion", ZPb); }, getStatusBarUrlPortion: function() { return this.Epi; }, setUserName: function(dGF) { var ZPb = this.dGF; this.dGF = dGF; this.YOH('dGF', "setUserName", ZPb); }, setPassword: function(AtO) { var ZPb = this.vgv; this.vgv = AtO; this.YOH('vgv', "setPassword", ZPb); } }; with (Lightstreamer) { svV(Connection, mBC); } Lightstreamer.Xek = function(FbN) { this.IgR = false; this.PsX = null; this.jcb = null; this.UGn = Lightstreamer.sgl; this.vSO = Lightstreamer.Xek.vSO; this.uAp(Lightstreamer.Xek, FbN); this.name = 'YwA'; }; Lightstreamer.Xek.vSO = ['IgR', 'PsX', 'jcb', 'UGn']; with (Lightstreamer) { svV(Xek, mBC); } Lightstreamer.Dew = function(YSs, Snd, qPG) { this.hZX = qPG === true; this.YSs = YSs; this.lJo = Snd; this.mtc = (this.hZX) ? [] : { readId: 0, writeId: 0, firstId: 0 }; this.wae = Lightstreamer.QcC.getLogger("XS"); if (!this.hZX) { this.knL = Lightstreamer.Dew.wLX++; Lightstreamer.Dew.jpK[this.knL] = this; if (!Lightstreamer.Dew.QIk) { Lightstreamer.Dew.QIk = setInterval(Lightstreamer.EoJ(Lightstreamer.Dew.jAS, Lightstreamer.Dew), 50); } } this.wae.log('Dew'); }; Lightstreamer.Dew.QIk = null; Lightstreamer.Dew.jpK = {}; Lightstreamer.Dew.wLX = 0; Lightstreamer.Dew.jAS = function() { for (var CtU in this.jpK) { this.jpK[CtU].jAS(); } }; Lightstreamer.Dew.remove = function(naS) { delete (this.jpK[naS.knL]); }; Lightstreamer.Dew.prototype = { wkn: function(vpb, qbO, GWh, lNL) { if (this.hZX) { var VQa = this; this.joS(function() { VQa.LMu(vpb, qbO, GWh, lNL); }, 1); } else { this.LMu(vpb, qbO, GWh, lNL); } }, LMu: function(vpb, qbO, GWh, lNL) { if (this.hZX) { this.mtc.push(new Lightstreamer.Dew.PkS(vpb, qbO, GWh, lNL)); this.jAS(); } else { this.JTE(); var KmZ = this.mtc.writeId; this.mtc[KmZ] = new Lightstreamer.Dew.PkS(vpb, qbO, GWh, lNL); this.mtc.writeId++; this.uBu(); } }, uBu: function() { var hsA = this.mtc.readId; for (; this.mtc.firstId < hsA; this.mtc.firstId++) { delete (this.mtc[this.mtc.firstId]); } }, JTE: function() { if (this.mtc.firstId == this.mtc.readId && this.mtc.firstId == this.mtc.writeId) { this.mtc.writeId = 0; this.mtc.readId = 0; this.mtc.firstId = 0; this.mtc = { readId: 0, writeId: 0, firstId: 0 }; this.wae.log('JTE'); } }, jAS: function() { if (this.hZX) { while (this.mtc.length > 0) { var vpb = this.mtc.shift(); this.OBV(vpb); } } else { var KmZ = this.mtc.readId; while (KmZ < this.mtc.writeId) { var vpb = this.mtc[KmZ]; this.OBV(vpb); KmZ++; } this.mtc.readId = KmZ; } }, OBV: function(vpb) { try { if (!this.YSs.ILT(vpb.qbO, vpb.lNL)) { return; } if (this.lJo[vpb.vpb]) { this.lJo[vpb.vpb](vpb.GWh); } else { this.wae.aqK('OBV', 3, vpb); } } catch (lSX) { this.wae.nKI(lSX, 'OBV', vpb); } }, joS: function(sVN, ppN) { setTimeout(sVN, ppN); } }; Lightstreamer.Dew.PkS = function(vpb, EGa, QrC, ZDE) { this.vpb = vpb; this.qbO = EGa; this.GWh = QrC; this.lNL = ZDE; }; Lightstreamer.Dew.PkS.prototype.toString = function() { return ["[", 'Dew.Event', this.vpb, this.qbO, this.GWh, this.lNL, "]"].join("|"); }; with (Lightstreamer) { Lightstreamer.QcC = new LogSystem(); QcC.LWe.setHistoryDim(5); Lightstreamer.PaW = QcC.getLogger("OP"); Lightstreamer.Eem = QcC.getLogger("FM"); Lightstreamer.Zxs = QcC.getLogger("CH"); Lightstreamer.MPg = QcC.getLogger("PC"); Lightstreamer.mNP = QcC.getLogger("PF"); Lightstreamer.orR = QcC.getLogger("LC"); Lightstreamer.aml = QcC.getLogger("M1"); Lightstreamer.HjO = new Context(); HjO.setDebugAlertsOnClientError(true); HjO.QcC = QcC; } Lightstreamer.version = "4.4.build_placeholder"; if (window.OpenAjax) { if (OpenAjax.hub) { OpenAjax.hub.registerLibrary("Lightstreamer", "http://www.lightstreamer.com/", "4.4"); } else { OpenAjax.registerLibrary("Lightstreamer", "http://www.lightstreamer.com/", "4.4"); OpenAjax.registerGlobals("Lightstreamer", ["Lightstreamer"]); } }
if (!window.Lightstreamer) { throw ("Warning: lscommons.js not included before lspushpage.js"); } Lightstreamer.WJv = "506  24326 $"; Lightstreamer.orR.log("pushpage", window.name); Lightstreamer.GroupDescriptor = function() { this.wae = Lightstreamer.QcC.getLogger("TL"); }; Lightstreamer.GroupDescriptor.prototype = { YCO: function(WpG) { if (WpG == null) { return null; } else if (WpG.pwe) { return WpG.pwe; } else if (WpG.jOo) { if (this.xKS) { return this.xKS[WpG.jOo]; } else { return null; } } else { var FPT = Number(WpG); if (!isNaN(FPT)) { return FPT; } else { if (this.xKS) { WpG = WpG.toString(); return this.xKS[WpG]; } else { return null; } } } } }; Lightstreamer.GroupDescriptor.CBd = function(oZw) { if (oZw == null) { return null; } else if (oZw.KlH) { return oZw; } else if (oZw.IcD) { return oZw; } else if (oZw.join && typeof (oZw.join) == "function") { return new Lightstreamer.GroupListDescriptor(oZw); } else { return new Lightstreamer.GroupIdDescriptor(oZw); } }; Lightstreamer.GroupIdDescriptor = function(KlH) { this.uAp(Lightstreamer.GroupIdDescriptor); this.KlH = String(KlH); }; Lightstreamer.GroupIdDescriptor.prototype = { VKL: function(pwe) { return null; }, UTS: function() { return this.KlH; }, getId: function() { return this.KlH; } }; Lightstreamer.svV(Lightstreamer.GroupIdDescriptor, Lightstreamer.GroupDescriptor); Lightstreamer.GroupListDescriptor = function(hBO) { this.uAp(Lightstreamer.GroupListDescriptor); this.IcD = [].concat(hBO); if (typeof (this.IcD[0]) != "undefined") { } else { Lightstreamer.wcq(this.IcD); } this.xKS = {}; for (var CtU = 0; CtU < this.IcD.length; CtU++) { var ZHY = String(this.IcD[CtU]); if (!this.hwJ(ZHY)) { ZHY = "item_name_error"; } this.IcD[CtU] = ZHY; this.xKS[ZHY] = Number(CtU) + 1; } }; Lightstreamer.GroupListDescriptor.prototype = { hwJ: function(jOo) { if (jOo == null || jOo == "") { this.wae.PhQ("Item names cannot be empty", "GroupListDescriptor"); return false; } if (!isNaN(Number(jOo))) { this.wae.PhQ("Item names cannot be numbers", "GroupListDescriptor"); return false; } if (jOo.indexOf("|") != -1 || jOo.indexOf(" ") != -1) { this.wae.PhQ("Item names should be alphanumeric(" + jOo + ")", "GroupListDescriptor"); return false; } return true; }, VKL: function(pwe) { return this.IcD[pwe - 1]; }, UTS: function() { return this.IcD.join(" "); }, getList: function() { var ilK = [0].concat(this.IcD); delete ilK[0]; return ilK; } }; Lightstreamer.svV(Lightstreamer.GroupListDescriptor, Lightstreamer.GroupDescriptor); Lightstreamer.SchemaDescriptor = function() { this.wae = Lightstreamer.QcC.getLogger("TL"); }; Lightstreamer.SchemaDescriptor.prototype = { wND: function(qeP) { if (typeof (qeP) == "string") { return null; } else { return qeP; } }, YCU: function(qeP) { if (typeof (qeP) == "string") { return true; } else { return qeP > this.oxd(); } } }; Lightstreamer.SchemaDescriptor.cOB = function(Jqa) { if (Jqa == null) { return null; } else if (Jqa.BcE) { return Jqa; } else if (Jqa.Was) { return Jqa; } else if (Jqa.join && typeof (Jqa.join) == "function") { return new Lightstreamer.SchemaListDescriptor(Jqa); } else { return new Lightstreamer.SchemaIdDescriptor(Jqa); } }; Lightstreamer.SchemaIdDescriptor = function(BcE) { this.uAp(Lightstreamer.SchemaIdDescriptor); this.BcE = String(BcE); this.ghh = 0; }; Lightstreamer.SchemaIdDescriptor.prototype = { qFa: function(JHB) { if (JHB == null) { return null; } else if (JHB.BHw) { return JHB.BHw; } else if (JHB.edG) { return Lightstreamer.AsQ(JHB.edG); } else { var FPT = Number(JHB); if (!isNaN(FPT)) { return FPT; } else { return Lightstreamer.AsQ(JHB); } } }, WZw: function(edG) { return null; }, wcT: function(qeP) { if (typeof (qeP) == "string") { return Lightstreamer.FbV(qeP); } else { return null; } }, Ems: function() { return this.BcE; }, Yep: function(size, MUO) { if (MUO) { if (!this.wYm) { this.ghh += size; this.wYm = true; } } else if (!this.kea) { this.ghh += size; this.kea = size; } }, oxd: function() { return this.ghh; }, Bnn: function() { return this.kea; }, suc: function() { return; }, getId: function() { return this.BcE; } }; Lightstreamer.svV(Lightstreamer.SchemaIdDescriptor, Lightstreamer.SchemaDescriptor); Lightstreamer.SchemaListDescriptor = function(VLI) { this.uAp(Lightstreamer.SchemaListDescriptor); this.Was = [].concat(VLI); if (typeof (this.Was[0]) != "undefined") { } else { Lightstreamer.wcq(this.Was); } this.Kwx = null; this.xKS = {}; for (var CtU = 0; CtU < this.Was.length; CtU++) { var ZHY = String(this.Was[CtU]); if (!this.DWK(ZHY)) { ZHY = "field_name_error"; } this.Was[CtU] = ZHY; this.xKS[ZHY] = Number(CtU) + 1; } }; Lightstreamer.SchemaListDescriptor.prototype = { suc: function(MWY) { if (this.Kwx == null) { this.Kwx = []; for (var CtU = 0; CtU < this.Was.length; CtU++) { this.Kwx[CtU] = this.Was[CtU]; } this.LjK = {}; for (var CtU in this.xKS) { this.LjK[CtU] = this.xKS[CtU]; } for (var CtU = 0; CtU < MWY.Was.length; CtU++) { if (!this.LjK[MWY.Was[CtU]]) { var aos = {}; aos[0] = MWY.Was[CtU]; aos[1] = "$" + MWY.Was[CtU]; aos.Grf = true; this.Was[this.Was.length] = aos; } else { this.Was[this.Was.length] = "$" + MWY.Was[CtU]; } } for (var CtU = 0; CtU < this.Was.length; CtU++) { if (this.Was[CtU].Grf) { var ZHY = String(this.Was[CtU][0]); if (!this.DWK(ZHY)) { ZHY = "field_name_error"; } this.Was[CtU][0] = ZHY; this.Was[CtU][1] = "$" + ZHY; this.xKS[ZHY] = Number(CtU) + 1; this.xKS["$" + ZHY] = Number(CtU) + 1; } else { var ZHY = String(this.Was[CtU]); if (!this.DWK(ZHY)) { ZHY = "field_name_error"; } this.Was[CtU] = ZHY; this.xKS[ZHY] = Number(CtU) + 1; } } } }, DWK: function(edG) { if (edG == null || edG == "") { this.wae.PhQ("Field names cannot be empty", "SchemaListDescriptor"); return false; } if (!isNaN(Number(edG))) { this.wae.PhQ("Field names cannot be numbers", "SchemaListDescriptor"); return false; } if (edG.indexOf("#") == 0) { this.wae.PhQ("Names starting with '#' cannot be used for subscribed fields", "SchemaListDescriptor"); return false; } if (edG.indexOf("|") != -1 || edG.indexOf(" ") != -1) { this.wae.PhQ("Field names should be alphanumeric(" + edG + ")", "SchemaListDescriptor"); return false; } return true; }, qFa: function(JHB) { if (JHB == null) { return null; } else if (JHB.BHw) { return JHB.BHw; } else if (JHB.edG) { var EKx = this.WZw(JHB.edG); if (EKx != null) { return EKx; } else { return Lightstreamer.AsQ(JHB.edG); } } else { var FPT = Number(JHB); if (!isNaN(FPT)) { return FPT; } else { var EKx = this.WZw(JHB); if (EKx != null) { return EKx; } else { return Lightstreamer.AsQ(JHB); } } } }, WZw: function(edG) { return this.xKS[edG]; }, wcT: function(qeP) { if (typeof (qeP) == "string") { return Lightstreamer.FbV(qeP); } else { if (this.Was[qeP - 1] && this.Was[qeP - 1].Grf) { return this.Was[qeP - 1][0]; } else { return this.Was[qeP - 1]; } } }, Ems: function() { if (this.Kwx) { return this.Kwx.join(" "); } else { return this.Was.join(" "); } }, Yep: function(size) { return; }, oxd: function() { return this.Was.length; }, Bnn: function() { return this.Kwx.length; }, getList: function() { if (!this.Kwx) { var ilK = [0].concat(this.Was); delete ilK[0]; return ilK; } else { var ilK = [0].concat(this.Kwx); delete ilK[0]; return ilK; } } }; Lightstreamer.svV(Lightstreamer.SchemaListDescriptor, Lightstreamer.SchemaDescriptor); Lightstreamer.ItemDescriptor = function() { }; Lightstreamer.ItemDescriptor.prototype = {}; Lightstreamer.ItemNameDescriptor = function(jOo) { this.uAp(Lightstreamer.ItemNameDescriptor); this.jOo = String(jOo); }; Lightstreamer.ItemNameDescriptor.prototype = { toString: function() { return this.jOo; }, getName: function() { return this.jOo; } }; Lightstreamer.svV(Lightstreamer.ItemNameDescriptor, Lightstreamer.ItemDescriptor); Lightstreamer.ItemPositionDescriptor = function(pwe) { this.uAp(Lightstreamer.ItemPositionDescriptor); this.pwe = Number(pwe); }; Lightstreamer.ItemPositionDescriptor.prototype = { toString: function() { return String(this.pwe); }, getPosition: function() { return this.pwe; } }; Lightstreamer.svV(Lightstreamer.ItemPositionDescriptor, Lightstreamer.ItemDescriptor); Lightstreamer.FieldDescriptor = function() { }; Lightstreamer.FieldDescriptor.prototype = {}; Lightstreamer.FieldNameDescriptor = function(edG) { this.uAp(Lightstreamer.FieldNameDescriptor); this.edG = String(edG); }; Lightstreamer.FieldNameDescriptor.prototype = { toString: function() { return this.edG; }, getName: function() { return this.edG; } }; Lightstreamer.svV(Lightstreamer.FieldNameDescriptor, Lightstreamer.FieldDescriptor); Lightstreamer.FieldPositionDescriptor = function(BHw) { this.uAp(Lightstreamer.FieldPositionDescriptor); this.BHw = Number(BHw); }; Lightstreamer.FieldPositionDescriptor.prototype = { toString: function() { return String(this.BHw); }, getPosition: function() { return this.BHw; } }; Lightstreamer.svV(Lightstreamer.FieldPositionDescriptor, Lightstreamer.FieldDescriptor); Lightstreamer.BLQ = function(kZc) { this.cfP = kZc; var cDx = kZc.nodeName.toLowerCase(); this.bdK = (cDx == "input" || cDx == "textarea"); this.Nlg = Lightstreamer.BLQ.KmZ++; this.hDf = null; this.XRo = null; this.nlG = 0; this.fZU = 0; }; Lightstreamer.BLQ.KmZ = 0; Lightstreamer.BLQ.gCq = function(Boc) { var gEJ = []; for (var CtU = 0; CtU < Lightstreamer.ZEn.length; CtU++) { var bQc = Boc.getElementsByTagName(Lightstreamer.ZEn[CtU]); var DAK; for (DAK = 0; DAK < bQc.length; DAK++) { var DpK = bQc[DAK].getAttribute(Lightstreamer.pFW); if (DpK && DpK.toUpperCase() == Lightstreamer.ewr) { gEJ[gEJ.length] = new Lightstreamer.BLQ(bQc[DAK]); } } } return gEJ; }; Lightstreamer.BLQ.Nhi = function(HUp) { var oVP = null; var TqQ = HUp; while (TqQ != null && TqQ != document) { oVP = TqQ; TqQ = TqQ.parentNode; } if (TqQ == null) { if (oVP != null && oVP.nodeName == "HTML") { return true; } else { return false; } } else { return true; } }; Lightstreamer.BLQ.prototype = { Nhi: function() { return Lightstreamer.BLQ.Nhi(this.cfP); }, RUL: function() { if (!this.cfP.id) { return this.Nhi(this.cfP); } var Rvv = document.getElementById(this.cfP.id); return (Rvv === this.cfP); }, uBu: function() { if (this.cfP) { delete (this.cfP); } } }; Lightstreamer.vHI({ cellOverwrite: function(soP, item, field, kuG, jwK, kSu, MkF) { Lightstreamer.gvB(Lightstreamer.wfH, soP, item, field, kuG, jwK, kSu, MkF, "cellOverwrite"); }, cellScroll: function(soP, row, field, kuG, jwK, kSu, MkF) { Lightstreamer.gvB(Lightstreamer.Fet, soP, row, field, kuG, jwK, kSu, MkF, "cellScroll"); }, cellMetapush: function(soP, row, field, kuG, jwK, kSu, MkF) { Lightstreamer.gvB(Lightstreamer.gLk, soP, row, field, kuG, jwK, kSu, MkF, "cellMetapush"); }, gvB: function(AmD, soP, VCs, field, kuG, jwK, kSu, MkF, iHs) { with (Lightstreamer) { MPg.log('gvB', arguments); var DQx = AsQ(soP); var qSJ = field.toString(); var Xhv = VCs; if (AmD == wfH) { Xhv = Xhv.toString(); } kSu = rfG(kSu, iHs, false); if (!rCG.pqP[DQx]) { rCG.pqP[DQx] = new bbY(AmD, kSu, false); } var oPP = rCG.NmP(DQx); oPP.eHs.VKq(jwK, Xhv, qSJ); oPP.nBE.VKq(kuG, Xhv, qSJ); var qZK = rCG.oqZ(kuG, jwK, MkF, oPP); oPP.npv(qZK, Xhv, qSJ, AmD); rCG.wYK[DQx] = true; } } }); Lightstreamer.vHI({ Chv: function(eIF) { return function() { for (var CtU = 0; CtU < eIF.length; CtU++) { eIF[CtU](); } }; }, LXf: new RegExp("^https?:\\/\\/", Lightstreamer.Afp), XVc: function(rIf) { var jqP; if (this.LXf.test(rIf)) { return rIf; } else { jqP = location.protocol + "//" + location.hostname; if (location.port && !Lightstreamer.GSE(location.port, location.protocol)) { jqP += ":" + location.port; } if (rIf.indexOf("/") != 0) { jqP += location.pathname; var VSU = jqP.lastIndexOf("/"); if (VSU != jqP.length - 1) { jqP = jqP.substring(0, VSU + 1); } } jqP += rIf; return jqP; } }, IsY: new RegExp(","), SQk: new RegExp("\\."), bhc: function(pSX, NFI) { if (pSX) { if (!pSX.replace) { return pSX; } if (NFI) { pSX = pSX.replace(this.SQk, ""); pSX = pSX.replace(this.IsY, "."); } else { pSX = pSX.replace(this.IsY, ""); } return new Number(pSX); } return 0; }, Ben: function() { return Lightstreamer.kRs.toString(); } }); Lightstreamer.vHI({ MLB: "&nbsp;", nSq: "\u00A0", wfH: "H", Fet: "V", PXe: "AV", gLk: "X", UDv: "Z", fBP: "K", fJK: "AX", fNO: "AXZ", tBp: "M", ttB: "O", iZk: "OX", IEi: "OXZ", OgG: "A", uKo: "A", Dum: "B", pXR: "D", qPf: "C", bDf: 1, sqC: 2, BrQ: 3, jVN: 4, hrM: 5 }); Lightstreamer.WDE = function() { this.pqP = {}; this.IVQ = {}; this.NcU = {}; this.auf = {}; this.wYK = {}; this.UIq = 0; this.DKt = false; this.Vnm = {}; this.Cmo = new Lightstreamer.DcZ(); this.vYl = Lightstreamer.aIL(); this.JTm = 2000; this.pqv = -1; this.OrF = {}; this.RJF = 0; this.wae = Lightstreamer.QcC.getLogger("LC"); this.LdV = Lightstreamer.QcC.getLogger("TL"); this.wae.log('WDE', "new PageContext"); }; Lightstreamer.WDE.prototype = { AdO: function(pvX, Tjr, KvN) { var rUV = "LS_req_phase="; if (pvX == "add") { Tjr.vYl = ++this.vYl; } rUV += Tjr.vYl + "&"; var uZU = "LS_win_phase=" + KvN + "&"; var SZV = "LS_op=" + pvX + "&"; if (pvX == "add") { return uZU + SZV + rUV + Tjr.hqd; } else { return uZU + rUV + SZV; } }, NmP: function(knL) { if (!this.NcU[knL]) { this.NcU[knL] = new Lightstreamer.HwK(knL); } return this.NcU[knL]; }, dtL: function(ldc, sgm) { this.wae.ZcB('dtL', arguments); Lightstreamer.QcC.getLogger("UP").ZcB('dtL', arguments); var vYa = ldc[0]; oVR = this.Vnm[vYa]; var DiM = this.pqP[oVR]; if (!DiM || DiM.dVR != vYa || DiM.bDI || DiM.pON) { return true; } DiM.Irj(ldc, sgm, false); return true; }, PCB: function(RUp) { this.pqv++; this.OrF[this.pqv] = RUp; this.RJF++; var naS = {}; naS.GCl = Lightstreamer.kRs.Jve; naS.WmC = this.pqv; return naS; }, WlK: function(lvS, EKx, uJm) { if (this.OrF[lvS]) { var RUp = this.OrF[lvS]; if (EKx == 1) { NQT = "onProcessed"; } else if (EKx == 38) { NQT = "onDiscarded"; } else if (EKx == 30) { NQT = "onAbort"; } else if (EKx <= 0) { NQT = "onDeny"; } else { NQT = "onError"; } try { if (EKx <= 0) { RUp.onDeny(EKx, uJm); } else { RUp[NQT](); } } catch (lSX) { this.wae.nKI(lSX, NQT); } delete this.OrF[lvS]; this.RJF--; } }, ADu: function() { var DgQ = {}; var WmC = 0; for (var CtU = this.pqv; CtU >= 0; CtU--) { if (WmC == this.RJF) { break; } if (this.OrF[CtU]) { DgQ[WmC] = CtU; WmC++; } } for (var CtU = 0; CtU < WmC; CtU++) { this.WlK(DgQ[CtU], 30, null); } this.wae.EPl(this.RJF == 0, 'ADu'); this.pqv = -1; this.OrF = {}; this.RJF = 0; }, khY: function() { this.LdV.log('khY', 1); for (var tSv in this.pqP) { var oVR = this.pqP[tSv]; if (oVR && !oVR.bDI) { this.tGb(oVR); } } this.ADu(); }, tGb: function(oVR) { if (oVR.Lsb === Lightstreamer.fBP) { return; } var knL = oVR.jgw; this.LdV.log('tGb', knL); this.IVQ[knL] = oVR; Lightstreamer.ldq.UAM(oVR.getId(), oVR.WmM); }, AgD: function() { this.LdV.log('AgD', 1); var MmU = 0; this.FFx = true; var fUU = this.IVQ; this.IVQ = {}; for (var tSv in fUU) { if (fUU[tSv]) { var qXW = fUU[tSv]; this.wae.EPl(!qXW.bDI && !qXW.sJD && qXW.vbn, 'AgD', qXW.bDI, qXW.sJD, qXW.vbn); if (Lightstreamer.kRs.uRc) { Lightstreamer.ldq.CFQ(qXW, qXW.getId()); MmU++; } else { this.IVQ[tSv] = qXW; } } } this.FFx = false; this.LdV.log('AgD', 2, MmU); }, uBu: function() { for (var CtU in this.NcU) { this.NcU[CtU].uBu(); } } }; Lightstreamer.DcZ = function() { this.GYq = {}; this.Grf = false; }; Lightstreamer.DcZ.prototype = { sZN: function(nrC) { if (nrC && !nrC.bDI && nrC.eKN) { this.Gur(nrC.eKN, nrC.NMS); delete (nrC.eKN); delete (nrC.NMS); this.IjT(); } }, IjT: function() { if (!this.Grf) { this.Grf = true; var VQa = this; setTimeout(function() { VQa.jAS(); }, 1); } }, Gur: function(ZHi, ppN) { if (!this.GYq[ppN]) { this.GYq[ppN] = []; } this.GYq[ppN].push(ZHi); }, jAS: function() { for (var ppN in this.GYq) { setTimeout(Lightstreamer.Chv(this.GYq[ppN]), ppN); delete (this.GYq[ppN]); } this.Grf = false; } }; Lightstreamer.AvS = function(lho) { this.VYg = false; this.PXs = false; this.Snm = this.AWd(lho); this.pob = 1000; this.JXj = false; this.wae = Lightstreamer.QcC.getLogger("LC"); this.FAJ(); }; Lightstreamer.AvS.prototype = { AWd: function(lho) { var VQa = this; return function() { if (VQa.VYg) { return; } VQa.PXs = true; if (lho && lho.length) { for (var CtU = 0; CtU < lho.length; CtU++) { try { lho[CtU](); } catch (lSX) { this.wae.nKI(lSX, 'Snm', lho[CtU]); } } } VQa.PXs = false; VQa.VYg = true; }; }, egf: function() { return !(this.VYg || this.PXs); }, FAJ: function() { if (document && typeof document.readyState != "undefined") { var WLi = document.readyState; if (WLi.toUpperCase() == "COMPLETE") { this.wae.log('FAJ', 1); this.hdZ(); return; } else { this.wae.log('FAJ', 2); setTimeout(this.RMX(), this.pob); } } else if (this.tvr()) { this.wae.log('FAJ', 3); this.hdZ(); return; } if (typeof window.OpenAjax != "undefined") { if (typeof OpenAjax.addOnLoad != "undefined") { this.wae.log('FAJ', 4); OpenAjax.addOnLoad(this.Snm, null, "library"); return; } } var giI = Lightstreamer.hIT("load", this.Snm); if (!giI) { this.wae.log('FAJ', 5); this.hdZ(); } else if (Lightstreamer.NIS()) { var Jaa = true; if (!Lightstreamer.hIT("DOMContentLoaded", this.LYp())) { this.wae.log('FAJ', 6); Jaa = false; } else { this.wae.log('FAJ', 7, window.opera.version); if (Lightstreamer.NIS(7, true)) { return; } else if (Lightstreamer.NIS(8, true)) { Jaa = false; } } setTimeout(this.VkH(Jaa), this.pob); } }, hdZ: function() { setTimeout(this.Snm, 1); }, RMX: function() { var VQa = this; return function() { VQa.Edn(); }; }, Edn: function() { if (!this.VYg) { var WLi = document.readyState; if (WLi.toUpperCase() == "COMPLETE") { this.Snm(); } else { setTimeout(this.RMX(), this.pob); } } }, VkH: function(Jaa) { var VQa = this; return function() { VQa.wPb(Jaa); }; }, wPb: function(Jaa) { if (!this.VYg) { if (this.vRm || !Jaa && this.tvr()) { if (Lightstreamer.ldq && Lightstreamer.ldq.Wit) { this.JXj = true; return; } this.Snm(); } else { setTimeout(this.VkH(Jaa), this.pob); } } }, LYp: function() { var VQa = this; return function() { VQa.vRm = true; }; }, tvr: function() { return (typeof document.getElementsByTagName != "undefined" && typeof document.getElementById != "undefined" && (document.getElementsByTagName("body")[0] != null || document.body != null)); } }; Lightstreamer.Lcd = function() { this.Ifk = false; this.OWv = null; this.wjQ = 0; this.wae = Lightstreamer.QcC.getLogger("EL"); }; Lightstreamer.Lcd.prototype = { SWS: function(kow) { this.wae.log('SWS', Lightstreamer.ldq.uCQ.YwA, Lightstreamer.ldq.jcb); if ((Lightstreamer.ldq.uCQ.YwA.jcb || Lightstreamer.ldq.jcb)) { if (Lightstreamer.ldq.uCQ.YwA.PsX == "S") { this.Ifk = true; var GaF = Lightstreamer.TcX(); if (this.OWv === null || GaF - this.OWv >= 2000) { this.OWv = GaF; var mCH = Lightstreamer.aIL(); this.wae.log('SWS', 2, mCH); this.wjQ++; setTimeout(Lightstreamer.EoJ(this.eYQ, this), mCH); Lightstreamer.ldq.Beq(Lightstreamer.ldq.iho, null); } } else if (kow) { this.wae.log('SWS', 3); } } }, eYQ: function() { this.wjQ--; this.wae.log('eYQ', 1); VUI = Lightstreamer.ldq.jcb ? Lightstreamer.ldq.jcb : Lightstreamer.ldq.uCQ.YwA.jcb; Lightstreamer.ldq.OxP(Lightstreamer.ldq.iho, VUI, Lightstreamer.ldq.uCQ.YwA.PsX, Lightstreamer.ldq.uCQ.YwA.IgR, true); }, JoS: function() { this.Ifk = false; } }; Lightstreamer.FMA = function() { }; Lightstreamer.FMA.prototype = { wul: function(Grf, vYa) { this.wae.ZcB('wul', arguments); if (Grf == 6) { var Tlu = this.pqP[this.Vnm[vYa]]; if (Tlu != null && !Tlu.bDI && Tlu.dVR == vYa) { Tlu.rJb(); } } else if (Grf == 7) { } else if (Grf == 8) { } else if (Grf == 9) { var nrC = this.pqP[this.Vnm[vYa]]; if (nrC && !nrC.bDI && nrC.dVR == vYa) { this.Cmo.sZN(nrC); } } }, mLc: function(Grf, uJm, vYa) { this.wae.ZcB('mLc', arguments); this.DKt = true; var oVR = this.Vnm[vYa]; var DiM = this.pqP[oVR]; if (!DiM || DiM.bDI || DiM.dVR != vYa) { return; } var ejP; var dbI; var lZH; if (DiM.Lsb == Lightstreamer.fBP) { dbI = DiM.aFa; lZH = DiM.cSr.KlH; DiM = DiM.OJv; ejP = DiM.cSr.VKL(dbI); } if (Lightstreamer.ldq.onServerDeny) { try { Lightstreamer.ldq.onServerDeny(Grf, uJm, DiM, dbI, ejP, lZH); } catch (lSX) { this.wae.hHu(lSX, Lightstreamer.ldq.onServerDeny, "onServerDeny"); } } }, onLostUpdates: function(ldc) { this.wae.ZcB("onLostUpdates", arguments); var vYa = ldc[0]; oVR = this.Vnm[vYa]; var sRS = ldc[1]; var lRQ = ldc[2]; var DiM = this.pqP[oVR]; if (!DiM || DiM.bDI || DiM.dVR != vYa) { return false; } var lZH; if (DiM.Lsb == Lightstreamer.fBP) { lZH = DiM.cSr.KlH; sRS = DiM.aFa; DiM = DiM.OJv; } if (DiM.onLostUpdates) { var ZHY = DiM.cSr.VKL(sRS); try { DiM.onLostUpdates(sRS, lRQ, ZHY, lZH); } catch (Kda) { this.wae.hHu(lSX, DiM.onLostUpdates, "onLostUpdates"); } } return true; }, onEndOfSnapshot: function(ldc) { this.wae.ZcB("onEndOfSnapshot", arguments); var vYa = ldc[0]; oVR = this.Vnm[vYa]; var sRS = ldc[1]; var DiM = this.pqP[oVR]; if (!DiM || DiM.bDI || DiM.dVR != vYa) { return false; } if (DiM.Lsb.indexOf(Lightstreamer.fJK) > -1) { DiM.vkf = true; } if (DiM.onEndOfSnapshot) { var ZHY = DiM.cSr.VKL(sRS); try { DiM.onEndOfSnapshot(sRS, ZHY); } catch (lSX) { this.wae.hHu(lSX, DiM.onEndOfSnapshot, "onEndOfSnapshot"); } } return true; } }; Lightstreamer.svV(Lightstreamer.WDE, Lightstreamer.FMA); Lightstreamer.SDP = function() { this.Dmt = new Lightstreamer.RQE(null); this.Ixh = {}; this.qpS = 0; this.tWG = false; this.RqV = 5000; this.GWw = false; this.EEo = 0; this.gRE = 0; this.DKM = false; this.Mko = true; this.opA = false; this.LHu = -1; setInterval(Lightstreamer.EoJ(this.FeG, this), 60000); this.wae = Lightstreamer.QcC.getLogger("EP"); }; Lightstreamer.SDP.prototype = { jXN: function() { if (!Lightstreamer.ldq || Lightstreamer.KbK) { return null; } if (this.Dmt.EqE != null) { var rOO = this.Dmt.xrQ(true); this.wae.log('jXN', 1, rOO.log); if (this.Dmt.EqE !== null) { return this.Dmt.EqE; } else { return null; } } else { return null; } }, bNo: function() { var XOR = null; var DXh = Lightstreamer.ldq; if (Lightstreamer.bfJ() && DXh.NLD) { this.Dmt.EqE = DXh.jiW; this.wae.log('bNo', 1); } else if ((this.DKM || DXh.jiW == null) && this.Mko && !DXh.Wit) { XOR = this.NXo(); this.wae.log('bNo', 2, XOR); this.DKM = false; } else if (DXh.jiW != null) { this.Dmt.EqE = DXh.jiW; this.wae.log('bNo', 3); this.DKM = true; } else { if (this.qpS == 10) { if (!this.tWG) { this.wae.cst("No way to find the Engine. Please check your configuration", "seekEngine"); } } if (this.qpS <= 10) { this.qpS++; } this.wae.log('bNo', 4, this.qpS); return null; } var rOO = this.Dmt.xrQ(true, !DXh.Wit); this.wae.log('bNo', 5, rOO.log); if (this.Dmt.EqE != null) { this.gRE = 0; try { this.Ixh[this.Dmt.EqE.mIn.getEngineFrameName()] = "OK"; return this.Dmt.EqE; } catch (lSX) { this.wae.log('bNo', 10); } } else if (DXh.Wit && Lightstreamer.IKL()) { DXh.jiW = self; } if (Lightstreamer.NIS() && DXh.hOs() && XOR && XOR.log == "null") { this.wae.log('bNo', 6); DXh.QAt(); return null; } this.gRE++; if (this.gRE >= (DXh.Wit ? 20 : 10)) { this.gRE = 0; if (Lightstreamer.bnm.Ifk) { this.wae.log('bNo', 7); Lightstreamer.bnm.SWS(); } else if (DXh.hOs() && this.exV() && !DXh.Wit) { this.wae.log('bNo', 8); DXh.QAt(); } else { this.wae.log('bNo', 9); this.GWw = true; } } return null; }, exV: function() { if (Lightstreamer.tSW(2) && this.pBB) { this.wae.log('exV', 1); return true; } else if (Lightstreamer.NIS()) { this.wae.log('exV', 2); return true; } else if (Lightstreamer.iAH()) { this.wae.log('exV', 3); return true; } }, NXo: function() { var ODr = this.dQZ(); if (!ODr) { this.wae.log('NXo', 1); return false; } var psr = ODr[2]; var huN = this.Dmt.OWl(psr, Lightstreamer.ldq.Wit); if (huN === false || (!huN.GGh && huN.Yqx == false)) { this.Ixh[psr] = false; } else { this.Ixh[psr] = huN.log ? huN.log : "unknown"; } this.wae.log('NXo', 3, psr, huN.log); if (ODr[3] && ODr[3] != location.host) { this.pBB = true; } return huN; }, dQZ: function() { if (!Lightstreamer.ILZ) { this.wae.log('dQZ', 1); return null; } var CoW = Lightstreamer.FdX("LS4_" + Lightstreamer.ldq.iho); if (!CoW) { this.wae.log('dQZ', 2); return null; } for (var CtU = 0; CtU < CoW.length; CtU++) { var ZrX = Lightstreamer.FdX("LS4_" + CoW[CtU] + "_" + Lightstreamer.ldq.iho); if (!ZrX || ZrX.length <= 2) { this.wae.log('dQZ', 3, CoW[CtU]); continue; } if (ZrX[1] != "S" && !this.opA) { this.wae.log('dQZ', 5, CoW[CtU], ZrX[1]); continue; } if (this.Ixh[ZrX[2]]) { this.wae.log('dQZ', 6, CoW[CtU], ZrX[2]); continue; } var nqs = Lightstreamer.TcX(); var pdH = nqs - parseInt(ZrX[0]); if (pdH > (Lightstreamer.YYX)) { this.wae.log('dQZ', 4, CoW[CtU], pdH); continue; } Lightstreamer.eGJ = nqs; Lightstreamer.PiL = Lightstreamer.YYX - pdH; this.wae.log('dQZ', 7, CoW[CtU], pdH, ZrX); return ZrX; } return null; }, dcY: function() { if (this.OMb) { return; } this.wae.log('dcY'); this.OMb = setInterval(Lightstreamer.EoJ(this.xra, this), this.RqV); }, vEA: function() { this.wae.log('vEA'); clearInterval(this.OMb); delete (this.OMb); }, xra: function() { this.wae.ZcB('xra'); if (Lightstreamer.kRs.Iin) { var mIn = this.jXN(); if (mIn === null) { this.wae.log('xra', 1); Lightstreamer.kRs.bLr(); return false; } this.wae.log('xra', 2); return Lightstreamer.kRs.sfW(); } return false; }, Kvm: function(JgP) { if (Lightstreamer.fUO.tWG) { return; } if (this.GWw && JgP == this.EEo) { if (!Lightstreamer.kRs.Iin) { var uHk; if (Lightstreamer.ldq.Wit) { uHk = "Unable to create the Engine."; } else { uHk = "Unable to find the Engine. "; } if (Lightstreamer.ldq.hOs()) { uHk += "Creating a new Engine."; } else { uHk += "Retrying. If the problem persists, please check your configuration."; } this.wae.cst(uHk, "bind"); Lightstreamer.ldq.QAt(); } } }, mso: function() { var VQa = this; this.GWw = false; var npt = new Number(++this.EEo); setTimeout(function() { VQa.Kvm(npt); }, 20000); }, FeG: function() { var Wuh = document.cookie.toString(); var qXG = this.Ixh; this.Ixh = {}; for (var uxK in qXG) { if (qXG[uxK] && Wuh.indexOf(uxK) > -1) { this.Ixh[uxK] = qXG[uxK]; } } }, kGn: function(gSL) { var mIn = this.jXN(); if (mIn != null) { try { mIn.document.bgColor = gSL; var SFC = mIn.document.bgColor; return SFC; } catch (QLm) { } } return null; } }; Lightstreamer.UpdateItemInfo = function() { this.wae = Lightstreamer.QcC.getLogger("IC"); }; Lightstreamer.UpdateItemInfo.prototype = { Dxu: function(lAP, GhI, ldc, sgm) { this.TJR = ldc; this.lAP = lAP; this.GhI = GhI; this.sgm = sgm; }, isValueChanged: function(field) { this.wae.log("isValueChanged", arguments); var qeP = this.lAP.XoR.qFa(field); return this.QIH(qeP, this.lAP.XoR.YCU(qeP)); }, QIH: function(qeP, TaY) { if (!TaY) { if (this.TJR[qeP + 1] == null) { return true; } else { return (this.TJR[qeP + 1].length > -1); } } else if (this.lAP.Acx.lLS(this.GhI)) { var HxR = ""; if (this.lAP.Acx.bqs(this.GhI, qeP)) { HxR = qeP; } else if (this.lAP.Acx.bqs(this.GhI, qeP + "|rem")) { HxR = qeP + "|rem"; } if (HxR != "") { if (this.lAP.Acx.bqs(this.GhI, HxR) != this.lAP.SQq.bqs(this.GhI, qeP)) { return true; } else { return false; } } } if (this.lAP.SQq.bqs(this.GhI, qeP)) { return true; } else { return false; } }, isSnapshot: function() { this.wae.log("isSnapshot", arguments); return this.sgm; }, getNewValue: function(field) { this.wae.log("getNewValue", arguments); var qeP = this.lAP.XoR.qFa(field); var TaY = this.lAP.XoR.YCU(qeP); if (this.QIH(qeP, TaY)) { if (!TaY) { return this.TJR[qeP + 1]; } else { if (!this.lAP.Acx.lLS(this.GhI)) { return null; } var xYw = this.lAP.Acx.bqs(this.GhI, qeP); var xDn = (xYw) ? xYw : this.lAP.Acx.bqs(this.GhI, qeP + "|rem"); if (!xDn) { return null; } else { return xDn; } } } else { return this.XsN(qeP); } }, getOldValue: function(field) { this.wae.log("getOldValue", arguments); var qeP = this.lAP.XoR.qFa(field); return this.XsN(qeP); }, XsN: function(qeP) { return this.lAP.SQq.bqs(this.GhI, qeP); }, getNumFields: function() { if (this.lAP.qFb && this.lAP.qFb.oxd() == 0) { return null; } return this.lAP.XoR.oxd(); }, addField: function(field, value, XPp) { this.wae.log("addField", arguments); if (typeof XPp == "undefined") { XPp = true; } var qeP = this.lAP.XoR.qFa(field); if (!this.lAP.XoR.YCU(qeP)) { var wre = this.getNumFields(false); this.wae.CVC("addField() method can only add fields that are not part of the subscription schema. Please use a value greater than " + wre, "addField"); return; } if (XPp) { this.lAP.Acx.VKq(value, this.GhI, qeP + "|rem"); } else { this.lAP.Acx.VKq(value, this.GhI, qeP); this.lAP.Acx.EAA(this.GhI, qeP + "|rem"); } } }; Lightstreamer.VisualUpdateInfo = function() { this.fmY = null; this.Wni = 1200; this.OcP = 0; this.bdr = 0; this.wae = Lightstreamer.QcC.getLogger("IC"); }; Lightstreamer.VisualUpdateInfo.prototype = { xQx: Lightstreamer.BZa, Dxu: function(lAP, GhI, ldc, ngO) { this.TJR = ldc; this.ngO = ngO; this.lAP = lAP; this.GhI = GhI; this.WmC = GhI; this.Wni = 1200; this.OcP = 0; this.bdr = 0; }, getFormattedValue: function(field) { var qeP = this.lAP.XoR.qFa(field); var DxV = this.lAP.GEI.bqs(this.GhI, qeP); return DxV; }, setFormattedValue: function(field, value) { var qeP = this.lAP.XoR.qFa(field); this.lAP.GEI.VKq(value, this.GhI, qeP); }, getServerValue: function(field) { var qeP = this.lAP.XoR.qFa(field); if (this.ngO) { if (typeof (qeP) == "number") { return this.TJR[qeP + 1]; } else { return this.TJR[qeP]; } } else if (!this.lAP.XoR.YCU(qeP)) { if (this.TJR[qeP + 1] == null || this.TJR[qeP + 1].length > -1) { return this.TJR[qeP + 1]; } } return this.lAP.SQq.bqs(this.GhI, qeP); }, setHotTime: function(pSX) { this.Wni = this.xQx(pSX, "setHotTime", 1200, true, 0); }, setColdToHotTime: function(pSX) { if (this.lAP.Lsb != Lightstreamer.Fet && this.lAP.Lsb != Lightstreamer.gLk) { this.OcP = this.xQx(pSX, "setColdToHotTime", 0, true, 0); } else { this.OcP = 0; } }, setHotToColdTime: function(pSX) { if (this.lAP.Lsb != Lightstreamer.Fet && this.lAP.Lsb != Lightstreamer.gLk) { this.bdr = this.xQx(pSX, "setHotToColdTime", 0, true, 0); } else { this.bdr = 0; } }, cMB: function(qeP, bdt, OtQ, AmD) { this.wae.log('cMB', arguments); var qSJ = this.lAP.fFI[qeP]; if (qSJ == null) { return; } var wZl = this.lAP.Ovj.QRl(this.fmY, qSJ); if (wZl == null) { return; } bdt = (bdt) ? bdt : ""; OtQ = (OtQ) ? OtQ : ""; if (wZl.hDf == null) { wZl.hDf = {}; wZl.XRo = {}; } wZl.hDf[AmD] = bdt; wZl.XRo[AmD] = OtQ; }, setRowAttribute: function(bdt, OtQ, KNq) { this.iUw(bdt, OtQ, KNq); }, setRowStyle: function(tUh, KtZ) { this.iUw(tUh, KtZ, "CLASS"); }, setAttribute: function(field, bdt, OtQ, KNq) { var qeP = this.lAP.XoR.qFa(field); this.cMB(qeP, bdt, OtQ, KNq); if (this.lAP.Lsb == Lightstreamer.Fet || this.lAP.Lsb == Lightstreamer.gLk) { var oPP = this.lAP.Ovj; var qSJ = this.lAP.fFI[qeP]; if (qSJ == null) { return; } var VUx = oPP.phH.bqs(this.fmY, qSJ); if (!VUx) { VUx = {}; oPP.phH.VKq(VUx, this.fmY, qSJ); } VUx[KNq] = 1; } }, setStyle: function(field, tUh, KtZ) { var qeP = this.lAP.XoR.qFa(field); this.cMB(qeP, tUh, KtZ, "CLASS"); }, iUw: function(bdt, OtQ, AmD) { var jgw = this.fmY; bdt = (bdt) ? bdt : ""; OtQ = (OtQ) ? OtQ : ""; var Evi = this.lAP.Ovj; Evi.Dph.VKq(bdt, jgw, AmD); Evi.Cml.VKq(OtQ, jgw, AmD); if (this.lAP.Lsb == Lightstreamer.Fet || this.lAP.Lsb == Lightstreamer.gLk) { if (AmD != "CLASS") { if (!Evi.aqL.bqs(jgw, AmD)) { Evi.aqL.VKq(1, jgw, AmD); } } } } }; Lightstreamer.RowInfo = function() { }; Lightstreamer.RowInfo.prototype = { Dxu: function(DiM, GhI, roG) { this.lAP = DiM; this.GhI = GhI; if (roG) { this.roG = roG; } else { this.roG = this.lAP.FeA[GhI]; } }, getServerValue: function(field) { var SVg = field; var oPP = this.lAP.Ovj; var qeP = this.lAP.XoR.qFa(SVg); var qSJ = this.lAP.fFI[qeP]; if (qSJ == null) { return null; } var utD = oPP.VtD.bqs(this.roG, qSJ); if (!utD) { return null; } return utD; }, getCellValue: function(field) { var SVg = field; var oPP = this.lAP.Ovj; var qeP = this.lAP.XoR.qFa(SVg); var qSJ = this.lAP.fFI[qeP]; if (qSJ == null) { return null; } var ZSQ = oPP.ejE.bqs(this.roG, qSJ); if (ZSQ === null) { return oPP.nBE.bqs(this.roG, qSJ); } return ZSQ; }, getNumFields: function() { this.wae.CVC("Not implemented", "getNumFields"); return 0; } }; Lightstreamer.SUm = function() { }; Lightstreamer.SUm.prototype = { oqZ: function(pSX, FOh, MkF) { var YmE = "Lightstreamer|temp|id"; var TbD = 0; while (document.getElementById(YmE) && TbD < 100) { YmE += Lightstreamer.aIL(); TbD++; } if (FOh) { document.write("<" + MkF + " id='" + YmE + "' class='" + FOh + "'>" + pSX + "</" + MkF + ">"); } else { document.write("<" + MkF + " id='" + YmE + "'>" + pSX + "</" + MkF + ">"); } var XaK = document.getElementById(YmE); XaK.removeAttribute("id"); return new Lightstreamer.BLQ(XaK); }, RTe: function(knL) { var VLi = this.NmP(knL).UwS(); for (var fmY in VLi) { var TYn = VLi[fmY]; var Rvv = false; for (var SVg in TYn) { var oVP; var TqQ = TYn[SVg]; var ShJ = TqQ.RUL(); if (ShJ) { Rvv = true; } else { delete TYn[SVg]; } } if (!Rvv) { delete VLi[fmY]; } } }, OIB: function(oVR, GhI, lMn, WmC, jhC, Odq, jek) { var VQa = this; return function() { VQa.FJr(oVR, GhI, lMn, WmC, jhC, Odq, jek); }; }, FqJ: function(oVR, lMn, WmC, jhC, YJl, wOa) { var VQa = this; return function() { VQa.RbN(oVR, lMn, WmC, jhC, YJl, wOa); }; }, PKr: function(BVt, Vev) { if (BVt["CLASS"]) { return BVt; } else { for (var AmD in Vev) { if (!BVt[AmD]) { BVt[AmD] = Vev[AmD]; } } return BVt; } }, FJr: function(oVR, GhI, lMn, WmC, SVg, Odq, jek) { if (Lightstreamer.KbK) { return; } var DiM = this.pqP[oVR]; var ngb = DiM.Ovj; if (!DiM || DiM.bDI) { return; } if (jek != DiM.jek) { return; } if ((DiM.Lsb == Lightstreamer.Fet || DiM.Lsb == Lightstreamer.gLk) && DiM && DiM.FeA) { lMn = DiM.FeA[WmC]; } var pSX = null; var fmY = lMn; var qSJ = DiM.fFI[SVg]; if (qSJ == null) { return; } if (DiM.Lsb == Lightstreamer.PXe) { var wZl = ngb.QRl(fmY, qSJ); if (wZl) { pSX = wZl.HoD; wZl.HoD = null; } } var AYD = false; if (pSX == null) { var voV = DiM.GEI.bqs(GhI, SVg); if (voV == null) { if (!Odq) { return false; } else { pSX = ngb.nBE.bqs(lMn, qSJ); AYD = true; } } else { pSX = voV; } } DiM.kbv.EAA(GhI, SVg); var ipd = pSX; if (ipd == "") { ipd = Lightstreamer.nSq; } var oZh = ngb.iRA.lLS(lMn); this.nlr(oVR, fmY, qSJ, ipd, Lightstreamer.uKo, oZh, AYD); return true; }, nlr: function(oVR, lMn, qSJ, pSX, aYP, qWE, cGZ) { if (Lightstreamer.KbK) { return; } var ngb = this.NmP(oVR); var GdF = cGZ ? true : ngb.GdF; var wZl = ngb.QRl(lMn, qSJ); if (wZl == null) { return true; } var KXR = null; var QKo = null; if (aYP == Lightstreamer.uKo) { KXR = wZl.cHv; wZl.cHv = null; } else if (aYP == Lightstreamer.Dum || aYP == Lightstreamer.pXR) { KXR = wZl.Hoh; wZl.Hoh = null; wZl.cHv = null; } if (aYP == Lightstreamer.pXR) { var JGK = ngb.eHs.bqs(lMn, qSJ); if (KXR == null && JGK) { KXR = {}; KXR["CLASS"] = JGK; } else if (JGK) { KXR["CLASS"] = JGK; } } if (KXR != null) { KXR = this.PKr(KXR, qWE); } else if (qWE) { KXR = qWE; } if (KXR != null) { if (typeof KXR["CLASS"] != "undefined") { QKo = KXR["CLASS"]; } } if (wZl.bdK) { wZl.cfP.value = pSX; } else if (GdF) { wZl.cfP.innerHTML = pSX; } else { if (wZl.cfP.childNodes.length != 1 || wZl.cfP.firstChild.nodeType != 3) { if (wZl.cfP.firstChild != null) { wZl.cfP.innerHTML = ""; } wZl.cfP.appendChild(document.createTextNode(pSX)); } else { wZl.cfP.firstChild.nodeValue = pSX; } } if (QKo != null && wZl.cfP.className != QKo) { wZl.cfP.className = QKo; } for (var KNq in KXR) { if (KNq == "CLASS") { continue; } wZl.cfP.style[KNq] = KXR[KNq]; } return true; }, RbN: function(oVR, lMn, WmC, qSJ, YJl, nlG) { if (Lightstreamer.KbK) { return; } var Zkl = this.NmP(oVR); var DiM = this.pqP[oVR]; if ((DiM.Lsb == Lightstreamer.Fet || DiM.Lsb == Lightstreamer.gLk) && DiM && DiM.FeA) { lMn = DiM.FeA[WmC]; } var wZl = Zkl.QRl(lMn, qSJ); if (wZl == null) { return; } if (wZl.nlG != nlG) { return; } var qWE = null; if (YJl) { qWE = Zkl.iRA.lLS(lMn); } else { qWE = Zkl.MeM.lLS(lMn); } var KXR = null; var QKo = null; if (YJl) { KXR = wZl.cHv; wZl.cHv = null; } else { KXR = wZl.Hoh; wZl.Hoh = null; } if (KXR != null) { KXR = this.PKr(KXR, qWE); } else if (qWE) { KXR = qWE; } if (KXR != null) { if (typeof KXR["CLASS"] != "undefined") { QKo = KXR["CLASS"]; } } else { return true; } if (QKo != null && wZl.cfP.className != QKo) { wZl.cfP.className = QKo; } for (var KNq in KXR) { wZl.cfP.style[KNq] = KXR[KNq]; } return true; } }; Lightstreamer.svV(Lightstreamer.WDE, Lightstreamer.SUm); Lightstreamer.ves = function(wZl, oBj, rsk, Ica, jMk, JgP, sCj) { this.Dxu(wZl, oBj, rsk, Ica, jMk, JgP, sCj); }; Lightstreamer.ves.prototype = { Dxu: function(wZl, oBj, rsk, Ica, jMk, JgP, sCj) { this.sCj = (sCj) ? sCj : null; this.oBj = oBj; this.wZl = wZl; this.rsk = (rsk) ? Lightstreamer.bGT.rPF(rsk) : null; this.Ica = (Ica) ? Lightstreamer.bGT.rPF(Ica) : null; this.jMk = jMk; this.JgP = JgP; this.JtY = 0; } }; Lightstreamer.jUQ = function() { this.length = 0; this.HlZ = {}; }; Lightstreamer.jUQ.prototype = { vfB: function(knL) { this.HlZ[this.length] = knL; this.length++; }, bqs: function() { if (this.length <= 0) { return null; } this.length--; return this.HlZ[this.length]; } }; Lightstreamer.qZv = function(QIk) { this.KRg = QIk; this.hfM = new Lightstreamer.jUQ(); this.Stb = 0; this.lmK = {}; this.Tvb = false; this.Voa = {}; }; Lightstreamer.qZv.prototype = { uPj: function(wZl, oBj, rsk, Ica, iQm, sCj) { var jMk = this.kSl(iQm); var fnD = ++wZl.fZU; var mPT = this.hfM.bqs(); if (mPT == null) { this.lmK[this.Stb] = new Lightstreamer.ves(wZl, oBj, rsk, Ica, jMk, fnD, sCj); return this.Stb++; } else { this.lmK[mPT].Dxu(wZl, oBj, rsk, Ica, jMk, fnD, sCj); return mPT; } }, kSl: function(bix) { var jMk = bix / this.KRg; return (jMk > 1) ? jMk : 1; }, jYH: function(knL) { if (Lightstreamer.KbK) { return; } var QQN = this.lmK[knL]; if (QQN.JgP < QQN.wZl.fZU) { return; } var Bed = this.Voa[QQN.wZl.Nlg]; var Cbb = this.lmK[Bed]; if (Cbb) { if (!Cbb.oBj) { if (QQN.oBj) { if (Cbb.sCj != null) { Cbb.sCj(); } } else { QQN.JtY = Cbb.JtY; if (QQN.jMk < Cbb.jMk) { QQN.jMk = Cbb.jMk; } } } this.hfM.vfB(Bed); } this.Voa[QQN.wZl.Nlg] = knL; if (QQN.rsk) { QQN.FZp = Lightstreamer.bGT.Jkj(QQN.wZl.cfP, "backgroundColor"); } if (QQN.Ica) { QQN.Clm = Lightstreamer.bGT.Jkj(QQN.wZl.cfP, "color"); } if (!this.Tvb) { this.stP(this.KRg); } }, NUU: function(wZl) { var Bed = this.Voa[wZl.Nlg]; if (Bed) { delete (this.Voa[wZl.Nlg]); this.hfM.vfB(Bed); } }, QFh: function(xYF) { if (Lightstreamer.KbK) { return; } var WPG = new Date().getTime(); var ZTu = 0; if (xYF) { ZTu = WPG - (xYF + this.KRg); } var BeE = false; var vpQ = []; for (var xmH in this.Voa) { var iYQ = this.Voa[xmH]; var QQN = this.lmK[iYQ]; if (QQN.JtY > QQN.jMk) { this.hfM.vfB(iYQ); delete (this.Voa[xmH]); if (QQN.sCj != null) { vpQ.push(QQN.sCj); } } else { if (QQN.rsk) { QQN.wZl.cfP.style.backgroundColor = "rgb(" + this.ere(QQN.FZp[0], QQN.rsk[0], QQN.jMk, QQN.JtY) + "," + this.ere(QQN.FZp[1], QQN.rsk[1], QQN.jMk, QQN.JtY) + "," + this.ere(QQN.FZp[2], QQN.rsk[2], QQN.jMk, QQN.JtY) + ")"; } if (QQN.Ica) { QQN.wZl.cfP.style.color = "rgb(" + this.ere(QQN.Clm[0], QQN.Ica[0], QQN.jMk, QQN.JtY) + "," + this.ere(QQN.Clm[1], QQN.Ica[1], QQN.jMk, QQN.JtY) + "," + this.ere(QQN.Clm[2], QQN.Ica[2], QQN.jMk, QQN.JtY) + ")"; } BeE = true; } QQN.JtY++; } if (vpQ.length > 0) { setTimeout(Lightstreamer.Chv(vpQ), 1); } if (!BeE) { this.Tvb = false; } else { var WuG = new Date().getTime(); var TKY = (WuG - WPG); var xiO = TKY + ZTu; if (xiO > this.KRg) { var xaR = xiO / this.KRg; var AlM = Math.floor(xaR); var NLA = xaR - AlM; this.pfb(AlM); xiO = this.KRg * NLA; } this.SBB(this.KRg - xiO, WuG); } }, SBB: function(FDZ, xYF) { var VQa = this; setTimeout(function() { VQa.QFh(xYF); }, FDZ); }, pfb: function(AlM) { for (var xmH in this.Voa) { var iYQ = this.Voa[xmH]; var QQN = this.lmK[iYQ]; if (QQN.JtY > QQN.jMk) { } else if (QQN.JtY + AlM < QQN.jMk) { QQN.JtY += AlM; } else { QQN.JtY = QQN.jMk; } } }, stP: function(ppN) { if (this.Tvb == true) { return; } this.Tvb = true; this.SBB(ppN); }, ere: function(DYP, tiV, EpC, CUP) { DYP = new Number(DYP); tiV = new Number(tiV); var dPU = tiV - DYP; var pli = DYP + (((1 / EpC) * CUP) * dPU); return Math.ceil(pli); }, vMe: function(RwN) { var VQa = this; return function() { VQa.jYH(RwN); }; } }; Lightstreamer.PMQ = function(ssI, bgColor, Rmi, lnP, sCj) { var jYO; if (typeof sCj == "string") { jYO = function() { eval(sCj); }; } else { jYO = sCj; } var qZK = new Lightstreamer.BLQ(ssI); var RwN = Lightstreamer.IIX.uPj(qZK, false, bgColor, Rmi, lnP, jYO); Lightstreamer.IIX.jYH(RwN); }; Lightstreamer.mBA = function() { this.qwR = {}; this.wae = Lightstreamer.QcC.getLogger("ER"); }; Lightstreamer.mBA.prototype = { QwZ: function(DpK) { if ((DpK >= 0) && (DpK <= 9)) { return new Number(DpK); } DpK = DpK.toUpperCase(); if (DpK == "A") { return 10; } else if (DpK == "B") { return 11; } else if (DpK == "C") { return 12; } else if (DpK == "D") { return 13; } else if (DpK == "E") { return 14; } else if (DpK == "F") { return 15; } else { this.wae.PhQ("A hexadecimal number must contain numbers between 0 and 9 and letters between A and F. " + DpK + " is not a valid value", "setStyle"); return null; } }, rPF: function(pSX) { if (pSX.indexOf("rgb") == 0) { return this.pGH(pSX); } else if (pSX.indexOf("#") == 0) { return this.dZo(pSX); } else { return this.ZPo(pSX); } }, waK: function(VsP) { var huN = 0; var wNS = 0; var CtU; for (CtU = VsP.length; CtU >= 1; CtU--) { var DMa = this.QwZ(VsP.substring(CtU - 1, CtU)); if (DMa == null) { return null; } var x; for (x = 1; x <= wNS; x++) { DMa *= 16; } wNS++; huN += DMa; } return huN; }, dZo: function(tIk) { if (tIk.indexOf("#") == 0) { tIk = tIk.substring(1, tIk.length); } if (tIk.length != 6) { this.wae.PhQ("A hexadecimal color value must be 6 character long. " + tIk + " is not a valid color", "setStyle"); return null; } var AMZ = tIk.substring(0, 2); var QOZ = tIk.substring(2, 4); var jjK = tIk.substring(4, 6); Icj = this.waK(AMZ); DxT = this.waK(QOZ); lsZ = this.waK(jjK); if (Icj == null || DxT == null || lsZ == null) { return null; } return [Icj, DxT, lsZ]; }, prR: function(gSL) { var eHY = document.createElement("DIV"); eHY.style.backgroundColor = gSL; var pSX = this.Jkj(eHY, "backgroundColor", gSL); if (pSX[0] == 255 && pSX[1] == 255 && pSX[2] == 255) { if (gSL.toUpperCase() != "WHITE") { var eZJ = document.getElementsByTagName("BODY")[0]; if (eZJ) { eZJ.appendChild(eHY); pSX = this.Jkj(eHY, "backgroundColor", gSL); eZJ.removeChild(eHY); } } } this.qwR[gSL] = pSX; return this.qwR[gSL]; }, ZPo: function(gSL) { var huN = ""; if (this.qwR[gSL]) { return this.qwR[gSL]; } if (!Lightstreamer.bfJ()) { return this.prR(gSL); } else { huN = Lightstreamer.fUO.kGn(gSL); } if (!huN || huN == "" || huN == gSL) { var FmP = document.bgColor; document.bgColor = gSL; huN = document.bgColor; document.bgColor = FmP; } if (!huN || huN == "" || huN == gSL) { return this.prR(gSL); } this.qwR[gSL] = this.dZo(huN); return this.qwR[gSL]; }, pGH: function(CcV) { var QoH; var fnk; if (CcV.indexOf("rgb(") == 0) { QoH = 4; fnk = ")"; } else if (CcV.indexOf("rgba(") == 0) { QoH = 5; fnk = ","; } else { this.wae.PhQ("An RGB color value must be in the form 'rgb(x, y, z)' or 'rgba(x, y, z, a)'. " + CcV + " is not a valid value", "setStyle"); return null; } CcV = CcV.substring(QoH, CcV.length); var FSM = CcV.indexOf(","); var Icj = CcV.substring(0, FSM); var UkY = CcV.indexOf(",", FSM + 1); var DxT = CcV.substring(FSM + 1, UkY); var PYU = CcV.indexOf(fnk, UkY + 1); var lsZ = CcV.substring(UkY + 1, PYU); return [Icj, DxT, lsZ]; }, Jkj: function(eHY, jet, JLV) { if (eHY == null) { return [255, 255, 255]; } var pSX = ""; try { if (window.getComputedStyle || (document.defaultView && document.defaultView.getComputedStyle)) { var JYG = document.defaultView.getComputedStyle(eHY, null); if (JYG) { var Fcn = jet == "backgroundColor" ? "background-color" : jet; pSX = JYG.getPropertyValue(Fcn); } } } catch (lSX) { } try { if (!this.kQB(pSX, JLV) && eHY.currentStyle) { var cBS = jet == "background-color" ? "backgroundColor" : jet; pSX = eHY.currentStyle[cBS]; } } catch (lSX) { } try { if (!this.kQB(pSX, JLV)) { var JOV = jet == "background-color" ? "backgroundColor" : jet; if (eHY.style[JOV] != "") { pSX = eHY.style[JOV]; } else { return [255, 255, 255]; } } } catch (lSX) { } if (pSX == "transparent" && eHY.parentNode) { return this.Jkj(eHY.parentNode, jet); } else if (pSX == "transparent") { return [255, 255, 255]; } if (!this.kQB(pSX, JLV)) { return [255, 255, 255]; } return this.rPF(pSX); }, kQB: function(pHc, JLV) { if (!pHc || pHc == "") { return false; } else if (!JLV) { return true; } else if (pHc != JLV) { return true; } else { return false; } } }; Lightstreamer.DwA = function() { }; Lightstreamer.DwA.prototype = { Dxu: function() { this.length = 0; this.jKV = {}; if (!this.ILX) { this.dWS = {}; } } }; Lightstreamer.nXS = function(TdV, PKk, LPg) { this.uAp(Lightstreamer.nXS); this.MOG = TdV; this.Mdr = PKk; this.xLM = LPg; this.ILX = true; this.Dxu(); }; Lightstreamer.nXS.prototype = { removeChild: function(TdV) { if (this.length <= 0) { return; } this.length--; delete (this.jKV[TdV.knL]); this.MOG.removeChild(TdV.ExG()); TdV.parentNode = null; }, insertBefore: function(pkC, TdV) { if (TdV == pkC) { return; } if (!pkC) { return; } if (!TdV) { this.appendChild(pkC); return; } if (this.jKV[TdV.knL] == null) { this.appendChild(pkC); return; } this.xBX(pkC); this.MOG.insertBefore(pkC.ExG(), TdV.ExG()); }, appendChild: function(TdV) { if (!TdV) { return; } this.xBX(TdV); if (!this.Mdr) { this.MOG.appendChild(TdV.ExG()); } else { this.MOG.insertBefore(TdV.ExG(), this.Mdr); } }, xBX: function(TdV) { if (TdV.parentNode == this) { return; } this.length++; this.jKV[TdV.knL] = TdV; if (TdV.parentNode) { TdV.parentNode.removeChild(TdV); } TdV.parentNode = this; }, Uve: function(jgw) { if (this.length <= jgw) { return null; } jgw += this.xLM; var VfP = this.MOG.childNodes[jgw].getAttribute("id"); return this.getElementById(VfP); }, getElementById: function(knL) { return this.jKV[knL]; }, uBu: function() { if (this.MOG) { delete (this.MOG); } if (this.Mdr) { delete (this.Mdr); } for (var CtU in this.jKV) { this.jKV[CtU].uBu(); } } }; Lightstreamer.svV(Lightstreamer.nXS, Lightstreamer.DwA); Lightstreamer.Yac = function() { this.uAp(Lightstreamer.Yac); this.ILX = false; this.Dxu(); }; Lightstreamer.Yac.prototype = { removeChild: function(TdV) { if (this.length <= 0) { return; } this.length--; var jgw = this.jKV[TdV.knL]; var LMN; for (LMN = jgw; LMN < this.length; LMN++) { this.dWS[LMN] = this.dWS[LMN + 1]; this.jKV[this.dWS[LMN].knL] = LMN; } this.jKV[TdV.knL] = null; this.dWS[this.length] = null; TdV.parentNode = null; }, insertBefore: function(pkC, TdV) { if (TdV == pkC) { return; } if (!pkC) { return; } if (!TdV) { this.appendChild(pkC); return; } if (this.jKV[TdV.knL] == null) { this.appendChild(pkC); return; } if (pkC.parentNode) { pkC.parentNode.removeChild(pkC); } var vlq = this.jKV[TdV.knL]; for (LMN = this.length; LMN >= vlq + 1; LMN--) { this.dWS[LMN] = this.dWS[LMN - 1]; this.jKV[this.dWS[LMN].knL] = LMN; } this.xBX(pkC, vlq); }, appendChild: function(TdV) { if (!TdV) { return; } if (TdV.parentNode) { TdV.parentNode.removeChild(TdV); } var jgw = this.length; this.xBX(TdV, jgw); }, xBX: function(TdV, jgw) { this.length++; this.jKV[TdV.knL] = jgw; this.dWS[jgw] = TdV; TdV.parentNode = this; TdV.jHS(); }, Uve: function(jgw) { return this.dWS[jgw]; }, getElementById: function(knL) { return this.dWS[this.jKV[knL]]; }, uBu: function() { for (var CtU in this.dWS) { this.dWS[CtU].uBu(); } } }; Lightstreamer.svV(Lightstreamer.Yac, Lightstreamer.DwA); Lightstreamer.Dxl = function(hIi, kCo, gxL, keyCode) { this.knL = "a|" + hIi + "|" + gxL; this.oVR = hIi; this.GhI = gxL; this.keyCode = keyCode; this.sRS = kCo; this.parentNode = null; this.TdV = null; }; Lightstreamer.Dxl.prototype = { jHS: function() { if (this.TdV == null) { return; } }, ExG: function() { if (this.TdV != null) { return this.TdV; } var oPP = Lightstreamer.rCG.NmP(this.oVR); this.TdV = oPP.WUT.cloneNode(true); this.TdV.setAttribute("id", this.knL); var gEJ = Lightstreamer.BLQ.gCq(this.TdV); for (var LMN = 0; LMN < gEJ.length; LMN++) { var TqQ = gEJ[LMN]; var FDJ = TqQ.cfP.getAttribute("FIELD"); if (!FDJ) { continue; } oPP.npv(TqQ, this.GhI, FDJ, oPP.Lsb); } return this.TdV; }, uBu: function() { if (this.TdV) { delete (this.TdV); } } }; Lightstreamer.Bjg = function(qBc, connection, context, policy, YwA) { this.FbN = qBc; this.oen = "The LightstreamerEngine instance is not available"; this.GMO = null; this.AHB = null; this.Lqp = null; this.onStatusChange; this.onServerError; this.onClientError; this.onClientAlert; this.context = new Lightstreamer.Context(context); this.context.parent = this; this.policy = new Lightstreamer.Policy(policy); this.policy.parent = this; this.connection = new Lightstreamer.Connection(connection); this.connection.parent = this; this.YwA = new Lightstreamer.Xek(YwA); this.YwA.parent = this; this.wae = Lightstreamer.QcC.getLogger("EH"); }; Lightstreamer.Bjg.prototype = { VSe: function(jea) { if (Lightstreamer.kRs.Iin) { return true; } else { this.wae.CVC(this.oen, jea); return false; } }, rSb: function(jea) { if (this.VSe(jea)) { try { return this.FbN[jea](); } catch (lSX) { this.wae.nKI(lSX, jea); this.wae.PhQ(this.oen, jea); setTimeout(Lightstreamer.EoJ(Lightstreamer.kRs.sfW, Lightstreamer.kRs), 1); } } return null; }, qZw: function(DLx) { this.Lqp = DLx; }, Qxf: function(GMO, AHB) { this.GMO = GMO; this.AHB = AHB; }, changeStatus: function(FXe) { var iov = Lightstreamer; if (!(FXe == iov.JsO || FXe == iov.sgl || FXe == iov.rgV)) { this.wae.CVC("Please use one of: POLLING, STREAMING, DISCONNECTED", "changeStatus"); return; } if (this.VSe("changeStatus")) { this.wae.log("changeStatus", FXe); Lightstreamer.kRs.NLu('ldx', FXe); } }, ZMm: function() { this.changeStatus(Lightstreamer.JsO); }, NPn: function() { this.changeStatus(Lightstreamer.sgl); }, Arg: function() { this.changeStatus(Lightstreamer.rgV); }, getStatus: function() { if (this.VSe("getStatus")) { return this.Lqp; } else { return null; } }, getApplicationName: function() { if (this.VSe("getApplicationName")) { return Lightstreamer.ldq.iho; } else { return null; } }, getSessionServerName: function() { if (this.VSe("getSessionServerName")) { return this.GMO; } else { return null; } }, getSessionServerAddress: function() { if (this.VSe("getSessionServerAddress")) { return this.AHB; } else { return null; } }, getPushPages: function() { var pages = this.rSb("getPushPages"); if (pages == null) { return []; } }, sendMessage: function(uJm, IxL, RUp, ppN) { if (this.VSe("sendMessage")) { if (RUp) { RUp = Lightstreamer.rCG.PCB(RUp); } if (!Lightstreamer.kRs.uRc) { return false; } if (!IxL && IxL != 0) { IxL = ""; } else if (!Lightstreamer.bEl.test(IxL)) { this.wae.CVC("The given sequence name(" + IxL + ") is not valid: use only alphanumeric characters or null", "sendMessage"); return false; } if ((ppN && isNaN(ppN)) || ppN == "") { this.wae.CVC("The given timeout(" + ppN + ") is not valid: use a number or null", "sendMessage"); return false; } Lightstreamer.kRs.PCk('dBQ', { uJm: uJm, IxL: IxL, RUp: RUp, ppN: ppN }); return true; } return false; }, khT: function() { if (this.VSe('khT')) { Lightstreamer.kRs.qof('khT'); } } }; Lightstreamer.FnV = function(iNf, QWE) { this.QWE = QWE; this.iNf = iNf; Lightstreamer.hIT("unload", Lightstreamer.EoJ(this.gRS, this)); }; Lightstreamer.FnV.prototype = { gRS: function() { try { this.iNf.removeChild(this.QWE); delete (VQa.QWE); delete (VQa.iNf); } catch (lSX) { } } }; Lightstreamer.dXg = function() { this.iVu = null; this.MKY = false; this.Kpb = null; this.Wox = 0; this.jjd = 0; this.wae = Lightstreamer.QcC.getLogger("EW"); }; Lightstreamer.dXg.prototype = { Dbi: function(FZX, WTI, JgP) { if (this.jjd != JgP) { this.wae.log('Dbi', 0); return; } var Xnc = false; var LSc = null; if (Lightstreamer.kRs.Iin) { this.wae.log('Dbi', 1); return; } if (!FZX) { this.wae.log('Dbi', 5); return; } this.Wox++; Xnc = !this.BdL(FZX); if (!Xnc) { if (FZX.Lightstreamer.fUO) { LSc = FZX.Lightstreamer.fUO; } else { if (FZX.NIe) { LSc = FZX.NIe; } else { this.wae.log('Dbi', 6); Xnc = true; } } } if (!Xnc) { if (!LSc) { this.wae.log('Dbi', 8); Xnc = true; } if (!LSc.jXN) { this.wae.log('Dbi', 7); } else { if (LSc.tWG == true) { Lightstreamer.fUO.Mko = false; Lightstreamer.fUO.tWG = true; if (Lightstreamer.fUO.jXN() == null) { this.wae.cst("This Push-page can't receive real-time data because the corresponding engine could not start"); } else { this.wae.EPl(false, 'Dbi'); } this.wae.log('Dbi', 4); return; } var nPu = LSc.jXN(); if (nPu == null) { this.wae.log('Dbi', 2); Xnc = true; } else { this.wae.log('Dbi', 3); WTI.jiW = nPu; Lightstreamer.fUO.DKM = false; } } } if (Xnc) { setTimeout(this.LCG(FZX, WTI, JgP), this.Wox <= 30 ? 1000 : 10000); } }, tNj: function(FZX, WTI) { this.jjd++; this.Wox = 0; this.Dbi(FZX, WTI, this.jjd); }, LCG: function(FZX, WTI, JgP) { var VQa = this; return function() { VQa.Dbi(FZX, WTI, JgP); }; }, BdL: function(FZX) { try { if (FZX.Lightstreamer) { } this.wae.log('BdL', 0); return true; } catch (lSX) { this.wae.nKI(lSX, 'BdL', document.domain); return false; } }, FiV: function() { if (Lightstreamer.kcP.tvr()) { return true; } if (Lightstreamer.vOS() && (document.readyState.toUpperCase() == "LOADING" || document.readyState.toUpperCase() == "UNINITIALIZED")) { return true; } if (Lightstreamer.NIS(7, true) && (document.readyState.toUpperCase() == "LOADING" || document.readyState.toUpperCase() == "UNINITIALIZED" || document.readyState.toUpperCase() == "INTERACTIVE")) { return true; } return false; }, esS: function() { var qMn = Lightstreamer.aIL(); this.iVu = "LS__" + qMn; this.wae.log('esS', this.iVu); }, MwX: function() { if (this.Kpb !== null) { this.wae.log('MwX', this.Kpb); return this.Kpb; } this.Kpb = false; if (Lightstreamer.vOS()) { this.wae.log('MwX', 1); this.Kpb = true; } else if (window.opera) { if (Lightstreamer.NIS(7, true)) { this.wae.log('MwX', 2); this.Kpb = true; } else { if (Lightstreamer.NIS(7.9, true)) { this.wae.log('MwX', 3); this.Kpb = true; } else { this.wae.log('MwX', 4); } } } else if (Lightstreamer.IKL()) { this.Kpb = true; this.wae.log('MwX', 5); return true; } this.wae.log('MwX', 6, this.Kpb); return this.Kpb; }, qrx: function() { if (!this.MKY && this.MwX() && Lightstreamer.kcP.egf()) { this.wae.log('qrx', 1); this.esS(); this.iBN(); return true; } this.wae.log('qrx', 2); return false; }, iBN: function() { this.wae.log('iBN', 1); document.writeln("<iframe src='about:blank' name='" + this.iVu + "' style='visibility:hidden;height:1px;'></iframe>"); this.MKY = true; }, iRQ: function() { if (!document.getElementsByTagName) { return false; } if (this.MKY) { this.wae.log('iRQ', 7); return false; } var jMb = Lightstreamer.NIS(9, false) ? Lightstreamer.ldq.jcb + Lightstreamer.bQj : "about:blank"; this.wae.log('iRQ', 6, jMb); this.esS(); var JEm = document.getElementsByTagName("BODY")[0]; if (!JEm) { this.wae.PhQ("The createEngine() method should be called in the BODY part of the page, not in the HEAD", "createEngine"); return false; } var QWE; try { QWE = document.createElement("iframe"); QWE.style.visibility = "hidden"; QWE.style.height = "0px"; QWE.style.width = "0px"; QWE.name = this.iVu; if (Lightstreamer.bfJ()) { QWE.src = Lightstreamer.ldq.AvZ; JEm.appendChild(QWE); } else { JEm.appendChild(QWE); QWE.src = Lightstreamer.ldq.AvZ; } this.MKY = new Lightstreamer.FnV(JEm, QWE); } catch (lSX) { this.wae.nKI(lSX, 'iRQ', 5); return null; } try { if (QWE.contentWindow) { this.wae.log('iRQ', 1); QWE.contentWindow.name = this.iVu; return QWE.contentWindow; } else if (document.frames && document.frames[this.iVu]) { this.wae.log('iRQ', 2); return document.frames[this.iVu]; } else { this.wae.log('iRQ', 3); return self; } } catch (lSX) { this.wae.nKI(lSX, 'iRQ', 4); return self; } } }; Lightstreamer.PushPage = function() { this.context = Lightstreamer.HjO; this.uCQ = null; this.suY = window; this.WPk = 2000; this.jcb = null; this.PsX = null; this.IgR = false; this.hqM = 0; this.NIe = Lightstreamer.fUO; this.FLC = 0; this.MlE = Lightstreamer.Cve; this.VSu = true; this.UOs = 0; this.Wit = false; this.fFm = 0; this.NLD = false; this.FXG = null; this.PCC = 0; this.BWh = "The application name is missing"; this.Mfq = "createEngine() has already been called"; this.Jim = true; this.AvZ = null; this.iho = null; this.jiW = null; this.rCG = Lightstreamer.rCG; this.ACk = null; this.LEa = null; this.wae = Lightstreamer.QcC.getLogger("PP"); this.LdV = Lightstreamer.QcC.getLogger("TL"); }; Lightstreamer.PushPage.prototype = { xQx: Lightstreamer.BZa, isMasterPushPage: function() { return Lightstreamer.kRs.esY; }, onEngineLost: function() { return; }, setCheckEngineTimeout: function(RqV) { this.NIe.RqV = this.xQx(RqV, "setCheckEngineTimeout", RqV, true, 1); }, setControlRequestTimeout: function(ppN) { this.rCG.JTm = this.xQx(ppN, "setControlRequestTimeout", this.rCG.JTm, true, 1); }, useFragmentToConfEngine: function(UUU) { this.Jim = UUU !== false; }, getTable: function(id) { var knL = Lightstreamer.AsQ(id); var oVR = this.rCG.pqP[knL]; if (oVR) { if (oVR.bDI) { if (this.rCG.IVQ[knL] && !this.rCG.IVQ[knL].bDI) { oVR = this.rCG.IVQ[knL]; } } if (oVR && oVR.Lsb !== Lightstreamer.fBP) { return oVR; } } return null; }, getTables: function() { var dWS = {}; for (var id in this.rCG.pqP) { var Umj = this.rCG.pqP[id]; if (!Umj.bDI && Umj.Lsb !== Lightstreamer.fBP) { dWS[Umj.getId()] = Umj; } } for (var id in this.rCG.IVQ) { var Umj = this.rCG.IVQ[id]; if (Umj && !Umj.bDI && Umj.Lsb !== Lightstreamer.fBP) { dWS[Umj.getId()] = Umj; } } return dWS; }, CFQ: function(ZiO, id, flI) { if (ZiO.TVm || (ZiO.vbn != null && ZiO.vbn != id)) { this.wae.PhQ("Can't add a table that is already in 'running' state. Please add the table instance only once [" + id + "]", "addTable"); return null; } if (Lightstreamer.ldq == null) { this.wae.PhQ("Can't add a table if PushPage is not bound. Please call the bind() method of PushPage before adding tables", "addTable"); return null; } if (ZiO.pvX != "COMMAND" && ZiO.pvX != "MERGE" && ZiO.pvX != "DISTINCT" && ZiO.pvX != "RAW") { this.wae.PhQ(ZiO.pvX + " is not a valid subscription mode. Admitted values are MERGE, DISTINCT, RAW, COMMAND", "addTable"); return null; } var knL = Lightstreamer.AsQ(id); this.LdV.log('CFQ', 0, ZiO, knL); var eEL = true; var GGc = this.rCG.pqP[knL]; if (GGc) { eEL = GGc.kJn; GGc = this.UAM(id, eEL); this.LdV.log('CFQ', 1, ZiO.bsD); var IkQ = this.rCG.pqP[knL]; ZiO.YBc(IkQ); } if (!ZiO.LiY(knL)) { this.LdV.log('CFQ', 11); return null; } this.rCG.pqP[knL] = ZiO; if (!ZiO.bDI && flI) { var LLU = ZiO.dvk(id); if (!LLU) { this.LdV.log('CFQ', 10); return null; } } ZiO.gJl(id, ++this.FLC); if (ZiO.bsD && !eEL) { ZiO.gte(); } ZiO.jfR(); this.LdV.log('CFQ', 4, Lightstreamer.kRs); this.tOT(ZiO); if (!GGc || GGc.bDI) { GGc = null; } return GGc; }, tOT: function(ZiO, qPH, NVa) { if (ZiO.bDI) { return; } var kBd = Lightstreamer.kRs; if ((qPH && qPH != kBd.fXh) || !ZiO.TVm) { this.LdV.log('tOT', 1, ZiO.TVm, ZiO.eKN, qPH, kBd); if (ZiO.eKN) { ZiO.pwD(qPH); } return; } var RtG = Lightstreamer.rCG; if (ZiO.CaN || !kBd.uRc) { this.LdV.EPl(!RtG.FFx, 'tOT', 1); this.LdV.log('tOT', 2, ZiO.CaN, kBd.uRc); if (!kBd.uRc) { RtG.tGb(ZiO); } return; } var nEJ = NVa ? NVa * 2 : RtG.JTm; var CdX = { ZiO: ZiO, soP: ZiO.jgw, GCl: kBd.Jve, hvA: NVa && NVa > RtG.JTm }; ZiO.eKN = Lightstreamer.IcY(this.tOT, this)(ZiO, kBd.fXh, nEJ); ZiO.NMS = nEJ; if (!ZiO.TQS || !NVa) { if (NVa && !ZiO.TQS) { this.LdV.EPl(false, 'tOT', 2); } ZiO.TQS = RtG.AdO("add", ZiO, kBd.fXh); ZiO.TaE = kBd.fXh; CdX.uRm = RtG.AdO("delete", ZiO, kBd.fXh); this.LdV.log('tOT', 3); } CdX.pZE = ZiO.TQS; if (!NVa) { ZiO.dVR = null; ZiO.sQg++; this.LdV.log('tOT', 4, ZiO.sQg); } else { CdX.jUw = ZiO.dVR; this.LdV.log('tOT', 5, ZiO.dVR); } CdX.TSD = ZiO.sQg; kBd.nsE('VRW', CdX); }, lEv: function(ZiO, soP, jUw, TSD) { var AXr = Lightstreamer.rCG.pqP[soP]; if (!AXr || AXr != ZiO) { this.LdV.log('lEv', 1); return; } this.LdV.log('lEv', 2, soP, jUw, AXr.sQg, TSD); if (TSD != AXr.sQg) { return; } AXr.dVR = jUw; Lightstreamer.rCG.Vnm[jUw] = soP; this.tOT(AXr, Lightstreamer.kRs.fXh, Lightstreamer.rCG.JTm / 2); }, NHv: function(ONC) { this.LdV.log('NHv', ONC); knL = Lightstreamer.AsQ(ONC); if (!this.rCG.auf[knL]) { this.wae.PhQ("No such ScreenTableHelper to be deleted: " + ONC, 'NHv'); return; } delete (this.rCG.auf[knL]); }, UAM: function(id, Kiw) { var knL = Lightstreamer.AsQ(id); var DiM = this.rCG.pqP[knL]; this.LdV.log('UAM', 1, knL, Kiw); if (DiM) { var kBd = Lightstreamer.kRs; if (!DiM.bDI && kBd.Iin) { DiM.sQg++; if (DiM.dVR || DiM.dVR === 0) { this.LdV.log('UAM', 2, DiM.dVR); Lightstreamer.kRs.nsE('kEe', { jUw: DiM.dVR }); } else { this.LdV.log('UAM', 3, knL); Lightstreamer.kRs.nsE('kEe', { soP: knL, GCl: kBd.Jve }); } } var TbU = false; if (DiM.bDI) { if (this.rCG.IVQ[knL]) { this.LdV.log('UAM', 4, knL); DiM = this.rCG.IVQ[knL]; TbU = true; DiM.TVm = true; } } if (Kiw) { DiM.gte(); } var IkQ = new Lightstreamer.bbY(DiM.Lsb, DiM.GdF, DiM.kJn); IkQ.YBc = DiM.YBc; IkQ.YBc(DiM); DiM.qQE(); if (TbU) { delete (this.rCG.IVQ[knL]); } var GGc = DiM; this.rCG.pqP[knL] = IkQ; return (GGc.bDI) ? null : GGc; } else { return null; } }, onServerDeny: function(code, message, nrC, Wfx, LVg, hXu) { alert("Subscription Error.\n" + message + "(code " + code + ")."); }, onClientError: function(OMp) { return; }, onClientAlert: function(code, OMp) { setTimeout(function() { alert("Warning " + code + "\n" + OMp); }, 10); }, createEngine: function(applicationName, rIf, fOZ, IgR) { if (this.ERw) { this.wae.CVC(this.Mfq, "createEngine"); return; } if (!applicationName) { this.wae.CVC(this.BWh, "createEngine"); return; } else if (!Lightstreamer.bEl.test(applicationName)) { this.wae.CVC("The given engine name(" + applicationName + ") is not valid: use only alphanumeric characters", "createEngine"); return; } else if (!rIf) { this.wae.CVC("Cannot load the Engine without a path", "createEngine"); return; } else if (Lightstreamer.ldq == null) { this.wae.CVC("Can't create the Engine if PushPage is not bound. Please call the bind() method of PushPage before", "createEngine"); return; } else if (Lightstreamer.ldq != this) { this.wae.CVC("There should be only one instance of PushPage per each HTML page. Can't create the Engine if a different PushPage is bound. Please call the createEngine() of that PushPage", "createEngine"); return; } else if (fOZ != "SHARE_SESSION" && fOZ != "FAIL" && fOZ != "NEW_SESSION") { if (typeof fOZ != "undefined") { this.wae.CVC("onSimilarEngineFound must be one of: SHARE_SESSION, FAIL, NEW_SESSION.", "createEngine"); return; } fOZ = "NEW_SESSION"; } fOZ = fOZ.substr(0, 1); this.ERw = true; this.OxP(applicationName, rIf, fOZ, IgR, false); }, OxP: function(applicationName, rIf, fOZ, IgR, VPM) { this.NIe.Mko = fOZ == "S"; this.iho = applicationName; if (rIf.charAt(rIf.length - 1) != "/") { rIf += "/"; } this.jcb = rIf; this.PsX = fOZ; this.IgR = (IgR === true); rIf += "lsengine.html"; this.wae.log('OxP', Lightstreamer.ILZ, fOZ); if (Lightstreamer.ILZ && fOZ != "N") { var huN; if ((huN = this.Afw(fOZ, applicationName)) != false) { this.wae.log('OxP', 1, applicationName, fOZ); this.kUL(applicationName, rIf, fOZ, huN, VPM, this.IgR); this.Beq(this.iho, null); return false; } } this.wae.log('OxP', 0, applicationName, fOZ); this.JYi(rIf, applicationName, VPM, this.IgR, fOZ); return true; }, Afw: function(Xsd, applicationName, YXA) { var ktx = {}; ktx.aLx = 0; var MSc = false; var tMi = Lightstreamer.TcX(); var CoW = Lightstreamer.FdX("LS4_" + applicationName); if (!CoW) { this.wae.log('Afw', 1); return false; } for (var CtU = 0; CtU < CoW.length; CtU++) { var ZrX = Lightstreamer.FdX("LS4_" + CoW[CtU] + "_" + applicationName); this.wae.log('Afw', 2, CoW[CtU], ZrX); if (!ZrX || ZrX.length < 2) { this.Abr(CoW[CtU], applicationName); continue; } else if (Xsd == "S" && ZrX[1] != "S") { continue; } if (YXA && YXA[CoW[CtU]]) { if (ZrX[0] != YXA[CoW[CtU]]) { this.wae.log('Afw', 3, ZrX[0], YXA[CoW[CtU]]); return true; } this.wae.log('Afw', 4); continue; } var JML = Number(ZrX[0]) + Lightstreamer.YYX + 2000; var kar = JML - tMi; this.wae.log('Afw', 5, CoW[CtU], kar); if (kar <= -60000) { this.Abr(CoW[CtU], applicationName); continue; } if (kar < this.WPk) { kar = this.WPk; } ktx[CoW[CtU]] = ZrX[0]; MSc = true; ktx.aLx = ktx.aLx > kar ? ktx.aLx : kar; } if (MSc) { this.wae.log('Afw', 6, ktx); return ktx; } else { this.wae.log('Afw', 7); return false; } }, Abr: function(id, oMs) { Lightstreamer.DQu("LS4_" + id + "_" + oMs); Lightstreamer.wSH("LS4_" + oMs, id); }, Cuw: function() { if (this.Wit) { this.Abr(this.ACk, this.iho); } }, xEx: function(rZr) { var XlX = Lightstreamer.jnY("LS4_" + this.iho, this.ACk); if (rZr && !XlX) { return false; } var ZuF = Lightstreamer.FdX("LS4_" + this.ACk + "_" + this.iho); if (rZr && ZuF) { return false; } else if (ZuF && ZuF.length > 2) { this.wae.log('xEx', 1, ZuF); this.EbE(); } else { Lightstreamer.okV("LS4_" + this.ACk + "_" + this.iho, [Lightstreamer.TcX(), this.PsX]); } return true; }, XEF: function() { var VQa = this; this.LEa = setInterval(function() { VQa.xEx(); }, Lightstreamer.YYX); }, EbE: function() { if (this.LEa) { clearInterval(this.LEa); this.LEa = null; } }, JYi: function(ZvT, iho, VPM, IgR, fOZ) { var kBd = Lightstreamer.kRs; if (kBd.Iin) { return; } else if (kBd.dPd) { this.wae.log('JYi', 2); setTimeout(Lightstreamer.IcY(this.JYi, this)(ZvT, iho, VPM, IgR, fOZ), kBd.xZs); return; } this.niS(); this.ACk = Lightstreamer.aIL(); this.NIe.tWG = false; if (Lightstreamer.ILZ) { while (!this.xEx(true)) { this.ACk = Lightstreamer.aIL(); } this.XEF(); } var bAv = "?"; bAv += "build=1396"; if (this.Jim) { bAv += "#"; } else { bAv += "&"; } bAv += "id=" + this.ACk + "&"; if (Lightstreamer.pAj != null && Lightstreamer.pAj != "") { bAv += ("domain=" + Lightstreamer.pAj + "&"); } if (iho) { bAv += ("engineName=" + iho + "&"); } if (IgR) { bAv += "suppressDefaultStatusChangeHandler=true&"; } if (VPM && this.uCQ) { if (!this.uCQ.context.mWV) { bAv += ("debugAlerts=false&"); } if (!this.uCQ.context.ejJ) { bAv += ("remoteDebug=false&"); } } else { if (!this.context.mWV) { bAv += ("debugAlerts=false&"); } if (!this.context.ejJ) { bAv += ("remoteDebug=false&"); } } if (Lightstreamer.ObjectTree) { bAv += ("d=true&"); } this.AvZ = ZvT + bAv; this.jiW = self; this.Wit = true; this.fFm = 0; this.UOs++; kBd.Dxu(true); this.wae.log('JYi', 1, this.UOs); this.NiK(this.UOs); }, YZM: function(ppN) { var inc = 100; var GaF = Lightstreamer.TcX(); if (ppN && this.FXG) { inc += GaF - this.FXG - ppN; } this.FXG = GaF; ppN = ppN ? (ppN + inc > 5000 ? 5000 : ppN + inc) : 100; this.wae.log('YZM', 1, inc, ppN); var dwB = this.UOs; this.PCC++; setTimeout(Lightstreamer.IcY(this.NiK, this)(dwB, ppN), ppN); }, NiK: function(dwB, ppN) { if (ppN) { this.PCC--; } if (dwB != this.UOs || Lightstreamer.kRs.Iin) { this.wae.ZcB('NiK', 5); return; } this.TQB(); if (this.jiW == self) { this.wae.log('NiK', 1); this.YZM(ppN); return; } var ACs = this.NIe.bNo(); if (!ACs) { this.wae.log('NiK', 3); this.YZM(ppN); return; } this.wae.log('NiK', 4); this.UOs++; Lightstreamer.kRs.RXr(ACs, this.Wit); }, TQB: function() { if (Lightstreamer.KbK) { this.jiW = null; return; } if (this.jiW != self || this.NIe.tWG) { this.wae.EPl((this.jiW != self || this.NIe.tWG != true), 'TQB'); this.wae.log('TQB', 1); return; } if (this.VSu) { this.VSu = false; this.NIe.mso(); } if (!this.MlE.MKY) { if (this.MlE.MwX() && Lightstreamer.kcP.egf()) { this.wae.log('TQB', 2); this.MlE.qrx(); } else if (!Lightstreamer.kcP.egf() || !Lightstreamer.bfJ()) { var EpU = this.MlE.iRQ(); if (!EpU) { this.wae.log('TQB', 3); return; } else if (EpU != self) { this.jiW = EpU; this.NLD = true; this.wae.log('TQB', 4); return; } } } if (this.jiW == self && this.MlE.MKY) { if (Lightstreamer.IKL()) { try { if (window.frames[this.MlE.iVu]) { this.jiW = window.frames[this.MlE.iVu]; var Aec = this.jiW.location.toString(); this.wae.log('TQB', 8, Aec, this.AvZ); if (Aec.indexOf("lsengine.html") < 0) { this.jiW.location = this.AvZ; } } else { this.wae.log('TQB', 9); } return; } catch (lSX) { this.wae.nKI(lSX, 'TQB', 10); this.jiW = self; } } else { this.jiW = Lightstreamer.Kvb(this.AvZ, this.MlE.iVu); this.wae.log('TQB', 5); if (this.jiW == null && this.fFm <= 10) { this.fFm++; this.jiW = self; this.wae.log('TQB', 6); return; } } } this.wae.log('TQB', 7); }, seekEngine: function(applicationName, FZX) { if (this.ERw) { this.wae.CVC(this.Mfq, "seekEngine"); return; } if (!applicationName) { this.wae.CVC(this.BWh, "seekEngine"); return; } this.ERw = true; this.Beq(applicationName, FZX); }, Beq: function(applicationName, FZX) { var kBd = Lightstreamer.kRs; if (kBd.Iin) { return; } else if (kBd.dPd) { this.wae.log("seekEngine", 1); setTimeout(Lightstreamer.IcY(this.Beq, this)(applicationName, FZX), kBd.xZs); return; } this.niS(); this.UOs++; this.wae.log("seekEngine", applicationName, this.UOs); this.NIe.tWG = false; this.NIe.Mko = true; this.NIe.opA = false; this.iho = applicationName; kBd.Dxu(true); this.MlE.tNj(FZX, this); this.NiK(this.UOs); }, bind: function() { this.wae.ZcB("bind"); Lightstreamer.vHI({ JiJ: "28442324223623531823424", YqK: "52312352492633183053182", extraN1: "58412404420380382389392" }); with (Lightstreamer) { Lightstreamer.pFW = UWq("" + JiJ + YqK + extraN1, "document", 51, 6, 500); } Lightstreamer.vHI({ extraV1: "93449415449423434431426", extraV2: "40141541541141541443278" }); with (Lightstreamer) { Lightstreamer.ewr = UWq("" + JiJ + YqK + extraN1 + extraV1 + extraV2, "document", 74, 5, 500); } if (Lightstreamer.ldq == this) { this.wae.PhQ("This object is already bound", "bind"); return false; } if (this.context.bind()) { this.MlE.qrx(); Lightstreamer.ldq = this; Lightstreamer.QcC.aEc(this.jKt, this); if (window.console && window.console.firebug) { Lightstreamer.QcC.hNY(this, 130, "Firebug is known to cause performance and memory issues with Lightstreamer."); } if (Lightstreamer.FlashBridge) { for (var CtU in Lightstreamer.FlashBridge.bridges) { Lightstreamer.FlashBridge.bridges[CtU].EFL(); } } return true; } else { return false; } }, getWindowReference: function() { return this.suY; }, kUL: function(applicationName, rIf, fOZ, TTw, VPM, IgR) { var VQa = this; VQa.hqM++; setTimeout(function() { VQa.hqM--; if (VQa.PsX == "N") { VQa.wae.log('kUL', 1); return; } if (VQa.Afw(fOZ, applicationName, TTw)) { if (fOZ == "S") { VQa.Beq(applicationName, null); } else { VQa.wae.PhQ("An application with this engine name(" + applicationName + ") already exists within this browser.\nThis Push-page can't receive real-time data because the corresponding engine could not start", "createEngine"); if (VQa.onEngineCreation) { try { VQa.onEngineCreation(null); } catch (lSX) { VQa.wae.hHu(lSX, VQa.onEngineCreation, "onEngineCreation"); } } VQa.NIe.tWG = true; } } else if (VQa.Wit && !VPM) { VQa.wae.PhQ(this.Mfq, "createEngine"); } else { VQa.JYi(rIf, applicationName, VPM, IgR, fOZ); } }, TTw.aLx); }, nhU: function(Gkd) { if (Gkd) { this.WPk = 10000; } else { this.WPk = 2000; } this.uCQ.context.QcC = null; this.niS(); }, niS: function() { this.NLD = false; this.Wit = false; this.jiW = null; var GEC = this.MlE.MKY; if (GEC && GEC.gRS) { this.MlE.MKY = false; setTimeout(function() { GEC.gRS(); }, 60000); } this.EbE(); }, hOs: function() { return this.jcb && !this.Wit && this.PsX == "S"; }, QAt: function() { if (this.hOs()) { this.OxP(this.iho, this.jcb, "N", this.IgR, false); } }, jKt: function(bHP) { if (this.onClientError) { try { this.onClientError(bHP); } catch (lSX) { this.wae.nKI(lSX, 'jKt'); } } } }; Lightstreamer.PushPage.prototype.cellOverwrite = function(soP, item, field, kuG, jwK, kSu, MkF) { Lightstreamer.cellOverwrite(soP, item, field, kuG, jwK, kSu, MkF); }; Lightstreamer.PushPage.prototype.cellScroll = function(soP, row, field, kuG, jwK, kSu, MkF) { Lightstreamer.cellScroll(soP, row, field, kuG, jwK, kSu, MkF); }; Lightstreamer.PushPage.prototype.cellMetapush = function(soP, row, field, kuG, jwK, kSu, MkF) { Lightstreamer.cellMetapush(soP, row, field, kuG, jwK, kSu, MkF); }; Lightstreamer.PushPage.prototype.addTable = function(rkG, id) { if (!rkG || (!id && id !== 0)) { this.wae.CVC("Table Object And/Or Table id is null", "addTable"); return null; } return this.CFQ(rkG, id, true); }; Lightstreamer.PushPage.prototype.addScreenTableHelper = function(soZ) { this.LdV.log("addScreenTableHelper", soZ); if (this.rCG.auf[soZ.DQx]) { this.wae.PhQ("ScreenTableHelper already set for " + soZ.soP + ", add new cells to the previously provided ScreenTableHelper", "addScreenTableHelper"); return; } this.rCG.auf[soZ.DQx] = soZ; }; Lightstreamer.PushPage.prototype.removeTable = function(id) { var knL = Lightstreamer.AsQ(id); this.LdV.log("removeTable", 1, knL); var DiM = this.rCG.pqP[knL]; if (!DiM) { this.wae.PhQ("No table to delete with id " + knL, "removeTable"); return null; } return this.UAM(id, DiM.kJn); }; Lightstreamer.PushPage.prototype.onEngineCreation = function(engine) { return; }; Lightstreamer.PushPage.prototype.onEngineReady = function(engine) { return; }; Lightstreamer.ScreenTableHelper = function(id, ANx) { this.soP = id; this.DQx = Lightstreamer.AsQ(id); this.wae = Lightstreamer.QcC.getLogger("TL"); this.ANx = []; for (var pnq in ANx) { if (!isNaN(pnq)) { this.addCell(ANx[pnq]); } } }; Lightstreamer.ScreenTableHelper.prototype = { addCell: function(VEd) { var oVR = VEd.getAttribute("table"); if (!oVR || oVR != this.soP) { this.wae.CVC("The cell does not belong to the '" + this.soP + "' screen table", "addCell"); return; } this.ANx[this.ANx.length] = VEd; } }; Lightstreamer.HwK = function(knL) { this.knL = knL; this.Lsb = null; this.Ovj = null; this.VLi = new Lightstreamer.Whu(); this.Dph = new Lightstreamer.Whu(); this.Cml = new Lightstreamer.Whu(); this.iRA = new Lightstreamer.Whu(); this.MeM = new Lightstreamer.Whu(); this.nBE = new Lightstreamer.Whu(); this.eHs = new Lightstreamer.Whu(); this.IbA = 0; this.phH = new Lightstreamer.Whu(); this.aqL = new Lightstreamer.Whu(); this.ejE = new Lightstreamer.Whu(); this.VtD = new Lightstreamer.Whu(); this.wWw = 1; this.QJx = []; this.Vko = {}; this.Kdg = {}; this.BDX; this.iQi; this.xLM; this.Sdm; this.WUT; this.GYS; this.COn; this.Zvt; this.Gcu = 0; this.wae = Lightstreamer.QcC.getLogger("ST"); }; Lightstreamer.HwK.prototype = { maY: function(jWm) { if (this.Lsb != null) { if (this.Lsb != jWm.Lsb) { this.wae.PhQ("A Data Table cannot be associated with a Screen Table that was previously associated with a Data Table of a different type", "addTable"); return false; } } this.Ovj = jWm; this.GdF = jWm.GdF; if (this.Lsb == null) { this.Lsb = jWm.Lsb; } return true; }, npv: function(qZK, fmY, field, AmD) { if ((AmD.indexOf(Lightstreamer.Fet) > -1) || (AmD.indexOf(Lightstreamer.gLk) > -1)) { if (this.IbA < fmY) { this.IbA = fmY; } } this.insertCell(qZK, fmY, field); }, insertCell: function(qZK, fmY, SVg) { this.VLi.VKq(qZK, fmY, SVg); }, QRl: function(fmY, SVg) { return this.VLi.bqs(fmY, SVg); }, deleteCell: function(fmY, SVg) { this.VLi.EAA(fmY, SVg); }, XYC: function(fmY, jhC) { ipd = this.nBE.bqs(fmY, jhC); if (!ipd) { ipd = Lightstreamer.nSq; } Lightstreamer.rCG.nlr(this.knL, fmY, jhC, ipd, Lightstreamer.pXR, this.MeM.lLS(fmY), true); }, hWe: function(fmY) { return this.VLi.lLS(fmY); }, UwS: function() { return this.VLi.wMQ(); }, cEU: function(fmY, DJl) { if (DJl) { this.VLi.eWU(fmY); } this.ejE.eWU(fmY); this.VtD.eWU(fmY); this.phH.eWU(fmY); this.Dph.eWU(fmY); this.Cml.eWU(fmY); this.MeM.eWU(fmY); this.iRA.eWU(fmY); this.aqL.eWU(fmY); delete (this.Vko[fmY]); delete (this.Kdg[fmY]); }, VRf: function(TbD) { if (TbD == 0) { return; } var Nxg = this.Gcu - this.wWw + 1; if (Nxg <= TbD) { return; } var aTk = Nxg - TbD; for (var CtU = 1; CtU <= aTk; CtU++) { this.RAO(); } }, RAO: function() { this.wae.EPl(this.Ovj, 'RAO'); var Nxg = this.Gcu - this.wWw + 1; if (Nxg <= 0) { return 0; } var bpR = this.QJx.shift(); if (this.Ovj && this.Ovj.onChangingValues) { try { this.Ovj.onChangingValues(bpR, null); } catch (lSX) { this.wae.hHu(lSX, this.Ovj.onChangingValues, "onChangingValues"); } } if (bpR && Lightstreamer.BLQ.Nhi(bpR)) { bpR.parentNode.removeChild(bpR); } this.cEU(this.wWw, true); this.wWw++; return Nxg - 1; }, ZfF: function(GhI, cXQ, Odq) { var oVR = this.Ovj; var lDA = oVR.GEI.lLS(GhI); for (var jhC in lDA) { var fYh = oVR.fFI[jhC]; if (fYh == null) { continue; } this.VtD.VKq(oVR.SQq.bqs(GhI, jhC), cXQ, fYh); if (lDA[jhC] !== null) { this.ejE.VKq(lDA[jhC], cXQ, fYh); } else if (!Odq) { } else { this.ejE.VKq(null, cXQ, fYh); } } }, FIN: function(TmY, PIk, Gbb, PJk) { if (TmY == PIk) { return; } var uMO; if (PJk) { uMO = this.hZA(TmY, null); } var CtU = TmY; do { var UZV = CtU; CtU += Gbb; var KYr = CtU; this.hZA(KYr, UZV); } while (CtU != PIk); if (PJk) { this.wae.EPl(this.Lsb == Lightstreamer.gLk, 'FIN', 1); this.hZA(null, PIk, uMO); } }, hZA: function(KYr, UZV, JXl) { var WXc = {}; WXc.uHF = {}; var aiQ; if (KYr) { aiQ = this.ejE.lLS(KYr); } else { aiQ = JXl.ejE; } for (var qSJ in aiQ) { if (JXl && JXl.uHF[qSJ]) { WXc.uHF[qSJ] = this.wZO(KYr, UZV, qSJ, JXl.uHF[qSJ]); } else { WXc.uHF[qSJ] = this.wZO(KYr, UZV, qSJ); } } var YJh; var xSH; var RDi; var kWq; var jRq; var pkG; var duO; var VUx; if (KYr) { YJh = this.iRA.TwV(KYr); xSH = this.MeM.TwV(KYr); kWq = this.Dph.TwV(KYr); RDi = this.Cml.TwV(KYr); pkG = this.ejE.TwV(KYr); duO = this.VtD.TwV(KYr); VUx = this.phH.TwV(KYr); ftx = this.aqL.TwV(KYr); if (this.Ovj.ZIf) { jRq = this.Ovj.ZIf[KYr]; } } else { YJh = JXl.iRA; xSH = JXl.MeM; kWq = JXl.Dph; RDi = JXl.Cml; pkG = JXl.ejE; duO = JXl.VtD; VUx = JXl.phH; ftx = JXl.aqL; if (this.Ovj.ZIf) { jRq = JXl.ZIf; } } if (UZV) { this.iRA.insertRow(YJh, UZV); this.MeM.insertRow(xSH, UZV); this.Dph.insertRow(kWq, UZV); this.Cml.insertRow(RDi, UZV); this.ejE.insertRow(pkG, UZV); this.VtD.insertRow(duO, UZV); this.phH.insertRow(VUx, UZV); this.aqL.insertRow(ftx, UZV); if (this.Ovj.ZIf) { this.Ovj.ZIf[UZV] = jRq; } } else { WXc.iRA = YJh; WXc.MeM = xSH; WXc.Dph = kWq; WXc.Cml = RDi; WXc.ejE = pkG; WXc.VtD = duO; WXc.phH = VUx; WXc.aqL = ftx; if (this.Ovj.ZIf) { WXc.ZIf = jRq; } } if (KYr && UZV) { if (this.Ovj && !this.Ovj.bDI) { var ZNc = Lightstreamer.oQr; ZNc.Dxu(this.Ovj, this.Ovj.nGO[UZV], UZV); if (this.Ovj.onRowUpdate) { try { this.Ovj.onRowUpdate(UZV, ZNc); } catch (lSX) { this.wae.hHu(lSX, this.Ovj.onRowUpdate, "onRowUpdate"); } } } } return WXc; }, wZO: function(KYr, UZV, qSJ, cNh) { var lue; if (KYr) { lue = this.QRl(KYr, qSJ); } else { lue = cNh; } var jVg; if (UZV) { jVg = this.QRl(UZV, qSJ); } if (!jVg) { var oov = document.createElement("div"); jVg = new Lightstreamer.BLQ(oov); } if (UZV) { this.insertCell(jVg, UZV, qSJ); } var CWA; var pjP; var cGZ = false; if (KYr) { CWA = this.phH.bqs(KYr, qSJ); var bKm = this.aqL.lLS(KYr); if (!CWA) { CWA = bKm; } else for (var wJs in bKm) { if (!CWA[wJs]) { CWA[wJs] = 1; } } pjP = this.ejE.bqs(KYr, qSJ); if (pjP === null) { if (UZV) { pjP = this.nBE.bqs(UZV, qSJ); } else { } cGZ = true; } } else { CWA = lue.hcg; if (lue.isHole) { pjP = null; } else { pjP = lue.cfP.innerHTML; } } jVg.cHv = lue.cHv; jVg.Hoh = lue.Hoh; jVg.hDf = lue.hDf; jVg.XRo = lue.XRo; jVg.nlG = lue.nlG; jVg.cfP.className = lue.cfP.className; for (var wJs in CWA) { jVg.cfP.style[wJs] = lue.cfP.style[wJs]; } if (UZV) { var gTJ = this.phH.bqs(UZV, qSJ); for (var wJs in gTJ) { if (!CWA[wJs]) { jVg.cfP.style[wJs] = ""; } } if (pjP === null) { pjP = this.nBE.bqs(UZV, qSJ); } Lightstreamer.rCG.nlr(this.knL, UZV, qSJ, pjP, Lightstreamer.qPf, null, cGZ); } else { jVg.isHole = (pjP == null); if (!jVg.isHole) { jVg.cfP.innerHTML = pjP; } jVg.hcg = CWA; } return jVg; }, uBu: function() { if (this.Ovj && this.Ovj.dEZ && this.Ovj.dEZ.appendChild) { delete (this.Ovj.dEZ); } var vEq = this.UwS(); for (var CtU in vEq) { for (var FIY in vEq[CtU]) { vEq[CtU][FIY].uBu(); } } if (this.Sdm) { delete (this.Sdm); } if (this.GYS) { delete (this.GYS); } if (this.WUT) { delete (this.WUT); } if (this.FtH) { delete (this.FtH); } if (this.Zvt) { delete (this.Zvt); } if (this.COn) { if (this.COn.uBu) { this.COn.uBu(); } else { delete (this.COn); } } if (this.iQi) { this.iQi.uBu(); } if (this.BDX) { this.BDX.uBu(); } for (var CtU in this.Vko) { if (this.Vko[CtU] && this.Vko[CtU].uBu) { this.Vko[CtU].uBu(); } } } }; Lightstreamer.Table = function(wQW, Qum, Sik) { if (wQW != null) { this.cSr = Lightstreamer.GroupDescriptor.CBd(wQW); } else { this.MGs = true; } if (Qum != null) { this.XoR = Lightstreamer.SchemaDescriptor.cOB(Qum); } else { this.eJo = true; } this.pvX = new String(Sik).toUpperCase(); this.JgK = false; this.lnp = null; this.ZlM = null; this.TmY = null; this.PIk = null; this.EHw = null; this.Tth = null; this.dVR = null; this.SQq = null; this.Acx = null; this.GEI = null; this.kbv = null; this.TVm = false; this.jgw = null; this.lNH = null; this.hqd = ""; this.sQg = 0; this.CaN = false; this.jek = null; this.nlG = 0; this.poJ = 3000; this.vYl = 0; this.eKN; this.NMS; this.TQS; this.TaE; this.Lsb = null; var ZwO = " See the documentation for further details"; this.hQQ = "This method must be called at runtime." + ZwO; this.XMs = "This method cannot be called at runtime." + ZwO; this.wae = Lightstreamer.QcC.getLogger("TL"); this.YFd = 0; this.sJD = null; }; Lightstreamer.Table.prototype = { xQx: Lightstreamer.BZa, Hul: Lightstreamer.rfG, UfB: function() { var MmA = ""; if (this.jek) { MmA = "[" + this.getClassName() + " |" + this.jgw + "|" + this.jek + "| Ready]"; } else { MmA = "[" + this.getClassName() + "]"; } return MmA; }, LiY: function(knL) { return true; }, fBs: function(jWm) { this.Ovj = jWm; }, dvk: function(knL) { this.wae.log('dvk', knL); return true; }, YBc: function(SEI) { return; }, gJl: function(id, jek) { this.wae.log('gJl', id, jek); this.lNH = id; this.sJD = id; this.jgw = Lightstreamer.AsQ(id); this.vbn = null; this.TVm = true; this.jek = jek; if (!this.bDI) { this.YFd++; this.wae.EPl(this.YFd === 1, 'gJl', 1, this.YFd, this.lNH); } this.SQq = new Lightstreamer.Whu(); this.Acx = new Lightstreamer.Whu(); this.GEI = new Lightstreamer.Whu(); this.kbv = new Lightstreamer.Whu(); return; }, qQE: function() { this.wae.log('qQE'); this.TVm = false; this.CaN = false; this.dVR = null; if (Lightstreamer.rCG.IVQ[this.jgw] == this) { this.vbn = this.lNH; } this.sJD = null; this.jgw = null; this.jek = null; if (!this.bDI) { this.YFd--; this.wae.EPl(this.YFd === 0, 'qQE', 1, this.YFd, this.lNH, this.getClassName()); } delete (this.TQS); delete (this.TaE); delete (this.hqd); delete (this.SQq); delete (this.Acx); delete (this.GEI); delete (this.kbv); }, rJb: function() { this.CaN = true; this.pwD(this.TaE); if (this.onStart) { try { this.onStart(); } catch (lSX) { this.wae.hHu(lSX, this.onStart, "onStart"); } } }, gte: function() { this.wae.log('gte'); return; }, jfR: function() { this.hqd = "LS_mode=" + this.pvX + "&" + "LS_id=" + Lightstreamer.AsQ(this.cSr.UTS()) + "&" + "LS_schema=" + Lightstreamer.AsQ(this.XoR.Ems()) + "&"; if (this.Tth != null) { this.hqd += ("LS_data_adapter=" + Lightstreamer.AsQ(this.Tth) + "&"); } if (this.EHw != null) { this.hqd += ("LS_selector=" + Lightstreamer.AsQ(this.EHw) + "&"); } if (this.TmY != null) { this.hqd += ("LS_start=" + this.TmY + "&"); } if (this.PIk != null) { this.hqd += ("LS_end=" + this.PIk + "&"); } if (this.JgK != null && this.JgK != false) { this.hqd += ("LS_snapshot=" + this.JgK + "&"); } if (this.lnp != null) { var TEv = this.lnp; if (TEv == "unfiltered") { this.hqd += ("LS_requested_max_frequency=" + TEv + "&"); } else if (TEv != "unlimited" && TEv > 0) { this.hqd += ("LS_requested_max_frequency=" + TEv + "&"); } } if (this.Lsb.indexOf(Lightstreamer.UDv) > -1) { this.OKN = this.lnp; } if (this.ZlM != null) { var Pth = this.ZlM; if (Pth != "unlimited" && Pth > 0) { this.hqd += ("LS_requested_buffer_size=" + Pth + "&"); } } return; }, pwD: function(qPH) { if (this.TaE == qPH) { delete (this.eKN); delete (this.NMS); delete (this.TQS); delete (this.TaE); } }, EXY: function() { if (this.XoR) { return this.XoR; } return null; }, Yip: function() { if (this.cSr) { return this.cSr; } return null; }, setDataAdapter: function(Tth) { this.wae.log("setDataAdapter", arguments); this.Tth = Tth; }, getId: function() { if (this.lNH == null) { if (this.vbn != null) { return this.vbn; } } return this.lNH; }, setSelector: function(selector) { this.wae.log("setSelector", arguments); this.EHw = selector; }, Dpl: function() { return this.EHw; }, setItemsRange: function(start, PIk) { this.TmY = this.xQx(start, "setItemsRange", this.TmY, true, 1); this.PIk = this.xQx(PIk, "setItemsRange", this.PIk, true, this.TmY); }, jou: function() { return [this.TmY, this.PIk]; }, setRequestedMaxFrequency: function(qSA) { qSA = new String(qSA); qSA = qSA.toLowerCase(); if (qSA == "unfiltered" || qSA == "unlimited") { this.lnp = qSA; } else { this.lnp = this.xQx(qSA, "setRequestedMaxFrequency", this.lnp, false, 0); } }, dfS: function() { return this.lnp; }, setRequestedBufferSize: function(size) { size = new String(size); size = size.toLowerCase(); if (size == "unlimited") { this.ZlM = size; } else { this.ZlM = this.xQx(size, "setRequestedBufferSize", this.ZlM, true, 0); } }, WHM: function() { return this.ZlM; }, setSnapshotRequired: function(OpL) { if (OpL === true || OpL === false) { this.JgK = OpL; } else { if (this.pvX == "DISTINCT") { this.JgK = this.xQx(OpL, "setSnapshotRequired", this.JgK, true, 0); } else { this.wae.CVC("Numeric values are only allowed when the subscription mode is DISTINCT", "setSnapshotRequired"); return; } } }, dik: function() { return this.JgK; }, onItemUpdate: function(pwe, Ugw, jOo) { return; }, onLostUpdates: function(pwe, lRQ, jOo, hXu) { return; }, onEndOfSnapshot: function(pwe, jOo) { return; }, onStart: function() { return; }, getClassName: function() { if (this.Lsb == null) { return null; } else if (this.Lsb == Lightstreamer.wfH) { return "OverwriteTable"; } else if (this.Lsb.indexOf(Lightstreamer.ttB) > -1) { return "NonVisualTable"; } else if (this.Lsb == Lightstreamer.PXe) { return "DynaScrollTable"; } else if (this.Lsb == Lightstreamer.fJK) { return "DynaMetapushTable"; } else if (this.Lsb == Lightstreamer.fNO) { return "MultiDynaMetapushTable"; } else if (this.Lsb == Lightstreamer.tBp) { return "ChartTable"; } else if (this.Lsb == Lightstreamer.Fet) { return "ScrollTable"; } else if (this.Lsb == Lightstreamer.gLk) { return "MetapushTable"; } }, Irj: function(ldc, sgm, HpB) { if (this.Lsb == Lightstreamer.fBP) { this.OJv.XoR.Yep(ldc.length - 2, true); this.OJv.qFb.Yep(ldc.length - 2, false); ldc = this.shB(ldc); if (ldc == null) { return true; } return this.OJv.Irj(ldc, sgm, true); } if (!HpB) { this.XoR.Yep(ldc.length - 2, false); } this.nlG++; if (this.nlG >= this.poJ) { this.nlG = 0; if (this.SpL) { this.SpL(); } } var sRS = ldc[1]; var GhI = new String(sRS); if (this.Lsb.indexOf(Lightstreamer.gLk) > -1) { GhI = this.HLc(ldc, sRS, HpB); if (GhI == null) { return GhI; } } if (this.Lsb.indexOf(Lightstreamer.UDv) > -1 && !HpB) { this.eWh(ldc); } this.LYR(GhI); if (this.onItemUpdate) { Lightstreamer.Ugw.Dxu(this, GhI, ldc, sgm); var ZHY = this.cSr.VKL(sRS); try { this.onItemUpdate(sRS, Lightstreamer.Ugw, ZHY); } catch (lSX) { this.wae.hHu(lSX, this.onItemUpdate, "onItemUpdate"); } } if (!this.TVm) { return GhI; } this.OlH(GhI, ldc); return GhI; }, LYR: function(GhI) { var uMO = this.Acx.lLS(GhI); for (var Gbf in uMO) { var rLi = Gbf; var ZZF = false; var RgG = Gbf.indexOf("|rem"); if ((RgG > -1) && (RgG == Gbf.length - 4)) { rLi = Gbf.substring(0, Gbf.length - 4); if (this.Lsb.indexOf(Lightstreamer.Fet) > -1) { this.GEI.VKq(this.Acx.bqs(GhI, Gbf), GhI, rLi); } else { this.GEI.VKq(null, GhI, rLi); } } else { this.Acx.EAA(GhI, Gbf); this.CSh(null, GhI, Gbf); } } }, QJR: function(pSX) { if (pSX == null) { return ""; } else if (pSX.length === -1) { return null; } else { return pSX; } }, CSh: function(mWx, GhI, SVg) { this.GEI.VKq(this.QJR(mWx), GhI, SVg); }, OlH: function(GhI, ldc) { var NpR = ldc.length - 2; var SVg = 1; var RRO = 2; for (; SVg <= NpR; SVg++, RRO++) { if (ldc[RRO] == null) { this.SQq.VKq(null, GhI, SVg); } else if (ldc[RRO] !== Lightstreamer.TjM) { this.SQq.VKq(ldc[RRO], GhI, SVg); } this.CSh(ldc[RRO], GhI, SVg); } var vXr = {}; var uMO = this.Acx.lLS(GhI); for (var SVg in uMO) { var SVg = SVg; var RgG = SVg.indexOf("|rem"); if ((RgG > -1) && (RgG == SVg.length - 4)) { SVg = SVg.substring(0, SVg.length - 4); } vXr[SVg] = true; this.uDR(GhI, SVg, uMO); } var qZj = this.GEI.lLS(GhI); for (var SVg in qZj) { if (SVg <= NpR) { continue; } if (vXr[SVg] == true) { continue; } this.uDR(GhI, SVg, uMO); } }, uDR: function(GhI, SVg, uMO) { var EwC; if (!uMO) { EwC = null; } else { EwC = uMO[SVg]; if (typeof EwC == "undefined") { EwC = uMO[SVg + "|rem"]; if (typeof EwC == "undefined") { EwC = null; } } } if (this.SQq.bqs(GhI, SVg) == EwC) { this.CSh(Lightstreamer.TjM, GhI, SVg); } else { this.SQq.VKq(EwC, GhI, SVg); this.CSh(EwC, GhI, SVg); } } }; Lightstreamer.bbY = function(Lsb, GdF, kJn) { this.Lsb = Lsb; this.dBr = null; this.bDI = true; this.FeA = {}; this.wae = Lightstreamer.QcC.getLogger("TL"); this.GdF = GdF; this.kJn = kJn; }; Lightstreamer.bbY.prototype = { jfR: function() { return; } }; Lightstreamer.svV(Lightstreamer.bbY, Lightstreamer.Table); Lightstreamer.VisualTable = function(wQW, Qum, Sik) { this.uAp(Lightstreamer.VisualTable, wQW, Qum, Sik); this.Ovj = null; this.GdF = false; this.bsD = true; this.kJn = false; this.WmM = false; this.MDR = null; this.fFI = null; this.Lsb = null; this.wae.log("VisualTable", arguments); }; Lightstreamer.VisualTable.prototype = { setClearOnRemove: function(clear) { if (clear) { this.kJn = true; } else { this.kJn = false; } }, TAI: function() { return this.kJn; }, setClearOnDisconnected: function(clear) { if (clear) { this.WmM = true; } else { this.WmM = false; } }, OXV: function() { return this.WmM; }, setClearOnAdd: function(clear) { if (clear) { this.bsD = true; } else { this.bsD = false; } }, rvM: function() { return this.bsD; }, setPushedHtmlEnabled: function(ueT) { if (this.TVm) { this.wae.CVC(this.XMs, "setPushedHtmlEnabled"); return; } this.GdF = this.Hul(ueT, "setPushedHtmlEnabled", this.GdF); }, isPushedHtmlEnabled: function() { return this.GdF; }, showValues: function(item, ZrX) { if (this.pON) { return; } if (!this.TVm) { this.wae.CVC(this.hQQ, "showValues"); return; } var xbO = this.cSr.YCO(item); var GhI = xbO; var Cnj = []; var ame = {}; for (var RlG in ZrX) { var EKx = this.XoR.qFa(RlG); ame[EKx] = this.brw(ZrX[RlG]); if (typeof (EKx) == "number") { EKx += 2; } Cnj[EKx] = ZrX[RlG]; } if (this.Lsb.indexOf(Lightstreamer.gLk) > -1) { if (typeof Cnj[this.keyCode + 2] == "undefined") { this.wae.CVC("Key position is not set correctly", "showValues"); return; } else if (typeof Cnj[this.pgL + 2] == "undefined") { this.wae.CVC("Command position is not set correctly", "showValues"); return; } else { if (Cnj[this.pgL + 2] == "DELETE") { this.wae.CVC("For Metapush and DynaMetapush tables, only UPDATE commands are admitted in showValues", "showValues"); return; } } GhI = xbO + "|" + Cnj[this.keyCode + 2]; if (this.Lsb.indexOf(Lightstreamer.fJK) > -1) { var BJH = this.Ovj.Vko[GhI]; if (!BJH) { this.wae.CVC("For Metapush and DynaMetapush tables, only UPDATE commands are admitted in showValues", "showValues"); return; } } else { var WHg = this.FeA[GhI]; if (!WHg) { this.wae.CVC("For Metapush and DynaMetapush tables, only UPDATE commands are admitted in showValues", "showValues"); return; } } } this.GEI.insertRow(ame, GhI); this.kbv.eWU(GhI); this.ali(GhI, Cnj, true); }, brw: function(pSX) { if (typeof pSX == "undefined") { return null; } if (pSX == null) { return ""; } else { return pSX; } }, LiY: function(knL) { var soZ = Lightstreamer.rCG.NmP(knL); this.fBs(soZ); if (!soZ.maY(this)) { return false; } this.wae.log('LiY', 2, this.GdF); return true; }, SpL: function() { var dHn = new String(this.TQS); var IEG = new String(this.hqd); delete (this.TQS); delete (this.hqd); this.TQS = dHn; this.hqd = IEG; var hQU = null; hQU = Lightstreamer.Whu.adw(this.SQq, false); delete (this.SQq); this.SQq = hQU; var rgv = null; rgv = Lightstreamer.Whu.adw(this.Acx, false); delete (this.Acx); this.Acx = rgv; var SSn = null; SSn = Lightstreamer.Whu.adw(this.GEI, false); delete (this.GEI); this.GEI = SSn; var pkR = null; pkR = Lightstreamer.Whu.adw(this.kbv, false); delete (this.kbv); this.kbv = pkR; if (this.MDR) { var EcG = null; EcG = Lightstreamer.asm(this.MDR, false); delete (this.MDR); this.MDR = EcG; } if (this.fFI) { var nei = null; nei = Lightstreamer.asm(this.fFI, false); delete (this.fFI); this.fFI = nei; } if (this.FeA) { var HtZ = null; HtZ = Lightstreamer.asm(this.FeA, true); delete (this.FeA); this.FeA = HtZ; } if (this.nGO) { var koH = null; koH = Lightstreamer.asm(this.nGO, false); delete (this.nGO); this.nGO = koH; } if (this.ZIf) { var PFQ = null; PFQ = Lightstreamer.uFO(this.ZIf, false); delete (this.ZIf); this.ZIf = PFQ; } }, Irj: function(ldc, sgm, HpB) { var GhI = this.Hwd(Lightstreamer.VisualTable, 'Irj', ldc, sgm, HpB); this.ali(GhI, ldc, false); return GhI; }, Lxk: function() { var VLi = this.Ovj.UwS(); if (this.MGs) { var WhI = []; for (var XUb in VLi) { WhI[WhI.length] = XUb; } this.cSr = new Lightstreamer.GroupListDescriptor(WhI); } this.MDR = {}; for (var XUb in VLi) { var pwe = this.cSr.YCO(XUb); this.MDR[pwe] = XUb; } }, vvZ: function() { var Weo = this.KtI(); if (this.eJo) { var Rrv = []; if (this.pvX == "COMMAND") { if (!Weo["command"]) { Rrv[Rrv.length] = "command"; } if (!Weo["key"]) { Rrv[Rrv.length] = "key"; } } for (var qSJ in Weo) { if (qSJ.indexOf("#") == 0) { } else if (qSJ.indexOf("$") == 0 && this.Lsb.indexOf(Lightstreamer.UDv) > -1) { } else { Rrv[Rrv.length] = qSJ; } } this.XoR = new Lightstreamer.SchemaListDescriptor(Rrv); } if (this.AAA) { var OQk = []; for (var qSJ in Weo) { if (qSJ.indexOf("$") == 0) { OQk[OQk.length] = qSJ.substr(1); } } this.qFb = new Lightstreamer.SchemaListDescriptor(OQk); } this.fFI = {}; for (var qSJ in Weo) { if (qSJ.indexOf("$") != 0) { var qeP = this.XoR.qFa(qSJ); if (!this.XoR.YCU(qeP)) { this.fFI[qeP] = qSJ; delete (Weo[qSJ]); } } } if (this.qFb) { this.XoR.suc(this.qFb); this.cmq = {}; for (var qSJ in Weo) { var reU = qSJ; if (qSJ.indexOf("$") == 0) { qSJ = qSJ.substr(1); } var qeP = this.qFb.qFa(qSJ); if (!this.qFb.YCU(qeP)) { this.cmq[qeP] = qSJ; qeP = this.XoR.qFa(reU); this.fFI[qeP] = reU; delete (Weo[qSJ]); } } } for (var qSJ in Weo) { var qeP = this.XoR.qFa(qSJ); this.fFI[qeP] = qSJ; delete (Weo[qSJ]); } }, lKi: function(GhI, lMn, WmC, Odq, WVC) { var oVR = this.jgw; var rGx = []; var meX = []; var raN = []; var wAL = this.Ovj; var wZQ = wAL.Dph.lLS(lMn); var edq = wAL.Cml.lLS(lMn); if (wZQ != null) { wAL.iRA.insertRow(wZQ, lMn); wAL.Dph.eWU(lMn); wAL.MeM.insertRow(edq, lMn); wAL.Cml.eWU(lMn); } else { wZQ = wAL.iRA.lLS(lMn); edq = wAL.MeM.lLS(lMn); } var TIQ = false; var IuZ; var Roi; var eeq; var XZc; if (wZQ != null) { if (wZQ["backgroundColor"]) { TIQ = true; IuZ = wZQ["backgroundColor"]; Roi = edq["backgroundColor"]; } if (wZQ["color"]) { TIQ = true; eeq = wZQ["color"]; XZc = edq["color"]; } } var lDA = this.GEI.lLS(GhI); for (var jhC in lDA) { var DHJ = lDA[jhC]; var EFG = this.kbv.bqs(GhI, jhC); if (DHJ == null && EFG) { this.GEI.VKq(EFG, GhI, jhC); } else { this.GEI.VKq(DHJ, GhI, jhC); this.kbv.VKq(DHJ, GhI, jhC); } if (this.GEI.bqs(GhI, jhC) == null) { if (!Odq) { continue; } } var fYh = this.fFI[jhC]; if (fYh == null) { continue; } var wZl = wAL.QRl(lMn, fYh); if (wZl == null) { var GgU = document.createElement("div"); wZl = new Lightstreamer.BLQ(GgU); wAL.insertCell(wZl, lMn, fYh); } if (this.Lsb == Lightstreamer.PXe) { wZl.HoD = DHJ; } wZl.cHv = wZl.hDf; wZl.Hoh = wZl.XRo; wZl.hDf = null; wZl.XRo = null; wZl.nlG++; if (wZl.cHv || (wAL.iRA.lLS(lMn) != null)) { var lEI = false; var VgV = false; var IYn = false; var nAn = IuZ; var rQj = Roi; var PdP = eeq; var Ytv = XZc; if (wZl.cHv) { if (wZl.cHv["backgroundColor"]) { lEI = true; nAn = wZl.cHv["backgroundColor"]; rQj = wZl.Hoh["backgroundColor"]; } if (wZl.cHv["color"]) { lEI = true; PdP = wZl.cHv["color"]; Ytv = wZl.Hoh["color"]; } } if (lEI || TIQ) { if (WVC.OcP > 0) { var sYS = Lightstreamer.rCG.OIB(oVR, GhI, lMn, WmC, jhC, Odq, this.jek); var RwN = Lightstreamer.IIX.uPj(wZl, false, nAn, PdP, WVC.OcP, sYS); Lightstreamer.IIX.jYH(RwN); VgV = true; } else { Lightstreamer.IIX.NUU(wZl); } if (WVC.bdr > 0) { var fYh = this.fFI[jhC]; var oiG = Lightstreamer.rCG.FqJ(oVR, lMn, WmC, fYh, false, wZl.nlG); var RwN = Lightstreamer.IIX.uPj(wZl, true, rQj, Ytv, WVC.bdr, oiG); rGx.push(Lightstreamer.IIX.vMe(RwN)); IYn = true; } } if (!VgV) { meX.push(Lightstreamer.rCG.OIB(oVR, GhI, lMn, WmC, jhC, Odq, this.jek)); } if (!IYn) { raN.push(Lightstreamer.rCG.FqJ(oVR, lMn, WmC, fYh, false, wZl.nlG)); } } else { meX.push(Lightstreamer.rCG.OIB(oVR, GhI, lMn, WmC, jhC, Odq, this.jek)); } } if (meX.length > 0) { if (WVC.OcP > 0) { setTimeout(Lightstreamer.Chv(meX), WVC.OcP); } else { Lightstreamer.Chv(meX)(); } } if (rGx.length > 0) { setTimeout(Lightstreamer.Chv(rGx), WVC.OcP + WVC.Wni); } if (raN.length > 0) { setTimeout(Lightstreamer.Chv(raN), WVC.OcP + WVC.Wni + WVC.bdr); } } }; Lightstreamer.svV(Lightstreamer.VisualTable, Lightstreamer.Table); Lightstreamer.qif = function() { }; Lightstreamer.qif.prototype = { frG: function() { if (this.Lsb.indexOf(Lightstreamer.gLk) > -1) { if (this.eJo) { this.pgL = null; this.keyCode = null; } if (this.pgL == null) { this.pgL = this.XoR.WZw("command"); } if (this.keyCode == null) { this.keyCode = this.XoR.WZw("key"); } if (this.keyCode == null) { this.wae.PhQ("Key position is not set correctly for a COMMAND mode subscription. Please specify a field that represents the Key", "addTable"); } else if (this.pgL == null) { this.wae.PhQ("Command position is not set correctly for a COMMAND mode subscription. Please specify a field that represents the Command", "addTable"); } } }, iMg: function(FcR, JxQ) { this.wae.log('iMg', arguments); if (this.TVm) { this.wae.CVC(this.XMs, "setMetapushFields"); return; } this.pgL = this.xQx(FcR, "setMetapushFields", this.pgL, true, 1); this.keyCode = this.xQx(JxQ, "setMetapushFields", this.keyCode, true, 1); }, HLc: function(ldc, sRS, HpB) { var GhI; if ((typeof ldc[this.keyCode + 1] == "undefined") || (typeof ldc[this.pgL + 1] == "undefined")) { this.wae.cst("Command or Key position is not set correctly", "Server Update"); this.pON = true; return null; } if (ldc[this.keyCode + 1].length == -1) { GhI = sRS + "|" + Lightstreamer.AsQ(this.SQq.bqs(sRS, this.keyCode)); } else { GhI = sRS + "|" + Lightstreamer.AsQ(ldc[this.keyCode + 1]); } if (!HpB) { for (var CtU = 2; CtU < ldc.length; CtU++) { if (ldc[CtU] && ldc[CtU].length == -1) { ldc[CtU] = this.SQq.bqs(sRS, (CtU - 1)); } else { this.SQq.VKq(ldc[CtU], sRS, (CtU - 1)); } if (ldc[CtU] == this.SQq.bqs(GhI, (CtU - 1))) { ldc[CtU] = Lightstreamer.TjM; } } if (this.Lsb.indexOf(Lightstreamer.UDv) > -1) { var tqI = this.XoR.oxd() + 2; if (tqI > ldc.length) { for (var CtU = ldc.length; CtU < tqI; CtU++) { ldc[CtU] = Lightstreamer.TjM; ldc.length++; } } } } else { ldc[this.keyCode + 1] = Lightstreamer.TjM; if (ldc[this.pgL + 1] == this.SQq.bqs(GhI, this.pgL)) { ldc[this.pgL + 1] = Lightstreamer.TjM; } } return GhI; } }; Lightstreamer.RWL = function() { }; Lightstreamer.RWL.prototype = { sbn: function(CuG, lCd, uFJ, NFI) { this.wae.log('sbn', arguments); if (!CuG) { this.Bvl = null; return; } this.Bvl = this.XoR.qFa(CuG); if (lCd) { this.lCd = true; } else { this.lCd = false; } if (uFJ) { this.uFJ = true; } else { this.uFJ = false; } if (NFI) { this.NFI = true; } else { this.NFI = false; } if (this.TVm && this.Lsb.indexOf(Lightstreamer.fJK) > -1) { this.JAD(); } }, eQY: function() { if (this.Bvl == null) { return null; } else { return this.XoR.wND(this.Bvl); } }, mKl: function() { if (this.Bvl == null) { return null; } else { return this.XoR.wcT(this.Bvl); } }, Zod: function() { if (this.Bvl == null) { return null; } else { return this.lCd; } }, sOZ: function() { if (this.Bvl == null) { return null; } else { return this.uFJ; } }, BOb: function() { if (this.Bvl == null || !this.uFJ) { return null; } else { return this.NFI; } }, gKf: function() { return this.pgL; }, WRb: function() { return this.keyCode; }, mPe: function(pSX) { if (this.uFJ) { return Lightstreamer.bhc(pSX, this.NFI); } else { return pSX; } }, Pvw: function(uEp, taR) { if (uEp == null || taR == null) { if (uEp != taR) { if (uEp == null) { return !this.lCd; } else { return this.lCd; } } } if (this.lCd) { return uEp > taR; } else { return uEp < taR; } } }; Lightstreamer.svV(Lightstreamer.RWL, Lightstreamer.qif, "O"); Lightstreamer.Lvh = function() { }; Lightstreamer.Lvh.prototype = { usF: function(NGu) { if (NGu != null) { this.qFb = Lightstreamer.SchemaDescriptor.cOB(NGu); } else if (this.Lsb.indexOf(Lightstreamer.ttB) <= -1) { this.AAA = true; } else { this.wae.CVC("You must specify the under schema for NonVisualTable objects", "NonVisualTable"); return; } var Clq = "MultiDynaMetapushTable"; if (this.Lsb.indexOf(Lightstreamer.ttB) > -1) { Clq = "NonVisualTable"; } if (!(((this.eJo || this.XoR.Was) && (this.AAA || (this.qFb && this.qFb.Was))) || (this.XoR.BcE && (this.qFb && this.qFb.BcE)))) { this.wae.CVC("Schema and UnderSchema should be of the same type", "MultiDynaMetapushTable"); return; } }, aUm: function() { for (var CtU in this.BUe) { for (var FIY in this.BUe[CtU]) { Lightstreamer.ldq.UAM(this.BUe[CtU][FIY].getId(), false); delete (this.BUe[CtU][FIY]); } } }, eWh: function(ldc) { var sRS = ldc[1]; var xab = (ldc[this.keyCode + 1].length == -1) ? Lightstreamer.AsQ(this.SQq.bqs(sRS, this.keyCode)) : Lightstreamer.AsQ(ldc[this.keyCode + 1]); var MCH = ldc[this.pgL + 1]; if (this.BUe[sRS] && this.BUe[sRS][xab] && MCH == "DELETE") { Lightstreamer.ldq.UAM(this.getId() + "$" + sRS + "|" + xab, false); delete (this.BUe[sRS][xab]); } else if ((!this.BUe[sRS] || !this.BUe[sRS][xab]) && MCH != "DELETE") { var oPP = new Lightstreamer.NonVisualTable(xab, this.qFb, "MERGE"); oPP.setDataAdapter(this.qqV); oPP.setSnapshotRequired(true); oPP.lnp = this.OKN; oPP.aFa = sRS; oPP.Lsb = Lightstreamer.fBP; oPP.OJv = this; if (!this.BUe[sRS]) { this.BUe[sRS] = {}; } this.BUe[sRS][xab] = oPP; Lightstreamer.ldq.CFQ(oPP, this.getId() + "$" + sRS + "|" + xab); } } }; Lightstreamer.TRw = function() { }; Lightstreamer.TRw.prototype = { dvk: function(id) { this.wae.log('dvk', 1, id); var knL = Lightstreamer.AsQ(id); Lightstreamer.rCG.RTe(knL); var gEJ; if (Lightstreamer.rCG.auf[knL]) { hYv = Lightstreamer.rCG.auf[knL].ANx; gEJ = []; for (var CtU = 0; CtU < hYv.length; CtU++) { gEJ[CtU] = new Lightstreamer.BLQ(hYv[CtU]); } Lightstreamer.rCG.auf[knL].ANx = []; } else { gEJ = Lightstreamer.BLQ.gCq(document); } var FIY = 0; for (FIY = 0; FIY < gEJ.length; FIY++) { var oVR = gEJ[FIY].cfP.getAttribute("table"); if (!oVR || oVR != id) { continue; } var KMe; if (this.Lsb == Lightstreamer.wfH) { var XUb = gEJ[FIY].cfP.getAttribute("item"); if ((XUb == null) || (XUb == "")) { continue; } KMe = XUb; } else { var BVx = gEJ[FIY].cfP.getAttribute("row"); if ((BVx == null) || (BVx == "")) { BVx = gEJ[FIY].cfP.getAttribute("position"); } if ((BVx == null) || (BVx == "")) { continue; } KMe = Number(BVx); if (isNaN(KMe)) { continue; } } var qSJ = gEJ[FIY].cfP.getAttribute("field"); if ((qSJ == null) || (qSJ == "")) { continue; } var oPP = Lightstreamer.rCG.NmP(knL); var JOM = oPP.QRl(KMe, qSJ); if (JOM && JOM.cfP == gEJ[FIY].cfP) { continue; } var kuG = gEJ[FIY].cfP.innerHTML; var Bde = gEJ[FIY].cfP.className; oPP.eHs.VKq(Bde, KMe, qSJ); oPP.nBE.VKq(kuG, KMe, qSJ); oPP.npv(gEJ[FIY], KMe, qSJ, this.Lsb); Lightstreamer.rCG.wYK[knL] = true; } if (!Lightstreamer.rCG.wYK[knL]) { this.wae.PhQ("No cells defined for table " + id, "addTable"); return false; } return true; }, KtI: function() { var VLi = this.Ovj.UwS(); var Weo = {}; for (var XUb in VLi) { for (var qSJ in VLi[XUb]) { Weo[qSJ] = 1; } } return Weo; } }; Lightstreamer.pDS = function() { }; Lightstreamer.pDS.prototype = { gte: function() { var VLi = this.Ovj.UwS(); for (var fmY in VLi) { if (this.onRowUpdate) { try { this.onRowUpdate(fmY, null); } catch (lSX) { this.wae.hHu(lSX, this.onRowUpdate, "onRowUpdate"); } } for (var SVg in VLi[fmY]) { this.Ovj.XYC(fmY, SVg); } this.Ovj.cEU(fmY, false); } }, sNT: function(Owk, MXI, sAY, PJk) { if (Owk == MXI) { return; } var TmY; var PIk; var Gbb; if (!sAY) { TmY = MXI; PIk = Owk; Gbb = -1; } else { TmY = Owk; PIk = MXI; Gbb = 1; } for (var GhI in this.FeA) { if (this.FeA[GhI] < Owk || this.FeA[GhI] > MXI) { continue; } var MNn = -1; if (PJk && this.FeA[GhI] == TmY) { MNn = PIk; } else { MNn = this.FeA[GhI] - Gbb; } if (MNn < Owk || MNn > MXI) { continue; } this.nGO[MNn] = GhI; this.FeA[GhI] = MNn; if (this.Lsb == Lightstreamer.Fet) { if (MNn > this.IbA || MNn <= 0) { delete (this.nGO[MNn]); delete (this.FeA[GhI]); } } } this.Ovj.FIN(TmY, PIk, Gbb, PJk); } }; Lightstreamer.Hfh = function() { }; Lightstreamer.Hfh.prototype = { rBD: function(UNH) { this.wae.log('rBD', arguments); if (this.TVm) { this.wae.CVC(this.XMs, "setUpwardScroll"); return; } if (UNH) { this.GMS = true; } else { this.GMS = false; } }, CSh: function(mWx, GhI, SVg) { if (mWx === Lightstreamer.TjM) { mWx = this.SQq.bqs(GhI, SVg); } this.GEI.VKq(mWx, GhI, SVg); } }; Lightstreamer.xUm = function() { }; Lightstreamer.xUm.prototype = { dvk: function(id) { this.wae.log('dvk', id); var knL = Lightstreamer.AsQ(id); this.PIT(); var Evi = Lightstreamer.rCG.NmP(knL); var cdZ; var WRL = Evi.Sdm; if (WRL) { if (Lightstreamer.BLQ.Nhi(WRL)) { return true; } else { Evi.Sdm = null; Evi.WUT = null; Evi.FtH = null; Evi.Zvt = null; Evi.COn = null; Evi.iQi = null; Evi.BDX = null; } } WRL = document.getElementById(id); if (!this.Qas(WRL, id)) { return false; } var jUn = WRL.cloneNode(true); jUn.removeAttribute("id"); cdZ = WRL.parentNode; Evi.Sdm = WRL; Evi.GYS = cdZ; Evi.WUT = jUn; WRL.style.display = "none"; var sMl = cdZ.childNodes; var CtU = 0; var xLM = 0; for (CtU = 0; CtU < sMl.length; CtU++) { if (sMl[CtU] == WRL) { if (sMl[CtU + 1]) { Evi.FtH = sMl[CtU + 1]; Evi.Zvt = sMl[CtU + 1]; } else { Evi.FtH = null; Evi.Zvt = null; } xLM = CtU + 1; break; } } if (this.Lsb == Lightstreamer.PXe) { Evi.COn = cdZ; } else { Evi.COn = new Lightstreamer.nXS(Evi.GYS, Evi.Zvt, xLM); Evi.iQi = new Lightstreamer.Yac(); Evi.BDX = new Lightstreamer.Yac(); } return true; }, Qas: function(WUT, knL) { if (!WUT) { this.wae.PhQ("No template defined for table " + knL, "addTable"); return false; } var DpK = WUT.getAttribute(Lightstreamer.pFW); if (!DpK || DpK.toUpperCase() != Lightstreamer.ewr) { this.wae.PhQ("The template defined for table " + knL + " does not define the 'source' attribute.", "addTable"); return false; } gEJ = Lightstreamer.BLQ.gCq(WUT); for (var LMN = 0; LMN < gEJ.length; LMN++) { if (!gEJ[LMN].cfP.getAttribute("FIELD")) { this.wae.PhQ("Warning, no element in the template for table " + knL + " defines the 'field' attribute", "addTable"); return true; } } return true; }, KtI: function() { var WUT = this.Ovj.WUT; var gEJ = Lightstreamer.BLQ.gCq(WUT); var Weo = {}; var FIY = 0; for (FIY = 0; FIY < gEJ.length; FIY++) { var qSJ = gEJ[FIY].cfP.getAttribute("FIELD"); if (qSJ) { Weo[qSJ] = 1; } } return Weo; }, aKY: function(AmD, BhB) { this.wae.log('aKY', arguments); if (!AmD) { this.wae.CVC("No type selected, please select one: OFF, ELEMENT, PAGE", "setAutoScroll"); return; } AmD = new String(AmD); AmD = AmD.toUpperCase(); if (AmD == "ELEMENT") { if (!BhB) { this.wae.CVC("Please specify an element id in order to use ELEMENT autoscroll", "setAutoScroll"); return; } else { this.dEZ = BhB; } } else if (AmD != "PAGE" && AmD != "OFF") { this.wae.CVC(AmD + " is not a valid scroll type. Admitted values are OFF, ELEMENT, PAGE", "setAutoScroll"); return; } this.pLR = AmD; if (this.TVm) { this.PIT(); } }, PIT: function() { if (this.pLR == "ELEMENT") { if (this.dEZ && this.dEZ.appendChild) { } else { var rpr = document.getElementById(this.dEZ); if (!rpr) { this.wae.PhQ("Cannot find the element with " + this.dEZ + " as id.", "setAutoScroll"); this.pLR = "OFF"; } else { this.dEZ = rpr; } } } }, ZwT: function(qEa) { this.wae.log('ZwT', arguments); qEa = new String(qEa); qEa = qEa.toLowerCase(); if (qEa == "unlimited") { this.qEa = 0; } else { this.qEa = this.xQx(qEa, 'ZwT', this.qEa, true, 1); } }, PEn: function() { if (this.qEa == 0) { return "unlimited"; } return this.qEa; }, SxZ: function(cfP) { if (this.pLR == "OFF") { return; } var hsA = null; if (this.pLR == "ELEMENT") { hsA = this.dEZ; } var IwI = cfP.offsetTop; cfP = cfP.offsetParent; while ((cfP != hsA) && (cfP != null)) { IwI += cfP.offsetTop; cfP = cfP.offsetParent; } if (this.pLR == "PAGE") { window.scrollTo(0, IwI); } else { this.dEZ.scrollTop = IwI; } } }; Lightstreamer.CwL = function() { }; Lightstreamer.CwL.prototype = { Auq: function(DpK) { if (DpK == null) { return null; } else { return DpK.toString(); } }, Enq: function(GWh) { Lightstreamer.kRs.Enq(parseInt(GWh.win), parseInt(GWh.fXh), this.Auq(GWh.status), GWh.connection, GWh.context, GWh.policy, GWh.YwA, parseInt(GWh.uFh), this.Auq(GWh.GMO), this.Auq(GWh.AHB)); }, DAh: function(GWh) { Lightstreamer.ldq.uCQ[GWh.object].eZs(this.Auq(GWh.OZb), GWh.wNQ); }, Ims: function(GWh) { Lightstreamer.kRs.Ims(this.Auq(GWh.status), Lightstreamer.waO(GWh.JgP), this.Auq(GWh.GMO), this.Auq(GWh.AHB)); }, SMB: function(GWh) { Lightstreamer.kRs.bLr(GWh.rDc === true); }, apO: function() { if (Lightstreamer.fUO.xra()) { setTimeout(function() { Lightstreamer.fUO.xra(); }, 1000); } }, YgZ: function(GWh) { Lightstreamer.ldq.lEv(GWh.ZiO, this.Auq(GWh.soP), parseInt(GWh.jUw), parseInt(GWh.TSD)); }, Ywv: function(GWh) { var ldc = GWh.ldc; var LWQ = []; LWQ[0] = parseInt(ldc[0]); LWQ[1] = parseInt(ldc[1]); for (var CtU = 2, YSk = ldc.length; CtU < YSk; CtU++) { if (!ldc[CtU]) { if (ldc[CtU] === "") { LWQ[CtU] = ""; } else { LWQ[CtU] = null; } } else if (ldc[CtU].length == -1) { LWQ[CtU] = Lightstreamer.TjM; } else { LWQ[CtU] = ldc[CtU].toString(); } } Lightstreamer.rCG.dtL(LWQ, GWh.sgm ? true : false); }, DwL: function(GWh) { var LWQ = []; LWQ[0] = parseInt(GWh[0]); LWQ[1] = parseInt(GWh[1]); LWQ[2] = parseInt(GWh[2]); Lightstreamer.rCG.onLostUpdates(LWQ); }, CVc: function(GWh) { var LWQ = []; LWQ[0] = parseInt(GWh[0]); LWQ[1] = parseInt(GWh[1]); Lightstreamer.rCG.onEndOfSnapshot(LWQ); }, fEE: function(GWh) { Lightstreamer.rCG.mLc(parseInt(GWh.Grf), this.Auq(GWh.uJm), parseInt(GWh.jUw)); }, DKt: function(GWh) { Lightstreamer.kRs.eGt("onServerError", parseInt(GWh.Grf), this.Auq(GWh.uJm)); }, bsp: function(GWh) { Lightstreamer.rCG.wul(parseInt(GWh.Grf), parseInt(GWh.jUw)); }, dtJ: function(GWh) { Lightstreamer.kRs.eGt("onClientAlert", parseInt(GWh.EKx), this.Auq(GWh.aGq)); }, dYt: function(GWh) { Lightstreamer.kRs.eGt("onClientError", GWh); }, GFZ: function(GWh) { Lightstreamer.rCG.wul(9, this.Auq(GWh)); }, dwD: function(GWh) { Lightstreamer.rCG.WlK(parseInt(GWh.WmC), parseInt(GWh.EKx), this.Auq(GWh.uJm)); } }; Lightstreamer.CnC = function() { this.wae = Lightstreamer.QcC.getLogger("EH"); this.xZs = 2000; this.Dxu(); }; Lightstreamer.CnC.prototype = { Dxu: function(JhA) { this.Iin = false; this.uFh = null; this.dPd = false; this.esY = false; this.JoS = false; this.uRc = false; this.Jve = null; this.fXh = null; this.qWq = JhA ? this.qWq + 1 : Lightstreamer.aIL() + 1; this.JFo = null; this.OMl = false; this.OUu = false; this.wae.log('Dxu', this); }, toString: function() { return ["[", 'CnC', this.Jve, this.dPd, this.Iin, this.uFh, this.esY, this.JoS, this.uRc, this.OUu, this.fXh, this.qWq, this.OMl, "]"].join("|"); }, ILT: function(qbO, lNL) { if (lNL) { return qbO == this.qWq && lNL == this.fXh; } else { return qbO == this.qWq; } }, sfW: function() { var tek = false; try { tek = this.JFo.KmP.ILT(this.Jve); } catch (lSX) { this.wae.nKI(lSX, 'sfW'); tek = false; } if (!tek) { this.bLr(); } return tek; }, qof: function(vpb, GWh) { return this.uvZ(vpb, GWh, false, false); }, PCk: function(vpb, GWh) { return this.uvZ(vpb, GWh, true, false); }, NLu: function(vpb, GWh) { return this.uvZ(vpb, GWh, false, true); }, nsE: function(vpb, GWh) { return this.uvZ(vpb, GWh, true, true); }, uvZ: function(vpb, GWh, oAj, MXV) { if (!this.Iin) { return false; } this.wae.log('uvZ', vpb, oAj); try { if (MXV) { var COi = this.JFo.KmP.IVR(this.Jve); COi.otI.wkn(vpb, this.Jve, GWh, oAj ? this.fXh : null); } else { this.JFo.eBe.wkn(vpb, this.Jve, GWh, oAj ? this.fXh : null); } } catch (lSX) { this.BPx(lSX); return false; } return true; }, RXr: function(ACs, IIO) { if (this.Iin || this.dPd) { this.wae.EPl(false, 'RXr', 1); } this.dPd = true; this.qWq++; this.esY = IIO === true; try { this.JFo = ACs; var omk = null; if (this.esY) { var jcb = Lightstreamer.XVc(Lightstreamer.ldq.jcb); if (Lightstreamer.bnm.Ifk) { var DsS = Lightstreamer.ldq.uCQ; DsS.YwA.jcb = jcb; omk = { YwA: new Lightstreamer.Xek(DsS.YwA), policy: new Lightstreamer.Policy(DsS.policy), connection: new Lightstreamer.Connection(DsS.connection), context: new Lightstreamer.Context(DsS.context) }; this.wae.log('RXr', 1); } else { omk = { jcb: jcb }; this.wae.log('RXr', 2); } } else { this.wae.log('RXr', 3); } ACs.eBe.wkn('Qvl', -1, { win: window, dwB: this.qWq, configure: omk }); } catch (lSX) { this.Dxu(true); Lightstreamer.ldq.YZM(); return; } var dwB = Lightstreamer.ldq.UOs; setTimeout(Lightstreamer.IcY(this.IdA, this)(dwB), this.xZs); this.xZs += 500; }, IdA: function(dwB) { var DXh = Lightstreamer.ldq; if (dwB == DXh.UOs) { this.Dxu(true); this.wae.log('IdA'); DXh.NiK(dwB); } }, Enq: function(gCD, geF, DLx, connection, context, policy, YwA, uFh, GMO, AHB) { this.Iin = true; this.Jve = gCD; this.fXh = geF; this.uFh = uFh; if (Lightstreamer.bnm.Ifk) { this.JoS = true; } this.xZs = 2000; Lightstreamer.ldq.UOs++; if (DLx == Lightstreamer.JsO || DLx == Lightstreamer.rgV || DLx == Lightstreamer.smu) { this.uRc = true; } this.wae.log('Enq', this); var ldq = Lightstreamer.ldq; Lightstreamer.bnm.JoS(); Lightstreamer.fUO.dcY(); var uCQ = new Lightstreamer.Bjg(this.JFo.mIn, connection, context, policy, YwA); ldq.uCQ = uCQ; ldq.uCQ.qZw(DLx); if (this.uRc) { ldq.uCQ.Qxf(GMO, AHB); } if (this.esY && !this.JoS) { try { ldq.onEngineCreation(uCQ); } catch (lSX) { this.wae.hHu(lSX, ldq.onEngineCreation, "onEngineCreation"); } } try { ldq.onEngineReady(uCQ); } catch (lSX) { this.wae.hHu(lSX, ldq.onEngineReady, "onEngineReady"); } Lightstreamer.QcC.UPw(); this.YKl(DLx); if (this.uRc) { Lightstreamer.rCG.AgD(); } }, Ims: function(DLx, JgP, GMO, AHB) { if (JgP) { this.fXh = JgP; this.uRc = DLx == Lightstreamer.JsO || DLx == Lightstreamer.rgV; } this.wae.log('Ims', DLx, this); var ldq = Lightstreamer.ldq; ldq.uCQ.qZw(DLx); if (JgP) { if (this.uRc) { ldq.uCQ.Qxf(GMO, AHB); } } this.eGt("onStatusChange", DLx); this.YKl(DLx); if (JgP) { if (this.uRc) { Lightstreamer.rCG.AgD(); } else { Lightstreamer.rCG.khY(); } } }, YKl: function(DLx) { if (Lightstreamer.FlashBridge) { for (var CtU in Lightstreamer.FlashBridge.bridges) { var woM = Lightstreamer.FlashBridge.bridges[CtU]; if (woM && woM.KKJ) { woM.KKJ(DLx); } } } }, eGt: function(viH, VKi, KNI) { var uCQ = Lightstreamer.ldq.uCQ; if (uCQ[viH]) { try { uCQ[viH](VKi, KNI); } catch (lSX) { this.wae.hHu(lSX, uCQ[viH], viH); } } }, bLr: function(rDc) { this.wae.log('bLr', rDc, this); if (!this.Iin) { return; } var aWg = this.esY && !rDc; Lightstreamer.fUO.vEA(); Lightstreamer.fUO.EqE = null; this.Dxu(true); this.OUu = aWg; Lightstreamer.ldq.nhU(rDc); Lightstreamer.rCG.khY(); var ldq = Lightstreamer.ldq; try { ldq.onEngineLost(); } catch (lSX) { this.wae.hHu(lSX, ldq.onEngineLost, "onEngineLost"); } this.YKl("WAITING"); Lightstreamer.bnm.SWS(aWg); }, BPx: function(lSX) { if (!this.OMl) { this.wae.nKI(lSX, 'BPx'); } this.OMl = true; setTimeout(Lightstreamer.EoJ(Lightstreamer.fUO.xra, Lightstreamer.fUO), 1); }, VaN: function() { if (this.Iin && this.Jve || this.Jve === 0) { this.qof('JAH', this.Jve); } } }; Lightstreamer.NonVisualTable = function(wQW, Qum, Sik) { this.uAp(Lightstreamer.NonVisualTable, wQW, Qum, Sik); this.Lsb = Lightstreamer.ttB; this.pgL = null; this.keyCode = null; this.qqV = null; this.BUe = {}; this.qFb = null; this.wae.log("NonVisualTable", arguments); }; Lightstreamer.NonVisualTable.prototype = { gJl: function(knL, jek) { this.Hwd(Lightstreamer.NonVisualTable, 'gJl', knL, jek); if (this.Lsb == Lightstreamer.iZk || this.Lsb == Lightstreamer.IEi) { this.frG(); if (this.qFb) { this.XoR.suc(this.qFb); } } }, qQE: function() { this.Hwd(Lightstreamer.NonVisualTable, 'qQE'); if (this.Lsb == Lightstreamer.IEi) { this.aUm(); } }, setCommandLogic: function(Grf, FcR, JxQ, qFb, qqV) { if (Grf == "MULTI") { if (!qFb) { this.wae.CVC("The schema for the underlying tables cannot be null", "setCommandLogic"); return; } this.Lsb = Lightstreamer.IEi; if (FcR) { this.iMg(FcR, JxQ); } this.usF(qFb); this.qqV = qqV; } else if (Grf) { this.Lsb = Lightstreamer.iZk; if (FcR) { this.iMg(FcR, JxQ); } } else { this.Lsb = Lightstreamer.ttB; } }, shB: function(ldc) { var OJv = this.OJv; if (!OJv.BUe[this.aFa] || !OJv.BUe[this.aFa][this.cSr.KlH]) { return null; } var sRS = this.aFa; var rQk = {}; rQk[0] = OJv.dVR; rQk[1] = sRS; rQk.length = 2; var mOo = OJv.XoR.oxd() + 2; var y = 2; var CtU; for (; rQk.length < mOo; rQk.length++) { CtU = rQk.length; if (CtU == (OJv.keyCode + 1)) { rQk[CtU] = this.cSr.KlH; } else if (CtU == (OJv.pgL + 1)) { rQk[CtU] = "UPDATE"; } else if (CtU <= (OJv.XoR.Bnn() + 1)) { rQk[CtU] = Lightstreamer.TjM; } else if (ldc[y].length > -1) { rQk[CtU] = ldc[y]; y++; } else { rQk[CtU] = ldc[y]; y++; } } return rQk; } }; with (Lightstreamer) { svV(NonVisualTable, Table); if (Lightstreamer.qif) { svV(NonVisualTable, qif, "O"); } if (Lightstreamer.Lvh) { svV(NonVisualTable, Lvh, "O"); } } Lightstreamer.OverwriteTable = function(wQW, Qum, Sik) { this.uAp(Lightstreamer.OverwriteTable, wQW, Qum, Sik); this.Lsb = Lightstreamer.wfH; this.wae.log("OverwriteTable", arguments); }; Lightstreamer.OverwriteTable.prototype = { qQE: function() { this.Hwd(Lightstreamer.OverwriteTable, 'qQE'); this.wae.log('qQE'); if (this.MGs) { this.cSr = null; } if (this.eJo) { this.XoR = null; } this.MDR = null; this.fFI = null; }, gJl: function(knL, jek) { this.Hwd(Lightstreamer.OverwriteTable, 'gJl', knL, jek); this.wae.log('gJl', knL, jek); this.Lxk(); this.vvZ(); }, gte: function() { var Evi = this.Ovj; var VLi = Evi.UwS(); for (var fmY in VLi) { var xbO = this.cSr.YCO(fmY); if (this.onChangingValues) { try { this.onChangingValues(xbO, null, fmY); } catch (lSX) { this.wae.hHu(lSX, this.onChangingValues, "onChangingValues"); } } if (!this.TVm) { return; } for (var SVg in VLi[fmY]) { Evi.XYC(fmY, SVg); } } }, onChangingValues: function(pwe, Ugw, jOo) { return; }, ali: function(sRS, ldc, ngO) { var GhI = sRS; var XUb = this.MDR[sRS]; if (XUb == null) { return; } var WVC = Lightstreamer.Ycf; WVC.Dxu(this, GhI, ldc, ngO); WVC.fmY = XUb; if (this.onChangingValues) { var ZHY = this.cSr.VKL(sRS); try { this.onChangingValues(sRS, WVC, ZHY); } catch (lSX) { this.wae.hHu(lSX, this.onChangingValues, "onChangingValues"); } } if (!this.TVm) { return true; } this.lKi(GhI, XUb, GhI, false, WVC); } }; with (Lightstreamer) { svV(OverwriteTable, VisualTable); svV(OverwriteTable, TRw, "O"); } Lightstreamer.ScrollTable = function(wQW, Qum, Sik) { this.uAp(Lightstreamer.ScrollTable, wQW, Qum, Sik); this.IbA = 0; this.ESK = 1; this.VZk = 1; this.GMS = false; this.fYv = -1; this.FeA = null; this.nGO = null; this.Lsb = Lightstreamer.Fet; this.wae.log("ScrollTable", arguments); }; Lightstreamer.ScrollTable.prototype = { gJl: function(knL, jek) { this.Hwd(Lightstreamer.ScrollTable, 'gJl', knL, jek); this.wae.log('gJl', knL, jek); this.FeA = {}; this.nGO = {}; if (this.Ovj.IbA > this.fYv && this.fYv > -1) { this.IbA = this.fYv; } else { this.IbA = this.Ovj.IbA; } this.vvZ(); }, qQE: function() { this.Hwd(Lightstreamer.ScrollTable, 'qQE'); this.wae.log('qQE'); delete (this.FeA); delete (this.nGO); this.ESK = 1; this.VZk = 1; if (this.eJo) { this.XoR = null; } this.fFI = null; }, onChangingValues: function(Ugw) { return; }, onRowUpdate: function(DXI, oQr) { return; }, setUpwardScroll: function(UNH) { this.rBD(UNH); }, UNH: function() { return this.GMS; }, setLastVisibleRow: function(DXI) { this.fYv = this.xQx(DXI, "setLastVisibleRow", this.fYv, true, -1); }, Qqg: function() { return this.fYv; }, ali: function(sRS, ldc, ngO) { var Owk = null; var MXI = null; var ESE = null; var hWd = null; var cXQ; var DmP; if (!this.GMS) { cXQ = 1; DmP = this.VZk; if (this.VZk < this.IbA) { this.VZk++; } Owk = cXQ; MXI = this.IbA; } else { cXQ = this.IbA; DmP = 1; Owk = DmP; MXI = cXQ; } var GhI = this.ESK; this.ESK++; this.sNT(Owk, MXI, this.GMS, false); var WVC = Lightstreamer.Ycf; WVC.Dxu(this, sRS, ldc, ngO); WVC.fmY = cXQ; WVC.WmC = GhI; if (this.onChangingValues) { try { this.onChangingValues(WVC); } catch (lSX) { this.wae.hHu(lSX, this.onChangingValues, "onChangingValues"); } } this.Ovj.ZfF(sRS, cXQ, true); if (!this.TVm) { return true; } this.FeA[GhI] = cXQ; this.nGO[cXQ] = GhI; this.lKi(sRS, this.FeA[GhI], GhI, true, WVC); var ZNc = Lightstreamer.oQr; ZNc.Dxu(this, GhI, cXQ); if (this.onRowUpdate) { try { this.onRowUpdate(cXQ, ZNc); } catch (lSX) { this.wae.hHu(lSX, this.onRowUpdate, "onRowUpdate"); } } if (!this.TVm) { return true; } } }; with (Lightstreamer) { svV(ScrollTable, VisualTable); svV(ScrollTable, TRw, "O"); svV(ScrollTable, pDS, "O"); svV(ScrollTable, Hfh, "O"); } Lightstreamer.DynaScrollTable = function(wQW, Qum, Sik) { this.uAp(Lightstreamer.DynaScrollTable, wQW, Qum, Sik); this.qEa = 0; this.Mmo = 0; this.GMS = false; this.dEZ = null; this.pLR = "OFF"; this.Qwq = false; this.Lsb = Lightstreamer.PXe; this.wae.log("DynaScrollTable", arguments); }; Lightstreamer.DynaScrollTable.prototype = { gJl: function(knL, jek) { this.Hwd(Lightstreamer.DynaScrollTable, 'gJl', knL, jek); this.wae.log('gJl', knL, jek); this.vvZ(); }, qQE: function() { this.Hwd(Lightstreamer.DynaScrollTable, 'qQE'); this.wae.log('qQE'); this.Mmo = 0; this.Qwq = false; if (this.eJo) { this.XoR = null; } this.fFI = null; }, gte: function() { var Evi = this.Ovj; while (Evi.RAO() > 0); Evi.Gcu = 0; Evi.wWw = 1; Evi.QJx = []; Evi.Zvt = this.Ovj.FtH; }, setClearOnAdd: Lightstreamer.rgP, setUpwardScroll: function(UNH) { this.rBD(UNH); }, UNH: function() { return this.GMS; }, onChangingValues: function(MOG, Ugw) { return; }, setAutoScroll: function(type, BhB) { this.aKY(type, BhB); }, setMaxDynaRows: function(qEa) { this.ZwT(qEa); if (this.TVm && this.qEa > 0) { this.Ovj.VRf(this.qEa); } }, getMaxDynaRows: function() { return this.PEn(); }, ali: function(sRS, ldc, ngO) { var ngb = this.Ovj; ngb.Gcu++; var RDr = ngb.Gcu; var GhI = sRS; var WVC = Lightstreamer.Ycf; WVC.Dxu(this, GhI, ldc, ngO); WVC.fmY = RDr; var joe = ngb.COn; var ExG = ngb.WUT.cloneNode(true); ngb.QJx.push(ExG); var tYO = this.SFY(); gEJ = Lightstreamer.BLQ.gCq(ExG); var FIY = 0; for (FIY = 0; FIY < gEJ.length; FIY++) { var TqQ = gEJ[FIY]; var FDJ = TqQ.cfP.getAttribute("FIELD"); if (!FDJ) { continue; } ngb.npv(TqQ, RDr, FDJ, ngb.Lsb); } if (this.onChangingValues) { try { this.onChangingValues(ExG, WVC); } catch (lSX) { this.wae.hHu(lSX, this.onChangingValues, "onChangingValues"); } } if (!this.TVm) { return true; } if (ngb.Zvt == null || ngb.Zvt.parentNode == null) { joe.appendChild(ExG); } else { joe.insertBefore(ExG, ngb.Zvt); } this.lKi(GhI, RDr, GhI, false, WVC); if (tYO) { this.SxZ(ExG); } if (!this.GMS) { ngb.Zvt = ExG; } var hWd = null; this.Ovj.VRf(this.qEa); }, SFY: function() { if (this.pLR == "OFF") { return false; } if (Lightstreamer.NIS()) { return true; } var tcJ = null; if (this.pLR == "ELEMENT") { tcJ = this.dEZ; } else { tcJ = document.body; } if (tcJ.scrollTop < this.Mmo) { this.Qwq = true; } this.Mmo = tcJ.scrollTop; if (!this.Qwq) { return true; } if ((tcJ.clientHeight + tcJ.scrollTop) != tcJ.scrollHeight) { return false; } else { return true; } } }; with (Lightstreamer) { svV(DynaScrollTable, VisualTable); svV(DynaScrollTable, Hfh, "O"); svV(DynaScrollTable, xUm, "O"); } Lightstreamer.MetapushTable = function(wQW, Qum, Sik) { this.uAp(Lightstreamer.MetapushTable, wQW, Qum, Sik); this.IbA = 0; this.Vkw = 0; this.pgL = null; this.keyCode = null; this.Bvl = null; this.lCd = false; this.uFJ = false; this.NFI = false; this.fYv = -1; this.FeA = {}; this.nGO = {}; this.ZIf = {}; this.Lsb = Lightstreamer.gLk; this.wae.log("MetapushTable", arguments); }; Lightstreamer.MetapushTable.prototype = { gJl: function(knL, jek) { this.Hwd(Lightstreamer.MetapushTable, 'gJl', knL, jek); this.wae.log('gJl', knL, jek); this.FeA = {}; this.nGO = {}; if (this.Ovj.IbA > this.fYv && this.fYv > -1) { this.IbA = this.fYv; } else { this.IbA = this.Ovj.IbA; } this.vvZ(); this.frG(); }, qQE: function() { this.Hwd(Lightstreamer.MetapushTable, 'qQE'); this.wae.log('qQE'); delete (this.FeA); delete (this.nGO); this.Vkw = 0; this.ZIf = []; if (this.eJo) { this.XoR = null; } this.fFI = null; }, setClearOnAdd: Lightstreamer.rgP, getMetapushSortField: function() { return this.eQY(); }, getMetapushSortFieldName: function() { return this.mKl(); }, isDescendingSort: function() { return this.Zod(); }, isNumericSort: function() { return this.sOZ(); }, isCommaAsDecimalSeparator: function() { return this.BOb(); }, setLastVisibleRow: function(DXI) { this.fYv = this.xQx(DXI, "setLastVisibleRow", this.fYv, true, -1); }, Qqg: function() { return this.fYv; }, onChangingValues: function(Ugw) { return; }, onRowUpdate: function(DXI, oQr) { return; }, setMetapushFields: function(FcR, JxQ) { this.iMg(FcR, JxQ); }, setMetapushSort: function(CuG, lCd, uFJ, NFI) { this.sbn(CuG, lCd, uFJ, NFI); }, ali: function(GhI, ldc, ngO) { var acZ = this.SQq.bqs(GhI, this.pgL); var BBX = 1; if (this.Bvl != null) { BBX = this.SQq.bqs(GhI, this.Bvl); } var Owk = null; var MXI = null; if (acZ == "DELETE") { this.sNT(this.FeA[GhI], this.Vkw, true, false); this.wae.EPl(!ngO, 'ali', 1); var UBo = this.Ovj.hWe(this.Vkw); for (var fFI in UBo) { this.Ovj.XYC(this.Vkw, fFI); } delete this.nGO[this.Vkw]; delete this.ZIf[this.Vkw]; delete this.FeA[GhI]; this.GEI.eWU(GhI); this.kbv.eWU(GhI); this.Acx.eWU(GhI); this.SQq.eWU(GhI); if (this.Vkw > this.IbA) { this.Ovj.cEU(this.Vkw, true); } else { this.Ovj.cEU(this.Vkw, false); } if (this.onRowUpdate) { try { this.onRowUpdate(this.Vkw, null); } catch (lSX) { this.wae.hHu(lSX, this.onRowUpdate, "onRowUpdate"); } } if (!this.TVm) { return true; } this.Vkw--; } else { BBX = this.mPe(BBX); var WHg = this.FeA[GhI]; var JoK = true; if (WHg) { var etZ = this.ZIf[WHg]; if (etZ.toString() == BBX.toString()) { JoK = false; } } else { WHg = -1; this.Vkw++; } var Odq = (WHg == -1); var MNn = WHg; if (JoK) { MNn = 1; var fmY; for (fmY = 1; fmY <= this.Vkw; fmY++) { if (fmY == WHg) { continue; } var PNO = this.ZIf[fmY]; if (!PNO) { break; } if (this.Pvw(BBX, PNO)) { break; } MNn++; } if (MNn != WHg) { var sAY = false; var nsX = false; if (!Odq) { nsX = true; if (MNn < WHg) { Owk = MNn; MXI = WHg; } else { Owk = WHg; MXI = MNn; sAY = true; } } else { Owk = MNn; MXI = this.Vkw; } this.sNT(Owk, MXI, sAY, nsX); this.FeA[GhI] = MNn; this.nGO[MNn] = GhI; } this.ZIf[MNn] = BBX; } var WVC = Lightstreamer.Ycf; WVC.Dxu(this, GhI, ldc, ngO); WVC.fmY = this.FeA[GhI]; if (this.onChangingValues) { try { this.onChangingValues(WVC); } catch (lSX) { this.wae.hHu(lSX, this.onChangingValues, "onChangingValues"); } } this.Ovj.ZfF(GhI, MNn, Odq); if (!this.TVm) { return true; } this.lKi(GhI, this.FeA[GhI], GhI, Odq, WVC); var ZNc = Lightstreamer.oQr; ZNc.Dxu(this, GhI); if (this.onRowUpdate) { try { this.onRowUpdate(this.FeA[GhI], ZNc); } catch (lSX) { this.wae.hHu(lSX, this.onRowUpdate, "onRowUpdate"); } } if (!this.TVm) { return true; } } } }; with (Lightstreamer) { svV(MetapushTable, VisualTable); svV(MetapushTable, TRw, "O"); svV(MetapushTable, RWL, "O"); svV(MetapushTable, pDS, "O"); } Lightstreamer.DynaMetapushTable = function(wQW, Qum, Sik) { this.uAp(Lightstreamer.DynaMetapushTable, wQW, Qum, Sik); this.pgL = null; this.keyCode = null; this.Bvl = null; this.lCd = false; this.uFJ = false; this.NFI = false; this.dEZ = null; this.pLR = "OFF"; this.qEa = 0; this.Jve = 1; this.ftc = 0; this.vkf = false; this.Lsb = Lightstreamer.fJK; this.wae.log("DynaMetapushTable", arguments); }; Lightstreamer.DynaMetapushTable.prototype = { gJl: function(knL, jek) { this.Hwd(Lightstreamer.DynaMetapushTable, 'gJl', knL, jek); this.wae.log('gJl', knL, jek); this.vvZ(); this.frG(); }, qQE: function() { this.Hwd(Lightstreamer.DynaMetapushTable, 'qQE'); this.wae.log('qQE'); this.Jve = 1; this.ftc = 0; this.vkf = false; if (this.eJo) { this.XoR = null; } this.fFI = null; }, gte: function() { var eZv = null; var Evi = this.Ovj; for (var GhI in Evi.Vko) { var eZv = Evi.Vko[GhI]; if (this.onChangingValues) { try { this.onChangingValues(eZv.ExG(), null); } catch (lSX) { this.wae.hHu(lSX, this.onChangingValues, "onChangingValues"); } } eZv.parentNode.removeChild(eZv); Evi.cEU(GhI, true); } Evi.Gcu = 0; Evi.Zvt = Evi.FtH; }, setClearOnAdd: Lightstreamer.rgP, setMetapushFields: function(FcR, JxQ) { this.wae.log("setMetapushFields", arguments); if (this.TVm) { this.wae.CVC(this.XMs, "setMetapushFields"); return; } this.pgL = this.xQx(FcR, "setMetapushFields", this.pgL, true, 1); this.keyCode = this.xQx(JxQ, "setMetapushFields", this.keyCode, true, 1); }, onChangingValues: function(MOG, Ugw) { return; }, setAutoScroll: function(type, BhB) { this.aKY(type, BhB); }, setMetapushSort: function(CuG, lCd, uFJ, NFI) { this.sbn(CuG, lCd, uFJ, NFI); }, getMetapushSortField: function() { return this.eQY(); }, getMetapushSortFieldName: function() { return this.mKl(); }, isDescendingSort: function() { return this.Zod(); }, isNumericSort: function() { return this.sOZ(); }, isCommaAsDecimalSeparator: function() { return this.BOb(); }, setMaxDynaRows: function(qEa) { this.ZwT(qEa); if (this.TVm) { this.Pxk(); this.JAD(); this.xUT(1); } }, getMaxDynaRows: function() { return this.PEn(); }, onCurrentPagesChanged: function(IGE) { return; }, goToPage: function(Jve) { if (!this.TVm) { this.wae.CVC(this.hQQ, "goToPage"); return; } if (this.qEa == 0) { this.wae.CVC("Can't switch pages while 'no-page mode' is used", "goToPage"); return; } var PLS = new Number(Jve); if (isNaN(PLS)) { this.wae.CVC("A page number must be provided. " + Jve + " is not a valid value", "goToPage"); return; } if (PLS <= 0) { this.wae.CVC("A page number must be greater than 0. " + Jve + " is not a valid value", "goToPage"); return; } this.xUT(PLS); }, getDisplayedPage: function() { if (this.qEa == 0) { return 1; } else { return this.Jve; } }, getCurrentPages: function() { return this.ftc; }, ali: function(GhI, ldc, ngO) { var wAL = this.Ovj; var acZ = this.SQq.bqs(GhI, this.pgL); var BBX; if (this.Bvl != null) { BBX = this.mPe(this.SQq.bqs(GhI, this.Bvl)); } var uAT = null; var Clf = null; var joe = wAL.COn; var Hcg = wAL.iQi; var BDX = wAL.BDX; var BJH = wAL.Vko[GhI]; var tYO = true; if (!this.vkf || this.qEa > 0) { tYO = false; } var Tqf = false; var ExG = null; if (acZ == "DELETE") { tYO = false; if (BJH) { wAL.Gcu--; Tqf = true; if (this.onChangingValues) { try { this.onChangingValues(BJH.ExG(), null); } catch (lSX) { this.wae.hHu(lSX, this.onChangingValues, "onChangingValues"); } } if (!this.TVm) { return true; } if (BJH.parentNode == joe) { joe.removeChild(BJH); this.whM(Hcg, joe, this.qEa); } else if (BJH.parentNode == Hcg) { Hcg.removeChild(BJH); } else { BDX.removeChild(BJH); if (this.whM(joe, BDX, this.qEa * (this.Jve - 1))) { this.whM(Hcg, joe, this.qEa); } } this.wae.EPl(!ngO, 'ali', 3); this.GEI.eWU(GhI); this.kbv.eWU(GhI); this.Acx.eWU(GhI); this.SQq.eWU(GhI); wAL.cEU(GhI, true); } } else { var Mae = false; var XrR; if (!BJH) { ExG = new Lightstreamer.Dxl(this.jgw, GhI, GhI, this.keyCode); wAL.Vko[GhI] = ExG; } else { ExG = wAL.Vko[GhI]; uAT = ExG.parentNode; XrR = this.RJp(ExG); if (this.Bvl != null) { if (XrR != null && BBX != null) { if (XrR.toString() == BBX.toString()) { Mae = true; } } else if (XrR == null && BBX == null) { Mae = true; } } } var WVC = Lightstreamer.Ycf; WVC.Dxu(this, GhI, ldc, ngO); WVC.fmY = GhI; if (this.onChangingValues) { try { this.onChangingValues(ExG.ExG(), WVC); } catch (lSX) { this.wae.hHu(lSX, this.onChangingValues, "onChangingValues"); } } if (!this.TVm) { return true; } if (this.Bvl != null && Mae == false) { wAL.Kdg[GhI] = BBX; var mZd = 1; var UOP = wAL.Gcu; var BJB = -1; var FIY = -1; while (mZd < UOP) { FIY = Math.floor((mZd + UOP) / 2); var vqG = null; if (FIY <= wAL.Gcu) { var DgD = this.FBU(FIY); if (DgD == ExG) { vqG = XrR; BJB = FIY; } else { vqG = this.RJp(DgD); } } if (this.Pvw(BBX, vqG)) { UOP = FIY - 1; } else { mZd = FIY + 1; } } var PqC = -1; if (mZd == UOP) { var DgD = this.FBU(mZd); var PNO = this.RJp(DgD); if (this.Pvw(BBX, PNO)) { PqC = mZd; } else { PqC = mZd + 1; } } else { PqC = mZd; } this.qFi(PqC, ExG); if (!BJH) { wAL.Gcu++; Tqf = true; } } if (this.Bvl == null) { if (!BJH) { wAL.Gcu++; Tqf = true; if (Hcg.length > 0 || (joe.length == this.qEa && this.qEa > 0)) { Hcg.appendChild(ExG); } else if (joe.length > 0 || BDX.length == (this.qEa * (this.Jve - 1))) { joe.appendChild(ExG); } else { BDX.appendChild(ExG); } } } this.lKi(GhI, GhI, GhI, false, WVC); } if (ExG) { if (ExG.TdV) { if (tYO) { this.SxZ(ExG.TdV); } } } if (Tqf) { this.Pxk(); } }, JAD: function() { var HZw = this.Bvl; var BEM = new Lightstreamer.Yac(); var IYf = this.Ovj; var joe = IYf.COn; var Hcg = IYf.iQi; var BDX = IYf.BDX; var x = 1; while (IYf.Gcu > 0) { var PQL = this.FBU(x); if (!PQL) { IYf.Gcu--; x++; continue; } if (HZw == null) { BEM.appendChild(PQL); IYf.Gcu--; continue; } var NgS = PQL.GhI; if (NgS == "") { IYf.Gcu--; x++; continue; } var BBX = this.SQq.bqs(NgS, this.Bvl); BBX = this.mPe(BBX); IYf.Kdg[NgS] = BBX; var mZd = 0; var UOP = BEM.length - 1; while (mZd < UOP) { var FIY = Math.floor((mZd + UOP) / 2); var DgD = BEM.Uve(FIY); var Nlo = this.RJp(DgD); if (!Nlo) { this.wae.EPl(false, 'JAD', 1); } if (this.Pvw(BBX, Nlo)) { UOP = FIY - 1; } else { mZd = FIY + 1; } } var DgD = BEM.Uve(mZd); if (mZd == UOP) { var PNO = this.RJp(DgD); if (this.Pvw(BBX, PNO)) { BEM.insertBefore(PQL, DgD); } else { var SNN = BEM.Uve(UOP + 1); if (!SNN) { BEM.appendChild(PQL); } else { BEM.insertBefore(PQL, SNN); } } } else { if (DgD) { BEM.insertBefore(PQL, DgD); } else { BEM.appendChild(PQL); } } IYf.Gcu--; } var Mlw = 0; while (Mlw < BEM.length) { IYf.Gcu++; var cfP = BEM.Uve(Mlw); var vqG = cfP.GhI; if (IYf.Gcu <= (this.qEa * (this.Jve - 1))) { BDX.appendChild(cfP); } else if ((this.qEa <= 0) || (IYf.Gcu <= (this.qEa * this.Jve))) { joe.appendChild(cfP); } else { Hcg.appendChild(cfP); } } }, RJp: function(DgD) { if (!DgD) { return null; } var PNO = DgD.GhI; if (PNO == "") { return null; } return this.Ovj.Kdg[PNO]; }, xUT: function(ALG) { var Rqe = this.Ovj; var joe = Rqe.COn; var Hcg = Rqe.iQi; var BDX = Rqe.BDX; var DFY = this.Jve; if (DFY >= ALG) { while (this.hGP(BDX, joe, (ALG - 1) * this.qEa)) { this.hGP(joe, Hcg, this.qEa); } } else { while (this.whM(joe, BDX, (ALG - 1) * this.qEa)) { this.whM(Hcg, joe, this.qEa); } } this.Jve = ALG; }, qFi: function(CtU, TdV) { var Evi = this.Ovj; if (CtU > Evi.Gcu + 1) { return; } else if (CtU <= 0) { return; } if (TdV == this.FBU(CtU)) { return; } var uAT = TdV.parentNode; var FUr; var joe = Evi.COn; var Hcg = Evi.iQi; var BDX = Evi.BDX; var FaA = this.FBU(CtU); if (FaA == null) { if (Hcg.length > 0 || (joe.length == this.qEa && this.qEa > 0)) { Hcg.appendChild(TdV); FUr = Hcg; } else if (this.qEa == 0 || joe.length > 0 || BDX.length == (this.qEa * (this.Jve - 1))) { joe.appendChild(TdV); FUr = joe; } else { BDX.appendChild(TdV); FUr = BDX; } } else { FUr = FaA.parentNode; FUr.insertBefore(TdV, FaA); } if (FUr == joe) { if ((!uAT) || (uAT == Hcg)) { this.hGP(joe, Hcg, this.qEa); } else if (uAT == BDX) { this.whM(joe, BDX, this.qEa * (this.Jve - 1)); } } else if (FUr == BDX) { if (uAT != BDX) { if (this.hGP(BDX, joe, this.qEa * (this.Jve - 1))) { this.hGP(joe, Hcg, this.qEa); } } } else if (FUr == Hcg) { if (uAT == BDX) { this.whM(joe, BDX, this.qEa * (this.Jve - 1)); } this.whM(Hcg, joe, this.qEa); } }, whM: function(saU, gkA, bgg) { if (this.qEa <= 0) { return false; } if (gkA.length < bgg && saU.length > 0) { var mWt = saU.Uve(0); gkA.appendChild(mWt); return true; } return false; }, hGP: function(saU, gkA, Mfl) { if (this.qEa <= 0) { return false; } if (saU.length > Mfl) { var mWt = saU.Uve(saU.length - 1); gkA.insertBefore(mWt, gkA.Uve(0)); return true; } return false; }, FBU: function(CtU) { var Evi = this.Ovj; var joe = Evi.COn; var Hcg = Evi.iQi; var BDX = Evi.BDX; if (CtU > Evi.Gcu) { return null; } else if (CtU <= 0) { return null; } if (CtU <= BDX.length) { return BDX.Uve(CtU - 1); } else { CtU -= BDX.length; if (CtU <= joe.length) { return joe.Uve(CtU - 1); } else { CtU -= joe.length; return Hcg.Uve(CtU - 1); } } this.wae.EPl(false, 'FBU', CtU, this.jgw); return null; }, Pxk: function() { var CbU = 0; if (this.qEa <= 0) { CbU = 1; } else { CbU = Math.ceil(this.Ovj.Gcu / this.qEa); } if (this.ftc != CbU) { this.ftc = CbU; if (this.onCurrentPagesChanged) { try { this.onCurrentPagesChanged(this.ftc); } catch (lSX) { this.wae.hHu(lSX, this.onCurrentPagesChanged, "onCurrentPagesChanged"); } } } return CbU; } }; with (Lightstreamer) { svV(DynaMetapushTable, VisualTable); svV(DynaMetapushTable, RWL, "O"); svV(DynaMetapushTable, xUm, "O"); } Lightstreamer.MultiDynaMetapushTable = function(wQW, Qum, Sik, NGu) { this.uAp(Lightstreamer.MultiDynaMetapushTable, wQW, Qum, Sik); this.qqV = null; this.BUe = {}; this.AAA = false; this.qFb = null; this.Lsb = Lightstreamer.fNO; this.usF(NGu); this.wae.log("MultiDynaMetapushTable", arguments); }; Lightstreamer.MultiDynaMetapushTable.prototype = { setUnderDataAdapter: function(Tth) { this.wae.log("setUnderDataAdapter", arguments); this.qqV = Tth; }, qQE: function() { this.Hwd(Lightstreamer.MultiDynaMetapushTable, 'qQE'); this.wae.log('qQE'); if (this.AAA && !this.eJo && this.XoR.Kwx != null) { this.XoR.nameList = this.XoR.originalList; this.XoR.xKS = this.XoR.LjK; this.XoR.originalList = null; this.XoR.LjK = null; } if (this.AAA) { this.qFb = null; } this.cmq = null; this.aUm(); } }; with (Lightstreamer) { svV(MultiDynaMetapushTable, DynaMetapushTable); svV(MultiDynaMetapushTable, Lvh, "O"); } Lightstreamer.Ojq = function() { }; Lightstreamer.Ojq.prototype = { DgL: function(wNQ, lJI, Gbb) { var pSX = new Number(wNQ); var wPO = (pSX - lJI) / Gbb; return Math.round(wPO); }, AEO: function(wNQ, lJI, Gbb) { return (wNQ * Gbb) + lJI; }, fWf: function() { for (var YSk = 0; YSk < this.cUx.length; YSk++) { if (this.cUx[YSk] && Lightstreamer.BLQ.Nhi(this.cUx[YSk])) { this.cUx[YSk].parentNode.removeChild(this.cUx[YSk]); } } this.cUx = []; } }; Lightstreamer.ChartTable = function(wQW, Qum, Sik) { this.uAp(Lightstreamer.ChartTable, wQW, Qum, Sik); this.dBr = null; this.bhU = document.createElement("div"); this.bhU.style.position = "relative"; this.bhU.style.overflow = "visible"; this.offsetY = 0; this.offsetX = 0; this.screenX = null; this.screenY = null; this.TsO = {}; this.cUx = []; this.LvR = new Lightstreamer.LabelFormatter(); this.ITH = false; this.cTW = 0; this.YCj = null; this.mNr = null; this.ObZ = null; this.Cjh = null; this.SQq = null; this.Acx = null; this.GEI = null; this.kbv = null; this.Lsb = Lightstreamer.tBp; this.wae.log("ChartTable", arguments); }; Lightstreamer.ChartTable.prototype = { dvk: function(id) { this.wae.log('dvk', 1, id); var knL = Lightstreamer.AsQ(id); var gEJ; gEJ = Lightstreamer.BLQ.gCq(document); var FIY = 0; for (FIY = 0; FIY < gEJ.length; FIY++) { var oVR = gEJ[FIY].cfP.getAttribute("table"); if (!oVR || oVR != id) { continue; } this.nkk(gEJ[FIY].cfP); Lightstreamer.rCG.wYK[knL] = true; return true; } this.OGR(); return false; }, YBc: function(SEI) { this.wae.log('YBc', SEI); if (!this.TsO) { this.TsO = SEI.TsO; for (var bHP in this.TsO) { this.TsO[bHP].pUR(this); } } else for (var bHP in SEI.TsO) { if (!this.TsO[bHP]) { this.TsO[bHP] = SEI.TsO[bHP]; } this.TsO[bHP].pUR(this); } var dLf = Lightstreamer.BLQ.Nhi(SEI.bhU); if (dLf) { this.bhU = SEI.bhU; this.dBr = SEI.dBr; } if (!this.cUx) { this.cUx = SEI.cUx; } if (!this.YCj) { this.YCj = SEI.YCj; } if (!this.mNr) { this.mNr = SEI.mNr; } if (!this.ObZ) { this.ObZ = SEI.ObZ; } if (!this.Cjh) { this.Cjh = SEI.Cjh; } if (!this.screenX) { this.screenX = SEI.screenX; } if (!this.offsetY) { this.offsetY = SEI.offsetY; } if (!this.offsetX) { this.offsetX = SEI.offsetX; } if (!this.screenY) { this.screenY = SEI.screenY; } if (!this.cTW) { this.cTW = SEI.cTW; } if (!this.iHJ) { this.iHJ = SEI.iHJ; } }, gte: function() { this.fWf(); for (var bHP in this.TsO) { this.TsO[bHP].fWf(); delete (this.TsO[bHP]); } if (this.dBr && Lightstreamer.BLQ.Nhi(this.dBr)) { this.dBr.parentNode.removeChild(this.dBr); } delete (this.dBr); this.nkk(this.bhU.parentNode); }, setAreaClass: function(HCq) { if (!this.dBr) { this.HCq = HCq; } else { this.dBr.className = HCq; } this.wae.log("setAreaClass", HCq); }, setAreaTop: function(top) { this.offsetY = this.xQx(top, "setAreaTop", this.offsetY, false, 0); if (this.dBr) { this.dBr.style.top = this.offsetY; } }, setAreaLeft: function(left) { this.offsetX = this.xQx(left, "setAreaLeft", this.offsetX, false, 0); if (this.dBr) { this.dBr.style.left = this.offsetX; } }, setAreaWidth: function(width) { this.screenX = this.xQx(width, "setAreaWidth", this.screenX, false, 0); if (this.dBr) { this.dBr.style.width = this.screenX; if (this.ObZ != null) { this.fZw(); this.KjJ(); for (var GqD in this.TsO) { if (!this.TsO[GqD]) { continue; } else if (this.TsO[GqD].CKk.length > 0) { this.TsO[GqD].CKN(); } } } } }, setAreaHeight: function(height) { this.screenY = this.xQx(height, "setAreaHeight", this.screenY, false, 0); if (this.dBr) { this.dBr.style.height = this.screenY; for (var GqD in this.TsO) { if (!this.TsO[GqD]) { continue; } else if (this.TsO[GqD].bFi != null) { this.TsO[GqD].Ywo(); this.TsO[GqD].EaJ(); if (this.TsO[GqD].CKk.length > 0) { this.TsO[GqD].CKN(); } } } } }, nkk: function(ioH) { if (this.dBr) { return; } if (ioH && ioH.appendChild) { this.dBr = document.createElement("div"); this.dBr.style.position = "absolute"; this.dBr.style.overflow = "hidden"; this.bhU.appendChild(this.dBr); this.dBr.className = this.HCq; this.dBr.style.top = this.offsetY + "px"; this.dBr.style.left = this.offsetX + "px"; this.dBr.style.width = this.screenX + "px"; this.dBr.style.height = this.screenY + "px"; if (this.bhU.parentNode != ioH) { ioH.appendChild(this.bhU); } if (this.screenX == null) { this.screenX = ioH.offsetWidth; } if (this.screenY == null) { this.screenY = ioH.offsetHeight; } if (this.ObZ != null) { this.fZw(); this.KjJ(); } for (var GqD in this.TsO) { if (!this.TsO[GqD]) { continue; } else if (this.TsO[GqD].bFi != null) { this.TsO[GqD].Ywo(); this.TsO[GqD].EaJ(); } } this.wae.log('nkk', ioH); } else { this.OGR(); } }, OGR: function() { this.wae.PhQ("A DOM element must be provided as an anchor for the chart", "addTable"); }, uvX: function() { if (this.dBr) { return this.dBr.cloneNode(true); } else { this.wae.PhQ("Sorry, nothing to photograph", 'uvX'); } }, removeLine: function(id) { if (this.TsO[id]) { this.TsO[id].uGk(); this.TsO[id].fWf(); this.TsO[id] = null; } else { this.wae.PhQ("No line to remove with id " + id, "removeLine"); } }, AYn: function(vTJ, Udq, OQD, sPX) { this.wae.log('AYn', arguments); var qnA = document.createElement("div"); if (vTJ != null) { qnA.className = vTJ; } qnA.style.position = "absolute"; var ZSC = document.createTextNode(Udq); qnA.appendChild(ZSC); this.bhU.appendChild(qnA); var UIl = qnA.offsetWidth; if (sPX.toUpperCase() == "X") { qnA.style.top = (this.screenY + 5 + this.offsetY) + "px"; qnA.style.left = (OQD - (qnA.offsetWidth / 2) + this.offsetX) + "px"; } else if (sPX.toUpperCase() == "Y") { qnA.style.left = (this.offsetX - UIl) + "px"; qnA.style.top = ((this.screenY - OQD) - (qnA.offsetHeight / 2) + this.offsetY) + "px"; } return qnA; }, addLine: function(bwg, id) { this.wae.log("addLine", bwg); bwg.pUR(this); if (this.TsO[id] != null) { this.wae.PhQ("A line with this id already exists. Overwriting", "addLine"); } bwg.PPR(id); bwg.pwe = this.cSr.YCO(bwg.WpG); bwg.pJH = this.XoR.qFa(bwg.JHB); if (!bwg.bFi || !bwg.JoH || !bwg.pJH) { this.wae.CVC("Cannot create line. Please declare the Y axis", "addLine"); return; } if (this.screenY != null && this.dBr) { bwg.Ywo(); bwg.EaJ(); } this.TsO[id] = bwg; }, PAt: function(WxW, CID, Njo) { this.wae.log('PAt', arguments); var wpJ = this.TsO[Njo]; var oEf = this.LAJ(WxW); var Hwj = wpJ.HPG(CID); if (wpJ.sHs == null) { wpJ.sHs = oEf; wpJ.OBn = Hwj; return; } this.wae.log('PAt', 0, wpJ.sHs, wpJ.OBn, oEf, Hwj); var dvJ = oEf - wpJ.sHs; var NBf = Hwj - wpJ.OBn; this.wae.log('PAt', 1, "X", dvJ, "Y", NBf); var eFJ = Math.abs(dvJ); var EZT = Math.abs(NBf); var kSH = null; var PIk = 0; var KiI = 0; var LmU = 0; if (eFJ >= EZT) { LmU = NBf / dvJ; PIk = dvJ; KiI = dvJ >= 0 ? 1 : -1; } else { LmU = dvJ / NBf; PIk = NBf; KiI = NBf >= 0 ? 1 : -1; } var VaU = 0; var ovH = 0; var eqa = null; var fSG = null; var EnT = true; var AcU = true; if (eFJ < EZT) { AcU = false; } for (var CtU = 0; CtU != PIk; CtU += KiI) { var LaE = 0; var UMS = 0; var RHU = 0; var LPO = 0; var bdl = false; this.wae.log('PAt', 2); if ((CtU + KiI) == PIk) { this.wae.log('PAt', 6); bdl = true; EnT = true; } kSH = document.createElement("div"); if (bdl) { kSH.className = wpJ.WZS; } else { kSH.className = wpJ.EpW; } kSH.style.position = "absolute"; kSH.style.fontSize = "0px"; this.dBr.appendChild(kSH); wpJ.Cec[wpJ.Cec.length] = kSH; if (EnT) { EnT = false; eqa = Math.ceil(kSH.offsetWidth / 2); fSG = Math.ceil(kSH.offsetHeight / 2); VaU = kSH.offsetWidth; ovH = kSH.offsetHeight; this.wae.log('PAt', 3, VaU, ovH); } RHU = VaU; LPO = ovH; if (AcU) { LaE = Math.round(CtU + wpJ.sHs); UMS = Math.round(this.screenY - (LmU * CtU + wpJ.OBn)); if (!bdl) { var jhl = 0; while (((CtU + KiI) != (PIk - KiI)) && (UMS == Math.round(this.screenY - (LmU * (CtU + KiI) + wpJ.OBn)))) { CtU += KiI; jhl++; } this.wae.log('PAt', 4, jhl); var cVl = eqa * jhl; RHU = VaU + cVl; if (KiI < 0) { LaE -= cVl; } } } else { LaE = Math.round(LmU * CtU + wpJ.sHs); UMS = Math.round(this.screenY - (CtU + wpJ.OBn)); if (!bdl) { var jhl = 0; while (((CtU + KiI) != (PIk - KiI)) && (LaE == Math.round(LmU * (CtU + KiI) + wpJ.sHs))) { CtU += KiI; jhl++; } this.wae.log('PAt', 5, jhl); var cVl = fSG * jhl; LPO = ovH + cVl; if (KiI > 0) { UMS -= cVl; } } } LaE -= Math.floor(eqa / 2); UMS -= Math.floor(fSG / 2); kSH.style.left = LaE + "px"; kSH.style.top = UMS + "px"; kSH.style.width = RHU + "px"; kSH.style.height = LPO + "px"; this.wae.log('PAt', 7, kSH.style.left, kSH.style.top, kSH.style.width, kSH.style.height); this.wae.log('PAt', 8, kSH.offsetLeft, kSH.offsetTop, kSH.offsetWidth, kSH.offsetHeight); } this.wae.log('PAt', 10); wpJ.sHs = oEf; wpJ.OBn = Hwj; }, setXAxis: function(field, NFI) { this.wae.log("setXAxis", arguments); this.YCj = this.XoR.qFa(field); if (NFI) { this.ITH = true; } else { this.ITH = false; } }, positionXAxis: function(min, max) { this.wae.log("positionXAxis", arguments); this.ObZ = this.xQx(max, "positionXAxis", this.ObZ); this.mNr = this.xQx(min, "positionXAxis", this.mNr); if (this.dBr) { if (this.screenX != null) { this.fZw(); this.KjJ(); } for (var GqD in this.TsO) { if (!this.TsO[GqD]) { continue; } else if (this.TsO[GqD].CKk.length > 0) { this.TsO[GqD].CKN(); } } } this.wae.log("positionXAxis", 2); }, fZw: function() { this.Cjh = (this.ObZ - this.mNr) / this.screenX; this.wae.log('fZw', this.Cjh); }, setXLabels: function(SON, Khf, LvR) { this.cTW = SON; this.iHJ = Khf; if (LvR != null) { this.LvR = LvR; } if (this.Cjh != null && this.dBr) { this.KjJ(); } this.wae.log("setXLabels", arguments); }, KjJ: function() { this.fWf(); var VGb = ""; var OQD = -1; if (this.cTW <= 0) { return; } if (this.cTW > 0) { VGb = this.LvR.formatValue(this.mNr); OQD = this.LAJ(this.mNr); this.cUx[this.cUx.length] = this.AYn(this.iHJ, VGb, OQD, "X"); } if (this.cTW > 1) { VGb = this.LvR.formatValue(this.ObZ); OQD = this.LAJ(this.ObZ); this.cUx[this.cUx.length] = this.AYn(this.iHJ, VGb, OQD, "X"); } if (this.cTW > 2) { var LAO = this.cTW - 1; var TAV = (this.ObZ - this.mNr) / LAO; var UWw = this.mNr; for (var gRh = 1; gRh < LAO; gRh++) { UWw += TAV; VGb = this.LvR.formatValue(UWw); OQD = this.LAJ(UWw); this.cUx[this.cUx.length] = this.AYn(this.iHJ, VGb, OQD, "X"); } } this.wae.log('KjJ', arguments); }, onXOverflow: function(sHs, DJh, Hcp) { this.wae.log("onXOverflow", arguments); if (sHs > Hcp) { var xUD = (Hcp + DJh) / 2; var pdH = Hcp - DJh; this.positionXAxis(xUD, xUD + pdH); } else { } }, LAJ: function(wNQ) { return this.DgL(wNQ, this.mNr, this.Cjh); }, ali: function(sRS, ldc, ngO) { var GhI = sRS; for (var GqD in this.TsO) { if (!this.TsO[GqD]) { continue; } else if (sRS == this.TsO[GqD].pwe) { var LOc = null; var wNQ = this.SQq.bqs(sRS, this.YCj); LOc = Lightstreamer.bhc(wNQ, this.ITH); if (LOc < this.mNr) { continue; } if (LOc > this.ObZ) { if (this.onXOverflow) { try { this.onXOverflow(LOc, this.mNr, this.ObZ); } catch (lSX) { this.wae.hHu(lSX, this.onXOverflow, "onXOverflow"); } } if (!this.TVm) { return; } } var kro = null; var wNQ = this.SQq.bqs(sRS, this.TsO[GqD].pJH); kro = Lightstreamer.bhc(wNQ, this.CLU); if (kro > this.TsO[GqD].bFi || kro < this.TsO[GqD].JoH) { if (this.TsO[GqD].onYOverflow) { try { this.TsO[GqD].onYOverflow(kro, this.TsO[GqD].JoH, this.TsO[GqD].bFi); } catch (lSX) { this.wae.hHu(lSX, this.TsO[GqD].onYOverflow, "onYOverflow"); } } if (!this.TVm) { return; } } var rqc = this.TsO[GqD].CKk.length; this.TsO[GqD].CKk[rqc] = LOc; rqc = this.TsO[GqD].ZiV.length; this.TsO[GqD].ZiV[rqc] = kro; this.PAt(LOc, kro, GqD); } } } }; with (Lightstreamer) { svV(ChartTable, VisualTable); svV(ChartTable, Ojq, "O"); } Lightstreamer.ChartLine = function() { this.joe = null; this.WpG = null; this.pwe = null; this.knL = null; this.WZS = ""; this.EpW = ""; this.CLU = false; this.BGh = null; this.pJH = null; this.JoH = null; this.bFi = null; this.BfS = null; this.PVl = 0; this.LvR = new Lightstreamer.LabelFormatter(); this.Cec = []; this.CKk = []; this.ZiV = []; this.cUx = []; this.sHs = null; this.OBn = null; this.wae = Lightstreamer.QcC.getLogger("TL"); this.wae.log("ChartLine", arguments); }; Lightstreamer.ChartLine.prototype = { xQx: Lightstreamer.BZa, uGk: function() { this.wae.log('uGk', this.knL); if (this.Cec[0] && Lightstreamer.BLQ.Nhi(this.Cec[0])) { for (var PgH = 0; PgH < this.Cec.length; PgH++) { this.Cec[PgH].parentNode.removeChild(this.Cec[PgH]); } } this.Cec = []; this.ZiV = []; this.CKk = []; this.sHs = null; this.OBn = null; }, CKN: function() { this.wae.log('CKN', 1); var Qsx = this.CKk; var fRK = this.ZiV; this.uGk(); var uAT = false; var tvL, PnW; while (Qsx.length > 0) { if ((Qsx.length > 1 && Qsx[1] >= this.joe.mNr) || Qsx[0] >= this.joe.mNr) { this.joe.PAt(Qsx[0], fRK[0], this.knL); this.CKk[this.CKk.length] = Qsx[0]; this.ZiV[this.ZiV.length] = fRK[0]; } Lightstreamer.wcq(Qsx); Lightstreamer.wcq(fRK); } this.wae.log('CKN', 2); }, pUR: function(joe) { this.joe = joe; this.wae.log('pUR', joe); }, PPR: function(knL) { this.knL = knL; this.wae.log('PPR', knL); }, setPointClass: function(xlD) { this.WZS = xlD; this.wae.log("setPointClass", xlD); }, setLineClass: function(jmu) { this.EpW = jmu; this.wae.log("setLineClass", jmu); }, setYAxis: function(item, field, NFI) { this.wae.log("setYAxis", arguments); this.WpG = item; this.JHB = field; if (NFI) { this.CLU = true; } else { this.CLU = false; } }, positionYAxis: function(min, max) { this.wae.log("positionYAxis", arguments); this.bFi = this.xQx(max, "positionYAxis", this.bFi); this.JoH = this.xQx(min, "positionYAxis", this.JoH); if (this.joe && this.joe.screenY != null && this.joe.dBr && this.joe.dBr.parentNode) { this.Ywo(); this.EaJ(); if (this.CKk.length > 0) { this.CKN(); } } this.wae.log("positionYAxis", 2); }, Ywo: function() { this.BfS = (this.bFi - this.JoH) / this.joe.screenY; ; this.wae.log('Ywo', this.BfS); }, setYLabels: function(SON, Khf, LvR) { this.PVl = SON; this.tgY = Khf; if (LvR != null) { this.LvR = LvR; } if (this.BfS != null && this.joe && this.joe.dBr && this.joe.dBr.parentNode) { this.EaJ(); } this.wae.log("setYLabels", arguments); }, EaJ: function() { this.fWf(); var VGb = ""; var OQD = -1; if (this.PVl <= 0) { return; } if (this.PVl > 0) { VGb = this.LvR.formatValue(this.JoH); OQD = this.HPG(this.JoH); this.cUx[this.cUx.length] = this.joe.AYn(this.tgY, VGb, OQD, "Y"); } if (this.PVl > 1) { VGb = this.LvR.formatValue(this.bFi); OQD = this.HPG(this.bFi); this.cUx[this.cUx.length] = this.joe.AYn(this.tgY, VGb, OQD, "Y"); } if (this.PVl > 2) { var LAO = this.PVl - 1; var TAV = (this.bFi - this.JoH) / LAO; var UWw = this.JoH; for (var gRh = 1; gRh < LAO; gRh++) { UWw += TAV; VGb = this.LvR.formatValue(UWw); OQD = this.HPG(UWw); this.cUx[this.cUx.length] = this.joe.AYn(this.tgY, VGb, OQD, "Y"); } } this.wae.log('EaJ', arguments); }, onYOverflow: function(OBn, lcv, FkI) { this.wae.log("onYOverflow", arguments); var AfP = (FkI - lcv) / 2; if (OBn > FkI) { var WhZ = FkI + AfP; if (OBn > WhZ) { WhZ = OBn; } this.positionYAxis(lcv, WhZ); } else if (OBn < lcv) { var xhO = lcv - AfP; if (OBn < xhO) { xhO = OBn; } this.positionYAxis(xhO, FkI); } }, HPG: function(wNQ) { return this.DgL(wNQ, this.JoH, this.BfS); } }; Lightstreamer.svV(Lightstreamer.ChartLine, Lightstreamer.Ojq, "O"); Lightstreamer.LabelFormatter = function() { }; Lightstreamer.LabelFormatter.prototype = { formatValue: function(pSX) { return pSX; } }; Lightstreamer.ldq = null; with (Lightstreamer) { Lightstreamer.rCG = new WDE(); Lightstreamer.kRs = new CnC(); Lightstreamer.Raq = new Dew(kRs, new Lightstreamer.CwL(), false); Lightstreamer.fUO = new SDP(); Lightstreamer.kcP = new AvS(function() { var EUe = []; EUe.push(function() { if (Lightstreamer.ldq) { Lightstreamer.ldq.TQB(); } }); EUe.push(function() { if (Lightstreamer.FlashBridge) { Lightstreamer.FlashBridge.vVk(); } }); return EUe; } ()); QcC.StT(); hIT("beforeunload", function() { if (Lightstreamer.ldq) { Lightstreamer.ldq.Cuw(); } }); hIT("unload", function() { Lightstreamer.rCG.uBu(); Lightstreamer.kRs.VaN(); KbK = true; }); Lightstreamer.bGT = new mBA(); Lightstreamer.Cve = new dXg(); Lightstreamer.bnm = new Lcd(); if (Lightstreamer.qZv) { Lightstreamer.IIX = new qZv(20); } if (Cve.FiV()) { Cve.qrx(); } OWa(); if (!Lightstreamer.avoidLSGlobals) { MaR(); } Lightstreamer.oQr = new RowInfo(); Lightstreamer.Ugw = new UpdateItemInfo(); Lightstreamer.Ycf = new VisualUpdateInfo(); } Lightstreamer.orR.log("pushpage", "pushpage parsed");
function Arrow(f) { if (f < 0) return '<img src="http://i.euroinvestor.com/downsmall.gif" style="vertical-align:middle" width="8px" height="4px" border="0" alt="down" />'; if (f > 0) return '<img src="http://i.euroinvestor.com/upsmall.gif" style="vertical-align:middle" width="8px" height="4px" border="0" alt="up" />'; return '<img src="http://i.euroinvestor.com/marketoverview/risingfallinggrayarrow.png" style="vertical-align:baseline;padding-right:3px" width="4px" height="8px" border="0" alt="unchanged" />' } function JSFormatChange(f, g, d, o, k, l, n, u) { var i = "", h = "", j = ""; f = f.toFixed(g); if (o) i = "%"; if (k) j += "&nbsp;" + Arrow(f); if (d) { if (f > 0) h += ' class="green"'; else if (f < 0) h += ' class="red"'; if (n && iNumber == 0) h += ' class="white"' } d = ""; if (u && !(f < 0)) d = "+"; return l ? "<span" + h + ">" + j + "&nbsp;" + d + JSFloatToLocalizedString(f, g) + i + "</span>" : "<span" + h + ">" + d + JSFloatToLocalizedString(f, g) + i + j + "</span>" } function JSTimeAspFormat(f, g) { var d = f.getUTCHours(); g = g.replace("HH", d < 10 ? "0" + d : "" + d); g = g.replace("H", "" + d); g = g.replace("hh", d > 11 ? d > 21 ? "" + (d - 12) : "0" + (d - 12) : d > 9 ? "" + d : "0" + d); g = g.replace("h", d > 11 ? "" + (d - 12) : "" + d); g = g.replace("tt", d > 11 ? "PM" : "AM"); d = f.getUTCMinutes(); g = g.replace("mm", d < 10 ? "0" + d : "" + d); g = g.replace("m", "" + d); f = f.getUTCSeconds(); g = g.replace("ss", f < 10 ? "0" + f : "" + f); return g = g.replace("s", "" + f) } function getLSDomain(f) { if (document.domain == "localhost") return "localhost"; f = f.split("."); for (var g = "", d = 1; d < f.length; d++) g += f[d] + "."; return g.substr(0, g.length - 1) } function isBot() { return navigator.userAgent.toLowerCase().indexOf("bot") > -1 } var lsPage = null, lsDomain = getLSDomain(document.domain); function lsInstrumentStream(f, g) { f = f; var d = 0; this.offsetHours = function(b) { d = b }; var o = false; this.enableRowId = function(b) { o = b }; var k = false; this.enableLast = function(b) { k = b }; var l = 4; this.roundLast = function(b) { l = b }; var n = false; this.enableVolume = function(b) { n = b }; var u = 4; this.roundVolume = function(b) { u = b }; var i = false; this.enableBid = function(b) { i = b }; var h = 4; this.roundBid = function(b) { h = b }; var j = false; this.enableAsk = function(b) { j = b }; var p = 4; this.roundAsk = function(b) { p = b }; var q = false; this.enableLow = function(b) { q = b }; var r = 4; this.roundLow = function(b) { r = b }; var s = false; this.enableHigh = function(b) { s = b }; var t = 4; this.roundHigh = function(b) { t = b }; var v = false; this.enableChange = function(b) { v = b }; var w = 4; this.roundChange = function(b) { w = b }; var D = false; this.enableChangeArrowFormatting = function(b) { D = b }; var x = false; this.enablePctChg = function(b) { x = b }; var y = 4; this.roundPctChg = function(b) { y = b }; var z = false; this.enablePctChgArrowFormatting = function(b) { z = b }; var A = false; this.enableTime = function(b) { A = b }; var E = false; this.enableUnixTime = function(b) { E = b }; var F = false; this.useFade = function(b) { F = b }; var B = null; this.updateCallBack = function(b) { B = b }; var C = null; this.updateCallBackExtra = function(b) { C = b }; var G = "HH:mm:ss"; this.setTimeFormat = function(b) { G = b }; var m; if (lsPage == null && document.domain != "localhost" && !isBot()) { lsPage = new PushPage; document.domain != "localhost" ? lsPage.context.setDebugAlertsOnClientError(false) : lsPage.context.setDebugAlertsOnClientError(true); lsPage.context.setDomain(lsDomain); lsPage.onEngineReady = function(b) { document.domain != "localhost" ? b.connection.setLSHost("ls2." + lsDomain) : b.connection.setLSHost("localhost"); b.connection.setLSPort("8081"); b.connection.setAdapterName(g ? "EIRTAdapterProxy" : "EIAdapterProxy"); b.changeStatus("STREAMING"); b.onStatusChange = function(c) { if (c == "STREAMING") window.status = lsDomain + " is in streaming mode"; else if (c == "CONNECTING") window.status = "Connecting to EuroInvestor streaming server..." } }; lsPage.bind(); lsPage.createEngine("SLEngine", "/js/ls/", "SHARE_SESSION") } this.startStreaming = function() { if (!(document.domain == "localhost" || isBot())) { var b = []; o && b.push("rowid"); k && b.push("last"); n && b.push("volume"); i && b.push("bid"); j && b.push("ask"); q && b.push("low"); s && b.push("high"); v && b.push("change"); x && b.push("pctchg"); if (A) { b.push("time"); b.push("unixtime") } else E && b.push("unixtime"); m = new OverwriteTable(null, b, "MERGE"); z && m.setPushedHtmlEnabled(true); m.onChangingValues = function(c, a) { if (a != null) { C != null && C(c, a); if (B != null) B(c, a); else { if (k) { c = a.getServerValue("last"); if (c == "-") a.setFormattedValue("last", ""); else { var e = a.getServerValue("#lastdirection"); a.setFormattedValue("last", JSFloatToLocalizedString(parseFloat(c.replace(",", ".")), l)); switch (e) { case "up": a.setAttribute("last", "#00FF00", "transparent", "backgroundColor"); break; case "down": a.setAttribute("last", "#FF0000", "transparent", "backgroundColor"); break } } } if (n) { c = a.getServerValue("volume"); c == "-" ? a.setFormattedValue("volume", "0") : a.setFormattedValue("volume", JSIntToLocalizedString(parseInt(c))) } if (i) { c = a.getServerValue("bid"); if (c == "-") a.setFormattedValue("bid", ""); else { e = a.getServerValue("#biddirection"); a.setFormattedValue("bid", JSFloatToLocalizedString(parseFloat(c.replace(",", ".")), h)); switch (e) { case "up": a.setAttribute("bid", "#00FF00", "transparent", "backgroundColor"); break; case "down": a.setAttribute("bid", "#FF0000", "transparent", "backgroundColor"); break } } } if (j) { c = a.getServerValue("ask"); if (c == "-") a.setFormattedValue("ask", ""); else { e = a.getServerValue("#askdirection"); a.setFormattedValue("ask", JSFloatToLocalizedString(parseFloat(c.replace(",", ".")), p)); switch (e) { case "up": a.setAttribute("ask", "#00FF00", "transparent", "backgroundColor"); break; case "down": a.setAttribute("ask", "#FF0000", "transparent", "backgroundColor"); break } } } if (q) { c = a.getServerValue("low"); if (c == "-") a.setFormattedValue("low", ""); else { e = a.getServerValue("#lowdirection"); a.setFormattedValue("low", JSFloatToLocalizedString(parseFloat(c.replace(",", ".")), r)); switch (e) { case "up": a.setAttribute("low", "#00FF00", "transparent", "backgroundColor"); break; case "down": a.setAttribute("low", "#FF0000", "transparent", "backgroundColor"); break } } } if (s) { c = a.getServerValue("high"); if (c == "-") a.setFormattedValue("high", ""); else { e = a.getServerValue("#highdirection"); a.setFormattedValue("high", JSFloatToLocalizedString(parseFloat(c.replace(",", ".")), t)); switch (e) { case "up": a.setAttribute("high", "#00FF00", "transparent", "backgroundColor"); break; case "down": a.setAttribute("high", "#FF0000", "transparent", "backgroundColor"); break } } } if (v) { c = a.getServerValue("change"); if (c == "-") a.setFormattedValue("change", ""); else { c = parseFloat(c.replace(",", ".")); if (D) a.setFormattedValue("change", JSFormatChange(c, w, true, false, true, false, false, false)); else { a.setFormattedValue("change", JSFloatToLocalizedString(c, w)); if (c > 0) a.setAttribute("change", "#007D00", "#007D00", "color"); else c < 0 ? a.setAttribute("change", "#F70000", "#F70000", "color") : a.setAttribute("change", "#066AA2", "#066AA2", "color") } } } if (x) { c = a.getServerValue("pctchg"); if (c == "-") a.setFormattedValue("pctchg", ""); else { e = parseFloat(c.replace(",", ".")); if (z) a.setFormattedValue("pctchg", JSFormatChange(e, y, true, true, true, false, false, false)); else { a.setFormattedValue("pctchg", JSFloatToLocalizedString(e, y)); if (c > 0) a.setAttribute("pctchg", "#007D00", "#007D00", "color"); else c < 0 ? a.setAttribute("pctchg", "#F70000", "#F70000", "color") : a.setAttribute("pctchg", "#066AA2", "#066AA2", "color") } } } if (A) { c = a.getServerValue("unixtime"); e = new Date; e.setTime(parseInt(c) - parseInt(EI.Localization.instrumentTimeZoneLocalOffset())); c = JSTimeAspFormat(e, G); a.setFormattedValue("time", c) } if (F && navigator.appName == "Microsoft Internet Explorer") { a.setHotTime(0); a.setHotToColdTime(500) } else a.setHotTime(500) } } }; m.onItemUpdate = function(c, a) { if (a != null) { if (k) { c = a.getOldValue("last"); if (a.isValueChanged("last") && c != null) { c = parseFloat(c.replace(",", ".")).toFixed(l); var e = parseFloat(a.getNewValue("last").replace(",", ".")).toFixed(l); if (e > c) a.addField("#lastdirection", "up"); else e < c ? a.addField("#lastdirection", "down") : a.addField("#lastdirection", "unchg") } else a.addField("#lastdirection", "unchg") } if (i) { c = a.getOldValue("bid"); if (a.isValueChanged("bid") && c != null) { c = parseFloat(c.replace(",", ".")).toFixed(h); e = parseFloat(a.getNewValue("bid").replace(",", ".")).toFixed(h); if (e > c) a.addField("#biddirection", "up"); else e < c ? a.addField("#biddirection", "down") : a.addField("#biddirection", "unchg") } else a.addField("#biddirection", "unchg") } if (j) { c = a.getOldValue("ask"); if (a.isValueChanged("ask") && c != null) { c = parseFloat(c.replace(",", ".")).toFixed(p); e = parseFloat(a.getNewValue("ask").replace(",", ".")).toFixed(p); if (e > c) a.addField("#askdirection", "up"); else e < c ? a.addField("#askdirection", "down") : a.addField("#askdirection", "unchg") } else a.addField("#askdirection", "unchg") } if (q) { c = a.getOldValue("low"); if (a.isValueChanged("low") && c != null) { c = parseFloat(c.replace(",", ".")).toFixed(r); e = parseFloat(a.getNewValue("low").replace(",", ".")).toFixed(r); if (e > c) a.addField("#lowdirection", "up"); else e < c ? a.addField("#lowdirection", "down") : a.addField("#lowdirection", "unchg") } else a.addField("#lowdirection", "unchg") } if (s) { c = a.getOldValue("high"); if (a.isValueChanged("high") && c != null) { c = parseFloat(c.replace(",", ".")).toFixed(t); e = parseFloat(a.getNewValue("high").replace(",", ".")).toFixed(t); if (e > c) a.addField("#highdirection", "up"); else e < c ? a.addField("#highdirection", "down") : a.addField("#highdirection", "unchg") } else a.addField("#highdirection", "unchg") } } }; lsPage.addTable(m, f); return lsDomain } }; this.haltStreaming = function() { document.domain == "localhost" || isBot() || lsPage.removeTable(m.getId()) } };
