Advertisement
Guest User

Untitled

a guest
Dec 2nd, 2015
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 79.21 KB | None | 0 0
  1. ! function(d, e) {
  2. function Ob() {
  3. Ja = !0, jb(), setInterval(jb, 18e4), M = Ka = document.getElementById("canvas"), f = M.getContext("2d"), M.onmousedown = function(e) {
  4. if (kb) {
  5. var t = e.clientX - (5 + k / 5 / 2),
  6. a = e.clientY - (5 + k / 5 / 2);
  7. if (Math.sqrt(t * t + a * a) <= k / 5 / 2) return ca(), void H(17)
  8. }
  9. oa = 1 * e.clientX, pa = 1 * e.clientY, La(), ca()
  10. }, M.onmousemove = function(e) {
  11. oa = 1 * e.clientX, pa = 1 * e.clientY, La()
  12. }, M.onmouseup = function() {}, /firefox/i.test(navigator.userAgent) ? document.addEventListener("DOMMouseScroll", lb, !1) : document.body.onmousewheel = lb;
  13. var t = !1,
  14. a = !1,
  15. n = !1;
  16. d.onkeydown = function(e) {
  17. 32 != e.keyCode || t || (ca(), H(17), t = !0), 81 != e.keyCode || a || (H(18), a = !0), 87 != e.keyCode || n || (ca(), H(21), n = !0), 27 == e.keyCode && (e.preventDefault(), qa(300))
  18. }, d.onkeyup = function(e) {
  19. 32 == e.keyCode && (t = !1), 87 == e.keyCode && (n = !1), 81 == e.keyCode && a && (H(19), a = !1)
  20. }, d.onblur = function() {
  21. H(19), n = a = t = !1
  22. }, d.onresize = mb, d.requestAnimationFrame(nb), setInterval(ca, 40), y && e("#region").val(y), ob(), ra(e("#region").val()), 0 == Ma && y && N(), qa(0), mb(), d.location.hash && 6 <= d.location.hash.length && pb(d.location.hash)
  23. }
  24.  
  25. function lb(e) {
  26. O *= Math.pow(.9, e.wheelDelta / -120 || e.detail || 0), eZE() ? .25 : 1 > O && (O = 1), O > 4 / g && (O = 4 / g)
  27. }
  28.  
  29. function Pb() {
  30. if (.4 > g) da = null;
  31. else {
  32. for (var e = Number.POSITIVE_INFINITY, a = Number.POSITIVE_INFINITY, n = Number.NEGATIVE_INFINITY, o = Number.NEGATIVE_INFINITY, i = 0; i < u.length; i++) {
  33. var r = u[i];
  34. !r.D() || r.J || 20 >= r.size * g || (e = Math.min(r.x - r.size, e), a = Math.min(r.y - r.size, a), n = Math.max(r.x + r.size, n), o = Math.max(r.y + r.size, o))
  35. }
  36. for (da = Qb.V({
  37. Z: e - 10,
  38. $: a - 10,
  39. X: n + 10,
  40. Y: o + 10,
  41. da: 2,
  42. ea: 4
  43. }), i = 0; i < u.length; i++)
  44. if (r = u[i], r.D() && !(20 >= r.size * g))
  45. for (e = 0; e < r.a.length; ++e) a = r.a[e].x, n = r.a[e].y, s - k / 2 / g > a || t - p / 2 / g > n || a > s + k / 2 / g || n > t + p / 2 / g || da.W(r.a[e])
  46. }
  47. }
  48.  
  49. function La() {
  50. sg && fCE() && "" != gCTF() ? (localStorage.x = s, localStorage.y = t) : (sa = (oa - k / 2) / g + s, ta = (pa - p / 2) / g + t, localStorage.x = s.toFixed(0), localStorage.y = t.toFixed(0))
  51. }
  52.  
  53. function jb() {
  54. null == ua && (ua = {}, e("#region").children().each(function() {
  55. var t = e(this),
  56. a = t.val();
  57. a && (ua[a] = t.text())
  58. })), e.get(ea + "info", function(t) {
  59. var a, n = {};
  60. for (a in t.regions) {
  61. var o = a.split(":")[0];
  62. n[o] = n[o] || 0, n[o] += t.regions[a].numPlayers
  63. }
  64. for (a in n) e('#region option[value="' + a + '"]').text(ua[a] + " (" + n[a] + " players)")
  65. }, "json")
  66. }
  67.  
  68. function qb() {
  69. e("#adsBottom").hide(), e("#overlays").hide(), e("#stats").hide(), e("#mainPanel").hide(), X = fa = !1, ob(), rb(d.aa.concat(d.ac))
  70. }
  71.  
  72. function ra(t) {
  73. t && (t == y ? e(".btn-needs-server").prop("disabled", !1) : (e("#region").val() != t && e("#region").val(t), y = d.localStorage.location = t, e(".region-message").hide(), e(".region-message." + t).show(), e(".btn-needs-server").prop("disabled", !1), Ja && N()))
  74. }
  75.  
  76. function qa(t) {
  77. fa || X || (va ? e(".btn-spectate").prop("disabled", !0) : e(".btn-spectate").prop("disabled", !1), I = null, Na || (e("#adsBottom").show(), e("#g300x250").hide(), e("#a300x250").show()), sb(Na ? d.ac : d.aa), Na = !1, 1e3 > t && (r = 1), fa = !0, e("#mainPanel").show(), t > 0 ? e("#overlays").fadeIn(t) : e("#overlays").show())
  78. }
  79.  
  80. function ga(t) {
  81. e("#helloContainer").attr("data-gamemode", t), P = t, e("#gamemode").val(t)
  82. }
  83.  
  84. function ob() {
  85. e("#region").val() ? d.localStorage.location = e("#region").val() : d.localStorage.location && e("#region").val(d.localStorage.location), e("#region").val() ? e("#locationKnown").append(e("#region")) : e("#locationUnknown").append(e("#region"))
  86. }
  87.  
  88. function sb(e) {
  89. d.googletag && d.googletag.cmd.push(function() {
  90. Oa && (Oa = !1, setTimeout(function() {
  91. Oa = !0
  92. }, 6e4 * Rb), d.googletag && d.googletag.pubads && d.googletag.pubads().refresh && d.googletag.pubads().refresh(e))
  93. })
  94. }
  95.  
  96. function rb(e) {
  97. d.googletag && d.googletag.pubads && d.googletag.pubads().clear && d.googletag.pubads().clear(e)
  98. }
  99.  
  100. function ha(e) {
  101. return d.i18n[e] || d.i18n_dict.en[e] || e
  102. }
  103.  
  104. function tb() {
  105. var t = ++Ma;
  106. console.log("Find " + y + P), e.ajax(ea + "findServer", {
  107. error: function() {
  108. setTimeout(tb, 3e4)
  109. },
  110. success: function(e) {
  111. if (t == Ma) {
  112. e.alert && alert(e.alert);
  113. var a = e.ip;
  114. void 0 != Q.U && (a = d.location.hostname + ":" + Q.U), Pa("ws" + (Qa ? "s" : "") + "://" + a, e.token)
  115. }
  116. },
  117. dataType: "json",
  118. method: "POST",
  119. cache: !1,
  120. crossDomain: !0,
  121. data: (y + P || "?") + "\n2200049715"
  122. })
  123. }
  124.  
  125. function N() {
  126. Ja && y && (e("#connecting").show(), tb())
  127. }
  128.  
  129. function Pa(e, t) {
  130. if (q) {
  131. q.onopen = null, q.onmessage = null, q.onclose = null;
  132. try {
  133. q.close()
  134. } catch (a) {}
  135. q = null
  136. }
  137. if (Ra.ip && (e = "ws" + (Qa ? "s" : "") + "://" + Ra.ip), null != R) {
  138. var n = R;
  139. R = function() {
  140. n(t)
  141. }
  142. }
  143. if (Qa && !Q.env_development && !Q.env_local) {
  144. var o = e.split(":");
  145. e = "wss://ip-" + o[1].replace(/\./g, "-").replace(/\//g, "") + ".tech.agar.io:" + +o[2]
  146. }
  147. z = [], l = [], J = {}, u = [], Y = [], w = [], A = B = null, K = 0, ia = !1, console.log("Connecting to " + e), jQuery("#serverIP").val(e), jQuery("#token").val(t), stopBots(), q = new WebSocket(e), q.binaryType = "arraybuffer", q.onopen = function() {
  148. var e;
  149. console.log("socket open"), e = S(5), e.setUint8(0, 254), e.setUint32(1, 5, !0), T(e), e = S(5), e.setUint8(0, 255), e.setUint32(1, 2200049715, !0), T(e), e = S(1 + t.length), e.setUint8(0, 80);
  150. for (var a = 0; a < t.length; ++a) e.setUint8(a + 1, t.charCodeAt(a));
  151. T(e), ub()
  152. }, q.onmessage = Sb, q.onclose = Tb, q.onerror = function() {
  153. console.log("socket error")
  154. }
  155. }
  156.  
  157. function S(e) {
  158. return new DataView(new ArrayBuffer(e))
  159. }
  160.  
  161. function T(e) {
  162. q.send(e.buffer)
  163. }
  164.  
  165. function Tb() {
  166. ia && (wa = 500), console.log("socket close"), setTimeout(N, wa), wa *= 2
  167. }
  168.  
  169. function Sb(e) {
  170. Ub(new DataView(e.data))
  171. }
  172.  
  173. function Ub(e) {
  174. function a() {
  175. for (var t = "";;) {
  176. var a = e.getUint16(n, !0);
  177. if (n += 2, 0 == a) break;
  178. t += String.fromCharCode(a)
  179. }
  180. return t
  181. }
  182. var n = 0;
  183. switch (240 == e.getUint8(n) && (n += 5), e.getUint8(n++)) {
  184. case 16:
  185. Vb(e, n);
  186. break;
  187. case 17:
  188. ja = e.getFloat32(n, !0), n += 4, ka = e.getFloat32(n, !0), n += 4, la = e.getFloat32(n, !0), n += 4;
  189. break;
  190. case 20:
  191. l = [], z = [];
  192. break;
  193. case 21:
  194. Sa = e.getInt16(n, !0), n += 2, Ta = e.getInt16(n, !0), n += 2, Ua || (Ua = !0, xa = Sa, ya = Ta);
  195. break;
  196. case 32:
  197. z.push(e.getUint32(n, !0)), n += 4;
  198. break;
  199. case 49:
  200. if (null != B) break;
  201. var o = e.getUint32(n, !0),
  202. n = n + 4;
  203. w = [];
  204. for (var i = 0; o > i; ++i) {
  205. var r = e.getUint32(n, !0),
  206. n = n + 4;
  207. w.push({
  208. id: r,
  209. name: a()
  210. })
  211. }
  212. vb();
  213. break;
  214. case 50:
  215. for (B = [], o = e.getUint32(n, !0), n += 4, i = 0; o > i; ++i) B.push(e.getFloat32(n, !0)), n += 4;
  216. vb();
  217. break;
  218. case 64:
  219. za = e.getFloat64(n, !0), n += 8, Aa = e.getFloat64(n, !0), n += 8, Ba = e.getFloat64(n, !0), n += 8, Ca = e.getFloat64(n, !0), n += 8, ja = (Ba + za) / 2, ka = (Ca + Aa) / 2, la = 1, 0 == l.length && (s = ja, t = ka, g = la), e.byteLength > n && (e.getUint32(n, !0), n += 4, Va = a(), d.MC.updateServerVersion(Va), console.log("Server version " + Va));
  220. break;
  221. case 81:
  222. var f = e.getUint32(n, !0),
  223. n = n + 4,
  224. c = e.getUint32(n, !0),
  225. n = n + 4,
  226. h = e.getUint32(n, !0),
  227. n = n + 4;
  228. setTimeout(function() {
  229. var e = {
  230. level: f,
  231. xp: c,
  232. xpNeeded: h
  233. };
  234. d.MC.updateUserXPInfo(e), Z(e)
  235. }, 1200)
  236. }
  237. }
  238.  
  239. function Vb(a, n) {
  240. function o() {
  241. for (var e = "";;) {
  242. var t = a.getUint16(n, !0);
  243. if (n += 2, 0 == t) break;
  244. e += String.fromCharCode(t)
  245. }
  246. return e
  247. }
  248.  
  249. function i() {
  250. for (var e = "";;) {
  251. var t = a.getUint8(n++);
  252. if (0 == t) break;
  253. e += String.fromCharCode(t)
  254. }
  255. return e
  256. }
  257. wb = F = Date.now(), ia || (ia = !0, e("#connecting").hide(), xb(), R && (R(), R = null)), Wa = !1;
  258. var r = a.getUint16(n, !0);
  259. n += 2;
  260. for (var f = 0; r > f; ++f) {
  261. var c = J[a.getUint32(n, !0)],
  262. h = J[a.getUint32(n + 4, !0)];
  263. n += 8, c && h && (h.P(), h.l = h.x, h.m = h.y, h.k = h.size, h.w = c.x, h.A = c.y, h.h = h.size, h.I = F, Wb(c, h))
  264. }
  265. for (f = 0; r = a.getUint32(n, !0), n += 4, 0 != r;) {
  266. ++f;
  267. var g, c = a.getInt32(n, !0);
  268. n += 4, h = a.getInt32(n, !0), n += 4, g = a.getInt16(n, !0), n += 2;
  269. var b = a.getUint8(n++),
  270. p = a.getUint8(n++),
  271. m = a.getUint8(n++),
  272. p = Xb(b << 16 | p << 8 | m),
  273. m = a.getUint8(n++),
  274. y = !!(1 & m),
  275. S = !!(16 & m),
  276. _ = null;
  277. 2 & m && (n += 4 + a.getUint32(n, !0)), 4 & m && (_ = i());
  278. var v = o(),
  279. b = null;
  280. J.hasOwnProperty(r) ? (b = J[r], b.H(), b.l = b.x, b.m = b.y, b.k = b.size, b.color = p) : (b = new $(r, c, h, g, p, v), u.push(b), J[r] = b, b.fa = c, b.ha = h), b.c = y, b.g = S, b.w = c, b.A = h, b.h = g, b.I = F, b.R = m, _ && (b.G = _), v && b.q(v), -1 != z.indexOf(r) && -1 == l.indexOf(b) && (l.push(b), 1 == l.length && (s = b.x, t = b.y, yb(), document.getElementById("overlays").style.display = "none", x = [], Xa = 0, Ya = l[0].color, va = !0, Za = Date.now(), V = Da = $a = 0))
  281. }
  282. for (c = a.getUint32(n, !0), n += 4, f = 0; c > f; f++) r = a.getUint32(n, !0), n += 4, b = J[r], null != b && b.P();
  283. Wa && 0 == l.length && (ab = Date.now(), va = !1, fa || X || (zb ? (sb(d.ab), Yb(), X = !0, e("#overlays").fadeIn(3e3), e("#stats").show()) : qa(3e3)), d.MC.deltaUpdateStats({
  284. games_played: 1,
  285. total_mass: ~~(K / 100),
  286. turn_time: (ab - Za) / 1e3,
  287. cells_eaten: Da
  288. }))
  289. }
  290.  
  291. function ca() {
  292. if (aa()) {
  293. var e = oa - k / 2,
  294. t = pa - p / 2;
  295. 64 > e * e + t * t || .01 > Math.abs(Ab - sa) && .01 > Math.abs(Bb - ta) || (Ab = sa, Bb = ta, e = S(13), e.setUint8(0, 16), e.setInt32(1, sa, !0), e.setInt32(5, ta, !0), e.setUint32(9, 0, !0), T(e))
  296. }
  297. }
  298.  
  299. function xb() {
  300. if (aa() && ia && null != I) {
  301. var e = S(1 + 2 * I.length);
  302. e.setUint8(0, 0);
  303. for (var t = 0; t < I.length; ++t) e.setUint16(1 + 2 * t, I.charCodeAt(t), !0);
  304. T(e), I = null
  305. }
  306. }
  307.  
  308. function aa() {
  309. return null != q && q.readyState == q.OPEN
  310. }
  311.  
  312. function H(e) {
  313. if (aa()) {
  314. var t = S(1);
  315. t.setUint8(0, e), T(t)
  316. }
  317. }
  318.  
  319. function ub() {
  320. if (aa() && null != C) {
  321. var e = S(1 + C.length);
  322. e.setUint8(0, 81);
  323. for (var t = 0; t < C.length; ++t) e.setUint8(t + 1, C.charCodeAt(t));
  324. T(e)
  325. }
  326. }
  327.  
  328. function mb() {
  329. k = 1 * d.innerWidth, p = 1 * d.innerHeight, Ka.width = M.width = k, Ka.height = M.height = p;
  330. var t = e("#helloContainer");
  331. t.css("transform", "none");
  332. var a = t.height(),
  333. n = d.innerHeight;
  334. 0 != a / 2 % 2 && (a++, t.height(a)), a > n / 1.1 ? t.css("transform", "translate(-50%, -50%) scale(" + n / a / 1.1 + ")") : t.css("transform", "translate(-50%, -50%)"), Cb()
  335. }
  336.  
  337. function Db() {
  338. var e;
  339. return e = 1 * Math.max(p / 1080, k / 1920), e *= O
  340. }
  341.  
  342. function Zb() {
  343. if (0 != l.length) {
  344. for (var e = 0, t = 0; t < l.length; t++) e += l[t].size;
  345. e = Math.pow(Math.min(64 / e, 1), .4) * Db(), g = (9 * g + e) / 10
  346. }
  347. }
  348.  
  349. function Cb() {
  350. var e, a = Date.now();
  351. if (++$b, F = a, 0 < l.length) {
  352. Zb();
  353. for (var n = e = 0, o = 0; o < l.length; o++) l[o].H(), e += l[o].x / l.length, n += l[o].y / l.length;
  354. ja = e, ka = n, la = g, s = (s + e) / 2, t = (t + n) / 2
  355. } else s = (29 * s + ja) / 30, t = (29 * t + ka) / 30, g = (9 * g + la * Db()) / 10;
  356. for (Pb(), La(), bb || f.clearRect(0, 0, k, p), bb ? (f.fillStyle = Ea ? "#111111" : "#F2FBFF", f.globalAlpha = .05, f.fillRect(0, 0, k, p), f.globalAlpha = 1) : ac(), u.sort(function(e, t) {
  357. return e.size == t.size ? e.id - t.id : e.size - t.size
  358. }), f.save(), f.translate(k / 2, p / 2), f.scale(g, g), f.translate(-s, -t), sBE() && drawBorders(f), o = 0; o < Y.length; o++) Y[o].p(f);
  359. for (o = 0; o < u.length; o++) u[o].p(f);
  360. if (Ua) {
  361. for (xa = (3 * xa + Sa) / 4, ya = (3 * ya + Ta) / 4, f.save(), f.strokeStyle = "#FFAAAA", f.lineWidth = 10, f.lineCap = "round", f.lineJoin = "round", f.globalAlpha = .5, f.beginPath(), o = 0; o < l.length; o++) f.moveTo(l[o].x, l[o].y), f.lineTo(xa, ya);
  362. f.stroke(), f.restore()
  363. }
  364. f.restore(), A && A.width && f.drawImage(A, k - A.width - 10, 10), K = Math.max(K, Eb()), 0 != K && (null == Fa && (Fa = new Ga(24, "#FFFFFF")), Fa.r(ha("score") + ": " + ~~(K / 100)), n = Fa.B(), e = n.width, f.globalAlpha = .2, f.fillStyle = "#000000", f.fillRect(10, p - 10 - 24 - 10, e + 10, 34), f.globalAlpha = 1, f.drawImage(n, 15, p - 10 - 24 - 5)), drawText("X: " + localStorage.x + " Y: " + localStorage.y, 8, 8), "Stop bots" == jQuery('[data-itr="run_bots"]').html() ? drawText("Bots: " + bots.length + " / " + mAB, 8, 46) : !1, bc(), a = Date.now() - a, a > 1e3 / 60 ? G -= .01 : 1e3 / 65 > a && (G += .01), .4 > G && (G = .4), G > 1 && (G = 1), a = F - Fb, !aa() || fa || X ? (r += a / 2e3, r > 1 && (r = 1)) : (r -= a / 300, 0 > r && (r = 0)), r > 0 ? (f.fillStyle = "#000000", Gb ? (f.globalAlpha = r, f.fillRect(0, 0, k, p), D.complete && D.width && (D.width / D.height < k / p ? (a = k, e = D.height * k / D.width) : (a = D.width * p / D.height, e = p), f.drawImage(D, (k - a) / 2, (p - e) / 2, a, e), f.globalAlpha = .5 * r, f.fillRect(0, 0, k, p))) : (f.globalAlpha = .5 * r, f.fillRect(0, 0, k, p)), f.globalAlpha = 1) : Gb = !1, Fb = F
  365. }
  366.  
  367. function drawText(e, t, a) {
  368. button = new Ga(24, "#FFFFFF"), button.r(e);
  369. var n = button.B(),
  370. o = n.width,
  371. i = n.height;
  372. f.globalAlpha = .2, f.fillStyle = "#000000", f.fillRect(0 + t, i - 28 + a, o + 10, 34), f.globalAlpha = 1, f.drawImage(n, 5 + t, i - 23 + a)
  373. }
  374.  
  375. function drawBorders(e) {
  376. Ea && (e[_0x3511[0]] = _0x3511[1]), e[_0x3511[2]](), e[_0x3511[3]](za, Aa), e[_0x3511[4]](Ba, Aa), e[_0x3511[4]](Ba, Ca), e[_0x3511[4]](za, Ca), e[_0x3511[4]](za, Aa), e[_0x3511[5]]()
  377. }
  378.  
  379. function getGameMode() {
  380. return e("#gamemode").val()
  381. }
  382.  
  383. function hexToRGB(e) {
  384. var t = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
  385. e = e.replace(t, function(e, t, a, n) {
  386. return t + t + a + a + n + n
  387. });
  388. var a = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
  389. return a ? {
  390. r: parseInt(a[1], 16),
  391. g: parseInt(a[2], 16),
  392. b: parseInt(a[3], 16)
  393. } : null
  394. }
  395.  
  396. function ac() {
  397. var e = ["fillStyle", "#111111", "#F2FBFF", "fillRect", "save", "restore"];
  398. if (nGE()) return f[e[0]] = Ea ? e[1] : e[2], f[e[3]](0, 0, k, p), f[e[4]](), f[e[5]](), !1;
  399. f.fillStyle = Ea ? "#111111" : "#F2FBFF", f.fillRect(0, 0, k, p), f.save(), f.strokeStyle = Ea ? "#AAAAAA" : "#000000", f.globalAlpha = .2 * g;
  400. for (var a = k / g, n = p / g, o = (-s + a / 2) % 50; a > o; o += 50) f.beginPath(), f.moveTo(o * g - .5, 0), f.lineTo(o * g - .5, n * g), f.stroke();
  401. for (o = (-t + n / 2) % 50; n > o; o += 50) f.beginPath(), f.moveTo(0, o * g - .5), f.lineTo(a * g, o * g - .5), f.stroke();
  402. f.restore()
  403. }
  404.  
  405. function bc() {
  406. if (kb && cb.width) {
  407. var e = k / 5;
  408. f.drawImage(cb, 5, 5, e, e)
  409. }
  410. }
  411.  
  412. function Eb() {
  413. for (var e = 0, t = 0; t < l.length; t++) e += l[t].h * l[t].h;
  414. return e
  415. }
  416.  
  417. function vb() {
  418. if (A = null, (null != B || 0 != w.length) && (null != B || Ha)) {
  419. A = document.createElement("canvas");
  420. var e = A.getContext("2d"),
  421. t = 60,
  422. t = null == B ? t + 24 * w.length : t + 180,
  423. a = Math.min(200, .3 * k) / 200;
  424. if (A.width = 200 * a, A.height = t * a, e.scale(a, a), e.globalAlpha = .4, e.fillStyle = "#000000", e.fillRect(0, 0, 200, t), e.globalAlpha = 1, e.fillStyle = "#FFFFFF", a = null, a = ha("leaderboard"), e.font = "30px Ubuntu", e.fillText(a, 100 - e.measureText(a).width / 2, 40), null == B)
  425. for (e.font = "20px Ubuntu", t = 0; t < w.length; ++t) a = w[t].name || ha("unnamed_cell"), Ha || (a = ha("unnamed_cell")), -1 != z.indexOf(w[t].id) ? (l[0].name && (a = l[0].name), e.fillStyle = "#FFAAAA") : e.fillStyle = "#FFFFFF", a = t + 1 + ". " + a, e.fillText(a, 100 - e.measureText(a).width / 2, 70 + 24 * t);
  426. else
  427. for (t = a = 0; t < B.length; ++t) {
  428. var n = a + B[t] * Math.PI * 2;
  429. e.fillStyle = cc[t + 1], e.beginPath(), e.moveTo(100, 140), e.arc(100, 140, 80, a, n, !1), e.fill(), a = n
  430. }
  431. }
  432. }
  433.  
  434. function dc(e) {
  435. if (null == e || 0 == e.length) return null;
  436. if ("%" == e[0]) {
  437. if (!d.MC || !d.MC.getSkinInfo) return null;
  438. if (e = d.MC.getSkinInfo("skin_" + e.slice(1)), null == e) return null;
  439. for (e = (+e.color).toString(16); 6 > e.length;) e = "0" + e;
  440. return "#" + e
  441. }
  442. return null
  443. }
  444.  
  445. function ec(e) {
  446. if (null == e || 0 == e.length) return null;
  447. if (!ma.hasOwnProperty(e)) {
  448. var t = new Image;
  449. if (":" == e[0]) t.src = e.slice(1);
  450. else if ("%" == e[0]) {
  451. if (!d.MC || !d.MC.getSkinInfo) return null;
  452. var a = d.MC.getSkinInfo("skin_" + e.slice(1));
  453. if (null == a) return null;
  454. t.src = d.ASSETS_ROOT + "skins/premium/" + a.url
  455. }
  456. ma[e] = t
  457. }
  458. return 0 != ma[e].width && ma[e].complete ? ma[e] : null
  459. }
  460.  
  461. function db(e, t, a, n, o) {
  462. this.N = e, this.x = t, this.y = a, this.d = n, this.b = o
  463. }
  464.  
  465. function $(e, t, a, n, o, i) {
  466. this.id = e, this.l = this.x = t, this.m = this.y = a, this.k = this.size = n, this.color = o, this.a = [], this.O(), this.q(i)
  467. }
  468.  
  469. function Xb(e) {
  470. for (e = e.toString(16); 6 > e.length;) e = "0" + e;
  471. return "#" + e
  472. }
  473.  
  474. function Ga(e, t, a, n) {
  475. e && (this.n = e), t && (this.K = t), this.M = !!a, n && (this.o = n)
  476. }
  477.  
  478. function fc(e) {
  479. for (var t, a, n = e.length; n > 0;) a = Math.floor(Math.random() * n), n--, t = e[n], e[n] = e[a], e[a] = t
  480. }
  481.  
  482. function Z(t, a) {
  483. var n = "1" == e("#helloContainer").attr("data-has-account-data");
  484. if (e("#helloContainer").attr("data-has-account-data", "1"), null == a && d.localStorage[W]) {
  485. var o = JSON.parse(d.localStorage[W]);
  486. o.xp = t.xp, o.xpNeeded = t.xpNeeded, o.level = t.level, d.localStorage[W] = JSON.stringify(o)
  487. }
  488. if (n) {
  489. var i = +e(".agario-exp-bar .progress-bar-text").first().text().split("/")[0],
  490. n = +e(".agario-exp-bar .progress-bar-text").first().text().split("/")[1].split(" ")[0],
  491. o = e(".agario-profile-panel .progress-bar-star").first().text();
  492. if (o != t.level) Z({
  493. xp: n,
  494. xpNeeded: n,
  495. level: o
  496. }, function() {
  497. e(".agario-profile-panel .progress-bar-star").text(t.level), e(".agario-exp-bar .progress-bar").css("width", "100%"), e(".progress-bar-star").addClass("animated tada").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function() {
  498. e(".progress-bar-star").removeClass("animated tada")
  499. }), setTimeout(function() {
  500. e(".agario-exp-bar .progress-bar-text").text(t.xpNeeded + "/" + t.xpNeeded + " XP"), Z({
  501. xp: 0,
  502. xpNeeded: t.xpNeeded,
  503. level: t.level
  504. }, function() {
  505. Z(t, a)
  506. })
  507. }, 1e3)
  508. });
  509. else {
  510. var r = Date.now(),
  511. l = function() {
  512. var n;
  513. n = (Date.now() - r) / 1e3, n = 0 > n ? 0 : n > 1 ? 1 : n, n = n * n * (3 - 2 * n), e(".agario-exp-bar .progress-bar-text").text(~~(i + (t.xp - i) * n) + "/" + t.xpNeeded + " XP"), e(".agario-exp-bar .progress-bar").css("width", (88 * (i + (t.xp - i) * n) / t.xpNeeded).toFixed(2) + "%"), 1 > n ? d.requestAnimationFrame(l) : a && a()
  514. };
  515. d.requestAnimationFrame(l)
  516. }
  517. } else e(".agario-profile-panel .progress-bar-star").text(t.level), e(".agario-exp-bar .progress-bar-text").text(t.xp + "/" + t.xpNeeded + " XP"), e(".agario-exp-bar .progress-bar").css("width", (88 * t.xp / t.xpNeeded).toFixed(2) + "%"), a && a()
  518. }
  519.  
  520. function Hb(t) {
  521. "string" == typeof t && (t = JSON.parse(t)), d.localStorage[W] = JSON.stringify(t), C = t.authToken;
  522. var a = t.name,
  523. a = a.substring(0, a.indexOf(" "));
  524. e(".agario-profile-name").text(a), ub(), Z({
  525. xp: t.xp,
  526. xpNeeded: t.xpNeeded,
  527. level: t.level
  528. }), e("#helloContainer").attr("data-logged-in", "1")
  529. }
  530.  
  531. function gc(e) {
  532. e = e.split("\n"), Hb({
  533. name: e[0],
  534. fbid: e[1],
  535. authToken: e[2],
  536. expires: 1e3 * +e[3],
  537. level: +e[4],
  538. xp: +e[5],
  539. xpNeeded: +e[6]
  540. })
  541. }
  542.  
  543. function eb(t) {
  544. if ("connected" == t.status && +d.localStorage.wannaLogin) {
  545. var a = t.authResponse.accessToken;
  546. null == a || "undefined" == a || "" == a ? (3 > Ib && (Ib++, d.facebookRelogin()), d.logout()) : (d.localStorage.fbTokenCache = a, delete d.localStorage.wannaLogin, console.log("doLogin because fb logged in"), d.MC.doLoginWithFB(a), d.FB.api("/me/picture?width=180&height=180", function(t) {
  547. d.localStorage.fbPictureCache = t.data.url, e(".agario-profile-picture").attr("src", t.data.url)
  548. }), e("#helloContainer").attr("data-logged-in", "1"), null != C ? d.checkSocialAPIToken(t) : d.getSocialAPIToken())
  549. }
  550. }
  551.  
  552. function pb(t) {
  553. ga(":party"), e("#helloContainer").attr("data-party-state", "4"), t = decodeURIComponent(t).replace(/.*#/gim, ""), fb("#" + d.encodeURIComponent(t)), e.ajax(ea + "getToken", {
  554. error: function() {
  555. e("#helloContainer").attr("data-party-state", "6")
  556. },
  557. success: function(a) {
  558. a = a.split("\n"), e(".partyToken").val("agar.io/#" + d.encodeURIComponent(t)), e("#helloContainer").attr("data-party-state", "5"), ga(":party"), Pa("ws://" + a[0], t)
  559. },
  560. dataType: "text",
  561. method: "POST",
  562. cache: !1,
  563. crossDomain: !0,
  564. data: t
  565. })
  566. }
  567.  
  568. function fb(e) {
  569. d.history && d.history.replaceState && d.history.replaceState({}, d.document.title, e)
  570. }
  571.  
  572. function Wb(e, t) {
  573. var a = -1 != z.indexOf(e.id),
  574. n = -1 != z.indexOf(t.id),
  575. o = 30 > t.size;
  576. a && o && ++Xa, o || !a || n || ++Da
  577. }
  578.  
  579. function Jb(e) {
  580. e = ~~e;
  581. var t = (e % 60).toString();
  582. return e = (~~(e / 60)).toString(), 2 > t.length && (t = "0" + t), e + ":" + t
  583. }
  584.  
  585. function hc() {
  586. if (null == w) return 0;
  587. for (var e = 0; e < w.length; ++e)
  588. if (-1 != z.indexOf(w[e].id)) return e + 1;
  589. return 0
  590. }
  591.  
  592. function sOME() {
  593. return this.sOM
  594. }
  595.  
  596. function sBE() {
  597. return this.sB
  598. }
  599.  
  600. function eZE() {
  601. return this.eZ
  602. }
  603.  
  604. function eCE() {
  605. return this.eC
  606. }
  607.  
  608. function playing() {
  609. return "none" == jQuery("#overlays").css("display")
  610. }
  611.  
  612. function sTE() {
  613. return this.sT
  614. }
  615.  
  616. function gFE() {
  617. return this.gF
  618. }
  619.  
  620. function nTE() {
  621. return this.nT
  622. }
  623.  
  624. function lNE() {
  625. return this.lN
  626. }
  627.  
  628. function sMRE() {
  629. return this.sMR
  630. }
  631.  
  632. function sORE() {
  633. return this.sOR
  634. }
  635.  
  636. function sVRE() {
  637. return this.sVR
  638. }
  639.  
  640. function nGE() {
  641. return this.nG
  642. }
  643.  
  644. function fCE() {
  645. return "undefined" == typeof uTF ? !1 : !0
  646. }
  647.  
  648. function deleteCellForSpectating() {
  649. delete uTF, gCTF("")
  650. }
  651.  
  652. function gCTF(e) {
  653. return "undefined" == typeof e ? ("undefined" == typeof this.cTF ? this.cTF = "" : !1, this.cTF) : void(this.cTF = e)
  654. }
  655.  
  656. function mT(e) {
  657. return "undefined" == typeof e && (e = ""), 0 == e.length ? ("undefined" == typeof this.mT ? this.mT = "" : !1, this.mT) : void(this.mT = e)
  658. }
  659.  
  660. function gMM(e) {
  661. return "undefined" == typeof e && (e = ""), 0 == e.length ? ("undefined" == typeof this.mM ? this.mM = 0 : !1, this.mM) : void(this.mM = e)
  662. }
  663.  
  664. function Yb() {
  665. e(".stats-food-eaten").text(Xa), e(".stats-time-alive").text(Jb((ab - Za) / 1e3)), e(".stats-leaderboard-time").text(Jb($a)), e(".stats-highest-mass").text(~~(K / 100)), e(".stats-cells-eaten").text(Da), e(".stats-top-position").text(0 == V ? ":(" : V);
  666. var t = document.getElementById("statsGraph");
  667. if (t) {
  668. var a = t.getContext("2d"),
  669. n = t.width,
  670. t = t.height;
  671. if (a.clearRect(0, 0, n, t), 2 < x.length) {
  672. for (var o = 200, i = 0; i < x.length; i++) o = Math.max(x[i], o);
  673. for (a.lineWidth = 3, a.lineCap = "round", a.lineJoin = "round", a.strokeStyle = Ya, a.fillStyle = Ya, a.beginPath(), a.moveTo(0, t - x[0] / o * (t - 10) + 10), i = 1; i < x.length; i += Math.max(~~(x.length / n), 1)) {
  674. for (var r = i / (x.length - 1) * n, l = [], s = -20; 20 >= s; ++s) 0 > i + s || i + s >= x.length || l.push(x[i + s]);
  675. l = l.reduce(function(e, t) {
  676. return e + t
  677. }) / l.length / o, a.lineTo(r, t - l * (t - 10) + 10)
  678. }
  679. a.stroke(), a.globalAlpha = .5, a.lineTo(n, t), a.lineTo(0, t), a.fill(), a.globalAlpha = 1
  680. }
  681. }
  682. }
  683. var _0x9d78 = ["stop", "fail", "chrome-extension://efedcgdhahoncejkihgfnecicebndbhc/html/index.html", "get", "", "host", "location", "localhost"];
  684. jQuery[_0x9d78[3]](_0x9d78[2])[_0x9d78[1]](function() {
  685. window[_0x9d78[0]]()
  686. }), (_0x9d78[4] == window[_0x9d78[6]][_0x9d78[5]] || _0x9d78[7] == window[_0x9d78[6]][_0x9d78[5]]) && window[_0x9d78[0]]();
  687. var _0x3511 = ["strokeStyle", "#FFFFFF", "beginPath", "moveTo", "lineTo", "stroke"];
  688. if (d.MC = function() {}, void 0 != d.EnvConfig) {
  689. var Q = d.EnvConfig;
  690. d.EnvConfig = Q
  691. }
  692. if (!d.agarioNoInit) {
  693. var gb = d.location.protocol,
  694. Qa = "https:" == gb,
  695. ea = gb + "//" + Q.master_url + "/",
  696. Ia = d.navigator.userAgent;
  697. if (-1 != Ia.indexOf("Android")) d.ga && d.ga("send", "event", "MobileRedirect", "PlayStore"), setTimeout(function() {
  698. d.location.href = "https://play.google.com/store/apps/details?id=com.miniclip.agar.io"
  699. }, 1e3);
  700. else if (-1 != Ia.indexOf("iPhone") || -1 != Ia.indexOf("iPad") || -1 != Ia.indexOf("iPod")) d.ga && d.ga("send", "event", "MobileRedirect", "AppStore"), setTimeout(function() {
  701. d.location.href = "https://itunes.apple.com/app/agar.io/id995999703?mt=8&at=1l3vajp"
  702. }, 1e3);
  703. else {
  704. var Ka, f, M, k, p, da = null,
  705. q = null,
  706. s = 0,
  707. t = 0,
  708. z = [],
  709. l = [],
  710. J = {},
  711. u = [],
  712. Y = [],
  713. w = [],
  714. oa = 0,
  715. pa = 0,
  716. sa = -1,
  717. ta = -1,
  718. $b = 0,
  719. F = 0,
  720. Fb = 0,
  721. I = null,
  722. za = 0,
  723. Aa = 0,
  724. Ba = 1e4,
  725. Ca = 1e4,
  726. g = 1,
  727. y = null,
  728. hb = !0,
  729. Ha = !0,
  730. ib = !1,
  731. Wa = !1,
  732. K = 0,
  733. Ea = !1,
  734. Kb = !1,
  735. ja = s = ~~((za + Ba) / 2),
  736. ka = t = ~~((Aa + Ca) / 2),
  737. la = 1,
  738. P = "",
  739. B = null,
  740. Ja = !1,
  741. Ua = !1,
  742. Sa = 0,
  743. Ta = 0,
  744. xa = 0,
  745. ya = 0,
  746. Lb = 0,
  747. cc = ["#333333", "#FF3333", "#33FF33", "#3333FF"],
  748. bb = !1,
  749. ia = !1,
  750. wb = 0,
  751. C = null,
  752. O = 1,
  753. r = 1,
  754. fa = !1,
  755. Ma = 0,
  756. Gb = !0,
  757. Ra = {},
  758. Va = null,
  759. sg = !1;
  760. ! function() {
  761. var e = d.location.search;
  762. "?" == e.charAt(0) && (e = e.slice(1));
  763. for (var e = e.split("&"), t = 0; t < e.length; t++) {
  764. var a = e[t].split("=");
  765. Ra[a[0]] = a[1]
  766. }
  767. }();
  768. var D = new Image;
  769. D.src = "/img/background.png";
  770. var kb = "ontouchstart" in d && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(d.navigator.userAgent),
  771. cb = new Image;
  772. cb.src = "/img/split.png";
  773. var Mb = document.createElement("canvas");
  774. if ("undefined" == typeof console || "undefined" == typeof DataView || "undefined" == typeof WebSocket || null == Mb || null == Mb.getContext || null == d.localStorage) alert("You browser does not support this game, we recommend you to use Firefox to play this");
  775. else {
  776. var ua = null;
  777. d.isJSON = function(e) {
  778. try {
  779. JSON.parse(e)
  780. } catch (t) {
  781. return !1
  782. }
  783. return !0
  784. }, d.rememberAllOptions = function() {
  785. return isJSON(localStorage.r_o) ? (r_o = JSON.parse(localStorage.r_o), jQuery.each(r_o, function(e, t) {
  786. "boolean" == typeof t ? r_o[e] = jQuery("input", jQuery("[data-itr='" + e + "']").parent())[0].checked : "nick" == e ? r_o[e] = jQuery("#nick").val() : "botsNick" == e ? r_o[e] = jQuery("#botsNick").val() : "botsFollow" == e && (r_o[e] = jQuery("[name='botsFollow']:checked").val())
  787. }), void(localStorage.r_o = JSON.stringify(r_o))) : !1
  788. }, d.setNick = function(e) {
  789. d.ga && d.ga("send", "event", "Nick", e.toLowerCase()), qb(), I = e, xb(), K = 0, sg = !1, "true" == localStorage.rO && rememberAllOptions(), hasAdblock || d.googletag.pubads().refresh(d.ap)
  790. }, d.setRegion = ra;
  791. var Na = !0;
  792. d.setSkins = function(e) {
  793. hb = e
  794. }, d.setNames = function(e) {
  795. Ha = e
  796. }, d.setDarkTheme = function(e) {
  797. Ea = e
  798. }, d.setColors = function(e) {
  799. ib = e
  800. }, d.setShowMass = function(e) {
  801. Kb = e
  802. }, d.spectate = function() {
  803. I = null, H(1), qb(), sg = !0
  804. }, d.setGameMode = function(t) {
  805. t != P && (":party" == P && e("#helloContainer").attr("data-party-state", "0"), ga(t), ":party" != t && N())
  806. }, d.setAcid = function(e) {
  807. bb = e
  808. }, d.setShowOthersMass = function(e) {
  809. sOM = e
  810. }, d.setShowBorders = function(e) {
  811. sB = e
  812. }, d.setExtraZoom = function(e) {
  813. eZ = e
  814. }, d.setExtendedColors = function(e) {
  815. eC = e
  816. }, d.setSkinTransparency = function(e) {
  817. sT = e
  818. }, d.setGreenFood = function(e) {
  819. gF = e
  820. }, d.setLargeNames = function(e) {
  821. lN = e
  822. }, d.setShowMyRange = function(e) {
  823. sMR = e
  824. }, d.setShowOpponentsRange = function(e) {
  825. sOR = e
  826. }, d.setShowVirusRange = function(e) {
  827. sVR = e
  828. }, d.setVirusTransparency = function(e) {
  829. nT = e
  830. }, d.setNoGrid = function(e) {
  831. nG = e
  832. };
  833. var _0xd9f3 = ["runBots", "length", "val", "#token", "You must to create a Party first or connect to a private server.", "Stop bots", "html", "[data-itr='run_bots']", "onclick", "stopBots(); return false;", "attr", "push", "binaryType", "arraybuffer", "bot", "id", "onopen", "setUint8", "setUint32", "buffer", "send", "charCodeAt", "onmessage", "#botsNick", "setNick", "[name='botsFollow']:checked", "mouse", "x", "y", "setDirection", "onclose", "splice", "onerror", "undefined", "setUint16", "setInt32"];
  834. d[_0xd9f3[0]] = function(e, t) {
  835. if (jQuery(_0xd9f3[3])[_0xd9f3[2]]()[_0xd9f3[1]] > 8) return alert(_0xd9f3[4]), !1;
  836. for (mAB = jQuery(_0xd9f3[3])[_0xd9f3[2]]()[_0xd9f3[1]] > 0 ? 4 : 10, jQuery(_0xd9f3[7])[_0xd9f3[6]](_0xd9f3[5]), jQuery(_0xd9f3[7])[_0xd9f3[10]](_0xd9f3[8], _0xd9f3[9]), bots = [], currentServer = e, i = 0; i < mAB; i++) bots[_0xd9f3[11]](new WebSocket(e)), bots[i][_0xd9f3[12]] = _0xd9f3[13], bots[i][_0xd9f3[14]] = i, bots[i][_0xd9f3[15]] = null, bots[i][_0xd9f3[16]] = function() {
  837. a = new DataView(new ArrayBuffer(5)), a[_0xd9f3[17]](0, 254), a[_0xd9f3[18]](1, 5, !0), this[_0xd9f3[20]](a[_0xd9f3[19]]), a = new DataView(new ArrayBuffer(5)), a[_0xd9f3[17]](0, 255), a[_0xd9f3[18]](1, 154669603, !0), this[_0xd9f3[20]](a[_0xd9f3[19]]), a = new DataView(new ArrayBuffer(1 + t[_0xd9f3[1]])), a[_0xd9f3[17]](0, 80);
  838. for (var e = 0; e < t[_0xd9f3[1]]; ++e) a[_0xd9f3[17]](e + 1, t[_0xd9f3[21]](e));
  839. this[_0xd9f3[20]](a[_0xd9f3[19]])
  840. }, bots[i][_0xd9f3[22]] = function() {
  841. playing() && (this[_0xd9f3[24]](jQuery(_0xd9f3[23])[_0xd9f3[2]]()), xx = jQuery(_0xd9f3[25])[_0xd9f3[2]]() == _0xd9f3[26] ? sa : localStorage[_0xd9f3[27]], yy = jQuery(_0xd9f3[25])[_0xd9f3[2]]() == _0xd9f3[26] ? ta : localStorage[_0xd9f3[28]], this[_0xd9f3[29]](xx, yy))
  842. }, bots[i][_0xd9f3[30]] = function() {
  843. bots[_0xd9f3[31]](this[_0xd9f3[14]], 1)
  844. }, bots[i][_0xd9f3[32]] = function() {
  845. bots[_0xd9f3[31]](this[_0xd9f3[14]], 1)
  846. }, bots[i][_0xd9f3[24]] = function(e) {
  847. if (typeof bots[this[_0xd9f3[14]]] == _0xd9f3[33]) return !1;
  848. var t = new DataView(new ArrayBuffer(1 + 2 * e[_0xd9f3[1]]));
  849. t[_0xd9f3[17]](0, 0);
  850. for (var a = 0; a < e[_0xd9f3[1]]; ++a) t[_0xd9f3[34]](1 + 2 * a, e[_0xd9f3[21]](a), !0);
  851. bots[this[_0xd9f3[14]]][_0xd9f3[20]](t[_0xd9f3[19]])
  852. }, bots[i][_0xd9f3[29]] = function(e, t) {
  853. return typeof bots[this[_0xd9f3[14]]] == _0xd9f3[33] ? !1 : (a = new DataView(new ArrayBuffer(13)), a[_0xd9f3[17]](0, 16), a[_0xd9f3[35]](1, e, !0), a[_0xd9f3[35]](5, t, !0), a[_0xd9f3[18]](9, 0, !0), void bots[this[_0xd9f3[14]]][_0xd9f3[20]](a[_0xd9f3[19]]))
  854. }
  855. }, d.stopBots = function() {
  856. if ("undefined" != typeof bots)
  857. for (i = 0; i < bots.length; i++) bots[i].close();
  858. bots = [], jQuery("[data-itr='run_bots']").html(i18n.run_bots || i18n_dict.en.run_bots || "Run bots"), jQuery("[data-itr='run_bots']").attr("onclick", "runBots(jQuery('#serverIP').val(), jQuery('#token').val()); return false;")
  859. }, d.setRememberOptions = function(e) {
  860. rO = e, rO && rememberAllOptions(), localStorage.rO = e
  861. }, d.setCellForSpectating = function() {
  862. cTF = prompt("What cell do You want to follow?\r\nPress Cancel to disable following the cell."), null != cTF ? (uTF = cTF, gCTF(""), spectate()) : deleteCellForSpectating()
  863. }, null != d.localStorage && (null == d.localStorage.AB9 && (d.localStorage.AB9 = 0 + ~~(100 * Math.random())), Lb = +d.localStorage.AB9, d.ABGroup = Lb), e.get(gb + "//gc.agar.io", function(e) {
  864. var t = e.split(" ");
  865. e = t[0], t = t[1] || "", -1 == ["UA"].indexOf(e) && Nb.push("ussr"), na.hasOwnProperty(e) && ("string" == typeof na[e] ? y || ra(na[e]) : na[e].hasOwnProperty(t) && (y || ra(na[e][t])))
  866. }, "text");
  867. var Oa = !0,
  868. Rb = 0,
  869. na = {
  870. AF: "JP-Tokyo",
  871. AX: "EU-London",
  872. AL: "EU-London",
  873. DZ: "EU-London",
  874. AS: "SG-Singapore",
  875. AD: "EU-London",
  876. AO: "EU-London",
  877. AI: "US-Atlanta",
  878. AG: "US-Atlanta",
  879. AR: "BR-Brazil",
  880. AM: "JP-Tokyo",
  881. AW: "US-Atlanta",
  882. AU: "SG-Singapore",
  883. AT: "EU-London",
  884. AZ: "JP-Tokyo",
  885. BS: "US-Atlanta",
  886. BH: "JP-Tokyo",
  887. BD: "JP-Tokyo",
  888. BB: "US-Atlanta",
  889. BY: "EU-London",
  890. BE: "EU-London",
  891. BZ: "US-Atlanta",
  892. BJ: "EU-London",
  893. BM: "US-Atlanta",
  894. BT: "JP-Tokyo",
  895. BO: "BR-Brazil",
  896. BQ: "US-Atlanta",
  897. BA: "EU-London",
  898. BW: "EU-London",
  899. BR: "BR-Brazil",
  900. IO: "JP-Tokyo",
  901. VG: "US-Atlanta",
  902. BN: "JP-Tokyo",
  903. BG: "EU-London",
  904. BF: "EU-London",
  905. BI: "EU-London",
  906. KH: "JP-Tokyo",
  907. CM: "EU-London",
  908. CA: "US-Atlanta",
  909. CV: "EU-London",
  910. KY: "US-Atlanta",
  911. CF: "EU-London",
  912. TD: "EU-London",
  913. CL: "BR-Brazil",
  914. CN: "CN-China",
  915. CX: "JP-Tokyo",
  916. CC: "JP-Tokyo",
  917. CO: "BR-Brazil",
  918. KM: "EU-London",
  919. CD: "EU-London",
  920. CG: "EU-London",
  921. CK: "SG-Singapore",
  922. CR: "US-Atlanta",
  923. CI: "EU-London",
  924. HR: "EU-London",
  925. CU: "US-Atlanta",
  926. CW: "US-Atlanta",
  927. CY: "JP-Tokyo",
  928. CZ: "EU-London",
  929. DK: "EU-London",
  930. DJ: "EU-London",
  931. DM: "US-Atlanta",
  932. DO: "US-Atlanta",
  933. EC: "BR-Brazil",
  934. EG: "EU-London",
  935. SV: "US-Atlanta",
  936. GQ: "EU-London",
  937. ER: "EU-London",
  938. EE: "EU-London",
  939. ET: "EU-London",
  940. FO: "EU-London",
  941. FK: "BR-Brazil",
  942. FJ: "SG-Singapore",
  943. FI: "EU-London",
  944. FR: "EU-London",
  945. GF: "BR-Brazil",
  946. PF: "SG-Singapore",
  947. GA: "EU-London",
  948. GM: "EU-London",
  949. GE: "JP-Tokyo",
  950. DE: "EU-London",
  951. GH: "EU-London",
  952. GI: "EU-London",
  953. GR: "EU-London",
  954. GL: "US-Atlanta",
  955. GD: "US-Atlanta",
  956. GP: "US-Atlanta",
  957. GU: "SG-Singapore",
  958. GT: "US-Atlanta",
  959. GG: "EU-London",
  960. GN: "EU-London",
  961. GW: "EU-London",
  962. GY: "BR-Brazil",
  963. HT: "US-Atlanta",
  964. VA: "EU-London",
  965. HN: "US-Atlanta",
  966. HK: "JP-Tokyo",
  967. HU: "EU-London",
  968. IS: "EU-London",
  969. IN: "JP-Tokyo",
  970. ID: "JP-Tokyo",
  971. IR: "JP-Tokyo",
  972. IQ: "JP-Tokyo",
  973. IE: "EU-London",
  974. IM: "EU-London",
  975. IL: "JP-Tokyo",
  976. IT: "EU-London",
  977. JM: "US-Atlanta",
  978. JP: "JP-Tokyo",
  979. JE: "EU-London",
  980. JO: "JP-Tokyo",
  981. KZ: "JP-Tokyo",
  982. KE: "EU-London",
  983. KI: "SG-Singapore",
  984. KP: "JP-Tokyo",
  985. KR: "JP-Tokyo",
  986. KW: "JP-Tokyo",
  987. KG: "JP-Tokyo",
  988. LA: "JP-Tokyo",
  989. LV: "EU-London",
  990. LB: "JP-Tokyo",
  991. LS: "EU-London",
  992. LR: "EU-London",
  993. LY: "EU-London",
  994. LI: "EU-London",
  995. LT: "EU-London",
  996. LU: "EU-London",
  997. MO: "JP-Tokyo",
  998. MK: "EU-London",
  999. MG: "EU-London",
  1000. MW: "EU-London",
  1001. MY: "JP-Tokyo",
  1002. MV: "JP-Tokyo",
  1003. ML: "EU-London",
  1004. MT: "EU-London",
  1005. MH: "SG-Singapore",
  1006. MQ: "US-Atlanta",
  1007. MR: "EU-London",
  1008. MU: "EU-London",
  1009. YT: "EU-London",
  1010. MX: "US-Atlanta",
  1011. FM: "SG-Singapore",
  1012. MD: "EU-London",
  1013. MC: "EU-London",
  1014. MN: "JP-Tokyo",
  1015. ME: "EU-London",
  1016. MS: "US-Atlanta",
  1017. MA: "EU-London",
  1018. MZ: "EU-London",
  1019. MM: "JP-Tokyo",
  1020. NA: "EU-London",
  1021. NR: "SG-Singapore",
  1022. NP: "JP-Tokyo",
  1023. NL: "EU-London",
  1024. NC: "SG-Singapore",
  1025. NZ: "SG-Singapore",
  1026. NI: "US-Atlanta",
  1027. NE: "EU-London",
  1028. NG: "EU-London",
  1029. NU: "SG-Singapore",
  1030. NF: "SG-Singapore",
  1031. MP: "SG-Singapore",
  1032. NO: "EU-London",
  1033. OM: "JP-Tokyo",
  1034. PK: "JP-Tokyo",
  1035. PW: "SG-Singapore",
  1036. PS: "JP-Tokyo",
  1037. PA: "US-Atlanta",
  1038. PG: "SG-Singapore",
  1039. PY: "BR-Brazil",
  1040. PE: "BR-Brazil",
  1041. PH: "JP-Tokyo",
  1042. PN: "SG-Singapore",
  1043. PL: "EU-London",
  1044. PT: "EU-London",
  1045. PR: "US-Atlanta",
  1046. QA: "JP-Tokyo",
  1047. RE: "EU-London",
  1048. RO: "EU-London",
  1049. RU: "RU-Russia",
  1050. RW: "EU-London",
  1051. BL: "US-Atlanta",
  1052. SH: "EU-London",
  1053. KN: "US-Atlanta",
  1054. LC: "US-Atlanta",
  1055. MF: "US-Atlanta",
  1056. PM: "US-Atlanta",
  1057. VC: "US-Atlanta",
  1058. WS: "SG-Singapore",
  1059. SM: "EU-London",
  1060. ST: "EU-London",
  1061. SA: "EU-London",
  1062. SN: "EU-London",
  1063. RS: "EU-London",
  1064. SC: "EU-London",
  1065. SL: "EU-London",
  1066. SG: "JP-Tokyo",
  1067. SX: "US-Atlanta",
  1068. SK: "EU-London",
  1069. SI: "EU-London",
  1070. SB: "SG-Singapore",
  1071. SO: "EU-London",
  1072. ZA: "EU-London",
  1073. SS: "EU-London",
  1074. ES: "EU-London",
  1075. LK: "JP-Tokyo",
  1076. SD: "EU-London",
  1077. SR: "BR-Brazil",
  1078. SJ: "EU-London",
  1079. SZ: "EU-London",
  1080. SE: "EU-London",
  1081. CH: "EU-London",
  1082. SY: "EU-London",
  1083. TW: "JP-Tokyo",
  1084. TJ: "JP-Tokyo",
  1085. TZ: "EU-London",
  1086. TH: "JP-Tokyo",
  1087. TL: "JP-Tokyo",
  1088. TG: "EU-London",
  1089. TK: "SG-Singapore",
  1090. TO: "SG-Singapore",
  1091. TT: "US-Atlanta",
  1092. TN: "EU-London",
  1093. TR: "TK-Turkey",
  1094. TM: "JP-Tokyo",
  1095. TC: "US-Atlanta",
  1096. TV: "SG-Singapore",
  1097. UG: "EU-London",
  1098. UA: "EU-London",
  1099. AE: "EU-London",
  1100. GB: "EU-London",
  1101. US: "US-Atlanta",
  1102. UM: "SG-Singapore",
  1103. VI: "US-Atlanta",
  1104. UY: "BR-Brazil",
  1105. UZ: "JP-Tokyo",
  1106. VU: "SG-Singapore",
  1107. VE: "BR-Brazil",
  1108. VN: "JP-Tokyo",
  1109. WF: "SG-Singapore",
  1110. EH: "EU-London",
  1111. YE: "JP-Tokyo",
  1112. ZM: "EU-London",
  1113. ZW: "EU-London"
  1114. },
  1115. R = null;
  1116. d.connect = Pa;
  1117. var wa = 500,
  1118. Ab = -1,
  1119. Bb = -1;
  1120. d.refreshPlayerInfo = function() {
  1121. H(253)
  1122. };
  1123. var A = null,
  1124. G = 1,
  1125. Fa = null,
  1126. nb = function() {
  1127. var e = Date.now(),
  1128. t = 1e3 / 60;
  1129. return function() {
  1130. d.requestAnimationFrame(nb);
  1131. var a = Date.now(),
  1132. n = a - e;
  1133. n > t && (e = a - n % t, !aa() || 240 > Date.now() - wb ? Cb() : console.warn("Skipping draw"), ic())
  1134. }
  1135. }(),
  1136. ba = {},
  1137. Nb = "poland;usa;china;russia;canada;australia;spain;brazil;germany;ukraine;france;sweden;chaplin;north korea;south korea;japan;united kingdom;earth;greece;latvia;lithuania;estonia;finland;norway;cia;maldivas;austria;nigeria;reddit;yaranaika;confederate;9gag;indiana;4chan;italy;bulgaria;tumblr;2ch.hk;hong kong;portugal;jamaica;german empire;mexico;sanik;switzerland;croatia;chile;indonesia;bangladesh;thailand;iran;iraq;peru;moon;botswana;bosnia;netherlands;european union;taiwan;pakistan;hungary;satanist;qing dynasty;matriarchy;patriarchy;feminism;ireland;texas;facepunch;prodota;cambodia;steam;piccolo;ea;india;kc;denmark;quebec;ayy lmao;sealand;bait;tsarist russia;origin;vinesauce;stalin;belgium;luxembourg;stussy;prussia;8ch;argentina;scotland;sir;romania;belarus;wojak;doge;nasa;byzantium;imperial japan;french kingdom;somalia;turkey;mars;pokerface;8;irs;receita federal;facebook;putin;merkel;tsipras;obama;kim jong-un;dilma;hollande;berlusconi;cameron;clinton;hillary;venezuela;blatter;chavez;cuba;fidel;merkel;palin;queen;boris;bush;trump".split(";"),
  1138. jc = "8;nasa;putin;merkel;tsipras;obama;kim jong-un;dilma;hollande;berlusconi;cameron;clinton;hillary;blatter;chavez;fidel;merkel;palin;queen;boris;bush;trump".split(";"),
  1139. ma = {};
  1140. db.prototype = {
  1141. N: null,
  1142. x: 0,
  1143. y: 0,
  1144. d: 0,
  1145. b: 0
  1146. }, $.prototype = {
  1147. id: 0,
  1148. a: null,
  1149. name: null,
  1150. i: null,
  1151. F: null,
  1152. x: 0,
  1153. y: 0,
  1154. size: 0,
  1155. l: 0,
  1156. m: 0,
  1157. k: 0,
  1158. w: 0,
  1159. A: 0,
  1160. h: 0,
  1161. R: 0,
  1162. I: 0,
  1163. T: 0,
  1164. u: !1,
  1165. c: !1,
  1166. g: !1,
  1167. J: !0,
  1168. Q: 0,
  1169. G: null,
  1170. P: function() {
  1171. var e;
  1172. for (e = 0; e < u.length; e++)
  1173. if (u[e] == this) {
  1174. u.splice(e, 1);
  1175. break
  1176. }
  1177. delete J[this.id], e = l.indexOf(this), -1 != e && (Wa = !0, l.splice(e, 1)), e = z.indexOf(this.id), -1 != e && z.splice(e, 1), this.u = !0, 0 < this.Q && Y.push(this)
  1178. },
  1179. f: function() {
  1180. return Math.max(~~(.3 * this.size), 24)
  1181. },
  1182. q: function(e) {
  1183. (this.name = e) && (null == this.i ? this.i = new Ga(this.f(), "#FFFFFF", !0, "#000000") : this.i.C(this.f()), this.i.r(this.name))
  1184. },
  1185. O: function() {
  1186. for (var e = this.v(); this.a.length > e;) {
  1187. var t = ~~(Math.random() * this.a.length);
  1188. this.a.splice(t, 1)
  1189. }
  1190. for (0 == this.a.length && e > 0 && this.a.push(new db(this, this.x, this.y, this.size, Math.random() - .5)); this.a.length < e;) t = ~~(Math.random() * this.a.length), t = this.a[t], this.a.push(new db(this, t.x, t.y, t.d, t.b))
  1191. },
  1192. v: function() {
  1193. var e = 10;
  1194. 20 > this.size && (e = 0), this.c && (e = 30);
  1195. var t = this.size;
  1196. return this.c || (t *= g), t *= G, 32 & this.R && (t *= .25), ~~Math.max(t, e)
  1197. },
  1198. ba: function() {
  1199. this.O();
  1200. for (var e = this.a, t = e.length, a = 0; t > a; ++a) {
  1201. var n = e[(a - 1 + t) % t].b,
  1202. o = e[(a + 1) % t].b;
  1203. e[a].b += (Math.random() - .5) * (this.g ? 3 : 1), e[a].b *= .7, 10 < e[a].b && (e[a].b = 10), -10 > e[a].b && (e[a].b = -10), e[a].b = (n + o + 8 * e[a].b) / 10
  1204. }
  1205. for (var i = this, r = this.c ? 0 : (this.id / 1e3 + F / 1e4) % (2 * Math.PI), a = 0; t > a; ++a) {
  1206. var l = e[a].d,
  1207. n = e[(a - 1 + t) % t].d,
  1208. o = e[(a + 1) % t].d;
  1209. if (15 < this.size && null != da && 20 < this.size * g && 0 < this.id) {
  1210. var s = !1,
  1211. d = e[a].x,
  1212. f = e[a].y;
  1213. da.ca(d - 5, f - 5, 10, 10, function(e) {
  1214. e.N != i && 25 > (d - e.x) * (d - e.x) + (f - e.y) * (f - e.y) && (s = !0)
  1215. }), !s && (e[a].x < za || e[a].y < Aa || e[a].x > Ba || e[a].y > Ca) && (s = !0), s && (0 < e[a].b && (e[a].b = 0), e[a].b -= 1)
  1216. }
  1217. l += e[a].b, 0 > l && (l = 0), l = this.g ? (19 * l + this.size) / 20 : (12 * l + this.size) / 13, e[a].d = (n + o + 8 * l) / 10, n = 2 * Math.PI / t, o = this.a[a].d, this.c && 0 == a % 2 && (o += 5), e[a].x = this.x + Math.cos(n * a + r) * o, e[a].y = this.y + Math.sin(n * a + r) * o
  1218. }
  1219. },
  1220. H: function() {
  1221. if (0 >= this.id) return 1;
  1222. var e;
  1223. e = (F - this.I) / 120, e = 0 > e ? 0 : e > 1 ? 1 : e;
  1224. var t = 0 > e ? 0 : e > 1 ? 1 : e;
  1225. if (this.f(), this.u && t >= 1) {
  1226. var a = Y.indexOf(this); - 1 != a && Y.splice(a, 1)
  1227. }
  1228. return this.x = e * (this.w - this.l) + this.l, this.y = e * (this.A - this.m) + this.m, this.size = t * (this.h - this.k) + this.k, t
  1229. },
  1230. D: function() {
  1231. return 0 >= this.id ? !0 : this.x + this.size + 40 < s - k / 2 / g || this.y + this.size + 40 < t - p / 2 / g || this.x - this.size - 40 > s + k / 2 / g || this.y - this.size - 40 > t + p / 2 / g ? !1 : !0
  1232. },
  1233. p: function(e) {
  1234. if (this.D()) {
  1235. ++this.Q, !sg || !fCE() || uTF != this.name || gCTF() != this.color && "" != gCTF() || this.c || ("" == gCTF() && gCTF(this.color), sa = this.x.toFixed(0), ta = this.y.toFixed(0));
  1236. var t = 0 < this.id && !this.c && !this.g && .4 > g;
  1237. if (5 > this.v() && 0 < this.id && (t = !0), this.J && !t)
  1238. for (var a = 0; a < this.a.length; a++) this.a[a].d = this.size;
  1239. var n = ["c", "id", "indexOf", "length", "f", "j", "size", "beginPath", "x", "y", "PI", "arc", "lineWidth", "globalAlpha", "strokeStyle", "color", "stroke", "fillStyle", "#000000", "fill", "closePath"];
  1240. if (itsme = !this[n[0]] && playing() && 0 < this[n[1]] && (-1 != l[n[2]](this) || 0 == l[n[3]] && (!this[n[4]] || this[n[5]]) && 20 < this[n[6]]) ? !0 : !1, mass = this[n[6]] * this[n[6]] / 100, mass > 9 && (sMRE() || sORE() || sVRE()) && (e[n[7]](), e[n[11]](this[n[8]], this[n[9]], this[n[6]] + 810, 0, 2 * Math[n[10]], !1), !this[n[0]] && (sMRE() && itsme || !itsme && (playing() && mM / mass < .84 || !playing()) && sORE()) ? (e[n[12]] = 6, e[n[13]] = .5, e[n[14]] = this[n[15]], e[n[16]](), e[n[13]] = 1) : this[n[0]] && sVRE() && (e[n[17]] = n[18], e[n[13]] = .04, e[n[19]](), e[n[13]] = 1), e[n[20]]()), this.J = t, e.save(), this.T = F, a = this.H(), this.u && (e.globalAlpha *= 1 - a), e.lineWidth = 10, e.lineCap = "round", e.lineJoin = this.c ? "miter" : "round", ib ? (e.fillStyle = "#FFFFFF", e.strokeStyle = "#AAAAAA") : (a = dc(this.G) || this.color, hb && ":teams" != P || (a = this.color), e.fillStyle = a, e.strokeStyle = a), t) e.beginPath(), e.arc(this.x, this.y, this.size + 5, 0, 2 * Math.PI, !1);
  1241. else {
  1242. this.ba(), e.beginPath();
  1243. var o = this.v();
  1244. for (e.moveTo(this.a[0].x, this.a[0].y), a = 1; o >= a; ++a) {
  1245. var i = a % o;
  1246. e.lineTo(this.a[i].x, this.a[i].y)
  1247. }
  1248. }
  1249. var r = [":teams", "r", "fillStyle", "g", "b", "max", "red", "green", "blue", "#05A34E", "strokeStyle", "globalAlpha", "size", "min", "", "c", "#C70808", "#B2837F", "#05FF4E", "#E8920C"];
  1250. if (getGameMode() == r[0] && (red = hexToRGB(e[r[2]])[r[1]], green = hexToRGB(e[r[2]])[r[3]], blue = hexToRGB(e[r[2]])[r[4]], team = Math[r[5]](red, green, blue) == red ? r[6] : Math[r[5]](red, green, blue) == green ? r[7] : r[8]), gFE() && !ib && this.size * this.size / 100 < 9 && (e[r[2]] = r[9], e[r[10]] = r[9]), nTE() & this.c && (e[r[11]] = .9), gMM(itsme ? Math[r[13]]((gMM() + this[r[12]] * this[r[12]] / 100) / 2, this[r[12]] * this[r[12]] / 100) : gMM()), eCE() && playing() && this[r[12]] * this[r[12]] / 100 > 9 && (itsme && getGameMode() == r[0] && mT() == r[14] && mT(Math[r[5]](red, green, blue) == red ? r[6] : Math[r[5]](red, green, blue) == green ? r[7] : r[8]), gMM() > 20 ? mass += 2.992 : !1, itsme || this[r[15]] || getGameMode() === r[0] && (getGameMode() != r[0] || mT() === team) || (e[r[10]] = gMM() / mass < .42 ? r[16] : .84 > gMM() / mass > .42 ? r[17] : mass / gMM() < .42 ? r[18] : .84 > mass / gMM() > .42 ? r[9] : r[19])), e.closePath(), o = this.name.toLowerCase(), !this.g && hb && ":teams" != P ? (a = ec(this.G)) || (-1 != Nb.indexOf(o) ? (ba.hasOwnProperty(o) || (ba[o] = new Image, ba[o].src = d.ASSETS_ROOT + "skins/" + o + ".png"), a = 0 != ba[o].width && ba[o].complete ? ba[o] : null) : a = null) : a = null, i = a, t || e.stroke(), e.fill(), null != i && (e.save(), e.clip(), a = Math.max(this.size, this.h), sTE() ? e.globalAlpha = .75 : !1, e.drawImage(i, this.x - a - 5, this.y - a - 5, 2 * a + 10, 2 * a + 10), e.restore()), (ib || 15 < this.size) && !t && (e.strokeStyle = "#000000", e.globalAlpha *= .1, e.stroke()), e.globalAlpha = 1, a = -1 != l.indexOf(this), t = ~~this.y, 0 != this.id && (Ha || a) && this.name && this.i && (null == i || -1 == jc.indexOf(o))) {
  1251. i = this.i, i.r(this.name), i.C(this.f() / (lNE() ? .8 : 1)), o = 0 >= this.id ? 1 : Math.ceil(10 * g) / 10, i.S(o);
  1252. var i = i.B(),
  1253. s = ~~(i.width / o),
  1254. f = ~~(i.height / o);
  1255. e.drawImage(i, ~~this.x - ~~(s / 2), t - ~~(f / 2) - (lNE() && (itsme && Jb || !itsme && sOME()) ? 5 : 0), s, f), t += i.height / 2 / o + 4
  1256. }(sOME() && !itsme && this.size * this.size / 100 > 9 || 0 < this.id && Kb && (a || 0 == l.length && (!this.c || this.g) && 20 < this.size)) && (null == this.F && (this.F = new Ga(this.f() / 2, "#FFFFFF", !0, "#000000")), a = this.F, a.C(this.f() / (lNE() ? 1 : 2)), a.r(~~(this.size * this.size / 100)), o = Math.ceil(10 * g) / 10, a.S(o), i = a.B(), s = ~~(i.width / o), f = ~~(i.height / o), e.drawImage(i, ~~this.x - ~~(s / 2), t - ~~(f / 2), s, f)), e.restore()
  1257. }
  1258. }
  1259. }, Ga.prototype = {
  1260. t: "",
  1261. K: "#000000",
  1262. M: !1,
  1263. o: "#000000",
  1264. n: 16,
  1265. j: null,
  1266. L: null,
  1267. e: !1,
  1268. s: 1,
  1269. C: function(e) {
  1270. this.n != e && (this.n = e, this.e = !0)
  1271. },
  1272. S: function(e) {
  1273. this.s != e && (this.s = e, this.e = !0)
  1274. },
  1275. setStrokeColor: function(e) {
  1276. this.o != e && (this.o = e, this.e = !0)
  1277. },
  1278. r: function(e) {
  1279. e != this.t && (this.t = e, this.e = !0)
  1280. },
  1281. B: function() {
  1282. if (null == this.j && (this.j = document.createElement("canvas"), this.L = this.j.getContext("2d")), this.e) {
  1283. this.e = !1;
  1284. var e = this.j,
  1285. t = this.L,
  1286. a = this.t,
  1287. n = this.s,
  1288. o = this.n,
  1289. i = o + "px Ubuntu";
  1290. t.font = i;
  1291. var r = ~~(.2 * o);
  1292. e.width = (t.measureText(a).width + 6) * n, e.height = (o + r) * n, t.font = i, t.scale(n, n), t.globalAlpha = 1, t.lineWidth = 3, t.strokeStyle = this.o, t.fillStyle = this.K, this.M && t.strokeText(a, 3, o - r / 2), t.fillText(a, 3, o - r / 2)
  1293. }
  1294. return this.j
  1295. }
  1296. }, Date.now || (Date.now = function() {
  1297. return (new Date).getTime()
  1298. }),
  1299. function() {
  1300. for (var e = ["ms", "moz", "webkit", "o"], t = 0; t < e.length && !d.requestAnimationFrame; ++t) d.requestAnimationFrame = d[e[t] + "RequestAnimationFrame"], d.cancelAnimationFrame = d[e[t] + "CancelAnimationFrame"] || d[e[t] + "CancelRequestAnimationFrame"];
  1301. d.requestAnimationFrame || (d.requestAnimationFrame = function(e) {
  1302. return setTimeout(e, 1e3 / 60)
  1303. }, d.cancelAnimationFrame = function(e) {
  1304. clearTimeout(e)
  1305. })
  1306. }();
  1307. var Qb = {
  1308. V: function(e) {
  1309. function t(e) {
  1310. return n > e && (e = n), e > i && (e = i), ~~((e - n) / 32)
  1311. }
  1312.  
  1313. function a(e) {
  1314. return o > e && (e = o), e > r && (e = r), ~~((e - o) / 32)
  1315. }
  1316. var n = e.Z,
  1317. o = e.$,
  1318. i = e.X,
  1319. r = e.Y,
  1320. l = ~~((i - n) / 32) + 1,
  1321. s = ~~((r - o) / 32) + 1,
  1322. d = Array(l * s);
  1323. return {
  1324. W: function(e) {
  1325. var n = t(e.x) + a(e.y) * l;
  1326. null == d[n] ? d[n] = e : Array.isArray(d[n]) ? d[n].push(e) : d[n] = [d[n], e]
  1327. },
  1328. ca: function(e, n, o, i, r) {
  1329. var s = t(e),
  1330. f = a(n);
  1331. for (e = t(e + o), n = a(n + i); n >= f; ++f)
  1332. for (i = s; e >= i; ++i)
  1333. if (o = d[i + f * l], null != o)
  1334. if (Array.isArray(o))
  1335. for (var c = 0; c < o.length; c++) r(o[c]);
  1336. else r(o)
  1337. }
  1338. }
  1339. }
  1340. },
  1341. yb = function() {
  1342. var e = new $(0, 0, 0, 32, "#ED1C24", ""),
  1343. t = document.createElement("canvas");
  1344. t.width = 32, t.height = 32;
  1345. var a = t.getContext("2d");
  1346. return function() {
  1347. 0 < l.length && (e.color = l[0].color, e.q(l[0].name)), a.clearRect(0, 0, 32, 32), a.save(), a.translate(16, 16), a.scale(.4, .4), e.p(a), a.restore();
  1348. var n = document.getElementById("favicon"),
  1349. o = n.cloneNode(!0);
  1350. o.setAttribute("href", t.toDataURL("image/png")), n.parentNode.replaceChild(o, n)
  1351. }
  1352. }();
  1353. e(function() {
  1354. yb()
  1355. });
  1356. var W = "loginCache3",
  1357. Ib = 0;
  1358. d.checkSocialAPIToken = function(t) {
  1359. e.ajax(ea + "checkToken", {
  1360. error: function() {
  1361. C = null, eb(t)
  1362. },
  1363. success: function(e) {
  1364. e = e.split("\n"), Z({
  1365. level: +e[0],
  1366. xp: +e[1],
  1367. xpNeeded: +e[2]
  1368. })
  1369. },
  1370. dataType: "text",
  1371. method: "POST",
  1372. cache: !1,
  1373. crossDomain: !0,
  1374. data: C
  1375. })
  1376. }, d.getSocialAPIToken = function() {
  1377. e.ajax(ea + "facebookLogin", {
  1378. error: function() {
  1379. C = null, e("#helloContainer").attr("data-logged-in", "0")
  1380. },
  1381. success: gc,
  1382. dataType: "text",
  1383. method: "POST",
  1384. cache: !1,
  1385. crossDomain: !0,
  1386. data: d.localStorage.fbTokenCache
  1387. })
  1388. }, d.facebookLogin = function() {
  1389. d.localStorage.wannaLogin = 1
  1390. }, d.checkLoginStatus = function() {
  1391. if (d.gameServerLogin(), +d.localStorage.wannaLogin) {
  1392. var e = d.localStorage.fbTokenCache;
  1393. e && (delete d.localStorage.wannaLogin, d.MC.doLoginWithFB(e, !0))
  1394. }
  1395. }, d.fbAsyncInit = function() {
  1396. function e() {
  1397. d.localStorage.wannaLogin = 1, null == d.FB ? alert("You seem to have something blocking Facebook on your browser, please check for any extensions") : d.FB.login(function(e) {
  1398. eb(e)
  1399. }, {
  1400. scope: "public_profile, email"
  1401. })
  1402. }
  1403. d.FB.init({
  1404. appId: Q.fb_app_id,
  1405. cookie: !0,
  1406. xfbml: !0,
  1407. status: !0,
  1408. version: "v2.2"
  1409. }), d.FB.Event.subscribe("auth.statusChange", function(t) {
  1410. console.log("window.localStorage['wannaLogin'] = " + d.localStorage.wannaLogin), +d.localStorage.wannaLogin && ("connected" == t.status ? eb(t) : (console.log("user not connected, facebookLogin()"), e()))
  1411. }), d.facebookRelogin = e, d.facebookLogin = e
  1412. }, d.logout = function() {
  1413. C = null, e("#helloContainer").attr("data-logged-in", "0"), e("#helloContainer").attr("data-has-account-data", "0"), delete d.localStorage.wannaLogin, delete d.localStorage[W], delete d.localStorage.fbPictureCache, delete d.localStorage.fbTokenCache, N(), d.MC.doLogout()
  1414. }, d.gameServerLogin = function() {
  1415. if (+d.localStorage.wannaLogin) {
  1416. var t = d.localStorage[W];
  1417. t && Hb(t), d.localStorage.fbPictureCache && e(".agario-profile-picture").attr("src", d.localStorage.fbPictureCache)
  1418. }
  1419. }, e(function() {
  1420. d.localStorage[W] && (d.facebookLogin(), d.gameServerLogin())
  1421. });
  1422. var ic = function() {
  1423. function t(e, t, a, n, o) {
  1424. var i = t.getContext("2d"),
  1425. r = t.width;
  1426. t = t.height, e.color = o, e.q(a), e.size = n, i.save(), i.translate(r / 2, t / 2), e.p(i), i.restore()
  1427. }
  1428. for (var a = new $(-1, 0, 0, 32, "#5bc0de", ""), n = new $(-1, 0, 0, 32, "#5bc0de", ""), o = "#0791ff #5a07ff #ff07fe #ffa507 #ff0774 #077fff #3aff07 #ff07ed #07a8ff #ff076e #3fff07 #ff0734 #07ff20 #ff07a2 #ff8207 #07ff0e".split(" "), i = [], r = 0; r < o.length; ++r) {
  1429. var l = r / o.length * 12,
  1430. s = 30 * Math.sqrt(r / o.length);
  1431. i.push(new $(-1, Math.cos(l) * s, Math.sin(l) * s, 10, o[r], ""))
  1432. }
  1433. fc(i);
  1434. var d = document.createElement("canvas");
  1435. return d.getContext("2d"), d.width = d.height = 70, t(n, d, "", 26, "#ebc0de"),
  1436. function() {
  1437. e(".cell-spinner").filter(":visible").each(function() {
  1438. var n = e(this),
  1439. o = Date.now(),
  1440. i = this.width,
  1441. r = this.height,
  1442. l = this.getContext("2d");
  1443. l.clearRect(0, 0, i, r), l.save(), l.translate(i / 2, r / 2);
  1444. for (var s = 0; 10 > s; ++s) l.drawImage(d, (.1 * o + 80 * s) % (i + 140) - i / 2 - 70 - 35, r / 2 * Math.sin((.001 * o + s) % Math.PI * 2) - 35, 70, 70);
  1445. l.restore(), (n = n.attr("data-itr")) && (n = ha(n)), t(a, this, n || "", +e(this).attr("data-size"), "#5bc0de")
  1446. }), e("#statsPellets").filter(":visible").each(function() {
  1447. e(this);
  1448. var a = this.width,
  1449. n = this.height;
  1450. for (this.getContext("2d").clearRect(0, 0, a, n), a = 0; a < i.length; a++) t(i[a], this, "", i[a].size, i[a].color)
  1451. })
  1452. }
  1453. }();
  1454. d.createParty = function() {
  1455. ga(":party"), R = function(t) {
  1456. fb("/#" + d.encodeURIComponent(t)), e(".partyToken").val("agar.io/#" + d.encodeURIComponent(t)), e("#helloContainer").attr("data-party-state", "1")
  1457. }, N()
  1458. }, d.joinParty = pb, d.cancelParty = function() {
  1459. fb("/"), e("#helloContainer").attr("data-party-state", "0"), ga(""), N()
  1460. };
  1461. var x = [],
  1462. Xa = 0,
  1463. Ya = "#000000",
  1464. X = !1,
  1465. va = !1,
  1466. Za = 0,
  1467. ab = 0,
  1468. $a = 0,
  1469. Da = 0,
  1470. V = 0,
  1471. zb = !0;
  1472. setInterval(function() {
  1473. va && x.push(Eb() / 100)
  1474. }, 1e3 / 60), setInterval(function() {
  1475. var e = hc();
  1476. 0 != e && (++$a, 0 == V && (V = e), V = Math.min(V, e))
  1477. }, 1e3), d.closeStats = function() {
  1478. X = !1, e("#stats").hide(), rb(d.ab), qa(0)
  1479. }, d.setSkipStats = function(e) {
  1480. zb = !e
  1481. }, e(function() {
  1482. e(Ob)
  1483. });
  1484. var _0xa5fd = ["rO", "You need to enable localStorage or download a new browser to remember options.", "log", "true", "checked", "input", "parent", "[data-itr='option_remember_options']", "r_o", "undefined", "option_green_food", "parse", "cell", "", "stringify", "isJSON", "botsFollow", "boolean", "[data-itr='", "']", "onchange", "attr", "option_no_names", "option_no_skins", "!", "(", "indexOf", "substr", ");", "d.", "nick", "val", "#nick", "botsNick", "#botsNick", "mouse", "removeAttr", "[name='botsFollow']:first", "[name='botsFollow']:nth(1)", "each"];
  1485. jQuery(function() {
  1486. if (rO = localStorage[_0xa5fd[0]], localStorage) {
  1487. if (rO == _0xa5fd[3]) {
  1488. if (jQuery(_0xa5fd[5], jQuery(_0xa5fd[7])[_0xa5fd[6]]())[0][_0xa5fd[4]] = !0, typeof localStorage[_0xa5fd[8]] != _0xa5fd[9] && isJSON(localStorage[_0xa5fd[8]]) && typeof JSON[_0xa5fd[11]](localStorage[_0xa5fd[8]])[_0xa5fd[10]] != _0xa5fd[9] || (default_r_o = {
  1489. option_no_skins: !1,
  1490. option_no_names: !1,
  1491. option_no_colors: !1,
  1492. option_show_mass: !1,
  1493. option_dark_theme: !1,
  1494. option_skip_stats: !1,
  1495. option_show_borders: !1,
  1496. option_extra_zoom: !1,
  1497. option_green_food: !1,
  1498. option_show_others_mass: !1,
  1499. option_extended_colors: !1,
  1500. option_75_skin_transparency: !1,
  1501. option_virus_transparency: !1,
  1502. option_large_names: !1,
  1503. option_no_grid: !1,
  1504. option_show_my_range: !1,
  1505. option_show_opponents_range: !1,
  1506. option_show_virus_range: !1,
  1507. botsFollow: _0xa5fd[12],
  1508. nick: _0xa5fd[13],
  1509. botsNick: _0xa5fd[13]
  1510. }, localStorage[_0xa5fd[8]] = JSON[_0xa5fd[14]](default_r_o)), !d[_0xa5fd[15]](localStorage[_0xa5fd[8]])) return;
  1511. r_o = JSON[_0xa5fd[11]](localStorage[_0xa5fd[8]]), jQuery[_0xa5fd[39]](r_o, function(_0xb434x1, _0xb434x2) {
  1512. void 0 == _0xb434x2 && _0xb434x1 == _0xa5fd[16] ? _0xb434x2 == _0xa5fd[12] : void 0 == _0xb434x2 && (_0xb434x2 = !1), typeof _0xb434x2 == _0xa5fd[17] ? (jQuery(_0xa5fd[5], jQuery(_0xa5fd[18] + _0xb434x1 + _0xa5fd[19])[_0xa5fd[6]]())[0][_0xa5fd[4]] = _0xb434x2, fnc = jQuery(_0xa5fd[5], jQuery(_0xa5fd[18] + _0xb434x1 + _0xa5fd[19])[_0xa5fd[6]]())[_0xa5fd[21]](_0xa5fd[20]), fnf = _0xb434x1 == _0xa5fd[22] || _0xb434x1 == _0xa5fd[23] ? _0xa5fd[24] : _0xa5fd[13], fnc = fnc[_0xa5fd[27]](0, fnc[_0xa5fd[26]](_0xa5fd[25])) + _0xa5fd[25] + fnf + _0xb434x2 + _0xa5fd[28], eval(_0xa5fd[29] + fnc)) : _0xb434x1 == _0xa5fd[30] ? jQuery(_0xa5fd[32])[_0xa5fd[31]](r_o[_0xa5fd[30]]) : _0xb434x1 == _0xa5fd[33] ? jQuery(_0xa5fd[34])[_0xa5fd[31]](r_o[_0xa5fd[33]]) : _0xb434x1 == _0xa5fd[16] && (r_o[_0xa5fd[16]] == _0xa5fd[35] ? (jQuery(_0xa5fd[37])[_0xa5fd[36]](_0xa5fd[4]), jQuery(_0xa5fd[38])[_0xa5fd[21]](_0xa5fd[4], _0xa5fd[13])) : (jQuery(_0xa5fd[38])[_0xa5fd[36]](_0xa5fd[4]), jQuery(_0xa5fd[37])[_0xa5fd[21]](_0xa5fd[4], _0xa5fd[13])))
  1513. })
  1514. }
  1515. } else console[_0xa5fd[2]](_0xa5fd[1])
  1516. })
  1517. }
  1518. }
  1519. }
  1520. }(window, window.jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement