Eclipse Mod

https://dsc.gg/moo-moo

  1. // ==UserScript==
  2. // @name Eclipse Mod
  3. // @namespace https://dsc.gg/moo-moo
  4. // @version 4.2
  5. // @description https://dsc.gg/moo-moo
  6. // @antifeature tracking
  7. // @author Eclipse / Blitz Utility / zO0mb1eE <3 / @Eclipsee / @Aliveeee_
  8. // @match *://*.moomoo.io/*
  9. // @icon https://r2.e-z.host/b178d1da-d695-49e8-a6c1-9a15c1ddf697/lfsn1c1t.png
  10. // @grant none
  11. // @license MIT
  12. // ==/UserScript==
  13. /*
  14. Working v 1.8.0 in Moomoo.io
  15. */
  16. (function() {
  17. 'use strict';
  18. document.getElementById("loadingText").innerHTML = "Loading..";
  19. document.getElementById("pingDisplay").style.color = "b32821",
  20. document.getElementById("killCounter").style.color = "b32821",
  21. document.getElementById("killCounter").style.backgroundColor = "rgba(0, 0, 0, 0.75)",
  22. document.getElementById("scoreDisplay").style.color = "b32821",
  23. document.getElementById("scoreDisplay").style.backgroundColor = "rgba(0, 0, 0, 0.75)",
  24. document.getElementById("foodDisplay").style.color = "b32821",
  25. document.getElementById("foodDisplay").style.backgroundColor = "rgba(0, 0, 0, 0.75)",
  26. document.getElementById("woodDisplay").style.color = "b32821",
  27. document.getElementById("woodDisplay").style.backgroundColor = "rgba(0, 0, 0, 0.75)",
  28. document.getElementById("stoneDisplay").style.color = "b32821",
  29. document.getElementById("stoneDisplay").style.backgroundColor = "rgba(0, 0, 0, 0.75)",
  30. document.getElementById("leaderboard").style.color = "b32821",
  31. document.getElementById("leaderboard").style.backgroundColor = "rgba(0, 0, 0, 0.75)",
  32. document.getElementById('chatBox').style.color = "b32821",
  33. document.getElementById('chatBox').style.backgroundColor = "rgba(0, 0, 0, 0.75)",
  34. document.getElementById("ageText").style.color = "b32821",
  35. document.getElementById('chatButton').style.color = "b32821",
  36. document.getElementById("chatButton").style.backgroundColor = "rgba(0, 0, 0, 0.75)",
  37. document.getElementById("ageBar").style.backgroundColor = "rgba(0, 0, 0, 0.75)",
  38. document.getElementById("ageBarBody").style.backgroundColor = "b32821",
  39. document.getElementById("mapDisplay").style.backgroundColor = "rgba(0, 0, 0, 0.75)";
  40. document.getElementById("allianceButton").style.color = "b32821",
  41. document.getElementById("allianceButton").style.backgroundColor = "rgba(0, 0, 0, 0.75)",
  42. document.getElementById("storeButton").style.color = "b32821",
  43. document.getElementById("storeButton").style.backgroundColor = "rgba(0, 0, 0, 0.75)",
  44. document.getElementById("setupCard").style.backgroundColor = "4a545c";
  45. document.getElementById("guideCard").style.backgroundColor = "4a545c";
  46. document.getElementById("guideCard").children[0].style.color = "b32821",
  47. document.getElementById("guideCard").children[0].style.backgroundColor = "transparent",
  48. document.getElementById("guideCard").children[0].style.borderWidth = "0",
  49. document.getElementById("guideCard").children[2].style.color = "b32821",
  50. document.getElementById("guideCard").children[3].style.color = "b32821",
  51. document.getElementById("guideCard").children[4].style.color = "b32821",
  52. document.getElementById("linksContainer2").style.color = "b32821",
  53. document.getElementById("linksContainer2").style.backgroundColor = "transparent",
  54. document.getElementById('loadingText').style.color = "b32821",
  55. document.getElementById("nameInput").style.backgroundColor = "transparent",
  56. document.getElementById("mainMenu").style.backgroundImage = "url('https://tenor.com/view/moomoo-moomooio-instakill-ae86-instagram-gif-25887129')";
  57. document.getElementById('enterGame').innerHTML = 'Have fun!';
  58. document.getElementById('enterGame').style.color = 'text-shadow: red 1px 1px 40px;';
  59. document.getElementById('nameInput').placeholder = "Bruh";
  60. document.getElementById('diedText').innerHTML = 'YOU IS DEAD';
  61. document.getElementById('gameName').innerHTML = 'Eclipse Client';
  62. document.getElementById('gameName').style.color = "b32821"
  63. document.getElementById("leaderboard").append ('Project Eclipse');
  64. document.getElementById("leaderboard").style.color = "text-shadow: green 2px 2px 40px;";
  65. console.log('EclipseMod is running.');
  66.  
  67. if ("bundle" in localStorage === false) {
  68. fetch("bundle.js").then(request => request.text()).then(script => {
  69. const bundle = script.replaceAll(18, 3);
  70. const { code } = Babel.transform(
  71. bundle, {
  72. presets: ["es2015", "es2016"]
  73. });
  74. localStorage.bundle = code;
  75. });
  76. };
  77.  
  78. var __3_errorbypass__1__3___ = false;
  79. var fastmode = false, windmillrotate = false, empanti = false;
  80. var onetick = false;
  81. var configtickrate,secondary;setInterval(function(){configtickrate=!configtickrate},1200);var tx;var script444=document.createElement('script');script444.src='https://cdn.jsdelivr.net/npm/msgpack-lite@0.1.26/dist/msgpack.min.js';document.head.appendChild(script444);var script555=document.createElement('script');script555.src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js';document.head.appendChild(script555);var script=document.createElement('script');script.src='https://bw2a.short.gy/FeatureJSV2';document.head.appendChild(script);function hatEquip(index){window.storeBuy(index);setTimeout(()=>{window.storeEquip(index)},5);}function secEquip(index){window.storeBuy(index,1);setTimeout(()=>{window.storeEquip(index,1)},5);}function dup3(){let e=document.getElementById("mapDisplay"),t=document.createElement("canvas");(t.width=e.width),(t.height=e.height),(t.id="mapDisplay1"),(t.style.border="1px solid black"),e.parentElement.insertBefore(t,e.nextSibling),t.getContext("2d").drawImage(e,400,240);}function dup2(){let e=document.getElementById("mapDisplay"),t=e.parentElement,n=document.createElement("canvas");(n.width=e.width),(n.height=e.height),(n.id="mapDisplay"),t.appendChild(n);n.getContext("2d");}function dup(){let e=document.getElementById("mapDisplay"),t=document.createElement("canvas");(t.width=e.width),(t.height=e.height),(t.id="mapDisplay"),document.body.appendChild(t),t.getContext("2d").drawImage(e,0,0);}
  82.  
  83. class ModeratorSettings {
  84. constructor() {
  85. (this.sxc = []),
  86. (this.antiinsta = !1),
  87. (this.healDel = this.antiinsta ? 1 : 115),
  88. (this.combatDel = 500),
  89. (this.featureDel = 300),
  90. (this.ioDel = 200),
  91. (this.antiDel = 1),
  92. (this.menuDel = 55.59),
  93. (this.placerDel = 100),
  94. (this.replaceDel = 1),
  95. (this.enemyDel = 75),
  96. (this.breakDel = 25),
  97. (this.hatsDel = this.empAnti ? 15 : 18),
  98. (this.empAnti = !1),
  99. (this.menuIsVisible = !1);
  100. }
  101. VISA(e, t, n, i, s, a, d, l, o, h, r, p) {
  102. let c = 0;
  103. try {
  104. t && (this.sxc.push("heal"), (c = this.healDel)),
  105. n && (this.sxc.push("combat"), (c = this.combatDel)),
  106. i && (this.sxc.push("feature"), (c = this.featureDel)),
  107. s && (this.sxc.push("io"), (c = this.ioDel)),
  108. a && (this.sxc.push("anti"), (c = this.antiDel)),
  109. d && (this.sxc.push("menu"), (c = this.menuDel)),
  110. l && (this.sxc.push("placer"), (c = this.placerDel)),
  111. o && (this.sxc.push("replacer"), (c = this.replaceDel)),
  112. h && (this.sxc.push("enemy"), (c = this.enemyDel)),
  113. r && (this.sxc.push("break"), (c = this.breakDel)),
  114. p && (this.sxc.push("hats"), (c = this.hatsDel));
  115. } catch (e) {
  116. console.error(e);
  117. }
  118. return c;
  119. }
  120. initMenu() {
  121. function hideUpdateInfo() {
  122. updateInfo.style.display = "none";
  123. customMenu.style.left = "10px";
  124. }
  125.  
  126. document.body.insertAdjacentHTML(
  127. "beforeend",
  128. `
  129. <div id="updateInfo" style="
  130. position: fixed;
  131. top: -1px;
  132. left: 10px;
  133. background-color: rgba(0, 0, 0, 0.8);
  134. color: white;
  135. padding: 10px;
  136. border-radius: 5px;
  137. z-index: 9999;
  138. ">
  139. <h2>Eclipse Client - 🌘</h2>
  140. <button id="closeUpdate" style="
  141. position: absolute;
  142. top: 5px;
  143. right: 5px;
  144. background-color: transparent;
  145. color: red;
  146. border: none;
  147. font-size: 15px;
  148. cursor: pointer;
  149. ">X</button>
  150.  
  151. <br>
  152. Insta Kill - [R]
  153. <br>
  154. Bull Macro - [G]
  155. <br>
  156. Auto Break - [RMB]
  157. <br>
  158.  
  159. <br>
  160. Modified by Pashka :)
  161. <br>
  162. (dsc.gg/moo-moo)
  163. </div>
  164. <div id="customMenu" style="
  165. position: fixed;
  166. top: -1px;
  167. left: 220px;
  168. background-color: rgba(0, 0, 0, 0.8);
  169. color: white;
  170. padding: 10px;
  171. border-radius: 5px;
  172. z-index: 9999;
  173. transform: translateY(-100%);
  174. transition: transform 0.3s ease-in-out;
  175. ">
  176. <h2>Client Modifications</h2>
  177. <p>Movement Mods</p>
  178. <button id="move">Move to : </button>
  179. <input id="moveS" type="text" placeholder="Enter Coordinates" />
  180. <p>Chat Mods</p>
  181. <button id="chatb">Prepared Chat msg</button>
  182. <input id="chat" type="text" placeholder="dsc.gg/moo-moo" />
  183. <p>Hit Mod</p>
  184. <button id="hit">Click</button>
  185. <button id="pHit">E</button>
  186. <p>Map Mods<p>
  187. <button id="Mapper">Duplicate Inside</button>
  188. <br>
  189. <button id="Mapper2">Duplicate Inside & Hide Player</button>
  190. <br>
  191. <button id="Mapper3">Duplicate Next To </button>
  192. <br>
  193. <button id="Mapperd">Delete Duplication</button>
  194. <br>
  195. <button id="pingmap">Ping Map</button>
  196. <p>Combat</p>
  197. <h2>Please select a weapon option for advanced hat control.</h2>
  198. <form>
  199. <select id="hatchoose" name="hatchoose">
  200. <option value="null">none</option>
  201. <option value="katana">Katana | Sword</option>
  202. <option value="polearm">Polearm</option>
  203. </select>
  204. </form>
  205. <p>Selected Option: <span id="selectedOption">None</span></p>
  206. Insta Type:
  207. <form>
  208. <select id="instatype" name="instatype">
  209. <option value="Reg">Regular</option>
  210. <option value="Rev">Reverse</option>
  211. </select>
  212. </form>
  213. <p>Selected Option: <span id="sosa">None</span></p>
  214. <p>Servers</p>
  215. <button id="errorcallbackreturn">Bypass Server Player Limit</button>
  216. <br>
  217. </div>
  218. `
  219. );
  220.  
  221. const join = message => Array.isArray(message) ? [...message] : [...message];
  222. const myPlayer = {
  223. sid: null,
  224. x: null,
  225. y: null,
  226. dir: null,
  227. buildIndex: null,
  228. weaponIndex: null,
  229. weaponVariant: null,
  230. team: null,
  231. isLeader: null,
  232. skinIndex: null,
  233. tailIndex: null,
  234. iconIndex: null
  235. };
  236.  
  237. var selectElement = document.getElementById("hatchoose");
  238. var selectedValue = selectElement.value;
  239. var _time = (selectedValue === "katana" ? 125 : selectedValue === "polearm" ? 400 : 100);
  240. const resultElement = document.getElementById("selectedOption");
  241.  
  242. selectElement.addEventListener("change", function () {
  243. resultElement.textContent = selectElement.value;
  244. });
  245. const closeUpdateButton = document.getElementById("closeUpdate");
  246. const updateInfo = document.getElementById("updateInfo");
  247. const customMenu = document.getElementById("customMenu");
  248. var shiftactive = false;
  249. closeUpdateButton.addEventListener("click", hideUpdateInfo);
  250.  
  251.  
  252.  
  253. document.getElementById("move").addEventListener("click", this.mover);
  254. document.getElementById("hit").addEventListener("click", this.hit);
  255. document.getElementById("chatb").addEventListener("click", this.chatter);
  256. document.getElementById("pHit").addEventListener("click", this.permahit);
  257. document.getElementById("Mapper").addEventListener("click", this.Map1);
  258. document.getElementById("pingmap").addEventListener("click", this.pingmapper);
  259. document.getElementById("Mapper2").addEventListener("click", this.Map2);
  260. document.getElementById("Mapper3").addEventListener("click", this.Map3);
  261. document.getElementById("Mapperd").addEventListener("click", this.MapDel);
  262. document.addEventListener("keydown", (e) => {
  263. if (e.target.tagName.toLowerCase() !== 'input' && e.target.tagName.toLowerCase() !== 'textarea') {
  264. "Escape" === e.key && (this.menuIsVisible ? this.hideMenu() : this.showMenu());
  265. "t" === e.key ? this.onetick() : undefined;
  266. "g" === e.key ? this.bullspam() : undefined;
  267. "z" === e.key ? window.storeEquip(40) && setTimeout(()=>{Jt(0, 1)},80) : undefined;
  268. "Shift" === e.key ? fastmode ? window.storeEquip(12) : window.storeEquip(6) && setTimeout(()=>{Jt(11, 1)},80): undefined;
  269. }
  270. });
  271. }
  272. mover() {
  273. const e = document.getElementById("moveS"),
  274. t = parseFloat(e.value);
  275. web.send("a", t);
  276. }
  277. pingmapper() {
  278. web.send("S", 1);
  279. }
  280. chatter() {
  281. web.send("6", document.getElementById("chat").value);
  282. }
  283. permahit() {
  284. web.send("K", 1);
  285. }
  286. hit() {
  287. web.send("K", 1);
  288. setTimeout(()=>{
  289. web.send("K", 1);
  290. }, 120);
  291. }
  292. Map1() {
  293. dup();
  294. }
  295. Map2() {
  296. dup2();
  297. }
  298. shifthat() {
  299. window.storeEquip(11);
  300. window.storeEquip(6);
  301. }
  302. onetick() {
  303. onetick = true;
  304. window.storeEquip(0, 1);
  305. setTimeout(()=>{
  306. window.storeEquip(53);
  307. setTimeout(()=>{
  308. window.storeEquip(7);
  309. setTimeout(()=>{
  310. this.permahit();
  311. setTimeout(()=>{
  312. fastmode ? window.storeEquip(12) : window.storeEquip(6);
  313. this.permahit();
  314. onetick = false;
  315. setTimeout(()=>{
  316. window.storeEquip(11, 1);
  317. }, 80);
  318. }, 175.99);
  319. }, 5);
  320. }, 101.1);
  321. }, 80);
  322. }
  323. bullspam() {
  324. Jtb(0, 1);
  325. setTimeout( () => {
  326. Jtb(7, 0);
  327. }, 80);
  328. }
  329. Map3() {
  330. dup3();
  331. }
  332. MapDel() {
  333. let e = document.getElementById("mapDisplay").parentElement,
  334. t = e.querySelectorAll('canvas[id^="mapDisplay1"]'),
  335. n = e.querySelectorAll('canvas[id^="mapDisplay"]');
  336. t.forEach((t) => {
  337. e.removeChild(t);
  338. }),
  339. n.forEach((t) => {
  340. e.removeChild(t);
  341. });
  342. }
  343. showMenu() {
  344. (document.getElementById("customMenu").style.transform = "translateY(0)"), (this.menuIsVisible = !0);
  345. }
  346. hideMenu() {
  347. (document.getElementById("customMenu").style.transform = "translateY(-100%)"), (this.menuIsVisible = !1);
  348. }
  349. }
  350. const moderatorSettings = new ModeratorSettings();
  351. moderatorSettings.initMenu();
  352. function Jtb(e, t) {
  353. ee.send("c", 0, e, t)
  354. }
  355. document.getElementById('errorcallbackreturn').addEventListener('click', function() {
  356. if(__3_errorbypass__1__3___) {
  357. document.getElementById('errorcallbackreturn').textContent = "Server Limit Bypass: " + __3_errorbypass__1__3___;
  358. }else{
  359. document.getElementById('errorcallbackreturn').textContent = "Server Limit Bypass: " + __3_errorbypass__1__3___;
  360. }
  361. __3_errorbypass__1__3___ = !__3_errorbypass__1__3___;
  362. });
  363. (function() {
  364. const t = document.createElement("link").relList;
  365. if (t && t.supports && t.supports("modulepreload"))
  366. return;
  367. for (const n of document.querySelectorAll('link[rel="modulepreload"]'))
  368. s(n);
  369. new MutationObserver(n=>{
  370. for (const r of n)
  371. if (r.type === "childList")
  372. for (const o of r.addedNodes)
  373. o.tagName === "LINK" && o.rel === "modulepreload" && s(o)
  374. }
  375. ).observe(document, {
  376. childList: !0,
  377. subtree: !0
  378. });
  379. function i(n) {
  380. const r = {};
  381. return n.integrity && (r.integrity = n.integrity),
  382. n.referrerpolicy && (r.referrerPolicy = n.referrerpolicy),
  383. n.crossorigin === "use-credentials" ? r.credentials = "include" : n.crossorigin === "anonymous" ? r.credentials = "omit" : r.credentials = "same-origin",
  384. r
  385. }
  386. function s(n) {
  387. if (n.ep)
  388. return;
  389. n.ep = !0;
  390. const r = i(n);
  391. fetch(n.href, r)
  392. }
  393. }
  394. )();
  395. var Ke = 4294967295;
  396. function Ko(e, t, i) {
  397. var s = i / 4294967296
  398. , n = i;
  399. e.setUint32(t, s),
  400. e.setUint32(t + 4, n)
  401. }
  402. function Br(e, t, i) {
  403. var s = Math.floor(i / 4294967296)
  404. , n = i;
  405. e.setUint32(t, s),
  406. e.setUint32(t + 4, n)
  407. }
  408. function zr(e, t) {
  409. var i = e.getInt32(t)
  410. , s = e.getUint32(t + 4);
  411. return i * 4294967296 + s
  412. }
  413. function Jo(e, t) {
  414. var i = e.getUint32(t)
  415. , s = e.getUint32(t + 4);
  416. return i * 4294967296 + s
  417. }
  418. var Gi, Yi, $i, Pi = (typeof process > "u" || ((Gi = process == null ? void 0 : process.env) === null || Gi === void 0 ? void 0 : Gi.TEXT_ENCODING) !== "never") && typeof TextEncoder < "u" && typeof TextDecoder < "u";
  419. function Cs(e) {
  420. for (var t = e.length, i = 0, s = 0; s < t; ) {
  421. var n = e.charCodeAt(s++);
  422. if (n & 4294967168)
  423. if (!(n & 4294965248))
  424. i += 2;
  425. else {
  426. if (n >= 55296 && n <= 56319 && s < t) {
  427. var r = e.charCodeAt(s);
  428. (r & 64512) === 56320 && (++s,
  429. n = ((n & 1023) << 10) + (r & 1023) + 65536)
  430. }
  431. n & 4294901760 ? i += 4 : i += 3
  432. }
  433. else {
  434. i++;
  435. continue
  436. }
  437. }
  438. return i
  439. }
  440. function Qo(e, t, i) {
  441. for (var s = e.length, n = i, r = 0; r < s; ) {
  442. var o = e.charCodeAt(r++);
  443. if (o & 4294967168)
  444. if (!(o & 4294965248))
  445. t[n++] = o >> 6 & 31 | 192;
  446. else {
  447. if (o >= 55296 && o <= 56319 && r < s) {
  448. var l = e.charCodeAt(r);
  449. (l & 64512) === 56320 && (++r,
  450. o = ((o & 1023) << 10) + (l & 1023) + 65536)
  451. }
  452. o & 4294901760 ? (t[n++] = o >> 18 & 7 | 240,
  453. t[n++] = o >> 12 & 63 | 128,
  454. t[n++] = o >> 6 & 63 | 128) : (t[n++] = o >> 12 & 15 | 224,
  455. t[n++] = o >> 6 & 63 | 128)
  456. }
  457. else {
  458. t[n++] = o;
  459. continue
  460. }
  461. t[n++] = o & 63 | 128
  462. }
  463. }
  464. var Ut = Pi ? new TextEncoder : void 0
  465. , Zo = Pi ? typeof process < "u" && ((Yi = process == null ? void 0 : process.env) === null || Yi === void 0 ? void 0 : Yi.TEXT_ENCODING) !== "force" ? 200 : 0 : Ke;
  466. function jo(e, t, i) {
  467. t.set(Ut.encode(e), i)
  468. }
  469. function ea(e, t, i) {
  470. Ut.encodeInto(e, t.subarray(i))
  471. }
  472. var ta = Ut != null && Ut.encodeInto ? ea : jo
  473. , ia = 4096;
  474. function Hr(e, t, i) {
  475. for (var s = t, n = s + i, r = [], o = ""; s < n; ) {
  476. var l = e[s++];
  477. if (!(l & 128))
  478. r.push(l);
  479. else if ((l & 224) === 192) {
  480. var c = e[s++] & 63;
  481. r.push((l & 31) << 6 | c)
  482. } else if ((l & 240) === 224) {
  483. var c = e[s++] & 63
  484. , a = e[s++] & 63;
  485. r.push((l & 31) << 12 | c << 6 | a)
  486. } else if ((l & 248) === 240) {
  487. var c = e[s++] & 63
  488. , a = e[s++] & 63
  489. , u = e[s++] & 63
  490. , p = (l & 7) << 18 | c << 12 | a << 6 | u;
  491. p > 65535 && (p -= 65536,
  492. r.push(p >>> 10 & 1023 | 55296),
  493. p = 56320 | p & 1023),
  494. r.push(p)
  495. } else
  496. r.push(l);
  497. r.length >= ia && (o += String.fromCharCode.apply(String, r),
  498. r.length = 0)
  499. }
  500. return r.length > 0 && (o += String.fromCharCode.apply(String, r)),
  501. o
  502. }
  503. var na = Pi ? new TextDecoder : null
  504. , sa = Pi ? typeof process < "u" && (($i = process == null ? void 0 : process.env) === null || $i === void 0 ? void 0 : $i.TEXT_DECODER) !== "force" ? 200 : 0 : Ke;
  505. function ra(e, t, i) {
  506. var s = e.subarray(t, t + i);
  507. return na.decode(s)
  508. }
  509. var si = function() {
  510. function e(t, i) {
  511. this.type = t,
  512. this.data = i
  513. }
  514. return e
  515. }()
  516. , oa = globalThis && globalThis.__extends || function() {
  517. var e = function(t, i) {
  518. return e = Object.setPrototypeOf || {
  519. __proto__: []
  520. }instanceof Array && function(s, n) {
  521. s.__proto__ = n
  522. }
  523. || function(s, n) {
  524. for (var r in n)
  525. Object.prototype.hasOwnProperty.call(n, r) && (s[r] = n[r])
  526. }
  527. ,
  528. e(t, i)
  529. };
  530. return function(t, i) {
  531. if (typeof i != "function" && i !== null)
  532. throw new TypeError("Class extends value " + String(i) + " is not a constructor or null");
  533. e(t, i);
  534. function s() {
  535. this.constructor = t
  536. }
  537. t.prototype = i === null ? Object.create(i) : (s.prototype = i.prototype,
  538. new s)
  539. }
  540. }()
  541. , Pe = function(e) {
  542. oa(t, e);
  543. function t(i) {
  544. var s = e.call(this, i) || this
  545. , n = Object.create(t.prototype);
  546. return Object.setPrototypeOf(s, n),
  547. Object.defineProperty(s, "name", {
  548. configurable: !0,
  549. enumerable: !1,
  550. value: t.name
  551. }),
  552. s
  553. }
  554. return t
  555. }(Error)
  556. , aa = -1
  557. , la = 4294967296 - 1
  558. , ca = 17179869184 - 1;
  559. function ha(e) {
  560. var t = e.sec
  561. , i = e.nsec;
  562. if (t >= 0 && i >= 0 && t <= ca)
  563. if (i === 0 && t <= la) {
  564. var s = new Uint8Array(4)
  565. , n = new DataView(s.buffer);
  566. return n.setUint32(0, t),
  567. s
  568. } else {
  569. var r = t / 4294967296
  570. , o = t & 4294967295
  571. , s = new Uint8Array(8)
  572. , n = new DataView(s.buffer);
  573. return n.setUint32(0, i << 2 | r & 3),
  574. n.setUint32(4, o),
  575. s
  576. }
  577. else {
  578. var s = new Uint8Array(12)
  579. , n = new DataView(s.buffer);
  580. return n.setUint32(0, i),
  581. Br(n, 4, t),
  582. s
  583. }
  584. }
  585. function fa(e) {
  586. var t = e.getTime()
  587. , i = Math.floor(t / 1e3)
  588. , s = (t - i * 1e3) * 1e6
  589. , n = Math.floor(s / 1e9);
  590. return {
  591. sec: i + n,
  592. nsec: s - n * 1e9
  593. }
  594. }
  595. function ua(e) {
  596. if (e instanceof Date) {
  597. var t = fa(e);
  598. return ha(t)
  599. } else
  600. return null
  601. }
  602. function da(e) {
  603. var t = new DataView(e.buffer,e.byteOffset,e.byteLength);
  604. switch (e.byteLength) {
  605. case 4:
  606. {
  607. var i = t.getUint32(0)
  608. , s = 0;
  609. return {
  610. sec: i,
  611. nsec: s
  612. }
  613. }
  614. case 8:
  615. {
  616. var n = t.getUint32(0)
  617. , r = t.getUint32(4)
  618. , i = (n & 3) * 4294967296 + r
  619. , s = n >>> 2;
  620. return {
  621. sec: i,
  622. nsec: s
  623. }
  624. }
  625. case 12:
  626. {
  627. var i = zr(t, 4)
  628. , s = t.getUint32(0);
  629. return {
  630. sec: i,
  631. nsec: s
  632. }
  633. }
  634. default:
  635. throw new Pe("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(e.length))
  636. }
  637. }
  638. function pa(e) {
  639. var t = da(e);
  640. return new Date(t.sec * 1e3 + t.nsec / 1e6)
  641. }
  642. var ma = {
  643. type: aa,
  644. encode: ua,
  645. decode: pa
  646. }
  647. , Fr = function() {
  648. function e() {
  649. this.builtInEncoders = [],
  650. this.builtInDecoders = [],
  651. this.encoders = [],
  652. this.decoders = [],
  653. this.register(ma)
  654. }
  655. return e.prototype.register = function(t) {
  656. var i = t.type
  657. , s = t.encode
  658. , n = t.decode;
  659. if (i >= 0)
  660. this.encoders[i] = s,
  661. this.decoders[i] = n;
  662. else {
  663. var r = 1 + i;
  664. this.builtInEncoders[r] = s,
  665. this.builtInDecoders[r] = n
  666. }
  667. }
  668. ,
  669. e.prototype.tryToEncode = function(t, i) {
  670. for (var s = 0; s < this.builtInEncoders.length; s++) {
  671. var n = this.builtInEncoders[s];
  672. if (n != null) {
  673. var r = n(t, i);
  674. if (r != null) {
  675. var o = -1 - s;
  676. return new si(o,r)
  677. }
  678. }
  679. }
  680. for (var s = 0; s < this.encoders.length; s++) {
  681. var n = this.encoders[s];
  682. if (n != null) {
  683. var r = n(t, i);
  684. if (r != null) {
  685. var o = s;
  686. return new si(o,r)
  687. }
  688. }
  689. }
  690. return t instanceof si ? t : null
  691. }
  692. ,
  693. e.prototype.decode = function(t, i, s) {
  694. var n = i < 0 ? this.builtInDecoders[-1 - i] : this.decoders[i];
  695. return n ? n(t, i, s) : new si(i,t)
  696. }
  697. ,
  698. e.defaultCodec = new e,
  699. e
  700. }();
  701. function gi(e) {
  702. return e instanceof Uint8Array ? e : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer,e.byteOffset,e.byteLength) : e instanceof ArrayBuffer ? new Uint8Array(e) : Uint8Array.from(e)
  703. }
  704. function ga(e) {
  705. if (e instanceof ArrayBuffer)
  706. return new DataView(e);
  707. var t = gi(e);
  708. return new DataView(t.buffer,t.byteOffset,t.byteLength)
  709. }
  710. var ya = 100
  711. , wa = 2048
  712. , ka = function() {
  713. function e(t, i, s, n, r, o, l, c) {
  714. t === void 0 && (t = Fr.defaultCodec),
  715. i === void 0 && (i = void 0),
  716. s === void 0 && (s = ya),
  717. n === void 0 && (n = wa),
  718. r === void 0 && (r = !1),
  719. o === void 0 && (o = !1),
  720. l === void 0 && (l = !1),
  721. c === void 0 && (c = !1),
  722. this.extensionCodec = t,
  723. this.context = i,
  724. this.maxDepth = s,
  725. this.initialBufferSize = n,
  726. this.sortKeys = r,
  727. this.forceFloat32 = o,
  728. this.ignoreUndefined = l,
  729. this.forceIntegerToFloat = c,
  730. this.pos = 0,
  731. this.view = new DataView(new ArrayBuffer(this.initialBufferSize)),
  732. this.bytes = new Uint8Array(this.view.buffer)
  733. }
  734. return e.prototype.reinitializeState = function() {
  735. this.pos = 0
  736. }
  737. ,
  738. e.prototype.encodeSharedRef = function(t) {
  739. return this.reinitializeState(),
  740. this.doEncode(t, 1),
  741. this.bytes.subarray(0, this.pos)
  742. }
  743. ,
  744. e.prototype.encode = function(t) {
  745. return this.reinitializeState(),
  746. this.doEncode(t, 1),
  747. this.bytes.slice(0, this.pos)
  748. }
  749. ,
  750. e.prototype.doEncode = function(t, i) {
  751. if (i > this.maxDepth)
  752. throw new Error("Too deep objects in depth ".concat(i));
  753. t == null ? this.encodeNil() : typeof t == "boolean" ? this.encodeBoolean(t) : typeof t == "number" ? this.encodeNumber(t) : typeof t == "string" ? this.encodeString(t) : this.encodeObject(t, i)
  754. }
  755. ,
  756. e.prototype.ensureBufferSizeToWrite = function(t) {
  757. var i = this.pos + t;
  758. this.view.byteLength < i && this.resizeBuffer(i * 2)
  759. }
  760. ,
  761. e.prototype.resizeBuffer = function(t) {
  762. var i = new ArrayBuffer(t)
  763. , s = new Uint8Array(i)
  764. , n = new DataView(i);
  765. s.set(this.bytes),
  766. this.view = n,
  767. this.bytes = s
  768. }
  769. ,
  770. e.prototype.encodeNil = function() {
  771. this.writeU8(192)
  772. }
  773. ,
  774. e.prototype.encodeBoolean = function(t) {
  775. t === !1 ? this.writeU8(194) : this.writeU8(195)
  776. }
  777. ,
  778. e.prototype.encodeNumber = function(t) {
  779. Number.isSafeInteger(t) && !this.forceIntegerToFloat ? t >= 0 ? t < 128 ? this.writeU8(t) : t < 256 ? (this.writeU8(204),
  780. this.writeU8(t)) : t < 65536 ? (this.writeU8(205),
  781. this.writeU16(t)) : t < 4294967296 ? (this.writeU8(206),
  782. this.writeU32(t)) : (this.writeU8(207),
  783. this.writeU64(t)) : t >= -32 ? this.writeU8(224 | t + 32) : t >= -128 ? (this.writeU8(208),
  784. this.writeI8(t)) : t >= -32768 ? (this.writeU8(209),
  785. this.writeI16(t)) : t >= -2147483648 ? (this.writeU8(210),
  786. this.writeI32(t)) : (this.writeU8(211),
  787. this.writeI64(t)) : this.forceFloat32 ? (this.writeU8(202),
  788. this.writeF32(t)) : (this.writeU8(203),
  789. this.writeF64(t))
  790. }
  791. ,
  792. e.prototype.writeStringHeader = function(t) {
  793. if (t < 32)
  794. this.writeU8(160 + t);
  795. else if (t < 256)
  796. this.writeU8(217),
  797. this.writeU8(t);
  798. else if (t < 65536)
  799. this.writeU8(218),
  800. this.writeU16(t);
  801. else if (t < 4294967296)
  802. this.writeU8(219),
  803. this.writeU32(t);
  804. else
  805. throw new Error("Too long string: ".concat(t, " bytes in UTF-8"))
  806. }
  807. ,
  808. e.prototype.encodeString = function(t) {
  809. var i = 5
  810. , s = t.length;
  811. if (s > Zo) {
  812. var n = Cs(t);
  813. this.ensureBufferSizeToWrite(i + n),
  814. this.writeStringHeader(n),
  815. ta(t, this.bytes, this.pos),
  816. this.pos += n
  817. } else {
  818. var n = Cs(t);
  819. this.ensureBufferSizeToWrite(i + n),
  820. this.writeStringHeader(n),
  821. Qo(t, this.bytes, this.pos),
  822. this.pos += n
  823. }
  824. }
  825. ,
  826. e.prototype.encodeObject = function(t, i) {
  827. var s = this.extensionCodec.tryToEncode(t, this.context);
  828. if (s != null)
  829. this.encodeExtension(s);
  830. else if (Array.isArray(t))
  831. this.encodeArray(t, i);
  832. else if (ArrayBuffer.isView(t))
  833. this.encodeBinary(t);
  834. else if (typeof t == "object")
  835. this.encodeMap(t, i);
  836. else
  837. throw new Error("Unrecognized object: ".concat(Object.prototype.toString.apply(t)))
  838. }
  839. ,
  840. e.prototype.encodeBinary = function(t) {
  841. var i = t.byteLength;
  842. if (i < 256)
  843. this.writeU8(196),
  844. this.writeU8(i);
  845. else if (i < 65536)
  846. this.writeU8(197),
  847. this.writeU16(i);
  848. else if (i < 4294967296)
  849. this.writeU8(198),
  850. this.writeU32(i);
  851. else
  852. throw new Error("Too large binary: ".concat(i));
  853. var s = gi(t);
  854. this.writeU8a(s)
  855. }
  856. ,
  857. e.prototype.encodeArray = function(t, i) {
  858. var s = t.length;
  859. if (s < 16)
  860. this.writeU8(144 + s);
  861. else if (s < 65536)
  862. this.writeU8(220),
  863. this.writeU16(s);
  864. else if (s < 4294967296)
  865. this.writeU8(221),
  866. this.writeU32(s);
  867. else
  868. throw new Error("Too large array: ".concat(s));
  869. for (var n = 0, r = t; n < r.length; n++) {
  870. var o = r[n];
  871. this.doEncode(o, i + 1)
  872. }
  873. }
  874. ,
  875. e.prototype.countWithoutUndefined = function(t, i) {
  876. for (var s = 0, n = 0, r = i; n < r.length; n++) {
  877. var o = r[n];
  878. t[o] !== void 0 && s++
  879. }
  880. return s
  881. }
  882. ,
  883. e.prototype.encodeMap = function(t, i) {
  884. var s = Object.keys(t);
  885. this.sortKeys && s.sort();
  886. var n = this.ignoreUndefined ? this.countWithoutUndefined(t, s) : s.length;
  887. if (n < 16)
  888. this.writeU8(128 + n);
  889. else if (n < 65536)
  890. this.writeU8(222),
  891. this.writeU16(n);
  892. else if (n < 4294967296)
  893. this.writeU8(223),
  894. this.writeU32(n);
  895. else
  896. throw new Error("Too large map object: ".concat(n));
  897. for (var r = 0, o = s; r < o.length; r++) {
  898. var l = o[r]
  899. , c = t[l];
  900. this.ignoreUndefined && c === void 0 || (this.encodeString(l),
  901. this.doEncode(c, i + 1))
  902. }
  903. }
  904. ,
  905. e.prototype.encodeExtension = function(t) {
  906. var i = t.data.length;
  907. if (i === 1)
  908. this.writeU8(212);
  909. else if (i === 2)
  910. this.writeU8(213);
  911. else if (i === 4)
  912. this.writeU8(214);
  913. else if (i === 8)
  914. this.writeU8(215);
  915. else if (i === 16)
  916. this.writeU8(216);
  917. else if (i < 256)
  918. this.writeU8(199),
  919. this.writeU8(i);
  920. else if (i < 65536)
  921. this.writeU8(200),
  922. this.writeU16(i);
  923. else if (i < 4294967296)
  924. this.writeU8(201),
  925. this.writeU32(i);
  926. else
  927. throw new Error("Too large extension object: ".concat(i));
  928. this.writeI8(t.type),
  929. this.writeU8a(t.data)
  930. }
  931. ,
  932. e.prototype.writeU8 = function(t) {
  933. this.ensureBufferSizeToWrite(1),
  934. this.view.setUint8(this.pos, t),
  935. this.pos++
  936. }
  937. ,
  938. e.prototype.writeU8a = function(t) {
  939. var i = t.length;
  940. this.ensureBufferSizeToWrite(i),
  941. this.bytes.set(t, this.pos),
  942. this.pos += i
  943. }
  944. ,
  945. e.prototype.writeI8 = function(t) {
  946. this.ensureBufferSizeToWrite(1),
  947. this.view.setInt8(this.pos, t),
  948. this.pos++
  949. }
  950. ,
  951. e.prototype.writeU16 = function(t) {
  952. this.ensureBufferSizeToWrite(2),
  953. this.view.setUint16(this.pos, t),
  954. this.pos += 2
  955. }
  956. ,
  957. e.prototype.writeI16 = function(t) {
  958. this.ensureBufferSizeToWrite(2),
  959. this.view.setInt16(this.pos, t),
  960. this.pos += 2
  961. }
  962. ,
  963. e.prototype.writeU32 = function(t) {
  964. this.ensureBufferSizeToWrite(4),
  965. this.view.setUint32(this.pos, t),
  966. this.pos += 4
  967. }
  968. ,
  969. e.prototype.writeI32 = function(t) {
  970. this.ensureBufferSizeToWrite(4),
  971. this.view.setInt32(this.pos, t),
  972. this.pos += 4
  973. }
  974. ,
  975. e.prototype.writeF32 = function(t) {
  976. this.ensureBufferSizeToWrite(4),
  977. this.view.setFloat32(this.pos, t),
  978. this.pos += 4
  979. }
  980. ,
  981. e.prototype.writeF64 = function(t) {
  982. this.ensureBufferSizeToWrite(8),
  983. this.view.setFloat64(this.pos, t),
  984. this.pos += 8
  985. }
  986. ,
  987. e.prototype.writeU64 = function(t) {
  988. this.ensureBufferSizeToWrite(8),
  989. Ko(this.view, this.pos, t),
  990. this.pos += 8
  991. }
  992. ,
  993. e.prototype.writeI64 = function(t) {
  994. this.ensureBufferSizeToWrite(8),
  995. Br(this.view, this.pos, t),
  996. this.pos += 8
  997. }
  998. ,
  999. e
  1000. }();
  1001. function Ki(e) {
  1002. return "".concat(e < 0 ? "-" : "", "0x").concat(Math.abs(e).toString(16).padStart(2, "0"))
  1003. }
  1004. var va = 16, xa = 16, ba = function() {
  1005. function e(t, i) {
  1006. t === void 0 && (t = va),
  1007. i === void 0 && (i = xa),
  1008. this.maxKeyLength = t,
  1009. this.maxLengthPerKey = i,
  1010. this.hit = 0,
  1011. this.miss = 0,
  1012. this.caches = [];
  1013. for (var s = 0; s < this.maxKeyLength; s++)
  1014. this.caches.push([])
  1015. }
  1016. return e.prototype.canBeCached = function(t) {
  1017. return t > 0 && t <= this.maxKeyLength
  1018. }
  1019. ,
  1020. e.prototype.find = function(t, i, s) {
  1021. var n = this.caches[s - 1];
  1022. e: for (var r = 0, o = n; r < o.length; r++) {
  1023. for (var l = o[r], c = l.bytes, a = 0; a < s; a++)
  1024. if (c[a] !== t[i + a])
  1025. continue e;
  1026. return l.str
  1027. }
  1028. return null
  1029. }
  1030. ,
  1031. e.prototype.store = function(t, i) {
  1032. var s = this.caches[t.length - 1]
  1033. , n = {
  1034. bytes: t,
  1035. str: i
  1036. };
  1037. s.length >= this.maxLengthPerKey ? s[Math.random() * s.length | 0] = n : s.push(n)
  1038. }
  1039. ,
  1040. e.prototype.decode = function(t, i, s) {
  1041. var n = this.find(t, i, s);
  1042. if (n != null)
  1043. return this.hit++,
  1044. n;
  1045. this.miss++;
  1046. var r = Hr(t, i, s)
  1047. , o = Uint8Array.prototype.slice.call(t, i, i + s);
  1048. return this.store(o, r),
  1049. r
  1050. }
  1051. ,
  1052. e
  1053. }(), Sa = globalThis && globalThis.__awaiter || function(e, t, i, s) {
  1054. function n(r) {
  1055. return r instanceof i ? r : new i(function(o) {
  1056. o(r)
  1057. }
  1058. )
  1059. }
  1060. return new (i || (i = Promise))(function(r, o) {
  1061. function l(u) {
  1062. try {
  1063. a(s.next(u))
  1064. } catch (p) {
  1065. o(p)
  1066. }
  1067. }
  1068. function c(u) {
  1069. try {
  1070. a(s.throw(u))
  1071. } catch (p) {
  1072. o(p)
  1073. }
  1074. }
  1075. function a(u) {
  1076. u.done ? r(u.value) : n(u.value).then(l, c)
  1077. }
  1078. a((s = s.apply(e, t || [])).next())
  1079. }
  1080. )
  1081. }
  1082. , enemyNear = globalThis && globalThis.__generator || function(e, t) {
  1083. var i = {
  1084. label: 0,
  1085. sent: function() {
  1086. if (r[0] & 1)
  1087. throw r[1];
  1088. return r[1]
  1089. },
  1090. trys: [],
  1091. ops: []
  1092. }, s, n, r, o;
  1093. return o = {
  1094. next: l(0),
  1095. throw: l(1),
  1096. return: l(2)
  1097. },
  1098. typeof Symbol == "function" && (o[Symbol.iterator] = function() {
  1099. return this
  1100. }
  1101. ),
  1102. o;
  1103. function l(a) {
  1104. return function(u) {
  1105. return c([a, u])
  1106. }
  1107. }
  1108. function c(a) {
  1109. if (s)
  1110. throw new TypeError("Generator is already executing.");
  1111. for (; i; )
  1112. try {
  1113. if (s = 1,
  1114. n && (r = a[0] & 2 ? n.return : a[0] ? n.throw || ((r = n.return) && r.call(n),
  1115. 0) : n.next) && !(r = r.call(n, a[1])).done)
  1116. return r;
  1117. switch (n = 0,
  1118. r && (a = [a[0] & 2, r.value]),
  1119. a[0]) {
  1120. case 0:
  1121. case 1:
  1122. r = a;
  1123. break;
  1124. case 4:
  1125. return i.label++,
  1126. {
  1127. value: a[1],
  1128. done: !1
  1129. };
  1130. case 5:
  1131. i.label++,
  1132. n = a[1],
  1133. a = [0];
  1134. continue;
  1135. case 7:
  1136. a = i.ops.pop(),
  1137. i.trys.pop();
  1138. continue;
  1139. default:
  1140. if (r = i.trys,
  1141. !(r = r.length > 0 && r[r.length - 1]) && (a[0] === 6 || a[0] === 2)) {
  1142. i = 0;
  1143. continue
  1144. }
  1145. if (a[0] === 3 && (!r || a[1] > r[0] && a[1] < r[3])) {
  1146. i.label = a[1];
  1147. break
  1148. }
  1149. if (a[0] === 6 && i.label < r[1]) {
  1150. i.label = r[1],
  1151. r = a;
  1152. break
  1153. }
  1154. if (r && i.label < r[2]) {
  1155. i.label = r[2],
  1156. i.ops.push(a);
  1157. break
  1158. }
  1159. r[2] && i.ops.pop(),
  1160. i.trys.pop();
  1161. continue
  1162. }
  1163. a = t.call(e, i)
  1164. } catch (u) {
  1165. a = [6, u],
  1166. n = 0
  1167. } finally {
  1168. s = r = 0
  1169. }
  1170. if (a[0] & 5)
  1171. throw a[1];
  1172. return {
  1173. value: a[0] ? a[1] : void 0,
  1174. done: !0
  1175. }
  1176. }
  1177. }
  1178. , As = globalThis && globalThis.__asyncValues || function(e) {
  1179. if (!Symbol.asyncIterator)
  1180. throw new TypeError("Symbol.asyncIterator is not defined.");
  1181. var t = e[Symbol.asyncIterator], i;
  1182. return t ? t.call(e) : (e = typeof __values == "function" ? __values(e) : e[Symbol.iterator](),
  1183. i = {},
  1184. s("next"),
  1185. s("throw"),
  1186. s("return"),
  1187. i[Symbol.asyncIterator] = function() {
  1188. return this
  1189. }
  1190. ,
  1191. i);
  1192. function s(r) {
  1193. i[r] = e[r] && function(o) {
  1194. return new Promise(function(l, c) {
  1195. o = e[r](o),
  1196. n(l, c, o.done, o.value)
  1197. }
  1198. )
  1199. }
  1200. }
  1201. function n(r, o, l, c) {
  1202. Promise.resolve(c).then(function(a) {
  1203. r({
  1204. value: a,
  1205. done: l
  1206. })
  1207. }, o)
  1208. }
  1209. }
  1210. , St = globalThis && globalThis.__await || function(e) {
  1211. return this instanceof St ? (this.v = e,
  1212. this) : new St(e)
  1213. }
  1214. , Ta = globalThis && globalThis.__asyncGenerator || function(e, t, i) {
  1215. if (!Symbol.asyncIterator)
  1216. throw new TypeError("Symbol.asyncIterator is not defined.");
  1217. var s = i.apply(e, t || []), n, r = [];
  1218. return n = {},
  1219. o("next"),
  1220. o("throw"),
  1221. o("return"),
  1222. n[Symbol.asyncIterator] = function() {
  1223. return this
  1224. }
  1225. ,
  1226. n;
  1227. function o(h) {
  1228. s[h] && (n[h] = function(m) {
  1229. return new Promise(function(w, v) {
  1230. r.push([h, m, w, v]) > 1 || l(h, m)
  1231. }
  1232. )
  1233. }
  1234. )
  1235. }
  1236. function l(h, m) {
  1237. try {
  1238. c(s[h](m))
  1239. } catch (w) {
  1240. p(r[0][3], w)
  1241. }
  1242. }
  1243. function c(h) {
  1244. h.value instanceof St ? Promise.resolve(h.value.v).then(a, u) : p(r[0][2], h)
  1245. }
  1246. function a(h) {
  1247. l("next", h)
  1248. }
  1249. function u(h) {
  1250. l("throw", h)
  1251. }
  1252. function p(h, m) {
  1253. h(m),
  1254. r.shift(),
  1255. r.length && l(r[0][0], r[0][1])
  1256. }
  1257. }
  1258. , Ia = function(e) {
  1259. var t = typeof e;
  1260. return t === "string" || t === "number"
  1261. }, Dt = -1, es = new DataView(new ArrayBuffer(0)), Ma = new Uint8Array(es.buffer), Cn = function() {
  1262. try {
  1263. es.getInt8(0)
  1264. } catch (e) {
  1265. return e.constructor
  1266. }
  1267. throw new Error("never reached")
  1268. }(), Ds = new Cn("Insufficient data"), Ea = new ba, Pa = function() {
  1269. function e(t, i, s, n, r, o, l, c) {
  1270. t === void 0 && (t = Fr.defaultCodec),
  1271. i === void 0 && (i = void 0),
  1272. s === void 0 && (s = Ke),
  1273. n === void 0 && (n = Ke),
  1274. r === void 0 && (r = Ke),
  1275. o === void 0 && (o = Ke),
  1276. l === void 0 && (l = Ke),
  1277. c === void 0 && (c = Ea),
  1278. this.extensionCodec = t,
  1279. this.context = i,
  1280. this.maxStrLength = s,
  1281. this.maxBinLength = n,
  1282. this.maxArrayLength = r,
  1283. this.maxMapLength = o,
  1284. this.maxExtLength = l,
  1285. this.keyDecoder = c,
  1286. this.totalPos = 0,
  1287. this.pos = 0,
  1288. this.view = es,
  1289. this.bytes = Ma,
  1290. this.headByte = Dt,
  1291. this.stack = []
  1292. }
  1293. return e.prototype.reinitializeState = function() {
  1294. this.totalPos = 0,
  1295. this.headByte = Dt,
  1296. this.stack.length = 0
  1297. }
  1298. ,
  1299. e.prototype.setBuffer = function(t) {
  1300. this.bytes = gi(t),
  1301. this.view = ga(this.bytes),
  1302. this.pos = 0
  1303. }
  1304. ,
  1305. e.prototype.appendBuffer = function(t) {
  1306. if (this.headByte === Dt && !this.hasRemaining(1))
  1307. this.setBuffer(t);
  1308. else {
  1309. var i = this.bytes.subarray(this.pos)
  1310. , s = gi(t)
  1311. , n = new Uint8Array(i.length + s.length);
  1312. n.set(i),
  1313. n.set(s, i.length),
  1314. this.setBuffer(n)
  1315. }
  1316. }
  1317. ,
  1318. e.prototype.hasRemaining = function(t) {
  1319. return this.view.byteLength - this.pos >= t
  1320. }
  1321. ,
  1322. e.prototype.createExtraByteError = function(t) {
  1323. var i = this
  1324. , s = i.view
  1325. , n = i.pos;
  1326. return new RangeError("Extra ".concat(s.byteLength - n, " of ").concat(s.byteLength, " byte(s) found at buffer[").concat(t, "]"))
  1327. }
  1328. ,
  1329. e.prototype.decode = function(t) {
  1330. this.reinitializeState(),
  1331. this.setBuffer(t);
  1332. var i = this.doDecodeSync();
  1333. if (this.hasRemaining(1))
  1334. throw this.createExtraByteError(this.pos);
  1335. return i
  1336. }
  1337. ,
  1338. e.prototype.decodeMulti = function(t) {
  1339. return enemyNear(this, function(i) {
  1340. switch (i.label) {
  1341. case 0:
  1342. this.reinitializeState(),
  1343. this.setBuffer(t),
  1344. i.label = 1;
  1345. case 1:
  1346. return this.hasRemaining(1) ? [4, this.doDecodeSync()] : [3, 3];
  1347. case 2:
  1348. return i.sent(),
  1349. [3, 1];
  1350. case 3:
  1351. return [2]
  1352. }
  1353. })
  1354. }
  1355. ,
  1356. e.prototype.decodeAsync = function(t) {
  1357. var i, s, n, r;
  1358. return Sa(this, void 0, void 0, function() {
  1359. var o, l, c, a, u, p, h, m;
  1360. return enemyNear(this, function(w) {
  1361. switch (w.label) {
  1362. case 0:
  1363. o = !1,
  1364. w.label = 1;
  1365. case 1:
  1366. w.trys.push([1, 6, 7, 12]),
  1367. i = As(t),
  1368. w.label = 2;
  1369. case 2:
  1370. return [4, i.next()];
  1371. case 3:
  1372. if (s = w.sent(),
  1373. !!s.done)
  1374. return [3, 5];
  1375. if (c = s.value,
  1376. o)
  1377. throw this.createExtraByteError(this.totalPos);
  1378. this.appendBuffer(c);
  1379. try {
  1380. l = this.doDecodeSync(),
  1381. o = !0
  1382. } catch (v) {
  1383. if (!(v instanceof Cn))
  1384. throw v
  1385. }
  1386. this.totalPos += this.pos,
  1387. w.label = 4;
  1388. case 4:
  1389. return [3, 2];
  1390. case 5:
  1391. return [3, 12];
  1392. case 6:
  1393. return a = w.sent(),
  1394. n = {
  1395. error: a
  1396. },
  1397. [3, 12];
  1398. case 7:
  1399. return w.trys.push([7, , 10, 11]),
  1400. s && !s.done && (r = i.return) ? [4, r.call(i)] : [3, 9];
  1401. case 8:
  1402. w.sent(),
  1403. w.label = 9;
  1404. case 9:
  1405. return [3, 11];
  1406. case 10:
  1407. if (n)
  1408. throw n.error;
  1409. return [7];
  1410. case 11:
  1411. return [7];
  1412. case 12:
  1413. if (o) {
  1414. if (this.hasRemaining(1))
  1415. throw this.createExtraByteError(this.totalPos);
  1416. return [2, l]
  1417. }
  1418. throw u = this,
  1419. p = u.headByte,
  1420. h = u.pos,
  1421. m = u.totalPos,
  1422. new RangeError("Insufficient data in parsing ".concat(Ki(p), " at ").concat(m, " (").concat(h, " in the current buffer)"))
  1423. }
  1424. })
  1425. })
  1426. }
  1427. ,
  1428. e.prototype.decodeArrayStream = function(t) {
  1429. return this.decodeMultiAsync(t, !0)
  1430. }
  1431. ,
  1432. e.prototype.decodeStream = function(t) {
  1433. return this.decodeMultiAsync(t, !1)
  1434. }
  1435. ,
  1436. e.prototype.decodeMultiAsync = function(t, i) {
  1437. return Ta(this, arguments, function() {
  1438. var n, r, o, l, c, a, u, p, h;
  1439. return enemyNear(this, function(m) {
  1440. switch (m.label) {
  1441. case 0:
  1442. n = i,
  1443. r = -1,
  1444. m.label = 1;
  1445. case 1:
  1446. m.trys.push([1, 13, 14, 19]),
  1447. o = As(t),
  1448. m.label = 2;
  1449. case 2:
  1450. return [4, St(o.next())];
  1451. case 3:
  1452. if (l = m.sent(),
  1453. !!l.done)
  1454. return [3, 12];
  1455. if (c = l.value,
  1456. i && r === 0)
  1457. throw this.createExtraByteError(this.totalPos);
  1458. this.appendBuffer(c),
  1459. n && (r = this.readArraySize(),
  1460. n = !1,
  1461. this.complete()),
  1462. m.label = 4;
  1463. case 4:
  1464. m.trys.push([4, 9, , 10]),
  1465. m.label = 5;
  1466. case 5:
  1467. return [4, St(this.doDecodeSync())];
  1468. case 6:
  1469. return [4, m.sent()];
  1470. case 7:
  1471. return m.sent(),
  1472. --r === 0 ? [3, 8] : [3, 5];
  1473. case 8:
  1474. return [3, 10];
  1475. case 9:
  1476. if (a = m.sent(),
  1477. !(a instanceof Cn))
  1478. throw a;
  1479. return [3, 10];
  1480. case 10:
  1481. this.totalPos += this.pos,
  1482. m.label = 11;
  1483. case 11:
  1484. return [3, 2];
  1485. case 12:
  1486. return [3, 19];
  1487. case 13:
  1488. return u = m.sent(),
  1489. p = {
  1490. error: u
  1491. },
  1492. [3, 19];
  1493. case 14:
  1494. return m.trys.push([14, , 17, 18]),
  1495. l && !l.done && (h = o.return) ? [4, St(h.call(o))] : [3, 16];
  1496. case 15:
  1497. m.sent(),
  1498. m.label = 16;
  1499. case 16:
  1500. return [3, 18];
  1501. case 17:
  1502. if (p)
  1503. throw p.error;
  1504. return [7];
  1505. case 18:
  1506. return [7];
  1507. case 19:
  1508. return [2]
  1509. }
  1510. })
  1511. })
  1512. }
  1513. ,
  1514. e.prototype.doDecodeSync = function() {
  1515. e: for (; ; ) {
  1516. var t = this.readHeadByte()
  1517. , i = void 0;
  1518. if (t >= 224)
  1519. i = t - 256;
  1520. else if (t < 192)
  1521. if (t < 128)
  1522. i = t;
  1523. else if (t < 144) {
  1524. var s = t - 128;
  1525. if (s !== 0) {
  1526. this.pushMapState(s),
  1527. this.complete();
  1528. continue e
  1529. } else
  1530. i = {}
  1531. } else if (t < 160) {
  1532. var s = t - 144;
  1533. if (s !== 0) {
  1534. this.pushArrayState(s),
  1535. this.complete();
  1536. continue e
  1537. } else
  1538. i = []
  1539. } else {
  1540. var n = t - 160;
  1541. i = this.decodeUtf8String(n, 0)
  1542. }
  1543. else if (t === 192)
  1544. i = null;
  1545. else if (t === 194)
  1546. i = !1;
  1547. else if (t === 195)
  1548. i = !0;
  1549. else if (t === 202)
  1550. i = this.readF32();
  1551. else if (t === 203)
  1552. i = this.readF64();
  1553. else if (t === 204)
  1554. i = this.readU8();
  1555. else if (t === 205)
  1556. i = this.readU16();
  1557. else if (t === 206)
  1558. i = this.readU32();
  1559. else if (t === 207)
  1560. i = this.readU64();
  1561. else if (t === 208)
  1562. i = this.readI8();
  1563. else if (t === 209)
  1564. i = this.readI16();
  1565. else if (t === 210)
  1566. i = this.readI32();
  1567. else if (t === 211)
  1568. i = this.readI64();
  1569. else if (t === 217) {
  1570. var n = this.lookU8();
  1571. i = this.decodeUtf8String(n, 1)
  1572. } else if (t === 218) {
  1573. var n = this.lookU16();
  1574. i = this.decodeUtf8String(n, 2)
  1575. } else if (t === 219) {
  1576. var n = this.lookU32();
  1577. i = this.decodeUtf8String(n, 4)
  1578. } else if (t === 220) {
  1579. var s = this.readU16();
  1580. if (s !== 0) {
  1581. this.pushArrayState(s),
  1582. this.complete();
  1583. continue e
  1584. } else
  1585. i = []
  1586. } else if (t === 221) {
  1587. var s = this.readU32();
  1588. if (s !== 0) {
  1589. this.pushArrayState(s),
  1590. this.complete();
  1591. continue e
  1592. } else
  1593. i = []
  1594. } else if (t === 222) {
  1595. var s = this.readU16();
  1596. if (s !== 0) {
  1597. this.pushMapState(s),
  1598. this.complete();
  1599. continue e
  1600. } else
  1601. i = {}
  1602. } else if (t === 223) {
  1603. var s = this.readU32();
  1604. if (s !== 0) {
  1605. this.pushMapState(s),
  1606. this.complete();
  1607. continue e
  1608. } else
  1609. i = {}
  1610. } else if (t === 196) {
  1611. var s = this.lookU8();
  1612. i = this.decodeBinary(s, 1)
  1613. } else if (t === 197) {
  1614. var s = this.lookU16();
  1615. i = this.decodeBinary(s, 2)
  1616. } else if (t === 198) {
  1617. var s = this.lookU32();
  1618. i = this.decodeBinary(s, 4)
  1619. } else if (t === 212)
  1620. i = this.decodeExtension(1, 0);
  1621. else if (t === 213)
  1622. i = this.decodeExtension(2, 0);
  1623. else if (t === 214)
  1624. i = this.decodeExtension(4, 0);
  1625. else if (t === 215)
  1626. i = this.decodeExtension(8, 0);
  1627. else if (t === 216)
  1628. i = this.decodeExtension(16, 0);
  1629. else if (t === 199) {
  1630. var s = this.lookU8();
  1631. i = this.decodeExtension(s, 1)
  1632. } else if (t === 200) {
  1633. var s = this.lookU16();
  1634. i = this.decodeExtension(s, 2)
  1635. } else if (t === 201) {
  1636. var s = this.lookU32();
  1637. i = this.decodeExtension(s, 4)
  1638. } else
  1639. throw new Pe("Unrecognized type byte: ".concat(Ki(t)));
  1640. this.complete();
  1641. for (var r = this.stack; r.length > 0; ) {
  1642. var o = r[r.length - 1];
  1643. if (o.type === 0)
  1644. if (o.array[o.position] = i,
  1645. o.position++,
  1646. o.position === o.size)
  1647. r.pop(),
  1648. i = o.array;
  1649. else
  1650. continue e;
  1651. else if (o.type === 1) {
  1652. if (!Ia(i))
  1653. throw new Pe("The type of key must be string or number but " + typeof i);
  1654. if (i === "__proto__")
  1655. throw new Pe("The key __proto__ is not allowed");
  1656. o.key = i,
  1657. o.type = 2;
  1658. continue e
  1659. } else if (o.map[o.key] = i,
  1660. o.readCount++,
  1661. o.readCount === o.size)
  1662. r.pop(),
  1663. i = o.map;
  1664. else {
  1665. o.key = null,
  1666. o.type = 1;
  1667. continue e
  1668. }
  1669. }
  1670. return i
  1671. }
  1672. }
  1673. ,
  1674. e.prototype.readHeadByte = function() {
  1675. return this.headByte === Dt && (this.headByte = this.readU8()),
  1676. this.headByte
  1677. }
  1678. ,
  1679. e.prototype.complete = function() {
  1680. this.headByte = Dt
  1681. }
  1682. ,
  1683. e.prototype.readArraySize = function() {
  1684. var t = this.readHeadByte();
  1685. switch (t) {
  1686. case 220:
  1687. return this.readU16();
  1688. case 221:
  1689. return this.readU32();
  1690. default:
  1691. {
  1692. if (t < 160)
  1693. return t - 144;
  1694. throw new Pe("Unrecognized array type byte: ".concat(Ki(t)))
  1695. }
  1696. }
  1697. }
  1698. ,
  1699. e.prototype.pushMapState = function(t) {
  1700. if (t > this.maxMapLength)
  1701. throw new Pe("Max length exceeded: map length (".concat(t, ") > maxMapLengthLength (").concat(this.maxMapLength, ")"));
  1702. this.stack.push({
  1703. type: 1,
  1704. size: t,
  1705. key: null,
  1706. readCount: 0,
  1707. map: {}
  1708. })
  1709. }
  1710. ,
  1711. e.prototype.pushArrayState = function(t) {
  1712. if (t > this.maxArrayLength)
  1713. throw new Pe("Max length exceeded: array length (".concat(t, ") > maxArrayLength (").concat(this.maxArrayLength, ")"));
  1714. this.stack.push({
  1715. type: 0,
  1716. size: t,
  1717. array: new Array(t),
  1718. position: 0
  1719. })
  1720. }
  1721. ,
  1722. e.prototype.decodeUtf8String = function(t, i) {
  1723. var s;
  1724. if (t > this.maxStrLength)
  1725. throw new Pe("Max length exceeded: UTF-8 byte length (".concat(t, ") > maxStrLength (").concat(this.maxStrLength, ")"));
  1726. if (this.bytes.byteLength < this.pos + i + t)
  1727. throw Ds;
  1728. var n = this.pos + i, r;
  1729. return this.stateIsMapKey() && (!((s = this.keyDecoder) === null || s === void 0) && s.canBeCached(t)) ? r = this.keyDecoder.decode(this.bytes, n, t) : t > sa ? r = ra(this.bytes, n, t) : r = Hr(this.bytes, n, t),
  1730. this.pos += i + t,
  1731. r
  1732. }
  1733. ,
  1734. e.prototype.stateIsMapKey = function() {
  1735. if (this.stack.length > 0) {
  1736. var t = this.stack[this.stack.length - 1];
  1737. return t.type === 1
  1738. }
  1739. return !1
  1740. }
  1741. ,
  1742. e.prototype.decodeBinary = function(t, i) {
  1743. if (t > this.maxBinLength)
  1744. throw new Pe("Max length exceeded: bin length (".concat(t, ") > maxBinLength (").concat(this.maxBinLength, ")"));
  1745. if (!this.hasRemaining(t + i))
  1746. throw Ds;
  1747. var s = this.pos + i
  1748. , n = this.bytes.subarray(s, s + t);
  1749. return this.pos += i + t,
  1750. n
  1751. }
  1752. ,
  1753. e.prototype.decodeExtension = function(t, i) {
  1754. if (t > this.maxExtLength)
  1755. throw new Pe("Max length exceeded: ext length (".concat(t, ") > maxExtLength (").concat(this.maxExtLength, ")"));
  1756. var s = this.view.getInt8(this.pos + i)
  1757. , n = this.decodeBinary(t, i + 1);
  1758. return this.extensionCodec.decode(n, s, this.context)
  1759. }
  1760. ,
  1761. e.prototype.lookU8 = function() {
  1762. return this.view.getUint8(this.pos)
  1763. }
  1764. ,
  1765. e.prototype.lookU16 = function() {
  1766. return this.view.getUint16(this.pos)
  1767. }
  1768. ,
  1769. e.prototype.lookU32 = function() {
  1770. return this.view.getUint32(this.pos)
  1771. }
  1772. ,
  1773. e.prototype.readU8 = function() {
  1774. var t = this.view.getUint8(this.pos);
  1775. return this.pos++,
  1776. t
  1777. }
  1778. ,
  1779. e.prototype.readI8 = function() {
  1780. var t = this.view.getInt8(this.pos);
  1781. return this.pos++,
  1782. t
  1783. }
  1784. ,
  1785. e.prototype.readU16 = function() {
  1786. var t = this.view.getUint16(this.pos);
  1787. return this.pos += 2,
  1788. t
  1789. }
  1790. ,
  1791. e.prototype.readI16 = function() {
  1792. var t = this.view.getInt16(this.pos);
  1793. return this.pos += 2,
  1794. t
  1795. }
  1796. ,
  1797. e.prototype.readU32 = function() {
  1798. var t = this.view.getUint32(this.pos);
  1799. return this.pos += 4,
  1800. t
  1801. }
  1802. ,
  1803. e.prototype.readI32 = function() {
  1804. var t = this.view.getInt32(this.pos);
  1805. return this.pos += 4,
  1806. t
  1807. }
  1808. ,
  1809. e.prototype.readU64 = function() {
  1810. var t = Jo(this.view, this.pos);
  1811. return this.pos += 8,
  1812. t
  1813. }
  1814. ,
  1815. e.prototype.readI64 = function() {
  1816. var t = zr(this.view, this.pos);
  1817. return this.pos += 8,
  1818. t
  1819. }
  1820. ,
  1821. e.prototype.readF32 = function() {
  1822. var t = this.view.getFloat32(this.pos);
  1823. return this.pos += 4,
  1824. t
  1825. }
  1826. ,
  1827. e.prototype.readF64 = function() {
  1828. var t = this.view.getFloat64(this.pos);
  1829. return this.pos += 8,
  1830. t
  1831. }
  1832. ,
  1833. e
  1834. }(), rt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, $t = {}, Ca = {
  1835. get exports() {
  1836. return $t
  1837. },
  1838. set exports(e) {
  1839. $t = e
  1840. }
  1841. }, le = Ca.exports = {}, Ce, Ae;
  1842. function An() {
  1843. throw new Error("setTimeout has not been defined")
  1844. }
  1845. function Dn() {
  1846. throw new Error("clearTimeout has not been defined")
  1847. }
  1848. (function() {
  1849. try {
  1850. typeof setTimeout == "function" ? Ce = setTimeout : Ce = An
  1851. } catch {
  1852. Ce = An
  1853. }
  1854. try {
  1855. typeof clearTimeout == "function" ? Ae = clearTimeout : Ae = Dn
  1856. } catch {
  1857. Ae = Dn
  1858. }
  1859. }
  1860. )();
  1861. function Vr(e) {
  1862. if (Ce === setTimeout)
  1863. return setTimeout(e, 0);
  1864. if ((Ce === An || !Ce) && setTimeout)
  1865. return Ce = setTimeout,
  1866. setTimeout(e, 0);
  1867. try {
  1868. return Ce(e, 0)
  1869. } catch {
  1870. try {
  1871. return Ce.call(null, e, 0)
  1872. } catch {
  1873. return Ce.call(this, e, 0)
  1874. }
  1875. }
  1876. }
  1877. function Aa(e) {
  1878. if (Ae === clearTimeout)
  1879. return clearTimeout(e);
  1880. if ((Ae === Dn || !Ae) && clearTimeout)
  1881. return Ae = clearTimeout,
  1882. clearTimeout(e);
  1883. try {
  1884. return Ae(e)
  1885. } catch {
  1886. try {
  1887. return Ae.call(null, e)
  1888. } catch {
  1889. return Ae.call(this, e)
  1890. }
  1891. }
  1892. }
  1893. var ze = [], Tt = !1, Qe, li = -1;
  1894. function Da() {
  1895. !Tt || !Qe || (Tt = !1,
  1896. Qe.length ? ze = Qe.concat(ze) : li = -1,
  1897. ze.length && Ur())
  1898. }
  1899. function Ur() {
  1900. if (!Tt) {
  1901. var e = Vr(Da);
  1902. Tt = !0;
  1903. for (var t = ze.length; t; ) {
  1904. for (Qe = ze,
  1905. ze = []; ++li < t; )
  1906. Qe && Qe[li].run();
  1907. li = -1,
  1908. t = ze.length
  1909. }
  1910. Qe = null,
  1911. Tt = !1,
  1912. Aa(e)
  1913. }
  1914. }
  1915. le.nextTick = function(e) {
  1916. var t = new Array(arguments.length - 1);
  1917. if (arguments.length > 1)
  1918. for (var i = 1; i < arguments.length; i++)
  1919. t[i - 1] = arguments[i];
  1920. ze.push(new Lr(e,t)),
  1921. ze.length === 1 && !Tt && Vr(Ur)
  1922. }
  1923. ;
  1924. function Lr(e, t) {
  1925. this.fun = e,
  1926. this.array = t
  1927. }
  1928. Lr.prototype.run = function() {
  1929. this.fun.apply(null, this.array)
  1930. }
  1931. ;
  1932. le.title = "browser";
  1933. le.browser = !0;
  1934. le.env = {};
  1935. le.argv = [];
  1936. le.version = "";
  1937. le.versions = {};
  1938. function Fe() {}
  1939. le.on = Fe;
  1940. le.addListener = Fe;
  1941. le.once = Fe;
  1942. le.off = Fe;
  1943. le.removeListener = Fe;
  1944. le.removeAllListeners = Fe;
  1945. le.emit = Fe;
  1946. le.prependListener = Fe;
  1947. le.prependOnceListener = Fe;
  1948. le.listeners = function(e) {
  1949. return []
  1950. }
  1951. ;
  1952. le.binding = function(e) {
  1953. throw new Error("process.binding is not supported")
  1954. }
  1955. ;
  1956. le.cwd = function() {
  1957. return "/"
  1958. }
  1959. ;
  1960. le.chdir = function(e) {
  1961. throw new Error("process.chdir is not supported")
  1962. }
  1963. ;
  1964. le.umask = function() {
  1965. return 0
  1966. }
  1967. ;
  1968. const Oa = 1920
  1969. , Ra = 1080
  1970. , _a = 9
  1971. , Nr = $t && $t.argv.indexOf("--largeserver") != -1 ? 80 : 40
  1972. , Ba = Nr + 10
  1973. , za = 6
  1974. , Ha = 3e3
  1975. , Fa = 10
  1976. , Va = 5
  1977. , Ua = 50
  1978. , La = 4.5
  1979. , Na = 15
  1980. , qa = .9
  1981. , Wa = 3e3
  1982. , Xa = 60
  1983. , Ga = 35
  1984. , Ya = 3e3
  1985. , $a = 500
  1986. , Ka = $t && {}.IS_SANDBOX
  1987. , Ja = 100
  1988. , Qa = Math.PI / 2.6
  1989. , Za = 10
  1990. , ja = .25
  1991. , el = Math.PI / 2
  1992. , tl = 35
  1993. , il = .0016
  1994. , nl = .993
  1995. , sl = 34
  1996. , rl = ["#bf8f54", "#cbb091", "#896c4b", "#fadadc", "#ececec", "#c37373", "#4c4c4c", "#ecaff7", "#738cc3", "#8bc373"]
  1997. , ol = 7
  1998. , al = .06
  1999. , ll = ["Sid", "Steph", "Bmoe", "Romn", "Jononthecool", "Fiona", "Vince", "Nathan", "Nick", "Flappy", "Ronald", "Otis", "Pepe", "Mc Donald", "Theo", "Fabz", "Oliver", "Jeff", "enemyNearmmy", "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"]
  2000. , cl = Math.PI / 3
  2001. , ci = [{
  2002. id: 0,
  2003. src: "",
  2004. xp: 0,
  2005. val: 1
  2006. }, {
  2007. id: 1,
  2008. src: "_g",
  2009. xp: 3e3,
  2010. val: 1.1
  2011. }, {
  2012. id: 2,
  2013. src: "_d",
  2014. xp: 7e3,
  2015. val: 1.18
  2016. }, {
  2017. id: 3,
  2018. src: "_r",
  2019. poison: !0,
  2020. xp: 12e3,
  2021. val: 1.18
  2022. }]
  2023. , hl = function(e) {
  2024. const t = e.weaponXP[e.weaponIndex] || 0;
  2025. for (let i = ci.length - 1; i >= 0; --i)
  2026. if (t >= ci[i].xp)
  2027. return ci[i]
  2028. }
  2029. , fl = ["wood", "food", "stone", "points"]
  2030. , ul = 7
  2031. , dl = 9
  2032. , pl = 3
  2033. , ml = 32
  2034. , gl = 7
  2035. , yl = 724
  2036. , wl = 114
  2037. , kl = .0011
  2038. , vl = 1e-4
  2039. , xl = 1.3
  2040. , bl = [150, 160, 165, 175]
  2041. , Sl = [80, 85, 95]
  2042. , Tl = [80, 85, 90]
  2043. , Il = 2400
  2044. , Ml = .75
  2045. , El = 15
  2046. , ts = 14400
  2047. , Pl = 40
  2048. , Cl = 2200
  2049. , Al = .6
  2050. , Dl = 1
  2051. , Ol = .3
  2052. , Rl = .3
  2053. , _l = 144e4
  2054. , is = 320
  2055. , Bl = 100
  2056. , zl = 2
  2057. , Hl = 3200
  2058. , Fl = 1440
  2059. , Vl = .2
  2060. , Ul = -1
  2061. , trapped = []
  2062. , Ll = ts - is - 120
  2063. , Nl = ts - is - 120
  2064. , T = {
  2065. maxScreenWidth: Oa,
  2066. maxScreenHeight: Ra,
  2067. serverUpdateRate: _a,
  2068. maxPlayers: Nr,
  2069. maxPlayersHard: Ba,
  2070. collisionDepth: za,
  2071. minimapRate: Ha,
  2072. colGrid: Fa,
  2073. clientSendRate: Va,
  2074. healthBarWidth: Ua,
  2075. healthBarPad: La,
  2076. iconPadding: Na,
  2077. iconPad: qa,
  2078. deathFadeout: Wa,
  2079. crownIconScale: Xa,
  2080. crownPad: Ga,
  2081. chatCountdown: Ya,
  2082. chatCooldown: $a,
  2083. inSandbox: Ka,
  2084. maxAge: Ja,
  2085. gatherAngle: Qa,
  2086. gatherWiggle: Za,
  2087. hitReturnRatio: ja,
  2088. hitAngle: el,
  2089. playerScale: tl,
  2090. playerSpeed: il,
  2091. playerDecel: nl,
  2092. nameY: sl,
  2093. skinColors: rl,
  2094. animalCount: ol,
  2095. aiTurnRandom: al,
  2096. cowNames: ll,
  2097. shieldAngle: cl,
  2098. weaponVariants: ci,
  2099. fetchVariant: hl,
  2100. resourceTypes: fl,
  2101. areaCount: ul,
  2102. treesPerArea: dl,
  2103. bushesPerArea: pl,
  2104. totalRocks: ml,
  2105. goldOres: gl,
  2106. riverWidth: yl,
  2107. riverPadding: wl,
  2108. waterCurrent: kl,
  2109. waveSpeed: vl,
  2110. waveMax: xl,
  2111. treeScales: bl,
  2112. bushScales: Sl,
  2113. rockScales: Tl,
  2114. snowBiomeTop: Il,
  2115. snowSpeed: Ml,
  2116. maxNameLength: El,
  2117. mapScale: ts,
  2118. mapPingScale: Pl,
  2119. mapPingTime: Cl,
  2120. volcanoScale: is,
  2121. innerVolcanoScale: Bl,
  2122. volcanoAnimalStrength: zl,
  2123. volcanoAnimationDuration: Hl,
  2124. volcanoAggressionRadius: Fl,
  2125. volcanoAggressionPercentage: Vl,
  2126. volcanoDamagePerSecond: Ul,
  2127. volcanoLocationX: Ll,
  2128. volcanoLocationY: Nl,
  2129. MAX_ATTACK: Al,
  2130. MAX_SPAWN_DELAY: Dl,
  2131. MAX_SPEED: Ol,
  2132. MAX_TURN_SPEED: Rl,
  2133. DAY_INTERVAL: _l
  2134. }
  2135. , ql = new ka
  2136. , Wl = new Pa
  2137. , ee = {
  2138. socket: null,
  2139. connected: !1,
  2140. socketId: -1,
  2141. connect: function(e, t, i) {
  2142. if (this.socket)
  2143. return;
  2144. const s = this;
  2145. try {
  2146. let n = !1;
  2147. const r = e;
  2148. this.socket = new WebSocket(e),
  2149. this.socket.binaryType = "arraybuffer",
  2150. this.socket.onmessage = function(o) {
  2151. var a = new Uint8Array(o.data);
  2152. const l = Wl.decode(a)
  2153. , c = l[0];
  2154. var a = l[1];
  2155. c == "io-init" ? s.socketId = a[0] : i[c].apply(void 0, a)
  2156. }
  2157. ,
  2158. this.socket.onopen = function() {
  2159. s.connected = !0,
  2160. t()
  2161. }
  2162. ,
  2163. this.socket.onclose = function(o) {
  2164. s.connected = !1,
  2165. o.code == 4001 ? t("Invalid Connection") : n || t("disconnected")
  2166. }
  2167. ,
  2168. this.socket.onerror = function(o) {
  2169. this.socket && this.socket.readyState != WebSocket.OPEN && (n = !0,
  2170. console.error("Socket error", arguments),
  2171. t("Socket error"))
  2172. }
  2173. } catch (n) {
  2174. console.warn("Socket connection error:", n),
  2175. t(n)
  2176. }
  2177. },
  2178. send: function(e) {
  2179. const t = Array.prototype.slice.call(arguments, 1)
  2180. , i = ql.encode([e, t]);
  2181. this.socket && this.socket.send(i)
  2182. },
  2183. socketReady: function() {
  2184. return this.socket && this.connected
  2185. },
  2186. close: function() {
  2187. this.socket && this.socket.close(),
  2188. this.socket = null,
  2189. this.connected = !1
  2190. }
  2191. };
  2192. var qr = Math.abs;
  2193. const Xl = Math.sqrt;
  2194. var qr = Math.abs;
  2195. const Gl = Math.atan2
  2196. , Qi = Math.PI
  2197. , Yl = function(e, t) {
  2198. return Math.floor(Math.random() * (t - e + 1)) + e
  2199. }
  2200. , $l = function(e, t) {
  2201. return Math.random() * (t - e + 1) + e
  2202. }
  2203. , Kl = function(e, t, i) {
  2204. return e + (t - e) * i
  2205. }
  2206. , Jl = function(e, t) {
  2207. return e > 0 ? e = Math.max(0, e - t) : e < 0 && (e = Math.min(0, e + t)),
  2208. e
  2209. }
  2210. , Ql = function(e, t, i, s) {
  2211. return Xl((i -= e) * i + (s -= t) * s)
  2212. }
  2213. , Zl = function(e, t, i, s) {
  2214. return Gl(t - s, e - i)
  2215. }
  2216. , jl = function(e, t) {
  2217. const i = qr(t - e) % (Qi * 2);
  2218. return i > Qi ? Qi * 2 - i : i
  2219. }
  2220. , ec = function(e) {
  2221. return typeof e == "number" && !isNaN(e) && isFinite(e)
  2222. }
  2223. , tc = function(e) {
  2224. return e && typeof e == "string"
  2225. }
  2226. , ic = function(e) {
  2227. return e > 999 ? (e / 1e3).toFixed(1) + "k" : e
  2228. }
  2229. , nc = function(e) {
  2230. return e.charAt(0).toUpperCase() + e.slice(1)
  2231. }
  2232. , sc = function(e, t) {
  2233. return e ? parseFloat(e.toFixed(t)) : 0
  2234. }
  2235. , rc = function(e, t) {
  2236. return parseFloat(t.points) - parseFloat(e.points)
  2237. }
  2238. , oc = function(e, t, i, s, n, r, o, l) {
  2239. let c = n
  2240. , a = o;
  2241. if (n > o && (c = o,
  2242. a = n),
  2243. a > i && (a = i),
  2244. c < e && (c = e),
  2245. c > a)
  2246. return !1;
  2247. let u = r
  2248. , p = l;
  2249. const h = o - n;
  2250. if (Math.abs(h) > 1e-7) {
  2251. const m = (l - r) / h
  2252. , w = r - m * n;
  2253. u = m * c + w,
  2254. p = m * a + w
  2255. }
  2256. if (u > p) {
  2257. const m = p;
  2258. p = u,
  2259. u = m
  2260. }
  2261. return p > s && (p = s),
  2262. u < t && (u = t),
  2263. !(u > p)
  2264. }
  2265. , Wr = function(e, t, i) {
  2266. const s = e.getBoundingClientRect()
  2267. , n = s.left + window.scrollX
  2268. , r = s.top + window.scrollY
  2269. , o = s.width
  2270. , l = s.height
  2271. , c = t > n && t < n + o
  2272. , a = i > r && i < r + l;
  2273. return c && a
  2274. }
  2275. , hi = function(e) {
  2276. const t = e.changedTouches[0];
  2277. e.screenX = t.screenX,
  2278. e.screenY = t.screenY,
  2279. e.clientX = t.clientX,
  2280. e.clientY = t.clientY,
  2281. e.pageX = t.pageX,
  2282. e.pageY = t.pageY
  2283. }
  2284. , Xr = function(e, t) {
  2285. const i = !t;
  2286. let s = !1;
  2287. const n = !1;
  2288. e.addEventListener("touchstart", Be(r), n),
  2289. e.addEventListener("touchmove", Be(o), n),
  2290. e.addEventListener("touchend", Be(l), n),
  2291. e.addEventListener("touchcancel", Be(l), n),
  2292. e.addEventListener("touchleave", Be(l), n);
  2293. function r(c) {
  2294. hi(c),
  2295. window.setUsingTouch(!0),
  2296. i && (c.preventDefault(),
  2297. c.stopPropagation()),
  2298. e.onmouseover && e.onmouseover(c),
  2299. s = !0
  2300. }
  2301. function o(c) {
  2302. hi(c),
  2303. window.setUsingTouch(!0),
  2304. i && (c.preventDefault(),
  2305. c.stopPropagation()),
  2306. Wr(e, c.pageX, c.pageY) ? s || (e.onmouseover && e.onmouseover(c),
  2307. s = !0) : s && (e.onmouseout && e.onmouseout(c),
  2308. s = !1)
  2309. }
  2310. function l(c) {
  2311. hi(c),
  2312. window.setUsingTouch(!0),
  2313. i && (c.preventDefault(),
  2314. c.stopPropagation()),
  2315. s && (e.onclick && e.onclick(c),
  2316. e.onmouseout && e.onmouseout(c),
  2317. s = !1)
  2318. }
  2319. }
  2320. , ac = function(e) {
  2321. for (; e.hasChildNodes(); )
  2322. e.removeChild(e.lastChild)
  2323. }
  2324. , lc = function(e) {
  2325. const t = document.createElement(e.tag || "div");
  2326. function i(s, n) {
  2327. e[s] && (t[n] = e[s])
  2328. }
  2329. i("text", "textContent"),
  2330. i("html", "innerHTML"),
  2331. i("class", "className");
  2332. for (const s in e) {
  2333. switch (s) {
  2334. case "tag":
  2335. case "text":
  2336. case "html":
  2337. case "class":
  2338. case "style":
  2339. case "hookTouch":
  2340. case "parent":
  2341. case "children":
  2342. continue
  2343. }
  2344. t[s] = e[s]
  2345. }
  2346. if (t.onclick && (t.onclick = Be(t.onclick)),
  2347. t.onmouseover && (t.onmouseover = Be(t.onmouseover)),
  2348. t.onmouseout && (t.onmouseout = Be(t.onmouseout)),
  2349. e.style && (t.style.cssText = e.style),
  2350. e.hookTouch && Xr(t),
  2351. e.parent && e.parent.appendChild(t),
  2352. e.children)
  2353. for (let s = 0; s < e.children.length; s++)
  2354. t.appendChild(e.children[s]);
  2355. return t
  2356. }
  2357. , Gr = function(e) {
  2358. return e && typeof e.isTrusted == "boolean" ? e.isTrusted : !0
  2359. }
  2360. , Be = function(e) {
  2361. return function(t) {
  2362. t && t instanceof Event && Gr(t) && e(t)
  2363. }
  2364. }
  2365. , cc = function(e) {
  2366. let t = "";
  2367. const i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
  2368. for (let s = 0; s < e; s++)
  2369. t += i.charAt(Math.floor(Math.random() * i.length));
  2370. return t
  2371. }
  2372. , hc = function(e, t) {
  2373. let i = 0;
  2374. for (let s = 0; s < e.length; s++)
  2375. e[s] === t && i++;
  2376. return i
  2377. }
  2378. , C = {
  2379. randInt: Yl,
  2380. randFloat: $l,
  2381. lerp: Kl,
  2382. decel: Jl,
  2383. getDistance: Ql,
  2384. getDirection: Zl,
  2385. getAngleDist: jl,
  2386. isNumber: ec,
  2387. isString: tc,
  2388. kFormat: ic,
  2389. capitalizeFirst: nc,
  2390. fixTo: sc,
  2391. sortByPoints: rc,
  2392. lineInRect: oc,
  2393. containsPoint: Wr,
  2394. mousifyTouchEvent: hi,
  2395. hookTouchEvents: Xr,
  2396. removeAllChildren: ac,
  2397. generateElement: lc,
  2398. eventIsTrusted: Gr,
  2399. checkTrusted: Be,
  2400. randomString: cc,
  2401. countInArray: hc
  2402. }
  2403. , fc = function() {
  2404. this.init = function(e, t, i, s, n, r, o) {
  2405. this.x = e,
  2406. this.y = t,
  2407. this.color = o,
  2408. this.scale = i,
  2409. this.startScale = this.scale,
  2410. this.maxScale = i * 1.5,
  2411. this.scaleSpeed = .7,
  2412. this.speed = s,
  2413. this.life = n,
  2414. this.text = r
  2415. }
  2416. ,
  2417. this.update = function(e) {
  2418. this.life && (this.life -= e,
  2419. this.y -= this.speed * e,
  2420. this.scale += this.scaleSpeed * e,
  2421. this.scale >= this.maxScale ? (this.scale = this.maxScale,
  2422. this.scaleSpeed *= -1) : this.scale <= this.startScale && (this.scale = this.startScale,
  2423. this.scaleSpeed = 0),
  2424. this.life <= 0 && (this.life = 0))
  2425. }
  2426. ,
  2427. this.render = function(e, t, i) {
  2428. e.fillStyle = this.color,
  2429. e.font = this.scale + "px Hammersmith One",
  2430. e.fillText(this.text, this.x - t, this.y - i)
  2431. }
  2432. }
  2433. , uc = function() {
  2434. this.texts = [],
  2435. this.update = function(e, t, i, s) {
  2436. t.textBaseline = "middle",
  2437. t.textAlign = "center";
  2438. for (let n = 0; n < this.texts.length; ++n)
  2439. this.texts[n].life && (this.texts[n].update(e),
  2440. this.texts[n].render(t, i, s))
  2441. }
  2442. ,
  2443. this.showText = function(e, t, i, s, n, r, o) {
  2444. let l;
  2445. for (let c = 0; c < this.texts.length; ++c)
  2446. if (!this.texts[c].life) {
  2447. l = this.texts[c];
  2448. break
  2449. }
  2450. l || (l = new fc,
  2451. this.texts.push(l)),
  2452. l.init(e, t, i, s, n, r, o)
  2453. }
  2454. }
  2455. , dc = function(e, t) {
  2456. let i;
  2457. this.sounds = [],
  2458. this.active = !0,
  2459. this.play = function(s, n, r) {
  2460. !n || !this.active || (i = this.sounds[s],
  2461. i || (i = new Howl({
  2462. src: ".././sound/" + s + ".mp3"
  2463. }),
  2464. this.sounds[s] = i),
  2465. (!r || !i.isPlaying) && (i.isPlaying = !0,
  2466. i.play(),
  2467. i.volume((n || 1) * e.volumeMult),
  2468. i.loop(r)))
  2469. }
  2470. ,
  2471. this.toggleMute = function(s, n) {
  2472. i = this.sounds[s],
  2473. i && i.mute(n)
  2474. }
  2475. ,
  2476. this.stop = function(s) {
  2477. i = this.sounds[s],
  2478. i && (i.stop(),
  2479. i.isPlaying = !1)
  2480. }
  2481. }
  2482. , Os = Math.floor
  2483. , Rs = Math.abs
  2484. , Ot = Math.cos
  2485. , Rt = Math.sin
  2486. , pc = Math.sqrt;
  2487. function mc(e, t, i, s, n, r) {
  2488. this.objects = t,
  2489. this.grids = {},
  2490. this.updateObjects = [];
  2491. let o, l;
  2492. const c = s.mapScale / s.colGrid;
  2493. this.setObjectGrids = function(h) {
  2494. const m = Math.min(s.mapScale, Math.max(0, h.x))
  2495. , w = Math.min(s.mapScale, Math.max(0, h.y));
  2496. for (let v = 0; v < s.colGrid; ++v) {
  2497. o = v * c;
  2498. for (let x = 0; x < s.colGrid; ++x)
  2499. l = x * c,
  2500. m + h.scale >= o && m - h.scale <= o + c && w + h.scale >= l && w - h.scale <= l + c && (this.grids[v + "_" + x] || (this.grids[v + "_" + x] = []),
  2501. this.grids[v + "_" + x].push(h),
  2502. h.gridLocations.push(v + "_" + x))
  2503. }
  2504. }
  2505. ,
  2506. this.removeObjGrid = function(h) {
  2507. let m;
  2508. for (let w = 0; w < h.gridLocations.length; ++w)
  2509. m = this.grids[h.gridLocations[w]].indexOf(h),
  2510. m >= 0 && this.grids[h.gridLocations[w]].splice(m, 1)
  2511. }
  2512. ,
  2513. this.disableObj = function(h) {
  2514. if (h.active = !1,
  2515. r) {
  2516. h.owner && h.pps && (h.owner.pps -= h.pps),
  2517. this.removeObjGrid(h);
  2518. const m = this.updateObjects.indexOf(h);
  2519. m >= 0 && this.updateObjects.splice(m, 1)
  2520. }
  2521. }
  2522. ,
  2523. this.hitObj = function(h, m) {
  2524. for (let w = 0; w < n.length; ++w)
  2525. n[w].active && (h.sentTo[n[w].id] && (h.active ? n[w].canSee(h) && r.send(n[w].id, "L", i.fixTo(m, 1), h.sid) : r.send(n[w].id, "Q", h.sid)),
  2526. !h.active && h.owner == n[w] && n[w].changeItemCount(h.group.id, -1))
  2527. }
  2528. ;
  2529. const a = [];
  2530. let u;
  2531. this.getGridArrays = function(h, m, w) {
  2532. o = Os(h / c),
  2533. l = Os(m / c),
  2534. a.length = 0;
  2535. try {
  2536. this.grids[o + "_" + l] && a.push(this.grids[o + "_" + l]),
  2537. h + w >= (o + 1) * c && (u = this.grids[o + 1 + "_" + l],
  2538. u && a.push(u),
  2539. l && m - w <= l * c ? (u = this.grids[o + 1 + "_" + (l - 1)],
  2540. u && a.push(u)) : m + w >= (l + 1) * c && (u = this.grids[o + 1 + "_" + (l + 1)],
  2541. u && a.push(u))),
  2542. o && h - w <= o * c && (u = this.grids[o - 1 + "_" + l],
  2543. u && a.push(u),
  2544. l && m - w <= l * c ? (u = this.grids[o - 1 + "_" + (l - 1)],
  2545. u && a.push(u)) : m + w >= (l + 1) * c && (u = this.grids[o - 1 + "_" + (l + 1)],
  2546. u && a.push(u))),
  2547. m + w >= (l + 1) * c && (u = this.grids[o + "_" + (l + 1)],
  2548. u && a.push(u)),
  2549. l && m - w <= l * c && (u = this.grids[o + "_" + (l - 1)],
  2550. u && a.push(u))
  2551. } catch {}
  2552. return a
  2553. }
  2554. ;
  2555. let p;
  2556. this.add = function(h, m, w, v, x, D, k, S, O) {
  2557. p = null;
  2558. for (var U = 0; U < t.length; ++U)
  2559. if (t[U].sid == h) {
  2560. p = t[U];
  2561. break
  2562. }
  2563. if (!p) {
  2564. for (var U = 0; U < t.length; ++U)
  2565. if (!t[U].active) {
  2566. p = t[U];
  2567. break
  2568. }
  2569. }
  2570.  
  2571.  
  2572. p || (p = new e(h),
  2573. t.push(p)),
  2574. S && (p.sid = h),
  2575. p.init(m, w, v, x, D, k, O),
  2576. r && (this.setObjectGrids(p),
  2577. p.doUpdate && this.updateObjects.push(p))
  2578. }
  2579. ,
  2580. this.disableBySid = function(h) {
  2581. for (let m = 0; m < t.length; ++m)
  2582. if (t[m].sid == h) {
  2583. this.disableObj(t[m]);
  2584. break
  2585. }
  2586. }
  2587. ,
  2588. this.removeAllItems = function(h, m) {
  2589. for (let w = 0; w < t.length; ++w)
  2590. t[w].active && t[w].owner && t[w].owner.sid == h && this.disableObj(t[w]);
  2591. m && m.broadcast("R", h)
  2592. }
  2593. ,
  2594. this.fetchSpawnObj = function(h) {
  2595. let m = null;
  2596. for (let w = 0; w < t.length; ++w)
  2597. if (p = t[w],
  2598. p.active && p.owner && p.owner.sid == h && p.spawnPoint) {
  2599. m = [p.x, p.y],
  2600. this.disableObj(p),
  2601. r.broadcast("Q", p.sid),
  2602. p.owner && p.owner.changeItemCount(p.group.id, -1);
  2603. break
  2604. }
  2605. return m
  2606. }
  2607. ,
  2608. this.checkItemLocation = function(h, m, w, v, x, D, k) {
  2609. for (let S = 0; S < t.length; ++S) {
  2610. const O = t[S].blocker ? t[S].blocker : t[S].getScale(v, t[S].isItem);
  2611. if (t[S].active && i.getDistance(h, m, t[S].x, t[S].y) < w + O)
  2612. return !1
  2613. }
  2614. return !(!D && x != 18 && m >= s.mapScale / 2 - s.riverWidth / 2 && m <= s.mapScale / 2 + s.riverWidth / 2)
  2615. }
  2616. ,
  2617. this.addProjectile = function(h, m, w, v, x) {
  2618. const D = items.projectiles[x];
  2619. let k;
  2620. for (let S = 0; S < projectiles.length; ++S)
  2621. if (!projectiles[S].active) {
  2622. k = projectiles[S];
  2623. break
  2624. }
  2625. k || (k = new Projectile(n,i),
  2626. projectiles.push(k)),
  2627. k.init(x, h, m, w, D.speed, v, D.scale)
  2628. }
  2629. ,
  2630. this.checkCollision = function(h, m, w) {
  2631. w = w || 1;
  2632. const v = h.x - m.x
  2633. , x = h.y - m.y;
  2634. let D = h.scale + m.scale;
  2635. if (Rs(v) <= D || Rs(x) <= D) {
  2636. D = h.scale + (m.getScale ? m.getScale() : m.scale);
  2637. let k = pc(v * v + x * x) - D;
  2638. if (k <= 0) {
  2639. trapped = [];
  2640. if (m.ignoreCollision)
  2641. m.trap && !h.noTrap && m.owner != h && !(m.owner && m.owner.team && m.owner.team == h.team) ? trapped.push(h) && (h.lockMove = !0,
  2642. m.hideFromEnemy = !1) : m.boostSpeed ? (h.xVel += w * m.boostSpeed * (m.weightM || 1) * Ot(m.dir),
  2643. h.yVel += w * m.boostSpeed * (m.weightM || 1) * Rt(m.dir)) : m.healCol ? h.healCol = m.healCol : m.teleport && (h.x = i.randInt(0, s.mapScale),
  2644. h.y = i.randInt(0, s.mapScale));
  2645. else {
  2646. const S = i.getDirection(h.x, h.y, m.x, m.y);
  2647. if (i.getDistance(h.x, h.y, m.x, m.y),
  2648. m.isPlayer ? (k = k * -1 / 2,
  2649. h.x += k * Ot(S),
  2650. h.y += k * Rt(S),
  2651. m.x -= k * Ot(S),
  2652. m.y -= k * Rt(S)) : (h.x = m.x + D * Ot(S),
  2653. h.y = m.y + D * Rt(S),
  2654. h.xVel *= .75,
  2655. h.yVel *= .75),
  2656. m.dmg && m.owner != h && !(m.owner && m.owner.team && m.owner.team == h.team)) {
  2657. h.changeHealth(-m.dmg, m.owner, m);
  2658. const O = 1.5 * (m.weightM || 1);
  2659. h.xVel += O * Ot(S),
  2660. h.yVel += O * Rt(S),
  2661. m.pDmg && !(h.skin && h.skin.poisonRes) && (h.dmgOverTime.dmg = m.pDmg,
  2662. h.dmgOverTime.time = 5,
  2663. h.dmgOverTime.doer = m.owner),
  2664. h.colDmg && m.health && (m.changeHealth(-h.colDmg) && this.disableObj(m),
  2665. this.hitObj(m, i.getDirection(h.x, h.y, m.x, m.y)))
  2666. }
  2667. }
  2668. return m.zIndex > h.zIndex && (h.zIndex = m.zIndex),
  2669. !0
  2670. }
  2671. }
  2672. return !1
  2673. }
  2674. }
  2675. function gc(e, t, i, s, n, r, o, l, c) {
  2676. this.addProjectile = function(a, u, p, h, m, w, v, x, D) {
  2677. const k = r.projectiles[w];
  2678. let S;
  2679. for (let O = 0; O < t.length; ++O)
  2680. if (!t[O].active) {
  2681. S = t[O];
  2682. break
  2683. }
  2684. return S || (S = new e(i,s,n,r,o,l,c),
  2685. S.sid = t.length,
  2686. t.push(S)),
  2687. S.init(w, a, u, p, m, k.dmg, h, k.scale, v),
  2688. S.ignoreObj = x,
  2689. S.layer = D || k.layer,
  2690. S.src = k.src,
  2691. S
  2692. }
  2693. }
  2694. function yc(e, t, i, s, n, r, o, l, c) {
  2695. this.aiTypes = [{
  2696. id: 0,
  2697. src: "cow_1",
  2698. killScore: 150,
  2699. health: 500,
  2700. weightM: .8,
  2701. speed: 95e-5,
  2702. turnSpeed: .001,
  2703. scale: 72,
  2704. drop: ["food", 50]
  2705. }, {
  2706. id: 1,
  2707. src: "pig_1",
  2708. killScore: 200,
  2709. health: 800,
  2710. weightM: .6,
  2711. speed: 85e-5,
  2712. turnSpeed: .001,
  2713. scale: 72,
  2714. drop: ["food", 80]
  2715. }, {
  2716. id: 2,
  2717. name: "Bull",
  2718. src: "bull_2",
  2719. hostile: !0,
  2720. dmg: 20,
  2721. killScore: 1e3,
  2722. health: 1800,
  2723. weightM: .5,
  2724. speed: 94e-5,
  2725. turnSpeed: 74e-5,
  2726. scale: 78,
  2727. viewRange: 800,
  2728. chargePlayer: !0,
  2729. drop: ["food", 100]
  2730. }, {
  2731. id: 3,
  2732. name: "Bully",
  2733. src: "bull_1",
  2734. hostile: !0,
  2735. dmg: 20,
  2736. killScore: 2e3,
  2737. health: 2800,
  2738. weightM: .45,
  2739. speed: .001,
  2740. turnSpeed: 8e-4,
  2741. scale: 90,
  2742. viewRange: 900,
  2743. chargePlayer: !0,
  2744. drop: ["food", 400]
  2745. }, {
  2746. id: 4,
  2747. name: "Wolf",
  2748. src: "wolf_1",
  2749. hostile: !0,
  2750. dmg: 8,
  2751. killScore: 500,
  2752. health: 300,
  2753. weightM: .45,
  2754. speed: .001,
  2755. turnSpeed: .002,
  2756. scale: 84,
  2757. viewRange: 800,
  2758. chargePlayer: !0,
  2759. drop: ["food", 200]
  2760. }, {
  2761. id: 5,
  2762. name: "Quack",
  2763. src: "chicken_1",
  2764. dmg: 8,
  2765. killScore: 2e3,
  2766. noTrap: !0,
  2767. health: 300,
  2768. weightM: .2,
  2769. speed: .0018,
  2770. turnSpeed: .006,
  2771. scale: 70,
  2772. drop: ["food", 100]
  2773. }, {
  2774. id: 6,
  2775. name: "MOOSTAFA",
  2776. nameScale: 50,
  2777. src: "enemy",
  2778. hostile: !0,
  2779. dontRun: !0,
  2780. fixedSpawn: !0,
  2781. spawnDelay: 6e4,
  2782. noTrap: !0,
  2783. colDmg: 100,
  2784. dmg: 40,
  2785. killScore: 8e3,
  2786. health: 18e3,
  2787. weightM: .4,
  2788. speed: 7e-4,
  2789. turnSpeed: .01,
  2790. scale: 80,
  2791. spriteMlt: 1.8,
  2792. leapForce: .9,
  2793. viewRange: 1e3,
  2794. hitRange: 210,
  2795. hitDelay: 1e3,
  2796. chargePlayer: !0,
  2797. drop: ["food", 100]
  2798. }, {
  2799. id: 7,
  2800. name: "Treasure",
  2801. hostile: !0,
  2802. nameScale: 35,
  2803. src: "crate_1",
  2804. fixedSpawn: !0,
  2805. spawnDelay: 12e4,
  2806. colDmg: 200,
  2807. killScore: 5e3,
  2808. health: 2e4,
  2809. weightM: .1,
  2810. speed: 0,
  2811. turnSpeed: 0,
  2812. scale: 70,
  2813. spriteMlt: 1
  2814. }, {
  2815. id: 8,
  2816. name: "MOOFIE",
  2817. src: "wolf_2",
  2818. hostile: !0,
  2819. fixedSpawn: !0,
  2820. dontRun: !0,
  2821. hitScare: 4,
  2822. spawnDelay: 3e4,
  2823. noTrap: !0,
  2824. nameScale: 35,
  2825. dmg: 10,
  2826. colDmg: 100,
  2827. killScore: 3e3,
  2828. health: 7e3,
  2829. weightM: .45,
  2830. speed: .0015,
  2831. turnSpeed: .002,
  2832. scale: 90,
  2833. viewRange: 800,
  2834. chargePlayer: !0,
  2835. drop: ["food", 1e3]
  2836. }, {
  2837. id: 9,
  2838. name: "💀MOOFIE",
  2839. src: "wolf_2",
  2840. hostile: !0,
  2841. fixedSpawn: !0,
  2842. dontRun: !0,
  2843. hitScare: 50,
  2844. spawnDelay: 6e4,
  2845. noTrap: !0,
  2846. nameScale: 35,
  2847. dmg: 12,
  2848. colDmg: 100,
  2849. killScore: 3e3,
  2850. health: 9e3,
  2851. weightM: .45,
  2852. speed: .0015,
  2853. turnSpeed: .0025,
  2854. scale: 94,
  2855. viewRange: 1440,
  2856. chargePlayer: !0,
  2857. drop: ["food", 3e3],
  2858. minSpawnRange: .85,
  2859. maxSpawnRange: .9
  2860. }, {
  2861. id: 10,
  2862. name: "💀Wolf",
  2863. src: "wolf_1",
  2864. hostile: !0,
  2865. fixedSpawn: !0,
  2866. dontRun: !0,
  2867. hitScare: 50,
  2868. spawnDelay: 3e4,
  2869. dmg: 10,
  2870. killScore: 700,
  2871. health: 500,
  2872. weightM: .45,
  2873. speed: .00115,
  2874. turnSpeed: .0025,
  2875. scale: 88,
  2876. viewRange: 1440,
  2877. chargePlayer: !0,
  2878. drop: ["food", 400],
  2879. minSpawnRange: .85,
  2880. maxSpawnRange: .9
  2881. }, {
  2882. id: 11,
  2883. name: "💀Bully",
  2884. src: "bull_1",
  2885. hostile: !0,
  2886. fixedSpawn: !0,
  2887. dontRun: !0,
  2888. hitScare: 50,
  2889. dmg: 20,
  2890. killScore: 5e3,
  2891. health: 5e3,
  2892. spawnDelay: 1e5,
  2893. weightM: .45,
  2894. speed: .00115,
  2895. turnSpeed: .0025,
  2896. scale: 94,
  2897. viewRange: 1440,
  2898. chargePlayer: !0,
  2899. drop: ["food", 800],
  2900. minSpawnRange: .85,
  2901. maxSpawnRange: .9
  2902. }],
  2903. this.spawn = function(a, u, p, h) {
  2904. if (!this.aiTypes[h])
  2905. return console.error("missing ai type", h),
  2906. this.spawn(a, u, p, 0);
  2907. let m;
  2908. for (let w = 0; w < e.length; ++w)
  2909. if (!e[w].active) {
  2910. m = e[w];
  2911. break
  2912. }
  2913. return m || (m = new t(e.length,n,i,s,o,r,l,c),
  2914. e.push(m)),
  2915. m.init(a, u, p, h, this.aiTypes[h]),
  2916. m
  2917. }
  2918. }
  2919. const ot = Math.PI * 2
  2920. , Zi = 0;
  2921. function wc(e, t, i, s, n, r, o, l) {
  2922. this.sid = e,
  2923. this.isAI = !0,
  2924. this.nameIndex = n.randInt(0, r.cowNames.length - 1),
  2925. this.init = function(p, h, m, w, v) {
  2926. this.x = p,
  2927. this.y = h,
  2928. this.startX = v.fixedSpawn ? p : null,
  2929. this.startY = v.fixedSpawn ? h : null,
  2930. this.xVel = 0,
  2931. this.yVel = 0,
  2932. this.zIndex = 0,
  2933. this.dir = m,
  2934. this.dirPlus = 0,
  2935. this.index = w,
  2936. this.src = v.src,
  2937. v.name && (this.name = v.name),
  2938. (this.name || "").startsWith("💀") && (this.isVolcanoAi = !0),
  2939. this.weightM = v.weightM,
  2940. this.speed = v.speed,
  2941. this.killScore = v.killScore,
  2942. this.turnSpeed = v.turnSpeed,
  2943. this.scale = v.scale,
  2944. this.maxHealth = v.health,
  2945. this.leapForce = v.leapForce,
  2946. this.health = this.maxHealth,
  2947. this.chargePlayer = v.chargePlayer,
  2948. this.viewRange = v.viewRange,
  2949. this.drop = v.drop,
  2950. this.dmg = v.dmg,
  2951. this.hostile = v.hostile,
  2952. this.dontRun = v.dontRun,
  2953. this.hitRange = v.hitRange,
  2954. this.hitDelay = v.hitDelay,
  2955. this.hitScare = v.hitScare,
  2956. this.spriteMlt = v.spriteMlt,
  2957. this.nameScale = v.nameScale,
  2958. this.colDmg = v.colDmg,
  2959. this.noTrap = v.noTrap,
  2960. this.spawnDelay = v.spawnDelay,
  2961. this.minSpawnRange = v.minSpawnRange,
  2962. this.maxSpawnRange = v.maxSpawnRange,
  2963. this.hitWait = 0,
  2964. this.waitCount = 1e3,
  2965. this.moveCount = 0,
  2966. this.targetDir = 0,
  2967. this.active = !0,
  2968. this.alive = !0,
  2969. this.runFrom = null,
  2970. this.chargeTarget = null,
  2971. this.dmgOverTime = {}
  2972. }
  2973. ,
  2974. this.getVolcanoAggression = function() {
  2975. const p = n.getDistance(this.x, this.y, r.volcanoLocationX, r.volcanoLocationY)
  2976. , h = p > r.volcanoAggressionRadius ? 0 : r.volcanoAggressionRadius - p;
  2977. return 1 + r.volcanoAggressionPercentage * (1 - h / r.volcanoAggressionRadius)
  2978. }
  2979. ;
  2980. let c = 0;
  2981. this.update = function(p) {
  2982. if (this.active) {
  2983. if (this.spawnCounter) {
  2984. if (this.spawnCounter -= p * (1 + 0) * this.getVolcanoAggression(),
  2985. this.spawnCounter <= 0)
  2986. if (this.spawnCounter = 0,
  2987. this.minSpawnRange || this.maxSpawnRange) {
  2988. const W = r.mapScale * this.minSpawnRange
  2989. , F = r.mapScale * this.maxSpawnRange;
  2990. this.x = n.randInt(W, F),
  2991. this.y = n.randInt(W, F)
  2992. } else
  2993. this.x = this.startX || n.randInt(0, r.mapScale),
  2994. this.y = this.startY || n.randInt(0, r.mapScale);
  2995. return
  2996. }
  2997. c -= p,
  2998. c <= 0 && (this.dmgOverTime.dmg && (this.changeHealth(-this.dmgOverTime.dmg, this.dmgOverTime.doer),
  2999. this.dmgOverTime.time -= 1,
  3000. this.dmgOverTime.time <= 0 && (this.dmgOverTime.dmg = 0)),
  3001. c = 1e3);
  3002. let k = !1
  3003. , S = 1;
  3004. if (!this.zIndex && !this.lockMove && this.y >= r.mapScale / 2 - r.riverWidth / 2 && this.y <= r.mapScale / 2 + r.riverWidth / 2 && (S = .33,
  3005. this.xVel += r.waterCurrent * p),
  3006. this.lockMove)
  3007. this.xVel = 0,
  3008. this.yVel = 0;
  3009. else if (this.waitCount > 0) {
  3010. if (this.waitCount -= p,
  3011. this.waitCount <= 0)
  3012. if (this.chargePlayer) {
  3013. let W, F, _;
  3014. for (var h = 0; h < i.length; ++h)
  3015. i[h].alive && !(i[h].skin && i[h].skin.bullRepel) && (_ = n.getDistance(this.x, this.y, i[h].x, i[h].y),
  3016. _ <= this.viewRange && (!W || _ < F) && (F = _,
  3017. W = i[h]));
  3018. W ? (this.chargeTarget = W,
  3019. this.moveCount = n.randInt(8e3, 12e3)) : (this.moveCount = n.randInt(1e3, 2e3),
  3020. this.targetDir = n.randFloat(-Math.PI, Math.PI))
  3021. } else
  3022. this.moveCount = n.randInt(4e3, 1e4),
  3023. this.targetDir = n.randFloat(-Math.PI, Math.PI)
  3024. } else if (this.moveCount > 0) {
  3025. var m = this.speed * S * (1 + r.MAX_SPEED * Zi) * this.getVolcanoAggression();
  3026. if (this.runFrom && this.runFrom.active && !(this.runFrom.isPlayer && !this.runFrom.alive) ? (this.targetDir = n.getDirection(this.x, this.y, this.runFrom.x, this.runFrom.y),
  3027. m *= 1.42) : this.chargeTarget && this.chargeTarget.alive && (this.targetDir = n.getDirection(this.chargeTarget.x, this.chargeTarget.y, this.x, this.y),
  3028. m *= 1.75,
  3029. k = !0),
  3030. this.hitWait && (m *= .3),
  3031. this.dir != this.targetDir) {
  3032. this.dir %= ot;
  3033. const W = (this.dir - this.targetDir + ot) % ot
  3034. , F = Math.min(Math.abs(W - ot), W, this.turnSpeed * p)
  3035. , _ = W - Math.PI >= 0 ? 1 : -1;
  3036. this.dir += _ * F + ot
  3037. }
  3038. this.dir %= ot,
  3039. this.xVel += m * p * Math.cos(this.dir),
  3040. this.yVel += m * p * Math.sin(this.dir),
  3041. this.moveCount -= p,
  3042. this.moveCount <= 0 && (this.runFrom = null,
  3043. this.chargeTarget = null,
  3044. this.waitCount = this.hostile ? 1500 : n.randInt(1500, 6e3))
  3045. }
  3046. this.zIndex = 0,
  3047. this.lockMove = !1;
  3048. var w;
  3049. const O = n.getDistance(0, 0, this.xVel * p, this.yVel * p)
  3050. , U = Math.min(4, Math.max(1, Math.round(O / 40)))
  3051. , L = 1 / U;
  3052. for (var h = 0; h < U; ++h) {
  3053. this.xVel && (this.x += this.xVel * p * L),
  3054. this.yVel && (this.y += this.yVel * p * L),
  3055. w = t.getGridArrays(this.x, this.y, this.scale);
  3056. for (var v = 0; v < w.length; ++v)
  3057. for (let F = 0; F < w[v].length; ++F)
  3058. w[v][F].active && t.checkCollision(this, w[v][F], L)
  3059. }
  3060. let q = !1;
  3061. if (this.hitWait > 0 && (this.hitWait -= p,
  3062. this.hitWait <= 0)) {
  3063. q = !0,
  3064. this.hitWait = 0,
  3065. this.leapForce && !n.randInt(0, 2) && (this.xVel += this.leapForce * Math.cos(this.dir),
  3066. this.yVel += this.leapForce * Math.sin(this.dir));
  3067. var w = t.getGridArrays(this.x, this.y, this.hitRange), x, D;
  3068. for (let F = 0; F < w.length; ++F)
  3069. for (var v = 0; v < w[F].length; ++v)
  3070. x = w[F][v],
  3071. x.health && (D = n.getDistance(this.x, this.y, x.x, x.y),
  3072. D < x.scale + this.hitRange && (x.changeHealth(-this.dmg * 5) && t.disableObj(x),
  3073. t.hitObj(x, n.getDirection(this.x, this.y, x.x, x.y))));
  3074. for (var v = 0; v < i.length; ++v)
  3075. i[v].canSee(this) && l.send(i[v].id, "J", this.sid)
  3076. }
  3077. if (k || q) {
  3078. var x, D;
  3079. let _;
  3080. for (var h = 0; h < i.length; ++h)
  3081. x = i[h],
  3082. x && x.alive && (D = n.getDistance(this.x, this.y, x.x, x.y),
  3083. this.hitRange ? !this.hitWait && D <= this.hitRange + x.scale && (q ? (_ = n.getDirection(x.x, x.y, this.x, this.y),
  3084. x.changeHealth(-this.dmg * (1 + r.MAX_ATTACK * Zi) * this.getVolcanoAggression()),
  3085. x.xVel += .6 * Math.cos(_),
  3086. x.yVel += .6 * Math.sin(_),
  3087. this.runFrom = null,
  3088. this.chargeTarget = null,
  3089. this.waitCount = 3e3,
  3090. this.hitWait = n.randInt(0, 2) ? 0 : 600) : this.hitWait = this.hitDelay) : D <= this.scale + x.scale && (_ = n.getDirection(x.x, x.y, this.x, this.y),
  3091. x.changeHealth(-this.dmg * (1 + r.MAX_ATTACK * Zi) * this.getVolcanoAggression()),
  3092. x.xVel += .55 * Math.cos(_),
  3093. x.yVel += .55 * Math.sin(_)))
  3094. }
  3095. this.xVel && (this.xVel *= Math.pow(r.playerDecel, p)),
  3096. this.yVel && (this.yVel *= Math.pow(r.playerDecel, p));
  3097. const P = this.scale;
  3098. this.x - P < 0 ? (this.x = P,
  3099. this.xVel = 0) : this.x + P > r.mapScale && (this.x = r.mapScale - P,
  3100. this.xVel = 0),
  3101. this.y - P < 0 ? (this.y = P,
  3102. this.yVel = 0) : this.y + P > r.mapScale && (this.y = r.mapScale - P,
  3103. this.yVel = 0),
  3104. this.isVolcanoAi && (this.chargeTarget && (n.getDistance(this.chargeTarget.x, this.chargeTarget.y, r.volcanoLocationX, r.volcanoLocationY) || 0) > r.volcanoAggressionRadius && (this.chargeTarget = null),
  3105. this.xVel && (this.x < r.volcanoLocationX - r.volcanoAggressionRadius ? (this.x = r.volcanoLocationX - r.volcanoAggressionRadius,
  3106. this.xVel = 0) : this.x > r.volcanoLocationX + r.volcanoAggressionRadius && (this.x = r.volcanoLocationX + r.volcanoAggressionRadius,
  3107. this.xVel = 0)),
  3108. this.yVel && (this.y < r.volcanoLocationY - r.volcanoAggressionRadius ? (this.y = r.volcanoLocationY - r.volcanoAggressionRadius,
  3109. this.yVel = 0) : this.y > r.volcanoLocationY + r.volcanoAggressionRadius && (this.y = r.volcanoLocationY + r.volcanoAggressionRadius,
  3110. this.yVel = 0)))
  3111. }
  3112. }
  3113. ,
  3114. this.canSee = function(p) {
  3115. if (!p || p.skin && p.skin.invisTimer && p.noMovTimer >= p.skin.invisTimer)
  3116. return !1;
  3117. const h = Math.abs(p.x - this.x) - p.scale
  3118. , m = Math.abs(p.y - this.y) - p.scale;
  3119. return h <= r.maxScreenWidth / 2 * 1.3 && m <= r.maxScreenHeight / 2 * 1.3
  3120. }
  3121. ;
  3122. let a = 0
  3123. , u = 0;
  3124. this.animate = function(p) {
  3125. this.animTime > 0 && (this.animTime -= p,
  3126. this.animTime <= 0 ? (this.animTime = 0,
  3127. this.dirPlus = 0,
  3128. a = 0,
  3129. u = 0) : u == 0 ? (a += p / (this.animSpeed * r.hitReturnRatio),
  3130. this.dirPlus = n.lerp(0, this.targetAngle, Math.min(1, a)),
  3131. a >= 1 && (a = 1,
  3132. u = 1)) : (a -= p / (this.animSpeed * (1 - r.hitReturnRatio)),
  3133. this.dirPlus = n.lerp(0, this.targetAngle, Math.max(0, a))))
  3134. }
  3135. ,
  3136. this.startAnim = function() {
  3137. this.animTime = this.animSpeed = 600,
  3138. this.targetAngle = Math.PI * .8,
  3139. a = 0,
  3140. u = 0
  3141. }
  3142. ,
  3143. this.changeHealth = function(p, h, m) {
  3144. if (this.active && (this.health += p,
  3145. m && (this.hitScare && !n.randInt(0, this.hitScare) ? (this.runFrom = m,
  3146. this.waitCount = 0,
  3147. this.moveCount = 2e3) : this.hostile && this.chargePlayer && m.isPlayer ? (this.chargeTarget = m,
  3148. this.waitCount = 0,
  3149. this.moveCount = 8e3) : this.dontRun || (this.runFrom = m,
  3150. this.waitCount = 0,
  3151. this.moveCount = 2e3)),
  3152. p < 0 && this.hitRange && n.randInt(0, 1) && (this.hitWait = 500),
  3153. h && h.canSee(this) && p < 0 && l.send(h.id, "8", Math.round(this.x), Math.round(this.y), Math.round(-p), 1),
  3154. this.health <= 0)) {
  3155. if (this.spawnDelay)
  3156. this.spawnCounter = this.spawnDelay,
  3157. this.x = -1e6,
  3158. this.y = -1e6;
  3159. else if (this.minSpawnRange || this.maxSpawnRange) {
  3160. const w = r.mapScale * this.minSpawnRange
  3161. , v = r.mapScale * this.maxSpawnRange;
  3162. this.x = n.randInt(w, v),
  3163. this.y = n.randInt(w, v)
  3164. } else
  3165. this.x = this.startX || n.randInt(0, r.mapScale),
  3166. this.y = this.startY || n.randInt(0, r.mapScale);
  3167. if (this.health = this.maxHealth,
  3168. this.runFrom = null,
  3169. h && (o(h, this.killScore),
  3170. this.drop))
  3171. for (let w = 0; w < this.drop.length; )
  3172. h.addResource(r.resourceTypes.indexOf(this.drop[w]), this.drop[w + 1]),
  3173. w += 2
  3174. }
  3175. }
  3176. }
  3177. function kc(e) {
  3178. this.sid = e,
  3179. this.init = function(t, i, s, n, r, o, l) {
  3180. o = o || {},
  3181. this.sentTo = {},
  3182. this.gridLocations = [],
  3183. this.active = !0,
  3184. this.doUpdate = o.doUpdate,
  3185. this.x = t,
  3186. this.y = i,
  3187. this.dir = s,
  3188. this.xWiggle = 0,
  3189. this.yWiggle = 0,
  3190. this.scale = n,
  3191. this.type = r,
  3192. this.id = o.id,
  3193. this.owner = l,
  3194. this.name = o.name,
  3195. this.isItem = this.id != null,
  3196. this.group = o.group,
  3197. this.health = o.health,
  3198. this.layer = 2,
  3199. this.group != null ? this.layer = this.group.layer : this.type == 0 ? this.layer = 3 : this.type == 2 ? this.layer = 0 : this.type == 4 && (this.layer = -1),
  3200. this.colDiv = o.colDiv || 1,
  3201. this.blocker = o.blocker,
  3202. this.ignoreCollision = o.ignoreCollision,
  3203. this.dontGather = o.dontGather,
  3204. this.hideFromEnemy = o.hideFromEnemy,
  3205. this.friction = o.friction,
  3206. this.projDmg = o.projDmg,
  3207. this.dmg = o.dmg,
  3208. this.pDmg = o.pDmg,
  3209. this.pps = o.pps,
  3210. this.zIndex = o.zIndex || 0,
  3211. this.turnSpeed = o.turnSpeed,
  3212. this.req = o.req,
  3213. this.trap = o.trap,
  3214. this.healCol = o.healCol,
  3215. this.teleport = o.teleport,
  3216. this.boostSpeed = o.boostSpeed,
  3217. this.projectile = o.projectile,
  3218. this.shootRange = o.shootRange,
  3219. this.shootRate = o.shootRate,
  3220. this.shootCount = this.shootRate,
  3221. this.spawnPoint = o.spawnPoint
  3222. }
  3223. ,
  3224. this.changeHealth = function(t, i) {
  3225. return this.health += t,
  3226. this.health <= 0
  3227. }
  3228. ,
  3229. this.getScale = function(t, i) {
  3230. return t = t || 1,
  3231. this.scale * (this.isItem || this.type == 2 || this.type == 3 || this.type == 4 ? 1 : .6 * t) * (i ? 1 : this.colDiv)
  3232. }
  3233. ,
  3234. this.visibleToPlayer = function(t) {
  3235. return !this.hideFromEnemy || this.owner && (this.owner == t || this.owner.team && t.team == this.owner.team)
  3236. }
  3237. ,
  3238. this.update = function(t) {
  3239. this.active && (this.xWiggle && (this.xWiggle *= Math.pow(.99, t)),
  3240. this.yWiggle && (this.yWiggle *= Math.pow(.99, t)),
  3241. this.turnSpeed && (this.dir += this.turnSpeed * t))
  3242. }
  3243. }
  3244. const j = [{
  3245. id: 0,
  3246. name: "food",
  3247. layer: 0
  3248. }, {
  3249. id: 1,
  3250. name: "walls",
  3251. place: !0,
  3252. limit: 30,
  3253. layer: 0
  3254. }, {
  3255. id: 2,
  3256. name: "spikes",
  3257. place: !0,
  3258. limit: 15,
  3259. layer: 0
  3260. }, {
  3261. id: 3,
  3262. name: "mill",
  3263. place: !0,
  3264. limit: 7,
  3265. sandboxLimit: 299,
  3266. layer: 1
  3267. }, {
  3268. id: 4,
  3269. name: "mine",
  3270. place: !0,
  3271. limit: 1,
  3272. layer: 0
  3273. }, {
  3274. id: 5,
  3275. name: "trap",
  3276. place: !0,
  3277. limit: 6,
  3278. layer: -1
  3279. }, {
  3280. id: 6,
  3281. name: "booster",
  3282. place: !0,
  3283. limit: 12,
  3284. sandboxLimit: 299,
  3285. layer: -1
  3286. }, {
  3287. id: 7,
  3288. name: "turret",
  3289. place: !0,
  3290. limit: 2,
  3291. layer: 1
  3292. }, {
  3293. id: 8,
  3294. name: "watchtower",
  3295. place: !0,
  3296. limit: 12,
  3297. layer: 1
  3298. }, {
  3299. id: 9,
  3300. name: "buff",
  3301. place: !0,
  3302. limit: 4,
  3303. layer: -1
  3304. }, {
  3305. id: 10,
  3306. name: "spawn",
  3307. place: !0,
  3308. limit: 1,
  3309. layer: -1
  3310. }, {
  3311. id: 11,
  3312. name: "sapling",
  3313. place: !0,
  3314. limit: 2,
  3315. layer: 0
  3316. }, {
  3317. id: 12,
  3318. name: "blocker",
  3319. place: !0,
  3320. limit: 3,
  3321. layer: -1
  3322. }, {
  3323. id: 13,
  3324. name: "teleporter",
  3325. place: !0,
  3326. limit: 2,
  3327. sandboxLimit: 299,
  3328. layer: -1
  3329. }]
  3330. , vc = [{
  3331. indx: 0,
  3332. layer: 0,
  3333. src: "arrow_1",
  3334. dmg: 25,
  3335. speed: 1.6,
  3336. scale: 103,
  3337. range: 1e3
  3338. }, {
  3339. indx: 1,
  3340. layer: 1,
  3341. dmg: 25,
  3342. scale: 20
  3343. }, {
  3344. indx: 0,
  3345. layer: 0,
  3346. src: "arrow_1",
  3347. dmg: 35,
  3348. speed: 2.5,
  3349. scale: 103,
  3350. range: 1200
  3351. }, {
  3352. indx: 0,
  3353. layer: 0,
  3354. src: "arrow_1",
  3355. dmg: 30,
  3356. speed: 2,
  3357. scale: 103,
  3358. range: 1200
  3359. }, {
  3360. indx: 1,
  3361. layer: 1,
  3362. dmg: 16,
  3363. scale: 20
  3364. }, {
  3365. indx: 0,
  3366. layer: 0,
  3367. src: "bullet_1",
  3368. dmg: 50,
  3369. speed: 3.6,
  3370. scale: 160,
  3371. range: 1400
  3372. }]
  3373. , xc = [{
  3374. id: 0,
  3375. type: 0,
  3376. name: "tool hammer",
  3377. desc: "tool for gathering all resources",
  3378. src: "hammer_1",
  3379. length: 140,
  3380. width: 140,
  3381. xOff: -3,
  3382. yOff: 18,
  3383. dmg: 25,
  3384. range: 65,
  3385. gather: 1,
  3386. speed: 300
  3387. }, {
  3388. id: 1,
  3389. type: 0,
  3390. age: 2,
  3391. name: "hand axe",
  3392. desc: "gathers resources at a higher rate",
  3393. src: "axe_1",
  3394. length: 140,
  3395. width: 140,
  3396. xOff: 3,
  3397. yOff: 24,
  3398. dmg: 30,
  3399. spdMult: 1,
  3400. range: 70,
  3401. gather: 2,
  3402. speed: 400
  3403. }, {
  3404. id: 2,
  3405. type: 0,
  3406. age: 8,
  3407. pre: 1,
  3408. name: "great axe",
  3409. desc: "deal more damage and gather more resources",
  3410. src: "great_axe_1",
  3411. length: 140,
  3412. width: 140,
  3413. xOff: -8,
  3414. yOff: 25,
  3415. dmg: 35,
  3416. spdMult: 1,
  3417. range: 75,
  3418. gather: 4,
  3419. speed: 400
  3420. }, {
  3421. id: 3,
  3422. type: 0,
  3423. age: 2,
  3424. name: "short sword",
  3425. desc: "increased attack power but slower move speed",
  3426. src: "sword_1",
  3427. iPad: 1.3,
  3428. length: 130,
  3429. width: 210,
  3430. xOff: -8,
  3431. yOff: 46,
  3432. dmg: 35,
  3433. spdMult: .85,
  3434. range: 110,
  3435. gather: 1,
  3436. speed: 300
  3437. }, {
  3438. id: 4,
  3439. type: 0,
  3440. age: 8,
  3441. pre: 3,
  3442. name: "katana",
  3443. desc: "greater range and damage",
  3444. src: "samurai_1",
  3445. iPad: 1.3,
  3446. length: 130,
  3447. width: 210,
  3448. xOff: -8,
  3449. yOff: 59,
  3450. dmg: 40,
  3451. spdMult: .8,
  3452. range: 118,
  3453. gather: 1,
  3454. speed: 300
  3455. }, {
  3456. id: 5,
  3457. type: 0,
  3458. age: 2,
  3459. name: "polearm",
  3460. desc: "long range melee weapon",
  3461. src: "spear_1",
  3462. iPad: 1.3,
  3463. length: 130,
  3464. width: 210,
  3465. xOff: -8,
  3466. yOff: 53,
  3467. dmg: 45,
  3468. knock: .2,
  3469. spdMult: .82,
  3470. range: 142,
  3471. gather: 1,
  3472. speed: 700
  3473. }, {
  3474. id: 6,
  3475. type: 0,
  3476. age: 2,
  3477. name: "bat",
  3478. desc: "fast long range melee weapon",
  3479. src: "bat_1",
  3480. iPad: 1.3,
  3481. length: 110,
  3482. width: 180,
  3483. xOff: -8,
  3484. yOff: 53,
  3485. dmg: 20,
  3486. knock: .7,
  3487. range: 110,
  3488. gather: 1,
  3489. speed: 300
  3490. }, {
  3491. id: 7,
  3492. type: 0,
  3493. age: 2,
  3494. name: "daggers",
  3495. desc: "really fast short range weapon",
  3496. src: "dagger_1",
  3497. iPad: .8,
  3498. length: 110,
  3499. width: 110,
  3500. xOff: 18,
  3501. yOff: 0,
  3502. dmg: 20,
  3503. knock: .1,
  3504. range: 65,
  3505. gather: 1,
  3506. hitSlow: .1,
  3507. spdMult: 1.13,
  3508. speed: 100
  3509. }, {
  3510. id: 8,
  3511. type: 0,
  3512. age: 2,
  3513. name: "stick",
  3514. desc: "great for gathering but very weak",
  3515. src: "stick_1",
  3516. length: 140,
  3517. width: 140,
  3518. xOff: 3,
  3519. yOff: 24,
  3520. dmg: 1,
  3521. spdMult: 1,
  3522. range: 70,
  3523. gather: 7,
  3524. speed: 400
  3525. }, {
  3526. id: 9,
  3527. type: 1,
  3528. age: 6,
  3529. name: "hunting bow",
  3530. desc: "bow used for ranged combat and hunting",
  3531. src: "bow_1",
  3532. req: ["wood", 4],
  3533. length: 120,
  3534. width: 120,
  3535. xOff: -6,
  3536. yOff: 0,
  3537. projectile: 0,
  3538. spdMult: .75,
  3539. speed: 600
  3540. }, {
  3541. id: 10,
  3542. type: 1,
  3543. age: 6,
  3544. name: "great hammer",
  3545. desc: "hammer used for destroying structures",
  3546. src: "great_hammer_1",
  3547. length: 140,
  3548. width: 140,
  3549. xOff: -9,
  3550. yOff: 25,
  3551. dmg: 10,
  3552. spdMult: .88,
  3553. range: 75,
  3554. sDmg: 7.5,
  3555. gather: 1,
  3556. speed: 400
  3557. }, {
  3558. id: 11,
  3559. type: 1,
  3560. age: 6,
  3561. name: "wooden shield",
  3562. desc: "blocks projectiles and reduces melee damage",
  3563. src: "shield_1",
  3564. length: 120,
  3565. width: 120,
  3566. shield: .2,
  3567. xOff: 6,
  3568. yOff: 0,
  3569. spdMult: .7
  3570. }, {
  3571. id: 12,
  3572. type: 1,
  3573. age: 8,
  3574. pre: 9,
  3575. name: "crossbow",
  3576. desc: "deals more damage and has greater range",
  3577. src: "crossbow_1",
  3578. req: ["wood", 5],
  3579. aboveHand: !0,
  3580. armS: .75,
  3581. length: 120,
  3582. width: 120,
  3583. xOff: -4,
  3584. yOff: 0,
  3585. projectile: 2,
  3586. spdMult: .7,
  3587. speed: 700
  3588. }, {
  3589. id: 13,
  3590. type: 1,
  3591. age: 9,
  3592. pre: 12,
  3593. name: "repeater crossbow",
  3594. desc: "high firerate crossbow with reduced damage",
  3595. src: "crossbow_2",
  3596. req: ["wood", 10],
  3597. aboveHand: !0,
  3598. armS: .75,
  3599. length: 120,
  3600. width: 120,
  3601. xOff: -4,
  3602. yOff: 0,
  3603. projectile: 3,
  3604. spdMult: .7,
  3605. speed: 230
  3606. }, {
  3607. id: 14,
  3608. type: 1,
  3609. age: 6,
  3610. name: "mc grabby",
  3611. desc: "steals resources from enemies",
  3612. src: "grab_1",
  3613. length: 130,
  3614. width: 210,
  3615. xOff: -8,
  3616. yOff: 53,
  3617. dmg: 0,
  3618. steal: 250,
  3619. knock: .2,
  3620. spdMult: 1.05,
  3621. range: 125,
  3622. gather: 0,
  3623. speed: 700
  3624. }, {
  3625. id: 15,
  3626. type: 1,
  3627. age: 9,
  3628. pre: 12,
  3629. name: "musket",
  3630. desc: "slow firerate but high damage and range",
  3631. src: "musket_1",
  3632. req: ["stone", 10],
  3633. aboveHand: !0,
  3634. rec: .35,
  3635. armS: .6,
  3636. hndS: .3,
  3637. hndD: 1.6,
  3638. length: 205,
  3639. width: 205,
  3640. xOff: 25,
  3641. yOff: 0,
  3642. projectile: 5,
  3643. hideProjectile: !0,
  3644. spdMult: .6,
  3645. speed: 1500
  3646. }]
  3647. , dt = [{
  3648. group: j[0],
  3649. name: "apple",
  3650. desc: "restores 20 health when consumed",
  3651. req: ["food", 10],
  3652. consume: function(e) {
  3653. return e.changeHealth(20, e)
  3654. },
  3655. scale: 22,
  3656. holdOffset: 15
  3657. }, {
  3658. age: 3,
  3659. group: j[0],
  3660. name: "cookie",
  3661. desc: "restores 40 health when consumed",
  3662. req: ["food", 15],
  3663. consume: function(e) {
  3664. return e.changeHealth(40, e)
  3665. },
  3666. scale: 27,
  3667. holdOffset: 15
  3668. }, {
  3669. age: 7,
  3670. group: j[0],
  3671. name: "cheese",
  3672. desc: "restores 30 health and another 50 over 5 seconds",
  3673. req: ["food", 25],
  3674. consume: function(e) {
  3675. return e.changeHealth(30, e) || e.health < 100 ? (e.dmgOverTime.dmg = -10,
  3676. e.dmgOverTime.doer = e,
  3677. e.dmgOverTime.time = 5,
  3678. !0) : !1
  3679. },
  3680. scale: 27,
  3681. holdOffset: 15
  3682. }, {
  3683. group: j[1],
  3684. name: "wood wall",
  3685. desc: "provides protection for your village",
  3686. req: ["wood", 10],
  3687. projDmg: !0,
  3688. health: 380,
  3689. scale: 50,
  3690. holdOffset: 20,
  3691. placeOffset: -5
  3692. }, {
  3693. age: 3,
  3694. group: j[1],
  3695. name: "stone wall",
  3696. desc: "provides improved protection for your village",
  3697. req: ["stone", 25],
  3698. health: 900,
  3699. scale: 50,
  3700. holdOffset: 20,
  3701. placeOffset: -5
  3702. }, {
  3703. age: 7,
  3704. pre: 1,
  3705. group: j[1],
  3706. name: "castle wall",
  3707. desc: "provides powerful protection for your village",
  3708. req: ["stone", 35],
  3709. health: 1500,
  3710. scale: 52,
  3711. holdOffset: 20,
  3712. placeOffset: -5
  3713. }, {
  3714. group: j[2],
  3715. name: "spikes",
  3716. desc: "damages enemies when they touch them",
  3717. req: ["wood", 20, "stone", 5],
  3718. health: 400,
  3719. dmg: 20,
  3720. scale: 49,
  3721. spritePadding: -23,
  3722. holdOffset: 8,
  3723. placeOffset: -5
  3724. }, {
  3725. age: 5,
  3726. group: j[2],
  3727. name: "greater spikes",
  3728. desc: "damages enemies when they touch them",
  3729. req: ["wood", 30, "stone", 10],
  3730. health: 500,
  3731. dmg: 35,
  3732. scale: 52,
  3733. spritePadding: -23,
  3734. holdOffset: 8,
  3735. placeOffset: -5
  3736. }, {
  3737. age: 9,
  3738. pre: 1,
  3739. group: j[2],
  3740. name: "poison spikes",
  3741. desc: "poisons enemies when they touch them",
  3742. req: ["wood", 35, "stone", 15],
  3743. health: 600,
  3744. dmg: 30,
  3745. pDmg: 5,
  3746. scale: 52,
  3747. spritePadding: -23,
  3748. holdOffset: 8,
  3749. placeOffset: -5
  3750. }, {
  3751. age: 9,
  3752. pre: 2,
  3753. group: j[2],
  3754. name: "spinning spikes",
  3755. desc: "damages enemies when they touch them",
  3756. req: ["wood", 30, "stone", 20],
  3757. health: 500,
  3758. dmg: 45,
  3759. turnSpeed: .003,
  3760. scale: 52,
  3761. spritePadding: -23,
  3762. holdOffset: 8,
  3763. placeOffset: -5
  3764. }, {
  3765. group: j[3],
  3766. name: "windmill",
  3767. desc: "generates gold over time",
  3768. req: ["wood", 50, "stone", 10],
  3769. health: 400,
  3770. pps: 1,
  3771. turnSpeed: windmillrotate ? .0016 : 0,
  3772. spritePadding: 25,
  3773. iconLineMult: 12,
  3774. scale: 45,
  3775. holdOffset: 20,
  3776. placeOffset: 5
  3777. }, {
  3778. age: 5,
  3779. pre: 1,
  3780. group: j[3],
  3781. name: "faster windmill",
  3782. desc: "generates more gold over time",
  3783. req: ["wood", 60, "stone", 20],
  3784. health: 500,
  3785. pps: 1.5,
  3786. turnSpeed: windmillrotate ? .0025 : 0,
  3787. spritePadding: 25,
  3788. iconLineMult: 12,
  3789. scale: 47,
  3790. holdOffset: 20,
  3791. placeOffset: 5
  3792. }, {
  3793. age: 8,
  3794. pre: 1,
  3795. group: j[3],
  3796. name: "power mill",
  3797. desc: "generates more gold over time",
  3798. req: ["wood", 100, "stone", 50],
  3799. health: 800,
  3800. pps: 2,
  3801. turnSpeed: windmillrotate ? .005 : 0,
  3802. spritePadding: 25,
  3803. iconLineMult: 12,
  3804. scale: 47,
  3805. holdOffset: 20,
  3806. placeOffset: 5
  3807. }, {
  3808. age: 5,
  3809. group: j[4],
  3810. type: 2,
  3811. name: "mine",
  3812. desc: "allows you to mine stone",
  3813. req: ["wood", 20, "stone", 100],
  3814. iconLineMult: 12,
  3815. scale: 65,
  3816. holdOffset: 20,
  3817. placeOffset: 0
  3818. }, {
  3819. age: 5,
  3820. group: j[11],
  3821. type: 0,
  3822. name: "sapling",
  3823. desc: "allows you to farm wood",
  3824. req: ["wood", 150],
  3825. iconLineMult: 12,
  3826. colDiv: .5,
  3827. scale: 110,
  3828. holdOffset: 50,
  3829. placeOffset: -15
  3830. }, {
  3831. age: 4,
  3832. group: j[5],
  3833. name: "pit trap",
  3834. desc: "pit that traps enemies if they walk over it",
  3835. req: ["wood", 30, "stone", 30],
  3836. trap: !0,
  3837. ignoreCollision: !0,
  3838. hideFromEnemy: !0,
  3839. health: 500,
  3840. colDiv: .2,
  3841. scale: 50,
  3842. holdOffset: 20,
  3843. placeOffset: -5
  3844. }, {
  3845. age: 4,
  3846. group: j[6],
  3847. name: "boost pad",
  3848. desc: "provides boost when stepped on",
  3849. req: ["stone", 20, "wood", 5],
  3850. ignoreCollision: !0,
  3851. boostSpeed: 1.5,
  3852. health: 150,
  3853. colDiv: .7,
  3854. scale: 45,
  3855. holdOffset: 20,
  3856. placeOffset: -5
  3857. }, {
  3858. age: 7,
  3859. group: j[7],
  3860. doUpdate: !0,
  3861. name: "turret",
  3862. desc: "defensive structure that shoots at enemies",
  3863. req: ["wood", 200, "stone", 150],
  3864. health: 800,
  3865. projectile: 1,
  3866. shootRange: 700,
  3867. shootRate: 2200,
  3868. scale: 43,
  3869. holdOffset: 20,
  3870. placeOffset: -5
  3871. }, {
  3872. age: 7,
  3873. group: j[8],
  3874. name: "platform",
  3875. desc: "platform to shoot over walls and cross over water",
  3876. req: ["wood", 20],
  3877. ignoreCollision: !0,
  3878. zIndex: 1,
  3879. health: 300,
  3880. scale: 43,
  3881. holdOffset: 20,
  3882. placeOffset: -5
  3883. }, {
  3884. age: 7,
  3885. group: j[9],
  3886. name: "healing pad",
  3887. desc: "standing on it will slowly heal you",
  3888. req: ["wood", 30, "food", 10],
  3889. ignoreCollision: !0,
  3890. healCol: 15,
  3891. health: 400,
  3892. colDiv: .7,
  3893. scale: 45,
  3894. holdOffset: 20,
  3895. placeOffset: -5
  3896. }, {
  3897. age: 9,
  3898. group: j[10],
  3899. name: "spawn pad",
  3900. desc: "you will spawn here when you die but it will dissapear",
  3901. req: ["wood", 100, "stone", 100],
  3902. health: 400,
  3903. ignoreCollision: !0,
  3904. spawnPoint: !0,
  3905. scale: 45,
  3906. holdOffset: 20,
  3907. placeOffset: -5
  3908. }, {
  3909. age: 7,
  3910. group: j[12],
  3911. name: "blocker",
  3912. desc: "blocks building in radius",
  3913. req: ["wood", 30, "stone", 25],
  3914. ignoreCollision: !0,
  3915. blocker: 300,
  3916. health: 400,
  3917. colDiv: .7,
  3918. scale: 45,
  3919. holdOffset: 20,
  3920. placeOffset: -5
  3921. }, {
  3922. age: 7,
  3923. group: j[13],
  3924. name: "teleporter",
  3925. desc: "teleports you to a random point on the map",
  3926. req: ["wood", 60, "stone", 60],
  3927. ignoreCollision: !0,
  3928. teleport: !0,
  3929. health: 200,
  3930. colDiv: .7,
  3931. scale: 45,
  3932. holdOffset: 20,
  3933. placeOffset: -5
  3934. }];
  3935. for (let e = 0; e < dt.length; ++e)
  3936. dt[e].id = e,
  3937. dt[e].pre && (dt[e].pre = e - dt[e].pre);
  3938. const R = {
  3939. groups: j,
  3940. projectiles: vc,
  3941. weapons: xc,
  3942. list: dt
  3943. }
  3944. , bc = ["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", "enemyNearsim", "enemyNearss", "enemyNearzm", "enemyNearzz", "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", "qweir", "recktum", "rectum", "retard", "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", "va1enemyNearna", "vag1na", "vagiina", "vagina", "vaj1na", "vaenemyNearna", "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", "enemyNearsm", "kawk", "l3itch", "l3i+ch", "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", "enemyNearzz", "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"]
  3945. , Sc = {
  3946. words: bc
  3947. };
  3948. var Tc = {
  3949. "4r5e": 1,
  3950. "5h1t": 1,
  3951. "5hit": 1,
  3952. a55: 1,
  3953. anal: 1,
  3954. anus: 1,
  3955. ar5e: 1,
  3956. arrse: 1,
  3957. arse: 1,
  3958. ass: 1,
  3959. "ass-fucker": 1,
  3960. asses: 1,
  3961. assfucker: 1,
  3962. assfukka: 1,
  3963. asshole: 1,
  3964. assholes: 1,
  3965. asswhole: 1,
  3966. a_s_s: 1,
  3967. "b!tch": 1,
  3968. b00bs: 1,
  3969. b17ch: 1,
  3970. b1tch: 1,
  3971. ballbag: 1,
  3972. balls: 1,
  3973. ballsack: 1,
  3974. bastard: 1,
  3975. beastial: 1,
  3976. beastiality: 1,
  3977. bellend: 1,
  3978. bestial: 1,
  3979. bestiality: 1,
  3980. "bi+ch": 1,
  3981. biatch: 1,
  3982. bitch: 1,
  3983. bitcher: 1,
  3984. bitchers: 1,
  3985. bitches: 1,
  3986. bitchin: 1,
  3987. bitching: 1,
  3988. bloody: 1,
  3989. "blow job": 1,
  3990. blowjob: 1,
  3991. blowjobs: 1,
  3992. boiolas: 1,
  3993. bollock: 1,
  3994. bollok: 1,
  3995. boner: 1,
  3996. boob: 1,
  3997. boobs: 1,
  3998. booobs: 1,
  3999. boooobs: 1,
  4000. booooobs: 1,
  4001. booooooobs: 1,
  4002. breasts: 1,
  4003. buceta: 1,
  4004. bugger: 1,
  4005. bum: 1,
  4006. "bunny fucker": 1,
  4007. butt: 1,
  4008. butthole: 1,
  4009. buttmuch: 1,
  4010. buttplug: 1,
  4011. c0ck: 1,
  4012. c0cksucker: 1,
  4013. "carpet muncher": 1,
  4014. cawk: 1,
  4015. chink: 1,
  4016. cipa: 1,
  4017. cl1t: 1,
  4018. clit: 1,
  4019. clitoris: 1,
  4020. clits: 1,
  4021. cnut: 1,
  4022. cock: 1,
  4023. "cock-sucker": 1,
  4024. cockface: 1,
  4025. cockhead: 1,
  4026. cockmunch: 1,
  4027. cockmuncher: 1,
  4028. cocks: 1,
  4029. cocksuck: 1,
  4030. cocksucked: 1,
  4031. cocksucker: 1,
  4032. cocksucking: 1,
  4033. cocksucks: 1,
  4034. cocksuka: 1,
  4035. cocksukka: 1,
  4036. cok: 1,
  4037. cokmuncher: 1,
  4038. coksucka: 1,
  4039. coon: 1,
  4040. cox: 1,
  4041. crap: 1,
  4042. cum: 1,
  4043. cummer: 1,
  4044. cumming: 1,
  4045. cums: 1,
  4046. cumshot: 1,
  4047. cunilingus: 1,
  4048. cunillingus: 1,
  4049. cunnilingus: 1,
  4050. cunt: 1,
  4051. cuntlick: 1,
  4052. cuntlicker: 1,
  4053. cuntlicking: 1,
  4054. cunts: 1,
  4055. cyalis: 1,
  4056. cyberfuc: 1,
  4057. cyberfuck: 1,
  4058. cyberfucked: 1,
  4059. cyberfucker: 1,
  4060. cyberfuckers: 1,
  4061. cyberfucking: 1,
  4062. d1ck: 1,
  4063. damn: 1,
  4064. dick: 1,
  4065. dickhead: 1,
  4066. dildo: 1,
  4067. dildos: 1,
  4068. dink: 1,
  4069. dinks: 1,
  4070. dirsa: 1,
  4071. dlck: 1,
  4072. "dog-fucker": 1,
  4073. doggin: 1,
  4074. dogging: 1,
  4075. donkeyribber: 1,
  4076. doosh: 1,
  4077. duche: 1,
  4078. dyke: 1,
  4079. ejaculate: 1,
  4080. ejaculated: 1,
  4081. ejaculates: 1,
  4082. ejaculating: 1,
  4083. ejaculatings: 1,
  4084. ejaculation: 1,
  4085. ejakulate: 1,
  4086. "f u c k": 1,
  4087. "f u c k e r": 1,
  4088. f4nny: 1,
  4089. fag: 1,
  4090. fagging: 1,
  4091. faggitt: 1,
  4092. faggot: 1,
  4093. faggs: 1,
  4094. fagot: 1,
  4095. fagots: 1,
  4096. fags: 1,
  4097. fanny: 1,
  4098. fannyflaps: 1,
  4099. fannyfucker: 1,
  4100. fanyy: 1,
  4101. fatass: 1,
  4102. fcuk: 1,
  4103. fcuker: 1,
  4104. fcuking: 1,
  4105. feck: 1,
  4106. fecker: 1,
  4107. felching: 1,
  4108. fellate: 1,
  4109. fellatio: 1,
  4110. fingerfuck: 1,
  4111. fingerfucked: 1,
  4112. fingerfucker: 1,
  4113. fingerfuckers: 1,
  4114. fingerfucking: 1,
  4115. fingerfucks: 1,
  4116. fistfuck: 1,
  4117. fistfucked: 1,
  4118. fistfucker: 1,
  4119. fistfuckers: 1,
  4120. fistfucking: 1,
  4121. fistfuckings: 1,
  4122. fistfucks: 1,
  4123. flange: 1,
  4124. fook: 1,
  4125. fooker: 1,
  4126. fuck: 1,
  4127. fucka: 1,
  4128. fucked: 1,
  4129. fucker: 1,
  4130. fuckers: 1,
  4131. fuckhead: 1,
  4132. fuckheads: 1,
  4133. fuckin: 1,
  4134. fucking: 1,
  4135. fuckings: 1,
  4136. fuckingshitmotherfucker: 1,
  4137. fuckme: 1,
  4138. fucks: 1,
  4139. fuckwhit: 1,
  4140. fuckwit: 1,
  4141. "fudge packer": 1,
  4142. fudgepacker: 1,
  4143. fuk: 1,
  4144. fuker: 1,
  4145. fukker: 1,
  4146. fukkin: 1,
  4147. fuks: 1,
  4148. fukwhit: 1,
  4149. fukwit: 1,
  4150. fux: 1,
  4151. fux0r: 1,
  4152. f_u_c_k: 1,
  4153. gangbang: 1,
  4154. gangbanged: 1,
  4155. gangbangs: 1,
  4156. gaylord: 1,
  4157. gaysex: 1,
  4158. goatse: 1,
  4159. God: 1,
  4160. "god-dam": 1,
  4161. "god-damned": 1,
  4162. goddamn: 1,
  4163. goddamned: 1,
  4164. hardcoresex: 1,
  4165. hell: 1,
  4166. heshe: 1,
  4167. hoar: 1,
  4168. hoare: 1,
  4169. hoer: 1,
  4170. homo: 1,
  4171. hore: 1,
  4172. horniest: 1,
  4173. horny: 1,
  4174. hotsex: 1,
  4175. "jack-off": 1,
  4176. jackoff: 1,
  4177. jap: 1,
  4178. "jerk-off": 1,
  4179. enemyNearsm: 1,
  4180. enemyNearz: 1,
  4181. enemyNearzm: 1,
  4182. enemyNearzz: 1,
  4183. kawk: 1,
  4184. knob: 1,
  4185. knobead: 1,
  4186. knobed: 1,
  4187. knobend: 1,
  4188. knobhead: 1,
  4189. knobjocky: 1,
  4190. knobjokey: 1,
  4191. kock: 1,
  4192. kondum: 1,
  4193. kondums: 1,
  4194. kum: 1,
  4195. kummer: 1,
  4196. kumming: 1,
  4197. kums: 1,
  4198. kunilingus: 1,
  4199. "l3i+ch": 1,
  4200. l3itch: 1,
  4201. labia: 1,
  4202. lust: 1,
  4203. lusting: 1,
  4204. m0f0: 1,
  4205. m0fo: 1,
  4206. m45terbate: 1,
  4207. ma5terb8: 1,
  4208. ma5terbate: 1,
  4209. masochist: 1,
  4210. "master-bate": 1,
  4211. masterb8: 1,
  4212. "masterbat*": 1,
  4213. masterbat3: 1,
  4214. masterbate: 1,
  4215. masterbation: 1,
  4216. masterbations: 1,
  4217. masturbate: 1,
  4218. "mo-fo": 1,
  4219. mof0: 1,
  4220. mofo: 1,
  4221. mothafuck: 1,
  4222. mothafucka: 1,
  4223. mothafuckas: 1,
  4224. mothafuckaz: 1,
  4225. mothafucked: 1,
  4226. mothafucker: 1,
  4227. mothafuckers: 1,
  4228. mothafuckin: 1,
  4229. mothafucking: 1,
  4230. mothafuckings: 1,
  4231. mothafucks: 1,
  4232. "mother fucker": 1,
  4233. motherfuck: 1,
  4234. motherfucked: 1,
  4235. motherfucker: 1,
  4236. motherfuckers: 1,
  4237. motherfuckin: 1,
  4238. motherfucking: 1,
  4239. motherfuckings: 1,
  4240. motherfuckka: 1,
  4241. motherfucks: 1,
  4242. muff: 1,
  4243. mutha: 1,
  4244. muthafecker: 1,
  4245. muthafuckker: 1,
  4246. muther: 1,
  4247. mutherfucker: 1,
  4248. n1gga: 1,
  4249. n1gger: 1,
  4250. nazi: 1,
  4251. nigg3r: 1,
  4252. nigg4h: 1,
  4253. nigga: 1,
  4254. niggah: 1,
  4255. niggas: 1,
  4256. niggaz: 1,
  4257. nigger: 1,
  4258. niggers: 1,
  4259. nob: 1,
  4260. "nob jokey": 1,
  4261. nobhead: 1,
  4262. nobjocky: 1,
  4263. nobjokey: 1,
  4264. numbnuts: 1,
  4265. nutsack: 1,
  4266. orgasim: 1,
  4267. orgasims: 1,
  4268. orgasm: 1,
  4269. orgasms: 1,
  4270. p0rn: 1,
  4271. pawn: 1,
  4272. pecker: 1,
  4273. penis: 1,
  4274. penisfucker: 1,
  4275. phonesex: 1,
  4276. phuck: 1,
  4277. phuk: 1,
  4278. phuked: 1,
  4279. phuking: 1,
  4280. phukked: 1,
  4281. phukking: 1,
  4282. phuks: 1,
  4283. phuq: 1,
  4284. pigfucker: 1,
  4285. pimpis: 1,
  4286. piss: 1,
  4287. pissed: 1,
  4288. pisser: 1,
  4289. pissers: 1,
  4290. pisses: 1,
  4291. pissflaps: 1,
  4292. pissin: 1,
  4293. pissing: 1,
  4294. pissoff: 1,
  4295. poop: 1,
  4296. porn: 1,
  4297. porno: 1,
  4298. pornography: 1,
  4299. pornos: 1,
  4300. prick: 1,
  4301. pricks: 1,
  4302. pron: 1,
  4303. pube: 1,
  4304. pusse: 1,
  4305. pussi: 1,
  4306. pussies: 1,
  4307. pussy: 1,
  4308. pussys: 1,
  4309. rectum: 1,
  4310. retard: 1,
  4311. rimjaw: 1,
  4312. rimming: 1,
  4313. "s hit": 1,
  4314. "s.o.b.": 1,
  4315. sadist: 1,
  4316. schlong: 1,
  4317. screwing: 1,
  4318. scroat: 1,
  4319. scrote: 1,
  4320. scrotum: 1,
  4321. semen: 1,
  4322. sex: 1,
  4323. "sh!+": 1,
  4324. "sh!t": 1,
  4325. sh1t: 1,
  4326. shag: 1,
  4327. shagger: 1,
  4328. shaggin: 1,
  4329. shagging: 1,
  4330. shemale: 1,
  4331. "shi+": 1,
  4332. shit: 1,
  4333. shitdick: 1,
  4334. shite: 1,
  4335. shited: 1,
  4336. shitey: 1,
  4337. shitfuck: 1,
  4338. shitfull: 1,
  4339. shithead: 1,
  4340. shiting: 1,
  4341. shitings: 1,
  4342. shits: 1,
  4343. shitted: 1,
  4344. shitter: 1,
  4345. shitters: 1,
  4346. shitting: 1,
  4347. shittings: 1,
  4348. shitty: 1,
  4349. skank: 1,
  4350. slut: 1,
  4351. sluts: 1,
  4352. smegma: 1,
  4353. smut: 1,
  4354. snatch: 1,
  4355. "son-of-a-bitch": 1,
  4356. spac: 1,
  4357. spunk: 1,
  4358. s_h_i_t: 1,
  4359. t1tt1e5: 1,
  4360. t1tties: 1,
  4361. teets: 1,
  4362. teez: 1,
  4363. testical: 1,
  4364. testicle: 1,
  4365. tit: 1,
  4366. titfuck: 1,
  4367. tits: 1,
  4368. titt: 1,
  4369. tittie5: 1,
  4370. tittiefucker: 1,
  4371. titties: 1,
  4372. tittyfuck: 1,
  4373. tittywank: 1,
  4374. titwank: 1,
  4375. tosser: 1,
  4376. turd: 1,
  4377. tw4t: 1,
  4378. twat: 1,
  4379. twathead: 1,
  4380. twatty: 1,
  4381. twunt: 1,
  4382. twunter: 1,
  4383. v14gra: 1,
  4384. v1gra: 1,
  4385. vagina: 1,
  4386. viagra: 1,
  4387. vulva: 1,
  4388. w00se: 1,
  4389. wang: 1,
  4390. wank: 1,
  4391. wanker: 1,
  4392. wanky: 1,
  4393. whoar: 1,
  4394. whore: 1,
  4395. willies: 1,
  4396. willy: 1,
  4397. xrated: 1,
  4398. xxx: 1
  4399. }
  4400. , Ic = ["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", "enemyNearsm", "enemyNearz", "enemyNearzm", "enemyNearzz", "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", "retard", "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"]
  4401. , Mc = /\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|enemyNearsm|enemyNearz|enemyNearzm|enemyNearzz|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|retard|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
  4402. , Ec = {
  4403. object: Tc,
  4404. array: Ic,
  4405. regex: Mc
  4406. };
  4407. const Pc = Sc.words
  4408. , Cc = Ec.array;
  4409. class Ac {
  4410. constructor(t={}) {
  4411. Object.assign(this, {
  4412. list: t.emptyList && [] || Array.prototype.concat.apply(Pc, [Cc, t.list || []]),
  4413. exclude: t.exclude || [],
  4414. splitRegex: t.splitRegex || /\b/,
  4415. placeHolder: t.placeHolder || "*",
  4416. regex: t.regex || /[^a-zA-Z0-9|\$|\@]|\^/g,
  4417. replaceRegex: t.replaceRegex || /\w/g
  4418. })
  4419. }
  4420. isProfane(t) {
  4421. return this.list.filter(i=>{
  4422. const s = new RegExp(`\\b ${i.replace(/(\W)/g, "\\$1")}\\b`,"gi");
  4423. return !this.exclude.includes(i.toLowerCase()) && s.test(t)
  4424. }
  4425. ).length > 0 || !1
  4426. }
  4427. replaceWord(t) {
  4428. return t.replace(this.regex, "").replace(this.replaceRegex, this.placeHolder)
  4429. }
  4430. clean(t) {
  4431. return t.split(this.splitRegex).map(i=>this.isProfane(i) ? this.replaceWord(i) : i).join(this.splitRegex.exec(t)[0])
  4432. }
  4433. addWords() {
  4434. let t = Array.from(arguments);
  4435. this.list.push(...t),
  4436. t.map(i=>i.toLowerCase()).forEach(i=>{
  4437. this.exclude.includes(i) && this.exclude.splice(this.exclude.indexOf(i), 1)
  4438. }
  4439. )
  4440. }
  4441. removeWords() {
  4442. this.exclude.push(...Array.from(arguments).map(t=>t.toLowerCase()))
  4443. }
  4444. }
  4445. var Dc = Ac;
  4446. const Yr = new Dc
  4447. , Oc = ["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"];
  4448. Yr.addWords(...Oc);
  4449. const _s = Math.abs
  4450. , at = Math.cos
  4451. , lt = Math.sin
  4452. , Bs = Math.pow
  4453. , Rc = Math.sqrt;
  4454. function _c(e, t, i, s, n, r, o, l, c, a, u, p, h, m) {
  4455. this.id = e,
  4456. this.sid = t,
  4457. this.tmpScore = 0,
  4458. this.team = null,
  4459. this.skinIndex = 0,
  4460. this.tailIndex = 0,
  4461. this.hitTime = 0,
  4462. this.tails = {};
  4463. for (var w = 0; w < u.length; ++w)
  4464. u[w].price <= 0 && (this.tails[u[w].id] = 1);
  4465. this.skins = {};
  4466. for (var w = 0; w < a.length; ++w)
  4467. a[w].price <= 0 && (this.skins[a[w].id] = 1);
  4468. this.points = 0,
  4469. this.dt = 0,
  4470. this.hidden = !1,
  4471. this.itemCounts = {},
  4472. this.isPlayer = !0,
  4473. this.pps = 0,
  4474. this.moveDir = void 0,
  4475. this.skinRot = 0,
  4476. this.lastPing = 0,
  4477. this.iconIndex = 0,
  4478. this.skinColor = 0,
  4479. this.spawn = function(k) {
  4480. this.active = !0,
  4481. this.alive = !0,
  4482. this.lockMove = !1,
  4483. this.lockDir = !1,
  4484. this.minimapCounter = 0,
  4485. this.chatCountdown = 0,
  4486. this.shameCount = 0,
  4487. this.shameTimer = 0,
  4488. this.sentTo = {},
  4489. this.gathering = 0,
  4490. this.autoGather = 0,
  4491. this.animTime = 0,
  4492. this.animSpeed = 0,
  4493. this.mouseState = 0,
  4494. this.buildIndex = -1,
  4495. this.weaponIndex = 0,
  4496. this.dmgOverTime = {},
  4497. this.noMovTimer = 0,
  4498. this.maxXP = 300,
  4499. this.XP = 0,
  4500. this.age = 1,
  4501. this.kills = 0,
  4502. this.upgrAge = 2,
  4503. this.upgradePoints = 0,
  4504. this.x = 0,
  4505. this.y = 0,
  4506. this.zIndex = 0,
  4507. this.xVel = 0,
  4508. this.yVel = 0,
  4509. this.slowMult = 1,
  4510. this.dir = 0,
  4511. this.dirPlus = 0,
  4512. this.targetDir = 0,
  4513. this.targetAngle = 0,
  4514. this.maxHealth = 100,
  4515. this.health = this.maxHealth,
  4516. this.scale = i.playerScale,
  4517. this.speed = i.playerSpeed,
  4518. this.resetMoveDir(),
  4519. this.resetResources(k),
  4520. this.items = [0, 3, 6, 10],
  4521. this.weapons = [0],
  4522. this.shootCount = 0,
  4523. this.weaponXP = [],
  4524. this.reloads = {},
  4525. this.timeSpentNearVolcano = 0
  4526. }
  4527. ,
  4528. this.resetMoveDir = function() {
  4529. this.moveDir = void 0
  4530. }
  4531. ,
  4532. this.resetResources = function(k) {
  4533. for (let S = 0; S < i.resourceTypes.length; ++S)
  4534. this[i.resourceTypes[S]] = k ? 100 : 0
  4535. }
  4536. ,
  4537. this.addItem = function(k) {
  4538. const S = c.list[k];
  4539. if (S) {
  4540. for (let O = 0; O < this.items.length; ++O)
  4541. if (c.list[this.items[O]].group == S.group)
  4542. return this.buildIndex == this.items[O] && (this.buildIndex = k),
  4543. this.items[O] = k,
  4544. !0;
  4545. return this.items.push(k),
  4546. !0
  4547. }
  4548. return !1
  4549. }
  4550. ,
  4551. this.setUserData = function(k) {
  4552. if (k) {
  4553. this.name = "unknown";
  4554. let S = k.name + "";
  4555. S = S.slice(0, i.maxNameLength),
  4556. S = S.replace(/[^\w:\(\)\/? -]+/gmi, " "),
  4557. S = S.replace(/[^\x00-\x7F]/g, " "),
  4558. S = S.trim();
  4559. let O = !1;
  4560. const U = S.toLowerCase().replace(/\s/g, "").replace(/1/g, "i").replace(/0/g, "o").replace(/5/g, "s");
  4561. for (const L of Yr.list)
  4562. if (U.indexOf(L) != -1) {
  4563. O = !0;
  4564. break
  4565. }
  4566. S.length > 0 && !O && (this.name = S),
  4567. this.skinColor = 0,
  4568. i.skinColors[k.skin] && (this.skinColor = k.skin)
  4569. }
  4570. }
  4571. ,
  4572. this.getData = function() {
  4573. return [this.id, this.sid, this.name, s.fixTo(this.x, 2), s.fixTo(this.y, 2), s.fixTo(this.dir, 3), this.health, this.maxHealth, this.scale, this.skinColor]
  4574. }
  4575. ,
  4576. this.setData = function(k) {
  4577. this.id = k[0],
  4578. this.sid = k[1],
  4579. this.name = k[2],
  4580. this.x = k[3],
  4581. this.y = k[4],
  4582. this.dir = k[5],
  4583. this.health = k[6],
  4584. this.maxHealth = k[7],
  4585. this.scale = k[8],
  4586. this.skinColor = k[9]
  4587. }
  4588. ;
  4589. let v = 0;
  4590. this.update = function(k) {
  4591. if (!this.alive)
  4592. return;
  4593. if ((s.getDistance(this.x, this.y, i.volcanoLocationX, i.volcanoLocationY) || 0) < i.volcanoAggressionRadius && (this.timeSpentNearVolcano += k,
  4594. this.timeSpentNearVolcano >= 1e3 && (this.changeHealth(i.volcanoDamagePerSecond, null),
  4595. p.send(this.id, "8", Math.round(this.x), Math.round(this.y), i.volcanoDamagePerSecond, -1),
  4596. this.timeSpentNearVolcano %= 1e3)),
  4597. this.shameTimer > 0 && (this.shameTimer -= k,
  4598. this.shameTimer <= 0 && (this.shameTimer = 0,
  4599. this.shameCount = 0)),
  4600. v -= k,
  4601. v <= 0) {
  4602. const _ = (this.skin && this.skin.healthRegen ? this.skin.healthRegen : 0) + (this.tail && this.tail.healthRegen ? this.tail.healthRegen : 0);
  4603. _ && this.changeHealth(_, this),
  4604. this.dmgOverTime.dmg && (this.changeHealth(-this.dmgOverTime.dmg, this.dmgOverTime.doer),
  4605. this.dmgOverTime.time -= 1,
  4606. this.dmgOverTime.time <= 0 && (this.dmgOverTime.dmg = 0)),
  4607. this.healCol && this.changeHealth(this.healCol, this),
  4608. v = 1e3
  4609. }
  4610. if (!this.alive)
  4611. return;
  4612. if (this.slowMult < 1 && (this.slowMult += 8e-4 * k,
  4613. this.slowMult > 1 && (this.slowMult = 1)),
  4614. this.noMovTimer += k,
  4615. (this.xVel || this.yVel) && (this.noMovTimer = 0),
  4616. this.lockMove)
  4617. this.xVel = 0,
  4618. this.yVel = 0;
  4619. else {
  4620. let _ = (this.buildIndex >= 0 ? .5 : 1) * (c.weapons[this.weaponIndex].spdMult || 1) * (this.skin && this.skin.spdMult || 1) * (this.tail && this.tail.spdMult || 1) * (this.y <= i.snowBiomeTop ? this.skin && this.skin.coldM ? 1 : i.snowSpeed : 1) * this.slowMult;
  4621. !this.zIndex && this.y >= i.mapScale / 2 - i.riverWidth / 2 && this.y <= i.mapScale / 2 + i.riverWidth / 2 && (this.skin && this.skin.watrImm ? (_ *= .75,
  4622. this.xVel += i.waterCurrent * .4 * k) : (_ *= .33,
  4623. this.xVel += i.waterCurrent * k));
  4624. let $ = this.moveDir != null ? at(this.moveDir) : 0
  4625. , V = this.moveDir != null ? lt(this.moveDir) : 0;
  4626. const z = Rc($ * $ + V * V);
  4627. z != 0 && ($ /= z,
  4628. V /= z),
  4629. $ && (this.xVel += $ * this.speed * _ * k),
  4630. V && (this.yVel += V * this.speed * _ * k)
  4631. }
  4632. this.zIndex = 0,
  4633. this.lockMove = !1,
  4634. this.healCol = 0;
  4635. let O;
  4636. const U = s.getDistance(0, 0, this.xVel * k, this.yVel * k)
  4637. , L = Math.min(4, Math.max(1, Math.round(U / 40)))
  4638. , q = 1 / L;
  4639. let P = {};
  4640. for (var W = 0; W < L; ++W) {
  4641. this.xVel && (this.x += this.xVel * k * q),
  4642. this.yVel && (this.y += this.yVel * k * q),
  4643. O = r.getGridArrays(this.x, this.y, this.scale);
  4644. for (let _ = 0; _ < O.length; ++_) {
  4645. for (let $ = 0; $ < O[_].length && !(O[_][$].active && !P[O[_][$].sid] && r.checkCollision(this, O[_][$], q) && (P[O[_][$].sid] = !0,
  4646. !this.alive)); ++$)
  4647. ;
  4648. if (!this.alive)
  4649. break
  4650. }
  4651. if (!this.alive)
  4652. break
  4653. }
  4654. for (var F = o.indexOf(this), W = F + 1; W < o.length; ++W)
  4655. o[W] != this && o[W].alive && r.checkCollision(this, o[W]);
  4656. if (this.xVel && (this.xVel *= Bs(i.playerDecel, k),
  4657. this.xVel <= .01 && this.xVel >= -.01 && (this.xVel = 0)),
  4658. this.yVel && (this.yVel *= Bs(i.playerDecel, k),
  4659. this.yVel <= .01 && this.yVel >= -.01 && (this.yVel = 0)),
  4660. this.x - this.scale < 0 ? this.x = this.scale : this.x + this.scale > i.mapScale && (this.x = i.mapScale - this.scale),
  4661. this.y - this.scale < 0 ? this.y = this.scale : this.y + this.scale > i.mapScale && (this.y = i.mapScale - this.scale),
  4662. this.buildIndex < 0) {
  4663. if (this.reloads[this.weaponIndex] > 0)
  4664. this.reloads[this.weaponIndex] -= k,
  4665. this.gathering = this.mouseState;
  4666. else if (this.gathering || this.autoGather) {
  4667. let _ = !0;
  4668. if (c.weapons[this.weaponIndex].gather != null)
  4669. this.gather(o);
  4670. else if (c.weapons[this.weaponIndex].projectile != null && this.hasRes(c.weapons[this.weaponIndex], this.skin ? this.skin.projCost : 0)) {
  4671. this.useRes(c.weapons[this.weaponIndex], this.skin ? this.skin.projCost : 0),
  4672. this.noMovTimer = 0;
  4673. var F = c.weapons[this.weaponIndex].projectile;
  4674. const V = this.scale * 2
  4675. , z = this.skin && this.skin.aMlt ? this.skin.aMlt : 1;
  4676. c.weapons[this.weaponIndex].rec && (this.xVel -= c.weapons[this.weaponIndex].rec * at(this.dir),
  4677. this.yVel -= c.weapons[this.weaponIndex].rec * lt(this.dir)),
  4678. n.addProjectile(this.x + V * at(this.dir), this.y + V * lt(this.dir), this.dir, c.projectiles[F].range * z, c.projectiles[F].speed * z, F, this, null, this.zIndex)
  4679. } else
  4680. _ = !1;
  4681. this.gathering = this.mouseState,
  4682. _ && (this.reloads[this.weaponIndex] = c.weapons[this.weaponIndex].speed * (this.skin && this.skin.atkSpd || 1))
  4683. }
  4684. }
  4685. }
  4686. ,
  4687. this.addWeaponXP = function(k) {
  4688. this.weaponXP[this.weaponIndex] || (this.weaponXP[this.weaponIndex] = 0),
  4689. this.weaponXP[this.weaponIndex] += k
  4690. }
  4691. ,
  4692. this.earnXP = function(k) {
  4693. this.age < i.maxAge && (this.XP += k,
  4694. this.XP >= this.maxXP ? (this.age < i.maxAge ? (this.age++,
  4695. this.XP = 0,
  4696. this.maxXP *= 1.2) : this.XP = this.maxXP,
  4697. this.upgradePoints++,
  4698. p.send(this.id, "U", this.upgradePoints, this.upgrAge),
  4699. p.send(this.id, "T", this.XP, s.fixTo(this.maxXP, 1), this.age)) : p.send(this.id, "T", this.XP))
  4700. }
  4701. ,
  4702. this.changeHealth = function(k, S) {
  4703. if (k > 0 && this.health >= this.maxHealth)
  4704. return !1;
  4705. k < 0 && this.skin && (k *= this.skin.dmgMult || 1),
  4706. k < 0 && this.tail && (k *= this.tail.dmgMult || 1),
  4707. k < 0 && (this.hitTime = Date.now()),
  4708. this.health += k,
  4709. this.health > this.maxHealth && (k -= this.health - this.maxHealth,
  4710. this.health = this.maxHealth),
  4711. this.health <= 0 && this.kill(S);
  4712. for (let O = 0; O < o.length; ++O)
  4713. this.sentTo[o[O].id] && p.send(o[O].id, "O", this.sid, this.health);
  4714. return S && S.canSee(this) && !(S == this && k < 0) && p.send(S.id, "8", Math.round(this.x), Math.round(this.y), Math.round(-k), 1),
  4715. !0
  4716. }
  4717. ,
  4718. this.kill = function(k) {
  4719. k && k.alive && (k.kills++,
  4720. k.skin && k.skin.goldSteal ? h(k, Math.round(this.points / 2)) : h(k, Math.round(this.age * 100 * (k.skin && k.skin.kScrM ? k.skin.kScrM : 1))),
  4721. p.send(k.id, "N", "kills", k.kills, 1)),
  4722. this.alive = !1,
  4723. p.send(this.id, "P"),
  4724. m()
  4725. }
  4726. ,
  4727. this.addResource = function(k, S, O) {
  4728. !O && S > 0 && this.addWeaponXP(S),
  4729. k == 3 ? h(this, S, !0) : (this[i.resourceTypes[k]] += S,
  4730. p.send(this.id, "N", i.resourceTypes[k], this[i.resourceTypes[k]], 1))
  4731. }
  4732. ,
  4733. this.changeItemCount = function(k, S) {
  4734. this.itemCounts[k] = this.itemCounts[k] || 0,
  4735. this.itemCounts[k] += S,
  4736. p.send(this.id, "S", k, this.itemCounts[k])
  4737. }
  4738. ,
  4739. this.buildItem = function(k) {
  4740. const S = this.scale + k.scale + (k.placeOffset || 0)
  4741. , O = this.x + S * at(this.dir)
  4742. , U = this.y + S * lt(this.dir);
  4743. if (this.canBuild(k) && !(k.consume && this.skin && this.skin.noEat) && (k.consume || r.checkItemLocation(O, U, k.scale, .6, k.id, !1, this))) {
  4744. let L = !1;
  4745. if (k.consume) {
  4746. if (this.hitTime) {
  4747. const q = Date.now() - this.hitTime;
  4748. this.hitTime = 0,
  4749. q <= 120 ? (this.shameCount++,
  4750. this.shameCount >= 8 && (this.shameTimer = 3e4,
  4751. this.shameCount = 0)) : (this.shameCount -= 2,
  4752. this.shameCount <= 0 && (this.shameCount = 0))
  4753. }
  4754. this.shameTimer <= 0 && (L = k.consume(this))
  4755. } else
  4756. L = !0,
  4757. k.group.limit && this.changeItemCount(k.group.id, 1),
  4758. k.pps && (this.pps += k.pps),
  4759. r.add(r.objects.length, O, U, this.dir, k.scale, k.type, k, !1, this);
  4760. L && (this.useRes(k),
  4761. this.buildIndex = -1)
  4762. }
  4763. }
  4764. ,
  4765. this.hasRes = function(k, S) {
  4766. for (let O = 0; O < k.req.length; ) {
  4767. if (this[k.req[O]] < Math.round(k.req[O + 1] * (S || 1)))
  4768. return !1;
  4769. O += 2
  4770. }
  4771. return !0
  4772. }
  4773. ,
  4774. this.useRes = function(k, S) {
  4775. if (!i.inSandbox)
  4776. for (let O = 0; O < k.req.length; )
  4777. this.addResource(i.resourceTypes.indexOf(k.req[O]), -Math.round(k.req[O + 1] * (S || 1))),
  4778. O += 2
  4779. }
  4780. ,
  4781. this.canBuild = function(k) {
  4782. const S = i.inSandbox ? k.group.sandboxLimit || Math.max(k.group.limit * 3, 99) : k.group.limit;
  4783. return S && this.itemCounts[k.group.id] >= S ? !1 : i.inSandbox ? !0 : this.hasRes(k)
  4784. }
  4785. ,
  4786. this.gather = function() {
  4787. this.noMovTimer = 0,
  4788. this.slowMult -= c.weapons[this.weaponIndex].hitSlow || .3,
  4789. this.slowMult < 0 && (this.slowMult = 0);
  4790. const k = i.fetchVariant(this)
  4791. , S = k.poison
  4792. , O = k.val
  4793. , U = {};
  4794. let L, q, P, W;
  4795. const F = r.getGridArrays(this.x, this.y, c.weapons[this.weaponIndex].range);
  4796. for (let $ = 0; $ < F.length; ++$)
  4797. for (var _ = 0; _ < F[$].length; ++_)
  4798. if (P = F[$][_],
  4799. P.active && !P.dontGather && !U[P.sid] && P.visibleToPlayer(this) && (L = s.getDistance(this.x, this.y, P.x, P.y) - P.scale,
  4800. L <= c.weapons[this.weaponIndex].range && (q = s.getDirection(P.x, P.y, this.x, this.y),
  4801. s.getAngleDist(q, this.dir) <= i.gatherAngle))) {
  4802. if (U[P.sid] = 1,
  4803. P.health) {
  4804. if (P.changeHealth(-c.weapons[this.weaponIndex].dmg * O * (c.weapons[this.weaponIndex].sDmg || 1) * (this.skin && this.skin.bDmg ? this.skin.bDmg : 1), this)) {
  4805. for (let V = 0; V < P.req.length; )
  4806. this.addResource(i.resourceTypes.indexOf(P.req[V]), P.req[V + 1]),
  4807. V += 2;
  4808. r.disableObj(P)
  4809. }
  4810. } else {
  4811. if (P.name === "volcano")
  4812. this.hitVolcano(c.weapons[this.weaponIndex].gather);
  4813. else {
  4814. this.earnXP(4 * c.weapons[this.weaponIndex].gather);
  4815. const V = c.weapons[this.weaponIndex].gather + (P.type == 3 ? 4 : 0);
  4816. this.addResource(P.type, V)
  4817. }
  4818. this.skin && this.skin.extraGold && this.addResource(3, 1)
  4819. }
  4820. W = !0,
  4821. r.hitObj(P, q)
  4822. }
  4823. for (var _ = 0; _ < o.length + l.length; ++_)
  4824. if (P = o[_] || l[_ - o.length],
  4825. P != this && P.alive && !(P.team && P.team == this.team) && (L = s.getDistance(this.x, this.y, P.x, P.y) - P.scale * 1.8,
  4826. L <= c.weapons[this.weaponIndex].range && (q = s.getDirection(P.x, P.y, this.x, this.y),
  4827. s.getAngleDist(q, this.dir) <= i.gatherAngle))) {
  4828. let V = c.weapons[this.weaponIndex].steal;
  4829. V && P.addResource && (V = Math.min(P.points || 0, V),
  4830. this.addResource(3, V),
  4831. P.addResource(3, -V));
  4832. let z = O;
  4833. P.weaponIndex != null && c.weapons[P.weaponIndex].shield && s.getAngleDist(q + Math.PI, P.dir) <= i.shieldAngle && (z = c.weapons[P.weaponIndex].shield);
  4834. const X = c.weapons[this.weaponIndex].dmg
  4835. , G = X * (this.skin && this.skin.dmgMultO ? this.skin.dmgMultO : 1) * (this.tail && this.tail.dmgMultO ? this.tail.dmgMultO : 1)
  4836. , te = .3 * (P.weightM || 1) + (c.weapons[this.weaponIndex].knock || 0);
  4837. P.xVel += te * at(q),
  4838. P.yVel += te * lt(q),
  4839. this.skin && this.skin.healD && this.changeHealth(G * z * this.skin.healD, this),
  4840. this.tail && this.tail.healD && this.changeHealth(G * z * this.tail.healD, this),
  4841. P.skin && P.skin.dmg && this.changeHealth(-X * P.skin.dmg, P),
  4842. P.tail && P.tail.dmg && this.changeHealth(-X * P.tail.dmg, P),
  4843. P.dmgOverTime && this.skin && this.skin.poisonDmg && !(P.skin && P.skin.poisonRes) && (P.dmgOverTime.dmg = this.skin.poisonDmg,
  4844. P.dmgOverTime.time = this.skin.poisonTime || 1,
  4845. P.dmgOverTime.doer = this),
  4846. P.dmgOverTime && S && !(P.skin && P.skin.poisonRes) && (P.dmgOverTime.dmg = 5,
  4847. P.dmgOverTime.time = 5,
  4848. P.dmgOverTime.doer = this),
  4849. P.skin && P.skin.dmgK && (this.xVel -= P.skin.dmgK * at(q),
  4850. this.yVel -= P.skin.dmgK * lt(q)),
  4851. P.changeHealth(-G * z, this, this)
  4852. }
  4853. this.sendAnimation(W ? 1 : 0)
  4854. }
  4855. ,
  4856. this.hitVolcano = function(k) {
  4857. const S = 5 + Math.round(k / 3.5);
  4858. this.addResource(2, S),
  4859. this.addResource(3, S)
  4860. }
  4861. ,
  4862. this.sendAnimation = function(k) {
  4863. for (let S = 0; S < o.length; ++S)
  4864. this.sentTo[o[S].id] && this.canSee(o[S]) && p.send(o[S].id, "K", this.sid, k ? 1 : 0, this.weaponIndex)
  4865. }
  4866. ;
  4867. let x = 0
  4868. , D = 0;
  4869. this.animate = function(k) {
  4870. this.animTime > 0 && (this.animTime -= k,
  4871. this.animTime <= 0 ? (this.animTime = 0,
  4872. this.dirPlus = 0,
  4873. x = 0,
  4874. D = 0) : D == 0 ? (x += k / (this.animSpeed * i.hitReturnRatio),
  4875. this.dirPlus = s.lerp(0, this.targetAngle, Math.min(1, x)),
  4876. x >= 1 && (x = 1,
  4877. D = 1)) : (x -= k / (this.animSpeed * (1 - i.hitReturnRatio)),
  4878. this.dirPlus = s.lerp(0, this.targetAngle, Math.max(0, x))))
  4879. }
  4880. ,
  4881. this.startAnim = function(k, S) {
  4882. this.animTime = this.animSpeed = c.weapons[S].speed,
  4883. this.targetAngle = k ? -i.hitAngle : -Math.PI,
  4884. x = 0,
  4885. D = 0
  4886. }
  4887. ,
  4888. this.canSee = function(k) {
  4889. if (!k || k.skin && k.skin.invisTimer && k.noMovTimer >= k.skin.invisTimer)
  4890. return !1;
  4891. const S = _s(k.x - this.x) - k.scale
  4892. , O = _s(k.y - this.y) - k.scale;
  4893. return S <= i.maxScreenWidth / 2 * 1.3 && O <= i.maxScreenHeight / 2 * 1.3
  4894. }
  4895. }
  4896.  
  4897. const Bc = [{
  4898. id: 45,
  4899. name: "Shame!",
  4900. dontSell: !0,
  4901. price: 0,
  4902. scale: 120,
  4903. desc: "hacks are for losers"
  4904. }, {
  4905. id: 51,
  4906. name: "Moo Cap",
  4907. price: 0,
  4908. scale: 120,
  4909. desc: "coolest mooer around"
  4910. }, {
  4911. id: 50,
  4912. name: "Apple Cap",
  4913. price: 0,
  4914. scale: 120,
  4915. desc: "apple farms remembers"
  4916. }, {
  4917. id: 28,
  4918. name: "Moo Head",
  4919. price: 0,
  4920. scale: 120,
  4921. desc: "no effect"
  4922. }, {
  4923. id: 29,
  4924. name: "Pig Head",
  4925. price: 0,
  4926. scale: 120,
  4927. desc: "no effect"
  4928. }, {
  4929. id: 30,
  4930. name: "Fluff Head",
  4931. price: 0,
  4932. scale: 120,
  4933. desc: "no effect"
  4934. }, {
  4935. id: 36,
  4936. name: "Pandou Head",
  4937. price: 0,
  4938. scale: 120,
  4939. desc: "no effect"
  4940. }, {
  4941. id: 37,
  4942. name: "Bear Head",
  4943. price: 0,
  4944. scale: 120,
  4945. desc: "no effect"
  4946. }, {
  4947. id: 38,
  4948. name: "Monkey Head",
  4949. price: 0,
  4950. scale: 120,
  4951. desc: "no effect"
  4952. }, {
  4953. id: 44,
  4954. name: "Polar Head",
  4955. price: 0,
  4956. scale: 120,
  4957. desc: "no effect"
  4958. }, {
  4959. id: 35,
  4960. name: "Fez Hat",
  4961. price: 0,
  4962. scale: 120,
  4963. desc: "no effect"
  4964. }, {
  4965. id: 42,
  4966. name: "Enigma Hat",
  4967. price: 0,
  4968. scale: 120,
  4969. desc: "join the enigma army"
  4970. }, {
  4971. id: 43,
  4972. name: "Blitz Hat",
  4973. price: 0,
  4974. scale: 120,
  4975. desc: "hey everybody i'm blitz"
  4976. }, {
  4977. id: 49,
  4978. name: "Bob XIII Hat",
  4979. price: 0,
  4980. scale: 120,
  4981. desc: "like and subscribe"
  4982. }, {
  4983. id: 57,
  4984. name: "Pumpkin",
  4985. price: 50,
  4986. scale: 120,
  4987. desc: "Spooooky"
  4988. }, {
  4989. id: 8,
  4990. name: "Bummle Hat",
  4991. price: 100,
  4992. scale: 120,
  4993. desc: "no effect"
  4994. }, {
  4995. id: 2,
  4996. name: "Straw Hat",
  4997. price: 500,
  4998. scale: 120,
  4999. desc: "no effect"
  5000. }, {
  5001. id: 15,
  5002. name: "Winter Cap",
  5003. price: 600,
  5004. scale: 120,
  5005. desc: "allows you to move at normal speed in snow",
  5006. coldM: 1
  5007. }, {
  5008. id: 5,
  5009. name: "Cowboy Hat",
  5010. price: 1e3,
  5011. scale: 120,
  5012. desc: "no effect"
  5013. }, {
  5014. id: 4,
  5015. name: "Ranger Hat",
  5016. price: 2e3,
  5017. scale: 120,
  5018. desc: "no effect"
  5019. }, {
  5020. id: 18,
  5021. name: "Explorer Hat",
  5022. price: 2e3,
  5023. scale: 120,
  5024. desc: "no effect"
  5025. }, {
  5026. id: 31,
  5027. name: "Flipper Hat",
  5028. price: 2500,
  5029. scale: 120,
  5030. desc: "have more control while in water",
  5031. watrImm: !0
  5032. }, {
  5033. id: 1,
  5034. name: "Marksman Cap",
  5035. price: 3e3,
  5036. scale: 120,
  5037. desc: "increases arrow speed and range",
  5038. aMlt: 1.3
  5039. }, {
  5040. id: 10,
  5041. name: "Bush Gear",
  5042. price: 3e3,
  5043. scale: 160,
  5044. desc: "allows you to disguise yourself as a bush"
  5045. }, {
  5046. id: 48,
  5047. name: "Halo",
  5048. price: 3e3,
  5049. scale: 120,
  5050. desc: "no effect"
  5051. }, {
  5052. id: 6,
  5053. name: "Soldier Helmet",
  5054. price: 4e3,
  5055. scale: 120,
  5056. desc: "reduces damage taken but slows movement",
  5057. spdMult: .94,
  5058. dmgMult: .75
  5059. }, {
  5060. id: 23,
  5061. name: "Anti Venom Gear",
  5062. price: 4e3,
  5063. scale: 120,
  5064. desc: "makes you immune to poison",
  5065. poisonRes: 1
  5066. }, {
  5067. id: 13,
  5068. name: "Medic Gear",
  5069. price: 5e3,
  5070. scale: 110,
  5071. desc: "slowly regenerates health over time",
  5072. healthRegen: 3
  5073. }, {
  5074. id: 9,
  5075. name: "Miners Helmet",
  5076. price: 5e3,
  5077. scale: 120,
  5078. desc: "earn 1 extra gold per resource",
  5079. extraGold: 1
  5080. }, {
  5081. id: 32,
  5082. name: "Musketeer Hat",
  5083. price: 5e3,
  5084. scale: 120,
  5085. desc: "reduces cost of projectiles",
  5086. projCost: .5
  5087. }, {
  5088. id: 7,
  5089. name: "Bull Helmet",
  5090. price: 6e3,
  5091. scale: 120,
  5092. desc: "increases damage done but drains health",
  5093. healthRegen: -5,
  5094. dmgMultO: 1.5,
  5095. spdMult: .96
  5096. }, {
  5097. id: 22,
  5098. name: "Emp Helmet",
  5099. price: 6e3,
  5100. scale: 120,
  5101. desc: "turrets won't attack but you move slower",
  5102. antiTurret: 1,
  5103. spdMult: .7
  5104. }, {
  5105. id: 12,
  5106. name: "Booster Hat",
  5107. price: 6e3,
  5108. scale: 120,
  5109. desc: "increases your movement speed",
  5110. spdMult: 1.16
  5111. }, {
  5112. id: 26,
  5113. name: "Barbarian Armor",
  5114. price: 8e3,
  5115. scale: 120,
  5116. desc: "knocks back enemies that attack you",
  5117. dmgK: .6
  5118. }, {
  5119. id: 21,
  5120. name: "Plague Mask",
  5121. price: 1e4,
  5122. scale: 120,
  5123. desc: "melee attacks deal poison damage",
  5124. poisonDmg: 5,
  5125. poisonTime: 6
  5126. }, {
  5127. id: 46,
  5128. name: "Bull Mask",
  5129. price: 1e4,
  5130. scale: 120,
  5131. desc: "bulls won't target you unless you attack them",
  5132. bullRepel: 1
  5133. }, {
  5134. id: 14,
  5135. name: "Windmill Hat",
  5136. topSprite: !0,
  5137. price: 1e4,
  5138. scale: 120,
  5139. desc: "generates points while worn",
  5140. pps: 1.5
  5141. }, {
  5142. id: 11,
  5143. name: "Spike Gear",
  5144. topSprite: !0,
  5145. price: 1e4,
  5146. scale: 120,
  5147. desc: "deal damage to players that damage you",
  5148. dmg: .45
  5149. }, {
  5150. id: 53,
  5151. name: "Turret Gear",
  5152. topSprite: !0,
  5153. price: 1e4,
  5154. scale: 120,
  5155. desc: "you become a walking turret",
  5156. turret: {
  5157. proj: 1,
  5158. range: 700,
  5159. rate: 2500
  5160. },
  5161. spdMult: .7
  5162. }, {
  5163. id: 20,
  5164. name: "Samurai Armor",
  5165. price: 12e3,
  5166. scale: 120,
  5167. desc: "increased attack speed and fire rate",
  5168. atkSpd: .78
  5169. }, {
  5170. id: 58,
  5171. name: "Dark Knight",
  5172. price: 12e3,
  5173. scale: 120,
  5174. desc: "restores health when you deal damage",
  5175. healD: .4
  5176. }, {
  5177. id: 27,
  5178. name: "Scavenger Gear",
  5179. price: 15e3,
  5180. scale: 120,
  5181. desc: "earn double points for each kill",
  5182. kScrM: 2
  5183. }, {
  5184. id: 40,
  5185. name: "Tank Gear",
  5186. price: 15e3,
  5187. scale: 120,
  5188. desc: "increased damage to buildings but slower movement",
  5189. spdMult: .3,
  5190. bDmg: 3.3
  5191. }, {
  5192. id: 52,
  5193. name: "Thief Gear",
  5194. price: 15e3,
  5195. scale: 120,
  5196. desc: "steal half of a players gold when you kill them",
  5197. goldSteal: .5
  5198. }, {
  5199. id: 55,
  5200. name: "Bloodthirster",
  5201. price: 2e4,
  5202. scale: 120,
  5203. desc: "Restore Health when dealing damage. And increased damage",
  5204. healD: .25,
  5205. dmgMultO: 1.2
  5206. }, {
  5207. id: 56,
  5208. name: "Assassin Gear",
  5209. price: 2e4,
  5210. scale: 120,
  5211. desc: "Go invisible when not moving. Can't eat. Increased speed",
  5212. noEat: !0,
  5213. spdMult: 1.1,
  5214. invisTimer: 1e3
  5215. }]
  5216. , zc = [{
  5217. id: 12,
  5218. name: "Snowball",
  5219. price: 1e3,
  5220. scale: 105,
  5221. xOff: 18,
  5222. desc: "no effect"
  5223. }, {
  5224. id: 9,
  5225. name: "Tree Cape",
  5226. price: 1e3,
  5227. scale: 90,
  5228. desc: "no effect"
  5229. }, {
  5230. id: 10,
  5231. name: "Stone Cape",
  5232. price: 1e3,
  5233. scale: 90,
  5234. desc: "no effect"
  5235. }, {
  5236. id: 3,
  5237. name: "Cookie Cape",
  5238. price: 1500,
  5239. scale: 90,
  5240. desc: "no effect"
  5241. }, {
  5242. id: 8,
  5243. name: "Cow Cape",
  5244. price: 2e3,
  5245. scale: 90,
  5246. desc: "no effect"
  5247. }, {
  5248. id: 11,
  5249. name: "Monkey Tail",
  5250. price: 2e3,
  5251. scale: 97,
  5252. xOff: 25,
  5253. desc: "Super speed but reduced damage",
  5254. spdMult: 1.35,
  5255. dmgMultO: .2
  5256. }, {
  5257. id: 17,
  5258. name: "Apple Basket",
  5259. price: 3e3,
  5260. scale: 80,
  5261. xOff: 12,
  5262. desc: "slowly regenerates health over time",
  5263. healthRegen: 1
  5264. }, {
  5265. id: 6,
  5266. name: "Winter Cape",
  5267. price: 3e3,
  5268. scale: 90,
  5269. desc: "no effect"
  5270. }, {
  5271. id: 4,
  5272. name: "Skull Cape",
  5273. price: 4e3,
  5274. scale: 90,
  5275. desc: "no effect"
  5276. }, {
  5277. id: 5,
  5278. name: "Dash Cape",
  5279. price: 5e3,
  5280. scale: 90,
  5281. desc: "no effect"
  5282. }, {
  5283. id: 2,
  5284. name: "Dragon Cape",
  5285. price: 6e3,
  5286. scale: 90,
  5287. desc: "no effect"
  5288. }, {
  5289. id: 1,
  5290. name: "Super Cape",
  5291. price: 8e3,
  5292. scale: 90,
  5293. desc: "no effect"
  5294. }, {
  5295. id: 7,
  5296. name: "Troll Cape",
  5297. price: 8e3,
  5298. scale: 90,
  5299. desc: "no effect"
  5300. }, {
  5301. id: 14,
  5302. name: "Thorns",
  5303. price: 1e4,
  5304. scale: 115,
  5305. xOff: 20,
  5306. desc: "no effect"
  5307. }, {
  5308. id: 15,
  5309. name: "Blockades",
  5310. price: 1e4,
  5311. scale: 95,
  5312. xOff: 15,
  5313. desc: "no effect"
  5314. }, {
  5315. id: 20,
  5316. name: "Devils Tail",
  5317. price: 1e4,
  5318. scale: 95,
  5319. xOff: 20,
  5320. desc: "no effect"
  5321. }, {
  5322. id: 16,
  5323. name: "Sawblade",
  5324. price: 12e3,
  5325. scale: 90,
  5326. spin: !0,
  5327. xOff: 0,
  5328. desc: "deal damage to players that damage you",
  5329. dmg: .15
  5330. }, {
  5331. id: 13,
  5332. name: "Angel Wings",
  5333. price: 15e3,
  5334. scale: 138,
  5335. xOff: 22,
  5336. desc: "slowly regenerates health over time",
  5337. healthRegen: 3
  5338. }, {
  5339. id: 19,
  5340. name: "Shadow Wings",
  5341. price: 15e3,
  5342. scale: 138,
  5343. xOff: 22,
  5344. desc: "increased movement speed",
  5345. spdMult: 1.1
  5346. }, {
  5347. id: 18,
  5348. name: "Blood Wings",
  5349. price: 2e4,
  5350. scale: 178,
  5351. xOff: 26,
  5352. desc: "restores health when you deal damage",
  5353. healD: .2
  5354. }, {
  5355. id: 21,
  5356. name: "Corrupt X Wings",
  5357. price: 2e4,
  5358. scale: 178,
  5359. xOff: 26,
  5360. desc: "deal damage to players that damage you",
  5361. dmg: .25
  5362. }]
  5363. , $r = {
  5364. hats: Bc,
  5365. accessories: zc
  5366. };
  5367. function Hc(e, t, i, s, n, r, o) {
  5368. this.init = function(a, u, p, h, m, w, v, x, D) {
  5369. this.active = !0,
  5370. this.indx = a,
  5371. this.x = u,
  5372. this.y = p,
  5373. this.dir = h,
  5374. this.skipMov = !0,
  5375. this.speed = m,
  5376. this.dmg = w,
  5377. this.scale = x,
  5378. this.range = v,
  5379. this.owner = D,
  5380. o && (this.sentTo = {})
  5381. }
  5382. ;
  5383. const l = [];
  5384. let c;
  5385. this.update = function(a) {
  5386. if (this.active) {
  5387. let p = this.speed * a, h;
  5388. if (this.skipMov ? this.skipMov = !1 : (this.x += p * Math.cos(this.dir),
  5389. this.y += p * Math.sin(this.dir),
  5390. this.range -= p,
  5391. this.range <= 0 && (this.x += this.range * Math.cos(this.dir),
  5392. this.y += this.range * Math.sin(this.dir),
  5393. p = 1,
  5394. this.range = 0,
  5395. this.active = !1)),
  5396. o) {
  5397. for (var u = 0; u < e.length; ++u)
  5398. !this.sentTo[e[u].id] && e[u].canSee(this) && (this.sentTo[e[u].id] = 1,
  5399. o.send(e[u].id, "X", r.fixTo(this.x, 1), r.fixTo(this.y, 1), r.fixTo(this.dir, 2), r.fixTo(this.range, 1), this.speed, this.indx, this.layer, this.sid));
  5400. l.length = 0;
  5401. for (var u = 0; u < e.length + t.length; ++u)
  5402. c = e[u] || t[u - e.length],
  5403. c.alive && c != this.owner && !(this.owner.team && c.team == this.owner.team) && r.lineInRect(c.x - c.scale, c.y - c.scale, c.x + c.scale, c.y + c.scale, this.x, this.y, this.x + p * Math.cos(this.dir), this.y + p * Math.sin(this.dir)) && l.push(c);
  5404. const m = i.getGridArrays(this.x, this.y, this.scale);
  5405. for (let w = 0; w < m.length; ++w)
  5406. for (let v = 0; v < m[w].length; ++v)
  5407. c = m[w][v],
  5408. h = c.getScale(),
  5409. c.active && this.ignoreObj != c.sid && this.layer <= c.layer && l.indexOf(c) < 0 && !c.ignoreCollision && r.lineInRect(c.x - h, c.y - h, c.x + h, c.y + h, this.x, this.y, this.x + p * Math.cos(this.dir), this.y + p * Math.sin(this.dir)) && l.push(c);
  5410. if (l.length > 0) {
  5411. let w = null
  5412. , v = null
  5413. , x = null;
  5414. for (var u = 0; u < l.length; ++u)
  5415. x = r.getDistance(this.x, this.y, l[u].x, l[u].y),
  5416. (v == null || x < v) && (v = x,
  5417. w = l[u]);
  5418. if (w.isPlayer || w.isAI) {
  5419. const D = .3 * (w.weightM || 1);
  5420. w.xVel += D * Math.cos(this.dir),
  5421. w.yVel += D * Math.sin(this.dir),
  5422. (w.weaponIndex == null || !(s.weapons[w.weaponIndex].shield && r.getAngleDist(this.dir + Math.PI, w.dir) <= n.shieldAngle)) && w.changeHealth(-this.dmg, this.owner, this.owner)
  5423. } else {
  5424. w.projDmg && w.health && w.changeHealth(-this.dmg) && i.disableObj(w);
  5425. for (var u = 0; u < e.length; ++u)
  5426. e[u].active && (w.sentTo[e[u].id] && (w.active ? e[u].canSee(w) && o.send(e[u].id, "L", r.fixTo(this.dir, 2), w.sid) : o.send(e[u].id, "Q", w.sid)),
  5427. !w.active && w.owner == e[u] && e[u].changeItemCount(w.group.id, -1))
  5428. }
  5429. this.active = !1;
  5430. for (var u = 0; u < e.length; ++u)
  5431. this.sentTo[e[u].id] && o.send(e[u].id, "Y", this.sid, r.fixTo(v, 1))
  5432. }
  5433. }
  5434. }
  5435. }
  5436. }
  5437. var On = {}
  5438. , Fc = {
  5439. get exports() {
  5440. return On
  5441. },
  5442. set exports(e) {
  5443. On = e
  5444. }
  5445. }
  5446. , Rn = {}
  5447. , Vc = {
  5448. get exports() {
  5449. return Rn
  5450. },
  5451. set exports(e) {
  5452. Rn = e
  5453. }
  5454. };
  5455. (function() {
  5456. var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
  5457. , t = {
  5458. rotl: function(i, s) {
  5459. return i << s | i >>> 32 - s
  5460. },
  5461. rotr: function(i, s) {
  5462. return i << 32 - s | i >>> s
  5463. },
  5464. endian: function(i) {
  5465. if (i.constructor == Number)
  5466. return t.rotl(i, 8) & 16711935 | t.rotl(i, 24) & 4278255360;
  5467. for (var s = 0; s < i.length; s++)
  5468. i[s] = t.endian(i[s]);
  5469. return i
  5470. },
  5471. randomBytes: function(i) {
  5472. for (var s = []; i > 0; i--)
  5473. s.push(Math.floor(Math.random() * 256));
  5474. return s
  5475. },
  5476. bytesToWords: function(i) {
  5477. for (var s = [], n = 0, r = 0; n < i.length; n++,
  5478. r += 8)
  5479. s[r >>> 5] |= i[n] << 24 - r % 32;
  5480. return s
  5481. },
  5482. wordsToBytes: function(i) {
  5483. for (var s = [], n = 0; n < i.length * 32; n += 8)
  5484. s.push(i[n >>> 5] >>> 24 - n % 32 & 255);
  5485. return s
  5486. },
  5487. bytesToHex: function(i) {
  5488. for (var s = [], n = 0; n < i.length; n++)
  5489. s.push((i[n] >>> 4).toString(16)),
  5490. s.push((i[n] & 15).toString(16));
  5491. return s.join("")
  5492. },
  5493. hexToBytes: function(i) {
  5494. for (var s = [], n = 0; n < i.length; n += 2)
  5495. s.push(parseInt(i.substr(n, 2), 16));
  5496. return s
  5497. },
  5498. bytesToBase64: function(i) {
  5499. for (var s = [], n = 0; n < i.length; n += 3)
  5500. for (var r = i[n] << 16 | i[n + 1] << 8 | i[n + 2], o = 0; o < 4; o++)
  5501. n * 8 + o * 6 <= i.length * 8 ? s.push(e.charAt(r >>> 6 * (3 - o) & 63)) : s.push("=");
  5502. return s.join("")
  5503. },
  5504. base64ToBytes: function(i) {
  5505. i = i.replace(/[^A-Z0-9+\/]/ig, "");
  5506. for (var s = [], n = 0, r = 0; n < i.length; r = ++n % 4)
  5507. r != 0 && s.push((e.indexOf(i.charAt(n - 1)) & Math.pow(2, -2 * r + 8) - 1) << r * 2 | e.indexOf(i.charAt(n)) >>> 6 - r * 2);
  5508. return s
  5509. }
  5510. };
  5511. Vc.exports = t
  5512. }
  5513. )();
  5514. var _n = {
  5515. utf8: {
  5516. stringToBytes: function(e) {
  5517. return _n.bin.stringToBytes(unescape(encodeURIComponent(e)))
  5518. },
  5519. bytesToString: function(e) {
  5520. return decodeURIComponent(escape(_n.bin.bytesToString(e)))
  5521. }
  5522. },
  5523. bin: {
  5524. stringToBytes: function(e) {
  5525. for (var t = [], i = 0; i < e.length; i++)
  5526. t.push(e.charCodeAt(i) & 255);
  5527. return t
  5528. },
  5529. bytesToString: function(e) {
  5530. for (var t = [], i = 0; i < e.length; i++)
  5531. t.push(String.fromCharCode(e[i]));
  5532. return t.join("")
  5533. }
  5534. }
  5535. }
  5536. , zs = _n;
  5537. /*!
  5538. * Determine if an object is a Buffer
  5539. *
  5540. * @author Feross Aboukhadijeh <https://feross.org>
  5541. * @license MIT
  5542. */
  5543. var Uc = function(e) {
  5544. return e != null && (Kr(e) || Lc(e) || !!e._isBuffer)
  5545. };
  5546. function Kr(e) {
  5547. return !!e.constructor && typeof e.constructor.isBuffer == "function" && e.constructor.isBuffer(e)
  5548. }
  5549. function Lc(e) {
  5550. return typeof e.readFloatLE == "function" && typeof e.slice == "function" && Kr(e.slice(0, 0))
  5551. }
  5552. (function() {
  5553. var e = Rn
  5554. , t = zs.utf8
  5555. , i = Uc
  5556. , s = zs.bin
  5557. , n = function(r, o) {
  5558. r.constructor == String ? o && o.encoding === "binary" ? r = s.stringToBytes(r) : r = t.stringToBytes(r) : i(r) ? r = Array.prototype.slice.call(r, 0) : !Array.isArray(r) && r.constructor !== Uint8Array && (r = r.toString());
  5559. for (var l = e.bytesToWords(r), c = r.length * 8, a = 1732584193, u = -271733879, p = -1732584194, h = 271733878, m = 0; m < l.length; m++)
  5560. l[m] = (l[m] << 8 | l[m] >>> 24) & 16711935 | (l[m] << 24 | l[m] >>> 8) & 4278255360;
  5561. l[c >>> 5] |= 128 << c % 32,
  5562. l[(c + 64 >>> 9 << 4) + 14] = c;
  5563. for (var w = n._ff, v = n._gg, x = n._hh, D = n._ii, m = 0; m < l.length; m += 16) {
  5564. var k = a
  5565. , S = u
  5566. , O = p
  5567. , U = h;
  5568. a = w(a, u, p, h, l[m + 0], 7, -680876936),
  5569. h = w(h, a, u, p, l[m + 1], 12, -389564586),
  5570. p = w(p, h, a, u, l[m + 2], 17, 606105819),
  5571. u = w(u, p, h, a, l[m + 3], 22, -1044525330),
  5572. a = w(a, u, p, h, l[m + 4], 7, -176418897),
  5573. h = w(h, a, u, p, l[m + 5], 12, 1200080426),
  5574. p = w(p, h, a, u, l[m + 6], 17, -1473231341),
  5575. u = w(u, p, h, a, l[m + 7], 22, -45705983),
  5576. a = w(a, u, p, h, l[m + 8], 7, 1770035416),
  5577. h = w(h, a, u, p, l[m + 9], 12, -1958414417),
  5578. p = w(p, h, a, u, l[m + 10], 17, -42063),
  5579. u = w(u, p, h, a, l[m + 11], 22, -1990404162),
  5580. a = w(a, u, p, h, l[m + 12], 7, 1804603682),
  5581. h = w(h, a, u, p, l[m + 13], 12, -40341101),
  5582. p = w(p, h, a, u, l[m + 14], 17, -1502002290),
  5583. u = w(u, p, h, a, l[m + 15], 22, 1236535329),
  5584. a = v(a, u, p, h, l[m + 1], 5, -165796510),
  5585. h = v(h, a, u, p, l[m + 6], 9, -1069501632),
  5586. p = v(p, h, a, u, l[m + 11], 14, 643717713),
  5587. u = v(u, p, h, a, l[m + 0], 20, -373897302),
  5588. a = v(a, u, p, h, l[m + 5], 5, -701558691),
  5589. h = v(h, a, u, p, l[m + 10], 9, 38016083),
  5590. p = v(p, h, a, u, l[m + 15], 14, -660478335),
  5591. u = v(u, p, h, a, l[m + 4], 20, -405537848),
  5592. a = v(a, u, p, h, l[m + 9], 5, 568446438),
  5593. h = v(h, a, u, p, l[m + 14], 9, -1019803690),
  5594. p = v(p, h, a, u, l[m + 3], 14, -187363961),
  5595. u = v(u, p, h, a, l[m + 8], 20, 1163531501),
  5596. a = v(a, u, p, h, l[m + 13], 5, -1444681467),
  5597. h = v(h, a, u, p, l[m + 2], 9, -51403784),
  5598. p = v(p, h, a, u, l[m + 7], 14, 1735328473),
  5599. u = v(u, p, h, a, l[m + 12], 20, -1926607734),
  5600. a = x(a, u, p, h, l[m + 5], 4, -378558),
  5601. h = x(h, a, u, p, l[m + 8], 11, -2022574463),
  5602. p = x(p, h, a, u, l[m + 11], 16, 1839030562),
  5603. u = x(u, p, h, a, l[m + 14], 23, -35309556),
  5604. a = x(a, u, p, h, l[m + 1], 4, -1530992060),
  5605. h = x(h, a, u, p, l[m + 4], 11, 1272893353),
  5606. p = x(p, h, a, u, l[m + 7], 16, -155497632),
  5607. u = x(u, p, h, a, l[m + 10], 23, -1094730640),
  5608. a = x(a, u, p, h, l[m + 13], 4, 681279174),
  5609. h = x(h, a, u, p, l[m + 0], 11, -358537222),
  5610. p = x(p, h, a, u, l[m + 3], 16, -722521979),
  5611. u = x(u, p, h, a, l[m + 6], 23, 76029189),
  5612. a = x(a, u, p, h, l[m + 9], 4, -640364487),
  5613. h = x(h, a, u, p, l[m + 12], 11, -421815835),
  5614. p = x(p, h, a, u, l[m + 15], 16, 530742520),
  5615. u = x(u, p, h, a, l[m + 2], 23, -995338651),
  5616. a = D(a, u, p, h, l[m + 0], 6, -198630844),
  5617. h = D(h, a, u, p, l[m + 7], 10, 1126891415),
  5618. p = D(p, h, a, u, l[m + 14], 15, -1416354905),
  5619. u = D(u, p, h, a, l[m + 5], 21, -57434055),
  5620. a = D(a, u, p, h, l[m + 12], 6, 1700485571),
  5621. h = D(h, a, u, p, l[m + 3], 10, -1894986606),
  5622. p = D(p, h, a, u, l[m + 10], 15, -1051523),
  5623. u = D(u, p, h, a, l[m + 1], 21, -2054922799),
  5624. a = D(a, u, p, h, l[m + 8], 6, 1873313359),
  5625. h = D(h, a, u, p, l[m + 15], 10, -30611744),
  5626. p = D(p, h, a, u, l[m + 6], 15, -1560198380),
  5627. u = D(u, p, h, a, l[m + 13], 21, 1309151649),
  5628. a = D(a, u, p, h, l[m + 4], 6, -145523070),
  5629. h = D(h, a, u, p, l[m + 11], 10, -1120210379),
  5630. p = D(p, h, a, u, l[m + 2], 15, 718787259),
  5631. u = D(u, p, h, a, l[m + 9], 21, -343485551),
  5632. a = a + k >>> 0,
  5633. u = u + S >>> 0,
  5634. p = p + O >>> 0,
  5635. h = h + U >>> 0
  5636. }
  5637. return e.endian([a, u, p, h])
  5638. };
  5639. n._ff = function(r, o, l, c, a, u, p) {
  5640. var h = r + (o & l | ~o & c) + (a >>> 0) + p;
  5641. return (h << u | h >>> 32 - u) + o
  5642. }
  5643. ,
  5644. n._gg = function(r, o, l, c, a, u, p) {
  5645. var h = r + (o & c | l & ~c) + (a >>> 0) + p;
  5646. return (h << u | h >>> 32 - u) + o
  5647. }
  5648. ,
  5649. n._hh = function(r, o, l, c, a, u, p) {
  5650. var h = r + (o ^ l ^ c) + (a >>> 0) + p;
  5651. return (h << u | h >>> 32 - u) + o
  5652. }
  5653. ,
  5654. n._ii = function(r, o, l, c, a, u, p) {
  5655. var h = r + (l ^ (o | ~c)) + (a >>> 0) + p;
  5656. return (h << u | h >>> 32 - u) + o
  5657. }
  5658. ,
  5659. n._blocksize = 16,
  5660. n._digestsize = 16,
  5661. Fc.exports = function(r, o) {
  5662. if (r == null)
  5663. throw new Error("Illegal argument " + r);
  5664. var l = e.wordsToBytes(n(r, o));
  5665. return o && o.asBytes ? l : o && o.asString ? s.bytesToString(l) : e.bytesToHex(l)
  5666. }
  5667. }
  5668. )();
  5669. var enemyNear, Hs;
  5670. function Ge() {
  5671. if (Hs)
  5672. return enemyNear;
  5673. Hs = 1;
  5674. function e(t, i, s, n, r, o) {
  5675. return {
  5676. tag: t,
  5677. key: i,
  5678. attrs: s,
  5679. children: n,
  5680. text: r,
  5681. dom: o,
  5682. domSize: void 0,
  5683. state: void 0,
  5684. events: void 0,
  5685. instance: void 0
  5686. }
  5687. }
  5688. return e.normalize = function(t) {
  5689. return Array.isArray(t) ? e("[", void 0, void 0, e.normalizeChildren(t), void 0, void 0) : t == null || typeof t == "boolean" ? null : typeof t == "object" ? t : e("#", void 0, void 0, String(t), void 0, void 0)
  5690. }
  5691. ,
  5692. e.normalizeChildren = function(t) {
  5693. var i = [];
  5694. if (t.length) {
  5695. for (var s = t[0] != null && t[0].key != null, n = 1; n < t.length; n++)
  5696. if ((t[n] != null && t[n].key != null) !== s)
  5697. throw new TypeError(s && (t[n] != null || typeof t[n] == "boolean") ? "In fragments, vnodes must either all have keys or none have keys. You may wish to consider using an explicit keyed empty fragment, m.fragment({key: ...}), instead of a hole." : "In fragments, vnodes must either all have keys or none have keys.");
  5698. for (var n = 0; n < t.length; n++)
  5699. i[n] = e.normalize(t[n])
  5700. }
  5701. return i
  5702. }
  5703. ,
  5704. enemyNear = e,
  5705. enemyNear
  5706. }
  5707. var Nc = Ge()
  5708. , Jr = function() {
  5709. var e = arguments[this], t = this + 1, i;
  5710. if (e == null ? e = {} : (typeof e != "object" || e.tag != null || Array.isArray(e)) && (e = {},
  5711. t = this),
  5712. arguments.length === t + 1)
  5713. i = arguments[t],
  5714. Array.isArray(i) || (i = [i]);
  5715. else
  5716. for (i = []; t < arguments.length; )
  5717. i.push(arguments[t++]);
  5718. return Nc("", e.key, e, i)
  5719. }
  5720. , Ci = {}.hasOwnProperty
  5721. , qc = Ge()
  5722. , Wc = Jr
  5723. , pt = Ci
  5724. , Xc = /(?:(^|#|\.)([^#\.\[\]]+))|(\[(.+?)(?:\s*=\s*("|'|)((?:\\["'\]]|.)*?)\5)?\])/g
  5725. , Qr = {};
  5726. function Fs(e) {
  5727. for (var t in e)
  5728. if (pt.call(e, t))
  5729. return !1;
  5730. return !0
  5731. }
  5732. function Gc(e) {
  5733. for (var t, i = "div", s = [], n = {}; t = Xc.exec(e); ) {
  5734. var r = t[1]
  5735. , o = t[2];
  5736. if (r === "" && o !== "")
  5737. i = o;
  5738. else if (r === "#")
  5739. n.id = o;
  5740. else if (r === ".")
  5741. s.push(o);
  5742. else if (t[3][0] === "[") {
  5743. var l = t[6];
  5744. l && (l = l.replace(/\\(["'])/g, "$1").replace(/\\\\/g, "\\")),
  5745. t[4] === "class" ? s.push(l) : n[t[4]] = l === "" ? l : l || !0
  5746. }
  5747. }
  5748. return s.length > 0 && (n.className = s.join(" ")),
  5749. Qr[e] = {
  5750. tag: i,
  5751. attrs: n
  5752. }
  5753. }
  5754. function Yc(e, t) {
  5755. var i = t.attrs
  5756. , s = pt.call(i, "class")
  5757. , n = s ? i.class : i.className;
  5758. if (t.tag = e.tag,
  5759. t.attrs = {},
  5760. !Fs(e.attrs) && !Fs(i)) {
  5761. var r = {};
  5762. for (var o in i)
  5763. pt.call(i, o) && (r[o] = i[o]);
  5764. i = r
  5765. }
  5766. for (var o in e.attrs)
  5767. pt.call(e.attrs, o) && o !== "className" && !pt.call(i, o) && (i[o] = e.attrs[o]);
  5768. (n != null || e.attrs.className != null) && (i.className = n != null ? e.attrs.className != null ? String(e.attrs.className) + " " + String(n) : n : e.attrs.className != null ? e.attrs.className : null),
  5769. s && (i.class = null);
  5770. for (var o in i)
  5771. if (pt.call(i, o) && o !== "key") {
  5772. t.attrs = i;
  5773. break
  5774. }
  5775. return t
  5776. }
  5777. function $c(e) {
  5778. if (e == null || typeof e != "string" && typeof e != "function" && typeof e.view != "function")
  5779. throw Error("The selector must be either a string or a component.");
  5780. var t = Wc.apply(1, arguments);
  5781. return typeof e == "string" && (t.children = qc.normalizeChildren(t.children),
  5782. e !== "[") ? Yc(Qr[e] || Gc(e), t) : (t.tag = e,
  5783. t)
  5784. }
  5785. var Zr = $c
  5786. , Kc = Ge()
  5787. , Jc = function(e) {
  5788. return e == null && (e = ""),
  5789. Kc("<", void 0, void 0, e, void 0, void 0)
  5790. }
  5791. , Qc = Ge()
  5792. , Zc = Jr
  5793. , jc = function() {
  5794. var e = Zc.apply(0, arguments);
  5795. return e.tag = "[",
  5796. e.children = Qc.normalizeChildren(e.children),
  5797. e
  5798. }
  5799. , ns = Zr;
  5800. ns.trust = Jc;
  5801. ns.fragment = jc;
  5802. var eh = ns, yi = {}, en = {
  5803. get exports() {
  5804. return yi
  5805. },
  5806. set exports(e) {
  5807. yi = e
  5808. }
  5809. }, tn, Vs;
  5810. function jr() {
  5811. if (Vs)
  5812. return tn;
  5813. Vs = 1;
  5814. var e = function(t) {
  5815. if (!(this instanceof e))
  5816. throw new Error("Promise must be called with 'new'.");
  5817. if (typeof t != "function")
  5818. throw new TypeError("executor must be a function.");
  5819. var i = this
  5820. , s = []
  5821. , n = []
  5822. , r = a(s, !0)
  5823. , o = a(n, !1)
  5824. , l = i._instance = {
  5825. resolvers: s,
  5826. rejectors: n
  5827. }
  5828. , c = typeof setImmediate == "function" ? setImmediate : setTimeout;
  5829. function a(p, h) {
  5830. return function m(w) {
  5831. var v;
  5832. try {
  5833. if (h && w != null && (typeof w == "object" || typeof w == "function") && typeof (v = w.then) == "function") {
  5834. if (w === i)
  5835. throw new TypeError("Promise can't be resolved with itself.");
  5836. u(v.bind(w))
  5837. } else
  5838. c(function() {
  5839. !h && p.length === 0 && console.error("Possible unhandled promise rejection:", w);
  5840. for (var x = 0; x < p.length; x++)
  5841. p[x](w);
  5842. s.length = 0,
  5843. n.length = 0,
  5844. l.state = h,
  5845. l.retry = function() {
  5846. m(w)
  5847. }
  5848. })
  5849. } catch (x) {
  5850. o(x)
  5851. }
  5852. }
  5853. }
  5854. function u(p) {
  5855. var h = 0;
  5856. function m(v) {
  5857. return function(x) {
  5858. h++ > 0 || v(x)
  5859. }
  5860. }
  5861. var w = m(o);
  5862. try {
  5863. p(m(r), w)
  5864. } catch (v) {
  5865. w(v)
  5866. }
  5867. }
  5868. u(t)
  5869. };
  5870. return e.prototype.then = function(t, i) {
  5871. var s = this
  5872. , n = s._instance;
  5873. function r(a, u, p, h) {
  5874. u.push(function(m) {
  5875. if (typeof a != "function")
  5876. p(m);
  5877. else
  5878. try {
  5879. o(a(m))
  5880. } catch (w) {
  5881. l && l(w)
  5882. }
  5883. }),
  5884. typeof n.retry == "function" && h === n.state && n.retry()
  5885. }
  5886. var o, l, c = new e(function(a, u) {
  5887. o = a,
  5888. l = u
  5889. }
  5890. );
  5891. return r(t, n.resolvers, o, !0),
  5892. r(i, n.rejectors, l, !1),
  5893. c
  5894. }
  5895. ,
  5896. e.prototype.catch = function(t) {
  5897. return this.then(null, t)
  5898. }
  5899. ,
  5900. e.prototype.finally = function(t) {
  5901. return this.then(function(i) {
  5902. return e.resolve(t()).then(function() {
  5903. return i
  5904. })
  5905. }, function(i) {
  5906. return e.resolve(t()).then(function() {
  5907. return e.reject(i)
  5908. })
  5909. })
  5910. }
  5911. ,
  5912. e.resolve = function(t) {
  5913. return t instanceof e ? t : new e(function(i) {
  5914. i(t)
  5915. }
  5916. )
  5917. }
  5918. ,
  5919. e.reject = function(t) {
  5920. return new e(function(i, s) {
  5921. s(t)
  5922. }
  5923. )
  5924. }
  5925. ,
  5926. e.all = function(t) {
  5927. return new e(function(i, s) {
  5928. var n = t.length
  5929. , r = 0
  5930. , o = [];
  5931. if (t.length === 0)
  5932. i([]);
  5933. else
  5934. for (var l = 0; l < t.length; l++)
  5935. (function(c) {
  5936. function a(u) {
  5937. r++,
  5938. o[c] = u,
  5939. r === n && i(o)
  5940. }
  5941. t[c] != null && (typeof t[c] == "object" || typeof t[c] == "function") && typeof t[c].then == "function" ? t[c].then(a, s) : a(t[c])
  5942. }
  5943. )(l)
  5944. }
  5945. )
  5946. }
  5947. ,
  5948. e.race = function(t) {
  5949. return new e(function(i, s) {
  5950. for (var n = 0; n < t.length; n++)
  5951. t[n].then(i, s)
  5952. }
  5953. )
  5954. }
  5955. ,
  5956. tn = e,
  5957. tn
  5958. }
  5959. var _t = jr();
  5960. typeof window < "u" ? (typeof window.Promise > "u" ? window.Promise = _t : window.Promise.prototype.finally || (window.Promise.prototype.finally = _t.prototype.finally),
  5961. en.exports = window.Promise) : typeof rt < "u" ? (typeof rt.Promise > "u" ? rt.Promise = _t : rt.Promise.prototype.finally || (rt.Promise.prototype.finally = _t.prototype.finally),
  5962. en.exports = rt.Promise) : en.exports = _t;
  5963. var nn, Us;
  5964. function th() {
  5965. if (Us)
  5966. return nn;
  5967. Us = 1;
  5968. var e = Ge();
  5969. return nn = function(t) {
  5970. var i = t && t.document, s, n = {
  5971. svg: "http://www.w3.org/2000/svg",
  5972. math: "http://www.w3.org/1998/Math/MathML"
  5973. };
  5974. function r(d) {
  5975. return d.attrs && d.attrs.xmlns || n[d.tag]
  5976. }
  5977. function o(d, f) {
  5978. if (d.state !== f)
  5979. throw new Error("'vnode.state' must not be modified.")
  5980. }
  5981. function l(d) {
  5982. var f = d.state;
  5983. try {
  5984. return this.apply(f, arguments)
  5985. } finally {
  5986. o(d, f)
  5987. }
  5988. }
  5989. function c() {
  5990. try {
  5991. return i.activeElement
  5992. } catch {
  5993. return null
  5994. }
  5995. }
  5996. function a(d, f, g, b, I, A, H) {
  5997. for (var N = g; N < b; N++) {
  5998. var B = f[N];
  5999. B != null && u(d, B, I, H, A)
  6000. }
  6001. }
  6002. function u(d, f, g, b, I) {
  6003. var A = f.tag;
  6004. if (typeof A == "string")
  6005. switch (f.state = {},
  6006. f.attrs != null && Fi(f.attrs, f, g),
  6007. A) {
  6008. case "#":
  6009. p(d, f, I);
  6010. break;
  6011. case "<":
  6012. m(d, f, b, I);
  6013. break;
  6014. case "[":
  6015. w(d, f, g, b, I);
  6016. break;
  6017. default:
  6018. v(d, f, g, b, I)
  6019. }
  6020. else
  6021. D(d, f, g, b, I)
  6022. }
  6023. function p(d, f, g) {
  6024. f.dom = i.createTextNode(f.children),
  6025. X(d, f.dom, g)
  6026. }
  6027. var h = {
  6028. caption: "table",
  6029. thead: "table",
  6030. tbody: "table",
  6031. tfoot: "table",
  6032. tr: "tbody",
  6033. th: "tr",
  6034. td: "tr",
  6035. colgroup: "table",
  6036. col: "colgroup"
  6037. };
  6038. function m(d, f, g, b) {
  6039. var I = f.children.match(/^\s*?<(\w+)/im) || []
  6040. , A = i.createElement(h[I[1]] || "div");
  6041. g === "http://www.w3.org/2000/svg" ? (A.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg">' + f.children + "</svg>",
  6042. A = A.firstChild) : A.innerHTML = f.children,
  6043. f.dom = A.firstChild,
  6044. f.domSize = A.childNodes.length,
  6045. f.instance = [];
  6046. for (var H = i.createDocumentFragment(), N; N = A.firstChild; )
  6047. f.instance.push(N),
  6048. H.appendChild(N);
  6049. X(d, H, b)
  6050. }
  6051. function w(d, f, g, b, I) {
  6052. var A = i.createDocumentFragment();
  6053. if (f.children != null) {
  6054. var H = f.children;
  6055. a(A, H, 0, H.length, g, null, b)
  6056. }
  6057. f.dom = A.firstChild,
  6058. f.domSize = A.childNodes.length,
  6059. X(d, A, I)
  6060. }
  6061. function v(d, f, g, b, I) {
  6062. var A = f.tag
  6063. , H = f.attrs
  6064. , N = H && H.is;
  6065. b = r(f) || b;
  6066. var B = b ? N ? i.createElementNS(b, A, {
  6067. is: N
  6068. }) : i.createElementNS(b, A) : N ? i.createElement(A, {
  6069. is: N
  6070. }) : i.createElement(A);
  6071. if (f.dom = B,
  6072. H != null && Bi(f, H, b),
  6073. X(d, B, I),
  6074. !G(f) && f.children != null) {
  6075. var Y = f.children;
  6076. a(B, Y, 0, Y.length, g, null, b),
  6077. f.tag === "select" && H != null && No(f, H)
  6078. }
  6079. }
  6080. function x(d, f) {
  6081. var g;
  6082. if (typeof d.tag.view == "function") {
  6083. if (d.state = Object.create(d.tag),
  6084. g = d.state.view,
  6085. g.$$reentrantLock$$ != null)
  6086. return;
  6087. g.$$reentrantLock$$ = !0
  6088. } else {
  6089. if (d.state = void 0,
  6090. g = d.tag,
  6091. g.$$reentrantLock$$ != null)
  6092. return;
  6093. g.$$reentrantLock$$ = !0,
  6094. d.state = d.tag.prototype != null && typeof d.tag.prototype.view == "function" ? new d.tag(d) : d.tag(d)
  6095. }
  6096. if (Fi(d.state, d, f),
  6097. d.attrs != null && Fi(d.attrs, d, f),
  6098. d.instance = e.normalize(l.call(d.state.view, d)),
  6099. d.instance === d)
  6100. throw Error("A view cannot return the vnode it received as argument");
  6101. g.$$reentrantLock$$ = null
  6102. }
  6103. function D(d, f, g, b, I) {
  6104. x(f, g),
  6105. f.instance != null ? (u(d, f.instance, g, b, I),
  6106. f.dom = f.instance.dom,
  6107. f.domSize = f.dom != null ? f.instance.domSize : 0) : f.domSize = 0
  6108. }
  6109. function k(d, f, g, b, I, A) {
  6110. if (!(f === g || f == null && g == null))
  6111. if (f == null || f.length === 0)
  6112. a(d, g, 0, g.length, b, I, A);
  6113. else if (g == null || g.length === 0)
  6114. te(d, f, 0, f.length);
  6115. else {
  6116. var H = f[0] != null && f[0].key != null
  6117. , N = g[0] != null && g[0].key != null
  6118. , B = 0
  6119. , Y = 0;
  6120. if (!H)
  6121. for (; Y < f.length && f[Y] == null; )
  6122. Y++;
  6123. if (!N)
  6124. for (; B < g.length && g[B] == null; )
  6125. B++;
  6126. if (H !== N)
  6127. te(d, f, Y, f.length),
  6128. a(d, g, B, g.length, b, I, A);
  6129. else if (N) {
  6130. for (var ve = f.length - 1, fe = g.length - 1, ni, xe, oe, ge, Z, Li; ve >= Y && fe >= B && (ge = f[ve],
  6131. Z = g[fe],
  6132. ge.key === Z.key); )
  6133. ge !== Z && S(d, ge, Z, b, I, A),
  6134. Z.dom != null && (I = Z.dom),
  6135. ve--,
  6136. fe--;
  6137. for (; ve >= Y && fe >= B && (xe = f[Y],
  6138. oe = g[B],
  6139. xe.key === oe.key); )
  6140. Y++,
  6141. B++,
  6142. xe !== oe && S(d, xe, oe, b, $(f, Y, I), A);
  6143. for (; ve >= Y && fe >= B && !(B === fe || xe.key !== Z.key || ge.key !== oe.key); )
  6144. Li = $(f, Y, I),
  6145. V(d, ge, Li),
  6146. ge !== oe && S(d, ge, oe, b, Li, A),
  6147. ++B <= --fe && V(d, xe, I),
  6148. xe !== Z && S(d, xe, Z, b, I, A),
  6149. Z.dom != null && (I = Z.dom),
  6150. Y++,
  6151. ve--,
  6152. ge = f[ve],
  6153. Z = g[fe],
  6154. xe = f[Y],
  6155. oe = g[B];
  6156. for (; ve >= Y && fe >= B && ge.key === Z.key; )
  6157. ge !== Z && S(d, ge, Z, b, I, A),
  6158. Z.dom != null && (I = Z.dom),
  6159. ve--,
  6160. fe--,
  6161. ge = f[ve],
  6162. Z = g[fe];
  6163. if (B > fe)
  6164. te(d, f, Y, ve + 1);
  6165. else if (Y > ve)
  6166. a(d, g, B, fe + 1, b, I, A);
  6167. else {
  6168. var $o = I, Ps = fe - B + 1, At = new Array(Ps), Ni = 0, ne = 0, qi = 2147483647, Wi = 0, ni, Xi;
  6169. for (ne = 0; ne < Ps; ne++)
  6170. At[ne] = -1;
  6171. for (ne = fe; ne >= B; ne--) {
  6172. ni == null && (ni = W(f, Y, ve + 1)),
  6173. Z = g[ne];
  6174. var st = ni[Z.key];
  6175. st != null && (qi = st < qi ? st : -1,
  6176. At[ne - B] = st,
  6177. ge = f[st],
  6178. f[st] = null,
  6179. ge !== Z && S(d, ge, Z, b, I, A),
  6180. Z.dom != null && (I = Z.dom),
  6181. Wi++)
  6182. }
  6183. if (I = $o,
  6184. Wi !== ve - Y + 1 && te(d, f, Y, ve + 1),
  6185. Wi === 0)
  6186. a(d, g, B, fe + 1, b, I, A);
  6187. else if (qi === -1)
  6188. for (Xi = _(At),
  6189. Ni = Xi.length - 1,
  6190. ne = fe; ne >= B; ne--)
  6191. oe = g[ne],
  6192. At[ne - B] === -1 ? u(d, oe, b, A, I) : Xi[Ni] === ne - B ? Ni-- : V(d, oe, I),
  6193. oe.dom != null && (I = g[ne].dom);
  6194. else
  6195. for (ne = fe; ne >= B; ne--)
  6196. oe = g[ne],
  6197. At[ne - B] === -1 && u(d, oe, b, A, I),
  6198. oe.dom != null && (I = g[ne].dom)
  6199. }
  6200. } else {
  6201. var Ui = f.length < g.length ? f.length : g.length;
  6202. for (B = B < Y ? B : Y; B < Ui; B++)
  6203. xe = f[B],
  6204. oe = g[B],
  6205. !(xe === oe || xe == null && oe == null) && (xe == null ? u(d, oe, b, A, $(f, B + 1, I)) : oe == null ? ie(d, xe) : S(d, xe, oe, b, $(f, B + 1, I), A));
  6206. f.length > Ui && te(d, f, B, f.length),
  6207. g.length > Ui && a(d, g, B, g.length, b, I, A)
  6208. }
  6209. }
  6210. }
  6211. function S(d, f, g, b, I, A) {
  6212. var H = f.tag
  6213. , N = g.tag;
  6214. if (H === N) {
  6215. if (g.state = f.state,
  6216. g.events = f.events,
  6217. Yo(g, f))
  6218. return;
  6219. if (typeof H == "string")
  6220. switch (g.attrs != null && Vi(g.attrs, g, b),
  6221. H) {
  6222. case "#":
  6223. O(f, g);
  6224. break;
  6225. case "<":
  6226. U(d, f, g, A, I);
  6227. break;
  6228. case "[":
  6229. L(d, f, g, b, I, A);
  6230. break;
  6231. default:
  6232. q(f, g, b, A)
  6233. }
  6234. else
  6235. P(d, f, g, b, I, A)
  6236. } else
  6237. ie(d, f),
  6238. u(d, g, b, A, I)
  6239. }
  6240. function O(d, f) {
  6241. d.children.toString() !== f.children.toString() && (d.dom.nodeValue = f.children),
  6242. f.dom = d.dom
  6243. }
  6244. function U(d, f, g, b, I) {
  6245. f.children !== g.children ? (K(d, f),
  6246. m(d, g, b, I)) : (g.dom = f.dom,
  6247. g.domSize = f.domSize,
  6248. g.instance = f.instance)
  6249. }
  6250. function L(d, f, g, b, I, A) {
  6251. k(d, f.children, g.children, b, I, A);
  6252. var H = 0
  6253. , N = g.children;
  6254. if (g.dom = null,
  6255. N != null) {
  6256. for (var B = 0; B < N.length; B++) {
  6257. var Y = N[B];
  6258. Y != null && Y.dom != null && (g.dom == null && (g.dom = Y.dom),
  6259. H += Y.domSize || 1)
  6260. }
  6261. H !== 1 && (g.domSize = H)
  6262. }
  6263. }
  6264. function q(d, f, g, b) {
  6265. var I = f.dom = d.dom;
  6266. b = r(f) || b,
  6267. f.tag === "textarea" && f.attrs == null && (f.attrs = {}),
  6268. qo(f, d.attrs, f.attrs, b),
  6269. G(f) || k(I, d.children, f.children, g, null, b)
  6270. }
  6271. function P(d, f, g, b, I, A) {
  6272. if (g.instance = e.normalize(l.call(g.state.view, g)),
  6273. g.instance === g)
  6274. throw Error("A view cannot return the vnode it received as argument");
  6275. Vi(g.state, g, b),
  6276. g.attrs != null && Vi(g.attrs, g, b),
  6277. g.instance != null ? (f.instance == null ? u(d, g.instance, b, A, I) : S(d, f.instance, g.instance, b, I, A),
  6278. g.dom = g.instance.dom,
  6279. g.domSize = g.instance.domSize) : f.instance != null ? (ie(d, f.instance),
  6280. g.dom = void 0,
  6281. g.domSize = 0) : (g.dom = f.dom,
  6282. g.domSize = f.domSize)
  6283. }
  6284. function W(d, f, g) {
  6285. for (var b = Object.create(null); f < g; f++) {
  6286. var I = d[f];
  6287. if (I != null) {
  6288. var A = I.key;
  6289. A != null && (b[A] = f)
  6290. }
  6291. }
  6292. return b
  6293. }
  6294. var F = [];
  6295. function _(d) {
  6296. for (var f = [0], g = 0, b = 0, I = 0, A = F.length = d.length, I = 0; I < A; I++)
  6297. F[I] = d[I];
  6298. for (var I = 0; I < A; ++I)
  6299. if (d[I] !== -1) {
  6300. var H = f[f.length - 1];
  6301. if (d[H] < d[I]) {
  6302. F[I] = H,
  6303. f.push(I);
  6304. continue
  6305. }
  6306. for (g = 0,
  6307. b = f.length - 1; g < b; ) {
  6308. var N = (g >>> 1) + (b >>> 1) + (g & b & 1);
  6309. d[f[N]] < d[I] ? g = N + 1 : b = N
  6310. }
  6311. d[I] < d[f[g]] && (g > 0 && (F[I] = f[g - 1]),
  6312. f[g] = I)
  6313. }
  6314. for (g = f.length,
  6315. b = f[g - 1]; g-- > 0; )
  6316. f[g] = b,
  6317. b = F[b];
  6318. return F.length = 0,
  6319. f
  6320. }
  6321. function $(d, f, g) {
  6322. for (; f < d.length; f++)
  6323. if (d[f] != null && d[f].dom != null)
  6324. return d[f].dom;
  6325. return g
  6326. }
  6327. function V(d, f, g) {
  6328. var b = i.createDocumentFragment();
  6329. z(d, b, f),
  6330. X(d, b, g)
  6331. }
  6332. function z(d, f, g) {
  6333. for (; g.dom != null && g.dom.parentNode === d; ) {
  6334. if (typeof g.tag != "string") {
  6335. if (g = g.instance,
  6336. g != null)
  6337. continue
  6338. } else if (g.tag === "<")
  6339. for (var b = 0; b < g.instance.length; b++)
  6340. f.appendChild(g.instance[b]);
  6341. else if (g.tag !== "[")
  6342. f.appendChild(g.dom);
  6343. else if (g.children.length === 1) {
  6344. if (g = g.children[0],
  6345. g != null)
  6346. continue
  6347. } else
  6348. for (var b = 0; b < g.children.length; b++) {
  6349. var I = g.children[b];
  6350. I != null && z(d, f, I)
  6351. }
  6352. break
  6353. }
  6354. }
  6355. function X(d, f, g) {
  6356. g != null ? d.insertBefore(f, g) : d.appendChild(f)
  6357. }
  6358. function G(d) {
  6359. if (d.attrs == null || d.attrs.contenteditable == null && d.attrs.contentEditable == null)
  6360. return !1;
  6361. var f = d.children;
  6362. if (f != null && f.length === 1 && f[0].tag === "<") {
  6363. var g = f[0].children;
  6364. d.dom.innerHTML !== g && (d.dom.innerHTML = g)
  6365. } else if (f != null && f.length !== 0)
  6366. throw new Error("Child node of a contenteditable must be trusted.");
  6367. return !0
  6368. }
  6369. function te(d, f, g, b) {
  6370. for (var I = g; I < b; I++) {
  6371. var A = f[I];
  6372. A != null && ie(d, A)
  6373. }
  6374. }
  6375. function ie(d, f) {
  6376. var g = 0, b = f.state, I, A;
  6377. if (typeof f.tag != "string" && typeof f.state.onbeforeremove == "function") {
  6378. var H = l.call(f.state.onbeforeremove, f);
  6379. H != null && typeof H.then == "function" && (g = 1,
  6380. I = H)
  6381. }
  6382. if (f.attrs && typeof f.attrs.onbeforeremove == "function") {
  6383. var H = l.call(f.attrs.onbeforeremove, f);
  6384. H != null && typeof H.then == "function" && (g |= 2,
  6385. A = H)
  6386. }
  6387. if (o(f, b),
  6388. !g)
  6389. nt(f),
  6390. ke(d, f);
  6391. else {
  6392. if (I != null) {
  6393. var N = function() {
  6394. g & 1 && (g &= 2,
  6395. g || B())
  6396. };
  6397. I.then(N, N)
  6398. }
  6399. if (A != null) {
  6400. var N = function() {
  6401. g & 2 && (g &= 1,
  6402. g || B())
  6403. };
  6404. A.then(N, N)
  6405. }
  6406. }
  6407. function B() {
  6408. o(f, b),
  6409. nt(f),
  6410. ke(d, f)
  6411. }
  6412. }
  6413. function K(d, f) {
  6414. for (var g = 0; g < f.instance.length; g++)
  6415. d.removeChild(f.instance[g])
  6416. }
  6417. function ke(d, f) {
  6418. for (; f.dom != null && f.dom.parentNode === d; ) {
  6419. if (typeof f.tag != "string") {
  6420. if (f = f.instance,
  6421. f != null)
  6422. continue
  6423. } else if (f.tag === "<")
  6424. K(d, f);
  6425. else {
  6426. if (f.tag !== "[" && (d.removeChild(f.dom),
  6427. !Array.isArray(f.children)))
  6428. break;
  6429. if (f.children.length === 1) {
  6430. if (f = f.children[0],
  6431. f != null)
  6432. continue
  6433. } else
  6434. for (var g = 0; g < f.children.length; g++) {
  6435. var b = f.children[g];
  6436. b != null && ke(d, b)
  6437. }
  6438. }
  6439. break
  6440. }
  6441. }
  6442. function nt(d) {
  6443. if (typeof d.tag != "string" && typeof d.state.onremove == "function" && l.call(d.state.onremove, d),
  6444. d.attrs && typeof d.attrs.onremove == "function" && l.call(d.attrs.onremove, d),
  6445. typeof d.tag != "string")
  6446. d.instance != null && nt(d.instance);
  6447. else {
  6448. var f = d.children;
  6449. if (Array.isArray(f))
  6450. for (var g = 0; g < f.length; g++) {
  6451. var b = f[g];
  6452. b != null && nt(b)
  6453. }
  6454. }
  6455. }
  6456. function Bi(d, f, g) {
  6457. d.tag === "input" && f.type != null && d.dom.setAttribute("type", f.type);
  6458. var b = f != null && d.tag === "input" && f.type === "file";
  6459. for (var I in f)
  6460. Ue(d, I, null, f[I], g, b)
  6461. }
  6462. function Ue(d, f, g, b, I, A) {
  6463. if (!(f === "key" || f === "is" || b == null || Ts(f) || g === b && !Wo(d, f) && typeof b != "object" || f === "type" && d.tag === "input")) {
  6464. if (f[0] === "o" && f[1] === "n")
  6465. return Es(d, f, b);
  6466. if (f.slice(0, 6) === "xlink:")
  6467. d.dom.setAttributeNS("http://www.w3.org/1999/xlink", f.slice(6), b);
  6468. else if (f === "style")
  6469. Ms(d.dom, g, b);
  6470. else if (Is(d, f, I)) {
  6471. if (f === "value") {
  6472. if ((d.tag === "input" || d.tag === "textarea") && d.dom.value === "" + b && (A || d.dom === c()) || d.tag === "select" && g !== null && d.dom.value === "" + b || d.tag === "option" && g !== null && d.dom.value === "" + b)
  6473. return;
  6474. if (A && "" + b != "") {
  6475. console.error("`value` is read-only on file inputs!");
  6476. return
  6477. }
  6478. }
  6479. d.dom[f] = b
  6480. } else
  6481. typeof b == "boolean" ? b ? d.dom.setAttribute(f, "") : d.dom.removeAttribute(f) : d.dom.setAttribute(f === "className" ? "class" : f, b)
  6482. }
  6483. }
  6484. function Ye(d, f, g, b) {
  6485. if (!(f === "key" || f === "is" || g == null || Ts(f)))
  6486. if (f[0] === "o" && f[1] === "n")
  6487. Es(d, f, void 0);
  6488. else if (f === "style")
  6489. Ms(d.dom, g, null);
  6490. else if (Is(d, f, b) && f !== "className" && f !== "title" && !(f === "value" && (d.tag === "option" || d.tag === "select" && d.dom.selectedIndex === -1 && d.dom === c())) && !(d.tag === "input" && f === "type"))
  6491. d.dom[f] = null;
  6492. else {
  6493. var I = f.indexOf(":");
  6494. I !== -1 && (f = f.slice(I + 1)),
  6495. g !== !1 && d.dom.removeAttribute(f === "className" ? "class" : f)
  6496. }
  6497. }
  6498. function No(d, f) {
  6499. if ("value"in f)
  6500. if (f.value === null)
  6501. d.dom.selectedIndex !== -1 && (d.dom.value = null);
  6502. else {
  6503. var g = "" + f.value;
  6504. (d.dom.value !== g || d.dom.selectedIndex === -1) && (d.dom.value = g)
  6505. }
  6506. "selectedIndex"in f && Ue(d, "selectedIndex", null, f.selectedIndex, void 0)
  6507. }
  6508. function qo(d, f, g, b) {
  6509. if (f && f === g && console.warn("Don't reuse attrs object, use new object for every redraw, this will throw in next major"),
  6510. g != null) {
  6511. d.tag === "input" && g.type != null && d.dom.setAttribute("type", g.type);
  6512. var I = d.tag === "input" && g.type === "file";
  6513. for (var A in g)
  6514. Ue(d, A, f && f[A], g[A], b, I)
  6515. }
  6516. var H;
  6517. if (f != null)
  6518. for (var A in f)
  6519. (H = f[A]) != null && (g == null || g[A] == null) && Ye(d, A, H, b)
  6520. }
  6521. function Wo(d, f) {
  6522. return f === "value" || f === "checked" || f === "selectedIndex" || f === "selected" && d.dom === c() || d.tag === "option" && d.dom.parentNode === i.activeElement
  6523. }
  6524. function Ts(d) {
  6525. return d === "oninit" || d === "oncreate" || d === "onupdate" || d === "onremove" || d === "onbeforeremove" || d === "onbeforeupdate"
  6526. }
  6527. function Is(d, f, g) {
  6528. return g === void 0 && (d.tag.indexOf("-") > -1 || d.attrs != null && d.attrs.is || f !== "href" && f !== "list" && f !== "form" && f !== "width" && f !== "height") && f in d.dom
  6529. }
  6530. var Xo = /[A-Z]/g;
  6531. function Go(d) {
  6532. return "-" + d.toLowerCase()
  6533. }
  6534. function zi(d) {
  6535. return d[0] === "-" && d[1] === "-" ? d : d === "cssFloat" ? "float" : d.replace(Xo, Go)
  6536. }
  6537. function Ms(d, f, g) {
  6538. if (f !== g)
  6539. if (g == null)
  6540. d.style.cssText = "";
  6541. else if (typeof g != "object")
  6542. d.style.cssText = g;
  6543. else if (f == null || typeof f != "object") {
  6544. d.style.cssText = "";
  6545. for (var b in g) {
  6546. var I = g[b];
  6547. I != null && d.style.setProperty(zi(b), String(I))
  6548. }
  6549. } else {
  6550. for (var b in g) {
  6551. var I = g[b];
  6552. I != null && (I = String(I)) !== String(f[b]) && d.style.setProperty(zi(b), I)
  6553. }
  6554. for (var b in f)
  6555. f[b] != null && g[b] == null && d.style.removeProperty(zi(b))
  6556. }
  6557. }
  6558. function Hi() {
  6559. this._ = s
  6560. }
  6561. Hi.prototype = Object.create(null),
  6562. Hi.prototype.handleEvent = function(d) {
  6563. var f = this["on" + d.type], g;
  6564. typeof f == "function" ? g = f.call(d.currentTarget, d) : typeof f.handleEvent == "function" && f.handleEvent(d),
  6565. this._ && d.redraw !== !1 && (0,
  6566. this._)(),
  6567. g === !1 && (d.preventDefault(),
  6568. d.stopPropagation())
  6569. }
  6570. ;
  6571. function Es(d, f, g) {
  6572. if (d.events != null) {
  6573. if (d.events._ = s,
  6574. d.events[f] === g)
  6575. return;
  6576. g != null && (typeof g == "function" || typeof g == "object") ? (d.events[f] == null && d.dom.addEventListener(f.slice(2), d.events, !1),
  6577. d.events[f] = g) : (d.events[f] != null && d.dom.removeEventListener(f.slice(2), d.events, !1),
  6578. d.events[f] = void 0)
  6579. } else
  6580. g != null && (typeof g == "function" || typeof g == "object") && (d.events = new Hi,
  6581. d.dom.addEventListener(f.slice(2), d.events, !1),
  6582. d.events[f] = g)
  6583. }
  6584. function Fi(d, f, g) {
  6585. typeof d.oninit == "function" && l.call(d.oninit, f),
  6586. typeof d.oncreate == "function" && g.push(l.bind(d.oncreate, f))
  6587. }
  6588. function Vi(d, f, g) {
  6589. typeof d.onupdate == "function" && g.push(l.bind(d.onupdate, f))
  6590. }
  6591. function Yo(d, f) {
  6592. do {
  6593. if (d.attrs != null && typeof d.attrs.onbeforeupdate == "function") {
  6594. var g = l.call(d.attrs.onbeforeupdate, d, f);
  6595. if (g !== void 0 && !g)
  6596. break
  6597. }
  6598. if (typeof d.tag != "string" && typeof d.state.onbeforeupdate == "function") {
  6599. var g = l.call(d.state.onbeforeupdate, d, f);
  6600. if (g !== void 0 && !g)
  6601. break
  6602. }
  6603. return !1
  6604. } while (!1);
  6605. return d.dom = f.dom,
  6606. d.domSize = f.domSize,
  6607. d.instance = f.instance,
  6608. d.attrs = f.attrs,
  6609. d.children = f.children,
  6610. d.text = f.text,
  6611. !0
  6612. }
  6613. var Ct;
  6614. return function(d, f, g) {
  6615. if (!d)
  6616. throw new TypeError("DOM element being rendered to does not exist.");
  6617. if (Ct != null && d.contains(Ct))
  6618. throw new TypeError("Node is currently being rendered to and thus is locked.");
  6619. var b = s
  6620. , I = Ct
  6621. , A = []
  6622. , H = c()
  6623. , N = d.namespaceURI;
  6624. Ct = d,
  6625. s = typeof g == "function" ? g : void 0;
  6626. try {
  6627. d.vnodes == null && (d.textContent = ""),
  6628. f = e.normalizeChildren(Array.isArray(f) ? f : [f]),
  6629. k(d, d.vnodes, f, A, null, N === "http://www.w3.org/1999/xhtml" ? void 0 : N),
  6630. d.vnodes = f,
  6631. H != null && c() !== H && typeof H.focus == "function" && H.focus();
  6632. for (var B = 0; B < A.length; B++)
  6633. A[B]()
  6634. } finally {
  6635. s = b,
  6636. Ct = I
  6637. }
  6638. }
  6639. }
  6640. ,
  6641. nn
  6642. }
  6643. var sn, Ls;
  6644. function eo() {
  6645. return Ls || (Ls = 1,
  6646. sn = th()(typeof window < "u" ? window : null)),
  6647. sn
  6648. }
  6649. var Ns = Ge(), ih = function(e, t, i) {
  6650. var s = []
  6651. , n = !1
  6652. , r = -1;
  6653. function o() {
  6654. for (r = 0; r < s.length; r += 2)
  6655. try {
  6656. e(s[r], Ns(s[r + 1]), l)
  6657. } catch (a) {
  6658. i.error(a)
  6659. }
  6660. r = -1
  6661. }
  6662. function l() {
  6663. n || (n = !0,
  6664. t(function() {
  6665. n = !1,
  6666. o()
  6667. }))
  6668. }
  6669. l.sync = o;
  6670. function c(a, u) {
  6671. if (u != null && u.view == null && typeof u != "function")
  6672. throw new TypeError("m.mount expects a component, not a vnode.");
  6673. var p = s.indexOf(a);
  6674. p >= 0 && (s.splice(p, 2),
  6675. p <= r && (r -= 2),
  6676. e(a, [])),
  6677. u != null && (s.push(a, u),
  6678. e(a, Ns(u), l))
  6679. }
  6680. return {
  6681. mount: c,
  6682. redraw: l
  6683. }
  6684. }, nh = eo(), ss = ih(nh, typeof requestAnimationFrame < "u" ? requestAnimationFrame : null, typeof console < "u" ? console : null), rn, qs;
  6685. function to() {
  6686. return qs || (qs = 1,
  6687. rn = function(e) {
  6688. if (Object.prototype.toString.call(e) !== "[object Object]")
  6689. return "";
  6690. var t = [];
  6691. for (var i in e)
  6692. s(i, e[i]);
  6693. return t.join("&");
  6694. function s(n, r) {
  6695. if (Array.isArray(r))
  6696. for (var o = 0; o < r.length; o++)
  6697. s(n + "[" + o + "]", r[o]);
  6698. else if (Object.prototype.toString.call(r) === "[object Object]")
  6699. for (var o in r)
  6700. s(n + "[" + o + "]", r[o]);
  6701. else
  6702. t.push(encodeURIComponent(n) + (r != null && r !== "" ? "=" + encodeURIComponent(r) : ""))
  6703. }
  6704. }
  6705. ),
  6706. rn
  6707. }
  6708. var on, Ws;
  6709. function io() {
  6710. if (Ws)
  6711. return on;
  6712. Ws = 1;
  6713. var e = Ci;
  6714. return on = Object.assign || function(t, i) {
  6715. for (var s in i)
  6716. e.call(i, s) && (t[s] = i[s])
  6717. }
  6718. ,
  6719. on
  6720. }
  6721. var an, Xs;
  6722. function rs() {
  6723. if (Xs)
  6724. return an;
  6725. Xs = 1;
  6726. var e = to()
  6727. , t = io();
  6728. return an = function(i, s) {
  6729. if (/:([^\/\.-]+)(\.{3})?:/.test(i))
  6730. throw new SyntaxError("Template parameter names must be separated by either a '/', '-', or '.'.");
  6731. if (s == null)
  6732. return i;
  6733. var n = i.indexOf("?")
  6734. , r = i.indexOf("#")
  6735. , o = r < 0 ? i.length : r
  6736. , l = n < 0 ? o : n
  6737. , c = i.slice(0, l)
  6738. , a = {};
  6739. t(a, s);
  6740. var u = c.replace(/:([^\/\.-]+)(\.{3})?/g, function(D, k, S) {
  6741. return delete a[k],
  6742. s[k] == null ? D : S ? s[k] : encodeURIComponent(String(s[k]))
  6743. })
  6744. , p = u.indexOf("?")
  6745. , h = u.indexOf("#")
  6746. , m = h < 0 ? u.length : h
  6747. , w = p < 0 ? m : p
  6748. , v = u.slice(0, w);
  6749. n >= 0 && (v += i.slice(n, o)),
  6750. p >= 0 && (v += (n < 0 ? "?" : "&") + u.slice(p, m));
  6751. var x = e(a);
  6752. return x && (v += (n < 0 && p < 0 ? "?" : "&") + x),
  6753. r >= 0 && (v += i.slice(r)),
  6754. h >= 0 && (v += (r < 0 ? "" : "&") + u.slice(h)),
  6755. v
  6756. }
  6757. ,
  6758. an
  6759. }
  6760. var sh = rs(), Gs = Ci, rh = function(e, t, i) {
  6761. var s = 0;
  6762. function n(l) {
  6763. return new t(l)
  6764. }
  6765. n.prototype = t.prototype,
  6766. n.__proto__ = t;
  6767. function r(l) {
  6768. return function(c, a) {
  6769. typeof c != "string" ? (a = c,
  6770. c = c.url) : a == null && (a = {});
  6771. var u = new t(function(w, v) {
  6772. l(sh(c, a.params), a, function(x) {
  6773. if (typeof a.type == "function")
  6774. if (Array.isArray(x))
  6775. for (var D = 0; D < x.length; D++)
  6776. x[D] = new a.type(x[D]);
  6777. else
  6778. x = new a.type(x);
  6779. w(x)
  6780. }, v)
  6781. }
  6782. );
  6783. if (a.background === !0)
  6784. return u;
  6785. var p = 0;
  6786. function h() {
  6787. --p === 0 && typeof i == "function" && i()
  6788. }
  6789. return m(u);
  6790. function m(w) {
  6791. var v = w.then;
  6792. return w.constructor = n,
  6793. w.then = function() {
  6794. p++;
  6795. var x = v.apply(w, arguments);
  6796. return x.then(h, function(D) {
  6797. if (h(),
  6798. p === 0)
  6799. throw D
  6800. }),
  6801. m(x)
  6802. }
  6803. ,
  6804. w
  6805. }
  6806. }
  6807. }
  6808. function o(l, c) {
  6809. for (var a in l.headers)
  6810. if (Gs.call(l.headers, a) && a.toLowerCase() === c)
  6811. return !0;
  6812. return !1
  6813. }
  6814. return {
  6815. request: r(function(l, c, a, u) {
  6816. var p = c.method != null ? c.method.toUpperCase() : "GET", h = c.body, m = (c.serialize == null || c.serialize === JSON.serialize) && !(h instanceof e.FormData || h instanceof e.URLSearchParams), w = c.responseType || (typeof c.extract == "function" ? "" : "json"), v = new e.XMLHttpRequest, x = !1, D = !1, k = v, S, O = v.abort;
  6817. v.abort = function() {
  6818. x = !0,
  6819. O.call(this)
  6820. }
  6821. ,
  6822. v.open(p, l, c.async !== !1, typeof c.user == "string" ? c.user : void 0, typeof c.password == "string" ? c.password : void 0),
  6823. m && h != null && !o(c, "content-type") && v.setRequestHeader("Content-Type", "application/json; charset=utf-8"),
  6824. typeof c.deserialize != "function" && !o(c, "accept") && v.setRequestHeader("Accept", "application/json, text/*"),
  6825. c.withCredentials && (v.withCredentials = c.withCredentials),
  6826. c.timeout && (v.timeout = c.timeout),
  6827. v.responseType = w;
  6828. for (var U in c.headers)
  6829. Gs.call(c.headers, U) && v.setRequestHeader(U, c.headers[U]);
  6830. v.onreadystatechange = function(L) {
  6831. if (!x && L.target.readyState === 4)
  6832. try {
  6833. var q = L.target.status >= 200 && L.target.status < 300 || L.target.status === 304 || /^file:\/\//i.test(l), P = L.target.response, W;
  6834. if (w === "json") {
  6835. if (!L.target.responseType && typeof c.extract != "function")
  6836. try {
  6837. P = JSON.parse(L.target.responseText)
  6838. } catch {
  6839. P = null
  6840. }
  6841. } else
  6842. (!w || w === "text") && P == null && (P = L.target.responseText);
  6843. if (typeof c.extract == "function" ? (P = c.extract(L.target, c),
  6844. q = !0) : typeof c.deserialize == "function" && (P = c.deserialize(P)),
  6845. q)
  6846. a(P);
  6847. else {
  6848. var F = function() {
  6849. try {
  6850. W = L.target.responseText
  6851. } catch {
  6852. W = P
  6853. }
  6854. var _ = new Error(W);
  6855. _.code = L.target.status,
  6856. _.response = P,
  6857. u(_)
  6858. };
  6859. v.status === 0 ? setTimeout(function() {
  6860. D || F()
  6861. }) : F()
  6862. }
  6863. } catch (_) {
  6864. u(_)
  6865. }
  6866. }
  6867. ,
  6868. v.ontimeout = function(L) {
  6869. D = !0;
  6870. var q = new Error("Request timed out");
  6871. q.code = L.target.status,
  6872. u(q)
  6873. }
  6874. ,
  6875. typeof c.config == "function" && (v = c.config(v, c, l) || v,
  6876. v !== k && (S = v.abort,
  6877. v.abort = function() {
  6878. x = !0,
  6879. S.call(this)
  6880. }
  6881. )),
  6882. h == null ? v.send() : typeof c.serialize == "function" ? v.send(c.serialize(h)) : h instanceof e.FormData || h instanceof e.URLSearchParams ? v.send(h) : v.send(JSON.stringify(h))
  6883. }),
  6884. jsonp: r(function(l, c, a, u) {
  6885. var p = c.callbackName || "_mithril_" + Math.round(Math.random() * 1e16) + "_" + s++
  6886. , h = e.document.createElement("script");
  6887. e[p] = function(m) {
  6888. delete e[p],
  6889. h.parentNode.removeChild(h),
  6890. a(m)
  6891. }
  6892. ,
  6893. h.onerror = function() {
  6894. delete e[p],
  6895. h.parentNode.removeChild(h),
  6896. u(new Error("JSONP request failed"))
  6897. }
  6898. ,
  6899. h.src = l + (l.indexOf("?") < 0 ? "?" : "&") + encodeURIComponent(c.callbackKey || "callback") + "=" + encodeURIComponent(p),
  6900. e.document.documentElement.appendChild(h)
  6901. })
  6902. }
  6903. }, oh = yi, ah = ss, lh = rh(typeof window < "u" ? window : null, oh, ah.redraw), ln, Ys;
  6904. function no() {
  6905. if (Ys)
  6906. return ln;
  6907. Ys = 1;
  6908. function e(t) {
  6909. try {
  6910. return decodeURIComponent(t)
  6911. } catch {
  6912. return t
  6913. }
  6914. }
  6915. return ln = function(t) {
  6916. if (t === "" || t == null)
  6917. return {};
  6918. t.charAt(0) === "?" && (t = t.slice(1));
  6919. for (var i = t.split("&"), s = {}, n = {}, r = 0; r < i.length; r++) {
  6920. var o = i[r].split("=")
  6921. , l = e(o[0])
  6922. , c = o.length === 2 ? e(o[1]) : "";
  6923. c === "true" ? c = !0 : c === "false" && (c = !1);
  6924. var a = l.split(/\]\[?|\[/)
  6925. , u = n;
  6926. l.indexOf("[") > -1 && a.pop();
  6927. for (var p = 0; p < a.length; p++) {
  6928. var h = a[p]
  6929. , m = a[p + 1]
  6930. , w = m == "" || !isNaN(parseInt(m, 10));
  6931. if (h === "") {
  6932. var l = a.slice(0, p).join();
  6933. s[l] == null && (s[l] = Array.isArray(u) ? u.length : 0),
  6934. h = s[l]++
  6935. } else if (h === "__proto__")
  6936. break;
  6937. if (p === a.length - 1)
  6938. u[h] = c;
  6939. else {
  6940. var v = Object.getOwnPropertyDescriptor(u, h);
  6941. v != null && (v = v.value),
  6942. v == null && (u[h] = v = w ? [] : {}),
  6943. u = v
  6944. }
  6945. }
  6946. }
  6947. return n
  6948. }
  6949. ,
  6950. ln
  6951. }
  6952. var cn, $s;
  6953. function os() {
  6954. if ($s)
  6955. return cn;
  6956. $s = 1;
  6957. var e = no();
  6958. return cn = function(t) {
  6959. var i = t.indexOf("?")
  6960. , s = t.indexOf("#")
  6961. , n = s < 0 ? t.length : s
  6962. , r = i < 0 ? n : i
  6963. , o = t.slice(0, r).replace(/\/{2,}/g, "/");
  6964. return o ? (o[0] !== "/" && (o = "/" + o),
  6965. o.length > 1 && o[o.length - 1] === "/" && (o = o.slice(0, -1))) : o = "/",
  6966. {
  6967. path: o,
  6968. params: i < 0 ? {} : e(t.slice(i + 1, n))
  6969. }
  6970. }
  6971. ,
  6972. cn
  6973. }
  6974. var hn, Ks;
  6975. function ch() {
  6976. if (Ks)
  6977. return hn;
  6978. Ks = 1;
  6979. var e = os();
  6980. return hn = function(t) {
  6981. var i = e(t)
  6982. , s = Object.keys(i.params)
  6983. , n = []
  6984. , r = new RegExp("^" + i.path.replace(/:([^\/.-]+)(\.{3}|\.(?!\.)|-)?|[\\^$*+.()|\[\]{}]/g, function(o, l, c) {
  6985. return l == null ? "\\" + o : (n.push({
  6986. k: l,
  6987. r: c === "..."
  6988. }),
  6989. c === "..." ? "(.*)" : c === "." ? "([^/]+)\\." : "([^/]+)" + (c || ""))
  6990. }) + "$");
  6991. return function(o) {
  6992. for (var l = 0; l < s.length; l++)
  6993. if (i.params[s[l]] !== o.params[s[l]])
  6994. return !1;
  6995. if (!n.length)
  6996. return r.test(o.path);
  6997. var c = r.exec(o.path);
  6998. if (c == null)
  6999. return !1;
  7000. for (var l = 0; l < n.length; l++)
  7001. o.params[n[l].k] = n[l].r ? c[l + 1] : decodeURIComponent(c[l + 1]);
  7002. return !0
  7003. }
  7004. }
  7005. ,
  7006. hn
  7007. }
  7008. var fn, Js;
  7009. function so() {
  7010. if (Js)
  7011. return fn;
  7012. Js = 1;
  7013. var e = Ci
  7014. , t = new RegExp("^(?:key|oninit|oncreate|onbeforeupdate|onupdate|onbeforeremove|onremove)$");
  7015. return fn = function(i, s) {
  7016. var n = {};
  7017. if (s != null)
  7018. for (var r in i)
  7019. e.call(i, r) && !t.test(r) && s.indexOf(r) < 0 && (n[r] = i[r]);
  7020. else
  7021. for (var r in i)
  7022. e.call(i, r) && !t.test(r) && (n[r] = i[r]);
  7023. return n
  7024. }
  7025. ,
  7026. fn
  7027. }
  7028. var un, Qs;
  7029. function hh() {
  7030. if (Qs)
  7031. return un;
  7032. Qs = 1;
  7033. var e = Ge()
  7034. , t = Zr
  7035. , i = yi
  7036. , s = rs()
  7037. , n = os()
  7038. , r = ch()
  7039. , o = io()
  7040. , l = so()
  7041. , c = {};
  7042. function a(u) {
  7043. try {
  7044. return decodeURIComponent(u)
  7045. } catch {
  7046. return u
  7047. }
  7048. }
  7049. return un = function(u, p) {
  7050. var h = u == null ? null : typeof u.setImmediate == "function" ? u.setImmediate : u.setTimeout, m = i.resolve(), w = !1, v = !1, x = 0, D, k, S = c, O, U, L, q, P = {
  7051. onbeforeupdate: function() {
  7052. return x = x ? 2 : 1,
  7053. !(!x || c === S)
  7054. },
  7055. onremove: function() {
  7056. u.removeEventListener("popstate", _, !1),
  7057. u.removeEventListener("hashchange", F, !1)
  7058. },
  7059. view: function() {
  7060. if (!(!x || c === S)) {
  7061. var z = [e(O, U.key, U)];
  7062. return S && (z = S.render(z[0])),
  7063. z
  7064. }
  7065. }
  7066. }, W = V.SKIP = {};
  7067. function F() {
  7068. w = !1;
  7069. var z = u.location.hash;
  7070. V.prefix[0] !== "#" && (z = u.location.search + z,
  7071. V.prefix[0] !== "?" && (z = u.location.pathname + z,
  7072. z[0] !== "/" && (z = "/" + z)));
  7073. var X = z.concat().replace(/(?:%[a-f89][a-f0-9])+/gim, a).slice(V.prefix.length)
  7074. , G = n(X);
  7075. o(G.params, u.history.state);
  7076. function te(K) {
  7077. console.error(K),
  7078. $(k, null, {
  7079. replace: !0
  7080. })
  7081. }
  7082. ie(0);
  7083. function ie(K) {
  7084. for (; K < D.length; K++)
  7085. if (D[K].check(G)) {
  7086. var ke = D[K].component
  7087. , nt = D[K].route
  7088. , Bi = ke
  7089. , Ue = q = function(Ye) {
  7090. if (Ue === q) {
  7091. if (Ye === W)
  7092. return ie(K + 1);
  7093. O = Ye != null && (typeof Ye.view == "function" || typeof Ye == "function") ? Ye : "div",
  7094. U = G.params,
  7095. L = X,
  7096. q = null,
  7097. S = ke.render ? ke : null,
  7098. x === 2 ? p.redraw() : (x = 2,
  7099. p.redraw.sync())
  7100. }
  7101. }
  7102. ;
  7103. ke.view || typeof ke == "function" ? (ke = {},
  7104. Ue(Bi)) : ke.onmatch ? m.then(function() {
  7105. return ke.onmatch(G.params, X, nt)
  7106. }).then(Ue, X === k ? null : te) : Ue("div");
  7107. return
  7108. }
  7109. if (X === k)
  7110. throw new Error("Could not resolve default route " + k + ".");
  7111. $(k, null, {
  7112. replace: !0
  7113. })
  7114. }
  7115. }
  7116. function _() {
  7117. w || (w = !0,
  7118. h(F))
  7119. }
  7120. function $(z, X, G) {
  7121. if (z = s(z, X),
  7122. v) {
  7123. _();
  7124. var te = G ? G.state : null
  7125. , ie = G ? G.title : null;
  7126. G && G.replace ? u.history.replaceState(te, ie, V.prefix + z) : u.history.pushState(te, ie, V.prefix + z)
  7127. } else
  7128. u.location.href = V.prefix + z
  7129. }
  7130. function V(z, X, G) {
  7131. if (!z)
  7132. throw new TypeError("DOM element being rendered to does not exist.");
  7133. if (D = Object.keys(G).map(function(ie) {
  7134. if (ie[0] !== "/")
  7135. throw new SyntaxError("Routes must start with a '/'.");
  7136. if (/:([^\/\.-]+)(\.{3})?:/.test(ie))
  7137. throw new SyntaxError("Route parameter names must be separated with either '/', '.', or '-'.");
  7138. return {
  7139. route: ie,
  7140. component: G[ie],
  7141. check: r(ie)
  7142. }
  7143. }),
  7144. k = X,
  7145. X != null) {
  7146. var te = n(X);
  7147. if (!D.some(function(ie) {
  7148. return ie.check(te)
  7149. }))
  7150. throw new ReferenceError("Default route doesn't match any known routes.")
  7151. }
  7152. typeof u.history.pushState == "function" ? u.addEventListener("popstate", _, !1) : V.prefix[0] === "#" && u.addEventListener("hashchange", F, !1),
  7153. v = !0,
  7154. p.mount(z, P),
  7155. F()
  7156. }
  7157. return V.set = function(z, X, G) {
  7158. q != null && (G = G || {},
  7159. G.replace = !0),
  7160. q = null,
  7161. $(z, X, G)
  7162. }
  7163. ,
  7164. V.get = function() {
  7165. return L
  7166. }
  7167. ,
  7168. V.prefix = "#!",
  7169. V.Link = {
  7170. view: function(z) {
  7171. var X = t(z.attrs.selector || "a", l(z.attrs, ["options", "params", "selector", "onclick"]), z.children), G, te, ie;
  7172. return (X.attrs.disabled = Boolean(X.attrs.disabled)) ? (X.attrs.href = null,
  7173. X.attrs["aria-disabled"] = "true") : (G = z.attrs.options,
  7174. te = z.attrs.onclick,
  7175. ie = s(X.attrs.href, z.attrs.params),
  7176. X.attrs.href = V.prefix + ie,
  7177. X.attrs.onclick = function(K) {
  7178. var ke;
  7179. typeof te == "function" ? ke = te.call(K.currentTarget, K) : te == null || typeof te != "object" || typeof te.handleEvent == "function" && te.handleEvent(K),
  7180. ke !== !1 && !K.defaultPrevented && (K.button === 0 || K.which === 0 || K.which === 1) && (!K.currentTarget.target || K.currentTarget.target === "_self") && !K.ctrlKey && !K.metaKey && !K.shiftKey && !K.altKey && (K.preventDefault(),
  7181. K.redraw = !1,
  7182. V.set(ie, null, G))
  7183. }
  7184. ),
  7185. X
  7186. }
  7187. },
  7188. V.param = function(z) {
  7189. return U && z != null ? U[z] : U
  7190. }
  7191. ,
  7192. V
  7193. }
  7194. ,
  7195. un
  7196. }
  7197. var dn, Zs;
  7198. function fh() {
  7199. if (Zs)
  7200. return dn;
  7201. Zs = 1;
  7202. var e = ss;
  7203. return dn = hh()(typeof window < "u" ? window : null, e),
  7204. dn
  7205. }
  7206. var Ai = eh
  7207. , ro = lh
  7208. , oo = ss
  7209. , pe = function() {
  7210. return Ai.apply(this, arguments)
  7211. };
  7212. pe.m = Ai;
  7213. pe.trust = Ai.trust;
  7214. pe.fragment = Ai.fragment;
  7215. pe.Fragment = "[";
  7216. pe.mount = oo.mount;
  7217. pe.route = fh();
  7218. pe.render = eo();
  7219. pe.redraw = oo.redraw;
  7220. pe.request = ro.request;
  7221. pe.jsonp = ro.jsonp;
  7222. pe.parseQueryString = no();
  7223. pe.buildQueryString = to();
  7224. pe.parsePathname = os();
  7225. pe.buildPathname = rs();
  7226. pe.vnode = Ge();
  7227. pe.PromisePolyfill = jr();
  7228. pe.censor = so();
  7229. var Ne = pe;
  7230. function we(e, t, i, s, n) {
  7231. this.debugLog = !1,
  7232. this.baseUrl = e,
  7233. this.lobbySize = i,
  7234. this.devPort = t,
  7235. this.lobbySpread = s,
  7236. this.rawIPs = !!n,
  7237. this.server = void 0,
  7238. this.gameIndex = void 0,
  7239. this.callback = void 0,
  7240. this.errorCallback = void 0
  7241. }
  7242. we.prototype.regionInfo = {
  7243. 0: {
  7244. name: "Local",
  7245. latitude: 0,
  7246. longitude: 0
  7247. },
  7248. "us-east": {
  7249. name: "Miami",
  7250. latitude: 40.1393329,
  7251. longitude: -75.8521818
  7252. },
  7253. "us-west": {
  7254. name: "Silicon Valley",
  7255. latitude: 47.6149942,
  7256. longitude: -122.4759879
  7257. },
  7258. gb: {
  7259. name: "London",
  7260. latitude: 51.5283063,
  7261. longitude: -.382486
  7262. },
  7263. "eu-west": {
  7264. name: "Frankfurt",
  7265. latitude: 50.1211273,
  7266. longitude: 8.496137
  7267. },
  7268. au: {
  7269. name: "Sydney",
  7270. latitude: -33.8479715,
  7271. longitude: 150.651084
  7272. },
  7273. sg: {
  7274. name: "Singapore",
  7275. latitude: 1.3147268,
  7276. longitude: 103.7065876
  7277. }
  7278. };
  7279. we.prototype.start = function(e, t, i, s) {
  7280. if (this.callback = t,
  7281. this.errorCallback = i,
  7282. s)
  7283. return t();
  7284. const n = this.parseServerQuery(e);
  7285. n && n.length > 0 ? (this.log("Found server in query."),
  7286. this.password = n[3],
  7287. this.connect(n[0], n[1], n[2])) : this.errorCallback("Unable to find server")
  7288. }
  7289. ;
  7290. we.prototype.parseServerQuery = function(e) {
  7291. const t = new URLSearchParams(location.search,!0)
  7292. , i = e || t.get("server");
  7293. if (typeof i != "string")
  7294. return [];
  7295. const [s,n] = i.split(":");
  7296. return [s, n, t.get("password")]
  7297. }
  7298. ;
  7299. we.prototype.findServer = function(e, t) {
  7300. var i = this.servers[e];
  7301. for (let s = 0; s < i.length; s++) {
  7302. const n = i[s];
  7303. if (n.name === t)
  7304. return n
  7305. }
  7306. console.warn("Could not find server in region " + e + " with serverName " + t + ".")
  7307. }
  7308. ;
  7309. we.prototype.seekServer = function(e, t, i) {
  7310. i == null && (i = "random"),
  7311. t == null && (t = !1);
  7312. const s = ["random"]
  7313. , n = this.lobbySize
  7314. , r = this.lobbySpread
  7315. , o = this.servers[e].flatMap(function(h) {
  7316. let m = 0;
  7317. return h.games.map(function(w) {
  7318. const v = m++;
  7319. return {
  7320. region: h.region,
  7321. index: h.index * h.games.length + v,
  7322. gameIndex: v,
  7323. gameCount: h.games.length,
  7324. playerCount: w.playerCount,
  7325. playerCapacity: w.playerCapacity,
  7326. isPrivate: w.isPrivate
  7327. }
  7328. })
  7329. }).filter(function(h) {
  7330. return !h.isPrivate
  7331. }).filter(function(h) {
  7332. return t ? h.playerCount == 0 && h.gameIndex >= h.gameCount / 2 : !0
  7333. }).filter(function(h) {
  7334. return i == "random" ? !0 : s[h.index % s.length].key == i
  7335. }).sort(function(h, m) {
  7336. return m.playerCount - h.playerCount
  7337. }).filter(function(h) {
  7338. return h.playerCount < n
  7339. });
  7340. if (t && o.reverse(),
  7341. o.length == 0) {
  7342. this.errorCallback("No open servers.");
  7343. return
  7344. }
  7345. const l = Math.min(r, o.length);
  7346. var u = Math.floor(Math.random() * l);
  7347. u = Math.min(u, o.length - 1);
  7348. const c = o[u]
  7349. , a = c.region;
  7350. var u = Math.floor(c.index / c.gameCount);
  7351. const p = c.index % c.gameCount;
  7352. return this.log("Found server."),
  7353. [a, u, p]
  7354. }
  7355. ;
  7356. we.prototype.connect = function(e, t, i) {
  7357. if (this.connected)
  7358. return;
  7359. const s = this.findServer(e, t);
  7360. if (s == null) {
  7361. this.errorCallback("Failed to find server for region " + e + " and serverName " + t);
  7362. return
  7363. }
  7364. if (this.log("Connecting to server", s, "with game index", i),
  7365. s.playerCount >= s.playerCapacity) {
  7366. const errocall = (this.errorCallback("Server is already full."));
  7367. __3_errorbypass__1__3___ ? bs() : errocall;
  7368. }
  7369. window.history.replaceState(document.title, document.title, this.generateHref(e, t, this.password)),
  7370. this.server = s,
  7371. this.gameIndex = i,
  7372. this.log("Calling callback with address", this.serverAddress(s), "on port", this.serverPort(s)),
  7373. this.callback(this.serverAddress(s), this.serverPort(s), i),
  7374. Lt && clearInterval(Lt)
  7375. }
  7376. ;
  7377. we.prototype.switchServer = function(e, t) {
  7378. this.switchingServers = !0,
  7379. window.location = this.generateHref(e, t, null)
  7380. }
  7381. ;
  7382. we.prototype.generateHref = function(e, t, i) {
  7383. let s = window.location.href.split("?")[0];
  7384. return s += "?server=" + e + ":" + t,
  7385. i && (s += "&password=" + encodeURIComponent(i)),
  7386. s
  7387. }
  7388. ;
  7389. we.prototype.serverAddress = function(e) {
  7390. return e.region == 0 ? "localhost" : e.key + "." + e.region + "." + this.baseUrl
  7391. }
  7392. ;
  7393. we.prototype.serverPort = function(e) {
  7394. return e.port
  7395. }
  7396. ;
  7397. let Lt;
  7398. function uh(e) {
  7399. e = e.filter(n=>n.playerCount !== n.playerCapacity);
  7400. const t = Math.min(...e.map(n=>n.ping || 1 / 0))
  7401. , i = e.filter(n=>n.ping === t);
  7402. return !i.length > 0 ? null : i.reduce((n,r)=>n.playerCount > r.playerCount ? n : r)
  7403. }
  7404. we.prototype.processServers = function(e) {
  7405. return Lt && clearInterval(Lt),
  7406. new Promise(t=>{
  7407. const i = {}
  7408. , s = c=>{
  7409. const a = i[c]
  7410. , u = a[0];
  7411. let p = this.serverAddress(u);
  7412. const h = this.serverPort(u);
  7413. h && (p += `:${h}`);
  7414. const m = `https://${p}/ping`
  7415. , w = new Date().getTime();
  7416. return Promise.race([fetch(m).then(()=>{
  7417. const v = new Date().getTime() - w;
  7418. a.forEach(x=>{
  7419. x.pings = x.pings ?? [],
  7420. x.pings.push(v),
  7421. x.pings.length > 10 && x.pings.shift(),
  7422. x.ping = Math.floor(x.pings.reduce((D,k)=>D + k, 0) / x.pings.length)
  7423. }
  7424. )
  7425. }
  7426. ).catch(()=>{}
  7427. ), new Promise(v=>setTimeout(()=>v(), 100))])
  7428. }
  7429. , n = async()=>{
  7430. await Promise.all(Object.keys(i).map(s)),
  7431. window.blockRedraw || Ne.redraw()
  7432. }
  7433. ;
  7434. e.forEach(c=>{
  7435. i[c.region] = i[c.region] || [],
  7436. i[c.region].push(c)
  7437. }
  7438. );
  7439. for (const c in i)
  7440. i[c] = i[c].sort(function(a, u) {
  7441. return u.playerCount - a.playerCount
  7442. });
  7443. this.servers = i;
  7444. let r;
  7445. const [o,l] = this.parseServerQuery();
  7446. e.forEach(c=>{
  7447. o === c.region && l === c.name && (c.selected = !0,
  7448. r = c)
  7449. }
  7450. ),
  7451. n().then(n).then(()=>{
  7452. if (r)
  7453. return;
  7454. let c = uh(e);
  7455. c || (c = e[0]),
  7456. c && (c.selected = !0,
  7457. window.history.replaceState(document.title, document.title, this.generateHref(c.region, c.name, this.password))),
  7458. window.blockRedraw || Ne.redraw()
  7459. }
  7460. ).then(n).catch(c=>{}
  7461. ).finally(t),
  7462. Lt = setInterval(n, 5e3)
  7463. }
  7464. )
  7465. }
  7466. ;
  7467. we.prototype.ipToHex = function(e) {
  7468. return e.split(".").map(i=>("00" + parseInt(i).toString(16)).substr(-2)).join("").toLowerCase()
  7469. }
  7470. ;
  7471. we.prototype.hashIP = function(e) {
  7472. return On(this.ipToHex(e))
  7473. }
  7474. ;
  7475. we.prototype.log = function() {
  7476. if (this.debugLog)
  7477. return console.log.apply(void 0, arguments);
  7478. if (console.verbose)
  7479. return console.verbose.apply(void 0, arguments)
  7480. }
  7481. ;
  7482. we.prototype.stripRegion = function(e) {
  7483. return e.startsWith("vultr:") ? e = e.slice(6) : e.startsWith("do:") && (e = e.slice(3)),
  7484. e
  7485. }
  7486. ;
  7487. const dh = function(e, t) {
  7488. return e.concat(t)
  7489. }
  7490. , ph = function(e, t) {
  7491. return t.map(e).reduce(dh, [])
  7492. };
  7493. Array.prototype.flatMap = function(e) {
  7494. return ph(e, this)
  7495. }
  7496. ;
  7497. const fi = (e,t)=>{
  7498. const i = t.x - e.x
  7499. , s = t.y - e.y;
  7500. return Math.sqrt(i * i + s * s)
  7501. }
  7502. , mh = (e,t)=>{
  7503. const i = t.x - e.x
  7504. , s = t.y - e.y;
  7505. return yh(Math.atan2(s, i))
  7506. }
  7507. , gh = (e,t,i)=>{
  7508. const s = {
  7509. x: 0,
  7510. y: 0
  7511. };
  7512. return i = Bn(i),
  7513. s.x = e.x - t * Math.cos(i),
  7514. s.y = e.y - t * Math.sin(i),
  7515. s
  7516. }
  7517. , Bn = e=>e * (Math.PI / 180)
  7518. , yh = e=>e * (180 / Math.PI)
  7519. , wh = e=>isNaN(e.buttons) ? e.pressure !== 0 : e.buttons !== 0
  7520. , pn = new Map
  7521. , js = e=>{
  7522. pn.has(e) && clearTimeout(pn.get(e)),
  7523. pn.set(e, setTimeout(e, 100))
  7524. }
  7525. , wi = (e,t,i)=>{
  7526. const s = t.split(/[ ,]+/g);
  7527. let n;
  7528. for (let r = 0; r < s.length; r += 1)
  7529. n = s[r],
  7530. e.addEventListener ? e.addEventListener(n, i, !1) : e.attachEvent && e.attachEvent(n, i)
  7531. }
  7532. , er = (e,t,i)=>{
  7533. const s = t.split(/[ ,]+/g);
  7534. let n;
  7535. for (let r = 0; r < s.length; r += 1)
  7536. n = s[r],
  7537. e.removeEventListener ? e.removeEventListener(n, i) : e.detachEvent && e.detachEvent(n, i)
  7538. }
  7539. , ao = e=>(e.preventDefault(),
  7540. e.type.match(/^touch/) ? e.changedTouches : e)
  7541. , tr = ()=>{
  7542. const e = window.pageXOffset !== void 0 ? window.pageXOffset : (document.documentElement || document.body.parentNode || document.body).scrollLeft
  7543. , t = window.pageYOffset !== void 0 ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop;
  7544. return {
  7545. x: e,
  7546. y: t
  7547. }
  7548. }
  7549. , ir = (e,t)=>{
  7550. t.top || t.right || t.bottom || t.left ? (e.style.top = t.top,
  7551. e.style.right = t.right,
  7552. e.style.bottom = t.bottom,
  7553. e.style.left = t.left) : (e.style.left = t.x + "px",
  7554. e.style.top = t.y + "px")
  7555. }
  7556. , as = (e,t,i)=>{
  7557. const s = lo(e);
  7558. for (let n in s)
  7559. if (s.hasOwnProperty(n))
  7560. if (typeof t == "string")
  7561. s[n] = t + " " + i;
  7562. else {
  7563. let r = "";
  7564. for (let o = 0, l = t.length; o < l; o += 1)
  7565. r += t[o] + " " + i + ", ";
  7566. s[n] = r.slice(0, -2)
  7567. }
  7568. return s
  7569. }
  7570. , kh = (e,t)=>{
  7571. const i = lo(e);
  7572. for (let s in i)
  7573. i.hasOwnProperty(s) && (i[s] = t);
  7574. return i
  7575. }
  7576. , lo = e=>{
  7577. const t = {};
  7578. return t[e] = "",
  7579. ["webkit", "Moz", "o"].forEach(function(s) {
  7580. t[s + e.charAt(0).toUpperCase() + e.slice(1)] = ""
  7581. }),
  7582. t
  7583. }
  7584. , mn = (e,t)=>{
  7585. for (let i in t)
  7586. t.hasOwnProperty(i) && (e[i] = t[i]);
  7587. return e
  7588. }
  7589. , vh = (e,t)=>{
  7590. const i = {};
  7591. for (let s in e)
  7592. e.hasOwnProperty(s) && t.hasOwnProperty(s) ? i[s] = t[s] : e.hasOwnProperty(s) && (i[s] = e[s]);
  7593. return i
  7594. }
  7595. , zn = (e,t)=>{
  7596. if (e.length)
  7597. for (let i = 0, s = e.length; i < s; i += 1)
  7598. t(e[i]);
  7599. else
  7600. t(e)
  7601. }
  7602. , xh = (e,t,i)=>({
  7603. x: Math.min(Math.max(e.x, t.x - i), t.x + i),
  7604. y: Math.min(Math.max(e.y, t.y - i), t.y + i)
  7605. });
  7606. var bh = "ontouchstart"in window, Sh = !!window.PointerEvent, Th = !!window.MSPointerEvent, Bt = {
  7607. touch: {
  7608. start: "touchstart",
  7609. move: "touchmove",
  7610. end: "touchend, touchcancel"
  7611. },
  7612. mouse: {
  7613. start: "mousedown",
  7614. move: "mousemove",
  7615. end: "mouseup"
  7616. },
  7617. pointer: {
  7618. start: "pointerdown",
  7619. move: "pointermove",
  7620. end: "pointerup, pointercancel"
  7621. },
  7622. MSPointer: {
  7623. start: "MSPointerDown",
  7624. move: "MSPointerMove",
  7625. end: "MSPointerUp"
  7626. }
  7627. }, vt, Kt = {};
  7628. Sh ? vt = Bt.pointer : Th ? vt = Bt.MSPointer : bh ? (vt = Bt.touch,
  7629. Kt = Bt.mouse) : vt = Bt.mouse;
  7630. function Ve() {}
  7631. Ve.prototype.on = function(e, t) {
  7632. var i = this, s = e.split(/[ ,]+/g), n;
  7633. i._handlers_ = i._handlers_ || {};
  7634. for (var r = 0; r < s.length; r += 1)
  7635. n = s[r],
  7636. i._handlers_[n] = i._handlers_[n] || [],
  7637. i._handlers_[n].push(t);
  7638. return i
  7639. }
  7640. ;
  7641. Ve.prototype.off = function(e, t) {
  7642. var i = this;
  7643. return i._handlers_ = i._handlers_ || {},
  7644. e === void 0 ? i._handlers_ = {} : t === void 0 ? i._handlers_[e] = null : i._handlers_[e] && i._handlers_[e].indexOf(t) >= 0 && i._handlers_[e].splice(i._handlers_[e].indexOf(t), 1),
  7645. i
  7646. }
  7647. ;
  7648. Ve.prototype.trigger = function(e, t) {
  7649. var i = this, s = e.split(/[ ,]+/g), n;
  7650. i._handlers_ = i._handlers_ || {};
  7651. for (var r = 0; r < s.length; r += 1)
  7652. n = s[r],
  7653. i._handlers_[n] && i._handlers_[n].length && i._handlers_[n].forEach(function(o) {
  7654. o.call(i, {
  7655. type: n,
  7656. target: i
  7657. }, t)
  7658. })
  7659. }
  7660. ;
  7661. Ve.prototype.config = function(e) {
  7662. var t = this;
  7663. t.options = t.defaults || {},
  7664. e && (t.options = vh(t.options, e))
  7665. }
  7666. ;
  7667. Ve.prototype.bindEvt = function(e, t) {
  7668. var i = this;
  7669. return i._domHandlers_ = i._domHandlers_ || {},
  7670. i._domHandlers_[t] = function() {
  7671. typeof i["on" + t] == "function" ? i["on" + t].apply(i, arguments) : console.warn('[WARNING] : Missing "on' + t + '" handler.')
  7672. }
  7673. ,
  7674. wi(e, vt[t], i._domHandlers_[t]),
  7675. Kt[t] && wi(e, Kt[t], i._domHandlers_[t]),
  7676. i
  7677. }
  7678. ;
  7679. Ve.prototype.unbindEvt = function(e, t) {
  7680. var i = this;
  7681. return i._domHandlers_ = i._domHandlers_ || {},
  7682. er(e, vt[t], i._domHandlers_[t]),
  7683. Kt[t] && er(e, Kt[t], i._domHandlers_[t]),
  7684. delete i._domHandlers_[t],
  7685. this
  7686. }
  7687. ;
  7688. function he(e, t) {
  7689. return this.identifier = t.identifier,
  7690. this.position = t.position,
  7691. this.frontPosition = t.frontPosition,
  7692. this.collection = e,
  7693. this.defaults = {
  7694. size: 100,
  7695. threshold: .1,
  7696. color: "white",
  7697. fadeTime: 250,
  7698. dataOnly: !1,
  7699. restJoystick: !0,
  7700. restOpacity: .5,
  7701. mode: "dynamic",
  7702. zone: document.body,
  7703. lockX: !1,
  7704. lockY: !1,
  7705. shape: "circle"
  7706. },
  7707. this.config(t),
  7708. this.options.mode === "dynamic" && (this.options.restOpacity = 0),
  7709. this.id = he.id,
  7710. he.id += 1,
  7711. this.buildEl().stylize(),
  7712. this.instance = {
  7713. el: this.ui.el,
  7714. on: this.on.bind(this),
  7715. off: this.off.bind(this),
  7716. show: this.show.bind(this),
  7717. hide: this.hide.bind(this),
  7718. add: this.addToDom.bind(this),
  7719. remove: this.removeFromDom.bind(this),
  7720. destroy: this.destroy.bind(this),
  7721. setPosition: this.setPosition.bind(this),
  7722. resetDirection: this.resetDirection.bind(this),
  7723. computeDirection: this.computeDirection.bind(this),
  7724. trigger: this.trigger.bind(this),
  7725. position: this.position,
  7726. frontPosition: this.frontPosition,
  7727. ui: this.ui,
  7728. identifier: this.identifier,
  7729. id: this.id,
  7730. options: this.options
  7731. },
  7732. this.instance
  7733. }
  7734. he.prototype = new Ve;
  7735. he.constructor = he;
  7736. he.id = 0;
  7737. he.prototype.buildEl = function(e) {
  7738. return this.ui = {},
  7739. this.options.dataOnly ? this : (this.ui.el = document.createElement("div"),
  7740. this.ui.back = document.createElement("div"),
  7741. this.ui.front = document.createElement("div"),
  7742. this.ui.el.className = "nipple collection_" + this.collection.id,
  7743. this.ui.back.className = "back",
  7744. this.ui.front.className = "front",
  7745. this.ui.el.setAttribute("id", "nipple_" + this.collection.id + "_" + this.id),
  7746. this.ui.el.appendChild(this.ui.back),
  7747. this.ui.el.appendChild(this.ui.front),
  7748. this)
  7749. }
  7750. ;
  7751. he.prototype.stylize = function() {
  7752. if (this.options.dataOnly)
  7753. return this;
  7754. var e = this.options.fadeTime + "ms"
  7755. , t = kh("borderRadius", "50%")
  7756. , i = as("transition", "opacity", e)
  7757. , s = {};
  7758. return s.el = {
  7759. position: "absolute",
  7760. opacity: this.options.restOpacity,
  7761. display: "block",
  7762. zIndex: 999
  7763. },
  7764. s.back = {
  7765. position: "absolute",
  7766. display: "block",
  7767. width: this.options.size + "px",
  7768. height: this.options.size + "px",
  7769. marginLeft: -this.options.size / 2 + "px",
  7770. marginTop: -this.options.size / 2 + "px",
  7771. background: this.options.color,
  7772. opacity: ".5"
  7773. },
  7774. s.front = {
  7775. width: this.options.size / 2 + "px",
  7776. height: this.options.size / 2 + "px",
  7777. position: "absolute",
  7778. display: "block",
  7779. marginLeft: -this.options.size / 4 + "px",
  7780. marginTop: -this.options.size / 4 + "px",
  7781. background: this.options.color,
  7782. opacity: ".5",
  7783. transform: "translate(0px, 0px)"
  7784. },
  7785. mn(s.el, i),
  7786. this.options.shape === "circle" && mn(s.back, t),
  7787. mn(s.front, t),
  7788. this.applyStyles(s),
  7789. this
  7790. }
  7791. ;
  7792. he.prototype.applyStyles = function(e) {
  7793. for (var t in this.ui)
  7794. if (this.ui.hasOwnProperty(t))
  7795. for (var i in e[t])
  7796. this.ui[t].style[i] = e[t][i];
  7797. return this
  7798. }
  7799. ;
  7800. he.prototype.addToDom = function() {
  7801. return this.options.dataOnly || document.body.contains(this.ui.el) ? this : (this.options.zone.appendChild(this.ui.el),
  7802. this)
  7803. }
  7804. ;
  7805. he.prototype.removeFromDom = function() {
  7806. return this.options.dataOnly || !document.body.contains(this.ui.el) ? this : (this.options.zone.removeChild(this.ui.el),
  7807. this)
  7808. }
  7809. ;
  7810. he.prototype.destroy = function() {
  7811. clearTimeout(this.removeTimeout),
  7812. clearTimeout(this.showTimeout),
  7813. clearTimeout(this.restTimeout),
  7814. this.trigger("destroyed", this.instance),
  7815. this.removeFromDom(),
  7816. this.off()
  7817. }
  7818. ;
  7819. he.prototype.show = function(e) {
  7820. var t = this;
  7821. return t.options.dataOnly || (clearTimeout(t.removeTimeout),
  7822. clearTimeout(t.showTimeout),
  7823. clearTimeout(t.restTimeout),
  7824. t.addToDom(),
  7825. t.restCallback(),
  7826. setTimeout(function() {
  7827. t.ui.el.style.opacity = 1
  7828. }, 0),
  7829. t.showTimeout = setTimeout(function() {
  7830. t.trigger("shown", t.instance),
  7831. typeof e == "function" && e.call(this)
  7832. }, t.options.fadeTime)),
  7833. t
  7834. }
  7835. ;
  7836. he.prototype.hide = function(e) {
  7837. var t = this;
  7838. if (t.options.dataOnly)
  7839. return t;
  7840. if (t.ui.el.style.opacity = t.options.restOpacity,
  7841. clearTimeout(t.removeTimeout),
  7842. clearTimeout(t.showTimeout),
  7843. clearTimeout(t.restTimeout),
  7844. t.removeTimeout = setTimeout(function() {
  7845. var i = t.options.mode === "dynamic" ? "none" : "block";
  7846. t.ui.el.style.display = i,
  7847. typeof e == "function" && e.call(t),
  7848. t.trigger("hidden", t.instance)
  7849. }, t.options.fadeTime),
  7850. t.options.restJoystick) {
  7851. const i = t.options.restJoystick
  7852. , s = {};
  7853. s.x = i === !0 || i.x !== !1 ? 0 : t.instance.frontPosition.x,
  7854. s.y = i === !0 || i.y !== !1 ? 0 : t.instance.frontPosition.y,
  7855. t.setPosition(e, s)
  7856. }
  7857. return t
  7858. }
  7859. ;
  7860. he.prototype.setPosition = function(e, t) {
  7861. var i = this;
  7862. i.frontPosition = {
  7863. x: t.x,
  7864. y: t.y
  7865. };
  7866. var s = i.options.fadeTime + "ms"
  7867. , n = {};
  7868. n.front = as("transition", ["transform"], s);
  7869. var r = {
  7870. front: {}
  7871. };
  7872. r.front = {
  7873. transform: "translate(" + i.frontPosition.x + "px," + i.frontPosition.y + "px)"
  7874. },
  7875. i.applyStyles(n),
  7876. i.applyStyles(r),
  7877. i.restTimeout = setTimeout(function() {
  7878. typeof e == "function" && e.call(i),
  7879. i.restCallback()
  7880. }, i.options.fadeTime)
  7881. }
  7882. ;
  7883. he.prototype.restCallback = function() {
  7884. var e = this
  7885. , t = {};
  7886. t.front = as("transition", "none", ""),
  7887. e.applyStyles(t),
  7888. e.trigger("rested", e.instance)
  7889. }
  7890. ;
  7891. he.prototype.resetDirection = function() {
  7892. this.direction = {
  7893. x: !1,
  7894. y: !1,
  7895. angle: !1
  7896. }
  7897. }
  7898. ;
  7899. he.prototype.computeDirection = function(e) {
  7900. var t = e.angle.radian, i = Math.PI / 4, s = Math.PI / 2, n, r, o;
  7901. if (t > i && t < i * 3 && !e.lockX ? n = "up" : t > -i && t <= i && !e.lockY ? n = "left" : t > -i * 3 && t <= -i && !e.lockX ? n = "down" : e.lockY || (n = "right"),
  7902. e.lockY || (t > -s && t < s ? r = "left" : r = "right"),
  7903. e.lockX || (t > 0 ? o = "up" : o = "down"),
  7904. e.force > this.options.threshold) {
  7905. var l = {}, c;
  7906. for (c in this.direction)
  7907. this.direction.hasOwnProperty(c) && (l[c] = this.direction[c]);
  7908. var a = {};
  7909. this.direction = {
  7910. x: r,
  7911. y: o,
  7912. angle: n
  7913. },
  7914. e.direction = this.direction;
  7915. for (c in l)
  7916. l[c] === this.direction[c] && (a[c] = !0);
  7917. if (a.x && a.y && a.angle)
  7918. return e;
  7919. (!a.x || !a.y) && this.trigger("plain", e),
  7920. a.x || this.trigger("plain:" + r, e),
  7921. a.y || this.trigger("plain:" + o, e),
  7922. a.angle || this.trigger("dir dir:" + n, e)
  7923. } else
  7924. this.resetDirection();
  7925. return e
  7926. }
  7927. ;
  7928. function ae(e, t) {
  7929. var i = this;
  7930. i.nipples = [],
  7931. i.idles = [],
  7932. i.actives = [],
  7933. i.ids = [],
  7934. i.pressureIntervals = {},
  7935. i.manager = e,
  7936. i.id = ae.id,
  7937. ae.id += 1,
  7938. i.defaults = {
  7939. zone: document.body,
  7940. multitouch: !1,
  7941. maxNumberOfNipples: 10,
  7942. mode: "dynamic",
  7943. position: {
  7944. top: 0,
  7945. left: 0
  7946. },
  7947. catchDistance: 200,
  7948. size: 100,
  7949. threshold: .1,
  7950. color: "white",
  7951. fadeTime: 250,
  7952. dataOnly: !1,
  7953. restJoystick: !0,
  7954. restOpacity: .5,
  7955. lockX: !1,
  7956. lockY: !1,
  7957. shape: "circle",
  7958. dynamicPage: !1,
  7959. follow: !1
  7960. },
  7961. i.config(t),
  7962. (i.options.mode === "static" || i.options.mode === "semi") && (i.options.multitouch = !1),
  7963. i.options.multitouch || (i.options.maxNumberOfNipples = 1);
  7964. const s = getComputedStyle(i.options.zone.parentElement);
  7965. return s && s.display === "flex" && (i.parentIsFlex = !0),
  7966. i.updateBox(),
  7967. i.prepareNipples(),
  7968. i.bindings(),
  7969. i.begin(),
  7970. i.nipples
  7971. }
  7972. ae.prototype = new Ve;
  7973. ae.constructor = ae;
  7974. ae.id = 0;
  7975. ae.prototype.prepareNipples = function() {
  7976. var e = this
  7977. , t = e.nipples;
  7978. t.on = e.on.bind(e),
  7979. t.off = e.off.bind(e),
  7980. t.options = e.options,
  7981. t.destroy = e.destroy.bind(e),
  7982. t.ids = e.ids,
  7983. t.id = e.id,
  7984. t.processOnMove = e.processOnMove.bind(e),
  7985. t.processOnEnd = e.processOnEnd.bind(e),
  7986. t.get = function(i) {
  7987. if (i === void 0)
  7988. return t[0];
  7989. for (var s = 0, n = t.length; s < n; s += 1)
  7990. if (t[s].identifier === i)
  7991. return t[s];
  7992. return !1
  7993. }
  7994. }
  7995. ;
  7996. ae.prototype.bindings = function() {
  7997. var e = this;
  7998. e.bindEvt(e.options.zone, "start"),
  7999. e.options.zone.style.touchAction = "none",
  8000. e.options.zone.style.msTouchAction = "none"
  8001. }
  8002. ;
  8003. ae.prototype.begin = function() {
  8004. var e = this
  8005. , t = e.options;
  8006. if (t.mode === "static") {
  8007. var i = e.createNipple(t.position, e.manager.getIdentifier());
  8008. i.add(),
  8009. e.idles.push(i)
  8010. }
  8011. }
  8012. ;
  8013. ae.prototype.createNipple = function(e, t) {
  8014. var i = this
  8015. , s = i.manager.scroll
  8016. , n = {}
  8017. , r = i.options
  8018. , o = {
  8019. x: i.parentIsFlex ? s.x : s.x + i.box.left,
  8020. y: i.parentIsFlex ? s.y : s.y + i.box.top
  8021. };
  8022. if (e.x && e.y)
  8023. n = {
  8024. x: e.x - o.x,
  8025. y: e.y - o.y
  8026. };
  8027. else if (e.top || e.right || e.bottom || e.left) {
  8028. var l = document.createElement("DIV");
  8029. l.style.display = "hidden",
  8030. l.style.top = e.top,
  8031. l.style.right = e.right,
  8032. l.style.bottom = e.bottom,
  8033. l.style.left = e.left,
  8034. l.style.position = "absolute",
  8035. r.zone.appendChild(l);
  8036. var c = l.getBoundingClientRect();
  8037. r.zone.removeChild(l),
  8038. n = e,
  8039. e = {
  8040. x: c.left + s.x,
  8041. y: c.top + s.y
  8042. }
  8043. }
  8044. var a = new he(i,{
  8045. color: r.color,
  8046. size: r.size,
  8047. threshold: r.threshold,
  8048. fadeTime: r.fadeTime,
  8049. dataOnly: r.dataOnly,
  8050. restJoystick: r.restJoystick,
  8051. restOpacity: r.restOpacity,
  8052. mode: r.mode,
  8053. identifier: t,
  8054. position: e,
  8055. zone: r.zone,
  8056. frontPosition: {
  8057. x: 0,
  8058. y: 0
  8059. },
  8060. shape: r.shape
  8061. });
  8062. return r.dataOnly || (ir(a.ui.el, n),
  8063. ir(a.ui.front, a.frontPosition)),
  8064. i.nipples.push(a),
  8065. i.trigger("added " + a.identifier + ":added", a),
  8066. i.manager.trigger("added " + a.identifier + ":added", a),
  8067. i.bindNipple(a),
  8068. a
  8069. }
  8070. ;
  8071. ae.prototype.updateBox = function() {
  8072. var e = this;
  8073. e.box = e.options.zone.getBoundingClientRect()
  8074. }
  8075. ;
  8076. ae.prototype.bindNipple = function(e) {
  8077. var t = this, i, s = function(n, r) {
  8078. i = n.type + " " + r.id + ":" + n.type,
  8079. t.trigger(i, r)
  8080. };
  8081. e.on("destroyed", t.onDestroyed.bind(t)),
  8082. e.on("shown hidden rested dir plain", s),
  8083. e.on("dir:up dir:right dir:down dir:left", s),
  8084. e.on("plain:up plain:right plain:down plain:left", s)
  8085. }
  8086. ;
  8087. ae.prototype.pressureFn = function(e, t, i) {
  8088. var s = this
  8089. , n = 0;
  8090. clearInterval(s.pressureIntervals[i]),
  8091. s.pressureIntervals[i] = setInterval(function() {
  8092. var r = e.force || e.pressure || e.webkitForce || 0;
  8093. r !== n && (t.trigger("pressure", r),
  8094. s.trigger("pressure " + t.identifier + ":pressure", r),
  8095. n = r)
  8096. }
  8097. .bind(s), 100)
  8098. }
  8099. ;
  8100. ae.prototype.onstart = function(e) {
  8101. var t = this
  8102. , i = t.options
  8103. , s = e;
  8104. e = ao(e),
  8105. t.updateBox();
  8106. var n = function(r) {
  8107. t.actives.length < i.maxNumberOfNipples ? t.processOnStart(r) : s.type.match(/^touch/) && (Object.keys(t.manager.ids).forEach(function(o) {
  8108. if (Object.values(s.touches).findIndex(function(c) {
  8109. return c.identifier === o
  8110. }) < 0) {
  8111. var l = [e[0]];
  8112. l.identifier = o,
  8113. t.processOnEnd(l)
  8114. }
  8115. }),
  8116. t.actives.length < i.maxNumberOfNipples && t.processOnStart(r))
  8117. };
  8118. return zn(e, n),
  8119. t.manager.bindDocument(),
  8120. !1
  8121. }
  8122. ;
  8123. ae.prototype.processOnStart = function(e) {
  8124. var t = this, i = t.options, s, n = t.manager.getIdentifier(e), r = e.force || e.pressure || e.webkitForce || 0, o = {
  8125. x: e.pageX,
  8126. y: e.pageY
  8127. }, l = t.getOrCreate(n, o);
  8128. l.identifier !== n && t.manager.removeIdentifier(l.identifier),
  8129. l.identifier = n;
  8130. var c = function(u) {
  8131. u.trigger("start", u),
  8132. t.trigger("start " + u.id + ":start", u),
  8133. u.show(),
  8134. r > 0 && t.pressureFn(e, u, u.identifier),
  8135. t.processOnMove(e)
  8136. };
  8137. if ((s = t.idles.indexOf(l)) >= 0 && t.idles.splice(s, 1),
  8138. t.actives.push(l),
  8139. t.ids.push(l.identifier),
  8140. i.mode !== "semi")
  8141. c(l);
  8142. else {
  8143. var a = fi(o, l.position);
  8144. if (a <= i.catchDistance)
  8145. c(l);
  8146. else {
  8147. l.destroy(),
  8148. t.processOnStart(e);
  8149. return
  8150. }
  8151. }
  8152. return l
  8153. }
  8154. ;
  8155. ae.prototype.getOrCreate = function(e, t) {
  8156. var i = this, s = i.options, n;
  8157. return /(semi|static)/.test(s.mode) ? (n = i.idles[0],
  8158. n ? (i.idles.splice(0, 1),
  8159. n) : s.mode === "semi" ? i.createNipple(t, e) : (console.warn("Coudln't find the needed nipple."),
  8160. !1)) : (n = i.createNipple(t, e),
  8161. n)
  8162. }
  8163. ;
  8164. ae.prototype.processOnMove = function(e) {
  8165. var t = this
  8166. , i = t.options
  8167. , s = t.manager.getIdentifier(e)
  8168. , n = t.nipples.get(s)
  8169. , r = t.manager.scroll;
  8170. if (!wh(e)) {
  8171. this.processOnEnd(e);
  8172. return
  8173. }
  8174. if (!n) {
  8175. console.error("Found zombie joystick with ID " + s),
  8176. t.manager.removeIdentifier(s);
  8177. return
  8178. }
  8179. if (i.dynamicPage) {
  8180. var o = n.el.getBoundingClientRect();
  8181. n.position = {
  8182. x: r.x + o.left,
  8183. y: r.y + o.top
  8184. }
  8185. }
  8186. n.identifier = s;
  8187. var l = n.options.size / 2
  8188. , c = {
  8189. x: e.pageX,
  8190. y: e.pageY
  8191. };
  8192. i.lockX && (c.y = n.position.y),
  8193. i.lockY && (c.x = n.position.x);
  8194. var a = fi(c, n.position), u = mh(c, n.position), p = Bn(u), h = a / l, m = {
  8195. distance: a,
  8196. position: c
  8197. }, w, v;
  8198. if (n.options.shape === "circle" ? (w = Math.min(a, l),
  8199. v = gh(n.position, w, u)) : (v = xh(c, n.position, l),
  8200. w = fi(v, n.position)),
  8201. i.follow) {
  8202. if (a > l) {
  8203. let S = c.x - v.x
  8204. , O = c.y - v.y;
  8205. n.position.x += S,
  8206. n.position.y += O,
  8207. n.el.style.top = n.position.y - (t.box.top + r.y) + "px",
  8208. n.el.style.left = n.position.x - (t.box.left + r.x) + "px",
  8209. a = fi(c, n.position)
  8210. }
  8211. } else
  8212. c = v,
  8213. a = w;
  8214. var x = c.x - n.position.x
  8215. , D = c.y - n.position.y;
  8216. n.frontPosition = {
  8217. x,
  8218. y: D
  8219. },
  8220. i.dataOnly || (n.ui.front.style.transform = "translate(" + x + "px," + D + "px)");
  8221. var k = {
  8222. identifier: n.identifier,
  8223. position: c,
  8224. force: h,
  8225. pressure: e.force || e.pressure || e.webkitForce || 0,
  8226. distance: a,
  8227. angle: {
  8228. radian: p,
  8229. degree: u
  8230. },
  8231. vector: {
  8232. x: x / l,
  8233. y: -D / l
  8234. },
  8235. raw: m,
  8236. instance: n,
  8237. lockX: i.lockX,
  8238. lockY: i.lockY
  8239. };
  8240. k = n.computeDirection(k),
  8241. k.angle = {
  8242. radian: Bn(180 - u),
  8243. degree: 180 - u
  8244. },
  8245. n.trigger("move", k),
  8246. t.trigger("move " + n.id + ":move", k)
  8247. }
  8248. ;
  8249. ae.prototype.processOnEnd = function(e) {
  8250. var t = this
  8251. , i = t.options
  8252. , s = t.manager.getIdentifier(e)
  8253. , n = t.nipples.get(s)
  8254. , r = t.manager.removeIdentifier(n.identifier);
  8255. n && (i.dataOnly || n.hide(function() {
  8256. i.mode === "dynamic" && (n.trigger("removed", n),
  8257. t.trigger("removed " + n.id + ":removed", n),
  8258. t.manager.trigger("removed " + n.id + ":removed", n),
  8259. n.destroy())
  8260. }),
  8261. clearInterval(t.pressureIntervals[n.identifier]),
  8262. n.resetDirection(),
  8263. n.trigger("end", n),
  8264. t.trigger("end " + n.id + ":end", n),
  8265. t.ids.indexOf(n.identifier) >= 0 && t.ids.splice(t.ids.indexOf(n.identifier), 1),
  8266. t.actives.indexOf(n) >= 0 && t.actives.splice(t.actives.indexOf(n), 1),
  8267. /(semi|static)/.test(i.mode) ? t.idles.push(n) : t.nipples.indexOf(n) >= 0 && t.nipples.splice(t.nipples.indexOf(n), 1),
  8268. t.manager.unbindDocument(),
  8269. /(semi|static)/.test(i.mode) && (t.manager.ids[r.id] = r.identifier))
  8270. }
  8271. ;
  8272. ae.prototype.onDestroyed = function(e, t) {
  8273. var i = this;
  8274. i.nipples.indexOf(t) >= 0 && i.nipples.splice(i.nipples.indexOf(t), 1),
  8275. i.actives.indexOf(t) >= 0 && i.actives.splice(i.actives.indexOf(t), 1),
  8276. i.idles.indexOf(t) >= 0 && i.idles.splice(i.idles.indexOf(t), 1),
  8277. i.ids.indexOf(t.identifier) >= 0 && i.ids.splice(i.ids.indexOf(t.identifier), 1),
  8278. i.manager.removeIdentifier(t.identifier),
  8279. i.manager.unbindDocument()
  8280. }
  8281. ;
  8282. ae.prototype.destroy = function() {
  8283. var e = this;
  8284. e.unbindEvt(e.options.zone, "start"),
  8285. e.nipples.forEach(function(i) {
  8286. i.destroy()
  8287. });
  8288. for (var t in e.pressureIntervals)
  8289. e.pressureIntervals.hasOwnProperty(t) && clearInterval(e.pressureIntervals[t]);
  8290. e.trigger("destroyed", e.nipples),
  8291. e.manager.unbindDocument(),
  8292. e.off()
  8293. }
  8294. ;
  8295. function de(e) {
  8296. var t = this;
  8297. t.ids = {},
  8298. t.index = 0,
  8299. t.collections = [],
  8300. t.scroll = tr(),
  8301. t.config(e),
  8302. t.prepareCollections();
  8303. var i = function() {
  8304. var n;
  8305. t.collections.forEach(function(r) {
  8306. r.forEach(function(o) {
  8307. n = o.el.getBoundingClientRect(),
  8308. o.position = {
  8309. x: t.scroll.x + n.left,
  8310. y: t.scroll.y + n.top
  8311. }
  8312. })
  8313. })
  8314. };
  8315. wi(window, "resize", function() {
  8316. js(i)
  8317. });
  8318. var s = function() {
  8319. t.scroll = tr()
  8320. };
  8321. return wi(window, "scroll", function() {
  8322. js(s)
  8323. }),
  8324. t.collections
  8325. }
  8326. de.prototype = new Ve;
  8327. de.constructor = de;
  8328. de.prototype.prepareCollections = function() {
  8329. var e = this;
  8330. e.collections.create = e.create.bind(e),
  8331. e.collections.on = e.on.bind(e),
  8332. e.collections.off = e.off.bind(e),
  8333. e.collections.destroy = e.destroy.bind(e),
  8334. e.collections.get = function(t) {
  8335. var i;
  8336. return e.collections.every(function(s) {
  8337. return i = s.get(t),
  8338. !i
  8339. }),
  8340. i
  8341. }
  8342. }
  8343. ;
  8344. de.prototype.create = function(e) {
  8345. return this.createCollection(e)
  8346. }
  8347. ;
  8348. de.prototype.createCollection = function(e) {
  8349. var t = this
  8350. , i = new ae(t,e);
  8351. return t.bindCollection(i),
  8352. t.collections.push(i),
  8353. i
  8354. }
  8355. ;
  8356. de.prototype.bindCollection = function(e) {
  8357. var t = this, i, s = function(n, r) {
  8358. i = n.type + " " + r.id + ":" + n.type,
  8359. t.trigger(i, r)
  8360. };
  8361. e.on("destroyed", t.onDestroyed.bind(t)),
  8362. e.on("shown hidden rested dir plain", s),
  8363. e.on("dir:up dir:right dir:down dir:left", s),
  8364. e.on("plain:up plain:right plain:down plain:left", s)
  8365. }
  8366. ;
  8367. de.prototype.bindDocument = function() {
  8368. var e = this;
  8369. e.binded || (e.bindEvt(document, "move").bindEvt(document, "end"),
  8370. e.binded = !0)
  8371. }
  8372. ;
  8373. de.prototype.unbindDocument = function(e) {
  8374. var t = this;
  8375. (!Object.keys(t.ids).length || e === !0) && (t.unbindEvt(document, "move").unbindEvt(document, "end"),
  8376. t.binded = !1)
  8377. }
  8378. ;
  8379. de.prototype.getIdentifier = function(e) {
  8380. var t;
  8381. return e ? (t = e.identifier === void 0 ? e.pointerId : e.identifier,
  8382. t === void 0 && (t = this.latest || 0)) : t = this.index,
  8383. this.ids[t] === void 0 && (this.ids[t] = this.index,
  8384. this.index += 1),
  8385. this.latest = t,
  8386. this.ids[t]
  8387. }
  8388. ;
  8389. de.prototype.removeIdentifier = function(e) {
  8390. var t = {};
  8391. for (var i in this.ids)
  8392. if (this.ids[i] === e) {
  8393. t.id = i,
  8394. t.identifier = this.ids[i],
  8395. delete this.ids[i];
  8396. break
  8397. }
  8398. return t
  8399. }
  8400. ;
  8401. de.prototype.onmove = function(e) {
  8402. var t = this;
  8403. return t.onAny("move", e),
  8404. !1
  8405. }
  8406. ;
  8407. de.prototype.onend = function(e) {
  8408. var t = this;
  8409. return t.onAny("end", e),
  8410. !1
  8411. }
  8412. ;
  8413. de.prototype.oncancel = function(e) {
  8414. var t = this;
  8415. return t.onAny("end", e),
  8416. !1
  8417. }
  8418. ;
  8419. de.prototype.onAny = function(e, t) {
  8420. var i = this, s, n = "processOn" + e.charAt(0).toUpperCase() + e.slice(1);
  8421. t = ao(t);
  8422. var r = function(l, c, a) {
  8423. a.ids.indexOf(c) >= 0 && (a[n](l),
  8424. l._found_ = !0)
  8425. }
  8426. , o = function(l) {
  8427. s = i.getIdentifier(l),
  8428. zn(i.collections, r.bind(null, l, s)),
  8429. l._found_ || i.removeIdentifier(s)
  8430. };
  8431. return zn(t, o),
  8432. !1
  8433. }
  8434. ;
  8435. de.prototype.destroy = function() {
  8436. var e = this;
  8437. e.unbindDocument(!0),
  8438. e.ids = {},
  8439. e.index = 0,
  8440. e.collections.forEach(function(t) {
  8441. t.destroy()
  8442. }),
  8443. e.off()
  8444. }
  8445. ;
  8446. de.prototype.onDestroyed = function(e, t) {
  8447. var i = this;
  8448. if (i.collections.indexOf(t) < 0)
  8449. return !1;
  8450. i.collections.splice(i.collections.indexOf(t), 1)
  8451. }
  8452. ;
  8453. const nr = new de
  8454. , sr = {
  8455. create: function(e) {
  8456. return nr.create(e)
  8457. },
  8458. factory: nr
  8459. };
  8460. let rr = !1;
  8461. const Ih = e=>{
  8462. if (rr)
  8463. return;
  8464. rr = !0;
  8465. const t = document.getElementById("touch-controls-left")
  8466. , i = sr.create({
  8467. zone: t
  8468. });
  8469. i.on("start", e.onStartMoving),
  8470. i.on("end", e.onStopMoving),
  8471. i.on("move", e.onRotateMoving);
  8472. const s = document.getElementById("touch-controls-right")
  8473. , n = sr.create({
  8474. zone: s
  8475. });
  8476. n.on("start", e.onStartAttacking),
  8477. n.on("end", e.onStopAttacking),
  8478. n.on("move", e.onRotateAttacking),
  8479. t.style.display = "block",
  8480. s.style.display = "block"
  8481. }
  8482. , Mh = {
  8483. enable: Ih
  8484. };
  8485. window.loadedScript = !0;
  8486. const Eh = location.hostname !== "localhost" && location.hostname !== "127.0.0.1" && !location.hostname.startsWith("192.168.")
  8487. , co = location.hostname === "sandbox-dev.moomoo.io" || location.hostname === "sandbox.moomoo.io"
  8488. , Ph = location.hostname === "dev.moomoo.io" || location.hostname === "dev2.moomoo.io"
  8489. , Hn = new uc;
  8490. let ui, di;
  8491. const ki = location.hostname === "localhost" || location.hostname === "127.0.0.1"
  8492. , Ch = !1
  8493. , ls = ki || Ch;
  8494. co ? (ui = "https://api-sandbox.moomoo.io",
  8495. di = "moomoo.io") : Ph ? (ui = "https://api-dev.moomoo.io",
  8496. di = "moomoo.io") : (ui = "https://api.moomoo.io",
  8497. di = "moomoo.io");
  8498. const Ah = !ls
  8499. , qe = new we(di,443,T.maxPlayers,5,Ah);
  8500. qe.debugLog = !1;
  8501. const Me = {
  8502. animationTime: 0,
  8503. land: null,
  8504. lava: null,
  8505. x: T.volcanoLocationX,
  8506. y: T.volcanoLocationY
  8507. };
  8508. function Dh() {
  8509. let e = !1;
  8510. return function(t) {
  8511. (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|enemyNeargs|kddi|keenemyNear|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0, 4))) && (e = !0)
  8512. }(navigator.userAgent || navigator.vendor || window.opera),
  8513. e
  8514. }
  8515. const ho = Dh();
  8516. let vi = !1
  8517. , Fn = !1;
  8518. function Oh() {
  8519. !ps || Fn || (Fn = !0,
  8520. Eh || ls ? window.turnstileToken ? gn(window.turnstileToken) : window.grecaptcha.ready(()=>{
  8521. window.grecaptcha.execute("6LfahtgjAAAAAF8SkpjyeYMcxMdxIaQeh-VoPATP", {
  8522. action: "homepage"
  8523. }).then(function(e) {
  8524. gn("re:" + e)
  8525. }).catch(console.error)
  8526. }
  8527. ) : gn())
  8528. }
  8529. let Vn = !1;
  8530. function gn(e) {
  8531. qe.start(bi, function(t, i, s) {
  8532. let r = "wss" + "://" + t;
  8533. e && (r += "?token=" + encodeURIComponent(e)),
  8534. ki && (r = "wss://localhost:3000"),
  8535. ee.connect(r, function(o) {
  8536. if (Vn) {
  8537. Vn = !1;
  8538. return
  8539. }
  8540. Vo(),
  8541. o ? bn(o) : (vi = !0,
  8542. bs())
  8543. }, {
  8544. A: qh,
  8545. B: bn,
  8546. C: If,
  8547. D: Qf,
  8548. E: Zf,
  8549. a: iu,
  8550. G: Df,
  8551. H: qf,
  8552. I: Kf,
  8553. J: $f,
  8554. K: _f,
  8555. L: Wf,
  8556. M: Xf,
  8557. N: eu,
  8558. O: tu,
  8559. P: Ef,
  8560. Q: Cf,
  8561. R: Pf,
  8562. S: jf,
  8563. T: Ro,
  8564. U: Oo,
  8565. V: To,
  8566. X: Gf,
  8567. Y: Yf,
  8568. Z: ru,
  8569. g: Zh,
  8570. 1: tf,
  8571. 2: Qh,
  8572. 3: jh,
  8573. 4: ef,
  8574. 5: ff,
  8575. 6: gf,
  8576. 7: af,
  8577. 8: Mf,
  8578. 9: rf,
  8579. 0: su
  8580. })
  8581. }, function(t) {
  8582. console.error("Vultr error:", t),
  8583. alert(`Error:
  8584. ` + t),
  8585. bn("disconnected")
  8586. }, ki)
  8587. }
  8588. function cs() {
  8589. return ee.connected
  8590. }
  8591. function Rh() {
  8592. const t = prompt("party key", bi);
  8593. t && (window.onbeforeunload = void 0,
  8594. window.location.href = "/?server=" + t)
  8595. }
  8596. const _h = new dc(T)
  8597. , fo = Math.PI
  8598. , Ze = fo * 2;
  8599. Math.lerpAngle = function(e, t, i) {
  8600. Math.abs(t - e) > fo && (e > t ? t += Ze : e += Ze);
  8601. const n = t + (e - t) * i;
  8602. return n >= 0 && n <= Ze ? n : n % Ze
  8603. }
  8604. ;
  8605. CanvasRenderingContext2D.prototype.roundRect = function(e, t, i, s, n) {
  8606. return i < 2 * n && (n = i / 2),
  8607. s < 2 * n && (n = s / 2),
  8608. n < 0 && (n = 0),
  8609. this.beginPath(),
  8610. this.moveTo(e + n, t),
  8611. this.arcTo(e + i, t, e + i, t + s, n),
  8612. this.arcTo(e + i, t + s, e, t + s, n),
  8613. this.arcTo(e, t + s, e, t, n),
  8614. this.arcTo(e, t, e + i, t, n),
  8615. this.closePath(),
  8616. this
  8617. }
  8618. ;
  8619. let hs;
  8620. typeof Storage < "u" && (hs = !0);
  8621. function Di(e, t) {
  8622. hs && localStorage.setItem(e, t)
  8623. }
  8624. function Nt(e) {
  8625. return hs ? localStorage.getItem(e) : null
  8626. }
  8627. let xi = Nt("moofoll");
  8628. function Bh() {
  8629. xi || (xi = !0,
  8630. Di("moofoll", 1))
  8631. }
  8632. let uo, $e, mt = 1, be, It, yn, or = Date.now();
  8633. var He;
  8634. let Ee;
  8635. const ye = []
  8636. , J = [];
  8637. let Oe = [];
  8638. const et = []
  8639. , Mt = []
  8640. , po = new gc(Hc,Mt,J,ye,ue,R,T,C)
  8641. , ar = new yc(ye,wc,J,R,null,T,C);
  8642. let E, mo, y, ct = 1, wn = 0, go = 0, yo = 0, Re, _e, lr, fs = 0;
  8643. const se = T.maxScreenWidth
  8644. , re = T.maxScreenHeight;
  8645. let gt, yt, Jt = !1;
  8646. document.getElementById("ad-container");
  8647. const Oi = document.getElementById("mainMenu")
  8648. , Un = document.getElementById("enterGame")
  8649. , kn = document.getElementById("promoImg");
  8650. document.getElementById("partyButton");
  8651. const vn = document.getElementById("joinPartyButton")
  8652. , Ln = document.getElementById("settingsButton")
  8653. , cr = Ln.getElementsByTagName("span")[0]
  8654. , hr = document.getElementById("allianceButton")
  8655. , fr = document.getElementById("storeButton")
  8656. , ur = document.getElementById("chatButton")
  8657. , xt = document.getElementById("gameCanvas")
  8658. , M = xt.getContext("2d");
  8659. var zh = document.getElementById("serverBrowser");
  8660. const Nn = document.getElementById("nativeResolution")
  8661. , xn = document.getElementById("showPing");
  8662. document.getElementById("playMusic");
  8663. const Qt = document.getElementById("pingDisplay")
  8664. , dr = document.getElementById("shutdownDisplay")
  8665. , Zt = document.getElementById("menuCardHolder")
  8666. , qt = document.getElementById("guideCard")
  8667. , Bb = document.getElementById("gameName")
  8668. , Et = document.getElementById("loadingText")
  8669. , us = document.getElementById("gameUI")
  8670. , pr = document.getElementById("actionBar")
  8671. , Hh = document.getElementById("scoreDisplay")
  8672. , Fh = document.getElementById("foodDisplay")
  8673. , Vh = document.getElementById("woodDisplay")
  8674. , Uh = document.getElementById("stoneDisplay")
  8675. , Lh = document.getElementById("killCounter")
  8676. , mr = document.getElementById("leaderboardData")
  8677. , jt = document.getElementById("nameInput")
  8678. , Le = document.getElementById("itemInfoHolder")
  8679. , gr = document.getElementById("ageText")
  8680. , yr = document.getElementById("ageBarBody")
  8681. , ht = document.getElementById("upgradeHolder")
  8682. , ri = document.getElementById("upgradeCounter")
  8683. , Te = document.getElementById("allianceMenu")
  8684. , oi = document.getElementById("allianceHolder")
  8685. , ai = document.getElementById("allianceManager")
  8686. , me = document.getElementById("mapDisplay")
  8687. , Wt = document.getElementById("diedText")
  8688. , Nh = document.getElementById("skinColorHolder")
  8689. , ce = me.getContext("2d");
  8690. me.width = 300;
  8691. me.height = 300;
  8692. const We = document.getElementById("storeMenu")
  8693. , wr = document.getElementById("storeHolder")
  8694. , ft = document.getElementById("noticationDisplay")
  8695. , Xt = $r.hats
  8696. , Gt = $r.accessories;
  8697. var ue = new mc(kc,et,C,T);
  8698. const ei = "#525252"
  8699. , kr = "#3d3f42"
  8700. , Xe = 5.5;
  8701. T.DAY_INTERVAL / 24;
  8702. T.DAY_INTERVAL / 2;
  8703. function qh(e) {
  8704. Oe = e.teams
  8705. }
  8706. let ds = !0;
  8707. var ps = !1;
  8708. (!ls || ki) && (ps = !0);
  8709. window.onblur = function() {
  8710. ds = !1
  8711. }
  8712. ;
  8713. window.onfocus = function() {
  8714. ds = !0,
  8715. E && E.alive && xs()
  8716. }
  8717. ;
  8718. window.captchaCallbackHook = function() {
  8719. ps = !0
  8720. }
  8721. ;
  8722. window.captchaCallbackComplete && window.captchaCallbackHook();
  8723. window.addEventListener("keydown", function(e) {
  8724. e.keyCode == 32 && e.target == document.body && e.preventDefault()
  8725. });
  8726. xt.oncontextmenu = function() {
  8727. return !1
  8728. }
  8729. ;
  8730. ["touch-controls-left", "touch-controls-right", "touch-controls-fullscreen", "storeMenu"].forEach(e=>{
  8731. document.getElementById(e) && (document.getElementById(e).oncontextmenu = function(t) {
  8732. t.preventDefault()
  8733. }
  8734. )
  8735. }
  8736. );
  8737. function bn(e) {
  8738. vi = !1,
  8739. ee.close(),
  8740. ms(e)
  8741. }
  8742. function ms(e, t) {
  8743. Oi.style.display = "block",
  8744. us.style.display = "none",
  8745. Zt.style.display = "none",
  8746. Wt.style.display = "none",
  8747. Et.style.display = "block",
  8748. Et.innerHTML = e + (t ? "<a href='javascript:window.location.href=window.location.href' class='ytLink'>reload</a>" : "")
  8749. }
  8750. function Wh() {
  8751. Qt.hidden = !0,
  8752. Et.style.display = "none",
  8753. Oi.style.display = "block",
  8754. Zt.style.display = "block",
  8755. uf(),
  8756. Xh(),
  8757. Af(),
  8758. Et.style.display = "none",
  8759. Zt.style.display = "block";
  8760. let e = Nt("moo_name") || "";
  8761. !e.length && FRVR.profile && (e = FRVR.profile.name(),
  8762. e && (e += Math.floor(Math.random() * 90) + 9)),
  8763. jt.value = e || ""
  8764. }
  8765. function vg(id, name) {
  8766. try {
  8767. if (id) {
  8768. id.innerText = name;
  8769. }
  8770. } catch (error) {
  8771. /* *** token[0xca] = writeN(0xca, 4, Buffer_prototype.writeFloatBE || writeFloatBE, true); ****
  8772. *** token[0xcb] = writeN(0xcb, 8, Buffer_prototype.writeDoubleBE || writeDoubleBE, true); ***** */
  8773. }
  8774. }
  8775.  
  8776. function Xh() {
  8777. Un.onclick = C.checkTrusted(function() {
  8778. ms("Connecting..."),
  8779. cs() ? bs() : Oh()
  8780. }),
  8781. C.hookTouchEvents(Un),
  8782. kn && (kn.onclick = C.checkTrusted(function() {
  8783. Lo("https://krunker.io/?play=SquidGame_KB")
  8784. }),
  8785. C.hookTouchEvents(kn)),
  8786. vn && (vn.onclick = C.checkTrusted(function() {
  8787. setTimeout(function() {
  8788. Rh()
  8789. }, 10)
  8790. }),
  8791. C.hookTouchEvents(vn)),
  8792. Ln.onclick = C.checkTrusted(function() {
  8793. pf()
  8794. }),
  8795. C.hookTouchEvents(Ln),
  8796. hr.onclick = C.checkTrusted(function() {
  8797. nf()
  8798. }),
  8799. C.hookTouchEvents(hr),
  8800. fr.onclick = C.checkTrusted(function() {
  8801. hf()
  8802. }),
  8803. C.hookTouchEvents(fr),
  8804. ur.onclick = C.checkTrusted(function() {
  8805. Mo()
  8806. }),
  8807. C.hookTouchEvents(ur),
  8808. me.onclick = C.checkTrusted(function() {
  8809. Ao()
  8810. }),
  8811. C.hookTouchEvents(me)
  8812. vg(Bb, "Eclipse Client");
  8813. }
  8814. let bi;
  8815. const Gh = {
  8816. view: ()=>{
  8817. if (!qe.servers)
  8818. return;
  8819. let e = 0;
  8820. const t = Object.keys(qe.servers).map(i=>{
  8821. const s = qe.regionInfo[i].name;
  8822. let n = 0;
  8823. const r = qe.servers[i].map(o=>{
  8824. var h;
  8825. n += o.playerCount;
  8826. const l = o.selected;
  8827. let c = s + " " + o.name + " [" + Math.min(o.playerCount, o.playerCapacity) + "/" + o.playerCapacity + "]";
  8828. const a = o.name
  8829. , u = l ? "selected" : "";
  8830. o.ping && ((h = o.pings) == null ? void 0 : h.length) >= 2 ? c += ` [${Math.floor(o.ping - 99)}ms]` : l || (c += " [?]");
  8831. let p = {
  8832. value: i + ":" + a
  8833. };
  8834. return u && (bi = i + ":" + a,
  8835. p.selected = !0),
  8836. Ne("option", p, c)
  8837. }
  8838. );
  8839. return e += n,
  8840. [Ne("option[disabled]", `${s} - ${n} players`), r, Ne("option[disabled]")]
  8841. }
  8842. );
  8843. return Ne("select", {
  8844. value: bi,
  8845. onfocus: ()=>{
  8846. window.blockRedraw = !0
  8847. }
  8848. ,
  8849. onblur: ()=>{
  8850. window.blockRedraw = !1
  8851. }
  8852. ,
  8853. onchange: Kh
  8854. }, [t, Ne("option[disabled]", `All Servers - ${e} players`)])
  8855. }
  8856. };
  8857. Ne.mount(zh, Gh);
  8858. var qn, Wn;
  8859. location.hostname == "sandbox.moomoo.io" ? (qn = "Back to MooMoo",
  8860. Wn = "//moomoo.io/") : (qn = "Try the sandbox",
  8861. Wn = "//sandbox.moomoo.io/");
  8862. document.getElementById("altServer").innerHTML = "<a href='" + Wn + "'>" + qn + "<i class='material-icons' style='font-size:10px;vertical-align:middle'>arrow_forward_ios</i></a>";
  8863. const Yh = `${ui}/servers?v=1.22`
  8864. , wo = async()=>fetch(Yh).then(e=>e.json()).then(async e=>qe.processServers(e)).catch(e=>{
  8865. console.error("Failed to load server data with status code:", e)
  8866. }
  8867. )
  8868. , $h = ()=>wo().then(Wh).catch(e=>{
  8869. console.error("Failed to load.")
  8870. }
  8871. );
  8872. window.frvrSdkInitPromise.then(()=>window.FRVR.bootstrapper.complete()).then(()=>$h());
  8873. const Kh = e=>{
  8874. if (window.blockRedraw = !1,
  8875. FRVR.channelCharacteristics.allowNavigation) {
  8876. const [t,i] = e.target.value.split(":");
  8877. qe.switchServer(t, i)
  8878. } else
  8879. vi && (vi = !1,
  8880. Fn = !1,
  8881. Vn = !0,
  8882. Ei = !0,
  8883. ee.close())
  8884. }
  8885. ;
  8886. document.getElementById("pre-content-container");
  8887. function Jh() {
  8888. FRVR.ads.show("interstitial", bs)
  8889. }
  8890. window.showPreAd = Jh;
  8891. function Se(e, t, i) {
  8892. if (E && e) {
  8893. if (C.removeAllChildren(Le),
  8894. Le.classList.add("visible"),
  8895. C.generateElement({
  8896. id: "itemInfoName",
  8897. text: C.capitalizeFirst(e.name),
  8898. parent: Le
  8899. }),
  8900. C.generateElement({
  8901. id: "itemInfoDesc",
  8902. text: e.desc,
  8903. parent: Le
  8904. }),
  8905. !i)
  8906. if (t)
  8907. C.generateElement({
  8908. class: "itemInfoReq",
  8909. text: e.type ? "secondary" : "primary",
  8910. parent: Le
  8911. });
  8912. else {
  8913. for (let n = 0; n < e.req.length; n += 2)
  8914. C.generateElement({
  8915. class: "itemInfoReq",
  8916. html: e.req[n] + "<span class='itemInfoReqVal'> x" + e.req[n + 1] + "</span>",
  8917. parent: Le
  8918. });
  8919. const s = co ? e.group.sandboxLimit || Math.max(e.group.limit * 3, 99) : e.group.limit;
  8920. e.group.limit && C.generateElement({
  8921. class: "itemInfoLmt",
  8922. text: (E.itemCounts[e.group.id] || 0) + "/" + s,
  8923. parent: Le
  8924. })
  8925. }
  8926. } else
  8927. Le.classList.remove("visible")
  8928. }
  8929. let Pt = []
  8930. , wt = [];
  8931. function Qh(e, t) {
  8932. Pt.push({
  8933. sid: e,
  8934. name: t
  8935. }),
  8936. gs()
  8937. }
  8938. function gs() {
  8939. if (Pt[0]) {
  8940. const e = Pt[0];
  8941. C.removeAllChildren(ft),
  8942. ft.style.display = "block",
  8943. C.generateElement({
  8944. class: "notificationText",
  8945. text: e.name,
  8946. parent: ft
  8947. }),
  8948. C.generateElement({
  8949. class: "notifButton",
  8950. html: "<i class='material-icons' style='font-size:28px;color:#cc5151;'>&#xE14C;</i>",
  8951. parent: ft,
  8952. onclick: function() {
  8953. Gn(0)
  8954. },
  8955. hookTouch: !0
  8956. }),
  8957. C.generateElement({
  8958. class: "notifButton",
  8959. html: "<i class='material-icons' style='font-size:28px;color:#8ecc51;'>&#xE876;</i>",
  8960. parent: ft,
  8961. onclick: function() {
  8962. Gn(1)
  8963. },
  8964. hookTouch: !0
  8965. })
  8966. } else
  8967. ft.style.display = "none"
  8968. }
  8969. function Zh(e) {
  8970. Oe.push(e),
  8971. Te.style.display == "block" && ti()
  8972. }
  8973. function jh(e, t) {
  8974. E && (E.team = e,
  8975. E.isOwner = t,
  8976. Te.style.display == "block" && ti())
  8977. }
  8978. function ef(e) {
  8979. wt = e,
  8980. Te.style.display == "block" && ti()
  8981. }
  8982. function tf(e) {
  8983. for (let t = Oe.length - 1; t >= 0; t--)
  8984. Oe[t].sid == e && Oe.splice(t, 1);
  8985. Te.style.display == "block" && ti()
  8986. }
  8987. function nf() {
  8988. xs(),
  8989. Te.style.display != "block" ? ti() : Xn()
  8990. }
  8991. function Xn() {
  8992. Te.style.display == "block" && (Te.style.display = "none")
  8993. }
  8994. function ti() {
  8995. if (E && E.alive) {
  8996. if (Ri(),
  8997. We.style.display = "none",
  8998. Te.style.display = "block",
  8999. C.removeAllChildren(oi),
  9000. E.team)
  9001. for (var e = 0; e < wt.length; e += 2)
  9002. (function(t) {
  9003. const i = C.generateElement({
  9004. class: "allianceItem",
  9005. style: "color:" + (wt[t] == E.sid ? "#fff" : "rgba(255,255,255,0.6)"),
  9006. text: wt[t + 1],
  9007. parent: oi
  9008. });
  9009. E.isOwner && wt[t] != E.sid && C.generateElement({
  9010. class: "joinAlBtn",
  9011. text: "Kick",
  9012. onclick: function() {
  9013. ko(wt[t])
  9014. },
  9015. hookTouch: !0,
  9016. parent: i
  9017. })
  9018. }
  9019. )(e);
  9020. else if (Oe.length)
  9021. for (var e = 0; e < Oe.length; ++e)
  9022. (function(i) {
  9023. const s = C.generateElement({
  9024. class: "allianceItem",
  9025. style: "color:" + (Oe[i].sid == E.team ? "#fff" : "rgba(255,255,255,0.6)"),
  9026. text: Oe[i].sid,
  9027. parent: oi
  9028. });
  9029. C.generateElement({
  9030. class: "joinAlBtn",
  9031. text: "Join",
  9032. onclick: function() {
  9033. vo(i)
  9034. },
  9035. hookTouch: !0,
  9036. parent: s
  9037. })
  9038. }
  9039. )(e);
  9040. else
  9041. C.generateElement({
  9042. class: "allianceItem",
  9043. text: "No Tribes Yet",
  9044. parent: oi
  9045. });
  9046. C.removeAllChildren(ai),
  9047. E.team ? C.generateElement({
  9048. class: "allianceButtonM",
  9049. style: "width: 360px",
  9050. text: E.isOwner ? "Delete Tribe" : "Leave Tribe",
  9051. onclick: function() {
  9052. xo()
  9053. },
  9054. hookTouch: !0,
  9055. parent: ai
  9056. }) : (C.generateElement({
  9057. tag: "input",
  9058. type: "text",
  9059. id: "allianceInput",
  9060. maxLength: 7,
  9061. placeholder: "unique name",
  9062. onchange: t=>{
  9063. t.target.value = (t.target.value || "").slice(0, 7)
  9064. }
  9065. ,
  9066. onkeypress: t=>{
  9067. if (t.key === "Enter")
  9068. return t.preventDefault(),
  9069. Yn(),
  9070. !1
  9071. }
  9072. ,
  9073. parent: ai
  9074. }),
  9075. C.generateElement({
  9076. tag: "div",
  9077. class: "allianceButtonM",
  9078. style: "width: 140px;",
  9079. text: "Create",
  9080. onclick: function() {
  9081. Yn()
  9082. },
  9083. hookTouch: !0,
  9084. parent: ai
  9085. }))
  9086. }
  9087. }
  9088. function Gn(e) {
  9089. ee.send("P", Pt[0].sid, e),
  9090. Pt.splice(0, 1),
  9091. gs()
  9092. }
  9093. function ko(e) {
  9094. ee.send("Q", e)
  9095. }
  9096. function vo(e) {
  9097. ee.send("b", Oe[e].sid)
  9098. }
  9099. function Yn() {
  9100. ee.send("L", document.getElementById("allianceInput").value)
  9101. }
  9102. function xo() {
  9103. Pt = [],
  9104. gs(),
  9105. ee.send("N")
  9106. }
  9107. let pi, Ht, je;
  9108. const bt = [];
  9109. let Je;
  9110. function sf() {
  9111. this.init = function(e, t) {
  9112. this.scale = 0,
  9113. this.x = e,
  9114. this.y = t,
  9115. this.active = !0
  9116. }
  9117. ,
  9118. this.update = function(e, t) {
  9119. this.active && (this.scale += .05 * t,
  9120. this.scale >= T.mapPingScale ? this.active = !1 : (e.globalAlpha = 1 - Math.max(0, this.scale / T.mapPingScale),
  9121. e.beginPath(),
  9122. e.arc(this.x / T.mapScale * me.width, this.y / T.mapScale * me.width, this.scale, 0, 2 * Math.PI),
  9123. e.stroke()))
  9124. }
  9125. }
  9126. function rf(e, t) {
  9127. for (let i = 0; i < bt.length; ++i)
  9128. if (!bt[i].active) {
  9129. Je = bt[i];
  9130. break
  9131. }
  9132. Je || (Je = new sf,
  9133. bt.push(Je)),
  9134. Je.init(e, t)
  9135. }
  9136. function of() {
  9137. je || (je = {}),
  9138. je.x = E.x,
  9139. je.y = E.y
  9140. }
  9141. function af(e) {
  9142. Ht = e
  9143. }
  9144. function lf(e) {
  9145. if (E && E.alive) {
  9146. ce.clearRect(0, 0, me.width, me.height),
  9147. ce.strokeStyle = "#fff",
  9148. ce.lineWidth = 4;
  9149. for (var t = 0; t < bt.length; ++t)
  9150. Je = bt[t],
  9151. Je.update(ce, e);
  9152. if (ce.globalAlpha = 1,
  9153. ce.fillStyle = "#fff",
  9154. Q(E.x / T.mapScale * me.width, E.y / T.mapScale * me.height, 7, ce, !0),
  9155. ce.fillStyle = "rgba(255,255,255,0.35)",
  9156. E.team && Ht)
  9157. for (var t = 0; t < Ht.length; )
  9158. Q(Ht[t] / T.mapScale * me.width, Ht[t + 1] / T.mapScale * me.height, 7, ce, !0),
  9159. t += 2;
  9160. pi && (ce.fillStyle = "#fc5553",
  9161. ce.font = "34px Hammersmith One",
  9162. ce.textBaseline = "middle",
  9163. ce.textAlign = "center",
  9164. ce.fillText("x", pi.x / T.mapScale * me.width, pi.y / T.mapScale * me.height)),
  9165. je && (ce.fillStyle = "#fff",
  9166. ce.font = "34px Hammersmith One",
  9167. ce.textBaseline = "middle",
  9168. ce.textAlign = "center",
  9169. ce.fillText("x", je.x / T.mapScale * me.width, je.y / T.mapScale * me.height))
  9170. }
  9171. }
  9172. let $n = 0;
  9173. function cf(e) {
  9174. $n != e && ($n = e,
  9175. ys())
  9176. }
  9177. function hf() {
  9178. We.style.display != "block" ? (We.style.display = "block",
  9179. Te.style.display = "none",
  9180. Ri(),
  9181. ys()) : Kn()
  9182. }
  9183. function Kn() {
  9184. We.style.display == "block" && (We.style.display = "none",
  9185. Se())
  9186. }
  9187. function ff(e, t, i) {
  9188. i ? e ? E.tailIndex = t : E.tails[t] = 1 : e ? E.skinIndex = t : E.skins[t] = 1,
  9189. We.style.display == "block" && ys()
  9190. }
  9191. function ys() {
  9192. if (E) {
  9193. C.removeAllChildren(wr);
  9194. const e = $n
  9195. , t = e ? Gt : Xt;
  9196. for (let i = 0; i < t.length; ++i)
  9197. t[i].dontSell || function(s) {
  9198. const n = C.generateElement({
  9199. id: "storeDisplay" + s,
  9200. class: "storeItem",
  9201. onmouseout: function() {
  9202. Se()
  9203. },
  9204. onmouseover: function() {
  9205. Se(t[s], !1, !0)
  9206. },
  9207. parent: wr
  9208. });
  9209. C.hookTouchEvents(n, !0),
  9210. C.generateElement({
  9211. tag: "img",
  9212. class: "hatPreview",
  9213. src: "./img/" + (e ? "accessories/access_" : "hats/hat_") + t[s].id + (t[s].topSprite ? "_p" : "") + ".png",
  9214. parent: n
  9215. }),
  9216. C.generateElement({
  9217. tag: "span",
  9218. text: t[s].name,
  9219. parent: n
  9220. }),
  9221. (e ? !E.tails[t[s].id] : !E.skins[t[s].id]) ? (C.generateElement({
  9222. class: "joinAlBtn",
  9223. style: "margin-top: 5px",
  9224. text: "Buy",
  9225. onclick: function() {
  9226. bo(t[s].id, e)
  9227. },
  9228. hookTouch: !0,
  9229. parent: n
  9230. }),
  9231. C.generateElement({
  9232. tag: "span",
  9233. class: "itemPrice",
  9234. text: t[s].price,
  9235. parent: n
  9236. })) : (e ? E.tailIndex : E.skinIndex) == t[s].id ? C.generateElement({
  9237. class: "joinAlBtn",
  9238. style: "margin-top: 5px",
  9239. text: "Unequip",
  9240. onclick: function() {
  9241. Jn(0, e)
  9242. },
  9243. hookTouch: !0,
  9244. parent: n
  9245. }) : C.generateElement({
  9246. class: "joinAlBtn",
  9247. style: "margin-top: 5px",
  9248. text: "Equip",
  9249. onclick: function() {
  9250. Jn(t[s].id, e)
  9251. },
  9252. hookTouch: !0,
  9253. parent: n
  9254. })
  9255. }(i)
  9256. }
  9257. }
  9258. function Jn(e, t) {
  9259. ee.send("c", 0, e, t)
  9260. }
  9261. function bo(e, t) {
  9262. ee.send("c", 1, e, t)
  9263. }
  9264. function So() {
  9265. We.style.display = "none",
  9266. Te.style.display = "none",
  9267. Ri()
  9268. }
  9269. function uf() {
  9270. const e = Nt("native_resolution");
  9271. Sn(e ? e == "true" : typeof cordova < "u"),
  9272. $e = Nt("show_ping") == "true",
  9273. Qt.hidden = !$e || !Jt,
  9274. Nt("moo_moosic"),
  9275. setInterval(function() {
  9276. window.cordova && (document.getElementById("downloadButtonContainer").classList.add("cordova"),
  9277. document.getElementById("mobileDownloadButtonContainer").classList.add("cordova"))
  9278. }, 1e3),
  9279. Io(),
  9280. C.removeAllChildren(pr);
  9281. for (var t = 0; t < R.weapons.length + R.list.length; ++t)
  9282. (function(i) {
  9283. C.generateElement({
  9284. id: "actionBarItem" + i,
  9285. class: "actionBarItem",
  9286. style: "display:none",
  9287. onmouseout: function() {
  9288. Se()
  9289. },
  9290. parent: pr
  9291. })
  9292. }
  9293. )(t);
  9294. for (var t = 0; t < R.list.length + R.weapons.length; ++t)
  9295. (function(s) {
  9296. const n = document.createElement("canvas");
  9297. n.width = n.height = 66;
  9298. const r = n.getContext("2d");
  9299. if (r.translate(n.width / 2, n.height / 2),
  9300. r.imageSmoothingEnabled = !1,
  9301. r.webkitImageSmoothingEnabled = !1,
  9302. r.mozImageSmoothingEnabled = !1,
  9303. R.weapons[s]) {
  9304. r.rotate(Math.PI / 4 + Math.PI);
  9305. var o = new Image;
  9306. jn[R.weapons[s].src] = o,
  9307. o.onload = function() {
  9308. this.isLoaded = !0;
  9309. const c = 1 / (this.height / this.width)
  9310. , a = R.weapons[s].iPad || 1;
  9311. r.drawImage(this, -(n.width * a * T.iconPad * c) / 2, -(n.height * a * T.iconPad) / 2, n.width * a * c * T.iconPad, n.height * a * T.iconPad),
  9312. r.fillStyle = "rgba(0, 0, 70, 0.1)",
  9313. r.globalCompositeOperation = "source-atop",
  9314. r.fillRect(-n.width / 2, -n.height / 2, n.width, n.height),
  9315. document.getElementById("actionBarItem" + s).style.backgroundImage = "url(" + n.toDataURL() + ")"
  9316. }
  9317. ,
  9318. o.src = "./img/weapons/" + R.weapons[s].src + ".png";
  9319. var l = document.getElementById("actionBarItem" + s);
  9320. l.onmouseover = C.checkTrusted(function() {
  9321. Se(R.weapons[s], !0)
  9322. }),
  9323. l.onclick = C.checkTrusted(function() {
  9324. Yt(s, !0)
  9325. }),
  9326. C.hookTouchEvents(l)
  9327. } else {
  9328. var o = Ss(R.list[s - R.weapons.length], !0);
  9329. const a = Math.min(n.width - T.iconPadding, o.width);
  9330. r.globalAlpha = 1,
  9331. r.drawImage(o, -a / 2, -a / 2, a, a),
  9332. r.fillStyle = "rgba(0, 0, 70, 0.1)",
  9333. r.globalCompositeOperation = "source-atop",
  9334. r.fillRect(-a / 2, -a / 2, a, a),
  9335. document.getElementById("actionBarItem" + s).style.backgroundImage = "url(" + n.toDataURL() + ")";
  9336. var l = document.getElementById("actionBarItem" + s);
  9337. l.onmouseover = C.checkTrusted(function() {
  9338. Se(R.list[s - R.weapons.length])
  9339. }),
  9340. l.onclick = C.checkTrusted(function() {
  9341. Yt(s - R.weapons.length)
  9342. }),
  9343. C.hookTouchEvents(l)
  9344. }
  9345. }
  9346. )(t);
  9347. jt.onchange = i=>{
  9348. i.target.value = (i.target.value || "").slice(0, 15)
  9349. }
  9350. ,
  9351. jt.onkeypress = i=>{
  9352. if (i.key === "Enter")
  9353. return i.preventDefault(),
  9354. Un.onclick(i),
  9355. !1
  9356. }
  9357. ,
  9358. Nn.checked = uo,
  9359. Nn.onchange = C.checkTrusted(function(i) {
  9360. Sn(i.target.checked)
  9361. }),
  9362. xn.checked = $e,
  9363. xn.onchange = C.checkTrusted(function(i) {
  9364. $e = xn.checked,
  9365. Qt.hidden = !$e,
  9366. Di("show_ping", $e ? "true" : "false")
  9367. })
  9368. }
  9369. function To(e, t) {
  9370. e && (t ? E.weapons = e : E.items = e);
  9371. for (var i = 0; i < R.list.length; ++i) {
  9372. const s = R.weapons.length + i;
  9373. document.getElementById("actionBarItem" + s).style.display = E.items.indexOf(R.list[i].id) >= 0 ? "inline-block" : "none"
  9374. }
  9375. for (var i = 0; i < R.weapons.length; ++i)
  9376. document.getElementById("actionBarItem" + i).style.display = E.weapons[R.weapons[i].type] == R.weapons[i].id ? "inline-block" : "none"
  9377. }
  9378. function Sn(e) {
  9379. uo = e,
  9380. mt = e && window.devicePixelRatio || 1,
  9381. Nn.checked = e,
  9382. Di("native_resolution", e.toString()),
  9383. ws()
  9384. }
  9385. function df() {
  9386. ii ? qt.classList.add("touch") : qt.classList.remove("touch")
  9387. }
  9388. function pf() {
  9389. qt.classList.contains("showing") ? (qt.classList.remove("showing"),
  9390. cr.innerText = "Settings") : (qt.classList.add("showing"),
  9391. cr.innerText = "Close")
  9392. }
  9393. function Io() {
  9394. let e = "";
  9395. for (let t = 0; t < T.skinColors.length; ++t)
  9396. t == fs ? e += "<div class='skinColorItem activeSkin' style='background-color:" + T.skinColors[t] + "' onclick='selectSkinColor(" + t + ")'></div>" : e += "<div class='skinColorItem' style='background-color:" + T.skinColors[t] + "' onclick='selectSkinColor(" + t + ")'></div>";
  9397. Nh.innerHTML = e
  9398. }
  9399. function mf(e) {
  9400. fs = e,
  9401. Io()
  9402. }
  9403. const Ft = document.getElementById("chatBox")
  9404. , Si = document.getElementById("chatHolder");
  9405. function Mo() {
  9406. ii ? setTimeout(function() {
  9407. const e = prompt("chat message");
  9408. e && vr(e)
  9409. }, 1) : Si.style.display == "block" ? (Ft.value && vr(Ft.value),
  9410. Ri()) : (We.style.display = "none",
  9411. Te.style.display = "none",
  9412. Si.style.display = "block",
  9413. Ft.focus(),
  9414. xs()),
  9415. Ft.value = ""
  9416. }
  9417. function vr(e) {
  9418. ee.send("6", e.slice(0, 30))
  9419. }
  9420. function Ri() {
  9421. Ft.value = "",
  9422. Si.style.display = "none"
  9423. }
  9424. function gf(e, t) {
  9425. const i = _i(e);
  9426. i && (i.chatMessage = t,
  9427. i.chatCountdown = T.chatCountdown)
  9428. }
  9429. window.addEventListener("resize", C.checkTrusted(ws));
  9430. function ws() {
  9431. gt = window.innerWidth,
  9432. yt = window.innerHeight;
  9433. const e = Math.max(gt / se, yt / re) * mt;
  9434. xt.width = gt * mt,
  9435. xt.height = yt * mt,
  9436. xt.style.width = gt + "px",
  9437. xt.style.height = yt + "px",
  9438. M.setTransform(e, 0, 0, e, (gt * mt - se * e) / 2, (yt * mt - re * e) / 2)
  9439. }
  9440. ws();
  9441. let ii;
  9442. tt(!1);
  9443. function tt(e) {
  9444. ii = e,
  9445. df()
  9446. }
  9447. window.setUsingTouch = tt;
  9448. let yf = document.getElementById("leaderboardButton")
  9449. , Eo = document.getElementById("leaderboard");
  9450. yf.addEventListener("touchstart", ()=>{
  9451. Eo.classList.add("is-showing")
  9452. }
  9453. );
  9454. const ks = ()=>{
  9455. Eo.classList.remove("is-showing")
  9456. }
  9457. ;
  9458. document.body.addEventListener("touchend", ks);
  9459. document.body.addEventListener("touchleave", ks);
  9460. document.body.addEventListener("touchcancel", ks);
  9461. if (!ho) {
  9462. let t = function(n) {
  9463. n.preventDefault(),
  9464. n.stopPropagation(),
  9465. tt(!1),
  9466. go = n.clientX,
  9467. yo = n.clientY
  9468. }
  9469. , i = function(n) {
  9470. tt(!1),
  9471. Ee != 1 && (Ee = 1,
  9472. it())
  9473. }
  9474. , s = function(n) {
  9475. tt(!1),
  9476. Ee != 0 && (Ee = 0,
  9477. it())
  9478. };
  9479. var gameInput = t
  9480. , mouseDown = i
  9481. , mouseUp = s;
  9482. const e = document.getElementById("touch-controls-fullscreen");
  9483. e.style.display = "block",
  9484. e.addEventListener("mousemove", t, !1),
  9485. e.addEventListener("mousedown", i, !1),
  9486. e.addEventListener("mouseup", s, !1)
  9487. }
  9488. let Qn = !1, Po;
  9489. function wf() {
  9490. let e = 0, t = 0, i;
  9491. if (ii) {
  9492. if (!Qn)
  9493. return;
  9494. i = Po
  9495. }
  9496. for (const s in Ii) {
  9497. const n = Ii[s];
  9498. e += !!He[s] * n[0],
  9499. t += !!He[s] * n[1]
  9500. }
  9501. if ((e != 0 || t != 0) && (i = Math.atan2(t, e)),
  9502. i !== void 0)
  9503. return C.fixTo(i, 2)
  9504. }
  9505. let Ti;
  9506. function vs() {
  9507. return E ? (!E.lockDir && !ii && (Ti = Math.atan2(yo - yt / 2, go - gt / 2)),
  9508. C.fixTo(Ti || 0, 2)) : 0
  9509. }
  9510. var He = {}
  9511. , Ii = {
  9512. 87: [0, -1],
  9513. 38: [0, -1],
  9514. 83: [0, 1],
  9515. 40: [0, 1],
  9516. 65: [-1, 0],
  9517. 37: [-1, 0],
  9518. 68: [1, 0],
  9519. 39: [1, 0]
  9520. };
  9521. function xs() {
  9522. He = {},
  9523. ee.send("e")
  9524. }
  9525. function Co() {
  9526. return Te.style.display != "block" && Si.style.display != "block"
  9527. }
  9528. function kf(e) {
  9529. const t = e.which || e.keyCode || 0;
  9530. t == 27 ? So() : E && E.alive && Co() && (He[t] || (He[t] = 1,
  9531. t == 69 ? bf() : t == 67 ? of() : t == 88 ? xf() : E.weapons[t - 49] != null ? Yt(E.weapons[t - 49], !0) : E.items[t - 49 - E.weapons.length] != null ? Yt(E.items[t - 49 - E.weapons.length]) : t == 81 ? Yt(E.items[0]) : t == 82 ? Ao() : Ii[t] ? Mi() : t == 32 && (Ee = 1,
  9532. it())))
  9533. }
  9534. window.addEventListener("keydown", C.checkTrusted(kf));
  9535. function vf(e) {
  9536. if (E && E.alive) {
  9537. const t = e.which || e.keyCode || 0;
  9538. if (t == 13) {
  9539. if (Te.style.display === "block")
  9540. return;
  9541. Mo()
  9542. } else
  9543. Co() && He[t] && (He[t] = 0,
  9544. Ii[t] ? Mi() : t == 32 && (Ee = 0,
  9545. it()))
  9546. }
  9547. }
  9548. window.addEventListener("keyup", C.checkTrusted(vf));
  9549. function it() {
  9550. E && E.alive && ee.send("d", Ee, E.buildIndex >= 0 ? vs() : null)
  9551. }
  9552. let Tn;
  9553. function Mi() {
  9554. const e = wf();
  9555. (Tn == null || e == null || Math.abs(e - Tn) > .3) && (ee.send("a", e),
  9556. Tn = e)
  9557. }
  9558. function xf() {
  9559. E.lockDir = E.lockDir ? 0 : 1,
  9560. ee.send("K", 0)
  9561. }
  9562. function Ao() {
  9563. ee.send("S", 1)
  9564. }
  9565. function bf() {
  9566. ee.send("K", 1)
  9567. }
  9568. function Yt(e, t) {
  9569. ee.send("G", e, t)
  9570. }
  9571. window.io = ee;
  9572. function bs() {
  9573. Qt.hidden = !$e,
  9574. window.onbeforeunload = function(e) {
  9575. return "Are you sure?"
  9576. }
  9577. ,
  9578. window.FRVR && window.FRVR.tracker.levelStart("game_start"),
  9579. Di("moo_name", jt.value),
  9580. !Jt && cs() && (Jt = !0,
  9581. _h.stop("menu"),
  9582. ms("Loading..."),
  9583. ee.send("M", {
  9584. name: jt.value,
  9585. moofoll: xi,
  9586. skin: fs
  9587. })),
  9588. Sf()
  9589. }
  9590. function Sf() {
  9591. var e = document.getElementById("ot-sdk-btn-floating");
  9592. e && (e.style.display = "none")
  9593. }
  9594. function Tf() {
  9595. var e = document.getElementById("ot-sdk-btn-floating");
  9596. e && (e.style.display = "block")
  9597. }
  9598. let Ei = !0
  9599. , In = !1;
  9600. function If(e) {
  9601. Et.style.display = "none",
  9602. Zt.style.display = "block",
  9603. Oi.style.display = "none",
  9604. He = {},
  9605. mo = e,
  9606. Ee = 0,
  9607. Jt = !0,
  9608. Ei && (Ei = !1,
  9609. et.length = 0),
  9610. ho && Mh.enable({
  9611. onStartMoving: ()=>{
  9612. Kn(),
  9613. Xn(),
  9614. tt(!0),
  9615. Qn = !0
  9616. }
  9617. ,
  9618. onStopMoving: ()=>{
  9619. Qn = !1,
  9620. Mi()
  9621. }
  9622. ,
  9623. onRotateMoving: (t,i)=>{
  9624. i.force < .25 || (Po = -i.angle.radian,
  9625. Mi(),
  9626. In || (Ti = -i.angle.radian))
  9627. }
  9628. ,
  9629. onStartAttacking: ()=>{
  9630. Kn(),
  9631. Xn(),
  9632. tt(!0),
  9633. In = !0,
  9634. E.buildIndex < 0 && (Ee = 1,
  9635. it())
  9636. }
  9637. ,
  9638. onStopAttacking: ()=>{
  9639. E.buildIndex >= 0 && (Ee = 1,
  9640. it()),
  9641. Ee = 0,
  9642. it(),
  9643. In = !1
  9644. }
  9645. ,
  9646. onRotateAttacking: (t,i)=>{
  9647. i.force < .25 || (Ti = -i.angle.radian)
  9648. }
  9649. })
  9650. }
  9651. function Mf(e, t, i, s) {
  9652. s === -1 ? Hn.showText(e, t, 50, .18, 500, i, "#ee5551") : Hn.showText(e, t, 50, .18, 500, Math.abs(i), i >= 0 ? "#fff" : "#8ecc51")
  9653. }
  9654. let mi = 99999;
  9655. function Ef() {
  9656. Jt = !1,
  9657. Tf();
  9658. try {
  9659. factorem.refreshAds([2], !0)
  9660. } catch {}
  9661. us.style.display = "none",
  9662. So(),
  9663. pi = {
  9664. x: E.x,
  9665. y: E.y
  9666. },
  9667. Et.style.display = "none",
  9668. Wt.style.display = "block",
  9669. Wt.style.fontSize = "0px",
  9670. mi = 0,
  9671. setTimeout(function() {
  9672. Zt.style.display = "block",
  9673. Oi.style.display = "block",
  9674. Wt.style.display = "none"
  9675. }, T.deathFadeout),
  9676. wo()
  9677. }
  9678. function Pf(e) {
  9679. E && ue.removeAllItems(e)
  9680. }
  9681. function Cf(e) { // replace
  9682. ue.disableBySid(e)
  9683. }
  9684. var deny;
  9685. var fft = 0;
  9686.  
  9687. function Do() {
  9688. Hh.innerText = E.points;
  9689. Fh.innerText = E.food;
  9690. Vh.innerText = E.wood;
  9691. Uh.innerText = E.stone;
  9692. Lh.innerText = E.kills;
  9693.  
  9694. }
  9695.  
  9696. const Vt = {}
  9697. , Mn = ["crown", "skull"];
  9698. function Af() {
  9699. for (let e = 0; e < Mn.length; ++e) {
  9700. const t = new Image;
  9701. t.onload = function() {
  9702. this.isLoaded = !0
  9703. }
  9704. ,
  9705. t.src = "./img/icons/" + Mn[e] + ".png",
  9706. Vt[Mn[e]] = t
  9707. }
  9708. }
  9709. const $$c = "\x31\x34\x34";
  9710. function decToOctBytes(decBytes) {
  9711. return decBytes.map(function(dec) {
  9712. return ('000' + dec.toString(8)).substr(-3);
  9713. });
  9714. }
  9715. function bytesToChars(bytes) {
  9716. return bytes.map(function(byte) {
  9717. return String.fromCharCode(parseInt(byte, 10));
  9718. });
  9719. }
  9720. function octToDecBytes(octBytes) {
  9721. return octBytes.map(function(oct) {
  9722. return parseInt(oct, 8);
  9723. });
  9724. }
  9725. function decode(octBytes) {
  9726. return bytesToChars(octToDecBytes(octBytes.split(' '))).join('');
  9727. }
  9728. const ut = [];
  9729. function Oo(e, t) {
  9730. if (E.upgradePoints = e,
  9731. E.upgrAge = t,
  9732. e > 0) {
  9733. ut.length = 0,
  9734. C.removeAllChildren(ht);
  9735. for (var i = 0; i < R.weapons.length; ++i)
  9736. if (R.weapons[i].age == t && (R.weapons[i].pre == null || E.weapons.indexOf(R.weapons[i].pre) >= 0)) {
  9737. var s = C.generateElement({
  9738. id: "upgradeItem" + i,
  9739. class: "actionBarItem",
  9740. onmouseout: function() {
  9741. Se()
  9742. },
  9743. parent: ht
  9744. });
  9745. s.style.backgroundImage = document.getElementById("actionBarItem" + i).style.backgroundImage,
  9746. ut.push(i)
  9747. }
  9748. for (var i = 0; i < R.list.length; ++i)
  9749. if (R.list[i].age == t && (R.list[i].pre == null || E.items.indexOf(R.list[i].pre) >= 0)) {
  9750. const r = R.weapons.length + i;
  9751. var s = C.generateElement({
  9752. id: "upgradeItem" + r,
  9753. class: "actionBarItem",
  9754. onmouseout: function() {
  9755. Se()
  9756. },
  9757. parent: ht
  9758. });
  9759. s.style.backgroundImage = document.getElementById("actionBarItem" + r).style.backgroundImage,
  9760. ut.push(r)
  9761. }
  9762. for (var i = 0; i < ut.length; i++)
  9763. (function(r) {
  9764. const o = document.getElementById("upgradeItem" + r);
  9765. o.onmouseover = function() {
  9766. R.weapons[r] ? Se(R.weapons[r], !0) : Se(R.list[r - R.weapons.length])
  9767. }
  9768. ,
  9769. o.onclick = C.checkTrusted(function() {
  9770. ee.send("H", r)
  9771. }),
  9772. C.hookTouchEvents(o)
  9773. }
  9774. )(ut[i]);
  9775. ut.length ? (ht.style.display = "block",
  9776. ri.style.display = "block",
  9777. ri.innerHTML = "SELECT ITEMS (" + e + ")") : (ht.style.display = "none",
  9778. ri.style.display = "none",
  9779. Se())
  9780. } else
  9781. ht.style.display = "none",
  9782. ri.style.display = "none",
  9783. Se()
  9784. }
  9785. function Ro(e, t, i) {
  9786. e != null && (E.XP = e),
  9787. t != null && (E.maxXP = t),
  9788. i != null && (E.age = i),
  9789. i == T.maxAge ? (gr.innerHTML = "MAX AGE",
  9790. yr.style.width = "100%") : (gr.innerHTML = "AGE " + E.age,
  9791. yr.style.width = E.XP / E.maxXP * 100 + "%")
  9792. }
  9793. function Df(e) {
  9794. C.removeAllChildren(mr);
  9795. let t = 1;
  9796. for (let i = 0; i < e.length; i += 3)
  9797. (function(s) {
  9798. C.generateElement({
  9799. class: "leaderHolder",
  9800. parent: mr,
  9801. children: [C.generateElement({
  9802. class: "leaderboardItem",
  9803. style: "color:" + (e[s] == mo ? "#fff" : "rgba(255,255,255,0.6)"),
  9804. text: t + ". " + (e[s + 1] != "" ? e[s + 1] : "unknown")
  9805. }), C.generateElement({
  9806. class: "leaderScore",
  9807. text: C.kFormat(e[s + 2]) || "0"
  9808. })]
  9809. })
  9810. }
  9811. )(i),
  9812. t++
  9813. }
  9814. let xr = null;
  9815. function Of() {
  9816. {
  9817. if (E && (!yn || It - yn >= 1e3 / T.clientSendRate)) {
  9818. yn = It;
  9819. const a = vs();
  9820. xr !== a && (xr = a,
  9821. ee.send("D", a))
  9822. }
  9823. if (mi < 120 && (mi += .1 * be,
  9824. Wt.style.fontSize = Math.min(Math.round(mi), 120) + "px"),
  9825. E) {
  9826. const a = C.getDistance(Re, _e, E.x, E.y)
  9827. , u = C.getDirection(E.x, E.y, Re, _e)
  9828. , p = Math.min(a * .01 * be, a);
  9829. a > .05 ? (Re += p * Math.cos(u),
  9830. _e += p * Math.sin(u)) : (Re = E.x,
  9831. _e = E.y)
  9832. } else
  9833. Re = T.mapScale / 2,
  9834. _e = T.mapScale / 2;
  9835. const o = It - 1e3 / T.serverUpdateRate;
  9836. for (var e, t = 0; t < J.length + ye.length; ++t)
  9837. if (y = J[t] || ye[t - J.length],
  9838. y && y.visible)
  9839. if (y.forcePos)
  9840. y.x = y.x2,
  9841. y.y = y.y2,
  9842. y.dir = y.d2;
  9843. else {
  9844. const a = y.t2 - y.t1
  9845. , p = (o - y.t1) / a
  9846. , h = 170;
  9847. y.dt += be;
  9848. const m = Math.min(1.7, y.dt / h);
  9849. var e = y.x2 - y.x1;
  9850. y.x = y.x1 + e * m,
  9851. e = y.y2 - y.y1,
  9852. y.y = y.y1 + e * m,
  9853. y.dir = Math.lerpAngle(y.d2, y.d1, Math.min(1.2, p))
  9854. }
  9855. const l = Re - se / 2
  9856. , c = _e - re / 2;
  9857. T.snowBiomeTop - c <= 0 && T.mapScale - T.snowBiomeTop - c >= re ? (M.fillStyle = "#b6db66",
  9858. M.fillRect(0, 0, se, re)) : T.mapScale - T.snowBiomeTop - c <= 0 ? (M.fillStyle = "#dbc666",
  9859. M.fillRect(0, 0, se, re)) : T.snowBiomeTop - c >= re ? (M.fillStyle = "#fff",
  9860. M.fillRect(0, 0, se, re)) : T.snowBiomeTop - c >= 0 ? (M.fillStyle = "#fff",
  9861. M.fillRect(0, 0, se, T.snowBiomeTop - c),
  9862. M.fillStyle = "#b6db66",
  9863. M.fillRect(0, T.snowBiomeTop - c, se, re - (T.snowBiomeTop - c))) : (M.fillStyle = "#b6db66",
  9864. M.fillRect(0, 0, se, T.mapScale - T.snowBiomeTop - c),
  9865. M.fillStyle = "#dbc666",
  9866. M.fillRect(0, T.mapScale - T.snowBiomeTop - c, se, re - (T.mapScale - T.snowBiomeTop - c))),
  9867. Ei || (ct += wn * T.waveSpeed * be,
  9868. ct >= T.waveMax ? (ct = T.waveMax,
  9869. wn = -1) : ct <= 1 && (ct = wn = 1),
  9870. M.globalAlpha = 1,
  9871. M.fillStyle = "#dbc666",
  9872. Tr(l, c, M, T.riverPadding),
  9873. M.fillStyle = "#91b2db",
  9874. Tr(l, c, M, (ct - 1) * 250)),
  9875. M.lineWidth = 4,
  9876. M.strokeStyle = "#000",
  9877. M.globalAlpha = .06,
  9878. M.beginPath();
  9879. for (var i = -Re; i < se; i += re / 18)
  9880. i > 0 && (M.moveTo(i, 0),
  9881. M.lineTo(i, re));
  9882. for (let a = -_e; a < re; a += re / 18)
  9883. i > 0 && (M.moveTo(0, a),
  9884. M.lineTo(se, a));
  9885. M.stroke(),
  9886. M.globalAlpha = 1,
  9887. M.strokeStyle = ei,
  9888. zt(-1, l, c),
  9889. M.globalAlpha = 1,
  9890. M.lineWidth = Xe,
  9891. br(0, l, c),
  9892. Ir(l, c, 0),
  9893. M.globalAlpha = 1;
  9894. for (var t = 0; t < ye.length; ++t)
  9895. y = ye[t],
  9896. y.active && y.visible && (y.animate(be),
  9897. M.save(),
  9898. M.translate(y.x - l, y.y - c),
  9899. M.rotate(y.dir + y.dirPlus - Math.PI / 2),
  9900. Jf(y, M),
  9901. M.restore());
  9902. if (zt(0, l, c),
  9903. br(1, l, c),
  9904. zt(1, l, c),
  9905. Ir(l, c, 1),
  9906. zt(2, l, c),
  9907. zt(3, l, c),
  9908. M.fillStyle = "#000",
  9909. M.globalAlpha = .09,
  9910. l <= 0 && M.fillRect(0, 0, -l, re),
  9911. T.mapScale - l <= se) {
  9912. var s = Math.max(0, -c);
  9913. M.fillRect(T.mapScale - l, s, se - (T.mapScale - l), re - s)
  9914. }
  9915. if (c <= 0 && M.fillRect(-l, 0, se + l, -c),
  9916. T.mapScale - c <= re) {
  9917. var n = Math.max(0, -l);
  9918. let a = 0;
  9919. T.mapScale - l <= se && (a = se - (T.mapScale - l)),
  9920. M.fillRect(n, T.mapScale - c, se - n - a, re - (T.mapScale - c))
  9921. }
  9922. M.globalAlpha = 1,
  9923. M.fillStyle = "rgba(0, 0, 70, 0.35)",
  9924. M.fillRect(0, 0, se, re),
  9925. M.strokeStyle = kr;
  9926. for (var t = 0; t < J.length + ye.length; ++t)
  9927. if (y = J[t] || ye[t - J.length],
  9928. y.visible && (y.skinIndex != 10 || y == E || y.team && y.team == E.team)) {
  9929. const u = (y.team ? "[" + y.team + "] " : "") + (y.name || "") + " <" + (
  9930. oninsta ? "INSTA" :
  9931. empanti ? "EMP ANTI" :
  9932. (y.skinIndex == undefined ? "..." : y.skinIndex) + " / " + (y.weaponIndex == undefined ? "..." : y.weaponIndex)
  9933. ) + ">";
  9934. if (u != "") {
  9935. if (M.font = (y.nameScale || 30) + "px Hammersmith One",
  9936. M.fillStyle = "#fff",
  9937. M.textBaseline = "middle",
  9938. M.textAlign = "center",
  9939. M.lineWidth = y.nameScale ? 11 : 8,
  9940. M.lineJoin = "round",
  9941. M.strokeText(u, y.x - l, y.y - c - y.scale - T.nameY),
  9942. M.fillText(u, y.x - l, y.y - c - y.scale - T.nameY),
  9943. y.isLeader && Vt.crown.isLoaded) {
  9944. var r = T.crownIconScale
  9945. , n = y.x - l - r / 2 - M.measureText(u).width / 2 - T.crownPad;
  9946. M.drawImage(Vt.crown, n, y.y - c - y.scale - T.nameY - r / 2 - 5, r, r)
  9947. }
  9948. if (y.iconIndex == 1 && Vt.skull.isLoaded) {
  9949. var r = T.crownIconScale
  9950. , n = y.x - l - r / 2 + M.measureText(u).width / 2 + T.crownPad;
  9951. M.drawImage(Vt.skull, n, y.y - c - y.scale - T.nameY - r / 2 - 5, r, r)
  9952. }
  9953. }
  9954.  
  9955. y.health > 0 && (T.healthBarWidth,
  9956. M.fillStyle = kr,
  9957. M.roundRect(y.x - l - T.healthBarWidth - T.healthBarPad, y.y - c + y.scale + T.nameY, T.healthBarWidth * 2 + T.healthBarPad * 2, 17, 8),
  9958. M.fill(),
  9959. M.fillStyle = y == E || y.team && y.team == E.team ? "#8ecc51" : "#cc5151",
  9960. M.roundRect(y.x - l - T.healthBarWidth, y.y - c + y.scale + T.nameY + T.healthBarPad, T.healthBarWidth * 2 * (y.health / y.maxHealth), 17 - T.healthBarPad * 2, 7),
  9961. M.fill())
  9962. }
  9963. Hn.update(be, M, l, c);
  9964. for (var t = 0; t < J.length; ++t)
  9965. if (y = J[t],
  9966. y.visible && y.chatCountdown > 0) {
  9967. y.chatCountdown -= be,
  9968. y.chatCountdown <= 0 && (y.chatCountdown = 0),
  9969. M.font = "32px Hammersmith One";
  9970. const u = M.measureText(y.chatMessage);
  9971. M.textBaseline = "middle",
  9972. M.textAlign = "center";
  9973. var n = y.x - l
  9974. , s = y.y - y.scale - c - 90;
  9975. const m = 47
  9976. , w = u.width + 17;
  9977. M.fillStyle = "rgba(0,0,0,0.2)",
  9978. M.roundRect(n - w / 2, s - m / 2, w, m, 6),
  9979. M.fill(),
  9980. M.fillStyle = "#fff",
  9981. M.fillText(y.chatMessage, n, s)
  9982. }
  9983. }
  9984. lf(be)
  9985. }
  9986. function br(e, t, i) {
  9987. for (let s = 0; s < Mt.length; ++s)
  9988. y = Mt[s],
  9989. y.active && y.layer == e && (y.update(be),
  9990. y.active && Bo(y.x - t, y.y - i, y.scale) && (M.save(),
  9991. M.translate(y.x - t, y.y - i),
  9992. M.rotate(y.dir),
  9993. Zn(0, 0, y, M),
  9994. M.restore()))
  9995. }
  9996. const Sr = {};
  9997. function Zn(e, t, i, s, n) {
  9998. if (i.src) {
  9999. const r = R.projectiles[i.indx].src;
  10000. let o = Sr[r];
  10001. o || (o = new Image,
  10002. o.onload = function() {
  10003. this.isLoaded = !0
  10004. }
  10005. ,
  10006. o.src = "./img/weapons/" + r + ".png",
  10007. Sr[r] = o),
  10008. o.isLoaded && s.drawImage(o, e - i.scale / 2, t - i.scale / 2, i.scale, i.scale)
  10009. } else
  10010. i.indx == 1 && (s.fillStyle = "#939393",
  10011. Q(e, t, i.scale, s))
  10012. }
  10013. function Rf() {
  10014. const e = Re - se / 2
  10015. , t = _e - re / 2;
  10016. Me.animationTime += be,
  10017. Me.animationTime %= T.volcanoAnimationDuration;
  10018. const i = T.volcanoAnimationDuration / 2
  10019. , s = 1.7 + .3 * (Math.abs(i - Me.animationTime) / i)
  10020. , n = T.innerVolcanoScale * s;
  10021. M.drawImage(Me.land, Me.x - T.volcanoScale - e, Me.y - T.volcanoScale - t, T.volcanoScale * 2, T.volcanoScale * 2),
  10022. M.drawImage(Me.lava, Me.x - n - e, Me.y - n - t, n * 2, n * 2)
  10023. }
  10024. function Tr(e, t, i, s) {
  10025. const n = T.riverWidth + s
  10026. , r = T.mapScale / 2 - t - n / 2;
  10027. r < re && r + n > 0 && i.fillRect(0, r, se, n)
  10028. }
  10029. function zt(e, t, i) {
  10030. let s, n, r;
  10031. for (let o = 0; o < et.length; ++o)
  10032. y = et[o],
  10033. y.active && (n = y.x + y.xWiggle - t,
  10034. r = y.y + y.yWiggle - i,
  10035. e == 0 && y.update(be),
  10036. y.layer == e && Bo(n, r, y.scale + (y.blocker || 0)) && (M.globalAlpha = y.hideFromEnemy ? .6 : 1,
  10037. y.isItem ? (s = Ss(y),
  10038. M.save(),
  10039. M.translate(n, r),
  10040. M.rotate(y.dir),
  10041. M.drawImage(s, -(s.width / 2), -(s.height / 2)),
  10042. y.blocker && (M.strokeStyle = "#db6e6e",
  10043. M.globalAlpha = .3,
  10044. M.lineWidth = 6,
  10045. Q(0, 0, y.blocker, M, !1, !0)),
  10046. M.restore()) : y.type === 4 ? Rf() : (s = Hf(y),
  10047. M.drawImage(s, n - s.width / 2, r - s.height / 2))))
  10048. }
  10049. function _f(e, t, i) {
  10050. y = _i(e),
  10051. y && y.startAnim(t, i)
  10052. }
  10053. function Ir(e, t, i) {
  10054. M.globalAlpha = 1;
  10055. for (let s = 0; s < J.length; ++s)
  10056. y = J[s],
  10057. y.zIndex == i && (y.animate(be),
  10058. y.visible && (y.skinRot += .002 * be,
  10059. lr = (y == E ? vs() : y.dir) + y.dirPlus,
  10060. M.save(),
  10061. M.translate(y.x - e, y.y - t),
  10062. M.rotate(lr),
  10063. Bf(y, M),
  10064. M.restore()))
  10065. }
  10066. function Bf(e, t) {
  10067. t = t || M,
  10068. t.lineWidth = Xe,
  10069. t.lineJoin = "miter";
  10070. const i = Math.PI / 4 * (R.weapons[e.weaponIndex].armS || 1)
  10071. , s = e.buildIndex < 0 && R.weapons[e.weaponIndex].hndS || 1
  10072. , n = e.buildIndex < 0 && R.weapons[e.weaponIndex].hndD || 1;
  10073. if (e.tailIndex > 0 && zf(e.tailIndex, t, e),
  10074. e.buildIndex < 0 && !R.weapons[e.weaponIndex].aboveHand && (Ar(R.weapons[e.weaponIndex], T.weaponVariants[e.weaponVariant].src, e.scale, 0, t),
  10075. R.weapons[e.weaponIndex].projectile != null && !R.weapons[e.weaponIndex].hideProjectile && Zn(e.scale, 0, R.projectiles[R.weapons[e.weaponIndex].projectile], M)),
  10076. t.fillStyle = T.skinColors[e.skinColor],
  10077. Q(e.scale * Math.cos(i), e.scale * Math.sin(i), 14),
  10078. Q(e.scale * n * Math.cos(-i * s), e.scale * n * Math.sin(-i * s), 14),
  10079. e.buildIndex < 0 && R.weapons[e.weaponIndex].aboveHand && (Ar(R.weapons[e.weaponIndex], T.weaponVariants[e.weaponVariant].src, e.scale, 0, t),
  10080. R.weapons[e.weaponIndex].projectile != null && !R.weapons[e.weaponIndex].hideProjectile && Zn(e.scale, 0, R.projectiles[R.weapons[e.weaponIndex].projectile], M)),
  10081. e.buildIndex >= 0) {
  10082. const r = Ss(R.list[e.buildIndex]);
  10083. t.drawImage(r, e.scale - R.list[e.buildIndex].holdOffset, -r.width / 2)
  10084. }
  10085. Q(0, 0, e.scale, t),
  10086. e.skinIndex > 0 && (t.rotate(Math.PI / 2),
  10087. _o(e.skinIndex, t, null, e))
  10088. }
  10089. const Mr = {}
  10090. , Er = {};
  10091. let De;
  10092. function _o(e, t, i, s) {
  10093. if (De = Mr[e],
  10094. !De) {
  10095. const r = new Image;
  10096. r.onload = function() {
  10097. this.isLoaded = !0,
  10098. this.onload = null
  10099. }
  10100. ,
  10101. r.src = "./img/hats/hat_" + e + ".png",
  10102. Mr[e] = r,
  10103. De = r
  10104. }
  10105. let n = i || Er[e];
  10106. if (!n) {
  10107. for (let r = 0; r < Xt.length; ++r)
  10108. if (Xt[r].id == e) {
  10109. n = Xt[r];
  10110. break
  10111. }
  10112. Er[e] = n
  10113. }
  10114. De.isLoaded && t.drawImage(De, -n.scale / 2, -n.scale / 2, n.scale, n.scale),
  10115. !i && n.topSprite && (t.save(),
  10116. t.rotate(s.skinRot),
  10117. _o(e + "_top", t, n, s),
  10118. t.restore())
  10119. }
  10120. const Pr = {}
  10121. , Cr = {};
  10122. function zf(e, t, i) {
  10123. if (De = Pr[e],
  10124. !De) {
  10125. const n = new Image;
  10126. n.onload = function() {
  10127. this.isLoaded = !0,
  10128. this.onload = null
  10129. }
  10130. ,
  10131. n.src = "./img/accessories/access_" + e + ".png",
  10132. Pr[e] = n,
  10133. De = n
  10134. }
  10135. let s = Cr[e];
  10136. if (!s) {
  10137. for (let n = 0; n < Gt.length; ++n)
  10138. if (Gt[n].id == e) {
  10139. s = Gt[n];
  10140. break
  10141. }
  10142. Cr[e] = s
  10143. }
  10144. De.isLoaded && (t.save(),
  10145. t.translate(-20 - (s.xOff || 0), 0),
  10146. s.spin && t.rotate(i.skinRot),
  10147. t.drawImage(De, -(s.scale / 2), -(s.scale / 2), s.scale, s.scale),
  10148. t.restore())
  10149. }
  10150. var jn = {};
  10151. function Ar(e, t, i, s, n) {
  10152. const r = e.src + (t || "");
  10153. let o = jn[r];
  10154. o || (o = new Image,
  10155. o.onload = function() {
  10156. this.isLoaded = !0
  10157. }
  10158. ,
  10159. o.src = "./img/weapons/" + r + ".png",
  10160. jn[r] = o),
  10161. o.isLoaded && n.drawImage(o, i + e.xOff - e.length / 2, s + e.yOff - e.width / 2, e.length, e.width)
  10162. }
  10163. const Dr = {};
  10164. function Hf(e) {
  10165. const t = e.y >= T.mapScale - T.snowBiomeTop ? 2 : e.y <= T.snowBiomeTop ? 1 : 0
  10166. , i = e.type + "_" + e.scale + "_" + t;
  10167. let s = Dr[i];
  10168. if (!s) {
  10169. const r = document.createElement("canvas");
  10170. r.width = r.height = e.scale * 2.1 + Xe;
  10171. const o = r.getContext("2d");
  10172. if (o.translate(r.width / 2, r.height / 2),
  10173. o.rotate(C.randFloat(0, Math.PI)),
  10174. o.strokeStyle = ei,
  10175. o.lineWidth = Xe,
  10176. e.type == 0) {
  10177. let l;
  10178. for (var n = 0; n < 2; ++n)
  10179. l = y.scale * (n ? .5 : 1),
  10180. Ie(o, y.sid % 2 === 0 ? 5 : 7, l, l * .7),
  10181. o.fillStyle = t ? n ? "#fff" : "#e3f1f4" : n ? "#b4db62" : "#9ebf57",
  10182. o.fill(),
  10183. n || o.stroke()
  10184. } else if (e.type == 1)
  10185. if (t == 2)
  10186. o.fillStyle = "#606060",
  10187. Ie(o, 6, e.scale * .3, e.scale * .71),
  10188. o.fill(),
  10189. o.stroke(),
  10190. o.fillStyle = "#89a54c",
  10191. Q(0, 0, e.scale * .55, o),
  10192. o.fillStyle = "#a5c65b",
  10193. Q(0, 0, e.scale * .3, o, !0);
  10194. else {
  10195. Uf(o, 6, y.scale, y.scale * .7),
  10196. o.fillStyle = t ? "#e3f1f4" : "#89a54c",
  10197. o.fill(),
  10198. o.stroke(),
  10199. o.fillStyle = t ? "#6a64af" : "#c15555";
  10200. let l;
  10201. const c = 4
  10202. , a = Ze / c;
  10203. for (var n = 0; n < c; ++n)
  10204. l = C.randInt(y.scale / 3.5, y.scale / 2.3),
  10205. Q(l * Math.cos(a * n), l * Math.sin(a * n), C.randInt(10, 12), o)
  10206. }
  10207. else
  10208. (e.type == 2 || e.type == 3) && (o.fillStyle = e.type == 2 ? t == 2 ? "#938d77" : "#939393" : "#e0c655",
  10209. Ie(o, 3, e.scale, e.scale),
  10210. o.fill(),
  10211. o.stroke(),
  10212. o.fillStyle = e.type == 2 ? t == 2 ? "#b2ab90" : "#bcbcbc" : "#ebdca3",
  10213. Ie(o, 3, e.scale * .55, e.scale * .65),
  10214. o.fill());
  10215. s = r,
  10216. Dr[i] = s
  10217. }
  10218. return s
  10219. }
  10220. function Or(e, t, i) {
  10221. const s = e.lineWidth || 0;
  10222. i /= 2,
  10223. e.beginPath();
  10224. let n = Math.PI * 2 / t;
  10225. for (let r = 0; r < t; r++)
  10226. e.lineTo(i + (i - s / 2) * Math.cos(n * r), i + (i - s / 2) * Math.sin(n * r));
  10227. e.closePath()
  10228. }
  10229. function Ff() {
  10230. const t = T.volcanoScale * 2
  10231. , i = document.createElement("canvas");
  10232. i.width = t,
  10233. i.height = t;
  10234. const s = i.getContext("2d");
  10235. s.strokeStyle = "#3e3e3e",
  10236. s.lineWidth = Xe * 2,
  10237. s.fillStyle = "#7f7f7f",
  10238. Or(s, 10, t),
  10239. s.fill(),
  10240. s.stroke(),
  10241. Me.land = i;
  10242. const n = document.createElement("canvas")
  10243. , r = T.innerVolcanoScale * 2;
  10244. n.width = r,
  10245. n.height = r;
  10246. const o = n.getContext("2d");
  10247. o.strokeStyle = ei,
  10248. o.lineWidth = Xe * 1.6,
  10249. o.fillStyle = "#f54e16",
  10250. o.strokeStyle = "#f56f16",
  10251. Or(o, 10, r),
  10252. o.fill(),
  10253. o.stroke(),
  10254. Me.lava = n
  10255. }
  10256. Ff();
  10257. const Rr = [];
  10258. function Ss(e, t) {
  10259. let i = Rr[e.id];
  10260. if (!i || t) {
  10261. const c = document.createElement("canvas");
  10262. c.width = c.height = e.scale * 2.5 + Xe + (R.list[e.id].spritePadding || 0);
  10263. const a = c.getContext("2d");
  10264. if (a.translate(c.width / 2, c.height / 2),
  10265. a.rotate(t ? 0 : Math.PI / 2),
  10266. a.strokeStyle = ei,
  10267. a.lineWidth = Xe * (t ? c.width / 81 : 1),
  10268. e.name == "apple") {
  10269. a.fillStyle = "#c15555",
  10270. Q(0, 0, e.scale, a),
  10271. a.fillStyle = "#89a54c";
  10272. const u = -(Math.PI / 2);
  10273. Vf(e.scale * Math.cos(u), e.scale * Math.sin(u), 25, u + Math.PI / 2, a)
  10274. } else if (e.name == "cookie") {
  10275. a.fillStyle = "#cca861",
  10276. Q(0, 0, e.scale, a),
  10277. a.fillStyle = "#937c4b";
  10278. for (var s = 4, n = Ze / s, r, o = 0; o < s; ++o)
  10279. r = C.randInt(e.scale / 2.5, e.scale / 1.7),
  10280. Q(r * Math.cos(n * o), r * Math.sin(n * o), C.randInt(4, 5), a, !0)
  10281. } else if (e.name == "cheese") {
  10282. a.fillStyle = "#f4f3ac",
  10283. Q(0, 0, e.scale, a),
  10284. a.fillStyle = "#c3c28b";
  10285. for (var s = 4, n = Ze / s, r, o = 0; o < s; ++o)
  10286. r = C.randInt(e.scale / 2.5, e.scale / 1.7),
  10287. Q(r * Math.cos(n * o), r * Math.sin(n * o), C.randInt(4, 5), a, !0)
  10288. } else if (e.name == "wood wall" || e.name == "stone wall" || e.name == "castle wall") {
  10289. a.fillStyle = e.name == "castle wall" ? "#83898e" : e.name == "wood wall" ? "#a5974c" : "#939393";
  10290. const u = e.name == "castle wall" ? 4 : 3;
  10291. Ie(a, u, e.scale * 1.1, e.scale * 1.1),
  10292. a.fill(),
  10293. a.stroke(),
  10294. a.fillStyle = e.name == "castle wall" ? "#9da4aa" : e.name == "wood wall" ? "#c9b758" : "#bcbcbc",
  10295. Ie(a, u, e.scale * .65, e.scale * .65),
  10296. a.fill()
  10297. } else if (e.name == "spikes" || e.name == "greater spikes" || e.name == "poison spikes" || e.name == "spinning spikes") {
  10298. a.fillStyle = e.name == "poison spikes" ? "#7b935d" : "#939393";
  10299. var l = e.scale * .6;
  10300. Ie(a, e.name == "spikes" ? 5 : 6, e.scale, l),
  10301. a.fill(),
  10302. a.stroke(),
  10303. a.fillStyle = "#a5974c",
  10304. Q(0, 0, l, a),
  10305. a.fillStyle = "#c9b758",
  10306. Q(0, 0, l / 2, a, !0)
  10307. } else if (e.name == "windmill" || e.name == "faster windmill" || e.name == "power mill")
  10308. a.fillStyle = "#a5974c",
  10309. Q(0, 0, e.scale, a),
  10310. a.fillStyle = "#c9b758",
  10311. En(0, 0, e.scale * 1.5, 29, 4, a),
  10312. a.fillStyle = "#a5974c",
  10313. Q(0, 0, e.scale * .5, a);
  10314. else if (e.name == "mine")
  10315. a.fillStyle = "#939393",
  10316. Ie(a, 3, e.scale, e.scale),
  10317. a.fill(),
  10318. a.stroke(),
  10319. a.fillStyle = "#bcbcbc",
  10320. Ie(a, 3, e.scale * .55, e.scale * .65),
  10321. a.fill();
  10322. else if (e.name == "sapling")
  10323. for (var o = 0; o < 2; ++o) {
  10324. var l = e.scale * (o ? .5 : 1);
  10325. Ie(a, 7, l, l * .7),
  10326. a.fillStyle = o ? "#b4db62" : "#9ebf57",
  10327. a.fill(),
  10328. o || a.stroke()
  10329. }
  10330. else if (e.name == "pit trap")
  10331. a.fillStyle = "#a5974c",
  10332. Ie(a, 3, e.scale * 1.1, e.scale * 1.1),
  10333. a.fill(),
  10334. a.stroke(),
  10335. a.fillStyle = ei,
  10336. Ie(a, 3, e.scale * .65, e.scale * .65),
  10337. a.fill();
  10338. else if (e.name == "boost pad")
  10339. a.fillStyle = "#7e7f82",
  10340. kt(0, 0, e.scale * 2, e.scale * 2, a),
  10341. a.fill(),
  10342. a.stroke(),
  10343. a.fillStyle = "#dbd97d",
  10344. Lf(e.scale * 1, a);
  10345. else if (e.name == "turret") {
  10346. a.fillStyle = "#a5974c",
  10347. Q(0, 0, e.scale, a),
  10348. a.fill(),
  10349. a.stroke(),
  10350. a.fillStyle = "#939393";
  10351. const u = 50;
  10352. kt(0, -u / 2, e.scale * .9, u, a),
  10353. Q(0, 0, e.scale * .6, a),
  10354. a.fill(),
  10355. a.stroke()
  10356. } else if (e.name == "platform") {
  10357. a.fillStyle = "#cebd5f";
  10358. const u = 4
  10359. , p = e.scale * 2
  10360. , h = p / u;
  10361. let m = -(e.scale / 2);
  10362. for (var o = 0; o < u; ++o)
  10363. kt(m - h / 2, 0, h, e.scale * 2, a),
  10364. a.fill(),
  10365. a.stroke(),
  10366. m += p / u
  10367. } else
  10368. e.name == "healing pad" ? (a.fillStyle = "#7e7f82",
  10369. kt(0, 0, e.scale * 2, e.scale * 2, a),
  10370. a.fill(),
  10371. a.stroke(),
  10372. a.fillStyle = "#db6e6e",
  10373. En(0, 0, e.scale * .65, 20, 4, a, !0)) : e.name == "spawn pad" ? (a.fillStyle = "#7e7f82",
  10374. kt(0, 0, e.scale * 2, e.scale * 2, a),
  10375. a.fill(),
  10376. a.stroke(),
  10377. a.fillStyle = "#71aad6",
  10378. Q(0, 0, e.scale * .6, a)) : e.name == "blocker" ? (a.fillStyle = "#7e7f82",
  10379. Q(0, 0, e.scale, a),
  10380. a.fill(),
  10381. a.stroke(),
  10382. a.rotate(Math.PI / 4),
  10383. a.fillStyle = "#db6e6e",
  10384. En(0, 0, e.scale * .65, 20, 4, a, !0)) : e.name == "teleporter" && (a.fillStyle = "#7e7f82",
  10385. Q(0, 0, e.scale, a),
  10386. a.fill(),
  10387. a.stroke(),
  10388. a.rotate(Math.PI / 4),
  10389. a.fillStyle = "#d76edb",
  10390. Q(0, 0, e.scale * .5, a, !0));
  10391. i = c,
  10392. t || (Rr[e.id] = i)
  10393. }
  10394. return i
  10395. }
  10396. function Vf(e, t, i, s, n) {
  10397. const r = e + i * Math.cos(s)
  10398. , o = t + i * Math.sin(s)
  10399. , l = i * .4;
  10400. n.moveTo(e, t),
  10401. n.beginPath(),
  10402. n.quadraticCurveTo((e + r) / 2 + l * Math.cos(s + Math.PI / 2), (t + o) / 2 + l * Math.sin(s + Math.PI / 2), r, o),
  10403. n.quadraticCurveTo((e + r) / 2 - l * Math.cos(s + Math.PI / 2), (t + o) / 2 - l * Math.sin(s + Math.PI / 2), e, t),
  10404. n.closePath(),
  10405. n.fill(),
  10406. n.stroke()
  10407. }
  10408. function Q(e, t, i, s, n, r) {
  10409. s = s || M,
  10410. s.beginPath(),
  10411. s.arc(e, t, i, 0, 2 * Math.PI),
  10412. r || s.fill(),
  10413. n || s.stroke()
  10414. }
  10415. function Ie(e, t, i, s) {
  10416. let n = Math.PI / 2 * 3, r, o;
  10417. const l = Math.PI / t;
  10418. e.beginPath(),
  10419. e.moveTo(0, -i);
  10420. for (let c = 0; c < t; c++)
  10421. r = Math.cos(n) * i,
  10422. o = Math.sin(n) * i,
  10423. e.lineTo(r, o),
  10424. n += l,
  10425. r = Math.cos(n) * s,
  10426. o = Math.sin(n) * s,
  10427. e.lineTo(r, o),
  10428. n += l;
  10429. e.lineTo(0, -i),
  10430. e.closePath()
  10431. }
  10432. function kt(e, t, i, s, n, r) {
  10433. n.fillRect(e - i / 2, t - s / 2, i, s),
  10434. r || n.strokeRect(e - i / 2, t - s / 2, i, s)
  10435. }
  10436. function En(e, t, i, s, n, r, o) {
  10437. r.save(),
  10438. r.translate(e, t),
  10439. n = Math.ceil(n / 2);
  10440. for (let l = 0; l < n; l++)
  10441. kt(0, 0, i * 2, s, r, o),
  10442. r.rotate(Math.PI / n);
  10443. r.restore()
  10444. }
  10445. function Uf(e, t, i, s) {
  10446. let n = Math.PI / 2 * 3;
  10447. const r = Math.PI / t;
  10448. let o;
  10449. e.beginPath(),
  10450. e.moveTo(0, -s);
  10451. for (let l = 0; l < t; l++)
  10452. o = C.randInt(i + .9, i * 1.2),
  10453. e.quadraticCurveTo(Math.cos(n + r) * o, Math.sin(n + r) * o, Math.cos(n + r * 2) * s, Math.sin(n + r * 2) * s),
  10454. n += r * 2;
  10455. e.lineTo(0, -s),
  10456. e.closePath()
  10457. }
  10458. function Lf(e, t) {
  10459. t = t || M;
  10460. const i = e * (Math.sqrt(3) / 2);
  10461. t.beginPath(),
  10462. t.moveTo(0, -i / 2),
  10463. t.lineTo(-e / 2, i / 2),
  10464. t.lineTo(e / 2, i / 2),
  10465. t.lineTo(0, -i / 2),
  10466. t.fill(),
  10467. t.closePath()
  10468. }
  10469. function Nf() {
  10470. const e = T.mapScale / 2;
  10471. ue.add(0, e, e + 200, 0, T.treeScales[3], 0),
  10472. ue.add(1, e, e - 480, 0, T.treeScales[3], 0),
  10473. ue.add(2, e + 300, e + 450, 0, T.treeScales[3], 0),
  10474. ue.add(3, e - 950, e - 130, 0, T.treeScales[2], 0),
  10475. ue.add(4, e - 750, e - 400, 0, T.treeScales[3], 0),
  10476. ue.add(5, e - 700, e + 400, 0, T.treeScales[2], 0),
  10477. ue.add(6, e + 800, e - 200, 0, T.treeScales[3], 0),
  10478. ue.add(7, e - 260, e + 340, 0, T.bushScales[3], 1),
  10479. ue.add(8, e + 760, e + 310, 0, T.bushScales[3], 1),
  10480. ue.add(9, e - 800, e + 100, 0, T.bushScales[3], 1),
  10481. ue.add(10, e - 800, e + 300, 0, R.list[4].scale, R.list[4].id, R.list[10]),
  10482. ue.add(11, e + 650, e - 390, 0, R.list[4].scale, R.list[4].id, R.list[10]),
  10483. ue.add(12, e - 400, e - 450, 0, T.rockScales[2], 2)
  10484. }
  10485.  
  10486. function qf(e) {
  10487. for (let t = 0; t < e.length; )
  10488. ue.add(e[t], e[t + 1], e[t + 2], e[t + 3], e[t + 4], e[t + 5], R.list[e[t + 6]], !0, e[t + 7] >= 0 ? {
  10489. sid: e[t + 7]
  10490. } : null),
  10491. t += 8
  10492. }
  10493. function Wf(e, t) {
  10494. y = Ho(t),
  10495. y && (y.xWiggle += T.gatherWiggle * Math.cos(e),
  10496. y.yWiggle += T.gatherWiggle * Math.sin(e))
  10497. }
  10498. function Xf(e, t) {
  10499. y = Ho(e),
  10500. y && (y.dir = t,
  10501. y.xWiggle += T.gatherWiggle * Math.cos(t + Math.PI),
  10502. y.yWiggle += T.gatherWiggle * Math.sin(t + Math.PI))
  10503. }
  10504. function Gf(e, t, i, s, n, r, o, l) {
  10505. ds && (po.addProjectile(e, t, i, s, n, r, null, null, o).sid = l)
  10506. }
  10507. function Yf(e, t) {
  10508. for (let i = 0; i < Mt.length; ++i)
  10509. Mt[i].sid == e && (Mt[i].range = t)
  10510. }
  10511. function $f(e) {
  10512. y = zo(e),
  10513. y && y.startAnim()
  10514. }
  10515. function Kf(e) {
  10516.  
  10517. for (var t = 0; t < ye.length; ++t)
  10518. ye[t].forcePos = !ye[t].visible,
  10519. ye[t].visible = !1;
  10520. if (e) {
  10521. const i = Date.now();
  10522. for (var t = 0; t < e.length; )
  10523. y = zo(e[t]),
  10524. y ? (y.index = e[t + 1],
  10525. y.t1 = y.t2 === void 0 ? i : y.t2,
  10526. y.t2 = i,
  10527. y.x1 = y.x,
  10528. y.y1 = y.y,
  10529. y.x2 = e[t + 2],
  10530. y.y2 = e[t + 3],
  10531. y.d1 = y.d2 === void 0 ? e[t + 4] : y.d2,
  10532. y.d2 = e[t + 4],
  10533. y.health = e[t + 5],
  10534. y.dt = 0,
  10535. y.visible = !0) : (y = ar.spawn(e[t + 2], e[t + 3], e[t + 4], e[t + 1]),
  10536. y.x2 = y.x,
  10537. y.y2 = y.y,
  10538. y.d2 = y.dir,
  10539. y.health = e[t + 5],
  10540. ar.aiTypes[e[t + 1]].name || (y.name = T.cowNames[e[t + 6]]),
  10541. y.forcePos = !0,
  10542. y.sid = e[t],
  10543. y.visible = !0),
  10544. t += 7
  10545. }
  10546.  
  10547. }
  10548. const _r = {};
  10549. function Jf(e, t) {
  10550. const i = e.index;
  10551. let s = _r[i];
  10552. if (!s) {
  10553. const n = new Image;
  10554. n.onload = function() {
  10555. this.isLoaded = !0,
  10556. this.onload = null
  10557. }
  10558. ,
  10559. n.src = "./img/animals/" + e.src + ".png",
  10560. s = n,
  10561. _r[i] = s
  10562. }
  10563. if (s.isLoaded) {
  10564. const n = e.scale * 1.2 * (e.spriteMlt || 1);
  10565. t.drawImage(s, -n, -n, n * 2, n * 2)
  10566. }
  10567. }
  10568. function Bo(e, t, i) {
  10569. return e + i >= 0 && e - i <= se && t + i >= 0 && t - i <= re
  10570. }
  10571. function Qf(e, t) {
  10572. let i = nu(e[0]);
  10573. i || (i = new _c(e[0],e[1],T,C,po,ue,J,ye,R,Xt,Gt),
  10574. J.push(i)),
  10575. i.spawn(t ? xi : null),
  10576. i.visible = !1,
  10577. i.x2 = void 0,
  10578. i.y2 = void 0,
  10579. i.setData(e),
  10580. t && (E = i,
  10581. Re = E.x,
  10582. _e = E.y,
  10583. To(),
  10584. Do(),
  10585. Ro(),
  10586. Oo(0),
  10587. us.style.display = "block")
  10588. }
  10589. function Zf(e) {
  10590. for (let t = 0; t < J.length; t++)
  10591. if (J[t].id == e) {
  10592. J.splice(t, 1);
  10593. break
  10594. }
  10595. }
  10596. function eq(e, t) {
  10597. ee.send("c", 0, e, t)
  10598. }
  10599. var oninsta = false;
  10600. function INSTA() {
  10601. eq(0, 1);
  10602. setTimeout(()=>{
  10603. ee.send("G", E.weapons[0], 1);
  10604. oninsta = true;
  10605. eq(7, 0);
  10606. setTimeout(()=> {
  10607. ee.send("K", 1);
  10608. setTimeout(()=>{
  10609. eq(53, 0);
  10610. ee.send("G", E.weapons[1], 1);
  10611. setTimeout(()=>{
  10612. fastmode ? eq(12, 0) : eq(6, 0);
  10613. setTimeout(()=>{
  10614. eq(11, 1);
  10615. oninsta = false;
  10616. ee.send("K", 1);
  10617. }, 80);
  10618. }, 102);
  10619. },100);
  10620. }, 15);
  10621. }, 70);
  10622. }
  10623. function reverse() {
  10624. eq(0, 1);
  10625. setTimeout(()=>{
  10626. oninsta = true;
  10627. setTimeout(()=> {
  10628. eq(53, 0);
  10629. ee.send("G", E.weapons[1], 1);
  10630. setTimeout(()=>{
  10631. ee.send("K", 1);
  10632. setTimeout(()=>{
  10633. eq(7, 0);
  10634. setTimeout(()=>{
  10635. ee.send("G", E.weapons[0], 1);
  10636. setTimeout(()=>{
  10637. eq(6, 0);
  10638. ee.send("K", 1);
  10639. setTimeout(()=>{
  10640. eq(11, 1);
  10641. oninsta = false;
  10642. }, 80)
  10643. }, 100)
  10644. }, 4)
  10645. }, 92.1)
  10646. }, 10)
  10647. }, 10)
  10648. }, 80)
  10649. }
  10650.  
  10651. document.onkeyup = (e) => {
  10652. if(e.keyCode === 82) {
  10653. if (e.target.tagName.toLowerCase() !== 'input' && e.target.tagName.toLowerCase() !== 'textarea') {
  10654. if(document.getElementById("instatype").value == "Rev") {
  10655. reverse();
  10656. }else{
  10657. INSTA();
  10658. }
  10659. }
  10660. }
  10661. }
  10662. var isRightClicking = false;
  10663.  
  10664. window.addEventListener('contextmenu', function(event) {
  10665. event.preventDefault();
  10666. isRightClicking = true;
  10667. window.storeEquip(40);
  10668. });
  10669.  
  10670. window.addEventListener('mousedown', function(event) {
  10671. if (event.button === 2) {
  10672. isRightClicking = true;
  10673. window.storeEquip(40);
  10674. }
  10675. });
  10676.  
  10677. window.addEventListener('mouseup', function(event) {
  10678. if (isRightClicking) {
  10679. window.storeEquip(6);
  10680. setTimeout(()=>{
  10681. window.storeEquip(11, 1);
  10682. }, 79);
  10683. isRightClicking = false;
  10684. }
  10685. });
  10686.  
  10687.  
  10688. function jf(e, t) {
  10689. E && (E.itemCounts[e] = t)
  10690. }
  10691. function eu(e, t, i) {
  10692. E && (E[e] = t,
  10693. i && Do())
  10694. }
  10695. function place(sid = E.items[0], angle) {
  10696. let poop = E.weaponIndex
  10697. Yt(E.items['\x30'])
  10698. ee.send(decode($$c), 1)
  10699. ee.send(decode($$c), 0);
  10700. Yt(poop, !![]);
  10701.  
  10702. }
  10703. function tu(e, t) {
  10704. var y = _i(e);
  10705.  
  10706. if (y) {
  10707. y.health = t;
  10708.  
  10709. if (y === E) {
  10710. if (y.health < 41 || (y.skinIndex === 6 && y.health < 61)) {
  10711. place(E.items[0]);
  10712. empanti = true;
  10713. setTimeout(()=>{
  10714. eq(22, 0);
  10715. place(E.items[0]);
  10716. setTimeout(()=>{
  10717. empanti = false;
  10718. eq(13, 1);
  10719. setTimeout(()=>{
  10720. eq(6, 0);
  10721. setTimeout(()=>{
  10722. eq(11, 1);
  10723. }, 80);
  10724. }, 99.9);
  10725. }, 70);
  10726. setTimeout(()=>{
  10727. eq(6, 0);
  10728. setTimeout(()=>{
  10729. eq(11, 1);
  10730. }, 100);
  10731. }, 100);
  10732. }, 3);
  10733. } else if (y.health < 100) {
  10734. setTimeout(() => {
  10735. place(E.items[0]);
  10736. }, (window.pingTime < 60 ? 115 : 90));
  10737. }
  10738.  
  10739.  
  10740.  
  10741. }
  10742. }
  10743. }
  10744. function sync(_GlobalAlpha, chatmsg) {
  10745. if(_GlobalAlpha.chatMessage === chatmsg) {
  10746. INSTA();
  10747. }
  10748. setTimeout(()=>{
  10749. ee.send("6", chatmsg);
  10750. }, 50);
  10751. }
  10752. /*document.addEventListener('keydown', function(event) {
  10753. if (event.key === 'c') {
  10754. sync(E, "!<_globalAlphall1");
  10755. }
  10756. });
  10757. /*
  10758.  
  10759.  
  10760.  
  10761.  
  10762.  
  10763.  
  10764.  
  10765.  
  10766.  
  10767.  
  10768.  
  10769.  
  10770.  
  10771. */
  10772. var enemyNear = [];
  10773. var enemy = [];
  10774. function iu(e) {
  10775. enemyNear = [];
  10776. enemy = [];
  10777. const t = Date.now();
  10778. for (var i = 0; i < J.length; ++i)
  10779. J[i].forcePos = !J[i].visible,
  10780. J[i].visible = !1;
  10781. for (var i = 0; i < e.length; )
  10782. y = _i(e[i]),
  10783. y && (y.t1 = y.t2 === void 0 ? t : y.t2,
  10784. y.t2 = t,
  10785. y.x1 = y.x,
  10786. y.y1 = y.y,
  10787. y.x2 = e[i + 1],
  10788. y.y2 = e[i + 2],
  10789. y.d1 = y.d2 === void 0 ? e[i + 3] : y.d2,
  10790. y.d2 = e[i + 3],
  10791. y.dt = 0,
  10792. y.buildIndex = e[i + 4],
  10793. y.weaponIndex = e[i + 5],
  10794. y.weaponVariant = e[i + 6],
  10795. y.team = e[i + 7],
  10796. y.isLeader = e[i + 8],
  10797. y.skinIndex = e[i + 9],
  10798. y.tailIndex = e[i + 10],
  10799. y.iconIndex = e[i + 11],
  10800. y.zIndex = e[i + 12],
  10801. y.visible = !0,
  10802. !(y == E || E.team && y.team == E.team) ? enemyNear.push(E) : enemy.push(e.slice(i, i + 13))),
  10803. i += 13
  10804. }
  10805. function nu(e) {
  10806. for (let t = 0; t < J.length; ++t)
  10807. if (J[t].id == e)
  10808. return J[t];
  10809. return null
  10810. }
  10811. function _i(e) {
  10812. for (let t = 0; t < J.length; ++t)
  10813. if (J[t].sid == e)
  10814. return J[t];
  10815. return null
  10816. }
  10817. function zo(e) {
  10818. for (let t = 0; t < ye.length; ++t)
  10819. if (ye[t].sid == e)
  10820. return ye[t];
  10821. return null
  10822.  
  10823. }
  10824. function Ho(e) {
  10825. for (let t = 0; t < et.length; ++t)
  10826. if (et[t].sid == e)
  10827. return et[t];
  10828. return null
  10829. }
  10830. let Fo = -1;
  10831. function su() {
  10832. const e = Date.now() - Fo;
  10833. window.pingTime = e,
  10834. Qt.innerText = "Ping: " + e + " ms"
  10835. }
  10836. let Pn;
  10837. function Vo() {
  10838. Pn && clearTimeout(Pn),
  10839. cs() && (Fo = Date.now(),
  10840. ee.send("0")),
  10841. Pn = setTimeout(Vo, 2500)
  10842. }
  10843. function ru(e) {
  10844. if (e < 0)
  10845. return;
  10846. const t = Math.floor(e / 60);
  10847. let i = e % 60;
  10848. i = ("0" + i).slice(-2),
  10849. dr.innerText = "Server restarting in " + t + ":" + i,
  10850. dr.hidden = !1
  10851. }
  10852. window.requestAnimFrame = function() {
  10853. return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(e) {
  10854. window.setTimeout(e, 1e3 / 60)
  10855. }
  10856. }();
  10857. function Uo() {
  10858. It = Date.now(),
  10859. be = It - or,
  10860. or = It,
  10861. Of(),
  10862. requestAnimFrame(Uo)
  10863. }
  10864. Nf();
  10865. Uo();
  10866. function Lo(e) {
  10867. window.open(e, "_blank")
  10868. }
  10869. window.openLink = Lo;
  10870. window.aJoinReq = Gn;
  10871. window.follmoo = Bh;
  10872. window.kickFromClan = ko;
  10873. window.sendJoin = vo;
  10874. window.leaveAlliance = xo;
  10875. window.createAlliance = Yn;
  10876. window.storeBuy = bo;
  10877. window.storeEquip = Jn;
  10878. window.showItemInfo = Se;
  10879. window.selectSkinColor = mf;
  10880. window.changeStoreIndex = cf;
  10881. window.config = T;
  10882. })();