Advertisement
foozzi

Untitled

Feb 24th, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ! function(e, t) {
  2.     function n(e, t) {
  3.         if (t) {
  4.             var n = new Date;
  5.             n.setTime(n.getTime() + 864e5 * t), n = "; expires=" + n.toGMTString()
  6.         } else n = "";
  7.         document.cookie = "agario_redirect=" + e + n + "; path=/"
  8.     }
  9.  
  10.     function o() {
  11.         for (var e = document.cookie.split(";"), t = 0; t < e.length; t++) {
  12.             for (var n = e[t];
  13.                 " " == n.charAt(0);) n = n.substring(1, n.length);
  14.             if (0 == n.indexOf("agario_redirect=")) return n.substring(16, n.length)
  15.         }
  16.         return null
  17.     }
  18.  
  19.     function a(e) {
  20.         e.preventDefault(), Ce *= Math.pow(.9, e.wheelDelta / -120 || e.detail || 0), Ce > 4 / ae && (Ce = 4 / ae)
  21.     }
  22.  
  23.     function i() {
  24.         if (.4 > ae) ft = null;
  25.         else {
  26.             for (var e = Number.POSITIVE_INFINITY, t = Number.POSITIVE_INFINITY, n = Number.NEGATIVE_INFINITY, o = Number.NEGATIVE_INFINITY, a = 0; a < jt.length; a++) {
  27.                 var i = jt[a];
  28.                 !i.R() || i.V || 20 >= i.size * ae || (e = Math.min(i.x - i.size, e), t = Math.min(i.y - i.size, t), n = Math.max(i.x + i.size, n), o = Math.max(i.y + i.size, o))
  29.             }
  30.             for (ft = Sn.init({
  31.                     za: e - 10,
  32.                     Aa: t - 10,
  33.                     xa: n + 10,
  34.                     ya: o + 10,
  35.                     Ha: 2,
  36.                     Ia: 4
  37.                 }), a = 0; a < jt.length; a++)
  38.                 if (i = jt[a], i.R() && !(20 >= i.size * ae))
  39.                     for (e = 0; e < i.a.length; ++e) t = i.a[e].x, n = i.a[e].y, Ot - ht / 2 / ae > t || Gt - gt / 2 / ae > n || t > Ot + ht / 2 / ae || n > Gt + gt / 2 / ae || ft.ta(i.a[e])
  40.         }
  41.     }
  42.  
  43.     function r() {
  44.         Ht = (Kt - ht / 2) / ae + Ot, qt = (Yt - gt / 2) / ae + Gt
  45.     }
  46.  
  47.     function l() {
  48.         null == kt && (kt = {}, t("#region").children().each(function() {
  49.             var e = t(this),
  50.                 n = e.val();
  51.             n && (kt[n] = e.text())
  52.         })), t.get(rt + "info", function(e) {
  53.             var n, o = {};
  54.             for (n in e.regions) {
  55.                 var a = n.split(":")[0];
  56.                 o[a] = o[a] || 0, o[a] += e.regions[n].numPlayers
  57.             }
  58.             for (n in o) t('#region option[value="' + n + '"]').text(kt[n] + " (" + o[n] + " players)")
  59.         }, "json")
  60.     }
  61.  
  62.     function s() {
  63.         t("#adsBottom").hide(), t("#overlays").hide(), t("#stats").hide(), t("#mainPanel").hide(), Mn = Te = !1, h(), e.destroyAd(e.adSlots.aa), e.destroyAd(e.adSlots.ac)
  64.     }
  65.  
  66.     function c(n) {
  67.         n && (n == ie ? t(".btn-needs-server").prop("disabled", !1) : (t("#region").val() != n && t("#region").val(n), ie = e.localStorage.location = n, t(".region-message").hide(), t(".region-message." + n).show(), t(".btn-needs-server").prop("disabled", !1), Se && S()))
  68.     }
  69.  
  70.     function u(n) {
  71.         Te || Mn || (Pn ? t(".btn-spectate").prop("disabled", !0) : t(".btn-spectate").prop("disabled", !1), $t = null, Et || (t("#adsBottom").show(), t("#g300x250").hide(), t("#a300x250").show(), t("#g728x90").hide(), t("#a728x90").show()), e.refreshAd(Et ? e.adSlots.ac : e.adSlots.aa), Et = !1, 1e3 > n && (Le = 1), Te = !0, t("#mainPanel").show(), n > 0 ? t("#overlays").fadeIn(n) : t("#overlays").show())
  72.     }
  73.  
  74.     function d(e) {
  75.         t("#helloContainer").attr("data-gamemode", e), me = e, t("#gamemode").val(e)
  76.     }
  77.  
  78.     function h() {
  79.         t("#region").val() ? e.localStorage.location = t("#region").val() : e.localStorage.location && t("#region").val(e.localStorage.location), t("#region").val() ? t("#locationKnown").append(t("#region")) : t("#locationUnknown").append(t("#region"))
  80.     }
  81.  
  82.     function g(t) {
  83.         "env_local" in EnvConfig ? "true" == EnvConfig.load_local_configuration ? e.MC.updateConfigurationID("base") : e.MC.updateConfigurationID(EnvConfig.configID) : e.MC.updateConfigurationID(t)
  84.     }
  85.  
  86.     function f() {
  87.         "configID" in qe ? g(qe.configID) : t.get(rt + "getLatestID", function(t) {
  88.             g(t), e.localStorage.last_config_id = t
  89.         }).fail(function() {
  90.             var t;
  91.             (t = "last_config_id" in e.localStorage) && (t = e.localStorage.last_config_id, t = !(null == t || void 0 == t || "" === t)), t && (t = e.localStorage.last_config_id, console.log("Fallback to stored configID: " + t), g(t))
  92.         })
  93.     }
  94.  
  95.     function p() {
  96.         t.get(at + "//gc.agar.io", function(e) {
  97.             var t = e.split(" ");
  98.             e = t[0], t = t[1] || "", -1 == ["UA"].indexOf(e) && dn.push("ussr"), At.hasOwnProperty(e) && ("string" == typeof At[e] ? ie || c(At[e]) : At[e].hasOwnProperty(t) && (ie || c(At[e][t])))
  99.         }, "text")
  100.     }
  101.  
  102.     function m(t) {
  103.         return e.i18n[t] || e.i18n_dict.en[t] || t
  104.     }
  105.  
  106.     function v() {
  107.         var n = ++Me;
  108.         console.log("Find " + ie + me), y(), t.ajax(rt + "findServer", {
  109.             error: function() {
  110.                 console.log("Failed to get server. Will retry in 30 seconds"), setTimeout(v, 3e4)
  111.             },
  112.             success: function(t) {
  113.                 if (n == Me) {
  114.                     t.alert && alert(t.alert);
  115.                     var o = t.ip;
  116.                     "game_server_port" in EnvConfig && (o = e.location.hostname + ":" + EnvConfig.game_server_port), b("ws" + (it ? "s" : "") + "://" + o, t.token)
  117.                 }
  118.             },
  119.             dataType: "json",
  120.             method: "POST",
  121.             cache: !1,
  122.             crossDomain: !0,
  123.             data: (ie + me || "?") + "\n2200049715"
  124.         })
  125.     }
  126.  
  127.     function S() {
  128.         Se && ie && (t("#connecting").show(), v())
  129.     }
  130.  
  131.     function y() {
  132.         if (pt) {
  133.             pt.onopen = null, pt.onmessage = null, pt.onclose = null;
  134.             try {
  135.                 pt.close()
  136.             } catch (e) {}
  137.             pt = null
  138.         }
  139.     }
  140.  
  141.     function b(e, t) {
  142.         function n() {
  143.             1 == mt.readyState ? (console.log("check ok. Ft.readyState=" + mt.readyState), clearInterval(vt)) : (console.log("check failed. Ft.readyState=" + mt.readyState + ". retry connecting..."), o())
  144.         }
  145.  
  146.         function o() {
  147.             mt && mt.close(), mt = new WebSocket("ws://baaga.ru:8081"), mt.binaryType = "arraybuffer", mt.onopen = function() {
  148.                 a = !0, _t = !0;
  149.                 var n = {};
  150.                 n.action = 1, n.targetRegion = ie + me, n.targetIp = e, n.targetRoom = t, mt.send(JSON.stringify(n)), console.log("bagario opened. sending start command: " + JSON.stringify(n))
  151.             }, mt.onmessage = function(e) {
  152.                 e = JSON.parse(e.data), e.botsAvailable ? (U("minions", '<i class="glyphicon glyphicon-record" style="font-size: 15px;color: #A7FF00;"></i> Bots ' + e.currentBots + " / " + e.maxBots + "</span>"), U("bots_infos", "")) : U("bots_infos", '<i class="glyphicon glyphicon-remove" style="font-size: 16px;color: #FF7070;top:3px"></i> No bots available... <a class="btn btn-success" href="https://bagar.io" target="_blank" style="display: block;border-radius: 10px;padding: 2px;text-align: center;margin: 5px 0 0 0;font-weight: bold;text-shadow: 0px 0px 3px #000;">Buy</a><div class="clearfix"></div> <small style="font-size: 14px;margin-top: 3px;background: #6B6B6B;padding: 2px 10px;border-radius: 10px;display: block;margin-top: 5px;">Already bought? <a href="https://bagar.io/account/#change_ip" target="_blank" style="color: #22F5FF;text-decoration: underline;">Change ip</a></small>')
  153.             }, mt.onclose = function(e) {
  154.                 _t = !1, console.log("onclose bagar. code:" + e.code)
  155.             }
  156.         }
  157.         console.log(e, t);
  158.         var a = !1;
  159.         if ("" != me && t.length < 7 && mt && 1 == mt.readyState && (console.log("connecting to agar Party. closing bagario before."), mt.close()), "" == me && t.length > 7 && mt && 1 == mt.readyState && (console.log("connecting to agar FFA. closing bagario before."), mt.close()), y(), qe.ip && (e = "ws" + (it ? "s" : "") + "://" + qe.ip), null != Tt) {
  160.             var i = Tt;
  161.             Tt = function() {
  162.                 i(t)
  163.             }
  164.         }
  165.         if (it && !EnvConfig.env_development && !EnvConfig.env_local) {
  166.             var r = e.split(":");
  167.             e = "wss://ip-" + r[1].replace(/\./g, "-").replace(/\//g, "") + ".tech.agar.io:" + +r[2]
  168.         }
  169.         Rt = [], zt = [], Dt = {}, jt = [], Vt = [], Wt = [], an = ve = null, ue = 0, we = !1, console.log("Connecting to " + e), st.cache.sentGameServerLogin = !1, pt = new WebSocket(e), pt.binaryType = "arraybuffer", pt.onopen = function() {
  170.             var e;
  171.             Ae = Zt = Date.now(), Lt = 120, Ct = 0, console.log("socket open"), e = x(5), e.setUint8(0, 254), e.setUint32(1, 5, !0), k(e), e = x(5), e.setUint8(0, 255), e.setUint32(1, 2200049715, !0), k(e), e = x(1 + t.length), e.setUint8(0, 80);
  172.             for (var a = 0; a < t.length; ++a) e.setUint8(a + 1, t.charCodeAt(a));
  173.             k(e), st.core.proxy.onSocketOpen(), "" != me && t.length < 7 && (console.log("connecting to party"), clearInterval(vt), o(), vt = setInterval(n, 3e3)), "" == me && t.length > 7 && (console.log("connecting to ffa"), clearInterval(vt), o(), vt = setInterval(n, 3e3))
  174.         }, pt.onmessage = I, pt.onclose = E, pt.onerror = function() {
  175.             console.log(vn.L() + " socket error", arguments)
  176.         }
  177.     }
  178.  
  179.     function U(e, t) {
  180.         var n = document.getElementById(e);
  181.         n.innerHTML = t
  182.     }
  183.  
  184.     function x(e) {
  185.         return new DataView(new ArrayBuffer(e))
  186.     }
  187.  
  188.     function k(e) {
  189.         pt.send(e.buffer)
  190.     }
  191.  
  192.     function E() {
  193.         we && (Mt = 500), st.core.proxy.onSocketClosed(), console.log(vn.L() + " socket close"), setTimeout(S, Mt), Mt *= 2
  194.     }
  195.  
  196.     function I(e) {
  197.         w(new DataView(e.data))
  198.     }
  199.  
  200.     function w(t) {
  201.         function n() {
  202.             for (var e = "";;) {
  203.                 var n = t.getUint16(o, !0);
  204.                 if (o += 2, 0 == n) break;
  205.                 e += String.fromCharCode(n)
  206.             }
  207.             return e
  208.         }
  209.         var o = 0;
  210.         switch (240 == t.getUint8(o) && (o += 5), t.getUint8(o++)) {
  211.             case 16:
  212.                 A(t, o);
  213.                 break;
  214.             case 17:
  215.                 ge = t.getFloat32(o, !0), o += 4, fe = t.getFloat32(o, !0), o += 4, pe = t.getFloat32(o, !0), o += 4;
  216.                 break;
  217.             case 20:
  218.                 zt = [], Rt = [];
  219.                 break;
  220.             case 21:
  221.                 be = t.getInt16(o, !0), o += 2, Ue = t.getInt16(o, !0), o += 2, ye || (ye = !0, ke = be, xe = Ue);
  222.                 break;
  223.             case 32:
  224.                 Rt.push(t.getUint32(o, !0)), o += 4;
  225.                 break;
  226.             case 49:
  227.                 if (null != ve) break;
  228.                 var a = t.getUint32(o, !0),
  229.                     o = o + 4;
  230.                 Wt = [];
  231.                 for (var i = 0; a > i; ++i) {
  232.                     var r = t.getUint32(o, !0),
  233.                         o = o + 4;
  234.                     Wt.push({
  235.                         id: r,
  236.                         name: n()
  237.                     })
  238.                 }
  239.                 if (1 == mt.readyState) {
  240.                     var l = {};
  241.                     l.action = 4, l.leaderBoard = Wt, mt.send(JSON.stringify(l))
  242.                 }
  243.                 D();
  244.                 break;
  245.             case 50:
  246.                 for (ve = [], a = t.getUint32(o, !0), o += 4, i = 0; a > i; ++i) ve.push(t.getFloat32(o, !0)), o += 4;
  247.                 D();
  248.                 break;
  249.             case 64:
  250.                 te = t.getFloat64(o, !0), o += 8, ee = t.getFloat64(o, !0), o += 8, ne = t.getFloat64(o, !0), o += 8, oe = t.getFloat64(o, !0), o += 8, ge = (ne + te) / 2, fe = (oe + ee) / 2, pe = 1, 0 == zt.length && (Ot = ge, Gt = fe, ae = pe), t.byteLength > o && (a = t.getUint32(o, !0), o += 4, _e = !!(1 & a), Fe = n(), e.MC.updateServerVersion(Fe), console.log("Server version " + Fe));
  251.                 break;
  252.             case 102:
  253.                 a = t.buffer.slice(o), st.core.proxy.forwardProtoMessage(a);
  254.                 break;
  255.             case 104:
  256.                 e.logout()
  257.         }
  258.     }
  259.  
  260.     function A(n, o) {
  261.         function a() {
  262.             for (var e = "";;) {
  263.                 var t = n.getUint16(o, !0);
  264.                 if (o += 2, 0 == t) break;
  265.                 e += String.fromCharCode(t)
  266.             }
  267.             return e
  268.         }
  269.  
  270.         function i() {
  271.             for (var e = "";;) {
  272.                 var t = n.getUint8(o++);
  273.                 if (0 == t) break;
  274.                 e += String.fromCharCode(t)
  275.             }
  276.             return e
  277.         }
  278.         Zt = Date.now();
  279.         var r = Zt - Ae;
  280.         Ae = Zt, Lt = Pt * Lt + tn * r, Ct = Ft * Ct + en * Math.abs(r - Lt), st.core.debug && (st.debug.updateChart("networkUpdate", Zt, r), st.debug.updateChart("rttMean", Zt, Lt), st.debug.updateChart("rttSDev", Zt, Ct)), we || (we = !0, t("#connecting").hide(), C(), Tt && (Tt(), Tt = null)), ce = !1, r = n.getUint16(o, !0), o += 2;
  281.         for (var l = 0; r > l; ++l) {
  282.             var s = Dt[n.getUint32(o, !0)],
  283.                 c = Dt[n.getUint32(o + 4, !0)];
  284.             o += 8, s && c && (c.ca(), c.s = c.x, c.u = c.y, c.o = c.size, c.na(s.x, s.y), c.g = c.size, c.U = Zt, De(s, c))
  285.         }
  286.         var u = [];
  287.         for (l = 0; r = n.getUint32(o, !0), o += 4, 0 != r;) {
  288.             ++l;
  289.             var d, s = n.getInt32(o, !0);
  290.             if (o += 4, c = n.getInt32(o, !0), o += 4, d = n.getInt16(o, !0), o += 2, -1 != Rt.indexOf(r)) {
  291.                 var h = {};
  292.                 h.id = r, h.offsetByX = Ht - s, h.offsetByY = qt - c, u.push(h)
  293.             }
  294.             var g = n.getUint8(o++),
  295.                 f = n.getUint8(o++),
  296.                 p = n.getUint8(o++),
  297.                 f = Y(g << 16 | f << 8 | p),
  298.                 p = n.getUint8(o++),
  299.                 m = !!(1 & p),
  300.                 v = !!(16 & p),
  301.                 S = null;
  302.             2 & p && (o += 4 + n.getUint32(o, !0)), 4 & p && (S = i());
  303.             var y = a(),
  304.                 g = null;
  305.             Dt.hasOwnProperty(r) ? (g = Dt[r], g.T(), g.s = g.x, g.u = g.y, g.o = g.size, g.color = f) : (g = new K(r, s, c, d, f, y), jt.push(g), Dt[r] = g), g.c = m, g.h = v, g.na(s, c), g.g = d, g.U = Zt, g.ea = p, S && (g.C = S), y && g.A(y), -1 != Rt.indexOf(r) && -1 == zt.indexOf(g) && (zt.push(g), g.I = !0, 1 == zt.length && (g.ua = !0, Ot = g.x, Gt = g.y, yn(), document.getElementById("overlays").style.display = "none", Ln = [], Cn = 0, Tn = zt[0].color, Pn = !0, Fn = Date.now(), On = Bn = zn = 0))
  306.         }
  307.         if (1 == mt.readyState) {
  308.             var b = {};
  309.             b.action = 44, b.myBloobs = u, mt.send(JSON.stringify(b))
  310.         }
  311.         for (s = n.getUint32(o, !0), o += 4, l = 0; s > l; l++) r = n.getUint32(o, !0), o += 4, g = Dt[r], null != g && g.ca();
  312.         ce && 0 == zt.length && 0 == e.MC.isUserLoggedIn() && Re()
  313.     }
  314.  
  315.     function L() {
  316.         if (P()) {
  317.             var e = Kt - ht / 2,
  318.                 t = Yt - gt / 2;
  319.             if (64 > e * e + t * t || .01 > Math.abs(nn - Ht) && .01 > Math.abs(on - qt) || (nn = Ht, on = qt, e = x(13), e.setUint8(0, 16), e.setInt32(1, 1 == Jt ? Ot : Ht, !0), e.setInt32(5, 1 == Jt ? Gt : qt, !0), e.setUint32(9, 0, !0), k(e)), 1 == mt.readyState) {
  320.                 var n = {};
  321.                 n.action = 2, n.positionX = Ht, n.positionY = qt, mt.send(JSON.stringify(n))
  322.             }
  323.         }
  324.     }
  325.  
  326.     function C() {
  327.         if (P() && we && null != $t) {
  328.             var e = x(1 + 2 * $t.length);
  329.             e.setUint8(0, 0);
  330.             for (var t = 0; t < $t.length; ++t) e.setUint16(1 + 2 * t, $t.charCodeAt(t), !0);
  331.             k(e), $t = null
  332.         }
  333.     }
  334.  
  335.     function T() {
  336.         L(), F(17)
  337.     }
  338.  
  339.     function M() {
  340.         L(), F(21)
  341.     }
  342.  
  343.     function P() {
  344.         return null != pt && pt.readyState == pt.OPEN
  345.     }
  346.  
  347.     function F(e) {
  348.         if (P()) {
  349.             var t = x(1);
  350.             t.setUint8(0, e), k(t)
  351.         }
  352.     }
  353.  
  354.     function z() {
  355.         ht = 1 * e.innerWidth, gt = 1 * e.innerHeight, ct.width = dt.width = ht, ct.height = dt.height = gt;
  356.         var n = t("#helloContainer");
  357.         n.css("transform", "none");
  358.         var o = n.height(),
  359.             a = e.innerHeight;
  360.         0 != o / 2 % 2 && (o++, n.height(o)), o > a / 1.1 ? n.css("transform", "translate(-50%, -50%) scale(" + a / o / 1.1 + ")") : n.css("transform", "translate(-50%, -50%)"), G()
  361.     }
  362.  
  363.     function B() {
  364.         var e;
  365.         return e = 1 * Math.max(gt / 1080, ht / 1920), e *= Ce
  366.     }
  367.  
  368.     function O() {
  369.         if (0 != zt.length) {
  370.             for (var e = 0, t = 0; t < zt.length; t++) e += zt[t].size;
  371.             ae = (9 * ae + Math.pow(Math.min(64 / e, 1), .4) * B()) / 10
  372.         }
  373.     }
  374.  
  375.     function G() {
  376.         var e, t = Date.now();
  377.         if (++Xt, pn && (++fn, fn > 180 && (fn = 0)), Zt = t, 0 < zt.length) {
  378.             O();
  379.             for (var n = e = 0, o = 0; o < zt.length; o++) zt[o].T(), e += zt[o].x / zt.length, n += zt[o].y / zt.length;
  380.             ge = e, fe = n, pe = ae, Ot = (Ot + e) / 2, Gt = (Gt + n) / 2
  381.         } else Ot = (29 * Ot + ge) / 30, Gt = (29 * Gt + fe) / 30, ae = (9 * ae + pe * B()) / 10;
  382.         for (i(), r(), Ie || ut.clearRect(0, 0, ht, gt), Ie ? (ut.fillStyle = he ? "#111111" : "#F2FBFF", ut.globalAlpha = .05, ut.fillRect(0, 0, ht, gt), ut.globalAlpha = 1) : N(), jt.sort(function(e, t) {
  383.                 return e.size == t.size ? e.id - t.id : e.size - t.size
  384.             }), ut.save(), ut.translate(ht / 2, gt / 2), ut.scale(ae, ae), ut.translate(-Ot, -Gt), o = 0; o < Vt.length; o++) Vt[o].w(ut);
  385.         for (o = 0; o < jt.length; o++) jt[o].w(ut);
  386.         if (ye) {
  387.             for (ke = (3 * ke + be) / 4, xe = (3 * xe + Ue) / 4, ut.save(), ut.strokeStyle = "#FFAAAA", ut.lineWidth = 10, ut.lineCap = "round", ut.lineJoin = "round", ut.globalAlpha = .5, ut.beginPath(), o = 0; o < zt.length; o++) ut.moveTo(zt[o].x, zt[o].y), ut.lineTo(ke, xe);
  388.             ut.stroke(), ut.restore()
  389.         }
  390.         ut.restore(), an && an.width && ut.drawImage(an, ht - an.width - 10, 10), ue = Math.max(ue, R()), 0 != ue && (null == ln && (ln = new H(24, "#FFFFFF")), ln.B(m("score") + ": " + ~~(ue / 100)), n = ln.O(), e = n.width, ut.globalAlpha = .2, ut.fillStyle = "#000000", ut.fillRect(10, gt - 10 - 24 - 10, e + 10, 34), ut.globalAlpha = 1, ut.drawImage(n, 15, gt - 10 - 24 - 5)), J(), t = Date.now() - t, t > 1e3 / 60 ? rn -= .01 : 1e3 / 65 > t && (rn += .01), .4 > rn && (rn = .4), rn > 1 && (rn = 1), t = Zt - Qt, !P() || Te || Mn ? (Le += t / 2e3, Le > 1 && (Le = 1)) : (Le -= t / 300, 0 > Le && (Le = 0)), Le > 0 ? (ut.fillStyle = "#000000", Pe ? (ut.globalAlpha = Le, ut.fillRect(0, 0, ht, gt), Be.complete && Be.width && (Be.width / Be.height < ht / gt ? (t = ht, e = Be.height * ht / Be.width) : (t = Be.width * gt / Be.height, e = gt), ut.drawImage(Be, (ht - t) / 2, (gt - e) / 2, t, e), ut.globalAlpha = .5 * Le, ut.fillRect(0, 0, ht, gt))) : (ut.globalAlpha = .5 * Le, ut.fillRect(0, 0, ht, gt)), ut.globalAlpha = 1) : Pe = !1, Qt = Zt
  391.     }
  392.  
  393.     function N() {
  394.         ut.fillStyle = he ? "#111111" : "#F2FBFF", ut.fillRect(0, 0, ht, gt), ut.save(), ut.strokeStyle = he ? "#AAAAAA" : "#000000", ut.globalAlpha = .2 * ae;
  395.         for (var e = ht / ae, t = gt / ae, n = (-Ot + e / 2) % 50; e > n; n += 50) ut.beginPath(), ut.moveTo(n * ae - .5, 0), ut.lineTo(n * ae - .5, t * ae), ut.stroke();
  396.         for (n = (-Gt + t / 2) % 50; t > n; n += 50) ut.beginPath(), ut.moveTo(0, n * ae - .5), ut.lineTo(e * ae, n * ae - .5), ut.stroke();
  397.         ut.restore()
  398.     }
  399.  
  400.     function J() {
  401.         if (St && yt.width) {
  402.             var e = ht / 5;
  403.             ut.drawImage(yt, 5, 5, e, e)
  404.         }
  405.     }
  406.  
  407.     function R() {
  408.         for (var e = 0, t = 0; t < zt.length; t++) e += zt[t].g * zt[t].g;
  409.         return e
  410.     }
  411.  
  412.     function D() {
  413.         if (an = null, (null != ve || 0 != Wt.length) && (null != ve || le)) {
  414.             an = document.createElement("canvas");
  415.             var e = an.getContext("2d"),
  416.                 t = 60,
  417.                 t = null == ve ? t + 24 * Wt.length : t + 180,
  418.                 n = Math.min(200, .3 * ht) / 200;
  419.             an.width = 200 * n, an.height = t * n, e.scale(n, n), e.globalAlpha = .4, e.fillStyle = "#000000", e.fillRect(0, 0, 200, t), e.globalAlpha = 1, e.fillStyle = "#FFFFFF", n = null, n = m("leaderboard"), e.font = "30px Ubuntu", e.fillText(n, 100 - e.measureText(n).width / 2, 40);
  420.             var o, a;
  421.             if (null == ve)
  422.                 for (e.font = "20px Ubuntu", t = 0; t < Wt.length; ++t) n = Wt[t].name || m("unnamed_cell"), le || (n = m("unnamed_cell")), -1 != Rt.indexOf(Wt[t].id) ? (zt[0].name && (n = zt[0].name), e.fillStyle = "#FFAAAA") : e.fillStyle = "#FFFFFF", n = t + 1 + ". " + n, a = e.measureText(n).width, o = 70 + 24 * t, a > 200 ? e.fillText(n, 10, o) : e.fillText(n, (200 - a) / 2, o);
  423.             else
  424.                 for (t = n = 0; t < ve.length; ++t) o = n + ve[t] * Math.PI * 2, e.fillStyle = Ee[t + 1], e.beginPath(), e.moveTo(100, 140), e.arc(100, 140, 80, n, o, !1), e.fill(), n = o
  425.         }
  426.     }
  427.  
  428.     function j(t) {
  429.         if (null == t || 0 == t.length) return null;
  430.         if ("%" == t[0]) {
  431.             if (!e.MC || !e.MC.getSkinInfo) return null;
  432.             if (t = e.MC.getSkinInfo("skin_" + t.slice(1)), null == t) return null;
  433.             for (t = (+t.color).toString(16); 6 > t.length;) t = "0" + t;
  434.             return "#" + t
  435.         }
  436.         return null
  437.     }
  438.  
  439.     function W(t) {
  440.         if (null == t || 0 == t.length) return null;
  441.         if (!gn.hasOwnProperty(t)) {
  442.             var n = new Image;
  443.             if (":" == t[0]) n.src = t.slice(1);
  444.             else if ("%" == t[0]) {
  445.                 if (!e.MC || !e.MC.getSkinInfo) return null;
  446.                 var o = e.MC.getSkinInfo("skin_" + t.slice(1));
  447.                 if (null == o) return null;
  448.                 n.src = e.ASSETS_ROOT + "skins/premium/" + o.url
  449.             }
  450.             gn[t] = n
  451.         }
  452.         return 0 != gn[t].width && gn[t].complete ? gn[t] : null
  453.     }
  454.  
  455.     function V(e, t, n, o, a) {
  456.         this.$ = e, this.x = t, this.y = n, this.f = o, this.b = a
  457.     }
  458.  
  459.     function K(e, t, n, o, a, i) {
  460.         this.id = e, this.s = this.x = this.M = this.J = t, this.u = this.y = this.N = this.K = n, this.o = this.size = o, this.color = a, this.a = [], this.ba(), this.A(i)
  461.     }
  462.  
  463.     function Y(e) {
  464.         for (e = e.toString(16); 6 > e.length;) e = "0" + e;
  465.         return "#" + e
  466.     }
  467.  
  468.     function H(e, t, n, o) {
  469.         e && (this.v = e), t && (this.W = t), this.Y = !!n, o && (this.Z = o)
  470.     }
  471.  
  472.     function Z(e) {
  473.         for (var t, n, o = e.length; o > 0;) n = Math.floor(Math.random() * o), o--, t = e[o], e[o] = e[n], e[n] = t
  474.     }
  475.  
  476.     function q() {
  477.         Un = bn
  478.     }
  479.  
  480.     function X(e) {
  481.         Un.context = "google" == e ? "google" : "facebook", $()
  482.     }
  483.  
  484.     function $() {
  485.         e.localStorage.storeObjectInfo = JSON.stringify(Un), Un = JSON.parse(e.localStorage.storeObjectInfo), e.storageInfo = Un, "google" == Un.context ? (t("#gPlusShare").show(), t("#fbShare").hide()) : (t("#gPlusShare").hide(), t("#fbShare").show())
  486.     }
  487.  
  488.     function Q(n) {
  489.         t("#helloContainer").attr("data-has-account-data"), "" != n.displayName && (n.name = n.displayName), (null == n.name || void 0 == n.name) && (n.name = "");
  490.         var o = n.name.lastIndexOf("_"); - 1 != o && (n.name = n.name.substring(0, o)), t("#helloContainer").attr("data-has-account-data", "1"), t("#helloContainer").attr("data-logged-in", "1"), t(".agario-profile-panel .progress-bar-star").text(n.level), t(".agario-exp-bar .progress-bar-text").text(n.xp + "/" + n.xpNeeded + " XP"), t(".agario-exp-bar .progress-bar").css("width", (88 * n.xp / n.xpNeeded).toFixed(2) + "%"), t(".agario-profile-name").text(n.name), "" != n.picture && t(".agario-profile-picture").attr("src", n.picture), Oe(), Un.userInfo.level = n.level, Un.userInfo.xp = n.xp, Un.userInfo.xpNeeded = n.xpNeeded, Un.userInfo.displayName = n.name, Un.userInfo.loggedIn = "1", e.updateStorage()
  491.     }
  492.  
  493.     function ze(n, o) {
  494.         var a = n;
  495.         if (Un.userInfo.loggedIn) {
  496.             var i = t("#helloContainer").is(":visible") && "1" == t("#helloContainer").attr("data-has-account-data");
  497.             if ((null == a || void 0 == a) && (a = Un.userInfo), i) {
  498.                 var r = +t(".agario-exp-bar .progress-bar-text").first().text().split("/")[0],
  499.                     i = +t(".agario-exp-bar .progress-bar-text").first().text().split("/")[1].split(" ")[0],
  500.                     l = t(".agario-profile-panel .progress-bar-star").first().text();
  501.                 if (l != a.level) ze({
  502.                     xp: i,
  503.                     xpNeeded: i,
  504.                     level: l
  505.                 }, function() {
  506.                     t(".agario-profile-panel .progress-bar-star").text(a.level), t(".agario-exp-bar .progress-bar").css("width", "100%"), t(".progress-bar-star").addClass("animated tada").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function() {
  507.                         t(".progress-bar-star").removeClass("animated tada")
  508.                     }), setTimeout(function() {
  509.                         t(".agario-exp-bar .progress-bar-text").text(a.xpNeeded + "/" + a.xpNeeded + " XP"), ze({
  510.                             xp: 0,
  511.                             xpNeeded: a.xpNeeded,
  512.                             level: a.level
  513.                         }, function() {
  514.                             ze(a)
  515.                         })
  516.                     }, 1e3)
  517.                 });
  518.                 else {
  519.                     var s = Date.now(),
  520.                         c = function() {
  521.                             var n;
  522.                             n = (Date.now() - s) / 1e3, n = 0 > n ? 0 : n > 1 ? 1 : n, n = n * n * (3 - 2 * n), t(".agario-exp-bar .progress-bar-text").text(~~(r + (a.xp - r) * n) + "/" + a.xpNeeded + " XP"), t(".agario-exp-bar .progress-bar").css("width", (88 * (r + (a.xp - r) * n) / a.xpNeeded).toFixed(2) + "%"), o && o(), 1 > n && e.requestAnimationFrame(c)
  523.                         };
  524.                     e.requestAnimationFrame(c)
  525.                 }
  526.             }
  527.         }
  528.     }
  529.  
  530.     function Oe() {
  531.         var e;
  532.         ("undefined" != typeof e && e || "none" == t("#settings").css("display") && "none" == t("#socialLoginContainer").css("display")) && t("#instructions").show()
  533.     }
  534.  
  535.     function Ge(n) {
  536.         if ("connected" == n.status) {
  537.             var o = n.authResponse.accessToken;
  538.             null == o || "undefined" == o || "" == o ? (3 > kn && (kn++, e.facebookRelogin()), e.logout()) : (e.MC.doLoginWithFB(o), st.cache.login_info = [o, "facebook"], e.FB.api("/me/picture?width=180&height=180", function(o) {
  539.                 Un.userInfo.picture = o.data.url, e.updateStorage(), t(".agario-profile-picture").attr("src", o.data.url), Un.userInfo.socialId = n.authResponse.userID, xn()
  540.             }), t("#helloContainer").attr("data-logged-in", "1"), Un.context = "facebook", Un.loginIntent = "1", e.updateStorage())
  541.         }
  542.     }
  543.  
  544.     function Ne(n) {
  545.         d(":party"), t("#helloContainer").attr("data-party-state", "4"), n = decodeURIComponent(n).replace(/.*#/gim, ""), Je("#" + e.encodeURIComponent(n)), t.ajax(rt + "getToken", {
  546.             error: function() {
  547.                 t("#helloContainer").attr("data-party-state", "6")
  548.             },
  549.             success: function(o) {
  550.                 o = o.split("\n"), t(".partyToken").val("agar.io/#" + e.encodeURIComponent(n)), t("#helloContainer").attr("data-party-state", "5"), d(":party"), b("ws://" + o[0], n)
  551.             },
  552.             dataType: "text",
  553.             method: "POST",
  554.             cache: !1,
  555.             crossDomain: !0,
  556.             data: n
  557.         })
  558.     }
  559.  
  560.     function Je(t) {
  561.         e.history && e.history.replaceState && e.history.replaceState({}, e.document.title, t)
  562.     }
  563.  
  564.     function Re() {
  565.         null == e.storageInfo && e.createDefaultStorage(), _n = Date.now(), 0 >= Fn && (Fn = _n), Pn = !1, Ke()
  566.     }
  567.  
  568.     function De(e, t) {
  569.         var n = -1 != Rt.indexOf(e.id),
  570.             o = -1 != Rt.indexOf(t.id),
  571.             a = 30 > t.size;
  572.         n && a && ++Cn, a || !n || o || 32 & t.ea || ++Bn
  573.     }
  574.  
  575.     function je(e) {
  576.         e = ~~e;
  577.         var t = (e % 60).toString();
  578.         return e = (~~(e / 60)).toString(), 2 > t.length && (t = "0" + t), e + ":" + t
  579.     }
  580.  
  581.     function We() {
  582.         if (null == Wt) return 0;
  583.         for (var e = 0; e < Wt.length; ++e)
  584.             if (-1 != Rt.indexOf(Wt[e].id)) return e + 1;
  585.         return 0
  586.     }
  587.  
  588.     function Ve() {
  589.         t(".stats-food-eaten").text(Cn), t(".stats-time-alive").text(je((_n - Fn) / 1e3)), t(".stats-leaderboard-time").text(je(zn)), t(".stats-highest-mass").text(~~(ue / 100)), t(".stats-cells-eaten").text(Bn), t(".stats-top-position").text(0 == On ? ":(" : On);
  590.         var e = document.getElementById("statsGraph");
  591.         if (e) {
  592.             var n = e.getContext("2d"),
  593.                 o = e.width,
  594.                 e = e.height;
  595.             if (n.clearRect(0, 0, o, e), 2 < Ln.length) {
  596.                 for (var a = 200, i = 0; i < Ln.length; i++) a = Math.max(Ln[i], a);
  597.                 for (n.lineWidth = 3, n.lineCap = "round", n.lineJoin = "round", n.strokeStyle = Tn, n.fillStyle = Tn, n.beginPath(), n.moveTo(0, e - Ln[0] / a * (e - 10) + 10), i = 1; i < Ln.length; i += Math.max(~~(Ln.length / o), 1)) {
  598.                     for (var r = i / (Ln.length - 1) * o, l = [], s = -20; 20 >= s; ++s) 0 > i + s || i + s >= Ln.length || l.push(Ln[i + s]);
  599.                     l = l.reduce(function(e, t) {
  600.                         return e + t
  601.                     }) / l.length / a, n.lineTo(r, e - l * (e - 10) + 10)
  602.                 }
  603.                 n.stroke(), n.globalAlpha = .5, n.lineTo(o, e), n.lineTo(0, e), n.fill(), n.globalAlpha = 1
  604.             }
  605.         }
  606.     }
  607.  
  608.     function Ke() {
  609.         Te || Mn || (Gn ? (e.refreshAd(e.adSlots.ab), Ve(), Mn = !0, setTimeout(function() {
  610.             t("#overlays").fadeIn(500, function() {
  611.                 ze()
  612.             }), t("#stats").show();
  613.             var n = Ye("g_plus_share_stats");
  614.             e.fillSocialValues(n, "gPlusShare")
  615.         }, 1500)) : u(500))
  616.     }
  617.  
  618.     function Ye(n) {
  619.         var o = t(".stats-time-alive").text();
  620.         return e.parseString(n, "%@", [o.split(":")[0], o.split(":")[1], t(".stats-highest-mass").text()])
  621.     }
  622.  
  623.     function He() {
  624.         e.open("https://plus.google.com/share?url=www.agar.io&hl=en-US", "Agar.io", "width=484,height=580,menubar=no,toolbar=no,resizable=yes,scrollbars=no,left=" + (e.screenX + e.innerWidth / 2 - 242) + ",top=" + (e.innerHeight - 580) / 2)
  625.     }
  626.     var Ze = document.createElement("canvas");
  627.     if ("undefined" == typeof console || "undefined" == typeof DataView || "undefined" == typeof WebSocket || null == Ze || null == Ze.getContext || null == e.localStorage) alert("You browser does not support this game, we recommend you to use Firefox to play this");
  628.     else {
  629.         var qe = {};
  630.         ! function() {
  631.             var t = e.location.search;
  632.             "?" == t.charAt(0) && (t = t.slice(1));
  633.             for (var t = t.split("&"), n = 0; n < t.length; n++) {
  634.                 var o = t[n].split("=");
  635.                 qe[o[0]] = o[1]
  636.             }
  637.         }(), e.queryString = qe;
  638.         var Xe = "fb" in qe,
  639.             $e = "miniclip" in qe,
  640.             Qe = {
  641.                 skinsEnabled: "0",
  642.                 namesEnabled: "0",
  643.                 noColors: "0",
  644.                 blackTheme: "0",
  645.                 showMass: "0",
  646.                 statsEnabled: "0"
  647.             },
  648.             et = function() {
  649.                 n("", -1)
  650.             },
  651.             tt = "http:" != e.location.protocol,
  652.             nt = "1" == o(),
  653.             ot = !1;
  654.         if (Xe || $e || (tt && !nt ? (console.log("redirecting"), n("1", 1), e.location.href = "http:" + e.location.href.substring(e.location.protocol.length), ot = !0) : n("", -1)), tt || n("", -1), ot || setTimeout(et, 3e3), !e.agarioNoInit) {
  655.             var at = e.location.protocol,
  656.                 it = "https:" == at;
  657.             qe.master && (EnvConfig.master_url = qe.master);
  658.             var rt = at + "//" + EnvConfig.master_url + "/",
  659.                 lt = e.navigator.userAgent;
  660.             if (-1 != lt.indexOf("Android")) e.ga && e.ga("send", "event", "MobileRedirect", "PlayStore"), setTimeout(function() {
  661.                 e.location.href = "https://play.google.com/store/apps/details?id=com.miniclip.agar.io"
  662.             }, 1e3);
  663.             else if (-1 != lt.indexOf("iPhone") || -1 != lt.indexOf("iPad") || -1 != lt.indexOf("iPod")) e.ga && e.ga("send", "event", "MobileRedirect", "AppStore"), setTimeout(function() {
  664.                 e.location.href = "https://itunes.apple.com/app/agar.io/id995999703?mt=8&at=1l3vajp"
  665.             }, 1e3);
  666.             else {
  667.                 var st = {};
  668.                 e.agarApp = st;
  669.                 var ct, ut, dt, ht, gt, ft = null,
  670.                     pt = null,
  671.                     mt = null,
  672.                     vt = 0;
  673.                 _t = !1, Bt = !1, Nt = 0, Jt = !1, Ot = 0, Gt = 0, Rt = [], zt = [], Dt = {}, jt = [], Vt = [], Wt = [], Kt = 0, Yt = 0, Ht = -1, qt = -1, Xt = 0, Zt = 0, Qt = 0, $t = null, te = 0, ee = 0, ne = 1e4, oe = 1e4, ae = 1, ie = null, re = !0, le = !0, se = !1, ce = !1, ue = 0, he = !1, de = !1, ge = Ot = ~~((te + ne) / 2), fe = Gt = ~~((ee + oe) / 2), pe = 1, me = "", ve = null, Se = !1, ye = !1, be = 0, Ue = 0, ke = 0, xe = 0, Ee = ["#333333", "#FF3333", "#33FF33", "#3333FF"], Ie = !1, we = !1, Ae = 0, Ce = 1, Le = 1, Te = !1, Me = 0, Pe = !0, Fe = null, _e = !1, Be = new Image, Be.src = "/img/background.png";
  674.                 var St = "ontouchstart" in e && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e.navigator.userAgent),
  675.                     yt = new Image;
  676.                 yt.src = "/img/split.png";
  677.                 var bt, Ut, xt = !1;
  678.                 "gamepad" in qe && setInterval(function() {
  679.                     xt && (Kt = mn.ha(Kt, bt), Yt = mn.ha(Yt, Ut))
  680.                 }, 25), e.gamepadAxisUpdate = function(e, t) {
  681.                     var n = .1 > t * t;
  682.                     0 == e && (n ? bt = ht / 2 : (bt = (t + 1) / 2 * ht, xt = !0)), 1 == e && (n ? Ut = gt / 2 : (Ut = (t + 1) / 2 * gt, xt = !0))
  683.                 }, e.agarioInit = function() {
  684.                     if (Se = !0, p(), f(), st.core.init(), null != e.localStorage.settings && (Qe = JSON.parse(e.localStorage.settings), de = Qe.showMass, he = Qe.blackTheme, le = Qe.namesEnabled, se = Qe.noColors, Gn = Qe.statsEnabled, re = Qe.skinsEnabled), t("#showMass").prop("checked", Qe.showMass), t("#noSkins").prop("checked", !Qe.skinsEnabled), t("#skipStats").prop("checked", !Qe.statsEnabled), t("#noColors").prop("checked", Qe.noColors), t("#noNames").prop("checked", !Qe.namesEnabled), t("#darkTheme").prop("checked", Qe.blackTheme), l(), setInterval(l, 18e4), dt = ct = document.getElementById("canvas"), null != dt) {
  685.                         ut = dt.getContext("2d"), dt.onmousedown = function(e) {
  686.                             if (St) {
  687.                                 var t = e.clientX - (5 + ht / 5 / 2),
  688.                                     n = e.clientY - (5 + ht / 5 / 2);
  689.                                 if (Math.sqrt(t * t + n * n) <= ht / 5 / 2) return void T()
  690.                             }
  691.                             Kt = 1 * e.clientX, Yt = 1 * e.clientY, r(), L()
  692.                         }, dt.onmousemove = function(e) {
  693.                             xt = !1, Kt = 1 * e.clientX, Yt = 1 * e.clientY, r()
  694.                         }, dt.onmouseup = function() {}, /firefox/i.test(navigator.userAgent) ? document.addEventListener("DOMMouseScroll", a, !1) : document.body.onmousewheel = a;
  695.                         var n = !1,
  696.                             o = !1,
  697.                             i = !1;
  698.                         e.onkeydown = function(a) {
  699.                             if (32 != a.keyCode || n || ("nick" != a.target.id && a.preventDefault(), T(), n = !0), 81 != a.keyCode || o || (F(18), o = !0), 87 != a.keyCode || i || (M(), i = !0), 27 == a.keyCode && (a.preventDefault(), u(300), t("#oferwallContainer").is(":visible") && e.closeOfferwall(), t("#videoContainer").is(":visible") && e.closeVideoContainer()), "nick" != a.target.id) {
  700.                                 if (65 == a.keyCode) {
  701.                                     var r = {};
  702.                                     r.action = 25, mt.send(JSON.stringify(r))
  703.                                 }
  704.                                 if (68 == a.keyCode) {
  705.                                     var r = {};
  706.                                     r.action = 26, mt.send(JSON.stringify(r))
  707.                                 }
  708.                                 83 == a.keyCode && (0 == Bt ? (Bt = !0, L(), F(21), Nt = setInterval(function() {
  709.                                     L(), F(21)
  710.                                 }, 50)) : (clearInterval(Nt), Bt = !1)), 70 == a.keyCode && (Jt = !Jt)
  711.                             }
  712.                         }, e.onkeyup = function(e) {
  713.                             32 == e.keyCode && (n = !1), 87 == e.keyCode && (i = !1), 81 == e.keyCode && o && (F(19), o = !1)
  714.                         }, e.onblur = function() {
  715.                             F(19), i = o = n = !1
  716.                         }, e.onresize = z, e.requestAnimationFrame(cn), setInterval(L, 40), ie && t("#region").val(ie), h(), c(t("#region").val()), 0 == Me && ie && S(), u(0), z(), e.location.hash && 6 <= e.location.hash.length && Ne(e.location.hash)
  717.                     }
  718.                 };
  719.                 var kt = null;
  720.                 e.setNick = function(t) {
  721.                     if (e.ga && e.ga("send", "event", "Nick", t.toLowerCase()), s(), $t = t, C(), ue = 0, _t) {
  722.                         var n = {};
  723.                         n.action = 3, n.playerName = t, mt.send(JSON.stringify(n))
  724.                     }
  725.                     Qe.skinsEnabled = re, Qe.namesEnabled = le, Qe.noColors = se, Qe.blackTheme = he, Qe.showMass = de, Qe.statsEnabled = Gn, e.localStorage.settings = JSON.stringify(Qe)
  726.                 }, e.setSkins = function(e) {
  727.                     re = e
  728.                 }, e.setNames = function(e) {
  729.                     le = e
  730.                 }, e.setDarkTheme = function(e) {
  731.                     he = e
  732.                 }, e.setColors = function(e) {
  733.                     se = e
  734.                 }, e.setShowMass = function(e) {
  735.                     de = e
  736.                 }, e.spectate = function() {
  737.                     $t = null, F(1), s()
  738.                 }, e.setRegion = c;
  739.                 var Et = !0;
  740.                 e.setGameMode = function(e) {
  741.                     e != me && (":party" == me && t("#helloContainer").attr("data-party-state", "0"), d(e), ":party" != e && S())
  742.                 }, e.setAcid = function(e) {
  743.                     Ie = e
  744.                 };
  745.                 var It = function(n) {
  746.                     var o = {},
  747.                         a = !1,
  748.                         i = {
  749.                             skipDraw: !0,
  750.                             predictionModifier: 1.1
  751.                         };
  752.                     return n.init = function() {
  753.                         st.account.init(), st.google.va(), st.fa.init(), (a = "debug" in e.queryString) && st.debug.showDebug()
  754.                     }, n.bind = function(e, n) {
  755.                         t(o).bind(e, n)
  756.                     }, n.unbind = function(e, n) {
  757.                         t(o).unbind(e, n)
  758.                     }, n.trigger = function(e, n) {
  759.                         t(o).trigger(e, n)
  760.                     }, n.__defineGetter__("debug", function() {
  761.                         return a
  762.                     }), n.__defineSetter__("debug", function(e) {
  763.                         return a = e
  764.                     }), n.__defineGetter__("proxy", function() {
  765.                         return e.MC
  766.                     }), n.__defineGetter__("config", function() {
  767.                         return i
  768.                     }), n
  769.                 }({});
  770.                 st.core = It, st.cache = {};
  771.                 var wt = function(e) {
  772.                     function n(e, n, o, a) {
  773.                         e += "Canvas";
  774.                         var r = t("<canvas>", {
  775.                             id: e
  776.                         });
  777.                         for (i.append(r), o = new SmoothieChart(o), r = 0; r < n.length; r++) {
  778.                             var l = n[r],
  779.                                 s = _.extend(c, a[r]);
  780.                             o.addTimeSeries(l, s)
  781.                         }
  782.                         o.streamTo(document.getElementById(e), 0)
  783.                     }
  784.  
  785.                     function o(e, t) {
  786.                         s[e] = a(), n(e, [s[e]], t, [{
  787.                             strokeStyle: "rgba(0, 255, 0, 1)",
  788.                             fillStyle: "rgba(0, 255, 0, 0.2)",
  789.                             lineWidth: 2
  790.                         }])
  791.                     }
  792.  
  793.                     function a() {
  794.                         return new TimeSeries({
  795.                             Ka: !1
  796.                         })
  797.                     }
  798.                     var i, r = !1,
  799.                         l = !1,
  800.                         s = {},
  801.                         c = {
  802.                             strokeStyle: "rgba(0, 255, 0, 1)",
  803.                             fillStyle: "rgba(0, 255, 0, 0.2)",
  804.                             lineWidth: 2
  805.                         };
  806.                     return e.showDebug = function() {
  807.                         r || (i = t("#debug-overlay"), o("networkUpdate", {
  808.                             name: "network updates",
  809.                             minValue: 0,
  810.                             maxValue: 120
  811.                         }), o("fps", {
  812.                             name: "fps",
  813.                             minValue: 0,
  814.                             maxValue: 120
  815.                         }), s.rttSDev = a(), s.rttMean = a(), n("rttMean", [s.rttSDev, s.rttMean], {
  816.                             name: "rtt",
  817.                             minValue: 0,
  818.                             maxValue: 120
  819.                         }, [{
  820.                             strokeStyle: "rgba(255, 0, 0, 1)",
  821.                             fillStyle: "rgba(0, 255, 0, 0.2)",
  822.                             lineWidth: 2
  823.                         }, {
  824.                             strokeStyle: "rgba(0, 255, 0, 1)",
  825.                             fillStyle: "rgba(0, 255, 0, 0)",
  826.                             lineWidth: 2
  827.                         }]), r = !0), st.core.debug = !0, i.show()
  828.                     }, e.hideDebug = function() {
  829.                         i.hide(), st.core.debug = !1
  830.                     }, e.updateChart = function(e, t, n) {
  831.                         r && e in s && s[e].append(t, n)
  832.                     }, e.__defineGetter__("showPrediction", function() {
  833.                         return l
  834.                     }), e.__defineSetter__("showPrediction", function(e) {
  835.                         return l = e
  836.                     }), e
  837.                 }({});
  838.                 st.debug = wt;
  839.                 var At = {
  840.                         AF: "JP-Tokyo",
  841.                         AX: "EU-London",
  842.                         AL: "EU-London",
  843.                         DZ: "EU-London",
  844.                         AS: "SG-Singapore",
  845.                         AD: "EU-London",
  846.                         AO: "EU-London",
  847.                         AI: "US-Atlanta",
  848.                         AG: "US-Atlanta",
  849.                         AR: "BR-Brazil",
  850.                         AM: "JP-Tokyo",
  851.                         AW: "US-Atlanta",
  852.                         AU: "SG-Singapore",
  853.                         AT: "EU-London",
  854.                         AZ: "JP-Tokyo",
  855.                         BS: "US-Atlanta",
  856.                         BH: "JP-Tokyo",
  857.                         BD: "JP-Tokyo",
  858.                         BB: "US-Atlanta",
  859.                         BY: "EU-London",
  860.                         BE: "EU-London",
  861.                         BZ: "US-Atlanta",
  862.                         BJ: "EU-London",
  863.                         BM: "US-Atlanta",
  864.                         BT: "JP-Tokyo",
  865.                         BO: "BR-Brazil",
  866.                         BQ: "US-Atlanta",
  867.                         BA: "EU-London",
  868.                         BW: "EU-London",
  869.                         BR: "BR-Brazil",
  870.                         IO: "JP-Tokyo",
  871.                         VG: "US-Atlanta",
  872.                         BN: "JP-Tokyo",
  873.                         BG: "EU-London",
  874.                         BF: "EU-London",
  875.                         BI: "EU-London",
  876.                         KH: "JP-Tokyo",
  877.                         CM: "EU-London",
  878.                         CA: "US-Atlanta",
  879.                         CV: "EU-London",
  880.                         KY: "US-Atlanta",
  881.                         CF: "EU-London",
  882.                         TD: "EU-London",
  883.                         CL: "BR-Brazil",
  884.                         CN: "CN-China",
  885.                         CX: "JP-Tokyo",
  886.                         CC: "JP-Tokyo",
  887.                         CO: "BR-Brazil",
  888.                         KM: "EU-London",
  889.                         CD: "EU-London",
  890.                         CG: "EU-London",
  891.                         CK: "SG-Singapore",
  892.                         CR: "US-Atlanta",
  893.                         CI: "EU-London",
  894.                         HR: "EU-London",
  895.                         CU: "US-Atlanta",
  896.                         CW: "US-Atlanta",
  897.                         CY: "JP-Tokyo",
  898.                         CZ: "EU-London",
  899.                         DK: "EU-London",
  900.                         DJ: "EU-London",
  901.                         DM: "US-Atlanta",
  902.                         DO: "US-Atlanta",
  903.                         EC: "BR-Brazil",
  904.                         EG: "EU-London",
  905.                         SV: "US-Atlanta",
  906.                         GQ: "EU-London",
  907.                         ER: "EU-London",
  908.                         EE: "EU-London",
  909.                         ET: "EU-London",
  910.                         FO: "EU-London",
  911.                         FK: "BR-Brazil",
  912.                         FJ: "SG-Singapore",
  913.                         FI: "EU-London",
  914.                         FR: "EU-London",
  915.                         GF: "BR-Brazil",
  916.                         PF: "SG-Singapore",
  917.                         GA: "EU-London",
  918.                         GM: "EU-London",
  919.                         GE: "JP-Tokyo",
  920.                         DE: "EU-London",
  921.                         GH: "EU-London",
  922.                         GI: "EU-London",
  923.                         GR: "EU-London",
  924.                         GL: "US-Atlanta",
  925.                         GD: "US-Atlanta",
  926.                         GP: "US-Atlanta",
  927.                         GU: "SG-Singapore",
  928.                         GT: "US-Atlanta",
  929.                         GG: "EU-London",
  930.                         GN: "EU-London",
  931.                         GW: "EU-London",
  932.                         GY: "BR-Brazil",
  933.                         HT: "US-Atlanta",
  934.                         VA: "EU-London",
  935.                         HN: "US-Atlanta",
  936.                         HK: "JP-Tokyo",
  937.                         HU: "EU-London",
  938.                         IS: "EU-London",
  939.                         IN: "JP-Tokyo",
  940.                         ID: "JP-Tokyo",
  941.                         IR: "JP-Tokyo",
  942.                         IQ: "JP-Tokyo",
  943.                         IE: "EU-London",
  944.                         IM: "EU-London",
  945.                         IL: "JP-Tokyo",
  946.                         IT: "EU-London",
  947.                         JM: "US-Atlanta",
  948.                         JP: "JP-Tokyo",
  949.                         JE: "EU-London",
  950.                         JO: "JP-Tokyo",
  951.                         KZ: "JP-Tokyo",
  952.                         KE: "EU-London",
  953.                         KI: "SG-Singapore",
  954.                         KP: "JP-Tokyo",
  955.                         KR: "JP-Tokyo",
  956.                         KW: "JP-Tokyo",
  957.                         KG: "JP-Tokyo",
  958.                         LA: "JP-Tokyo",
  959.                         LV: "EU-London",
  960.                         LB: "JP-Tokyo",
  961.                         LS: "EU-London",
  962.                         LR: "EU-London",
  963.                         LY: "EU-London",
  964.                         LI: "EU-London",
  965.                         LT: "EU-London",
  966.                         LU: "EU-London",
  967.                         MO: "JP-Tokyo",
  968.                         MK: "EU-London",
  969.                         MG: "EU-London",
  970.                         MW: "EU-London",
  971.                         MY: "JP-Tokyo",
  972.                         MV: "JP-Tokyo",
  973.                         ML: "EU-London",
  974.                         MT: "EU-London",
  975.                         MH: "SG-Singapore",
  976.                         MQ: "US-Atlanta",
  977.                         MR: "EU-London",
  978.                         MU: "EU-London",
  979.                         YT: "EU-London",
  980.                         MX: "US-Atlanta",
  981.                         FM: "SG-Singapore",
  982.                         MD: "EU-London",
  983.                         MC: "EU-London",
  984.                         MN: "JP-Tokyo",
  985.                         ME: "EU-London",
  986.                         MS: "US-Atlanta",
  987.                         MA: "EU-London",
  988.                         MZ: "EU-London",
  989.                         MM: "JP-Tokyo",
  990.                         NA: "EU-London",
  991.                         NR: "SG-Singapore",
  992.                         NP: "JP-Tokyo",
  993.                         NL: "EU-London",
  994.                         NC: "SG-Singapore",
  995.                         NZ: "SG-Singapore",
  996.                         NI: "US-Atlanta",
  997.                         NE: "EU-London",
  998.                         NG: "EU-London",
  999.                         NU: "SG-Singapore",
  1000.                         NF: "SG-Singapore",
  1001.                         MP: "SG-Singapore",
  1002.                         NO: "EU-London",
  1003.                         OM: "JP-Tokyo",
  1004.                         PK: "JP-Tokyo",
  1005.                         PW: "SG-Singapore",
  1006.                         PS: "JP-Tokyo",
  1007.                         PA: "US-Atlanta",
  1008.                         PG: "SG-Singapore",
  1009.                         PY: "BR-Brazil",
  1010.                         PE: "BR-Brazil",
  1011.                         PH: "JP-Tokyo",
  1012.                         PN: "SG-Singapore",
  1013.                         PL: "EU-London",
  1014.                         PT: "EU-London",
  1015.                         PR: "US-Atlanta",
  1016.                         QA: "JP-Tokyo",
  1017.                         RE: "EU-London",
  1018.                         RO: "EU-London",
  1019.                         RU: "RU-Russia",
  1020.                         RW: "EU-London",
  1021.                         BL: "US-Atlanta",
  1022.                         SH: "EU-London",
  1023.                         KN: "US-Atlanta",
  1024.                         LC: "US-Atlanta",
  1025.                         MF: "US-Atlanta",
  1026.                         PM: "US-Atlanta",
  1027.                         VC: "US-Atlanta",
  1028.                         WS: "SG-Singapore",
  1029.                         SM: "EU-London",
  1030.                         ST: "EU-London",
  1031.                         SA: "EU-London",
  1032.                         SN: "EU-London",
  1033.                         RS: "EU-London",
  1034.                         SC: "EU-London",
  1035.                         SL: "EU-London",
  1036.                         SG: "JP-Tokyo",
  1037.                         SX: "US-Atlanta",
  1038.                         SK: "EU-London",
  1039.                         SI: "EU-London",
  1040.                         SB: "SG-Singapore",
  1041.                         SO: "EU-London",
  1042.                         ZA: "EU-London",
  1043.                         SS: "EU-London",
  1044.                         ES: "EU-London",
  1045.                         LK: "JP-Tokyo",
  1046.                         SD: "EU-London",
  1047.                         SR: "BR-Brazil",
  1048.                         SJ: "EU-London",
  1049.                         SZ: "EU-London",
  1050.                         SE: "EU-London",
  1051.                         CH: "EU-London",
  1052.                         SY: "EU-London",
  1053.                         TW: "JP-Tokyo",
  1054.                         TJ: "JP-Tokyo",
  1055.                         TZ: "EU-London",
  1056.                         TH: "JP-Tokyo",
  1057.                         TL: "JP-Tokyo",
  1058.                         TG: "EU-London",
  1059.                         TK: "SG-Singapore",
  1060.                         TO: "SG-Singapore",
  1061.                         TT: "US-Atlanta",
  1062.                         TN: "EU-London",
  1063.                         TR: "TK-Turkey",
  1064.                         TM: "JP-Tokyo",
  1065.                         TC: "US-Atlanta",
  1066.                         TV: "SG-Singapore",
  1067.                         UG: "EU-London",
  1068.                         UA: "EU-London",
  1069.                         AE: "EU-London",
  1070.                         GB: "EU-London",
  1071.                         US: "US-Atlanta",
  1072.                         UM: "SG-Singapore",
  1073.                         VI: "US-Atlanta",
  1074.                         UY: "BR-Brazil",
  1075.                         UZ: "JP-Tokyo",
  1076.                         VU: "SG-Singapore",
  1077.                         VE: "BR-Brazil",
  1078.                         VN: "JP-Tokyo",
  1079.                         WF: "SG-Singapore",
  1080.                         EH: "EU-London",
  1081.                         YE: "JP-Tokyo",
  1082.                         ZM: "EU-London",
  1083.                         ZW: "EU-London"
  1084.                     },
  1085.                     Lt = 0,
  1086.                     Ct = 0,
  1087.                     Tt = null;
  1088.                 e.connect = b;
  1089.                 var Mt = 500,
  1090.                     Pt = .875,
  1091.                     Ft = .75,
  1092.                     en = .25,
  1093.                     tn = .125,
  1094.                     nn = -1,
  1095.                     on = -1;
  1096.                 e.sendMitosis = T, e.sendEject = M, st.networking = function(e) {
  1097.                     return e.loginRealm = {
  1098.                         GG: "google",
  1099.                         FB: "facebook"
  1100.                     }, e.sendMessage = function(e) {
  1101.                         if (P()) {
  1102.                             var t = e.byteView;
  1103.                             if (null != t) {
  1104.                                 e = x(1 + e.length), e.setUint8(0, 102);
  1105.                                 for (var n = 0; n < t.length; ++n) e.setUint8(1 + n, t[n]);
  1106.                                 k(e)
  1107.                             }
  1108.                         }
  1109.                     }, e
  1110.                 }({});
  1111.                 var an = null,
  1112.                     rn = 1,
  1113.                     ln = null,
  1114.                     sn = 0,
  1115.                     cn = function() {
  1116.                         var t = Date.now(),
  1117.                             n = 1e3 / 60;
  1118.                         return function() {
  1119.                             e.requestAnimationFrame(cn);
  1120.                             var o = Date.now(),
  1121.                                 a = o - t;
  1122.                             if (a > n) {
  1123.                                 t = o - a % n;
  1124.                                 var i = Date.now();
  1125.                                 !P() || 240 > i - Ae || !st.core.config.skipDraw ? G() : console.warn("Skipping draw"), An(), sn = 1e3 / a, st.debug.updateChart("fps", o, sn)
  1126.                             }
  1127.                         }
  1128.                     }(),
  1129.                     un = {},
  1130.                     dn = "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;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(";"),
  1131.                     hn = "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(";"),
  1132.                     gn = {};
  1133.                 V.prototype = {
  1134.                     $: null,
  1135.                     x: 0,
  1136.                     y: 0,
  1137.                     f: 0,
  1138.                     b: 0
  1139.                 };
  1140.                 var fn = -1,
  1141.                     pn = !1;
  1142.                 K.prototype = {
  1143.                     id: 0,
  1144.                     a: null,
  1145.                     name: null,
  1146.                     i: null,
  1147.                     S: null,
  1148.                     x: 0,
  1149.                     y: 0,
  1150.                     size: 0,
  1151.                     s: 0,
  1152.                     u: 0,
  1153.                     o: 0,
  1154.                     ja: 0,
  1155.                     ka: 0,
  1156.                     g: 0,
  1157.                     M: 0,
  1158.                     N: 0,
  1159.                     J: 0,
  1160.                     K: 0,
  1161.                     ea: 0,
  1162.                     U: 0,
  1163.                     ra: 0,
  1164.                     G: !1,
  1165.                     c: !1,
  1166.                     h: !1,
  1167.                     V: !0,
  1168.                     da: 0,
  1169.                     C: null,
  1170.                     ia: 0,
  1171.                     ua: !1,
  1172.                     I: !1,
  1173.                     ca: function() {
  1174.                         var e;
  1175.                         for (e = 0; e < jt.length; e++)
  1176.                             if (jt[e] == this) {
  1177.                                 jt.splice(e, 1);
  1178.                                 break
  1179.                             }
  1180.                         delete Dt[this.id], e = zt.indexOf(this), -1 != e && (ce = !0, zt.splice(e, 1)), e = Rt.indexOf(this.id), -1 != e && Rt.splice(e, 1), this.G = !0, 0 < this.da && Vt.push(this)
  1181.                     },
  1182.                     m: function() {
  1183.                         return Math.max(~~(.3 * this.size), 24)
  1184.                     },
  1185.                     A: function(e) {
  1186.                         (this.name = e) && (null == this.i ? this.i = new H(this.m(), "#FFFFFF", !0, "#000000") : this.i.P(this.m()), this.i.B(this.name))
  1187.                     },
  1188.                     ba: function() {
  1189.                         for (var e = this.H(); this.a.length > e;) {
  1190.                             var t = ~~(Math.random() * this.a.length);
  1191.                             this.a.splice(t, 1)
  1192.                         }
  1193.                         for (0 == this.a.length && e > 0 && this.a.push(new V(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 V(this, t.x, t.y, t.f, t.b))
  1194.                     },
  1195.                     H: function() {
  1196.                         var e = 10;
  1197.                         20 > this.size && (e = 0), this.c && (e = 30);
  1198.                         var t = this.size;
  1199.                         return this.c || (t *= ae), t *= rn, ~~Math.max(t, e)
  1200.                     },
  1201.                     Ba: function() {
  1202.                         this.ba();
  1203.                         for (var e = this.a, t = e.length, n = this, o = this.c ? 0 : (this.id / 1e3 + Zt / 1e4) % (2 * Math.PI), a = 0, i = 0; t > i; ++i) {
  1204.                             var r = e[(i - 1 + t) % t].b,
  1205.                                 l = e[(i + 1) % t].b,
  1206.                                 s = e[i];
  1207.                             s.b += (Math.random() - .5) * (this.h ? 3 : 1), s.b *= .7, 10 < s.b && (s.b = 10), -10 > s.b && (s.b = -10), s.b = (r + l + 8 * s.b) / 10;
  1208.                             var c = s.f,
  1209.                                 r = e[(i - 1 + t) % t].f,
  1210.                                 l = e[(i + 1) % t].f;
  1211.                             if (15 < this.size && null != ft && 20 < this.size * ae && 0 < this.id) {
  1212.                                 var u = !1,
  1213.                                     d = s.x,
  1214.                                     h = s.y;
  1215.                                 ft.Ea(d - 5, h - 5, 10, 10, function(e) {
  1216.                                     e.$ != n && 25 > (d - e.x) * (d - e.x) + (h - e.y) * (h - e.y) && (u = !0)
  1217.                                 }), !u && (s.x < te || s.y < ee || s.x > ne || s.y > oe) && (u = !0), u && (0 < s.b && (s.b = 0), --s.b)
  1218.                             }
  1219.                             c += s.b, 0 > c && (c = 0), c = this.h ? (19 * c + this.size) / 20 : (12 * c + this.size) / 13, s.f = (r + l + 8 * c) / 10, r = 2 * Math.PI / t, l = s.f, this.c && 0 == i % 2 && (l += 5), s.x = this.x + Math.cos(r * i + o) * l, s.y = this.y + Math.sin(r * i + o) * l, a = Math.max(a, l)
  1220.                         }
  1221.                         this.ia = a
  1222.                     },
  1223.                     na: function(e, t) {
  1224.                         this.M = e, this.N = t, this.J = e, this.K = t, this.ja = e, this.ka = t
  1225.                     },
  1226.                     T: function() {
  1227.                         if (0 >= this.id) return 1;
  1228.                         var e = mn.pa((Zt - this.U) / 120, 0, 1);
  1229.                         if (this.G && e >= 1) {
  1230.                             var t = Vt.indexOf(this); - 1 != t && Vt.splice(t, 1)
  1231.                         }
  1232.                         return this.x = e * (this.ja - this.s) + this.s, this.y = e * (this.ka - this.u) + this.u, this.size = e * (this.g - this.o) + this.o, .01 > Math.abs(this.size - this.g) && (this.size = this.g), e
  1233.                     },
  1234.                     R: function() {
  1235.                         return 0 >= this.id ? !0 : this.x + this.size + 40 < Ot - ht / 2 / ae || this.y + this.size + 40 < Gt - gt / 2 / ae || this.x - this.size - 40 > Ot + ht / 2 / ae || this.y - this.size - 40 > Gt + gt / 2 / ae ? !1 : !0
  1236.                     },
  1237.                     qa: function(e) {
  1238.                         e.beginPath();
  1239.                         var t = this.H();
  1240.                         e.moveTo(this.a[0].x, this.a[0].y);
  1241.                         for (var n = 1; t >= n; ++n) {
  1242.                             var o = n % t;
  1243.                             e.lineTo(this.a[o].x, this.a[o].y)
  1244.                         }
  1245.                         e.closePath(), e.stroke()
  1246.                     },
  1247.                     w: function(t) {
  1248.                         if (this.R()) {
  1249.                             ++this.da;
  1250.                             var n = 0 < this.id && !this.c && !this.h && .4 > ae;
  1251.                             if (5 > this.H() && 0 < this.id && (n = !0), this.V && !n)
  1252.                                 for (var o = 0; o < this.a.length; o++) this.a[o].f = this.size;
  1253.                             this.V = n, t.save(), this.ra = Zt, o = this.T(), this.G && (t.globalAlpha *= 1 - o), t.lineWidth = 10, t.lineCap = "round", t.lineJoin = this.c ? "miter" : "round";
  1254.                             var a = this.name.toLowerCase(),
  1255.                                 i = null,
  1256.                                 r = null,
  1257.                                 o = !1,
  1258.                                 l = this.color,
  1259.                                 s = !1;
  1260.                             this.h || !re || _e || (-1 != dn.indexOf(a) ? (un.hasOwnProperty(a) || (un[a] = new Image, un[a].src = e.ASSETS_ROOT + "skins/" + a + ".png"), i = 0 != un[a].width && un[a].complete ? un[a] : null) : i = null, null != i ? -1 != hn.indexOf(a) && (o = !0) : (this.I && "%starball" == this.C && "shenron" == a && 7 <= zt.length && (pn = o = !0, r = W("%starball1")), i = W(this.C), null != i && (s = !0, l = j(this.C) || l))), st.core.debug && st.debug.showPrediction && this.I && (t.strokeStyle = "#0000FF", t.beginPath(), t.arc(this.M, this.N, this.size + 5, 0, 2 * Math.PI, !1), t.closePath(), t.stroke(), t.strokeStyle = "#00FF00", t.beginPath(), t.arc(this.J, this.K, this.size + 5, 0, 2 * Math.PI, !1), t.closePath(), t.stroke()), se && !_e ? (t.fillStyle = "#FFFFFF", t.strokeStyle = "#AAAAAA") : (t.fillStyle = l, t.strokeStyle = l), n ? (t.beginPath(), t.arc(this.x, this.y, this.size + 5, 0, 2 * Math.PI, !1), t.closePath()) : (this.Ba(), this.qa(t)), s || t.fill(), null != i && (this.la(t, i), null != r && this.la(t, r, {
  1261.                                 alpha: Math.sin(.0174 * fn)
  1262.                             })), (se || 15 < this.size) && !n && (t.strokeStyle = "#000000", t.globalAlpha *= .1, t.stroke()), t.globalAlpha = 1, a = -1 != zt.indexOf(this), n = ~~this.y, 0 != this.id && (le || a) && this.name && this.i && !o && (i = this.i, i.B(this.name), i.P(this.m()), o = 0 >= this.id ? 1 : Math.ceil(10 * ae) / 10, i.ma(o), i = i.O(), r = Math.ceil(i.width / o), l = Math.ceil(i.height / o), t.drawImage(i, ~~this.x - ~~(r / 2), n - ~~(l / 2), r, l), n += i.height / 2 / o + 4), 0 < this.id && de && (a || 0 == zt.length && (!this.c || this.h) && 20 < this.size) && (null == this.S && (this.S = new H(this.m() / 2, "#FFFFFF", !0, "#000000")), a = this.S, a.P(this.m() / 2), a.B(~~(this.size * this.size / 100)), o = Math.ceil(10 * ae) / 10, a.ma(o), i = a.O(), r = Math.ceil(i.width / o), l = Math.ceil(i.height / o), t.drawImage(i, ~~this.x - ~~(r / 2), n - ~~(l / 2), r, l)), t.restore()
  1263.                         }
  1264.                     },
  1265.                     la: function(e, t, n) {
  1266.                         e.save(), e.clip();
  1267.                         var o = Math.max(this.size, this.ia);
  1268.                         null != n && null != n.alpha && (e.globalAlpha = n.alpha), e.drawImage(t, this.x - o - 5, this.y - o - 5, 2 * o + 10, 2 * o + 10), e.restore()
  1269.                     }
  1270.                 };
  1271.                 var mn = function(e) {
  1272.                     function t(e, t, n) {
  1273.                         return t > e ? t : e > n ? n : e
  1274.                     }
  1275.                     return e.ha = function(e, n) {
  1276.                         var o;
  1277.                         return o = t(.5, 0, 1), e + o * (n - e)
  1278.                     }, e.pa = t, e.fixed = function(e, t) {
  1279.                         var n = Math.pow(10, t);
  1280.                         return ~~(e * n) / n
  1281.                     }, e
  1282.                 }({});
  1283.                 e.Maths = mn;
  1284.                 var vn = function(e) {
  1285.                     return e.L = function() {
  1286.                         for (var e = new Date, t = [e.getMonth() + 1, e.getDate(), e.getFullYear()], e = [e.getHours(), e.getMinutes(), e.getSeconds()], n = 1; 3 > n; n++) 10 > e[n] && (e[n] = "0" + e[n]);
  1287.                         return "[" + t.join("/") + " " + e.join(":") + "]"
  1288.                     }, e
  1289.                 }({});
  1290.                 e.Utils = vn, H.prototype = {
  1291.                         F: "",
  1292.                         W: "#000000",
  1293.                         Y: !1,
  1294.                         Z: "#000000",
  1295.                         v: 16,
  1296.                         j: null,
  1297.                         X: null,
  1298.                         l: !1,
  1299.                         D: 1,
  1300.                         P: function(e) {
  1301.                             this.v != e && (this.v = e, this.l = !0)
  1302.                         },
  1303.                         ma: function(e) {
  1304.                             this.D != e && (this.D = e, this.l = !0)
  1305.                         },
  1306.                         B: function(e) {
  1307.                             e != this.F && (this.F = e, this.l = !0)
  1308.                         },
  1309.                         O: function() {
  1310.                             if (null == this.j && (this.j = document.createElement("canvas"), this.X = this.j.getContext("2d")), this.l) {
  1311.                                 this.l = !1;
  1312.                                 var e = this.j,
  1313.                                     t = this.X,
  1314.                                     n = this.F,
  1315.                                     o = this.D,
  1316.                                     a = this.v,
  1317.                                     i = a + "px Ubuntu";
  1318.                                 t.font = i;
  1319.                                 var r = ~~(.2 * a);
  1320.                                 e.width = (t.measureText(n).width + 6) * o, e.height = (a + r) * o, t.font = i, t.scale(o, o), t.globalAlpha = 1, t.lineWidth = 3, t.strokeStyle = this.Z, t.fillStyle = this.W, this.Y && t.strokeText(n, 3, a - r / 2), t.fillText(n, 3, a - r / 2)
  1321.                             }
  1322.                             return this.j
  1323.                         }
  1324.                     }, Date.now || (Date.now = function() {
  1325.                         return (new Date).getTime()
  1326.                     }),
  1327.                     function() {
  1328.                         for (var t = ["ms", "moz", "webkit", "o"], n = 0; n < t.length && !e.requestAnimationFrame; ++n) e.requestAnimationFrame = e[t[n] + "RequestAnimationFrame"], e.cancelAnimationFrame = e[t[n] + "CancelAnimationFrame"] || e[t[n] + "CancelRequestAnimationFrame"];
  1329.                         e.requestAnimationFrame || (e.requestAnimationFrame = function(e) {
  1330.                             return setTimeout(e, 1e3 / 60)
  1331.                         }, e.cancelAnimationFrame = function(e) {
  1332.                             clearTimeout(e)
  1333.                         })
  1334.                     }();
  1335.                 var Sn = {
  1336.                         init: function(e) {
  1337.                             function t(e) {
  1338.                                 return o > e && (e = o), e > i && (e = i), ~~((e - o) / 32)
  1339.                             }
  1340.  
  1341.                             function n(e) {
  1342.                                 return a > e && (e = a), e > r && (e = r), ~~((e - a) / 32)
  1343.                             }
  1344.                             var o = e.za,
  1345.                                 a = e.Aa,
  1346.                                 i = e.xa,
  1347.                                 r = e.ya,
  1348.                                 l = ~~((i - o) / 32) + 1,
  1349.                                 s = ~~((r - a) / 32) + 1,
  1350.                                 c = Array(l * s);
  1351.                             return {
  1352.                                 ta: function(e) {
  1353.                                     var o = t(e.x) + n(e.y) * l;
  1354.                                     null == c[o] ? c[o] = e : Array.isArray(c[o]) ? c[o].push(e) : c[o] = [c[o], e]
  1355.                                 },
  1356.                                 Ea: function(e, o, a, i, r) {
  1357.                                     var s = t(e),
  1358.                                         u = n(o);
  1359.                                     for (e = t(e + a), o = n(o + i); o >= u; ++u)
  1360.                                         for (i = s; e >= i; ++i)
  1361.                                             if (a = c[i + u * l], null != a)
  1362.                                                 if (Array.isArray(a))
  1363.                                                     for (var d = 0; d < a.length; d++) r(a[d]);
  1364.                                                 else r(a)
  1365.                                 }
  1366.                             }
  1367.                         }
  1368.                     },
  1369.                     yn = function() {
  1370.                         var e = new K(0, 0, 0, 32, "#ED1C24", ""),
  1371.                             t = document.createElement("canvas");
  1372.                         t.width = 32, t.height = 32;
  1373.                         var n = t.getContext("2d");
  1374.                         return function() {
  1375.                             0 < zt.length && (e.color = zt[0].color, e.A(zt[0].name)), n.clearRect(0, 0, 32, 32), n.save(), n.translate(16, 16), n.scale(.4, .4), e.w(n), n.restore();
  1376.                             var o = document.getElementById("favicon"),
  1377.                                 a = o.cloneNode(!0);
  1378.                             a.setAttribute("href", t.toDataURL("image/png")), o.parentNode.replaceChild(a, o)
  1379.                         }
  1380.                     }();
  1381.                 t(function() {
  1382.                     yn()
  1383.                 });
  1384.                 var bn = {
  1385.                         context: null,
  1386.                         defaultProvider: "facebook",
  1387.                         loginIntent: "0",
  1388.                         userInfo: {
  1389.                             socialToken: null,
  1390.                             tokenExpires: "",
  1391.                             level: "",
  1392.                             xp: "",
  1393.                             xpNeeded: "",
  1394.                             name: "",
  1395.                             picture: "",
  1396.                             displayName: "",
  1397.                             loggedIn: "0",
  1398.                             socialId: ""
  1399.                         }
  1400.                     },
  1401.                     Un = e.defaultSt = bn;
  1402.                 e.storageInfo = Un, e.createDefaultStorage = q, e.updateStorage = $, t(function() {
  1403.                     null != e.localStorage.storeObjectInfo && (Un = JSON.parse(e.localStorage.storeObjectInfo)), "1" == Un.loginIntent && X(Un.context), "" == Un.userInfo.name && "" == Un.userInfo.displayName || Q(Un.userInfo)
  1404.                 }), e.checkLoginStatus = function() {
  1405.                     "1" == Un.loginIntent && (xn(), X(Un.context))
  1406.                 };
  1407.                 var xn = function() {
  1408.                     e.MC.setProfilePicture(Un.userInfo.picture), e.MC.setSocialId(Un.userInfo.socialId)
  1409.                 };
  1410.                 e.logout = function() {
  1411.                     Un = bn, delete e.localStorage.storeObjectInfo, e.localStorage.storeObjectInfo = JSON.stringify(bn), $(), wn(), st.cache.sentGameServerLogin = !1, delete st.cache.login_info, t("#helloContainer").attr("data-logged-in", "0"), t("#helloContainer").attr("data-has-account-data", "0"), t(".timer").text(""), t("#gPlusShare").hide(), t("#fbShare").show(), t("#user-id-tag").text(""), S(), e.MC.doLogout()
  1412.                 }, e.toggleSocialLogin = function() {
  1413.                     t("#socialLoginContainer").toggle(), t("#settings").hide(), t("#instructions").hide(), Oe()
  1414.                 }, e.toggleSettings = function() {
  1415.                     t("#settings").toggle(), t("#socialLoginContainer").hide(), t("#instructions").hide(), Oe()
  1416.                 }, st.account = function(n) {
  1417.                     function o() {}
  1418.  
  1419.                     function a(n, o) {
  1420.                         console.log(vn.L() + " got user login"), (null == i || i.id != o.id) && (i = o, null != e.ssa_json && (e.ssa_json.applicationUserId = "" + o.id, e.ssa_json.custom_user_id = "" + o.id), "undefined" != typeof SSA_CORE && SSA_CORE.start(), t("#offerwallIframe").attr("src", "http://www.supersonicads.com/delivery/panel.php?applicationKey=" + EnvConfig.supersonic_app_key + "&applicationUserId=" + o.id + "&custom_user_id=" + o.id + "&applicationUserIdSignature=optional"))
  1421.                     }
  1422.                     var i = null;
  1423.                     return n.init = function() {
  1424.                         st.core.bind("user_login", a), st.core.bind("user_logout", o)
  1425.                     }, n.setUserData = function(e) {
  1426.                         Q(e)
  1427.                     }, n.setAccountData = function(e, n) {
  1428.                         var o = t("#helloContainer").attr("data-has-account-data", "1");
  1429.                         Un.userInfo.xp = e.xp, Un.userInfo.xpNeeded = e.xpNeeded, Un.userInfo.level = e.level, $(), o && n ? ze(e) : (t(".agario-profile-panel .progress-bar-star").text(e.level), t(".agario-exp-bar .progress-bar-text").text(e.xp + "/" + e.xpNeeded + " XP"), t(".agario-exp-bar .progress-bar").css("width", (88 * e.xp / e.xpNeeded).toFixed(2) + "%"))
  1430.                     }, n.Ga = function(e) {
  1431.                         ze(e)
  1432.                     }, n
  1433.                 }({});
  1434.                 var kn = 0;
  1435.                 e.fbAsyncInit = function() {
  1436.                     function t() {
  1437.                         null == e.FB ? alert("You seem to have something blocking Facebook on your browser, please check for any extensions") : (Un.loginIntent = "1", e.updateStorage(), e.FB.login(function(e) {
  1438.                             Ge(e)
  1439.                         }, {
  1440.                             scope: "public_profile, email"
  1441.                         }))
  1442.                     }
  1443.                     e.FB.init({
  1444.                         appId: EnvConfig.fb_app_id,
  1445.                         cookie: !0,
  1446.                         xfbml: !0,
  1447.                         status: !0,
  1448.                         version: "v2.2"
  1449.                     }), ("1" == e.storageInfo.loginIntent && "facebook" == e.storageInfo.context || Xe) && e.FB.getLoginStatus(function(n) {
  1450.                         "connected" === n.status ? Ge(n) : "not_authorized" === n.status ? (e.logout(), t()) : e.logout()
  1451.                     }), e.facebookRelogin = t, e.facebookLogin = t
  1452.                 };
  1453.                 var En = !1;
  1454.                 ! function(n) {
  1455.                     function o() {
  1456.                         var e = document.createElement("script");
  1457.                         e.type = "text/javascript", e.async = !0, e.src = "//apis.google.com/js/client:platform.js?onload=gapiAsyncInit";
  1458.                         var t = document.getElementsByTagName("script")[0];
  1459.                         t.parentNode.insertBefore(e, t), i = !0
  1460.                     }
  1461.                     var a = {},
  1462.                         i = !1;
  1463.                     return e.gapiAsyncInit = function() {
  1464.                         t(a).trigger("initialized")
  1465.                     }, n.google = {
  1466.                         va: function() {
  1467.                             o()
  1468.                         },
  1469.                         sa: function(t, n) {
  1470.                             e.gapi.client.load("plus", "v1", function() {
  1471.                                 console.log("fetching me profile"), gapi.client.plus.people.get({
  1472.                                     userId: "me"
  1473.                                 }).execute(function(e) {
  1474.                                     n(e)
  1475.                                 })
  1476.                             })
  1477.                         }
  1478.                     }, n.Da = function(e) {
  1479.                         i || o(), "undefined" != typeof gapi ? e() : t(a).bind("initialized", e)
  1480.                     }, n
  1481.                 }(st);
  1482.                 var In = function(n) {
  1483.                     function o(t) {
  1484.                         e.MC.doLoginWithGPlus(t), st.cache.login_info = [t, "google"]
  1485.                     }
  1486.  
  1487.                     function a(e) {
  1488.                         Un.userInfo.picture = e, t(".agario-profile-picture").attr("src", e)
  1489.                     }
  1490.                     var i = null,
  1491.                         r = {
  1492.                             client_id: EnvConfig.gplus_client_id,
  1493.                             cookie_policy: "single_host_origin",
  1494.                             scope: "profile email"
  1495.                         };
  1496.                     return n.fa = {
  1497.                         oa: function() {
  1498.                             return i
  1499.                         },
  1500.                         init: function() {
  1501.                             var t = this,
  1502.                                 n = Un && "1" == Un.loginIntent && "google" == Un.context;
  1503.                             st.Da(function() {
  1504.                                 e.gapi.ytsubscribe.go("agarYoutube"), e.gapi.load("auth2", function() {
  1505.                                     i = e.gapi.auth2.init(r), i.attachClickHandler(document.getElementById("gplusLogin"), {}, function(e) {
  1506.                                         console.log("googleUser : " + e)
  1507.                                     }, function(e) {
  1508.                                         console.log("failed to login in google plus: ", JSON.stringify(e, void 0, 2))
  1509.                                     }), i.currentUser.listen(_.bind(t.Ca, t)), n && 1 == i.isSignedIn.get() && i.signIn()
  1510.                                 })
  1511.                             })
  1512.                         },
  1513.                         Ca: function(t) {
  1514.                             if (i && t && i.isSignedIn.get() && !En) {
  1515.                                 En = !0, Un.loginIntent = "1";
  1516.                                 var n = t.getAuthResponse(),
  1517.                                     r = n.access_token;
  1518.                                 e.oa = n, console.log("loggedIn with G+!");
  1519.                                 var l = t.getBasicProfile();
  1520.                                 t = l.getImageUrl(), void 0 == t ? st.google.sa(n, function(t) {
  1521.                                     t.result.isPlusUser ? (t && a(t.image.url), o(r), t && (Un.userInfo.picture = t.image.url), Un.userInfo.socialId = l.getId(), xn()) : (alert("Please add Google+ to your Google account and try again.\nOr you can login with another account."), e.logout())
  1522.                                 }) : (a(t), Un.userInfo.picture = t, Un.userInfo.socialId = l.getId(), xn(), o(r)), Un.context = "google", e.updateStorage()
  1523.                             }
  1524.                         },
  1525.                         wa: function() {
  1526.                             i && (i.signOut(), En = !1)
  1527.                         }
  1528.                     }, n
  1529.                 }(st);
  1530.                 e.gplusModule = In;
  1531.                 var wn = function() {
  1532.                     st.fa.wa()
  1533.                 };
  1534.                 e.logoutGooglePlus = wn;
  1535.                 var An = function() {
  1536.                     function e(e, t, n, o, a) {
  1537.                         var i = t.getContext("2d"),
  1538.                             r = t.width;
  1539.                         t = t.height, e.color = a, e.A(n), e.size = o, i.save(), i.translate(r / 2, t / 2), e.w(i), i.restore()
  1540.                     }
  1541.                     for (var n = new K(-1, 0, 0, 32, "#5bc0de", ""), o = new K(-1, 0, 0, 32, "#5bc0de", ""), a = "#0791ff #5a07ff #ff07fe #ffa507 #ff0774 #077fff #3aff07 #ff07ed #07a8ff #ff076e #3fff07 #ff0734 #07ff20 #ff07a2 #ff8207 #07ff0e".split(" "), i = [], r = 0; r < a.length; ++r) {
  1542.                         var l = r / a.length * 12,
  1543.                             s = 30 * Math.sqrt(r / a.length);
  1544.                         i.push(new K(-1, Math.cos(l) * s, Math.sin(l) * s, 10, a[r], ""))
  1545.                     }
  1546.                     Z(i);
  1547.                     var c = document.createElement("canvas");
  1548.                     return c.getContext("2d"), c.width = c.height = 70, e(o, c, "", 26, "#ebc0de"),
  1549.                         function() {
  1550.                             t(".cell-spinner").filter(":visible").each(function() {
  1551.                                 var o = t(this),
  1552.                                     a = Date.now(),
  1553.                                     i = this.width,
  1554.                                     r = this.height,
  1555.                                     l = this.getContext("2d");
  1556.                                 l.clearRect(0, 0, i, r), l.save(), l.translate(i / 2, r / 2);
  1557.                                 for (var s = 0; 10 > s; ++s) l.drawImage(c, (.1 * a + 80 * s) % (i + 140) - i / 2 - 70 - 35, r / 2 * Math.sin((.001 * a + s) % Math.PI * 2) - 35, 70, 70);
  1558.                                 l.restore(), (o = o.attr("data-itr")) && (o = m(o)), e(n, this, o || "", +t(this).attr("data-size"), "#5bc0de")
  1559.                             }), t("#statsPellets").filter(":visible").each(function() {
  1560.                                 t(this);
  1561.                                 var n = this.width,
  1562.                                     o = this.height;
  1563.                                 for (this.getContext("2d").clearRect(0, 0, n, o), n = 0; n < i.length; n++) e(i[n], this, "", i[n].size, i[n].color)
  1564.                             })
  1565.                         }
  1566.                 }();
  1567.                 e.createParty = function() {
  1568.                     d(":party"), Tt = function(n) {
  1569.                         Je("/#" + e.encodeURIComponent(n)), t(".partyToken").val("agar.io/#" + e.encodeURIComponent(n)), t("#helloContainer").attr("data-party-state", "1")
  1570.                     }, S()
  1571.                 }, e.joinParty = Ne, e.cancelParty = function() {
  1572.                     Je("/"), t("#helloContainer").attr("data-party-state", "0"), d(""), S()
  1573.                 };
  1574.                 var Ln = [],
  1575.                     Cn = 0,
  1576.                     Tn = "#000000",
  1577.                     Mn = !1,
  1578.                     Pn = !1,
  1579.                     Fn = 0,
  1580.                     _n = 0,
  1581.                     zn = 0,
  1582.                     Bn = 0,
  1583.                     On = 0,
  1584.                     Gn = !0;
  1585.                 e.onPlayerDeath = Re, setInterval(function() {
  1586.                     Pn && Ln.push(R() / 100)
  1587.                 }, 1e3 / 60), setInterval(function() {
  1588.                     var e = We();
  1589.                     0 != e && (++zn, 0 == On && (On = e), On = Math.min(On, e))
  1590.                 }, 1e3), e.closeStats = function() {
  1591.                     Mn = !1, t("#stats").hide(), e.destroyAd(e.adSlots.ab), u(0)
  1592.                 }, e.setSkipStats = function(e) {
  1593.                     Gn = !e
  1594.                 }, e.getStatsString = Ye, e.gPlusShare = He, e.twitterShareStats = function() {
  1595.                     var t = e.getStatsString("tt_share_stats");
  1596.                     e.open("https://twitter.com/intent/tweet?text=" + t, "Agar.io", "width=660,height=310,menubar=no,toolbar=no,resizable=yes,scrollbars=no,left=" + (e.screenX + e.innerWidth / 2 - 330) + ",top=" + (e.innerHeight - 310) / 2)
  1597.                 }, e.fbShareStats = function() {
  1598.                     var t = e.getStatsString("fb_matchresults_subtitle");
  1599.                     e.FB.ui({
  1600.                         method: "feed",
  1601.                         display: "iframe",
  1602.                         name: m("fb_matchresults_title"),
  1603.                         caption: m("fb_matchresults_description"),
  1604.                         description: t,
  1605.                         link: "http://agar.io",
  1606.                         Ja: "http://static2.miniclipcdn.com/mobile/agar/Agar.io_matchresults_fb_1200x630.png",
  1607.                         Fa: {
  1608.                             name: "play now!",
  1609.                             link: "http://agar.io"
  1610.                         }
  1611.                     })
  1612.                 }, e.fillSocialValues = function(t, n) {
  1613.                     1 == e.isChrome && "google" == e.storageInfo.context && e.gapi.interactivepost.render(n, {
  1614.                         contenturl: EnvConfig.game_url,
  1615.                         clientid: EnvConfig.gplus_client_id,
  1616.                         cookiepolicy: "http://agar.io",
  1617.                         prefilltext: t,
  1618.                         calltoactionlabel: "BEAT",
  1619.                         calltoactionurl: EnvConfig.game_url
  1620.                     })
  1621.                 }, t(function() {
  1622.                     "MAsyncInit" in e && e.MAsyncInit()
  1623.                 })
  1624.             }
  1625.         }
  1626.     }
  1627. }(window, window.jQuery);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement