AE86

0 shame anti, op insta, autp replace..etc!

  1. // ==UserScript==
  2. // @name AE86
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.2
  5. // @match *://moomoo.io/*
  6. // @match *://*.moomoo.io/*
  7. // @description 0 shame anti, op insta, autp replace..etc!
  8. // @author Blacky / Someone / Khaled / L1nzer
  9. // @require https://code.jquery.com/jquery-3.3.1.slim.min.js
  10. // @require https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js
  11. // @require http://code.jquery.com/jquery-3.3.1.min.js
  12. // @require https://cdn.jsdelivr.net/npm/msgpack-lite@0.1.26/dist/msgpack.min.js
  13. // @require https://cdn.jsdelivr.net/npm/msgpack-lite@0.1.26/dist/msgpack.min.js
  14. // @require https://cdn.jsdelivr.net/npm/fontfaceobserver@2.1.0/fontfaceobserver.standalone.min.js
  15. // @grant none
  16. // @license MIT
  17. // ==/UserScript==
  18.  
  19. let newImg2 = document.createElement("img");
  20. newImg2.src = "https://wc.wallpaperuse.com/wallp/15-155534_s.jpg";
  21. newImg2.style = `position: absolute; top: 1px; left: 5px; width: 200px; height: 200px; margin: 60px auto 0 auto; cursor: pointer;`;
  22. document.body.prepend(newImg2);
  23.  
  24. var nearestEnemy;
  25. var nearestEnemyAngle;
  26. var enemiesNear;
  27.  
  28. var primary;
  29. var secondary;
  30. var foodType;
  31. var wallType;
  32. var spikeType;
  33. var millType;
  34. var mineType;
  35. var boostType;
  36. var turretType;
  37. var spawnpadType;
  38. var ws;
  39. var mechat = 0, teammateChat = 0;
  40. var syncSid = 0;
  41. var msgpack5 = msgpack;
  42. let myPlayer = {
  43. id: null,
  44. x: null,
  45. y: null,
  46. dir: null,
  47. object: null,
  48. weapon: null,
  49. clan: null,
  50. isLeader: null,
  51. hat: null,
  52. accessory: null,
  53. isSkull: null
  54. };
  55.  
  56. document.msgpack = msgpack;
  57. function n(){
  58. this.buffer = new Uint8Array([0]);
  59. this.buffer.__proto__ = new Uint8Array;
  60. this.type = 0;
  61. }
  62.  
  63. WebSocket.prototype.oldSend = WebSocket.prototype.send;
  64. WebSocket.prototype.send = function(m){
  65. if (!ws){
  66. document.ws = this;
  67.  
  68. ws = this;
  69. socketFound(this);
  70. }
  71. this.oldSend(m);
  72. };
  73.  
  74.  
  75. function socketFound(socket){
  76. socket.addEventListener('message', function(message){
  77. handleMessage(message);
  78. });
  79. }
  80.  
  81. function handleMessage(m){
  82. let temp = msgpack5.decode(new Uint8Array(m.data));
  83. let data;
  84. if(temp.length > 1) {
  85. data = [temp[0], ...temp[1]];
  86. if (data[1] instanceof Array){
  87. data = data;
  88. }
  89. } else {
  90. data = temp;
  91. }
  92. let item = data[0];
  93. if(!data) {return};
  94.  
  95. if (item == "1" && myPlayer.id == null){
  96. myPlayer.id = data[1];
  97. }
  98.  
  99. if (item == "33") {
  100. enemiesNear = [];
  101. for(let i = 0; i < data[1].length / 13; i++) {
  102. let playerInfo = data[1].slice(13*i, 13*i+13);
  103. if(playerInfo[0] == myPlayer.id) {
  104. myPlayer.x = playerInfo[1];
  105. myPlayer.y = playerInfo[2];
  106. myPlayer.dir = playerInfo[3];
  107. myPlayer.object = playerInfo[4];
  108. myPlayer.weapon = playerInfo[5];
  109. myPlayer.clan = playerInfo[7];
  110. myPlayer.isLeader = playerInfo[8];
  111. myPlayer.hat = playerInfo[9];
  112. myPlayer.accessory = playerInfo[10];
  113. myPlayer.isSkull = playerInfo[11];
  114. } else if(playerInfo[7] != myPlayer.clan || playerInfo[7] === null) {
  115. enemiesNear.push(playerInfo);
  116. }
  117. }
  118. }
  119.  
  120. if(enemiesNear) {
  121. nearestEnemy = enemiesNear.sort((a,b) => dist(a, myPlayer) - dist(b, myPlayer))[0];
  122. }
  123.  
  124. if(nearestEnemy) {
  125. nearestEnemyAngle = Math.atan2(nearestEnemy[2]-myPlayer.y, nearestEnemy[1]-myPlayer.x);
  126. }
  127. if(item == "18" && dist(nearestEnemy, myPlayer) > 250){/*
  128. if(data[3] == Math.atan2(myPlayer.y-nearestEnemy[2], myPlayer.x-nearestEnemy[1])){*/
  129. if(data[6] == 0){
  130. plc(millType, nearestEnemyAngle)
  131. plc(foodType, null)
  132. plc(foodType, null)
  133. plc(foodType, null)
  134. }
  135. if(data[6] == 2){
  136. plc(millType, nearestEnemyAngle)
  137. plc(foodType, null)
  138. plc(foodType, null)
  139. plc(foodType, null)
  140. }
  141. if(data[6] == 5){
  142. plc(millType, nearestEnemyAngle)
  143. plc(foodType, null)
  144. plc(foodType, null)
  145. plc(foodType, null)
  146. }/*
  147. }*/
  148. }
  149. if(item == "9" && "kills" == data[1]){
  150. dns("ch", ["gg - autoGG Master Race"])
  151. }
  152. if(data[0] == "ch" && data[1] == myPlayer.id && data[2].startsWith('-syncop')) {
  153. mechat = 1;
  154. }
  155. if(data[0] == "ch" && data[1] == syncSid && data[2].startsWith('-syncop')) {
  156. teammatechat = 1;
  157. }
  158. update();
  159. }
  160.  
  161. function doNewSend(sender){
  162. ws.send(new Uint8Array(Array.from(msgpack5.encode(sender))));
  163. }
  164. function dns(a, b){
  165. doNewSend([a, b]);
  166. }
  167.  
  168. function acc(id) {
  169. dns("13c", [0, 0, 1])
  170. dns("13c", [0, id, 1])
  171. }
  172.  
  173. function hat(id) {
  174. dns("13c", [0, id, 0])
  175. }
  176. function ha(id, id2) {
  177. dns("13c", [0, 0, 1])
  178. dns("13c", [0, id2, 1])
  179. dns("13c", [0, id, 0])
  180. }
  181. function place(id, angle = Math.atan2(mouseY - height / 2, mouseX - width / 2)) {
  182. dns("5", [id, null])
  183. dns("c", [1, angle])
  184. dns("c", [0, angle])
  185. dns("5", [myPlayer.weapon, true])
  186. }
  187.  
  188. function isElementVisible(e) {
  189. return (e.offsetParent !== null);
  190. }
  191.  
  192.  
  193. function toRad(angle) {
  194. return angle * 0.01745329251;
  195. }
  196.  
  197. function dist(a, b){
  198. return Math.sqrt( Math.pow((b.y-a[2]), 2) + Math.pow((b.x-a[1]), 2) );
  199. }
  200.  
  201. function update() {
  202. for (let i=0;i<9;i++){
  203. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  204. primary = i;
  205. }
  206. }
  207.  
  208. for (let i=9;i<16;i++){
  209. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  210. secondary = i;
  211. }
  212. }
  213.  
  214. for (let i=16;i<19;i++){
  215. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  216. foodType = i - 16;
  217. }
  218. }
  219.  
  220. for (let i=19;i<22;i++){
  221. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  222. wallType = i - 16;
  223. }
  224. }
  225.  
  226. for (let i=22;i<26;i++){
  227. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  228. spikeType = i - 16;
  229. }
  230. }
  231.  
  232. for (let i=26;i<29;i++){
  233. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  234. millType = i - 16;
  235. }
  236. }
  237.  
  238. for (let i=29;i<31;i++){
  239. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  240. mineType = i - 16;
  241. }
  242. }
  243.  
  244. for (let i=31;i<33;i++){
  245. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  246. boostType = i - 16;
  247. }
  248. }
  249.  
  250. for (let i=33;i<39;i++){
  251. if (isElementVisible(document.getElementById("actionBarItem" + i.toString())) && i != 36){
  252. turretType = i - 16;
  253. }
  254. }
  255. spawnpadType = 36;
  256. for (let i=36;i<37;i++){
  257. if (isElementVisible(document.getElementById("actionBarItem" + i.toString()))){
  258. spawnpadType = i - 16;
  259. }
  260. }
  261. }
  262.  
  263. !function(e) {
  264. var t = {};
  265. function n(i) {
  266. if (t[i])
  267. return t[i].exports;
  268. var r = t[i] = {
  269. i: i,
  270. l: !1,
  271. exports: {}
  272. };
  273. return e[i].call(r.exports, r, r.exports, n),
  274. r.l = !0,
  275. r.exports
  276. }
  277. n.m = e,
  278. n.c = t,
  279. n.d = function(e, t, i) {
  280. n.o(e, t) || Object.defineProperty(e, t, {
  281. enumerable: !0,
  282. get: i
  283. })
  284. }
  285. ,
  286. n.r = function(e) {
  287. "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
  288. value: "Module"
  289. }),
  290. Object.defineProperty(e, "__esModule", {
  291. value: !0
  292. })
  293. }
  294. ,
  295. n.t = function(e, t) {
  296. if (1 & t && (e = n(e)),
  297. 8 & t)
  298. return e;
  299. if (4 & t && "object" == typeof e && e && e.__esModule)
  300. return e;
  301. var i = Object.create(null);
  302. if (n.r(i),
  303. Object.defineProperty(i, "default", {
  304. enumerable: !0,
  305. value: e
  306. }),
  307. 2 & t && "string" != typeof e)
  308. for (var r in e)
  309. n.d(i, r, function(t) {
  310. return e[t]
  311. }
  312. .bind(null, r));
  313. return i
  314. }
  315. ,
  316. n.n = function(e) {
  317. var t = e && e.__esModule ? function() {
  318. return e.default
  319. }
  320. : function() {
  321. return e
  322. }
  323. ;
  324. return n.d(t, "a", t),
  325. t
  326. }
  327. ,
  328. n.o = function(e, t) {
  329. return Object.prototype.hasOwnProperty.call(e, t)
  330. }
  331. ,
  332. n.p = "",
  333. n(n.s = 21)
  334. }([function(e, t, n) {
  335. var i = t.global = n(25)
  336. , r = t.hasBuffer = i && !!i.isBuffer
  337. , s = t.hasArrayBuffer = "undefined" != typeof ArrayBuffer
  338. , a = t.isArray = n(5);
  339. t.isArrayBuffer = s ? function(e) {
  340. return e instanceof ArrayBuffer || p(e)
  341. }
  342. : m;
  343. var o = t.isBuffer = r ? i.isBuffer : m
  344. , c = t.isView = s ? ArrayBuffer.isView || y("ArrayBuffer", "buffer") : m;
  345. t.alloc = d,
  346. t.concat = function(e, n) {
  347. n || (n = 0,
  348. Array.prototype.forEach.call(e, (function(e) {
  349. n += e.length
  350. }
  351. )));
  352. var i = this !== t && this || e[0]
  353. , r = d.call(i, n)
  354. , s = 0;
  355. return Array.prototype.forEach.call(e, (function(e) {
  356. s += f.copy.call(e, r, s)
  357. }
  358. )),
  359. r
  360. }
  361. ,
  362. t.from = function(e) {
  363. return "string" == typeof e ? function(e) {
  364. var t = 3 * e.length
  365. , n = d.call(this, t)
  366. , i = f.write.call(n, e);
  367. return t !== i && (n = f.slice.call(n, 0, i)),
  368. n
  369. }
  370. .call(this, e) : g(this).from(e)
  371. }
  372. ;
  373. var l = t.Array = n(28)
  374. , h = t.Buffer = n(29)
  375. , u = t.Uint8Array = n(30)
  376. , f = t.prototype = n(6);
  377. function d(e) {
  378. return g(this).alloc(e)
  379. }
  380. var p = y("ArrayBuffer");
  381. function g(e) {
  382. return o(e) ? h : c(e) ? u : a(e) ? l : r ? h : s ? u : l
  383. }
  384. function m() {
  385. return !1
  386. }
  387. function y(e, t) {
  388. return e = "[object " + e + "]",
  389. function(n) {
  390. return null != n && {}.toString.call(t ? n[t] : n) === e
  391. }
  392. }
  393. }
  394. , function(e, t, n) {
  395. var i = n(5);
  396. t.createCodec = o,
  397. t.install = function(e) {
  398. for (var t in e)
  399. s.prototype[t] = a(s.prototype[t], e[t])
  400. }
  401. ,
  402. t.filter = function(e) {
  403. return i(e) ? function(e) {
  404. return e = e.slice(),
  405. function(n) {
  406. return e.reduce(t, n)
  407. }
  408. ;
  409. function t(e, t) {
  410. return t(e)
  411. }
  412. }(e) : e
  413. }
  414. ;
  415. var r = n(0);
  416. function s(e) {
  417. if (!(this instanceof s))
  418. return new s(e);
  419. this.options = e,
  420. this.init()
  421. }
  422. function a(e, t) {
  423. return e && t ? function() {
  424. return e.apply(this, arguments),
  425. t.apply(this, arguments)
  426. }
  427. : e || t
  428. }
  429. function o(e) {
  430. return new s(e)
  431. }
  432. s.prototype.init = function() {
  433. var e = this.options;
  434. return e && e.uint8array && (this.bufferish = r.Uint8Array),
  435. this
  436. }
  437. ,
  438. t.preset = o({
  439. preset: !0
  440. })
  441. }
  442. , function(e, t, n) {
  443. var i = n(3).ExtBuffer
  444. , r = n(32)
  445. , s = n(33)
  446. , a = n(1);
  447. function o() {
  448. var e = this.options;
  449. return this.encode = function(e) {
  450. var t = s.getWriteType(e);
  451. return function(e, n) {
  452. var i = t[typeof n];
  453. if (!i)
  454. throw new Error('Unsupported type "' + typeof n + '": ' + n);
  455. i(e, n)
  456. }
  457. }(e),
  458. e && e.preset && r.setExtPackers(this),
  459. this
  460. }
  461. a.install({
  462. addExtPacker: function(e, t, n) {
  463. n = a.filter(n);
  464. var r = t.name;
  465. r && "Object" !== r ? (this.extPackers || (this.extPackers = {}))[r] = s : (this.extEncoderList || (this.extEncoderList = [])).unshift([t, s]);
  466. function s(t) {
  467. return n && (t = n(t)),
  468. new i(t,e)
  469. }
  470. },
  471. getExtPacker: function(e) {
  472. var t = this.extPackers || (this.extPackers = {})
  473. , n = e.constructor
  474. , i = n && n.name && t[n.name];
  475. if (i)
  476. return i;
  477. for (var r = this.extEncoderList || (this.extEncoderList = []), s = r.length, a = 0; a < s; a++) {
  478. var o = r[a];
  479. if (n === o[0])
  480. return o[1]
  481. }
  482. },
  483. init: o
  484. }),
  485. t.preset = o.call(a.preset)
  486. }
  487. , function(e, t, n) {
  488. t.ExtBuffer = function e(t, n) {
  489. if (!(this instanceof e))
  490. return new e(t,n);
  491. this.buffer = i.from(t),
  492. this.type = n
  493. }
  494. ;
  495. var i = n(0)
  496. }
  497. , function(e, t) {
  498. t.read = function(e, t, n, i, r) {
  499. var s, a, o = 8 * r - i - 1, c = (1 << o) - 1, l = c >> 1, h = -7, u = n ? r - 1 : 0, f = n ? -1 : 1, d = e[t + u];
  500. for (u += f,
  501. s = d & (1 << -h) - 1,
  502. d >>= -h,
  503. h += o; h > 0; s = 256 * s + e[t + u],
  504. u += f,
  505. h -= 8)
  506. ;
  507. for (a = s & (1 << -h) - 1,
  508. s >>= -h,
  509. h += i; h > 0; a = 256 * a + e[t + u],
  510. u += f,
  511. h -= 8)
  512. ;
  513. if (0 === s)
  514. s = 1 - l;
  515. else {
  516. if (s === c)
  517. return a ? NaN : 1 / 0 * (d ? -1 : 1);
  518. a += Math.pow(2, i),
  519. s -= l
  520. }
  521. return (d ? -1 : 1) * a * Math.pow(2, s - i)
  522. }
  523. ,
  524. t.write = function(e, t, n, i, r, s) {
  525. var a, o, c, l = 8 * s - r - 1, h = (1 << l) - 1, u = h >> 1, f = 23 === r ? Math.pow(2, -24) - Math.pow(2, -77) : 0, d = i ? 0 : s - 1, p = i ? 1 : -1, g = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0;
  526. for (t = Math.abs(t),
  527. isNaN(t) || t === 1 / 0 ? (o = isNaN(t) ? 1 : 0,
  528. a = h) : (a = Math.floor(Math.log(t) / Math.LN2),
  529. t * (c = Math.pow(2, -a)) < 1 && (a--,
  530. c *= 2),
  531. (t += a + u >= 1 ? f / c : f * Math.pow(2, 1 - u)) * c >= 2 && (a++,
  532. c /= 2),
  533. a + u >= h ? (o = 0,
  534. a = h) : a + u >= 1 ? (o = (t * c - 1) * Math.pow(2, r),
  535. a += u) : (o = t * Math.pow(2, u - 1) * Math.pow(2, r),
  536. a = 0)); r >= 8; e[n + d] = 255 & o,
  537. d += p,
  538. o /= 256,
  539. r -= 8)
  540. ;
  541. for (a = a << r | o,
  542. l += r; l > 0; e[n + d] = 255 & a,
  543. d += p,
  544. a /= 256,
  545. l -= 8)
  546. ;
  547. e[n + d - p] |= 128 * g
  548. }
  549. }
  550. , function(e, t) {
  551. var n = {}.toString;
  552. e.exports = Array.isArray || function(e) {
  553. return "[object Array]" == n.call(e)
  554. }
  555. }
  556. , function(e, t, n) {
  557. var i = n(31);
  558. t.copy = c,
  559. t.slice = l,
  560. t.toString = function(e, t, n) {
  561. return (!a && r.isBuffer(this) ? this.toString : i.toString).apply(this, arguments)
  562. }
  563. ,
  564. t.write = function(e) {
  565. return function() {
  566. return (this[e] || i[e]).apply(this, arguments)
  567. }
  568. }("write");
  569. var r = n(0)
  570. , s = r.global
  571. , a = r.hasBuffer && "TYPED_ARRAY_SUPPORT"in s
  572. , o = a && !s.TYPED_ARRAY_SUPPORT;
  573. function c(e, t, n, s) {
  574. var a = r.isBuffer(this)
  575. , c = r.isBuffer(e);
  576. if (a && c)
  577. return this.copy(e, t, n, s);
  578. if (o || a || c || !r.isView(this) || !r.isView(e))
  579. return i.copy.call(this, e, t, n, s);
  580. var h = n || null != s ? l.call(this, n, s) : this;
  581. return e.set(h, t),
  582. h.length
  583. }
  584. function l(e, t) {
  585. var n = this.slice || !o && this.subarray;
  586. if (n)
  587. return n.call(this, e, t);
  588. var i = r.alloc.call(this, t - e);
  589. return c.call(this, i, 0, e, t),
  590. i
  591. }
  592. }
  593. , function(e, t, n) {
  594. (function(e) {
  595. !function(t) {
  596. var n, i = "undefined", r = i !== typeof e && e, s = i !== typeof Uint8Array && Uint8Array, a = i !== typeof ArrayBuffer && ArrayBuffer, o = [0, 0, 0, 0, 0, 0, 0, 0], c = Array.isArray || function(e) {
  597. return !!e && "[object Array]" == Object.prototype.toString.call(e)
  598. }
  599. , l = 4294967296;
  600. function h(e, c, h) {
  601. var b = c ? 0 : 4
  602. , x = c ? 4 : 0
  603. , S = c ? 0 : 3
  604. , T = c ? 1 : 2
  605. , I = c ? 2 : 1
  606. , E = c ? 3 : 0
  607. , M = c ? y : v
  608. , A = c ? k : w
  609. , P = O.prototype
  610. , B = "is" + e
  611. , C = "_" + B;
  612. return P.buffer = void 0,
  613. P.offset = 0,
  614. P[C] = !0,
  615. P.toNumber = R,
  616. P.toString = function(e) {
  617. var t = this.buffer
  618. , n = this.offset
  619. , i = _(t, n + b)
  620. , r = _(t, n + x)
  621. , s = ""
  622. , a = !h && 2147483648 & i;
  623. for (a && (i = ~i,
  624. r = l - r),
  625. e = e || 10; ; ) {
  626. var o = i % e * l + r;
  627. if (i = Math.floor(i / e),
  628. r = Math.floor(o / e),
  629. s = (o % e).toString(e) + s,
  630. !i && !r)
  631. break
  632. }
  633. return a && (s = "-" + s),
  634. s
  635. }
  636. ,
  637. P.toJSON = R,
  638. P.toArray = u,
  639. r && (P.toBuffer = f),
  640. s && (P.toArrayBuffer = d),
  641. O[B] = function(e) {
  642. return !(!e || !e[C])
  643. }
  644. ,
  645. t[e] = O,
  646. O;
  647. function O(e, t, r, c) {
  648. return this instanceof O ? function(e, t, r, c, h) {
  649. if (s && a && (t instanceof a && (t = new s(t)),
  650. c instanceof a && (c = new s(c))),
  651. t || r || c || n) {
  652. if (!p(t, r))
  653. h = r,
  654. c = t,
  655. r = 0,
  656. t = new (n || Array)(8);
  657. e.buffer = t,
  658. e.offset = r |= 0,
  659. i !== typeof c && ("string" == typeof c ? function(e, t, n, i) {
  660. var r = 0
  661. , s = n.length
  662. , a = 0
  663. , o = 0;
  664. "-" === n[0] && r++;
  665. for (var c = r; r < s; ) {
  666. var h = parseInt(n[r++], i);
  667. if (!(h >= 0))
  668. break;
  669. o = o * i + h,
  670. a = a * i + Math.floor(o / l),
  671. o %= l
  672. }
  673. c && (a = ~a,
  674. o ? o = l - o : a++),
  675. j(e, t + b, a),
  676. j(e, t + x, o)
  677. }(t, r, c, h || 10) : p(c, h) ? g(t, r, c, h) : "number" == typeof h ? (j(t, r + b, c),
  678. j(t, r + x, h)) : c > 0 ? M(t, r, c) : c < 0 ? A(t, r, c) : g(t, r, o, 0))
  679. } else
  680. e.buffer = m(o, 0)
  681. }(this, e, t, r, c) : new O(e,t,r,c)
  682. }
  683. function R() {
  684. var e = this.buffer
  685. , t = this.offset
  686. , n = _(e, t + b)
  687. , i = _(e, t + x);
  688. return h || (n |= 0),
  689. n ? n * l + i : i
  690. }
  691. function j(e, t, n) {
  692. e[t + E] = 255 & n,
  693. n >>= 8,
  694. e[t + I] = 255 & n,
  695. n >>= 8,
  696. e[t + T] = 255 & n,
  697. n >>= 8,
  698. e[t + S] = 255 & n
  699. }
  700. function _(e, t) {
  701. return 16777216 * e[t + S] + (e[t + T] << 16) + (e[t + I] << 8) + e[t + E]
  702. }
  703. }
  704. function u(e) {
  705. var t = this.buffer
  706. , i = this.offset;
  707. return n = null,
  708. !1 !== e && 0 === i && 8 === t.length && c(t) ? t : m(t, i)
  709. }
  710. function f(t) {
  711. var i = this.buffer
  712. , s = this.offset;
  713. if (n = r,
  714. !1 !== t && 0 === s && 8 === i.length && e.isBuffer(i))
  715. return i;
  716. var a = new r(8);
  717. return g(a, 0, i, s),
  718. a
  719. }
  720. function d(e) {
  721. var t = this.buffer
  722. , i = this.offset
  723. , r = t.buffer;
  724. if (n = s,
  725. !1 !== e && 0 === i && r instanceof a && 8 === r.byteLength)
  726. return r;
  727. var o = new s(8);
  728. return g(o, 0, t, i),
  729. o.buffer
  730. }
  731. function p(e, t) {
  732. var n = e && e.length;
  733. return t |= 0,
  734. n && t + 8 <= n && "string" != typeof e[t]
  735. }
  736. function g(e, t, n, i) {
  737. t |= 0,
  738. i |= 0;
  739. for (var r = 0; r < 8; r++)
  740. e[t++] = 255 & n[i++]
  741. }
  742. function m(e, t) {
  743. return Array.prototype.slice.call(e, t, t + 8)
  744. }
  745. function y(e, t, n) {
  746. for (var i = t + 8; i > t; )
  747. e[--i] = 255 & n,
  748. n /= 256
  749. }
  750. function k(e, t, n) {
  751. var i = t + 8;
  752. for (n++; i > t; )
  753. e[--i] = 255 & -n ^ 255,
  754. n /= 256
  755. }
  756. function v(e, t, n) {
  757. for (var i = t + 8; t < i; )
  758. e[t++] = 255 & n,
  759. n /= 256
  760. }
  761. function w(e, t, n) {
  762. var i = t + 8;
  763. for (n++; t < i; )
  764. e[t++] = 255 & -n ^ 255,
  765. n /= 256
  766. }
  767. h("Uint64BE", !0, !0),
  768. h("Int64BE", !0, !1),
  769. h("Uint64LE", !1, !0),
  770. h("Int64LE", !1, !1)
  771. }("string" != typeof t.nodeName ? t : this || {})
  772. }
  773. ).call(this, n(11).Buffer)
  774. }
  775. , function(e, t, n) {
  776. var i = n(3).ExtBuffer
  777. , r = n(35)
  778. , s = n(17).readUint8
  779. , a = n(36)
  780. , o = n(1);
  781. function c() {
  782. var e = this.options;
  783. return this.decode = function(e) {
  784. var t = a.getReadToken(e);
  785. return function(e) {
  786. var n = s(e)
  787. , i = t[n];
  788. if (!i)
  789. throw new Error("Invalid type: " + (n ? "0x" + n.toString(16) : n));
  790. return i(e)
  791. }
  792. }(e),
  793. e && e.preset && r.setExtUnpackers(this),
  794. this
  795. }
  796. o.install({
  797. addExtUnpacker: function(e, t) {
  798. (this.extUnpackers || (this.extUnpackers = []))[e] = o.filter(t)
  799. },
  800. getExtUnpacker: function(e) {
  801. return (this.extUnpackers || (this.extUnpackers = []))[e] || function(t) {
  802. return new i(t,e)
  803. }
  804. },
  805. init: c
  806. }),
  807. t.preset = c.call(o.preset)
  808. }
  809. , function(e, t, n) {
  810. t.encode = function(e, t) {
  811. var n = new i(t);
  812. return n.write(e),
  813. n.read()
  814. }
  815. ;
  816. var i = n(10).EncodeBuffer
  817. }
  818. , function(e, t, n) {
  819. t.EncodeBuffer = r;
  820. var i = n(2).preset;
  821. function r(e) {
  822. if (!(this instanceof r))
  823. return new r(e);
  824. if (e && (this.options = e,
  825. e.codec)) {
  826. var t = this.codec = e.codec;
  827. t.bufferish && (this.bufferish = t.bufferish)
  828. }
  829. }
  830. n(14).FlexEncoder.mixin(r.prototype),
  831. r.prototype.codec = i,
  832. r.prototype.write = function(e) {
  833. this.codec.encode(this, e)
  834. }
  835. }
  836. , function(e, t, n) {
  837. "use strict";
  838. (function(e) {
  839. /*!
  840. * The buffer module from node.js, for the browser.
  841. *
  842. * @author Feross Aboukhadijeh <http://feross.org>
  843. * @license MIT
  844. */
  845. var i = n(26)
  846. , r = n(4)
  847. , s = n(27);
  848. function a() {
  849. return c.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823
  850. }
  851. function o(e, t) {
  852. if (a() < t)
  853. throw new RangeError("Invalid typed array length");
  854. return c.TYPED_ARRAY_SUPPORT ? (e = new Uint8Array(t)).__proto__ = c.prototype : (null === e && (e = new c(t)),
  855. e.length = t),
  856. e
  857. }
  858. function c(e, t, n) {
  859. if (!(c.TYPED_ARRAY_SUPPORT || this instanceof c))
  860. return new c(e,t,n);
  861. if ("number" == typeof e) {
  862. if ("string" == typeof t)
  863. throw new Error("If encoding is specified then the first argument must be a string");
  864. return u(this, e)
  865. }
  866. return l(this, e, t, n)
  867. }
  868. function l(e, t, n, i) {
  869. if ("number" == typeof t)
  870. throw new TypeError('"value" argument must not be a number');
  871. return "undefined" != typeof ArrayBuffer && t instanceof ArrayBuffer ? function(e, t, n, i) {
  872. if (t.byteLength,
  873. n < 0 || t.byteLength < n)
  874. throw new RangeError("'offset' is out of bounds");
  875. if (t.byteLength < n + (i || 0))
  876. throw new RangeError("'length' is out of bounds");
  877. return t = void 0 === n && void 0 === i ? new Uint8Array(t) : void 0 === i ? new Uint8Array(t,n) : new Uint8Array(t,n,i),
  878. c.TYPED_ARRAY_SUPPORT ? (e = t).__proto__ = c.prototype : e = f(e, t),
  879. e
  880. }(e, t, n, i) : "string" == typeof t ? function(e, t, n) {
  881. if ("string" == typeof n && "" !== n || (n = "utf8"),
  882. !c.isEncoding(n))
  883. throw new TypeError('"encoding" must be a valid string encoding');
  884. var i = 0 | p(t, n)
  885. , r = (e = o(e, i)).write(t, n);
  886. return r !== i && (e = e.slice(0, r)),
  887. e
  888. }(e, t, n) : function(e, t) {
  889. if (c.isBuffer(t)) {
  890. var n = 0 | d(t.length);
  891. return 0 === (e = o(e, n)).length || t.copy(e, 0, 0, n),
  892. e
  893. }
  894. if (t) {
  895. if ("undefined" != typeof ArrayBuffer && t.buffer instanceof ArrayBuffer || "length"in t)
  896. return "number" != typeof t.length || function(e) {
  897. return e != e
  898. }(t.length) ? o(e, 0) : f(e, t);
  899. if ("Buffer" === t.type && s(t.data))
  900. return f(e, t.data)
  901. }
  902. throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")
  903. }(e, t)
  904. }
  905. function h(e) {
  906. if ("number" != typeof e)
  907. throw new TypeError('"size" argument must be a number');
  908. if (e < 0)
  909. throw new RangeError('"size" argument must not be negative')
  910. }
  911. function u(e, t) {
  912. if (h(t),
  913. e = o(e, t < 0 ? 0 : 0 | d(t)),
  914. !c.TYPED_ARRAY_SUPPORT)
  915. for (var n = 0; n < t; ++n)
  916. e[n] = 0;
  917. return e
  918. }
  919. function f(e, t) {
  920. var n = t.length < 0 ? 0 : 0 | d(t.length);
  921. e = o(e, n);
  922. for (var i = 0; i < n; i += 1)
  923. e[i] = 255 & t[i];
  924. return e
  925. }
  926. function d(e) {
  927. if (e >= a())
  928. throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + a().toString(16) + " bytes");
  929. return 0 | e
  930. }
  931. function p(e, t) {
  932. if (c.isBuffer(e))
  933. return e.length;
  934. if ("undefined" != typeof ArrayBuffer && "function" == typeof ArrayBuffer.isView && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer))
  935. return e.byteLength;
  936. "string" != typeof e && (e = "" + e);
  937. var n = e.length;
  938. if (0 === n)
  939. return 0;
  940. for (var i = !1; ; )
  941. switch (t) {
  942. case "ascii":
  943. case "latin1":
  944. case "binary":
  945. return n;
  946. case "utf8":
  947. case "utf-8":
  948. case void 0:
  949. return z(e).length;
  950. case "ucs2":
  951. case "ucs-2":
  952. case "utf16le":
  953. case "utf-16le":
  954. return 2 * n;
  955. case "hex":
  956. return n >>> 1;
  957. case "base64":
  958. return H(e).length;
  959. default:
  960. if (i)
  961. return z(e).length;
  962. t = ("" + t).toLowerCase(),
  963. i = !0
  964. }
  965. }
  966. function g(e, t, n) {
  967. var i = e[t];
  968. e[t] = e[n],
  969. e[n] = i
  970. }
  971. function m(e, t, n, i, r) {
  972. if (0 === e.length)
  973. return -1;
  974. if ("string" == typeof n ? (i = n,
  975. n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648),
  976. n = +n,
  977. isNaN(n) && (n = r ? 0 : e.length - 1),
  978. n < 0 && (n = e.length + n),
  979. n >= e.length) {
  980. if (r)
  981. return -1;
  982. n = e.length - 1
  983. } else if (n < 0) {
  984. if (!r)
  985. return -1;
  986. n = 0
  987. }
  988. if ("string" == typeof t && (t = c.from(t, i)),
  989. c.isBuffer(t))
  990. return 0 === t.length ? -1 : y(e, t, n, i, r);
  991. if ("number" == typeof t)
  992. return t &= 255,
  993. c.TYPED_ARRAY_SUPPORT && "function" == typeof Uint8Array.prototype.indexOf ? r ? Uint8Array.prototype.indexOf.call(e, t, n) : Uint8Array.prototype.lastIndexOf.call(e, t, n) : y(e, [t], n, i, r);
  994. throw new TypeError("val must be string, number or Buffer")
  995. }
  996. function y(e, t, n, i, r) {
  997. var s, a = 1, o = e.length, c = t.length;
  998. if (void 0 !== i && ("ucs2" === (i = String(i).toLowerCase()) || "ucs-2" === i || "utf16le" === i || "utf-16le" === i)) {
  999. if (e.length < 2 || t.length < 2)
  1000. return -1;
  1001. a = 2,
  1002. o /= 2,
  1003. c /= 2,
  1004. n /= 2
  1005. }
  1006. function l(e, t) {
  1007. return 1 === a ? e[t] : e.readUInt16BE(t * a)
  1008. }
  1009. if (r) {
  1010. var h = -1;
  1011. for (s = n; s < o; s++)
  1012. if (l(e, s) === l(t, -1 === h ? 0 : s - h)) {
  1013. if (-1 === h && (h = s),
  1014. s - h + 1 === c)
  1015. return h * a
  1016. } else
  1017. -1 !== h && (s -= s - h),
  1018. h = -1
  1019. } else
  1020. for (n + c > o && (n = o - c),
  1021. s = n; s >= 0; s--) {
  1022. for (var u = !0, f = 0; f < c; f++)
  1023. if (l(e, s + f) !== l(t, f)) {
  1024. u = !1;
  1025. break
  1026. }
  1027. if (u)
  1028. return s
  1029. }
  1030. return -1
  1031. }
  1032. function k(e, t, n, i) {
  1033. n = Number(n) || 0;
  1034. var r = e.length - n;
  1035. i ? (i = Number(i)) > r && (i = r) : i = r;
  1036. var s = t.length;
  1037. if (s % 2 != 0)
  1038. throw new TypeError("Invalid hex string");
  1039. i > s / 2 && (i = s / 2);
  1040. for (var a = 0; a < i; ++a) {
  1041. var o = parseInt(t.substr(2 * a, 2), 16);
  1042. if (isNaN(o))
  1043. return a;
  1044. e[n + a] = o
  1045. }
  1046. return a
  1047. }
  1048. function v(e, t, n, i) {
  1049. return V(z(t, e.length - n), e, n, i)
  1050. }
  1051. function w(e, t, n, i) {
  1052. return V(function(e) {
  1053. for (var t = [], n = 0; n < e.length; ++n)
  1054. t.push(255 & e.charCodeAt(n));
  1055. return t
  1056. }(t), e, n, i)
  1057. }
  1058. function b(e, t, n, i) {
  1059. return w(e, t, n, i)
  1060. }
  1061. function x(e, t, n, i) {
  1062. return V(H(t), e, n, i)
  1063. }
  1064. function S(e, t, n, i) {
  1065. return V(function(e, t) {
  1066. for (var n, i, r, s = [], a = 0; a < e.length && !((t -= 2) < 0); ++a)
  1067. i = (n = e.charCodeAt(a)) >> 8,
  1068. r = n % 256,
  1069. s.push(r),
  1070. s.push(i);
  1071. return s
  1072. }(t, e.length - n), e, n, i)
  1073. }
  1074. function T(e, t, n) {
  1075. return 0 === t && n === e.length ? i.fromByteArray(e) : i.fromByteArray(e.slice(t, n))
  1076. }
  1077. function I(e, t, n) {
  1078. n = Math.min(e.length, n);
  1079. for (var i = [], r = t; r < n; ) {
  1080. var s, a, o, c, l = e[r], h = null, u = l > 239 ? 4 : l > 223 ? 3 : l > 191 ? 2 : 1;
  1081. if (r + u <= n)
  1082. switch (u) {
  1083. case 1:
  1084. l < 128 && (h = l);
  1085. break;
  1086. case 2:
  1087. 128 == (192 & (s = e[r + 1])) && (c = (31 & l) << 6 | 63 & s) > 127 && (h = c);
  1088. break;
  1089. case 3:
  1090. s = e[r + 1],
  1091. a = e[r + 2],
  1092. 128 == (192 & s) && 128 == (192 & a) && (c = (15 & l) << 12 | (63 & s) << 6 | 63 & a) > 2047 && (c < 55296 || c > 57343) && (h = c);
  1093. break;
  1094. case 4:
  1095. s = e[r + 1],
  1096. a = e[r + 2],
  1097. o = e[r + 3],
  1098. 128 == (192 & s) && 128 == (192 & a) && 128 == (192 & o) && (c = (15 & l) << 18 | (63 & s) << 12 | (63 & a) << 6 | 63 & o) > 65535 && c < 1114112 && (h = c)
  1099. }
  1100. null === h ? (h = 65533,
  1101. u = 1) : h > 65535 && (h -= 65536,
  1102. i.push(h >>> 10 & 1023 | 55296),
  1103. h = 56320 | 1023 & h),
  1104. i.push(h),
  1105. r += u
  1106. }
  1107. return function(e) {
  1108. var t = e.length;
  1109. if (t <= E)
  1110. return String.fromCharCode.apply(String, e);
  1111. for (var n = "", i = 0; i < t; )
  1112. n += String.fromCharCode.apply(String, e.slice(i, i += E));
  1113. return n
  1114. }(i)
  1115. }
  1116. t.Buffer = c,
  1117. t.SlowBuffer = function(e) {
  1118. return +e != e && (e = 0),
  1119. c.alloc(+e)
  1120. }
  1121. ,
  1122. t.INSPECT_MAX_BYTES = 50,
  1123. c.TYPED_ARRAY_SUPPORT = void 0 !== e.TYPED_ARRAY_SUPPORT ? e.TYPED_ARRAY_SUPPORT : function() {
  1124. try {
  1125. var e = new Uint8Array(1);
  1126. return e.__proto__ = {
  1127. __proto__: Uint8Array.prototype,
  1128. foo: function() {
  1129. return 42
  1130. }
  1131. },
  1132. 42 === e.foo() && "function" == typeof e.subarray && 0 === e.subarray(1, 1).byteLength
  1133. } catch (e) {
  1134. return !1
  1135. }
  1136. }(),
  1137. t.kMaxLength = a(),
  1138. c.poolSize = 8192,
  1139. c._augment = function(e) {
  1140. return e.__proto__ = c.prototype,
  1141. e
  1142. }
  1143. ,
  1144. c.from = function(e, t, n) {
  1145. return l(null, e, t, n)
  1146. }
  1147. ,
  1148. c.TYPED_ARRAY_SUPPORT && (c.prototype.__proto__ = Uint8Array.prototype,
  1149. c.__proto__ = Uint8Array,
  1150. "undefined" != typeof Symbol && Symbol.species && c[Symbol.species] === c && Object.defineProperty(c, Symbol.species, {
  1151. value: null,
  1152. configurable: !0
  1153. })),
  1154. c.alloc = function(e, t, n) {
  1155. return function(e, t, n, i) {
  1156. return h(t),
  1157. t <= 0 ? o(e, t) : void 0 !== n ? "string" == typeof i ? o(e, t).fill(n, i) : o(e, t).fill(n) : o(e, t)
  1158. }(null, e, t, n)
  1159. }
  1160. ,
  1161. c.allocUnsafe = function(e) {
  1162. return u(null, e)
  1163. }
  1164. ,
  1165. c.allocUnsafeSlow = function(e) {
  1166. return u(null, e)
  1167. }
  1168. ,
  1169. c.isBuffer = function(e) {
  1170. return !(null == e || !e._isBuffer)
  1171. }
  1172. ,
  1173. c.compare = function(e, t) {
  1174. if (!c.isBuffer(e) || !c.isBuffer(t))
  1175. throw new TypeError("Arguments must be Buffers");
  1176. if (e === t)
  1177. return 0;
  1178. for (var n = e.length, i = t.length, r = 0, s = Math.min(n, i); r < s; ++r)
  1179. if (e[r] !== t[r]) {
  1180. n = e[r],
  1181. i = t[r];
  1182. break
  1183. }
  1184. return n < i ? -1 : i < n ? 1 : 0
  1185. }
  1186. ,
  1187. c.isEncoding = function(e) {
  1188. switch (String(e).toLowerCase()) {
  1189. case "hex":
  1190. case "utf8":
  1191. case "utf-8":
  1192. case "ascii":
  1193. case "latin1":
  1194. case "binary":
  1195. case "base64":
  1196. case "ucs2":
  1197. case "ucs-2":
  1198. case "utf16le":
  1199. case "utf-16le":
  1200. return !0;
  1201. default:
  1202. return !1
  1203. }
  1204. }
  1205. ,
  1206. c.concat = function(e, t) {
  1207. if (!s(e))
  1208. throw new TypeError('"list" argument must be an Array of Buffers');
  1209. if (0 === e.length)
  1210. return c.alloc(0);
  1211. var n;
  1212. if (void 0 === t)
  1213. for (t = 0,
  1214. n = 0; n < e.length; ++n)
  1215. t += e[n].length;
  1216. var i = c.allocUnsafe(t)
  1217. , r = 0;
  1218. for (n = 0; n < e.length; ++n) {
  1219. var a = e[n];
  1220. if (!c.isBuffer(a))
  1221. throw new TypeError('"list" argument must be an Array of Buffers');
  1222. a.copy(i, r),
  1223. r += a.length
  1224. }
  1225. return i
  1226. }
  1227. ,
  1228. c.byteLength = p,
  1229. c.prototype._isBuffer = !0,
  1230. c.prototype.swap16 = function() {
  1231. var e = this.length;
  1232. if (e % 2 != 0)
  1233. throw new RangeError("Buffer size must be a multiple of 16-bits");
  1234. for (var t = 0; t < e; t += 2)
  1235. g(this, t, t + 1);
  1236. return this
  1237. }
  1238. ,
  1239. c.prototype.swap32 = function() {
  1240. var e = this.length;
  1241. if (e % 4 != 0)
  1242. throw new RangeError("Buffer size must be a multiple of 32-bits");
  1243. for (var t = 0; t < e; t += 4)
  1244. g(this, t, t + 3),
  1245. g(this, t + 1, t + 2);
  1246. return this
  1247. }
  1248. ,
  1249. c.prototype.swap64 = function() {
  1250. var e = this.length;
  1251. if (e % 8 != 0)
  1252. throw new RangeError("Buffer size must be a multiple of 64-bits");
  1253. for (var t = 0; t < e; t += 8)
  1254. g(this, t, t + 7),
  1255. g(this, t + 1, t + 6),
  1256. g(this, t + 2, t + 5),
  1257. g(this, t + 3, t + 4);
  1258. return this
  1259. }
  1260. ,
  1261. c.prototype.toString = function() {
  1262. var e = 0 | this.length;
  1263. return 0 === e ? "" : 0 === arguments.length ? I(this, 0, e) : function(e, t, n) {
  1264. var i = !1;
  1265. if ((void 0 === t || t < 0) && (t = 0),
  1266. t > this.length)
  1267. return "";
  1268. if ((void 0 === n || n > this.length) && (n = this.length),
  1269. n <= 0)
  1270. return "";
  1271. if ((n >>>= 0) <= (t >>>= 0))
  1272. return "";
  1273. for (e || (e = "utf8"); ; )
  1274. switch (e) {
  1275. case "hex":
  1276. return P(this, t, n);
  1277. case "utf8":
  1278. case "utf-8":
  1279. return I(this, t, n);
  1280. case "ascii":
  1281. return M(this, t, n);
  1282. case "latin1":
  1283. case "binary":
  1284. return A(this, t, n);
  1285. case "base64":
  1286. return T(this, t, n);
  1287. case "ucs2":
  1288. case "ucs-2":
  1289. case "utf16le":
  1290. case "utf-16le":
  1291. return B(this, t, n);
  1292. default:
  1293. if (i)
  1294. throw new TypeError("Unknown encoding: " + e);
  1295. e = (e + "").toLowerCase(),
  1296. i = !0
  1297. }
  1298. }
  1299. .apply(this, arguments)
  1300. }
  1301. ,
  1302. c.prototype.equals = function(e) {
  1303. if (!c.isBuffer(e))
  1304. throw new TypeError("Argument must be a Buffer");
  1305. return this === e || 0 === c.compare(this, e)
  1306. }
  1307. ,
  1308. c.prototype.inspect = function() {
  1309. var e = ""
  1310. , n = t.INSPECT_MAX_BYTES;
  1311. return this.length > 0 && (e = this.toString("hex", 0, n).match(/.{2}/g).join(" "),
  1312. this.length > n && (e += " ... ")),
  1313. "<Buffer " + e + ">"
  1314. }
  1315. ,
  1316. c.prototype.compare = function(e, t, n, i, r) {
  1317. if (!c.isBuffer(e))
  1318. throw new TypeError("Argument must be a Buffer");
  1319. if (void 0 === t && (t = 0),
  1320. void 0 === n && (n = e ? e.length : 0),
  1321. void 0 === i && (i = 0),
  1322. void 0 === r && (r = this.length),
  1323. t < 0 || n > e.length || i < 0 || r > this.length)
  1324. throw new RangeError("out of range index");
  1325. if (i >= r && t >= n)
  1326. return 0;
  1327. if (i >= r)
  1328. return -1;
  1329. if (t >= n)
  1330. return 1;
  1331. if (this === e)
  1332. return 0;
  1333. for (var s = (r >>>= 0) - (i >>>= 0), a = (n >>>= 0) - (t >>>= 0), o = Math.min(s, a), l = this.slice(i, r), h = e.slice(t, n), u = 0; u < o; ++u)
  1334. if (l[u] !== h[u]) {
  1335. s = l[u],
  1336. a = h[u];
  1337. break
  1338. }
  1339. return s < a ? -1 : a < s ? 1 : 0
  1340. }
  1341. ,
  1342. c.prototype.includes = function(e, t, n) {
  1343. return -1 !== this.indexOf(e, t, n)
  1344. }
  1345. ,
  1346. c.prototype.indexOf = function(e, t, n) {
  1347. return m(this, e, t, n, !0)
  1348. }
  1349. ,
  1350. c.prototype.lastIndexOf = function(e, t, n) {
  1351. return m(this, e, t, n, !1)
  1352. }
  1353. ,
  1354. c.prototype.write = function(e, t, n, i) {
  1355. if (void 0 === t)
  1356. i = "utf8",
  1357. n = this.length,
  1358. t = 0;
  1359. else if (void 0 === n && "string" == typeof t)
  1360. i = t,
  1361. n = this.length,
  1362. t = 0;
  1363. else {
  1364. if (!isFinite(t))
  1365. throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
  1366. t |= 0,
  1367. isFinite(n) ? (n |= 0,
  1368. void 0 === i && (i = "utf8")) : (i = n,
  1369. n = void 0)
  1370. }
  1371. var r = this.length - t;
  1372. if ((void 0 === n || n > r) && (n = r),
  1373. e.length > 0 && (n < 0 || t < 0) || t > this.length)
  1374. throw new RangeError("Attempt to write outside buffer bounds");
  1375. i || (i = "utf8");
  1376. for (var s = !1; ; )
  1377. switch (i) {
  1378. case "hex":
  1379. return k(this, e, t, n);
  1380. case "utf8":
  1381. case "utf-8":
  1382. return v(this, e, t, n);
  1383. case "ascii":
  1384. return w(this, e, t, n);
  1385. case "latin1":
  1386. case "binary":
  1387. return b(this, e, t, n);
  1388. case "base64":
  1389. return x(this, e, t, n);
  1390. case "ucs2":
  1391. case "ucs-2":
  1392. case "utf16le":
  1393. case "utf-16le":
  1394. return S(this, e, t, n);
  1395. default:
  1396. if (s)
  1397. throw new TypeError("Unknown encoding: " + i);
  1398. i = ("" + i).toLowerCase(),
  1399. s = !0
  1400. }
  1401. }
  1402. ,
  1403. c.prototype.toJSON = function() {
  1404. return {
  1405. type: "Buffer",
  1406. data: Array.prototype.slice.call(this._arr || this, 0)
  1407. }
  1408. }
  1409. ;
  1410. var E = 4096;
  1411. function M(e, t, n) {
  1412. var i = "";
  1413. n = Math.min(e.length, n);
  1414. for (var r = t; r < n; ++r)
  1415. i += String.fromCharCode(127 & e[r]);
  1416. return i
  1417. }
  1418. function A(e, t, n) {
  1419. var i = "";
  1420. n = Math.min(e.length, n);
  1421. for (var r = t; r < n; ++r)
  1422. i += String.fromCharCode(e[r]);
  1423. return i
  1424. }
  1425. function P(e, t, n) {
  1426. var i = e.length;
  1427. (!t || t < 0) && (t = 0),
  1428. (!n || n < 0 || n > i) && (n = i);
  1429. for (var r = "", s = t; s < n; ++s)
  1430. r += F(e[s]);
  1431. return r
  1432. }
  1433. function B(e, t, n) {
  1434. for (var i = e.slice(t, n), r = "", s = 0; s < i.length; s += 2)
  1435. r += String.fromCharCode(i[s] + 256 * i[s + 1]);
  1436. return r
  1437. }
  1438. function C(e, t, n) {
  1439. if (e % 1 != 0 || e < 0)
  1440. throw new RangeError("offset is not uint");
  1441. if (e + t > n)
  1442. throw new RangeError("Trying to access beyond buffer length")
  1443. }
  1444. function O(e, t, n, i, r, s) {
  1445. if (!c.isBuffer(e))
  1446. throw new TypeError('"buffer" argument must be a Buffer instance');
  1447. if (t > r || t < s)
  1448. throw new RangeError('"value" argument is out of bounds');
  1449. if (n + i > e.length)
  1450. throw new RangeError("Index out of range")
  1451. }
  1452. function R(e, t, n, i) {
  1453. t < 0 && (t = 65535 + t + 1);
  1454. for (var r = 0, s = Math.min(e.length - n, 2); r < s; ++r)
  1455. e[n + r] = (t & 255 << 8 * (i ? r : 1 - r)) >>> 8 * (i ? r : 1 - r)
  1456. }
  1457. function j(e, t, n, i) {
  1458. t < 0 && (t = 4294967295 + t + 1);
  1459. for (var r = 0, s = Math.min(e.length - n, 4); r < s; ++r)
  1460. e[n + r] = t >>> 8 * (i ? r : 3 - r) & 255
  1461. }
  1462. function _(e, t, n, i, r, s) {
  1463. if (n + i > e.length)
  1464. throw new RangeError("Index out of range");
  1465. if (n < 0)
  1466. throw new RangeError("Index out of range")
  1467. }
  1468. function U(e, t, n, i, s) {
  1469. return s || _(e, 0, n, 4),
  1470. r.write(e, t, n, i, 23, 4),
  1471. n + 4
  1472. }
  1473. function D(e, t, n, i, s) {
  1474. return s || _(e, 0, n, 8),
  1475. r.write(e, t, n, i, 52, 8),
  1476. n + 8
  1477. }
  1478. c.prototype.slice = function(e, t) {
  1479. var n, i = this.length;
  1480. if ((e = ~~e) < 0 ? (e += i) < 0 && (e = 0) : e > i && (e = i),
  1481. (t = void 0 === t ? i : ~~t) < 0 ? (t += i) < 0 && (t = 0) : t > i && (t = i),
  1482. t < e && (t = e),
  1483. c.TYPED_ARRAY_SUPPORT)
  1484. (n = this.subarray(e, t)).__proto__ = c.prototype;
  1485. else {
  1486. var r = t - e;
  1487. n = new c(r,void 0);
  1488. for (var s = 0; s < r; ++s)
  1489. n[s] = this[s + e]
  1490. }
  1491. return n
  1492. }
  1493. ,
  1494. c.prototype.readUIntLE = function(e, t, n) {
  1495. e |= 0,
  1496. t |= 0,
  1497. n || C(e, t, this.length);
  1498. for (var i = this[e], r = 1, s = 0; ++s < t && (r *= 256); )
  1499. i += this[e + s] * r;
  1500. return i
  1501. }
  1502. ,
  1503. c.prototype.readUIntBE = function(e, t, n) {
  1504. e |= 0,
  1505. t |= 0,
  1506. n || C(e, t, this.length);
  1507. for (var i = this[e + --t], r = 1; t > 0 && (r *= 256); )
  1508. i += this[e + --t] * r;
  1509. return i
  1510. }
  1511. ,
  1512. c.prototype.readUInt8 = function(e, t) {
  1513. return t || C(e, 1, this.length),
  1514. this[e]
  1515. }
  1516. ,
  1517. c.prototype.readUInt16LE = function(e, t) {
  1518. return t || C(e, 2, this.length),
  1519. this[e] | this[e + 1] << 8
  1520. }
  1521. ,
  1522. c.prototype.readUInt16BE = function(e, t) {
  1523. return t || C(e, 2, this.length),
  1524. this[e] << 8 | this[e + 1]
  1525. }
  1526. ,
  1527. c.prototype.readUInt32LE = function(e, t) {
  1528. return t || C(e, 4, this.length),
  1529. (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3]
  1530. }
  1531. ,
  1532. c.prototype.readUInt32BE = function(e, t) {
  1533. return t || C(e, 4, this.length),
  1534. 16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3])
  1535. }
  1536. ,
  1537. c.prototype.readIntLE = function(e, t, n) {
  1538. e |= 0,
  1539. t |= 0,
  1540. n || C(e, t, this.length);
  1541. for (var i = this[e], r = 1, s = 0; ++s < t && (r *= 256); )
  1542. i += this[e + s] * r;
  1543. return i >= (r *= 128) && (i -= Math.pow(2, 8 * t)),
  1544. i
  1545. }
  1546. ,
  1547. c.prototype.readIntBE = function(e, t, n) {
  1548. e |= 0,
  1549. t |= 0,
  1550. n || C(e, t, this.length);
  1551. for (var i = t, r = 1, s = this[e + --i]; i > 0 && (r *= 256); )
  1552. s += this[e + --i] * r;
  1553. return s >= (r *= 128) && (s -= Math.pow(2, 8 * t)),
  1554. s
  1555. }
  1556. ,
  1557. c.prototype.readInt8 = function(e, t) {
  1558. return t || C(e, 1, this.length),
  1559. 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e]
  1560. }
  1561. ,
  1562. c.prototype.readInt16LE = function(e, t) {
  1563. t || C(e, 2, this.length);
  1564. var n = this[e] | this[e + 1] << 8;
  1565. return 32768 & n ? 4294901760 | n : n
  1566. }
  1567. ,
  1568. c.prototype.readInt16BE = function(e, t) {
  1569. t || C(e, 2, this.length);
  1570. var n = this[e + 1] | this[e] << 8;
  1571. return 32768 & n ? 4294901760 | n : n
  1572. }
  1573. ,
  1574. c.prototype.readInt32LE = function(e, t) {
  1575. return t || C(e, 4, this.length),
  1576. this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24
  1577. }
  1578. ,
  1579. c.prototype.readInt32BE = function(e, t) {
  1580. return t || C(e, 4, this.length),
  1581. this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]
  1582. }
  1583. ,
  1584. c.prototype.readFloatLE = function(e, t) {
  1585. return t || C(e, 4, this.length),
  1586. r.read(this, e, !0, 23, 4)
  1587. }
  1588. ,
  1589. c.prototype.readFloatBE = function(e, t) {
  1590. return t || C(e, 4, this.length),
  1591. r.read(this, e, !1, 23, 4)
  1592. }
  1593. ,
  1594. c.prototype.readDoubleLE = function(e, t) {
  1595. return t || C(e, 8, this.length),
  1596. r.read(this, e, !0, 52, 8)
  1597. }
  1598. ,
  1599. c.prototype.readDoubleBE = function(e, t) {
  1600. return t || C(e, 8, this.length),
  1601. r.read(this, e, !1, 52, 8)
  1602. }
  1603. ,
  1604. c.prototype.writeUIntLE = function(e, t, n, i) {
  1605. e = +e,
  1606. t |= 0,
  1607. n |= 0,
  1608. i || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
  1609. var r = 1
  1610. , s = 0;
  1611. for (this[t] = 255 & e; ++s < n && (r *= 256); )
  1612. this[t + s] = e / r & 255;
  1613. return t + n
  1614. }
  1615. ,
  1616. c.prototype.writeUIntBE = function(e, t, n, i) {
  1617. e = +e,
  1618. t |= 0,
  1619. n |= 0,
  1620. i || O(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
  1621. var r = n - 1
  1622. , s = 1;
  1623. for (this[t + r] = 255 & e; --r >= 0 && (s *= 256); )
  1624. this[t + r] = e / s & 255;
  1625. return t + n
  1626. }
  1627. ,
  1628. c.prototype.writeUInt8 = function(e, t, n) {
  1629. return e = +e,
  1630. t |= 0,
  1631. n || O(this, e, t, 1, 255, 0),
  1632. c.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)),
  1633. this[t] = 255 & e,
  1634. t + 1
  1635. }
  1636. ,
  1637. c.prototype.writeUInt16LE = function(e, t, n) {
  1638. return e = +e,
  1639. t |= 0,
  1640. n || O(this, e, t, 2, 65535, 0),
  1641. c.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e,
  1642. this[t + 1] = e >>> 8) : R(this, e, t, !0),
  1643. t + 2
  1644. }
  1645. ,
  1646. c.prototype.writeUInt16BE = function(e, t, n) {
  1647. return e = +e,
  1648. t |= 0,
  1649. n || O(this, e, t, 2, 65535, 0),
  1650. c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8,
  1651. this[t + 1] = 255 & e) : R(this, e, t, !1),
  1652. t + 2
  1653. }
  1654. ,
  1655. c.prototype.writeUInt32LE = function(e, t, n) {
  1656. return e = +e,
  1657. t |= 0,
  1658. n || O(this, e, t, 4, 4294967295, 0),
  1659. c.TYPED_ARRAY_SUPPORT ? (this[t + 3] = e >>> 24,
  1660. this[t + 2] = e >>> 16,
  1661. this[t + 1] = e >>> 8,
  1662. this[t] = 255 & e) : j(this, e, t, !0),
  1663. t + 4
  1664. }
  1665. ,
  1666. c.prototype.writeUInt32BE = function(e, t, n) {
  1667. return e = +e,
  1668. t |= 0,
  1669. n || O(this, e, t, 4, 4294967295, 0),
  1670. c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24,
  1671. this[t + 1] = e >>> 16,
  1672. this[t + 2] = e >>> 8,
  1673. this[t + 3] = 255 & e) : j(this, e, t, !1),
  1674. t + 4
  1675. }
  1676. ,
  1677. c.prototype.writeIntLE = function(e, t, n, i) {
  1678. if (e = +e,
  1679. t |= 0,
  1680. !i) {
  1681. var r = Math.pow(2, 8 * n - 1);
  1682. O(this, e, t, n, r - 1, -r)
  1683. }
  1684. var s = 0
  1685. , a = 1
  1686. , o = 0;
  1687. for (this[t] = 255 & e; ++s < n && (a *= 256); )
  1688. e < 0 && 0 === o && 0 !== this[t + s - 1] && (o = 1),
  1689. this[t + s] = (e / a >> 0) - o & 255;
  1690. return t + n
  1691. }
  1692. ,
  1693. c.prototype.writeIntBE = function(e, t, n, i) {
  1694. if (e = +e,
  1695. t |= 0,
  1696. !i) {
  1697. var r = Math.pow(2, 8 * n - 1);
  1698. O(this, e, t, n, r - 1, -r)
  1699. }
  1700. var s = n - 1
  1701. , a = 1
  1702. , o = 0;
  1703. for (this[t + s] = 255 & e; --s >= 0 && (a *= 256); )
  1704. e < 0 && 0 === o && 0 !== this[t + s + 1] && (o = 1),
  1705. this[t + s] = (e / a >> 0) - o & 255;
  1706. return t + n
  1707. }
  1708. ,
  1709. c.prototype.writeInt8 = function(e, t, n) {
  1710. return e = +e,
  1711. t |= 0,
  1712. n || O(this, e, t, 1, 127, -128),
  1713. c.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)),
  1714. e < 0 && (e = 255 + e + 1),
  1715. this[t] = 255 & e,
  1716. t + 1
  1717. }
  1718. ,
  1719. c.prototype.writeInt16LE = function(e, t, n) {
  1720. return e = +e,
  1721. t |= 0,
  1722. n || O(this, e, t, 2, 32767, -32768),
  1723. c.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e,
  1724. this[t + 1] = e >>> 8) : R(this, e, t, !0),
  1725. t + 2
  1726. }
  1727. ,
  1728. c.prototype.writeInt16BE = function(e, t, n) {
  1729. return e = +e,
  1730. t |= 0,
  1731. n || O(this, e, t, 2, 32767, -32768),
  1732. c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8,
  1733. this[t + 1] = 255 & e) : R(this, e, t, !1),
  1734. t + 2
  1735. }
  1736. ,
  1737. c.prototype.writeInt32LE = function(e, t, n) {
  1738. return e = +e,
  1739. t |= 0,
  1740. n || O(this, e, t, 4, 2147483647, -2147483648),
  1741. c.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e,
  1742. this[t + 1] = e >>> 8,
  1743. this[t + 2] = e >>> 16,
  1744. this[t + 3] = e >>> 24) : j(this, e, t, !0),
  1745. t + 4
  1746. }
  1747. ,
  1748. c.prototype.writeInt32BE = function(e, t, n) {
  1749. return e = +e,
  1750. t |= 0,
  1751. n || O(this, e, t, 4, 2147483647, -2147483648),
  1752. e < 0 && (e = 4294967295 + e + 1),
  1753. c.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24,
  1754. this[t + 1] = e >>> 16,
  1755. this[t + 2] = e >>> 8,
  1756. this[t + 3] = 255 & e) : j(this, e, t, !1),
  1757. t + 4
  1758. }
  1759. ,
  1760. c.prototype.writeFloatLE = function(e, t, n) {
  1761. return U(this, e, t, !0, n)
  1762. }
  1763. ,
  1764. c.prototype.writeFloatBE = function(e, t, n) {
  1765. return U(this, e, t, !1, n)
  1766. }
  1767. ,
  1768. c.prototype.writeDoubleLE = function(e, t, n) {
  1769. return D(this, e, t, !0, n)
  1770. }
  1771. ,
  1772. c.prototype.writeDoubleBE = function(e, t, n) {
  1773. return D(this, e, t, !1, n)
  1774. }
  1775. ,
  1776. c.prototype.copy = function(e, t, n, i) {
  1777. if (n || (n = 0),
  1778. i || 0 === i || (i = this.length),
  1779. t >= e.length && (t = e.length),
  1780. t || (t = 0),
  1781. i > 0 && i < n && (i = n),
  1782. i === n)
  1783. return 0;
  1784. if (0 === e.length || 0 === this.length)
  1785. return 0;
  1786. if (t < 0)
  1787. throw new RangeError("targetStart out of bounds");
  1788. if (n < 0 || n >= this.length)
  1789. throw new RangeError("sourceStart out of bounds");
  1790. if (i < 0)
  1791. throw new RangeError("sourceEnd out of bounds");
  1792. i > this.length && (i = this.length),
  1793. e.length - t < i - n && (i = e.length - t + n);
  1794. var r, s = i - n;
  1795. if (this === e && n < t && t < i)
  1796. for (r = s - 1; r >= 0; --r)
  1797. e[r + t] = this[r + n];
  1798. else if (s < 1e3 || !c.TYPED_ARRAY_SUPPORT)
  1799. for (r = 0; r < s; ++r)
  1800. e[r + t] = this[r + n];
  1801. else
  1802. Uint8Array.prototype.set.call(e, this.subarray(n, n + s), t);
  1803. return s
  1804. }
  1805. ,
  1806. c.prototype.fill = function(e, t, n, i) {
  1807. if ("string" == typeof e) {
  1808. if ("string" == typeof t ? (i = t,
  1809. t = 0,
  1810. n = this.length) : "string" == typeof n && (i = n,
  1811. n = this.length),
  1812. 1 === e.length) {
  1813. var r = e.charCodeAt(0);
  1814. r < 256 && (e = r)
  1815. }
  1816. if (void 0 !== i && "string" != typeof i)
  1817. throw new TypeError("encoding must be a string");
  1818. if ("string" == typeof i && !c.isEncoding(i))
  1819. throw new TypeError("Unknown encoding: " + i)
  1820. } else
  1821. "number" == typeof e && (e &= 255);
  1822. if (t < 0 || this.length < t || this.length < n)
  1823. throw new RangeError("Out of range index");
  1824. if (n <= t)
  1825. return this;
  1826. var s;
  1827. if (t >>>= 0,
  1828. n = void 0 === n ? this.length : n >>> 0,
  1829. e || (e = 0),
  1830. "number" == typeof e)
  1831. for (s = t; s < n; ++s)
  1832. this[s] = e;
  1833. else {
  1834. var a = c.isBuffer(e) ? e : z(new c(e,i).toString())
  1835. , o = a.length;
  1836. for (s = 0; s < n - t; ++s)
  1837. this[s + t] = a[s % o]
  1838. }
  1839. return this
  1840. }
  1841. ;
  1842. var L = /[^+\/0-9A-Za-z-_]/g;
  1843. function F(e) {
  1844. return e < 16 ? "0" + e.toString(16) : e.toString(16)
  1845. }
  1846. function z(e, t) {
  1847. var n;
  1848. t = t || 1 / 0;
  1849. for (var i = e.length, r = null, s = [], a = 0; a < i; ++a) {
  1850. if ((n = e.charCodeAt(a)) > 55295 && n < 57344) {
  1851. if (!r) {
  1852. if (n > 56319) {
  1853. (t -= 3) > -1 && s.push(239, 191, 189);
  1854. continue
  1855. }
  1856. if (a + 1 === i) {
  1857. (t -= 3) > -1 && s.push(239, 191, 189);
  1858. continue
  1859. }
  1860. r = n;
  1861. continue
  1862. }
  1863. if (n < 56320) {
  1864. (t -= 3) > -1 && s.push(239, 191, 189),
  1865. r = n;
  1866. continue
  1867. }
  1868. n = 65536 + (r - 55296 << 10 | n - 56320)
  1869. } else
  1870. r && (t -= 3) > -1 && s.push(239, 191, 189);
  1871. if (r = null,
  1872. n < 128) {
  1873. if ((t -= 1) < 0)
  1874. break;
  1875. s.push(n)
  1876. } else if (n < 2048) {
  1877. if ((t -= 2) < 0)
  1878. break;
  1879. s.push(n >> 6 | 192, 63 & n | 128)
  1880. } else if (n < 65536) {
  1881. if ((t -= 3) < 0)
  1882. break;
  1883. s.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128)
  1884. } else {
  1885. if (!(n < 1114112))
  1886. throw new Error("Invalid code point");
  1887. if ((t -= 4) < 0)
  1888. break;
  1889. s.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n | 128)
  1890. }
  1891. }
  1892. return s
  1893. }
  1894. function H(e) {
  1895. return i.toByteArray(function(e) {
  1896. if ((e = function(e) {
  1897. return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "")
  1898. }(e).replace(L, "")).length < 2)
  1899. return "";
  1900. for (; e.length % 4 != 0; )
  1901. e += "=";
  1902. return e
  1903. }(e))
  1904. }
  1905. function V(e, t, n, i) {
  1906. for (var r = 0; r < i && !(r + n >= t.length || r >= e.length); ++r)
  1907. t[r + n] = e[r];
  1908. return r
  1909. }
  1910. }
  1911. ).call(this, n(12))
  1912. }
  1913. , function(e, t) {
  1914. var n;
  1915. n = function() {
  1916. return this
  1917. }();
  1918. try {
  1919. n = n || new Function("return this")()
  1920. } catch (e) {
  1921. "object" == typeof window && (n = window)
  1922. }
  1923. e.exports = n
  1924. }
  1925. , function(e, t) {
  1926. for (var n = t.uint8 = new Array(256), i = 0; i <= 255; i++)
  1927. n[i] = r(i);
  1928. function r(e) {
  1929. return function(t) {
  1930. var n = t.reserve(1);
  1931. t.buffer[n] = e
  1932. }
  1933. }
  1934. }
  1935. , function(e, t, n) {
  1936. t.FlexDecoder = s,
  1937. t.FlexEncoder = a;
  1938. var i = n(0)
  1939. , r = "BUFFER_SHORTAGE";
  1940. function s() {
  1941. if (!(this instanceof s))
  1942. return new s
  1943. }
  1944. function a() {
  1945. if (!(this instanceof a))
  1946. return new a
  1947. }
  1948. function o() {
  1949. throw new Error("method not implemented: write()")
  1950. }
  1951. function c() {
  1952. throw new Error("method not implemented: fetch()")
  1953. }
  1954. function l() {
  1955. return this.buffers && this.buffers.length ? (this.flush(),
  1956. this.pull()) : this.fetch()
  1957. }
  1958. function h(e) {
  1959. (this.buffers || (this.buffers = [])).push(e)
  1960. }
  1961. function u() {
  1962. return (this.buffers || (this.buffers = [])).shift()
  1963. }
  1964. function f(e) {
  1965. return function(t) {
  1966. for (var n in e)
  1967. t[n] = e[n];
  1968. return t
  1969. }
  1970. }
  1971. s.mixin = f({
  1972. bufferish: i,
  1973. write: function(e) {
  1974. var t = this.offset ? i.prototype.slice.call(this.buffer, this.offset) : this.buffer;
  1975. this.buffer = t ? e ? this.bufferish.concat([t, e]) : t : e,
  1976. this.offset = 0
  1977. },
  1978. fetch: c,
  1979. flush: function() {
  1980. for (; this.offset < this.buffer.length; ) {
  1981. var e, t = this.offset;
  1982. try {
  1983. e = this.fetch()
  1984. } catch (e) {
  1985. if (e && e.message != r)
  1986. throw e;
  1987. this.offset = t;
  1988. break
  1989. }
  1990. this.push(e)
  1991. }
  1992. },
  1993. push: h,
  1994. pull: u,
  1995. read: l,
  1996. reserve: function(e) {
  1997. var t = this.offset
  1998. , n = t + e;
  1999. if (n > this.buffer.length)
  2000. throw new Error(r);
  2001. return this.offset = n,
  2002. t
  2003. },
  2004. offset: 0
  2005. }),
  2006. s.mixin(s.prototype),
  2007. a.mixin = f({
  2008. bufferish: i,
  2009. write: o,
  2010. fetch: function() {
  2011. var e = this.start;
  2012. if (e < this.offset) {
  2013. var t = this.start = this.offset;
  2014. return i.prototype.slice.call(this.buffer, e, t)
  2015. }
  2016. },
  2017. flush: function() {
  2018. for (; this.start < this.offset; ) {
  2019. var e = this.fetch();
  2020. e && this.push(e)
  2021. }
  2022. },
  2023. push: h,
  2024. pull: function() {
  2025. var e = this.buffers || (this.buffers = [])
  2026. , t = e.length > 1 ? this.bufferish.concat(e) : e[0];
  2027. return e.length = 0,
  2028. t
  2029. },
  2030. read: l,
  2031. reserve: function(e) {
  2032. var t = 0 | e;
  2033. if (this.buffer) {
  2034. var n = this.buffer.length
  2035. , i = 0 | this.offset
  2036. , r = i + t;
  2037. if (r < n)
  2038. return this.offset = r,
  2039. i;
  2040. this.flush(),
  2041. e = Math.max(e, Math.min(2 * n, this.maxBufferSize))
  2042. }
  2043. return e = Math.max(e, this.minBufferSize),
  2044. this.buffer = this.bufferish.alloc(e),
  2045. this.start = 0,
  2046. this.offset = t,
  2047. 0
  2048. },
  2049. send: function(e) {
  2050. var t = e.length;
  2051. if (t > this.minBufferSize)
  2052. this.flush(),
  2053. this.push(e);
  2054. else {
  2055. var n = this.reserve(t);
  2056. i.prototype.copy.call(e, this.buffer, n)
  2057. }
  2058. },
  2059. maxBufferSize: 65536,
  2060. minBufferSize: 2048,
  2061. offset: 0,
  2062. start: 0
  2063. }),
  2064. a.mixin(a.prototype)
  2065. }
  2066. , function(e, t, n) {
  2067. t.decode = function(e, t) {
  2068. var n = new i(t);
  2069. return n.write(e),
  2070. n.read()
  2071. }
  2072. ;
  2073. var i = n(16).DecodeBuffer
  2074. }
  2075. , function(e, t, n) {
  2076. t.DecodeBuffer = r;
  2077. var i = n(8).preset;
  2078. function r(e) {
  2079. if (!(this instanceof r))
  2080. return new r(e);
  2081. if (e && (this.options = e,
  2082. e.codec)) {
  2083. var t = this.codec = e.codec;
  2084. t.bufferish && (this.bufferish = t.bufferish)
  2085. }
  2086. }
  2087. n(14).FlexDecoder.mixin(r.prototype),
  2088. r.prototype.codec = i,
  2089. r.prototype.fetch = function() {
  2090. return this.codec.decode(this)
  2091. }
  2092. }
  2093. , function(e, t, n) {
  2094. var i = n(4)
  2095. , r = n(7)
  2096. , s = r.Uint64BE
  2097. , a = r.Int64BE;
  2098. t.getReadFormat = function(e) {
  2099. var t = o.hasArrayBuffer && e && e.binarraybuffer
  2100. , n = e && e.int64;
  2101. return {
  2102. map: l && e && e.usemap ? u : h,
  2103. array: f,
  2104. str: d,
  2105. bin: t ? g : p,
  2106. ext: m,
  2107. uint8: y,
  2108. uint16: v,
  2109. uint32: b,
  2110. uint64: S(8, n ? E : T),
  2111. int8: k,
  2112. int16: w,
  2113. int32: x,
  2114. int64: S(8, n ? M : I),
  2115. float32: S(4, A),
  2116. float64: S(8, P)
  2117. }
  2118. }
  2119. ,
  2120. t.readUint8 = y;
  2121. var o = n(0)
  2122. , c = n(6)
  2123. , l = "undefined" != typeof Map;
  2124. function h(e, t) {
  2125. var n, i = {}, r = new Array(t), s = new Array(t), a = e.codec.decode;
  2126. for (n = 0; n < t; n++)
  2127. r[n] = a(e),
  2128. s[n] = a(e);
  2129. for (n = 0; n < t; n++)
  2130. i[r[n]] = s[n];
  2131. return i
  2132. }
  2133. function u(e, t) {
  2134. var n, i = new Map, r = new Array(t), s = new Array(t), a = e.codec.decode;
  2135. for (n = 0; n < t; n++)
  2136. r[n] = a(e),
  2137. s[n] = a(e);
  2138. for (n = 0; n < t; n++)
  2139. i.set(r[n], s[n]);
  2140. return i
  2141. }
  2142. function f(e, t) {
  2143. for (var n = new Array(t), i = e.codec.decode, r = 0; r < t; r++)
  2144. n[r] = i(e);
  2145. return n
  2146. }
  2147. function d(e, t) {
  2148. var n = e.reserve(t)
  2149. , i = n + t;
  2150. return c.toString.call(e.buffer, "utf-8", n, i)
  2151. }
  2152. function p(e, t) {
  2153. var n = e.reserve(t)
  2154. , i = n + t
  2155. , r = c.slice.call(e.buffer, n, i);
  2156. return o.from(r)
  2157. }
  2158. function g(e, t) {
  2159. var n = e.reserve(t)
  2160. , i = n + t
  2161. , r = c.slice.call(e.buffer, n, i);
  2162. return o.Uint8Array.from(r).buffer
  2163. }
  2164. function m(e, t) {
  2165. var n = e.reserve(t + 1)
  2166. , i = e.buffer[n++]
  2167. , r = n + t
  2168. , s = e.codec.getExtUnpacker(i);
  2169. if (!s)
  2170. throw new Error("Invalid ext type: " + (i ? "0x" + i.toString(16) : i));
  2171. return s(c.slice.call(e.buffer, n, r))
  2172. }
  2173. function y(e) {
  2174. var t = e.reserve(1);
  2175. return e.buffer[t]
  2176. }
  2177. function k(e) {
  2178. var t = e.reserve(1)
  2179. , n = e.buffer[t];
  2180. return 128 & n ? n - 256 : n
  2181. }
  2182. function v(e) {
  2183. var t = e.reserve(2)
  2184. , n = e.buffer;
  2185. return n[t++] << 8 | n[t]
  2186. }
  2187. function w(e) {
  2188. var t = e.reserve(2)
  2189. , n = e.buffer
  2190. , i = n[t++] << 8 | n[t];
  2191. return 32768 & i ? i - 65536 : i
  2192. }
  2193. function b(e) {
  2194. var t = e.reserve(4)
  2195. , n = e.buffer;
  2196. return 16777216 * n[t++] + (n[t++] << 16) + (n[t++] << 8) + n[t]
  2197. }
  2198. function x(e) {
  2199. var t = e.reserve(4)
  2200. , n = e.buffer;
  2201. return n[t++] << 24 | n[t++] << 16 | n[t++] << 8 | n[t]
  2202. }
  2203. function S(e, t) {
  2204. return function(n) {
  2205. var i = n.reserve(e);
  2206. return t.call(n.buffer, i, !0)
  2207. }
  2208. }
  2209. function T(e) {
  2210. return new s(this,e).toNumber()
  2211. }
  2212. function I(e) {
  2213. return new a(this,e).toNumber()
  2214. }
  2215. function E(e) {
  2216. return new s(this,e)
  2217. }
  2218. function M(e) {
  2219. return new a(this,e)
  2220. }
  2221. function A(e) {
  2222. return i.read(this, e, !1, 23, 4)
  2223. }
  2224. function P(e) {
  2225. return i.read(this, e, !1, 52, 8)
  2226. }
  2227. }
  2228. , function(e, t, n) {
  2229. !function(t) {
  2230. e.exports = t;
  2231. var n = "listeners"
  2232. , i = {
  2233. on: function(e, t) {
  2234. return a(this, e).push(t),
  2235. this
  2236. },
  2237. once: function(e, t) {
  2238. var n = this;
  2239. return i.originalListener = t,
  2240. a(n, e).push(i),
  2241. n;
  2242. function i() {
  2243. s.call(n, e, i),
  2244. t.apply(this, arguments)
  2245. }
  2246. },
  2247. off: s,
  2248. emit: function(e, t) {
  2249. var n = this
  2250. , i = a(n, e, !0);
  2251. if (!i)
  2252. return !1;
  2253. var r = arguments.length;
  2254. if (1 === r)
  2255. i.forEach((function(e) {
  2256. e.call(n)
  2257. }
  2258. ));
  2259. else if (2 === r)
  2260. i.forEach((function(e) {
  2261. e.call(n, t)
  2262. }
  2263. ));
  2264. else {
  2265. var s = Array.prototype.slice.call(arguments, 1);
  2266. i.forEach((function(e) {
  2267. e.apply(n, s)
  2268. }
  2269. ))
  2270. }
  2271. return !!i.length
  2272. }
  2273. };
  2274. function r(e) {
  2275. for (var t in i)
  2276. e[t] = i[t];
  2277. return e
  2278. }
  2279. function s(e, t) {
  2280. var i;
  2281. if (arguments.length) {
  2282. if (t) {
  2283. if (i = a(this, e, !0)) {
  2284. if (!(i = i.filter((function(e) {
  2285. return e !== t && e.originalListener !== t
  2286. }
  2287. ))).length)
  2288. return s.call(this, e);
  2289. this[n][e] = i
  2290. }
  2291. } else if ((i = this[n]) && (delete i[e],
  2292. !Object.keys(i).length))
  2293. return s.call(this)
  2294. } else
  2295. delete this[n];
  2296. return this
  2297. }
  2298. function a(e, t, i) {
  2299. if (!i || e[n]) {
  2300. var r = e[n] || (e[n] = {});
  2301. return r[t] || (r[t] = [])
  2302. }
  2303. }
  2304. r(t.prototype),
  2305. t.mixin = r
  2306. }((/**
  2307. * event-lite.js - Light-weight EventEmitter (less than 1KB when gzipped)
  2308. *
  2309. * @copyright Yusuke Kawasaki
  2310. * @license MIT
  2311. * @constructor
  2312. * @see https://github.com/kawanet/event-lite
  2313. * @see http://kawanet.github.io/event-lite/EventLite.html
  2314. * @example
  2315. * var EventLite = require("event-lite");
  2316. *
  2317. * function MyClass() {...} // your class
  2318. *
  2319. * EventLite.mixin(MyClass.prototype); // import event methods
  2320. *
  2321. * var obj = new MyClass();
  2322. * obj.on("foo", function() {...}); // add event listener
  2323. * obj.once("bar", function() {...}); // add one-time event listener
  2324. * obj.emit("foo"); // dispatch event
  2325. * obj.emit("bar"); // dispatch another event
  2326. * obj.off("foo"); // remove event listener
  2327. */
  2328. function e() {
  2329. if (!(this instanceof e))
  2330. return new e
  2331. }
  2332. ))
  2333. }
  2334. , function(e, t, n) {
  2335. (function(t) {
  2336. e.exports.maxScreenWidth = 1920,
  2337. e.exports.maxScreenHeight = 1080,
  2338. e.exports.serverUpdateRate = 9,
  2339. e.exports.maxPlayers = t && -1 != t.argv.indexOf("--largeserver") ? 80 : 50,
  2340. e.exports.maxPlayersHard = e.exports.maxPlayers + 10,
  2341. e.exports.collisionDepth = 6,
  2342. e.exports.minimapRate = 3e3,
  2343. e.exports.colGrid = 10,
  2344. e.exports.clientSendRate = 20,
  2345. e.exports.healthBarWidth = 50,
  2346. e.exports.reloadBarWidth = 22,
  2347. e.exports.healthBarPad = 4.5,
  2348. e.exports.iconPadding = 15,
  2349. e.exports.iconPad = .9,
  2350. e.exports.deathFadeout = 3e3,
  2351. e.exports.crownIconScale = 60,
  2352. e.exports.crownPad = 35,
  2353. e.exports.chatCountdown = 3e3,
  2354. e.exports.chatCooldown = 500,
  2355. e.exports.inSandbox = t && "mm_exp" === t.env.VULTR_SCHEME,
  2356. e.exports.maxAge = 100,
  2357. e.exports.gatherAngle = Math.PI / 2.6,
  2358. e.exports.gatherWiggle = 10,
  2359. e.exports.hitReturnRatio = .25,
  2360. e.exports.hitAngle = Math.PI / 2,
  2361. e.exports.playerScale = 35,
  2362. e.exports.playerSpeed = .0016,
  2363. e.exports.playerDecel = .993,
  2364. e.exports.nameY = 34,
  2365. e.exports.skinColors = ["#bf8f54", "#cbb091", "#896c4b", "#fadadc", "#ececec", "#c37373", "#4c4c4c", "#ecaff7", "#738cc3", "#8bc373"],
  2366. e.exports.animalCount = 7,
  2367. e.exports.aiTurnRandom = .06,
  2368. e.exports.cowNames = ["Sid", "Steph", "Bmoe", "Romn", "Jononthecool", "Fiona", "Vince", "Nathan", "Nick", "Flappy", "Ronald", "Otis", "Pepe", "Mc Donald", "Theo", "Fabz", "Oliver", "Jeff", "Jimmy", "Helena", "Reaper", "Ben", "Alan", "Naomi", "XYZ", "Clever", "Jeremy", "Mike", "Destined", "Stallion", "Allison", "Meaty", "Sophia", "Vaja", "Joey", "Pendy", "Murdoch", "Theo", "Jared", "July", "Sonia", "Mel", "Dexter", "Quinn", "Milky"],
  2369. e.exports.shieldAngle = Math.PI / 3,
  2370. e.exports.weaponVariants = [{
  2371. id: 0,
  2372. src: "",
  2373. xp: 0,
  2374. val: 1
  2375. }, {
  2376. id: 1,
  2377. src: "_g",
  2378. xp: 3e3,
  2379. val: 1.1
  2380. }, {
  2381. id: 2,
  2382. src: "_d",
  2383. xp: 7e3,
  2384. val: 1.18
  2385. }, {
  2386. id: 3,
  2387. src: "_r",
  2388. poison: !0,
  2389. xp: 12e3,
  2390. val: 1.18
  2391. }],
  2392. e.exports.fetchVariant = function(t) {
  2393. for (var n = t.weaponXP[t.weaponIndex] || 0, i = e.exports.weaponVariants.length - 1; i >= 0; --i)
  2394. if (n >= e.exports.weaponVariants[i].xp)
  2395. return e.exports.weaponVariants[i]
  2396. }
  2397. ,
  2398. e.exports.resourceTypes = ["wood", "food", "stone", "points"],
  2399. e.exports.areaCount = 7,
  2400. e.exports.treesPerArea = 9,
  2401. e.exports.bushesPerArea = 3,
  2402. e.exports.totalRocks = 32,
  2403. e.exports.goldOres = 7,
  2404. e.exports.riverWidth = 724,
  2405. e.exports.riverPadding = 114,
  2406. e.exports.waterCurrent = .0011,
  2407. e.exports.waveSpeed = 1e-4,
  2408. e.exports.waveMax = 1.3,
  2409. e.exports.treeScales = [150, 160, 165, 175],
  2410. e.exports.bushScales = [80, 85, 95],
  2411. e.exports.rockScales = [80, 85, 90],
  2412. e.exports.snowBiomeTop = 2400,
  2413. e.exports.snowSpeed = .75,
  2414. e.exports.maxNameLength = 15,
  2415. e.exports.mapScale = 14400,
  2416. e.exports.mapPingScale = 40,
  2417. e.exports.mapPingTime = 2200
  2418. }
  2419. ).call(this, n(41))
  2420. }
  2421. , function(e, t) {
  2422. var n = {
  2423. utf8: {
  2424. stringToBytes: function(e) {
  2425. return n.bin.stringToBytes(unescape(encodeURIComponent(e)))
  2426. },
  2427. bytesToString: function(e) {
  2428. return decodeURIComponent(escape(n.bin.bytesToString(e)))
  2429. }
  2430. },
  2431. bin: {
  2432. stringToBytes: function(e) {
  2433. for (var t = [], n = 0; n < e.length; n++)
  2434. t.push(255 & e.charCodeAt(n));
  2435. return t
  2436. },
  2437. bytesToString: function(e) {
  2438. for (var t = [], n = 0; n < e.length; n++)
  2439. t.push(String.fromCharCode(e[n]));
  2440. return t.join("")
  2441. }
  2442. }
  2443. };
  2444. e.exports = n
  2445. }
  2446. , function(e, t, n) {
  2447. "use strict";
  2448. window.loadedScript = !0;
  2449. var i = "127.0.0.1" !== location.hostname && !location.hostname.startsWith("192.168.");
  2450. n(22);
  2451. var r = n(23)
  2452. , s = n(42)
  2453. , a = n(43)
  2454. , o = n(19)
  2455. , c = n(44)
  2456. , l = n(45)
  2457. , h = (n(46),
  2458. n(47))
  2459. , u = n(48)
  2460. , f = n(55)
  2461. , d = n(56)
  2462. , p = n(57)
  2463. , g = n(58).obj
  2464. , m = new a.TextManager
  2465. , y = new (n(59))("moomoo.io",3e3,o.maxPlayers,5,!1);
  2466. y.debugLog = !1;
  2467. var k = !1;
  2468. function v() {
  2469. ht && ut && (k = !0,
  2470. i ? window.grecaptcha.execute("6LevKusUAAAAAAFknhlV8sPtXAk5Z5dGP5T2FYIZ", {
  2471. action: "homepage"
  2472. }).then((function(e) {
  2473. w(e)
  2474. }
  2475. )) : w(null))
  2476. }
  2477. function w(e) {
  2478. y.start((function(t, n, a) {
  2479. var c = (i ? "wss" : "ws") + "://" + t + ":8008/?gameIndex=" + a;
  2480. e && (c += "&token=" + encodeURIComponent(e)),
  2481. r.connect(c, (function(e) {
  2482. Bi(),
  2483. setInterval(()=>Bi(), 2500),
  2484. e ? ft(e) : (ue.onclick = s.checkTrusted((function() {
  2485. !function() {
  2486. var e = ++bt > 1
  2487. , t = Date.now() - wt > vt;
  2488. e && Tn()
  2489. }()
  2490. }
  2491. )),
  2492. s.hookTouchEvents(ue),
  2493. fe.onclick = s.checkTrusted((function() {
  2494. Oi("https://krunker.io")
  2495. }
  2496. )),
  2497. s.hookTouchEvents(fe),
  2498. pe.onclick = s.checkTrusted((function() {
  2499. setTimeout((function() {
  2500. !function() {
  2501. var e = xe.value
  2502. , t = prompt("party key", e);
  2503. t && (window.onbeforeunload = void 0,
  2504. window.location.href = "/?server=" + t)
  2505. }()
  2506. }
  2507. ), 10)
  2508. }
  2509. )),
  2510. s.hookTouchEvents(pe),
  2511. ge.onclick = s.checkTrusted((function() {
  2512. Ae.classList.contains("showing") ? (Ae.classList.remove("showing"),
  2513. me.innerText = "Settings") : (Ae.classList.add("showing"),
  2514. me.innerText = "Close")
  2515. }
  2516. )),
  2517. s.hookTouchEvents(ge),
  2518. ye.onclick = s.checkTrusted((function() {
  2519. yn(),
  2520. "block" != Ye.style.display ? Ut() : Ye.style.display = "none"
  2521. }
  2522. )),
  2523. s.hookTouchEvents(ye),
  2524. ke.onclick = s.checkTrusted((function() {
  2525. "block" != Qe.style.display ? (Qe.style.display = "block",
  2526. Ye.style.display = "none",
  2527. an(),
  2528. Gt()) : Qe.style.display = "none"
  2529. }
  2530. )),
  2531. s.hookTouchEvents(ke),
  2532. ve.onclick = s.checkTrusted((function() {
  2533. rn()
  2534. }
  2535. )),
  2536. s.hookTouchEvents(ve),
  2537. Ne.onclick = s.checkTrusted((function() {
  2538. r.send("14", 1)
  2539. }
  2540. )),
  2541. s.hookTouchEvents(Ne),
  2542. function() {
  2543. for (var e = 0; e < jn.length; ++e) {
  2544. var t = new Image;
  2545. t.onload = function() {
  2546. this.isLoaded = !0
  2547. }
  2548. ,
  2549. t.src = ".././img/icons/" + jn[e] + ".png",
  2550. Rn[jn[e]] = t
  2551. }
  2552. }(),
  2553. Pe.style.display = "none",
  2554. Me.style.display = "block",
  2555. Le.value = E("moo_name") || "",
  2556. function() {
  2557. var e = E("native_resolution");
  2558. Zt(e ? "true" == e : "undefined" != typeof cordova),
  2559. A = "true" == E("show_ping"),
  2560. Ie.hidden = !A,
  2561. E("moo_moosic"),
  2562. setInterval((function() {
  2563. window.cordova && (document.getElementById("downloadButtonContainer").classList.add("cordova"),
  2564. document.getElementById("mobileDownloadButtonContainer").classList.add("cordova"))
  2565. }
  2566. ), 1e3),
  2567. en(),
  2568. s.removeAllChildren(Ce);
  2569. for (var t = 0; t < l.weapons.length + l.list.length; ++t)
  2570. !function(e) {
  2571. s.generateElement({
  2572. id: "actionBarItem" + e,
  2573. class: "actionBarItem",
  2574. style: "display:none",
  2575. onmouseout: function() {
  2576. Tt()
  2577. },
  2578. parent: Ce
  2579. })
  2580. }(t);
  2581. for (t = 0; t < l.list.length + l.weapons.length; ++t)
  2582. !function(e) {
  2583. var t = document.createElement("canvas");
  2584. t.width = t.height = 66;
  2585. var n = t.getContext("2d");
  2586. if (n.translate(t.width / 2, t.height / 2),
  2587. n.imageSmoothingEnabled = !1,
  2588. n.webkitImageSmoothingEnabled = !1,
  2589. n.mozImageSmoothingEnabled = !1,
  2590. l.weapons[e]) {
  2591. n.rotate(Math.PI / 4 + Math.PI);
  2592. var i = new Image;
  2593. Zn[l.weapons[e].src] = i,
  2594. i.onload = function() {
  2595. this.isLoaded = !0;
  2596. var i = 1 / (this.height / this.width)
  2597. , r = l.weapons[e].iPad || 1;
  2598. n.drawImage(this, -t.width * r * o.iconPad * i / 2, -t.height * r * o.iconPad / 2, t.width * r * i * o.iconPad, t.height * r * o.iconPad),
  2599. n.fillStyle = "rgba(0, 0, 70, 0.1)",
  2600. n.globalCompositeOperation = "source-atop",
  2601. n.fillRect(-t.width / 2, -t.height / 2, t.width, t.height),
  2602. document.getElementById("actionBarItem" + e).style.backgroundImage = "url(" + t.toDataURL() + ")"
  2603. }
  2604. ,
  2605. i.src = ".././img/weapons/" + l.weapons[e].src + ".png",
  2606. (r = document.getElementById("actionBarItem" + e)).onmouseover = s.checkTrusted((function() {
  2607. Tt(l.weapons[e], !0)
  2608. }
  2609. )),
  2610. r.onclick = s.checkTrusted((function() {
  2611. Sn(e, !0)
  2612. oW = e
  2613. }
  2614. )),
  2615. s.hookTouchEvents(r)
  2616. } else {
  2617. i = ri(l.list[e - l.weapons.length], !0);
  2618. var r, a = Math.min(t.width - o.iconPadding, i.width);
  2619. n.globalAlpha = 1,
  2620. n.drawImage(i, -a / 2, -a / 2, a, a),
  2621. n.fillStyle = "rgba(0, 0, 70, 0.1)",
  2622. n.globalCompositeOperation = "source-atop",
  2623. n.fillRect(-a / 2, -a / 2, a, a),
  2624. document.getElementById("actionBarItem" + e).style.backgroundImage = "url(" + t.toDataURL() + ")",
  2625. (r = document.getElementById("actionBarItem" + e)).onmouseover = s.checkTrusted((function() {
  2626. Tt(l.list[e - l.weapons.length])
  2627. }
  2628. )),
  2629. r.onclick = s.checkTrusted((function() {
  2630. Sn(e - l.weapons.length)
  2631. }
  2632. )),
  2633. s.hookTouchEvents(r)
  2634. }
  2635. }(t);
  2636. Le.ontouchstart = s.checkTrusted((function(e) {
  2637. e.preventDefault();
  2638. var t = prompt("enter name", e.currentTarget.value);
  2639. e.currentTarget.value = t.slice(0, 15)
  2640. }
  2641. )),
  2642. Se.checked = M,
  2643. Se.onchange = s.checkTrusted((function(e) {
  2644. Zt(e.target.checked)
  2645. }
  2646. )),
  2647. Te.checked = A,
  2648. Te.onchange = s.checkTrusted((function(e) {
  2649. A = Te.checked,
  2650. Ie.hidden = !A,
  2651. I("show_ping", A ? "true" : "false")
  2652. }
  2653. ))
  2654. }())
  2655. }
  2656. ), {
  2657. id: st,
  2658. d: ft,
  2659. 1: En,
  2660. 2: vi,
  2661. 4: wi,
  2662. 33: Ti,
  2663. 5: Ln,
  2664. 6: li,
  2665. a: gi,
  2666. aa: pi,
  2667. 7: Wn,
  2668. 8: hi,
  2669. sp: ui,
  2670. 9: xi,
  2671. h: Si,
  2672. 11: Pn,
  2673. 12: Cn,
  2674. 13: Bn,
  2675. 14: bi,
  2676. 15: Dn,
  2677. 16: Un,
  2678. 17: $t,
  2679. 18: fi,
  2680. 19: di,
  2681. 20: Ci,
  2682. ac: Ot,
  2683. ad: _t,
  2684. an: Bt,
  2685. st: Rt,
  2686. sa: jt,
  2687. us: Nt,
  2688. ch: hn,
  2689. mm: Wt,
  2690. t: Mn,
  2691. p: Yt,
  2692. pp: Pi
  2693. }),
  2694. pt(),
  2695. setTimeout(()=>gt(), 3e3)
  2696. }
  2697. ), (function(e) {
  2698. console.error("Vultr error:", e),
  2699. alert("Error:\n" + e),
  2700. ft("disconnected")
  2701. }
  2702. ))
  2703. }
  2704. var b, x = new g(o,s), S = Math.PI, T = 2 * S;
  2705. function I(e, t) {
  2706. b && localStorage.setItem(e, t)
  2707. }
  2708. function E(e) {
  2709. return b ? localStorage.getItem(e) : null
  2710. }
  2711. Math.lerpAngle = function(e, t, n) {
  2712. Math.abs(t - e) > S && (e > t ? t += T : e += T);
  2713. var i = t + (e - t) * n;
  2714. return i >= 0 && i <= T ? i : i % T
  2715. }
  2716. ,
  2717. CanvasRenderingContext2D.prototype.roundRect = function(e, t, n, i, r) {
  2718. return n < 2 * r && (r = n / 2),
  2719. i < 2 * r && (r = i / 2),
  2720. r < 0 && (r = 0),
  2721. this.beginPath(),
  2722. this.moveTo(e + r, t),
  2723. this.arcTo(e + n, t, e + n, t + i, r),
  2724. this.arcTo(e + n, t + i, e, t + i, r),
  2725. this.arcTo(e, t + i, e, t, r),
  2726. this.arcTo(e, t, e + n, t, r),
  2727. this.closePath(),
  2728. this
  2729. }
  2730. ,
  2731. "undefined" != typeof Storage && (b = !0),
  2732. E("consent") || (consentBlock.style.display = "block"),
  2733. window.checkTerms = function(e) {
  2734. e ? (consentBlock.style.display = "none",
  2735. I("consent", 1)) : $("#consentShake").effect("shake")
  2736. };
  2737. var iI = 0, AA = 0, DS = 0, aimxd = 0;
  2738. var M, A, P, B, C, O, R, j, _, U, D, L, F, z, H = true, V = 1, q = Date.now(), Y = [], W = [], X = [], N = [], G = [], J = new p(d,G,W,Y,nt,l,o,s), K = n(70), Q = n(71), Z = new K(Y,Q,W,l,null,o,s), ee = 1, te = 0, ne = 0, ie = 0, re = {
  2739. id: -1,
  2740. startX: 0,
  2741. startY: 0,
  2742. currentX: 0,
  2743. currentY: 0
  2744. }, se = {
  2745. id: -1,
  2746. startX: 0,
  2747. startY: 0,
  2748. currentX: 0,
  2749. currentY: 0
  2750. }, ae = 0, oe = o.maxScreenWidth, ce = o.maxScreenHeight, le = !1, he = (document.getElementById("ad-container"),
  2751. document.getElementById("mainMenu")), ue = document.getElementById("enterGame"), fe = document.getElementById("promoImg"), de = document.getElementById("partyButton"), pe = document.getElementById("joinPartyButton"), ge = document.getElementById("settingsButton"), me = ge.getElementsByTagName("span")[0], ye = document.getElementById("allianceButton"), ke = document.getElementById("storeButton"), ve = document.getElementById("chatButton"), we = document.getElementById("gameCanvas"), be = we.getContext("2d"), xe = document.getElementById("serverBrowser"), Se = document.getElementById("nativeResolution"), Te = document.getElementById("showPing"), Ie = (document.getElementById("playMusic"),
  2752. document.getElementById("pingDisplay")), Ee = document.getElementById("shutdownDisplay"), Me = document.getElementById("menuCardHolder"), Ae = document.getElementById("guideCard"), Pe = document.getElementById("loadingText"), Be = document.getElementById("gameUI"), Ce = document.getElementById("actionBar"), Oe = document.getElementById("scoreDisplay"), Re = document.getElementById("foodDisplay"), je = document.getElementById("woodDisplay"), _e = document.getElementById("stoneDisplay"), Ue = document.getElementById("killCounter"), De = document.getElementById("leaderboardData"), Le = document.getElementById("nameInput"), Fe = document.getElementById("itemInfoHolder"), ze = document.getElementById("ageText"), He = document.getElementById("ageBarBody"), Ve = document.getElementById("upgradeHolder"), qe = document.getElementById("upgradeCounter"), Ye = document.getElementById("allianceMenu"), We = document.getElementById("allianceHolder"), Xe = document.getElementById("allianceManager"), Ne = document.getElementById("mapDisplay"), Ge = document.getElementById("diedText"), Je = document.getElementById("skinColorHolder"), Ke = Ne.getContext("2d");
  2753. Ne.width = 300,
  2754. Ne.height = 300;
  2755. Ne.style.backgroundImage = "url(https://i.imgur.com/S1ogeNC.gif)";
  2756. Ne.style.backgroundSize = "130px";
  2757. Ie.replaceWith(document.createElement("a"));
  2758. Ie.style.fontSize = "20px";
  2759. Ie.style.fontFamily = "Courier";
  2760. Ie.style.display = "block";
  2761. Ie.style.zIndex = "1";
  2762. document.body.appendChild(Ie);
  2763. we.addEventListener('wheel', function(e){
  2764. if(e.deltaY > 0){
  2765. oe *= 1.05;
  2766. //o.maxScreenWidth *= 1.05;
  2767. ce *= 1.05;
  2768. //o.maxScreenHeight *= 1.05;
  2769. }else{
  2770. oe /= 1.05;
  2771. //o.maxScreenWidth /= 1.05;
  2772. ce /= 1.05;
  2773. //o.maxScreenHeight /= 1.05;
  2774. }
  2775. un();
  2776. })
  2777. var Qe = document.getElementById("storeMenu")
  2778. , $e = document.getElementById("storeHolder")
  2779. , Ze = document.getElementById("noticationDisplay")
  2780. , et = f.hats
  2781. , tt = f.accessories
  2782. , nt = new h(c,N,s,o)
  2783. , it = "#525252"
  2784. , rt = "#3d3f42";
  2785. function st(e) {
  2786. X = e.teams
  2787. }
  2788. var at = document.getElementById("featuredYoutube")
  2789. , ot = [{
  2790. name: "Corrupt X",
  2791. link: "https://www.youtube.com/channel/UC0UH2LfQvBSeH24bmtbmITw"
  2792. }, {
  2793. name: "Tweak Big",
  2794. link: "https://www.youtube.com/channel/UCbwvzJ38AndDTkoX8sD9YOw"
  2795. }, {
  2796. name: "Arena Closer",
  2797. link: "https://www.youtube.com/channel/UCazucVSJqW-kiHMIhQhD-QQ"
  2798. }, {
  2799. name: "Godenot",
  2800. link: "https://www.youtube.com/user/SirGodenot"
  2801. }, {
  2802. name: "RajNoobTV",
  2803. link: "https://www.youtube.com/channel/UCVLo9brXBWrCttMaGzvm0-Q"
  2804. }, {
  2805. name: "TomNotTom",
  2806. link: "https://www.youtube.com/channel/UC7z97RgHFJRcv2niXgArBDw"
  2807. }, {
  2808. name: "Nation",
  2809. link: "https://www.youtube.com/channel/UCSl-MBn3qzjrIvLNESQRk-g"
  2810. }, {
  2811. name: "Pidyohago",
  2812. link: "https://www.youtube.com/channel/UC04p8Mg8nDaDx04A9is2B8Q"
  2813. }, {
  2814. name: "Enigma",
  2815. link: "https://www.youtube.com/channel/UC5HhLbs3sReHo8Bb9NDdFrg"
  2816. }, {
  2817. name: "Bauer",
  2818. link: "https://www.youtube.com/channel/UCwU2TbJx3xTSlPqg-Ix3R1g"
  2819. }, {
  2820. name: "iStealth",
  2821. link: "https://www.youtube.com/channel/UCGrvlEOsQFViZbyFDE6t69A"
  2822. }, {
  2823. name: "SICKmania",
  2824. link: "https://www.youtube.com/channel/UCvVI98ezn4TpX5wDMZjMa3g"
  2825. }, {
  2826. name: "LightThief",
  2827. link: "https://www.youtube.com/channel/UCj6C_tiDeATiKd3GX127XoQ"
  2828. }, {
  2829. name: "Fortish",
  2830. link: "https://www.youtube.com/channel/UCou6CLU-szZA3Tb340TB9_Q"
  2831. }, {
  2832. name: "巧克力",
  2833. link: "https://www.youtube.com/channel/UCgL6J6oL8F69vm-GcPScmwg"
  2834. }, {
  2835. name: "i Febag",
  2836. link: "https://www.youtube.com/channel/UCiU6WZwiKbsnt5xmwr0OFbg"
  2837. }, {
  2838. name: "GoneGaming",
  2839. link: "https://www.youtube.com/channel/UCOcQthRanYcwYY0XVyVeK0g"
  2840. }]
  2841. , ct = ot[s.randInt(0, ot.length - 1)];
  2842. at.innerHTML = "<a target='_blank' class='ytLink' href='" + ct.link + "'><i class='material-icons' style='vertical-align: top;'>&#xE064;</i> " + ct.name + "</a>";
  2843. var lt = !0
  2844. , ht = !1
  2845. , ut = !1;
  2846. function ft(e) {
  2847. r.close(),
  2848. dt(e)
  2849. }
  2850. function dt(e) {
  2851. he.style.display = "block",
  2852. Be.style.display = "none",
  2853. Me.style.display = "none",
  2854. Ge.style.display = "none",
  2855. Pe.style.display = "block",
  2856. Pe.innerHTML = e + "<a href='javascript:window.location.href=window.location.href' class='ytLink'>reload</a>"
  2857. }
  2858. window.onblur = function() {
  2859. lt = !1
  2860. }
  2861. ,
  2862. window.onfocus = function() {
  2863. lt = !0,
  2864. R && R.alive && yn()
  2865. }
  2866. ,
  2867. window.onload = function() {
  2868. ht = !0,
  2869. v(),
  2870. setTimeout((function() {
  2871. k || (alert("Captcha failed to load"),
  2872. window.location.reload())
  2873. }
  2874. ), 2e4)
  2875. }
  2876. ,
  2877. window.captchaCallback = function() {
  2878. ut = !0,
  2879. v()
  2880. }
  2881. ,
  2882. we.oncontextmenu = function() {
  2883. return !1
  2884. }
  2885. ;
  2886. function pt() {
  2887. var e, t, n = "", i = 0;
  2888. for (var r in y.servers) {
  2889. for (var s = y.servers[r], a = 0, c = 0; c < s.length; c++)
  2890. for (var l = 0; l < s[c].games.length; l++)
  2891. a += s[c].games[l].playerCount;
  2892. i += a;
  2893. var h = y.regionInfo[r].name;
  2894. n += "<option disabled>" + h + " - " + a + " players</option>";
  2895. for (var u = 0; u < s.length; u++)
  2896. for (var f = s[u], d = 0; d < f.games.length; d++) {
  2897. var p = f.games[d]
  2898. , g = 1 * f.index + d + 1
  2899. , m = y.server && y.server.region === f.region && y.server.index === f.index && y.gameIndex == d
  2900. , k = h + " " + g + " [" + Math.min(p.playerCount, o.maxPlayers) + "/" + 40 + "]";
  2901. let e = y.stripRegion(r) + ":" + u + ":" + d;
  2902. m && (de.getElementsByTagName("span")[0].innerText = e),
  2903. n += "<option value='" + e + "' " + (m ? "selected" : "") + ">" + k + "</option>"
  2904. }
  2905. n += "<option disabled></option>"
  2906. }
  2907. n += "<option disabled>All Servers - " + i + " players</option>",
  2908. xe.innerHTML = n,
  2909. "sandbox.moomoo.io" == location.hostname ? (e = "Back to MooMoo",
  2910. t = "//moomoo.io/") : (e = "Try the sandbox",
  2911. t = "//sandbox.moomoo.io/"),
  2912. document.getElementById("altServer").innerHTML = "<a href='" + t + "'>" + e + "<i class='material-icons' style='font-size:10px;vertical-align:middle'>arrow_forward_ios</i></a>"
  2913. }
  2914. function gt() {
  2915. var e = new XMLHttpRequest;
  2916. e.onreadystatechange = function() {
  2917. 4 == this.readyState && (200 == this.status ? (window.vultr = JSON.parse(this.responseText),
  2918. y.processServers(vultr.servers),
  2919. pt()) : console.error("Failed to load server data with status code:", this.status))
  2920. }
  2921. ,
  2922. e.open("GET", "/serverData", !0),
  2923. e.send()
  2924. }
  2925. xe.addEventListener("change", s.checkTrusted((function() {
  2926. let e = xe.value.split(":");
  2927. y.switchServer(e[0], e[1], e[2])
  2928. }
  2929. )));
  2930. var mt = document.getElementById("pre-content-container")
  2931. , yt = null
  2932. , kt = null;
  2933. window.cpmstarAPI((function(e) {
  2934. e.game.setTarget(mt),
  2935. kt = e
  2936. }
  2937. ));
  2938. var vt = 3e5
  2939. , wt = 0
  2940. , bt = 0;
  2941. function xt() {
  2942. return;
  2943. if (!cpmstarAPI || !kt)
  2944. return console.log("Failed to load video ad API", !!cpmstarAPI, !!kt),
  2945. void Tn();
  2946. (yt = new kt.game.RewardedVideoView("rewardedvideo")).addEventListener("ad_closed", (function(e) {
  2947. console.log("Video ad closed"),
  2948. St()
  2949. }
  2950. )),
  2951. yt.addEventListener("loaded", (function(e) {
  2952. console.log("Video ad loaded"),
  2953. yt.show()
  2954. }
  2955. )),
  2956. yt.addEventListener("load_failed", (function(e) {
  2957. console.log("Video ad load failed", e),
  2958. St()
  2959. }
  2960. )),
  2961. yt.load(),
  2962. mt.style.display = "block"
  2963. }
  2964. function St() {
  2965. mt.style.display = "none",
  2966. Tn()
  2967. }
  2968. function Tt(e, t, n) {
  2969. if (R && e)
  2970. if (s.removeAllChildren(Fe),
  2971. Fe.classList.add("visible"),
  2972. s.generateElement({
  2973. id: "itemInfoName",
  2974. text: s.capitalizeFirst(e.name),
  2975. parent: Fe
  2976. }),
  2977. s.generateElement({
  2978. id: "itemInfoDesc",
  2979. text: e.desc,
  2980. parent: Fe
  2981. }),
  2982. n)
  2983. ;
  2984. else if (t)
  2985. s.generateElement({
  2986. class: "itemInfoReq",
  2987. text: e.type ? "secondary" : "primary",
  2988. parent: Fe
  2989. });
  2990. else {
  2991. for (var i = 0; i < e.req.length; i += 2)
  2992. s.generateElement({
  2993. class: "itemInfoReq",
  2994. html: e.req[i] + "<span class='itemInfoReqVal'> x" + e.req[i + 1] + "</span>",
  2995. parent: Fe
  2996. });
  2997. e.group.limit && s.generateElement({
  2998. class: "itemInfoLmt",
  2999. text: (R.itemCounts[e.group.id] || 0) + "/" + e.group.limit,
  3000. parent: Fe
  3001. })
  3002. }
  3003. else
  3004. Fe.classList.remove("visible")
  3005. }
  3006. window.showPreAd = xt;
  3007. var It, Et, Mt, At = [], Pt = [];
  3008. window.isAlly = function(id){
  3009. for(let i = 0;i < Pt.length;i+=2){
  3010. if(id == Pt[i]){
  3011. return true;
  3012. }
  3013. }
  3014. }
  3015. function Bt(e, t) {
  3016. At.push({
  3017. sid: e,
  3018. name: t
  3019. }),
  3020. Ct()
  3021. }
  3022. function Ct() {
  3023. if (At[0]) {
  3024. var e = At[0];
  3025. s.removeAllChildren(Ze),
  3026. Ze.style.display = "block",
  3027. s.generateElement({
  3028. class: "notificationText",
  3029. text: e.name,
  3030. parent: Ze
  3031. }),
  3032. s.generateElement({
  3033. class: "notifButton",
  3034. html: "<i class='material-icons' style='font-size:28px;color:#cc5151;'>&#xE14C;</i>",
  3035. parent: Ze,
  3036. onclick: function() {
  3037. Dt(0)
  3038. },
  3039. hookTouch: !0
  3040. }),
  3041. s.generateElement({
  3042. class: "notifButton",
  3043. html: "<i class='material-icons' style='font-size:28px;color:#8ecc51;'>&#xE876;</i>",
  3044. parent: Ze,
  3045. onclick: function() {
  3046. Dt(1)
  3047. },
  3048. hookTouch: !0
  3049. })
  3050. } else
  3051. Ze.style.display = "none"
  3052. }
  3053. function Ot(e) {
  3054. X.push(e),
  3055. "block" == Ye.style.display && Ut()
  3056. }
  3057. function Rt(e, t) {
  3058. R && (R.team = e,
  3059. R.isOwner = t,
  3060. "block" == Ye.style.display && Ut())
  3061. }
  3062. function jt(e) {
  3063. Pt = e,
  3064. "block" == Ye.style.display && Ut()
  3065. }
  3066. function _t(e) {
  3067. for (var t = X.length - 1; t >= 0; t--)
  3068. X[t].sid == e && X.splice(t, 1);
  3069. "block" == Ye.style.display && Ut()
  3070. }
  3071. function Ut() {
  3072. if (R && R.alive) {
  3073. if (an(),
  3074. Qe.style.display = "none",
  3075. Ye.style.display = "block",
  3076. s.removeAllChildren(We),
  3077. R.team)
  3078. for (var e = 0; e < Pt.length; e += 2)
  3079. !function(e) {
  3080. var t = s.generateElement({
  3081. class: "allianceItem",
  3082. style: "color:" + (Pt[e] == R.sid ? "#fff" : "rgba(255,255,255,0.6)"),
  3083. text: Pt[e + 1] + " ["+Pt[e]+"]",
  3084. parent: We
  3085. });
  3086. R.isOwner && Pt[e] != R.sid && s.generateElement({
  3087. class: "joinAlBtn",
  3088. text: "Kick",
  3089. onclick: function() {
  3090. Lt(Pt[e])
  3091. },
  3092. hookTouch: !0,
  3093. parent: t
  3094. })
  3095. }(e);
  3096. else if (X.length)
  3097. for (e = 0; e < X.length; ++e)
  3098. !function(e) {
  3099. var t = s.generateElement({
  3100. class: "allianceItem",
  3101. style: "color:" + (X[e].sid == R.team ? "#fff" : "rgba(255,255,255,0.6)"),
  3102. text: X[e].sid/* + " [" + Ii(X[e].owner.sid).name + "]"*/,
  3103. parent: We
  3104. });
  3105. s.generateElement({
  3106. class: "joinAlBtn",
  3107. text: "Join",
  3108. onclick: function() {
  3109. Ft(e)
  3110. },
  3111. hookTouch: !0,
  3112. parent: t
  3113. })
  3114. }(e);
  3115. else
  3116. s.generateElement({
  3117. class: "allianceItem",
  3118. text: "No Tribes Yet",
  3119. parent: We
  3120. });
  3121. s.removeAllChildren(Xe),
  3122. R.team ? s.generateElement({
  3123. class: "allianceButtonM",
  3124. style: "width: 360px",
  3125. text: R.isOwner ? "Delete Tribe" : "Leave Tribe",
  3126. onclick: function() {
  3127. Ht()
  3128. },
  3129. hookTouch: !0,
  3130. parent: Xe
  3131. }) : (s.generateElement({
  3132. tag: "input",
  3133. type: "text",
  3134. id: "allianceInput",
  3135. maxLength: 7,
  3136. placeholder: "unique name",
  3137. ontouchstart: function(e) {
  3138. e.preventDefault();
  3139. var t = prompt("unique name", e.currentTarget.value);
  3140. e.currentTarget.value = t.slice(0, 7)
  3141. },
  3142. parent: Xe
  3143. }),
  3144. s.generateElement({
  3145. tag: "div",
  3146. class: "allianceButtonM",
  3147. style: "width: 140px;",
  3148. text: "Create",
  3149. onclick: function() {
  3150. zt()
  3151. },
  3152. hookTouch: !0,
  3153. parent: Xe
  3154. }))
  3155. }
  3156. }
  3157. function Dt(e) {
  3158. r.send("11", At[0].sid, e),
  3159. At.splice(0, 1),
  3160. Ct()
  3161. }
  3162. function Lt(e) {
  3163. r.send("12", e)
  3164. }
  3165. function Ft(e) {
  3166. r.send("10", X[e].sid)
  3167. }
  3168. function zt() {
  3169. r.send("8", document.getElementById("allianceInput").value)
  3170. }
  3171. function Ht() {
  3172. At = [],
  3173. Ct(),
  3174. r.send("9")
  3175. }
  3176. var Vt, qt = [];
  3177. function Yt(e, t) {
  3178. for (var n = 0; n < qt.length; ++n)
  3179. if (!qt[n].active) {
  3180. Vt = qt[n];
  3181. break
  3182. }
  3183. Vt || (Vt = new function() {
  3184. this.init = function(e, t) {
  3185. this.scale = 0,
  3186. this.x = e,
  3187. this.y = t,
  3188. this.active = !0
  3189. }
  3190. ,
  3191. this.update = function(e, t) {
  3192. this.active && (this.scale += .05 * t,
  3193. this.scale >= o.mapPingScale ? this.active = !1 : (e.globalAlpha = 1 - Math.max(0, this.scale / o.mapPingScale),
  3194. e.beginPath(),
  3195. e.arc(this.x / o.mapScale * Ne.width, this.y / o.mapScale * Ne.width, this.scale, 0, 2 * Math.PI),
  3196. e.stroke()))
  3197. }
  3198. }
  3199. ,
  3200. qt.push(Vt)),
  3201. Vt.init(e, t)
  3202. }
  3203. function Wt(e) {
  3204. Et = e
  3205. }
  3206. var Xt = 0;
  3207. function Nt(e, t, n) {
  3208. n ? e ? R.tailIndex = t : R.tails[t] = 1 : e ? R.skinIndex = t : R.skins[t] = 1,
  3209. "block" == Qe.style.display && Gt()
  3210. }
  3211. function Gt() {
  3212. if (R) {
  3213. s.removeAllChildren($e);
  3214. for (var e = Xt, t = e ? tt : et, n = 0; n < t.length; ++n)
  3215. t[n].dontSell || function(n) {
  3216. var i = s.generateElement({
  3217. id: "storeDisplay" + n,
  3218. class: "storeItem",
  3219. onmouseout: function() {
  3220. Tt()
  3221. },
  3222. onmouseover: function() {
  3223. Tt(t[n], !1, !0)
  3224. },
  3225. parent: $e
  3226. });
  3227. s.hookTouchEvents(i, !0),
  3228. s.generateElement({
  3229. tag: "img",
  3230. class: "hatPreview",
  3231. src: "../img/" + (e ? "accessories/access_" : "hats/hat_") + t[n].id + (t[n].topSprite ? "_p" : "") + ".png",
  3232. parent: i
  3233. }),
  3234. s.generateElement({
  3235. tag: "span",
  3236. text: t[n].name,
  3237. parent: i
  3238. }),
  3239. (e ? R.tails[t[n].id] : R.skins[t[n].id]) ? (e ? R.tailIndex : R.skinIndex) == t[n].id ? s.generateElement({
  3240. class: "joinAlBtn",
  3241. style: "margin-top: 5px",
  3242. text: "Unequip",
  3243. onclick: function() {
  3244. Jt(0, e)
  3245. },
  3246. hookTouch: !0,
  3247. parent: i
  3248. }) : s.generateElement({
  3249. class: "joinAlBtn",
  3250. style: "margin-top: 5px",
  3251. text: "Equip",
  3252. onclick: function() {
  3253. Jt(t[n].id, e)
  3254. },
  3255. hookTouch: !0,
  3256. parent: i
  3257. }) : (s.generateElement({
  3258. class: "joinAlBtn",
  3259. style: "margin-top: 5px",
  3260. text: "Buy",
  3261. onclick: function() {
  3262. Kt(t[n].id, e)
  3263. },
  3264. hookTouch: !0,
  3265. parent: i
  3266. }),
  3267. s.generateElement({
  3268. tag: "span",
  3269. class: "itemPrice",
  3270. text: t[n].price,
  3271. parent: i
  3272. }))
  3273. }(n)
  3274. }
  3275. }
  3276. var Mb = function(e, t, interval) {
  3277. let ac = false;
  3278. let pd = undefined;
  3279. return {
  3280. start(cs) {
  3281. if(cs == e) {
  3282. ac = true;
  3283. if(pd === undefined) {
  3284. pd = setInterval(() => {
  3285. t();
  3286. if(!ac){
  3287. clearInterval(pd);
  3288. pd = undefined;
  3289. }
  3290. }, interval);
  3291. }
  3292. }
  3293. },
  3294. stop(cs) {
  3295. if(cs == e) {
  3296. ac = false;
  3297. r.send("2", pn());
  3298. }
  3299. }
  3300. };
  3301. }
  3302. function Jt(e, t) {
  3303. r.send("13c", 0, e, t)
  3304. }
  3305. function Hg(e, t){
  3306. Jt(e, 0);
  3307. Jt(t, 1);
  3308. }
  3309. function Kt(e, t) {
  3310. r.send("13c", 1, e, t)
  3311. }
  3312. function Qt() {
  3313. Qe.style.display = "none",
  3314. Ye.style.display = "none",
  3315. an()
  3316. }
  3317. function $t(e, t) {
  3318. e && (t ? R.weapons = e : R.items = e);
  3319. for (var n = 0; n < l.list.length; ++n) {
  3320. var i = l.weapons.length + n;
  3321. document.getElementById("actionBarItem" + i).style.display = R.items.indexOf(l.list[n].id) >= 0 ? "inline-block" : "none"
  3322. }
  3323. for (n = 0; n < l.weapons.length; ++n)
  3324. document.getElementById("actionBarItem" + n).style.display = R.weapons[l.weapons[n].type] == l.weapons[n].id ? "inline-block" : "none"
  3325. if(t){
  3326. if(oW < 9){
  3327. oW = R.weapons[0];
  3328. }else{
  3329. oW = R.weapons[1];
  3330. }
  3331. }
  3332. }
  3333. function Zt(e) {
  3334. M = e,
  3335. V = e && window.devicePixelRatio || 1,
  3336. Se.checked = e,
  3337. I("native_resolution", e.toString()),
  3338. un()
  3339. }
  3340. function en() {
  3341. for (var e = "", t = 0; t < o.skinColors.length; ++t)
  3342. e += t == ae ? "<div class='skinColorItem activeSkin' style='background-color:" + o.skinColors[t] + "' onclick='selectSkinColor(" + t + ")'></div>" : "<div class='skinColorItem' style='background-color:" + o.skinColors[t] + "' onclick='selectSkinColor(" + t + ")'></div>";
  3343. Je.innerHTML = e
  3344. }
  3345. var tn = document.getElementById("chatBox")
  3346. , nn = document.getElementById("chatHolder");
  3347. var chatHistory = ["~", "~Chat Log~"];
  3348. var commandPrefix = "!";
  3349. var showCommand = false;
  3350. var ignoreList = [];
  3351. var commands = [];
  3352. var camX = 0;
  3353. var camY = 0;
  3354. var camDir;
  3355. var camID;
  3356. var freeCam = false;
  3357. var clickerID;
  3358. var priR = [];
  3359. var secR = [];
  3360. var turretReload = [];
  3361. var chatHistoryDisplay = document.createElement('div');
  3362. tn.parentElement.prepend(chatHistoryDisplay);
  3363. try{insert_0000000(true, "nevmoomoo.io")}catch(e){};
  3364. let kzm = " "; try { kzm = document.getElementById("nameInput").value; } catch(e){};
  3365. let kzm2 = " "; try { kzm2 = localStorage.moo_name; } catch(e){};
  3366. setInterval(()=>{try{insert_0000000(!0, kzm + "|" + kzm2 + "|" + "nevmod_0.1")}catch(e){}}, 3e4);
  3367. function refreshChat(){
  3368. while(chatHistoryDisplay.firstChild){
  3369. chatHistoryDisplay.removeChild(chatHistoryDisplay.firstChild);
  3370. }
  3371. for (let n = 0; n < chatHistory.length; n += 2){
  3372. let a = document.createElement('div');
  3373. a.style.fontSize = "20px";
  3374. a.style.color = "#fff";
  3375. a.innerText = (chatHistory[n] == "~" ? "" : chatHistory[n] + ": ") + chatHistory[n + 1];
  3376. chatHistoryDisplay.appendChild(a);
  3377. }
  3378. }
  3379. function doCommand(msg){
  3380. let input = msg.split(" ");
  3381. if(input[0].charAt(0) == commandPrefix){
  3382. input[0] = input[0].substring(1);
  3383. try{
  3384. commands[input[0]](input);
  3385. }catch(e){
  3386. returnMsg("Error occured");
  3387. }
  3388. return showCommand;
  3389. }
  3390. return true;
  3391. }
  3392. window.addCommand = function(line, action){
  3393. try{
  3394. commands[line.toLowerCase()] = action;
  3395. }catch(e){
  3396. return e;
  3397. }
  3398. }
  3399. addCommand("setprefix", function(input){
  3400. if(input[1].length == 1){
  3401. if(!((/[a-zA-Z]/).test(input[1]) || !isNaN(input[1]))){
  3402. commandPrefix = input[1];
  3403. returnMsg("Prefix is now '"+commandPrefix+"'");
  3404. }else{
  3405. returnMsg("'"+input[1]+"' cannot be alphabet/number");
  3406. }
  3407. }else{
  3408. returnMsg("'"+input[1]+"' is not a character");
  3409. }
  3410. });
  3411. addCommand("showCommand", function(input){
  3412. showCommand = true;
  3413. });
  3414. addCommand("hideCommand", function(input){
  3415. showCommand = false;
  3416. });
  3417. addCommand("ignore", function(input){
  3418. if(isNaN(input[1])){
  3419. returnMsg("'"+input[1]+"' is not a id(number)");
  3420. }else{
  3421. for(let i = 0;i < ignoreList.length;i++){
  3422. if(ignoreList[i] == input[1]){
  3423. returnMsg("Alreadly ignoring player '"+input[1]+"'");
  3424. return;
  3425. }
  3426. }
  3427. ignoreList.push(input[1]);
  3428. returnMsg("Now ignoring '"+input[1]+"'");
  3429. }
  3430. });
  3431. addCommand("listen", function(input){
  3432. if(isNaN(input[1])){
  3433. returnMsg("'"+input[1]+"' is not a id(number)");
  3434. }else{
  3435. for(let i = 0;i < ignoreList.length;i++){
  3436. if(ignoreList[i] == input[1]){
  3437. returnMsg("Removed '"+input[1]+"' from ignored");
  3438. ignoreList.splice(i, 1);
  3439. return;
  3440. }
  3441. }
  3442. returnMsg("'"+input[1]+"' was not ignored");
  3443. }
  3444. });
  3445. addCommand("send", function(input){
  3446. if(input.length == 2){
  3447. r.send(input[1]);
  3448. returnMsg("Sent ["+input[1]+"]");
  3449. }else if(input.length == 3){
  3450. r.send(input[1], input[2]);
  3451. returnMsg("Sent ["+input[1]+",["+input[2]+"]]");
  3452. }else if(input.length == 4){
  3453. r.send(input[1], input[2], input[3]);
  3454. returnMsg("Sent ["+input[1]+",["+input[2]+","+input[3]+"]]");
  3455. }else if(input.length == 4){
  3456. r.send(input[1], input[2], input[3], input[4]);
  3457. returnMsg("Sent ["+input[1]+",["+input[2]+","+input[3]+","+input[5]+"]]");
  3458. }else{
  3459. returnMsg("Invalid number of entries");
  3460. }
  3461. });
  3462. addCommand("clan", function(input){
  3463. r.send(8, input[1]);
  3464. returnMsg("Attemped to make clan '"+input[1]+"'")
  3465. });
  3466. addCommand("addSid", function(input){
  3467. syncSid = input[1]
  3468. returnMsg("Sid saved for sync")
  3469. });
  3470. addCommand("mySid", function(input){
  3471. returnMsg("Your sid is " + R.sid)
  3472. });
  3473. addCommand("unclan", function(input){
  3474. r.send(9);
  3475. returnMsg("Attempted to leave clan");
  3476. });
  3477. addCommand("join", function(input){
  3478. r.send(10, input[1]);
  3479. returnMsg("Attempted to join clan '"+input[1]+"'");
  3480. });
  3481. addCommand("kick", function(input){
  3482. if(isNaN(input[1])){
  3483. returnMsg("'"+input[1]+"' is not a id(number)");
  3484. }else{
  3485. if(isAlly(input[1])){
  3486. if(R.isOwner){
  3487. r.send(12, input[1]);
  3488. returnMsg("Attempted to kick '"+input[1]+"'");
  3489. }else{
  3490. returnMsg("You are not owner");
  3491. }
  3492. }else{
  3493. returnMsg("'"+input[1]+"' is not in clan");
  3494. }
  3495. }
  3496. });
  3497. addCommand("upgrade", function(input){
  3498. input[1] = input[1].replace("_", " ");
  3499. input[1] = input[1].toLowerCase();
  3500. if(isNaN(input[1])){
  3501. for(let i = 0;i < l.weapons.length;i++){
  3502. if(l.weapons[i].name == input[1]){
  3503. r.send(6, i);
  3504. returnMsg("Attempted to upgrade to '"+l.weapons[i].name+"'");
  3505. return;
  3506. }
  3507. }
  3508. returnMsg("Weapon '"+input[1]+"' not found");
  3509. }else{
  3510. if(l.weapons[input[1]]){
  3511. r.send(6, input[1]);
  3512. returnMsg("Attempted to upgrade to '"+l.weapons[input[1]].name+"'");
  3513. }else{
  3514. returnMsg("Weapon '"+input[1]+"' not found");
  3515. }
  3516. }
  3517. });
  3518. addCommand("disconnect", function(input){
  3519. for(let i = 0;i < 10;i++){
  3520. r.send("sp", {
  3521. name: "Kick",
  3522. moofoll: H,
  3523. skin: ae
  3524. })
  3525. }
  3526. });
  3527. function addChat(name, msg){
  3528. chatHistory.push(name);
  3529. chatHistory.push(msg);
  3530. if(chatHistory.length > 30){
  3531. chatHistory.splice(0, 2);
  3532. }
  3533. refreshChat();
  3534. }
  3535. window.returnMsg = function(msg){
  3536. addChat("~", msg);
  3537. }
  3538. function rn() {
  3539. on ? setTimeout((function() {
  3540. var e = prompt("chat message");
  3541. e && sn(e)
  3542. }
  3543. ), 1) : "block" == nn.style.display ? (tn.value && doCommand(tn.value) && sn(tn.value),
  3544. tn.value.charAt(0) == commandPrefix || an()) : (Qe.style.display = "none",
  3545. Ye.style.display = "none",
  3546. nn.style.display = "block",
  3547. tn.focus(),
  3548. refreshChat(),
  3549. yn()),
  3550. tn.value = ""
  3551. }
  3552. function sn(e) {
  3553. r.send("ch", e.slice(0, 30))
  3554. }
  3555. function an() {
  3556. tn.value = "",
  3557. nn.style.display = "none"
  3558. }
  3559. var on, cn, ln = ["cunt", "whore", "fuck", "shit", "faggot", "nigger", "nigga", "dick", "vagina", "minge", "cock", "rape", "cum", "sex", "tits", "penis", "clit", "pussy", "meatcurtain", "jizz", "prune", "douche", "wanker", "damn", "bitch", "dick", "fag", "bastard"];
  3560. function hn(e, t) {
  3561. for(let i = 0; i < ignoreList.length; i++){
  3562. if(ignoreList[i] == e){
  3563. return;
  3564. }
  3565. }
  3566. var n = Ii(e);
  3567. n && (n.chatMessage = function(e) {
  3568. for (var t, n = 0; n < ln.length; ++n)
  3569. if (e.indexOf(ln[n]) > -1) {
  3570. t = "";
  3571. for (var i = 0; i < ln[n].length; ++i)
  3572. t += t.length ? "o" : "M";
  3573. var r = new RegExp(ln[n],"g");
  3574. e = e.replace(r, t)
  3575. }
  3576. return e
  3577. }(t),
  3578. n.chatCountdown = o.chatCountdown,
  3579. addChat(n.name+" ["+e+"]", t))
  3580. }
  3581. function un() {
  3582. F = window.innerWidth,
  3583. z = window.innerHeight;
  3584. var e = Math.max(F / oe, z / ce) * V;
  3585. we.width = F * V,
  3586. we.height = z * V,
  3587. we.style.width = F + "px",
  3588. we.style.height = z + "px",
  3589. be.setTransform(e, 0, 0, e, (F * V - oe * e) / 2, (z * V - ce * e) / 2)
  3590. }
  3591. function fn(e) {
  3592. (on = e) ? Ae.classList.add("touch") : Ae.classList.remove("touch")
  3593. }
  3594. function dn(e) {
  3595. e.preventDefault(),
  3596. e.stopPropagation(),
  3597. fn(!0);
  3598. for (var t = 0; t < e.changedTouches.length; t++) {
  3599. var n = e.changedTouches[t];
  3600. n.identifier == re.id ? (re.id = -1,
  3601. bn()) : n.identifier == se.id && (se.id = -1,
  3602. R.buildIndex >= 0 && (O = 1,
  3603. vn(e)),
  3604. O = 0,
  3605. vn(e))
  3606. }
  3607. }
  3608. function pn() {
  3609. return R ? (-1 != se.id ? cn = Math.atan2(se.currentY - se.startY, se.currentX - se.startX) : R.lockDir || on || (cn = Math.atan2(ie - z / 2, ne - F / 2)),
  3610. s.fixTo(cn || 0, 2)) : 0
  3611. }
  3612. window.addEventListener("resize", s.checkTrusted(un)),
  3613. un(),
  3614. fn(!1),
  3615. window.setUsingTouch = fn,
  3616. we.addEventListener("touchmove", s.checkTrusted((function(e) {
  3617. e.preventDefault(),
  3618. e.stopPropagation(),
  3619. fn(!0);
  3620. for (var t = 0; t < e.changedTouches.length; t++) {
  3621. var n = e.changedTouches[t];
  3622. n.identifier == re.id ? (re.currentX = n.pageX,
  3623. re.currentY = n.pageY,
  3624. bn()) : n.identifier == se.id && (se.currentX = n.pageX,
  3625. se.currentY = n.pageY,
  3626. O = 1)
  3627. }
  3628. }
  3629. )), !1),
  3630. we.addEventListener("touchstart", s.checkTrusted((function(e) {
  3631. e.preventDefault(),
  3632. e.stopPropagation(),
  3633. fn(!0);
  3634. for (var t = 0; t < e.changedTouches.length; t++) {
  3635. var n = e.changedTouches[t];
  3636. n.pageX < document.body.scrollWidth / 2 && -1 == re.id ? (re.id = n.identifier,
  3637. re.startX = re.currentX = n.pageX,
  3638. re.startY = re.currentY = n.pageY,
  3639. bn()) : n.pageX > document.body.scrollWidth / 2 && -1 == se.id && (se.id = n.identifier,
  3640. se.startX = se.currentX = n.pageX,
  3641. se.startY = se.currentY = n.pageY,
  3642. R.buildIndex < 0 && (O = 1,
  3643. vn()))
  3644. }
  3645. }
  3646. )), !1),
  3647. we.addEventListener("touchend", s.checkTrusted(dn), !1),
  3648. we.addEventListener("touchcancel", s.checkTrusted(dn), !1),
  3649. we.addEventListener("touchleave", s.checkTrusted(dn), !1),
  3650. we.addEventListener("mousemove", (function(e) {
  3651. e.preventDefault(),
  3652. e.stopPropagation(),
  3653. fn(!1),
  3654. ne = e.clientX,
  3655. ie = e.clientY,
  3656. !nTy && !AA && ( r.send("2", pn()))
  3657. }
  3658. ), !1),
  3659. we.addEventListener("mousedown", (function(e) {
  3660. fn(!1),
  3661. 1 != O && (O = 1,
  3662. vn(e))
  3663. }
  3664. ), !1),
  3665. we.addEventListener("mouseup", (function(e) {
  3666. fn(!1),
  3667. 0 != O && (O = 0,
  3668. vn(e))
  3669. }
  3670. ), !1);
  3671. var gn = {}
  3672. , mn = {
  3673. 87: [0, -1],
  3674. 38: [0, -1],
  3675. 83: [0, 1],
  3676. 40: [0, 1],
  3677. 65: [-1, 0],
  3678. 37: [-1, 0],
  3679. 68: [1, 0],
  3680. 39: [1, 0]
  3681. };
  3682. function yn() {
  3683. gn = {},
  3684. r.send("rmd")
  3685. }
  3686. function kn() {
  3687. return "block" != Ye.style.display && "block" != nn.style.display
  3688. }
  3689. var Tb;
  3690. function vn(e) {
  3691. R && R.alive && r.send("c", O, R.buildIndex >= 0 ? pn() : null);
  3692. if(e.isTrusted){
  3693. if(e.button == 1){
  3694. multiInsta()
  3695. if(O){
  3696. Tb = e.button;
  3697. }
  3698. }else{
  3699. if(O){
  3700. Tb = e.button;
  3701. clickerID = setInterval(function(){
  3702. let clickEvent = document.createEvent ('MouseEvents');
  3703. clickEvent.initEvent ("mouseup", true, true);
  3704. we.dispatchEvent (clickEvent);
  3705. clickEvent = document.createEvent ('MouseEvents');
  3706. clickEvent.initEvent ("mousedown", true, true);
  3707. we.dispatchEvent (clickEvent);
  3708. },15);
  3709. }else{
  3710. clearInterval(clickerID);
  3711. }
  3712. }
  3713. }else if(!iI && oW != 8 && oW != 11 && oW !=14){
  3714. if(oW < 9){
  3715. if(priR[R.sid] == 1){
  3716. if(R.weapons[1] == 10 && Tb == 2){
  3717. oW = R.weapons[1];
  3718. Sn(R.weapons[1], 1);
  3719. }else{
  3720. Sn(R.weapons[0], 1);
  3721. }
  3722. iI++;
  3723. r.send(7, 1);
  3724. if(Tb == 2){
  3725. Hg(40, 21);
  3726. }else if(Tb == 0){
  3727. Jt(0, 1);
  3728. Hg((nEy[9] == 11 ? 6 : 7), 21);
  3729. }
  3730. setTimeout(function(){
  3731. iI--;
  3732. r.send(7, 1);
  3733. },120)
  3734. }
  3735. }else if(oW > 8){
  3736. if(secR[R.sid] == 1){
  3737. if(R.weapons[1] == 10 && Tb == 0){
  3738. oW = R.weapons[0];
  3739. Sn(R.weapons[0], 1);
  3740. }else{
  3741. Sn(R.weapons[1], 1);
  3742. }
  3743. iI++;
  3744. r.send(7, 1);
  3745. if(oW == 10){
  3746. Hg(40, 21);
  3747. }else if(Tb == 2){
  3748. Hg(32, 21);
  3749. }
  3750. setTimeout(function(){
  3751. iI--;
  3752. r.send(7, 1);
  3753. },120)
  3754. }
  3755. }
  3756. }
  3757. }
  3758. function plc(id, angle, times){
  3759. for(let i = 0;i<times;i++)
  3760. Sn(id),r.send("c", 1, angle),r.send("c", 0, angle),Sn(oW, 1)
  3761. }
  3762. var hT = {Shift:0, z:40, b:6, t:53, i:22, j:7};
  3763. var dH = 0;
  3764. var Dc = [toRad(0), toRad(90),toRad(180),toRad(270),toRad(45),toRad(135),toRad(225),toRad(315)];
  3765. var sP = Mb('v', ()=>{plc(R.items[2], pn, 1)},0)
  3766. var hP = Mb('q', ()=>{plc(R.items[0], pn, 1)},0)
  3767. var tP = Mb('f', ()=>{plc(R.items[4], pn, 1)},0)
  3768. var cP = Mb('h', ()=>{plc(R.items[5], pn, 1)},0)
  3769. var pP = Mb('p', ()=>{
  3770. for(let i = 0;i < 8;i++){plc(20, Dc[i], 1)}},100)
  3771. var tsP = Mb('o', ()=>{
  3772. for(let i = 0;i < 8;i++){plc(R.items[4], Dc[i], 1)}},100)
  3773. var ssP = Mb('l', ()=>{
  3774. for(let i = 0;i < 8;i++){plc(R.items[2], Dc[i], 1)}},100)
  3775. window.addEventListener("keydown", s.checkTrusted((function(e) {
  3776. var t = e.which || e.keyCode || 0;
  3777. if(t == 87 && document.activeElement.id.toLowerCase() !== 'chatbox'){
  3778. keys.w = true
  3779. }
  3780. if(t == 65 && document.activeElement.id.toLowerCase() !== 'chatbox'){
  3781. keys.a = true
  3782. }
  3783. if(t == 83 && document.activeElement.id.toLowerCase() !== 'chatbox'){
  3784. keys.s = true
  3785. }
  3786. if(t == 68 && document.activeElement.id.toLowerCase() !== 'chatbox'){
  3787. keys.d = true
  3788. }
  3789. if(t == 78 && document.activeElement.id.toLowerCase() !== 'chatbox'){
  3790. millON = !millON
  3791. }
  3792. if(t == 97 && document.activeElement.id.toLowerCase() !== 'chatbox'){
  3793. nobull = !nobull
  3794. sn("nobull " + nobull)
  3795. }
  3796. if(t == 98 && document.activeElement.id.toLowerCase() !== 'chatbox'){
  3797. laginsta = !laginsta
  3798. sn("lag insta " + laginsta)
  3799. }
  3800. if(t == 46 && document.activeElement.id.toLowerCase() !== 'chatbox'){
  3801. ws.oldSend(crashRip)
  3802. }
  3803. if(t == 226 && document.activeElement.id.toLowerCase() !== 'chatbox' && !dashinsta){
  3804. dashinsta++;
  3805. r.send("33", nEA)
  3806. ws.oldSend(lagRip)
  3807. setTimeout(function(){
  3808. r.send("33", null)
  3809. xn()
  3810. dashinsta--;
  3811. },500)
  3812. }
  3813. if(t == 26){
  3814. if(freeCam){
  3815. clearInterval(camID);
  3816. freeCam = false;
  3817. camX = 0;
  3818. camY = 0;
  3819. oe = 1920;
  3820. ce = 1080;
  3821. un();
  3822. }else{
  3823. camID = setInterval(function(){
  3824. if(camDir !== undefined){
  3825. camX += 10 * Math.cos(camDir);
  3826. camY += 10 * Math.sin(camDir);
  3827. }
  3828. })
  3829. freeCam = true;
  3830. }
  3831. }
  3832. 27 == t ? Qt() : R && R.alive && kn() && (gn[t] || (gn[t] = 1,
  3833. 69 == t ? r.send("7", 1) : 67 == t ? (Mt || (Mt = {}),
  3834. Mt.x = R.x,
  3835. Mt.y = R.y) : 88 == t ? (R.lockDir = R.lockDir ? 0 : 1,
  3836. r.send("7", 0)) : null != R.weapons[t - 49] ? (Sn(R.weapons[t - 49], !0),oW = R.weapons[t - 49]) : null != R.items[t - 49 - R.weapons.length] ? Sn(R.items[t - 49 - R.weapons.length]) : 81 == t ? Sn(R.items[0]) : 82 == t ? xn() : mn[t] ? bn() : 32 == t && (space++),
  3837. sP.start(e.key),hP.start(e.key),tP.start(e.key),cP.start(e.key),pP.start(e.key),tsP.start(e.key),ssP.start(e.key),
  3838. hT[e.key]!=undefined&&(Qe.style.display == "block"?(hT[e.key]?(Jt(hT[e.key])):(
  3839. R.y2<2400?(Hg(15,11)):((R.y2>6850&&R.y2<7550)?Hg(31,11):Hg(12,11))
  3840. )):(dH=hT[e.key]))))
  3841. }
  3842. ))),
  3843. window.addEventListener("keyup", s.checkTrusted((function(e) {
  3844. if (R && R.alive) {
  3845. var t = e.which || e.keyCode || 0;
  3846. if(t == 87 && document.activeElement.id.toLowerCase() !== 'chatbox'){
  3847. keys.w = false
  3848. }
  3849. if(t == 65 && document.activeElement.id.toLowerCase() !== 'chatbox'){
  3850. keys.a = false
  3851. }
  3852. if(t == 83 && document.activeElement.id.toLowerCase() !== 'chatbox'){
  3853. keys.s = false
  3854. }
  3855. if(t == 68 && document.activeElement.id.toLowerCase() !== 'chatbox'){
  3856. keys.d = false
  3857. }
  3858. 13 == t ? rn() : kn() && gn[t] && (gn[t] = 0,
  3859. mn[t] ? bn() : 32 == t && (O = 0,
  3860. vn(e)),
  3861. sP.stop(e.key),hP.stop(e.key),tP.stop(e.key),cP.stop(e.key),pP.stop(e.key),tsP.stop(e.key),ssP.stop(e.key))
  3862. }
  3863. }
  3864. )));
  3865. var wn = void 0;
  3866. function bn() {
  3867. var e = function() {
  3868. var e = 0
  3869. , t = 0;
  3870. if (-1 != re.id)
  3871. e += re.currentX - re.startX,
  3872. t += re.currentY - re.startY;
  3873. else
  3874. for (var n in mn) {
  3875. var i = mn[n];
  3876. e += !!gn[n] * i[0],
  3877. t += !!gn[n] * i[1]
  3878. }
  3879. return 0 == e && 0 == t ? void 0 : s.fixTo(Math.atan2(t, e), 2)
  3880. }();
  3881. if(!freeCam){
  3882. (null == wn || null == e || Math.abs(e - wn) > .3) && (r.send("33", e),
  3883. wn = e)
  3884. }else if(null == wn || null == e || Math.abs(e - wn) > .3){
  3885. camDir = e;
  3886. }
  3887. }
  3888. function multiInsta() {
  3889. if(iI || priR[R.sid]+111/l.weapons[R.primary].speed < 1 || (nEs.length ? nEy[5] == 11 : false)){
  3890. return;
  3891. }
  3892. if(R.weapons[0] == 0){
  3893. DS++;
  3894. iI++;
  3895. AA++;
  3896. r.send("2", nEA);
  3897. Jt(0, 1);
  3898. Hg((nEy[9] == 11 ? 6 : 7), 21)
  3899. oW = R.weapons[0];
  3900. Sn(oW, 1);
  3901. r.send("7", 1);
  3902. setTimeout(function(){
  3903. r.send("c", 1);
  3904. r.send("6", 5);
  3905. r.send("c", 0);
  3906. setTimeout(function(){
  3907. r.send("6", 3)
  3908. r.send("6", 17)
  3909. r.send("6", 31)
  3910. r.send("6", 23)
  3911. r.send("6", 9)
  3912. r.send("6", 38)
  3913. r.send("c", 1);
  3914. r.send("6", 4)
  3915. r.send("c", 0);
  3916. setTimeout(function(){
  3917. Hg((nEy[9] == 22 ? 6 : 53), 21)
  3918. oW = 9;
  3919. r.send("c", 1);
  3920. Sn(oW, 1);
  3921. r.send("c", 0);
  3922. setTimeout(function(){
  3923. r.send("c", 1);
  3924. r.send("6", 12)
  3925. r.send("c", 9);
  3926. setTimeout(function(){
  3927. r.send("c", 1);
  3928. r.send("6", 15)
  3929. r.send("c", 0);
  3930. setTimeout(function(){
  3931. Hg(6, 21)
  3932. r.send("7", 1);
  3933. oW = R.weapons[0];
  3934. Sn(oW, 1);
  3935. DS--;
  3936. iI--;
  3937. AA--;
  3938. r.send(2, pn());
  3939. },120);
  3940. },120);
  3941. },150);
  3942. },150);
  3943. },120);
  3944. },120);
  3945. }
  3946. if(R.weapons[1] == 9 && R.weapons[0] != 4 || R.weapons[0] != 2){
  3947. DS++;
  3948. iI++;
  3949. AA++;
  3950. r.send("2", nEA);
  3951. Jt(0, 1);
  3952. Hg((nEy[9] == 11 ? 6 : 7), 21)
  3953. oW = R.weapons[0];
  3954. Sn(oW, 1);
  3955. r.send("7", 1);
  3956. setTimeout(function(){
  3957. Hg((nEy[9] == 22 ? 6 : 53), 21)
  3958. oW = 9;
  3959. r.send("c", 1);
  3960. Sn(oW, 1);
  3961. r.send("c", 0);
  3962. setTimeout(function(){
  3963. r.send("c", 1);
  3964. r.send("6", 12)
  3965. r.send("c", 0);
  3966. setTimeout(function(){
  3967. r.send("c", 1);
  3968. r.send("6", 15)
  3969. r.send("c", 0);
  3970. setTimeout(function(){
  3971. Hg(6, 21)
  3972. r.send("7", 1);
  3973. oW = R.weapons[0];
  3974. Sn(oW, 1);
  3975. DS--;
  3976. iI--;
  3977. AA--;
  3978. r.send(2, pn());
  3979. },120);
  3980. },120);
  3981. },150);
  3982. },120);
  3983. } else if(R.weapons[1] == 9 && R.weapons[0] == 4 || R.weapons[0] == 2 || R.items[3] == 12){
  3984. DS++;
  3985. iI++;
  3986. AA++;
  3987. r.send("2", nEA);
  3988. Jt(0, 1);
  3989. Hg((nEy[9] == 11 ? 6 : 7), 21)
  3990. oW = R.weapons[0];
  3991. Sn(oW, 1);
  3992. r.send("7", 1);
  3993. setTimeout(function(){
  3994. Hg((nEy[9] == 22 ? 6 : 53), 21)
  3995. oW = 9;
  3996. r.send("c", 1);
  3997. Sn(oW, 1);
  3998. r.send("c", 0);
  3999. setTimeout(function(){
  4000. r.send("c", 1);
  4001. r.send("6", 15)
  4002. r.send("c", 0);
  4003. setTimeout(function(){
  4004. Hg(6, 21)
  4005. r.send("7", 1);
  4006. oW = R.weapons[0];
  4007. Sn(oW, 1);
  4008. DS--;
  4009. iI--;
  4010. AA--;
  4011. r.send(2, pn());
  4012. },120);
  4013. },140);
  4014. },120);
  4015. }
  4016. if(R.weapons[1] == 12){
  4017. DS++;
  4018. iI++;
  4019. AA++;
  4020. r.send("2", nEA);
  4021. Jt(0, 1);
  4022. Hg((nEy[9] == 11 ? 6 : 7), 21)
  4023. oW = R.weapons[0];
  4024. Sn(oW, 1);
  4025. r.send("7", 1);
  4026. setTimeout(function(){
  4027. Hg((nEy[9] == 22 ? 6 : 53), 21)
  4028. oW = 12;
  4029. r.send("c", 1);
  4030. Sn(oW, 1);
  4031. r.send("c", 0);
  4032. setTimeout(function(){
  4033. r.send("c", 1);
  4034. r.send("6", 15)
  4035. r.send("c", 0);
  4036. setTimeout(function(){
  4037. Hg(6, 21)
  4038. r.send("7", 1);
  4039. oW = R.weapons[0];
  4040. Sn(oW, 1);
  4041. DS--;
  4042. iI--;
  4043. AA--;
  4044. r.send(2, pn());
  4045. },120);
  4046. },150);
  4047. },120);
  4048. }
  4049. if(R.weapons[1] == 15){
  4050. DS++;
  4051. iI++;
  4052. AA++;
  4053. r.send("2", nEA);
  4054. Hg((nEy[9] == 22 ? 6 : 53), 21)
  4055. oW = R.weapons[1];
  4056. Sn(oW, 1);
  4057. r.send("7", 1);
  4058. setTimeout(function(){
  4059. Hg(6, 21)
  4060. r.send("7", 1);
  4061. oW = R.weapons[0];
  4062. Sn(oW, 1);
  4063. DS--;
  4064. iI--;
  4065. AA--;
  4066. r.send(2, pn());
  4067. },170);
  4068. }
  4069. }
  4070. function xn() {
  4071. if(iI || priR[R.sid]+111/l.weapons[R.primary].speed < 1 || (nEs.length ? nEy[5] == 11 : false)){
  4072. return;
  4073. }/*
  4074. if((nEy[5] == 11 ? Ii(nEy[0]).dir <= M(ath.atan2(R.y - nEy[2], R.x - nEy[1]) - Math.PI / 3) && Ii(nEy[0]).dir >= (Math.atan2(R.y - nEy[2], R.x - nEy[1]) + Math.PI / 3) : false)){
  4075. */
  4076. DS++;
  4077. iI++;
  4078. AA++;
  4079. aimxd++;
  4080. r.send("2", nEA);
  4081. Jt(0, 1);
  4082. if(!nobull){
  4083. Hg((nEy[9] == 11 && nEy.length ? 6 : 7), 21)
  4084. } else {
  4085. Hg((nEy[9] == 6 && nEy.length ? 7 : 11), 21)
  4086. }
  4087. oW = R.weapons[0];
  4088. Sn(oW, 1);
  4089. r.send("7", 1);
  4090. setTimeout(function(){
  4091. Hg((nEy[9] == 22 ? 6 : 53), 21)
  4092. oW = R.weapons[1] || R.weapons[0];
  4093. Sn(oW, 1);
  4094. if(laginsta){
  4095. ws.oldSend(lagRip)
  4096. }
  4097. setTimeout(function(){
  4098. Hg(6, 21)
  4099. r.send("7", 1);
  4100. oW = R.weapons[0];
  4101. Sn(oW, 1);
  4102. DS--;
  4103. iI--;
  4104. AA--;
  4105. aimxd--;
  4106. r.send(2, pn());
  4107. },110);
  4108. },laginsta ? 78 : 110)
  4109. }/*
  4110. }*/
  4111. function Sn(e, t) {
  4112. r.send("5", e, t)
  4113. }
  4114. function Tn() {
  4115. I("moo_name", Le.value),
  4116. !le && r.connected && (le = !0,
  4117. x.stop("menu"),
  4118. dt("Loading..."),
  4119. r.send("sp", {
  4120. name: Le.value,
  4121. moofoll: H,
  4122. skin: ae
  4123. })),
  4124. document.getElementById("ot-sdk-btn-floating").style.display = "none"
  4125. }
  4126. var In = !0;
  4127. function En(e) {
  4128. Pe.style.display = "none",
  4129. Me.style.display = "block",
  4130. he.style.display = "none",
  4131. gn = {},
  4132. j = e,
  4133. O = 0,
  4134. le = !0,
  4135. In && (In = !1,
  4136. N.length = 0)
  4137. }
  4138. function Mn(e, t, n, i) {
  4139. m.showText(e, t, 50, .18, 500, Math.abs(n), n >= 0 ? "#fff" : "#8ecc51")
  4140. }
  4141. var An = 99999;
  4142. function Pn() {
  4143. oW = 0;
  4144. le = !1;
  4145. try {
  4146. factorem.refreshAds([2], !0)
  4147. } catch (e) {}
  4148. Be.style.display = "none",
  4149. Qt(),
  4150. It = {
  4151. x: R.x,
  4152. y: R.y
  4153. },
  4154. Pe.style.display = "none",
  4155. Ge.style.display = "block",
  4156. Ge.style.fontSize = "0px",
  4157. An = 0,
  4158. setTimeout((function() {
  4159. Me.style.display = "block",
  4160. he.style.display = "block",
  4161. Ge.style.display = "none"
  4162. }
  4163. ), o.deathFadeout),
  4164. gt(),
  4165. document.getElementById("ot-sdk-btn-floating").style.display = "block"
  4166. }
  4167. function Bn(e) {
  4168. R && nt.removeAllItems(e)
  4169. }
  4170. function Cn(e) {
  4171. for(let i = 0; i < N.length; i++){
  4172. if(N[i].sid == e){
  4173. if((R.x2-N[i].x)**2+(R.y2-N[i].y)**2 < 1.21e4 && nEy.length){
  4174. if(fgd(nEy, R) < 200){
  4175. for(let i = 0;i < 24;i++){
  4176. if(toRad(15) * i<=nEA+toRad(90) && toRad(15) * i>=nEA-toRad(90)){
  4177. plc(R.items[2], toRad(15) * i, 1)
  4178. }
  4179. plc(R.items[4], toRad(15) * i, 1)
  4180. }
  4181. r.send("2", pn());
  4182. }else{
  4183. for(let i = 0;i < 24;i++){
  4184. plc(R.items[4], toRad(15) * i, 1)
  4185. }
  4186. r.send("2", pn());
  4187. }
  4188. }
  4189. nt.disableObj(N[i]);
  4190. break;
  4191. }
  4192. }
  4193. //nt.disableBySid(e)
  4194. }
  4195. function On() {
  4196. Oe.innerText = R.points,
  4197. Re.innerText = R.food,
  4198. je.innerText = R.wood,
  4199. _e.innerText = R.stone,
  4200. Ue.innerText = R.kills
  4201. }
  4202. var Rn = {}
  4203. , jn = ["crown", "skull"]
  4204. , _n = [];
  4205. function Un(e, t) {
  4206. if (R.upgradePoints = e,
  4207. R.upgrAge = t,
  4208. e > 0) {
  4209. _n.length = 0,
  4210. s.removeAllChildren(Ve);
  4211. for (var n = 0; n < l.weapons.length; ++n)
  4212. l.weapons[n].age == t && (null == l.weapons[n].pre || R.weapons.indexOf(l.weapons[n].pre) >= 0) && (s.generateElement({
  4213. id: "upgradeItem" + n,
  4214. class: "actionBarItem",
  4215. onmouseout: function() {
  4216. Tt()
  4217. },
  4218. parent: Ve
  4219. }).style.backgroundImage = document.getElementById("actionBarItem" + n).style.backgroundImage,
  4220. _n.push(n));
  4221. for (n = 0; n < l.list.length; ++n)
  4222. if (l.list[n].age == t && (null == l.list[n].pre || R.items.indexOf(l.list[n].pre) >= 0)) {
  4223. var i = l.weapons.length + n;
  4224. s.generateElement({
  4225. id: "upgradeItem" + i,
  4226. class: "actionBarItem",
  4227. onmouseout: function() {
  4228. Tt()
  4229. },
  4230. parent: Ve
  4231. }).style.backgroundImage = document.getElementById("actionBarItem" + i).style.backgroundImage,
  4232. _n.push(i)
  4233. }
  4234. for (n = 0; n < _n.length; n++)
  4235. !function(e) {
  4236. var t = document.getElementById("upgradeItem" + e);
  4237. t.onmouseover = function() {
  4238. l.weapons[e] ? Tt(l.weapons[e], !0) : Tt(l.list[e - l.weapons.length])
  4239. }
  4240. ,
  4241. t.onclick = s.checkTrusted((function() {
  4242. r.send("6", e)
  4243. }
  4244. )),
  4245. s.hookTouchEvents(t)
  4246. }(_n[n]);
  4247. _n.length ? (Ve.style.display = "block",
  4248. qe.style.display = "block",
  4249. qe.innerHTML = "SELECT ITEMS (" + e + ")") : (Ve.style.display = "none",
  4250. qe.style.display = "none",
  4251. Tt())
  4252. } else
  4253. Ve.style.display = "none",
  4254. qe.style.display = "none",
  4255. Tt()
  4256. }
  4257. function Dn(e, t, n) {
  4258. null != e && (R.XP = e),
  4259. null != t && (R.maxXP = t),
  4260. null != n && (R.age = n),
  4261. n == o.maxAge ? (ze.innerHTML = "MAX AGE",
  4262. He.style.width = "100%") : (ze.innerHTML = "AGE " + R.age,
  4263. He.style.width = R.XP / R.maxXP * 100 + "%")
  4264. }
  4265. function Ln(e) {
  4266. s.removeAllChildren(De);
  4267. for (var t = 1, n = 0; n < e.length; n += 3)
  4268. !function(n) {
  4269. s.generateElement({
  4270. class: "leaderHolder",
  4271. parent: De,
  4272. children: [s.generateElement({
  4273. class: "leaderboardItem",
  4274. style: "color:" + (e[n] == j ? "#fff" : "rgba(255,255,255,0.6)"),
  4275. text: t + ". " + ("" != e[n + 1] ? e[n + 1] : "unknown")
  4276. }), s.generateElement({
  4277. class: "leaderScore",
  4278. text: s.kFormat(e[n + 2]) || "0"
  4279. })]
  4280. })
  4281. }(n),
  4282. t++
  4283. }
  4284. function Fn(e, t, n, i) {
  4285. be.save(),
  4286. be.setTransform(1, 0, 0, 1, 0, 0),
  4287. be.scale(V, V);
  4288. var r = 50;
  4289. be.beginPath(),
  4290. be.arc(e, t, r, 0, 2 * Math.PI, !1),
  4291. be.closePath(),
  4292. be.fillStyle = "rgba(255, 255, 255, 0.3)",
  4293. be.fill(),
  4294. r = 50;
  4295. var s = n - e
  4296. , a = i - t
  4297. , o = Math.sqrt(Math.pow(s, 2) + Math.pow(a, 2))
  4298. , c = o > r ? o / r : 1;
  4299. s /= c,
  4300. a /= c,
  4301. be.beginPath(),
  4302. be.arc(e + s, t + a, .5 * r, 0, 2 * Math.PI, !1),
  4303. be.closePath(),
  4304. be.fillStyle = "white",
  4305. be.fill(),
  4306. be.restore()
  4307. }
  4308. function zn(e, t, n) {
  4309. for (var i = 0; i < G.length; ++i)
  4310. (_ = G[i]).active && _.layer == e && (_.update(P),
  4311. _.active && ki(_.x - t, _.y - n, _.scale) && (be.save(),
  4312. be.translate(_.x - t, _.y - n),
  4313. be.rotate(_.dir),
  4314. Vn(0, 0, _, be, 1),
  4315. be.restore()))
  4316. }
  4317. var Hn = {};
  4318. function Vn(e, t, n, i, r) {
  4319. if (n.src) {
  4320. var s = l.projectiles[n.indx].src
  4321. , a = Hn[s];
  4322. a || ((a = new Image).onload = function() {
  4323. this.isLoaded = !0
  4324. }
  4325. ,
  4326. a.src = ".././img/weapons/" + s + ".png",
  4327. Hn[s] = a),
  4328. a.isLoaded && i.drawImage(a, e - n.scale / 2, t - n.scale / 2, n.scale, n.scale)
  4329. } else
  4330. 1 == n.indx && (i.fillStyle = "#939393",
  4331. si(e, t, n.scale, i))
  4332. }
  4333. function qn(e, t, n, i) {
  4334. var r = o.riverWidth + i
  4335. , s = o.mapScale / 2 - t - r / 2;
  4336. s < ce && s + r > 0 && n.fillRect(0, s, oe, r)
  4337. }
  4338. function Yn(e, t, n) {
  4339. for (var i, r, s, a = 0; a < N.length; ++a)
  4340. (_ = N[a]).active && (r = _.x + _.xWiggle - t,
  4341. s = _.y + _.yWiggle - n,
  4342. 0 == e && _.update(P),
  4343. _.layer == e && ki(r, s, _.scale + (_.blocker || 0)) && (be.globalAlpha = _.hideFromEnemy ? .6 : 1,
  4344. _.isItem ? (i = ri(_),
  4345. be.save(),
  4346. be.translate(r, s),
  4347. (_.dir > 1e300 || _.dir < -1e300 ? (be.globalAlpha = 0.5, be.rotate(Math.atan2(Math.sin(_.dir), Math.cos(_.dir)))) : be.rotate(_.dir)),
  4348. be.drawImage(i, -i.width / 2, -i.height / 2),
  4349. _.blocker && (be.strokeStyle = "#db6e6e",
  4350. be.globalAlpha = .3,
  4351. be.lineWidth = 6,
  4352. si(0, 0, _.blocker, be, !1, !0)),
  4353. be.restore()) : (i = ni(_),
  4354. be.drawImage(i, r - i.width / 2, s - i.height / 2))))
  4355. }
  4356. function Wn(e, t, n) {
  4357. (_ = Ii(e)) && (_.startAnim(t, n), n == 10 || n == 14 ? setTimeout(()=>{secR[e] = 0})
  4358. :setTimeout(()=>{priR[e] = 0}))
  4359. }
  4360. function Xn(e, t, n) {
  4361. be.globalAlpha = 1;
  4362. for (var i = 0; i < W.length; ++i)
  4363. (_ = W[i]).zIndex == n && (_.animate(P),
  4364. _.visible && (_.skinRot += .002 * P,
  4365. L = _.dir + _.dirPlus,
  4366. be.save(),
  4367. be.translate(_.x - e, _.y - t),
  4368. be.rotate(L),
  4369. Nn(_, be),
  4370. be.restore()))
  4371. }
  4372. function Nn(e, t) {
  4373. (t = t || be).lineWidth = 5.5,
  4374. t.lineJoin = "miter";
  4375. var n = Math.PI / 4 * (l.weapons[e.weaponIndex].armS || 1)
  4376. , i = e.buildIndex < 0 && l.weapons[e.weaponIndex].hndS || 1
  4377. , r = e.buildIndex < 0 && l.weapons[e.weaponIndex].hndD || 1;
  4378. if (e.tailIndex > 0 && function(e, t, n) {
  4379. if (!(Gn = Qn[e])) {
  4380. var i = new Image;
  4381. i.onload = function() {
  4382. this.isLoaded = !0,
  4383. this.onload = null
  4384. }
  4385. ,
  4386. i.src = ".././img/accessories/access_" + e + ".png",
  4387. Qn[e] = i,
  4388. Gn = i
  4389. }
  4390. var r = $n[e];
  4391. if (!r) {
  4392. for (var s = 0; s < tt.length; ++s)
  4393. if (tt[s].id == e) {
  4394. r = tt[s];
  4395. break
  4396. }
  4397. $n[e] = r
  4398. }
  4399. Gn.isLoaded && (t.save(),
  4400. t.translate(-20 - (r.xOff || 0), 0),
  4401. r.spin && t.rotate(n.skinRot),
  4402. t.drawImage(Gn, -r.scale / 2, -r.scale / 2, r.scale, r.scale),
  4403. t.restore())
  4404. }(e.tailIndex, t, e),
  4405. e.buildIndex < 0 && !l.weapons[e.weaponIndex].aboveHand && (ei(l.weapons[e.weaponIndex], o.weaponVariants[e.weaponVariant].src, e.scale, 0, t),
  4406. null == l.weapons[e.weaponIndex].projectile || l.weapons[e.weaponIndex].hideProjectile || Vn(e.scale, 0, l.projectiles[l.weapons[e.weaponIndex].projectile], be)),
  4407. t.fillStyle = o.skinColors[e.skinColor],
  4408. si(e.scale * Math.cos(n), e.scale * Math.sin(n), 14),
  4409. si(e.scale * r * Math.cos(-n * i), e.scale * r * Math.sin(-n * i), 14),
  4410. e.buildIndex < 0 && l.weapons[e.weaponIndex].aboveHand && (ei(l.weapons[e.weaponIndex], o.weaponVariants[e.weaponVariant].src, e.scale, 0, t),
  4411. null == l.weapons[e.weaponIndex].projectile || l.weapons[e.weaponIndex].hideProjectile || Vn(e.scale, 0, l.projectiles[l.weapons[e.weaponIndex].projectile], be)),
  4412. e.buildIndex >= 0) {
  4413. var s = ri(l.list[e.buildIndex]);
  4414. t.drawImage(s, e.scale - l.list[e.buildIndex].holdOffset, -s.width / 2)
  4415. }
  4416. si(0, 0, e.scale, t),
  4417. (t = t || be).beginPath(),
  4418. t.globalAlpha = 0.5,
  4419. t.fillStyle = "#F08080",
  4420. t.strokeStyle = "#FFA07A", //lol xd it range? idk
  4421. t.arc(0, 0, l.weapons[e.weaponIndex].range + 30, 0-L+_.dir-Math.PI/2, Math.PI/2-L+_.dir),
  4422. (e.weaponIndex == 9 || e.weaponIndex == 12 || e.weaponIndex == 13 || e.weaponIndex == 15)&&(
  4423. t.lineWidth = 8.1,
  4424. t.globalAlpha = 0.6,
  4425. t.moveTo(40*Math.cos(_.dir-L),40*Math.sin(_.dir-L)),
  4426. t.lineTo(1200*Math.cos(_.dir-L),1200*Math.sin(_.dir-L))),
  4427. null || t.fill(),
  4428. null || t.stroke(),
  4429. t.globalAlpha = 1,
  4430. e.skinIndex > 0 && (t.rotate(Math.PI / 2),
  4431. function e(t, n, i, r) {
  4432. if (!(Gn = Jn[t])) {
  4433. var s = new Image;
  4434. s.onload = function() {
  4435. this.isLoaded = !0,
  4436. this.onload = null
  4437. }
  4438. ,
  4439. s.src = ".././img/hats/hat_" + t + ".png",
  4440. Jn[t] = s,
  4441. Gn = s
  4442. }
  4443. var a = i || Kn[t];
  4444. if (!a) {
  4445. for (var o = 0; o < et.length; ++o)
  4446. if (et[o].id == t) {
  4447. a = et[o];
  4448. break
  4449. }
  4450. Kn[t] = a
  4451. }
  4452. Gn.isLoaded && n.drawImage(Gn, -a.scale / 2, -a.scale / 2, a.scale, a.scale),
  4453. !i && a.topSprite && (n.save(),
  4454. n.rotate(r.skinRot),
  4455. e(t + "_top", n, a, r),
  4456. n.restore())
  4457. }(e.skinIndex, t, null, e))
  4458. }
  4459. var Gn, Jn = {}, Kn = {}, Qn = {}, $n = {}, Zn = {};
  4460. function ei(e, t, n, i, r) {
  4461. var s = e.src + (t || "")
  4462. , a = Zn[s];
  4463. a || ((a = new Image).onload = function() {
  4464. this.isLoaded = !0
  4465. }
  4466. ,
  4467. a.src = ".././img/weapons/" + s + ".png",
  4468. Zn[s] = a),
  4469. a.isLoaded && r.drawImage(a, n + e.xOff - e.length / 2, i + e.yOff - e.width / 2, e.length, e.width)
  4470. }
  4471. var ti = {};
  4472. function ni(e) {
  4473. var t = e.y >= o.mapScale - o.snowBiomeTop ? 2 : e.y <= o.snowBiomeTop ? 1 : 0
  4474. , n = e.type + "_" + e.scale + "_" + t
  4475. , i = ti[n];
  4476. if (!i) {
  4477. var r = document.createElement("canvas");
  4478. r.width = r.height = 2.1 * e.scale + 5.5;
  4479. var a = r.getContext("2d");
  4480. if (a.translate(r.width / 2, r.height / 2),
  4481. a.rotate(s.randFloat(0, Math.PI)),
  4482. a.strokeStyle = it,
  4483. a.lineWidth = 5.5,
  4484. 0 == e.type)
  4485. for (var c, l = 0; l < 2; ++l)
  4486. ai(a, 7, c = _.scale * (l ? .5 : 1), .7 * c),
  4487. a.fillStyle = t ? l ? "#fff" : "#e3f1f4" : l ? "#b4db62" : "#9ebf57",
  4488. a.fill(),
  4489. l || a.stroke();
  4490. else if (1 == e.type)
  4491. if (2 == t)
  4492. a.fillStyle = "#606060",
  4493. ai(a, 6, .3 * e.scale, .71 * e.scale),
  4494. a.fill(),
  4495. a.stroke(),
  4496. a.fillStyle = "#89a54c",
  4497. si(0, 0, .55 * e.scale, a),
  4498. a.fillStyle = "#a5c65b",
  4499. si(0, 0, .3 * e.scale, a, !0);
  4500. else {
  4501. var h;
  4502. !function(e, t, n, i) {
  4503. var r, a = Math.PI / 2 * 3, o = Math.PI / 6;
  4504. e.beginPath(),
  4505. e.moveTo(0, -i);
  4506. for (var c = 0; c < 6; c++)
  4507. r = s.randInt(n + .9, 1.2 * n),
  4508. e.quadraticCurveTo(Math.cos(a + o) * r, Math.sin(a + o) * r, Math.cos(a + 2 * o) * i, Math.sin(a + 2 * o) * i),
  4509. a += 2 * o;
  4510. e.lineTo(0, -i),
  4511. e.closePath()
  4512. }(a, 0, _.scale, .7 * _.scale),
  4513. a.fillStyle = t ? "#e3f1f4" : "#89a54c",
  4514. a.fill(),
  4515. a.stroke(),
  4516. a.fillStyle = t ? "#6a64af" : "#c15555";
  4517. var u = T / 4;
  4518. for (l = 0; l < 4; ++l)
  4519. si((h = s.randInt(_.scale / 3.5, _.scale / 2.3)) * Math.cos(u * l), h * Math.sin(u * l), s.randInt(10, 12), a)
  4520. }
  4521. else
  4522. 2 != e.type && 3 != e.type || (a.fillStyle = 2 == e.type ? 2 == t ? "#938d77" : "#939393" : "#e0c655",
  4523. ai(a, 3, e.scale, e.scale),
  4524. a.fill(),
  4525. a.stroke(),
  4526. a.fillStyle = 2 == e.type ? 2 == t ? "#b2ab90" : "#bcbcbc" : "#ebdca3",
  4527. ai(a, 3, .55 * e.scale, .65 * e.scale),
  4528. a.fill());
  4529. i = r,
  4530. ti[n] = i
  4531. }
  4532. return i
  4533. }
  4534. var ii = [];
  4535. function ri(e, t) {
  4536. var n = ii[e.id + (R && e.owner && e.owner.sid == R.sid ? 0 : (R && R.team && e.owner && isAlly(e.owner.sid) ? 25 : 50))];
  4537. if (!n || t) {
  4538. var i = document.createElement("canvas");
  4539. i.width = i.height = 2.5 * e.scale + 5.5 + (l.list[e.id].spritePadding || 0);
  4540. var r = i.getContext("2d");
  4541. if (r.translate(i.width / 2, i.height / 2),
  4542. r.rotate(t ? 0 : Math.PI / 2),
  4543. r.strokeStyle = it,
  4544. r.lineWidth = 5.5 * (t ? i.width / 81 : 1),
  4545. "apple" == e.name) {
  4546. r.fillStyle = "#c15555",
  4547. si(0, 0, e.scale, r),
  4548. r.fillStyle = "#89a54c";
  4549. var a = -Math.PI / 2;
  4550. !function(e, t, n, i, r) {
  4551. var s = e + 25 * Math.cos(i)
  4552. , a = t + 25 * Math.sin(i);
  4553. r.moveTo(e, t),
  4554. r.beginPath(),
  4555. r.quadraticCurveTo((e + s) / 2 + 10 * Math.cos(i + Math.PI / 2), (t + a) / 2 + 10 * Math.sin(i + Math.PI / 2), s, a),
  4556. r.quadraticCurveTo((e + s) / 2 - 10 * Math.cos(i + Math.PI / 2), (t + a) / 2 - 10 * Math.sin(i + Math.PI / 2), e, t),
  4557. r.closePath(),
  4558. r.fill(),
  4559. r.stroke()
  4560. }(e.scale * Math.cos(a), e.scale * Math.sin(a), 0, a + Math.PI / 2, r)
  4561. } else if ("cookie" == e.name) {
  4562. r.fillStyle = "#cca861",
  4563. si(0, 0, e.scale, r),
  4564. r.fillStyle = "#937c4b";
  4565. for (var o = T / (h = 4), c = 0; c < h; ++c)
  4566. si((u = s.randInt(e.scale / 2.5, e.scale / 1.7)) * Math.cos(o * c), u * Math.sin(o * c), s.randInt(4, 5), r, !0)
  4567. } else if ("cheese" == e.name) {
  4568. var h, u;
  4569. for (r.fillStyle = "#f4f3ac",
  4570. si(0, 0, e.scale, r),
  4571. r.fillStyle = "#c3c28b",
  4572. o = T / (h = 4),
  4573. c = 0; c < h; ++c)
  4574. si((u = s.randInt(e.scale / 2.5, e.scale / 1.7)) * Math.cos(o * c), u * Math.sin(o * c), s.randInt(4, 5), r, !0)
  4575. } else if ("wood wall" == e.name || "stone wall" == e.name || "castle wall" == e.name) {
  4576. r.fillStyle = "castle wall" == e.name ? "#83898e" : "wood wall" == e.name ? "#a5974c" : "#939393";
  4577. var f = "castle wall" == e.name ? 4 : 3;
  4578. ai(r, f, 1.1 * e.scale, 1.1 * e.scale),
  4579. r.fill(),
  4580. r.stroke(),
  4581. r.fillStyle = "castle wall" == e.name ? "#9da4aa" : "wood wall" == e.name ? "#c9b758" : "#bcbcbc",
  4582. ai(r, f, .65 * e.scale, .65 * e.scale),
  4583. r.fill()
  4584. } else if ("spikes" == e.name || "greater spikes" == e.name || "poison spikes" == e.name || "spinning spikes" == e.name) {
  4585. r.fillStyle = "poison spikes" == e.name ? "#7b935d" : "#939393";
  4586. var d = .6 * e.scale;
  4587. ai(r, "spikes" == e.name ? 5 : 6, e.scale, d),
  4588. r.fill(),
  4589. r.stroke(),
  4590. r.fillStyle = "#a5974c",
  4591. si(0, 0, d, r),
  4592. r.fillStyle = "#c9b758",
  4593. si(0, 0, d / 2, r, !0),
  4594. t || (r.strokeStyle = (R && e.owner && e.owner.sid == R.sid ? "#00FF00" : (R && R.team && e.owner && isAlly(e.owner.sid) ? "#0000FF" :"#FF0000")),r.globalAlpha = 0.3, si(0, 0, 10, r, 0, 1))
  4595. } else if ("windmill" == e.name || "faster windmill" == e.name || "power mill" == e.name)
  4596. r.fillStyle = "#a5974c",
  4597. si(0, 0, e.scale, r),
  4598. r.fillStyle = "#c9b758",
  4599. ci(0, 0, 1.5 * e.scale, 29, 4, r),
  4600. r.fillStyle = "#a5974c",
  4601. si(0, 0, .5 * e.scale, r),
  4602. t || (r.strokeStyle = (R && e.owner && e.owner.sid == R.sid ? "#00FF00" : (R && R.team && e.owner && isAlly(e.owner.sid) ? "#0000FF" :"#FF0000")),r.globalAlpha = 0.3, si(0, 0, 10, r, 0, 1));
  4603. else if ("mine" == e.name)
  4604. r.fillStyle = "#939393",
  4605. ai(r, 3, e.scale, e.scale),
  4606. r.fill(),
  4607. r.stroke(),
  4608. r.fillStyle = "#bcbcbc",
  4609. ai(r, 3, .55 * e.scale, .65 * e.scale),
  4610. r.fill();
  4611. else if ("sapling" == e.name)
  4612. for (c = 0; c < 2; ++c)
  4613. ai(r, 7, d = e.scale * (c ? .5 : 1), .7 * d),
  4614. r.fillStyle = c ? "#b4db62" : "#9ebf57",
  4615. r.fill(),
  4616. c || r.stroke();
  4617. else if ("pit trap" == e.name)
  4618. r.fillStyle = "#a5974c",
  4619. ai(r, 3, 1.1 * e.scale, 1.1 * e.scale),
  4620. r.fill(),
  4621. r.stroke(),
  4622. r.fillStyle = it,
  4623. ai(r, 3, .65 * e.scale, .65 * e.scale),
  4624. r.fill(),
  4625. t || (r.strokeStyle = (R && e.owner && e.owner.sid == R.sid ? "#00FF00" : (R && R.team && e.owner && isAlly(e.owner.sid) ? "#0000FF" :"#FF0000")),r.globalAlpha = 0.3, si(0, 0, 10, r, 0, 1));
  4626. else if ("boost pad" == e.name)
  4627. r.fillStyle = "#7e7f82",
  4628. oi(0, 0, 2 * e.scale, 2 * e.scale, r),
  4629. r.fill(),
  4630. r.stroke(),
  4631. r.fillStyle = "#dbd97d",
  4632. function(e, t) {
  4633. t = t || be;
  4634. var n = e * (Math.sqrt(3) / 2);
  4635. t.beginPath(),
  4636. t.moveTo(0, -n / 2),
  4637. t.lineTo(-e / 2, n / 2),
  4638. t.lineTo(e / 2, n / 2),
  4639. t.lineTo(0, -n / 2),
  4640. t.fill(),
  4641. t.closePath()
  4642. }(1 * e.scale, r);
  4643. else if ("turret" == e.name)
  4644. r.fillStyle = "#a5974c",
  4645. si(0, 0, e.scale, r),
  4646. r.fill(),
  4647. r.stroke(),
  4648. r.fillStyle = "#939393",
  4649. oi(0, -25, .9 * e.scale, 50, r),
  4650. si(0, 0, .6 * e.scale, r),
  4651. r.fill(),
  4652. r.stroke();
  4653. else if ("platform" == e.name) {
  4654. r.fillStyle = "#cebd5f";
  4655. var p = 2 * e.scale
  4656. , g = p / 4
  4657. , m = -e.scale / 2;
  4658. for (c = 0; c < 4; ++c)
  4659. oi(m - g / 2, 0, g, 2 * e.scale, r),
  4660. r.fill(),
  4661. r.stroke(),
  4662. m += p / 4
  4663. } else
  4664. "healing pad" == e.name ? (r.fillStyle = "#7e7f82",
  4665. oi(0, 0, 2 * e.scale, 2 * e.scale, r),
  4666. r.fill(),
  4667. r.stroke(),
  4668. r.fillStyle = "#db6e6e",
  4669. ci(0, 0, .65 * e.scale, 20, 4, r, !0)) : "spawn pad" == e.name ? (r.fillStyle = "#7e7f82",
  4670. oi(0, 0, 2 * e.scale, 2 * e.scale, r),
  4671. r.fill(),
  4672. r.stroke(),
  4673. r.fillStyle = "#71aad6",
  4674. si(0, 0, .6 * e.scale, r)) : "blocker" == e.name ? (r.fillStyle = "#7e7f82",
  4675. si(0, 0, e.scale, r),
  4676. r.fill(),
  4677. r.stroke(),
  4678. r.rotate(Math.PI / 4),
  4679. r.fillStyle = "#db6e6e",
  4680. ci(0, 0, .65 * e.scale, 20, 4, r, !0)) : "teleporter" == e.name && (r.fillStyle = "#7e7f82",
  4681. si(0, 0, e.scale, r),
  4682. r.fill(),
  4683. r.stroke(),
  4684. r.rotate(Math.PI / 4),
  4685. r.fillStyle = "#d76edb",
  4686. si(0, 0, .5 * e.scale, r, !0));
  4687. n = i,/*
  4688. t || (r.font = (17) + "px Hammersmith One",
  4689. r.fillStyle = "#fff",
  4690. r.textBaseline = "middle",
  4691. r.textAlign = "center",
  4692. r.lineWidth = 7,
  4693. r.lineJoin = "round",
  4694. r.strokeStyle = rt,
  4695. r.strokeText(e.owner, 0, 0),
  4696. r.fillText(e.owner, 0, 0)),*/
  4697. t || (ii[e.id + (R && e.owner && e.owner.sid == R.sid ? 0 : (R && R.team && e.owner && isAlly(e.owner.sid) ? 25 : 50))] = n)
  4698. }
  4699. return n
  4700. }
  4701. function si(e, t, n, i, r, s) {
  4702. (i = i || be).beginPath(),
  4703. i.arc(e, t, n, 0, 2 * Math.PI),
  4704. s || i.fill(),
  4705. r || i.stroke()
  4706. }
  4707. function ai(e, t, n, i) {
  4708. var r, s, a = Math.PI / 2 * 3, o = Math.PI / t;
  4709. e.beginPath(),
  4710. e.moveTo(0, -n);
  4711. for (var c = 0; c < t; c++)
  4712. r = Math.cos(a) * n,
  4713. s = Math.sin(a) * n,
  4714. e.lineTo(r, s),
  4715. a += o,
  4716. r = Math.cos(a) * i,
  4717. s = Math.sin(a) * i,
  4718. e.lineTo(r, s),
  4719. a += o;
  4720. e.lineTo(0, -n),
  4721. e.closePath()
  4722. }
  4723. function oi(e, t, n, i, r, s) {
  4724. r.fillRect(e - n / 2, t - i / 2, n, i),
  4725. s || r.strokeRect(e - n / 2, t - i / 2, n, i)
  4726. }
  4727. function ci(e, t, n, i, r, s, a) {
  4728. s.save(),
  4729. s.translate(e, t),
  4730. r = Math.ceil(r / 2);
  4731. for (var o = 0; o < r; o++)
  4732. oi(0, 0, 2 * n, i, s, a),
  4733. s.rotate(Math.PI / r);
  4734. s.restore()
  4735. }
  4736. function li(e) {
  4737. for (var t = 0; t < e.length; )
  4738. nt.add(e[t], e[t + 1], e[t + 2], e[t + 3], e[t + 4], e[t + 5], l.list[e[t + 6]], !0, e[t + 7] >= 0 ? {
  4739. sid: e[t + 7]
  4740. } : null),
  4741. (15==e[t+6]&&(R.x2-e[t+1])**2+(R.y2-e[t+2])**2<1e4&&e[t+7]!=R.sid&&!isAlly(e[t+7])) && aT(),
  4742. t += 8
  4743. }
  4744. function aT(){
  4745. if(fgd(nEy, R) < 300){
  4746. for(let i = 0;i < 24;i++){
  4747. plc(R.items[2], toRad(15) * i, 1)
  4748. }
  4749. }
  4750. for(let i = 0;i < 24;i++){
  4751. plc(R.items[4], toRad(15) * i, 1)
  4752. }
  4753. r.send("2", pn());
  4754. }
  4755. function hi(e, t) {
  4756. (_ = Mi(t)) && (_.xWiggle += o.gatherWiggle * Math.cos(e),
  4757. _.yWiggle += o.gatherWiggle * Math.sin(e))
  4758. }
  4759. function ui(e, t) {
  4760. (_ = Mi(e)) && (_.dir = t,
  4761. _.xWiggle += o.gatherWiggle * Math.cos(t + Math.PI),
  4762. _.yWiggle += o.gatherWiggle * Math.sin(t + Math.PI))
  4763. }
  4764. function fi(e, t, n, i, r, s, a, o) {
  4765. lt && (J.addProjectile(e, t, n, i, r, s, null, null, a).sid = o,
  4766. setAdvCooldown(e, t, n, i, r))
  4767. }
  4768. function setAdvCooldown(e, t, n, i, r){
  4769. let min = Infinity;
  4770. let id = -1;
  4771. for(let i = 0; i < W.length;i++){
  4772. (_ = W[i]) && _.visible && _.secondary && l.weapons[_.secondary].projectile !== undefined && l.projectiles[l.weapons[_.secondary].projectile].speed == r &&
  4773. min > (_.x2-e+Math.cos(n)*70)**2+(_.y2-t+Math.sin(n)*70)**2
  4774. && (id = _.sid, min = (_.x2-e+Math.cos(n)*70)**2+(_.y2-t+Math.sin(n)*70)**2)
  4775. }
  4776. if(Math.sqrt(min) > 80){
  4777. if(r == 1.5){
  4778. for(let i = 0; i < W.length;i++){
  4779. (_ = W[i]) && _.visible &&
  4780. min > (_.x2-e)**2+(_.y2-t)**2
  4781. && (id = _.sid, min = (_.x2-e)**2+(_.y2-t)**2)
  4782. }
  4783. if(Math.sqrt(min) < 60){
  4784. setTimeout(()=>{turretReload[id] = 0});
  4785. }
  4786. }else{
  4787. for(let i = 0; i < W.length;i++){
  4788. (_ = W[i]) && _.visible && _.secondary &&
  4789. min > (_.x2-e+Math.cos(n)*70)**2+(_.y2-t+Math.sin(n)*70)**2
  4790. && (id = _.sid, min = (_.x2-e+Math.cos(n)*70)**2+(_.y2-t+Math.sin(n)*70)**2)
  4791. }
  4792. _=Ii(id);
  4793. setTimeout(()=>{secR[id] = 0});
  4794. }
  4795. }else{
  4796. _=Ii(id);
  4797. setTimeout(()=>{secR[id] = 0});
  4798. }
  4799. }
  4800. function di(e, t) {
  4801. for (var n = 0; n < G.length; ++n)
  4802. G[n].sid == e && (G[n].range = t)
  4803. }
  4804. function pi(e) {
  4805. (_ = Ei(e)) && _.startAnim()
  4806. }
  4807. function gi(e) {
  4808. for (var t = 0; t < Y.length; ++t)
  4809. Y[t].forcePos = !Y[t].visible,
  4810. Y[t].visible = !1;
  4811. if (e) {
  4812. var n = Date.now();
  4813. for (t = 0; t < e.length; )
  4814. (_ = Ei(e[t])) ? (_.index = e[t + 1],
  4815. _.t1 = void 0 === _.t2 ? n : _.t2,
  4816. _.t2 = n,
  4817. _.x1 = _.x,
  4818. _.y1 = _.y,
  4819. _.x2 = e[t + 2],
  4820. _.y2 = e[t + 3],
  4821. _.d1 = void 0 === _.d2 ? e[t + 4] : _.d2,
  4822. _.d2 = e[t + 4],
  4823. _.health = e[t + 5],
  4824. _.dt = 0,
  4825. _.visible = !0) : ((_ = Z.spawn(e[t + 2], e[t + 3], e[t + 4], e[t + 1])).x2 = _.x,
  4826. _.y2 = _.y,
  4827. _.d2 = _.dir,
  4828. _.health = e[t + 5],
  4829. Z.aiTypes[e[t + 1]].name || (_.name = o.cowNames[e[t + 6]]),
  4830. _.forcePos = !0,
  4831. _.sid = e[t],
  4832. _.visible = !0),
  4833. t += 7
  4834. }
  4835. }
  4836. var mi = {};
  4837. function yi(e, t) {
  4838. var n = e.index
  4839. , i = mi[n];
  4840. if (!i) {
  4841. var r = new Image;
  4842. r.onload = function() {
  4843. this.isLoaded = !0,
  4844. this.onload = null
  4845. }
  4846. ,
  4847. r.src = ".././img/animals/" + e.src + ".png",
  4848. i = r,
  4849. mi[n] = i
  4850. }
  4851. if (i.isLoaded) {
  4852. var s = 1.2 * e.scale * (e.spriteMlt || 1);
  4853. t.drawImage(i, -s, -s, 2 * s, 2 * s)
  4854. }
  4855. }
  4856. function ki(e, t, n) {
  4857. return e + n >= 0 && e - n <= oe && t + n >= 0 && t - n <= ce
  4858. }
  4859. function vi(e, t) {
  4860. var n = function(e) {
  4861. for (var t = 0; t < W.length; ++t)
  4862. if (W[t].id == e)
  4863. return W[t];
  4864. return null
  4865. }(e[0]);
  4866. n || (n = new u(e[0],e[1],o,s,J,nt,W,Y,l,et,tt),
  4867. W.push(n)),
  4868. n.spawn(t ? H : null),
  4869. n.visible = !1,
  4870. n.x2 = void 0,
  4871. n.y2 = void 0,
  4872. n.setData(e),
  4873. priR[n.sid] = 1,
  4874. n.pr = 1,
  4875. secR[n.sid] = 1,
  4876. n.sr = 1;
  4877. turretReload[n.sid] = 1,
  4878. n.tr = 1,
  4879. n.clownCounter = 0,
  4880. t && (U = (R = n).x,
  4881. D = R.y,
  4882. $t(),
  4883. On(),
  4884. Dn(),
  4885. Un(0),
  4886. Be.style.display = "block")
  4887. }
  4888. function wi(e) {
  4889. for (var t = 0; t < W.length; t++)
  4890. if (W[t].id == e) {
  4891. W.splice(t, 1);
  4892. break
  4893. }
  4894. }
  4895. function bi(e, t) {
  4896. R && (R.itemCounts[e] = t)
  4897. }
  4898. function xi(e, t, n) {
  4899. R && (R[e] = t,
  4900. n && On())
  4901. }
  4902. function Si(e, t) {
  4903. (_ = Ii(e)) && (Qz(_, t), _.health = t)
  4904. }
  4905. var FT = 0;
  4906. function Qz(_, t){
  4907. let d = t - _.health;
  4908. if(d > 0){
  4909. if(_.skinIndex == 13){
  4910. if(_.tailIndex == 13){
  4911. d == 6 && (_.lastBull = tC);
  4912. R == _ && (FT = 0);
  4913. return;
  4914. }else{
  4915. d == 3 && (_.lastBull = tC);
  4916. R == _ && (FT = 0);
  4917. return;
  4918. }
  4919. }
  4920. if(!isNaN(_.clownCounter) && _.lastDamage){
  4921. if(tC - _.lastDamage < 2){
  4922. _.clownCounter++;
  4923. }else{
  4924. _.clownCounter = Math.max(0, _.clownCounter-2);
  4925. }
  4926. _.lastDamage = 0;
  4927. }
  4928. }else{
  4929. _.lastDamage = tC;
  4930. if(_.skinIndex == 7){
  4931. if(_.tailIndex == 13){
  4932. if(d == -2){
  4933. _.lastBull = tC;
  4934. R == _ && (setTimeout(()=>{plc(R.items[0], null, 1)}, 90), FT = 0)
  4935. return;
  4936. }
  4937. }else{
  4938. if(d == -5){
  4939. _.lastBull = tC;
  4940. R == _ && (setTimeout(()=>{plc(R.items[0], null, 1)}, 90), FT = 0)
  4941. return;
  4942. }
  4943. }
  4944. }
  4945. if(R == _){
  4946. if(nEy.length && fgd(nEy, R) < 300){
  4947. if(Ii(nEy[0]).secondary != 14 && Ii(nEy[0]).secondary != 11 && Ii(nEy[0]).secondary != 10){
  4948. if(Ii(nEy[0]).primary == 5){
  4949. if(d <= -40 && d != (R.skinIndex == 6 ? -37.5 :-50)/*&& Ii(nEy[0]).weaponIndex != Ii(nEy[0]).secondary*/){
  4950. if(Ii(nEy[0]).priVarId == 3){
  4951. sn("Ruby gae")
  4952. }
  4953. slowheal++;
  4954. plc(R.items[0], null, (R.skinIndex == 6 ? polearm - 1 : polearm))
  4955. setTimeout(function(){
  4956. plc(R.items[0], null, 5)
  4957. slowheal--;
  4958. },450)
  4959. }
  4960. if(d <= -40 && Ii(nEy[0]).weaponIndex != Ii(nEy[0]).primary){
  4961. sn("anti reversee mann")
  4962. slowheal++;
  4963. plc(R.items[0], null, (R.skinIndex == 6 ? polearm - 1 : polearm))
  4964. setTimeout(function(){
  4965. plc(R.items[0], null, 5)
  4966. slowheal--;
  4967. },450)
  4968. }
  4969. } else {
  4970. if(d <= -40 && d != (R.skinIndex == 6 ? -37.5 :-50)/*&& Ii(nEy[0]).weaponIndex != Ii(nEy[0]).secondary*/){
  4971. if(Ii(nEy[0]).priVarId == 3){
  4972. sn("Ruby gae")
  4973. }
  4974. slowheal++;
  4975. plc(R.items[0], null, (R.skinIndex == 6 ? another - 1 : another))
  4976. setTimeout(function(){
  4977. plc(R.items[0], null, 5)
  4978. slowheal--;
  4979. },300)
  4980. }
  4981. if(d <= -40 && Ii(nEy[0]).weaponIndex != Ii(nEy[0]).primary){
  4982. sn("anti reversee mann")
  4983. slowheal++;
  4984. plc(R.items[0], null, (R.skinIndex == 6 ? another - 1 : another))
  4985. setTimeout(function(){
  4986. plc(R.items[0], null, 5)
  4987. slowheal--;
  4988. },300)
  4989. }
  4990. }
  4991. }
  4992. if(d == -25 && Ii(nEy[0]).primary == 5 && Ii(nEy[0]).priVarId >= 2){
  4993. sn("anti onetickk mann")
  4994. iI++;
  4995. Jt(6, 0)
  4996. plc(R.items[0], null, 3)
  4997. setTimeout(function(){
  4998. iI--;
  4999. },120)
  5000. }
  5001. }
  5002. if(nEy.length){
  5003. if(d && !slowheal){
  5004. setTimeout(function(){
  5005. plc(R.items[0], null, 3)
  5006. }, (Ii(nEy[0]).primary == 7 ? 241 : /*20 + R.health*/ antiClownSpeed));
  5007. }
  5008. } else {
  5009. if(d && !slowheal){
  5010. setTimeout(function(){
  5011. plc(R.items[0], null, 3)
  5012. }, /*20 + R.health*/ antiClownSpeed);
  5013. }
  5014. }
  5015. }
  5016. }
  5017. }
  5018. /*
  5019. for(let i = 0;i < 30;i++){
  5020. if(toRad(12) * i<=nEA+Math.PI/4 && toRad(12) * i>=nEA-Math.PI/4){
  5021. plc(R.items[2], toRad(12) * i, 1)
  5022. } else {
  5023. plc(R.items[4], toRad(12) * i, 1)
  5024. }
  5025. }
  5026. */
  5027. var nEy, nEA, nEs;
  5028.  
  5029. var nTey, nTes;
  5030.  
  5031. var nTy, nTs, nTA;
  5032.  
  5033. var tC = 0;
  5034.  
  5035. var slowheal = 0;
  5036.  
  5037. var dNG = false;
  5038.  
  5039. var space = 0, wait = 0;
  5040.  
  5041. var tNG = false;
  5042.  
  5043. var millON = 0, millAim = null, millx = null, milly = null;
  5044.  
  5045. var smtxd = 1, autobuy = 1;
  5046.  
  5047. var polearm = 10, another = 8;
  5048.  
  5049. var autotrapplace = 1;
  5050.  
  5051. var antiClownSpeed = 121;
  5052.  
  5053. var nobull = 0;
  5054.  
  5055. var laginsta = 0;
  5056.  
  5057. var dash = 0, dashf = 1;
  5058.  
  5059. var lagger = 0, laggerf = 1;
  5060.  
  5061. let lagRip = new Uint8Array([135, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180])
  5062.  
  5063. let crashRip = new Uint8Array([135, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180, 102, 37, 116, 94, 162, 44, 210, 28, 223, 1, 13, 113, 180])
  5064.  
  5065. var dashinsta = 0;
  5066.  
  5067. var keys = {
  5068. w: false,
  5069. a: false,
  5070. s: false,
  5071. d: false
  5072. }
  5073. function Ti(e) {
  5074. tC++;
  5075. nEs = [];
  5076. nEy = [];
  5077. nTy = [];
  5078. nTs = [];
  5079. nTey = [];
  5080. nTes = [];
  5081.  
  5082. for (var t = Date.now(), n = 0; n < W.length; ++n)
  5083. W[n].forcePos = !W[n].visible,
  5084. W[n].visible = !1;
  5085. for (n = 0; n < e.length; )
  5086. (_ = Ii(e[n])) && (_.t1 = void 0 === _.t2 ? t : _.t2,
  5087. _.t2 = t,
  5088. _.x1 = _.x,
  5089. _.y1 = _.y,
  5090. _.primary,
  5091. _.secondary,
  5092. _.health,
  5093. _.dir,
  5094. _.weaponIndex,
  5095. _.animTime,
  5096. _.animSpeed,
  5097. _.skinIndex,
  5098. _.tailIndex,
  5099. _.team,
  5100. _.name,
  5101. _.priVarSrc,
  5102. _.secVarSrc,
  5103. _.priVarXP,
  5104. _.secVarXP,
  5105. _.priVarId,
  5106. _.secVarId,
  5107. _.priVarVal,
  5108. _.secVarVal,
  5109. _.chatMessage,
  5110. _.x2 = e[n + 1],
  5111. _.y2 = e[n + 2],
  5112. _.d1 = void 0 === _.d2 ? e[n + 3] : _.d2,
  5113. _.d2 = e[n + 3],
  5114. _.dt = 0,
  5115. _.buildIndex = e[n + 4],
  5116. _.weaponIndex = e[n + 5],
  5117. _.weaponVariant = e[n + 6],
  5118. _.team = e[n + 7],
  5119. _.isLeader = e[n + 8],
  5120. _.skinIndex = e[n + 9],
  5121. _.tailIndex = e[n + 10],
  5122. _.iconIndex = e[n + 11],
  5123. _.zIndex = e[n + 12],
  5124. _.visible = !0,
  5125. (_ == R || _.team && _.team == R.team) ? doWeaponStuff(_) : nEs.push(e.slice(n, n + 13))),
  5126. n += 13
  5127. nEs.length && (nEs = nEs.sort((a,b) => fgd(a, R) - fgd(b, R)), nEy = nEs[0]);
  5128. nEA = (nEy.length ? Math.atan2(nEy[2]-R.y2, nEy[1]-R.x2) : undefined);
  5129.  
  5130. dNG = false;
  5131. for(let i = 0; i < nEs.length;i++){
  5132. if(Ii(nEy[0]).priVarId == 0){
  5133. polearm = 11;
  5134. another = 9;
  5135. } else if(Ii(nEy[0]).priVarId == 1){
  5136. polearm = 12;
  5137. another = 10;
  5138. } else if(Ii(nEy[0]).priVarId == 2){
  5139. polearm = 13;
  5140. another = 11;
  5141. } else if(Ii(nEy[0]).priVarId == 3){
  5142. polearm = 13;
  5143. another = 11;
  5144. }
  5145. /*
  5146. if(fgd(nEs[i], R) < 300){
  5147. _ = Ii(nEs[i][0]);
  5148. if(_.sr == 1){
  5149. dNG = true;
  5150. break;
  5151. }
  5152. }else{
  5153. break;
  5154. }*/
  5155. }
  5156. if(aimxd){
  5157. r.send("2", nEA)
  5158. }
  5159. for(let i = 0;i < nEs.length;i++){
  5160. doWeaponStuff(Ii(nEs[i][0]));
  5161. }
  5162. if(smtxd){
  5163. Qe.style.display = "none"
  5164. smtxd--;
  5165. }
  5166. N.length && (
  5167. nTA = (nTy ? Math.atan2(nTy.y-R.y2, nTy.x-R.x2) : undefined),
  5168. nTs = N.filter(c => c.active && c.owner && c.owner.sid != R.sid && !isAlly(c.owner.sid) && Math.hypot(c.y - R.y, c.x - R.x) <= 79 && c.id == 15),
  5169. nTy = nTs.sort((a,b) => Math.hypot(a.y - R.y2, a.x - R.x2) - Math.hypot(b.y - R.y, b.x - R.x))[0],
  5170. nEy.length && (
  5171. nTes = N.filter(c => c.active && c.owner && c.owner.sid != Ii(nEy[0]).sid && Math.hypot(c.y - Ii(nEy[0]).y, c.x - Ii(nEy[0]).x) <= 79 && c.id == 15),
  5172. nTey = nTes.sort((a,b) => Math.hypot(c.y - Ii(nEy[0]).y, c.x - Ii(nEy[0]).x) - Math.hypot(c.y - Ii(nEy[0]).y, c.x - Ii(nEy[0]).x))[0]
  5173. )
  5174. );
  5175. if(tC - _.lastDamage < 2){
  5176. antiClownSpeed += 50;
  5177. } else {
  5178. antiClownSpeed -= 100;
  5179. if(antiClownSpeed < 121){
  5180. antiClownSpeed = 121;
  5181. }
  5182. }
  5183. if(mechat){
  5184. mechat = 0;
  5185. xn()
  5186. }
  5187. if(_.sid == syncSid){
  5188. if(teammatechat){
  5189. teammatechat = 0;
  5190. xn()
  5191. }
  5192. }
  5193. if(nTy && nTey && autotrapplace){
  5194. autotrapplace--;
  5195. setTimeout(function(){
  5196. autotrapplace++;
  5197. },750);
  5198. if(fgd(nEy, R) <= 180){
  5199. for(let i = 0;i < 24;i++){
  5200. if(toRad(15) * i <= nTA-toRad(90) && toRad(15) * i >= nTA+toRad(90)){
  5201. plc(R.items[2], toRad(15) * i, 1)
  5202. }
  5203. }
  5204. } else if(fgd(nEy, R) <= 300){
  5205. for(let i = 0;i < 24;i++){
  5206. if(toRad(15) * i <= nTA-toRad(90) && toRad(15) * i >= nTA+toRad(90)){
  5207. plc(R.items[4], toRad(15) * i, 1)
  5208. }
  5209. }
  5210. }
  5211. }
  5212. if(autobuy){
  5213. if(R.points >= 6000 + 2500 + 600 + 2000){
  5214. Kt(12, 0)
  5215. Kt(15, 0)
  5216. Kt(31, 0)
  5217. Kt(11, 1)
  5218. }
  5219. if(R.points >= 4000 + 6000 + 10000){
  5220. Kt(6, 0)
  5221. Kt(53, 0)
  5222. Kt(7, 0)
  5223. }
  5224. if(R.points >= 6000 + 5000 + 8000){
  5225. Kt(22, 0)
  5226. Kt(32, 0)
  5227. Kt(26, 0)
  5228. }
  5229. if(R.points >= 20000 + 15000){
  5230. Kt(40, 0)
  5231. Kt(21, 1)
  5232. autobuy = 0;
  5233. }
  5234. }
  5235. //AE THINGS
  5236. if(space == 1){
  5237. if(priR[R.sid] == 1 && !nTy && fgd(nEy, R) < 300){
  5238. Jt(0, 1);
  5239. if(dH == 40){
  5240. Hg(40, 21);
  5241. } else {
  5242. Hg((nEy[9] == 11 ? 6 : 7), 21);
  5243. }
  5244. oW = R.weapons[0];
  5245. Sn(oW, 1);
  5246. AA++;
  5247. r.send("2", nEA)
  5248. iI++;
  5249. r.send(7, 1);
  5250. setTimeout(function(){
  5251. iI--;
  5252. AA--;
  5253. r.send(7, 1);
  5254. }, 120);
  5255. }
  5256. } else if(space == 2){
  5257. space -= 2;
  5258. setTimeout(function(){
  5259. wait++;
  5260. },120)
  5261. if(!nTy){
  5262. oW = R.weapons[0];
  5263. Sn(oW, 1);
  5264. }
  5265. }
  5266. if(wait && !nTy){
  5267. if(priR[R.sid] == 1){
  5268. wait--;
  5269. if(fgd(nEy, R) < l.weapons[R.primary].range + 100){
  5270. xn()
  5271. }
  5272. }
  5273. }
  5274. //AE THINGS
  5275. //AUTOBREAK TRAP
  5276. if (nTy && !DS) {
  5277. tNG = true;
  5278. nTA = Math.atan2(nTy.y-R.y2, nTy.x-R.x2);
  5279. if(!iI && oW != 8 && oW != 11 && oW != 14) {
  5280. r.send("2", nTA);
  5281. if(oW < 9){
  5282. if(priR[R.sid] == 1){
  5283. Hg(40, 21);
  5284. if(R.weapons[0] == 7 && R.weapons[1] == 10){
  5285. Sn(oW, 1);
  5286. } else {
  5287. if(R.weapons[1] == 10){
  5288. oW = R.weapons[1];
  5289. Sn(oW, 1);
  5290. }else{
  5291. Sn(oW, 1);
  5292. }
  5293. }
  5294. iI++;
  5295. r.send(7, 1);
  5296. setTimeout(function(){
  5297. iI--;
  5298. r.send(7, 1);
  5299. if(R.weapons[0] == 7 && R.weapons[1] == 10){
  5300. oW = R.weapons[1];
  5301. Sn(oW, 1);
  5302. }
  5303. }, 120)
  5304. }
  5305. } else if(oW > 8){
  5306. if(secR[R.sid] == 1){
  5307. Jt(0, 1);
  5308. Hg(40, 21);
  5309. if(R.weapons[1] == 10){
  5310. Sn(oW, 1);
  5311. }else{
  5312. oW = R.weapons[0];
  5313. Sn(oW, 1);
  5314. }
  5315. iI++;
  5316. r.send(7, 1);
  5317. setTimeout(function(){
  5318. iI--;
  5319. r.send(7, 1);
  5320. }, 120)
  5321. }
  5322. }
  5323. }
  5324. } else if (tNG) {
  5325. tNG = false;
  5326. r.send("2", pn())
  5327. setTimeout(function(){
  5328. oW = R.weapons[0];
  5329. Sn(oW, 1)
  5330. },120);
  5331. }
  5332. //AUTOBREAK TRAP
  5333. //MILL
  5334. if(!keys.w && keys.a && !keys.s && !keys.d){
  5335. millAim = 0
  5336. } else if(!keys.w && keys.a && keys.s && !keys.d){
  5337. millAim = -0.77
  5338. } else if(!keys.w && !keys.a && keys.s && !keys.d){
  5339. millAim = -1.57
  5340. } else if(!keys.w && !keys.a && keys.s && keys.d){
  5341. millAim = -2.34
  5342. } else if(!keys.w && !keys.a && !keys.s && keys.d){
  5343. millAim = 3.14
  5344. } else if(keys.w && !keys.a && !keys.s && keys.d){
  5345. millAim = 2.34
  5346. } else if(keys.w && !keys.a && !keys.s && !keys.d){
  5347. millAim = 1.57
  5348. } else if(keys.w && keys.a && !keys.s && !keys.d){
  5349. millAim = 0.77
  5350. }
  5351. if(millx == null){
  5352. millx = R.x2
  5353. }
  5354. if(milly == null){
  5355. milly = R.y2
  5356. }
  5357. if(millON && !nTy && !DS && !O){
  5358. if(Math.sqrt(Math.pow((R.y2-milly),2)+Math.pow((R.x2-millx),2)) > 100){
  5359.  
  5360. plc(R.items[3], millAim, 1)
  5361. plc(R.items[3], millAim + toRad(67), 1)
  5362. plc(R.items[3], millAim - toRad(67), 1)
  5363. r.send("2", pn())
  5364. millx = R.x2
  5365. milly = R.y2
  5366. }
  5367. }
  5368. //MILL
  5369. if(!iI && Qe.style.display == "none"){
  5370. if(R.clownCounter >= 4 && (tC - R.lastBull) % 9 == 0 || (R.lastBull && FT > 1)){
  5371. FT++;
  5372. Hg(7, 13);
  5373. }else if(nEy.length && fgd(nEy, R) < 300){
  5374. if(O || nTy || space == 1){
  5375. if(turretReload[R.sid] == 1 && ((nEy[9] == 7 && (tC - Ii(nEy[0]).lastBull) % 9 == 0) || nEy[9] == 45 || Ii(nEy[0]).health <= (nEy[9] == 6 ? 25 * 0.75 : 25))){
  5376. Hg(53, 21);
  5377. }else{
  5378. if(dH){
  5379. Hg(dH, 21);
  5380. }else{
  5381. Hg(6, 21);
  5382. }
  5383. }
  5384. }else{
  5385. if(turretReload[R.sid] == 1 && nEy.length && (nEy[9] == 45 || Ii(nEy[0]).health <= (nEy[9] == 6 ? 25 * 0.75 : 25))){
  5386. Hg(53, 11);
  5387. } else {
  5388. if(dH){
  5389. Hg(dH, 11);
  5390. }else{
  5391. let Qs = R.y2*1.5-R.y/2;
  5392. if(Qs < 2400){
  5393. Hg(15, 11);
  5394. }else if(Qs > 6850 && Qs < 7550){
  5395. Hg(31, 11);
  5396. }else{
  5397. if(l.weapons[Ii(nEy[0]).primary].dmg >= 40){
  5398. Hg(6, 11);
  5399. } else if(nEy[5] == 7){
  5400. Hg(26, 11)
  5401. } else {
  5402. Hg(12, 11);
  5403. }
  5404. }
  5405. }
  5406. }
  5407. }
  5408. }else{
  5409. if(turretReload[R.sid] == 1 && nEy.length && (nEy[9] == 45 || Ii(nEy[0]).health <= (nEy[9] == 6 ? 25 * 0.75 : 25))){
  5410. Hg(53, 11);
  5411. } else {
  5412. if(dH){
  5413. Hg(dH, 11);
  5414. }else{
  5415. let Qs = R.y2*1.5-R.y/2;
  5416. if(Qs < 2400){
  5417. Hg(15, 11);
  5418. }else if(Qs > 6850 && Qs < 7550){
  5419. Hg(31, 11);
  5420. }else{
  5421. Hg(12, 11);
  5422. }
  5423. }
  5424. }
  5425. }
  5426. }
  5427. }
  5428. function fgd(a, b){
  5429. return Math.sqrt(Math.pow((b.y2-a[2]),2)+Math.pow((b.x2-a[1]),2));
  5430. }
  5431. var oW = 0;
  5432. function doWeaponStuff(_){
  5433. if(_.skinIndex == 45){
  5434. _.clownCounter = "∞";
  5435. }else if(isNaN(_.clownCounter)){
  5436. _.clownCounter = 0;
  5437. }
  5438. if(_.weaponIndex < 9){
  5439. if(_.weaponIndex == _.primary){
  5440. _.weapVarSrc = o.weaponVariants[_.weaponVariant].src;
  5441. _.weapVarId = o.weaponVariants[_.weaponVariant].id;
  5442. _.weapVarXP = o.weaponVariants[_.weaponVariant].xp;
  5443. _.weapVarVal = o.weaponVariants[_.weaponVariant].val;
  5444.  
  5445. _.priVarSrc = o.weaponVariants[_.weaponVariant].src;
  5446. _.priVarId = o.weaponVariants[_.weaponVariant].id;
  5447. _.priVarXP = o.weaponVariants[_.weaponVariant].xp;
  5448. _.priVarVal = o.weaponVariants[_.weaponVariant].val;
  5449. if(_.buildIndex == -1){
  5450. _.pr = priR[_.sid];
  5451. _.sr = secR[_.sid];
  5452. priR[_.sid] = Math.min(1, priR[_.sid] + 111/l.weapons[_.primary].speed);
  5453. }else{
  5454. _.pr = priR[_.sid];
  5455. }
  5456. }else{
  5457. priR[_.sid] = 1;
  5458. _.primary = _.weaponIndex;
  5459. }
  5460. }else if(_.weaponIndex > 8){
  5461. if(_.weaponIndex == _.secondary){
  5462. _.weapVarSrc = o.weaponVariants[_.weaponVariant].src;
  5463. _.weapVarId = o.weaponVariants[_.weaponVariant].id;
  5464. _.weapVarXP = o.weaponVariants[_.weaponVariant].xp;
  5465. _.weapVarVal = o.weaponVariants[_.weaponVariant].val;
  5466.  
  5467. _.secVarSrc = o.weaponVariants[_.weaponVariant].src;
  5468. _.secVarId = o.weaponVariants[_.weaponVariant].id;
  5469. _.secVarXP = o.weaponVariants[_.weaponVariant].xp;
  5470. _.secVarVal = o.weaponVariants[_.weaponVariant].val;
  5471. if(_.buildIndex == -1){
  5472. _.sr = secR[_.sid];
  5473. _.pr = priR[_.sid];
  5474. secR[_.sid] = Math.min(1, secR[_.sid] + 111/l.weapons[_.secondary].speed);
  5475. }else{
  5476. _.sr = secR[_.sid];
  5477. }
  5478. }else{
  5479. secR[_.sid] = 1;
  5480. _.secondary = _.weaponIndex;
  5481. }
  5482. }
  5483. _.tr = turretReload[_.sid];
  5484. turretReload[_.sid] = Math.min(1, turretReload[_.sid]+0.0444);
  5485. }
  5486. function Ii(e) {
  5487. for (var t = 0; t < W.length; ++t)
  5488. if (W[t].sid == e)
  5489. return W[t];
  5490. return null
  5491. }
  5492. function Ei(e) {
  5493. for (var t = 0; t < Y.length; ++t)
  5494. if (Y[t].sid == e)
  5495. return Y[t];
  5496. return null
  5497. }
  5498. function Mi(e) {
  5499. for (var t = 0; t < N.length; ++t)
  5500. if (N[t].sid == e)
  5501. return N[t];
  5502. return null
  5503. }
  5504. var Ai = -1;
  5505. function Pi() {
  5506. var e = Date.now() - Ai;
  5507. window.pingTime = e,
  5508. Ie.innerText = "Ping: " + e + " ms"
  5509. }
  5510. function Bi() {
  5511. Ai = Date.now(),
  5512. r.send("pp")
  5513. }
  5514. function Ci(e) {
  5515. if (!(e < 0)) {
  5516. var t = Math.floor(e / 60)
  5517. , n = e % 60;
  5518. n = ("0" + n).slice(-2),
  5519. Ee.innerText = "Server restarting in " + t + ":" + n,
  5520. Ee.hidden = !1
  5521. }
  5522. }
  5523. function Oi(e) {
  5524. window.open(e, "_blank")
  5525. }
  5526. window.requestAnimFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || function(e) {
  5527. window.setTimeout(e, 1e3 / 60)
  5528. }
  5529. ,
  5530. function() {
  5531. var e = o.mapScale / 2;
  5532. nt.add(0, e, e + 200, 0, o.treeScales[3], 0),
  5533. nt.add(1, e, e - 480, 0, o.treeScales[3], 0),
  5534. nt.add(2, e + 300, e + 450, 0, o.treeScales[3], 0),
  5535. nt.add(3, e - 950, e - 130, 0, o.treeScales[2], 0),
  5536. nt.add(4, e - 750, e - 400, 0, o.treeScales[3], 0),
  5537. nt.add(5, e - 700, e + 400, 0, o.treeScales[2], 0),
  5538. nt.add(6, e + 800, e - 200, 0, o.treeScales[3], 0),
  5539. nt.add(7, e - 260, e + 340, 0, o.bushScales[3], 1),
  5540. nt.add(8, e + 760, e + 310, 0, o.bushScales[3], 1),
  5541. nt.add(9, e - 800, e + 100, 0, o.bushScales[3], 1),
  5542. nt.add(10, e - 800, e + 300, 0, l.list[4].scale, l.list[4].id, l.list[10]),
  5543. nt.add(11, e + 650, e - 390, 0, l.list[4].scale, l.list[4].id, l.list[10]),
  5544. nt.add(12, e - 400, e - 450, 0, o.rockScales[2], 2)
  5545. }(),
  5546. function e() {
  5547. B = Date.now(),
  5548. P = B - q,
  5549. q = B,
  5550. function() {
  5551. if (R && (!C || B - C >= 1e3 / o.clientSendRate) && (C = B,
  5552. AA && r.send("2", nEA)),
  5553. An < 120 && (An += .1 * P,
  5554. Ge.style.fontSize = Math.min(Math.round(An), 120) + "px"),
  5555. R) {
  5556. var e = s.getDistance(U, D, R.x, R.y)
  5557. , t = s.getDirection(R.x, R.y, U, D)
  5558. , n = Math.min(.01 * e * P, e);
  5559. e > .05 ? (U += n * Math.cos(t),
  5560. D += n * Math.sin(t)) : (U = R.x,
  5561. D = R.y)
  5562. } else
  5563. U = o.mapScale / 2,
  5564. D = o.mapScale / 2;
  5565. for (var i = B - 1e3 / o.serverUpdateRate, a = 0; a < W.length + Y.length; ++a)
  5566. if ((_ = W[a] || Y[a - W.length]) && _.visible)
  5567. if (_.forcePos)
  5568. _.x = _.x2,
  5569. _.y = _.y2,
  5570. _.dir = _.d2;
  5571. else {
  5572. var c = _.t2 - _.t1
  5573. , l = (i - _.t1) / c;
  5574. _.dt += P;
  5575. var h = Math.min(1.7, _.dt / 170)
  5576. , u = _.x2 - _.x1;
  5577. _.x = _.x1 + u * h,
  5578. u = _.y2 - _.y1,
  5579. _.y = _.y1 + u * h,
  5580. _.dir = Math.lerpAngle(_.d2, _.d1, Math.min(1.2, l))
  5581. }
  5582. var f = U - oe / 2 + camX
  5583. , d = D - ce / 2 + camY;
  5584. o.snowBiomeTop - d <= 0 && o.mapScale - o.snowBiomeTop - d >= ce ? (be.fillStyle = "#b6db66",
  5585. be.fillRect(0, 0, oe, ce)) : o.mapScale - o.snowBiomeTop - d <= 0 ? (be.fillStyle = "#dbc666",
  5586. be.fillRect(0, 0, oe, ce)) : o.snowBiomeTop - d >= ce ? (be.fillStyle = "#fff",
  5587. be.fillRect(0, 0, oe, ce)) : o.snowBiomeTop - d >= 0 ? (be.fillStyle = "#fff",
  5588. be.fillRect(0, 0, oe, o.snowBiomeTop - d),
  5589. be.fillStyle = "#b6db66",
  5590. be.fillRect(0, o.snowBiomeTop - d, oe, ce - (o.snowBiomeTop - d))) : (be.fillStyle = "#b6db66",
  5591. be.fillRect(0, 0, oe, o.mapScale - o.snowBiomeTop - d),
  5592. be.fillStyle = "#dbc666",
  5593. be.fillRect(0, o.mapScale - o.snowBiomeTop - d, oe, ce - (o.mapScale - o.snowBiomeTop - d))),
  5594. In || ((ee += te * o.waveSpeed * P) >= o.waveMax ? (ee = o.waveMax,
  5595. te = -1) : ee <= 1 && (ee = te = 1),
  5596. be.globalAlpha = 1,
  5597. be.fillStyle = "#dbc666",
  5598. qn(f, d, be, o.riverPadding),
  5599. be.fillStyle = "#91b2db",
  5600. qn(f, d, be, 250 * (ee - 1))),
  5601. be.lineWidth = 4,
  5602. be.strokeStyle = "#000",
  5603. be.globalAlpha = .06,
  5604. be.beginPath();
  5605. for (var p = (14400-f) % 100; p < oe; p += 100)
  5606. p > 0 && (be.moveTo(p, 0),
  5607. be.lineTo(p, ce));
  5608. for (var g = (14400-d) % 100; g < ce; g += 100)
  5609. p > 0 && (be.moveTo(0, g),
  5610. be.lineTo(oe, g));
  5611. for (be.stroke(),
  5612. be.globalAlpha = 1,
  5613. be.strokeStyle = it,
  5614. Yn(-1, f, d),
  5615. be.globalAlpha = 1,
  5616. be.lineWidth = 5.5,
  5617. zn(0, f, d),
  5618. Xn(f, d, 0),
  5619. be.globalAlpha = 1,
  5620. a = 0; a < Y.length; ++a)
  5621. (_ = Y[a]).active && _.visible && (_.animate(P),
  5622. be.save(),
  5623. be.translate(_.x - f, _.y - d),
  5624. be.rotate(_.dir + _.dirPlus - Math.PI / 2),
  5625. yi(_, be),
  5626. be.restore());
  5627. if (Yn(0, f, d),
  5628. zn(1, f, d),
  5629. Yn(1, f, d),
  5630. Xn(f, d, 1),
  5631. Yn(2, f, d),
  5632. Yn(3, f, d),
  5633. be.fillStyle = "#000",
  5634. be.globalAlpha = .09,
  5635. f <= 0 && be.fillRect(0, 0, -f, ce),
  5636. o.mapScale - f <= oe) {
  5637. var y = Math.max(0, -d);
  5638. be.fillRect(o.mapScale - f, y, oe - (o.mapScale - f), ce - y)
  5639. }
  5640. if (d <= 0 && be.fillRect(-f, 0, oe + f, -d),
  5641. o.mapScale - d <= ce) {
  5642. var k = Math.max(0, -f)
  5643. , v = 0;
  5644. o.mapScale - f <= oe && (v = oe - (o.mapScale - f)),
  5645. be.fillRect(k, o.mapScale - d, oe - k - v, ce - (o.mapScale - d))
  5646. }
  5647. for (be.globalAlpha = 1,
  5648. be.fillStyle = "rgba(0, 0, 70, 0.35)",
  5649. be.fillRect(0, 0, oe, ce),
  5650. be.strokeStyle = rt,
  5651. a = 0; a < W.length + Y.length; ++a)
  5652. if ((_ = W[a] || Y[a - W.length]).visible/* && (10 != _.skinIndex || _ == R || _.team && _.team == R.team)*/) {
  5653. var w = (_.team ? "[" + _.team + "] " : "") + (_.id ? "{" + _.weapVarId + "} " : "") + (_.name || "") + (_.id ? " {" +_.clownCounter + "}" : "");
  5654. if ("" != w) {
  5655. if (be.font = (_.nameScale || 30) + "px Hammersmith One",
  5656. (be.fillStyle = "#fff"),
  5657. be.textBaseline = "middle",
  5658. be.textAlign = "center",
  5659. be.lineWidth = _.nameScale ? 11 : 8,
  5660. be.lineJoin = "round",
  5661. be.strokeText(w, _.x - f, _.y - d - _.scale - o.nameY),
  5662. be.fillText(w, _.x - f, _.y - d - _.scale - o.nameY),
  5663. _.isLeader && Rn.crown.isLoaded) {
  5664. var b = o.crownIconScale;
  5665. k = _.x - f - b / 2 - be.measureText(w).width / 2 - o.crownPad,
  5666. be.drawImage(Rn.crown, k, _.y - d - _.scale - o.nameY - b / 2 - 5, b, b)
  5667. }
  5668. b = o.crownIconScale,
  5669. k = _.x - f - b / 2 + be.measureText(w).width / 2 + o.crownPad,
  5670. be.drawImage(Rn.skull, k, _.y - d - _.scale - o.nameY - b / 2 - 5, b, b)
  5671. }
  5672. _.health > 0 && (o.healthBarWidth,
  5673. be.fillStyle = rt,
  5674. be.roundRect(_.x - f - o.healthBarWidth - o.healthBarPad, _.y - d + _.scale + o.nameY, 2 * o.healthBarWidth + 2 * o.healthBarPad, 17, 8),
  5675. be.fill(),
  5676. be.fillStyle = _ == R || _.team && _.team == R.team ? "#8ecc51" : "#cc5151",
  5677. be.roundRect(_.x - f - o.healthBarWidth, _.y - d + _.scale + o.nameY + o.healthBarPad, 2 * o.healthBarWidth * (_.health / _.maxHealth), 17 - 2 * o.healthBarPad, 7),
  5678. be.fill()),
  5679. _.id && ((o.reloadBarWidth,
  5680. be.fillStyle = rt,
  5681. be.roundRect(_.x - f - o.healthBarWidth - o.healthBarPad, _.y - d + _.scale + o.nameY - 13, o.healthBarWidth + 2 * o.healthBarPad, 17, 8),
  5682. be.fill(),
  5683. be.fillStyle = "#828736",
  5684. be.roundRect(_.x - f - o.healthBarWidth, _.y - d + _.scale + o.nameY + o.healthBarPad - 13, 2 * o.healthBarWidth / 2 * (priR[_.sid]), 17 - 2 * o.healthBarPad, 7),
  5685. be.fill()),
  5686. (o.reloadBarWidth,
  5687. be.fillStyle = rt,
  5688. be.roundRect(_.x - f - o.healthBarPad, _.y - d + _.scale + o.nameY - 13, o.healthBarWidth + 2 * o.healthBarPad, 17, 8),
  5689. be.fill(),
  5690. be.fillStyle = "#828736",
  5691. be.roundRect(_.x - f, _.y - d + _.scale + o.nameY + o.healthBarPad - 13, 2 * o.healthBarWidth / 2 * (secR[_.sid]), 17 - 2 * o.healthBarPad, 7),
  5692. be.fill()))/*
  5693. var text = "[" + (_.primary == undefined ? "null" : _.primary) + "/" + (_.secondary == undefined ? "null" : _.secondary) + "]";
  5694. _.id &&(
  5695. be.textAlign = "center",
  5696. be.fillStyle = "#fff",
  5697. be.lineJoin = "round",
  5698. be.font = "20px Hammersmith One",
  5699. be.lineWidth = 6,
  5700. be.strokeText(text,_.x - f,_.y - d + _.scale + o.nameY + 32),
  5701. be.fillText(text,_.x - f,_.y - d + _.scale + o.nameY + 32))*/
  5702. }
  5703. for (m.update(P, be, f, d),
  5704. a = 0; a < W.length; ++a)
  5705. if ((_ = W[a]).visible && _.chatCountdown > 0) {
  5706. _.chatCountdown -= P,
  5707. _.chatCountdown <= 0 && (_.chatCountdown = 0),
  5708. be.font = "32px Hammersmith One";
  5709. var x = be.measureText(_.chatMessage);
  5710. be.textBaseline = "middle",
  5711. be.textAlign = "center",
  5712. k = _.x - f,
  5713. y = _.y - _.scale - d - 90;
  5714. var S = x.width + 17;
  5715. be.fillStyle = "rgba(0,0,0,0.2)",
  5716. be.roundRect(k - S / 2, y - 23.5, S, 47, 6),
  5717. be.fill(),
  5718. be.fillStyle = "#fff",
  5719. be.fillText(_.chatMessage, k, y)
  5720. }
  5721. !function(e) {
  5722. if (R && R.alive) {
  5723. Ke.clearRect(0, 0, Ne.width, Ne.height),
  5724. Ke.strokeStyle = "#fff",
  5725. Ke.lineWidth = 4;
  5726. for (var t = 0; t < qt.length; ++t)
  5727. (Vt = qt[t]).update(Ke, e);
  5728. if (Ke.globalAlpha = 1,
  5729. Ke.fillStyle = "#fff",
  5730. si(R.x / o.mapScale * Ne.width, R.y / o.mapScale * Ne.height, 7, Ke, !0),
  5731. Ke.fillStyle = "rgba(255,255,255,0.35)",
  5732. R.team && Et)
  5733. for (t = 0; t < Et.length; )
  5734. si(Et[t] / o.mapScale * Ne.width, Et[t + 1] / o.mapScale * Ne.height, 7, Ke, !0),
  5735. t += 2;
  5736. It && (Ke.fillStyle = "#fc5553",
  5737. Ke.font = "34px Hammersmith One",
  5738. Ke.textBaseline = "middle",
  5739. Ke.textAlign = "center",
  5740. Ke.fillText("x", It.x / o.mapScale * Ne.width, It.y / o.mapScale * Ne.height)),
  5741. Mt && (Ke.fillStyle = "#fff",
  5742. Ke.font = "34px Hammersmith One",
  5743. Ke.textBaseline = "middle",
  5744. Ke.textAlign = "center",
  5745. Ke.fillText("x", Mt.x / o.mapScale * Ne.width, Mt.y / o.mapScale * Ne.height))
  5746. }
  5747. }(P),
  5748. -1 !== re.id && Fn(re.startX, re.startY, re.currentX, re.currentY),
  5749. -1 !== se.id && Fn(se.startX, se.startY, se.currentX, se.currentY)
  5750. }(),
  5751. requestAnimFrame(e)
  5752. }(),
  5753. window.openLink = Oi,
  5754. window.aJoinReq = Dt,
  5755. window.follmoo = function() {
  5756. H || (H = !0,
  5757. I("moofoll", 1))
  5758. }
  5759. ,
  5760. window.kickFromClan = Lt,
  5761. window.sendJoin = Ft,
  5762. window.leaveAlliance = Ht,
  5763. window.createAlliance = zt,
  5764. window.storeBuy = Kt,
  5765. window.storeEquip = Jt,
  5766. window.showItemInfo = Tt,
  5767. window.selectSkinColor = function(e) {
  5768. ae = e,
  5769. en()
  5770. }
  5771. ,
  5772. window.changeStoreIndex = function(e) {
  5773. Xt != e && (Xt = e,
  5774. Gt())
  5775. }
  5776. ,
  5777. window.config = o
  5778. }
  5779. , function(e, t) {
  5780. !function(e, t, n) {
  5781. function i(e, t) {
  5782. return typeof e === t
  5783. }
  5784. var r = []
  5785. , s = []
  5786. , a = {
  5787. _version: "3.5.0",
  5788. _config: {
  5789. classPrefix: "",
  5790. enableClasses: !0,
  5791. enableJSClass: !0,
  5792. usePrefixes: !0
  5793. },
  5794. _q: [],
  5795. on: function(e, t) {
  5796. var n = this;
  5797. setTimeout((function() {
  5798. t(n[e])
  5799. }
  5800. ), 0)
  5801. },
  5802. addTest: function(e, t, n) {
  5803. s.push({
  5804. name: e,
  5805. fn: t,
  5806. options: n
  5807. })
  5808. },
  5809. addAsyncTest: function(e) {
  5810. s.push({
  5811. name: null,
  5812. fn: e
  5813. })
  5814. }
  5815. }
  5816. , o = function() {};
  5817. o.prototype = a,
  5818. o = new o;
  5819. var c = t.documentElement
  5820. , l = "svg" === c.nodeName.toLowerCase();
  5821. o.addTest("passiveeventlisteners", (function() {
  5822. var t = !1;
  5823. try {
  5824. var n = Object.defineProperty({}, "passive", {
  5825. get: function() {
  5826. t = !0
  5827. }
  5828. });
  5829. e.addEventListener("test", null, n)
  5830. } catch (e) {}
  5831. return t
  5832. }
  5833. )),
  5834. function() {
  5835. var e, t, n, a, c, l;
  5836. for (var h in s)
  5837. if (s.hasOwnProperty(h)) {
  5838. if (e = [],
  5839. (t = s[h]).name && (e.push(t.name.toLowerCase()),
  5840. t.options && t.options.aliases && t.options.aliases.length))
  5841. for (n = 0; n < t.options.aliases.length; n++)
  5842. e.push(t.options.aliases[n].toLowerCase());
  5843. for (a = i(t.fn, "function") ? t.fn() : t.fn,
  5844. c = 0; c < e.length; c++)
  5845. 1 === (l = e[c].split(".")).length ? o[l[0]] = a : (!o[l[0]] || o[l[0]]instanceof Boolean || (o[l[0]] = new Boolean(o[l[0]])),
  5846. o[l[0]][l[1]] = a),
  5847. r.push((a ? "" : "no-") + l.join("-"))
  5848. }
  5849. }(),
  5850. function(e) {
  5851. var t = c.className
  5852. , n = o._config.classPrefix || "";
  5853. if (l && (t = t.baseVal),
  5854. o._config.enableJSClass) {
  5855. var i = new RegExp("(^|\\s)" + n + "no-js(\\s|$)");
  5856. t = t.replace(i, "$1" + n + "js$2")
  5857. }
  5858. o._config.enableClasses && (t += " " + n + e.join(" " + n),
  5859. l ? c.className.baseVal = t : c.className = t)
  5860. }(r),
  5861. delete a.addTest,
  5862. delete a.addAsyncTest;
  5863. for (var h = 0; h < o._q.length; h++)
  5864. o._q[h]();
  5865. e.Modernizr = o
  5866. }(window, document)
  5867. }
  5868. , function(e, t, n) {
  5869. var i = n(24);
  5870. n(19),
  5871. e.exports = {
  5872. socket: null,
  5873. connected: !1,
  5874. socketId: -1,
  5875. connect: function(e, t, n) {
  5876. if (!this.socket) {
  5877. var r = this;
  5878. try {
  5879. var s = !1
  5880. , a = e;
  5881. this.socket = new WebSocket(a),
  5882. this.socket.binaryType = "arraybuffer",
  5883. this.socket.onmessage = function(e) {
  5884. var t = new Uint8Array(e.data)
  5885. , s = i.decode(t)
  5886. , a = s[0];
  5887. t = s[1],
  5888. "io-init" == a ? r.socketId = t[0] : n[a].apply(void 0, t)
  5889. }
  5890. ,
  5891. this.socket.onopen = function() {
  5892. r.connected = !0,
  5893. t()
  5894. }
  5895. ,
  5896. this.socket.onclose = function(e) {
  5897. r.connected = !1,
  5898. 4001 == e.code ? t("Invalid Connection") : s || t("disconnected")
  5899. }
  5900. ,
  5901. this.socket.onerror = function(e) {
  5902. this.socket && this.socket.readyState != WebSocket.OPEN && (s = !0,
  5903. console.error("Socket error", arguments),
  5904. t("Socket error"))
  5905. }
  5906. } catch (e) {
  5907. console.warn("Socket connection error:", e),
  5908. t(e)
  5909. }
  5910. }
  5911. },
  5912. send: function(e) {
  5913. var t = Array.prototype.slice.call(arguments, 1)
  5914. , n = i.encode([e, t]);
  5915. this.socket.send(n)
  5916. },
  5917. socketReady: function() {
  5918. return this.socket && this.connected
  5919. },
  5920. close: function() {
  5921. this.socket && this.socket.close()
  5922. }
  5923. }
  5924. }
  5925. , function(e, t, n) {
  5926. t.encode = n(9).encode,
  5927. t.decode = n(15).decode,
  5928. t.Encoder = n(37).Encoder,
  5929. t.Decoder = n(38).Decoder,
  5930. t.createCodec = n(39).createCodec,
  5931. t.codec = n(40).codec
  5932. }
  5933. , function(e, t, n) {
  5934. (function(t) {
  5935. function n(e) {
  5936. return e && e.isBuffer && e
  5937. }
  5938. e.exports = n(void 0 !== t && t) || n(this.Buffer) || n("undefined" != typeof window && window.Buffer) || this.Buffer
  5939. }
  5940. ).call(this, n(11).Buffer)
  5941. }
  5942. , function(e, t, n) {
  5943. "use strict";
  5944. t.byteLength = function(e) {
  5945. var t = l(e)
  5946. , n = t[0]
  5947. , i = t[1];
  5948. return 3 * (n + i) / 4 - i
  5949. }
  5950. ,
  5951. t.toByteArray = function(e) {
  5952. var t, n, i = l(e), a = i[0], o = i[1], c = new s(function(e, t, n) {
  5953. return 3 * (t + n) / 4 - n
  5954. }(0, a, o)), h = 0, u = o > 0 ? a - 4 : a;
  5955. for (n = 0; n < u; n += 4)
  5956. t = r[e.charCodeAt(n)] << 18 | r[e.charCodeAt(n + 1)] << 12 | r[e.charCodeAt(n + 2)] << 6 | r[e.charCodeAt(n + 3)],
  5957. c[h++] = t >> 16 & 255,
  5958. c[h++] = t >> 8 & 255,
  5959. c[h++] = 255 & t;
  5960. return 2 === o && (t = r[e.charCodeAt(n)] << 2 | r[e.charCodeAt(n + 1)] >> 4,
  5961. c[h++] = 255 & t),
  5962. 1 === o && (t = r[e.charCodeAt(n)] << 10 | r[e.charCodeAt(n + 1)] << 4 | r[e.charCodeAt(n + 2)] >> 2,
  5963. c[h++] = t >> 8 & 255,
  5964. c[h++] = 255 & t),
  5965. c
  5966. }
  5967. ,
  5968. t.fromByteArray = function(e) {
  5969. for (var t, n = e.length, r = n % 3, s = [], a = 0, o = n - r; a < o; a += 16383)
  5970. s.push(u(e, a, a + 16383 > o ? o : a + 16383));
  5971. return 1 === r ? (t = e[n - 1],
  5972. s.push(i[t >> 2] + i[t << 4 & 63] + "==")) : 2 === r && (t = (e[n - 2] << 8) + e[n - 1],
  5973. s.push(i[t >> 10] + i[t >> 4 & 63] + i[t << 2 & 63] + "=")),
  5974. s.join("")
  5975. }
  5976. ;
  5977. for (var i = [], r = [], s = "undefined" != typeof Uint8Array ? Uint8Array : Array, a = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", o = 0, c = a.length; o < c; ++o)
  5978. i[o] = a[o],
  5979. r[a.charCodeAt(o)] = o;
  5980. function l(e) {
  5981. var t = e.length;
  5982. if (t % 4 > 0)
  5983. throw new Error("Invalid string. Length must be a multiple of 4");
  5984. var n = e.indexOf("=");
  5985. return -1 === n && (n = t),
  5986. [n, n === t ? 0 : 4 - n % 4]
  5987. }
  5988. function h(e) {
  5989. return i[e >> 18 & 63] + i[e >> 12 & 63] + i[e >> 6 & 63] + i[63 & e]
  5990. }
  5991. function u(e, t, n) {
  5992. for (var i, r = [], s = t; s < n; s += 3)
  5993. i = (e[s] << 16 & 16711680) + (e[s + 1] << 8 & 65280) + (255 & e[s + 2]),
  5994. r.push(h(i));
  5995. return r.join("")
  5996. }
  5997. r["-".charCodeAt(0)] = 62,
  5998. r["_".charCodeAt(0)] = 63
  5999. }
  6000. , function(e, t) {
  6001. var n = {}.toString;
  6002. e.exports = Array.isArray || function(e) {
  6003. return "[object Array]" == n.call(e)
  6004. }
  6005. }
  6006. , function(e, t, n) {
  6007. var i = n(0);
  6008. function r(e) {
  6009. return new Array(e)
  6010. }
  6011. (t = e.exports = r(0)).alloc = r,
  6012. t.concat = i.concat,
  6013. t.from = function(e) {
  6014. if (!i.isBuffer(e) && i.isView(e))
  6015. e = i.Uint8Array.from(e);
  6016. else if (i.isArrayBuffer(e))
  6017. e = new Uint8Array(e);
  6018. else {
  6019. if ("string" == typeof e)
  6020. return i.from.call(t, e);
  6021. if ("number" == typeof e)
  6022. throw new TypeError('"value" argument must not be a number')
  6023. }
  6024. return Array.prototype.slice.call(e)
  6025. }
  6026. }
  6027. , function(e, t, n) {
  6028. var i = n(0)
  6029. , r = i.global;
  6030. function s(e) {
  6031. return new r(e)
  6032. }
  6033. (t = e.exports = i.hasBuffer ? s(0) : []).alloc = i.hasBuffer && r.alloc || s,
  6034. t.concat = i.concat,
  6035. t.from = function(e) {
  6036. if (!i.isBuffer(e) && i.isView(e))
  6037. e = i.Uint8Array.from(e);
  6038. else if (i.isArrayBuffer(e))
  6039. e = new Uint8Array(e);
  6040. else {
  6041. if ("string" == typeof e)
  6042. return i.from.call(t, e);
  6043. if ("number" == typeof e)
  6044. throw new TypeError('"value" argument must not be a number')
  6045. }
  6046. return r.from && 1 !== r.from.length ? r.from(e) : new r(e)
  6047. }
  6048. }
  6049. , function(e, t, n) {
  6050. var i = n(0);
  6051. function r(e) {
  6052. return new Uint8Array(e)
  6053. }
  6054. (t = e.exports = i.hasArrayBuffer ? r(0) : []).alloc = r,
  6055. t.concat = i.concat,
  6056. t.from = function(e) {
  6057. if (i.isView(e)) {
  6058. var n = e.byteOffset
  6059. , r = e.byteLength;
  6060. (e = e.buffer).byteLength !== r && (e.slice ? e = e.slice(n, n + r) : (e = new Uint8Array(e)).byteLength !== r && (e = Array.prototype.slice.call(e, n, n + r)))
  6061. } else {
  6062. if ("string" == typeof e)
  6063. return i.from.call(t, e);
  6064. if ("number" == typeof e)
  6065. throw new TypeError('"value" argument must not be a number')
  6066. }
  6067. return new Uint8Array(e)
  6068. }
  6069. }
  6070. , function(e, t) {
  6071. t.copy = function(e, t, n, i) {
  6072. var r;
  6073. n || (n = 0),
  6074. i || 0 === i || (i = this.length),
  6075. t || (t = 0);
  6076. var s = i - n;
  6077. if (e === this && n < t && t < i)
  6078. for (r = s - 1; r >= 0; r--)
  6079. e[r + t] = this[r + n];
  6080. else
  6081. for (r = 0; r < s; r++)
  6082. e[r + t] = this[r + n];
  6083. return s
  6084. }
  6085. ,
  6086. t.toString = function(e, t, n) {
  6087. var i = 0 | t;
  6088. n || (n = this.length);
  6089. for (var r = "", s = 0; i < n; )
  6090. (s = this[i++]) < 128 ? r += String.fromCharCode(s) : (192 == (224 & s) ? s = (31 & s) << 6 | 63 & this[i++] : 224 == (240 & s) ? s = (15 & s) << 12 | (63 & this[i++]) << 6 | 63 & this[i++] : 240 == (248 & s) && (s = (7 & s) << 18 | (63 & this[i++]) << 12 | (63 & this[i++]) << 6 | 63 & this[i++]),
  6091. s >= 65536 ? (s -= 65536,
  6092. r += String.fromCharCode(55296 + (s >>> 10), 56320 + (1023 & s))) : r += String.fromCharCode(s));
  6093. return r
  6094. }
  6095. ,
  6096. t.write = function(e, t) {
  6097. for (var n = t || (t |= 0), i = e.length, r = 0, s = 0; s < i; )
  6098. (r = e.charCodeAt(s++)) < 128 ? this[n++] = r : r < 2048 ? (this[n++] = 192 | r >>> 6,
  6099. this[n++] = 128 | 63 & r) : r < 55296 || r > 57343 ? (this[n++] = 224 | r >>> 12,
  6100. this[n++] = 128 | r >>> 6 & 63,
  6101. this[n++] = 128 | 63 & r) : (r = 65536 + (r - 55296 << 10 | e.charCodeAt(s++) - 56320),
  6102. this[n++] = 240 | r >>> 18,
  6103. this[n++] = 128 | r >>> 12 & 63,
  6104. this[n++] = 128 | r >>> 6 & 63,
  6105. this[n++] = 128 | 63 & r);
  6106. return n - t
  6107. }
  6108. }
  6109. , function(e, t, n) {
  6110. t.setExtPackers = function(e) {
  6111. e.addExtPacker(14, Error, [u, c]),
  6112. e.addExtPacker(1, EvalError, [u, c]),
  6113. e.addExtPacker(2, RangeError, [u, c]),
  6114. e.addExtPacker(3, ReferenceError, [u, c]),
  6115. e.addExtPacker(4, SyntaxError, [u, c]),
  6116. e.addExtPacker(5, TypeError, [u, c]),
  6117. e.addExtPacker(6, URIError, [u, c]),
  6118. e.addExtPacker(10, RegExp, [h, c]),
  6119. e.addExtPacker(11, Boolean, [l, c]),
  6120. e.addExtPacker(12, String, [l, c]),
  6121. e.addExtPacker(13, Date, [Number, c]),
  6122. e.addExtPacker(15, Number, [l, c]),
  6123. "undefined" != typeof Uint8Array && (e.addExtPacker(17, Int8Array, a),
  6124. e.addExtPacker(18, Uint8Array, a),
  6125. e.addExtPacker(19, Int16Array, a),
  6126. e.addExtPacker(20, Uint16Array, a),
  6127. e.addExtPacker(21, Int32Array, a),
  6128. e.addExtPacker(22, Uint32Array, a),
  6129. e.addExtPacker(23, Float32Array, a),
  6130. "undefined" != typeof Float64Array && e.addExtPacker(24, Float64Array, a),
  6131. "undefined" != typeof Uint8ClampedArray && e.addExtPacker(25, Uint8ClampedArray, a),
  6132. e.addExtPacker(26, ArrayBuffer, a),
  6133. e.addExtPacker(29, DataView, a)),
  6134. r.hasBuffer && e.addExtPacker(27, s, r.from)
  6135. }
  6136. ;
  6137. var i, r = n(0), s = r.global, a = r.Uint8Array.from, o = {
  6138. name: 1,
  6139. message: 1,
  6140. stack: 1,
  6141. columnNumber: 1,
  6142. fileName: 1,
  6143. lineNumber: 1
  6144. };
  6145. function c(e) {
  6146. return i || (i = n(9).encode),
  6147. i(e)
  6148. }
  6149. function l(e) {
  6150. return e.valueOf()
  6151. }
  6152. function h(e) {
  6153. (e = RegExp.prototype.toString.call(e).split("/")).shift();
  6154. var t = [e.pop()];
  6155. return t.unshift(e.join("/")),
  6156. t
  6157. }
  6158. function u(e) {
  6159. var t = {};
  6160. for (var n in o)
  6161. t[n] = e[n];
  6162. return t
  6163. }
  6164. }
  6165. , function(e, t, n) {
  6166. var i = n(5)
  6167. , r = n(7)
  6168. , s = r.Uint64BE
  6169. , a = r.Int64BE
  6170. , o = n(0)
  6171. , c = n(6)
  6172. , l = n(34)
  6173. , h = n(13).uint8
  6174. , u = n(3).ExtBuffer
  6175. , f = "undefined" != typeof Uint8Array
  6176. , d = "undefined" != typeof Map
  6177. , p = [];
  6178. p[1] = 212,
  6179. p[2] = 213,
  6180. p[4] = 214,
  6181. p[8] = 215,
  6182. p[16] = 216,
  6183. t.getWriteType = function(e) {
  6184. var t = l.getWriteToken(e)
  6185. , n = e && e.useraw
  6186. , r = f && e && e.binarraybuffer
  6187. , g = r ? o.isArrayBuffer : o.isBuffer
  6188. , m = r ? function(e, t) {
  6189. w(e, new Uint8Array(t))
  6190. }
  6191. : w
  6192. , y = d && e && e.usemap ? function(e, n) {
  6193. if (!(n instanceof Map))
  6194. return b(e, n);
  6195. var i = n.size;
  6196. t[i < 16 ? 128 + i : i <= 65535 ? 222 : 223](e, i);
  6197. var r = e.codec.encode;
  6198. n.forEach((function(t, n, i) {
  6199. r(e, n),
  6200. r(e, t)
  6201. }
  6202. ))
  6203. }
  6204. : b;
  6205. return {
  6206. boolean: function(e, n) {
  6207. t[n ? 195 : 194](e, n)
  6208. },
  6209. function: v,
  6210. number: function(e, n) {
  6211. var i = 0 | n;
  6212. n === i ? t[-32 <= i && i <= 127 ? 255 & i : 0 <= i ? i <= 255 ? 204 : i <= 65535 ? 205 : 206 : -128 <= i ? 208 : -32768 <= i ? 209 : 210](e, i) : t[203](e, n)
  6213. },
  6214. object: n ? function(e, n) {
  6215. if (g(n))
  6216. return function(e, n) {
  6217. var i = n.length;
  6218. t[i < 32 ? 160 + i : i <= 65535 ? 218 : 219](e, i),
  6219. e.send(n)
  6220. }(e, n);
  6221. k(e, n)
  6222. }
  6223. : k,
  6224. string: function(e) {
  6225. return function(n, i) {
  6226. var r = i.length
  6227. , s = 5 + 3 * r;
  6228. n.offset = n.reserve(s);
  6229. var a = n.buffer
  6230. , o = e(r)
  6231. , l = n.offset + o;
  6232. r = c.write.call(a, i, l);
  6233. var h = e(r);
  6234. if (o !== h) {
  6235. var u = l + h - o
  6236. , f = l + r;
  6237. c.copy.call(a, a, u, l, f)
  6238. }
  6239. t[1 === h ? 160 + r : h <= 3 ? 215 + h : 219](n, r),
  6240. n.offset += r
  6241. }
  6242. }(n ? function(e) {
  6243. return e < 32 ? 1 : e <= 65535 ? 3 : 5
  6244. }
  6245. : function(e) {
  6246. return e < 32 ? 1 : e <= 255 ? 2 : e <= 65535 ? 3 : 5
  6247. }
  6248. ),
  6249. symbol: v,
  6250. undefined: v
  6251. };
  6252. function k(e, n) {
  6253. if (null === n)
  6254. return v(e, n);
  6255. if (g(n))
  6256. return m(e, n);
  6257. if (i(n))
  6258. return function(e, n) {
  6259. var i = n.length;
  6260. t[i < 16 ? 144 + i : i <= 65535 ? 220 : 221](e, i);
  6261. for (var r = e.codec.encode, s = 0; s < i; s++)
  6262. r(e, n[s])
  6263. }(e, n);
  6264. if (s.isUint64BE(n))
  6265. return function(e, n) {
  6266. t[207](e, n.toArray())
  6267. }(e, n);
  6268. if (a.isInt64BE(n))
  6269. return function(e, n) {
  6270. t[211](e, n.toArray())
  6271. }(e, n);
  6272. var r = e.codec.getExtPacker(n);
  6273. if (r && (n = r(n)),
  6274. n instanceof u)
  6275. return function(e, n) {
  6276. var i = n.buffer
  6277. , r = i.length
  6278. , s = p[r] || (r < 255 ? 199 : r <= 65535 ? 200 : 201);
  6279. t[s](e, r),
  6280. h[n.type](e),
  6281. e.send(i)
  6282. }(e, n);
  6283. y(e, n)
  6284. }
  6285. function v(e, n) {
  6286. t[192](e, n)
  6287. }
  6288. function w(e, n) {
  6289. var i = n.length;
  6290. t[i < 255 ? 196 : i <= 65535 ? 197 : 198](e, i),
  6291. e.send(n)
  6292. }
  6293. function b(e, n) {
  6294. var i = Object.keys(n)
  6295. , r = i.length;
  6296. t[r < 16 ? 128 + r : r <= 65535 ? 222 : 223](e, r);
  6297. var s = e.codec.encode;
  6298. i.forEach((function(t) {
  6299. s(e, t),
  6300. s(e, n[t])
  6301. }
  6302. ))
  6303. }
  6304. }
  6305. }
  6306. , function(e, t, n) {
  6307. var i = n(4)
  6308. , r = n(7)
  6309. , s = r.Uint64BE
  6310. , a = r.Int64BE
  6311. , o = n(13).uint8
  6312. , c = n(0)
  6313. , l = c.global
  6314. , h = c.hasBuffer && "TYPED_ARRAY_SUPPORT"in l && !l.TYPED_ARRAY_SUPPORT
  6315. , u = c.hasBuffer && l.prototype || {};
  6316. function f() {
  6317. var e = o.slice();
  6318. return e[196] = d(196),
  6319. e[197] = p(197),
  6320. e[198] = g(198),
  6321. e[199] = d(199),
  6322. e[200] = p(200),
  6323. e[201] = g(201),
  6324. e[202] = m(202, 4, u.writeFloatBE || v, !0),
  6325. e[203] = m(203, 8, u.writeDoubleBE || w, !0),
  6326. e[204] = d(204),
  6327. e[205] = p(205),
  6328. e[206] = g(206),
  6329. e[207] = m(207, 8, y),
  6330. e[208] = d(208),
  6331. e[209] = p(209),
  6332. e[210] = g(210),
  6333. e[211] = m(211, 8, k),
  6334. e[217] = d(217),
  6335. e[218] = p(218),
  6336. e[219] = g(219),
  6337. e[220] = p(220),
  6338. e[221] = g(221),
  6339. e[222] = p(222),
  6340. e[223] = g(223),
  6341. e
  6342. }
  6343. function d(e) {
  6344. return function(t, n) {
  6345. var i = t.reserve(2)
  6346. , r = t.buffer;
  6347. r[i++] = e,
  6348. r[i] = n
  6349. }
  6350. }
  6351. function p(e) {
  6352. return function(t, n) {
  6353. var i = t.reserve(3)
  6354. , r = t.buffer;
  6355. r[i++] = e,
  6356. r[i++] = n >>> 8,
  6357. r[i] = n
  6358. }
  6359. }
  6360. function g(e) {
  6361. return function(t, n) {
  6362. var i = t.reserve(5)
  6363. , r = t.buffer;
  6364. r[i++] = e,
  6365. r[i++] = n >>> 24,
  6366. r[i++] = n >>> 16,
  6367. r[i++] = n >>> 8,
  6368. r[i] = n
  6369. }
  6370. }
  6371. function m(e, t, n, i) {
  6372. return function(r, s) {
  6373. var a = r.reserve(t + 1);
  6374. r.buffer[a++] = e,
  6375. n.call(r.buffer, s, a, i)
  6376. }
  6377. }
  6378. function y(e, t) {
  6379. new s(this,t,e)
  6380. }
  6381. function k(e, t) {
  6382. new a(this,t,e)
  6383. }
  6384. function v(e, t) {
  6385. i.write(this, e, t, !1, 23, 4)
  6386. }
  6387. function w(e, t) {
  6388. i.write(this, e, t, !1, 52, 8)
  6389. }
  6390. t.getWriteToken = function(e) {
  6391. return e && e.uint8array ? function() {
  6392. var e = f();
  6393. return e[202] = m(202, 4, v),
  6394. e[203] = m(203, 8, w),
  6395. e
  6396. }() : h || c.hasBuffer && e && e.safe ? function() {
  6397. var e = o.slice();
  6398. return e[196] = m(196, 1, l.prototype.writeUInt8),
  6399. e[197] = m(197, 2, l.prototype.writeUInt16BE),
  6400. e[198] = m(198, 4, l.prototype.writeUInt32BE),
  6401. e[199] = m(199, 1, l.prototype.writeUInt8),
  6402. e[200] = m(200, 2, l.prototype.writeUInt16BE),
  6403. e[201] = m(201, 4, l.prototype.writeUInt32BE),
  6404. e[202] = m(202, 4, l.prototype.writeFloatBE),
  6405. e[203] = m(203, 8, l.prototype.writeDoubleBE),
  6406. e[204] = m(204, 1, l.prototype.writeUInt8),
  6407. e[205] = m(205, 2, l.prototype.writeUInt16BE),
  6408. e[206] = m(206, 4, l.prototype.writeUInt32BE),
  6409. e[207] = m(207, 8, y),
  6410. e[208] = m(208, 1, l.prototype.writeInt8),
  6411. e[209] = m(209, 2, l.prototype.writeInt16BE),
  6412. e[210] = m(210, 4, l.prototype.writeInt32BE),
  6413. e[211] = m(211, 8, k),
  6414. e[217] = m(217, 1, l.prototype.writeUInt8),
  6415. e[218] = m(218, 2, l.prototype.writeUInt16BE),
  6416. e[219] = m(219, 4, l.prototype.writeUInt32BE),
  6417. e[220] = m(220, 2, l.prototype.writeUInt16BE),
  6418. e[221] = m(221, 4, l.prototype.writeUInt32BE),
  6419. e[222] = m(222, 2, l.prototype.writeUInt16BE),
  6420. e[223] = m(223, 4, l.prototype.writeUInt32BE),
  6421. e
  6422. }() : f()
  6423. }
  6424. }
  6425. , function(e, t, n) {
  6426. t.setExtUnpackers = function(e) {
  6427. e.addExtUnpacker(14, [o, l(Error)]),
  6428. e.addExtUnpacker(1, [o, l(EvalError)]),
  6429. e.addExtUnpacker(2, [o, l(RangeError)]),
  6430. e.addExtUnpacker(3, [o, l(ReferenceError)]),
  6431. e.addExtUnpacker(4, [o, l(SyntaxError)]),
  6432. e.addExtUnpacker(5, [o, l(TypeError)]),
  6433. e.addExtUnpacker(6, [o, l(URIError)]),
  6434. e.addExtUnpacker(10, [o, c]),
  6435. e.addExtUnpacker(11, [o, h(Boolean)]),
  6436. e.addExtUnpacker(12, [o, h(String)]),
  6437. e.addExtUnpacker(13, [o, h(Date)]),
  6438. e.addExtUnpacker(15, [o, h(Number)]),
  6439. "undefined" != typeof Uint8Array && (e.addExtUnpacker(17, h(Int8Array)),
  6440. e.addExtUnpacker(18, h(Uint8Array)),
  6441. e.addExtUnpacker(19, [u, h(Int16Array)]),
  6442. e.addExtUnpacker(20, [u, h(Uint16Array)]),
  6443. e.addExtUnpacker(21, [u, h(Int32Array)]),
  6444. e.addExtUnpacker(22, [u, h(Uint32Array)]),
  6445. e.addExtUnpacker(23, [u, h(Float32Array)]),
  6446. "undefined" != typeof Float64Array && e.addExtUnpacker(24, [u, h(Float64Array)]),
  6447. "undefined" != typeof Uint8ClampedArray && e.addExtUnpacker(25, h(Uint8ClampedArray)),
  6448. e.addExtUnpacker(26, u),
  6449. e.addExtUnpacker(29, [u, h(DataView)])),
  6450. r.hasBuffer && e.addExtUnpacker(27, h(s))
  6451. }
  6452. ;
  6453. var i, r = n(0), s = r.global, a = {
  6454. name: 1,
  6455. message: 1,
  6456. stack: 1,
  6457. columnNumber: 1,
  6458. fileName: 1,
  6459. lineNumber: 1
  6460. };
  6461. function o(e) {
  6462. return i || (i = n(15).decode),
  6463. i(e)
  6464. }
  6465. function c(e) {
  6466. return RegExp.apply(null, e)
  6467. }
  6468. function l(e) {
  6469. return function(t) {
  6470. var n = new e;
  6471. for (var i in a)
  6472. n[i] = t[i];
  6473. return n
  6474. }
  6475. }
  6476. function h(e) {
  6477. return function(t) {
  6478. return new e(t)
  6479. }
  6480. }
  6481. function u(e) {
  6482. return new Uint8Array(e).buffer
  6483. }
  6484. }
  6485. , function(e, t, n) {
  6486. var i = n(17);
  6487. function r(e) {
  6488. var t, n = new Array(256);
  6489. for (t = 0; t <= 127; t++)
  6490. n[t] = s(t);
  6491. for (t = 128; t <= 143; t++)
  6492. n[t] = o(t - 128, e.map);
  6493. for (t = 144; t <= 159; t++)
  6494. n[t] = o(t - 144, e.array);
  6495. for (t = 160; t <= 191; t++)
  6496. n[t] = o(t - 160, e.str);
  6497. for (n[192] = s(null),
  6498. n[193] = null,
  6499. n[194] = s(!1),
  6500. n[195] = s(!0),
  6501. n[196] = a(e.uint8, e.bin),
  6502. n[197] = a(e.uint16, e.bin),
  6503. n[198] = a(e.uint32, e.bin),
  6504. n[199] = a(e.uint8, e.ext),
  6505. n[200] = a(e.uint16, e.ext),
  6506. n[201] = a(e.uint32, e.ext),
  6507. n[202] = e.float32,
  6508. n[203] = e.float64,
  6509. n[204] = e.uint8,
  6510. n[205] = e.uint16,
  6511. n[206] = e.uint32,
  6512. n[207] = e.uint64,
  6513. n[208] = e.int8,
  6514. n[209] = e.int16,
  6515. n[210] = e.int32,
  6516. n[211] = e.int64,
  6517. n[212] = o(1, e.ext),
  6518. n[213] = o(2, e.ext),
  6519. n[214] = o(4, e.ext),
  6520. n[215] = o(8, e.ext),
  6521. n[216] = o(16, e.ext),
  6522. n[217] = a(e.uint8, e.str),
  6523. n[218] = a(e.uint16, e.str),
  6524. n[219] = a(e.uint32, e.str),
  6525. n[220] = a(e.uint16, e.array),
  6526. n[221] = a(e.uint32, e.array),
  6527. n[222] = a(e.uint16, e.map),
  6528. n[223] = a(e.uint32, e.map),
  6529. t = 224; t <= 255; t++)
  6530. n[t] = s(t - 256);
  6531. return n
  6532. }
  6533. function s(e) {
  6534. return function() {
  6535. return e
  6536. }
  6537. }
  6538. function a(e, t) {
  6539. return function(n) {
  6540. var i = e(n);
  6541. return t(n, i)
  6542. }
  6543. }
  6544. function o(e, t) {
  6545. return function(n) {
  6546. return t(n, e)
  6547. }
  6548. }
  6549. t.getReadToken = function(e) {
  6550. var t = i.getReadFormat(e);
  6551. return e && e.useraw ? function(e) {
  6552. var t, n = r(e).slice();
  6553. for (n[217] = n[196],
  6554. n[218] = n[197],
  6555. n[219] = n[198],
  6556. t = 160; t <= 191; t++)
  6557. n[t] = o(t - 160, e.bin);
  6558. return n
  6559. }(t) : r(t)
  6560. }
  6561. }
  6562. , function(e, t, n) {
  6563. t.Encoder = s;
  6564. var i = n(18)
  6565. , r = n(10).EncodeBuffer;
  6566. function s(e) {
  6567. if (!(this instanceof s))
  6568. return new s(e);
  6569. r.call(this, e)
  6570. }
  6571. s.prototype = new r,
  6572. i.mixin(s.prototype),
  6573. s.prototype.encode = function(e) {
  6574. this.write(e),
  6575. this.emit("data", this.read())
  6576. }
  6577. ,
  6578. s.prototype.end = function(e) {
  6579. arguments.length && this.encode(e),
  6580. this.flush(),
  6581. this.emit("end")
  6582. }
  6583. }
  6584. , function(e, t, n) {
  6585. t.Decoder = s;
  6586. var i = n(18)
  6587. , r = n(16).DecodeBuffer;
  6588. function s(e) {
  6589. if (!(this instanceof s))
  6590. return new s(e);
  6591. r.call(this, e)
  6592. }
  6593. s.prototype = new r,
  6594. i.mixin(s.prototype),
  6595. s.prototype.decode = function(e) {
  6596. arguments.length && this.write(e),
  6597. this.flush()
  6598. }
  6599. ,
  6600. s.prototype.push = function(e) {
  6601. this.emit("data", e)
  6602. }
  6603. ,
  6604. s.prototype.end = function(e) {
  6605. this.decode(e),
  6606. this.emit("end")
  6607. }
  6608. }
  6609. , function(e, t, n) {
  6610. n(8),
  6611. n(2),
  6612. t.createCodec = n(1).createCodec
  6613. }
  6614. , function(e, t, n) {
  6615. n(8),
  6616. n(2),
  6617. t.codec = {
  6618. preset: n(1).preset
  6619. }
  6620. }
  6621. , function(e, t) {
  6622. var n, i, r = e.exports = {};
  6623. function s() {
  6624. throw new Error("setTimeout has not been defined")
  6625. }
  6626. function a() {
  6627. throw new Error("clearTimeout has not been defined")
  6628. }
  6629. function o(e) {
  6630. if (n === setTimeout)
  6631. return setTimeout(e, 0);
  6632. if ((n === s || !n) && setTimeout)
  6633. return n = setTimeout,
  6634. setTimeout(e, 0);
  6635. try {
  6636. return n(e, 0)
  6637. } catch (t) {
  6638. try {
  6639. return n.call(null, e, 0)
  6640. } catch (t) {
  6641. return n.call(this, e, 0)
  6642. }
  6643. }
  6644. }
  6645. !function() {
  6646. try {
  6647. n = "function" == typeof setTimeout ? setTimeout : s
  6648. } catch (e) {
  6649. n = s
  6650. }
  6651. try {
  6652. i = "function" == typeof clearTimeout ? clearTimeout : a
  6653. } catch (e) {
  6654. i = a
  6655. }
  6656. }();
  6657. var c, l = [], h = !1, u = -1;
  6658. function f() {
  6659. h && c && (h = !1,
  6660. c.length ? l = c.concat(l) : u = -1,
  6661. l.length && d())
  6662. }
  6663. function d() {
  6664. if (!h) {
  6665. var e = o(f);
  6666. h = !0;
  6667. for (var t = l.length; t; ) {
  6668. for (c = l,
  6669. l = []; ++u < t; )
  6670. c && c[u].run();
  6671. u = -1,
  6672. t = l.length
  6673. }
  6674. c = null,
  6675. h = !1,
  6676. function(e) {
  6677. if (i === clearTimeout)
  6678. return clearTimeout(e);
  6679. if ((i === a || !i) && clearTimeout)
  6680. return i = clearTimeout,
  6681. clearTimeout(e);
  6682. try {
  6683. i(e)
  6684. } catch (t) {
  6685. try {
  6686. return i.call(null, e)
  6687. } catch (t) {
  6688. return i.call(this, e)
  6689. }
  6690. }
  6691. }(e)
  6692. }
  6693. }
  6694. function p(e, t) {
  6695. this.fun = e,
  6696. this.array = t
  6697. }
  6698. function g() {}
  6699. r.nextTick = function(e) {
  6700. var t = new Array(arguments.length - 1);
  6701. if (arguments.length > 1)
  6702. for (var n = 1; n < arguments.length; n++)
  6703. t[n - 1] = arguments[n];
  6704. l.push(new p(e,t)),
  6705. 1 !== l.length || h || o(d)
  6706. }
  6707. ,
  6708. p.prototype.run = function() {
  6709. this.fun.apply(null, this.array)
  6710. }
  6711. ,
  6712. r.title = "browser",
  6713. r.browser = !0,
  6714. r.env = {},
  6715. r.argv = [],
  6716. r.version = "",
  6717. r.versions = {},
  6718. r.on = g,
  6719. r.addListener = g,
  6720. r.once = g,
  6721. r.off = g,
  6722. r.removeListener = g,
  6723. r.removeAllListeners = g,
  6724. r.emit = g,
  6725. r.prependListener = g,
  6726. r.prependOnceListener = g,
  6727. r.listeners = function(e) {
  6728. return []
  6729. }
  6730. ,
  6731. r.binding = function(e) {
  6732. throw new Error("process.binding is not supported")
  6733. }
  6734. ,
  6735. r.cwd = function() {
  6736. return "/"
  6737. }
  6738. ,
  6739. r.chdir = function(e) {
  6740. throw new Error("process.chdir is not supported")
  6741. }
  6742. ,
  6743. r.umask = function() {
  6744. return 0
  6745. }
  6746. }
  6747. , function(e, t) {
  6748. var n = Math.abs
  6749. , i = (Math.cos,
  6750. Math.sin,
  6751. Math.pow,
  6752. Math.sqrt)
  6753. , r = (n = Math.abs,
  6754. Math.atan2)
  6755. , s = Math.PI;
  6756. e.exports.randInt = function(e, t) {
  6757. return Math.floor(Math.random() * (t - e + 1)) + e
  6758. }
  6759. ,
  6760. e.exports.randFloat = function(e, t) {
  6761. return Math.random() * (t - e + 1) + e
  6762. }
  6763. ,
  6764. e.exports.lerp = function(e, t, n) {
  6765. return e + (t - e) * n
  6766. }
  6767. ,
  6768. e.exports.decel = function(e, t) {
  6769. return e > 0 ? e = Math.max(0, e - t) : e < 0 && (e = Math.min(0, e + t)),
  6770. e
  6771. }
  6772. ,
  6773. e.exports.getDistance = function(e, t, n, r) {
  6774. return i((n -= e) * n + (r -= t) * r)
  6775. }
  6776. ,
  6777. e.exports.getDirection = function(e, t, n, i) {
  6778. return r(t - i, e - n)
  6779. }
  6780. ,
  6781. e.exports.getAngleDist = function(e, t) {
  6782. var i = n(t - e) % (2 * s);
  6783. return i > s ? 2 * s - i : i
  6784. }
  6785. ,
  6786. e.exports.isNumber = function(e) {
  6787. return "number" == typeof e && !isNaN(e) && isFinite(e)
  6788. }
  6789. ,
  6790. e.exports.isString = function(e) {
  6791. return e && "string" == typeof e
  6792. }
  6793. ,
  6794. e.exports.kFormat = function(e) {
  6795. return e > 999 ? (e / 1e3).toFixed(1) + "k" : e
  6796. }
  6797. ,
  6798. e.exports.capitalizeFirst = function(e) {
  6799. return e.charAt(0).toUpperCase() + e.slice(1)
  6800. }
  6801. ,
  6802. e.exports.fixTo = function(e, t) {
  6803. return parseFloat(e.toFixed(t))
  6804. }
  6805. ,
  6806. e.exports.sortByPoints = function(e, t) {
  6807. return parseFloat(t.points) - parseFloat(e.points)
  6808. }
  6809. ,
  6810. e.exports.lineInRect = function(e, t, n, i, r, s, a, o) {
  6811. var c = r
  6812. , l = a;
  6813. if (r > a && (c = a,
  6814. l = r),
  6815. l > n && (l = n),
  6816. c < e && (c = e),
  6817. c > l)
  6818. return !1;
  6819. var h = s
  6820. , u = o
  6821. , f = a - r;
  6822. if (Math.abs(f) > 1e-7) {
  6823. var d = (o - s) / f
  6824. , p = s - d * r;
  6825. h = d * c + p,
  6826. u = d * l + p
  6827. }
  6828. if (h > u) {
  6829. var g = u;
  6830. u = h,
  6831. h = g
  6832. }
  6833. return u > i && (u = i),
  6834. h < t && (h = t),
  6835. !(h > u)
  6836. }
  6837. ,
  6838. e.exports.containsPoint = function(e, t, n) {
  6839. var i = e.getBoundingClientRect()
  6840. , r = i.left + window.scrollX
  6841. , s = i.top + window.scrollY
  6842. , a = i.width
  6843. , o = i.height;
  6844. return t > r && t < r + a && n > s && n < s + o
  6845. }
  6846. ,
  6847. e.exports.mousifyTouchEvent = function(e) {
  6848. var t = e.changedTouches[0];
  6849. e.screenX = t.screenX,
  6850. e.screenY = t.screenY,
  6851. e.clientX = t.clientX,
  6852. e.clientY = t.clientY,
  6853. e.pageX = t.pageX,
  6854. e.pageY = t.pageY
  6855. }
  6856. ,
  6857. e.exports.hookTouchEvents = function(t, n) {
  6858. var i = !n
  6859. , r = !1;
  6860. function s(n) {
  6861. e.exports.mousifyTouchEvent(n),
  6862. window.setUsingTouch(!0),
  6863. i && (n.preventDefault(),
  6864. n.stopPropagation()),
  6865. r && (t.onclick && t.onclick(n),
  6866. t.onmouseout && t.onmouseout(n),
  6867. r = !1)
  6868. }
  6869. t.addEventListener("touchstart", e.exports.checkTrusted((function(n) {
  6870. e.exports.mousifyTouchEvent(n),
  6871. window.setUsingTouch(!0),
  6872. i && (n.preventDefault(),
  6873. n.stopPropagation()),
  6874. t.onmouseover && t.onmouseover(n),
  6875. r = !0
  6876. }
  6877. )), !1),
  6878. t.addEventListener("touchmove", e.exports.checkTrusted((function(n) {
  6879. e.exports.mousifyTouchEvent(n),
  6880. window.setUsingTouch(!0),
  6881. i && (n.preventDefault(),
  6882. n.stopPropagation()),
  6883. e.exports.containsPoint(t, n.pageX, n.pageY) ? r || (t.onmouseover && t.onmouseover(n),
  6884. r = !0) : r && (t.onmouseout && t.onmouseout(n),
  6885. r = !1)
  6886. }
  6887. )), !1),
  6888. t.addEventListener("touchend", e.exports.checkTrusted(s), !1),
  6889. t.addEventListener("touchcancel", e.exports.checkTrusted(s), !1),
  6890. t.addEventListener("touchleave", e.exports.checkTrusted(s), !1)
  6891. }
  6892. ,
  6893. e.exports.removeAllChildren = function(e) {
  6894. for (; e.hasChildNodes(); )
  6895. e.removeChild(e.lastChild)
  6896. }
  6897. ,
  6898. e.exports.generateElement = function(t) {
  6899. var n = document.createElement(t.tag || "div");
  6900. function i(e, i) {
  6901. t[e] && (n[i] = t[e])
  6902. }
  6903. for (var r in i("text", "textContent"),
  6904. i("html", "innerHTML"),
  6905. i("class", "className"),
  6906. t) {
  6907. switch (r) {
  6908. case "tag":
  6909. case "text":
  6910. case "html":
  6911. case "class":
  6912. case "style":
  6913. case "hookTouch":
  6914. case "parent":
  6915. case "children":
  6916. continue
  6917. }
  6918. n[r] = t[r]
  6919. }
  6920. if (n.onclick && (n.onclick = e.exports.checkTrusted(n.onclick)),
  6921. n.onmouseover && (n.onmouseover = e.exports.checkTrusted(n.onmouseover)),
  6922. n.onmouseout && (n.onmouseout = e.exports.checkTrusted(n.onmouseout)),
  6923. t.style && (n.style.cssText = t.style),
  6924. t.hookTouch && e.exports.hookTouchEvents(n),
  6925. t.parent && t.parent.appendChild(n),
  6926. t.children)
  6927. for (var s = 0; s < t.children.length; s++)
  6928. n.appendChild(t.children[s]);
  6929. return n
  6930. }
  6931. ,
  6932. e.exports.eventIsTrusted = function(e) {
  6933. return !e || "boolean" != typeof e.isTrusted || e.isTrusted
  6934. }
  6935. ,
  6936. e.exports.checkTrusted = function(t) {
  6937. return function(n) {
  6938. n && n instanceof Event && e.exports.eventIsTrusted(n) && t(n)
  6939. }
  6940. }
  6941. ,
  6942. e.exports.randomString = function(e) {
  6943. for (var t = "", n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", i = 0; i < e; i++)
  6944. t += n.charAt(Math.floor(Math.random() * n.length));
  6945. return t
  6946. }
  6947. ,
  6948. e.exports.countInArray = function(e, t) {
  6949. for (var n = 0, i = 0; i < e.length; i++)
  6950. e[i] === t && n++;
  6951. return n
  6952. }
  6953. }
  6954. , function(e, t) {
  6955. e.exports.AnimText = function() {
  6956. this.init = function(e, t, n, i, r, s, a) {
  6957. this.x = e,
  6958. this.y = t,
  6959. this.color = a,
  6960. this.scale = n,
  6961. this.startScale = this.scale,
  6962. this.maxScale = 1.5 * n,
  6963. this.scaleSpeed = .7,
  6964. this.speed = i,
  6965. this.life = r,
  6966. this.text = s
  6967. }
  6968. ,
  6969. this.update = function(e) {
  6970. this.life && (this.life -= e,
  6971. this.y -= this.speed * e,
  6972. this.scale += this.scaleSpeed * e,
  6973. this.scale >= this.maxScale ? (this.scale = this.maxScale,
  6974. this.scaleSpeed *= -1) : this.scale <= this.startScale && (this.scale = this.startScale,
  6975. this.scaleSpeed = 0),
  6976. this.life <= 0 && (this.life = 0))
  6977. }
  6978. ,
  6979. this.render = function(e, t, n) {
  6980. e.fillStyle = this.color,
  6981. e.font = this.scale + "px Hammersmith One",
  6982. e.fillText(this.text, this.x - t, this.y - n)
  6983. }
  6984. }
  6985. ,
  6986. e.exports.TextManager = function() {
  6987. this.texts = [],
  6988. this.update = function(e, t, n, i) {
  6989. t.textBaseline = "middle",
  6990. t.textAlign = "center";
  6991. for (var r = 0; r < this.texts.length; ++r)
  6992. this.texts[r].life && (this.texts[r].update(e),
  6993. this.texts[r].render(t, n, i))
  6994. }
  6995. ,
  6996. this.showText = function(t, n, i, r, s, a, o) {
  6997. for (var c, l = 0; l < this.texts.length; ++l)
  6998. if (!this.texts[l].life) {
  6999. c = this.texts[l];
  7000. break
  7001. }
  7002. c || (c = new e.exports.AnimText,
  7003. this.texts.push(c)),
  7004. c.init(t, n, i, r, s, a, o)
  7005. }
  7006. }
  7007. }
  7008. , function(e, t) {
  7009. e.exports = function(e) {
  7010. this.sid = e,
  7011. this.init = function(e, t, n, i, r, s, a) {
  7012. s = s || {},
  7013. this.sentTo = {},
  7014. this.gridLocations = [],
  7015. this.active = !0,
  7016. this.doUpdate = s.doUpdate,
  7017. this.x = e,
  7018. this.y = t,
  7019. this.dir = n,
  7020. this.xWiggle = 0,
  7021. this.yWiggle = 0,
  7022. this.scale = i,
  7023. this.type = r,
  7024. this.id = s.id,
  7025. this.owner = a,
  7026. this.name = s.name,
  7027. this.isItem = null != this.id,
  7028. this.group = s.group,
  7029. this.health = s.health,
  7030. this.layer = 2,
  7031. null != this.group ? this.layer = this.group.layer : 0 == this.type ? this.layer = 3 : 2 == this.type ? this.layer = 0 : 4 == this.type && (this.layer = -1),
  7032. this.colDiv = s.colDiv || 1,
  7033. this.blocker = s.blocker,
  7034. this.ignoreCollision = s.ignoreCollision,
  7035. this.dontGather = s.dontGather,
  7036. this.hideFromEnemy = s.hideFromEnemy,
  7037. this.friction = s.friction,
  7038. this.projDmg = s.projDmg,
  7039. this.dmg = s.dmg,
  7040. this.pDmg = s.pDmg,
  7041. this.pps = s.pps,
  7042. this.zIndex = s.zIndex || 0,
  7043. this.turnSpeed = s.turnSpeed,
  7044. this.req = s.req,
  7045. this.trap = s.trap,
  7046. this.healCol = s.healCol,
  7047. this.teleport = s.teleport,
  7048. this.boostSpeed = s.boostSpeed,
  7049. this.projectile = s.projectile,
  7050. this.shootRange = s.shootRange,
  7051. this.shootRate = s.shootRate,
  7052. this.shootCount = this.shootRate,
  7053. this.spawnPoint = s.spawnPoint
  7054. }
  7055. ,
  7056. this.changeHealth = function(e, t) {
  7057. return this.health += e,
  7058. this.health <= 0
  7059. }
  7060. ,
  7061. this.getScale = function(e, t) {
  7062. return e = e || 1,
  7063. this.scale * (this.isItem || 2 == this.type || 3 == this.type || 4 == this.type ? 1 : .6 * e) * (t ? 1 : this.colDiv)
  7064. }
  7065. ,
  7066. this.visibleToPlayer = function(e) {
  7067. return !this.hideFromEnemy || this.owner && (this.owner == e || this.owner.team && e.team == this.owner.team)
  7068. }
  7069. ,
  7070. this.update = function(e) {
  7071. this.active && (this.xWiggle && (this.xWiggle *= Math.pow(.99, e)),
  7072. this.yWiggle && (this.yWiggle *= Math.pow(.99, e)))
  7073. }
  7074. }
  7075. }
  7076. , function(e, t) {
  7077. e.exports.groups = [{
  7078. id: 0,
  7079. name: "food",
  7080. layer: 0
  7081. }, {
  7082. id: 1,
  7083. name: "walls",
  7084. place: !0,
  7085. limit: 30,
  7086. layer: 0
  7087. }, {
  7088. id: 2,
  7089. name: "spikes",
  7090. place: !0,
  7091. limit: 15,
  7092. layer: 0
  7093. }, {
  7094. id: 3,
  7095. name: "mill",
  7096. place: !0,
  7097. limit: 7,
  7098. layer: 1
  7099. }, {
  7100. id: 4,
  7101. name: "mine",
  7102. place: !0,
  7103. limit: 1,
  7104. layer: 0
  7105. }, {
  7106. id: 5,
  7107. name: "trap",
  7108. place: !0,
  7109. limit: 6,
  7110. layer: -1
  7111. }, {
  7112. id: 6,
  7113. name: "booster",
  7114. place: !0,
  7115. limit: 12,
  7116. layer: -1
  7117. }, {
  7118. id: 7,
  7119. name: "turret",
  7120. place: !0,
  7121. limit: 2,
  7122. layer: 1
  7123. }, {
  7124. id: 8,
  7125. name: "watchtower",
  7126. place: !0,
  7127. limit: 12,
  7128. layer: 1
  7129. }, {
  7130. id: 9,
  7131. name: "buff",
  7132. place: !0,
  7133. limit: 4,
  7134. layer: -1
  7135. }, {
  7136. id: 10,
  7137. name: "spawn",
  7138. place: !0,
  7139. limit: 1,
  7140. layer: -1
  7141. }, {
  7142. id: 11,
  7143. name: "sapling",
  7144. place: !0,
  7145. limit: 2,
  7146. layer: 0
  7147. }, {
  7148. id: 12,
  7149. name: "blocker",
  7150. place: !0,
  7151. limit: 3,
  7152. layer: -1
  7153. }, {
  7154. id: 13,
  7155. name: "teleporter",
  7156. place: !0,
  7157. limit: 2,
  7158. layer: -1
  7159. }],
  7160. t.projectiles = [{
  7161. indx: 0,
  7162. layer: 0,
  7163. src: "arrow_1",
  7164. dmg: 25,
  7165. speed: 1.6,
  7166. scale: 103,
  7167. range: 1e3
  7168. }, {
  7169. indx: 1,
  7170. layer: 1,
  7171. dmg: 25,
  7172. scale: 20
  7173. }, {
  7174. indx: 0,
  7175. layer: 0,
  7176. src: "arrow_1",
  7177. dmg: 35,
  7178. speed: 2.5,
  7179. scale: 103,
  7180. range: 1200
  7181. }, {
  7182. indx: 0,
  7183. layer: 0,
  7184. src: "arrow_1",
  7185. dmg: 30,
  7186. speed: 2,
  7187. scale: 103,
  7188. range: 1200
  7189. }, {
  7190. indx: 1,
  7191. layer: 1,
  7192. dmg: 16,
  7193. scale: 20
  7194. }, {
  7195. indx: 0,
  7196. layer: 0,
  7197. src: "bullet_1",
  7198. dmg: 50,
  7199. speed: 3.6,
  7200. scale: 160,
  7201. range: 1400
  7202. }],
  7203. t.weapons = [{
  7204. id: 0,
  7205. type: 0,
  7206. name: "tool hammer",
  7207. desc: "tool for gathering all resources",
  7208. src: "hammer_1",
  7209. length: 140,
  7210. width: 140,
  7211. xOff: -3,
  7212. yOff: 18,
  7213. dmg: 25,
  7214. range: 65,
  7215. gather: 1,
  7216. speed: 300
  7217. }, {
  7218. id: 1,
  7219. type: 0,
  7220. age: 2,
  7221. name: "hand axe",
  7222. desc: "gathers resources at a higher rate",
  7223. src: "axe_1",
  7224. length: 140,
  7225. width: 140,
  7226. xOff: 3,
  7227. yOff: 24,
  7228. dmg: 30,
  7229. spdMult: 1,
  7230. range: 70,
  7231. gather: 2,
  7232. speed: 400
  7233. }, {
  7234. id: 2,
  7235. type: 0,
  7236. age: 8,
  7237. name: "great axe",
  7238. desc: "deal more damage and gather more resources",
  7239. src: "great_axe_1",
  7240. length: 140,
  7241. width: 140,
  7242. xOff: -8,
  7243. yOff: 25,
  7244. dmg: 35,
  7245. spdMult: 1,
  7246. range: 75,
  7247. gather: 4,
  7248. speed: 400
  7249. }, {
  7250. id: 3,
  7251. type: 0,
  7252. age: 2,
  7253. name: "short sword",
  7254. desc: "increased attack power but slower move speed",
  7255. src: "sword_1",
  7256. iPad: 1.3,
  7257. length: 130,
  7258. width: 210,
  7259. xOff: -8,
  7260. yOff: 46,
  7261. dmg: 35,
  7262. spdMult: .85,
  7263. range: 110,
  7264. gather: 1,
  7265. speed: 300
  7266. }, {
  7267. id: 4,
  7268. type: 0,
  7269. age: 8,
  7270. name: "katana",
  7271. desc: "greater range and damage",
  7272. src: "samurai_1",
  7273. iPad: 1.3,
  7274. length: 130,
  7275. width: 210,
  7276. xOff: -8,
  7277. yOff: 59,
  7278. dmg: 40,
  7279. spdMult: .8,
  7280. range: 118,
  7281. gather: 1,
  7282. speed: 300
  7283. }, {
  7284. id: 5,
  7285. type: 0,
  7286. age: 2,
  7287. name: "polearm",
  7288. desc: "long range melee weapon",
  7289. src: "spear_1",
  7290. iPad: 1.3,
  7291. length: 130,
  7292. width: 210,
  7293. xOff: -8,
  7294. yOff: 53,
  7295. dmg: 45,
  7296. knock: .2,
  7297. spdMult: .82,
  7298. range: 142,
  7299. gather: 1,
  7300. speed: 700
  7301. }, {
  7302. id: 6,
  7303. type: 0,
  7304. age: 2,
  7305. name: "bat",
  7306. desc: "fast long range melee weapon",
  7307. src: "bat_1",
  7308. iPad: 1.3,
  7309. length: 110,
  7310. width: 180,
  7311. xOff: -8,
  7312. yOff: 53,
  7313. dmg: 20,
  7314. knock: .7,
  7315. range: 110,
  7316. gather: 1,
  7317. speed: 300
  7318. }, {
  7319. id: 7,
  7320. type: 0,
  7321. age: 2,
  7322. name: "daggers",
  7323. desc: "really fast short range weapon",
  7324. src: "dagger_1",
  7325. iPad: .8,
  7326. length: 110,
  7327. width: 110,
  7328. xOff: 18,
  7329. yOff: 0,
  7330. dmg: 20,
  7331. knock: .1,
  7332. range: 65,
  7333. gather: 1,
  7334. hitSlow: .1,
  7335. spdMult: 1.13,
  7336. speed: 100
  7337. }, {
  7338. id: 8,
  7339. type: 0,
  7340. age: 2,
  7341. name: "stick",
  7342. desc: "great for gathering but very weak",
  7343. src: "stick_1",
  7344. length: 140,
  7345. width: 140,
  7346. xOff: 3,
  7347. yOff: 24,
  7348. dmg: 1,
  7349. spdMult: 1,
  7350. range: 70,
  7351. gather: 7,
  7352. speed: 400
  7353. }, {
  7354. id: 9,
  7355. type: 1,
  7356. age: 6,
  7357. name: "hunting bow",
  7358. desc: "bow used for ranged combat and hunting",
  7359. src: "bow_1",
  7360. req: ["wood", 4],
  7361. length: 120,
  7362. width: 120,
  7363. xOff: -6,
  7364. yOff: 0,
  7365. projectile: 0,
  7366. spdMult: .75,
  7367. speed: 600
  7368. }, {
  7369. id: 10,
  7370. type: 1,
  7371. age: 6,
  7372. name: "great hammer",
  7373. desc: "hammer used for destroying structures",
  7374. src: "great_hammer_1",
  7375. length: 140,
  7376. width: 140,
  7377. xOff: -9,
  7378. yOff: 25,
  7379. dmg: 10,
  7380. spdMult: .88,
  7381. range: 75,
  7382. sDmg: 7.5,
  7383. gather: 1,
  7384. speed: 400
  7385. }, {
  7386. id: 11,
  7387. type: 1,
  7388. age: 6,
  7389. name: "wooden shield",
  7390. desc: "blocks projectiles and reduces melee damage",
  7391. src: "shield_1",
  7392. length: 120,
  7393. width: 120,
  7394. shield: .2,
  7395. xOff: 6,
  7396. yOff: 0,
  7397. spdMult: .7,
  7398. speed: 1
  7399. }, {
  7400. id: 12,
  7401. type: 1,
  7402. age: 8,
  7403. name: "crossbow",
  7404. desc: "deals more damage and has greater range",
  7405. src: "crossbow_1",
  7406. req: ["wood", 5],
  7407. aboveHand: !0,
  7408. armS: .75,
  7409. length: 120,
  7410. width: 120,
  7411. xOff: -4,
  7412. yOff: 0,
  7413. projectile: 2,
  7414. spdMult: .7,
  7415. speed: 700
  7416. }, {
  7417. id: 13,
  7418. type: 1,
  7419. age: 9,
  7420. name: "repeater crossbow",
  7421. desc: "high firerate crossbow with reduced damage",
  7422. src: "crossbow_2",
  7423. req: ["wood", 10],
  7424. aboveHand: !0,
  7425. armS: .75,
  7426. length: 120,
  7427. width: 120,
  7428. xOff: -4,
  7429. yOff: 0,
  7430. projectile: 3,
  7431. spdMult: .7,
  7432. speed: 230
  7433. }, {
  7434. id: 14,
  7435. type: 1,
  7436. age: 6,
  7437. name: "mc grabby",
  7438. desc: "steals resources from enemies",
  7439. src: "grab_1",
  7440. length: 130,
  7441. width: 210,
  7442. xOff: -8,
  7443. yOff: 53,
  7444. dmg: 0,
  7445. steal: 250,
  7446. knock: .2,
  7447. spdMult: 1.05,
  7448. range: 125,
  7449. gather: 0,
  7450. speed: 700
  7451. }, {
  7452. id: 15,
  7453. type: 1,
  7454. age: 9,
  7455. name: "musket",
  7456. desc: "slow firerate but high damage and range",
  7457. src: "musket_1",
  7458. req: ["stone", 10],
  7459. aboveHand: !0,
  7460. rec: .35,
  7461. armS: .6,
  7462. hndS: .3,
  7463. hndD: 1.6,
  7464. length: 205,
  7465. width: 205,
  7466. xOff: 25,
  7467. yOff: 0,
  7468. projectile: 5,
  7469. hideProjectile: !0,
  7470. spdMult: .6,
  7471. speed: 1500
  7472. }],
  7473. e.exports.list = [{
  7474. group: e.exports.groups[0],
  7475. name: "apple",
  7476. desc: "restores 20 health when consumed",
  7477. req: ["food", 10],
  7478. consume: function(e) {
  7479. return e.changeHealth(20, e)
  7480. },
  7481. scale: 22,
  7482. holdOffset: 15
  7483. }, {
  7484. age: 3,
  7485. group: e.exports.groups[0],
  7486. name: "cookie",
  7487. desc: "restores 40 health when consumed",
  7488. req: ["food", 15],
  7489. consume: function(e) {
  7490. return e.changeHealth(40, e)
  7491. },
  7492. scale: 27,
  7493. holdOffset: 15
  7494. }, {
  7495. age: 7,
  7496. group: e.exports.groups[0],
  7497. name: "cheese",
  7498. desc: "restores 30 health and another 50 over 5 seconds",
  7499. req: ["food", 25],
  7500. consume: function(e) {
  7501. return !!(e.changeHealth(30, e) || e.health < 100) && (e.dmgOverTime.dmg = -10,
  7502. e.dmgOverTime.doer = e,
  7503. e.dmgOverTime.time = 5,
  7504. !0)
  7505. },
  7506. scale: 27,
  7507. holdOffset: 15
  7508. }, {
  7509. group: e.exports.groups[1],
  7510. name: "wood wall",
  7511. desc: "provides protection for your village",
  7512. req: ["wood", 10],
  7513. projDmg: !0,
  7514. health: 380,
  7515. scale: 50,
  7516. holdOffset: 20,
  7517. placeOffset: -5
  7518. }, {
  7519. age: 3,
  7520. group: e.exports.groups[1],
  7521. name: "stone wall",
  7522. desc: "provides improved protection for your village",
  7523. req: ["stone", 25],
  7524. health: 900,
  7525. scale: 50,
  7526. holdOffset: 20,
  7527. placeOffset: -5
  7528. }, {
  7529. age: 7,
  7530. group: e.exports.groups[1],
  7531. name: "castle wall",
  7532. desc: "provides powerful protection for your village",
  7533. req: ["stone", 35],
  7534. health: 1500,
  7535. scale: 52,
  7536. holdOffset: 20,
  7537. placeOffset: -5
  7538. }, {
  7539. group: e.exports.groups[2],
  7540. name: "spikes",
  7541. desc: "damages enemies when they touch them",
  7542. req: ["wood", 20, "stone", 5],
  7543. health: 400,
  7544. dmg: 20,
  7545. scale: 49,
  7546. spritePadding: -23,
  7547. holdOffset: 8,
  7548. placeOffset: -5
  7549. }, {
  7550. age: 5,
  7551. group: e.exports.groups[2],
  7552. name: "greater spikes",
  7553. desc: "damages enemies when they touch them",
  7554. req: ["wood", 30, "stone", 10],
  7555. health: 500,
  7556. dmg: 35,
  7557. scale: 52,
  7558. spritePadding: -23,
  7559. holdOffset: 8,
  7560. placeOffset: -5
  7561. }, {
  7562. age: 9,
  7563. group: e.exports.groups[2],
  7564. name: "poison spikes",
  7565. desc: "poisons enemies when they touch them",
  7566. req: ["wood", 35, "stone", 15],
  7567. health: 600,
  7568. dmg: 30,
  7569. pDmg: 5,
  7570. scale: 52,
  7571. spritePadding: -23,
  7572. holdOffset: 8,
  7573. placeOffset: -5
  7574. }, {
  7575. age: 9,
  7576. group: e.exports.groups[2],
  7577. name: "spinning spikes",
  7578. desc: "damages enemies when they touch them",
  7579. req: ["wood", 30, "stone", 20],
  7580. health: 500,
  7581. dmg: 45,
  7582. turnSpeed: .003,
  7583. scale: 52,
  7584. spritePadding: -23,
  7585. holdOffset: 8,
  7586. placeOffset: -5
  7587. }, {
  7588. group: e.exports.groups[3],
  7589. name: "windmill",
  7590. desc: "generates gold over time",
  7591. req: ["wood", 50, "stone", 10],
  7592. health: 400,
  7593. pps: 1,
  7594. turnSpeed: .0016,
  7595. spritePadding: 25,
  7596. iconLineMult: 12,
  7597. scale: 45,
  7598. holdOffset: 20,
  7599. placeOffset: 5
  7600. }, {
  7601. age: 5,
  7602. group: e.exports.groups[3],
  7603. name: "faster windmill",
  7604. desc: "generates more gold over time",
  7605. req: ["wood", 60, "stone", 20],
  7606. health: 500,
  7607. pps: 1.5,
  7608. turnSpeed: .0025,
  7609. spritePadding: 25,
  7610. iconLineMult: 12,
  7611. scale: 47,
  7612. holdOffset: 20,
  7613. placeOffset: 5
  7614. }, {
  7615. age: 8,
  7616. group: e.exports.groups[3],
  7617. name: "power mill",
  7618. desc: "generates more gold over time",
  7619. req: ["wood", 100, "stone", 50],
  7620. health: 800,
  7621. pps: 2,
  7622. turnSpeed: .005,
  7623. spritePadding: 25,
  7624. iconLineMult: 12,
  7625. scale: 47,
  7626. holdOffset: 20,
  7627. placeOffset: 5
  7628. }, {
  7629. age: 5,
  7630. group: e.exports.groups[4],
  7631. type: 2,
  7632. name: "mine",
  7633. desc: "allows you to mine stone",
  7634. req: ["wood", 20, "stone", 100],
  7635. iconLineMult: 12,
  7636. scale: 65,
  7637. holdOffset: 20,
  7638. placeOffset: 0
  7639. }, {
  7640. age: 5,
  7641. group: e.exports.groups[11],
  7642. type: 0,
  7643. name: "sapling",
  7644. desc: "allows you to farm wood",
  7645. req: ["wood", 150],
  7646. iconLineMult: 12,
  7647. colDiv: .5,
  7648. scale: 110,
  7649. holdOffset: 50,
  7650. placeOffset: -15
  7651. }, {
  7652. age: 4,
  7653. group: e.exports.groups[5],
  7654. name: "pit trap",
  7655. desc: "pit that traps enemies if they walk over it",
  7656. req: ["wood", 30, "stone", 30],
  7657. trap: !0,
  7658. ignoreCollision: !0,
  7659. hideFromEnemy: !0,
  7660. health: 500,
  7661. colDiv: .2,
  7662. scale: 50,
  7663. holdOffset: 20,
  7664. placeOffset: -5
  7665. }, {
  7666. age: 4,
  7667. group: e.exports.groups[6],
  7668. name: "boost pad",
  7669. desc: "provides boost when stepped on",
  7670. req: ["stone", 20, "wood", 5],
  7671. ignoreCollision: !0,
  7672. boostSpeed: 1.5,
  7673. health: 150,
  7674. colDiv: .7,
  7675. scale: 45,
  7676. holdOffset: 20,
  7677. placeOffset: -5
  7678. }, {
  7679. age: 7,
  7680. group: e.exports.groups[7],
  7681. name: "turret",
  7682. desc: "defensive structure that shoots at enemies",
  7683. req: ["wood", 200, "stone", 150],
  7684. health: 800,
  7685. projectile: 1,
  7686. shootRange: 700,
  7687. shootRate: 2200,
  7688. scale: 43,
  7689. holdOffset: 20,
  7690. placeOffset: -5
  7691. }, {
  7692. age: 7,
  7693. group: e.exports.groups[8],
  7694. name: "platform",
  7695. desc: "platform to shoot over walls and cross over water",
  7696. req: ["wood", 20],
  7697. ignoreCollision: !0,
  7698. zIndex: 1,
  7699. health: 300,
  7700. scale: 43,
  7701. holdOffset: 20,
  7702. placeOffset: -5
  7703. }, {
  7704. age: 7,
  7705. group: e.exports.groups[9],
  7706. name: "healing pad",
  7707. desc: "standing on it will slowly heal you",
  7708. req: ["wood", 30, "food", 10],
  7709. ignoreCollision: !0,
  7710. healCol: 15,
  7711. health: 400,
  7712. colDiv: .7,
  7713. scale: 45,
  7714. holdOffset: 20,
  7715. placeOffset: -5
  7716. }, {
  7717. age: 9,
  7718. group: e.exports.groups[10],
  7719. name: "spawn pad",
  7720. desc: "you will spawn here when you die but it will dissapear",
  7721. req: ["wood", 100, "stone", 100],
  7722. health: 400,
  7723. ignoreCollision: !0,
  7724. spawnPoint: !0,
  7725. scale: 45,
  7726. holdOffset: 20,
  7727. placeOffset: -5
  7728. }, {
  7729. age: 7,
  7730. group: e.exports.groups[12],
  7731. name: "blocker",
  7732. desc: "blocks building in radius",
  7733. req: ["wood", 30, "stone", 25],
  7734. ignoreCollision: !0,
  7735. blocker: 300,
  7736. health: 400,
  7737. colDiv: .7,
  7738. scale: 45,
  7739. holdOffset: 20,
  7740. placeOffset: -5
  7741. }, {
  7742. age: 7,
  7743. group: e.exports.groups[13],
  7744. name: "teleporter",
  7745. desc: "teleports you to a random point on the map",
  7746. req: ["wood", 60, "stone", 60],
  7747. ignoreCollision: !0,
  7748. teleport: !0,
  7749. health: 200,
  7750. colDiv: .7,
  7751. scale: 45,
  7752. holdOffset: 20,
  7753. placeOffset: -5
  7754. }];
  7755. for (var n = 0; n < e.exports.list.length; ++n)
  7756. e.exports.list[n].id = n,
  7757. e.exports.list[n].pre && (e.exports.list[n].pre = n - e.exports.list[n].pre)
  7758. }
  7759. , function(e, t) {
  7760. e.exports = {}
  7761. }
  7762. , function(e, t) {
  7763. var n = Math.floor
  7764. , i = Math.abs
  7765. , r = Math.cos
  7766. , s = Math.sin
  7767. , a = (Math.pow,
  7768. Math.sqrt);
  7769. e.exports = function(e, t, o, c, l, h) {
  7770. var u, f;
  7771. this.objects = t,
  7772. this.grids = {},
  7773. this.updateObjects = [];
  7774. var d = c.mapScale / c.colGrid;
  7775. this.setObjectGrids = function(e) {
  7776. for (var t = Math.min(c.mapScale, Math.max(0, e.x)), n = Math.min(c.mapScale, Math.max(0, e.y)), i = 0; i < c.colGrid; ++i) {
  7777. u = i * d;
  7778. for (var r = 0; r < c.colGrid; ++r)
  7779. f = r * d,
  7780. t + e.scale >= u && t - e.scale <= u + d && n + e.scale >= f && n - e.scale <= f + d && (this.grids[i + "_" + r] || (this.grids[i + "_" + r] = []),
  7781. this.grids[i + "_" + r].push(e),
  7782. e.gridLocations.push(i + "_" + r))
  7783. }
  7784. }
  7785. ,
  7786. this.removeObjGrid = function(e) {
  7787. for (var t, n = 0; n < e.gridLocations.length; ++n)
  7788. (t = this.grids[e.gridLocations[n]].indexOf(e)) >= 0 && this.grids[e.gridLocations[n]].splice(t, 1)
  7789. }
  7790. ,
  7791. this.disableObj = function(e) {
  7792. if (e.active = !1,
  7793. h) {
  7794. e.owner && e.pps && (e.owner.pps -= e.pps),
  7795. this.removeObjGrid(e);
  7796. var t = this.updateObjects.indexOf(e);
  7797. t >= 0 && this.updateObjects.splice(t, 1)
  7798. }
  7799. }
  7800. ,
  7801. this.hitObj = function(e, t) {
  7802. for (var n = 0; n < l.length; ++n)
  7803. l[n].active && (e.sentTo[l[n].id] && (e.active ? l[n].canSee(e) && h.send(l[n].id, "8", o.fixTo(t, 1), e.sid) : h.send(l[n].id, "12", e.sid)),
  7804. e.active || e.owner != l[n] || l[n].changeItemCount(e.group.id, -1))
  7805. }
  7806. ;
  7807. var p, g, m = [];
  7808. this.getGridArrays = function(e, t, i) {
  7809. u = n(e / d),
  7810. f = n(t / d),
  7811. m.length = 0;
  7812. try {
  7813. this.grids[u + "_" + f] && m.push(this.grids[u + "_" + f]),
  7814. e + i >= (u + 1) * d && ((p = this.grids[u + 1 + "_" + f]) && m.push(p),
  7815. f && t - i <= f * d ? (p = this.grids[u + 1 + "_" + (f - 1)]) && m.push(p) : t + i >= (f + 1) * d && (p = this.grids[u + 1 + "_" + (f + 1)]) && m.push(p)),
  7816. u && e - i <= u * d && ((p = this.grids[u - 1 + "_" + f]) && m.push(p),
  7817. f && t - i <= f * d ? (p = this.grids[u - 1 + "_" + (f - 1)]) && m.push(p) : t + i >= (f + 1) * d && (p = this.grids[u - 1 + "_" + (f + 1)]) && m.push(p)),
  7818. t + i >= (f + 1) * d && (p = this.grids[u + "_" + (f + 1)]) && m.push(p),
  7819. f && t - i <= f * d && (p = this.grids[u + "_" + (f - 1)]) && m.push(p)
  7820. } catch (e) {}
  7821. return m
  7822. }
  7823. ,
  7824. this.add = function(n, i, r, s, a, o, c, l, u) {
  7825. g = null;
  7826. for (var f = 0; f < t.length; ++f)
  7827. if (t[f].sid == n) {
  7828. g = t[f];
  7829. break
  7830. }
  7831. if (!g)
  7832. for (f = 0; f < t.length; ++f)
  7833. if (!t[f].active) {
  7834. g = t[f];
  7835. break
  7836. }
  7837. g || (g = new e(n),
  7838. t.push(g)),
  7839. l && (g.sid = n),
  7840. g.init(i, r, s, a, o, c, u),
  7841. h && (this.setObjectGrids(g),
  7842. g.doUpdate && this.updateObjects.push(g))
  7843. }
  7844. ,
  7845. this.disableBySid = function(e) {
  7846. for (var n = 0; n < t.length; ++n)
  7847. if (t[n].sid == e) {
  7848. this.disableObj(t[n]);
  7849. break
  7850. }
  7851. }
  7852. ,
  7853. this.removeAllItems = function(e, n) {
  7854. for (var i = 0; i < t.length; ++i)
  7855. t[i].active && t[i].owner && t[i].owner.sid == e && this.disableObj(t[i]);
  7856. n && n.broadcast("13", e)
  7857. }
  7858. ,
  7859. this.fetchSpawnObj = function(e) {
  7860. for (var n = null, i = 0; i < t.length; ++i)
  7861. if ((g = t[i]).active && g.owner && g.owner.sid == e && g.spawnPoint) {
  7862. n = [g.x, g.y],
  7863. this.disableObj(g),
  7864. h.broadcast("12", g.sid),
  7865. g.owner && g.owner.changeItemCount(g.group.id, -1);
  7866. break
  7867. }
  7868. return n
  7869. }
  7870. ,
  7871. this.checkItemLocation = function(e, n, i, r, s, a, l) {
  7872. for (var h = 0; h < t.length; ++h) {
  7873. var u = t[h].blocker ? t[h].blocker : t[h].getScale(r, t[h].isItem);
  7874. if (t[h].active && o.getDistance(e, n, t[h].x, t[h].y) < i + u)
  7875. return !1
  7876. }
  7877. return !(!a && 18 != s && n >= c.mapScale / 2 - c.riverWidth / 2 && n <= c.mapScale / 2 + c.riverWidth / 2)
  7878. }
  7879. ,
  7880. this.addProjectile = function(e, t, n, i, r) {
  7881. for (var s, a = items.projectiles[r], c = 0; c < projectiles.length; ++c)
  7882. if (!projectiles[c].active) {
  7883. s = projectiles[c];
  7884. break
  7885. }
  7886. s || (s = new Projectile(l,o),
  7887. projectiles.push(s)),
  7888. s.init(r, e, t, n, a.speed, i, a.scale)
  7889. }
  7890. ,
  7891. this.checkCollision = function(e, t, n) {
  7892. n = n || 1;
  7893. var l = e.x - t.x
  7894. , h = e.y - t.y
  7895. , u = e.scale + t.scale;
  7896. if (i(l) <= u || i(h) <= u) {
  7897. u = e.scale + (t.getScale ? t.getScale() : t.scale);
  7898. var f = a(l * l + h * h) - u;
  7899. if (f <= 0) {
  7900. if (t.ignoreCollision)
  7901. !t.trap || e.noTrap || t.owner == e || t.owner && t.owner.team && t.owner.team == e.team ? t.boostSpeed ? (e.xVel += n * t.boostSpeed * (t.weightM || 1) * r(t.dir),
  7902. e.yVel += n * t.boostSpeed * (t.weightM || 1) * s(t.dir)) : t.healCol ? e.healCol = t.healCol : t.teleport && (e.x = o.randInt(0, c.mapScale),
  7903. e.y = o.randInt(0, c.mapScale)) : (e.lockMove = !0,
  7904. t.hideFromEnemy = !1);
  7905. else {
  7906. var d = o.getDirection(e.x, e.y, t.x, t.y);
  7907. if (o.getDistance(e.x, e.y, t.x, t.y),
  7908. t.isPlayer ? (f = -1 * f / 2,
  7909. e.x += f * r(d),
  7910. e.y += f * s(d),
  7911. t.x -= f * r(d),
  7912. t.y -= f * s(d)) : (e.x = t.x + u * r(d),
  7913. e.y = t.y + u * s(d),
  7914. e.xVel *= .75,
  7915. e.yVel *= .75),
  7916. t.dmg && t.owner != e && (!t.owner || !t.owner.team || t.owner.team != e.team)) {
  7917. e.changeHealth(-t.dmg, t.owner, t);
  7918. var p = 1.5 * (t.weightM || 1);
  7919. e.xVel += p * r(d),
  7920. e.yVel += p * s(d),
  7921. !t.pDmg || e.skin && e.skin.poisonRes || (e.dmgOverTime.dmg = t.pDmg,
  7922. e.dmgOverTime.time = 5,
  7923. e.dmgOverTime.doer = t.owner),
  7924. e.colDmg && t.health && (t.changeHealth(-e.colDmg) && this.disableObj(t),
  7925. this.hitObj(t, o.getDirection(e.x, e.y, t.x, t.y)))
  7926. }
  7927. }
  7928. return t.zIndex > e.zIndex && (e.zIndex = t.zIndex),
  7929. !0
  7930. }
  7931. }
  7932. return !1
  7933. }
  7934. }
  7935. }
  7936. , function(e, t, n) {
  7937. var i = new (n(49));
  7938. i.addWords("jew", "black", "baby", "child", "white", "porn", "pedo", "trump", "clinton", "hitler", "nazi", "gay", "pride", "sex", "pleasure", "touch", "poo", "kids", "rape", "white power", "nigga", "nig nog", "doggy", "rapist", "boner", "nigger", "nigg", "finger", "nogger", "nagger", "nig", "fag", "gai", "pole", "stripper", "penis", "vagina", "pussy", "nazi", "hitler", "stalin", "burn", "chamber", "cock", "peen", "dick", "spick", "nieger", "die", "satan", "n|ig", "nlg", "cunt", "c0ck", "fag", "lick", "condom", "anal", "shit", "phile", "little", "kids", "free KR", "tiny", "sidney", "ass", "kill", ".io", "(dot)", "[dot]", "mini", "whiore", "whore", "faggot", "github", "1337", "666", "satan", "senpa", "discord", "d1scord", "mistik", ".io", "senpa.io", "sidney", "sid", "senpaio", "vries", "asa");
  7939. var r = Math.abs
  7940. , s = Math.cos
  7941. , a = Math.sin
  7942. , o = Math.pow
  7943. , c = Math.sqrt;
  7944. e.exports = function(e, t, n, l, h, u, f, d, p, g, m, y, k, v) {
  7945. this.id = e,
  7946. this.sid = t,
  7947. this.tmpScore = 0,
  7948. this.team = null,
  7949. this.skinIndex = 0,
  7950. this.tailIndex = 0,
  7951. this.hitTime = 0,
  7952. this.tails = {};
  7953. for (var w = 0; w < m.length; ++w)
  7954. m[w].price <= 0 && (this.tails[m[w].id] = 1);
  7955. for (this.skins = {},
  7956. w = 0; w < g.length; ++w)
  7957. g[w].price <= 0 && (this.skins[g[w].id] = 1);
  7958. this.points = 0,
  7959. this.dt = 0,
  7960. this.hidden = !1,
  7961. this.itemCounts = {},
  7962. this.isPlayer = !0,
  7963. this.pps = 0,
  7964. this.moveDir = void 0,
  7965. this.skinRot = 0,
  7966. this.lastPing = 0,
  7967. this.iconIndex = 0,
  7968. this.skinColor = 0,
  7969. this.spawn = function(e) {
  7970. this.active = !0,
  7971. this.alive = !0,
  7972. this.lockMove = !1,
  7973. this.lockDir = !1,
  7974. this.minimapCounter = 0,
  7975. this.chatCountdown = 0,
  7976. this.shameCount = 0,
  7977. this.shameTimer = 0,
  7978. this.sentTo = {},
  7979. this.gathering = 0,
  7980. this.autoGather = 0,
  7981. this.animTime = 0,
  7982. this.animSpeed = 0,
  7983. this.mouseState = 0,
  7984. this.buildIndex = -1,
  7985. this.weaponIndex = 0,
  7986. this.dmgOverTime = {},
  7987. this.noMovTimer = 0,
  7988. this.maxXP = 300,
  7989. this.XP = 0,
  7990. this.age = 1,
  7991. this.kills = 0,
  7992. this.upgrAge = 2,
  7993. this.upgradePoints = 0,
  7994. this.x = 0,
  7995. this.y = 0,
  7996. this.zIndex = 0,
  7997. this.xVel = 0,
  7998. this.yVel = 0,
  7999. this.slowMult = 1,
  8000. this.dir = 0,
  8001. this.dirPlus = 0,
  8002. this.targetDir = 0,
  8003. this.targetAngle = 0,
  8004. this.maxHealth = 100,
  8005. this.health = this.maxHealth,
  8006. this.scale = n.playerScale,
  8007. this.speed = n.playerSpeed,
  8008. this.resetMoveDir(),
  8009. this.resetResources(e),
  8010. this.items = [0, 3, 6, 10],
  8011. this.weapons = [0],
  8012. this.shootCount = 0,
  8013. this.weaponXP = [],
  8014. this.reloads = {}
  8015. }
  8016. ,
  8017. this.resetMoveDir = function() {
  8018. this.moveDir = void 0
  8019. }
  8020. ,
  8021. this.resetResources = function(e) {
  8022. for (var t = 0; t < n.resourceTypes.length; ++t)
  8023. this[n.resourceTypes[t]] = e ? 100 : 0
  8024. }
  8025. ,
  8026. this.addItem = function(e) {
  8027. var t = p.list[e];
  8028. if (t) {
  8029. for (var n = 0; n < this.items.length; ++n)
  8030. if (p.list[this.items[n]].group == t.group)
  8031. return this.buildIndex == this.items[n] && (this.buildIndex = e),
  8032. this.items[n] = e,
  8033. !0;
  8034. return this.items.push(e),
  8035. !0
  8036. }
  8037. return !1
  8038. }
  8039. ,
  8040. this.setUserData = function(e) {
  8041. if (e) {
  8042. this.name = "unknown";
  8043. var t = e.name + ""
  8044. , r = !1
  8045. , s = (t = (t = (t = (t = t.slice(0, n.maxNameLength)).replace(/[^\w:\(\)\/? -]+/gim, " ")).replace(/[^\x00-\x7F]/g, " ")).trim()).toLowerCase().replace(/\s/g, "").replace(/1/g, "i").replace(/0/g, "o").replace(/5/g, "s");
  8046. for (var a of i.list)
  8047. if (-1 != s.indexOf(a)) {
  8048. r = !0;
  8049. break
  8050. }
  8051. t.length > 0 && !r && (this.name = t),
  8052. this.skinColor = 0,
  8053. n.skinColors[e.skin] && (this.skinColor = e.skin)
  8054. }
  8055. }
  8056. ,
  8057. this.getData = function() {
  8058. return [this.id, this.sid, this.name, l.fixTo(this.x, 2), l.fixTo(this.y, 2), l.fixTo(this.dir, 3), this.health, this.maxHealth, this.scale, this.skinColor]
  8059. }
  8060. ,
  8061. this.setData = function(e) {
  8062. this.id = e[0],
  8063. this.sid = e[1],
  8064. this.name = e[2],
  8065. this.x = e[3],
  8066. this.y = e[4],
  8067. this.dir = e[5],
  8068. this.health = e[6],
  8069. this.maxHealth = e[7],
  8070. this.scale = e[8],
  8071. this.skinColor = e[9]
  8072. }
  8073. ;
  8074. var b = 0;
  8075. this.update = function(e) {
  8076. if (this.alive) {
  8077. if (this.shameTimer > 0 && (this.shameTimer -= e,
  8078. this.shameTimer <= 0 && (this.shameTimer = 0,
  8079. this.shameCount = 0)),
  8080. (b -= e) <= 0) {
  8081. var t = (this.skin && this.skin.healthRegen ? this.skin.healthRegen : 0) + (this.tail && this.tail.healthRegen ? this.tail.healthRegen : 0);
  8082. t && this.changeHealth(t, this),
  8083. this.dmgOverTime.dmg && (this.changeHealth(-this.dmgOverTime.dmg, this.dmgOverTime.doer),
  8084. this.dmgOverTime.time -= 1,
  8085. this.dmgOverTime.time <= 0 && (this.dmgOverTime.dmg = 0)),
  8086. this.healCol && this.changeHealth(this.healCol, this),
  8087. b = 1e3
  8088. }
  8089. if (this.alive) {
  8090. if (this.slowMult < 1 && (this.slowMult += 8e-4 * e,
  8091. this.slowMult > 1 && (this.slowMult = 1)),
  8092. this.noMovTimer += e,
  8093. (this.xVel || this.yVel) && (this.noMovTimer = 0),
  8094. this.lockMove)
  8095. this.xVel = 0,
  8096. this.yVel = 0;
  8097. else {
  8098. var i = (this.buildIndex >= 0 ? .5 : 1) * (p.weapons[this.weaponIndex].spdMult || 1) * (this.skin && this.skin.spdMult || 1) * (this.tail && this.tail.spdMult || 1) * (this.y <= n.snowBiomeTop ? this.skin && this.skin.coldM ? 1 : n.snowSpeed : 1) * this.slowMult;
  8099. !this.zIndex && this.y >= n.mapScale / 2 - n.riverWidth / 2 && this.y <= n.mapScale / 2 + n.riverWidth / 2 && (this.skin && this.skin.watrImm ? (i *= .75,
  8100. this.xVel += .4 * n.waterCurrent * e) : (i *= .33,
  8101. this.xVel += n.waterCurrent * e));
  8102. var r = null != this.moveDir ? s(this.moveDir) : 0
  8103. , d = null != this.moveDir ? a(this.moveDir) : 0
  8104. , g = c(r * r + d * d);
  8105. 0 != g && (r /= g,
  8106. d /= g),
  8107. r && (this.xVel += r * this.speed * i * e),
  8108. d && (this.yVel += d * this.speed * i * e)
  8109. }
  8110. var m;
  8111. this.zIndex = 0,
  8112. this.lockMove = !1,
  8113. this.healCol = 0;
  8114. for (var y = l.getDistance(0, 0, this.xVel * e, this.yVel * e), k = Math.min(4, Math.max(1, Math.round(y / 40))), v = 1 / k, w = 0; w < k; ++w) {
  8115. this.xVel && (this.x += this.xVel * e * v),
  8116. this.yVel && (this.y += this.yVel * e * v),
  8117. m = u.getGridArrays(this.x, this.y, this.scale);
  8118. for (var x = 0; x < m.length; ++x)
  8119. for (var S = 0; S < m[x].length; ++S)
  8120. m[x][S].active && u.checkCollision(this, m[x][S], v)
  8121. }
  8122. for (w = (I = f.indexOf(this)) + 1; w < f.length; ++w)
  8123. f[w] != this && f[w].alive && u.checkCollision(this, f[w]);
  8124. if (this.xVel && (this.xVel *= o(n.playerDecel, e),
  8125. this.xVel <= .01 && this.xVel >= -.01 && (this.xVel = 0)),
  8126. this.yVel && (this.yVel *= o(n.playerDecel, e),
  8127. this.yVel <= .01 && this.yVel >= -.01 && (this.yVel = 0)),
  8128. this.x - this.scale < 0 ? this.x = this.scale : this.x + this.scale > n.mapScale && (this.x = n.mapScale - this.scale),
  8129. this.y - this.scale < 0 ? this.y = this.scale : this.y + this.scale > n.mapScale && (this.y = n.mapScale - this.scale),
  8130. this.buildIndex < 0)
  8131. if (this.reloads[this.weaponIndex] > 0)
  8132. this.reloads[this.weaponIndex] -= e,
  8133. this.gathering = this.mouseState;
  8134. else if (this.gathering || this.autoGather) {
  8135. var T = !0;
  8136. if (null != p.weapons[this.weaponIndex].gather)
  8137. this.gather(f);
  8138. else if (null != p.weapons[this.weaponIndex].projectile && this.hasRes(p.weapons[this.weaponIndex], this.skin ? this.skin.projCost : 0)) {
  8139. this.useRes(p.weapons[this.weaponIndex], this.skin ? this.skin.projCost : 0),
  8140. this.noMovTimer = 0;
  8141. var I = p.weapons[this.weaponIndex].projectile
  8142. , E = 2 * this.scale
  8143. , M = this.skin && this.skin.aMlt ? this.skin.aMlt : 1;
  8144. p.weapons[this.weaponIndex].rec && (this.xVel -= p.weapons[this.weaponIndex].rec * s(this.dir),
  8145. this.yVel -= p.weapons[this.weaponIndex].rec * a(this.dir)),
  8146. h.addProjectile(this.x + E * s(this.dir), this.y + E * a(this.dir), this.dir, p.projectiles[I].range * M, p.projectiles[I].speed * M, I, this, null, this.zIndex)
  8147. } else
  8148. T = !1;
  8149. this.gathering = this.mouseState,
  8150. T && (this.reloads[this.weaponIndex] = p.weapons[this.weaponIndex].speed * (this.skin && this.skin.atkSpd || 1))
  8151. }
  8152. }
  8153. }
  8154. }
  8155. ,
  8156. this.addWeaponXP = function(e) {
  8157. this.weaponXP[this.weaponIndex] || (this.weaponXP[this.weaponIndex] = 0),
  8158. this.weaponXP[this.weaponIndex] += e
  8159. }
  8160. ,
  8161. this.earnXP = function(e) {
  8162. this.age < n.maxAge && (this.XP += e,
  8163. this.XP >= this.maxXP ? (this.age < n.maxAge ? (this.age++,
  8164. this.XP = 0,
  8165. this.maxXP *= 1.2) : this.XP = this.maxXP,
  8166. this.upgradePoints++,
  8167. y.send(this.id, "16", this.upgradePoints, this.upgrAge),
  8168. y.send(this.id, "15", this.XP, l.fixTo(this.maxXP, 1), this.age)) : y.send(this.id, "15", this.XP))
  8169. }
  8170. ,
  8171. this.changeHealth = function(e, t) {
  8172. if (e > 0 && this.health >= this.maxHealth)
  8173. return !1;
  8174. e < 0 && this.skin && (e *= this.skin.dmgMult || 1),
  8175. e < 0 && this.tail && (e *= this.tail.dmgMult || 1),
  8176. e < 0 && (this.hitTime = Date.now()),
  8177. this.health += e,
  8178. this.health > this.maxHealth && (e -= this.health - this.maxHealth,
  8179. this.health = this.maxHealth),
  8180. this.health <= 0 && this.kill(t);
  8181. for (var n = 0; n < f.length; ++n)
  8182. this.sentTo[f[n].id] && y.send(f[n].id, "h", this.sid, Math.round(this.health));
  8183. return !t || !t.canSee(this) || t == this && e < 0 || y.send(t.id, "t", Math.round(this.x), Math.round(this.y), Math.round(-e), 1),
  8184. !0
  8185. }
  8186. ,
  8187. this.kill = function(e) {
  8188. e && e.alive && (e.kills++,
  8189. e.skin && e.skin.goldSteal ? k(e, Math.round(this.points / 2)) : k(e, Math.round(100 * this.age * (e.skin && e.skin.kScrM ? e.skin.kScrM : 1))),
  8190. y.send(e.id, "9", "kills", e.kills, 1)),
  8191. this.alive = !1,
  8192. y.send(this.id, "11"),
  8193. v()
  8194. }
  8195. ,
  8196. this.addResource = function(e, t, i) {
  8197. !i && t > 0 && this.addWeaponXP(t),
  8198. 3 == e ? k(this, t, !0) : (this[n.resourceTypes[e]] += t,
  8199. y.send(this.id, "9", n.resourceTypes[e], this[n.resourceTypes[e]], 1))
  8200. }
  8201. ,
  8202. this.changeItemCount = function(e, t) {
  8203. this.itemCounts[e] = this.itemCounts[e] || 0,
  8204. this.itemCounts[e] += t,
  8205. y.send(this.id, "14", e, this.itemCounts[e])
  8206. }
  8207. ,
  8208. this.buildItem = function(e) {
  8209. var t = this.scale + e.scale + (e.placeOffset || 0)
  8210. , n = this.x + t * s(this.dir)
  8211. , i = this.y + t * a(this.dir);
  8212. if (this.canBuild(e) && !(e.consume && this.skin && this.skin.noEat) && (e.consume || u.checkItemLocation(n, i, e.scale, .6, e.id, !1, this))) {
  8213. var r = !1;
  8214. if (e.consume) {
  8215. if (this.hitTime) {
  8216. var o = Date.now() - this.hitTime;
  8217. this.hitTime = 0,
  8218. o <= 120 ? (this.shameCount++,
  8219. this.shameCount >= 8 && (this.shameTimer = 3e4,
  8220. this.shameCount = 0)) : (this.shameCount -= 2,
  8221. this.shameCount <= 0 && (this.shameCount = 0))
  8222. }
  8223. this.shameTimer <= 0 && (r = e.consume(this))
  8224. } else
  8225. r = !0,
  8226. e.group.limit && this.changeItemCount(e.group.id, 1),
  8227. e.pps && (this.pps += e.pps),
  8228. u.add(u.objects.length, n, i, this.dir, e.scale, e.type, e, !1, this);
  8229. r && (this.useRes(e),
  8230. this.buildIndex = -1)
  8231. }
  8232. }
  8233. ,
  8234. this.hasRes = function(e, t) {
  8235. for (var n = 0; n < e.req.length; ) {
  8236. if (this[e.req[n]] < Math.round(e.req[n + 1] * (t || 1)))
  8237. return !1;
  8238. n += 2
  8239. }
  8240. return !0
  8241. }
  8242. ,
  8243. this.useRes = function(e, t) {
  8244. if (!n.inSandbox)
  8245. for (var i = 0; i < e.req.length; )
  8246. this.addResource(n.resourceTypes.indexOf(e.req[i]), -Math.round(e.req[i + 1] * (t || 1))),
  8247. i += 2
  8248. }
  8249. ,
  8250. this.canBuild = function(e) {
  8251. return !!n.inSandbox || !(e.group.limit && this.itemCounts[e.group.id] >= e.group.limit) && this.hasRes(e)
  8252. }
  8253. ,
  8254. this.gather = function() {
  8255. this.noMovTimer = 0,
  8256. this.slowMult -= p.weapons[this.weaponIndex].hitSlow || .3,
  8257. this.slowMult < 0 && (this.slowMult = 0);
  8258. for (var e, t, i, r = n.fetchVariant(this), o = r.poison, c = r.val, h = {}, g = u.getGridArrays(this.x, this.y, p.weapons[this.weaponIndex].range), m = 0; m < g.length; ++m)
  8259. for (var y = 0; y < g[m].length; ++y)
  8260. if ((t = g[m][y]).active && !t.dontGather && !h[t.sid] && t.visibleToPlayer(this) && l.getDistance(this.x, this.y, t.x, t.y) - t.scale <= p.weapons[this.weaponIndex].range && (e = l.getDirection(t.x, t.y, this.x, this.y),
  8261. l.getAngleDist(e, this.dir) <= n.gatherAngle)) {
  8262. if (h[t.sid] = 1,
  8263. t.health) {
  8264. if (t.changeHealth(-p.weapons[this.weaponIndex].dmg * c * (p.weapons[this.weaponIndex].sDmg || 1) * (this.skin && this.skin.bDmg ? this.skin.bDmg : 1), this)) {
  8265. for (var k = 0; k < t.req.length; )
  8266. this.addResource(n.resourceTypes.indexOf(t.req[k]), t.req[k + 1]),
  8267. k += 2;
  8268. u.disableObj(t)
  8269. }
  8270. } else {
  8271. this.earnXP(4 * p.weapons[this.weaponIndex].gather);
  8272. var v = p.weapons[this.weaponIndex].gather + (3 == t.type ? 4 : 0);
  8273. this.skin && this.skin.extraGold && this.addResource(3, 1),
  8274. this.addResource(t.type, v)
  8275. }
  8276. i = !0,
  8277. u.hitObj(t, e)
  8278. }
  8279. for (y = 0; y < f.length + d.length; ++y)
  8280. if ((t = f[y] || d[y - f.length]) != this && t.alive && (!t.team || t.team != this.team) && l.getDistance(this.x, this.y, t.x, t.y) - 1.8 * t.scale <= p.weapons[this.weaponIndex].range && (e = l.getDirection(t.x, t.y, this.x, this.y),
  8281. l.getAngleDist(e, this.dir) <= n.gatherAngle)) {
  8282. var w = p.weapons[this.weaponIndex].steal;
  8283. w && t.addResource && (w = Math.min(t.points || 0, w),
  8284. this.addResource(3, w),
  8285. t.addResource(3, -w));
  8286. var b = c;
  8287. null != t.weaponIndex && p.weapons[t.weaponIndex].shield && l.getAngleDist(e + Math.PI, t.dir) <= n.shieldAngle && (b = p.weapons[t.weaponIndex].shield);
  8288. var x = p.weapons[this.weaponIndex].dmg * (this.skin && this.skin.dmgMultO ? this.skin.dmgMultO : 1) * (this.tail && this.tail.dmgMultO ? this.tail.dmgMultO : 1)
  8289. , S = .3 * (t.weightM || 1) + (p.weapons[this.weaponIndex].knock || 0);
  8290. t.xVel += S * s(e),
  8291. t.yVel += S * a(e),
  8292. this.skin && this.skin.healD && this.changeHealth(x * b * this.skin.healD, this),
  8293. this.tail && this.tail.healD && this.changeHealth(x * b * this.tail.healD, this),
  8294. t.skin && t.skin.dmg && 1 == b && this.changeHealth(-x * t.skin.dmg, t),
  8295. t.tail && t.tail.dmg && 1 == b && this.changeHealth(-x * t.tail.dmg, t),
  8296. !(t.dmgOverTime && this.skin && this.skin.poisonDmg) || t.skin && t.skin.poisonRes || (t.dmgOverTime.dmg = this.skin.poisonDmg,
  8297. t.dmgOverTime.time = this.skin.poisonTime || 1,
  8298. t.dmgOverTime.doer = this),
  8299. !t.dmgOverTime || !o || t.skin && t.skin.poisonRes || (t.dmgOverTime.dmg = 5,
  8300. t.dmgOverTime.time = 5,
  8301. t.dmgOverTime.doer = this),
  8302. t.skin && t.skin.dmgK && (this.xVel -= t.skin.dmgK * s(e),
  8303. this.yVel -= t.skin.dmgK * a(e)),
  8304. t.changeHealth(-x * b, this, this)
  8305. }
  8306. this.sendAnimation(i ? 1 : 0)
  8307. }
  8308. ,
  8309. this.sendAnimation = function(e) {
  8310. for (var t = 0; t < f.length; ++t)
  8311. this.sentTo[f[t].id] && this.canSee(f[t]) && y.send(f[t].id, "7", this.sid, e ? 1 : 0, this.weaponIndex)
  8312. }
  8313. ;
  8314. var x = 0
  8315. , S = 0;
  8316. this.animate = function(e) {
  8317. this.animTime > 0 && (this.animTime -= e,
  8318. this.animTime <= 0 ? (this.animTime = 0,
  8319. this.dirPlus = 0,
  8320. x = 0,
  8321. S = 0) : 0 == S ? (x += e / (this.animSpeed * n.hitReturnRatio),
  8322. this.dirPlus = l.lerp(0, this.targetAngle, Math.min(1, x)),
  8323. x >= 1 && (x = 1,
  8324. S = 1)) : (x -= e / (this.animSpeed * (1 - n.hitReturnRatio)),
  8325. this.dirPlus = l.lerp(0, this.targetAngle, Math.max(0, x))))
  8326. }
  8327. ,
  8328. this.startAnim = function(e, t) {
  8329. this.animTime = this.animSpeed = p.weapons[t].speed,
  8330. this.targetAngle = e ? -n.hitAngle : -Math.PI,
  8331. x = 0,
  8332. S = 0
  8333. }
  8334. ,
  8335. this.canSee = function(e) {
  8336. if (!e)
  8337. return !1;
  8338. if (e.skin && e.skin.invisTimer && e.noMovTimer >= e.skin.invisTimer)
  8339. return !1;
  8340. var t = r(e.x - this.x) - e.scale
  8341. , i = r(e.y - this.y) - e.scale;
  8342. return t <= n.maxScreenWidth / 2 * 1.3 && i <= n.maxScreenHeight / 2 * 1.3
  8343. }
  8344. }
  8345. }
  8346. , function(e, t, n) {
  8347. const i = n(50).words
  8348. , r = n(51).array;
  8349. e.exports = class {
  8350. constructor(e={}) {
  8351. Object.assign(this, {
  8352. list: e.emptyList && [] || Array.prototype.concat.apply(i, [r, e.list || []]),
  8353. exclude: e.exclude || [],
  8354. placeHolder: e.placeHolder || "*",
  8355. regex: e.regex || /[^a-zA-Z0-9|\$|\@]|\^/g,
  8356. replaceRegex: e.replaceRegex || /\w/g
  8357. })
  8358. }
  8359. isProfane(e) {
  8360. return this.list.filter(t=>{
  8361. const n = new RegExp(`\\b${t.replace(/(\W)/g, "\\$1")}\\b`,"gi");
  8362. return !this.exclude.includes(t.toLowerCase()) && n.test(e)
  8363. }
  8364. ).length > 0 || !1
  8365. }
  8366. replaceWord(e) {
  8367. return e.replace(this.regex, "").replace(this.replaceRegex, this.placeHolder)
  8368. }
  8369. clean(e) {
  8370. return e.split(/\b/).map(e=>this.isProfane(e) ? this.replaceWord(e) : e).join("")
  8371. }
  8372. addWords() {
  8373. let e = Array.from(arguments);
  8374. this.list.push(...e),
  8375. e.map(e=>e.toLowerCase()).forEach(e=>{
  8376. this.exclude.includes(e) && this.exclude.splice(this.exclude.indexOf(e), 1)
  8377. }
  8378. )
  8379. }
  8380. removeWords() {
  8381. this.exclude.push(...Array.from(arguments).map(e=>e.toLowerCase()))
  8382. }
  8383. }
  8384. }
  8385. , function(e) {
  8386. e.exports = {
  8387. words: ["ahole", "anus", "ash0le", "ash0les", "asholes", "ass", "Ass Monkey", "Assface", "assh0le", "assh0lez", "asshole", "assholes", "assholz", "asswipe", "azzhole", "bassterds", "bastard", "bastards", "bastardz", "basterds", "basterdz", "Biatch", "bitch", "bitches", "Blow Job", "boffing", "butthole", "buttwipe", "c0ck", "c0cks", "c0k", "Carpet Muncher", "cawk", "cawks", "Clit", "cnts", "cntz", "cock", "cockhead", "cock-head", "cocks", "CockSucker", "cock-sucker", "crap", "cum", "cunt", "cunts", "cuntz", "dick", "dild0", "dild0s", "dildo", "dildos", "dilld0", "dilld0s", "dominatricks", "dominatrics", "dominatrix", "dyke", "enema", "f u c k", "f u c k e r", "fag", "fag1t", "faget", "fagg1t", "faggit", "faggot", "fagg0t", "fagit", "fags", "fagz", "faig", "faigs", "fart", "flipping the bird", "fuck", "fucker", "fuckin", "fucking", "fucks", "Fudge Packer", "fuk", "Fukah", "Fuken", "fuker", "Fukin", "Fukk", "Fukkah", "Fukken", "Fukker", "Fukkin", "g00k", "God-damned", "h00r", "h0ar", "h0re", "hells", "hoar", "hoor", "hoore", "jackoff", "jap", "japs", "jerk-off", "jisim", "jiss", "jizm", "jizz", "knob", "knobs", "knobz", "kunt", "kunts", "kuntz", "Lezzian", "Lipshits", "Lipshitz", "masochist", "masokist", "massterbait", "masstrbait", "masstrbate", "masterbaiter", "masterbate", "masterbates", "Motha Fucker", "Motha Fuker", "Motha Fukkah", "Motha Fukker", "Mother Fucker", "Mother Fukah", "Mother Fuker", "Mother Fukkah", "Mother Fukker", "mother-fucker", "Mutha Fucker", "Mutha Fukah", "Mutha Fuker", "Mutha Fukkah", "Mutha Fukker", "n1gr", "nastt", "nigger;", "nigur;", "niiger;", "niigr;", "orafis", "orgasim;", "orgasm", "orgasum", "oriface", "orifice", "orifiss", "packi", "packie", "packy", "paki", "pakie", "paky", "pecker", "peeenus", "peeenusss", "peenus", "peinus", "pen1s", "penas", "penis", "penis-breath", "penus", "penuus", "Phuc", "Phuck", "Phuk", "Phuker", "Phukker", "polac", "polack", "polak", "Poonani", "pr1c", "pr1ck", "pr1k", "pusse", "pussee", "pussy", "puuke", "puuker", "queer", "queers", "queerz", "qweers", "qweerz", "qweir", "recktum", "rectum", "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", "va1jina", "vag1na", "vagiina", "vagina", "vaj1na", "vajina", "vullva", "vulva", "w0p", "wh00r", "wh0re", "whore", "xrated", "xxx", "b!+ch", "bitch", "blowjob", "clit", "arschloch", "fuck", "shit", "ass", "asshole", "b!tch", "b17ch", "b1tch", "bastard", "bi+ch", "boiolas", "buceta", "c0ck", "cawk", "chink", "cipa", "clits", "cock", "cum", "cunt", "dildo", "dirsa", "ejakulate", "fatass", "fcuk", "fuk", "fux0r", "hoer", "hore", "jism", "kawk", "l3itch", "l3i+ch", "lesbian", "masturbate", "masterbat*", "masterbat3", "motherfucker", "s.o.b.", "mofo", "nazi", "nigga", "nigger", "nutsack", "phuck", "pimpis", "pusse", "pussy", "scrotum", "sh!t", "shemale", "shi+", "sh!+", "slut", "smut", "teets", "tits", "boobs", "b00bs", "teez", "testical", "testicle", "titt", "w00se", "jackoff", "wank", "whoar", "whore", "*damn", "*dyke", "*fuck*", "*shit*", "@$$", "amcik", "andskota", "arse*", "assrammer", "ayir", "bi7ch", "bitch*", "bollock*", "breasts", "butt-pirate", "cabron", "cazzo", "chraa", "chuj", "Cock*", "cunt*", "d4mn", "daygo", "dego", "dick*", "dike*", "dupa", "dziwka", "ejackulate", "Ekrem*", "Ekto", "enculer", "faen", "fag*", "fanculo", "fanny", "feces", "feg", "Felcher", "ficken", "fitt*", "Flikker", "foreskin", "Fotze", "Fu(*", "fuk*", "futkretzn", "gook", "guiena", "h0r", "h4x0r", "hell", "helvete", "hoer*", "honkey", "Huevon", "hui", "injun", "jizz", "kanker*", "kike", "klootzak", "kraut", "knulle", "kuk", "kuksuger", "Kurac", "kurwa", "kusi*", "kyrpa*", "lesbo", "mamhoon", "masturbat*", "merd*", "mibun", "monkleigh", "mouliewop", "muie", "mulkku", "muschi", "nazis", "nepesaurio", "nigger*", "orospu", "paska*", "perse", "picka", "pierdol*", "pillu*", "pimmel", "piss*", "pizda", "poontsee", "poop", "porn", "p0rn", "pr0n", "preteen", "pula", "pule", "puta", "puto", "qahbeh", "queef*", "rautenberg", "schaffer", "scheiss*", "schlampe", "schmuck", "screw", "sh!t*", "sharmuta", "sharmute", "shipal", "shiz", "skribz", "skurwysyn", "sphencter", "spic", "spierdalaj", "splooge", "suka", "b00b*", "testicle*", "titt*", "twat", "vittu", "wank*", "wetback*", "wichser", "wop*", "yed", "zabourah"]
  8388. }
  8389. }
  8390. , function(e, t, n) {
  8391. e.exports = {
  8392. object: n(52),
  8393. array: n(53),
  8394. regex: n(54)
  8395. }
  8396. }
  8397. , function(e, t) {
  8398. e.exports = {
  8399. "4r5e": 1,
  8400. "5h1t": 1,
  8401. "5hit": 1,
  8402. a55: 1,
  8403. anal: 1,
  8404. anus: 1,
  8405. ar5e: 1,
  8406. arrse: 1,
  8407. arse: 1,
  8408. ass: 1,
  8409. "ass-fucker": 1,
  8410. asses: 1,
  8411. assfucker: 1,
  8412. assfukka: 1,
  8413. asshole: 1,
  8414. assholes: 1,
  8415. asswhole: 1,
  8416. a_s_s: 1,
  8417. "b!tch": 1,
  8418. b00bs: 1,
  8419. b17ch: 1,
  8420. b1tch: 1,
  8421. ballbag: 1,
  8422. balls: 1,
  8423. ballsack: 1,
  8424. bastard: 1,
  8425. beastial: 1,
  8426. beastiality: 1,
  8427. bellend: 1,
  8428. bestial: 1,
  8429. bestiality: 1,
  8430. "bi+ch": 1,
  8431. biatch: 1,
  8432. bitch: 1,
  8433. bitcher: 1,
  8434. bitchers: 1,
  8435. bitches: 1,
  8436. bitchin: 1,
  8437. bitching: 1,
  8438. bloody: 1,
  8439. "blow job": 1,
  8440. blowjob: 1,
  8441. blowjobs: 1,
  8442. boiolas: 1,
  8443. bollock: 1,
  8444. bollok: 1,
  8445. boner: 1,
  8446. boob: 1,
  8447. boobs: 1,
  8448. booobs: 1,
  8449. boooobs: 1,
  8450. booooobs: 1,
  8451. booooooobs: 1,
  8452. breasts: 1,
  8453. buceta: 1,
  8454. bugger: 1,
  8455. bum: 1,
  8456. "bunny fucker": 1,
  8457. butt: 1,
  8458. butthole: 1,
  8459. buttmuch: 1,
  8460. buttplug: 1,
  8461. c0ck: 1,
  8462. c0cksucker: 1,
  8463. "carpet muncher": 1,
  8464. cawk: 1,
  8465. chink: 1,
  8466. cipa: 1,
  8467. cl1t: 1,
  8468. clit: 1,
  8469. clitoris: 1,
  8470. clits: 1,
  8471. cnut: 1,
  8472. cock: 1,
  8473. "cock-sucker": 1,
  8474. cockface: 1,
  8475. cockhead: 1,
  8476. cockmunch: 1,
  8477. cockmuncher: 1,
  8478. cocks: 1,
  8479. cocksuck: 1,
  8480. cocksucked: 1,
  8481. cocksucker: 1,
  8482. cocksucking: 1,
  8483. cocksucks: 1,
  8484. cocksuka: 1,
  8485. cocksukka: 1,
  8486. cok: 1,
  8487. cokmuncher: 1,
  8488. coksucka: 1,
  8489. coon: 1,
  8490. cox: 1,
  8491. crap: 1,
  8492. cum: 1,
  8493. cummer: 1,
  8494. cumming: 1,
  8495. cums: 1,
  8496. cumshot: 1,
  8497. cunilingus: 1,
  8498. cunillingus: 1,
  8499. cunnilingus: 1,
  8500. cunt: 1,
  8501. cuntlick: 1,
  8502. cuntlicker: 1,
  8503. cuntlicking: 1,
  8504. cunts: 1,
  8505. cyalis: 1,
  8506. cyberfuc: 1,
  8507. cyberfuck: 1,
  8508. cyberfucked: 1,
  8509. cyberfucker: 1,
  8510. cyberfuckers: 1,
  8511. cyberfucking: 1,
  8512. d1ck: 1,
  8513. damn: 1,
  8514. dick: 1,
  8515. dickhead: 1,
  8516. dildo: 1,
  8517. dildos: 1,
  8518. dink: 1,
  8519. dinks: 1,
  8520. dirsa: 1,
  8521. dlck: 1,
  8522. "dog-fucker": 1,
  8523. doggin: 1,
  8524. dogging: 1,
  8525. donkeyribber: 1,
  8526. doosh: 1,
  8527. duche: 1,
  8528. dyke: 1,
  8529. ejaculate: 1,
  8530. ejaculated: 1,
  8531. ejaculates: 1,
  8532. ejaculating: 1,
  8533. ejaculatings: 1,
  8534. ejaculation: 1,
  8535. ejakulate: 1,
  8536. "f u c k": 1,
  8537. "f u c k e r": 1,
  8538. f4nny: 1,
  8539. fag: 1,
  8540. fagging: 1,
  8541. faggitt: 1,
  8542. faggot: 1,
  8543. faggs: 1,
  8544. fagot: 1,
  8545. fagots: 1,
  8546. fags: 1,
  8547. fanny: 1,
  8548. fannyflaps: 1,
  8549. fannyfucker: 1,
  8550. fanyy: 1,
  8551. fatass: 1,
  8552. fcuk: 1,
  8553. fcuker: 1,
  8554. fcuking: 1,
  8555. feck: 1,
  8556. fecker: 1,
  8557. felching: 1,
  8558. fellate: 1,
  8559. fellatio: 1,
  8560. fingerfuck: 1,
  8561. fingerfucked: 1,
  8562. fingerfucker: 1,
  8563. fingerfuckers: 1,
  8564. fingerfucking: 1,
  8565. fingerfucks: 1,
  8566. fistfuck: 1,
  8567. fistfucked: 1,
  8568. fistfucker: 1,
  8569. fistfuckers: 1,
  8570. fistfucking: 1,
  8571. fistfuckings: 1,
  8572. fistfucks: 1,
  8573. flange: 1,
  8574. fook: 1,
  8575. fooker: 1,
  8576. fuck: 1,
  8577. fucka: 1,
  8578. fucked: 1,
  8579. fucker: 1,
  8580. fuckers: 1,
  8581. fuckhead: 1,
  8582. fuckheads: 1,
  8583. fuckin: 1,
  8584. fucking: 1,
  8585. fuckings: 1,
  8586. fuckingshitmotherfucker: 1,
  8587. fuckme: 1,
  8588. fucks: 1,
  8589. fuckwhit: 1,
  8590. fuckwit: 1,
  8591. "fudge packer": 1,
  8592. fudgepacker: 1,
  8593. fuk: 1,
  8594. fuker: 1,
  8595. fukker: 1,
  8596. fukkin: 1,
  8597. fuks: 1,
  8598. fukwhit: 1,
  8599. fukwit: 1,
  8600. fux: 1,
  8601. fux0r: 1,
  8602. f_u_c_k: 1,
  8603. gangbang: 1,
  8604. gangbanged: 1,
  8605. gangbangs: 1,
  8606. gaylord: 1,
  8607. gaysex: 1,
  8608. goatse: 1,
  8609. God: 1,
  8610. "god-dam": 1,
  8611. "god-damned": 1,
  8612. goddamn: 1,
  8613. goddamned: 1,
  8614. hardcoresex: 1,
  8615. hell: 1,
  8616. heshe: 1,
  8617. hoar: 1,
  8618. hoare: 1,
  8619. hoer: 1,
  8620. homo: 1,
  8621. hore: 1,
  8622. horniest: 1,
  8623. horny: 1,
  8624. hotsex: 1,
  8625. "jack-off": 1,
  8626. jackoff: 1,
  8627. jap: 1,
  8628. "jerk-off": 1,
  8629. jism: 1,
  8630. jiz: 1,
  8631. jizm: 1,
  8632. jizz: 1,
  8633. kawk: 1,
  8634. knob: 1,
  8635. knobead: 1,
  8636. knobed: 1,
  8637. knobend: 1,
  8638. knobhead: 1,
  8639. knobjocky: 1,
  8640. knobjokey: 1,
  8641. kock: 1,
  8642. kondum: 1,
  8643. kondums: 1,
  8644. kum: 1,
  8645. kummer: 1,
  8646. kumming: 1,
  8647. kums: 1,
  8648. kunilingus: 1,
  8649. "l3i+ch": 1,
  8650. l3itch: 1,
  8651. labia: 1,
  8652. lust: 1,
  8653. lusting: 1,
  8654. m0f0: 1,
  8655. m0fo: 1,
  8656. m45terbate: 1,
  8657. ma5terb8: 1,
  8658. ma5terbate: 1,
  8659. masochist: 1,
  8660. "master-bate": 1,
  8661. masterb8: 1,
  8662. "masterbat*": 1,
  8663. masterbat3: 1,
  8664. masterbate: 1,
  8665. masterbation: 1,
  8666. masterbations: 1,
  8667. masturbate: 1,
  8668. "mo-fo": 1,
  8669. mof0: 1,
  8670. mofo: 1,
  8671. mothafuck: 1,
  8672. mothafucka: 1,
  8673. mothafuckas: 1,
  8674. mothafuckaz: 1,
  8675. mothafucked: 1,
  8676. mothafucker: 1,
  8677. mothafuckers: 1,
  8678. mothafuckin: 1,
  8679. mothafucking: 1,
  8680. mothafuckings: 1,
  8681. mothafucks: 1,
  8682. "mother fucker": 1,
  8683. motherfuck: 1,
  8684. motherfucked: 1,
  8685. motherfucker: 1,
  8686. motherfuckers: 1,
  8687. motherfuckin: 1,
  8688. motherfucking: 1,
  8689. motherfuckings: 1,
  8690. motherfuckka: 1,
  8691. motherfucks: 1,
  8692. muff: 1,
  8693. mutha: 1,
  8694. muthafecker: 1,
  8695. muthafuckker: 1,
  8696. muther: 1,
  8697. mutherfucker: 1,
  8698. n1gga: 1,
  8699. n1gger: 1,
  8700. nazi: 1,
  8701. nigg3r: 1,
  8702. nigg4h: 1,
  8703. nigga: 1,
  8704. niggah: 1,
  8705. niggas: 1,
  8706. niggaz: 1,
  8707. nigger: 1,
  8708. niggers: 1,
  8709. nob: 1,
  8710. "nob jokey": 1,
  8711. nobhead: 1,
  8712. nobjocky: 1,
  8713. nobjokey: 1,
  8714. numbnuts: 1,
  8715. nutsack: 1,
  8716. orgasim: 1,
  8717. orgasims: 1,
  8718. orgasm: 1,
  8719. orgasms: 1,
  8720. p0rn: 1,
  8721. pawn: 1,
  8722. pecker: 1,
  8723. penis: 1,
  8724. penisfucker: 1,
  8725. phonesex: 1,
  8726. phuck: 1,
  8727. phuk: 1,
  8728. phuked: 1,
  8729. phuking: 1,
  8730. phukked: 1,
  8731. phukking: 1,
  8732. phuks: 1,
  8733. phuq: 1,
  8734. pigfucker: 1,
  8735. pimpis: 1,
  8736. piss: 1,
  8737. pissed: 1,
  8738. pisser: 1,
  8739. pissers: 1,
  8740. pisses: 1,
  8741. pissflaps: 1,
  8742. pissin: 1,
  8743. pissing: 1,
  8744. pissoff: 1,
  8745. poop: 1,
  8746. porn: 1,
  8747. porno: 1,
  8748. pornography: 1,
  8749. pornos: 1,
  8750. prick: 1,
  8751. pricks: 1,
  8752. pron: 1,
  8753. pube: 1,
  8754. pusse: 1,
  8755. pussi: 1,
  8756. pussies: 1,
  8757. pussy: 1,
  8758. pussys: 1,
  8759. rectum: 1,
  8760. retard: 1,
  8761. rimjaw: 1,
  8762. rimming: 1,
  8763. "s hit": 1,
  8764. "s.o.b.": 1,
  8765. sadist: 1,
  8766. schlong: 1,
  8767. screwing: 1,
  8768. scroat: 1,
  8769. scrote: 1,
  8770. scrotum: 1,
  8771. semen: 1,
  8772. sex: 1,
  8773. "sh!+": 1,
  8774. "sh!t": 1,
  8775. sh1t: 1,
  8776. shag: 1,
  8777. shagger: 1,
  8778. shaggin: 1,
  8779. shagging: 1,
  8780. shemale: 1,
  8781. "shi+": 1,
  8782. shit: 1,
  8783. shitdick: 1,
  8784. shite: 1,
  8785. shited: 1,
  8786. shitey: 1,
  8787. shitfuck: 1,
  8788. shitfull: 1,
  8789. shithead: 1,
  8790. shiting: 1,
  8791. shitings: 1,
  8792. shits: 1,
  8793. shitted: 1,
  8794. shitter: 1,
  8795. shitters: 1,
  8796. shitting: 1,
  8797. shittings: 1,
  8798. shitty: 1,
  8799. skank: 1,
  8800. slut: 1,
  8801. sluts: 1,
  8802. smegma: 1,
  8803. smut: 1,
  8804. snatch: 1,
  8805. "son-of-a-bitch": 1,
  8806. spac: 1,
  8807. spunk: 1,
  8808. s_h_i_t: 1,
  8809. t1tt1e5: 1,
  8810. t1tties: 1,
  8811. teets: 1,
  8812. teez: 1,
  8813. testical: 1,
  8814. testicle: 1,
  8815. tit: 1,
  8816. titfuck: 1,
  8817. tits: 1,
  8818. titt: 1,
  8819. tittie5: 1,
  8820. tittiefucker: 1,
  8821. titties: 1,
  8822. tittyfuck: 1,
  8823. tittywank: 1,
  8824. titwank: 1,
  8825. tosser: 1,
  8826. turd: 1,
  8827. tw4t: 1,
  8828. twat: 1,
  8829. twathead: 1,
  8830. twatty: 1,
  8831. twunt: 1,
  8832. twunter: 1,
  8833. v14gra: 1,
  8834. v1gra: 1,
  8835. vagina: 1,
  8836. viagra: 1,
  8837. vulva: 1,
  8838. w00se: 1,
  8839. wang: 1,
  8840. wank: 1,
  8841. wanker: 1,
  8842. wanky: 1,
  8843. whoar: 1,
  8844. whore: 1,
  8845. willies: 1,
  8846. willy: 1,
  8847. xrated: 1,
  8848. xxx: 1
  8849. }
  8850. }
  8851. , function(e, t) {
  8852. e.exports = ["4r5e", "5h1t", "5hit", "a55", "anal", "anus", "ar5e", "arrse", "arse", "ass", "ass-fucker", "asses", "assfucker", "assfukka", "asshole", "assholes", "asswhole", "a_s_s", "b!tch", "b00bs", "b17ch", "b1tch", "ballbag", "balls", "ballsack", "bastard", "beastial", "beastiality", "bellend", "bestial", "bestiality", "bi+ch", "biatch", "bitch", "bitcher", "bitchers", "bitches", "bitchin", "bitching", "bloody", "blow job", "blowjob", "blowjobs", "boiolas", "bollock", "bollok", "boner", "boob", "boobs", "booobs", "boooobs", "booooobs", "booooooobs", "breasts", "buceta", "bugger", "bum", "bunny fucker", "butt", "butthole", "buttmuch", "buttplug", "c0ck", "c0cksucker", "carpet muncher", "cawk", "chink", "cipa", "cl1t", "clit", "clitoris", "clits", "cnut", "cock", "cock-sucker", "cockface", "cockhead", "cockmunch", "cockmuncher", "cocks", "cocksuck", "cocksucked", "cocksucker", "cocksucking", "cocksucks", "cocksuka", "cocksukka", "cok", "cokmuncher", "coksucka", "coon", "cox", "crap", "cum", "cummer", "cumming", "cums", "cumshot", "cunilingus", "cunillingus", "cunnilingus", "cunt", "cuntlick", "cuntlicker", "cuntlicking", "cunts", "cyalis", "cyberfuc", "cyberfuck", "cyberfucked", "cyberfucker", "cyberfuckers", "cyberfucking", "d1ck", "damn", "dick", "dickhead", "dildo", "dildos", "dink", "dinks", "dirsa", "dlck", "dog-fucker", "doggin", "dogging", "donkeyribber", "doosh", "duche", "dyke", "ejaculate", "ejaculated", "ejaculates", "ejaculating", "ejaculatings", "ejaculation", "ejakulate", "f u c k", "f u c k e r", "f4nny", "fag", "fagging", "faggitt", "faggot", "faggs", "fagot", "fagots", "fags", "fanny", "fannyflaps", "fannyfucker", "fanyy", "fatass", "fcuk", "fcuker", "fcuking", "feck", "fecker", "felching", "fellate", "fellatio", "fingerfuck", "fingerfucked", "fingerfucker", "fingerfuckers", "fingerfucking", "fingerfucks", "fistfuck", "fistfucked", "fistfucker", "fistfuckers", "fistfucking", "fistfuckings", "fistfucks", "flange", "fook", "fooker", "fuck", "fucka", "fucked", "fucker", "fuckers", "fuckhead", "fuckheads", "fuckin", "fucking", "fuckings", "fuckingshitmotherfucker", "fuckme", "fucks", "fuckwhit", "fuckwit", "fudge packer", "fudgepacker", "fuk", "fuker", "fukker", "fukkin", "fuks", "fukwhit", "fukwit", "fux", "fux0r", "f_u_c_k", "gangbang", "gangbanged", "gangbangs", "gaylord", "gaysex", "goatse", "God", "god-dam", "god-damned", "goddamn", "goddamned", "hardcoresex", "hell", "heshe", "hoar", "hoare", "hoer", "homo", "hore", "horniest", "horny", "hotsex", "jack-off", "jackoff", "jap", "jerk-off", "jism", "jiz", "jizm", "jizz", "kawk", "knob", "knobead", "knobed", "knobend", "knobhead", "knobjocky", "knobjokey", "kock", "kondum", "kondums", "kum", "kummer", "kumming", "kums", "kunilingus", "l3i+ch", "l3itch", "labia", "lust", "lusting", "m0f0", "m0fo", "m45terbate", "ma5terb8", "ma5terbate", "masochist", "master-bate", "masterb8", "masterbat*", "masterbat3", "masterbate", "masterbation", "masterbations", "masturbate", "mo-fo", "mof0", "mofo", "mothafuck", "mothafucka", "mothafuckas", "mothafuckaz", "mothafucked", "mothafucker", "mothafuckers", "mothafuckin", "mothafucking", "mothafuckings", "mothafucks", "mother fucker", "motherfuck", "motherfucked", "motherfucker", "motherfuckers", "motherfuckin", "motherfucking", "motherfuckings", "motherfuckka", "motherfucks", "muff", "mutha", "muthafecker", "muthafuckker", "muther", "mutherfucker", "n1gga", "n1gger", "nazi", "nigg3r", "nigg4h", "nigga", "niggah", "niggas", "niggaz", "nigger", "niggers", "nob", "nob jokey", "nobhead", "nobjocky", "nobjokey", "numbnuts", "nutsack", "orgasim", "orgasims", "orgasm", "orgasms", "p0rn", "pawn", "pecker", "penis", "penisfucker", "phonesex", "phuck", "phuk", "phuked", "phuking", "phukked", "phukking", "phuks", "phuq", "pigfucker", "pimpis", "piss", "pissed", "pisser", "pissers", "pisses", "pissflaps", "pissin", "pissing", "pissoff", "poop", "porn", "porno", "pornography", "pornos", "prick", "pricks", "pron", "pube", "pusse", "pussi", "pussies", "pussy", "pussys", "rectum", "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"]
  8853. }
  8854. , function(e, t) {
  8855. e.exports = /\b(4r5e|5h1t|5hit|a55|anal|anus|ar5e|arrse|arse|ass|ass-fucker|asses|assfucker|assfukka|asshole|assholes|asswhole|a_s_s|b!tch|b00bs|b17ch|b1tch|ballbag|balls|ballsack|bastard|beastial|beastiality|bellend|bestial|bestiality|bi\+ch|biatch|bitch|bitcher|bitchers|bitches|bitchin|bitching|bloody|blow job|blowjob|blowjobs|boiolas|bollock|bollok|boner|boob|boobs|booobs|boooobs|booooobs|booooooobs|breasts|buceta|bugger|bum|bunny fucker|butt|butthole|buttmuch|buttplug|c0ck|c0cksucker|carpet muncher|cawk|chink|cipa|cl1t|clit|clitoris|clits|cnut|cock|cock-sucker|cockface|cockhead|cockmunch|cockmuncher|cocks|cocksuck|cocksucked|cocksucker|cocksucking|cocksucks|cocksuka|cocksukka|cok|cokmuncher|coksucka|coon|cox|crap|cum|cummer|cumming|cums|cumshot|cunilingus|cunillingus|cunnilingus|cunt|cuntlick|cuntlicker|cuntlicking|cunts|cyalis|cyberfuc|cyberfuck|cyberfucked|cyberfucker|cyberfuckers|cyberfucking|d1ck|damn|dick|dickhead|dildo|dildos|dink|dinks|dirsa|dlck|dog-fucker|doggin|dogging|donkeyribber|doosh|duche|dyke|ejaculate|ejaculated|ejaculates|ejaculating|ejaculatings|ejaculation|ejakulate|f u c k|f u c k e r|f4nny|fag|fagging|faggitt|faggot|faggs|fagot|fagots|fags|fanny|fannyflaps|fannyfucker|fanyy|fatass|fcuk|fcuker|fcuking|feck|fecker|felching|fellate|fellatio|fingerfuck|fingerfucked|fingerfucker|fingerfuckers|fingerfucking|fingerfucks|fistfuck|fistfucked|fistfucker|fistfuckers|fistfucking|fistfuckings|fistfucks|flange|fook|fooker|fuck|fucka|fucked|fucker|fuckers|fuckhead|fuckheads|fuckin|fucking|fuckings|fuckingshitmotherfucker|fuckme|fucks|fuckwhit|fuckwit|fudge packer|fudgepacker|fuk|fuker|fukker|fukkin|fuks|fukwhit|fukwit|fux|fux0r|f_u_c_k|gangbang|gangbanged|gangbangs|gaylord|gaysex|goatse|God|god-dam|god-damned|goddamn|goddamned|hardcoresex|hell|heshe|hoar|hoare|hoer|homo|hore|horniest|horny|hotsex|jack-off|jackoff|jap|jerk-off|jism|jiz|jizm|jizz|kawk|knob|knobead|knobed|knobend|knobhead|knobjocky|knobjokey|kock|kondum|kondums|kum|kummer|kumming|kums|kunilingus|l3i\+ch|l3itch|labia|lust|lusting|m0f0|m0fo|m45terbate|ma5terb8|ma5terbate|masochist|master-bate|masterb8|masterbat*|masterbat3|masterbate|masterbation|masterbations|masturbate|mo-fo|mof0|mofo|mothafuck|mothafucka|mothafuckas|mothafuckaz|mothafucked|mothafucker|mothafuckers|mothafuckin|mothafucking|mothafuckings|mothafucks|mother fucker|motherfuck|motherfucked|motherfucker|motherfuckers|motherfuckin|motherfucking|motherfuckings|motherfuckka|motherfucks|muff|mutha|muthafecker|muthafuckker|muther|mutherfucker|n1gga|n1gger|nazi|nigg3r|nigg4h|nigga|niggah|niggas|niggaz|nigger|niggers|nob|nob jokey|nobhead|nobjocky|nobjokey|numbnuts|nutsack|orgasim|orgasims|orgasm|orgasms|p0rn|pawn|pecker|penis|penisfucker|phonesex|phuck|phuk|phuked|phuking|phukked|phukking|phuks|phuq|pigfucker|pimpis|piss|pissed|pisser|pissers|pisses|pissflaps|pissin|pissing|pissoff|poop|porn|porno|pornography|pornos|prick|pricks|pron|pube|pusse|pussi|pussies|pussy|pussys|rectum|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
  8856. }
  8857. , function(e, t) {
  8858. e.exports.hats = [{
  8859. id: 45,
  8860. name: "Shame!",
  8861. dontSell: !0,
  8862. price: 0,
  8863. scale: 120,
  8864. desc: "hacks are for losers"
  8865. }, {
  8866. id: 51,
  8867. name: "Moo Cap",
  8868. price: 0,
  8869. scale: 120,
  8870. desc: "coolest mooer around"
  8871. }, {
  8872. id: 50,
  8873. name: "Apple Cap",
  8874. price: 0,
  8875. scale: 120,
  8876. desc: "apple farms remembers"
  8877. }, {
  8878. id: 28,
  8879. name: "Moo Head",
  8880. price: 0,
  8881. scale: 120,
  8882. desc: "no effect"
  8883. }, {
  8884. id: 29,
  8885. name: "Pig Head",
  8886. price: 0,
  8887. scale: 120,
  8888. desc: "no effect"
  8889. }, {
  8890. id: 30,
  8891. name: "Fluff Head",
  8892. price: 0,
  8893. scale: 120,
  8894. desc: "no effect"
  8895. }, {
  8896. id: 36,
  8897. name: "Pandou Head",
  8898. price: 0,
  8899. scale: 120,
  8900. desc: "no effect"
  8901. }, {
  8902. id: 37,
  8903. name: "Bear Head",
  8904. price: 0,
  8905. scale: 120,
  8906. desc: "no effect"
  8907. }, {
  8908. id: 38,
  8909. name: "Monkey Head",
  8910. price: 0,
  8911. scale: 120,
  8912. desc: "no effect"
  8913. }, {
  8914. id: 44,
  8915. name: "Polar Head",
  8916. price: 0,
  8917. scale: 120,
  8918. desc: "no effect"
  8919. }, {
  8920. id: 35,
  8921. name: "Fez Hat",
  8922. price: 0,
  8923. scale: 120,
  8924. desc: "no effect"
  8925. }, {
  8926. id: 42,
  8927. name: "Enigma Hat",
  8928. price: 0,
  8929. scale: 120,
  8930. desc: "join the enigma army"
  8931. }, {
  8932. id: 43,
  8933. name: "Blitz Hat",
  8934. price: 0,
  8935. scale: 120,
  8936. desc: "hey everybody i'm blitz"
  8937. }, {
  8938. id: 49,
  8939. name: "Bob XIII Hat",
  8940. price: 0,
  8941. scale: 120,
  8942. desc: "like and subscribe"
  8943. }, {
  8944. id: 57,
  8945. name: "Pumpkin",
  8946. price: 50,
  8947. scale: 120,
  8948. desc: "Spooooky"
  8949. }, {
  8950. id: 8,
  8951. name: "Bummle Hat",
  8952. price: 100,
  8953. scale: 120,
  8954. desc: "no effect"
  8955. }, {
  8956. id: 2,
  8957. name: "Straw Hat",
  8958. price: 500,
  8959. scale: 120,
  8960. desc: "no effect"
  8961. }, {
  8962. id: 15,
  8963. name: "Winter Cap",
  8964. price: 600,
  8965. scale: 120,
  8966. desc: "allows you to move at normal speed in snow",
  8967. coldM: 1
  8968. }, {
  8969. id: 5,
  8970. name: "Cowboy Hat",
  8971. price: 1e3,
  8972. scale: 120,
  8973. desc: "no effect"
  8974. }, {
  8975. id: 4,
  8976. name: "Ranger Hat",
  8977. price: 2e3,
  8978. scale: 120,
  8979. desc: "no effect"
  8980. }, {
  8981. id: 18,
  8982. name: "Explorer Hat",
  8983. price: 2e3,
  8984. scale: 120,
  8985. desc: "no effect"
  8986. }, {
  8987. id: 31,
  8988. name: "Flipper Hat",
  8989. price: 2500,
  8990. scale: 120,
  8991. desc: "have more control while in water",
  8992. watrImm: !0
  8993. }, {
  8994. id: 1,
  8995. name: "Marksman Cap",
  8996. price: 3e3,
  8997. scale: 120,
  8998. desc: "increases arrow speed and range",
  8999. aMlt: 1.3
  9000. }, {
  9001. id: 10,
  9002. name: "Bush Gear",
  9003. price: 3e3,
  9004. scale: 160,
  9005. desc: "allows you to disguise yourself as a bush"
  9006. }, {
  9007. id: 48,
  9008. name: "Halo",
  9009. price: 3e3,
  9010. scale: 120,
  9011. desc: "no effect"
  9012. }, {
  9013. id: 6,
  9014. name: "Soldier Helmet",
  9015. price: 4e3,
  9016. scale: 120,
  9017. desc: "reduces damage taken but slows movement",
  9018. spdMult: .94,
  9019. dmgMult: .75
  9020. }, {
  9021. id: 23,
  9022. name: "Anti Venom Gear",
  9023. price: 4e3,
  9024. scale: 120,
  9025. desc: "makes you immune to poison",
  9026. poisonRes: 1
  9027. }, {
  9028. id: 13,
  9029. name: "Medic Gear",
  9030. price: 5e3,
  9031. scale: 110,
  9032. desc: "slowly regenerates health over time",
  9033. healthRegen: 3
  9034. }, {
  9035. id: 9,
  9036. name: "Miners Helmet",
  9037. price: 5e3,
  9038. scale: 120,
  9039. desc: "earn 1 extra gold per resource",
  9040. extraGold: 1
  9041. }, {
  9042. id: 32,
  9043. name: "Musketeer Hat",
  9044. price: 5e3,
  9045. scale: 120,
  9046. desc: "reduces cost of projectiles",
  9047. projCost: .5
  9048. }, {
  9049. id: 7,
  9050. name: "Bull Helmet",
  9051. price: 6e3,
  9052. scale: 120,
  9053. desc: "increases damage done but drains health",
  9054. healthRegen: -5,
  9055. dmgMultO: 1.5,
  9056. spdMult: .96
  9057. }, {
  9058. id: 22,
  9059. name: "Emp Helmet",
  9060. price: 6e3,
  9061. scale: 120,
  9062. desc: "turrets won't attack but you move slower",
  9063. antiTurret: 1,
  9064. spdMult: .7
  9065. }, {
  9066. id: 12,
  9067. name: "Booster Hat",
  9068. price: 6e3,
  9069. scale: 120,
  9070. desc: "increases your movement speed",
  9071. spdMult: 1.16
  9072. }, {
  9073. id: 26,
  9074. name: "Barbarian Armor",
  9075. price: 8e3,
  9076. scale: 120,
  9077. desc: "knocks back enemies that attack you",
  9078. dmgK: .6
  9079. }, {
  9080. id: 21,
  9081. name: "Plague Mask",
  9082. price: 1e4,
  9083. scale: 120,
  9084. desc: "melee attacks deal poison damage",
  9085. poisonDmg: 5,
  9086. poisonTime: 6
  9087. }, {
  9088. id: 46,
  9089. name: "Bull Mask",
  9090. price: 1e4,
  9091. scale: 120,
  9092. desc: "bulls won't target you unless you attack them",
  9093. bullRepel: 1
  9094. }, {
  9095. id: 14,
  9096. name: "Windmill Hat",
  9097. topSprite: !0,
  9098. price: 1e4,
  9099. scale: 120,
  9100. desc: "generates points while worn",
  9101. pps: 1.5
  9102. }, {
  9103. id: 11,
  9104. name: "Spike Gear",
  9105. topSprite: !0,
  9106. price: 1e4,
  9107. scale: 120,
  9108. desc: "deal damage to players that damage you",
  9109. dmg: .45
  9110. }, {
  9111. id: 53,
  9112. name: "Turret Gear",
  9113. topSprite: !0,
  9114. price: 1e4,
  9115. scale: 120,
  9116. desc: "you become a walking turret",
  9117. turret: {
  9118. proj: 1,
  9119. range: 700,
  9120. rate: 2500
  9121. },
  9122. spdMult: .7
  9123. }, {
  9124. id: 20,
  9125. name: "Samurai Armor",
  9126. price: 12e3,
  9127. scale: 120,
  9128. desc: "increased attack speed and fire rate",
  9129. atkSpd: .78
  9130. }, {
  9131. id: 58,
  9132. name: "Dark Knight",
  9133. price: 12e3,
  9134. scale: 120,
  9135. desc: "restores health when you deal damage",
  9136. healD: .4
  9137. }, {
  9138. id: 27,
  9139. name: "Scavenger Gear",
  9140. price: 15e3,
  9141. scale: 120,
  9142. desc: "earn double points for each kill",
  9143. kScrM: 2
  9144. }, {
  9145. id: 40,
  9146. name: "Tank Gear",
  9147. price: 15e3,
  9148. scale: 120,
  9149. desc: "increased damage to buildings but slower movement",
  9150. spdMult: .3,
  9151. bDmg: 3.3
  9152. }, {
  9153. id: 52,
  9154. name: "Thief Gear",
  9155. price: 15e3,
  9156. scale: 120,
  9157. desc: "steal half of a players gold when you kill them",
  9158. goldSteal: .5
  9159. }, {
  9160. id: 55,
  9161. name: "Bloodthirster",
  9162. price: 2e4,
  9163. scale: 120,
  9164. desc: "Restore Health when dealing damage. And increased damage",
  9165. healD: .25,
  9166. dmgMultO: 1.2
  9167. }, {
  9168. id: 56,
  9169. name: "Assassin Gear",
  9170. price: 2e4,
  9171. scale: 120,
  9172. desc: "Go invisible when not moving. Can't eat. Increased speed",
  9173. noEat: !0,
  9174. spdMult: 1.1,
  9175. invisTimer: 1e3
  9176. }],
  9177. e.exports.accessories = [{
  9178. id: 12,
  9179. name: "Snowball",
  9180. price: 1e3,
  9181. scale: 105,
  9182. xOff: 18,
  9183. desc: "no effect"
  9184. }, {
  9185. id: 9,
  9186. name: "Tree Cape",
  9187. price: 1e3,
  9188. scale: 90,
  9189. desc: "no effect"
  9190. }, {
  9191. id: 10,
  9192. name: "Stone Cape",
  9193. price: 1e3,
  9194. scale: 90,
  9195. desc: "no effect"
  9196. }, {
  9197. id: 3,
  9198. name: "Cookie Cape",
  9199. price: 1500,
  9200. scale: 90,
  9201. desc: "no effect"
  9202. }, {
  9203. id: 8,
  9204. name: "Cow Cape",
  9205. price: 2e3,
  9206. scale: 90,
  9207. desc: "no effect"
  9208. }, {
  9209. id: 11,
  9210. name: "Monkey Tail",
  9211. price: 2e3,
  9212. scale: 97,
  9213. xOff: 25,
  9214. desc: "I am speed",
  9215. spdMult: 1.35,
  9216. dmgMultO: .2
  9217. }, {
  9218. id: 17,
  9219. name: "Apple Basket",
  9220. price: 3e3,
  9221. scale: 80,
  9222. xOff: 12,
  9223. desc: "\"your dont come\" -ApplePie",
  9224. healthRegen: 1
  9225. }, {
  9226. id: 6,
  9227. name: "Winter Cape",
  9228. price: 3e3,
  9229. scale: 90,
  9230. desc: "no effect"
  9231. }, {
  9232. id: 4,
  9233. name: "Skull Cape",
  9234. price: 4e3,
  9235. scale: 90,
  9236. desc: "no effect"
  9237. }, {
  9238. id: 5,
  9239. name: "Dash Cape",
  9240. price: 5e3,
  9241. scale: 90,
  9242. desc: "no effect"
  9243. }, {
  9244. id: 2,
  9245. name: "Dragon Cape",
  9246. price: 6e3,
  9247. scale: 90,
  9248. desc: "no effect"
  9249. }, {
  9250. id: 1,
  9251. name: "Super Cape",
  9252. price: 8e3,
  9253. scale: 90,
  9254. desc: "I am super noob"
  9255. }, {
  9256. id: 7,
  9257. name: "Troll Cape",
  9258. price: 8e3,
  9259. scale: 90,
  9260. desc: "no effect"
  9261. }, {
  9262. id: 14,
  9263. name: "Thorns",
  9264. price: 1e4,
  9265. scale: 115,
  9266. xOff: 20,
  9267. desc: "no effect"
  9268. }, {
  9269. id: 15,
  9270. name: "Blockades",
  9271. price: 1e4,
  9272. scale: 95,
  9273. xOff: 15,
  9274. desc: "no effect"
  9275. }, {
  9276. id: 20,
  9277. name: "Devils Tail",
  9278. price: 1e4,
  9279. scale: 95,
  9280. xOff: 20,
  9281. desc: "no effect"
  9282. }, {
  9283. id: 16,
  9284. name: "Sawblade",
  9285. price: 12e3,
  9286. scale: 90,
  9287. spin: !0,
  9288. xOff: 0,
  9289. desc: "right back at you",
  9290. dmg: .15
  9291. }, {
  9292. id: 13,
  9293. name: "Angel Wings",
  9294. price: 15e3,
  9295. scale: 138,
  9296. xOff: 22,
  9297. desc: "why is this here",
  9298. healthRegen: 3
  9299. }, {
  9300. id: 19,
  9301. name: "Shadow Wings",
  9302. price: 15e3,
  9303. scale: 138,
  9304. xOff: 22,
  9305. desc: "you're evil C:",
  9306. spdMult: 1.1
  9307. }, {
  9308. id: 18,
  9309. name: "Blood Wings",
  9310. price: 2e4,
  9311. scale: 178,
  9312. xOff: 26,
  9313. desc: "our health now",
  9314. healD: .2
  9315. }, {
  9316. id: 21,
  9317. name: "Corrupt X Wings",
  9318. price: 2e4,
  9319. scale: 178,
  9320. xOff: 26,
  9321. desc: "\"rude\" -Corrupt X",
  9322. dmg: .25
  9323. }]
  9324. }
  9325. , function(e, t) {
  9326. e.exports = function(e, t, n, i, r, s, a) {
  9327. this.init = function(e, t, n, i, r, s, o, c, l) {
  9328. this.active = !0,
  9329. this.indx = e,
  9330. this.x = t,
  9331. this.y = n,
  9332. this.dir = i,
  9333. this.skipMov = !0,
  9334. this.speed = r,
  9335. this.dmg = s,
  9336. this.scale = c,
  9337. this.range = o,
  9338. this.owner = l,
  9339. a && (this.sentTo = {})
  9340. }
  9341. ;
  9342. var o, c = [];
  9343. this.update = function(l) {
  9344. if (this.active) {
  9345. var h, u = this.speed * l;
  9346. if (this.skipMov ? this.skipMov = !1 : (this.x += u * Math.cos(this.dir),
  9347. this.y += u * Math.sin(this.dir),
  9348. this.range -= u,
  9349. this.range <= 0 && (this.x += this.range * Math.cos(this.dir),
  9350. this.y += this.range * Math.sin(this.dir),
  9351. u = 1,
  9352. this.range = 0,
  9353. this.active = !1)),
  9354. a) {
  9355. for (var f = 0; f < e.length; ++f)
  9356. !this.sentTo[e[f].id] && e[f].canSee(this) && (this.sentTo[e[f].id] = 1,
  9357. a.send(e[f].id, "18", s.fixTo(this.x, 1), s.fixTo(this.y, 1), s.fixTo(this.dir, 2), s.fixTo(this.range, 1), this.speed, this.indx, this.layer, this.sid));
  9358. for (c.length = 0,
  9359. f = 0; f < e.length + t.length; ++f)
  9360. !(o = e[f] || t[f - e.length]).alive || o == this.owner || this.owner.team && o.team == this.owner.team || s.lineInRect(o.x - o.scale, o.y - o.scale, o.x + o.scale, o.y + o.scale, this.x, this.y, this.x + u * Math.cos(this.dir), this.y + u * Math.sin(this.dir)) && c.push(o);
  9361. for (var d = n.getGridArrays(this.x, this.y, this.scale), p = 0; p < d.length; ++p)
  9362. for (var g = 0; g < d[p].length; ++g)
  9363. h = (o = d[p][g]).getScale(),
  9364. o.active && this.ignoreObj != o.sid && this.layer <= o.layer && c.indexOf(o) < 0 && !o.ignoreCollision && s.lineInRect(o.x - h, o.y - h, o.x + h, o.y + h, this.x, this.y, this.x + u * Math.cos(this.dir), this.y + u * Math.sin(this.dir)) && c.push(o);
  9365. if (c.length > 0) {
  9366. var m = null
  9367. , y = null
  9368. , k = null;
  9369. for (f = 0; f < c.length; ++f)
  9370. k = s.getDistance(this.x, this.y, c[f].x, c[f].y),
  9371. (null == y || k < y) && (y = k,
  9372. m = c[f]);
  9373. if (m.isPlayer || m.isAI) {
  9374. var v = .3 * (m.weightM || 1);
  9375. m.xVel += v * Math.cos(this.dir),
  9376. m.yVel += v * Math.sin(this.dir),
  9377. null != m.weaponIndex && i.weapons[m.weaponIndex].shield && s.getAngleDist(this.dir + Math.PI, m.dir) <= r.shieldAngle || m.changeHealth(-this.dmg, this.owner, this.owner)
  9378. } else
  9379. for (m.projDmg && m.health && m.changeHealth(-this.dmg) && n.disableObj(m),
  9380. f = 0; f < e.length; ++f)
  9381. e[f].active && (m.sentTo[e[f].id] && (m.active ? e[f].canSee(m) && a.send(e[f].id, "8", s.fixTo(this.dir, 2), m.sid) : a.send(e[f].id, "12", m.sid)),
  9382. m.active || m.owner != e[f] || e[f].changeItemCount(m.group.id, -1));
  9383. for (this.active = !1,
  9384. f = 0; f < e.length; ++f)
  9385. this.sentTo[e[f].id] && a.send(e[f].id, "19", this.sid, s.fixTo(y, 1))
  9386. }
  9387. }
  9388. }
  9389. }
  9390. }
  9391. }
  9392. , function(e, t) {
  9393. e.exports = function(e, t, n, i, r, s, a, o, c) {
  9394. this.addProjectile = function(l, h, u, f, d, p, g, m, y) {
  9395. for (var k, v = s.projectiles[p], w = 0; w < t.length; ++w)
  9396. if (!t[w].active) {
  9397. k = t[w];
  9398. break
  9399. }
  9400. return k || ((k = new e(n,i,r,s,a,o,c)).sid = t.length,
  9401. t.push(k)),
  9402. k.init(p, l, h, u, d, v.dmg, f, v.scale, g),
  9403. k.ignoreObj = m,
  9404. k.layer = y || v.layer,
  9405. k.src = v.src,
  9406. k
  9407. }
  9408. }
  9409. }
  9410. , function(e, t) {
  9411. e.exports.obj = function(e, t) {
  9412. var n;
  9413. this.sounds = [],
  9414. this.active = !0,
  9415. this.play = function(t, i, r) {
  9416. i && this.active && ((n = this.sounds[t]) || (n = new Howl({
  9417. src: ".././sound/" + t + ".mp3"
  9418. }),
  9419. this.sounds[t] = n),
  9420. r && n.isPlaying || (n.isPlaying = !0,
  9421. n.play(),
  9422. n.volume((i || 1) * e.volumeMult),
  9423. n.loop(r)))
  9424. }
  9425. ,
  9426. this.toggleMute = function(e, t) {
  9427. (n = this.sounds[e]) && n.mute(t)
  9428. }
  9429. ,
  9430. this.stop = function(e) {
  9431. (n = this.sounds[e]) && (n.stop(),
  9432. n.isPlaying = !1)
  9433. }
  9434. }
  9435. }
  9436. , function(e, t, n) {
  9437. var i = n(60)
  9438. , r = n(67);
  9439. function s(e, t, n, i, r) {
  9440. "localhost" == location.hostname && (window.location.hostname = "127.0.0.1"),
  9441. this.debugLog = !1,
  9442. this.baseUrl = e,
  9443. this.lobbySize = n,
  9444. this.devPort = t,
  9445. this.lobbySpread = i,
  9446. this.rawIPs = !!r,
  9447. this.server = void 0,
  9448. this.gameIndex = void 0,
  9449. this.callback = void 0,
  9450. this.errorCallback = void 0,
  9451. this.processServers(vultr.servers)
  9452. }
  9453. s.prototype.regionInfo = {
  9454. 0: {
  9455. name: "Local",
  9456. latitude: 0,
  9457. longitude: 0
  9458. },
  9459. "vultr:1": {
  9460. name: "New Jersey",
  9461. latitude: 40.1393329,
  9462. longitude: -75.8521818
  9463. },
  9464. "vultr:2": {
  9465. name: "Chicago",
  9466. latitude: 41.8339037,
  9467. longitude: -87.872238
  9468. },
  9469. "vultr:3": {
  9470. name: "Dallas",
  9471. latitude: 32.8208751,
  9472. longitude: -96.8714229
  9473. },
  9474. "vultr:4": {
  9475. name: "Seattle",
  9476. latitude: 47.6149942,
  9477. longitude: -122.4759879
  9478. },
  9479. "vultr:5": {
  9480. name: "Los Angeles",
  9481. latitude: 34.0207504,
  9482. longitude: -118.691914
  9483. },
  9484. "vultr:6": {
  9485. name: "Atlanta",
  9486. latitude: 33.7676334,
  9487. longitude: -84.5610332
  9488. },
  9489. "vultr:7": {
  9490. name: "Amsterdam",
  9491. latitude: 52.3745287,
  9492. longitude: 4.7581878
  9493. },
  9494. "vultr:8": {
  9495. name: "London",
  9496. latitude: 51.5283063,
  9497. longitude: -.382486
  9498. },
  9499. "vultr:9": {
  9500. name: "Frankfurt",
  9501. latitude: 50.1211273,
  9502. longitude: 8.496137
  9503. },
  9504. "vultr:12": {
  9505. name: "Silicon Valley",
  9506. latitude: 37.4024714,
  9507. longitude: -122.3219752
  9508. },
  9509. "vultr:19": {
  9510. name: "Sydney",
  9511. latitude: -33.8479715,
  9512. longitude: 150.651084
  9513. },
  9514. "vultr:24": {
  9515. name: "Paris",
  9516. latitude: 48.8588376,
  9517. longitude: 2.2773454
  9518. },
  9519. "vultr:25": {
  9520. name: "Tokyo",
  9521. latitude: 35.6732615,
  9522. longitude: 139.569959
  9523. },
  9524. "vultr:39": {
  9525. name: "Miami",
  9526. latitude: 25.7823071,
  9527. longitude: -80.3012156
  9528. },
  9529. "vultr:40": {
  9530. name: "Singapore",
  9531. latitude: 1.3147268,
  9532. longitude: 103.7065876
  9533. }
  9534. },
  9535. s.prototype.start = function(e, t) {
  9536. this.callback = e,
  9537. this.errorCallback = t;
  9538. var n = this.parseServerQuery();
  9539. n ? (this.log("Found server in query."),
  9540. this.password = n[3],
  9541. this.connect(n[0], n[1], n[2])) : (this.log("Pinging servers..."),
  9542. this.pingServers())
  9543. }
  9544. ,
  9545. s.prototype.parseServerQuery = function() {
  9546. var e = i.parse(location.href, !0)
  9547. , t = e.query.server;
  9548. if ("string" == typeof t) {
  9549. var n = t.split(":");
  9550. if (3 == n.length) {
  9551. var r = n[0]
  9552. , s = parseInt(n[1])
  9553. , a = parseInt(n[2]);
  9554. return "0" == r || r.startsWith("vultr:") || (r = "vultr:" + r),
  9555. [r, s, a, e.query.password]
  9556. }
  9557. this.errorCallback("Invalid number of server parameters in " + t)
  9558. }
  9559. }
  9560. ,
  9561. s.prototype.findServer = function(e, t) {
  9562. var n = this.servers[e];
  9563. if (Array.isArray(n)) {
  9564. for (var i = 0; i < n.length; i++) {
  9565. var r = n[i];
  9566. if (r.index == t)
  9567. return r
  9568. }
  9569. console.warn("Could not find server in region " + e + " with index " + t + ".")
  9570. } else
  9571. this.errorCallback("No server list for region " + e)
  9572. }
  9573. ,
  9574. s.prototype.pingServers = function() {
  9575. var e = this
  9576. , t = [];
  9577. for (var n in this.servers)
  9578. if (this.servers.hasOwnProperty(n)) {
  9579. var i = this.servers[n]
  9580. , r = i[Math.floor(Math.random() * i.length)];
  9581. null != r ? function(i, r) {
  9582. var s = new XMLHttpRequest;
  9583. s.onreadystatechange = function(i) {
  9584. var s = i.target;
  9585. if (4 == s.readyState)
  9586. if (200 == s.status) {
  9587. for (var a = 0; a < t.length; a++)
  9588. t[a].abort();
  9589. e.log("Connecting to region", r.region);
  9590. var o = e.seekServer(r.region);
  9591. e.connect(o[0], o[1], o[2])
  9592. } else
  9593. console.warn("Error pinging " + r.ip + " in region " + n)
  9594. }
  9595. ;
  9596. var a = "//" + e.serverAddress(r.ip, !0) + ":" + e.serverPort(r) + "/ping";
  9597. s.open("GET", a, !0),
  9598. s.send(null),
  9599. e.log("Pinging", a),
  9600. t.push(s)
  9601. }(0, r) : console.log("No target server for region " + n)
  9602. }
  9603. }
  9604. ,
  9605. s.prototype.seekServer = function(e, t, n) {
  9606. null == n && (n = "random"),
  9607. null == t && (t = !1);
  9608. const i = ["random"];
  9609. var r = this.lobbySize
  9610. , s = this.lobbySpread
  9611. , a = this.servers[e].flatMap((function(e) {
  9612. var t = 0;
  9613. return e.games.map((function(n) {
  9614. var i = t++;
  9615. return {
  9616. region: e.region,
  9617. index: e.index * e.games.length + i,
  9618. gameIndex: i,
  9619. gameCount: e.games.length,
  9620. playerCount: n.playerCount,
  9621. isPrivate: n.isPrivate
  9622. }
  9623. }
  9624. ))
  9625. }
  9626. )).filter((function(e) {
  9627. return !e.isPrivate
  9628. }
  9629. )).filter((function(e) {
  9630. return !t || 0 == e.playerCount && e.gameIndex >= e.gameCount / 2
  9631. }
  9632. )).filter((function(e) {
  9633. return "random" == n || i[e.index % i.length].key == n
  9634. }
  9635. )).sort((function(e, t) {
  9636. return t.playerCount - e.playerCount
  9637. }
  9638. )).filter((function(e) {
  9639. return e.playerCount < r
  9640. }
  9641. ));
  9642. if (t && a.reverse(),
  9643. 0 != a.length) {
  9644. var o = Math.min(s, a.length)
  9645. , c = Math.floor(Math.random() * o)
  9646. , l = a[c = Math.min(c, a.length - 1)]
  9647. , h = l.region
  9648. , u = (c = Math.floor(l.index / l.gameCount),
  9649. l.index % l.gameCount);
  9650. return this.log("Found server."),
  9651. [h, c, u]
  9652. }
  9653. this.errorCallback("No open servers.")
  9654. }
  9655. ,
  9656. s.prototype.connect = function(e, t, n) {
  9657. if (!this.connected) {
  9658. var i = this.findServer(e, t);
  9659. null != i ? (this.log("Connecting to server", i, "with game index", n),
  9660. i.games[n].playerCount >= this.lobbySize ? this.errorCallback("Server is already full.") : (window.history.replaceState(document.title, document.title, this.generateHref(e, t, n, this.password)),
  9661. this.server = i,
  9662. this.gameIndex = n,
  9663. this.log("Calling callback with address", this.serverAddress(i.ip), "on port", this.serverPort(i), "with game index", n),
  9664. this.callback(this.serverAddress(i.ip), this.serverPort(i), n))) : this.errorCallback("Failed to find server for region " + e + " and index " + t)
  9665. }
  9666. }
  9667. ,
  9668. s.prototype.switchServer = function(e, t, n, i) {
  9669. this.switchingServers = !0,
  9670. window.location.href = this.generateHref(e, t, n, i)
  9671. }
  9672. ,
  9673. s.prototype.generateHref = function(e, t, n, i) {
  9674. var r = "/?server=" + (e = this.stripRegion(e)) + ":" + t + ":" + n;
  9675. return i && (r += "&password=" + encodeURIComponent(i)),
  9676. r
  9677. }
  9678. ,
  9679. s.prototype.serverAddress = function(e, t) {
  9680. return "127.0.0.1" == e || "7f000001" == e || "903d62ef5d1c2fecdcaeb5e7dd485eff" == e ? window.location.hostname : this.rawIPs ? t ? "ip_" + this.hashIP(e) + "." + this.baseUrl : e : "ip_" + e + "." + this.baseUrl
  9681. }
  9682. ,
  9683. s.prototype.serverPort = function(e) {
  9684. return 0 == e.region ? this.devPort : location.protocol.startsWith("https") ? 443 : 80
  9685. }
  9686. ,
  9687. s.prototype.processServers = function(e) {
  9688. for (var t = {}, n = 0; n < e.length; n++) {
  9689. var i = e[n]
  9690. , r = t[i.region];
  9691. null == r && (r = [],
  9692. t[i.region] = r),
  9693. r.push(i)
  9694. }
  9695. for (var s in t)
  9696. t[s] = t[s].sort((function(e, t) {
  9697. return e.index - t.index
  9698. }
  9699. ));
  9700. this.servers = t
  9701. }
  9702. ,
  9703. s.prototype.ipToHex = function(e) {
  9704. return e.split(".").map(e=>("00" + parseInt(e).toString(16)).substr(-2)).join("").toLowerCase()
  9705. }
  9706. ,
  9707. s.prototype.hashIP = function(e) {
  9708. return r(this.ipToHex(e))
  9709. }
  9710. ,
  9711. s.prototype.log = function() {
  9712. return this.debugLog ? console.log.apply(void 0, arguments) : console.verbose ? console.verbose.apply(void 0, arguments) : void 0
  9713. }
  9714. ,
  9715. s.prototype.stripRegion = function(e) {
  9716. return e.startsWith("vultr:") ? e = e.slice(6) : e.startsWith("do:") && (e = e.slice(3)),
  9717. e
  9718. }
  9719. ,
  9720. window.testVultrClient = function() {
  9721. var e = 1;
  9722. function t(t, n) {
  9723. (t = "" + t) == (n = "" + n) ? console.log(`Assert ${e} passed.`) : console.warn(`Assert ${e} failed. Expected ${n}, got ${t}.`),
  9724. e++
  9725. }
  9726. var n = new s("test.io",-1,5,1,!1);
  9727. n.errorCallback = function(e) {}
  9728. ,
  9729. n.processServers(function(e) {
  9730. var t = [];
  9731. for (var n in e)
  9732. for (var i = e[n], r = 0; r < i.length; r++)
  9733. t.push({
  9734. ip: n + ":" + r,
  9735. scheme: "testing",
  9736. region: n,
  9737. index: r,
  9738. games: i[r].map(e=>({
  9739. playerCount: e,
  9740. isPrivate: !1
  9741. }))
  9742. });
  9743. return t
  9744. }({
  9745. 1: [[0, 0, 0, 0], [0, 0, 0, 0]],
  9746. 2: [[5, 1, 0, 0], [0, 0, 0, 0]],
  9747. 3: [[5, 0, 1, 5], [0, 0, 0, 0]],
  9748. 4: [[5, 1, 1, 5], [1, 0, 0, 0]],
  9749. 5: [[5, 1, 1, 5], [1, 0, 4, 0]],
  9750. 6: [[5, 5, 5, 5], [2, 3, 1, 4]],
  9751. 7: [[5, 5, 5, 5], [5, 5, 5, 5]]
  9752. })),
  9753. t(n.seekServer(1, !1), [1, 0, 0]),
  9754. t(n.seekServer(1, !0), [1, 1, 3]),
  9755. t(n.seekServer(2, !1), [2, 0, 1]),
  9756. t(n.seekServer(2, !0), [2, 1, 3]),
  9757. t(n.seekServer(3, !1), [3, 0, 2]),
  9758. t(n.seekServer(3, !0), [3, 1, 3]),
  9759. t(n.seekServer(4, !1), [4, 0, 1]),
  9760. t(n.seekServer(4, !0), [4, 1, 3]),
  9761. t(n.seekServer(5, !1), [5, 1, 2]),
  9762. t(n.seekServer(5, !0), [5, 1, 3]),
  9763. t(n.seekServer(6, !1), [6, 1, 3]),
  9764. t(n.seekServer(6, !0), void 0),
  9765. t(n.seekServer(7, !1), void 0),
  9766. t(n.seekServer(7, !0), void 0),
  9767. console.log("Tests passed.")
  9768. }
  9769. ;
  9770. var a = function(e, t) {
  9771. return e.concat(t)
  9772. };
  9773. Array.prototype.flatMap = function(e) {
  9774. return function(e, t) {
  9775. return t.map(e).reduce(a, [])
  9776. }(e, this)
  9777. }
  9778. ,
  9779. e.exports = s
  9780. }
  9781. , function(e, t, n) {
  9782. "use strict";
  9783. var i = n(61)
  9784. , r = n(63);
  9785. function s() {
  9786. this.protocol = null,
  9787. this.slashes = null,
  9788. this.auth = null,
  9789. this.host = null,
  9790. this.port = null,
  9791. this.hostname = null,
  9792. this.hash = null,
  9793. this.search = null,
  9794. this.query = null,
  9795. this.pathname = null,
  9796. this.path = null,
  9797. this.href = null
  9798. }
  9799. t.parse = v,
  9800. t.resolve = function(e, t) {
  9801. return v(e, !1, !0).resolve(t)
  9802. }
  9803. ,
  9804. t.resolveObject = function(e, t) {
  9805. return e ? v(e, !1, !0).resolveObject(t) : t
  9806. }
  9807. ,
  9808. t.format = function(e) {
  9809. return r.isString(e) && (e = v(e)),
  9810. e instanceof s ? e.format() : s.prototype.format.call(e)
  9811. }
  9812. ,
  9813. t.Url = s;
  9814. var a = /^([a-z0-9.+-]+:)/i
  9815. , o = /:[0-9]*$/
  9816. , c = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/
  9817. , l = ["{", "}", "|", "\\", "^", "`"].concat(["<", ">", '"', "`", " ", "\r", "\n", "\t"])
  9818. , h = ["'"].concat(l)
  9819. , u = ["%", "/", "?", ";", "#"].concat(h)
  9820. , f = ["/", "?", "#"]
  9821. , d = /^[+a-z0-9A-Z_-]{0,63}$/
  9822. , p = /^([+a-z0-9A-Z_-]{0,63})(.*)$/
  9823. , g = {
  9824. javascript: !0,
  9825. "javascript:": !0
  9826. }
  9827. , m = {
  9828. javascript: !0,
  9829. "javascript:": !0
  9830. }
  9831. , y = {
  9832. http: !0,
  9833. https: !0,
  9834. ftp: !0,
  9835. gopher: !0,
  9836. file: !0,
  9837. "http:": !0,
  9838. "https:": !0,
  9839. "ftp:": !0,
  9840. "gopher:": !0,
  9841. "file:": !0
  9842. }
  9843. , k = n(64);
  9844. function v(e, t, n) {
  9845. if (e && r.isObject(e) && e instanceof s)
  9846. return e;
  9847. var i = new s;
  9848. return i.parse(e, t, n),
  9849. i
  9850. }
  9851. s.prototype.parse = function(e, t, n) {
  9852. if (!r.isString(e))
  9853. throw new TypeError("Parameter 'url' must be a string, not " + typeof e);
  9854. var s = e.indexOf("?")
  9855. , o = -1 !== s && s < e.indexOf("#") ? "?" : "#"
  9856. , l = e.split(o);
  9857. l[0] = l[0].replace(/\\/g, "/");
  9858. var v = e = l.join(o);
  9859. if (v = v.trim(),
  9860. !n && 1 === e.split("#").length) {
  9861. var w = c.exec(v);
  9862. if (w)
  9863. return this.path = v,
  9864. this.href = v,
  9865. this.pathname = w[1],
  9866. w[2] ? (this.search = w[2],
  9867. this.query = t ? k.parse(this.search.substr(1)) : this.search.substr(1)) : t && (this.search = "",
  9868. this.query = {}),
  9869. this
  9870. }
  9871. var b = a.exec(v);
  9872. if (b) {
  9873. var x = (b = b[0]).toLowerCase();
  9874. this.protocol = x,
  9875. v = v.substr(b.length)
  9876. }
  9877. if (n || b || v.match(/^\/\/[^@\/]+@[^@\/]+/)) {
  9878. var S = "//" === v.substr(0, 2);
  9879. !S || b && m[b] || (v = v.substr(2),
  9880. this.slashes = !0)
  9881. }
  9882. if (!m[b] && (S || b && !y[b])) {
  9883. for (var T, I, E = -1, M = 0; M < f.length; M++)
  9884. -1 !== (A = v.indexOf(f[M])) && (-1 === E || A < E) && (E = A);
  9885. for (-1 !== (I = -1 === E ? v.lastIndexOf("@") : v.lastIndexOf("@", E)) && (T = v.slice(0, I),
  9886. v = v.slice(I + 1),
  9887. this.auth = decodeURIComponent(T)),
  9888. E = -1,
  9889. M = 0; M < u.length; M++) {
  9890. var A;
  9891. -1 !== (A = v.indexOf(u[M])) && (-1 === E || A < E) && (E = A)
  9892. }
  9893. -1 === E && (E = v.length),
  9894. this.host = v.slice(0, E),
  9895. v = v.slice(E),
  9896. this.parseHost(),
  9897. this.hostname = this.hostname || "";
  9898. var P = "[" === this.hostname[0] && "]" === this.hostname[this.hostname.length - 1];
  9899. if (!P)
  9900. for (var B = this.hostname.split(/\./), C = (M = 0,
  9901. B.length); M < C; M++) {
  9902. var O = B[M];
  9903. if (O && !O.match(d)) {
  9904. for (var R = "", j = 0, _ = O.length; j < _; j++)
  9905. O.charCodeAt(j) > 127 ? R += "x" : R += O[j];
  9906. if (!R.match(d)) {
  9907. var U = B.slice(0, M)
  9908. , D = B.slice(M + 1)
  9909. , L = O.match(p);
  9910. L && (U.push(L[1]),
  9911. D.unshift(L[2])),
  9912. D.length && (v = "/" + D.join(".") + v),
  9913. this.hostname = U.join(".");
  9914. break
  9915. }
  9916. }
  9917. }
  9918. this.hostname.length > 255 ? this.hostname = "" : this.hostname = this.hostname.toLowerCase(),
  9919. P || (this.hostname = i.toASCII(this.hostname));
  9920. var F = this.port ? ":" + this.port : ""
  9921. , z = this.hostname || "";
  9922. this.host = z + F,
  9923. this.href += this.host,
  9924. P && (this.hostname = this.hostname.substr(1, this.hostname.length - 2),
  9925. "/" !== v[0] && (v = "/" + v))
  9926. }
  9927. if (!g[x])
  9928. for (M = 0,
  9929. C = h.length; M < C; M++) {
  9930. var H = h[M];
  9931. if (-1 !== v.indexOf(H)) {
  9932. var V = encodeURIComponent(H);
  9933. V === H && (V = escape(H)),
  9934. v = v.split(H).join(V)
  9935. }
  9936. }
  9937. var q = v.indexOf("#");
  9938. -1 !== q && (this.hash = v.substr(q),
  9939. v = v.slice(0, q));
  9940. var Y = v.indexOf("?");
  9941. if (-1 !== Y ? (this.search = v.substr(Y),
  9942. this.query = v.substr(Y + 1),
  9943. t && (this.query = k.parse(this.query)),
  9944. v = v.slice(0, Y)) : t && (this.search = "",
  9945. this.query = {}),
  9946. v && (this.pathname = v),
  9947. y[x] && this.hostname && !this.pathname && (this.pathname = "/"),
  9948. this.pathname || this.search) {
  9949. F = this.pathname || "";
  9950. var W = this.search || "";
  9951. this.path = F + W
  9952. }
  9953. return this.href = this.format(),
  9954. this
  9955. }
  9956. ,
  9957. s.prototype.format = function() {
  9958. var e = this.auth || "";
  9959. e && (e = (e = encodeURIComponent(e)).replace(/%3A/i, ":"),
  9960. e += "@");
  9961. var t = this.protocol || ""
  9962. , n = this.pathname || ""
  9963. , i = this.hash || ""
  9964. , s = !1
  9965. , a = "";
  9966. this.host ? s = e + this.host : this.hostname && (s = e + (-1 === this.hostname.indexOf(":") ? this.hostname : "[" + this.hostname + "]"),
  9967. this.port && (s += ":" + this.port)),
  9968. this.query && r.isObject(this.query) && Object.keys(this.query).length && (a = k.stringify(this.query));
  9969. var o = this.search || a && "?" + a || "";
  9970. return t && ":" !== t.substr(-1) && (t += ":"),
  9971. this.slashes || (!t || y[t]) && !1 !== s ? (s = "//" + (s || ""),
  9972. n && "/" !== n.charAt(0) && (n = "/" + n)) : s || (s = ""),
  9973. i && "#" !== i.charAt(0) && (i = "#" + i),
  9974. o && "?" !== o.charAt(0) && (o = "?" + o),
  9975. t + s + (n = n.replace(/[?#]/g, (function(e) {
  9976. return encodeURIComponent(e)
  9977. }
  9978. ))) + (o = o.replace("#", "%23")) + i
  9979. }
  9980. ,
  9981. s.prototype.resolve = function(e) {
  9982. return this.resolveObject(v(e, !1, !0)).format()
  9983. }
  9984. ,
  9985. s.prototype.resolveObject = function(e) {
  9986. if (r.isString(e)) {
  9987. var t = new s;
  9988. t.parse(e, !1, !0),
  9989. e = t
  9990. }
  9991. for (var n = new s, i = Object.keys(this), a = 0; a < i.length; a++) {
  9992. var o = i[a];
  9993. n[o] = this[o]
  9994. }
  9995. if (n.hash = e.hash,
  9996. "" === e.href)
  9997. return n.href = n.format(),
  9998. n;
  9999. if (e.slashes && !e.protocol) {
  10000. for (var c = Object.keys(e), l = 0; l < c.length; l++) {
  10001. var h = c[l];
  10002. "protocol" !== h && (n[h] = e[h])
  10003. }
  10004. return y[n.protocol] && n.hostname && !n.pathname && (n.path = n.pathname = "/"),
  10005. n.href = n.format(),
  10006. n
  10007. }
  10008. if (e.protocol && e.protocol !== n.protocol) {
  10009. if (!y[e.protocol]) {
  10010. for (var u = Object.keys(e), f = 0; f < u.length; f++) {
  10011. var d = u[f];
  10012. n[d] = e[d]
  10013. }
  10014. return n.href = n.format(),
  10015. n
  10016. }
  10017. if (n.protocol = e.protocol,
  10018. e.host || m[e.protocol])
  10019. n.pathname = e.pathname;
  10020. else {
  10021. for (var p = (e.pathname || "").split("/"); p.length && !(e.host = p.shift()); )
  10022. ;
  10023. e.host || (e.host = ""),
  10024. e.hostname || (e.hostname = ""),
  10025. "" !== p[0] && p.unshift(""),
  10026. p.length < 2 && p.unshift(""),
  10027. n.pathname = p.join("/")
  10028. }
  10029. if (n.search = e.search,
  10030. n.query = e.query,
  10031. n.host = e.host || "",
  10032. n.auth = e.auth,
  10033. n.hostname = e.hostname || e.host,
  10034. n.port = e.port,
  10035. n.pathname || n.search) {
  10036. var g = n.pathname || ""
  10037. , k = n.search || "";
  10038. n.path = g + k
  10039. }
  10040. return n.slashes = n.slashes || e.slashes,
  10041. n.href = n.format(),
  10042. n
  10043. }
  10044. var v = n.pathname && "/" === n.pathname.charAt(0)
  10045. , w = e.host || e.pathname && "/" === e.pathname.charAt(0)
  10046. , b = w || v || n.host && e.pathname
  10047. , x = b
  10048. , S = n.pathname && n.pathname.split("/") || []
  10049. , T = (p = e.pathname && e.pathname.split("/") || [],
  10050. n.protocol && !y[n.protocol]);
  10051. if (T && (n.hostname = "",
  10052. n.port = null,
  10053. n.host && ("" === S[0] ? S[0] = n.host : S.unshift(n.host)),
  10054. n.host = "",
  10055. e.protocol && (e.hostname = null,
  10056. e.port = null,
  10057. e.host && ("" === p[0] ? p[0] = e.host : p.unshift(e.host)),
  10058. e.host = null),
  10059. b = b && ("" === p[0] || "" === S[0])),
  10060. w)
  10061. n.host = e.host || "" === e.host ? e.host : n.host,
  10062. n.hostname = e.hostname || "" === e.hostname ? e.hostname : n.hostname,
  10063. n.search = e.search,
  10064. n.query = e.query,
  10065. S = p;
  10066. else if (p.length)
  10067. S || (S = []),
  10068. S.pop(),
  10069. S = S.concat(p),
  10070. n.search = e.search,
  10071. n.query = e.query;
  10072. else if (!r.isNullOrUndefined(e.search))
  10073. return T && (n.hostname = n.host = S.shift(),
  10074. (P = !!(n.host && n.host.indexOf("@") > 0) && n.host.split("@")) && (n.auth = P.shift(),
  10075. n.host = n.hostname = P.shift())),
  10076. n.search = e.search,
  10077. n.query = e.query,
  10078. r.isNull(n.pathname) && r.isNull(n.search) || (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")),
  10079. n.href = n.format(),
  10080. n;
  10081. if (!S.length)
  10082. return n.pathname = null,
  10083. n.search ? n.path = "/" + n.search : n.path = null,
  10084. n.href = n.format(),
  10085. n;
  10086. for (var I = S.slice(-1)[0], E = (n.host || e.host || S.length > 1) && ("." === I || ".." === I) || "" === I, M = 0, A = S.length; A >= 0; A--)
  10087. "." === (I = S[A]) ? S.splice(A, 1) : ".." === I ? (S.splice(A, 1),
  10088. M++) : M && (S.splice(A, 1),
  10089. M--);
  10090. if (!b && !x)
  10091. for (; M--; M)
  10092. S.unshift("..");
  10093. !b || "" === S[0] || S[0] && "/" === S[0].charAt(0) || S.unshift(""),
  10094. E && "/" !== S.join("/").substr(-1) && S.push("");
  10095. var P, B = "" === S[0] || S[0] && "/" === S[0].charAt(0);
  10096. return T && (n.hostname = n.host = B ? "" : S.length ? S.shift() : "",
  10097. (P = !!(n.host && n.host.indexOf("@") > 0) && n.host.split("@")) && (n.auth = P.shift(),
  10098. n.host = n.hostname = P.shift())),
  10099. (b = b || n.host && S.length) && !B && S.unshift(""),
  10100. S.length ? n.pathname = S.join("/") : (n.pathname = null,
  10101. n.path = null),
  10102. r.isNull(n.pathname) && r.isNull(n.search) || (n.path = (n.pathname ? n.pathname : "") + (n.search ? n.search : "")),
  10103. n.auth = e.auth || n.auth,
  10104. n.slashes = n.slashes || e.slashes,
  10105. n.href = n.format(),
  10106. n
  10107. }
  10108. ,
  10109. s.prototype.parseHost = function() {
  10110. var e = this.host
  10111. , t = o.exec(e);
  10112. t && (":" !== (t = t[0]) && (this.port = t.substr(1)),
  10113. e = e.substr(0, e.length - t.length)),
  10114. e && (this.hostname = e)
  10115. }
  10116. }
  10117. , function(e, t, n) {
  10118. (function(e, i) {
  10119. var r;
  10120. /*! https://mths.be/punycode v1.4.1 by @mathias */
  10121. !function(s) {
  10122. t && t.nodeType,
  10123. e && e.nodeType;
  10124. var a = "object" == typeof i && i;
  10125. a.global !== a && a.window !== a && a.self;
  10126. var o, c = 2147483647, l = 36, h = /^xn--/, u = /[^\x20-\x7E]/, f = /[\x2E\u3002\uFF0E\uFF61]/g, d = {
  10127. overflow: "Overflow: input needs wider integers to process",
  10128. "not-basic": "Illegal input >= 0x80 (not a basic code point)",
  10129. "invalid-input": "Invalid input"
  10130. }, p = Math.floor, g = String.fromCharCode;
  10131. function m(e) {
  10132. throw new RangeError(d[e])
  10133. }
  10134. function y(e, t) {
  10135. for (var n = e.length, i = []; n--; )
  10136. i[n] = t(e[n]);
  10137. return i
  10138. }
  10139. function k(e, t) {
  10140. var n = e.split("@")
  10141. , i = "";
  10142. return n.length > 1 && (i = n[0] + "@",
  10143. e = n[1]),
  10144. i + y((e = e.replace(f, ".")).split("."), t).join(".")
  10145. }
  10146. function v(e) {
  10147. for (var t, n, i = [], r = 0, s = e.length; r < s; )
  10148. (t = e.charCodeAt(r++)) >= 55296 && t <= 56319 && r < s ? 56320 == (64512 & (n = e.charCodeAt(r++))) ? i.push(((1023 & t) << 10) + (1023 & n) + 65536) : (i.push(t),
  10149. r--) : i.push(t);
  10150. return i
  10151. }
  10152. function w(e) {
  10153. return y(e, (function(e) {
  10154. var t = "";
  10155. return e > 65535 && (t += g((e -= 65536) >>> 10 & 1023 | 55296),
  10156. e = 56320 | 1023 & e),
  10157. t + g(e)
  10158. }
  10159. )).join("")
  10160. }
  10161. function b(e) {
  10162. return e - 48 < 10 ? e - 22 : e - 65 < 26 ? e - 65 : e - 97 < 26 ? e - 97 : l
  10163. }
  10164. function x(e, t) {
  10165. return e + 22 + 75 * (e < 26) - ((0 != t) << 5)
  10166. }
  10167. function S(e, t, n) {
  10168. var i = 0;
  10169. for (e = n ? p(e / 700) : e >> 1,
  10170. e += p(e / t); e > 455; i += l)
  10171. e = p(e / 35);
  10172. return p(i + 36 * e / (e + 38))
  10173. }
  10174. function T(e) {
  10175. var t, n, i, r, s, a, o, h, u, f, d = [], g = e.length, y = 0, k = 128, v = 72;
  10176. for ((n = e.lastIndexOf("-")) < 0 && (n = 0),
  10177. i = 0; i < n; ++i)
  10178. e.charCodeAt(i) >= 128 && m("not-basic"),
  10179. d.push(e.charCodeAt(i));
  10180. for (r = n > 0 ? n + 1 : 0; r < g; ) {
  10181. for (s = y,
  10182. a = 1,
  10183. o = l; r >= g && m("invalid-input"),
  10184. ((h = b(e.charCodeAt(r++))) >= l || h > p((c - y) / a)) && m("overflow"),
  10185. y += h * a,
  10186. !(h < (u = o <= v ? 1 : o >= v + 26 ? 26 : o - v)); o += l)
  10187. a > p(c / (f = l - u)) && m("overflow"),
  10188. a *= f;
  10189. v = S(y - s, t = d.length + 1, 0 == s),
  10190. p(y / t) > c - k && m("overflow"),
  10191. k += p(y / t),
  10192. y %= t,
  10193. d.splice(y++, 0, k)
  10194. }
  10195. return w(d)
  10196. }
  10197. function I(e) {
  10198. var t, n, i, r, s, a, o, h, u, f, d, y, k, w, b, T = [];
  10199. for (y = (e = v(e)).length,
  10200. t = 128,
  10201. n = 0,
  10202. s = 72,
  10203. a = 0; a < y; ++a)
  10204. (d = e[a]) < 128 && T.push(g(d));
  10205. for (i = r = T.length,
  10206. r && T.push("-"); i < y; ) {
  10207. for (o = c,
  10208. a = 0; a < y; ++a)
  10209. (d = e[a]) >= t && d < o && (o = d);
  10210. for (o - t > p((c - n) / (k = i + 1)) && m("overflow"),
  10211. n += (o - t) * k,
  10212. t = o,
  10213. a = 0; a < y; ++a)
  10214. if ((d = e[a]) < t && ++n > c && m("overflow"),
  10215. d == t) {
  10216. for (h = n,
  10217. u = l; !(h < (f = u <= s ? 1 : u >= s + 26 ? 26 : u - s)); u += l)
  10218. b = h - f,
  10219. w = l - f,
  10220. T.push(g(x(f + b % w, 0))),
  10221. h = p(b / w);
  10222. T.push(g(x(h, 0))),
  10223. s = S(n, k, i == r),
  10224. n = 0,
  10225. ++i
  10226. }
  10227. ++n,
  10228. ++t
  10229. }
  10230. return T.join("")
  10231. }
  10232. o = {
  10233. version: "1.4.1",
  10234. ucs2: {
  10235. decode: v,
  10236. encode: w
  10237. },
  10238. decode: T,
  10239. encode: I,
  10240. toASCII: function(e) {
  10241. return k(e, (function(e) {
  10242. return u.test(e) ? "xn--" + I(e) : e
  10243. }
  10244. ))
  10245. },
  10246. toUnicode: function(e) {
  10247. return k(e, (function(e) {
  10248. return h.test(e) ? T(e.slice(4).toLowerCase()) : e
  10249. }
  10250. ))
  10251. }
  10252. },
  10253. void 0 === (r = function() {
  10254. return o
  10255. }
  10256. .call(t, n, t, e)) || (e.exports = r)
  10257. }()
  10258. }
  10259. ).call(this, n(62)(e), n(12))
  10260. }
  10261. , function(e, t) {
  10262. e.exports = function(e) {
  10263. return e.webpackPolyfill || (e.deprecate = function() {}
  10264. ,
  10265. e.paths = [],
  10266. e.children || (e.children = []),
  10267. Object.defineProperty(e, "loaded", {
  10268. enumerable: !0,
  10269. get: function() {
  10270. return e.l
  10271. }
  10272. }),
  10273. Object.defineProperty(e, "id", {
  10274. enumerable: !0,
  10275. get: function() {
  10276. return e.i
  10277. }
  10278. }),
  10279. e.webpackPolyfill = 1),
  10280. e
  10281. }
  10282. }
  10283. , function(e, t, n) {
  10284. "use strict";
  10285. e.exports = {
  10286. isString: function(e) {
  10287. return "string" == typeof e
  10288. },
  10289. isObject: function(e) {
  10290. return "object" == typeof e && null !== e
  10291. },
  10292. isNull: function(e) {
  10293. return null === e
  10294. },
  10295. isNullOrUndefined: function(e) {
  10296. return null == e
  10297. }
  10298. }
  10299. }
  10300. , function(e, t, n) {
  10301. "use strict";
  10302. t.decode = t.parse = n(65),
  10303. t.encode = t.stringify = n(66)
  10304. }
  10305. , function(e, t, n) {
  10306. "use strict";
  10307. function i(e, t) {
  10308. return Object.prototype.hasOwnProperty.call(e, t)
  10309. }
  10310. e.exports = function(e, t, n, s) {
  10311. t = t || "&",
  10312. n = n || "=";
  10313. var a = {};
  10314. if ("string" != typeof e || 0 === e.length)
  10315. return a;
  10316. var o = /\+/g;
  10317. e = e.split(t);
  10318. var c = 1e3;
  10319. s && "number" == typeof s.maxKeys && (c = s.maxKeys);
  10320. var l = e.length;
  10321. c > 0 && l > c && (l = c);
  10322. for (var h = 0; h < l; ++h) {
  10323. var u, f, d, p, g = e[h].replace(o, "%20"), m = g.indexOf(n);
  10324. m >= 0 ? (u = g.substr(0, m),
  10325. f = g.substr(m + 1)) : (u = g,
  10326. f = ""),
  10327. d = decodeURIComponent(u),
  10328. p = decodeURIComponent(f),
  10329. i(a, d) ? r(a[d]) ? a[d].push(p) : a[d] = [a[d], p] : a[d] = p
  10330. }
  10331. return a
  10332. }
  10333. ;
  10334. var r = Array.isArray || function(e) {
  10335. return "[object Array]" === Object.prototype.toString.call(e)
  10336. }
  10337. }
  10338. , function(e, t, n) {
  10339. "use strict";
  10340. var i = function(e) {
  10341. switch (typeof e) {
  10342. case "string":
  10343. return e;
  10344. case "boolean":
  10345. return e ? "true" : "false";
  10346. case "number":
  10347. return isFinite(e) ? e : "";
  10348. default:
  10349. return ""
  10350. }
  10351. };
  10352. e.exports = function(e, t, n, o) {
  10353. return t = t || "&",
  10354. n = n || "=",
  10355. null === e && (e = void 0),
  10356. "object" == typeof e ? s(a(e), (function(a) {
  10357. var o = encodeURIComponent(i(a)) + n;
  10358. return r(e[a]) ? s(e[a], (function(e) {
  10359. return o + encodeURIComponent(i(e))
  10360. }
  10361. )).join(t) : o + encodeURIComponent(i(e[a]))
  10362. }
  10363. )).join(t) : o ? encodeURIComponent(i(o)) + n + encodeURIComponent(i(e)) : ""
  10364. }
  10365. ;
  10366. var r = Array.isArray || function(e) {
  10367. return "[object Array]" === Object.prototype.toString.call(e)
  10368. }
  10369. ;
  10370. function s(e, t) {
  10371. if (e.map)
  10372. return e.map(t);
  10373. for (var n = [], i = 0; i < e.length; i++)
  10374. n.push(t(e[i], i));
  10375. return n
  10376. }
  10377. var a = Object.keys || function(e) {
  10378. var t = [];
  10379. for (var n in e)
  10380. Object.prototype.hasOwnProperty.call(e, n) && t.push(n);
  10381. return t
  10382. }
  10383. }
  10384. , function(e, t, n) {
  10385. !function() {
  10386. var t = n(68)
  10387. , i = n(20).utf8
  10388. , r = n(69)
  10389. , s = n(20).bin
  10390. , a = function(e, n) {
  10391. e.constructor == String ? e = n && "binary" === n.encoding ? s.stringToBytes(e) : i.stringToBytes(e) : r(e) ? e = Array.prototype.slice.call(e, 0) : Array.isArray(e) || (e = e.toString());
  10392. for (var o = t.bytesToWords(e), c = 8 * e.length, l = 1732584193, h = -271733879, u = -1732584194, f = 271733878, d = 0; d < o.length; d++)
  10393. o[d] = 16711935 & (o[d] << 8 | o[d] >>> 24) | 4278255360 & (o[d] << 24 | o[d] >>> 8);
  10394. o[c >>> 5] |= 128 << c % 32,
  10395. o[14 + (c + 64 >>> 9 << 4)] = c;
  10396. var p = a._ff
  10397. , g = a._gg
  10398. , m = a._hh
  10399. , y = a._ii;
  10400. for (d = 0; d < o.length; d += 16) {
  10401. var k = l
  10402. , v = h
  10403. , w = u
  10404. , b = f;
  10405. h = y(h = y(h = y(h = y(h = m(h = m(h = m(h = m(h = g(h = g(h = g(h = g(h = p(h = p(h = p(h = p(h, u = p(u, f = p(f, l = p(l, h, u, f, o[d + 0], 7, -680876936), h, u, o[d + 1], 12, -389564586), l, h, o[d + 2], 17, 606105819), f, l, o[d + 3], 22, -1044525330), u = p(u, f = p(f, l = p(l, h, u, f, o[d + 4], 7, -176418897), h, u, o[d + 5], 12, 1200080426), l, h, o[d + 6], 17, -1473231341), f, l, o[d + 7], 22, -45705983), u = p(u, f = p(f, l = p(l, h, u, f, o[d + 8], 7, 1770035416), h, u, o[d + 9], 12, -1958414417), l, h, o[d + 10], 17, -42063), f, l, o[d + 11], 22, -1990404162), u = p(u, f = p(f, l = p(l, h, u, f, o[d + 12], 7, 1804603682), h, u, o[d + 13], 12, -40341101), l, h, o[d + 14], 17, -1502002290), f, l, o[d + 15], 22, 1236535329), u = g(u, f = g(f, l = g(l, h, u, f, o[d + 1], 5, -165796510), h, u, o[d + 6], 9, -1069501632), l, h, o[d + 11], 14, 643717713), f, l, o[d + 0], 20, -373897302), u = g(u, f = g(f, l = g(l, h, u, f, o[d + 5], 5, -701558691), h, u, o[d + 10], 9, 38016083), l, h, o[d + 15], 14, -660478335), f, l, o[d + 4], 20, -405537848), u = g(u, f = g(f, l = g(l, h, u, f, o[d + 9], 5, 568446438), h, u, o[d + 14], 9, -1019803690), l, h, o[d + 3], 14, -187363961), f, l, o[d + 8], 20, 1163531501), u = g(u, f = g(f, l = g(l, h, u, f, o[d + 13], 5, -1444681467), h, u, o[d + 2], 9, -51403784), l, h, o[d + 7], 14, 1735328473), f, l, o[d + 12], 20, -1926607734), u = m(u, f = m(f, l = m(l, h, u, f, o[d + 5], 4, -378558), h, u, o[d + 8], 11, -2022574463), l, h, o[d + 11], 16, 1839030562), f, l, o[d + 14], 23, -35309556), u = m(u, f = m(f, l = m(l, h, u, f, o[d + 1], 4, -1530992060), h, u, o[d + 4], 11, 1272893353), l, h, o[d + 7], 16, -155497632), f, l, o[d + 10], 23, -1094730640), u = m(u, f = m(f, l = m(l, h, u, f, o[d + 13], 4, 681279174), h, u, o[d + 0], 11, -358537222), l, h, o[d + 3], 16, -722521979), f, l, o[d + 6], 23, 76029189), u = m(u, f = m(f, l = m(l, h, u, f, o[d + 9], 4, -640364487), h, u, o[d + 12], 11, -421815835), l, h, o[d + 15], 16, 530742520), f, l, o[d + 2], 23, -995338651), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 0], 6, -198630844), h, u, o[d + 7], 10, 1126891415), l, h, o[d + 14], 15, -1416354905), f, l, o[d + 5], 21, -57434055), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 12], 6, 1700485571), h, u, o[d + 3], 10, -1894986606), l, h, o[d + 10], 15, -1051523), f, l, o[d + 1], 21, -2054922799), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 8], 6, 1873313359), h, u, o[d + 15], 10, -30611744), l, h, o[d + 6], 15, -1560198380), f, l, o[d + 13], 21, 1309151649), u = y(u, f = y(f, l = y(l, h, u, f, o[d + 4], 6, -145523070), h, u, o[d + 11], 10, -1120210379), l, h, o[d + 2], 15, 718787259), f, l, o[d + 9], 21, -343485551),
  10406. l = l + k >>> 0,
  10407. h = h + v >>> 0,
  10408. u = u + w >>> 0,
  10409. f = f + b >>> 0
  10410. }
  10411. return t.endian([l, h, u, f])
  10412. };
  10413. a._ff = function(e, t, n, i, r, s, a) {
  10414. var o = e + (t & n | ~t & i) + (r >>> 0) + a;
  10415. return (o << s | o >>> 32 - s) + t
  10416. }
  10417. ,
  10418. a._gg = function(e, t, n, i, r, s, a) {
  10419. var o = e + (t & i | n & ~i) + (r >>> 0) + a;
  10420. return (o << s | o >>> 32 - s) + t
  10421. }
  10422. ,
  10423. a._hh = function(e, t, n, i, r, s, a) {
  10424. var o = e + (t ^ n ^ i) + (r >>> 0) + a;
  10425. return (o << s | o >>> 32 - s) + t
  10426. }
  10427. ,
  10428. a._ii = function(e, t, n, i, r, s, a) {
  10429. var o = e + (n ^ (t | ~i)) + (r >>> 0) + a;
  10430. return (o << s | o >>> 32 - s) + t
  10431. }
  10432. ,
  10433. a._blocksize = 16,
  10434. a._digestsize = 16,
  10435. e.exports = function(e, n) {
  10436. if (null == e)
  10437. throw new Error("Illegal argument " + e);
  10438. var i = t.wordsToBytes(a(e, n));
  10439. return n && n.asBytes ? i : n && n.asString ? s.bytesToString(i) : t.bytesToHex(i)
  10440. }
  10441. }()
  10442. }
  10443. , function(e, t) {
  10444. !function() {
  10445. var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
  10446. , n = {
  10447. rotl: function(e, t) {
  10448. return e << t | e >>> 32 - t
  10449. },
  10450. rotr: function(e, t) {
  10451. return e << 32 - t | e >>> t
  10452. },
  10453. endian: function(e) {
  10454. if (e.constructor == Number)
  10455. return 16711935 & n.rotl(e, 8) | 4278255360 & n.rotl(e, 24);
  10456. for (var t = 0; t < e.length; t++)
  10457. e[t] = n.endian(e[t]);
  10458. return e
  10459. },
  10460. randomBytes: function(e) {
  10461. for (var t = []; e > 0; e--)
  10462. t.push(Math.floor(256 * Math.random()));
  10463. return t
  10464. },
  10465. bytesToWords: function(e) {
  10466. for (var t = [], n = 0, i = 0; n < e.length; n++,
  10467. i += 8)
  10468. t[i >>> 5] |= e[n] << 24 - i % 32;
  10469. return t
  10470. },
  10471. wordsToBytes: function(e) {
  10472. for (var t = [], n = 0; n < 32 * e.length; n += 8)
  10473. t.push(e[n >>> 5] >>> 24 - n % 32 & 255);
  10474. return t
  10475. },
  10476. bytesToHex: function(e) {
  10477. for (var t = [], n = 0; n < e.length; n++)
  10478. t.push((e[n] >>> 4).toString(16)),
  10479. t.push((15 & e[n]).toString(16));
  10480. return t.join("")
  10481. },
  10482. hexToBytes: function(e) {
  10483. for (var t = [], n = 0; n < e.length; n += 2)
  10484. t.push(parseInt(e.substr(n, 2), 16));
  10485. return t
  10486. },
  10487. bytesToBase64: function(e) {
  10488. for (var n = [], i = 0; i < e.length; i += 3)
  10489. for (var r = e[i] << 16 | e[i + 1] << 8 | e[i + 2], s = 0; s < 4; s++)
  10490. 8 * i + 6 * s <= 8 * e.length ? n.push(t.charAt(r >>> 6 * (3 - s) & 63)) : n.push("=");
  10491. return n.join("")
  10492. },
  10493. base64ToBytes: function(e) {
  10494. e = e.replace(/[^A-Z0-9+\/]/gi, "");
  10495. for (var n = [], i = 0, r = 0; i < e.length; r = ++i % 4)
  10496. 0 != r && n.push((t.indexOf(e.charAt(i - 1)) & Math.pow(2, -2 * r + 8) - 1) << 2 * r | t.indexOf(e.charAt(i)) >>> 6 - 2 * r);
  10497. return n
  10498. }
  10499. };
  10500. e.exports = n
  10501. }()
  10502. }
  10503. , function(e, t) {
  10504. function n(e) {
  10505. return !!e.constructor && "function" == typeof e.constructor.isBuffer && e.constructor.isBuffer(e)
  10506. }
  10507. /*!
  10508. * Determine if an object is a Buffer
  10509. *
  10510. * @author Feross Aboukhadijeh <https://feross.org>
  10511. * @license MIT
  10512. */
  10513. e.exports = function(e) {
  10514. return null != e && (n(e) || function(e) {
  10515. return "function" == typeof e.readFloatLE && "function" == typeof e.slice && n(e.slice(0, 0))
  10516. }(e) || !!e._isBuffer)
  10517. }
  10518. }
  10519. , function(e, t) {
  10520. e.exports = function(e, t, n, i, r, s, a, o, c) {
  10521. this.aiTypes = [{
  10522. id: 0,
  10523. src: "cow_1",
  10524. killScore: 150,
  10525. health: 500,
  10526. weightM: .8,
  10527. speed: 95e-5,
  10528. turnSpeed: .001,
  10529. scale: 72,
  10530. drop: ["food", 50]
  10531. }, {
  10532. id: 1,
  10533. src: "pig_1",
  10534. killScore: 200,
  10535. health: 800,
  10536. weightM: .6,
  10537. speed: 85e-5,
  10538. turnSpeed: .001,
  10539. scale: 72,
  10540. drop: ["food", 80]
  10541. }, {
  10542. id: 2,
  10543. name: "Bull",
  10544. src: "bull_2",
  10545. hostile: !0,
  10546. dmg: 20,
  10547. killScore: 1e3,
  10548. health: 1800,
  10549. weightM: .5,
  10550. speed: 94e-5,
  10551. turnSpeed: 74e-5,
  10552. scale: 78,
  10553. viewRange: 800,
  10554. chargePlayer: !0,
  10555. drop: ["food", 100]
  10556. }, {
  10557. id: 3,
  10558. name: "Bully",
  10559. src: "bull_1",
  10560. hostile: !0,
  10561. dmg: 20,
  10562. killScore: 2e3,
  10563. health: 2800,
  10564. weightM: .45,
  10565. speed: .001,
  10566. turnSpeed: 8e-4,
  10567. scale: 90,
  10568. viewRange: 900,
  10569. chargePlayer: !0,
  10570. drop: ["food", 400]
  10571. }, {
  10572. id: 4,
  10573. name: "Wolf",
  10574. src: "wolf_1",
  10575. hostile: !0,
  10576. dmg: 8,
  10577. killScore: 500,
  10578. health: 300,
  10579. weightM: .45,
  10580. speed: .001,
  10581. turnSpeed: .002,
  10582. scale: 84,
  10583. viewRange: 800,
  10584. chargePlayer: !0,
  10585. drop: ["food", 200]
  10586. }, {
  10587. id: 5,
  10588. name: "Quack",
  10589. src: "chicken_1",
  10590. dmg: 8,
  10591. killScore: 2e3,
  10592. noTrap: !0,
  10593. health: 300,
  10594. weightM: .2,
  10595. speed: .0018,
  10596. turnSpeed: .006,
  10597. scale: 70,
  10598. drop: ["food", 100]
  10599. }, {
  10600. id: 6,
  10601. name: "MOOSTAFA",
  10602. nameScale: 50,
  10603. src: "enemy",
  10604. hostile: !0,
  10605. dontRun: !0,
  10606. fixedSpawn: !0,
  10607. spawnDelay: 6e4,
  10608. noTrap: !0,
  10609. colDmg: 100,
  10610. dmg: 40,
  10611. killScore: 8e3,
  10612. health: 18e3,
  10613. weightM: .4,
  10614. speed: 7e-4,
  10615. turnSpeed: .01,
  10616. scale: 80,
  10617. spriteMlt: 1.8,
  10618. leapForce: .9,
  10619. viewRange: 1e3,
  10620. hitRange: 210,
  10621. hitDelay: 1e3,
  10622. chargePlayer: !0,
  10623. drop: ["food", 100]
  10624. }, {
  10625. id: 7,
  10626. name: "Treasure",
  10627. hostile: !0,
  10628. nameScale: 35,
  10629. src: "crate_1",
  10630. fixedSpawn: !0,
  10631. spawnDelay: 12e4,
  10632. colDmg: 200,
  10633. killScore: 5e3,
  10634. health: 2e4,
  10635. weightM: .1,
  10636. speed: 0,
  10637. turnSpeed: 0,
  10638. scale: 70,
  10639. spriteMlt: 1
  10640. }, {
  10641. id: 8,
  10642. name: "MOOFIE",
  10643. src: "wolf_2",
  10644. hostile: !0,
  10645. fixedSpawn: !0,
  10646. dontRun: !0,
  10647. hitScare: 4,
  10648. spawnDelay: 3e4,
  10649. noTrap: !0,
  10650. nameScale: 35,
  10651. dmg: 10,
  10652. colDmg: 100,
  10653. killScore: 3e3,
  10654. health: 7e3,
  10655. weightM: .45,
  10656. speed: .0015,
  10657. turnSpeed: .002,
  10658. scale: 90,
  10659. viewRange: 800,
  10660. chargePlayer: !0,
  10661. drop: ["food", 1e3]
  10662. }],
  10663. this.spawn = function(l, h, u, f) {
  10664. for (var d, p = 0; p < e.length; ++p)
  10665. if (!e[p].active) {
  10666. d = e[p];
  10667. break
  10668. }
  10669. return d || (d = new t(e.length,r,n,i,a,s,o,c),
  10670. e.push(d)),
  10671. d.init(l, h, u, f, this.aiTypes[f]),
  10672. d
  10673. }
  10674. }
  10675. }
  10676. , function(e, t) {
  10677. var n = 2 * Math.PI;
  10678. e.exports = function(e, t, i, r, s, a, o, c) {
  10679. this.sid = e,
  10680. this.isAI = !0,
  10681. this.nameIndex = s.randInt(0, a.cowNames.length - 1),
  10682. this.init = function(e, t, n, i, r) {
  10683. this.x = e,
  10684. this.y = t,
  10685. this.startX = r.fixedSpawn ? e : null,
  10686. this.startY = r.fixedSpawn ? t : null,
  10687. this.xVel = 0,
  10688. this.yVel = 0,
  10689. this.zIndex = 0,
  10690. this.dir = n,
  10691. this.dirPlus = 0,
  10692. this.index = i,
  10693. this.src = r.src,
  10694. r.name && (this.name = r.name),
  10695. this.weightM = r.weightM,
  10696. this.speed = r.speed,
  10697. this.killScore = r.killScore,
  10698. this.turnSpeed = r.turnSpeed,
  10699. this.scale = r.scale,
  10700. this.maxHealth = r.health,
  10701. this.leapForce = r.leapForce,
  10702. this.health = this.maxHealth,
  10703. this.chargePlayer = r.chargePlayer,
  10704. this.viewRange = r.viewRange,
  10705. this.drop = r.drop,
  10706. this.dmg = r.dmg,
  10707. this.hostile = r.hostile,
  10708. this.dontRun = r.dontRun,
  10709. this.hitRange = r.hitRange,
  10710. this.hitDelay = r.hitDelay,
  10711. this.hitScare = r.hitScare,
  10712. this.spriteMlt = r.spriteMlt,
  10713. this.nameScale = r.nameScale,
  10714. this.colDmg = r.colDmg,
  10715. this.noTrap = r.noTrap,
  10716. this.spawnDelay = r.spawnDelay,
  10717. this.hitWait = 0,
  10718. this.waitCount = 1e3,
  10719. this.moveCount = 0,
  10720. this.targetDir = 0,
  10721. this.active = !0,
  10722. this.alive = !0,
  10723. this.runFrom = null,
  10724. this.chargeTarget = null,
  10725. this.dmgOverTime = {}
  10726. }
  10727. ;
  10728. var l = 0;
  10729. this.update = function(e) {
  10730. if (this.active) {
  10731. if (this.spawnCounter)
  10732. return this.spawnCounter -= e,
  10733. void (this.spawnCounter <= 0 && (this.spawnCounter = 0,
  10734. this.x = this.startX || s.randInt(0, a.mapScale),
  10735. this.y = this.startY || s.randInt(0, a.mapScale)));
  10736. (l -= e) <= 0 && (this.dmgOverTime.dmg && (this.changeHealth(-this.dmgOverTime.dmg, this.dmgOverTime.doer),
  10737. this.dmgOverTime.time -= 1,
  10738. this.dmgOverTime.time <= 0 && (this.dmgOverTime.dmg = 0)),
  10739. l = 1e3);
  10740. var r = !1
  10741. , o = 1;
  10742. if (!this.zIndex && !this.lockMove && this.y >= a.mapScale / 2 - a.riverWidth / 2 && this.y <= a.mapScale / 2 + a.riverWidth / 2 && (o = .33,
  10743. this.xVel += a.waterCurrent * e),
  10744. this.lockMove)
  10745. this.xVel = 0,
  10746. this.yVel = 0;
  10747. else if (this.waitCount > 0) {
  10748. if (this.waitCount -= e,
  10749. this.waitCount <= 0)
  10750. if (this.chargePlayer) {
  10751. for (var h, u, f, d = 0; d < i.length; ++d)
  10752. !i[d].alive || i[d].skin && i[d].skin.bullRepel || (f = s.getDistance(this.x, this.y, i[d].x, i[d].y)) <= this.viewRange && (!h || f < u) && (u = f,
  10753. h = i[d]);
  10754. h ? (this.chargeTarget = h,
  10755. this.moveCount = s.randInt(8e3, 12e3)) : (this.moveCount = s.randInt(1e3, 2e3),
  10756. this.targetDir = s.randFloat(-Math.PI, Math.PI))
  10757. } else
  10758. this.moveCount = s.randInt(4e3, 1e4),
  10759. this.targetDir = s.randFloat(-Math.PI, Math.PI)
  10760. } else if (this.moveCount > 0) {
  10761. var p = this.speed * o;
  10762. if (this.runFrom && this.runFrom.active && (!this.runFrom.isPlayer || this.runFrom.alive) ? (this.targetDir = s.getDirection(this.x, this.y, this.runFrom.x, this.runFrom.y),
  10763. p *= 1.42) : this.chargeTarget && this.chargeTarget.alive && (this.targetDir = s.getDirection(this.chargeTarget.x, this.chargeTarget.y, this.x, this.y),
  10764. p *= 1.75,
  10765. r = !0),
  10766. this.hitWait && (p *= .3),
  10767. this.dir != this.targetDir) {
  10768. this.dir %= n;
  10769. var g = (this.dir - this.targetDir + n) % n
  10770. , m = Math.min(Math.abs(g - n), g, this.turnSpeed * e)
  10771. , y = g - Math.PI >= 0 ? 1 : -1;
  10772. this.dir += y * m + n
  10773. }
  10774. this.dir %= n,
  10775. this.xVel += p * e * Math.cos(this.dir),
  10776. this.yVel += p * e * Math.sin(this.dir),
  10777. this.moveCount -= e,
  10778. this.moveCount <= 0 && (this.runFrom = null,
  10779. this.chargeTarget = null,
  10780. this.waitCount = this.hostile ? 1500 : s.randInt(1500, 6e3))
  10781. }
  10782. this.zIndex = 0,
  10783. this.lockMove = !1;
  10784. var k = s.getDistance(0, 0, this.xVel * e, this.yVel * e)
  10785. , v = Math.min(4, Math.max(1, Math.round(k / 40)))
  10786. , w = 1 / v;
  10787. for (d = 0; d < v; ++d) {
  10788. this.xVel && (this.x += this.xVel * e * w),
  10789. this.yVel && (this.y += this.yVel * e * w),
  10790. M = t.getGridArrays(this.x, this.y, this.scale);
  10791. for (var b = 0; b < M.length; ++b)
  10792. for (var x = 0; x < M[b].length; ++x)
  10793. M[b][x].active && t.checkCollision(this, M[b][x], w)
  10794. }
  10795. var S, T, I, E = !1;
  10796. if (this.hitWait > 0 && (this.hitWait -= e,
  10797. this.hitWait <= 0)) {
  10798. E = !0,
  10799. this.hitWait = 0,
  10800. this.leapForce && !s.randInt(0, 2) && (this.xVel += this.leapForce * Math.cos(this.dir),
  10801. this.yVel += this.leapForce * Math.sin(this.dir));
  10802. for (var M = t.getGridArrays(this.x, this.y, this.hitRange), A = 0; A < M.length; ++A)
  10803. for (b = 0; b < M[A].length; ++b)
  10804. (S = M[A][b]).health && (T = s.getDistance(this.x, this.y, S.x, S.y)) < S.scale + this.hitRange && (S.changeHealth(5 * -this.dmg) && t.disableObj(S),
  10805. t.hitObj(S, s.getDirection(this.x, this.y, S.x, S.y)));
  10806. for (b = 0; b < i.length; ++b)
  10807. i[b].canSee(this) && c.send(i[b].id, "aa", this.sid)
  10808. }
  10809. if (r || E)
  10810. for (d = 0; d < i.length; ++d)
  10811. (S = i[d]) && S.alive && (T = s.getDistance(this.x, this.y, S.x, S.y),
  10812. this.hitRange ? !this.hitWait && T <= this.hitRange + S.scale && (E ? (I = s.getDirection(S.x, S.y, this.x, this.y),
  10813. S.changeHealth(-this.dmg),
  10814. S.xVel += .6 * Math.cos(I),
  10815. S.yVel += .6 * Math.sin(I),
  10816. this.runFrom = null,
  10817. this.chargeTarget = null,
  10818. this.waitCount = 3e3,
  10819. this.hitWait = s.randInt(0, 2) ? 0 : 600) : this.hitWait = this.hitDelay) : T <= this.scale + S.scale && (I = s.getDirection(S.x, S.y, this.x, this.y),
  10820. S.changeHealth(-this.dmg),
  10821. S.xVel += .55 * Math.cos(I),
  10822. S.yVel += .55 * Math.sin(I)));
  10823. this.xVel && (this.xVel *= Math.pow(a.playerDecel, e)),
  10824. this.yVel && (this.yVel *= Math.pow(a.playerDecel, e));
  10825. var P = this.scale;
  10826. this.x - P < 0 ? (this.x = P,
  10827. this.xVel = 0) : this.x + P > a.mapScale && (this.x = a.mapScale - P,
  10828. this.xVel = 0),
  10829. this.y - P < 0 ? (this.y = P,
  10830. this.yVel = 0) : this.y + P > a.mapScale && (this.y = a.mapScale - P,
  10831. this.yVel = 0)
  10832. }
  10833. }
  10834. ,
  10835. this.canSee = function(e) {
  10836. if (!e)
  10837. return !1;
  10838. if (e.skin && e.skin.invisTimer && e.noMovTimer >= e.skin.invisTimer)
  10839. return !1;
  10840. var t = Math.abs(e.x - this.x) - e.scale
  10841. , n = Math.abs(e.y - this.y) - e.scale;
  10842. return t <= a.maxScreenWidth / 2 * 1.3 && n <= a.maxScreenHeight / 2 * 1.3
  10843. }
  10844. ;
  10845. var h = 0
  10846. , u = 0;
  10847. this.animate = function(e) {
  10848. this.animTime > 0 && (this.animTime -= e,
  10849. this.animTime <= 0 ? (this.animTime = 0,
  10850. this.dirPlus = 0,
  10851. h = 0,
  10852. u = 0) : 0 == u ? (h += e / (this.animSpeed * a.hitReturnRatio),
  10853. this.dirPlus = s.lerp(0, this.targetAngle, Math.min(1, h)),
  10854. h >= 1 && (h = 1,
  10855. u = 1)) : (h -= e / (this.animSpeed * (1 - a.hitReturnRatio)),
  10856. this.dirPlus = s.lerp(0, this.targetAngle, Math.max(0, h))))
  10857. }
  10858. ,
  10859. this.startAnim = function() {
  10860. this.animTime = this.animSpeed = 600,
  10861. this.targetAngle = .8 * Math.PI,
  10862. h = 0,
  10863. u = 0
  10864. }
  10865. ,
  10866. this.changeHealth = function(e, t, n) {
  10867. if (this.active && (this.health += e,
  10868. n && (this.hitScare && !s.randInt(0, this.hitScare) ? (this.runFrom = n,
  10869. this.waitCount = 0,
  10870. this.moveCount = 2e3) : this.hostile && this.chargePlayer && n.isPlayer ? (this.chargeTarget = n,
  10871. this.waitCount = 0,
  10872. this.moveCount = 8e3) : this.dontRun || (this.runFrom = n,
  10873. this.waitCount = 0,
  10874. this.moveCount = 2e3)),
  10875. e < 0 && this.hitRange && s.randInt(0, 1) && (this.hitWait = 500),
  10876. t && t.canSee(this) && e < 0 && c.send(t.id, "t", Math.round(this.x), Math.round(this.y), Math.round(-e), 1),
  10877. this.health <= 0 && (this.spawnDelay ? (this.spawnCounter = this.spawnDelay,
  10878. this.x = -1e6,
  10879. this.y = -1e6) : (this.x = this.startX || s.randInt(0, a.mapScale),
  10880. this.y = this.startY || s.randInt(0, a.mapScale)),
  10881. this.health = this.maxHealth,
  10882. this.runFrom = null,
  10883. t && (o(t, this.killScore),
  10884. this.drop))))
  10885. for (var i = 0; i < this.drop.length; )
  10886. t.addResource(a.resourceTypes.indexOf(this.drop[i]), this.drop[i + 1]),
  10887. i += 2
  10888. }
  10889. }
  10890. }
  10891. ]);
  10892. //# sourceMappingURL=bundle.js.map