From ff0840d5355e9bcc103bf801ecabf3b889ca0357 Mon Sep 17 00:00:00 2001 From: peshomir Date: Wed, 5 Jun 2024 07:47:33 +0000 Subject: [PATCH] deploy: acf79bcc9c91a2c4ea72aaf29490721f733c4aea --- fx_core.js | 12 +- game.js | 7613 ++++++++++++++++++++++++++-------------------------- index.html | 8 +- 3 files changed, 3837 insertions(+), 3796 deletions(-) diff --git a/fx_core.js b/fx_core.js index dcc2652..c08cab1 100644 --- a/fx_core.js +++ b/fx_core.js @@ -1,6 +1,6 @@ -const dictionary = {"gIsTeamGame":"hX","game":"b","playerId":"ed","playerData":"a8","playerNames":"jx","rawPlayerNames":"xb","playerBalances":"ee","playerTerritories":"f8","gLobbyMaxJoin":"qD","gMaxPlayers":"em","gIsSingleplayer":"iy","gameState":"sK","fontSize":"fontSize","x":"fR","y":"fS","canvas":"gW","gHumans":"h9","playerStates":"hB","Translations":"aZ","txt":"nr","strs":"a1d","uiSizes":"b4","gap":"gap","i":"eM"}; -const fx_version = '0.6.4.5'; // FX Client Version -const fx_update = 'Jun 3'; // FX Client Last Updated +const dictionary = {"gIsTeamGame":"hX","game":"b","playerId":"ed","playerData":"a8","playerNames":"jx","rawPlayerNames":"xl","playerBalances":"ee","playerTerritories":"f8","gLobbyMaxJoin":"qD","gMaxPlayers":"em","gIsSingleplayer":"iy","gameState":"sT","fontSize":"fontSize","x":"fR","y":"fS","canvas":"gW","gHumans":"h9","playerStates":"hB","Translations":"aZ","txt":"nr","strs":"a1n","uiSizes":"b4","gap":"gap","i":"eM"}; +const fx_version = '0.6.4.6'; // FX Client Version +const fx_update = 'Jun 5'; // FX Client Last Updated if (localStorage.getItem("fx_winCount") == undefined || localStorage.getItem("fx_winCount") == null) { var wins_counter = 0; @@ -361,6 +361,7 @@ const leaderboardFilter = new (function() { this.hoveringOverTabs = false; this.scrollToTop = () => {}; this.repaintLeaderboard = () => {}; + this.setUpdateFlag = () => {}; this.parseClanFromPlayerName = () => { console.warn("parse function not set"); }; this.selectedTab = 0; @@ -410,7 +411,10 @@ const leaderboardFilter = new (function() { if (this.selectedTab !== tab) { this.selectedTab = tab; if (this.selectedTab === 0) this.clearFilter(); - else if (this.selectedTab === 1) this.filterByOwnClan(); + else if (this.selectedTab === 1) { + this.filterByOwnClan(); + this.setUpdateFlag(); + } this.repaintLeaderboard(); } return true; diff --git a/game.js b/game.js index bd4425f..3bf3334 100644 --- a/game.js +++ b/game.js @@ -16,8 +16,8 @@ function bH() { } function ch() { - this.dK = 1041, this.cy = function() { - dE = 2, dG = 20, dF = "31 May 2024 [1.95.0]", dH = 0 <= window.location.hostname.toLowerCase().indexOf("territorial.io"), dJ = function() { + this.dK = 1042, this.cy = function() { + dE = 2, dG = 21, dF = "4 Jun 2024 [1.95.3]", dH = 0 <= window.location.hostname.toLowerCase().indexOf("territorial.io"), dJ = function() { try { return window.self !== window.top } catch (dM) { @@ -486,7 +486,7 @@ function iO(player, he) { self.aiCommand746 = function(dj) { 0 === dj ? bH() : 1 !== dj || 1 !== bB.id || bB.dk < 14 || y.dl() }; -var hF, hE, hG, yt, jR, a0l, iZ, iY, te, gM, qk, a2L, vw, vx, ig = [60, 74, 112, 200, 256, 512]; +var hF, hE, hG, z3, jR, a0v, iZ, iY, tn, gM, qk, a2V, w8, w9, ig = [60, 74, 112, 200, 256, 512]; function bS() { var ih, ii, ij, ik, il, im; @@ -1020,7 +1020,7 @@ function oY() { oc(0, "", 1, ["English", "Русский", "Türkçe", "Española", "Deutsch", "Polski"], 0, 5), oc(1, "", 1, null, 1), oc(2, "", 0, [0, 1]), od(3, "Username", 2), oc(4, "Font5", 1, ["Default", "Custom"]), od(5, "", 2, null, "Trebuchet MS", 1), oc( 6, "", 0, [0, 1]), oc(7, "", 0, [0, 1], 1), oc(8, "", 0, [0, 1]), oc(9, "", 1, null, 1), oc(10, "", 1, null), oc(11, "", 1, null, 1), oe(100), od(100, "Username", 2), od(101, "Password", 2), od(102, "Emojis", 2), od(103, "Colors", 2), od(104, "Clan", 2), od(105, "AccountName", 2), od(106, "Password", 2), oc(107, null, 0), oc(108, null, 0), oc(109, null, 0), od(110, null, 2), oc(111, null, 0), oc(112, null, 0), oc(113, null, 0), od(114, null, 2), oc(115, - null, 0), od(116, null, 2), oc(117, null, 1), od(118, null, 2, null, "🇺🇸🇹🇷🇷🇺🇺🇦🇵🇱🇬🇧", 1), oc(119, null, 1), oe(180), oc(180, "R0", 0), oc(181, "R1", 0) + null, 0), od(116, null, 2), oc(117, null, 1), od(118, null, 2, null, "", 2), oc(119, null, 1, null, 0, 1), od(120, null, 2), oe(180), oc(180, "R0", 0), oc(181, "R1", 0) }, this.translate = function() { this.data[0].title = "🌐 " + aZ.nr[101], this.data[1].title = aZ.nr[102], this.data[2].title = aZ.nr[103], this.data[5].title = aZ.nr[104], this.data[6].title = aZ.nr[105], this.data[7].title = aZ.nr[106], this.data[8].title = aZ.nr[107], this.data[9].title = aZ.nr[108], this.data[10].title = aZ.nr[109], this.data[11].title = aZ.nr[110], this.data[1].o8 = [aZ.nr[111], aZ.nr[112], aZ.nr[113], aZ.nr[114]], this.data[9].o8 = [aZ.nr[112], aZ.nr[115], aZ.nr[116]], this @@ -1329,63 +1329,101 @@ function c2() { function r7() { this.r8 = !1; - let jn, jo, gap, gP, zoom, r9, rB = 1; + let jn, jo, gap, gP, zoom, r9, rB; this.rC = [], this.rD = 100; - let rE; + let rF = 0, + rG = new Array(9), + rH = [], + rI = [], + rJ = 0, + rK = 0, + rL = 0, + rM = 0; + + function rY() { + rG.sort((hk, ht) => ht.ih - hk.ih); + let g6 = "" + rG[0].m3; + for (let eM = 1; eM < 9; eM++) g6 += "," + rG[eM].m3; + for (let eM = 0; eM < 9; eM++) g6 += "," + rG[eM].ih; + bD.dO.dP(120, g6) + } this.cy = function() { - var rF = [0, 1, 2, 4, 8, 9, 10, 11, 12, 13, 14, 15, 16]; - for (let eM = 0; eM < rF.length; eM++) this.rC.push(ac.gV.rG(a2.get(3), rF[eM], ad.km)); - this.rH() - }, this.rH = function() { - var rI = aC.r5.rJ(bD.dO.data[118].value), - rK = aC.r5.rL, - rM = Math.min(rI.length, 144 - aC.r5.rN - rK); - rE = new Array(rK + rM); - for (let eM = 0; eM < rK; eM++) rE[eM] = aC.r5.rO + eM; - for (let eM = 0; eM < rM; eM++) rE[rK + eM] = rI[eM] - }, this.show = function(gG, gH) { - this.r8 = !0; - var rP = this.rC.length + rE.length; - gP = Math.floor((bB.d3.g3() ? .075 : .0468) * aO.g4), gap = Math.floor(gP / 3); - let rQ = 10 * (r9 = gP + gap), - rR = (rQ > aO.gD && (rQ = aO.gD, r9 = rQ / 10, gP = 3 * r9 / 4, gap = r9 - gP), (rB = am.fN(rP, 10) + !!(rP % 10)) * r9); - rR > aO.gI && (rR = aO.gI, r9 = rR / rB, gP = 3 * r9 / 4, gap = r9 - gP), zoom = gP / this.rD; - rP = .5 * gap; - jn = Math.min(Math.max(gG - .5 * rQ + rP, rP), aO.gD - rQ + rP), jo = Math.min(Math.max(gH - .5 * rR + rP, rP), aO.gI - rR + rP) + var rN = [0, 1, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 6]; + for (let eM = 0; eM < rN.length; eM++) { + var color = 6 === rN[eM] ? ad.l8 : ad.km; + this.rC.push(ac.gV.rO(a2.get(3), rN[eM], color)) + } + for (let eM = 0; eM < aC.r5.rP; eM++) rI.push(aC.r5.rQ - aC.r5.rP + eM); + for (let eM = 0; eM < aC.r5.rR; eM++) rI.push(aC.r5.rS + eM); + var rT = aC.r5.rU(al.rT); + for (let eM = 0; eM < rT.length; eM++) rI.push(rT[eM]); + var dv = bD.dO.data[120].value.split(","); + if (18 !== dv.length) + for (let eM = 0; eM < 9; eM++) rG[eM] = { + m3: 1015 + eM, + ih: 0 + }; + else + for (let eM = 0; eM < 9; eM++) { + var dj = parseInt(dv[eM]), + iW = (dj = 0 <= dj && dj < aC.r5.rQ ? dj : 0, parseInt(dv[eM + 9])); + iW = 0 <= iW && iW < 1e3 ? iW : 0, rG[eM] = { + m3: dj, + ih: iW + } + } + }, this.show = function(gG, gH, rZ = 0) { + if (rJ = gG, rK = gH, rF = rZ, this.r8 = !0, rH = [], 0 === rF) + for (let eM = 0; eM < 9; eM++) rH.push(rG[eM].m3); + else { + let ht = 49 * rF, + hk = ht - 49; + hk >= rI.length && (rF = 1, hk = 0, ht = 49), ht = Math.min(ht, rI.length); + for (let eM = hk = ht - 49; eM < ht; eM++) rH.push(rI[eM]) + } + rH.push(1024); + rZ = rH.length, gP = Math.floor((bB.d3.g3() ? .075 : .0468) * aO.g4), gap = Math.floor(gP / 3), r9 = gP + gap, (rL = 10 * r9) > aO.gD && (rL = aO.gD, r9 = rL / 10, gP = 3 * r9 / 4, gap = r9 - gP), rB = am.fN(rZ, 10) + !!(rZ % 10), (rM = + rB * r9) > aO.gI && (rM = aO.gI, r9 = rM / rB, gP = 3 * r9 / 4, gap = r9 - gP), zoom = gP / this.rD, rZ = .5 * gap; + jn = Math.min(Math.max(gG - .5 * rL + rZ, rZ), aO.gD - rL + rZ), jo = Math.min(Math.max(gH - .5 * rM + rZ, rZ), aO.gI - rM + rZ) }, this.fa = function(gG, gH, player) { if (!this.r8) return !1; - if (j.oI(), this.rT(gG, gH)) { + if (this.rc(gG, gH)) { gG = am.lf(am.fN(gG - jn + .5 * gap, r9), 0, 9); - if ((gG += 10 * am.lf(am.fN(gH - jo + .5 * gap, r9), 0, 9)) >= this.rC.length + rE.length) return !0; - gG = function(g7) { - if (g7 < aC.r5.rN) return 1024 - aC.r5.rN + g7; - return rE[g7 - aC.r5.rN] - }(gG), player === b.ed ? aa.fn.m2(gG) : aa.fX.mH(gG, player) + if ((gG += 10 * am.lf(am.fN(gH - jo + .5 * gap, r9), 0, 9)) >= rH.length) return j.oI(), !0; + gH = rH[gG]; + if (1024 === gH) return this.show(rJ, rK, rF + 1), !0; + ! function(m3) { + for (let eM = 0; eM < 9; eM++) rG[eM].ih = Math.floor(.99 * rG[eM].ih); + for (let eM = 0; eM < 9; eM++) + if (m3 === rG[eM].m3) return rG[eM].ih = Math.min(rG[eM].ih + 30, 999), rY(); + rG.splice(5, 0, { + m3: m3, + ih: Math.max(rG[4].ih, 30) + }), rG.pop(), rY() + }(gH), player === b.ed ? aa.fn.m2(gH) : aa.fX.mH(gH, player) } - return !0 - }, this.rT = function(gG, gH) { - return !(gG < jn - .5 * gap || gH < jo - .5 * gap || gG >= jn + 10 * r9 - .5 * gap || gH >= jo + rB * r9 - .5 * gap) + return j.oI(), !0 + }, this.rc = function(gG, gH) { + return !(gG < jn - .5 * gap || gH < jo - .5 * gap || gG >= jn + rL - .5 * gap || gH >= jo + rM - .5 * gap) }, this.gL = function() { - gM.imageSmoothingEnabled = !0; - var pR = this.rC.length; - for (let eM = 0; eM < pR; eM++) gM.setTransform(zoom, 0, 0, zoom, jn + eM % 10 * r9, jo + am.fN(eM, 10) * r9), gM.drawImage(this.rC[eM], 0, 0); - gM.imageSmoothingEnabled = !1, gM.setTransform(1, 0, 0, 1, 0, 0); - var ei = rE.length; - gM.font = ac.g8.g9(0, .89 * gP); - for (let eM = 0; eM < ei; eM++) gM.fillText(aC.r5.rV(rE[eM]), jn + .5 * gP + (eM + pR) % 10 * r9, jo + .56 * gP + am.fN(eM + pR, 10) * r9) - }, this.rW = function(m3, gW, fR, fS, gP) { + gM.fillStyle = ad.kl, gM.fillRect(jn - .5 * gap, jo - .5 * gap, rL, rM); + var pu = .5 * b4.rd, + ei = (gM.lineWidth = b4.rd, gM.strokeStyle = gM.fillStyle = ad.gN, gM.strokeRect(jn - .5 * gap + pu, jo - .5 * gap + pu, rL - 2 * pu, rM - 2 * pu), gM.imageSmoothingEnabled = !0, rH.length); + for (let eM = 0; eM < ei; eM++) this.re(rH[eM], gM, jn + eM % 10 * r9, jo + am.fN(eM, 10) * r9, gP); + gM.imageSmoothingEnabled = !1 + }, this.re = function(m3, gW, fR, fS, gP) { var fj; - m3 >= 1024 - aC.r5.rN ? (fj = gP / this.rD, gW.setTransform(fj, 0, 0, fj, fR, fS), gW.drawImage(this.rC[m3 - 1024 + aC.r5.rN], 0, 0), gW.setTransform(1, 0, 0, 1, 0, 0)) : (ac.g8.textAlign(gW, 1), ac.g8.textBaseline(gW, 1), gW.font = ac.g8 - .g9(0, .89 * gP), gW.fillText(aC.r5.rV(m3), fR + .5 * gP, fS + (.35 - ac.g8.rX + .56) * gP)) + m3 >= 1024 - aC.r5.rP ? (fj = gP / this.rD, gW.setTransform(fj, 0, 0, fj, fR, fS), gW.drawImage(this.rC[m3 - 1024 + aC.r5.rP], 0, 0), gW.setTransform(1, 0, 0, 1, 0, 0)) : (ac.g8.textAlign(gW, 1), ac.g8.textBaseline(gW, 1), gW.font = ac.g8 + .g9(0, .89 * gP), gW.fillText(aC.r5.rf(m3), fR + .5 * gP, fS + (.35 - ac.g8.rg + .56) * gP)) } } function r6() { this.emojis = ["🥰", "😎", "😘", "😜", "🤗", "🥳", "😇", "😊", "🥱", "🙄", "🤔", "🥺", "😡", "😭", "😱", "😞", "💀", "👹", "👋", "🙏", "👏", "💪", "🙋‍♂️", "🤦‍♂️", "⬆️", "➡️", "⬇️", "⬅️", "👀", "❤️", "💔", "💥", "🔥", "🪦", "🥇", "🥈", "🥉", "🎖️", "🏅", "👑", "🎉", "💯", "✝️", "☪️", "🕉️", "☸️", "✡️", "☦️" - ], this.rN = 13, this.rL = this.emojis.length, this.rO = 676, this.rY = this.emojis.indexOf("💀"), this.rZ = this.rY + 1, this.ra = this.emojis.indexOf("🥇"), this.rb = this.emojis.indexOf("😊"), this.rV = function(dj) { - return dj < this.rO ? String.fromCharCode(55356, 56806 + am.fN(dj, 26), 55356, 56806 + dj % 26) : this.emojis[Math.min(dj - this.rO, this.rL - 1)] - }, this.rJ = function(g6) { + ], this.rP = 13, this.rR = this.emojis.length, this.rS = 676, this.rQ = 1024, this.rh = this.emojis.indexOf("💀"), this.ri = this.rh + 1, this.rj = this.emojis.indexOf("🥇"), this.rk = this.emojis.indexOf("😊"), this.rf = function(dj) { + return dj < this.rS ? String.fromCharCode(55356, 56806 + am.fN(dj, 26), 55356, 56806 + dj % 26) : this.emojis[Math.min(dj - this.rS, this.rR - 1)] + }, this.rU = function(g6) { var ei = g6.length - 2, dv = []; for (let eM = 0; eM < ei; eM++) { @@ -1394,192 +1432,192 @@ function r6() { 0 <= gi && gi < 26 && 0 <= gj && gj < 26 && (dv.push(26 * gi + gj), eM += 3) } return dv - }, this.rc = function(dj) { - return dj < this.rO - }, this.rd = function(dj) { - return dj >= 1024 - this.rN - }, this.re = function(dj) { - return dj >= this.rO && dj < this.rO + this.rZ + }, this.rl = function(dj) { + return dj < this.rS + }, this.rm = function(dj) { + return dj >= 1024 - this.rP + }, this.rn = function(dj) { + return dj >= this.rS && dj < this.rS + this.ri } } function bQ() { - this.p5 = new rf, this.p7 = new rg, this.cy = function() { + this.p5 = new ro, this.p7 = new rp, this.cy = function() { this.p5.cy() } } -function rg() { +function rp() { this.pL = function(g6) { for (var ei = g6.length, gD = af, eM = 0; eM < ei; eM++) gD.pK(16, g6.charCodeAt(eM)) } } -function rf() { - var rh = new Uint8Array(64); +function ro() { + var rq = new Uint8Array(64); this.cy = function() { var eM; - for (rh[0] = 45, rh[37] = 95, eM = 0; eM < 10; eM++) rh[eM + 1] = 48 + eM; - for (eM = 0; eM < 26; eM++) rh[eM + 11] = 65 + eM, rh[eM + 38] = 97 + eM - }, this.ri = function(rj) { - for (var pA = ai, pI = new Uint8Array(rj), eM = 0; eM < rj; eM++) pI[eM] = pA.ma(6); + for (rq[0] = 45, rq[37] = 95, eM = 0; eM < 10; eM++) rq[eM + 1] = 48 + eM; + for (eM = 0; eM < 26; eM++) rq[eM + 11] = 65 + eM, rq[eM + 38] = 97 + eM + }, this.rr = function(rs) { + for (var pA = ai, pI = new Uint8Array(rs), eM = 0; eM < rs; eM++) pI[eM] = pA.ma(6); return pI - }, this.rk = function(pI) { - for (var ei = pI.length, rl = rh, dv = [], eM = 0; eM < ei; eM++) dv.push(String.fromCharCode(rl[pI[eM]])); + }, this.rt = function(pI) { + for (var ei = pI.length, ru = rq, dv = [], eM = 0; eM < ei; eM++) dv.push(String.fromCharCode(ru[pI[eM]])); return dv.join("") } } function bY() { - var rm, rn, ro; - rm = [32, 65, 191, 913, 931], rn = [64, 127, 688, 930, 1155], ro = new Array(rm.length + 1); - for (var eM = 0; eM < ro.length; eM++) { - ro[eM] = 0; - for (var hk = eM - 1; 0 <= hk; hk--) ro[eM] += rn[hk] - rm[hk] + var rv, rw, rx; + rv = [32, 65, 191, 913, 931], rw = [64, 127, 688, 930, 1155], rx = new Array(rv.length + 1); + for (var eM = 0; eM < rx.length; eM++) { + rx[eM] = 0; + for (var hk = eM - 1; 0 <= hk; hk--) rx[eM] += rw[hk] - rv[hk] } - function ru(iW) { - for (var eM = rm.length - 1; 0 <= eM; eM--) - if (iW >= rm[eM] && iW < rn[eM]) return eM; + function s3(iW) { + for (var eM = rv.length - 1; 0 <= eM; eM--) + if (iW >= rv[eM] && iW < rw[eM]) return eM; return -1 } this.pB = function(g6) { - return 0 !== (g6 = g6.trim()).indexOf("Bot ") && 0 !== g6.indexOf("[Bot] ") && function(g6, rr, rs) { + return 0 !== (g6 = g6.trim()).indexOf("Bot ") && 0 !== g6.indexOf("[Bot] ") && function(g6, s0, s1) { var ei = (g6 = g6.trim()).length; - if (ei < rr || rs < ei) return !1; - for (var iW, rt = 0, eM = 0; eM < ei; eM++) - if (iW = g6.charCodeAt(eM), rt += 65 <= iW && iW <= 90 || 1040 <= iW && iW <= 1071 ? 1 : 0, -1 === ru(iW)) return !1; - if (3 < rt && rt > Math.floor(ei / 2)) return !1; + if (ei < s0 || s1 < ei) return !1; + for (var iW, s2 = 0, eM = 0; eM < ei; eM++) + if (iW = g6.charCodeAt(eM), s2 += 65 <= iW && iW <= 90 || 1040 <= iW && iW <= 1071 ? 1 : 0, -1 === s3(iW)) return !1; + if (3 < s2 && s2 > Math.floor(ei / 2)) return !1; return !0 }(g6, 3, 20) - }, this.rv = function(g6) { + }, this.s4 = function(g6) { for (var ei = (g6 = g6.trim()).length, dv = [], eM = 0; eM < ei; eM++) { - var iW, ep = ru(iW = g6.charCodeAt(eM)); - dv.push(ro[ep] + iW - rm[ep]) + var iW, ep = s3(iW = g6.charCodeAt(eM)); + dv.push(rx[ep] + iW - rv[ep]) } return dv }, this.pP = function(dv) { for (var iW, ht, g6 = "", ei = dv.length, eM = 0; eM < ei; eM++) - for (ht = 1; ht < ro.length; ht++) - if (dv[eM] < ro[ht]) { - iW = rm[ht - 1] + dv[eM] - ro[ht - 1], g6 += String.fromCharCode(iW); + for (ht = 1; ht < rx.length; ht++) + if (dv[eM] < rx[ht]) { + iW = rv[ht - 1] + dv[eM] - rx[ht - 1], g6 += String.fromCharCode(iW); break } return g6 - }, this.rw = function(g6) { - for (var dv = this.rv(g6), result = "", eM = 0; eM < dv.length; eM++) result = (result += dv[eM] < 10 ? "00" : dv[eM] < 100 ? "0" : "") + dv[eM].toString(10); + }, this.s5 = function(g6) { + for (var dv = this.s4(g6), result = "", eM = 0; eM < dv.length; eM++) result = (result += dv[eM] < 10 ? "00" : dv[eM] < 100 ? "0" : "") + dv[eM].toString(10); return result - }, this.rx = function(g6) { + }, this.s6 = function(g6) { for (var dv = new Array(Math.floor(g6.length / 3)), eM = 0; eM < g6.length; eM += 3) dv[Math.floor(eM / 3)] = parseInt(g6.substring(eM, eM + 3)); return this.pP(dv) - }, this.ry = function(g6) { + }, this.s7 = function(g6) { for (var dj, dv = [g6.length], eM = 0; eM < g6.length; eM++) dv[eM] = g6.charCodeAt(eM) - 48; var result = ""; for (eM = 0; eM < g6.length; eM++) eM === g6.length - 1 || 51 < 10 * dv[eM] + dv[eM + 1] ? result += dv[eM].toString() : (dj = 10 * dv[eM] + dv[eM + 1], result += String.fromCharCode(dj + (dj < 26 ? 65 : 71)), eM++); return result - }, this.rz = function(g6) { + }, this.s8 = function(g6) { for (var iW, result = "", eM = 0; eM < g6.length; eM++) 48 <= (iW = g6.charCodeAt(eM)) && iW < 58 ? result += String.fromCharCode(iW) : 65 <= iW && iW < 75 ? result += "0" + (iW - 65).toString() : 75 <= iW && iW < 91 ? result += (iW - 65) .toString() : 97 <= iW && iW < 123 && (result += (iW - 71).toString()); return result - }, this.s0 = function(g6) { + }, this.s9 = function(g6) { for (var ei = g6.length, dv = [], eM = 0; eM < ei; eM++)(iW = g6.charCodeAt(eM)) < 58 ? dv.push(g6[eM]) : (iW -= iW < 91 ? 65 : 71, dv.push(String(ea(iW, 10))), dv.push(String(iW - 10 * ea(iW, 10)))); var ei = dv.length - 2, iW = 0, pI = []; for (eM = 0; eM < ei; eM += 3) pI[iW++] = parseInt(dv[eM] + dv[eM + 1] + dv[eM + 2]); return pI - }, this.s1 = function() { - for (var gY, s2 = "", eM = 0; eM < 6; eM++) gY = 48 + aP.random() % 36, gY += 58 <= gY ? 39 : 0, s2 += String.fromCharCode(gY); - return s2 + }, this.sA = function() { + for (var gY, sB = "", eM = 0; eM < 6; eM++) gY = 48 + aP.random() % 36, gY += 58 <= gY ? 39 : 0, sB += String.fromCharCode(gY); + return sB } } function ca() { - this.s3 = new s4, this.j8 = new s5, this.s6 = new s7, this.cy = function() { + this.sC = new sD, this.j8 = new sE, this.sF = new sG, this.cy = function() { this.j8.cy() } } -function s4() { - function s9() { - if (2 === b.sK) return 1; - aM.sL(), b.sK = 2, b.sM = b.sN +function sD() { + function sI() { + if (2 === b.sT) return 1; + aM.sU(), b.sT = 2, b.sV = b.sW } - function sC() { - aa.fX.mY(), at.s6.sO(), l.sP(!0), l.sQ(247, 0), t.jH(!0), u.jH(!0), aM.jH(), ae.sR(), b.fV && b7.sS.sT(), b7.d9 = !0, b3.sU(), bB.d3.setState(0) + function sL() { + aa.fX.mY(), at.sF.sX(), l.sY(!0), l.sZ(247, 0), t.jH(!0), u.jH(!0), aM.jH(), ae.sa(), b.fV && b7.sb.sc(), b7.d9 = !0, b3.sd(), bB.d3.setState(0) } - this.s8 = function() { - s9() || (b.sA = 2, aa.fX.mV(), l.sB(0, 59), g.kP(2700), v.show(!1, !1, !0), sC()) - }, this.sD = function(sE) { + this.sH = function() { + sI() || (b.sJ = 2, aa.fX.mV(), l.sK(0, 59), g.kP(2700), v.show(!1, !1, !0), sL()) + }, this.sM = function(sN) { var mR = 0, - sF = !1; - s9() || (b.sA = 1, 8 === b.iw ? ((sF = (mR = sE < 0 ? a8.f8[0] >= a8.f8[1] ? 0 : 1 : sE) === b.ed) ? l.sB(mR, 2) : l.sB(1 - b.ed, 3), b.sG.qx(mR), aa.fX.mQ(mR)) : b.hX ? (sF = b8.iX[b.ed] === b9.sH(), 9 === b.iw ? (aa.fX.mQ(sF ? jR[0] : - 512), l.sI(sF)) : at.j8.iH(sF)) : (sF = (mR = jR[0]) === b.ed, l.sJ(mR), aa.fX.mQ(mR)), v.show(sF, !1), sC()) + sO = !1; + sI() || (b.sJ = 1, 8 === b.iw ? ((sO = (mR = sN < 0 ? a8.f8[0] >= a8.f8[1] ? 0 : 1 : sN) === b.ed) ? l.sK(mR, 2) : l.sK(1 - b.ed, 3), b.sP.qx(mR), aa.fX.mQ(mR)) : b.hX ? (sO = b8.iX[b.ed] === b9.sQ(), 9 === b.iw ? (aa.fX.mQ(sO ? jR[0] : + 512), l.sR(sO)) : at.j8.iH(sO)) : (sO = (mR = jR[0]) === b.ed, l.sS(mR), aa.fX.mQ(mR)), v.show(sO, !1), sL()) } } -function s7() { - this.sO = function() { - if ((7 === b.iw || 10 === b.iw) && 1 === b.sA) { - let sV = 0; +function sG() { + this.sX = function() { + if ((7 === b.iw || 10 === b.iw) && 1 === b.sJ) { + let se = 0; var player, ei = b.h9, - sW = a8.sW; - for (let eM = 0; eM < ei; eM++) sW[eM] && sV++; - sV < 2 || (player = jR[0], l.sX(0, a8.jx[player] + " won " + sV + " gold for winning the game. 🏆", 258, player, ad.gN, ad.kl, -1, !0)) + sf = a8.sf; + for (let eM = 0; eM < ei; eM++) sf[eM] && se++; + se < 2 || (player = jR[0], l.sg(0, a8.jx[player] + " won " + se + " gold for winning the game. 🏆", 258, player, ad.gN, ad.kl, -1, !0)) } } } -function s5() { - var sY; +function sE() { + var sh; - function sr(sa, eq) { - for (var g6 = "", eM = eq; eM < sa.length && eM < eq + 4; eM++) g6 += (eM === eq ? "" : " ") + "[" + b8.sk[sa[eM].id] + "]: " + sa[eM].sp.toFixed(Math.max(Math.floor(3 - Math.log10(sa[eM].sp)), 0)); - g6.length && l.sX(0, g6, 45, 0, ac.g8.kg(225, 240, 255), ad.kl, -1, !1) + function t0(sj, eq) { + for (var g6 = "", eM = eq; eM < sj.length && eM < eq + 4; eM++) g6 += (eM === eq ? "" : " ") + "[" + b8.st[sj[eM].id] + "]: " + sj[eM].sy.toFixed(Math.max(Math.floor(3 - Math.log10(sj[eM].sy)), 0)); + g6.length && l.sg(0, g6, 45, 0, ac.g8.kg(225, 240, 255), ad.kl, -1, !1) } - this.sZ = 0, this.sa = null, this.cy = function() { - sY = 0, this.sZ = 0, this.sa = null - }, this.iH = function(sF) { - var sb = b8.sc[b9.sd()]; - this.sZ = b9.se(), this.sa = function(sb, sZ) { + this.si = 0, this.sj = null, this.cy = function() { + sh = 0, this.si = 0, this.sj = null + }, this.iH = function(sO) { + var sk = b8.sl[b9.sm()]; + this.si = b9.sn(), this.sj = function(sk, si) { var eM, ht, ei, iX = b8.iX, - sc = b8.sc, - sk = b8.sk, sl = b8.sl, - sm = a8.f8, - sn = b.h9, - so = [], + st = b8.st, + su = b8.su, + sv = a8.f8, + sw = b.h9, + sx = [], g7 = 0; - for (ht = sk.length - 1; 0 <= ht; ht--) - if (sc[iX[sl[ht][0]]] === sb) { - for (so.push({ + for (ht = st.length - 1; 0 <= ht; ht--) + if (sl[iX[su[ht][0]]] === sk) { + for (sx.push({ id: ht, - sm: 0, - player: sl[ht][0], - sp: 0 - }), ei = sl[ht].length, eM = 0; eM < ei; eM++) so[g7].sm += sm[sl[ht][eM]]; - for (so[g7].sp = (1 + b.sq) * sn * so[g7].sm / sZ, eM = 0; eM < g7; eM++) - if (so[g7].sm > so[eM].sm) { - so.splice(eM, 0, so[g7]), so.pop(); + sv: 0, + player: su[ht][0], + sy: 0 + }), ei = su[ht].length, eM = 0; eM < ei; eM++) sx[g7].sv += sv[su[ht][eM]]; + for (sx[g7].sy = (1 + b.sz) * sw * sx[g7].sv / si, eM = 0; eM < g7; eM++) + if (sx[g7].sv > sx[eM].sv) { + sx.splice(eM, 0, sx[g7]), sx.pop(); break } g7++ - } 8 < so.length && (so.length = 8); - for (; 0 < so.length && 0 === so[so.length - 1].sm;) so.pop(); - return so - }(sb, this.sZ), o.sg("Team " + b8.g2[sb], 2, 1, 12), - function(sF, sb) { + } 8 < sx.length && (sx.length = 8); + for (; 0 < sx.length && 0 === sx[sx.length - 1].sv;) sx.pop(); + return sx + }(sk, this.si), o.sp("Team " + b8.g2[sk], 2, 1, 12), + function(sO, sk) { var color; - sF = sF ? (color = ac.g8.kg(10, 220, 10), "Congratulations! Team " + b8.g2[sb] + " won the game!") : (color = ac.g8.kg(200, 80, 80), "Our alliance was defeated! Team " + b8.g2[sb] + " won the game."); - l.sX(0, sF, 40, 0, color, ad.kl, -1, !1) - }(sF, sb), 0 !== (sF = this.sa).length && (l.sX(0, "The allied clans of the winning team have earned these glorious points:", 40, 0, ad.gN, ad.kl, -1, !1), sr(sF, 0), sr(sF, 4)), aa.fX.mW(), g.kP(2700) + sO = sO ? (color = ac.g8.kg(10, 220, 10), "Congratulations! Team " + b8.g2[sk] + " won the game!") : (color = ac.g8.kg(200, 80, 80), "Our alliance was defeated! Team " + b8.g2[sk] + " won the game."); + l.sg(0, sO, 40, 0, color, ad.kl, -1, !1) + }(sO, sk), 0 !== (sO = this.sj).length && (l.sg(0, "The allied clans of the winning team have earned these glorious points:", 40, 0, ad.gN, ad.kl, -1, !1), t0(sO, 0), t0(sO, 4)), aa.fX.mW(), g.kP(2700) }, this.j9 = function() { - 2 === b.sK && -1 !== sY && (0 === sY ? sY = this.sa && 0 !== this.sa.length ? b7.dg + 8e3 : -1 : b7.dg < sY || (sY = -1, l.sX(255, "Clan rankings and results can also be accessed under:", 735, 0, ad.gN, ad.kl, -1, !1), l.sX(255, - "territorial.io/clans", 736, 0, ad.gN, ad.kl, -1, !1), l.sX(255, "territorial.io/clan-results", 736, 0, ad.gN, ad.kl, -1, !1))) + 2 === b.sT && -1 !== sh && (0 === sh ? sh = this.sj && 0 !== this.sj.length ? b7.dg + 8e3 : -1 : b7.dg < sh || (sh = -1, l.sg(255, "Clan rankings and results can also be accessed under:", 735, 0, ad.gN, ad.kl, -1, !1), l.sg(255, + "territorial.io/clans", 736, 0, ad.gN, ad.kl, -1, !1), l.sg(255, "territorial.io/clan-results", 736, 0, ad.gN, ad.kl, -1, !1))) } } function cg() { - this.id = 0, this.dk = 0, this.om = null, this.on = null, this.oo = null, this.op = null, this.d3 = new ss, this.cy = function() { + this.id = 0, this.dk = 0, this.om = null, this.on = null, this.oo = null, this.op = null, this.d3 = new t1, this.cy = function() { var self, dk; self = this, "undefined" == typeof Android || (dk = Android.getVersion()) < 12 || (self.dk = dk, self.id = 1, self.on = Android), function(self) { @@ -1602,36 +1640,36 @@ function cg() { } } -function ss() { - this.sw = function() { - bD.ns.p3(), bD.ns.p4(), aR.j7.close(0, 3255), 0 === y.sx() && (z.get().value = bD.dO.data[100].value), 0 === bB.id ? bB.om && bB.om.clear() : 1 === bB.id ? bB.on.saveString(199, "") : 2 === bB.id && bB.op.postMessage("clear") - }, this.sy = function() { +function t1() { + this.t5 = function() { + bD.ns.p3(), bD.ns.p4(), aR.j7.close(0, 3255), 0 === y.t6() && (z.get().value = bD.dO.data[100].value), 0 === bB.id ? bB.om && bB.om.clear() : 1 === bB.id ? bB.on.saveString(199, "") : 2 === bB.id && bB.op.postMessage("clear") + }, this.t7 = function() { 2 === bB.id ? bB.op.postMessage("showConsentForm") : 1 === bB.id ? bB.on.setState(7) : ax.dQ.showCMPScreen() - }, this.sz = function() { + }, this.t8 = function() { this.setState(14) - }, this.t0 = function() { - var t1; - return 2 === bB.id && 0 === bB.dk && "string" == typeof(t1 = bB.oo.username) ? t1 : bD.dO.data[100].value - }, this.t2 = function() { + }, this.t9 = function() { + var tA; + return 2 === bB.id && 0 === bB.dk && "string" == typeof(tA = bB.oo.username) ? tA : bD.dO.data[100].value + }, this.tB = function() { var g6 = bD.dO.oi(101), max = ("string" != typeof(g6 = "" === g6 ? function() { { if (2 === bB.id) return bB.oo.password; if (1 === bB.id) return 12 <= bB.dk ? bB.on.loadString(22) : "" } - return a4.t5(9) + return a4.tE(9) }() : g6) && (g6 = ""), Math.floor(Math.pow(2, 48))), - t4 = Math.floor(parseInt(i.rz(g6))); - return 0 < t4 && t4 < max ? bD.dO.dP(101, g6) : (t4 = Math.floor(1 + (max - 1) * Math.random()), bD.dO.dP(101, g6)), t4 + tD = Math.floor(parseInt(i.s8(g6))); + return 0 < tD && tD < max ? bD.dO.dP(101, g6) : (tD = Math.floor(1 + (max - 1) * Math.random()), bD.dO.dP(101, g6)), tD }, this.g3 = function() { return 1 === bD.dO.oh(2) - }, this.t6 = function() { + }, this.tF = function() { bD.dO.dP(102, "") }, this.setState = function(df) { 1 === bB.id && 5 <= bB.dk && bB.on.setState(df) - }, this.t7 = function() { - var t8; - 1 === bB.id && 7 <= bB.dk ? bB.on.setState(5) : ((t8 = new URL(window.location)).searchParams.set("v", "" + Math.floor(1e3 * Math.random())), window.location.href = t8.toString()) + }, this.tG = function() { + var tH; + 1 === bB.id && 7 <= bB.dk ? bB.on.setState(5) : ((tH = new URL(window.location)).searchParams.set("v", "" + Math.floor(1e3 * Math.random())), window.location.href = tH.toString()) }, this.d4 = function() { 1 !== bB.id || bB.dk < 17 || bB.on.saveString(23, document.documentElement.outerHTML) }, this.dU = function() { @@ -1639,248 +1677,248 @@ function ss() { }, this.di = function(dh) { return 0 === bB.id ? !!ax.dQ.dd() : 1 === bB.id ? 12 <= bB.dk && (bB.on.presentAd(dh), !0) : 2 === bB.id && (0 === bB.dk ? bB.op.postMessage("show ad " + dh) : bB.op.postMessage("showAd"), !0) }, this.dC = function() { - 2 === bB.id && bB.dk < 23 && aw.p0(4, 1, new t9("App Update Required", "A new iOS app version with bug fixes has been published.
Please download the new Territorial.io app version for iOS:
" + - al.tA + "", !0, [new nc("❌ " + aZ.nr[92], function() { + 2 === bB.id && bB.dk < 23 && aw.p0(4, 1, new tI("App Update Required", "A new iOS app version with bug fixes has been published.
Please download the new Territorial.io app version for iOS:
" + + al.tJ + "", !0, [new nc("❌ " + aZ.nr[92], function() { aw.p0(0) }, ad.lK)])) } } function cv() { - function tN(title, tP, dM) { - tI(dM), aw.p0(4, 0, new t9("⚠️ " + title, tP, !0)) + function tW(title, tY, dM) { + tR(dM), aw.p0(4, 0, new tI("⚠️ " + title, tY, !0)) } - function tI(dM) { + function tR(dM) { ! function(dM) { - var df = y.sx(); - 0 === df ? a1.tR() : 6 === df ? aR.j7.tS(dM) : 7 === df ? (aK.tR(), aR.j7.close(aR.j7.tK, 3256)) : 8 === df && (b.tT(!0), a1.tR()) + var df = y.t6(); + 0 === df ? a1.ta() : 6 === df ? aR.j7.tb(dM) : 7 === df ? (aK.ta(), aR.j7.close(aR.j7.tT, 3256)) : 8 === df && (b.tc(!0), a1.ta()) }(dM), a1.cy(), b7.d9 = !0 } - this.tB = function(tC, dM) { - if (8 === aw.tD && 0 === tC) return aw.tE().tF(dM) ? void 0 : void aw.p0(4, 0, new t9("⚠️ " + aZ.tG(64), aZ.tH(dM), !0)); - var df = y.sx(); + this.tK = function(tL, dM) { + if (8 === aw.tM && 0 === tL) return aw.tN().tO(dM) ? void 0 : void aw.p0(4, 0, new tI("⚠️ " + aZ.tP(64), aZ.tQ(dM), !0)); + var df = y.t6(); if (6 === df) { - if (4211 === dM) return tI(dM), void aw.p0(4, 0, new t9("🚀 " + aZ.nr[122], aZ.nr[123], !0, [new nc("❌ " + aZ.nr[92], function() { + if (4211 === dM) return tR(dM), void aw.p0(4, 0, new tI("🚀 " + aZ.nr[122], aZ.nr[123], !0, [new nc("❌ " + aZ.nr[92], function() { aw.p0(0) }, ad.lK), new nc("🔄 " + aZ.nr[124], function() { - bB.d3.t7() + bB.d3.tG() }, ad.l5)])); - if (4214 !== dM) return void x.tJ(tC) + if (4214 !== dM) return void x.tS(tL) } else { - if (7 !== df) return 8 === df ? void(tC !== aR.j7.tL || b.iy || l.tM(aZ.tH(dM))) : void 0; - if (tC !== aR.j7.tK) return + if (7 !== df) return 8 === df ? void(tL !== aR.j7.tU || b.iy || l.tV(aZ.tQ(dM))) : void 0; + if (tL !== aR.j7.tT) return } - tN(aZ.tG(64), aZ.tH(dM), dM) - }, this.tO = function(dM) { - 8 === y.sx() ? l.tM(aZ.tH(dM)) : tN(aZ.tG(64), aZ.tH(dM), dM) + tW(aZ.tP(64), aZ.tQ(dM), dM) + }, this.tX = function(dM) { + 8 === y.t6() ? l.tV(aZ.tQ(dM)) : tW(aZ.tP(64), aZ.tQ(dM), dM) } } function bJ() { - var tU, tV; + var td, te; - function tW() { + function tf() { var gD = new cR; gD.dA(1612), gD.pK(1, 0), gD.pK(6, 7), gD.pK(2, bB ? bB.id : 3), gD.pK(1, dH ? 1 : 0), gD.pK(1, dJ ? 1 : 0), gD.pK(1, a ? a.dD : 0); - for (let eM = 0; eM < tV.length && eM < 100; eM++) gD.pK(16, tV.charCodeAt(eM)); - tU.send(gD.mZ), tX() + for (let eM = 0; eM < te.length && eM < 100; eM++) gD.pK(16, te.charCodeAt(eM)); + td.send(gD.mZ), tg() } - function tX() { - tU && (tU.onclose = null, tU.onopen = null, tU = null) + function tg() { + td && (td.onclose = null, td.onopen = null, td = null) } window.addEventListener("error", function error(dM) { window.removeEventListener("error", error); return alert("Error:\n" + dM.filename + " " + dM.lineno + " " + dM.colno + " " + dM.message); - window.removeEventListener("error", error), tV = dM.lineno + " " + dM.colno + " " + dM.message, (tU = new WebSocket("wss://territorial.io/s52/")).onopen = tW, tU.onclose = function() { - tX() - }, 0 === dM.lineno && 0 === dM.colno || (bB && 1 === bB.id ? bB.on.showToast(tV) : alert(tV)) + window.removeEventListener("error", error), te = dM.lineno + " " + dM.colno + " " + dM.message, (td = new WebSocket("wss://territorial.io/s52/")).onopen = tf, td.onclose = function() { + tg() + }, 0 === dM.lineno && 0 === dM.colno || (bB && 1 === bB.id ? bB.on.showToast(te) : alert(te)) }) } function cU() { - var tY, tZ, ta = -15e3, - tb = !1; + var th, ti, tj = -15e3, + tk = !1; function fa(dM) { - tu() || (tb = !0, tv(dM, 1), aR.j7.tw(aR.j7.tL), tx(Math.floor(aO.nW * dM.clientX), Math.floor(aO.nW * dM.clientY))) - } - - function tj(dM) { - ta = b7.dg, tv(dM, 1), aR.j7.tw(aR.j7.tL), 0 < dM.touches.length && (tY = Math.floor(aO.nW * dM.touches[0].clientX), tZ = Math.floor(aO.nW * dM.touches[0].clientY), aI.tj(dM) || tx(tY, tZ)) - } - - function tx(fR, fS) { - 0 === b.sK ? y.fa(fR, fS) : ae.ty(fR, fS) || b6.fa(fR, fS) || v.fa(fR, fS) || j.tz(fR, fS) || n.fa(fR, fS) || k.fa(fR, fS) || ak.u0(fR, fS) || aM.fa(fR, fS) || j.u1(fR, fS) - } - - function tf(dM) { - tu() || (tb = !0, tv(dM, 1), u2(Math.floor(aO.nW * dM.clientX), Math.floor(aO.nW * dM.clientY))) - } - - function tk(dM) { - ta = b7.dg, tv(dM, 1), 0 < dM.touches.length && (tY = Math.floor(aO.nW * dM.touches[0].clientX), tZ = Math.floor(aO.nW * dM.touches[0].clientY), aI.tk(dM) || u2(tY, tZ)) - } - - function u2(fR, fS) { - 0 === b.sK ? y.tf(fR, fS) : (av.fQ(fR, fS), b6.tf(fR, fS) || (k.tf(fR, fS), j.r8() ? j.tf(fR, fS) : p.fb ? p.tf(fR) && (b7.d9 = !0) : (t.tf(fR, fS), q.kL && q.tf(fR, fS) && (b7.d9 = !0)))) - } - - function th(dM) { - tu() || (tv(dM, 1), 0 === b.sK ? (y.click(-1024, -1024), r.u3()) : (t.u4(-1024, -1024), k.tf(-1024, -1024), p.u5(), q.kL && (q.kL = !1))) - } - - function tg(dM) { - tu() || (tv(dM, 1), u6(Math.floor(aO.nW * dM.clientX), Math.floor(aO.nW * dM.clientY), 2 === dM.button)) - } - - function click(dM) { - tu() || tv(dM, 1) - } - - function tl(dM) { - ta = b7.dg, tv(dM, 1), dM && dM.touches && 0 < dM.touches.length && 0 !== b.sK ? q.kL = !1 : aI.u7() || u6(tY, tZ, !1) - } - - function tm(dM) { - ta = b7.dg, tv(dM, 1), u6(tY, tZ, !1) - } - - function tn(dM) { - aX.tn(dM) - } - - function to(dM) { - aX.to(dM) - } - - function tp(dM) { - tu() || tv(dM, 0) - } - - function u6(fR, fS, u8) { - 0 === b.sK ? y.click(fR, fS) : (t.u4(fR, fS), b6.u4(), p.u5(), q.kL = !1, j.click(fR, fS, u8) && (b7.d9 = !0)) - } - - function ti(dM) { - var fR, fS, deltaY; - tu() || (tv(dM, 1), aR.j7.tw(aR.j7.tL), fR = Math.floor(aO.nW * dM.clientX), fS = Math.floor(aO.nW * dM.clientY), deltaY = dM.deltaY, 1 === dM.deltaMode && (deltaY *= 16), 0 === b.sK ? y.ti(fR, fS, deltaY) : t.ti(fR, fS, deltaY) || (p.u9(fR, - fS) ? p.ti(deltaY) && (b7.d9 = !0) : q.ti(fR, fS, +deltaY))) - } - - function tq(dM) { - tv(dM, 0) - } - - function tv(dM, id) { - 0 === id && (b0.r8 || z.r8 || aw.r8()) || 1 === id && z.uA || (id = window.innerWidth / document.documentElement.clientWidth) < .999 || 1.001 < id || 0 !== y.sx() && dM.preventDefault() + u3() || (tk = !0, u4(dM, 1), aR.j7.u5(aR.j7.tU), u6(Math.floor(aO.nW * dM.clientX), Math.floor(aO.nW * dM.clientY))) } function ts(dM) { - if (keybindHandler(dM.key)) return; - tu() || ("ArrowLeft" === dM.key ? aF.uC(3) : "ArrowUp" === dM.key ? aF.uC(0) : "ArrowRight" === dM.key ? aF.uC(1) : "ArrowDown" === dM.key ? aF.uC(2) : "a" === dM.key ? p.uD(.9375) : "d" === dM.key ? p.uD(16 / 15) : "s" === dM.key ? p.uD(7 / - 8) : "w" === dM.key ? p.uD(8 / 7) : "1" === dM.key ? p.uD(.75) : "2" === dM.key ? p.uD(7 / 8) : "3" === dM.key ? p.uD(.9375) : "4" === dM.key ? p.uD(31 / 32) : "5" === dM.key ? p.uD(32 / 31) : "6" === dM.key ? p.uD(16 / 15) : - "7" === dM.key ? p.uD(8 / 7) : "8" === dM.key ? p.uD(4 / 3) : "+" === dM.key ? 0 !== b.sK && q.ti(Math.floor(aO.gD / 2), Math.floor(aO.gI / 2), -200) : "-" === dM.key ? 0 !== b.sK && q.ti(Math.floor(aO.gD / 2), Math.floor(aO.gI / 2), - 200) : "c" === dM.key ? 0 !== b.sK && b6.uE() : " " === dM.key ? b.sK && av.fT(!1) : "b" === dM.key && b.sK && av.fT(!0)) + tj = b7.dg, u4(dM, 1), aR.j7.u5(aR.j7.tU), 0 < dM.touches.length && (th = Math.floor(aO.nW * dM.touches[0].clientX), ti = Math.floor(aO.nW * dM.touches[0].clientY), aI.ts(dM) || u6(th, ti)) + } + + function u6(fR, fS) { + 0 === b.sT ? y.fa(fR, fS) : ae.u7(fR, fS) || b6.fa(fR, fS) || v.fa(fR, fS) || j.u8(fR, fS) || n.fa(fR, fS) || k.fa(fR, fS) || ak.u9(fR, fS) || aM.fa(fR, fS) || j.uA(fR, fS) + } + + function to(dM) { + u3() || (tk = !0, u4(dM, 1), uB(Math.floor(aO.nW * dM.clientX), Math.floor(aO.nW * dM.clientY))) + } + + function tt(dM) { + tj = b7.dg, u4(dM, 1), 0 < dM.touches.length && (th = Math.floor(aO.nW * dM.touches[0].clientX), ti = Math.floor(aO.nW * dM.touches[0].clientY), aI.tt(dM) || uB(th, ti)) + } + + function uB(fR, fS) { + 0 === b.sT ? y.to(fR, fS) : (av.fQ(fR, fS), b6.to(fR, fS) || (k.to(fR, fS), j.r8() ? j.to(fR, fS) : p.fb ? p.to(fR) && (b7.d9 = !0) : (t.to(fR, fS), q.kL && q.to(fR, fS) && (b7.d9 = !0)))) + } + + function tq(dM) { + u3() || (u4(dM, 1), 0 === b.sT ? (y.click(-1024, -1024), r.uC()) : (t.uD(-1024, -1024), k.to(-1024, -1024), p.uE(), q.kL && (q.kL = !1))) + } + + function tp(dM) { + u3() || (u4(dM, 1), uF(Math.floor(aO.nW * dM.clientX), Math.floor(aO.nW * dM.clientY), 2 === dM.button)) + } + + function click(dM) { + u3() || u4(dM, 1) + } + + function tu(dM) { + tj = b7.dg, u4(dM, 1), dM && dM.touches && 0 < dM.touches.length && 0 !== b.sT ? q.kL = !1 : aI.uG() || uF(th, ti, !1) + } + + function tv(dM) { + tj = b7.dg, u4(dM, 1), uF(th, ti, !1) + } + + function tw(dM) { + aX.tw(dM) + } + + function tx(dM) { + aX.tx(dM) + } + + function ty(dM) { + u3() || u4(dM, 0) + } + + function uF(fR, fS, uH) { + 0 === b.sT ? y.click(fR, fS) : (t.uD(fR, fS), b6.uD(), p.uE(), q.kL = !1, j.click(fR, fS, uH) && (b7.d9 = !0)) } function tr(dM) { - tu() || b7.dg < 400 || aw.uF(dM) || (8 !== y.sx() && y.uF(dM) ? b7.d9 = !0 : "Escape" === dM.key ? y.dl() : "ArrowLeft" === dM.key || "a" === dM.key ? aF.uG(3) : "ArrowUp" === dM.key || "w" === dM.key ? aF.uG(0) : "ArrowRight" === dM.key || - "d" === dM.key ? aF.uG(1) : "ArrowDown" === dM.key || "s" === dM.key ? aF.uG(2) : "h" === dM.key ? 1 <= b.sK && ae.uH(!b.kK) : " " === dM.key && b.sK && (k.fW && k.uI(), b.fV) && ae.uJ(!1)) + var fR, fS, deltaY; + u3() || (u4(dM, 1), aR.j7.u5(aR.j7.tU), fR = Math.floor(aO.nW * dM.clientX), fS = Math.floor(aO.nW * dM.clientY), deltaY = dM.deltaY, 1 === dM.deltaMode && (deltaY *= 16), 0 === b.sT ? y.tr(fR, fS, deltaY) : t.tr(fR, fS, deltaY) || (p.uI(fR, + fS) ? p.tr(deltaY) && (b7.d9 = !0) : q.tr(fR, fS, +deltaY))) } - function tt() { - "hidden" === document.visibilityState ? 1 === b.sK && (b.fV ? ae.uJ(!1) : !b.iy || k.fW || b.fm || k.uI()) : b7.d9 = !0 + function tz(dM) { + u4(dM, 0) } - function tu() { - return ta + 15e3 > b7.dg + function u4(dM, id) { + 0 === id && (b0.r8 || z.r8 || aw.r8()) || 1 === id && z.uJ || (id = window.innerWidth / document.documentElement.clientWidth) < .999 || 1.001 < id || 0 !== y.t6() && dM.preventDefault() + } + + function u1(dM) { + if (keybindHandler(dM.key)) return; + u3() || ("ArrowLeft" === dM.key ? aF.uL(3) : "ArrowUp" === dM.key ? aF.uL(0) : "ArrowRight" === dM.key ? aF.uL(1) : "ArrowDown" === dM.key ? aF.uL(2) : "a" === dM.key ? p.uM(.9375) : "d" === dM.key ? p.uM(16 / 15) : "s" === dM.key ? p.uM(7 / + 8) : "w" === dM.key ? p.uM(8 / 7) : "1" === dM.key ? p.uM(.75) : "2" === dM.key ? p.uM(7 / 8) : "3" === dM.key ? p.uM(.9375) : "4" === dM.key ? p.uM(31 / 32) : "5" === dM.key ? p.uM(32 / 31) : "6" === dM.key ? p.uM(16 / 15) : + "7" === dM.key ? p.uM(8 / 7) : "8" === dM.key ? p.uM(4 / 3) : "+" === dM.key ? 0 !== b.sT && q.tr(Math.floor(aO.gD / 2), Math.floor(aO.gI / 2), -200) : "-" === dM.key ? 0 !== b.sT && q.tr(Math.floor(aO.gD / 2), Math.floor(aO.gI / 2), + 200) : "c" === dM.key ? 0 !== b.sT && b6.uN() : " " === dM.key ? b.sT && av.fT(!1) : "b" === dM.key && b.sT && av.fT(!0)) + } + + function u0(dM) { + u3() || b7.dg < 400 || aw.uO(dM) || (8 !== y.t6() && y.uO(dM) ? b7.d9 = !0 : "Escape" === dM.key ? y.dl() : "ArrowLeft" === dM.key || "a" === dM.key ? aF.uP(3) : "ArrowUp" === dM.key || "w" === dM.key ? aF.uP(0) : "ArrowRight" === dM.key || + "d" === dM.key ? aF.uP(1) : "ArrowDown" === dM.key || "s" === dM.key ? aF.uP(2) : "h" === dM.key ? 1 <= b.sT && ae.uQ(!b.kK) : " " === dM.key && b.sT && (k.fW && k.uR(), b.fV) && ae.uS(!1)) + } + + function u2() { + "hidden" === document.visibilityState ? 1 === b.sT && (b.fV ? ae.uS(!1) : !b.iy || k.fW || b.fm || k.uR()) : b7.d9 = !0 + } + + function u3() { + return tj + 15e3 > b7.dg } function resize() { - aO.uM() + aO.uV() } - this.tc = 0, this.td = "", this.cy = function() { - te.addEventListener("mousedown", fa, { + this.tl = 0, this.tm = "", this.cy = function() { + tn.addEventListener("mousedown", fa, { passive: !1 - }), te.addEventListener("mousemove", tf, { + }), tn.addEventListener("mousemove", to, { passive: !1 - }), te.addEventListener("mouseup", tg, { + }), tn.addEventListener("mouseup", tp, { passive: !1 - }), te.addEventListener("click", click, { + }), tn.addEventListener("click", click, { passive: !1 - }), te.addEventListener("mouseleave", th, { + }), tn.addEventListener("mouseleave", tq, { passive: !1 - }), te.addEventListener("wheel", ti, { + }), tn.addEventListener("wheel", tr, { passive: !1 - }), te.addEventListener("touchstart", tj, { + }), tn.addEventListener("touchstart", ts, { passive: !1 - }), te.addEventListener("touchmove", tk, { + }), tn.addEventListener("touchmove", tt, { passive: !1 - }), te.addEventListener("touchend", tl, { + }), tn.addEventListener("touchend", tu, { passive: !1 - }), te.addEventListener("touchcancel", tm, { + }), tn.addEventListener("touchcancel", tv, { passive: !1 - }), te.addEventListener("dragover", tn), te.addEventListener("drop", to), te.addEventListener("dblclick", tp), document.addEventListener("contextmenu", tq), document.addEventListener("keyup", tr), document.addEventListener("keydown", - ts), document.addEventListener("visibilitychange", tt), window.addEventListener("resize", resize) - }, this.u0 = function(fR, fS) { + }), tn.addEventListener("dragover", tw), tn.addEventListener("drop", tx), tn.addEventListener("dblclick", ty), document.addEventListener("contextmenu", tz), document.addEventListener("keyup", u0), document.addEventListener("keydown", + u1), document.addEventListener("visibilitychange", u2), window.addEventListener("resize", resize) + }, this.u9 = function(fR, fS) { return !!ae.fa(fR, fS) || !!(t.fa(fR, fS) || q.fa(fR, fS) || p.fa(fR, fS) || l.fa(fR, fS)) - }, this.uK = tu, this.uL = function() { - return !tb || 0 < ta + }, this.uT = u3, this.uU = function() { + return !tk || 0 < tj } } function bN() { - this.g8 = new uN, this.pf = new uO, this.fX = new uP, this.jv = new uQ, this.qm = new uR, this.uS = new uT, this.gV = new uU, this.cy = function() { + this.g8 = new uW, this.pf = new uX, this.fX = new uY, this.jv = new uZ, this.qm = new ua, this.ub = new uc, this.gV = new ud, this.cy = function() { this.g8.p2() } } -function uO() { +function uX() { this.pg = function(dv) { dv.fill(0) - }, this.uV = function(dv) { + }, this.ue = function(dv) { for (var ei = dv.length, eM = 0; eM < ei; eM++) dv[eM] = [] - }, this.uW = function(gi, g1) { + }, this.uf = function(gi, g1) { for (var gj = ap.dr, eM = 0; eM < 3; eM++) gj[eM] = g1 * gi[eM]; return gj - }, this.uX = function(gi, gj, uY) { + }, this.ug = function(gi, gj, uh) { for (var gn = 0, eM = 0; eM < 3; eM++) gn += Math.abs(gi[eM] - gj[eM]); - return uY <= gn - }, this.uZ = function(gi, ua) { - for (var eM = 0; eM < 3; eM++) gi[eM] = am.lf(gi[eM] + ua, 0, 255); + return uh <= gn + }, this.ui = function(gi, uj) { + for (var eM = 0; eM < 3; eM++) gi[eM] = am.lf(gi[eM] + uj, 0, 255); return gi - }, this.ub = function(dv, uc = 0, ud = dv.length - 1) { - for (var ue = 0, eM = uc; eM <= ud; eM++) ue += dv[eM]; - return ue - }, this.uf = function(dv, ug) { - for (var eM, uh, ei = dv.length, ui = [], hk = ei - 1; 0 <= hk; hk--) { - for (eM = uh = 0; eM < ei; eM++) ug(dv[eM]) < ug(dv[uh]) && (uh = eM); - ei--, ui.push(dv[uh]), dv[uh] = dv[ei], dv.pop() + }, this.uk = function(dv, ul = 0, um = dv.length - 1) { + for (var un = 0, eM = ul; eM <= um; eM++) un += dv[eM]; + return un + }, this.uo = function(dv, up) { + for (var eM, uq, ei = dv.length, ur = [], hk = ei - 1; 0 <= hk; hk--) { + for (eM = uq = 0; eM < ei; eM++) up(dv[eM]) < up(dv[uq]) && (uq = eM); + ei--, ur.push(dv[uq]), dv[uq] = dv[ei], dv.pop() } - return ui + return ur } } -function uU() { - this.rG = function(uj, g7, uk) { - var gP = uj.height, - ul = ac.g8.pV(gP, gP), - gW = ac.g8.getContext(ul); - return function(gD, gW, uk) { - gW.fillStyle = uk, gW.beginPath(), gW.arc(gD / 2, gD / 2, .47 * gD, 0, 2 * Math.PI), gW.fill() - }(gP, gW, uk), gW.drawImage(uj, -g7 * gP, 0), ul - }, this.un = function(uo) { - var gP = uo.height, - gW = ac.g8.getContext(uo, !0), +function ud() { + this.rO = function(us, g7, ut) { + var gP = us.height, + uu = ac.g8.pV(gP, gP), + gW = ac.g8.getContext(uu); + return function(gD, gW, ut) { + gW.fillStyle = ut, gW.beginPath(), gW.arc(gD / 2, gD / 2, .47 * gD, 0, 2 * Math.PI), gW.fill() + }(gP, gW, ut), gW.drawImage(us, -g7 * gP, 0), uu + }, this.uw = function(ux) { + var gP = ux.height, + gW = ac.g8.getContext(ux, !0), gS = gW.getImageData(0, 0, gP, gP); - return ac.uS.up(gS.data, gP, gP, .9), gW.putImageData(gS, 0, 0), uo + return ac.ub.uy(gS.data, gP, gP, .9), gW.putImageData(gS, 0, 0), ux } } -function uR() { - this.uq = function(g6, font, maxWidth) { +function ua() { + this.uz = function(g6, font, maxWidth) { if (gM.font = font, gM.measureText(g6).width <= maxWidth) return g6; for (let eM = g6.length - 1; 1 <= eM; eM--) if (g6 = g6.substring(0, eM), gM.measureText(g6 + "...").width <= maxWidth) return g6 + "..."; @@ -1888,11 +1926,11 @@ function uR() { } } -function uN() { - var ur = null; - this.rX = 0, this.p2 = function() { +function uW() { + var v0 = null; + this.rg = 0, this.p2 = function() { var dj = bD.dO.data[5].value; - ur = "px " + dj, "Trebuchet MS" !== dj && (ur += ", Trebuchet MS"), this.rX = gO(32, 32, ["a", "b", "m"], 200, ur) + v0 = "px " + dj, "Trebuchet MS" !== dj && (v0 += ", Trebuchet MS"), this.rg = gO(32, 32, ["a", "b", "m"], 200, v0) }, this.pV = function(gD, gI) { var iW = document.createElement("canvas"); return iW.width = gD, iW.height = gI, iW @@ -1902,19 +1940,19 @@ function uN() { }) }, this.getImageData = function(qm, gD, gI) { return qm.getImageData(0, 0, gD, gI) - }, this.kg = function(gY, us, ht) { - return "rgb(" + gY + "," + us + "," + ht + ")" - }, this.ki = function(gY, us, ht, hk) { - return "rgba(" + gY + "," + us + "," + ht + "," + hk.toFixed(3) + ")" + }, this.kg = function(gY, v1, ht) { + return "rgb(" + gY + "," + v1 + "," + ht + ")" + }, this.ki = function(gY, v1, ht, hk) { + return "rgba(" + gY + "," + v1 + "," + ht + "," + hk.toFixed(3) + ")" }, this.g9 = function(type, size) { - return size = size.toFixed(2), 0 === type ? size + ur : 1 === type ? "bold " + size + ur : 2 === type ? "lighter " + size + ur : 3 === type ? "italic " + size + ur : 4 === type ? "oblique " + size + ur : 5 === type ? "small-caps " + - size + ur : "small-caps bold " + size + ur + return size = size.toFixed(2), 0 === type ? size + v0 : 1 === type ? "bold " + size + v0 : 2 === type ? "lighter " + size + v0 : 3 === type ? "italic " + size + v0 : 4 === type ? "oblique " + size + v0 : 5 === type ? "small-caps " + + size + v0 : "small-caps bold " + size + v0 }, this.textAlign = function(gW, id) { gW.textAlign = 0 === id ? "left" : 1 === id ? "center" : "right" }, this.textBaseline = function(gW, id) { gW.textBaseline = 1 === id ? "middle" : "bottom" }, this.nb = function(dM, code = 5, color = ad.gN) { - color = this.na(b4.ut) + " solid " + color; + color = this.na(b4.v2) + " solid " + color; 5 === code ? dM.style.border = color : 4 === code ? dM.style.borderLeft = color : 2 === code ? dM.style.borderBottom = color : 6 === code ? dM.style.borderRight = color : dM.style.borderTop = color }, this.nS = function(dj) { return 1 + dj * bB.d3.g3() @@ -1922,49 +1960,49 @@ function uN() { return kS * this.nS(eq) * aO.g4 / aO.nW }, this.na = function(dj) { return dj.toFixed(1) + "px" - }, this.uu = function(uv, uw) { - for (var g6 = "