window.__require = function e(t, a, o) {
function n(r, s) {
if (!a[r]) {
if (!t[r]) {
var c = r.split("/");
c = c[c.length - 1];
if (!t[c]) {
var l = "function" == typeof __require && __require;
if (!s && l) return l(c, !0);
if (i) return i(c, !0);
throw new Error("Cannot find module '" + r + "'");
}
r = c;
}
var d = a[r] = {
exports: {}
};
t[r][0].call(d.exports, function(e) {
return n(t[r][1][e] || e);
}, d, d.exports, e, t, a, o);
}
return a[r].exports;
}
for (var i = "function" == typeof __require && __require, r = 0; r < o.length; r++) n(o[r]);
return n;
}({
1: [ function() {}, {} ],
2: [ function(e, t, a) {
this, o = function(e) {
(function() {
var t = e, a = t.lib.BlockCipher, o = t.algo, n = [], i = [], r = [], s = [], c = [], l = [], d = [], h = [], p = [], u = [];
(function() {
for (var e = [], t = 0; t < 256; t++) e[t] = t < 128 ? t << 1 : t << 1 ^ 283;
var a = 0, o = 0;
for (t = 0; t < 256; t++) {
var f = o ^ o << 1 ^ o << 2 ^ o << 3 ^ o << 4;
f = f >>> 8 ^ 255 & f ^ 99;
n[a] = f;
i[f] = a;
var y = e[a], m = e[y], g = e[m], v = 257 * e[f] ^ 16843008 * f;
r[a] = v << 24 | v >>> 8;
s[a] = v << 16 | v >>> 16;
c[a] = v << 8 | v >>> 24;
l[a] = v;
v = 16843009 * g ^ 65537 * m ^ 257 * y ^ 16843008 * a;
d[f] = v << 24 | v >>> 8;
h[f] = v << 16 | v >>> 16;
p[f] = v << 8 | v >>> 24;
u[f] = v;
if (a) {
a = y ^ e[e[e[g ^ y]]];
o ^= e[e[o]];
} else a = o = 1;
}
})();
var f = [ 0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54 ], y = o.AES = a.extend({
_doReset: function() {
if (!this._nRounds || this._keyPriorReset !== this._key) {
for (var e = this._keyPriorReset = this._key, t = e.words, a = e.sigBytes / 4, o = 4 * ((this._nRounds = a + 6) + 1), i = this._keySchedule = [], r = 0; r < o; r++) if (r < a) i[r] = t[r]; else {
l = i[r - 1];
if (r % a) a > 6 && r % a == 4 && (l = n[l >>> 24] << 24 | n[l >>> 16 & 255] << 16 | n[l >>> 8 & 255] << 8 | n[255 & l]); else {
l = n[(l = l << 8 | l >>> 24) >>> 24] << 24 | n[l >>> 16 & 255] << 16 | n[l >>> 8 & 255] << 8 | n[255 & l];
l ^= f[r / a | 0] << 24;
}
i[r] = i[r - a] ^ l;
}
for (var s = this._invKeySchedule = [], c = 0; c < o; c++) {
r = o - c;
if (c % 4) var l = i[r]; else l = i[r - 4];
s[c] = c < 4 || r <= 4 ? l : d[n[l >>> 24]] ^ h[n[l >>> 16 & 255]] ^ p[n[l >>> 8 & 255]] ^ u[n[255 & l]];
}
}
},
encryptBlock: function(e, t) {
this._doCryptBlock(e, t, this._keySchedule, r, s, c, l, n);
},
decryptBlock: function(e, t) {
var a = e[t + 1];
e[t + 1] = e[t + 3];
e[t + 3] = a;
this._doCryptBlock(e, t, this._invKeySchedule, d, h, p, u, i);
a = e[t + 1];
e[t + 1] = e[t + 3];
e[t + 3] = a;
},
_doCryptBlock: function(e, t, a, o, n, i, r, s) {
for (var c = this._nRounds, l = e[t] ^ a[0], d = e[t + 1] ^ a[1], h = e[t + 2] ^ a[2], p = e[t + 3] ^ a[3], u = 4, f = 1; f < c; f++) {
var y = o[l >>> 24] ^ n[d >>> 16 & 255] ^ i[h >>> 8 & 255] ^ r[255 & p] ^ a[u++], m = o[d >>> 24] ^ n[h >>> 16 & 255] ^ i[p >>> 8 & 255] ^ r[255 & l] ^ a[u++], g = o[h >>> 24] ^ n[p >>> 16 & 255] ^ i[l >>> 8 & 255] ^ r[255 & d] ^ a[u++], v = o[p >>> 24] ^ n[l >>> 16 & 255] ^ i[d >>> 8 & 255] ^ r[255 & h] ^ a[u++];
l = y;
d = m;
h = g;
p = v;
}
y = (s[l >>> 24] << 24 | s[d >>> 16 & 255] << 16 | s[h >>> 8 & 255] << 8 | s[255 & p]) ^ a[u++], 
m = (s[d >>> 24] << 24 | s[h >>> 16 & 255] << 16 | s[p >>> 8 & 255] << 8 | s[255 & l]) ^ a[u++], 
g = (s[h >>> 24] << 24 | s[p >>> 16 & 255] << 16 | s[l >>> 8 & 255] << 8 | s[255 & d]) ^ a[u++], 
v = (s[p >>> 24] << 24 | s[l >>> 16 & 255] << 16 | s[d >>> 8 & 255] << 8 | s[255 & h]) ^ a[u++];
e[t] = y;
e[t + 1] = m;
e[t + 2] = g;
e[t + 3] = v;
},
keySize: 8
});
t.AES = a._createHelper(y);
})();
return e.AES;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./enc-base64"), e("./md5"), e("./evpkdf"), e("./cipher-core")) : "function" == typeof define && define.amd ? define([ "./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./cipher-core": 3,
"./core": 4,
"./enc-base64": 5,
"./evpkdf": 8,
"./md5": 13
} ],
3: [ function(e, t, a) {
this, o = function(e) {
e.lib.Cipher || function(t) {
var a = e, o = a.lib, n = o.Base, i = o.WordArray, r = o.BufferedBlockAlgorithm, s = a.enc, c = (s.Utf8, 
s.Base64), l = a.algo.EvpKDF, d = o.Cipher = r.extend({
cfg: n.extend(),
createEncryptor: function(e, t) {
return this.create(this._ENC_XFORM_MODE, e, t);
},
createDecryptor: function(e, t) {
return this.create(this._DEC_XFORM_MODE, e, t);
},
init: function(e, t, a) {
this.cfg = this.cfg.extend(a);
this._xformMode = e;
this._key = t;
this.reset();
},
reset: function() {
r.reset.call(this);
this._doReset();
},
process: function(e) {
this._append(e);
return this._process();
},
finalize: function(e) {
e && this._append(e);
return this._doFinalize();
},
keySize: 4,
ivSize: 4,
_ENC_XFORM_MODE: 1,
_DEC_XFORM_MODE: 2,
_createHelper: function() {
function e(e) {
return "string" == typeof e ? G : g;
}
return function(t) {
return {
encrypt: function(a, o, n) {
return e(o).encrypt(t, a, o, n);
},
decrypt: function(a, o, n) {
return e(o).decrypt(t, a, o, n);
}
};
};
}()
}), h = (o.StreamCipher = d.extend({
_doFinalize: function() {
return this._process(!0);
},
blockSize: 1
}), a.mode = {}), p = o.BlockCipherMode = n.extend({
createEncryptor: function(e, t) {
return this.Encryptor.create(e, t);
},
createDecryptor: function(e, t) {
return this.Decryptor.create(e, t);
},
init: function(e, t) {
this._cipher = e;
this._iv = t;
}
}), u = h.CBC = function() {
var e = p.extend();
e.Encryptor = e.extend({
processBlock: function(e, t) {
var o = this._cipher, n = o.blockSize;
a.call(this, e, t, n);
o.encryptBlock(e, t);
this._prevBlock = e.slice(t, t + n);
}
});
e.Decryptor = e.extend({
processBlock: function(e, t) {
var o = this._cipher, n = o.blockSize, i = e.slice(t, t + n);
o.decryptBlock(e, t);
a.call(this, e, t, n);
this._prevBlock = i;
}
});
function a(e, a, o) {
var n, i = this._iv;
if (i) {
n = i;
this._iv = t;
} else n = this._prevBlock;
for (var r = 0; r < o; r++) e[a + r] ^= n[r];
}
return e;
}(), f = (a.pad = {}).Pkcs7 = {
pad: function(e, t) {
for (var a = 4 * t, o = a - e.sigBytes % a, n = o << 24 | o << 16 | o << 8 | o, r = [], s = 0; s < o; s += 4) r.push(n);
var c = i.create(r, o);
e.concat(c);
},
unpad: function(e) {
var t = 255 & e.words[e.sigBytes - 1 >>> 2];
e.sigBytes -= t;
}
}, y = (o.BlockCipher = d.extend({
cfg: d.cfg.extend({
mode: u,
padding: f
}),
reset: function() {
var e;
d.reset.call(this);
var t = this.cfg, a = t.iv, o = t.mode;
if (this._xformMode == this._ENC_XFORM_MODE) e = o.createEncryptor; else {
e = o.createDecryptor;
this._minBufferSize = 1;
}
if (this._mode && this._mode.__creator == e) this._mode.init(this, a && a.words); else {
this._mode = e.call(o, this, a && a.words);
this._mode.__creator = e;
}
},
_doProcessBlock: function(e, t) {
this._mode.processBlock(e, t);
},
_doFinalize: function() {
var e, t = this.cfg.padding;
if (this._xformMode == this._ENC_XFORM_MODE) {
t.pad(this._data, this.blockSize);
e = this._process(!0);
} else {
e = this._process(!0);
t.unpad(e);
}
return e;
},
blockSize: 4
}), o.CipherParams = n.extend({
init: function(e) {
this.mixIn(e);
},
toString: function(e) {
return (e || this.formatter).stringify(this);
}
})), m = (a.format = {}).OpenSSL = {
stringify: function(e) {
var t = e.ciphertext, a = e.salt;
return (a ? i.create([ 1398893684, 1701076831 ]).concat(a).concat(t) : t).toString(c);
},
parse: function(e) {
var t, a = c.parse(e), o = a.words;
if (1398893684 == o[0] && 1701076831 == o[1]) {
t = i.create(o.slice(2, 4));
o.splice(0, 4);
a.sigBytes -= 16;
}
return y.create({
ciphertext: a,
salt: t
});
}
}, g = o.SerializableCipher = n.extend({
cfg: n.extend({
format: m
}),
encrypt: function(e, t, a, o) {
o = this.cfg.extend(o);
var n = e.createEncryptor(a, o), i = n.finalize(t), r = n.cfg;
return y.create({
ciphertext: i,
key: a,
iv: r.iv,
algorithm: e,
mode: r.mode,
padding: r.padding,
blockSize: e.blockSize,
formatter: o.format
});
},
decrypt: function(e, t, a, o) {
o = this.cfg.extend(o);
t = this._parse(t, o.format);
return e.createDecryptor(a, o).finalize(t.ciphertext);
},
_parse: function(e, t) {
return "string" == typeof e ? t.parse(e, this) : e;
}
}), v = (a.kdf = {}).OpenSSL = {
execute: function(e, t, a, o) {
o || (o = i.random(8));
var n = l.create({
keySize: t + a
}).compute(e, o), r = i.create(n.words.slice(t), 4 * a);
n.sigBytes = 4 * t;
return y.create({
key: n,
iv: r,
salt: o
});
}
}, G = o.PasswordBasedCipher = g.extend({
cfg: g.cfg.extend({
kdf: v
}),
encrypt: function(e, t, a, o) {
var n = (o = this.cfg.extend(o)).kdf.execute(a, e.keySize, e.ivSize);
o.iv = n.iv;
var i = g.encrypt.call(this, e, t, n.key, o);
i.mixIn(n);
return i;
},
decrypt: function(e, t, a, o) {
o = this.cfg.extend(o);
t = this._parse(t, o.format);
var n = o.kdf.execute(a, e.keySize, e.ivSize, t.salt);
o.iv = n.iv;
return g.decrypt.call(this, e, t, n.key, o);
}
});
}();
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./evpkdf")) : "function" == typeof define && define.amd ? define([ "./core", "./evpkdf" ], o) : o(this.CryptoJS);
var o;
}, {
"./core": 4,
"./evpkdf": 8
} ],
4: [ function(e, t, a) {
(function(o) {
this, n = function() {
var t = t || function(t) {
var a;
"undefined" != typeof window && window.crypto && (a = window.crypto);
"undefined" != typeof self && self.crypto && (a = self.crypto);
"undefined" != typeof globalThis && globalThis.crypto && (a = globalThis.crypto);
!a && "undefined" != typeof window && window.msCrypto && (a = window.msCrypto);
!a && "undefined" != typeof o && o.crypto && (a = o.crypto);
if (!a && "function" == typeof e) try {
a = e("crypto");
} catch (e) {}
var n = function() {
if (a) {
if ("function" == typeof a.getRandomValues) try {
return a.getRandomValues(new Uint32Array(1))[0];
} catch (e) {}
if ("function" == typeof a.randomBytes) try {
return a.randomBytes(4).readInt32LE();
} catch (e) {}
}
throw new Error("Native crypto module could not be used to get secure random number.");
}, i = Object.create || function() {
function e() {}
return function(t) {
var a;
e.prototype = t;
a = new e();
e.prototype = null;
return a;
};
}(), r = {}, s = r.lib = {}, c = s.Base = {
extend: function(e) {
var t = i(this);
e && t.mixIn(e);
t.hasOwnProperty("init") && this.init !== t.init || (t.init = function() {
t.$super.init.apply(this, arguments);
});
t.init.prototype = t;
t.$super = this;
return t;
},
create: function() {
var e = this.extend();
e.init.apply(e, arguments);
return e;
},
init: function() {},
mixIn: function(e) {
for (var t in e) e.hasOwnProperty(t) && (this[t] = e[t]);
e.hasOwnProperty("toString") && (this.toString = e.toString);
},
clone: function() {
return this.init.prototype.extend(this);
}
}, l = s.WordArray = c.extend({
init: function(e, t) {
e = this.words = e || [];
this.sigBytes = null != t ? t : 4 * e.length;
},
toString: function(e) {
return (e || h).stringify(this);
},
concat: function(e) {
var t = this.words, a = e.words, o = this.sigBytes, n = e.sigBytes;
this.clamp();
if (o % 4) for (var i = 0; i < n; i++) {
var r = a[i >>> 2] >>> 24 - i % 4 * 8 & 255;
t[o + i >>> 2] |= r << 24 - (o + i) % 4 * 8;
} else for (var s = 0; s < n; s += 4) t[o + s >>> 2] = a[s >>> 2];
this.sigBytes += n;
return this;
},
clamp: function() {
var e = this.words, a = this.sigBytes;
e[a >>> 2] &= 4294967295 << 32 - a % 4 * 8;
e.length = t.ceil(a / 4);
},
clone: function() {
var e = c.clone.call(this);
e.words = this.words.slice(0);
return e;
},
random: function(e) {
for (var t = [], a = 0; a < e; a += 4) t.push(n());
return new l.init(t, e);
}
}), d = r.enc = {}, h = d.Hex = {
stringify: function(e) {
for (var t = e.words, a = e.sigBytes, o = [], n = 0; n < a; n++) {
var i = t[n >>> 2] >>> 24 - n % 4 * 8 & 255;
o.push((i >>> 4).toString(16));
o.push((15 & i).toString(16));
}
return o.join("");
},
parse: function(e) {
for (var t = e.length, a = [], o = 0; o < t; o += 2) a[o >>> 3] |= parseInt(e.substr(o, 2), 16) << 24 - o % 8 * 4;
return new l.init(a, t / 2);
}
}, p = d.Latin1 = {
stringify: function(e) {
for (var t = e.words, a = e.sigBytes, o = [], n = 0; n < a; n++) {
var i = t[n >>> 2] >>> 24 - n % 4 * 8 & 255;
o.push(String.fromCharCode(i));
}
return o.join("");
},
parse: function(e) {
for (var t = e.length, a = [], o = 0; o < t; o++) a[o >>> 2] |= (255 & e.charCodeAt(o)) << 24 - o % 4 * 8;
return new l.init(a, t);
}
}, u = d.Utf8 = {
stringify: function(e) {
try {
return decodeURIComponent(escape(p.stringify(e)));
} catch (e) {
throw new Error("Malformed UTF-8 data");
}
},
parse: function(e) {
return p.parse(unescape(encodeURIComponent(e)));
}
}, f = s.BufferedBlockAlgorithm = c.extend({
reset: function() {
this._data = new l.init();
this._nDataBytes = 0;
},
_append: function(e) {
"string" == typeof e && (e = u.parse(e));
this._data.concat(e);
this._nDataBytes += e.sigBytes;
},
_process: function(e) {
var a, o = this._data, n = o.words, i = o.sigBytes, r = this.blockSize, s = i / (4 * r), c = (s = e ? t.ceil(s) : t.max((0 | s) - this._minBufferSize, 0)) * r, d = t.min(4 * c, i);
if (c) {
for (var h = 0; h < c; h += r) this._doProcessBlock(n, h);
a = n.splice(0, c);
o.sigBytes -= d;
}
return new l.init(a, d);
},
clone: function() {
var e = c.clone.call(this);
e._data = this._data.clone();
return e;
},
_minBufferSize: 0
}), y = (s.Hasher = f.extend({
cfg: c.extend(),
init: function(e) {
this.cfg = this.cfg.extend(e);
this.reset();
},
reset: function() {
f.reset.call(this);
this._doReset();
},
update: function(e) {
this._append(e);
this._process();
return this;
},
finalize: function(e) {
e && this._append(e);
return this._doFinalize();
},
blockSize: 16,
_createHelper: function(e) {
return function(t, a) {
return new e.init(a).finalize(t);
};
},
_createHmacHelper: function(e) {
return function(t, a) {
return new y.HMAC.init(e, a).finalize(t);
};
}
}), r.algo = {});
return r;
}(Math);
return t;
}, "object" == typeof a ? t.exports = a = n() : "function" == typeof define && define.amd ? define([], n) : this.CryptoJS = n();
var n;
}).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {});
}, {
crypto: 1
} ],
5: [ function(e, t, a) {
this, o = function(e) {
(function() {
var t = e, a = t.lib.WordArray;
t.enc.Base64 = {
stringify: function(e) {
var t = e.words, a = e.sigBytes, o = this._map;
e.clamp();
for (var n = [], i = 0; i < a; i += 3) for (var r = (t[i >>> 2] >>> 24 - i % 4 * 8 & 255) << 16 | (t[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255) << 8 | t[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255, s = 0; s < 4 && i + .75 * s < a; s++) n.push(o.charAt(r >>> 6 * (3 - s) & 63));
var c = o.charAt(64);
if (c) for (;n.length % 4; ) n.push(c);
return n.join("");
},
parse: function(e) {
var t = e.length, a = this._map, n = this._reverseMap;
if (!n) {
n = this._reverseMap = [];
for (var i = 0; i < a.length; i++) n[a.charCodeAt(i)] = i;
}
var r = a.charAt(64);
if (r) {
var s = e.indexOf(r);
-1 !== s && (t = s);
}
return o(e, t, n);
},
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
};
function o(e, t, o) {
for (var n = [], i = 0, r = 0; r < t; r++) if (r % 4) {
var s = o[e.charCodeAt(r - 1)] << r % 4 * 2 | o[e.charCodeAt(r)] >>> 6 - r % 4 * 2;
n[i >>> 2] |= s << 24 - i % 4 * 8;
i++;
}
return a.create(n, i);
}
})();
return e.enc.Base64;
}, "object" == typeof a ? t.exports = a = o(e("./core")) : "function" == typeof define && define.amd ? define([ "./core" ], o) : o(this.CryptoJS);
var o;
}, {
"./core": 4
} ],
6: [ function(e, t, a) {
this, o = function(e) {
(function() {
var t = e, a = t.lib.WordArray;
t.enc.Base64url = {
stringify: function(e, t = !0) {
var a = e.words, o = e.sigBytes, n = t ? this._safe_map : this._map;
e.clamp();
for (var i = [], r = 0; r < o; r += 3) for (var s = (a[r >>> 2] >>> 24 - r % 4 * 8 & 255) << 16 | (a[r + 1 >>> 2] >>> 24 - (r + 1) % 4 * 8 & 255) << 8 | a[r + 2 >>> 2] >>> 24 - (r + 2) % 4 * 8 & 255, c = 0; c < 4 && r + .75 * c < o; c++) i.push(n.charAt(s >>> 6 * (3 - c) & 63));
var l = n.charAt(64);
if (l) for (;i.length % 4; ) i.push(l);
return i.join("");
},
parse: function(e, t = !0) {
var a = e.length, n = t ? this._safe_map : this._map, i = this._reverseMap;
if (!i) {
i = this._reverseMap = [];
for (var r = 0; r < n.length; r++) i[n.charCodeAt(r)] = r;
}
var s = n.charAt(64);
if (s) {
var c = e.indexOf(s);
-1 !== c && (a = c);
}
return o(e, a, i);
},
_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
_safe_map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
};
function o(e, t, o) {
for (var n = [], i = 0, r = 0; r < t; r++) if (r % 4) {
var s = o[e.charCodeAt(r - 1)] << r % 4 * 2 | o[e.charCodeAt(r)] >>> 6 - r % 4 * 2;
n[i >>> 2] |= s << 24 - i % 4 * 8;
i++;
}
return a.create(n, i);
}
})();
return e.enc.Base64url;
}, "object" == typeof a ? t.exports = a = o(e("./core")) : "function" == typeof define && define.amd ? define([ "./core" ], o) : o(this.CryptoJS);
var o;
}, {
"./core": 4
} ],
7: [ function(e, t, a) {
this, o = function(e) {
(function() {
var t = e, a = t.lib.WordArray, o = t.enc;
o.Utf16 = o.Utf16BE = {
stringify: function(e) {
for (var t = e.words, a = e.sigBytes, o = [], n = 0; n < a; n += 2) {
var i = t[n >>> 2] >>> 16 - n % 4 * 8 & 65535;
o.push(String.fromCharCode(i));
}
return o.join("");
},
parse: function(e) {
for (var t = e.length, o = [], n = 0; n < t; n++) o[n >>> 1] |= e.charCodeAt(n) << 16 - n % 2 * 16;
return a.create(o, 2 * t);
}
};
o.Utf16LE = {
stringify: function(e) {
for (var t = e.words, a = e.sigBytes, o = [], i = 0; i < a; i += 2) {
var r = n(t[i >>> 2] >>> 16 - i % 4 * 8 & 65535);
o.push(String.fromCharCode(r));
}
return o.join("");
},
parse: function(e) {
for (var t = e.length, o = [], i = 0; i < t; i++) o[i >>> 1] |= n(e.charCodeAt(i) << 16 - i % 2 * 16);
return a.create(o, 2 * t);
}
};
function n(e) {
return e << 8 & 4278255360 | e >>> 8 & 16711935;
}
})();
return e.enc.Utf16;
}, "object" == typeof a ? t.exports = a = o(e("./core")) : "function" == typeof define && define.amd ? define([ "./core" ], o) : o(this.CryptoJS);
var o;
}, {
"./core": 4
} ],
8: [ function(e, t, a) {
this, o = function(e) {
o = (a = (t = e).lib).Base, n = a.WordArray, r = (i = t.algo).MD5, s = i.EvpKDF = o.extend({
cfg: o.extend({
keySize: 4,
hasher: r,
iterations: 1
}),
init: function(e) {
this.cfg = this.cfg.extend(e);
},
compute: function(e, t) {
for (var a, o = this.cfg, i = o.hasher.create(), r = n.create(), s = r.words, c = o.keySize, l = o.iterations; s.length < c; ) {
a && i.update(a);
a = i.update(e).finalize(t);
i.reset();
for (var d = 1; d < l; d++) {
a = i.finalize(a);
i.reset();
}
r.concat(a);
}
r.sigBytes = 4 * c;
return r;
}
}), t.EvpKDF = function(e, t, a) {
return s.create(a).compute(e, t);
};
var t, a, o, n, i, r, s;
return e.EvpKDF;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./sha1"), e("./hmac")) : "function" == typeof define && define.amd ? define([ "./core", "./sha1", "./hmac" ], o) : o(this.CryptoJS);
var o;
}, {
"./core": 4,
"./hmac": 10,
"./sha1": 29
} ],
9: [ function(e, t, a) {
this, o = function(e) {
a = (t = e).lib.CipherParams, o = t.enc.Hex, t.format.Hex = {
stringify: function(e) {
return e.ciphertext.toString(o);
},
parse: function(e) {
var t = o.parse(e);
return a.create({
ciphertext: t
});
}
};
var t, a, o;
return e.format.Hex;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./cipher-core")) : "function" == typeof define && define.amd ? define([ "./core", "./cipher-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./cipher-core": 3,
"./core": 4
} ],
10: [ function(e, t, a) {
this, o = function(e) {
a = (t = e).lib.Base, o = t.enc.Utf8, t.algo.HMAC = a.extend({
init: function(e, t) {
e = this._hasher = new e.init();
"string" == typeof t && (t = o.parse(t));
var a = e.blockSize, n = 4 * a;
t.sigBytes > n && (t = e.finalize(t));
t.clamp();
for (var i = this._oKey = t.clone(), r = this._iKey = t.clone(), s = i.words, c = r.words, l = 0; l < a; l++) {
s[l] ^= 1549556828;
c[l] ^= 909522486;
}
i.sigBytes = r.sigBytes = n;
this.reset();
},
reset: function() {
var e = this._hasher;
e.reset();
e.update(this._iKey);
},
update: function(e) {
this._hasher.update(e);
return this;
},
finalize: function(e) {
var t = this._hasher, a = t.finalize(e);
t.reset();
return t.finalize(this._oKey.clone().concat(a));
}
});
var t, a, o;
}, "object" == typeof a ? t.exports = a = o(e("./core")) : "function" == typeof define && define.amd ? define([ "./core" ], o) : o(this.CryptoJS);
var o;
}, {
"./core": 4
} ],
11: [ function(e, t, a) {
this, o = function(e) {
return e;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./x64-core"), e("./lib-typedarrays"), e("./enc-utf16"), e("./enc-base64"), e("./enc-base64url"), e("./md5"), e("./sha1"), e("./sha256"), e("./sha224"), e("./sha512"), e("./sha384"), e("./sha3"), e("./ripemd160"), e("./hmac"), e("./pbkdf2"), e("./evpkdf"), e("./cipher-core"), e("./mode-cfb"), e("./mode-ctr"), e("./mode-ctr-gladman"), e("./mode-ofb"), e("./mode-ecb"), e("./pad-ansix923"), e("./pad-iso10126"), e("./pad-iso97971"), e("./pad-zeropadding"), e("./pad-nopadding"), e("./format-hex"), e("./aes"), e("./tripledes"), e("./rc4"), e("./rabbit"), e("./rabbit-legacy")) : "function" == typeof define && define.amd ? define([ "./core", "./x64-core", "./lib-typedarrays", "./enc-utf16", "./enc-base64", "./enc-base64url", "./md5", "./sha1", "./sha256", "./sha224", "./sha512", "./sha384", "./sha3", "./ripemd160", "./hmac", "./pbkdf2", "./evpkdf", "./cipher-core", "./mode-cfb", "./mode-ctr", "./mode-ctr-gladman", "./mode-ofb", "./mode-ecb", "./pad-ansix923", "./pad-iso10126", "./pad-iso97971", "./pad-zeropadding", "./pad-nopadding", "./format-hex", "./aes", "./tripledes", "./rc4", "./rabbit", "./rabbit-legacy" ], o) : this.CryptoJS = o(this.CryptoJS);
var o;
}, {
"./aes": 2,
"./cipher-core": 3,
"./core": 4,
"./enc-base64": 5,
"./enc-base64url": 6,
"./enc-utf16": 7,
"./evpkdf": 8,
"./format-hex": 9,
"./hmac": 10,
"./lib-typedarrays": 12,
"./md5": 13,
"./mode-cfb": 14,
"./mode-ctr": 16,
"./mode-ctr-gladman": 15,
"./mode-ecb": 17,
"./mode-ofb": 18,
"./pad-ansix923": 19,
"./pad-iso10126": 20,
"./pad-iso97971": 21,
"./pad-nopadding": 22,
"./pad-zeropadding": 23,
"./pbkdf2": 24,
"./rabbit": 26,
"./rabbit-legacy": 25,
"./rc4": 27,
"./ripemd160": 28,
"./sha1": 29,
"./sha224": 30,
"./sha256": 31,
"./sha3": 32,
"./sha384": 33,
"./sha512": 34,
"./tripledes": 35,
"./x64-core": 36
} ],
12: [ function(e, t, a) {
this, o = function(e) {
(function() {
if ("function" == typeof ArrayBuffer) {
var t = e.lib.WordArray, a = t.init;
(t.init = function(e) {
e instanceof ArrayBuffer && (e = new Uint8Array(e));
(e instanceof Int8Array || "undefined" != typeof Uint8ClampedArray && e instanceof Uint8ClampedArray || e instanceof Int16Array || e instanceof Uint16Array || e instanceof Int32Array || e instanceof Uint32Array || e instanceof Float32Array || e instanceof Float64Array) && (e = new Uint8Array(e.buffer, e.byteOffset, e.byteLength));
if (e instanceof Uint8Array) {
for (var t = e.byteLength, o = [], n = 0; n < t; n++) o[n >>> 2] |= e[n] << 24 - n % 4 * 8;
a.call(this, o, t);
} else a.apply(this, arguments);
}).prototype = t;
}
})();
return e.lib.WordArray;
}, "object" == typeof a ? t.exports = a = o(e("./core")) : "function" == typeof define && define.amd ? define([ "./core" ], o) : o(this.CryptoJS);
var o;
}, {
"./core": 4
} ],
13: [ function(e, t, a) {
this, o = function(e) {
(function(t) {
var a = e, o = a.lib, n = o.WordArray, i = o.Hasher, r = a.algo, s = [];
(function() {
for (var e = 0; e < 64; e++) s[e] = 4294967296 * t.abs(t.sin(e + 1)) | 0;
})();
var c = r.MD5 = i.extend({
_doReset: function() {
this._hash = new n.init([ 1732584193, 4023233417, 2562383102, 271733878 ]);
},
_doProcessBlock: function(e, t) {
for (var a = 0; a < 16; a++) {
var o = t + a, n = e[o];
e[o] = 16711935 & (n << 8 | n >>> 24) | 4278255360 & (n << 24 | n >>> 8);
}
var i = this._hash.words, r = e[t + 0], c = e[t + 1], u = e[t + 2], f = e[t + 3], y = e[t + 4], m = e[t + 5], g = e[t + 6], v = e[t + 7], G = e[t + 8], P = e[t + 9], w = e[t + 10], M = e[t + 11], A = e[t + 12], b = e[t + 13], S = e[t + 14], D = e[t + 15], T = i[0], k = i[1], I = i[2], C = i[3];
T = l(T, k, I, C, r, 7, s[0]);
C = l(C, T, k, I, c, 12, s[1]);
I = l(I, C, T, k, u, 17, s[2]);
k = l(k, I, C, T, f, 22, s[3]);
T = l(T, k, I, C, y, 7, s[4]);
C = l(C, T, k, I, m, 12, s[5]);
I = l(I, C, T, k, g, 17, s[6]);
k = l(k, I, C, T, v, 22, s[7]);
T = l(T, k, I, C, G, 7, s[8]);
C = l(C, T, k, I, P, 12, s[9]);
I = l(I, C, T, k, w, 17, s[10]);
k = l(k, I, C, T, M, 22, s[11]);
T = l(T, k, I, C, A, 7, s[12]);
C = l(C, T, k, I, b, 12, s[13]);
I = l(I, C, T, k, S, 17, s[14]);
T = d(T, k = l(k, I, C, T, D, 22, s[15]), I, C, c, 5, s[16]);
C = d(C, T, k, I, g, 9, s[17]);
I = d(I, C, T, k, M, 14, s[18]);
k = d(k, I, C, T, r, 20, s[19]);
T = d(T, k, I, C, m, 5, s[20]);
C = d(C, T, k, I, w, 9, s[21]);
I = d(I, C, T, k, D, 14, s[22]);
k = d(k, I, C, T, y, 20, s[23]);
T = d(T, k, I, C, P, 5, s[24]);
C = d(C, T, k, I, S, 9, s[25]);
I = d(I, C, T, k, f, 14, s[26]);
k = d(k, I, C, T, G, 20, s[27]);
T = d(T, k, I, C, b, 5, s[28]);
C = d(C, T, k, I, u, 9, s[29]);
I = d(I, C, T, k, v, 14, s[30]);
T = h(T, k = d(k, I, C, T, A, 20, s[31]), I, C, m, 4, s[32]);
C = h(C, T, k, I, G, 11, s[33]);
I = h(I, C, T, k, M, 16, s[34]);
k = h(k, I, C, T, S, 23, s[35]);
T = h(T, k, I, C, c, 4, s[36]);
C = h(C, T, k, I, y, 11, s[37]);
I = h(I, C, T, k, v, 16, s[38]);
k = h(k, I, C, T, w, 23, s[39]);
T = h(T, k, I, C, b, 4, s[40]);
C = h(C, T, k, I, r, 11, s[41]);
I = h(I, C, T, k, f, 16, s[42]);
k = h(k, I, C, T, g, 23, s[43]);
T = h(T, k, I, C, P, 4, s[44]);
C = h(C, T, k, I, A, 11, s[45]);
I = h(I, C, T, k, D, 16, s[46]);
T = p(T, k = h(k, I, C, T, u, 23, s[47]), I, C, r, 6, s[48]);
C = p(C, T, k, I, v, 10, s[49]);
I = p(I, C, T, k, S, 15, s[50]);
k = p(k, I, C, T, m, 21, s[51]);
T = p(T, k, I, C, A, 6, s[52]);
C = p(C, T, k, I, f, 10, s[53]);
I = p(I, C, T, k, w, 15, s[54]);
k = p(k, I, C, T, c, 21, s[55]);
T = p(T, k, I, C, G, 6, s[56]);
C = p(C, T, k, I, D, 10, s[57]);
I = p(I, C, T, k, g, 15, s[58]);
k = p(k, I, C, T, b, 21, s[59]);
T = p(T, k, I, C, y, 6, s[60]);
C = p(C, T, k, I, M, 10, s[61]);
I = p(I, C, T, k, u, 15, s[62]);
k = p(k, I, C, T, P, 21, s[63]);
i[0] = i[0] + T | 0;
i[1] = i[1] + k | 0;
i[2] = i[2] + I | 0;
i[3] = i[3] + C | 0;
},
_doFinalize: function() {
var e = this._data, a = e.words, o = 8 * this._nDataBytes, n = 8 * e.sigBytes;
a[n >>> 5] |= 128 << 24 - n % 32;
var i = t.floor(o / 4294967296), r = o;
a[15 + (n + 64 >>> 9 << 4)] = 16711935 & (i << 8 | i >>> 24) | 4278255360 & (i << 24 | i >>> 8);
a[14 + (n + 64 >>> 9 << 4)] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
e.sigBytes = 4 * (a.length + 1);
this._process();
for (var s = this._hash, c = s.words, l = 0; l < 4; l++) {
var d = c[l];
c[l] = 16711935 & (d << 8 | d >>> 24) | 4278255360 & (d << 24 | d >>> 8);
}
return s;
},
clone: function() {
var e = i.clone.call(this);
e._hash = this._hash.clone();
return e;
}
});
function l(e, t, a, o, n, i, r) {
var s = e + (t & a | ~t & o) + n + r;
return (s << i | s >>> 32 - i) + t;
}
function d(e, t, a, o, n, i, r) {
var s = e + (t & o | a & ~o) + n + r;
return (s << i | s >>> 32 - i) + t;
}
function h(e, t, a, o, n, i, r) {
var s = e + (t ^ a ^ o) + n + r;
return (s << i | s >>> 32 - i) + t;
}
function p(e, t, a, o, n, i, r) {
var s = e + (a ^ (t | ~o)) + n + r;
return (s << i | s >>> 32 - i) + t;
}
a.MD5 = i._createHelper(c);
a.HmacMD5 = i._createHmacHelper(c);
})(Math);
return e.MD5;
}, "object" == typeof a ? t.exports = a = o(e("./core")) : "function" == typeof define && define.amd ? define([ "./core" ], o) : o(this.CryptoJS);
var o;
}, {
"./core": 4
} ],
14: [ function(e, t, a) {
this, o = function(e) {
e.mode.CFB = function() {
var t = e.lib.BlockCipherMode.extend();
t.Encryptor = t.extend({
processBlock: function(e, t) {
var o = this._cipher, n = o.blockSize;
a.call(this, e, t, n, o);
this._prevBlock = e.slice(t, t + n);
}
});
t.Decryptor = t.extend({
processBlock: function(e, t) {
var o = this._cipher, n = o.blockSize, i = e.slice(t, t + n);
a.call(this, e, t, n, o);
this._prevBlock = i;
}
});
function a(e, t, a, o) {
var n, i = this._iv;
if (i) {
n = i.slice(0);
this._iv = void 0;
} else n = this._prevBlock;
o.encryptBlock(n, 0);
for (var r = 0; r < a; r++) e[t + r] ^= n[r];
}
return t;
}();
return e.mode.CFB;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./cipher-core")) : "function" == typeof define && define.amd ? define([ "./core", "./cipher-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./cipher-core": 3,
"./core": 4
} ],
15: [ function(e, t, a) {
this, o = function(e) {
e.mode.CTRGladman = function() {
var t = e.lib.BlockCipherMode.extend();
function a(e) {
if (255 == (e >> 24 & 255)) {
var t = e >> 16 & 255, a = e >> 8 & 255, o = 255 & e;
if (255 === t) {
t = 0;
if (255 === a) {
a = 0;
255 === o ? o = 0 : ++o;
} else ++a;
} else ++t;
e = 0;
e += t << 16;
e += a << 8;
e += o;
} else e += 1 << 24;
return e;
}
function o(e) {
0 === (e[0] = a(e[0])) && (e[1] = a(e[1]));
return e;
}
var n = t.Encryptor = t.extend({
processBlock: function(e, t) {
var a = this._cipher, n = a.blockSize, i = this._iv, r = this._counter;
if (i) {
r = this._counter = i.slice(0);
this._iv = void 0;
}
o(r);
var s = r.slice(0);
a.encryptBlock(s, 0);
for (var c = 0; c < n; c++) e[t + c] ^= s[c];
}
});
t.Decryptor = n;
return t;
}();
return e.mode.CTRGladman;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./cipher-core")) : "function" == typeof define && define.amd ? define([ "./core", "./cipher-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./cipher-core": 3,
"./core": 4
} ],
16: [ function(e, t, a) {
this, o = function(e) {
e.mode.CTR = function() {
var t = e.lib.BlockCipherMode.extend(), a = t.Encryptor = t.extend({
processBlock: function(e, t) {
var a = this._cipher, o = a.blockSize, n = this._iv, i = this._counter;
if (n) {
i = this._counter = n.slice(0);
this._iv = void 0;
}
var r = i.slice(0);
a.encryptBlock(r, 0);
i[o - 1] = i[o - 1] + 1 | 0;
for (var s = 0; s < o; s++) e[t + s] ^= r[s];
}
});
t.Decryptor = a;
return t;
}();
return e.mode.CTR;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./cipher-core")) : "function" == typeof define && define.amd ? define([ "./core", "./cipher-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./cipher-core": 3,
"./core": 4
} ],
17: [ function(e, t, a) {
this, o = function(e) {
e.mode.ECB = function() {
var t = e.lib.BlockCipherMode.extend();
t.Encryptor = t.extend({
processBlock: function(e, t) {
this._cipher.encryptBlock(e, t);
}
});
t.Decryptor = t.extend({
processBlock: function(e, t) {
this._cipher.decryptBlock(e, t);
}
});
return t;
}();
return e.mode.ECB;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./cipher-core")) : "function" == typeof define && define.amd ? define([ "./core", "./cipher-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./cipher-core": 3,
"./core": 4
} ],
18: [ function(e, t, a) {
this, o = function(e) {
e.mode.OFB = function() {
var t = e.lib.BlockCipherMode.extend(), a = t.Encryptor = t.extend({
processBlock: function(e, t) {
var a = this._cipher, o = a.blockSize, n = this._iv, i = this._keystream;
if (n) {
i = this._keystream = n.slice(0);
this._iv = void 0;
}
a.encryptBlock(i, 0);
for (var r = 0; r < o; r++) e[t + r] ^= i[r];
}
});
t.Decryptor = a;
return t;
}();
return e.mode.OFB;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./cipher-core")) : "function" == typeof define && define.amd ? define([ "./core", "./cipher-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./cipher-core": 3,
"./core": 4
} ],
19: [ function(e, t, a) {
this, o = function(e) {
e.pad.AnsiX923 = {
pad: function(e, t) {
var a = e.sigBytes, o = 4 * t, n = o - a % o, i = a + n - 1;
e.clamp();
e.words[i >>> 2] |= n << 24 - i % 4 * 8;
e.sigBytes += n;
},
unpad: function(e) {
var t = 255 & e.words[e.sigBytes - 1 >>> 2];
e.sigBytes -= t;
}
};
return e.pad.Ansix923;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./cipher-core")) : "function" == typeof define && define.amd ? define([ "./core", "./cipher-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./cipher-core": 3,
"./core": 4
} ],
20: [ function(e, t, a) {
this, o = function(e) {
e.pad.Iso10126 = {
pad: function(t, a) {
var o = 4 * a, n = o - t.sigBytes % o;
t.concat(e.lib.WordArray.random(n - 1)).concat(e.lib.WordArray.create([ n << 24 ], 1));
},
unpad: function(e) {
var t = 255 & e.words[e.sigBytes - 1 >>> 2];
e.sigBytes -= t;
}
};
return e.pad.Iso10126;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./cipher-core")) : "function" == typeof define && define.amd ? define([ "./core", "./cipher-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./cipher-core": 3,
"./core": 4
} ],
21: [ function(e, t, a) {
this, o = function(e) {
e.pad.Iso97971 = {
pad: function(t, a) {
t.concat(e.lib.WordArray.create([ 2147483648 ], 1));
e.pad.ZeroPadding.pad(t, a);
},
unpad: function(t) {
e.pad.ZeroPadding.unpad(t);
t.sigBytes--;
}
};
return e.pad.Iso97971;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./cipher-core")) : "function" == typeof define && define.amd ? define([ "./core", "./cipher-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./cipher-core": 3,
"./core": 4
} ],
22: [ function(e, t, a) {
this, o = function(e) {
e.pad.NoPadding = {
pad: function() {},
unpad: function() {}
};
return e.pad.NoPadding;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./cipher-core")) : "function" == typeof define && define.amd ? define([ "./core", "./cipher-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./cipher-core": 3,
"./core": 4
} ],
23: [ function(e, t, a) {
this, o = function(e) {
e.pad.ZeroPadding = {
pad: function(e, t) {
var a = 4 * t;
e.clamp();
e.sigBytes += a - (e.sigBytes % a || a);
},
unpad: function(e) {
var t = e.words, a = e.sigBytes - 1;
for (a = e.sigBytes - 1; a >= 0; a--) if (t[a >>> 2] >>> 24 - a % 4 * 8 & 255) {
e.sigBytes = a + 1;
break;
}
}
};
return e.pad.ZeroPadding;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./cipher-core")) : "function" == typeof define && define.amd ? define([ "./core", "./cipher-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./cipher-core": 3,
"./core": 4
} ],
24: [ function(e, t, a) {
this, o = function(e) {
o = (a = (t = e).lib).Base, n = a.WordArray, r = (i = t.algo).SHA1, s = i.HMAC, 
c = i.PBKDF2 = o.extend({
cfg: o.extend({
keySize: 4,
hasher: r,
iterations: 1
}),
init: function(e) {
this.cfg = this.cfg.extend(e);
},
compute: function(e, t) {
for (var a = this.cfg, o = s.create(a.hasher, e), i = n.create(), r = n.create([ 1 ]), c = i.words, l = r.words, d = a.keySize, h = a.iterations; c.length < d; ) {
var p = o.update(t).finalize(r);
o.reset();
for (var u = p.words, f = u.length, y = p, m = 1; m < h; m++) {
y = o.finalize(y);
o.reset();
for (var g = y.words, v = 0; v < f; v++) u[v] ^= g[v];
}
i.concat(p);
l[0]++;
}
i.sigBytes = 4 * d;
return i;
}
}), t.PBKDF2 = function(e, t, a) {
return c.create(a).compute(e, t);
};
var t, a, o, n, i, r, s, c;
return e.PBKDF2;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./sha1"), e("./hmac")) : "function" == typeof define && define.amd ? define([ "./core", "./sha1", "./hmac" ], o) : o(this.CryptoJS);
var o;
}, {
"./core": 4,
"./hmac": 10,
"./sha1": 29
} ],
25: [ function(e, t, a) {
this, o = function(e) {
(function() {
var t = e, a = t.lib.StreamCipher, o = t.algo, n = [], i = [], r = [], s = o.RabbitLegacy = a.extend({
_doReset: function() {
var e = this._key.words, t = this.cfg.iv, a = this._X = [ e[0], e[3] << 16 | e[2] >>> 16, e[1], e[0] << 16 | e[3] >>> 16, e[2], e[1] << 16 | e[0] >>> 16, e[3], e[2] << 16 | e[1] >>> 16 ], o = this._C = [ e[2] << 16 | e[2] >>> 16, 4294901760 & e[0] | 65535 & e[1], e[3] << 16 | e[3] >>> 16, 4294901760 & e[1] | 65535 & e[2], e[0] << 16 | e[0] >>> 16, 4294901760 & e[2] | 65535 & e[3], e[1] << 16 | e[1] >>> 16, 4294901760 & e[3] | 65535 & e[0] ];
this._b = 0;
for (var n = 0; n < 4; n++) c.call(this);
for (n = 0; n < 8; n++) o[n] ^= a[n + 4 & 7];
if (t) {
var i = t.words, r = i[0], s = i[1], l = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8), d = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), h = l >>> 16 | 4294901760 & d, p = d << 16 | 65535 & l;
o[0] ^= l;
o[1] ^= h;
o[2] ^= d;
o[3] ^= p;
o[4] ^= l;
o[5] ^= h;
o[6] ^= d;
o[7] ^= p;
for (n = 0; n < 4; n++) c.call(this);
}
},
_doProcessBlock: function(e, t) {
var a = this._X;
c.call(this);
n[0] = a[0] ^ a[5] >>> 16 ^ a[3] << 16;
n[1] = a[2] ^ a[7] >>> 16 ^ a[5] << 16;
n[2] = a[4] ^ a[1] >>> 16 ^ a[7] << 16;
n[3] = a[6] ^ a[3] >>> 16 ^ a[1] << 16;
for (var o = 0; o < 4; o++) {
n[o] = 16711935 & (n[o] << 8 | n[o] >>> 24) | 4278255360 & (n[o] << 24 | n[o] >>> 8);
e[t + o] ^= n[o];
}
},
blockSize: 4,
ivSize: 2
});
function c() {
for (var e = this._X, t = this._C, a = 0; a < 8; a++) i[a] = t[a];
t[0] = t[0] + 1295307597 + this._b | 0;
t[1] = t[1] + 3545052371 + (t[0] >>> 0 < i[0] >>> 0 ? 1 : 0) | 0;
t[2] = t[2] + 886263092 + (t[1] >>> 0 < i[1] >>> 0 ? 1 : 0) | 0;
t[3] = t[3] + 1295307597 + (t[2] >>> 0 < i[2] >>> 0 ? 1 : 0) | 0;
t[4] = t[4] + 3545052371 + (t[3] >>> 0 < i[3] >>> 0 ? 1 : 0) | 0;
t[5] = t[5] + 886263092 + (t[4] >>> 0 < i[4] >>> 0 ? 1 : 0) | 0;
t[6] = t[6] + 1295307597 + (t[5] >>> 0 < i[5] >>> 0 ? 1 : 0) | 0;
t[7] = t[7] + 3545052371 + (t[6] >>> 0 < i[6] >>> 0 ? 1 : 0) | 0;
this._b = t[7] >>> 0 < i[7] >>> 0 ? 1 : 0;
for (a = 0; a < 8; a++) {
var o = e[a] + t[a], n = 65535 & o, s = o >>> 16, c = ((n * n >>> 17) + n * s >>> 15) + s * s, l = ((4294901760 & o) * o | 0) + ((65535 & o) * o | 0);
r[a] = c ^ l;
}
e[0] = r[0] + (r[7] << 16 | r[7] >>> 16) + (r[6] << 16 | r[6] >>> 16) | 0;
e[1] = r[1] + (r[0] << 8 | r[0] >>> 24) + r[7] | 0;
e[2] = r[2] + (r[1] << 16 | r[1] >>> 16) + (r[0] << 16 | r[0] >>> 16) | 0;
e[3] = r[3] + (r[2] << 8 | r[2] >>> 24) + r[1] | 0;
e[4] = r[4] + (r[3] << 16 | r[3] >>> 16) + (r[2] << 16 | r[2] >>> 16) | 0;
e[5] = r[5] + (r[4] << 8 | r[4] >>> 24) + r[3] | 0;
e[6] = r[6] + (r[5] << 16 | r[5] >>> 16) + (r[4] << 16 | r[4] >>> 16) | 0;
e[7] = r[7] + (r[6] << 8 | r[6] >>> 24) + r[5] | 0;
}
t.RabbitLegacy = a._createHelper(s);
})();
return e.RabbitLegacy;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./enc-base64"), e("./md5"), e("./evpkdf"), e("./cipher-core")) : "function" == typeof define && define.amd ? define([ "./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./cipher-core": 3,
"./core": 4,
"./enc-base64": 5,
"./evpkdf": 8,
"./md5": 13
} ],
26: [ function(e, t, a) {
this, o = function(e) {
(function() {
var t = e, a = t.lib.StreamCipher, o = t.algo, n = [], i = [], r = [], s = o.Rabbit = a.extend({
_doReset: function() {
for (var e = this._key.words, t = this.cfg.iv, a = 0; a < 4; a++) e[a] = 16711935 & (e[a] << 8 | e[a] >>> 24) | 4278255360 & (e[a] << 24 | e[a] >>> 8);
var o = this._X = [ e[0], e[3] << 16 | e[2] >>> 16, e[1], e[0] << 16 | e[3] >>> 16, e[2], e[1] << 16 | e[0] >>> 16, e[3], e[2] << 16 | e[1] >>> 16 ], n = this._C = [ e[2] << 16 | e[2] >>> 16, 4294901760 & e[0] | 65535 & e[1], e[3] << 16 | e[3] >>> 16, 4294901760 & e[1] | 65535 & e[2], e[0] << 16 | e[0] >>> 16, 4294901760 & e[2] | 65535 & e[3], e[1] << 16 | e[1] >>> 16, 4294901760 & e[3] | 65535 & e[0] ];
this._b = 0;
for (a = 0; a < 4; a++) c.call(this);
for (a = 0; a < 8; a++) n[a] ^= o[a + 4 & 7];
if (t) {
var i = t.words, r = i[0], s = i[1], l = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8), d = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), h = l >>> 16 | 4294901760 & d, p = d << 16 | 65535 & l;
n[0] ^= l;
n[1] ^= h;
n[2] ^= d;
n[3] ^= p;
n[4] ^= l;
n[5] ^= h;
n[6] ^= d;
n[7] ^= p;
for (a = 0; a < 4; a++) c.call(this);
}
},
_doProcessBlock: function(e, t) {
var a = this._X;
c.call(this);
n[0] = a[0] ^ a[5] >>> 16 ^ a[3] << 16;
n[1] = a[2] ^ a[7] >>> 16 ^ a[5] << 16;
n[2] = a[4] ^ a[1] >>> 16 ^ a[7] << 16;
n[3] = a[6] ^ a[3] >>> 16 ^ a[1] << 16;
for (var o = 0; o < 4; o++) {
n[o] = 16711935 & (n[o] << 8 | n[o] >>> 24) | 4278255360 & (n[o] << 24 | n[o] >>> 8);
e[t + o] ^= n[o];
}
},
blockSize: 4,
ivSize: 2
});
function c() {
for (var e = this._X, t = this._C, a = 0; a < 8; a++) i[a] = t[a];
t[0] = t[0] + 1295307597 + this._b | 0;
t[1] = t[1] + 3545052371 + (t[0] >>> 0 < i[0] >>> 0 ? 1 : 0) | 0;
t[2] = t[2] + 886263092 + (t[1] >>> 0 < i[1] >>> 0 ? 1 : 0) | 0;
t[3] = t[3] + 1295307597 + (t[2] >>> 0 < i[2] >>> 0 ? 1 : 0) | 0;
t[4] = t[4] + 3545052371 + (t[3] >>> 0 < i[3] >>> 0 ? 1 : 0) | 0;
t[5] = t[5] + 886263092 + (t[4] >>> 0 < i[4] >>> 0 ? 1 : 0) | 0;
t[6] = t[6] + 1295307597 + (t[5] >>> 0 < i[5] >>> 0 ? 1 : 0) | 0;
t[7] = t[7] + 3545052371 + (t[6] >>> 0 < i[6] >>> 0 ? 1 : 0) | 0;
this._b = t[7] >>> 0 < i[7] >>> 0 ? 1 : 0;
for (a = 0; a < 8; a++) {
var o = e[a] + t[a], n = 65535 & o, s = o >>> 16, c = ((n * n >>> 17) + n * s >>> 15) + s * s, l = ((4294901760 & o) * o | 0) + ((65535 & o) * o | 0);
r[a] = c ^ l;
}
e[0] = r[0] + (r[7] << 16 | r[7] >>> 16) + (r[6] << 16 | r[6] >>> 16) | 0;
e[1] = r[1] + (r[0] << 8 | r[0] >>> 24) + r[7] | 0;
e[2] = r[2] + (r[1] << 16 | r[1] >>> 16) + (r[0] << 16 | r[0] >>> 16) | 0;
e[3] = r[3] + (r[2] << 8 | r[2] >>> 24) + r[1] | 0;
e[4] = r[4] + (r[3] << 16 | r[3] >>> 16) + (r[2] << 16 | r[2] >>> 16) | 0;
e[5] = r[5] + (r[4] << 8 | r[4] >>> 24) + r[3] | 0;
e[6] = r[6] + (r[5] << 16 | r[5] >>> 16) + (r[4] << 16 | r[4] >>> 16) | 0;
e[7] = r[7] + (r[6] << 8 | r[6] >>> 24) + r[5] | 0;
}
t.Rabbit = a._createHelper(s);
})();
return e.Rabbit;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./enc-base64"), e("./md5"), e("./evpkdf"), e("./cipher-core")) : "function" == typeof define && define.amd ? define([ "./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./cipher-core": 3,
"./core": 4,
"./enc-base64": 5,
"./evpkdf": 8,
"./md5": 13
} ],
27: [ function(e, t, a) {
this, o = function(e) {
(function() {
var t = e, a = t.lib.StreamCipher, o = t.algo, n = o.RC4 = a.extend({
_doReset: function() {
for (var e = this._key, t = e.words, a = e.sigBytes, o = this._S = [], n = 0; n < 256; n++) o[n] = n;
n = 0;
for (var i = 0; n < 256; n++) {
var r = n % a, s = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
i = (i + o[n] + s) % 256;
var c = o[n];
o[n] = o[i];
o[i] = c;
}
this._i = this._j = 0;
},
_doProcessBlock: function(e, t) {
e[t] ^= i.call(this);
},
keySize: 8,
ivSize: 0
});
function i() {
for (var e = this._S, t = this._i, a = this._j, o = 0, n = 0; n < 4; n++) {
a = (a + e[t = (t + 1) % 256]) % 256;
var i = e[t];
e[t] = e[a];
e[a] = i;
o |= e[(e[t] + e[a]) % 256] << 24 - 8 * n;
}
this._i = t;
this._j = a;
return o;
}
t.RC4 = a._createHelper(n);
var r = o.RC4Drop = n.extend({
cfg: n.cfg.extend({
drop: 192
}),
_doReset: function() {
n._doReset.call(this);
for (var e = this.cfg.drop; e > 0; e--) i.call(this);
}
});
t.RC4Drop = a._createHelper(r);
})();
return e.RC4;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./enc-base64"), e("./md5"), e("./evpkdf"), e("./cipher-core")) : "function" == typeof define && define.amd ? define([ "./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./cipher-core": 3,
"./core": 4,
"./enc-base64": 5,
"./evpkdf": 8,
"./md5": 13
} ],
28: [ function(e, t, a) {
this, o = function(e) {
(function() {
var t = e, a = t.lib, o = a.WordArray, n = a.Hasher, i = t.algo, r = o.create([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13 ]), s = o.create([ 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11 ]), c = o.create([ 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]), l = o.create([ 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]), d = o.create([ 0, 1518500249, 1859775393, 2400959708, 2840853838 ]), h = o.create([ 1352829926, 1548603684, 1836072691, 2053994217, 0 ]), p = i.RIPEMD160 = n.extend({
_doReset: function() {
this._hash = o.create([ 1732584193, 4023233417, 2562383102, 271733878, 3285377520 ]);
},
_doProcessBlock: function(e, t) {
for (var a = 0; a < 16; a++) {
var o = t + a, n = e[o];
e[o] = 16711935 & (n << 8 | n >>> 24) | 4278255360 & (n << 24 | n >>> 8);
}
var i, p, G, P, w, M, A, b, S, D, T, k = this._hash.words, I = d.words, C = h.words, x = r.words, _ = s.words, R = c.words, N = l.words;
M = i = k[0];
A = p = k[1];
b = G = k[2];
S = P = k[3];
D = w = k[4];
for (a = 0; a < 80; a += 1) {
T = i + e[t + x[a]] | 0;
T += a < 16 ? u(p, G, P) + I[0] : a < 32 ? f(p, G, P) + I[1] : a < 48 ? y(p, G, P) + I[2] : a < 64 ? m(p, G, P) + I[3] : g(p, G, P) + I[4];
T = (T = v(T |= 0, R[a])) + w | 0;
i = w;
w = P;
P = v(G, 10);
G = p;
p = T;
T = M + e[t + _[a]] | 0;
T += a < 16 ? g(A, b, S) + C[0] : a < 32 ? m(A, b, S) + C[1] : a < 48 ? y(A, b, S) + C[2] : a < 64 ? f(A, b, S) + C[3] : u(A, b, S) + C[4];
T = (T = v(T |= 0, N[a])) + D | 0;
M = D;
D = S;
S = v(b, 10);
b = A;
A = T;
}
T = k[1] + G + S | 0;
k[1] = k[2] + P + D | 0;
k[2] = k[3] + w + M | 0;
k[3] = k[4] + i + A | 0;
k[4] = k[0] + p + b | 0;
k[0] = T;
},
_doFinalize: function() {
var e = this._data, t = e.words, a = 8 * this._nDataBytes, o = 8 * e.sigBytes;
t[o >>> 5] |= 128 << 24 - o % 32;
t[14 + (o + 64 >>> 9 << 4)] = 16711935 & (a << 8 | a >>> 24) | 4278255360 & (a << 24 | a >>> 8);
e.sigBytes = 4 * (t.length + 1);
this._process();
for (var n = this._hash, i = n.words, r = 0; r < 5; r++) {
var s = i[r];
i[r] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8);
}
return n;
},
clone: function() {
var e = n.clone.call(this);
e._hash = this._hash.clone();
return e;
}
});
function u(e, t, a) {
return e ^ t ^ a;
}
function f(e, t, a) {
return e & t | ~e & a;
}
function y(e, t, a) {
return (e | ~t) ^ a;
}
function m(e, t, a) {
return e & a | t & ~a;
}
function g(e, t, a) {
return e ^ (t | ~a);
}
function v(e, t) {
return e << t | e >>> 32 - t;
}
t.RIPEMD160 = n._createHelper(p);
t.HmacRIPEMD160 = n._createHmacHelper(p);
})(Math);
return e.RIPEMD160;
}, "object" == typeof a ? t.exports = a = o(e("./core")) : "function" == typeof define && define.amd ? define([ "./core" ], o) : o(this.CryptoJS);
var o;
}, {
"./core": 4
} ],
29: [ function(e, t, a) {
this, o = function(e) {
(function() {
var t = e, a = t.lib, o = a.WordArray, n = a.Hasher, i = t.algo, r = [], s = i.SHA1 = n.extend({
_doReset: function() {
this._hash = new o.init([ 1732584193, 4023233417, 2562383102, 271733878, 3285377520 ]);
},
_doProcessBlock: function(e, t) {
for (var a = this._hash.words, o = a[0], n = a[1], i = a[2], s = a[3], c = a[4], l = 0; l < 80; l++) {
if (l < 16) r[l] = 0 | e[t + l]; else {
var d = r[l - 3] ^ r[l - 8] ^ r[l - 14] ^ r[l - 16];
r[l] = d << 1 | d >>> 31;
}
var h = (o << 5 | o >>> 27) + c + r[l];
h += l < 20 ? 1518500249 + (n & i | ~n & s) : l < 40 ? 1859775393 + (n ^ i ^ s) : l < 60 ? (n & i | n & s | i & s) - 1894007588 : (n ^ i ^ s) - 899497514;
c = s;
s = i;
i = n << 30 | n >>> 2;
n = o;
o = h;
}
a[0] = a[0] + o | 0;
a[1] = a[1] + n | 0;
a[2] = a[2] + i | 0;
a[3] = a[3] + s | 0;
a[4] = a[4] + c | 0;
},
_doFinalize: function() {
var e = this._data, t = e.words, a = 8 * this._nDataBytes, o = 8 * e.sigBytes;
t[o >>> 5] |= 128 << 24 - o % 32;
t[14 + (o + 64 >>> 9 << 4)] = Math.floor(a / 4294967296);
t[15 + (o + 64 >>> 9 << 4)] = a;
e.sigBytes = 4 * t.length;
this._process();
return this._hash;
},
clone: function() {
var e = n.clone.call(this);
e._hash = this._hash.clone();
return e;
}
});
t.SHA1 = n._createHelper(s);
t.HmacSHA1 = n._createHmacHelper(s);
})();
return e.SHA1;
}, "object" == typeof a ? t.exports = a = o(e("./core")) : "function" == typeof define && define.amd ? define([ "./core" ], o) : o(this.CryptoJS);
var o;
}, {
"./core": 4
} ],
30: [ function(e, t, a) {
this, o = function(e) {
(function() {
var t = e, a = t.lib.WordArray, o = t.algo, n = o.SHA256, i = o.SHA224 = n.extend({
_doReset: function() {
this._hash = new a.init([ 3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428 ]);
},
_doFinalize: function() {
var e = n._doFinalize.call(this);
e.sigBytes -= 4;
return e;
}
});
t.SHA224 = n._createHelper(i);
t.HmacSHA224 = n._createHmacHelper(i);
})();
return e.SHA224;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./sha256")) : "function" == typeof define && define.amd ? define([ "./core", "./sha256" ], o) : o(this.CryptoJS);
var o;
}, {
"./core": 4,
"./sha256": 31
} ],
31: [ function(e, t, a) {
this, o = function(e) {
(function(t) {
var a = e, o = a.lib, n = o.WordArray, i = o.Hasher, r = a.algo, s = [], c = [];
(function() {
function e(e) {
for (var a = t.sqrt(e), o = 2; o <= a; o++) if (!(e % o)) return !1;
return !0;
}
function a(e) {
return 4294967296 * (e - (0 | e)) | 0;
}
for (var o = 2, n = 0; n < 64; ) {
if (e(o)) {
n < 8 && (s[n] = a(t.pow(o, .5)));
c[n] = a(t.pow(o, 1 / 3));
n++;
}
o++;
}
})();
var l = [], d = r.SHA256 = i.extend({
_doReset: function() {
this._hash = new n.init(s.slice(0));
},
_doProcessBlock: function(e, t) {
for (var a = this._hash.words, o = a[0], n = a[1], i = a[2], r = a[3], s = a[4], d = a[5], h = a[6], p = a[7], u = 0; u < 64; u++) {
if (u < 16) l[u] = 0 | e[t + u]; else {
var f = l[u - 15], y = (f << 25 | f >>> 7) ^ (f << 14 | f >>> 18) ^ f >>> 3, m = l[u - 2], g = (m << 15 | m >>> 17) ^ (m << 13 | m >>> 19) ^ m >>> 10;
l[u] = y + l[u - 7] + g + l[u - 16];
}
var v = o & n ^ o & i ^ n & i, G = (o << 30 | o >>> 2) ^ (o << 19 | o >>> 13) ^ (o << 10 | o >>> 22), P = p + ((s << 26 | s >>> 6) ^ (s << 21 | s >>> 11) ^ (s << 7 | s >>> 25)) + (s & d ^ ~s & h) + c[u] + l[u];
p = h;
h = d;
d = s;
s = r + P | 0;
r = i;
i = n;
n = o;
o = P + (G + v) | 0;
}
a[0] = a[0] + o | 0;
a[1] = a[1] + n | 0;
a[2] = a[2] + i | 0;
a[3] = a[3] + r | 0;
a[4] = a[4] + s | 0;
a[5] = a[5] + d | 0;
a[6] = a[6] + h | 0;
a[7] = a[7] + p | 0;
},
_doFinalize: function() {
var e = this._data, a = e.words, o = 8 * this._nDataBytes, n = 8 * e.sigBytes;
a[n >>> 5] |= 128 << 24 - n % 32;
a[14 + (n + 64 >>> 9 << 4)] = t.floor(o / 4294967296);
a[15 + (n + 64 >>> 9 << 4)] = o;
e.sigBytes = 4 * a.length;
this._process();
return this._hash;
},
clone: function() {
var e = i.clone.call(this);
e._hash = this._hash.clone();
return e;
}
});
a.SHA256 = i._createHelper(d);
a.HmacSHA256 = i._createHmacHelper(d);
})(Math);
return e.SHA256;
}, "object" == typeof a ? t.exports = a = o(e("./core")) : "function" == typeof define && define.amd ? define([ "./core" ], o) : o(this.CryptoJS);
var o;
}, {
"./core": 4
} ],
32: [ function(e, t, a) {
this, o = function(e) {
(function(t) {
var a = e, o = a.lib, n = o.WordArray, i = o.Hasher, r = a.x64.Word, s = a.algo, c = [], l = [], d = [];
(function() {
for (var e = 1, t = 0, a = 0; a < 24; a++) {
c[e + 5 * t] = (a + 1) * (a + 2) / 2 % 64;
var o = (2 * e + 3 * t) % 5;
e = t % 5;
t = o;
}
for (e = 0; e < 5; e++) for (t = 0; t < 5; t++) l[e + 5 * t] = t + (2 * e + 3 * t) % 5 * 5;
for (var n = 1, i = 0; i < 24; i++) {
for (var s = 0, h = 0, p = 0; p < 7; p++) {
if (1 & n) {
var u = (1 << p) - 1;
u < 32 ? h ^= 1 << u : s ^= 1 << u - 32;
}
128 & n ? n = n << 1 ^ 113 : n <<= 1;
}
d[i] = r.create(s, h);
}
})();
var h = [];
(function() {
for (var e = 0; e < 25; e++) h[e] = r.create();
})();
var p = s.SHA3 = i.extend({
cfg: i.cfg.extend({
outputLength: 512
}),
_doReset: function() {
for (var e = this._state = [], t = 0; t < 25; t++) e[t] = new r.init();
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
},
_doProcessBlock: function(e, t) {
for (var a = this._state, o = this.blockSize / 2, n = 0; n < o; n++) {
var i = e[t + 2 * n], r = e[t + 2 * n + 1];
i = 16711935 & (i << 8 | i >>> 24) | 4278255360 & (i << 24 | i >>> 8);
r = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
(k = a[n]).high ^= r;
k.low ^= i;
}
for (var s = 0; s < 24; s++) {
for (var p = 0; p < 5; p++) {
for (var u = 0, f = 0, y = 0; y < 5; y++) {
u ^= (k = a[p + 5 * y]).high;
f ^= k.low;
}
var m = h[p];
m.high = u;
m.low = f;
}
for (p = 0; p < 5; p++) {
var g = h[(p + 4) % 5], v = h[(p + 1) % 5], G = v.high, P = v.low;
for (u = g.high ^ (G << 1 | P >>> 31), f = g.low ^ (P << 1 | G >>> 31), y = 0; y < 5; y++) {
(k = a[p + 5 * y]).high ^= u;
k.low ^= f;
}
}
for (var w = 1; w < 25; w++) {
var M = (k = a[w]).high, A = k.low, b = c[w];
if (b < 32) {
u = M << b | A >>> 32 - b;
f = A << b | M >>> 32 - b;
} else {
u = A << b - 32 | M >>> 64 - b;
f = M << b - 32 | A >>> 64 - b;
}
var S = h[l[w]];
S.high = u;
S.low = f;
}
var D = h[0], T = a[0];
D.high = T.high;
D.low = T.low;
for (p = 0; p < 5; p++) for (y = 0; y < 5; y++) {
var k = a[w = p + 5 * y], I = h[w], C = h[(p + 1) % 5 + 5 * y], x = h[(p + 2) % 5 + 5 * y];
k.high = I.high ^ ~C.high & x.high;
k.low = I.low ^ ~C.low & x.low;
}
k = a[0];
var _ = d[s];
k.high ^= _.high;
k.low ^= _.low;
}
},
_doFinalize: function() {
var e = this._data, a = e.words, o = (this._nDataBytes, 8 * e.sigBytes), i = 32 * this.blockSize;
a[o >>> 5] |= 1 << 24 - o % 32;
a[(t.ceil((o + 1) / i) * i >>> 5) - 1] |= 128;
e.sigBytes = 4 * a.length;
this._process();
for (var r = this._state, s = this.cfg.outputLength / 8, c = s / 8, l = [], d = 0; d < c; d++) {
var h = r[d], p = h.high, u = h.low;
p = 16711935 & (p << 8 | p >>> 24) | 4278255360 & (p << 24 | p >>> 8);
u = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8);
l.push(u);
l.push(p);
}
return new n.init(l, s);
},
clone: function() {
for (var e = i.clone.call(this), t = e._state = this._state.slice(0), a = 0; a < 25; a++) t[a] = t[a].clone();
return e;
}
});
a.SHA3 = i._createHelper(p);
a.HmacSHA3 = i._createHmacHelper(p);
})(Math);
return e.SHA3;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./x64-core")) : "function" == typeof define && define.amd ? define([ "./core", "./x64-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./core": 4,
"./x64-core": 36
} ],
33: [ function(e, t, a) {
this, o = function(e) {
(function() {
var t = e, a = t.x64, o = a.Word, n = a.WordArray, i = t.algo, r = i.SHA512, s = i.SHA384 = r.extend({
_doReset: function() {
this._hash = new n.init([ new o.init(3418070365, 3238371032), new o.init(1654270250, 914150663), new o.init(2438529370, 812702999), new o.init(355462360, 4144912697), new o.init(1731405415, 4290775857), new o.init(2394180231, 1750603025), new o.init(3675008525, 1694076839), new o.init(1203062813, 3204075428) ]);
},
_doFinalize: function() {
var e = r._doFinalize.call(this);
e.sigBytes -= 16;
return e;
}
});
t.SHA384 = r._createHelper(s);
t.HmacSHA384 = r._createHmacHelper(s);
})();
return e.SHA384;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./x64-core"), e("./sha512")) : "function" == typeof define && define.amd ? define([ "./core", "./x64-core", "./sha512" ], o) : o(this.CryptoJS);
var o;
}, {
"./core": 4,
"./sha512": 34,
"./x64-core": 36
} ],
34: [ function(e, t, a) {
this, o = function(e) {
(function() {
var t = e, a = t.lib.Hasher, o = t.x64, n = o.Word, i = o.WordArray, r = t.algo;
function s() {
return n.create.apply(n, arguments);
}
var c = [ s(1116352408, 3609767458), s(1899447441, 602891725), s(3049323471, 3964484399), s(3921009573, 2173295548), s(961987163, 4081628472), s(1508970993, 3053834265), s(2453635748, 2937671579), s(2870763221, 3664609560), s(3624381080, 2734883394), s(310598401, 1164996542), s(607225278, 1323610764), s(1426881987, 3590304994), s(1925078388, 4068182383), s(2162078206, 991336113), s(2614888103, 633803317), s(3248222580, 3479774868), s(3835390401, 2666613458), s(4022224774, 944711139), s(264347078, 2341262773), s(604807628, 2007800933), s(770255983, 1495990901), s(1249150122, 1856431235), s(1555081692, 3175218132), s(1996064986, 2198950837), s(2554220882, 3999719339), s(2821834349, 766784016), s(2952996808, 2566594879), s(3210313671, 3203337956), s(3336571891, 1034457026), s(3584528711, 2466948901), s(113926993, 3758326383), s(338241895, 168717936), s(666307205, 1188179964), s(773529912, 1546045734), s(1294757372, 1522805485), s(1396182291, 2643833823), s(1695183700, 2343527390), s(1986661051, 1014477480), s(2177026350, 1206759142), s(2456956037, 344077627), s(2730485921, 1290863460), s(2820302411, 3158454273), s(3259730800, 3505952657), s(3345764771, 106217008), s(3516065817, 3606008344), s(3600352804, 1432725776), s(4094571909, 1467031594), s(275423344, 851169720), s(430227734, 3100823752), s(506948616, 1363258195), s(659060556, 3750685593), s(883997877, 3785050280), s(958139571, 3318307427), s(1322822218, 3812723403), s(1537002063, 2003034995), s(1747873779, 3602036899), s(1955562222, 1575990012), s(2024104815, 1125592928), s(2227730452, 2716904306), s(2361852424, 442776044), s(2428436474, 593698344), s(2756734187, 3733110249), s(3204031479, 2999351573), s(3329325298, 3815920427), s(3391569614, 3928383900), s(3515267271, 566280711), s(3940187606, 3454069534), s(4118630271, 4000239992), s(116418474, 1914138554), s(174292421, 2731055270), s(289380356, 3203993006), s(460393269, 320620315), s(685471733, 587496836), s(852142971, 1086792851), s(1017036298, 365543100), s(1126000580, 2618297676), s(1288033470, 3409855158), s(1501505948, 4234509866), s(1607167915, 987167468), s(1816402316, 1246189591) ], l = [];
(function() {
for (var e = 0; e < 80; e++) l[e] = s();
})();
var d = r.SHA512 = a.extend({
_doReset: function() {
this._hash = new i.init([ new n.init(1779033703, 4089235720), new n.init(3144134277, 2227873595), new n.init(1013904242, 4271175723), new n.init(2773480762, 1595750129), new n.init(1359893119, 2917565137), new n.init(2600822924, 725511199), new n.init(528734635, 4215389547), new n.init(1541459225, 327033209) ]);
},
_doProcessBlock: function(e, t) {
for (var a = this._hash.words, o = a[0], n = a[1], i = a[2], r = a[3], s = a[4], d = a[5], h = a[6], p = a[7], u = o.high, f = o.low, y = n.high, m = n.low, g = i.high, v = i.low, G = r.high, P = r.low, w = s.high, M = s.low, A = d.high, b = d.low, S = h.high, D = h.low, T = p.high, k = p.low, I = u, C = f, x = y, _ = m, R = g, N = v, E = G, B = P, O = w, L = M, F = A, j = b, H = S, V = D, U = T, W = k, q = 0; q < 80; q++) {
var z, Y, X = l[q];
if (q < 16) {
Y = X.high = 0 | e[t + 2 * q];
z = X.low = 0 | e[t + 2 * q + 1];
} else {
var J = l[q - 15], K = J.high, Q = J.low, Z = (K >>> 1 | Q << 31) ^ (K >>> 8 | Q << 24) ^ K >>> 7, $ = (Q >>> 1 | K << 31) ^ (Q >>> 8 | K << 24) ^ (Q >>> 7 | K << 25), ee = l[q - 2], te = ee.high, ae = ee.low, oe = (te >>> 19 | ae << 13) ^ (te << 3 | ae >>> 29) ^ te >>> 6, ne = (ae >>> 19 | te << 13) ^ (ae << 3 | te >>> 29) ^ (ae >>> 6 | te << 26), ie = l[q - 7], re = ie.high, se = ie.low, ce = l[q - 16], le = ce.high, de = ce.low;
Y = (Y = (Y = Z + re + ((z = $ + se) >>> 0 < $ >>> 0 ? 1 : 0)) + oe + ((z += ne) >>> 0 < ne >>> 0 ? 1 : 0)) + le + ((z += de) >>> 0 < de >>> 0 ? 1 : 0);
X.high = Y;
X.low = z;
}
var he, pe = O & F ^ ~O & H, ue = L & j ^ ~L & V, fe = I & x ^ I & R ^ x & R, ye = C & _ ^ C & N ^ _ & N, me = (I >>> 28 | C << 4) ^ (I << 30 | C >>> 2) ^ (I << 25 | C >>> 7), ge = (C >>> 28 | I << 4) ^ (C << 30 | I >>> 2) ^ (C << 25 | I >>> 7), ve = (O >>> 14 | L << 18) ^ (O >>> 18 | L << 14) ^ (O << 23 | L >>> 9), Ge = (L >>> 14 | O << 18) ^ (L >>> 18 | O << 14) ^ (L << 23 | O >>> 9), Pe = c[q], we = Pe.high, Me = Pe.low, Ae = U + ve + ((he = W + Ge) >>> 0 < W >>> 0 ? 1 : 0), be = ge + ye;
U = H;
W = V;
H = F;
V = j;
F = O;
j = L;
O = E + (Ae = (Ae = (Ae = Ae + pe + ((he += ue) >>> 0 < ue >>> 0 ? 1 : 0)) + we + ((he += Me) >>> 0 < Me >>> 0 ? 1 : 0)) + Y + ((he += z) >>> 0 < z >>> 0 ? 1 : 0)) + ((L = B + he | 0) >>> 0 < B >>> 0 ? 1 : 0) | 0;
E = R;
B = N;
R = x;
N = _;
x = I;
_ = C;
I = Ae + (me + fe + (be >>> 0 < ge >>> 0 ? 1 : 0)) + ((C = he + be | 0) >>> 0 < he >>> 0 ? 1 : 0) | 0;
}
f = o.low = f + C;
o.high = u + I + (f >>> 0 < C >>> 0 ? 1 : 0);
m = n.low = m + _;
n.high = y + x + (m >>> 0 < _ >>> 0 ? 1 : 0);
v = i.low = v + N;
i.high = g + R + (v >>> 0 < N >>> 0 ? 1 : 0);
P = r.low = P + B;
r.high = G + E + (P >>> 0 < B >>> 0 ? 1 : 0);
M = s.low = M + L;
s.high = w + O + (M >>> 0 < L >>> 0 ? 1 : 0);
b = d.low = b + j;
d.high = A + F + (b >>> 0 < j >>> 0 ? 1 : 0);
D = h.low = D + V;
h.high = S + H + (D >>> 0 < V >>> 0 ? 1 : 0);
k = p.low = k + W;
p.high = T + U + (k >>> 0 < W >>> 0 ? 1 : 0);
},
_doFinalize: function() {
var e = this._data, t = e.words, a = 8 * this._nDataBytes, o = 8 * e.sigBytes;
t[o >>> 5] |= 128 << 24 - o % 32;
t[30 + (o + 128 >>> 10 << 5)] = Math.floor(a / 4294967296);
t[31 + (o + 128 >>> 10 << 5)] = a;
e.sigBytes = 4 * t.length;
this._process();
return this._hash.toX32();
},
clone: function() {
var e = a.clone.call(this);
e._hash = this._hash.clone();
return e;
},
blockSize: 32
});
t.SHA512 = a._createHelper(d);
t.HmacSHA512 = a._createHmacHelper(d);
})();
return e.SHA512;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./x64-core")) : "function" == typeof define && define.amd ? define([ "./core", "./x64-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./core": 4,
"./x64-core": 36
} ],
35: [ function(e, t, a) {
this, o = function(e) {
(function() {
var t = e, a = t.lib, o = a.WordArray, n = a.BlockCipher, i = t.algo, r = [ 57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4 ], s = [ 14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32 ], c = [ 1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28 ], l = [ {
0: 8421888,
268435456: 32768,
536870912: 8421378,
805306368: 2,
1073741824: 512,
1342177280: 8421890,
1610612736: 8389122,
1879048192: 8388608,
2147483648: 514,
2415919104: 8389120,
2684354560: 33280,
2952790016: 8421376,
3221225472: 32770,
3489660928: 8388610,
3758096384: 0,
4026531840: 33282,
134217728: 0,
402653184: 8421890,
671088640: 33282,
939524096: 32768,
1207959552: 8421888,
1476395008: 512,
1744830464: 8421378,
2013265920: 2,
2281701376: 8389120,
2550136832: 33280,
2818572288: 8421376,
3087007744: 8389122,
3355443200: 8388610,
3623878656: 32770,
3892314112: 514,
4160749568: 8388608,
1: 32768,
268435457: 2,
536870913: 8421888,
805306369: 8388608,
1073741825: 8421378,
1342177281: 33280,
1610612737: 512,
1879048193: 8389122,
2147483649: 8421890,
2415919105: 8421376,
2684354561: 8388610,
2952790017: 33282,
3221225473: 514,
3489660929: 8389120,
3758096385: 32770,
4026531841: 0,
134217729: 8421890,
402653185: 8421376,
671088641: 8388608,
939524097: 512,
1207959553: 32768,
1476395009: 8388610,
1744830465: 2,
2013265921: 33282,
2281701377: 32770,
2550136833: 8389122,
2818572289: 514,
3087007745: 8421888,
3355443201: 8389120,
3623878657: 0,
3892314113: 33280,
4160749569: 8421378
}, {
0: 1074282512,
16777216: 16384,
33554432: 524288,
50331648: 1074266128,
67108864: 1073741840,
83886080: 1074282496,
100663296: 1073758208,
117440512: 16,
134217728: 540672,
150994944: 1073758224,
167772160: 1073741824,
184549376: 540688,
201326592: 524304,
218103808: 0,
234881024: 16400,
251658240: 1074266112,
8388608: 1073758208,
25165824: 540688,
41943040: 16,
58720256: 1073758224,
75497472: 1074282512,
92274688: 1073741824,
109051904: 524288,
125829120: 1074266128,
142606336: 524304,
159383552: 0,
176160768: 16384,
192937984: 1074266112,
209715200: 1073741840,
226492416: 540672,
243269632: 1074282496,
260046848: 16400,
268435456: 0,
285212672: 1074266128,
301989888: 1073758224,
318767104: 1074282496,
335544320: 1074266112,
352321536: 16,
369098752: 540688,
385875968: 16384,
402653184: 16400,
419430400: 524288,
436207616: 524304,
452984832: 1073741840,
469762048: 540672,
486539264: 1073758208,
503316480: 1073741824,
520093696: 1074282512,
276824064: 540688,
293601280: 524288,
310378496: 1074266112,
327155712: 16384,
343932928: 1073758208,
360710144: 1074282512,
377487360: 16,
394264576: 1073741824,
411041792: 1074282496,
427819008: 1073741840,
444596224: 1073758224,
461373440: 524304,
478150656: 0,
494927872: 16400,
511705088: 1074266128,
528482304: 540672
}, {
0: 260,
1048576: 0,
2097152: 67109120,
3145728: 65796,
4194304: 65540,
5242880: 67108868,
6291456: 67174660,
7340032: 67174400,
8388608: 67108864,
9437184: 67174656,
10485760: 65792,
11534336: 67174404,
12582912: 67109124,
13631488: 65536,
14680064: 4,
15728640: 256,
524288: 67174656,
1572864: 67174404,
2621440: 0,
3670016: 67109120,
4718592: 67108868,
5767168: 65536,
6815744: 65540,
7864320: 260,
8912896: 4,
9961472: 256,
11010048: 67174400,
12058624: 65796,
13107200: 65792,
14155776: 67109124,
15204352: 67174660,
16252928: 67108864,
16777216: 67174656,
17825792: 65540,
18874368: 65536,
19922944: 67109120,
20971520: 256,
22020096: 67174660,
23068672: 67108868,
24117248: 0,
25165824: 67109124,
26214400: 67108864,
27262976: 4,
28311552: 65792,
29360128: 67174400,
30408704: 260,
31457280: 65796,
32505856: 67174404,
17301504: 67108864,
18350080: 260,
19398656: 67174656,
20447232: 0,
21495808: 65540,
22544384: 67109120,
23592960: 256,
24641536: 67174404,
25690112: 65536,
26738688: 67174660,
27787264: 65796,
28835840: 67108868,
29884416: 67109124,
30932992: 67174400,
31981568: 4,
33030144: 65792
}, {
0: 2151682048,
65536: 2147487808,
131072: 4198464,
196608: 2151677952,
262144: 0,
327680: 4198400,
393216: 2147483712,
458752: 4194368,
524288: 2147483648,
589824: 4194304,
655360: 64,
720896: 2147487744,
786432: 2151678016,
851968: 4160,
917504: 4096,
983040: 2151682112,
32768: 2147487808,
98304: 64,
163840: 2151678016,
229376: 2147487744,
294912: 4198400,
360448: 2151682112,
425984: 0,
491520: 2151677952,
557056: 4096,
622592: 2151682048,
688128: 4194304,
753664: 4160,
819200: 2147483648,
884736: 4194368,
950272: 4198464,
1015808: 2147483712,
1048576: 4194368,
1114112: 4198400,
1179648: 2147483712,
1245184: 0,
1310720: 4160,
1376256: 2151678016,
1441792: 2151682048,
1507328: 2147487808,
1572864: 2151682112,
1638400: 2147483648,
1703936: 2151677952,
1769472: 4198464,
1835008: 2147487744,
1900544: 4194304,
1966080: 64,
2031616: 4096,
1081344: 2151677952,
1146880: 2151682112,
1212416: 0,
1277952: 4198400,
1343488: 4194368,
1409024: 2147483648,
1474560: 2147487808,
1540096: 64,
1605632: 2147483712,
1671168: 4096,
1736704: 2147487744,
1802240: 2151678016,
1867776: 4160,
1933312: 2151682048,
1998848: 4194304,
2064384: 4198464
}, {
0: 128,
4096: 17039360,
8192: 262144,
12288: 536870912,
16384: 537133184,
20480: 16777344,
24576: 553648256,
28672: 262272,
32768: 16777216,
36864: 537133056,
40960: 536871040,
45056: 553910400,
49152: 553910272,
53248: 0,
57344: 17039488,
61440: 553648128,
2048: 17039488,
6144: 553648256,
10240: 128,
14336: 17039360,
18432: 262144,
22528: 537133184,
26624: 553910272,
30720: 536870912,
34816: 537133056,
38912: 0,
43008: 553910400,
47104: 16777344,
51200: 536871040,
55296: 553648128,
59392: 16777216,
63488: 262272,
65536: 262144,
69632: 128,
73728: 536870912,
77824: 553648256,
81920: 16777344,
86016: 553910272,
90112: 537133184,
94208: 16777216,
98304: 553910400,
102400: 553648128,
106496: 17039360,
110592: 537133056,
114688: 262272,
118784: 536871040,
122880: 0,
126976: 17039488,
67584: 553648256,
71680: 16777216,
75776: 17039360,
79872: 537133184,
83968: 536870912,
88064: 17039488,
92160: 128,
96256: 553910272,
100352: 262272,
104448: 553910400,
108544: 0,
112640: 553648128,
116736: 16777344,
120832: 262144,
124928: 537133056,
129024: 536871040
}, {
0: 268435464,
256: 8192,
512: 270532608,
768: 270540808,
1024: 268443648,
1280: 2097152,
1536: 2097160,
1792: 268435456,
2048: 0,
2304: 268443656,
2560: 2105344,
2816: 8,
3072: 270532616,
3328: 2105352,
3584: 8200,
3840: 270540800,
128: 270532608,
384: 270540808,
640: 8,
896: 2097152,
1152: 2105352,
1408: 268435464,
1664: 268443648,
1920: 8200,
2176: 2097160,
2432: 8192,
2688: 268443656,
2944: 270532616,
3200: 0,
3456: 270540800,
3712: 2105344,
3968: 268435456,
4096: 268443648,
4352: 270532616,
4608: 270540808,
4864: 8200,
5120: 2097152,
5376: 268435456,
5632: 268435464,
5888: 2105344,
6144: 2105352,
6400: 0,
6656: 8,
6912: 270532608,
7168: 8192,
7424: 268443656,
7680: 270540800,
7936: 2097160,
4224: 8,
4480: 2105344,
4736: 2097152,
4992: 268435464,
5248: 268443648,
5504: 8200,
5760: 270540808,
6016: 270532608,
6272: 270540800,
6528: 270532616,
6784: 8192,
7040: 2105352,
7296: 2097160,
7552: 0,
7808: 268435456,
8064: 268443656
}, {
0: 1048576,
16: 33555457,
32: 1024,
48: 1049601,
64: 34604033,
80: 0,
96: 1,
112: 34603009,
128: 33555456,
144: 1048577,
160: 33554433,
176: 34604032,
192: 34603008,
208: 1025,
224: 1049600,
240: 33554432,
8: 34603009,
24: 0,
40: 33555457,
56: 34604032,
72: 1048576,
88: 33554433,
104: 33554432,
120: 1025,
136: 1049601,
152: 33555456,
168: 34603008,
184: 1048577,
200: 1024,
216: 34604033,
232: 1,
248: 1049600,
256: 33554432,
272: 1048576,
288: 33555457,
304: 34603009,
320: 1048577,
336: 33555456,
352: 34604032,
368: 1049601,
384: 1025,
400: 34604033,
416: 1049600,
432: 1,
448: 0,
464: 34603008,
480: 33554433,
496: 1024,
264: 1049600,
280: 33555457,
296: 34603009,
312: 1,
328: 33554432,
344: 1048576,
360: 1025,
376: 34604032,
392: 33554433,
408: 34603008,
424: 0,
440: 34604033,
456: 1049601,
472: 1024,
488: 33555456,
504: 1048577
}, {
0: 134219808,
1: 131072,
2: 134217728,
3: 32,
4: 131104,
5: 134350880,
6: 134350848,
7: 2048,
8: 134348800,
9: 134219776,
10: 133120,
11: 134348832,
12: 2080,
13: 0,
14: 134217760,
15: 133152,
2147483648: 2048,
2147483649: 134350880,
2147483650: 134219808,
2147483651: 134217728,
2147483652: 134348800,
2147483653: 133120,
2147483654: 133152,
2147483655: 32,
2147483656: 134217760,
2147483657: 2080,
2147483658: 131104,
2147483659: 134350848,
2147483660: 0,
2147483661: 134348832,
2147483662: 134219776,
2147483663: 131072,
16: 133152,
17: 134350848,
18: 32,
19: 2048,
20: 134219776,
21: 134217760,
22: 134348832,
23: 131072,
24: 0,
25: 131104,
26: 134348800,
27: 134219808,
28: 134350880,
29: 133120,
30: 2080,
31: 134217728,
2147483664: 131072,
2147483665: 2048,
2147483666: 134348832,
2147483667: 133152,
2147483668: 32,
2147483669: 134348800,
2147483670: 134217728,
2147483671: 134219808,
2147483672: 134350880,
2147483673: 134217760,
2147483674: 134219776,
2147483675: 0,
2147483676: 133120,
2147483677: 2080,
2147483678: 131104,
2147483679: 134350848
} ], d = [ 4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679 ], h = i.DES = n.extend({
_doReset: function() {
for (var e = this._key.words, t = [], a = 0; a < 56; a++) {
var o = r[a] - 1;
t[a] = e[o >>> 5] >>> 31 - o % 32 & 1;
}
for (var n = this._subKeys = [], i = 0; i < 16; i++) {
var l = n[i] = [], d = c[i];
for (a = 0; a < 24; a++) {
l[a / 6 | 0] |= t[(s[a] - 1 + d) % 28] << 31 - a % 6;
l[4 + (a / 6 | 0)] |= t[28 + (s[a + 24] - 1 + d) % 28] << 31 - a % 6;
}
l[0] = l[0] << 1 | l[0] >>> 31;
for (a = 1; a < 7; a++) l[a] = l[a] >>> 4 * (a - 1) + 3;
l[7] = l[7] << 5 | l[7] >>> 27;
}
var h = this._invSubKeys = [];
for (a = 0; a < 16; a++) h[a] = n[15 - a];
},
encryptBlock: function(e, t) {
this._doCryptBlock(e, t, this._subKeys);
},
decryptBlock: function(e, t) {
this._doCryptBlock(e, t, this._invSubKeys);
},
_doCryptBlock: function(e, t, a) {
this._lBlock = e[t];
this._rBlock = e[t + 1];
p.call(this, 4, 252645135);
p.call(this, 16, 65535);
u.call(this, 2, 858993459);
u.call(this, 8, 16711935);
p.call(this, 1, 1431655765);
for (var o = 0; o < 16; o++) {
for (var n = a[o], i = this._lBlock, r = this._rBlock, s = 0, c = 0; c < 8; c++) s |= l[c][((r ^ n[c]) & d[c]) >>> 0];
this._lBlock = r;
this._rBlock = i ^ s;
}
var h = this._lBlock;
this._lBlock = this._rBlock;
this._rBlock = h;
p.call(this, 1, 1431655765);
u.call(this, 8, 16711935);
u.call(this, 2, 858993459);
p.call(this, 16, 65535);
p.call(this, 4, 252645135);
e[t] = this._lBlock;
e[t + 1] = this._rBlock;
},
keySize: 2,
ivSize: 2,
blockSize: 2
});
function p(e, t) {
var a = (this._lBlock >>> e ^ this._rBlock) & t;
this._rBlock ^= a;
this._lBlock ^= a << e;
}
function u(e, t) {
var a = (this._rBlock >>> e ^ this._lBlock) & t;
this._lBlock ^= a;
this._rBlock ^= a << e;
}
t.DES = n._createHelper(h);
var f = i.TripleDES = n.extend({
_doReset: function() {
var e = this._key.words;
if (2 !== e.length && 4 !== e.length && e.length < 6) throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
var t = e.slice(0, 2), a = e.length < 4 ? e.slice(0, 2) : e.slice(2, 4), n = e.length < 6 ? e.slice(0, 2) : e.slice(4, 6);
this._des1 = h.createEncryptor(o.create(t));
this._des2 = h.createEncryptor(o.create(a));
this._des3 = h.createEncryptor(o.create(n));
},
encryptBlock: function(e, t) {
this._des1.encryptBlock(e, t);
this._des2.decryptBlock(e, t);
this._des3.encryptBlock(e, t);
},
decryptBlock: function(e, t) {
this._des3.decryptBlock(e, t);
this._des2.encryptBlock(e, t);
this._des1.decryptBlock(e, t);
},
keySize: 6,
ivSize: 2,
blockSize: 2
});
t.TripleDES = n._createHelper(f);
})();
return e.TripleDES;
}, "object" == typeof a ? t.exports = a = o(e("./core"), e("./enc-base64"), e("./md5"), e("./evpkdf"), e("./cipher-core")) : "function" == typeof define && define.amd ? define([ "./core", "./enc-base64", "./md5", "./evpkdf", "./cipher-core" ], o) : o(this.CryptoJS);
var o;
}, {
"./cipher-core": 3,
"./core": 4,
"./enc-base64": 5,
"./evpkdf": 8,
"./md5": 13
} ],
36: [ function(e, t, a) {
this, o = function(e) {
a = (t = e).lib, o = a.Base, n = a.WordArray, (i = t.x64 = {}).Word = o.extend({
init: function(e, t) {
this.high = e;
this.low = t;
}
}), i.WordArray = o.extend({
init: function(e, t) {
e = this.words = e || [];
this.sigBytes = null != t ? t : 8 * e.length;
},
toX32: function() {
for (var e = this.words, t = e.length, a = [], o = 0; o < t; o++) {
var i = e[o];
a.push(i.high);
a.push(i.low);
}
return n.create(a, this.sigBytes);
},
clone: function() {
for (var e = o.clone.call(this), t = e.words = this.words.slice(0), a = t.length, n = 0; n < a; n++) t[n] = t[n].clone();
return e;
}
});
var t, a, o, n, i;
return e;
}, "object" == typeof a ? t.exports = a = o(e("./core")) : "function" == typeof define && define.amd ? define([ "./core" ], o) : o(this.CryptoJS);
var o;
}, {
"./core": 4
} ],
37: [ function() {
"use strict";
var e, t, a;
(function(e) {
e.BaseAppProxy = class {
signInGoogle() {
console.log("BaseAppProxy signInGoogle");
}
signInGoogleSilently() {
console.log("BaseAppProxy signInGoogleSilently");
}
signOutGoogle() {
console.log("BaseAppProxy signOutGoogle");
}
saveFile(e) {}
loadSavefile() {}
setNonConsumableProduct(e) {}
getProductDetail(e) {}
requestPayment(e) {}
checkPurchase() {}
fetchRemoteConfig() {}
confirmPurchase(e) {}
getRemoteConfig() {
return new Map();
}
getOrderInfo(e) {
return "";
}
restoreNonConsumablePurchase() {}
};
})(t || (t = {}));
(function(e) {
let t, a, o, n;
(function(e) {
e.SaveLog = "https://log.17tcw.com/collect/pushEvents";
e.SaveRedirect = "https://game.17tcw.com/xyx/statis/reqSaveRedirect";
e.GetNativationConfig = "https://game.17tcw.com/default/redirect/list";
e.GameConfig = "https://game.17tcw.com/default/extra/getNewConfigs";
e.SaveShare = "https://game.17tcw.com/xyx/statis/reqBeginShare";
e.GetShareConfig = "https://game.17tcw.com/xyx/basic/reqFenxiang";
e.GetUUID = "https://game.17tcw.com/game/wechat";
e.GetRewardConfig = "https://game.17tcw.com/default/game/getShareStrategy";
e.GameUrl = "https://game.17tcw.com";
e.GetOpenId = "https://game.17tcw.com/default/login/authorize";
e.UploadClickShare = "https://game.17tcw.com/default/game/clickShare";
})(t = e.Urls || (e.Urls = {}));
(function(e) {
e.Default = "Default";
e.CocosCreator = "CocosCreator";
e.LayaAir = "LayaAir";
})(a = e.EngineType || (e.EngineType = {}));
(function(e) {
e.Default = "Default";
e.Kuaidianwan = "Kuaidianwan";
e.WeChat = "WeChat";
e.QQ = "QQ";
e.OPPO = "OPPO";
e.Vivo = "Vivo";
e.QuTouTiao = "QuTouTiao";
e.QuTouTiaoAndroid = "QuTouTiaoAndroid";
e.ByteDance = "ByteDance";
e.YueYou = "YueYou";
e.KuaiKan = "KuaiKan";
e.BaoQu = "BaoQu";
e.Android = "Android";
e.iOS = "iOS";
e.UCMiniGame = "UCMiniGame";
e.LianShangMiniGame = "LianShangMiniGame";
e.Kwaigame = "Kwaigame";
e.M4399MiniGame = "M4399MiniGame";
e.Hago = "Hago";
})(o = e.Platform || (e.Platform = {}));
(function(e) {
e.None = "";
e.AppStore = "AppStore";
e.AndroidOfficial = "AndroidOfficial";
e.OPPO = "OPPO";
e.M4399 = "M4399";
e.M233 = "M233";
e.HaoYouKuaiBao = "HaoYouKuaiBao";
e.BaMenShenQi = "BaMenShenQi";
e.YingYongBao = "YingYongBao";
e.XiaoMi = "XiaoMi";
e.GooglePlay = "GooglePlay";
e.HuaweiGlobal = "HuaweiGlobal";
e.MomoyuAndroid = "MomoyuAndroid";
})(n = e.DistributionChannel || (e.DistributionChannel = {}));
})(a || (a = {}));
(function(e) {
e.Info = new class {
constructor() {
this.debugLog = !1;
this.isPreview = !1;
this.appId = "";
this.platform = e.Platform.Default;
this.engine = e.EngineType.Default;
this.distributionChannel = e.DistributionChannel.None;
this.channelId = "";
this.channelKey = "";
this.UUID = "";
this.underCheck = !1;
this.resolution = {
width: 0,
height: 0
};
this.sharePath = "";
this.nickname = "";
this.avatar = "";
this.scene = "";
this.sceneWithSourceAppId = "";
this.gameInBackground = !1;
this.pageList = [];
this.shareOption = null;
this.shareTimes = 0;
this.shareTime = 0;
this.withoutRewardVideoAd = !1;
this.version = "1.0.0";
this.videoTopics = [];
this.rewardConfigOriginData = new Map();
this.rewardUserData = {
time: 0,
data: new Map()
};
this.shareData = [ {
id: "",
templateId: "",
title: "",
url: ""
} ];
this.shareFailTips = [ "分享失败，请分享到群" ];
}
}();
})(a || (a = {}));
(function(e) {
window.GA = e;
e.PA = null;
e.init = function(n) {
var r, s, c, l, d, h, p;
console.log("GA3 Version:" + e.version + " buildTime:" + e.buildTime);
if ("" == e.Info.appId) {
e.Info.debugLog = null !== (r = n.debugLog) && void 0 !== r && r;
e.Info.isPreview = n.isPreview;
e.Info.engine = n.engine;
t.isAPP(n.platform) && (n.platform = t.getPlatform());
e.Info.platform = n.platform;
a(n.platform);
if (t.isAPP()) {
n.isPreview || (n.appId = null !== (l = null === (c = null === (s = e.PA.getLaunchOptionsSync()) || void 0 === s ? void 0 : s.query) || void 0 === c ? void 0 : c.appId) && void 0 !== l ? l : e.Info.appId);
e.Info.distributionChannel = null !== (p = null === (h = null === (d = e.PA.getLaunchOptionsSync()) || void 0 === d ? void 0 : d.query) || void 0 === h ? void 0 : h.distributionChannel) && void 0 !== p ? p : e.Info.distributionChannel;
}
return new Promise(a => {
t.setSplashAdEndListener(() => {
o(n);
t.isAPP() ? a(null) : i(t => {
e.Info.underCheck = t == e.Info.UUID;
e.log("Server UUID : ", t, " UnderCheck:", e.Info.underCheck);
a(null);
});
});
});
}
return new Promise((e, t) => {
t("GA has been initialization already.");
});
};
function a(a) {
var o, n, i, r, s, c;
let l = null;
switch (a) {
case e.Platform.Android:
l = t.PROXY;
break;

case e.Platform.WeChat:
l = null !== (o = window.wx) && void 0 !== o ? o : {};
break;

case e.Platform.QQ:
l = null !== (n = window.qq) && void 0 !== n ? n : {};
break;

case e.Platform.iOS:
l = t.PROXY;
break;

case e.Platform.OPPO:
case e.Platform.Vivo:
l = null !== (i = window.qg) && void 0 !== i ? i : {};
break;

case e.Platform.ByteDance:
l = null !== (r = window.tt) && void 0 !== r ? r : {};
break;

case e.Platform.Kwaigame:
l = null !== (s = window.ks) && void 0 !== s ? s : {};
break;

case e.Platform.Kuaidianwan:
l = {};
if (window.GameAssistantWeb) {
console.log("GameAssistantWeb is ok.");
GameAssistantWeb.onGameLoaded();
} else console.log("GameAssistantWeb is not ok.");
break;

case e.Platform.Hago:
l = null !== (c = window.hg) && void 0 !== c ? c : {};
}
e.PA = new e.PAClass();
e.PA.init(l);
}
function o(t) {
var a, o, n, i, s, h, f, y;
e.log("init evn", t);
e.Info.debugLog = null !== (a = t.debugLog) && void 0 !== a && a;
e.Info.isPreview = t.isPreview;
e.Info.appId = t.appId;
e.Info.platform = t.platform;
e.Info.engine = t.engine;
e.Info.channelKey = t.channelKey;
e.Info.UUID = t.uuid;
e.Info.resolution.width = t.resolution.width ? t.resolution.width : 0;
e.Info.resolution.height = t.resolution.height ? t.resolution.height : 0;
e.Info.sharePath = t.sharePath;
e.Info.withoutRewardVideoAd = !!t.withoutRewardVideoAd;
e.Info.version = t.version ? t.version : "1.0.0";
if (!e.isPlatform(e.Platform.M4399MiniGame)) {
try {
let t = null === (o = e.PA.getSystemInfoSync) || void 0 === o ? void 0 : o.call(e.PA);
t.windowWidth / t.windowHeight > e.Info.resolution.width / e.Info.resolution.height ? e.Info.resolution.width = Math.round(t.windowWidth * e.Info.resolution.height / t.windowHeight) : e.Info.resolution.height = Math.round(t.windowHeight * e.Info.resolution.width / t.windowWidth);
} catch (e) {
console.error(e);
}
r();
try {
null === (n = e.PA.setKeepScreenOn) || void 0 === n || n.call(e.PA, {
keepScreenOn: !0
});
e.PA.onShow(() => {
var t, a, o, n, i, r, s, c, h, p, u, f;
e.Info.gameInBackground = !1;
e.Info.lastGameTimeUploadTimestamp = Date.now();
null === (t = e.PA.setKeepScreenOn) || void 0 === t || t.call(e.PA, {
keepScreenOn: !0
});
if (null === (a = e.Info.shareOption) || void 0 === a ? void 0 : a.result) {
e.Info.shareTimes++;
let t = null !== (i = null === (o = e.Info.rewardConfigOriginData) || void 0 === o ? void 0 : o.get(null === (n = e.Info.shareOption) || void 0 === n ? void 0 : n.tag)) && void 0 !== i ? i : null === (r = e.Info.rewardConfigOriginData) || void 0 === r ? void 0 : r.get("SCORE_STRATEGY");
try {
let a = null !== (c = null == t ? void 0 : t.shareSuccessRate[Math.min(e.Info.shareTimes - 1, (null === (s = null == t ? void 0 : t.shareSuccessRate) || void 0 === s ? void 0 : s.length) - 1)]) && void 0 !== c ? c : 0, o = Math.random() < a / 100;
if (!o) {
let a = null !== (p = 1e3 * (null == t ? void 0 : t.shareSuccessTime[Math.min(e.Info.shareTimes - 1, (null === (h = null == t ? void 0 : t.shareSuccessTime) || void 0 === h ? void 0 : h.length) - 1)])) && void 0 !== p ? p : 5e3;
Date.now() - e.Info.shareTime >= a && a >= 0 && (o = !0);
}
try {
e.Info.shareOption.result({
reward: o
});
} catch (e) {}
if (o) {
e.Info.shareTimes = 0;
e.Info.shareOption = null;
} else (null === (f = null === (u = e.Info.shareOption) || void 0 === u ? void 0 : u.showFailTip) || void 0 === f || f) && e.PA.showModal({
title: "提示",
content: d(),
showCancel: !0,
cancelText: "返回游戏",
confirmText: "去分享",
success: t => {
t.cancel ? e.Info.shareOption = null : l(e.Info.shareOption);
}
});
} catch (e) {}
}
});
e.PA.onHide(() => {
e.Info.gameInBackground = !0;
e.Info.openId && p();
u();
});
setInterval(() => {
e.Info.gameInBackground || p();
}, 1e3 * Math.max(null !== (i = t.uploadGameTimeIntervals) && void 0 !== i ? i : 10, 10));
setInterval(() => {
e.Info.pageList.length > 0 && (e.Info.pageList[e.Info.pageList.length - 1].time += 1);
}, 1e3);
null === (s = e.PA.showShareMenu) || void 0 === s || s.call(e.PA, {
menus: [ "shareAppMessage", "shareTimeline" ]
});
null === (h = e.PA.onShareMessageToFriend) || void 0 === h || h.call(e.PA, e => {
console.log("onShareMessageToFriend:", e.success, e.errMsg);
});
let a = (t, a) => {
try {
let o = "", n = {
id: "",
title: "",
url: ""
}, i = {};
if ("video" == (t = null != t ? t : {
channel: ""
}).channel) {
o = `openid=${e.Info.openId}&tm=${Date.now().toFixed()}&${e.Info.channelKey}=10001`;
i = {
videoTopics: e.Info.videoTopics
};
e.sentLog("拍抖音", null, {
"触发点": a
});
} else {
n = e.Info.shareData[e.rand(0, e.Info.shareData.length - 1)];
e.request({
url: e.Urls.SaveShare,
method: "POST",
data: {
Openid: e.Info.openId,
ShareId: n.id,
ShareTm: Date.now().toFixed()
}
});
o = `shareid=${n.id}&openid=${e.Info.openId}&tm=${Date.now().toFixed()}&${e.Info.sharePath}`;
e.sentLog("分享", null, {
"触发点": a
});
}
return {
title: n.title,
imageUrl: n.url,
query: o,
extra: i
};
} catch (o) {
console.error(o);
e.sentLog("分享", null, {
"触发点": a
});
return {
title: "",
imageUrl: "",
query: `openid=${e.Info.openId}&tm=${Date.now().toFixed()}&${"video" == (null == t ? void 0 : t.channel) ? e.Info.channelKey + "=10001" : e.Info.sharePath}`
};
}
};
null === (f = e.PA.onShareAppMessage) || void 0 === f || f.call(e.PA, e => a(e, "顶部分享"));
null === (y = e.PA.onShareTimeline) || void 0 === y || y.call(e.PA, () => a(null, "分享朋友圈"));
} catch (e) {
console.error(e);
}
c();
e.request({
url: e.Urls.GetShareConfig,
data: {
Appid: e.Info.appId,
Type: 0
},
method: "POST",
success: t => {
var a, o;
try {
if ((null === (o = null === (a = null == t ? void 0 : t.data) || void 0 === a ? void 0 : a.data) || void 0 === o ? void 0 : o.length) > 0) {
let a = [];
t.data.data.forEach(e => {
a.push({
id: e.shareid,
title: e.title,
url: e.imageurl
});
});
e.Info.shareData = a;
e.log("ShareContent", e.Info.shareData);
} else e.log("分享内容获取失败:" + JSON.stringify(t));
} catch (e) {}
}
});
}
}
e.ENABLE_NEXT_VERSION = !1;
e.setUserId = function(t) {
var a;
e.Info.uid = t;
null === (a = null === e.PA || void 0 === e.PA ? void 0 : e.PA.setUserId) || void 0 === a || a.call(e.PA, e.Info.uid.toFixed());
e.request({
url: e.Urls.GetRewardConfig,
data: {
appid: e.Info.appId,
userId: e.Info.uid
},
method: "POST",
success: t => {
var a;
0 == (null === (a = null == t ? void 0 : t.data) || void 0 === a ? void 0 : a.code) ? f(t.data.data) : e.error("load reward config error ", t);
}
});
};
function n(t) {
e.Info.openId = t;
e.PA.setStorageSync("LocalOpenId", e.Info.openId);
}
e.setOpenId = n;
function i(t) {
e.isPlatform([ e.Platform.M4399MiniGame, e.Platform.Android, e.Platform.iOS ]) ? t("") : e.request({
url: e.Urls.GetUUID,
method: "POST",
dataType: "其他",
data: {
appid: e.Info.appId
},
success: e => {
try {
t(e.data);
} catch (e) {}
},
fail: () => {
e.PA.showModal({
title: "提示",
content: "网络不稳定，连接服务器失败，请重试",
showCancel: !1,
confirmText: "重试",
success: () => {
i(t);
}
});
}
});
}
function r() {
var t;
try {
let a = e.PA.getLaunchOptionsSync();
if (a.scene) {
e.Info.scene = a.scene + "";
e.Info.sceneWithSourceAppId = a.scene + "";
} else if (a.from && e.isPlatform([ e.Platform.Kwaigame ])) {
e.Info.scene = a.from + "";
e.Info.sceneWithSourceAppId = a.from + "";
}
(null == a ? void 0 : a.query) && a.query[e.Info.channelKey] && (e.Info.channelId = `${e.Info.channelKey}=${a.query[e.Info.channelKey]}`);
if (null == a ? void 0 : a.referrerInfo) {
e.Info.sourceAppid = null !== (t = a.referrerInfo.appId) && void 0 !== t ? t : "";
e.Info.sourceAppid.length > 0 && (e.Info.sceneWithSourceAppId = e.Info.scene + "_" + e.Info.sourceAppid);
}
} catch (e) {
console.error(e);
}
}
function s() {
var t, a;
try {
let o = e.PA.getLaunchOptionsSync();
e.Info.isPreview && (o = JSON.parse('{ "query": { "shareid": 1 ,"openid":"testopenid","tm":0} }'));
(null === (t = null == o ? void 0 : o.query) || void 0 === t ? void 0 : t.shareid) && e.request({
url: e.Urls.UploadClickShare,
data: {
openid: e.Info.openId,
sourceOpenid: o.query.openid,
shareId: parseInt(o.query.shareid),
shareTm: null !== (a = o.query.tm) && void 0 !== a ? a : 0
},
method: "POST",
success: e => {
console.log("UPLOAD click share ", e);
}
});
} catch (e) {
console.error(e);
}
}
e.exit = function() {
e.PA.exitMiniProgram();
};
function c() {
console.log("--------------* GA 基础配置和信息 *--------------");
console.log(`Appid is "${e.Info.appId}"`);
console.log(`Platform is "${e.Info.platform}"`);
console.log(`ChannelKey is "${e.Info.channelKey}"`);
console.log(`ChannelID is "${e.Info.channelId}"`);
console.log(`SharePath is ${e.Info.sharePath}`);
console.log(`UUID is "${e.Info.UUID}"`);
console.log(`GameEngine is ${e.Info.engine}`);
console.log(`Design resolution is ${JSON.stringify(e.Info.resolution)}`);
console.log("--------------* GA 使用域名清单 *---------------");
let t = new Set();
for (let a in e.Urls) {
let o = e.Urls[a].split("/"), n = o[0] + "//" + o[2];
if (!t.has(n)) {
t.add(n);
console.log(n);
}
}
console.log("----------------------------------------------");
}
e.rewardOperation = function(t) {
t.byVideo ? e.Info.withoutRewardVideoAd ? t.result({
reward: !0
}) : e.showVideoAd(t) : l({
tag: t.tag,
page: t.page,
result: a => {
if (null == a ? void 0 : a.reward) {
e.Info.rewardUserData.data.has(t.tag) && e.Info.rewardUserData.data.get(t.tag).currCount++;
t.result({
reward: !0
});
} else t.result({
reward: !1
});
}
});
};
function l(t) {
var a, o, n, i, r, s, c;
e.Info.shareOption = t;
e.Info.shareTime = Date.now();
let l = null;
e.Info.shareData.length > 0 && (l = e.Info.shareData[e.rand(0, e.Info.shareData.length - 1)]);
if (e.Info.isPreview) {
null === (a = e.Info.shareOption) || void 0 === a || a.result({
reward: !0
});
e.Info.shareOption = null;
} else {
e.PA.shareAppMessage({
templateId: null !== (o = l.templateId) && void 0 !== o ? o : "",
title: null !== (n = l.title) && void 0 !== n ? n : "",
imageUrl: null !== (i = l.url) && void 0 !== i ? i : "",
query: `shareid=${null !== (r = l.id) && void 0 !== r ? r : 0}&openid=${e.Info.openId}&tm=${Date.now().toFixed()}&${e.Info.sharePath}${t.query ? "&" : ""}${null !== (s = t.query) && void 0 !== s ? s : ""}`,
success: () => {
console.log("分享接口成功回调，暂不开放");
},
fail: () => {
var t;
null === (t = e.Info.shareOption) || void 0 === t || t.result({
reward: !1
});
}
});
e.request({
url: e.Urls.SaveShare,
method: "POST",
data: {
Openid: e.Info.openId,
ShareId: l.id,
ShareTm: Date.now().toFixed()
}
});
e.sentLog("分享", null, {
"触发点": null !== (c = t.tag) && void 0 !== c ? c : "未知"
});
}
}
e.randomShare = l;
function d() {
var t;
let a = "";
if ((null === (t = null === e.Info || void 0 === e.Info ? void 0 : e.Info.shareFailTips) || void 0 === t ? void 0 : t.length) > 0) {
a = e.Info.shareFailTips.shift();
e.Info.shareFailTips.push(a);
} else a = "分享失败，请分享到新的群";
return a;
}
e.getOpenId = function t(a, o, n) {
var i;
let r = (t, o) => {
e.Info.openId = t;
e.Info.session_key = o;
if (e.Info.openId && "" != e.Info.openId) {
e.sentLogs([ {
eventId: "GotOpenId",
extraNum: 0,
detail: JSON.stringify({
channel: e.Info.channelId,
version: e.Info.version
})
}, {
eventId: "LaunchScene",
extraNum: 0,
detail: JSON.stringify({
scene: e.Info.sceneWithSourceAppId
})
} ]);
s();
}
a(t, o);
};
if (e.Info.isPreview) try {
e.Info.openId = localStorage.getItem("user_id");
if (!e.Info.openId) {
e.Info.openId = `Test${Date.now()}${(1e8 * Math.random()).toFixed()}`;
localStorage.setItem("user_id", e.Info.openId);
}
r(e.Info.openId, "TestSessionKey");
} catch (e) {
console.error(e);
} else if (e.isPlatform(e.Platform.Kuaidianwan)) GameAssistantWeb.login((t, a) => {
e.Info.openId = a;
r(a, "");
}); else {
let s = null !== (i = e.PA.getStorageSync("LocalOpenId")) && void 0 !== i ? i : "";
s && !n && e.isPlatform([ e.Platform.WeChat ]) ? r(s, "") : e.isPlatform(e.Platform.M4399MiniGame) ? window.h5api.isLogin() ? window.h5api.login(t => {
e.Info.uid = parseInt(t.uId);
e.Info.nickname = t.userName;
r(t.uId, "");
}) : r("LocalOpenId", "") : e.PA.login({
force: !1,
success: t => {
console.log(`Platform ${e.Info.platform} login:${JSON.stringify(t)}`);
let a = e.PA.getSystemInfoSync();
if (e.isPlatform(e.Platform.Kwaigame)) r(t.gameUserId, t.gameToken); else {
let n = {};
if (e.isPlatform([ e.Platform.ByteDance ])) n = {
code: t.code,
anonymous_code: t.anonymousCode
}; else if (e.isPlatform([ e.Platform.LianShangMiniGame, e.Platform.Android, e.Platform.iOS ])) n = {
code: t.code
}; else if (e.isPlatform(e.Platform.OPPO)) {
e.Info.nickname = t.nickName;
e.Info.avatar = t.avatar;
e.Info.token = t.token;
n = {
code: t.uid
};
} else if (e.isPlatform(e.Platform.Vivo)) {
e.Info.token = t.code;
n = {
token: t.code
};
} else if (e.isPlatform(e.Platform.Hago)) {
console.log("systemInfo:", JSON.stringify(a));
n = {
code: t.code,
countryCode: a.countryCode
};
} else n = {
js_code: t.code
};
h(o, n, r);
}
},
fail: o => {
console.log(o);
e.PA.showModal({
title: "提示",
content: "获取登录数据失败(平台授权失败)，点击重试",
showCancel: !1,
confirmText: "重试",
success: () => {
t(a);
}
});
}
});
}
};
function h(t, a, o) {
var i;
if (e.isPlatform([ e.Platform.Android, e.Platform.OPPO, e.Platform.iOS ])) try {
o(a.code, "");
} catch (e) {} else {
let r = "";
a.code = null !== (i = a.code) && void 0 !== i ? i : "";
Object.getOwnPropertyNames(a).forEach((e, t) => {
r += `${0 == t ? "?" : "&"}${e}=${a[e]}`;
});
console.log("GetOpenIdUrl:", e.Urls.GetOpenId + r);
e.request({
url: e.Urls.GetOpenId + r,
method: "GET",
success: i => {
var r, s, c, l, d, p, u, f, y, m, g, v, G;
console.log("GetOpenid:", JSON.stringify(i));
(null === (r = null == i ? void 0 : i.data) || void 0 === r ? void 0 : r.openid) ? e.Info.openId = null === (s = null == i ? void 0 : i.data) || void 0 === s ? void 0 : s.openid : (null === (l = null === (c = i.data) || void 0 === c ? void 0 : c.data) || void 0 === l ? void 0 : l.open_id) ? e.Info.openId = null === (p = null === (d = i.data) || void 0 === d ? void 0 : d.data) || void 0 === p ? void 0 : p.open_id : (null === (u = i.data) || void 0 === u ? void 0 : u.anonymous_openid) ? e.Info.openId = null === (f = i.data) || void 0 === f ? void 0 : f.anonymous_openid : (null === (m = null === (y = null == i ? void 0 : i.data) || void 0 === y ? void 0 : y.data) || void 0 === m ? void 0 : m.openId) && (e.Info.openId = i.data.data.openId);
(null === (v = null === (g = null == i ? void 0 : i.data) || void 0 === g ? void 0 : g.data) || void 0 === v ? void 0 : v.nickName) && (e.Info.nickname = i.data.data.nickName);
if ("" != e.Info.openId) {
n(e.Info.openId);
try {
o(e.Info.openId, null === (G = i.data) || void 0 === G ? void 0 : G.session_key);
} catch (e) {}
} else t ? e.PA.showModal({
title: "提示",
content: "获取登录数据失败(数据异常)，点击重试",
showCancel: !1,
confirmText: "重试",
success: () => {
h(t, a, o);
}
}) : o("", "");
},
fail: () => {
t ? e.PA.showModal({
title: "提示",
content: "获取登录数据失败(请求失败)，点击重试",
showCancel: !1,
confirmText: "重试",
success: () => {
h(t, a, o);
}
}) : o("", "");
}
});
}
}
function p() {
if (e.isPlatform(e.Platform.Android) && e.Info.distributionChannel == e.DistributionChannel.GooglePlay) return;
let t = Math.round((Date.now() - e.Info.lastGameTimeUploadTimestamp) / 1e3);
e.sentLog("onlinetime", t, {
scene: e.Info.sceneWithSourceAppId
});
e.Info.lastGameTimeUploadTimestamp = Date.now();
}
function u() {
try {
e.Info.rewardUserData.time = Date.now();
let t = {
time: 0,
data: []
};
t.time = e.Info.rewardUserData.time;
e.Info.rewardUserData.data.forEach((e, a) => {
t.data.push({
tag: a,
currIndex: e.currIndex,
currCount: e.currCount
});
});
e.PA.setStorageSync("RewardUserData", JSON.stringify(t));
} catch (e) {
console.error(e);
}
}
function f(t) {
t.forEach(t => {
e.Info.rewardConfigOriginData.set(t.tag, {
rule: t.rule,
shareSuccessRate: t.shareRate,
shareSuccessTime: t.shareTime
});
});
e.log("RewardConfig ServerData is ", e.Info.rewardConfigOriginData);
y();
}
e.isNextRewardVideo = function(t) {
let a = !0;
try {
if (!e.Info.underCheck) {
let o = e.Info.rewardConfigOriginData.get(t);
(null == o || o.rule.length <= 0) && (o = e.Info.rewardConfigOriginData.get("SCORE_STRATEGY"));
let n = e.Info.rewardUserData.data.get(t);
null == n && (n = e.Info.rewardUserData.data.get("SCORE_STRATEGY"));
for (;n.currCount >= o.rule[n.currIndex].count; ) {
n.currIndex += 1;
n.currCount = 0;
if (n.currIndex >= o.rule.length) {
n.currIndex = 0;
n.currCount = 0;
break;
}
}
a = "video" == o.rule[n.currIndex].type;
}
} catch (e) {
a = !0;
}
return a;
};
function y() {
try {
let t = e.PA.getStorageSync("RewardUserData");
if (!t || "" == t) throw "loadRewardUserData:本地RewardUserData不存在";
try {
let a = JSON.parse(t);
if (!(a.time > e.Info.rewardUserData.time && e.isToday(a.time))) throw "数据已过期";
e.Info.rewardUserData.time = a.time;
e.Info.rewardUserData.data.clear();
if (a.data.length <= 0) throw "数据为空";
a.data.forEach(t => {
e.Info.rewardUserData.data.set(t.tag, {
currIndex: t.currIndex,
currCount: t.currCount
});
});
e.Info.rewardConfigOriginData.forEach((t, a) => {
e.Info.rewardUserData.data.has(a) || e.Info.rewardUserData.data.set(a, {
currIndex: 0,
currCount: 0
});
});
} catch (e) {
throw "loadRewardUserData:本地RewardUserData数据解析失败";
}
} catch (t) {
e.log(t);
e.Info.rewardUserData.time = Date.now();
e.Info.rewardUserData.data.clear();
e.Info.rewardConfigOriginData.forEach((t, a) => {
t.rule.length > 0 && e.Info.rewardUserData.data.set(a, {
currIndex: 0,
currCount: 0
});
});
}
e.log("RewardUserData", e.Info.rewardUserData);
}
e.loadRewardUserLocalData = y;
e.getNavigationList = function(t, a, o) {
return new Promise((n, i) => {
e.request({
url: e.Urls.GetNativationConfig,
method: "POST",
data: {
userId: e.Info.uid,
type: t,
num: a,
excludes: o
},
success: e => {
if (0 == e.data.code) {
let t = [];
e.data.data.forEach(e => {
t.push({
id: e.redirectId,
appid: e.appid,
name: e.name,
is_open_code: !1,
path: e.path,
icon: e.icon,
qr_code: ""
});
});
n(t);
} else i(e);
},
fail: e => {
i(e);
}
});
});
};
e.enterPage = function(t) {
var a, o;
e.Info.pageList.push({
page: t.page,
time: 0
});
"EnterPage", o = {
page: t.page,
existRedirect: t.existRedirect ? 1 : 0,
existVideo: t.existVideo ? 1 : 0,
existBanner: t.existBanner ? 1 : 0,
openType: null !== (a = t.openType) && void 0 !== a ? a : 0
}, e.sentLog("EnterPage", void 0, o);
};
e.closePage = function(t) {
let a = m(t.page);
a && e.sentLog("ClosePage", a.time, {
page: t.page
});
};
function m(t) {
for (let a = 0; a < e.Info.pageList.length; a++) if (e.Info.pageList[a].page == t) {
let t = e.Info.pageList[a];
e.Info.pageList.splice(a, 1);
return t;
}
return null;
}
e.videoRequestEvent = function(t, a) {
t || console.error("pageName is empty!");
let o = [];
a.forEach(e => {
o.push({
eventId: "VideoRequest",
detail: JSON.stringify({
page: t,
type: e
})
});
});
n = o, e.sentLogs(n);
var n;
};
e.clickEvent = function(t, a, o, n) {
if (e.Info.pageList && e.Info.pageList.length > 0) {
t || console.error("pageName is empty!");
let i = a, r = e.Info.pageList[e.Info.pageList.length - 1], s = !1;
if (r.map) {
if (!r.map.get(o)) {
r.map.set(o, 1);
s = !0;
}
} else {
r.map = new Map();
r.map.set(o, 1);
s = !0;
}
let c = "video" == o ? i : null, l = "other" != o ? r.time : 0, d = {
page: t,
eventType: "click",
posType: o,
pos: c,
isFirstClick: s ? 1 : 0
};
n && (d.classify = n);
e.sentLog(a, l, d);
}
};
e.isDefault = function() {
return e.isPlatform(e.Platform.Default);
};
e.isWeChat = function() {
return e.isPlatform(e.Platform.WeChat);
};
e.isQQ = function() {
return e.isPlatform(e.Platform.QQ);
};
e.isOPPO = function() {
return e.isPlatform(e.Platform.OPPO);
};
e.isVivo = function() {
return e.isPlatform(e.Platform.Vivo);
};
e.isKuaiDianWan = function() {
return e.isPlatform(e.Platform.Kuaidianwan);
};
e.isQuTouTiao = function() {
return e.isPlatform(e.Platform.QuTouTiao);
};
e.isQuTouTiaoAndroid = function() {
return e.isPlatform(e.Platform.QuTouTiaoAndroid);
};
e.isByteDance = function() {
return e.isPlatform(e.Platform.ByteDance);
};
e.isYueYou = function() {
return e.isPlatform(e.Platform.YueYou);
};
e.isKuaiKan = function() {
return e.isPlatform(e.Platform.KuaiKan);
};
e.isBaoQu = function() {
return e.isPlatform(e.Platform.BaoQu);
};
e.isAndroid = function() {
return e.isPlatform(e.Platform.Android);
};
e.isiOS = function() {
return e.isPlatform(e.Platform.iOS);
};
e.isUCMiniGame = function() {
return e.isPlatform(e.Platform.UCMiniGame);
};
e.isLianShangMiniGame = function() {
return e.isPlatform(e.Platform.LianShangMiniGame);
};
e.isKwaigame = function() {
return e.isPlatform(e.Platform.Kwaigame);
};
e.isM4399MiniGame = function() {
return e.isPlatform(e.Platform.M4399MiniGame);
};
e.isNative = function() {
return e.isPlatform(e.Platform.iOS) || e.isPlatform(e.Platform.Android);
};
e.isOppoAndroid = function() {
return e.isPlatform(e.Platform.Android) && e.Info.distributionChannel == e.DistributionChannel.OPPO;
};
})(a || (a = {}));
(function(e) {
e.PAClass = class {
constructor() {
this.platformObject = null;
this.launchOptions = null;
this.selfShowToast = null;
}
init(e) {
null == e && console.log("GA PlatformApi init error: platformObject is null");
this.syncUnsupportMethod(e);
this.platformObject = e;
}
syncUnsupportMethod(t) {
try {
let a = [];
if (e.Info.isPreview || e.isPlatform([ e.Platform.Kuaidianwan, e.Platform.M4399MiniGame, e.Platform.Hago ])) a.push("getSetting", "showLoading", "hideLoading", "createUserInfoButton", "getUpdateManager", "onTouchEnd", "onTouchStart", "offTouchStart", "offTouchEnd", "setKeepScreenOn", "showShareMenu", "loadSubpackage", "onShareMessageToFriend", "onShareAppMessage", "saveAppToDesktop", "initGameBannerAd", "addColorSign", "addRecentColorSign", "subscribeAppMsg", "onShareTimeline", "vibrateShort", "vibrateLong"); else if (e.isPlatform([ e.Platform.Android, e.Platform.iOS ])) {
Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(e => {
null == this[e] && (this[e] = (...a) => t[e](...a));
});
Object.getOwnPropertyNames(t).forEach(e => {
null == this[e] && "function" == typeof t[e] && (this[e] = (...a) => t[e](...a));
});
} else if (t) {
a.push("showNativeAd", "hideNativeAd");
for (let e in t) null == this[e] && (this[e] = t[e]);
}
a.forEach(e => {
this[e] = () => {
console.log(`Preview 暂不支持${e}`);
};
});
} catch (e) {
console.error(e);
}
}
addUnsupportMethods(t, a) {
e.isPlatform(t) && a.forEach(e => {
this[e] = () => {
console.log(`${t} 暂不支持${e}`);
};
});
}
onShow(t) {
var a, o;
if (e.isPlatform([ e.Platform.Android, e.Platform.iOS, e.Platform.M4399MiniGame, e.Platform.Hago ]) || e.Info.isPreview) if (e.isEngine(e.EngineType.CocosCreator)) {
(null === (a = cc.game) || void 0 === a ? void 0 : a.EVENT_SHOW) && cc.game.on(cc.game.EVENT_SHOW, t);
(null === (o = cc.Game) || void 0 === o ? void 0 : o.EVENT_SHOW) && cc.game.on(cc.Game.EVENT_SHOW, t);
} else e.log("laya onShow 暂未实现"); else e.isPlatform(e.Platform.Kuaidianwan) ? GameAssistantWeb.onShow(t) : this.platformObject.onShow(t);
}
offShow(t) {
var a, o;
if (e.isPlatform([ e.Platform.Android, e.Platform.iOS ]) || e.Info.isPreview) if (e.isEngine(e.EngineType.CocosCreator)) {
(null === (a = cc.game) || void 0 === a ? void 0 : a.EVENT_SHOW) && cc.game.off(cc.game.EVENT_SHOW, t);
(null === (o = cc.Game) || void 0 === o ? void 0 : o.EVENT_SHOW) && cc.game.off(cc.Game.EVENT_SHOW, t);
} else e.log("laya offShow 暂未实现"); else e.isPlatform(e.Platform.Kuaidianwan) ? GameAssistantWeb.offShow(t) : this.platformObject.offShow(t);
}
onHide(t) {
var a, o;
if (e.isPlatform([ e.Platform.Android, e.Platform.iOS, e.Platform.M4399MiniGame, e.Platform.Hago ]) || e.Info.isPreview) if (e.isEngine(e.EngineType.CocosCreator)) {
(null === (a = cc.game) || void 0 === a ? void 0 : a.EVENT_HIDE) && cc.game.on(cc.game.EVENT_HIDE, t);
(null === (o = cc.Game) || void 0 === o ? void 0 : o.EVENT_HIDE) && cc.game.on(cc.Game.EVENT_HIDE, t);
} else e.log("laya onhide 暂未实现"); else e.isPlatform(e.Platform.Kuaidianwan) ? GameAssistantWeb.onHide(t) : this.platformObject.onHide(t);
}
offHide(t) {
var a, o;
if (e.isPlatform([ e.Platform.Android, e.Platform.iOS ]) || e.Info.isPreview) if (e.isEngine(e.EngineType.CocosCreator)) {
(null === (a = cc.game) || void 0 === a ? void 0 : a.EVENT_HIDE) && cc.game.off(cc.game.EVENT_HIDE, t);
(null === (o = cc.Game) || void 0 === o ? void 0 : o.EVENT_HIDE) && cc.game.off(cc.Game.EVENT_HIDE, t);
} else e.log("laya offHide 暂未实现"); else e.isPlatform(e.Platform.Kuaidianwan) ? GameAssistantWeb.offHide(t) : this.platformObject.offHide(t);
}
getLaunchOptionsSync() {
return e.Info.isPreview || e.isPlatform([ e.Platform.M4399MiniGame, e.Platform.Kuaidianwan, e.Platform.Hago ]) ? {
path: "",
query: {},
referrerInfo: {
appId: "",
extraData: {}
},
scene: 0,
shareTicket: ""
} : this.launchOptions && 0 != Object.keys(this.launchOptions).length ? this.launchOptions : this.launchOptions = this.platformObject.getLaunchOptionsSync();
}
getSystemInfoSync() {
if (null == e.Info.systemInfo) {
e.Info.isPreview || e.isPlatform([ e.Platform.M4399MiniGame, e.Platform.Kuaidianwan ]) ? e.Info.systemInfo = {
SDKVersion: "",
albumAuthorized: !1,
benchmarkLevel: 100,
bluetoothEnabled: !1,
brand: "Browser",
cameraAuthorized: !1,
fontSizeSetting: 0,
language: "zh-cn",
locationAuthorized: !1,
locationEnabled: !1,
microphoneAuthorized: !1,
model: "Browser",
notificationAlertAuthorized: !1,
notificationAuthorized: !1,
notificationBadgeAuthorized: !1,
notificationSoundAuthorized: !1,
pixelRatio: 1,
platform: "Browser",
screenHeight: e.Info.resolution.height,
screenWidth: e.Info.resolution.width,
statusBarHeight: 0,
system: "iOS",
version: "",
wifiEnabled: !1,
windowHeight: e.Info.resolution.height,
windowWidth: e.Info.resolution.width,
designPixelRatio: 1,
appName: "",
safeArea: {
left: 0,
right: 0,
top: 0,
bottom: 0,
width: e.Info.resolution.width,
height: e.Info.resolution.height
}
} : e.Info.systemInfo = this.platformObject.getSystemInfoSync();
e.Info.systemInfo.windowHeight / e.Info.systemInfo.windowWidth < 1.5 ? e.Info.systemInfo.designPixelRatio = e.Info.resolution.height / e.Info.systemInfo.windowHeight : e.Info.systemInfo.designPixelRatio = e.Info.resolution.width / e.Info.systemInfo.windowWidth;
}
return e.Info.systemInfo;
}
exitMiniProgram() {
var t;
try {
(null !== (t = this.platformObject.exitMiniProgram) && void 0 !== t ? t : this.platformObject.exitApplication)();
} catch (t) {
e.error(t);
}
}
loadSubpackage(t) {
if (this.platformObject && this.platformObject.loadSubpackage) return this.platformObject.loadSubpackage(t);
e.UnsupportLog("loadSubpackage");
return null;
}
createRewardedVideoAd(t) {
e.isPlatform(e.Platform.Vivo) && (t.posId = t.adUnitId);
return this.platformObject.createRewardedVideoAd(t);
}
createInterstitialAd(t) {
if (e.isPlatform(e.Platform.OPPO)) return this.platformObject.createInsertAd(t);
if (e.isPlatform(e.Platform.Vivo)) {
t.posId = t.adUnitId;
return this.platformObject.createInterstitialAd(t);
}
return this.platformObject.createInterstitialAd(t);
}
saveAppToDesktop(t) {
e.isPlatform(e.Platform.QQ) && this.platformObject.saveAppToDesktop(t);
}
addColorSign(t) {
e.isPlatform(e.Platform.QQ) && this.platformObject.addColorSign(t);
}
addRecentColorSign(t) {
e.isPlatform(e.Platform.QQ) && this.platformObject.addRecentColorSign(t);
}
isColorSignExistSync() {
return !!e.isPlatform(e.Platform.QQ) && this.platformObject.isColorSignExistSync();
}
getLanguage() {
return this.platformObject.getLanguage ? this.platformObject.getLanguage() : "zh-CN";
}
initGameBannerAd(t, a, o = !0, n) {
if (e.isPlatform(e.Platform.OPPO)) {
let i, r = this.platformObject.getSystemInfoSync().platformVersionCode;
n || (n = {
left: 100 / this.getSystemInfoSync().designPixelRatio,
top: (e.Info.resolution.height - 200) / this.getSystemInfoSync().designPixelRatio,
orientation: "horizontal"
});
r >= 1090 && !o && a ? i = this.platformObject.createGameBannerAd({
adUnitId: a,
style: n
}) : r >= 1076 && (i = this.platformObject.createGameBannerAd({
adUnitId: t
}));
return i;
}
}
showInterstitialAd() {
e.isPlatform(e.Platform.Android) ? this.platformObject.showInterstitialAd() : e.isPlatform(e.Platform.iOS) && this.platformObject.showInterstitialAd();
}
setShowToast(e) {
this.selfShowToast = e;
}
showToast(t) {
e.Info.isPreview || e.isPlatform([ e.Platform.M4399MiniGame, e.Platform.Hago ]) ? e.log("showToast:", t.title) : this.selfShowToast ? this.selfShowToast(t) : e.isPlatform(e.Platform.Vivo) ? this.platformObject.showToast({
message: t.title,
duration: t.duration
}) : e.isPlatform(e.Platform.Kuaidianwan) ? GameAssistantWeb.showToast(t.title) : this.platformObject.showToast(t);
}
showModal(t) {
var a, o;
if (e.Info.isPreview || e.isPlatform([ e.Platform.M4399MiniGame, e.Platform.Hago ])) {
e.log("showModal:" + t.content);
t.success({
confirm: !1 === t.showCancel,
cancel: 0 != t.showCancel
});
} else {
if (e.isPlatform(e.Platform.Vivo)) {
let e = [];
e.push({
text: null !== (a = t.confirmText) && void 0 !== a ? a : "确定",
color: t.confirmColor
});
t.showCancel && e.push({
text: null !== (o = t.cancelText) && void 0 !== o ? o : "取消",
color: t.cancelColor
});
return this.platformObject.showDialog({
title: t.title,
message: t.content,
buttons: e,
success: e => {
0 == e.index ? t.success({
confirm: !0,
cancel: !1
}) : 1 == e.index ? t.success({
confirm: !1,
cancel: !0
}) : t.success({
confirm: !1,
cancel: !1
});
},
cancel: t.fail,
complete: t.complete
});
}
if (!e.isPlatform(e.Platform.Kuaidianwan)) return this.platformObject.showModal(t);
GameAssistantWeb.showModal(t.title, t.content, t.confirmText, t.cancelText, (e, a) => {
t.success({
confirm: e,
cancel: a
});
});
}
}
showLoading(t) {
if (!e.isPlatform(e.Platform.Vivo)) return this.platformObject.showLoading(t);
this.platformObject.showLoading({
message: t.title,
success: t.success,
cancel: t.fail,
complete: t.complete
});
}
getMenuButtonBoundingClientRect() {
var t;
return e.isPlatform(e.Platform.OPPO) ? {
top: this.getSystemInfoSync().statusBarHeight,
left: 0,
right: 0,
bottom: 0,
width: 0,
height: 0
} : (null === (t = this.platformObject) || void 0 === t ? void 0 : t.getMenuButtonBoundingClientRect) ? this.platformObject.getMenuButtonBoundingClientRect() : {
top: 0,
left: 0,
right: 0,
bottom: 0,
width: 0,
height: 0
};
}
shareAppMessage(t) {
if (e.isPlatform(e.Platform.Vivo)) return this.platformObject.share({
success: t.success,
fail: t.fail,
cancel: t.fail
});
t.extra && (t.extra.hashtag_list && null == t.extra.videoTopics ? t.extra.videoTopics = t.extra.hashtag_list : t.extra.videoTopics && null == t.extra.hashtag_list && (t.extra.hashtag_list = t.extra.videoTopics));
return this.platformObject.shareAppMessage(t);
}
setStorageSync(t, a) {
e.isPlatform(e.Platform.Vivo) ? this.platformObject.setStorageSync({
key: t,
value: a
}) : e.isPlatform(e.Platform.OPPO) ? localStorage.setItem(t, a) : e.isPlatform([ e.Platform.Android, e.Platform.iOS, e.Platform.M4399MiniGame, e.Platform.Hago ]) || e.Info.isPreview ? e.isEngine(e.EngineType.CocosCreator) ? cc.sys.localStorage.setItem(t, a) : e.isEngine(e.EngineType.LayaAir) && localStorage.setItem(t, a) : e.isPlatform(e.Platform.Kuaidianwan) ? GameAssistantWeb.setStorage(t, a) : this.platformObject.setStorageSync(t, a);
}
setStorage(t) {
var a;
if (e.isPlatform(e.Platform.Vivo)) return this.platformObject.setStorage({
key: t.key,
value: t.data,
success: t.success,
fail: t.fail,
complete: t.complete
});
if (e.isPlatform([ e.Platform.Android, e.Platform.iOS, e.Platform.M4399MiniGame, e.Platform.Hago ]) || e.Info.isPreview) {
if (e.isEngine(e.EngineType.CocosCreator)) {
cc.sys.localStorage.setItem(t.key, t.data);
try {
t.success();
} catch (e) {}
} else if (e.isEngine(e.EngineType.LayaAir)) {
localStorage.setItem(t.key, t.data);
try {
t.success();
} catch (e) {}
}
} else {
if (!e.isPlatform(e.Platform.Kuaidianwan)) return this.platformObject.setStorage(t);
GameAssistantWeb.setStorage(t.key, t.data);
null === (a = t.success) || void 0 === a || a.call(t);
}
}
removeStorageSync(t) {
if (e.isPlatform(e.Platform.Vivo)) return this.platformObject.deleteStorageSync({
key: t
});
if (e.isPlatform([ e.Platform.Android, e.Platform.iOS, e.Platform.M4399MiniGame, e.Platform.Hago ]) || e.Info.isPreview) e.isEngine(e.EngineType.CocosCreator) ? cc.sys.localStorage.removeItem(t) : e.isEngine(e.EngineType.LayaAir) && localStorage.removeItem(t); else {
if (!e.isPlatform(e.Platform.Kuaidianwan)) return this.platformObject.removeStorageSync(t);
GameAssistantWeb.removeStorage(t);
}
}
removeStorage(t) {
var a;
if (e.isPlatform(e.Platform.Vivo)) return this.platformObject.deleteStorage(t);
if (e.isPlatform([ e.Platform.Android, e.Platform.iOS, e.Platform.M4399MiniGame, e.Platform.Hago ]) || e.Info.isPreview) {
if (e.isEngine(e.EngineType.CocosCreator)) {
cc.sys.localStorage.removeItem(t.key);
try {
t.success();
} catch (e) {}
} else if (e.isEngine(e.EngineType.LayaAir)) {
localStorage.removeItem(t.key);
try {
t.success();
} catch (e) {}
}
} else {
if (!e.isPlatform(e.Platform.Kuaidianwan)) return this.platformObject.removeStorage(t);
GameAssistantWeb.removeStorage(t.key);
null === (a = t.success) || void 0 === a || a.call(t);
}
}
getStorageSync(t) {
return e.isPlatform(e.Platform.Vivo) ? this.platformObject.getStorageSync({
key: t
}) : e.isPlatform(e.Platform.OPPO) ? localStorage.getItem(t) : e.isPlatform([ e.Platform.Android, e.Platform.iOS, e.Platform.M4399MiniGame, e.Platform.Hago ]) || e.Info.isPreview ? e.isEngine(e.EngineType.CocosCreator) ? cc.sys.localStorage.getItem(t) : e.isEngine(e.EngineType.LayaAir) ? localStorage.getItem(t) : void 0 : e.isPlatform(e.Platform.Kuaidianwan) ? GameAssistantWeb.getStorage(t) : e.isPlatform(e.Platform.Hago) ? null : this.platformObject.getStorageSync(t);
}
getStorage(t) {
var a;
if (this.platformObject.getStorage) return this.platformObject.getStorage(t);
if (e.isPlatform([ e.Platform.Android, e.Platform.iOS, e.Platform.M4399MiniGame, e.Platform.Hago ]) || e.Info.isPreview) {
if (e.isEngine(e.EngineType.CocosCreator)) try {
t.success(cc.sys.localStorage.getItem(t.key));
} catch (e) {} else if (e.isEngine(e.EngineType.LayaAir)) try {
t.success(localStorage.getItem(t.key));
} catch (e) {}
} else if (e.isPlatform(e.Platform.Kuaidianwan)) null === (a = t.success) || void 0 === a || a.call(t, GameAssistantWeb.getStorage(t.key)); else try {
t.success("");
} catch (e) {}
}
navigateToMiniProgram(e) {
var t, a;
e.pkgName = null !== (t = e.pkgName) && void 0 !== t ? t : e.appId;
(null !== (a = this.platformObject.navigateToMiniGame) && void 0 !== a ? a : this.platformObject.navigateToMiniProgram)(e);
}
getUserInfo(t) {
return e.isPlatform(e.Platform.Vivo) ? this.platformObject.getUserInfo({
success: e => {
try {
t.success({
userInfo: {
nickName: e.data.nickName,
avatarUrl: e.data.biggerAvatar,
gender: 1 == e.data.gender ? "1" : 2 == e.data.gender ? "2" : "0",
country: "",
province: "",
city: "",
language: "zh_CN"
},
rawData: "",
signature: "",
encryptedData: "",
iv: "",
cloudID: ""
});
} catch (e) {
console.error(e);
}
},
fail: t.fail
}) : this.platformObject.getUserInfo(t);
}
login(t) {
return e.isPlatform(e.Platform.Vivo) ? this.platformObject.login({
success: e => {
try {
t.success({
code: e.data.token
});
} catch (e) {
console.error(e);
}
},
fail: t.fail
}) : e.isPlatform(e.Platform.QuTouTiao) ? this.platformObject.qttlogin(t) : this.platformObject.login(t);
}
checkIsUserAdvisedToRest(t) {
e.isPlatform(e.Platform.WeChat) && this.platformObject.checkIsUserAdvisedToRest({
todayPlayedTime: t,
success: e => {
e.result && this.showModal({
title: "防沉迷提示",
content: "你今日的游戏在线时长已达上限，或当前时段为未成年登陆限制时间段，您将无法继续游戏。",
showCancel: !1,
confirmText: "退出游戏",
success: () => {
this.exitMiniProgram();
}
});
}
});
}
setOrientation(t) {
e.isPlatform(e.Platform.YueYou) && Yzsdk.setOrientation(t);
}
setFullScreen(t) {
e.isPlatform(e.Platform.YueYou) && Yzsdk.setFullScreen(t);
}
initYueYou() {
e.isPlatform(e.Platform.YueYou) && Yzsdk.init();
}
getAuthCode(t, a, o) {
e.isPlatform(e.Platform.YueYou) && Yzsdk.getAuthCode(t, a, o);
}
openGameAd(t, a, o, n, i, r) {
e.isPlatform(e.Platform.YueYou) && Yzsdk.openGameAd(t, a, o, n, i, r);
}
addViewStateListener(t) {
e.isPlatform(e.Platform.YueYou) && Yzsdk.addViewStateListener(t);
}
removeViewStateListener() {
e.isPlatform(e.Platform.YueYou) && Yzsdk.removeViewStateListener();
}
screenWidth() {
return e.isPlatform(e.Platform.YueYou) ? Yzsdk.screenWidth() : 0;
}
screenHeight() {
return e.isPlatform(e.Platform.YueYou) ? Yzsdk.screenHeight() : 0;
}
joinVoIPChat(t) {
e.isPlatform(e.Platform.WeChat) && (null === wx || void 0 === wx ? void 0 : wx.joinVoIPChat) ? wx.joinVoIPChat(t) : e.isPlatform(e.Platform.OPPO) && (null === qg || void 0 === qg ? void 0 : qg.joinVoIPChat) && qg.joinVoIPChat(t);
}
exitVoIPChat(t) {
e.isPlatform(e.Platform.WeChat) && (null === wx || void 0 === wx ? void 0 : wx.exitVoIPChat) ? wx.exitVoIPChat(t) : e.isPlatform(e.Platform.OPPO) && (null === qg || void 0 === qg ? void 0 : qg.exitVoIPChat) && qg.exitVoIPChat(t);
}
updateVoIPChatMuteConfig(t) {
e.isPlatform(e.Platform.WeChat) && (null === wx || void 0 === wx ? void 0 : wx.updateVoIPChatMuteConfig) ? wx.updateVoIPChatMuteConfig(t) : e.isPlatform(e.Platform.OPPO) && (null === qg || void 0 === qg ? void 0 : qg.updateVoIPChatMuteConfig) && qg.updateVoIPChatMuteConfig(t);
}
onVoIPChatSpeakersChanged(t) {
e.isPlatform(e.Platform.WeChat) && (null === wx || void 0 === wx ? void 0 : wx.onVoIPChatSpeakersChanged) ? wx.onVoIPChatSpeakersChanged(t) : e.isPlatform(e.Platform.OPPO) && (null === qg || void 0 === qg ? void 0 : qg.onVoIPChatSpeakersChanged) && qg.onVoIPChatSpeakersChanged(t);
}
onVoIPChatMembersChanged(t) {
e.isPlatform(e.Platform.WeChat) && (null === wx || void 0 === wx ? void 0 : wx.onVoIPChatMembersChanged) ? wx.onVoIPChatMembersChanged(t) : e.isPlatform(e.Platform.OPPO) && (null === qg || void 0 === qg ? void 0 : qg.onVoIPChatMembersChanged) && qg.onVoIPChatMembersChanged(t);
}
onVoIPChatInterrupted(t) {
e.isPlatform(e.Platform.WeChat) && (null === wx || void 0 === wx ? void 0 : wx.onVoIPChatInterrupted) ? wx.onVoIPChatInterrupted(t) : e.isPlatform(e.Platform.OPPO) && (null === qg || void 0 === qg ? void 0 : qg.onVoIPChatInterrupted) && qg.onVoIPChatInterrupted(t);
}
offVoIPChatSpeakersChanged(t) {
e.isPlatform(e.Platform.WeChat) && (null === wx || void 0 === wx ? void 0 : wx.offVoIPChatSpeakersChanged) ? wx.offVoIPChatSpeakersChanged(t) : e.isPlatform(e.Platform.OPPO) && (null === qg || void 0 === qg ? void 0 : qg.offVoIPChatSpeakersChanged) && qg.offVoIPChatSpeakersChanged(t);
}
offVoIPChatMembersChanged(t) {
e.isPlatform(e.Platform.WeChat) && (null === wx || void 0 === wx ? void 0 : wx.offVoIPChatMembersChanged) ? wx.offVoIPChatMembersChanged(t) : e.isPlatform(e.Platform.OPPO) && (null === qg || void 0 === qg ? void 0 : qg.offVoIPChatMembersChanged) && qg.offVoIPChatMembersChanged(t);
}
offVoIPChatInterrupted(t) {
e.isPlatform(e.Platform.WeChat) && (null === wx || void 0 === wx ? void 0 : wx.offVoIPChatInterrupted) ? wx.offVoIPChatInterrupted(t) : e.isPlatform(e.Platform.OPPO) && (null === qg || void 0 === qg ? void 0 : qg.offVoIPChatInterrupted) && qg.offVoIPChatInterrupted(t);
}
isRewardVideoAdReady() {
return !!e.isPlatform([ e.Platform.iOS, e.Platform.Android ]) && this.platformObject.isRewardVideoAdReady();
}
};
})(a || (a = {}));
(function(e) {
class t {
constructor(e) {
this.seed = e;
this.seed || 0 == this.seed || (this.seed = new Date().getTime());
}
get value() {
return this.range(0, 1);
}
range(e, t) {
if (e >= t) return e;
this.seed || 0 == this.seed || (this.seed = new Date().getTime());
t = t || 1;
e = e || 0;
this.seed = (9301 * this.seed + 49297) % 233280;
return e + this.seed / 233280 * (t - e);
}
rangeInt(e, t) {
if (e >= t) return e;
if (t - e >= 233280) return 0;
this.seed || 0 == this.seed || (this.seed = new Date().getTime());
t = t || 1;
e = e || 0;
this.seed = (9301 * this.seed + 49297) % 233280;
var a = this.seed / 233280;
return e + Math.floor(a * (t - e + .9));
}
static get internalInstance() {
null == this._internalInstance && (this._internalInstance = new t());
return this._internalInstance;
}
static get value() {
return this.internalInstance.range(0, 1);
}
static range(e, t) {
return this.internalInstance.range(e, t);
}
static rangeInt(e, t) {
return this.internalInstance.rangeInt(e, t);
}
}
t._internalInstance = null;
e.Random = t;
})(a || (a = {}));
(function(e) {
function a(t) {
return t instanceof Array ? t.indexOf(e.Info.platform) >= 0 : e.Info.platform == t;
}
e.isPlatform = a;
function o(t) {
return t instanceof Array ? t.indexOf(e.Info.distributionChannel) >= 0 : e.Info.distributionChannel == t;
}
e.isDistributionChannel = o;
function n(t) {
return t instanceof Array ? t.indexOf(e.Info.engine) >= 0 : e.Info.engine == t;
}
e.isEngine = n;
function i(...t) {
e.Info.debugLog && (n(e.EngineType.LayaAir) && a([ e.Platform.iOS, e.Platform.Android ]) ? console.log("GA:" + t.join(",")) : console.log("GA:", ...t));
}
e.log = i;
function r(...t) {
n(e.EngineType.LayaAir) && a([ e.Platform.iOS, e.Platform.Android ]) ? console.warn("GA:" + t.join(",")) : console.warn("GA:", ...t);
}
e.warn = r;
e.error = function(...t) {
n(e.EngineType.LayaAir) && a([ e.Platform.iOS, e.Platform.Android ]) ? console.error("GA:" + t.join(",")) : console.error("GA:", ...t);
};
e.UnsupportLog = function(t) {
r("当前平台 " + e.Info.platform + " 暂不支持 " + t);
};
function s(t) {
if (!a(e.Platform.M4399MiniGame) && !o(e.DistributionChannel.GooglePlay)) {
if (e.PA && e.PA.request && !a([ e.Platform.Vivo, e.Platform.Hago ])) {
t.header = {
appid: e.Info.appId
};
return e.PA.request(t);
}
{
let o = new XMLHttpRequest();
o.onreadystatechange = function() {
if (4 == o.readyState) {
let e = o.responseText, a = {
data: "",
statusCode: o.status,
header: {},
errMsg: o.getAllResponseHeaders()
};
try {
let t = JSON.parse(e);
a.data = t;
} catch (e) {
a.data = o.responseText;
}
if (o.status >= 200 && o.status < 400) "function" == typeof t.success && t.success(a); else {
r(`request fail with url : "${t.url}"`);
"function" == typeof t.fail && t.fail(a);
}
}
};
o.onerror = function() {
t.fail && t.fail({
errMsg: "request onerror"
});
};
o.onabort = function() {
t.fail && t.fail({
errMsg: "request onabort"
});
};
"undefined" == typeof t.method && (t.method = "GET");
o.open(t.method, t.url, !0);
a(e.Platform.Hago) ? o.setRequestHeader("Content-Type", "application/json;charset=utf-8") : o.setRequestHeader("Content-type", "application/json;charset=utf-8");
o.setRequestHeader("appid", e.Info.appId);
"undefined" == typeof t.data ? o.send() : o.send(JSON.stringify(t.data));
}
}
}
e.request = s;
function c(o, n) {
"onlinetime" != o[0].eventId && i("sentLogs:" + JSON.stringify(o));
o.forEach(e => {
if (null != e.extraNum) try {
let t = null != e.detail ? JSON.parse(e.detail) : {};
t.extraNum = e.extraNum;
e.detail = JSON.stringify(t);
} catch (e) {}
});
e.request({
url: e.Urls.SaveLog,
data: {
appid: e.Info.appId,
uuid: e.Info.openId,
list: o,
channel: e.Info.channelId,
device: e.PA.getSystemInfoSync().model
},
method: "POST",
success: () => {
try {
n();
} catch (e) {}
}
});
(a([ e.Platform.Android ]) || a(e.Platform.iOS)) && o.forEach(e => {
var a;
if ("onlinetime" != e.eventId) try {
t.PROXY.sendEvent(e.eventId, null !== (a = e.detail) && void 0 !== a ? a : "{}");
} catch (e) {
console.error(e);
}
});
}
e.sentLogs = c;
e.sentLog = function(e, t, a, o) {
c([ {
eventId: e,
detail: a ? JSON.stringify(a) : "",
extraNum: t || 0
} ], o);
};
e.betweenNum = function(e, t, a) {
return Math.min(a, Math.max(t, e));
};
e.isiPhoneX = function() {
let t = e.PA.getSystemInfoSync().model;
return -1 != t.indexOf("iPhone X") || -1 != t.indexOf("iPhone12") || -1 != t.indexOf("iPhone13");
};
e.isLongScreen = function() {
let t = e.PA.getSystemInfoSync();
return t.windowHeight > t.windowWidth ? t.windowHeight / t.windowWidth > 1.8 : t.windowWidth / t.windowHeight > 1.8;
};
e.isPad = function() {
let t = e.PA.getSystemInfoSync();
return t.windowHeight > t.windowWidth ? t.windowHeight / t.windowWidth < 1.55 : t.windowWidth / t.windowHeight < 1.55;
};
e.isiPad = function() {
return -1 != e.PA.getSystemInfoSync().model.indexOf("iPad");
};
e.isToday = function(e) {
return Math.floor(e / 864e5) == Math.floor(Date.now() / 864e5);
};
e.formatNumber = function(e) {
if (e < 1e4) return e.toFixed();
if (e < 1e6) return (e / 1e3).toFixed(1) + "K";
if (e < 1e9) return (e / 1e3 / 1e3).toFixed(1) + "M";
if (e < 1e12) return (e / 1e3 / 1e3 / 1e3).toFixed(1) + "B";
if (e < 1e15) return (e / 1e3 / 1e3 / 1e3 / 1e3).toFixed(1) + "T";
{
let t = Math.round(e).toString(), a = t.indexOf("e+");
if (a > 0) {
let e = t.substr(a + 2);
return t.substr(0, 4) + "E" + e;
}
{
let t = Math.round(e).toString().length - 1;
return (e / Math.pow(10, t)).toFixed(1) + "E" + t;
}
}
};
e.formatTime = function(e) {
let t = Math.floor(e / 3600), a = Math.floor((e - 3600 * t) / 60), o = Math.floor(e % 60), n = "";
t > 0 && (n = (t < 10 ? "0" : "") + t.toFixed() + ":");
return n + (a < 10 ? "0" : "") + a.toFixed() + ":" + (o < 10 ? "0" : "") + o.toFixed();
};
e.rand = function(e, t) {
let a = Math.floor(e + Math.random() * (t - e + 1));
a = Math.min(a, t);
return Math.max(a, e);
};
e.randFloat = function(e, t) {
return e + Math.random() * (t - e);
};
e.saveRedirect = function(t, a, o) {
let n = {
Openid: e.Info.openId,
Channel: e.Info.channelId,
Appid: e.Info.appId,
Type: t,
TargetAppid: "",
Path: ""
};
if ("string" == typeof a) {
n.TargetAppid = a;
n.Path = o;
} else {
n.TargetAppid = a.appid;
n.Path = a.path;
s({
url: e.Urls.SaveRedirect,
data: {
userId: e.Info.uid,
redirectId: a.id
},
method: "POST",
success: () => {}
});
}
s({
url: e.Urls.SaveRedirect,
data: n,
method: "POST",
success: () => {
console.log("Navigate to ", n);
}
});
};
e.loadServerConfig = function() {
return new Promise((t, a) => {
e.request({
url: e.Urls.GameConfig + "?userId=" + e.Info.uid,
method: "POST",
data: [],
success: e => {
var o;
0 == (null === (o = null == e ? void 0 : e.data) || void 0 === o ? void 0 : o.code) ? t(e.data.data) : a(e.data);
},
fail: e => {
a(e);
}
});
});
};
})(a || (a = {}));
(function(e) {
e.version = "1.0.40";
e.buildTime = "2022/1/17下午5:40:24";
})(a || (a = {}));
(function(e) {
let t;
(function(e) {
e[e.Invalid = 0] = "Invalid";
e[e.Loaded = 1] = "Loaded";
e[e.Error = 2] = "Error";
e[e.Shown = 3] = "Shown";
e[e.Hidden = 4] = "Hidden";
})(t || (t = {}));
var a = new class {
constructor() {
this.initOptions = new Map();
this.showOptions = new Map();
this.ads = new Map();
this.status = new Map();
this.showCount = new Map();
this.sizes = new Map();
this.tryShowCount = 0;
}
initBannerAd(a) {
var o;
let n, i = null !== (o = null == (n = Array.isArray(a) ? a[0] : a) ? void 0 : n.adTag) && void 0 !== o ? o : "Banner";
this.initOptions.set(i, n);
this.status.set(i, t.Invalid);
let r, s = e.PA.getSystemInfoSync(), c = 0;
c = e.isPlatform([ e.Platform.WeChat ]) ? s.screenWidth > s.screenHeight ? 300 / s.designPixelRatio : s.screenWidth : Math.min(s.screenWidth, s.screenHeight);
r = e.isPlatform([ e.Platform.Vivo ]) ? {
posId: n.adId,
adIntervals: null == n ? void 0 : n.adIntervals,
style: {
left: 0,
top: (e.Info.resolution.height - 100) / e.PA.getSystemInfoSync().designPixelRatio
}
} : {
adUnitId: n.adId,
adIntervals: null == n ? void 0 : n.adIntervals,
style: {
left: 0,
top: 0,
width: c
}
};
let l = e.PA.createBannerAd(r);
this.ads.set(i, l);
l.onLoad(() => {
this.status.set(i, t.Loaded);
});
l.onError(a => {
this.status.set(i, t.Error);
e.warn("banner onError:", a);
});
e.isPlatform([ e.Platform.Vivo ]) || l.onResize(e => {
this.sizes.set(i, {
width: e.width,
height: e.height
});
this.updateBannerPosition(i);
});
}
tryInitBannerAd(a) {
var o, n, i;
let r = null !== (o = a.initOption.adTag) && void 0 !== o ? o : "Banner";
this.status.set(r, t.Invalid);
let s, c = e.PA.getSystemInfoSync(), l = 0;
l = e.isPlatform([ e.Platform.WeChat ]) ? c.screenWidth > c.screenHeight ? 300 / c.designPixelRatio : c.screenWidth : Math.min(c.screenWidth, c.screenHeight);
s = e.isPlatform([ e.Platform.Vivo ]) ? {
posId: a.initOption.adId,
adIntervals: null === (n = a.initOption) || void 0 === n ? void 0 : n.adIntervals,
style: {
left: 0,
top: (e.Info.resolution.height - 100) / e.PA.getSystemInfoSync().designPixelRatio
}
} : {
adUnitId: a.initOption.adId,
adIntervals: null === (i = a.initOption) || void 0 === i ? void 0 : i.adIntervals,
style: {
left: 0,
top: 0,
width: l
}
};
let d = e.PA.createBannerAd(s);
this.ads.set(r, d);
d.onLoad(() => {
this.status.set(r, t.Loaded);
a.success();
});
d.onError(a => {
this.status.set(r, t.Error);
e.warn("banner onError:", a);
});
e.isPlatform([ e.Platform.Vivo ]) || d.onResize(e => {
this.sizes.set(r, {
width: e.width,
height: e.height
});
this.updateBannerPosition(r);
});
}
updateBannerPosition(t) {
var a, o;
if (e.isPlatform([ e.Platform.Vivo ])) return;
let n = this.showOptions.get(t), i = this.ads.get(t), r = this.sizes.get(t);
if (!i || !r) return;
let s = e.PA.getSystemInfoSync(), c = 0, l = 0;
c = null != (null === (a = null == n ? void 0 : n.style) || void 0 === a ? void 0 : a.offsetX) ? n.style.offsetX : (s.windowWidth - r.width) / 2;
l = null != (null === (o = null == n ? void 0 : n.style) || void 0 === o ? void 0 : o.offsetY) ? s.windowHeight - r.height - n.style.offsetY : s.windowHeight - r.height;
i.style.left = c;
i.style.top = l;
e.log(`update banner position left:${c} top:${l}`);
}
showBanner(a) {
var o, n;
this.tryShowCount++;
let i = null !== (o = null == a ? void 0 : a.adTag) && void 0 !== o ? o : "Banner", r = this.sizes.get(i), s = e.PA.getSystemInfoSync();
this.showOptions.set(i, a);
if (this.ads.has(i)) {
let o = this.ads.get(i), c = 0;
c = (null === (n = null == a ? void 0 : a.style) || void 0 === n ? void 0 : n.width) ? a.style.width : e.isPlatform([ e.Platform.WeChat ]) ? s.screenWidth > s.screenHeight ? 300 / s.designPixelRatio : s.screenWidth : Math.min(s.screenWidth, s.screenHeight);
e.isPlatform([ e.Platform.Vivo ]) || (o.style.width = c);
(null == r ? void 0 : r.width) == c && this.updateBannerPosition(i);
if (this.status.get(i) == t.Shown) {
this.tryShowCount = 0;
return;
}
o.show().then(() => {
this.tryShowCount = 0;
this.status.set(i, t.Shown);
}).catch(() => {
try {
if (this.tryShowCount > 1) {
this.tryShowCount = 0;
null == a || a.fail();
} else this.tryInitBannerAd({
initOption: this.initOptions.get(i),
success: () => {
this.showBanner(a);
}
});
} catch (e) {}
});
} else {
this.tryShowCount = 0;
e.warn(`显示banner失败,广告标签${i}不存在`);
}
}
hideBanner(e) {
var a;
let o = null != e ? e : "Banner";
try {
if (this.ads.has(o)) {
this.showCount.has(o) ? this.showCount.set(o, this.showCount.get(o) + 1) : this.showCount.set(o, 1);
let e = this.showCount.get(o), n = this.ads.get(o), i = null === (a = this.initOptions.get(o)) || void 0 === a ? void 0 : a.validTimes;
if (n) if (e && i) {
if (e >= i) {
if (n.destroy) {
this.showCount.delete(o);
n.destroy();
this.status.set(o, t.Invalid);
this.initBannerAd(this.initOptions.get(o));
}
} else if (n.hide) {
n.hide();
this.status.set(o, t.Hidden);
}
} else if (n.hide) {
n.hide();
this.status.set(o, t.Hidden);
}
}
} catch (e) {
e(e);
}
}
hideAllBanner() {}
resumeShowBanner() {}
clearAllBanner() {}
isExistBanner(e) {
return !(!this.ads.has(e) || this.status.get(e) != t.Loaded && this.status.get(e) != t.Shown && this.status.get(e) != t.Hidden);
}
}();
e.initBannerAd = function(t) {
e.isPlatform([ e.Platform.Android ]) || null == a || a.initBannerAd(t);
};
e.showBanner = function(t) {
var o, n, i, r, s, c, l, d;
if (e.isPlatform([ e.Platform.Android, e.Platform.iOS ])) {
let a = null !== (n = null === (o = null == t ? void 0 : t.style) || void 0 === o ? void 0 : o.offsetX) && void 0 !== n ? n : 0, h = null !== (r = null === (i = null == t ? void 0 : t.style) || void 0 === i ? void 0 : i.offsetY) && void 0 !== r ? r : 0, p = null !== (c = null === (s = null == t ? void 0 : t.style) || void 0 === s ? void 0 : s.width) && void 0 !== c ? c : 0, u = null !== (d = null === (l = null == t ? void 0 : t.style) || void 0 === l ? void 0 : l.height) && void 0 !== d ? d : 0;
e.PA.showBanner(a, h, p, u);
} else e.isPlatform(e.Platform.Kuaidianwan) ? GameAssistantWeb.showBanner() : null == a || a.showBanner(t);
};
e.hideBanner = function(t) {
e.isPlatform([ e.Platform.Android, e.Platform.iOS ]) ? e.PA.hideBanner() : e.isPlatform(e.Platform.Kuaidianwan) ? GameAssistantWeb.hideBanner() : null == a || a.hideBanner(t);
};
e.hideAllBanner = function() {
e.isPlatform([ e.Platform.Android ]) ? e.PA.hideAllBanner() : e.isPlatform(e.Platform.iOS) || null == a || a.hideAllBanner();
};
e.resumeShowBanner = function() {
e.isPlatform([ e.Platform.Android ]) ? e.PA.resumeShowBanner() : e.isPlatform(e.Platform.iOS) || null == a || a.resumeShowBanner();
};
e.clearAllBanner = function() {
e.isPlatform([ e.Platform.Android ]) ? e.PA.clearAllBanner() : e.isPlatform(e.Platform.iOS) || null == a || a.clearAllBanner();
};
e.isExistBanner = function(e) {
return null == a ? void 0 : a.isExistBanner(e);
};
})(a || (a = {}));
a || (a = {});
(function(e) {
var t = new class {}();
e.showFullScreenVideoAd = function() {
e.Info.isPreview || (e.isPlatform(e.Platform.Kuaidianwan) ? GameAssistantWeb.showFullScreenVideoAd() : e.PA.showFullScreenVideoAd());
};
e.setFullScreenVideoAdPlayCallback = function(e) {
t.playCallback = e;
};
e.invokeFullScreenVideoAdPlayCallback = function(e) {
var a;
null === (a = null == t ? void 0 : t.playCallback) || void 0 === a || a.call(t, e);
};
})(a || (a = {}));
(function(e) {
var t = new class {
initGameBannerAd(t, a) {
if (e.isPlatform([ e.Platform.Vivo, e.Platform.OPPO ]) && !e.Info.isPreview) {
a || (a = {
left: 100 / e.PA.getSystemInfoSync().designPixelRatio,
top: (e.Info.resolution.height - 200) / e.PA.getSystemInfoSync().designPixelRatio,
orientation: "horizontal"
});
e.isOPPO() ? this.gameBannerAd = e.PA.createGameBannerAd({
adUnitId: t,
style: a
}) : e.isVivo() && (this.gameBannerAd = e.PA.createBoxBannerAd({
posId: t
}));
this.gameBannerAd.onError(t => {
e.log("GameBannerAd error:", t);
});
this.gameBannerAd.onLoad(() => {
e.log("GameBannerAd loaded");
});
} else e.Info.isPreview || e.log("当前平台：" + e.Info.platform + "暂不支持互推横幅广告");
}
showGameBannerAd() {
e.log("try show GameBannerAd");
this.gameBannerAd ? this.gameBannerAd.show().then(() => {
console.log("GameBannerAd show success");
}).catch(e => {
console.log("GameBannerAd show fail with:" + e);
}) : e.log("GameBannerAd not init");
}
hideGameBannerAd() {
if (this.gameBannerAd) {
e.log("GameBannerAd hide");
this.gameBannerAd.hide();
} else e.log("GameBannerAd not init");
}
}();
e.initGameBannerAd = function(e, a) {
t.initGameBannerAd(e, a);
};
e.showGameBannerAd = function() {
t.showGameBannerAd();
};
e.hideGameBannerAd = function() {
t.hideGameBannerAd();
};
})(a || (a = {}));
(function(e) {
var t = new class {
constructor() {
this.adUnitId = "";
}
initInterstitialAd(e) {
this.adUnitId = e;
}
showInterstitialAd() {
let t = e.PA.createInterstitialAd({
adUnitId: this.adUnitId
});
if (e.isPlatform([ e.Platform.Vivo, e.Platform.Kwaigame ])) t.show().then(() => {
e.log("InterstitialAd show");
}).catch(t => {
e.log("InterstitialAd fail", JSON.stringify(t));
}); else if (e.isPlatform([ e.Platform.ByteDance ])) t.load().then(() => {
t.show().then(() => {
e.log("InterstitialAd show");
});
}).catch(t => {
e.log(t);
}); else {
t.onError(t => {
e.log("InterstitialAd error", t);
});
t.onLoad(() => {
e.log("InterstitialAd onLoad");
t.show().catch(t => {
e.error("show", t);
});
});
t.load().catch(t => {
e.error("InterstitialAd err", t);
});
}
}
}();
e.initInterstitialAd = function(e) {
t.initInterstitialAd(e);
};
e.showInterstitialAd = function() {
e.Info.isPreview || (e.isPlatform([ e.Platform.iOS, e.Platform.Android ]) ? e.PA.showInterstitialAd() : e.isPlatform(e.Platform.Kuaidianwan) ? GameAssistantWeb.showInterstitialAd() : t.showInterstitialAd());
};
})(a || (a = {}));
(function(e) {
e.showNativeAd = function(t) {
e.Info.isPreview || e.isPlatform([ e.Platform.iOS, e.Platform.Android ]) && e.PA.showNativeAd(t);
};
e.hideNativeAd = function() {
e.Info.isPreview || e.isPlatform([ e.Platform.iOS, e.Platform.Android ]) && e.PA.hideNativeAd();
};
})(a || (a = {}));
(function(e) {
let t;
(function(e) {
e[e.Default = 0] = "Default";
e[e.Loading = 1] = "Loading";
e[e.Loaded = 2] = "Loaded";
e[e.Showing = 3] = "Showing";
e[e.End = 4] = "End";
e[e.Error = 5] = "Error";
})(t || (t = {}));
var a = new class {
constructor() {
this.adIds = [];
this.currAdIdIdx = -1;
this.ad = null;
this.showOption = null;
this.videoPlayTimeStamp = 0;
this.status = t.Default;
this.closeTip = "看完视频才能获得奖励哦";
this.videoPlayCallbacks = [];
this.videoPlayEndCallbacks = [];
this.videoCloseCallbacks = [];
}
init(e) {
this.adIds = e;
this.currAdIdIdx = -1;
this.initNextAd();
}
setCloseTip(e) {
this.closeTip = e;
}
haveRewardVideo() {
return e.isPlatform([ e.Platform.iOS, e.Platform.Android ]) ? e.PA.isRewardVideoAdReady() : this.status == t.Loaded;
}
onLoad() {
this.status = t.Loaded;
}
onError(a) {
var o, n;
this.status = t.Error;
if (this.showOption) {
e.Info.isPreview || e.sentLog("VideoAdFailed", null, {
type: this.showOption.tag,
page: null !== (o = this.showOption.page) && void 0 !== o ? o : ""
});
e.PA.showToast({
title: "抱歉，没有找到视频",
icon: "none",
mask: !1
});
null === (n = this.showOption) || void 0 === n || n.result({
errorMsg: JSON.stringify(a),
reward: !1,
shown: !1
});
}
e.isPlatform([ e.Platform.OPPO, e.Platform.Vivo ]) && this.ad.load();
this.showOption = null;
}
onClose(a) {
var o, n, i;
if (a.isEnded) {
e.Info.rewardUserData.data.has(this.showOption.tag) && e.Info.rewardUserData.data.get(this.showOption.tag).currCount++;
this.videoPlayEndCallbacks.forEach(e => {
try {
e();
} catch (e) {}
});
} else this.videoCloseCallbacks.forEach(e => {
try {
e();
} catch (e) {}
});
this.status = t.End;
null === (o = this.showOption) || void 0 === o || o.result({
reward: null == a ? void 0 : a.isEnded,
shown: !0,
ecpm: null !== (n = a.ecpm) && void 0 !== n ? n : 0
});
e.Info.isPreview || e.sentLog((null == a ? void 0 : a.isEnded) ? "VideoAdEnded" : "VideoAdClosed", Math.round((Date.now() - this.videoPlayTimeStamp) / 1e3), {
type: this.showOption.tag,
page: null !== (i = this.showOption.page) && void 0 !== i ? i : ""
});
e.isPlatform([ e.Platform.OPPO, e.Platform.Vivo ]) && !e.Info.isPreview && this.ad.load();
this.showOption = null;
this.status = t.End;
(null == a ? void 0 : a.isEnded) || this.closeTip && "" != this.closeTip && e.PA.showToast({
title: this.closeTip,
mask: !0,
icon: "none"
});
}
initNextAd() {
if (this.adIds.length > 0 && !e.isPlatform(e.Platform.Android)) {
this.currAdIdIdx = (this.currAdIdIdx + 1) % this.adIds.length;
this.status = t.Loading;
if (e.isPlatform(e.Platform.Hago)) {
let t = window.hg.createRewardedVideoAd({
adUnitId: this.adIds[this.currAdIdIdx]
});
t.onClose = e => {
this.onClose(e);
};
t.onError = () => {
e.log("中途关闭广告或者拉取广告失败");
};
this.ad = t;
} else {
this.ad = e.PA.createRewardedVideoAd({
adUnitId: this.adIds[this.currAdIdIdx],
multiton: !1
});
this.ad.onLoad(() => {
this.onLoad();
});
this.ad.onError(e => {
this.onError(e);
});
this.ad.onClose(e => {
this.onClose(e);
});
e.isPlatform([ e.Platform.OPPO, e.Platform.Vivo ]) && this.ad.load();
}
}
}
showVideoAd(t) {
var a;
if (this.showOption) e.log("reward video is showing with " + this.showOption.page + " - " + this.showOption.tag); else {
this.showOption = t;
e.Info.isPreview || e.sentLog("TryPlayVideoAd", null, {
type: this.showOption.tag,
page: null !== (a = this.showOption.page) && void 0 !== a ? a : ""
});
if (e.Info.isPreview) this.onClose({
isEnded: !0
}); else if (e.isPlatform(e.Platform.QuTouTiao)) qttGame.showVideo(e => {
this.onClose({
isEnded: 1 == e
});
}); else if (e.isPlatform(e.Platform.Kuaidianwan)) GameAssistantWeb.showRewardVideo(e => {
this.onClose({
isEnded: e
});
}); else if (e.isPlatform(e.Platform.Android)) e.PA.showRewardVideoAd(t => {
var a;
e.log("reward video Android show callback:" + JSON.stringify(t));
if (t.shown) this.onClose({
isEnded: t.reward,
ecpm: t.ecpm
}); else {
this.showOption && (null === (a = this.showOption) || void 0 === a || a.result({
errorMsg: JSON.stringify(t),
reward: !1,
shown: !1
}));
this.showOption = null;
}
}); else if (e.isPlatform(e.Platform.iOS)) e.PA.showRewardVideoAd(t => {
var a;
e.log("reward video ios show callback:" + JSON.stringify(t));
if (t.shown) this.onClose({
isEnded: t.reward,
ecpm: t.ecpm
}); else {
this.showOption && (null === (a = this.showOption) || void 0 === a || a.result({
errorMsg: JSON.stringify(t),
reward: !1,
shown: !1
}));
this.showOption = null;
}
}); else if (e.isPlatform(e.Platform.M4399MiniGame)) window.h5api.playAd(t => {
e.log("code:" + t.code + ",message:" + t.message);
if (1e4 === t.code) this.videoPlayCallbacks.forEach(e => {
try {
e();
} catch (e) {}
}); else if (10001 === t.code) this.onClose({
isEnded: !0
}); else {
this.showOption = null;
this.videoCloseCallbacks.forEach(e => {
try {
e();
} catch (e) {}
});
}
}); else {
null == this.ad && this.initNextAd();
this.ad.show().then(() => {
this.videoPlayTimeStamp = Date.now();
this.showAdResult(!0, "");
}).catch(e => {
this.showAdResult(!1, JSON.stringify(e));
});
}
}
}
showAdResult(t, a) {
var o;
this.showOption && !e.Info.isPreview && e.sentLog(t ? "VideoAdSuccess" : "VideoAdFailed", null, {
type: this.showOption.tag,
page: null !== (o = this.showOption.page) && void 0 !== o ? o : ""
});
if (t) this.videoPlayCallbacks.forEach(e => {
try {
e();
} catch (e) {}
}); else {
e.isPlatform([ e.Platform.OPPO, e.Platform.Vivo ]) && this.ad.load();
this.onError({
errCode: 1,
errMsg: a
});
}
}
addPlayCallback(e) {
this.videoPlayCallbacks.push(e);
}
addPlayEndCallback(e) {
this.videoPlayEndCallbacks.push(e);
}
addCloseCallback(e) {
this.videoCloseCallbacks.push(e);
}
removePlayCallback(e) {
let t = this.videoPlayCallbacks.indexOf(e);
t >= 0 && this.videoPlayCallbacks.splice(t, 1);
}
removePlayEndCallback(e) {
let t = this.videoPlayEndCallbacks.indexOf(e);
t >= 0 && this.videoPlayEndCallbacks.splice(t, 1);
}
removeCloseCallback(e) {
let t = this.videoCloseCallbacks.indexOf(e);
t >= 0 && this.videoCloseCallbacks.splice(t, 1);
}
}();
e.haveRewardVideo = function() {
return a.haveRewardVideo();
};
e.showVideoAd = function(e) {
a.showVideoAd(e);
};
e.initRewardVideoAd = function(t) {
e.Info.isPreview || a.init(t);
};
e.addVideoPlayCallback = function(e) {
a.addPlayCallback(e);
};
e.addVideoEndCallback = function(e) {
a.addPlayEndCallback(e);
};
e.addVideoCloseCallback = function(e) {
a.addCloseCallback(e);
};
e.removeVideoPlayCallback = function(e) {
a.removePlayCallback(e);
};
e.removeVideoEndCallback = function(e) {
a.removePlayEndCallback(e);
};
e.removeVideoCloseCallback = function(e) {
a.removeCloseCallback(e);
};
e.setInterruptPlayTip = function(e) {
a.setCloseTip(e);
};
})(a || (a = {}));
(function(e) {
e.showSplashAd = function() {
var t;
e.Info.isPreview || e.isPlatform(e.Platform.Kuaidianwan) || null === (t = e.PA.showSplashAd) || void 0 === t || t.call(e.PA);
};
})(a || (a = {}));
(function(t) {
t.AndroidProxy = class extends t.BaseAppProxy {
constructor() {
super();
this.compatibleMethods = [ "onShareMessageToFriend", "showShareMenu", "onShareTimeline", "onShareAppMessage", "getUpdateManager", "onTouchEnd", "onTouchStart", "offTouchStart", "offTouchEnd", "triggerGC" ];
this.bridge = null;
this.isSplashAdEnd = !1;
this.splashAdEndCallback = null;
this.callbacks = new Map();
this.times = 0;
this.compatibleMethods.forEach(e => {
this[e] = () => {
console.log(`Android 暂不支持${e}`);
};
});
try {
this.bridge = PlatformClass.createClass("com.kariqu.sdkmanager.JavaScriptProxy");
} catch (e) {}
}
signInGoogle() {
e.signIn();
}
signInGoogleSilently() {
e.signInSilently();
}
signOutGoogle() {
e.signOut();
}
saveFile(t) {
e.saveFile(t);
}
loadSavefile() {
e.loadSavefile();
}
setNonConsumableProduct(t) {
e.setAcknowledgedSku(t);
}
getProductDetail(t, o) {
a.isDistributionChannel(a.DistributionChannel.HuaweiGlobal) ? this.native("requestProductInfo", "(Ljava/lang/String;I)V", JSON.stringify(t), null != o ? o : 0) : e.loadSkuDetail(t, []);
}
requestPayment(t, o) {
a.isDistributionChannel(a.DistributionChannel.HuaweiGlobal) ? this.native("requestPayProduct", "(Ljava/lang/String;I)V", t, null != o ? o : 0) : e.purchaseSku(t);
}
checkPurchase() {
a.isDistributionChannel(a.DistributionChannel.HuaweiGlobal) ? this.native("checkUnfinishedTransaction", "()V") : e.checkPurchase();
}
fetchRemoteConfig() {
e.syncRemoteConfig();
}
confirmPurchase(t) {
a.isDistributionChannel(a.DistributionChannel.HuaweiGlobal) ? this.native("finishTransaction", "(Ljava/lang/String;)V", t) : e.confirmPurchase(t);
}
getRemoteConfig() {
return e.getRemoteConfig();
}
getOrderInfo(t) {
return a.isDistributionChannel(a.DistributionChannel.HuaweiGlobal) ? this.native("getTransactionInfo", "(Ljava/lang/String;)Ljava/lang/String;", t) : e.getOrderInfo(t);
}
restoreNonConsumablePurchase() {
a.isDistributionChannel(a.DistributionChannel.HuaweiGlobal) ? this.native("restoreNonConsumableTransaction", "()V") : e.recoverAcknowledgedPurchase();
}
setUserId(e) {
this.native("setUserId", "(Ljava/lang/String;)V", e);
}
setSplashAdEnd() {
this.isSplashAdEnd = !0;
this.splashAdEndCallback && this.splashAdEndCallback();
this.splashAdEndCallback = null;
}
afterSplashAd(e) {
this.isSplashAdEnd ? e() : this.splashAdEndCallback = e;
}
native(e, t, ...a) {
console.log("call android native " + e + " " + t + " " + a.join(","));
try {
if (this.bridge) {
a.forEach(e => {
"number" == typeof e && (e *= 1);
});
return this.bridge.call(e, ...a);
}
return jsb.reflection.callStaticMethod("com/kariqu/sdkmanager/JavaScriptProxy", e, t, ...a);
} catch (e) {}
}
callCallback(e, ...t) {
if (this.callbacks.has(e)) try {
this.callbacks.get(e)(...t);
} catch (e) {
console.error(e);
} finally {
this.callbacks.delete(e);
}
}
uuid() {
this.times++;
return Date.now() + "-" + this.times;
}
onShow(e) {}
offShow(e) {}
onHide(e) {}
offHide(e) {}
getSystemInfoSync() {
return JSON.parse(this.native("getSystemInfoSync", "()Ljava/lang/String;"));
}
getLaunchOptionsSync() {
let e = null, t = this.native("getLaunchOptionsSync", "()Ljava/lang/String;");
if (t && "" != t) try {
e = JSON.parse(t);
} catch (e) {
console.error(JSON.stringify(e));
} else a.log("Android getLaunchOptionsSync error('').");
return e;
}
exitMiniProgram() {
this.native("exitApplication", "()V");
}
showRewardVideoAd(e) {
let t = "showRewardVideoAd:" + this.uuid();
this.callbacks.set(t, e);
let a = "showRewardVideoAd:show:" + this.uuid();
this.callbacks.set(a, e);
this.native("showRewardVideoAd", "(Ljava/lang/String;Ljava/lang/String;)V", a, t);
}
showFullScreenVideoAd() {
this.native("showFullScreenVideoAd", "()V");
}
showInterstitialAd() {
this.native("showInterstitialAd", "()V");
}
showBanner(e, t, a, o) {
this.native("showBanner", "(Ljava/lang/String;)V", JSON.stringify({
offsetX: null != e ? e : 0,
offsetY: null != t ? t : 0,
width: null != a ? a : 0,
height: null != o ? o : 0
}));
}
hideBanner() {
this.native("hideBanner", "()V");
}
showNativeAd(e) {
var t, a, o, n;
e.offsetX = null !== (t = e.offsetX) && void 0 !== t ? t : 0;
e.offsetY = null !== (a = e.offsetY) && void 0 !== a ? a : 0;
e.width = null !== (o = e.width) && void 0 !== o ? o : 0;
e.height = null !== (n = e.height) && void 0 !== n ? n : 0;
this.native("showNativeAd", "(Ljava/lang/String;)V", JSON.stringify(e));
}
hideNativeAd() {
this.native("hideNativeAd", "()V");
}
showToast(e) {
this.native("showToast", "(Ljava/lang/String;)V", JSON.stringify(e));
}
getLanguage() {
return this.native("getLanguage", "()Ljava/lang/String;");
}
showModal(e) {
var t, a;
let o = "showModal:" + this.uuid();
this.native("showModal", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", e.title, e.content, null !== (t = e.confirmText) && void 0 !== t ? t : "确认", e.showCancel ? null !== (a = e.cancelText) && void 0 !== a ? a : "取消" : "", o);
this.callbacks.set(o, e.success);
}
showLoading(e) {
this.native("showLoading", "(Ljava/lang/String;)V", e.title);
}
hideLoading(e) {
this.native("hideLoading", "()V");
}
showShareMenu(e) {
this.native("showShareMenu", "()V");
}
shareAppMessage(e) {
this.native("shareAppMessage", "(Ljava/lang/String;)V", JSON.stringify(e));
}
getUserInfo(e) {}
getWeChatOpenId(e) {
let t = "getWeChatOpenId:" + this.uuid();
this.callbacks.set(t, a => {
var o;
e(null !== (o = a.openid) && void 0 !== o ? o : "");
this.callbacks.delete(t);
});
this.native("getWeChatOpenId", "(Ljava/lang/String;)V", t);
}
login(e) {
let t = "login:success:" + this.uuid();
this.callbacks.set(t, e.success);
let a = "login:fail:" + this.uuid();
this.callbacks.set(a, e.fail);
let o = "login:complete:" + this.uuid();
this.callbacks.set(o, () => {
this.callbacks.delete(t);
this.callbacks.delete(a);
this.callbacks.delete(o);
});
this.native("login", "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", t, a, o);
}
setKeepScreenOn(e) {}
vibrateShort(e) {
this.native("vibrateShort", "()V");
}
vibrateLong(e) {
this.native("vibrateLong", "()V");
}
setClipboardData(e) {
this.native("setClipboardData", "(Ljava/lang/String;)V", e.data);
}
getClipboardData(e) {
try {
e.success({
data: this.native("getClipboardData", "()Ljava/lang/String;")
});
} catch (e) {}
}
getBatteryInfo(e) {}
getBatteryInfoSync() {
return {
level: 0,
isCharging: !1
};
}
onOceanEngineInit() {
this.native("onOceanEngineInit", "()V");
}
reportKeyAction(e) {
e ? this.native("reportKeyAction", "(Ljava/lang/String;)V", e) : this.native("reportKeyAction", "()V");
}
onOceanEngineRegister(e, t) {
this.native("onOceanEngineRegister", "(Ljava/lang/String;Z)V", e, t);
}
onOceanEnginePurchase(e, t) {
this.native("onOceanEnginePurchase", "(Ljava/lang/String;Z)V", e, t);
}
jumpLeisureSubject() {
this.native("jumpLeisureSubject", "()V");
}
exitApplication() {
this.native("exitApplication", "()V");
}
isRewardVideoAdReady() {
return this.native("isRewardVideoAdReady", "()Z");
}
sendEvent(e, t) {
this.native("sendEvent", "(Ljava/lang/String;Ljava/lang/String;)V", e, t);
}
};
})(t || (t = {}));
(function(e) {
window.AppProxy = e;
const t = new class {
constructor() {
this.isAndroid = !1;
this.isiOS = !1;
}
check(t) {
if (null == e.PROXY) {
if (null == this.platform) {
try {
this.platform = jsb.reflection.callStaticMethod("com/kariqu/sdkmanager/JavaScriptProxy", "getPlatform", "()Ljava/lang/String;");
if (!this.platform) throw "";
console.log("Platform : Cocos Creator Android");
} catch (e) {
try {
this.platform = jsb.reflection.callStaticMethod("JavaScriptProxy", "getPlatform");
if (!this.platform) throw "";
console.log("Platform : Cocos Creator iOS");
} catch (e) {
try {
this.platform = PlatformClass.createClass("com.kariqu.sdkmanager.JavaScriptProxy").call("getPlatform");
if (!this.platform) throw "";
console.log("Platform : LayaAir Android");
} catch (e) {
try {
this.platform = PlatformClass.createClass("JavaScriptProxy").call("getPlatform");
if (!this.platform) throw "";
console.log("Platform : LayaAir iOS");
} catch (e) {
console.log("Platform : null, default " + t);
this.platform = null;
}
}
}
}
null == this.platform && (this.platform = t);
}
console.log(`AppProxy Platform is ${this.platform} default is ${t}`);
if (this.platform == a.Platform.Android) {
this.isAndroid = !0;
e.PROXY = new e.AndroidProxy();
console.log(`AppProxy PROXY init ${null == e.PROXY ? "failed" : "success"} Platform:${this.platform}`);
} else if (this.platform == a.Platform.iOS) {
this.isiOS = !0;
e.PROXY = new e.IOSProxy();
console.log(`AppProxy PROXY init ${null == e.PROXY ? "failed" : "success"} Platform:${this.platform}`);
}
}
}
isAndroidApp() {
return this.isAndroid;
}
isiOSApp() {
return this.isiOS;
}
}();
let o, n;
(function(e) {
e[e.Consumable = 0] = "Consumable";
e[e.NonConsumable = 1] = "NonConsumable";
e[e.Subscription = 2] = "Subscription";
})(o = e.ProductType || (e.ProductType = {}));
(function(e) {
e.SIGN_IN = "SIGN_IN";
e.SIGN_IN_FAILED = "SIGN_IN_FAILED";
e.SIGN_OUT = "SIGN_OUT";
e.SAVE_FILE = "SAVE_FILE";
e.LOAD_SAVE_FILE = "LOAD_SAVE_FILE";
e.REMOTE_CONFIG_SYNC = "REMOTE_CONFIG_SYNC";
e.GOT_SKU_DETAIL = "GOT_PRODUCT_DETAIL";
e.GOT_PRODUCT_DETAIL = "GOT_PRODUCT_DETAIL";
e.PENDING_ORDER = "PENDING_ORDER";
e.RECOVER_ACKNOWLEDGED_SKUS = "RESTORE_NONCONSUMABLE_PURCHASE";
e.RESTORE_NONCONSUMABLE_PURCHASE = "RESTORE_NONCONSUMABLE_PURCHASE";
e.PURCHASE_RESULT = "PURCHASE_RESULT";
})(n = e.ListenerKey || (e.ListenerKey = {}));
const i = new Map();
function r(e) {
t.check(e);
return t.isAndroidApp() || t.isiOSApp();
}
e.isAPP = r;
e.getPlatform = function() {
return t.isiOSApp() ? a.Platform.iOS : t.isAndroidApp() ? a.Platform.Android : a.Platform.Default;
};
var s = null, c = !1;
e.setSplashAdEndListener = function(e) {
c || !r() || a.Info.isPreview ? null == e || e() : s = e;
};
e.afterSplashAd = function() {
console.log("AppProxy afterSplashAd");
c = !0;
null == s || s();
};
e.registListener = function(e, t) {
i.set(e, t);
};
e.unregistListener = function(e) {
i.delete(e);
};
e.onSignIn = function() {
if (i.has(n.SIGN_IN)) try {
i.get(n.SIGN_IN)();
} catch (e) {}
};
e.onSignInFailed = function(e) {
if (i.has(n.SIGN_IN_FAILED)) try {
i.get(n.SIGN_IN_FAILED)(e);
} catch (e) {}
};
e.onSignOut = function() {
if (i.has(n.SIGN_OUT)) try {
i.get(n.SIGN_OUT)();
} catch (e) {}
};
e.onSaveFile = function(e) {
if (i.has(n.SAVE_FILE)) try {
i.get(n.SAVE_FILE)(e);
} catch (e) {}
};
e.onLoadSavefile = function(e, t) {
if (i.has(n.LOAD_SAVE_FILE)) try {
i.get(n.LOAD_SAVE_FILE)(e, t);
} catch (e) {}
};
e.onRemoteConfigSynced = function(e) {
if (i.has(n.REMOTE_CONFIG_SYNC)) try {
i.get(n.REMOTE_CONFIG_SYNC)(e);
} catch (e) {}
};
e.onPendingOrder = function(e) {
if (i.has(n.PENDING_ORDER)) try {
i.get(n.PENDING_ORDER)(JSON.parse(e));
} catch (e) {}
};
e.onPurchaseResult = function(e, t) {
if (i.has(n.PURCHASE_RESULT)) try {
i.get(n.PURCHASE_RESULT)(e, t);
} catch (e) {}
};
e.onGotSkuDetail = function(e, t) {
if (i.has(n.GOT_PRODUCT_DETAIL)) try {
i.get(n.GOT_PRODUCT_DETAIL)(e, JSON.parse(t));
} catch (e) {}
};
e.onRestoreNonConsumablePurchase = function(e) {
if (i.has(n.RESTORE_NONCONSUMABLE_PURCHASE)) try {
i.get(n.RESTORE_NONCONSUMABLE_PURCHASE)(JSON.parse(e));
} catch (e) {}
};
e.signInGoogle = function() {
null === e.PROXY || void 0 === e.PROXY || e.PROXY.signInGoogle();
};
e.signInGoogleSilently = function() {
null === e.PROXY || void 0 === e.PROXY || e.PROXY.signInGoogleSilently();
};
e.signOutGoogle = function() {
null === e.PROXY || void 0 === e.PROXY || e.PROXY.signOutGoogle();
};
e.saveFile = function(t) {
null === e.PROXY || void 0 === e.PROXY || e.PROXY.saveFile(t);
};
e.loadSavefile = function() {
null === e.PROXY || void 0 === e.PROXY || e.PROXY.loadSavefile();
};
e.setNonConsumableProduct = function(t) {
null === e.PROXY || void 0 === e.PROXY || e.PROXY.setNonConsumableProduct(t);
};
e.getProductDetail = function(t) {
null === e.PROXY || void 0 === e.PROXY || e.PROXY.getProductDetail(t);
};
e.requestPayment = function(t) {
null === e.PROXY || void 0 === e.PROXY || e.PROXY.requestPayment(t);
};
e.checkPurchase = function() {
null === e.PROXY || void 0 === e.PROXY || e.PROXY.checkPurchase();
};
e.fetchRemoteConfig = function() {
null === e.PROXY || void 0 === e.PROXY || e.PROXY.fetchRemoteConfig();
};
e.confirmPurchase = function(t) {
null === e.PROXY || void 0 === e.PROXY || e.PROXY.confirmPurchase(t);
};
e.getRemoteConfig = function() {
var t;
return null !== (t = null === e.PROXY || void 0 === e.PROXY ? void 0 : e.PROXY.getRemoteConfig()) && void 0 !== t ? t : new Map();
};
e.getOrderInfo = function(t) {
try {
return JSON.parse(null === e.PROXY || void 0 === e.PROXY ? void 0 : e.PROXY.getOrderInfo(t));
} catch (e) {
return null;
}
};
e.restoreNonConsumablePurchase = function() {
return null === e.PROXY || void 0 === e.PROXY ? void 0 : e.PROXY.restoreNonConsumablePurchase();
};
})(t || (t = {}));
(function(e) {
window.GoogleService = e;
var t = null;
function o(e, a, ...o) {
console.log("call android native " + e + " " + a + " " + o.join(","));
try {
return jsb.reflection.callStaticMethod("com/kariqu/googleservice/GSSDK", e, a, ...o);
} catch (a) {
null == t && (t = PlatformClass.createClass("com.kariqu.googleservice.GSSDK"));
return t.call(e, ...o);
}
}
e.signIn = function() {
o("signIn", "()V");
};
e.signInSilently = function() {
o("signInSilently", "()V");
};
e.signOut = function() {
o("signOut", "()V");
};
e.saveFile = function(e) {
o("saveFile", "(Ljava/lang/String;)V", e);
};
e.loadSavefile = function() {
o("loadSavefile", "()V");
};
e.setAcknowledgedSku = function(e) {
o("setAcknowledgedSku", "(Ljava/lang/String;)V", JSON.stringify(e));
};
e.loadSkuDetail = function(e, t) {
o("loadSkuDetail", "(Ljava/lang/String;Ljava/lang/String;)V", JSON.stringify(e), JSON.stringify(t));
};
e.purchaseSku = function(e) {
o("purchaseSku", "(Ljava/lang/String;)V", e);
};
e.checkPurchase = function() {
o("checkPurchase", "()V");
};
e.syncRemoteConfig = function() {
o("syncRemoteConfig", "()V");
};
e.confirmPurchase = function(e) {
o("confirmPurchase", "(Ljava/lang/String;)V", e);
};
e.getRemoteConfig = function() {
let e = o("getRemoteConfig", "()Ljava/lang/String;");
a.log("Google RemoteConfig is " + e);
let t = JSON.parse(e), n = new Map();
for (let e of Object.keys(t)) n.set(e, t[e]);
return n;
};
e.getOrderInfo = function(e) {
return o("getOrderInfo", "(Ljava/lang/String;)Ljava/lang/String;", e);
};
e.recoverAcknowledgedPurchase = function() {
return o("recoverAcknowledgedPurchase", "()V");
};
})(e || (e = {}));
(function(e) {
e.IOSProxy = class extends e.BaseAppProxy {
constructor() {
super();
this.compatibleMethods = [ "onShareMessageToFriend", "showShareMenu", "onShareTimeline", "onShareAppMessage", "getUpdateManager", "onTouchEnd", "onTouchStart", "offTouchStart", "offTouchEnd", "triggerGC" ];
this.bridge = null;
this.callbacks = new Map();
this.callbackValidTimes = new Map();
this.times = 0;
this.compatibleMethods.forEach(e => {
this[e] = () => {
console.log(`iOS 暂不支持${e}`);
};
});
try {
this.bridge = PlatformClass.createClass("JavaScriptProxy");
} catch (e) {}
}
native(e, ...t) {
let o = null, n = null;
try {
a.isEngine(a.EngineType.CocosCreator) ? o = t ? jsb.reflection.callStaticMethod("JavaScriptProxy", e, ...t) : jsb.reflection.callStaticMethod("JavaScriptProxy", e) : a.isEngine(a.EngineType.LayaAir) && (o = t ? this.bridge.call(e, ...t) : this.bridge.call(e));
} catch (e) {
n = e;
}
if (n) {
console.log("call ios native ", e, " error.");
console.error(n);
} else console.log("call ios native ", e, " return:", o);
return o;
}
sendEvent(e, t) {
this.native("sendEvent:params:", e, null != t ? t : "");
}
callCallback(e, ...t) {
if (this.callbacks.has(e)) {
console.log("ios call jscallback : ", e, JSON.stringify(t));
try {
this.callbacks.get(e)(...t);
} catch (e) {
console.error(e);
} finally {
let t = this.callbackValidTimes.get(e);
if (t > 1) this.callbackValidTimes.set(e, t - 1); else {
this.callbacks.delete(e);
this.callbackValidTimes.delete(e);
}
}
} else console.log("ios call jscallback(not exist): ", e, JSON.stringify(t));
}
addCallback(e, t, a) {
this.callbacks.set(e, t);
this.callbackValidTimes.set(e, a);
}
uuid() {
this.times++;
return Date.now() + "-" + this.times;
}
onShow(e) {}
offShow(e) {}
onHide(e) {}
offHide(e) {}
getSystemInfoSync() {
var e;
return JSON.parse(null !== (e = this.native("getSystemInfoSync")) && void 0 !== e ? e : "{}");
}
getLaunchOptionsSync() {
var e;
return JSON.parse(null !== (e = this.native("getLaunchOptionsSync")) && void 0 !== e ? e : "{}");
}
exitMiniProgram() {
this.native("exitMiniProgram");
}
showRewardVideoAd(e) {
let t = "showRewardVideoAd:show:" + this.uuid();
this.addCallback(t, e, 2);
this.native("showRewardVideoAd:scene:", t, "");
}
showFullScreenVideoAd() {
this.native("showFullScreenVideoAd:", "");
}
showInterstitialAd() {
this.native("showInterstitial");
}
showBanner(e, t, a, o) {
this.native("showBannerAdWithOffsetX:offsetY:width:height:", e, t, a, o);
}
hideBanner() {
this.native("hideBannerAd");
}
showNativeAd(e) {
var t, a, o, n;
this.native("showNativeAdWithOffsetX:offsetY:width:height:", null !== (t = e.offsetX) && void 0 !== t ? t : 0, null !== (a = e.offsetY) && void 0 !== a ? a : 0, null !== (o = e.width) && void 0 !== o ? o : 0, null !== (n = e.height) && void 0 !== n ? n : 0);
}
hideNativeAd() {
this.native("hideNativeAd");
}
showToast(e) {
var t;
e.duration && e.duration > 100 && (e.duration = e.duration / 1e3);
this.native("showToast:duration:", e.title, null !== (t = e.duration) && void 0 !== t ? t : 1.5);
}
showModal(e) {
var t, a;
let o = "showModal:" + this.uuid();
this.native("showModal:content:showCancel:cancelText:confirmText:callbackKey:", e.title, e.content, !!e.showCancel, null !== (t = e.cancelText) && void 0 !== t ? t : "取消", null !== (a = e.confirmText) && void 0 !== a ? a : "确认", o);
this.addCallback(o, e.success, 1);
}
showLoading(e) {
var t;
this.native("showLoading:mask:", null !== (t = e.title) && void 0 !== t ? t : "", !!e.mask);
}
hideLoading(e) {
this.native("hideLoading");
}
showShareMenu(e) {
this.native("showShareMenu");
}
shareAppMessage(e) {}
login(e) {
var t;
let a = this.native("login");
null === (t = null == e ? void 0 : e.success) || void 0 === t || t.call(e, {
code: a
});
}
setUserId(e) {
this.native("setUserId:", e);
}
setKeepScreenOn(e) {}
vibrateShort(e) {
this.native("vibrate:", 15);
}
vibrateLong(e) {
this.native("vibrate:", 400);
}
setClipboardData(e) {
var t;
this.native("setClipboardData:", null !== (t = e.data) && void 0 !== t ? t : "");
}
getClipboardData(e) {
try {
e.success({
data: this.native("getClipboardData")
});
} catch (e) {}
}
getBatteryInfo(e) {}
getBatteryInfoSync() {
return {
level: 0,
isCharging: !1
};
}
onOceanEngineInit() {
this.native("onOceanEngineInit");
}
reportKeyAction(e) {
e ? this.native("reportKeyAction:", e) : this.native("reportKeyAction");
}
onOceanEngineRegister(e, t) {
this.native("onOceanEngineRegister:success:", e, t);
}
onOceanEnginePurchase(e, t) {
this.native("onOceanEnginePurchase:success:", e, t);
}
getMenuButtonBoundingClientRect() {
return {
top: this.native("getTopUnsafeArea"),
left: 0,
right: 0,
bottom: 0,
width: 0,
height: 0
};
}
exitApplication() {
this.native("exitApplication");
}
isRewardVideoAdReady() {
return this.native("isRewardVideoAdReady");
}
getProductDetail(e) {
this.native("getProductsInfo:", JSON.stringify(e));
}
requestPayment(e) {
this.native("payProduct:", e);
}
checkPurchase() {
this.native("checkPurchase");
}
confirmPurchase(e) {
this.native("confirmPurchase:", e);
}
getOrderInfo(e) {
return this.native("getTransactionInfo:", e);
}
restoreNonConsumablePurchase() {
this.native("restoreNonConsumablePurchase");
}
fetchRemoteConfig() {
this.native("fetchRemoteConfig");
}
getRemoteConfig() {
let e = this.native("getRemoteConfig"), t = JSON.parse(e), a = new Map();
for (let e of Object.keys(t)) a.set(e, t[e]);
return a;
}
};
})(t || (t = {}));
(function(e) {
e.PlatformAdapter = class {
constructor() {
this.platform = e.Platform.Default;
}
};
})(a || (a = {}));
}, {} ],
38: [ function(e, t, a) {
this, o = function e() {
"use strict";
var t = "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== t ? t : {}, a = !t.document && !!t.postMessage, o = a && /blob:/i.test((t.location || {}).protocol), n = {}, i = 0, r = {
parse: function(a, o) {
var s = (o = o || {}).dynamicTyping || !1;
w(s) && (o.dynamicTypingFunction = s, s = {});
if (o.dynamicTyping = s, o.transform = !!w(o.transform) && o.transform, o.worker && r.WORKERS_SUPPORTED) {
var c = function() {
if (!r.WORKERS_SUPPORTED) return !1;
var a, o, s = (a = t.URL || t.webkitURL || null, o = e.toString(), r.BLOB_URL || (r.BLOB_URL = a.createObjectURL(new Blob([ "(", o, ")();" ], {
type: "text/javascript"
})))), c = new t.Worker(s);
return c.onmessage = m, c.id = i++, n[c.id] = c;
}();
return c.userStep = o.step, c.userChunk = o.chunk, c.userComplete = o.complete, 
c.userError = o.error, o.step = w(o.step), o.chunk = w(o.chunk), o.complete = w(o.complete), 
o.error = w(o.error), delete o.worker, void c.postMessage({
input: a,
config: o,
workerId: c.id
});
}
var u = null;
r.NODE_STREAM_INPUT, "string" == typeof a ? u = o.download ? new l(o) : new h(o) : !0 === a.readable && w(a.read) && w(a.on) ? u = new p(o) : (t.File && a instanceof File || a instanceof Object) && (u = new d(o));
return u.stream(a);
},
unparse: function(e, t) {
var a = !1, o = !0, n = ",", i = "\r\n", s = '"', c = s + s, l = !1, d = null, h = !1;
!function() {
if ("object" == typeof t) {
"string" != typeof t.delimiter || r.BAD_DELIMITERS.filter(function(e) {
return -1 !== t.delimiter.indexOf(e);
}).length || (n = t.delimiter);
("boolean" == typeof t.quotes || "function" == typeof t.quotes || Array.isArray(t.quotes)) && (a = t.quotes);
"boolean" != typeof t.skipEmptyLines && "string" != typeof t.skipEmptyLines || (l = t.skipEmptyLines);
"string" == typeof t.newline && (i = t.newline);
"string" == typeof t.quoteChar && (s = t.quoteChar);
"boolean" == typeof t.header && (o = t.header);
if (Array.isArray(t.columns)) {
if (0 === t.columns.length) throw new Error("Option columns is empty");
d = t.columns;
}
void 0 !== t.escapeChar && (c = t.escapeChar + s);
"boolean" == typeof t.escapeFormulae && (h = t.escapeFormulae);
}
}();
var p = new RegExp(f(s), "g");
"string" == typeof e && (e = JSON.parse(e));
if (Array.isArray(e)) {
if (!e.length || Array.isArray(e[0])) return u(null, e, l);
if ("object" == typeof e[0]) return u(d || Object.keys(e[0]), e, l);
} else if ("object" == typeof e) return "string" == typeof e.data && (e.data = JSON.parse(e.data)), 
Array.isArray(e.data) && (e.fields || (e.fields = e.meta && e.meta.fields), e.fields || (e.fields = Array.isArray(e.data[0]) ? e.fields : "object" == typeof e.data[0] ? Object.keys(e.data[0]) : []), 
Array.isArray(e.data[0]) || "object" == typeof e.data[0] || (e.data = [ e.data ])), 
u(e.fields || [], e.data || [], l);
throw new Error("Unable to serialize unrecognized input");
function u(e, t, a) {
var r = "";
"string" == typeof e && (e = JSON.parse(e)), "string" == typeof t && (t = JSON.parse(t));
var s = Array.isArray(e) && 0 < e.length, c = !Array.isArray(t[0]);
if (s && o) {
for (var l = 0; l < e.length; l++) 0 < l && (r += n), r += y(e[l], l);
0 < t.length && (r += i);
}
for (var d = 0; d < t.length; d++) {
var h = s ? e.length : t[d].length, p = !1, u = s ? 0 === Object.keys(t[d]).length : 0 === t[d].length;
if (a && !s && (p = "greedy" === a ? "" === t[d].join("").trim() : 1 === t[d].length && 0 === t[d][0].length), 
"greedy" === a && s) {
for (var f = [], m = 0; m < h; m++) {
var g = c ? e[m] : m;
f.push(t[d][g]);
}
p = "" === f.join("").trim();
}
if (!p) {
for (var v = 0; v < h; v++) {
0 < v && !u && (r += n);
var G = s && c ? e[v] : v;
r += y(t[d][G], v);
}
d < t.length - 1 && (!a || 0 < h && !u) && (r += i);
}
}
return r;
}
function y(e, t) {
if (null == e) return "";
if (e.constructor === Date) return JSON.stringify(e).slice(1, 25);
!0 === h && "string" == typeof e && null !== e.match(/^[=+\-@].*$/) && (e = "'" + e);
var o = e.toString().replace(p, c);
return "boolean" == typeof a && a || "function" == typeof a && a(e, t) || Array.isArray(a) && a[t] || function(e, t) {
for (var a = 0; a < t.length; a++) if (-1 < e.indexOf(t[a])) return !0;
return !1;
}(o, r.BAD_DELIMITERS) || -1 < o.indexOf(n) || " " === o.charAt(0) || " " === o.charAt(o.length - 1) ? s + o + s : o;
}
}
};
if (r.RECORD_SEP = String.fromCharCode(30), r.UNIT_SEP = String.fromCharCode(31), 
r.BYTE_ORDER_MARK = "\ufeff", r.BAD_DELIMITERS = [ "\r", "\n", '"', r.BYTE_ORDER_MARK ], 
r.WORKERS_SUPPORTED = !a && !!t.Worker, r.NODE_STREAM_INPUT = 1, r.LocalChunkSize = 10485760, 
r.RemoteChunkSize = 5242880, r.DefaultDelimiter = ",", r.Parser = y, r.ParserHandle = u, 
r.NetworkStreamer = l, r.FileStreamer = d, r.StringStreamer = h, r.ReadableStreamStreamer = p, 
t.jQuery) {
var s = t.jQuery;
s.fn.parse = function(e) {
var a = e.config || {}, o = [];
return this.each(function() {
if ("INPUT" !== s(this).prop("tagName").toUpperCase() || "file" !== s(this).attr("type").toLowerCase() || !t.FileReader || !this.files || 0 === this.files.length) return !0;
for (var e = 0; e < this.files.length; e++) o.push({
file: this.files[e],
inputElem: this,
instanceConfig: s.extend({}, a)
});
}), n(), this;
function n() {
if (0 !== o.length) {
var t, a, n, c = o[0];
if (w(e.before)) {
var l = e.before(c.file, c.inputElem);
if ("object" == typeof l) {
if ("abort" === l.action) return t = c.file, a = c.inputElem, n = l.reason, void (w(e.error) && e.error({
name: "AbortError"
}, t, a, n));
if ("skip" === l.action) return void i();
"object" == typeof l.config && (c.instanceConfig = s.extend(c.instanceConfig, l.config));
} else if ("skip" === l) return void i();
}
var d = c.instanceConfig.complete;
c.instanceConfig.complete = function(e) {
w(d) && d(e, c.file, c.inputElem), i();
}, r.parse(c.file, c.instanceConfig);
} else w(e.complete) && e.complete();
}
function i() {
o.splice(0, 1), n();
}
};
}
function c(e) {
this._handle = null, this._finished = !1, this._completed = !1, this._halted = !1, 
this._input = null, this._baseIndex = 0, this._partialLine = "", this._rowCount = 0, 
this._start = 0, this._nextChunk = null, this.isFirstChunk = !0, this._completeResults = {
data: [],
errors: [],
meta: {}
}, function(e) {
var t = G(e);
t.chunkSize = parseInt(t.chunkSize), e.step || e.chunk || (t.chunkSize = null);
this._handle = new u(t), (this._handle.streamer = this)._config = t;
}.call(this, e), this.parseChunk = function(e, a) {
if (this.isFirstChunk && w(this._config.beforeFirstChunk)) {
var n = this._config.beforeFirstChunk(e);
void 0 !== n && (e = n);
}
this.isFirstChunk = !1, this._halted = !1;
var i = this._partialLine + e;
this._partialLine = "";
var s = this._handle.parse(i, this._baseIndex, !this._finished);
if (!this._handle.paused() && !this._handle.aborted()) {
var c = s.meta.cursor;
this._finished || (this._partialLine = i.substring(c - this._baseIndex), this._baseIndex = c), 
s && s.data && (this._rowCount += s.data.length);
var l = this._finished || this._config.preview && this._rowCount >= this._config.preview;
if (o) t.postMessage({
results: s,
workerId: r.WORKER_ID,
finished: l
}); else if (w(this._config.chunk) && !a) {
if (this._config.chunk(s, this._handle), this._handle.paused() || this._handle.aborted()) return void (this._halted = !0);
s = void 0, this._completeResults = void 0;
}
return this._config.step || this._config.chunk || (this._completeResults.data = this._completeResults.data.concat(s.data), 
this._completeResults.errors = this._completeResults.errors.concat(s.errors), this._completeResults.meta = s.meta), 
this._completed || !l || !w(this._config.complete) || s && s.meta.aborted || (this._config.complete(this._completeResults, this._input), 
this._completed = !0), l || s && s.meta.paused || this._nextChunk(), s;
}
this._halted = !0;
}, this._sendError = function(e) {
w(this._config.error) ? this._config.error(e) : o && this._config.error && t.postMessage({
workerId: r.WORKER_ID,
error: e,
finished: !1
});
};
}
function l(e) {
var t;
(e = e || {}).chunkSize || (e.chunkSize = r.RemoteChunkSize), c.call(this, e), this._nextChunk = a ? function() {
this._readChunk(), this._chunkLoaded();
} : function() {
this._readChunk();
}, this.stream = function(e) {
this._input = e, this._nextChunk();
}, this._readChunk = function() {
if (this._finished) this._chunkLoaded(); else {
if (t = new XMLHttpRequest(), this._config.withCredentials && (t.withCredentials = this._config.withCredentials), 
a || (t.onload = P(this._chunkLoaded, this), t.onerror = P(this._chunkError, this)), 
t.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !a), this._config.downloadRequestHeaders) {
var e = this._config.downloadRequestHeaders;
for (var o in e) t.setRequestHeader(o, e[o]);
}
if (this._config.chunkSize) {
var n = this._start + this._config.chunkSize - 1;
t.setRequestHeader("Range", "bytes=" + this._start + "-" + n);
}
try {
t.send(this._config.downloadRequestBody);
} catch (e) {
this._chunkError(e.message);
}
a && 0 === t.status && this._chunkError();
}
}, this._chunkLoaded = function() {
4 === t.readyState && (t.status < 200 || 400 <= t.status ? this._chunkError() : (this._start += this._config.chunkSize ? this._config.chunkSize : t.responseText.length, 
this._finished = !this._config.chunkSize || this._start >= (null === (e = t.getResponseHeader("Content-Range")) ? -1 : parseInt(e.substring(e.lastIndexOf("/") + 1))), 
this.parseChunk(t.responseText)));
var e;
}, this._chunkError = function(e) {
var a = t.statusText || e;
this._sendError(new Error(a));
};
}
function d(e) {
var t, a;
(e = e || {}).chunkSize || (e.chunkSize = r.LocalChunkSize), c.call(this, e);
var o = "undefined" != typeof FileReader;
this.stream = function(e) {
this._input = e, a = e.slice || e.webkitSlice || e.mozSlice, o ? ((t = new FileReader()).onload = P(this._chunkLoaded, this), 
t.onerror = P(this._chunkError, this)) : t = new FileReaderSync(), this._nextChunk();
}, this._nextChunk = function() {
this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
}, this._readChunk = function() {
var e = this._input;
if (this._config.chunkSize) {
var n = Math.min(this._start + this._config.chunkSize, this._input.size);
e = a.call(e, this._start, n);
}
var i = t.readAsText(e, this._config.encoding);
o || this._chunkLoaded({
target: {
result: i
}
});
}, this._chunkLoaded = function(e) {
this._start += this._config.chunkSize, this._finished = !this._config.chunkSize || this._start >= this._input.size, 
this.parseChunk(e.target.result);
}, this._chunkError = function() {
this._sendError(t.error);
};
}
function h(e) {
var t;
c.call(this, e = e || {}), this.stream = function(e) {
return t = e, this._nextChunk();
}, this._nextChunk = function() {
if (!this._finished) {
var e, a = this._config.chunkSize;
return a ? (e = t.substring(0, a), t = t.substring(a)) : (e = t, t = ""), this._finished = !t, 
this.parseChunk(e);
}
};
}
function p(e) {
c.call(this, e = e || {});
var t = [], a = !0, o = !1;
this.pause = function() {
c.prototype.pause.apply(this, arguments), this._input.pause();
}, this.resume = function() {
c.prototype.resume.apply(this, arguments), this._input.resume();
}, this.stream = function(e) {
this._input = e, this._input.on("data", this._streamData), this._input.on("end", this._streamEnd), 
this._input.on("error", this._streamError);
}, this._checkIsFinished = function() {
o && 1 === t.length && (this._finished = !0);
}, this._nextChunk = function() {
this._checkIsFinished(), t.length ? this.parseChunk(t.shift()) : a = !0;
}, this._streamData = P(function(e) {
try {
t.push("string" == typeof e ? e : e.toString(this._config.encoding)), a && (a = !1, 
this._checkIsFinished(), this.parseChunk(t.shift()));
} catch (e) {
this._streamError(e);
}
}, this), this._streamError = P(function(e) {
this._streamCleanUp(), this._sendError(e);
}, this), this._streamEnd = P(function() {
this._streamCleanUp(), o = !0, this._streamData("");
}, this), this._streamCleanUp = P(function() {
this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), 
this._input.removeListener("error", this._streamError);
}, this);
}
function u(e) {
var t, a, o, n = Math.pow(2, 53), i = -n, s = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, c = /^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/, l = this, d = 0, h = 0, p = !1, u = !1, m = [], g = {
data: [],
errors: [],
meta: {}
};
if (w(e.step)) {
var v = e.step;
e.step = function(t) {
if (g = t, A()) M(); else {
if (M(), 0 === g.data.length) return;
d += t.data.length, e.preview && d > e.preview ? a.abort() : (g.data = g.data[0], 
v(g, l));
}
};
}
function P(t) {
return "greedy" === e.skipEmptyLines ? "" === t.join("").trim() : 1 === t.length && 0 === t[0].length;
}
function M() {
if (g && o && (S("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + r.DefaultDelimiter + "'"), 
o = !1), e.skipEmptyLines) for (var t = 0; t < g.data.length; t++) P(g.data[t]) && g.data.splice(t--, 1);
return A() && function() {
if (g) if (Array.isArray(g.data[0])) {
for (var t = 0; A() && t < g.data.length; t++) g.data[t].forEach(a);
g.data.splice(0, 1);
} else g.data.forEach(a);
function a(t, a) {
w(e.transformHeader) && (t = e.transformHeader(t, a)), m.push(t);
}
}(), function() {
if (!g || !e.header && !e.dynamicTyping && !e.transform) return g;
function t(t, a) {
var o, n = e.header ? {} : [];
for (o = 0; o < t.length; o++) {
var i = o, r = t[o];
e.header && (i = o >= m.length ? "__parsed_extra" : m[o]), e.transform && (r = e.transform(r, i)), 
r = b(i, r), "__parsed_extra" === i ? (n[i] = n[i] || [], n[i].push(r)) : n[i] = r;
}
return e.header && (o > m.length ? S("FieldMismatch", "TooManyFields", "Too many fields: expected " + m.length + " fields but parsed " + o, h + a) : o < m.length && S("FieldMismatch", "TooFewFields", "Too few fields: expected " + m.length + " fields but parsed " + o, h + a)), 
n;
}
var a = 1;
!g.data.length || Array.isArray(g.data[0]) ? (g.data = g.data.map(t), a = g.data.length) : g.data = t(g.data, 0);
e.header && g.meta && (g.meta.fields = m);
return h += a, g;
}();
}
function A() {
return e.header && 0 === m.length;
}
function b(t, a) {
return o = t, e.dynamicTypingFunction && void 0 === e.dynamicTyping[o] && (e.dynamicTyping[o] = e.dynamicTypingFunction(o)), 
!0 === (e.dynamicTyping[o] || e.dynamicTyping) ? "true" === a || "TRUE" === a || "false" !== a && "FALSE" !== a && (function(e) {
if (s.test(e)) {
var t = parseFloat(e);
if (i < t && t < n) return !0;
}
return !1;
}(a) ? parseFloat(a) : c.test(a) ? new Date(a) : "" === a ? null : a) : a;
var o;
}
function S(e, t, a, o) {
var n = {
type: e,
code: t,
message: a
};
void 0 !== o && (n.row = o), g.errors.push(n);
}
this.parse = function(n, i, s) {
var c = e.quoteChar || '"';
if (e.newline || (e.newline = function(e, t) {
e = e.substring(0, 1048576);
var a = new RegExp(f(t) + "([^]*?)" + f(t), "gm"), o = (e = e.replace(a, "")).split("\r"), n = e.split("\n"), i = 1 < n.length && n[0].length < o[0].length;
if (1 === o.length || i) return "\n";
for (var r = 0, s = 0; s < o.length; s++) "\n" === o[s][0] && r++;
return r >= o.length / 2 ? "\r\n" : "\r";
}(n, c)), o = !1, e.delimiter) w(e.delimiter) && (e.delimiter = e.delimiter(n), 
g.meta.delimiter = e.delimiter); else {
var l = function(t, a, o, n, i) {
var s, c, l, d;
i = i || [ ",", "\t", "|", ";", r.RECORD_SEP, r.UNIT_SEP ];
for (var h = 0; h < i.length; h++) {
var p = i[h], u = 0, f = 0, m = 0;
l = void 0;
for (var g = new y({
comments: n,
delimiter: p,
newline: a,
preview: 10
}).parse(t), v = 0; v < g.data.length; v++) if (o && P(g.data[v])) m++; else {
var G = g.data[v].length;
f += G, void 0 !== l ? 0 < G && (u += Math.abs(G - l), l = G) : l = G;
}
0 < g.data.length && (f /= g.data.length - m), (void 0 === c || u <= c) && (void 0 === d || d < f) && 1.99 < f && (c = u, 
s = p, d = f);
}
return {
successful: !!(e.delimiter = s),
bestDelimiter: s
};
}(n, e.newline, e.skipEmptyLines, e.comments, e.delimitersToGuess);
l.successful ? e.delimiter = l.bestDelimiter : (o = !0, e.delimiter = r.DefaultDelimiter), 
g.meta.delimiter = e.delimiter;
}
var d = G(e);
return e.preview && e.header && d.preview++, t = n, a = new y(d), g = a.parse(t, i, s), 
M(), p ? {
meta: {
paused: !0
}
} : g || {
meta: {
paused: !1
}
};
}, this.paused = function() {
return p;
}, this.pause = function() {
p = !0, a.abort(), t = w(e.chunk) ? "" : t.substring(a.getCharIndex());
}, this.resume = function() {
l.streamer._halted ? (p = !1, l.streamer.parseChunk(t, !0)) : setTimeout(l.resume, 3);
}, this.aborted = function() {
return u;
}, this.abort = function() {
u = !0, a.abort(), g.meta.aborted = !0, w(e.complete) && e.complete(g), t = "";
};
}
function f(e) {
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}
function y(e) {
var t, a = (e = e || {}).delimiter, o = e.newline, n = e.comments, i = e.step, s = e.preview, c = e.fastMode, l = t = void 0 === e.quoteChar ? '"' : e.quoteChar;
if (void 0 !== e.escapeChar && (l = e.escapeChar), ("string" != typeof a || -1 < r.BAD_DELIMITERS.indexOf(a)) && (a = ","), 
n === a) throw new Error("Comment character same as delimiter");
!0 === n ? n = "#" : ("string" != typeof n || -1 < r.BAD_DELIMITERS.indexOf(n)) && (n = !1), 
"\n" !== o && "\r" !== o && "\r\n" !== o && (o = "\n");
var d = 0, h = !1;
this.parse = function(e, r, p) {
if ("string" != typeof e) throw new Error("Input must be a string");
var u = e.length, y = a.length, m = o.length, g = n.length, v = w(i), G = [], P = [], M = [], A = d = 0;
if (!e) return B();
if (c || !1 !== c && -1 === e.indexOf(t)) {
for (var b = e.split(o), S = 0; S < b.length; S++) {
if (M = b[S], d += M.length, S !== b.length - 1) d += o.length; else if (p) return B();
if (!n || M.substring(0, g) !== n) {
if (v) {
if (G = [], _(M.split(a)), O(), h) return B();
} else _(M.split(a));
if (s && s <= S) return G = G.slice(0, s), B(!0);
}
}
return B();
}
for (var D = e.indexOf(a, d), T = e.indexOf(o, d), k = new RegExp(f(l) + f(t), "g"), I = e.indexOf(t, d); ;) if (e[d] !== t) if (n && 0 === M.length && e.substring(d, d + g) === n) {
if (-1 === T) return B();
d = T + m, T = e.indexOf(o, d), D = e.indexOf(a, d);
} else if (-1 !== D && (D < T || -1 === T)) M.push(e.substring(d, D)), d = D + y, 
D = e.indexOf(a, d); else {
if (-1 === T) break;
if (M.push(e.substring(d, T)), E(T + m), v && (O(), h)) return B();
if (s && G.length >= s) return B(!0);
} else for (I = d, d++; ;) {
if (-1 === (I = e.indexOf(t, I + 1))) return p || P.push({
type: "Quotes",
code: "MissingQuotes",
message: "Quoted field unterminated",
row: G.length,
index: d
}), N();
if (I === u - 1) return N(e.substring(d, I).replace(k, t));
if (t !== l || e[I + 1] !== l) {
if (t === l || 0 === I || e[I - 1] !== l) {
-1 !== D && D < I + 1 && (D = e.indexOf(a, I + 1)), -1 !== T && T < I + 1 && (T = e.indexOf(o, I + 1));
var C = R(-1 === T ? D : Math.min(D, T));
if (e[I + 1 + C] === a) {
M.push(e.substring(d, I).replace(k, t)), e[d = I + 1 + C + y] !== t && (I = e.indexOf(t, d)), 
D = e.indexOf(a, d), T = e.indexOf(o, d);
break;
}
var x = R(T);
if (e.substring(I + 1 + x, I + 1 + x + m) === o) {
if (M.push(e.substring(d, I).replace(k, t)), E(I + 1 + x + m), D = e.indexOf(a, d), 
I = e.indexOf(t, d), v && (O(), h)) return B();
if (s && G.length >= s) return B(!0);
break;
}
P.push({
type: "Quotes",
code: "InvalidQuotes",
message: "Trailing quote on quoted field is malformed",
row: G.length,
index: d
}), I++;
}
} else I++;
}
return N();
function _(e) {
G.push(e), A = d;
}
function R(t) {
var a = 0;
if (-1 !== t) {
var o = e.substring(I + 1, t);
o && "" === o.trim() && (a = o.length);
}
return a;
}
function N(t) {
return p || (void 0 === t && (t = e.substring(d)), M.push(t), d = u, _(M), v && O()), 
B();
}
function E(t) {
d = t, _(M), M = [], T = e.indexOf(o, d);
}
function B(e) {
return {
data: G,
errors: P,
meta: {
delimiter: a,
linebreak: o,
aborted: h,
truncated: !!e,
cursor: A + (r || 0)
}
};
}
function O() {
i(B()), G = [], P = [];
}
}, this.abort = function() {
h = !0;
}, this.getCharIndex = function() {
return d;
};
}
function m(e) {
var t = e.data, a = n[t.workerId], o = !1;
if (t.error) a.userError(t.error, t.file); else if (t.results && t.results.data) {
var i = {
abort: function() {
o = !0, g(t.workerId, {
data: [],
errors: [],
meta: {
aborted: !0
}
});
},
pause: v,
resume: v
};
if (w(a.userStep)) {
for (var r = 0; r < t.results.data.length && (a.userStep({
data: t.results.data[r],
errors: t.results.errors,
meta: t.results.meta
}, i), !o); r++) ;
delete t.results;
} else w(a.userChunk) && (a.userChunk(t.results, i, t.file), delete t.results);
}
t.finished && !o && g(t.workerId, t.results);
}
function g(e, t) {
var a = n[e];
w(a.userComplete) && a.userComplete(t), a.terminate(), delete n[e];
}
function v() {
throw new Error("Not implemented.");
}
function G(e) {
if ("object" != typeof e || null === e) return e;
var t = Array.isArray(e) ? [] : {};
for (var a in e) t[a] = G(e[a]);
return t;
}
function P(e, t) {
return function() {
e.apply(t, arguments);
};
}
function w(e) {
return "function" == typeof e;
}
return o && (t.onmessage = function(e) {
var a = e.data;
void 0 === r.WORKER_ID && a && (r.WORKER_ID = a.workerId);
if ("string" == typeof a.input) t.postMessage({
workerId: r.WORKER_ID,
results: r.parse(a.input, a.config),
finished: !0
}); else if (t.File && a.input instanceof File || a.input instanceof Object) {
var o = r.parse(a.input, a.config);
o && t.postMessage({
workerId: r.WORKER_ID,
results: o,
finished: !0
});
}
}), (l.prototype = Object.create(c.prototype)).constructor = l, (d.prototype = Object.create(c.prototype)).constructor = d, 
(h.prototype = Object.create(h.prototype)).constructor = h, (p.prototype = Object.create(c.prototype)).constructor = p, 
r;
}, "function" == typeof define && define.amd ? define([], o) : "object" == typeof t && "undefined" != typeof a ? t.exports = o() : this.Papa = o();
var o;
}, {} ],
ActionCollect: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "28139bdGwpK4rEpbIxYB6Hy", "ActionCollect");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) t.hasOwnProperty(a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = cc._decorator, s = r.ccclass, c = r.property, l = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.tag = "Money";
t.spriteFrame = null;
t.target = null;
t.bornPos = null;
t.pool = new cc.NodePool();
t.list = [];
return t;
}
t.prototype.onEnable = function() {
cc.systemEvent.on("Action_Collect_" + this.tag, this.doAction, this);
};
t.prototype.onDisable = function() {
var e = this;
this.list.forEach(function(t) {
return e.putNode(t.node);
});
this.list = [];
cc.systemEvent.targetOff(this);
};
t.prototype.start = function() {};
t.prototype.doAction = function(e) {
var t = this;
if (this.target) {
var a = cc.v2();
a = e.pos ? this.node.parent.convertToNodeSpaceAR(e.pos) : this.node.parent.convertToNodeSpaceAR(this.bornPos.convertToWorldSpaceAR(cc.v2()));
var o = this.node.parent.convertToNodeSpaceAR(this.target.convertToWorldSpaceAR(cc.Vec2.ZERO));
isNaN(e.radius) && (e.radius = 120);
isNaN(e.duration) && (e.duration = 1);
isNaN(e.count) && (e.count = 30);
isNaN(e.zIndex) && (e.zIndex = 0);
this.list.forEach(function(e) {
return t.putNode(e.node);
});
this.list = [];
if (e.count > 1) {
for (var n = this.getCirclePoints(e.radius, a, e.count), i = 0; i < n.length; i++) {
(r = this.getNode()).zIndex = e.zIndex;
r.parent = this.node.parent;
this.list.push({
startPos: n[i],
dis: n[i].sub(a).mag(),
node: r
});
}
this.list.sort(function(e) {
return e.dis;
});
} else if (1 == e.count) {
var r;
(r = this.getNode()).zIndex = e.zIndex;
r.parent = this.node.parent;
this.list.push({
startPos: a,
dis: 0,
node: r
});
}
"money" == this.tag && AudioManager.playEffect(AudioName.GainGold);
AudioManager.playEffect("Money" == this.tag ? AudioName.GainGold : AudioName.GainDiamond);
this.list.forEach(function(n, i) {
cc.tween(n.node).set({
position: cc.v3(a),
active: !0
}).to(.3, {
position: cc.v3(n.startPos)
}).delay(.03 * i).bezierTo(e.duration, n.startPos.add(cc.v2(GA.rand(-300, 300), GA.rand(-200, 200))), o, o, {
easing: "quadIn"
}).set({
active: !1
}).call(function() {
t.putNode(n.node);
i == t.list.length - 1 && e.endCallback && e.endCallback();
}).start();
});
}
};
t.prototype.getNode = function() {
if (this.pool.size() > 0) return this.pool.get();
var e = new cc.Node();
e.addComponent(cc.Sprite).spriteFrame = this.spriteFrame;
e.active = !1;
return e;
};
t.prototype.putNode = function(e) {
cc.Tween.stopAllByTarget(e);
this.pool ? this.pool.put(e) : e.destroy();
};
t.prototype.getCirclePoints = function(e, t, a, o, n) {
void 0 === o && (o = 60);
void 0 === n && (n = 360);
for (var i = [], r = Math.PI / 180 * Math.round(n / a), s = 0; s < a; s++) {
var c = t.x + e * Math.sin(r * s), l = t.y + e * Math.cos(r * s);
i.unshift(cc.v2(c + Math.random() * o, l + Math.random() * o));
}
return i;
};
i([ c ], t.prototype, "tag", void 0);
i([ c(cc.SpriteFrame) ], t.prototype, "spriteFrame", void 0);
i([ c(cc.Node) ], t.prototype, "target", void 0);
i([ c(cc.Node) ], t.prototype, "bornPos", void 0);
return i([ s ], t);
}(cc.Component);
a.default = l;
cc._RF.pop();
}, {} ],
AddGoldPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "9b3c6tIKndPRJDMFbnVBtVy", "AddGoldPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Config/GConfig"), c = e("../GameLogic"), l = e("../Global/GAd"), d = e("../Global/Global"), h = e("../Global/GTemporary"), p = e("../Global/GTool"), u = e("../Manager/MData"), f = e("../Manager/PopupManager"), y = cc._decorator, m = y.ccclass, g = y.property, v = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.labelGetTime = null;
t.labelReward = null;
t.labelFinalReward = null;
t.btnGain = null;
t.btnCheat = null;
t.wechatCanCheat = !1;
t.showCheatBanner = !1;
t.onShowCallback = null;
return t;
}
t.prototype.start = function() {
var e = this;
h.GTemporary.inWarehousePopup || cc.systemEvent.emit(EventsName.ShowGameClubBtn, !1);
if (GA.isWeChat()) {
this.wechatCanCheat = d.G.checkWeChatCanCheatClick(d.CheatPos.AddGold);
if (this.wechatCanCheat) {
h.GTemporary.CheatPopup = this.node;
this.onShowCallback = function() {
var e;
null === (e = h.GTemporary.CheatPopup) || void 0 === e || e.getComponent(r.default).hide();
};
this.btnCheat.clickEvents = [];
1 == s.GConfig.ServerConfig.WechatCheatAddGold ? this.btnCheat.node.on("click", function() {
e.btnCheat.node.off("click");
d.G.triggerCheatReport(d.CheatPos.AddGold);
console.log("点了骗点了");
e.scheduleOnce(function() {
console.log("显示广告");
c.default.instance.showBanner("CheatBanner", 0, 0);
e.showCheatBanner = !0;
GA.PA.onShow(e.onShowCallback);
e.scheduleOnce(function() {
e.btnCheat.node.on("click", function() {
e.clickClose();
});
console.log("关闭广告");
e.showCheatBanner = !1;
GA.PA.offShow(e.onShowCallback);
c.default.instance.hideBanner("CheatBanner");
}, 1);
}, .5);
}) : this.btnCheat.node.on("click", function() {
console.log("骗点视频");
d.G.triggerCheatReport(d.CheatPos.AddGold);
e.btnCheat.node.off("click");
e.btnCheat.node.on("click", function() {
e.clickClose();
});
GA.rewardOperation({
tag: RewardType.Cheat,
page: "AddGold",
byVideo: !0,
result: function() {}
});
});
}
this.wechatCanCheat || 1 != s.GConfig.ServerConfig.GoldPageBannerSwitch || l.GAd.showBanner("banner2", 0, GA.PA.getSystemInfoSync().screenWidth / 2 + 50);
c.default.instance.showSudokuN(!0);
h.GTemporary.inWarehousePopup ? l.GAd.hideBanner("banner") : l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Main,
show: !1
} ]);
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.LeftVertical,
show: !0
} ]);
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, this.node, !0) : GA.isAndroid() && "Inland" == h.GTemporary.region && !GA.Info.underCheck && GA.showNativeAd({
offsetX: 500,
type: 2
});
this.labelFinalReward.string = "x" + GA.formatNumber(u.MData.getFinalGoldRewardNumber());
this.refresh();
};
t.prototype.refresh = function() {
this.labelGetTime.string = u.MData.getGoldSupplyTime().toString();
this.labelReward.string = "x" + GA.formatNumber(u.MData.getNextGoldRewardNumber());
};
t.prototype.clickGetGold = function() {
var e = this;
p.GTool.sendBtnEvent("点击添加金币");
if (u.MData.checkShowShareAddGoldPopup() && GA.isWeChat()) {
p.GTool.sentLogs([ {
eventId: "打开分享金币弹窗"
} ]);
this.hide();
f.PopupManager.show(UIPath.ShareAddGoldPopup);
} else GA.rewardOperation({
tag: RewardType.AddGold,
byVideo: p.GTool.isNextRewardVideo(RewardType.AddGold),
page: "AddGold",
result: function(t) {
if (t.reward) {
var a = u.MData.getNextGoldRewardNumber();
p.GTool.showToast(p.GTool.getLanguage("获得金币") + a);
u.MData.addGold(a, !1);
cc.systemEvent.emit(EventsName.GainGold, {
pos: e.btnGain.convertToWorldSpaceAR(cc.v3()),
endCallback: function() {
cc.systemEvent.emit(EventsName.Refresh);
}
});
u.MData.addGetGoldSupplyTime(!0);
e.refresh();
e.hide();
}
}
});
};
t.prototype.clickClose = function() {
p.GTool.sendBtnEvent("关闭金币弹窗");
AudioManager.playEffect(AudioName.BtnClose);
e.prototype.clickClose.call(this);
};
t.prototype.onDestroy = function() {
h.GTemporary.inWarehousePopup || cc.systemEvent.emit(EventsName.ShowGameClubBtn, !0);
if (GA.isWeChat()) {
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.LeftVertical,
show: !1
} ]);
this.wechatCanCheat || 1 != s.GConfig.ServerConfig.GoldPageBannerSwitch || l.GAd.hideBanner("banner2");
c.default.instance.showSudokuN(!1);
h.GTemporary.inWarehousePopup ? l.GAd.showBanner("banner", 0, 0) : l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Main,
show: !0
} ]);
if (this.wechatCanCheat && this.showCheatBanner) {
c.default.instance.hideBanner("CheatBanner");
GA.PA.offShow(this.onShowCallback);
h.GTemporary.CheatPopup = null;
}
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, null, !1) : GA.isAndroid() && "Inland" == h.GTemporary.region && !GA.Info.underCheck && GA.hideNativeAd();
cc.systemEvent.emit(EventsName.StartMainGuide);
};
i([ g(cc.Label) ], t.prototype, "labelGetTime", void 0);
i([ g(cc.Label) ], t.prototype, "labelReward", void 0);
i([ g(cc.Label) ], t.prototype, "labelFinalReward", void 0);
i([ g(cc.Node) ], t.prototype, "btnGain", void 0);
i([ g(cc.Button) ], t.prototype, "btnCheat", void 0);
return i([ m ], t);
}(r.default);
a.default = v;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Config/GConfig": "GConfig",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Global/Global": "Global",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager"
} ],
AdjustBG: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "1ff51EjumxNpJPkSJMu0r24", "AdjustBG");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) t.hasOwnProperty(a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = cc._decorator, s = r.ccclass, c = (r.property, function(e) {
n(t, e);
function t() {
return null !== e && e.apply(this, arguments) || this;
}
t.prototype.onLoad = function() {
if (cc.winSize.height > this.node.height && !GA.isM4399MiniGame()) {
var e = cc.winSize.height / this.node.height;
this.node.scale = e;
} else if (cc.winSize.width > this.node.width && !GA.isM4399MiniGame()) {
e = cc.winSize.width / this.node.width;
this.node.scale = e;
}
};
return i([ s ], t);
}(cc.Component));
a.default = c;
cc._RF.pop();
}, {} ],
AudioManager: [ function(e, t) {
"use strict";
cc._RF.push(t, "be95fv7VbBMhbQLKaQ0EzLd", "AudioManager");
window.AudioManager = new (function() {
function e() {
this.map = new Map();
this.audioBundle = null;
this.bgMusicID = 0;
this.currentBG = "";
this.audioSwitch = !0;
this.virbrateSwitch = !0;
}
e.prototype.playEffect = function(e, t) {
var a = this;
void 0 === t && (t = !1);
if (this.audioSwitch) if (this.map.has(e)) {
var o = this.map.get(e);
o instanceof cc.AudioClip && cc.audioEngine.playEffect(o, t);
} else {
var n = e;
this.audioBundle.load(n, cc.AudioClip, function(o, n) {
if (o) cc.error(o); else {
a.map.set(e, n);
cc.audioEngine.playEffect(n, t);
}
});
}
};
e.prototype.stopAllEffect = function() {
this.audioSwitch && cc.audioEngine.stopAllEffects();
};
e.prototype.pauseAll = function() {
this.audioSwitch && cc.audioEngine.pauseAll();
};
e.prototype.remuseAll = function() {
this.audioSwitch && cc.audioEngine.resumeAll();
};
e.prototype.playBGMusic = function(e, t) {
var a = this;
if (this.audioSwitch) {
this.currentBG = e;
if (t) {
cc.audioEngine.stopMusic();
if (this.map.has(e)) {
var o = this.map.get(e);
o instanceof cc.AudioClip && this.currentBG == e && (this.bgMusicID = cc.audioEngine.playMusic(o, !0));
} else {
var n = e;
this.audioBundle.load(n, cc.AudioClip, function(t, o) {
if (t) cc.error(t); else {
a.map.set(e, o);
a.currentBG == e && (a.bgMusicID = cc.audioEngine.playMusic(o, !0));
}
});
}
} else cc.audioEngine.stop(this.bgMusicID);
}
};
e.prototype.vibrateShort = function(e) {
!GA.isM4399MiniGame() && this.virbrateSwitch && GA.PA.vibrateShort(e);
};
e.prototype.vibrateLong = function(e) {
!GA.isM4399MiniGame() && this.virbrateSwitch && GA.PA.vibrateLong(e);
};
return e;
}())();
cc._RF.pop();
}, {} ],
AudioName: [ function(e, t) {
"use strict";
cc._RF.push(t, "5f71bE5MExN8Zc7JBKWeEll", "AudioName");
window.AudioName = new function() {
this.Assemble1 = "Assemble1";
this.Assemble2 = "Assemble2";
this.BGMBattle = "BGMBattle";
this.BGMMain = "BGMMain";
this.BossWarn = "BossWarn";
this.BtnCantClick = "BtnCantClick";
this.BtnClick = "BtnClick";
this.BtnClose = "BtnClose";
this.Defeat = "Defeat";
this.GainDiamond = "GainDiamond";
this.GainGold = "GainGold";
this.Mix = "Mix";
this.NewPart = "NewPart";
this.Recycle = "Recycle";
this.Victory = "Victory";
this.Draw = "Draw";
this.FinishDraw = "FinishDraw";
}();
cc._RF.pop();
}, {} ],
BankPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "689ffR0bkBMxY9tpu8CmcSM", "BankPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Config/GConfig"), c = e("../GameLogic"), l = e("../Global/GAd"), d = e("../Global/GTemporary"), h = e("../Global/GTool"), p = e("../Manager/MData"), u = cc._decorator, f = u.ccclass, y = u.property, m = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.btnRedeem = null;
t.labelProgress = null;
t.labelDebris = null;
return t;
}
t.prototype.start = function() {
d.GTemporary.inWarehousePopup || cc.systemEvent.emit(EventsName.ShowGameClubBtn, !1);
if (GA.isWeChat()) {
1 == s.GConfig.ServerConfig.GoldPageBannerSwitch && l.GAd.showBanner("banner2", 0, GA.PA.getSystemInfoSync().screenWidth / 2 + 50);
c.default.instance.showSudokuN(!0);
d.GTemporary.inWarehousePopup && l.GAd.hideBanner("banner");
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.LeftVertical,
show: !0
}, {
pos: l.AdPos.Main,
show: !1
} ]);
c.default.instance.showAuthBtn(!1);
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, this.node, !0) : GA.isAndroid() && "Inland" == d.GTemporary.region && !GA.Info.underCheck && GA.showNativeAd({
offsetX: 500,
type: 2
});
this.btnRedeem.getComponent(cc.Button).interactable = 5 != p.MData.userData.userData.redeemTime;
this.labelProgress.string = p.MData.userData.userData.redeemTime + "/5";
this.labelDebris.string = GA.formatNumber(p.MData.getMechaDebris(3));
};
t.prototype.clickRedeem = function() {
if (p.MData.canAffordDebris(3, 1)) {
p.MData.addDebris(3, -1, !1);
this.labelDebris.string = GA.formatNumber(p.MData.getMechaDebris(3));
p.MData.addGold(500, !1);
h.GTool.showToast("兑换成功,获得500金币");
cc.systemEvent.emit(EventsName.GainGold, {
pos: this.btnRedeem.convertToWorldSpaceAR(cc.v3()),
endCallback: function() {
cc.systemEvent.emit(EventsName.Refresh);
}
});
p.MData.userData.userData.redeemTime++;
this.labelProgress.string = p.MData.userData.userData.redeemTime + "/5";
this.btnRedeem.getComponent(cc.Button).interactable = 5 != p.MData.userData.userData.redeemTime;
} else h.GTool.showToast("碎片不足");
};
t.prototype.clickClose = function() {
h.GTool.sendBtnEvent("关闭银行弹窗");
AudioManager.playEffect(AudioName.BtnClose);
e.prototype.clickClose.call(this);
};
t.prototype.onDestroy = function() {
d.GTemporary.inWarehousePopup || cc.systemEvent.emit(EventsName.ShowGameClubBtn, !0);
if (GA.isWeChat()) {
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.LeftVertical,
show: !1
}, {
pos: l.AdPos.Main,
show: !0
} ]);
1 == s.GConfig.ServerConfig.GoldPageBannerSwitch && l.GAd.hideBanner("banner2");
c.default.instance.showSudokuN(!1);
d.GTemporary.inWarehousePopup && l.GAd.showBanner("banner", 0, 0);
c.default.instance.showAuthBtn(!0);
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, null, !1) : GA.isAndroid() && "Inland" == d.GTemporary.region && !GA.Info.underCheck && GA.hideNativeAd();
cc.systemEvent.emit(EventsName.StartMainGuide);
};
i([ y(cc.Node) ], t.prototype, "btnRedeem", void 0);
i([ y(cc.Label) ], t.prototype, "labelProgress", void 0);
i([ y(cc.Label) ], t.prototype, "labelDebris", void 0);
return i([ f ], t);
}(r.default);
a.default = m;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Config/GConfig": "GConfig",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Manager/MData": "MData"
} ],
BaseMecha: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "78befmRe5lPT4e/wJo9yVWS", "BaseMecha");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) t.hasOwnProperty(a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
a.MechaStatus = void 0;
var r, s = e("../Global/GTemporary");
(function(e) {
e[e.StandBy = 0] = "StandBy";
e[e.GetHurt = 1] = "GetHurt";
e[e.Die = 2] = "Die";
e[e.Attack = 3] = "Attack";
})(r = a.MechaStatus || (a.MechaStatus = {}));
var c = cc._decorator, l = c.ccclass, d = c.property, h = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.spine = null;
t.mechaStatus = r.StandBy;
t.isPlayer = !0;
return t;
}
t.prototype.playSpine = function(e, t, a, o) {
void 0 === o && (o = !1);
};
t.prototype.getHurt = function() {};
t.prototype.getDieAniName = function() {
return this.isPlayer ? s.GTemporary.myData.Awaken ? "die2" : "die" : s.GTemporary.enemyData.Awaken ? "die2" : "die";
};
t.prototype.getGetHurtAniName = function() {
return this.isPlayer ? s.GTemporary.myData.Awaken ? "hit2" : "hit" : s.GTemporary.enemyData.Awaken ? "hit2" : "hit";
};
t.prototype.getstandbyName = function() {
return this.isPlayer ? s.GTemporary.myData.Awaken ? "standby2" : "standby1" : s.GTemporary.enemyData.Awaken ? "standby2" : "standby1";
};
i([ d(sp.Skeleton) ], t.prototype, "spine", void 0);
return i([ l ], t);
}(cc.Component);
a.default = h;
cc._RF.pop();
}, {
"../Global/GTemporary": "GTemporary"
} ],
BaseModel: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "8af43Rm6ORGFIQe1wUC2Ct+", "BaseModel");
Object.defineProperty(a, "__esModule", {
value: !0
});
a.BaseModel = void 0;
var o = function() {
function e() {
this.rejectSaveProperties = [];
}
e.prototype.syncConfig = function() {};
e.prototype.getData = function() {
var e = new Object();
for (var t in this) {
var a = t.toString();
"rejectSaveProperties" == a || this.rejectSaveProperties.includes(a) || (e[a] = this[a]);
}
return e;
};
e.prototype.syncData = function(e) {
for (var t in this) {
var a = t.toString();
null != e[a] && (this[a] = e[a]);
}
};
return e;
}();
a.BaseModel = o;
cc._RF.pop();
}, {} ],
BasePanel: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "b229012jI9KvZmF2XmuQDrU", "BasePanel");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) t.hasOwnProperty(a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = cc._decorator, s = r.ccclass, c = (r.property, function(e) {
n(t, e);
function t() {
return null !== e && e.apply(this, arguments) || this;
}
t.prototype.refresh = function() {};
t.prototype.clickClose = function() {
this.node.active = !1;
};
return i([ s ], t);
}(cc.Component));
a.default = c;
cc._RF.pop();
}, {} ],
BasePart: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "c510aJLOJNPYoD7j9d7gx5i", "BasePart");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) t.hasOwnProperty(a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = cc._decorator, s = r.ccclass, c = (r.property, function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.canTouch = !1;
return t;
}
t.prototype.init = function(e) {
for (var t = [], a = 1; a < arguments.length; a++) t[a - 1] = arguments[a];
};
t.prototype.setTarget = function(e) {
for (var t = [], a = 1; a < arguments.length; a++) t[a - 1] = arguments[a];
};
t.prototype.setPanel = function(e) {
for (var t = [], a = 1; a < arguments.length; a++) t[a - 1] = arguments[a];
};
t.prototype.setTouchState = function(e) {
this.canTouch = e;
};
return i([ s ], t);
}(cc.Component));
a.default = c;
cc._RF.pop();
}, {} ],
BasePopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "766cc8um21GCYuQgGVOwepo", "BasePopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Global/GTool"), s = e("../Manager/PopupManager"), c = cc._decorator, l = c.ccclass, d = c.property, h = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.background = null;
t.main = null;
t.btnOppo = null;
t.vivoFrame = null;
t.aniTime = .25;
t.finishCallback = null;
return t;
}
t.prototype.show = function(e, t) {
var a = this;
void 0 === e && (e = this.aniTime);
void 0 === t && (t = s.PopupOpenWay.Bigger);
return new Promise(function(e) {
var o, n;
if (a.vivoFrame) if (GA.isVivo() || GA.isNative()) {
var i = a.vivoFrame.width;
a.vivoFrame.x = -cc.winSize.width / 2 + i / 2 + 50;
} else if (GA.isOPPO()) {
i = a.vivoFrame.width;
a.vivoFrame.setPosition(-i / 2 + 50, -50);
}
a.node.setContentSize(cc.winSize);
a.node && "Small" == r.GTool.Info.ScreenType && (a.node.scale = r.GTool.uiZoomRatio);
a.node.setPosition(0, 0);
GA.isM4399MiniGame() || null === (o = a.background) || void 0 === o || o.setContentSize(cc.winSize);
null === (n = a.background) || void 0 === n || n.setPosition(0, 0);
a.init();
a.showOpenAni(t, a.aniTime, function() {
e();
a.onShow && a.onShow();
});
});
};
t.prototype.showOpenAni = function(e, t, a) {
switch (e) {
case s.PopupOpenWay.Bigger:
this.main.scale = "Small" == r.GTool.Info.ScreenType ? r.GTool.uiZoomRatio : 1;
a();
}
};
t.prototype.hide = function() {
var e = this;
cc.systemEvent.emit(EventsName.ExitPopup);
GA.isAndroid() || GA.PA.hideLoading({});
return new Promise(function(t) {
e.showHideAni(s.PopupCloseWay.Hide, e.aniTime, function() {
e.onHide && e.onHide();
t();
e.finishCallback && e.finishCallback();
e.destroy();
});
});
};
t.prototype.showHideAni = function(e, t, a) {
switch (e) {
case s.PopupCloseWay.Smaller:
if (0 == t) {
this.main.scale = 0;
a();
} else cc.tween(this.main).to(t, {
scale: .5,
opacity: 0
}, {
easing: "sineInOut"
}).call(a).start();
break;

case s.PopupCloseWay.Hide:
this.main.active = !1;
a();
}
};
t.prototype.init = function() {};
t.prototype.onShow = function() {};
t.prototype.refresh = function() {};
t.prototype.onHide = function(e) {
void 0 === e && (e = !1);
};
t.prototype.clickClose = function() {
this.hide();
};
t.prototype.setFinishCallback = function(e) {
this.finishCallback = e;
};
t.prototype.setOppoBtn = function(e, t, a, o) {
void 0 === a && (a = !0);
void 0 === o && (o = 0);
(GA.isOPPO() || GA.isVivo()) && (e.x = t);
};
i([ d(cc.Node) ], t.prototype, "background", void 0);
i([ d(cc.Node) ], t.prototype, "main", void 0);
i([ d(cc.Node) ], t.prototype, "btnOppo", void 0);
i([ d(cc.Node) ], t.prototype, "vivoFrame", void 0);
return i([ l ], t);
}(cc.Component);
a.default = h;
cc._RF.pop();
}, {
"../Global/GTool": "GTool",
"../Manager/PopupManager": "PopupManager"
} ],
BottomLine: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "eebaf+NKPVII43gaVMfy0D3", "BottomLine");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) t.hasOwnProperty(a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Config/GConfig"), s = cc._decorator, c = s.ccclass, l = (s.property, 
function(e) {
n(t, e);
function t() {
return null !== e && e.apply(this, arguments) || this;
}
t.prototype.onLoad = function() {
this.node.getComponent(cc.Widget) && (this.node.getComponent(cc.Widget).bottom = r.GConfig.ServerConfig.BottomLinePos);
};
return i([ c ], t);
}(cc.Component));
a.default = l;
cc._RF.pop();
}, {
"../Config/GConfig": "GConfig"
} ],
Box: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "baa03Fwl21BwaD+woPGhg34", "Box");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../../Global/Global"), s = e("../../Global/GPool"), c = e("../../Global/GTemporary"), l = e("../../Manager/MData"), d = e("../../Manager/PopupManager"), h = cc._decorator, p = h.ccclass, u = h.property, f = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.picSkyBox = null;
t.picSurpriseBox = null;
t.spine = null;
t.info = null;
return t;
}
t.prototype.init = function(e, t, a) {
var o = this;
void 0 === a && (a = !0);
cc.Tween.stopAllByTarget(this.node);
this.info = e;
this.picSkyBox.active = 2 == e.Type;
this.picSurpriseBox.active = 3 == e.Type;
var n = e.Pos % 4, i = Math.floor(e.Pos / 4), h = cc.v3(115 * n - 170, 184 - 124 * i);
this.node.active = !0;
this.spine.node.active = !1;
var p = function() {
o.node.off(cc.Node.EventType.TOUCH_END);
o.node.on(cc.Node.EventType.TOUCH_END, function() {
var a = s.GPool.getPart(s.EPool.MixSpine);
a.active = !0;
a.setParent(o.node.parent);
a.setSiblingIndex(cc.macro.MAX_ZINDEX);
a.setPosition(o.node.position);
r.G.playSpine(a.getComponent(sp.Skeleton), "animation", !1, function() {
s.GPool.recycle(s.EPool.MixSpine, a);
});
var n = l.MData.getCurrentPartMaxLevel(t), i = 1;
if (2 == e.Type) {
(i = (h = GA.rand(0, 99)) <= 5 ? n > 1 ? n - 1 : 1 : 5 < h && h <= 15 ? n > 2 ? n - 2 : 1 : 15 < h && h <= 30 ? n > 3 ? n - 3 : 1 : n > 4 ? n - 5 : 1) <= 0 && (i = 1);
l.MData.destroyPart(t, e.Pos);
cc.systemEvent.emit(EventsName.OpenBox, e.Pos, i);
s.GPool.recycle(s.EPool.Box, o.node);
} else if (3 == e.Type) {
var h;
(i = (h = GA.rand(1, 10)) <= 8 ? n : n - 1) <= 0 && (i = 1);
c.GTemporary.surpriseBoxInfo = {
MechaIndex: t,
Level: i,
Pos: e.Pos
};
r.G.checkCanShowFullScreenVideo("Lucky");
d.PopupManager.show(UIPath.SurpriseBoxPopup);
}
}, o);
};
if (a) cc.tween(this.node).set({
position: h.clone().add(cc.v3(0, 200)),
scale: 1
}).to(.3, {
position: h
}).to(.1, {
scale: .6
}).to(.1, {
scale: 1
}).call(function() {
o.spine.node.active = !0;
r.G.playSpine(o.spine, "animation", !1, function() {
o.spine.node.active = !1;
});
p();
3 == e.Type && cc.tween(o.node).repeatForever(cc.tween().by(.1, {
angle: 10
}).by(.1, {
angle: -10
}).by(.1, {
angle: -15
}).by(.1, {
angle: 15
}).delay(1)).start();
}).start(); else {
this.node.scale = 1;
this.node.angle = 0;
this.node.setPosition(h);
p();
3 == e.Type && cc.tween(this.node).repeatForever(cc.tween().by(.1, {
angle: 10
}).by(.1, {
angle: -10
}).by(.1, {
angle: -15
}).by(.1, {
angle: 15
}).delay(1)).start();
}
};
i([ u(cc.Node) ], t.prototype, "picSkyBox", void 0);
i([ u(cc.Node) ], t.prototype, "picSurpriseBox", void 0);
i([ u(sp.Skeleton) ], t.prototype, "spine", void 0);
return i([ p ], t);
}(cc.Component);
a.default = f;
cc._RF.pop();
}, {
"../../Global/GPool": "GPool",
"../../Global/GTemporary": "GTemporary",
"../../Global/Global": "Global",
"../../Manager/MData": "MData",
"../../Manager/PopupManager": "PopupManager"
} ],
CheckPointPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "8e506w4eYFKlK31RNqfBrfo", "CheckPointPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../GameLogic"), c = e("../Global/GAd"), l = e("../Global/GTemporary"), d = e("../Global/GTool"), h = e("../Manager/MData"), p = e("../Manager/PopupManager"), u = e("../Part/CheckPoint"), f = cc._decorator, y = f.ccclass, m = f.property, g = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.content = null;
t.labelPower = null;
t.item = null;
t.scrollview = null;
t.view = null;
t.list = null;
t.doorRight = null;
t.doorLeft = null;
t.checkpointInfos = [];
t.rowItemCounts = 0;
t.spacingY = 0;
t.itemHeight = 400;
t.topMax = 0;
t.bottomMax = 0;
t.lastListY = 0;
t.rankItems = [];
t.guide = null;
t.hand = null;
return t;
}
t.prototype.start = function() {
var e = this;
if (GA.isWeChat()) {
s.default.instance.showAuthBtn(!1);
c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.Main,
show: !1
} ]);
}
l.GTemporary.myData.MechaIndex = h.MData.getCurrentMecha();
this.scrollview.height = cc.winSize.width;
l.GTemporary.mechaProperties.forEach(function(t) {
t.MechaIndex == l.GTemporary.myData.MechaIndex && (e.labelPower.string = Math.round(t.Health + 12 * t.Attack + 12 * t.Defence).toString());
});
this.item.active = !1;
for (var t = h.MData.getExcelCheckPointData(), a = Array.from(t.values()), o = 0; o < a.length; o += 2) {
var n = {
haveNext: o < a.length - 2,
firstData: a[o],
secondData: o + 1 < a.length ? a[o + 1] : null
};
this.checkpointInfos.push(n);
}
cc.systemEvent.on(EventsName.ChooseCheckpoint, function() {
l.GTemporary.fightMode = "PVE";
h.MData.getCurrentCheckpoint() >= 2 ? p.PopupManager.show(UIPath.TryoutPopup) : e.showCloseDoorAni(function() {
e.hide();
p.PopupManager.show(UIPath.FightPopup);
});
}, this);
this.rowItemCounts = 10 + Math.floor(this.view.height / (this.itemHeight + this.spacingY));
var i = Math.ceil((h.MData.getNextCheckpoint() + 1) / 2) - 1;
this.list.setContentSize(this.list.width, (this.checkpointInfos.length + 1) * (this.itemHeight + this.spacingY));
for (o = 0; o < this.rowItemCounts; o++) {
var r = cc.instantiate(this.item);
r.active = !0;
r.setParent(this.list);
this.rankItems.push(r.getComponent(u.default));
r.getComponent(u.default).init(o, this.checkpointInfos[o]);
r.y = -o * (this.itemHeight + this.spacingY) - this.itemHeight / 2;
}
this.topMax = this.view.height;
this.bottomMax = -(this.view.height + this.topMax);
this.lastListY = this.list.y;
var d = i < this.checkpointInfos.length - 1 ? i : this.checkpointInfos.length - 1;
if (i >= 2) {
i > this.checkpointInfos.length - 3 && (d -= 1);
cc.tween(this.list).by(0, {
y: (d - .5) * (this.itemHeight + this.spacingY)
}).start();
}
cc.systemEvent.on(EventsName.CloseTryout, function() {
e.showCloseDoorAni(function() {
e.hide();
p.PopupManager.show(UIPath.FightPopup);
});
}, this);
if (l.GTemporary.isShowingNewGuide) {
this.showNewUserGuide();
this.main.getComponentInChildren(cc.ScrollView).enabled = !1;
}
};
t.prototype.showCloseDoorAni = function(e) {
if (cc.winSize.width > 2e3) {
this.doorRight.width = cc.winSize.width / 2;
this.doorLeft.width = cc.winSize.width / 2;
}
AudioManager.playEffect("play_step1");
cc.tween(this.doorRight).set({
active: !0
}).to(.5, {
x: -110
}, {
easing: cc.easing.sineOut
}).call(function() {
s.default.instance.showDoor(!0);
e && e();
}).start();
cc.tween(this.doorLeft).set({
active: !0
}).to(.5, {
x: 110
}, {
easing: cc.easing.sineOut
}).start();
};
t.prototype.update = function() {
for (var e = this.list.y > this.lastListY, t = 0; t < this.rankItems.length; t++) {
var a = this.rankItems[t], o = this.list.convertToWorldSpaceAR(a.node.position);
o.y -= this.view.height / 2;
o = this.view.convertToNodeSpaceAR(o);
if (e) {
if (o.y > this.topMax) {
if ((n = a.index + this.rankItems.length) >= this.checkpointInfos.length) return;
a.node.y = -n * (this.itemHeight + this.spacingY) - this.itemHeight / 2;
a.init(n, this.checkpointInfos[n]);
}
} else if (o.y < this.bottomMax) {
var n;
if ((n = a.index - this.rankItems.length) < 0) return;
a.node.y = -n * (this.itemHeight + this.spacingY) - this.itemHeight / 2;
a.init(n, this.checkpointInfos[n]);
}
}
this.lastListY = this.list.y;
};
t.prototype.clickClose = function() {
d.GTool.sendBtnEvent("关卡返回");
AudioManager.playEffect(AudioName.BtnClose);
this.hide();
if (l.GTemporary.needReturnWarehouse) {
l.GTemporary.needReturnWarehouse = !1;
p.PopupManager.show(UIPath.WarehousePopup);
} else s.default.instance.showMain(!0);
};
t.prototype.onDestroy = function() {};
t.prototype.showNewUserGuide = function() {
this.guide.active = !0;
};
i([ m(cc.Node) ], t.prototype, "content", void 0);
i([ m(cc.Label) ], t.prototype, "labelPower", void 0);
i([ m(cc.Node) ], t.prototype, "item", void 0);
i([ m(cc.Node) ], t.prototype, "scrollview", void 0);
i([ m(cc.Node) ], t.prototype, "view", void 0);
i([ m(cc.Node) ], t.prototype, "list", void 0);
i([ m(cc.Node) ], t.prototype, "doorRight", void 0);
i([ m(cc.Node) ], t.prototype, "doorLeft", void 0);
i([ m(cc.Node) ], t.prototype, "guide", void 0);
i([ m(cc.Node) ], t.prototype, "hand", void 0);
return i([ y ], t);
}(r.default);
a.default = g;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager",
"../Part/CheckPoint": "CheckPoint"
} ],
CheckPoint: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "c730eLgpc1B14AKFcVvQy/H", "CheckPoint");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) t.hasOwnProperty(a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Global/GTemporary"), s = e("../Manager/MData"), c = cc._decorator, l = c.ccclass, d = c.property, h = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.labelLevels = [];
t.picFrames = [];
t.lines = [];
t.spriteCheckpoints = [];
t.spriteLines = [];
t.labelSuggestPower = [];
t.spriteChoosen = [];
t.guideHand = null;
t.index = 0;
return t;
}
t.prototype.init = function(e, t) {
this.index = e;
if (null == t.secondData) {
this.picFrames[1].active = !1;
this.labelLevels[1].node.active = !1;
this.lines[0].node.active = !1;
this.lines[1].node.active = !1;
} else if (t.haveNext) {
this.picFrames[0].active = !0;
this.picFrames[1].active = !0;
this.labelLevels[0].node.active = !0;
this.labelLevels[1].node.active = !0;
this.lines[0].node.active = !0;
this.lines[1].node.active = !0;
} else {
this.picFrames[0].active = !0;
this.picFrames[1].active = !0;
this.labelLevels[0].node.active = !0;
this.labelLevels[1].node.active = !0;
this.lines[0].node.active = !0;
this.lines[1].node.active = !1;
}
this.labelSuggestPower[0].node.parent.active = !1;
this.labelSuggestPower[1].node.parent.active = !1;
this.guideHand.active = !1;
if (null != t.firstData) {
this.labelLevels[0].string = t.firstData.CheckPointIndex.toString();
this.picFrames[0].getComponent(cc.Sprite).spriteFrame = this.spriteCheckpoints[t.firstData.IsBoss];
if (t.firstData.CheckPointIndex == s.MData.getNextCheckpoint()) {
cc.tween(this.spriteChoosen[0]).repeatForever(cc.tween().by(1, {
scale: .3
}, {
easing: cc.easing.quadInOut
}).by(1, {
scale: -.3
}, {
easing: cc.easing.quadInOut
})).start();
var a = cc.v3(112, -110);
this.guideHand.active = !0;
cc.tween(this.guideHand).set({
position: a
}).repeatForever(cc.tween().by(1, {
scale: .3,
x: 30,
y: -50
}, {
easing: cc.easing.quadInOut
}).by(1, {
scale: -.3,
x: -30,
y: 50
}, {
easing: cc.easing.quadInOut
})).start();
this.labelSuggestPower[0].node.parent.active = !0;
this.labelSuggestPower[0].string = t.firstData.SuggestPower.toString();
this.picFrames[0].off(cc.Node.EventType.TOUCH_END);
this.picFrames[0].on(cc.Node.EventType.TOUCH_END, function() {
r.GTemporary.chosenCheckPointIndex = t.firstData.CheckPointIndex;
console.log("选择关卡进入游戏", r.GTemporary.chosenCheckPointIndex);
cc.systemEvent.emit(EventsName.ChooseCheckpoint);
}, this);
} else if (t.firstData.CheckPointIndex < s.MData.getNextCheckpoint()) {
this.labelSuggestPower[0].node.parent.active = !0;
this.labelSuggestPower[0].node.parent.getChildByName("PicChosen").active = !1;
this.labelSuggestPower[0].string = t.firstData.SuggestPower.toString();
}
t.firstData.CheckPointIndex < s.MData.getNextCheckpoint() ? this.lines[0].spriteFrame = this.spriteLines[0] : this.lines[0].spriteFrame = this.spriteLines[1];
}
if (null != t.secondData) {
this.labelLevels[1].string = t.secondData.CheckPointIndex.toString();
this.picFrames[1].getComponent(cc.Sprite).spriteFrame = this.spriteCheckpoints[t.secondData.IsBoss];
if (t.secondData.CheckPointIndex == s.MData.getNextCheckpoint()) {
cc.tween(this.spriteChoosen[1]).repeatForever(cc.tween().by(1, {
scale: .3
}, {
easing: cc.easing.quadInOut
}).by(1, {
scale: -.3
}, {
easing: cc.easing.quadInOut
})).start();
a = cc.v3(336, 90);
this.guideHand.active = !0;
cc.tween(this.guideHand).set({
position: a
}).repeatForever(cc.tween().by(1, {
scale: .3,
x: 30,
y: -50
}, {
easing: cc.easing.quadInOut
}).by(1, {
scale: -.3,
x: -30,
y: 50
}, {
easing: cc.easing.quadInOut
})).start();
this.labelSuggestPower[1].node.parent.active = !0;
this.labelSuggestPower[1].string = t.secondData.SuggestPower.toString();
this.picFrames[1].off(cc.Node.EventType.TOUCH_END);
this.picFrames[1].on(cc.Node.EventType.TOUCH_END, function() {
r.GTemporary.chosenCheckPointIndex = t.secondData.CheckPointIndex;
console.log("选择关卡进入游戏", r.GTemporary.chosenCheckPointIndex);
cc.systemEvent.emit(EventsName.ChooseCheckpoint);
}, this);
} else if (t.secondData.CheckPointIndex < s.MData.getNextCheckpoint()) {
this.labelSuggestPower[1].node.parent.active = !0;
this.labelSuggestPower[1].node.parent.getChildByName("PicChosen").active = !1;
this.labelSuggestPower[1].string = t.secondData.SuggestPower.toString();
}
t.secondData.CheckPointIndex < s.MData.getNextCheckpoint() ? this.lines[1].spriteFrame = this.spriteLines[0] : this.lines[1].spriteFrame = this.spriteLines[1];
}
};
i([ d(cc.Label) ], t.prototype, "labelLevels", void 0);
i([ d(cc.Node) ], t.prototype, "picFrames", void 0);
i([ d(cc.Sprite) ], t.prototype, "lines", void 0);
i([ d(cc.SpriteFrame) ], t.prototype, "spriteCheckpoints", void 0);
i([ d(cc.SpriteFrame) ], t.prototype, "spriteLines", void 0);
i([ d(cc.Label) ], t.prototype, "labelSuggestPower", void 0);
i([ d(cc.Node) ], t.prototype, "spriteChoosen", void 0);
i([ d(cc.Node) ], t.prototype, "guideHand", void 0);
return i([ l ], t);
}(cc.Component);
a.default = h;
cc._RF.pop();
}, {
"../Global/GTemporary": "GTemporary",
"../Manager/MData": "MData"
} ],
DailyGiftPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "8f66d5olTtIs4J7JkZZ2DnH", "DailyGiftPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Config/GConfig"), c = e("../GameLogic"), l = e("../Global/GAd"), d = e("../Global/Global"), h = e("../Global/GTemporary"), p = e("../Global/GTool"), u = e("../Manager/MData"), f = cc._decorator, y = f.ccclass, m = f.property, g = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.labelGold = null;
t.btnGet = null;
t.btnTomorrow = null;
t.reward = 800;
t.btnCheat = null;
t.wechatCanCheat = !1;
t.showCheatBanner = !1;
t.onShowCallback = null;
return t;
}
t.prototype.start = function() {
var e = this;
if (GA.isWeChat()) {
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Left,
show: !0
}, {
pos: l.AdPos.Right,
show: !0
}, {
pos: l.AdPos.Main,
show: !1
} ]);
c.default.instance.showAuthBtn(!1);
this.wechatCanCheat = d.G.checkWeChatCanCheatClick(d.CheatPos.DailyGift);
if (this.wechatCanCheat) {
h.GTemporary.CheatPopup = this.node;
this.onShowCallback = function() {
var e;
null === (e = h.GTemporary.CheatPopup) || void 0 === e || e.getComponent(r.default).hide();
};
this.btnCheat.clickEvents = [];
1 == s.GConfig.ServerConfig.WechatCheatDailyGift ? this.btnCheat.node.on("click", function() {
e.btnCheat.node.off("click");
console.log("点了骗点了");
d.G.triggerCheatReport(d.CheatPos.DailyGift);
e.scheduleOnce(function() {
c.default.instance.showBanner("CheatBanner", 0, 100);
e.showCheatBanner = !0;
GA.PA.onShow(e.onShowCallback);
e.scheduleOnce(function() {
c.default.instance.hideBanner("CheatBanner");
e.btnCheat.node.on("click", function() {
e.clickClose();
GA.PA.offShow(e.onShowCallback);
c.default.instance.hideBanner("CheatBanner");
});
}, 1);
}, .5);
}) : this.btnCheat.node.on("click", function() {
console.log("骗点视频");
d.G.triggerCheatReport(d.CheatPos.DailyGift);
e.btnCheat.node.off("click");
e.btnCheat.node.on("click", function() {
e.clickClose();
});
GA.rewardOperation({
tag: RewardType.Cheat,
page: "DailyGift",
byVideo: !0,
result: function() {}
});
});
}
}
var t = {
MinLevel: 0,
Rewards: [ 400, 600, 800, 1e3, 2e3 ]
};
s.GConfig.ServerConfig.GoldSupply.sort(function(e, t) {
return e.MinLevel - t.MinLevel;
});
var a = u.MData.getCurrentCheckpoint();
0 == a ? t = s.GConfig.ServerConfig.GoldSupply[0] : s.GConfig.ServerConfig.GoldSupply.forEach(function(e) {
a >= e.MinLevel && (t = e);
});
5 != t.Rewards.length && (t.Rewards = [ 400, 600, 800, 1e3, 2e3 ]);
this.reward = t.Rewards[2];
this.labelGold.string = "X" + this.reward;
this.btnGet.active = !u.MData.checkGetDailyGift();
this.btnTomorrow.active = u.MData.checkGetDailyGift();
};
t.prototype.clickGetGift = function() {
var e = this;
GA.rewardOperation({
tag: RewardType.DailyGift,
byVideo: p.GTool.isNextRewardVideo(RewardType.DailyGift),
page: "DailyGift",
result: function(t) {
if (t.reward) {
e.btnGet.active = !1;
e.btnTomorrow.active = !0;
u.MData.addGold(e.reward, !1);
u.MData.addDebris(3, 3);
p.GTool.showToast("" + p.GTool.getLanguage("恭喜获得") + e.reward + p.GTool.getLanguage("金币,3碎片"));
cc.systemEvent.emit(EventsName.GainGold, {
pos: e.btnGet.convertToWorldSpaceAR(cc.v3()),
endCallback: function() {
cc.systemEvent.emit(EventsName.Refresh);
}
});
u.MData.getDailyGift();
e.hide();
cc.systemEvent.emit(EventsName.GetDailyGift);
}
}
});
};
t.prototype.clickTomorrow = function() {
p.GTool.showToast("已领取奖励,明日再来看看吧~");
};
t.prototype.clickClose = function() {
p.GTool.sendBtnEvent("关闭每日礼包");
AudioManager.playEffect(AudioName.BtnClose);
e.prototype.clickClose.call(this);
};
t.prototype.onDestroy = function() {
if (GA.isWeChat()) {
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Left,
show: !1
}, {
pos: l.AdPos.Right,
show: !1
}, {
pos: l.AdPos.Main,
show: !0
} ]);
c.default.instance.showAuthBtn(!0);
if (this.wechatCanCheat && this.showCheatBanner) {
c.default.instance.hideBanner("CheatBanner");
GA.PA.offShow(this.onShowCallback);
h.GTemporary.CheatPopup = null;
}
}
};
i([ m(cc.Label) ], t.prototype, "labelGold", void 0);
i([ m(cc.Node) ], t.prototype, "btnGet", void 0);
i([ m(cc.Node) ], t.prototype, "btnTomorrow", void 0);
i([ m(cc.Button) ], t.prototype, "btnCheat", void 0);
return i([ y ], t);
}(r.default);
a.default = g;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Config/GConfig": "GConfig",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Global/Global": "Global",
"../Manager/MData": "MData"
} ],
DrawPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "3dfa5LkN0NPTbHruVfEJ0u8", "DrawPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Config/GConfig"), c = e("../GameLogic"), l = e("../Global/GAd"), d = e("../Global/GTemporary"), h = e("../Global/GTool"), p = e("../Manager/MData"), u = e("../Manager/PopupManager"), f = cc._decorator, y = f.ccclass, m = f.property, g = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.items = [];
t.light = null;
t.btnDrawFree = null;
t.btnDrawReward = null;
t.choosenLight = null;
t.btnClose = null;
t.boxes = [];
t.boxLight = [];
t.spriteProgress = null;
t.pricePosAry = [ cc.v3(-180, 120), cc.v3(-60, 120), cc.v3(60, 120), cc.v3(180, 120), cc.v3(180, 0), cc.v3(180, -120), cc.v3(60, -120), cc.v3(-60, -120), cc.v3(-180, -120), cc.v3(-180, 0) ];
t.drawRewards = [ {
Type: "Gold",
RewardNumber: 200,
Weight: 50
}, {
Type: "Double",
RewardNumber: 1,
Weight: 20
}, {
Type: "Debris",
RewardNumber: 5,
Weight: 5
}, {
Type: "Gold",
RewardNumber: 800,
Weight: 5
}, {
Type: "Gold",
RewardNumber: 2e3,
Weight: 2
}, {
Type: "Gold",
RewardNumber: 600,
Weight: 5
}, {
Type: "Debris",
RewardNumber: 10,
Weight: 1
}, {
Type: "Gold",
RewardNumber: 400,
Weight: 10
}, {
Type: "Gold",
RewardNumber: 1e3,
Weight: 2
}, {
Type: "Debris",
RewardNumber: 80,
Weight: 0
} ];
t.lastIndex = 0;
t.isDrawing = !1;
return t;
}
t.prototype.start = function() {
var e = this;
cc.systemEvent.emit(EventsName.ShowGameClubBtn, !1);
if (GA.isWeChat()) {
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Left,
show: !0
}, {
pos: l.AdPos.Right,
show: !0
}, {
pos: l.AdPos.Main,
show: !1
} ]);
d.GTemporary.inWarehousePopup && l.GAd.hideBanner("banner");
c.default.instance.showAuthBtn(!1);
}
var t = {
MinLevel: 0,
Rewards: [ 400, 600, 800, 1e3, 2e3 ]
};
s.GConfig.ServerConfig.GoldSupply.sort(function(e, t) {
return e.MinLevel - t.MinLevel;
});
var a = p.MData.getCurrentCheckpoint();
0 == a ? t = s.GConfig.ServerConfig.GoldSupply[0] : s.GConfig.ServerConfig.GoldSupply.forEach(function(e) {
a >= e.MinLevel && (t = e);
});
5 != t.Rewards.length && (t.Rewards = [ 400, 600, 800, 1e3, 2e3 ]);
this.drawRewards[0].RewardNumber = t.Rewards[0] / 2;
this.drawRewards[3].RewardNumber = t.Rewards[2];
this.drawRewards[4].RewardNumber = t.Rewards[4];
this.drawRewards[5].RewardNumber = t.Rewards[1];
this.drawRewards[7].RewardNumber = t.Rewards[0];
this.drawRewards[8].RewardNumber = t.Rewards[3];
this.items.forEach(function(t, a) {
"Double" != e.drawRewards[a].Type && (t.getChildByName("LabelReward").getComponent(cc.Label).string = GA.formatNumber(e.drawRewards[a].RewardNumber));
});
this.btnDrawFree.active = 1 == p.MData.getFreeDrawTime();
this.btnDrawReward.active = 1 != p.MData.getFreeDrawTime();
this.refreshDrawProgress();
this.boxes.forEach(function(a, o) {
a.off(cc.Node.EventType.TOUCH_END);
a.on(cc.Node.EventType.TOUCH_END, function() {
if (!e.isDrawing) {
var a = p.MData.getRewardBoxData();
if (0 == a[o]) {
var n = 1, i = t.Rewards[1];
if (1 == o) {
n = 3;
i = t.Rewards[3];
} else if (2 == o) {
n = 5;
i = t.Rewards[4];
}
h.GTool.showToast("碎片X" + n + h.GTool.getLanguage("金币") + "X" + i);
} else if (1 == a[o]) {
n = 1, i = t.Rewards[1];
if (1 == o) {
n = 3;
i = t.Rewards[3];
} else if (2 == o) {
n = 5;
i = t.Rewards[4];
}
d.GTemporary.gainRewardType = {
Type: "Debris",
Number: n,
OneGet: !0,
Extra: {
Type: "Gold",
Number: i
}
};
p.MData.getRewardBox(o, 2);
u.PopupManager.show(UIPath.GainPopup);
e.refreshDrawProgress();
} else h.GTool.showToast("奖励已领取");
}
}, e);
});
};
t.prototype.refreshDrawProgress = function() {
for (var e = p.MData.getRewardBoxData(), t = 0; t < e.length; t++) {
this.boxes[t].getChildByName("BoxFinish").active = 2 == e[t];
this.boxLight[t].active = 1 == e[t];
if (1 == e[t]) {
cc.Tween.stopAllByTarget(this.boxes[t]);
cc.tween(this.boxes[t]).set({
angle: 0
}).repeatForever(cc.tween().by(.1, {
angle: 10
}).by(.1, {
angle: -10
}).by(.1, {
angle: -15
}).by(.1, {
angle: 15
}).delay(1)).start();
} else {
cc.Tween.stopAllByTarget(this.boxes[t]);
this.boxes[t].angle = 0;
}
}
var a = p.MData.getDrawTime(), o = a;
a > 8 && 0 == (o = a - 8 * Math.floor(a / 8)) && (o = 8);
this.spriteProgress.fillRange = o / 8;
this.items.forEach(function(e) {
if (e.getChildByName("DoubleReward")) {
e.getChildByName("DoubleReward").active = p.MData.isNextDrawDouble();
if (p.MData.isNextDrawDouble()) {
cc.Tween.stopAllByTarget(e.getChildByName("DoubleReward"));
cc.tween(e.getChildByName("DoubleReward")).set({
angle: 0
}).repeatForever(cc.tween().by(.1, {
angle: 5
}).by(.1, {
angle: -5
}).by(.1, {
angle: -10
}).by(.1, {
angle: 10
}).delay(1)).start();
}
}
});
};
t.prototype.clickDrawFree = function() {
cc.systemEvent.emit(EventsName.Draw);
h.GTool.sentLogs([ {
eventId: "免费抽奖"
} ]);
p.MData.freeDraw();
this.draw();
};
t.prototype.clickDrawReward = function() {
var e = this;
h.GTool.sentLogs([ {
eventId: "奖励抽奖"
} ]);
GA.rewardOperation({
tag: RewardType.Draw,
byVideo: h.GTool.isNextRewardVideo(RewardType.Draw),
page: "Draw",
result: function(t) {
if (t.reward) {
p.MData.rewardDraw();
e.draw();
}
}
});
};
t.prototype.draw = function() {
var e = this;
p.MData.save(!1);
this.isDrawing = !0;
this.scheduleOnce(function() {
AudioManager.playEffect(AudioName.Draw);
}, .5);
this.btnDrawFree.active && (this.btnDrawFree.getComponent(cc.Button).interactable = !1);
this.btnDrawReward.active && (this.btnDrawReward.getComponent(cc.Button).interactable = !1);
this.btnClose.active = !1;
var t = this.getNextReward();
if (p.MData.isNextDrawDouble() && 1 == t) for (;1 == t; ) t = this.getNextReward();
var a = t - this.lastIndex + 51, o = this.lastIndex, n = 0;
this.lastIndex = (o + a) % 10;
this.node.runAction(cc.repeat(cc.sequence(cc.callFunc(function() {
e.choosenLight.setPosition(e.pricePosAry[o % 10]);
++n == a && cc.tween(e.node).call(function() {
AudioManager.playEffect(AudioName.FinishDraw);
}).delay(1).call(function() {
var a = p.MData.getDrawTime(), o = a;
a > 8 && 0 == (o = a - 8 * Math.floor(a / 8)) && (o = 8);
if (1 == o) {
p.MData.getRewardBox(0, 0);
p.MData.getRewardBox(1, 0);
p.MData.getRewardBox(2, 0);
} else 3 == o ? p.MData.getRewardBox(0, 1) : 5 == o ? p.MData.getRewardBox(1, 1) : 8 == o && p.MData.getRewardBox(2, 1);
console.log("drawTime", a);
e.btnClose.active = !0;
e.btnDrawFree.active = 1 == p.MData.getFreeDrawTime();
e.btnDrawReward.active = 1 != p.MData.getFreeDrawTime();
e.btnDrawFree.active && (e.btnDrawFree.getComponent(cc.Button).interactable = !0);
e.btnDrawReward.active && (e.btnDrawReward.getComponent(cc.Button).interactable = !0);
if ("Double" != e.drawRewards[t].Type) {
d.GTemporary.gainRewardType = {
Type: "Gold" == e.drawRewards[t].Type ? "Gold" : "Debris",
Number: e.drawRewards[t].RewardNumber * (p.MData.isNextDrawDouble() ? 2 : 1),
OneGet: !1
};
u.PopupManager.show(UIPath.GainPopup);
p.MData.setNextDrawDouble(!1);
} else p.MData.setNextDrawDouble(!0);
e.refreshDrawProgress();
e.isDrawing = !1;
}).start();
o++;
}), cc.delayTime(.1)), a).easing(cc.easeInOut(3)));
};
t.prototype.getNextReward = function() {
var e = 0;
this.drawRewards.forEach(function(t) {
e += t.Weight;
});
for (var t = Math.floor(Math.random() * e), a = 0, o = 0; o < this.drawRewards.length; o++) if (t < (a += this.drawRewards[o].Weight)) return o;
};
t.prototype.clickClose = function() {
h.GTool.sendBtnEvent("关闭抽奖界面");
AudioManager.playEffect(AudioName.BtnClose);
this.hide();
};
t.prototype.onDestroy = function() {
cc.systemEvent.emit(EventsName.ShowGameClubBtn, !0);
if (GA.isWeChat()) {
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Left,
show: !1
}, {
pos: l.AdPos.Right,
show: !1
}, {
pos: l.AdPos.Main,
show: !0
} ]);
d.GTemporary.inWarehousePopup && l.GAd.showBanner("banner", 0, 0);
c.default.instance.showAuthBtn(!0);
}
cc.systemEvent.emit(EventsName.StartMainGuide);
};
i([ m(cc.Node) ], t.prototype, "items", void 0);
i([ m(cc.Node) ], t.prototype, "light", void 0);
i([ m(cc.Node) ], t.prototype, "btnDrawFree", void 0);
i([ m(cc.Node) ], t.prototype, "btnDrawReward", void 0);
i([ m(cc.Node) ], t.prototype, "choosenLight", void 0);
i([ m(cc.Node) ], t.prototype, "btnClose", void 0);
i([ m(cc.Node) ], t.prototype, "boxes", void 0);
i([ m(cc.Node) ], t.prototype, "boxLight", void 0);
i([ m(cc.Sprite) ], t.prototype, "spriteProgress", void 0);
return i([ y ], t);
}(r.default);
a.default = g;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Config/GConfig": "GConfig",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager"
} ],
Enum: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "ad9bbDaff1FFbwuYpLAA/Wy", "Enum");
Object.defineProperty(a, "__esModule", {
value: !0
});
a.UnlockWay = void 0;
(function(e) {
e[e.Gold = 0] = "Gold";
e[e.Share = 1] = "Share";
e[e.Video = 2] = "Video";
e[e.PartsNum = 3] = "PartsNum";
e[e.Free = 4] = "Free";
})(a.UnlockWay || (a.UnlockWay = {}));
cc._RF.pop();
}, {} ],
EventsName: [ function(e, t) {
"use strict";
cc._RF.push(t, "fea0a0gFxRCPJVedsKWGeeJ", "EventsName");
window.EventsName = new function() {
this.Refresh = "Refresh";
this.ExitPopup = "ExitPopup";
this.ExchangePart = "ExchangePart";
this.UpgradePart = "UpgradePart";
this.InstallPart = "InstallPart";
this.StartBattle = "StartBattle";
this.RoundStart = "RoundStart";
this.ShowRestrain = "ShowRestrain";
this.StartChooseSkill = "StartChooseSkill";
this.ChooseSkill = "ChooseSkill";
this.CountDownFinish = "CountDownFinish";
this.GetHurt = "GetHurt";
this.RefreshEnergy = "RefreshEnergy";
this.TouchPartStart = "TouchPartStart";
this.TouchPartEnd = "TouchPartEnd";
this.ChooseCheckpoint = "ChooseCheckpoint";
this.UnlockMecha = "UnlockMecha";
this.UnlockNewSkill = "UnlockNewSkill";
this.HideFightPopup = "HideFightPopup";
this.Resurgence = "Resurgence";
this.GainGold = "Action_Collect_Money";
this.GainDebris = "Action_Collect_Debris";
this.GainDebris_7 = "Action_Collect_Debris_7";
this.PauseGame = "PauseGame";
this.CloseTryout = "CloseTryout";
this.RefreshSkill = "RefreshSkill";
this.ShowNextNewUserGuide = "ShowNextNewUserGuide";
this.FinishGuideInWarehouse = "FinishGuideInWarehouse";
this.AfterSeeRestrain = "AfterSeeRestrain";
this.CloseRestrain = "HideRestrain";
this.ShowNewUserGuideInFight = "ShowNewUserGuideInFight";
this.RefresHealth = "RefresHealth";
this.NewUserClickAwaken = "NewUserClickAwaken";
this.ShowPauseBtn = "ShowPauseBtn";
this.RefreshPower = "RefreshPower";
this.ShowFinalSkillEffect = "ShowFinalSkillEffect";
this.ReleaseSkillFinish = "ReleaseSkillFinish";
this.OpenBox = "OpenBox";
this.CheckShowBox = "CheckShowBox";
this.OpenSurpriseBox = "OpenSurpriseBox";
this.OpenSkyBox = "OpenSkyBox";
this.GiveUpSkyBox = "GiveUpSkyBox";
this.GiveUpSurpriseBox = "GiveUpSurpriseBox";
this.SignIn = "SignIn";
this.Draw = "Draw";
this.CloseWarehouse = "CloseWarehouse";
this.RefreshMech3Price = "RefreshMech3Price";
this.StartMainGuide = "StartMainGuide";
this.ShowGameClubBtn = "ShowGameClubBtn";
this.ShowOppoNative = "ShowOppoNative";
this.HideOppoNative = "HideOppoNative";
this.GetDailyGift = "GetDailyGift";
}();
cc._RF.pop();
}, {} ],
ExcelData: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "dca47KTT9FAWIqpKyrm/FrL", "ExcelData");
Object.defineProperty(a, "__esModule", {
value: !0
});
a.ExcelData = void 0;
var o = e("papaparse"), n = e("./GConfig"), i = function() {
function e() {
this.ExcelMechaPartData = new Map();
this.ExcelCheckPointData = new Map();
this.ExcelMechaData = new Map();
this.ExcelSkillData = new Map();
this.ExcelRedeenData = new Map();
this.ExcelRankData = new Map();
this.ExcelMultisource = new Map();
}
e.prototype.loadServerExcel = function(e) {
this.analysisTable(n.GConfig.ServerConfig.CheckPointData, this.ExcelCheckPointData);
this.analysisTable(n.GConfig.ServerConfig.MechaData, this.ExcelMechaData);
this.analysisTable(n.GConfig.ServerConfig.MechaPartData, this.ExcelMechaPartData);
this.analysisTable(n.GConfig.ServerConfig.SkillData, this.ExcelSkillData);
this.analysisTable(n.GConfig.ServerConfig.RedeemData, this.ExcelRedeenData);
this.analysisTable(n.GConfig.ServerConfig.RankData, this.ExcelRankData);
e && e();
};
e.prototype.loadLocalExcel = function(e) {
var t = this;
cc.assetManager.resources.loadDir("Excels", cc.TextAsset, function(a, o) {
if (a) cc.error(a); else {
o.forEach(function(e) {
switch (e.name) {
case "CheckPointData":
t.analysisTable(e.text, t.ExcelCheckPointData);
break;

case "MechaData":
t.analysisTable(e.text, t.ExcelMechaData);
break;

case "MechaPartData":
t.analysisTable(e.text, t.ExcelMechaPartData);
break;

case "SkillData":
t.analysisTable(e.text, t.ExcelSkillData);
break;

case "RedeemData":
t.analysisTable(e.text, t.ExcelRedeenData);
break;

case "RankData":
t.analysisTable(e.text, t.ExcelRankData);
}
});
e && e();
}
});
};
e.prototype.loadMultisourceData = function() {
var e = this;
cc.assetManager.resources.loadDir("Excels", cc.TextAsset, function(t, a) {
t ? cc.error(t) : a.forEach(function(t) {
switch (t.name) {
case "Multisource":
e.analysisTable(t.text, e.ExcelMultisource);
}
});
});
};
e.prototype.analysisTable = function(e, t) {
"" != e && null != e && o.parse(e, {
dynamicTyping: !0,
header: !0
}).data.forEach(function(e) {
if ("number" == typeof (null == e ? void 0 : e.Index)) {
var a = e;
for (var o in a) a[o];
t.set(e.Index, a);
}
});
};
return e;
}();
a.ExcelData = i;
cc._RF.pop();
}, {
"./GConfig": "GConfig",
papaparse: 38
} ],
FightPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "6c248CSerhCiLbP2MHSTLVc", "FightPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BaseMecha"), s = e("../Base/BasePopup"), c = e("../Config/GConfig"), l = e("../GameLogic"), d = e("../Global/GAd"), h = e("../Global/GBundle"), p = e("../Global/Global"), u = e("../Global/GPool"), f = e("../Global/GTemporary"), y = e("../Global/GTool"), m = e("../Manager/MData"), g = e("../Manager/PopupManager"), v = e("../Panels/PanelProperty"), G = e("../Panels/PanelSkill"), P = e("../Player/Mecha"), w = cc._decorator, M = w.ccclass, A = w.property, b = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.panelRound = null;
t.panelSkill = null;
t.panelProperty = null;
t.btnPause = null;
t.panelPause = null;
t.labelDamage = null;
t.picCrit = null;
t.picDodge = null;
t.fontWhite = null;
t.fontRed = null;
t.fontYellow = null;
t.spineMyMecha = null;
t.spineEnemyMecha = null;
t.scene = null;
t.spineFinalSkillEffect = null;
t.doorRight = null;
t.doorLeft = null;
t.sceneBg = null;
t.spriteSceneBGs = [];
t.finalEffectAniNames = [ "0-heng", "0-shu", "0-xie", "1-heng", "1-shu", "1-xie", "2-heng", "2-shu", "2-xie" ];
t.attackTimer = 0;
t.firstAttack = !0;
t.needRefreshEnery = !0;
t.guide = null;
t.mask = null;
t.hand = null;
t.btnFirstSkill = null;
t.btnSecondSkill = null;
t.btnAwaken = null;
t.spineWarn = null;
t.guideAwaken = null;
t.warnSkillOne = null;
t.warnSkillTwo = null;
t.warnEnemyAwaken = null;
t.warnMeAwaken = null;
return t;
}
t.prototype.start = function() {
var e = this;
this.sceneBg.spriteFrame = this.spriteSceneBGs[GA.rand(0, this.spriteSceneBGs.length - 1)];
m.MData.startGame(f.GTemporary.fightMode);
f.GTemporary.battleStartTime = Date.now();
"PVE" == f.GTemporary.fightMode ? y.GTool.sentLogs([ {
eventId: "PlayGame",
detail: JSON.stringify({
mode: "PVE"
})
}, {
eventId: "GameStart",
detail: JSON.stringify({
mode: "PVE"
})
} ]) : "PVP" == f.GTemporary.fightMode ? y.GTool.sentLogs([ {
eventId: "PlayGame",
detail: JSON.stringify({
mode: "PVP"
})
}, {
eventId: "GameStart",
extraNum: m.MData.getNextCheckpoint(),
detail: JSON.stringify({
mode: "PVP"
})
} ]) : "Rank" == f.GTemporary.fightMode && y.GTool.sentLogs([ {
eventId: "PlayGame",
detail: JSON.stringify({
mode: "Rank"
})
}, {
eventId: "GameStart",
extraNum: m.MData.getNextCheckpoint(),
detail: JSON.stringify({
mode: "Rank"
})
} ]);
AudioManager.playBGMusic(AudioName.BGMMain, !1);
AudioManager.playBGMusic(AudioName.BGMBattle, !0);
u.GPool.initPool(u.EPool.DamageLabel, this.labelDamage);
u.GPool.initPool(u.EPool.PicCrit, this.picCrit);
u.GPool.initPool(u.EPool.PicDodge, this.picDodge);
this.initData();
if (f.GTemporary.isShowingNewGuide) {
cc.systemEvent.on(EventsName.AfterSeeRestrain, function() {
f.GTemporary.newGuideStepInFightA = "FirstRound";
e.startBattle();
}, this);
cc.systemEvent.on(EventsName.ShowNewUserGuideInFight, function() {
e.showNewUserGuide();
}, this);
this.btnPause.node.active = !1;
cc.systemEvent.on(EventsName.ShowPauseBtn, function() {
e.btnPause.node.active = !0;
}, this);
}
var t = f.GTemporary.myData.MechaIndex + "/Skeleton", a = f.GTemporary.enemyData.MechaIndex + "/Skeleton";
GA.isVivo() && GA.Info.underCheck && 0 == f.GTemporary.enemyData.MechaIndex && (a = "1/Skeleton");
var o = 0, n = !1;
if (cc.winSize.width > 2e3) {
this.doorRight.width = cc.winSize.width / 2;
this.doorLeft.width = cc.winSize.width / 2;
}
var i = function() {
l.default.instance.showDoor(!1);
AudioManager.playEffect("play_step1");
cc.tween(e.doorRight).set({
active: !0
}).by(.3, {
x: 800
}).set({
active: !1
}).start();
cc.tween(e.doorLeft).set({
active: !0
}).by(.3, {
x: -800
}).set({
active: !1
}).call(function() {
if (GA.isWeChat()) {
1 == c.GConfig.ServerConfig.GameBannerSwitch && d.GAd.showBanner("banner2", 0, GA.PA.getSystemInfoSync().screenWidth / 2 + 50);
d.GAd.showOrHideNativeGridsAd([ {
pos: d.AdPos.Left,
show: !0
}, {
pos: d.AdPos.Right,
show: !0
} ]);
}
if (2 == o && !n) {
n = !0;
GA.isAndroid() || GA.PA.hideLoading({});
console.log("GTemporary.newGuideType:", f.GTemporary.newGuideType);
if (f.GTemporary.isShowingNewGuide) if ("Old" == f.GTemporary.newGuideType) g.PopupManager.show(UIPath.RestrainPopup); else {
cc.tween(e.spineMyMecha.node).set({
active: !0
}).by(0, {
x: -500
}).call(function() {
p.G.playSpine(e.spineMyMecha.spine, "move", !0, null);
}).by(3, {
x: 500
}).call(function() {
e.spineMyMecha.standBy();
}).start();
cc.tween(e.spineEnemyMecha.node).set({
active: !0
}).by(0, {
x: 500
}).call(function() {
p.G.playSpine(e.spineEnemyMecha.spine, "move", !0, null);
}).by(3, {
x: -500
}).call(function() {
e.spineEnemyMecha.standBy();
e.startBattle();
}).start();
} else 0 == m.MData.getCurrentCheckpoint() && "PVE" == f.GTemporary.fightMode ? g.PopupManager.show(UIPath.RestrainPopup) : e.startBattle();
}
}).start();
};
cc.systemEvent.on(EventsName.CloseRestrain, function() {
e.startBattle();
}, this);
if (Date.now() - l.default.instance.showDoorTime > 2e3) {
GA.isAndroid() || GA.PA.showLoading({
title: "努力加载资源中"
});
i();
} else {
var r = (Date.now() - l.default.instance.showDoorTime) / 1e3;
this.scheduleOnce(function() {
2 != o && (GA.isAndroid() || GA.PA.showLoading({
title: "努力加载资源中"
}));
i();
}, r);
}
var s = function() {
if (2 == ++o && !n && !e.doorRight.active) {
n = !0;
try {
GA.isAndroid() || GA.PA.hideLoading({});
} catch (e) {}
if (f.GTemporary.isShowingNewGuide) if ("Old" == f.GTemporary.newGuideType) g.PopupManager.show(UIPath.RestrainPopup); else {
cc.tween(e.spineMyMecha.node).set({
active: !0
}).by(0, {
x: -500
}).call(function() {
p.G.playSpine(e.spineMyMecha.spine, "move", !0, null);
}).by(3, {
x: 500
}).call(function() {
e.spineMyMecha.standBy();
}).start();
cc.tween(e.spineEnemyMecha.node).set({
active: !0
}).by(0, {
x: 500
}).call(function() {
p.G.playSpine(e.spineEnemyMecha.spine, "move", !0, null);
}).by(3, {
x: -500
}).call(function() {
e.spineEnemyMecha.standBy();
e.startBattle();
}).start();
} else 0 == m.MData.getCurrentCheckpoint() && "PVE" == f.GTemporary.fightMode ? g.PopupManager.show(UIPath.RestrainPopup) : e.startBattle();
}
};
if (f.GTemporary.fightSpineMap.has(f.GTemporary.myData.MechaIndex)) {
f.GTemporary.isShowingNewGuide && "New" == f.GTemporary.newGuideType && (this.spineMyMecha.node.active = !1);
this.spineMyMecha.spine.skeletonData = f.GTemporary.fightSpineMap.get(f.GTemporary.myData.MechaIndex);
this.spineMyMecha.standBy();
this.spineMyMecha.isPlayer = !0;
this.spineMyMecha.showOwnedPart();
if (7 == f.GTemporary.myData.MechaIndex) {
this.spineMyMecha.node.scaleX = -.7;
this.spineMyMecha.node.scaleY = .7;
}
s();
} else h.GBundle.GetBundle(h.EBundle.Spines).load(t, sp.SkeletonData, function(t, a) {
if (t) cc.error(t); else {
f.GTemporary.isShowingNewGuide && "New" == f.GTemporary.newGuideType && (e.spineMyMecha.node.active = !1);
e.spineMyMecha.spine.skeletonData = a;
e.spineMyMecha.standBy();
e.spineMyMecha.isPlayer = !0;
e.spineMyMecha.showOwnedPart();
f.GTemporary.fightSpineMap.set(f.GTemporary.myData.MechaIndex, a);
if (7 == f.GTemporary.myData.MechaIndex) {
e.spineMyMecha.node.scaleX = -.7;
e.spineMyMecha.node.scaleY = .7;
}
s();
}
});
if (f.GTemporary.fightSpineMap.has(f.GTemporary.enemyData.MechaIndex)) {
f.GTemporary.isShowingNewGuide && "New" == f.GTemporary.newGuideType && (this.spineEnemyMecha.node.active = !1);
this.spineEnemyMecha.spine.skeletonData = f.GTemporary.fightSpineMap.get(f.GTemporary.enemyData.MechaIndex);
if (0 == f.GTemporary.enemyData.MechaIndex) {
this.spineEnemyMecha.node.scaleX = -.7;
this.spineEnemyMecha.node.scaleY = .7;
}
this.spineEnemyMecha.standBy();
this.spineEnemyMecha.isPlayer = !1;
if (7 == f.GTemporary.enemyData.MechaIndex) {
this.spineEnemyMecha.node.scaleX = .7;
this.spineEnemyMecha.node.scaleY = .7;
}
this.spineEnemyMecha.showOwnedPart();
s();
} else h.GBundle.GetBundle(h.EBundle.Spines).load(a, sp.SkeletonData, function(t, a) {
if (t) cc.error(t); else {
f.GTemporary.isShowingNewGuide && "New" == f.GTemporary.newGuideType && (e.spineEnemyMecha.node.active = !1);
e.spineEnemyMecha.spine.skeletonData = a;
if (0 == f.GTemporary.enemyData.MechaIndex) {
e.spineEnemyMecha.node.scaleX = -.7;
e.spineEnemyMecha.node.scaleY = .7;
}
e.spineEnemyMecha.standBy();
e.spineEnemyMecha.isPlayer = !1;
if (7 == f.GTemporary.enemyData.MechaIndex) {
e.spineEnemyMecha.node.scaleX = .7;
e.spineEnemyMecha.node.scaleY = .7;
}
e.spineEnemyMecha.showOwnedPart();
f.GTemporary.fightSpineMap.set(f.GTemporary.enemyData.MechaIndex, a);
s();
}
});
cc.systemEvent.on(EventsName.GetHurt, function(t) {
var a = u.GPool.getPart(u.EPool.DamageLabel);
a.getComponent(cc.Label).string = Math.round(t.damage).toString();
a.setPosition(cc.v3(t.enemyGetHurt ? 200 : -200, 0));
a.active = !0;
a.setParent(e.main);
if (t.isCrit) {
a.getComponent(cc.Label).font = e.fontRed;
var o = u.GPool.getPart(u.EPool.PicCrit);
o.active = !0;
o.setParent(e.main);
o.setPosition(cc.v3(t.enemyGetHurt ? 200 : -200, 100));
cc.tween(o).by(1, {
y: 120
}).call(function() {
u.GPool.recycle(u.EPool.PicCrit, o);
}).start();
} else if (t.isDodge) {
a.getComponent(cc.Label).font = e.fontYellow;
var n = u.GPool.getPart(u.EPool.PicDodge);
n.active = !0;
n.setParent(e.main);
n.setPosition(cc.v3(t.enemyGetHurt ? 200 : -200, 100));
cc.tween(n).by(1, {
y: 120
}).call(function() {
u.GPool.recycle(u.EPool.PicDodge, n);
}).start();
} else a.getComponent(cc.Label).font = e.fontWhite;
cc.tween(a).by(1, {
y: 120
}).call(function() {
u.GPool.recycle(u.EPool.DamageLabel, a);
}).start();
}, this);
cc.systemEvent.on(EventsName.ChooseSkill, function() {
f.GTemporary.isShowingNewGuide && (e.guide.active = !1);
e.afterUserConfirmSkill();
}, this);
cc.systemEvent.on(EventsName.CountDownFinish, function() {
f.GTemporary.myData.Skills.length > 4 ? f.GTemporary.myData.SkillIndex = f.GTemporary.myData.Skills[GA.rand(0, 3)] : f.GTemporary.myData.SkillIndex = f.GTemporary.myData.Skills[GA.rand(0, f.GTemporary.myData.Skills.length - 1)];
if (f.GTemporary.isShowingNewGuide) {
e.guide.active = !1;
cc.Tween.stopAllByTarget(e.hand);
e.hand.active = !1;
if ("Old" == f.GTemporary.newGuideType) {
f.GTemporary.myData.SkillIndex = 0;
"ClickAwaken" == f.GTemporary.newGuideStepInFightA && (f.GTemporary.myData.SkillIndex = 5);
} else 1 == f.GTemporary.round && (f.GTemporary.myData.SkillIndex = 0);
}
e.afterUserConfirmSkill();
}, this);
this.spineMyMecha.spine.setEventListener(function(t, a) {
var o = a.data.name;
if ("attack" == o) {
var n = m.MData.getSkillData(f.GTemporary.myData.MechaIndex, f.GTemporary.myData.SkillIndex), i = m.MData.getSkillData(f.GTemporary.enemyData.MechaIndex, f.GTemporary.enemyData.SkillIndex);
e.spineEnemyMecha.getHurt();
e.doAttack(!0, function() {
e.attackTimer = 0;
}, n, i);
} else if ("shake" == o) {
AudioManager.vibrateShort({});
cc.Tween.stopAllByTarget(e.scene);
cc.tween(e.scene).to(.025, {
y: -30
}).to(.025, {
y: 0
}).to(.025, {
y: -30
}).to(.025, {
y: 0
}).start();
} else o.includes("play_") && AudioManager.playEffect(o);
});
this.spineEnemyMecha.spine.setEventListener(function(t, a) {
var o = a.data.name;
if ("attack" == o) {
var n = m.MData.getSkillData(f.GTemporary.myData.MechaIndex, f.GTemporary.myData.SkillIndex), i = m.MData.getSkillData(f.GTemporary.enemyData.MechaIndex, f.GTemporary.enemyData.SkillIndex);
e.spineMyMecha.getHurt();
e.doAttack(!1, function() {
e.attackTimer = 0;
}, n, i);
} else if ("shake" == o) {
AudioManager.vibrateShort({});
cc.Tween.stopAllByTarget(e.scene);
cc.tween(e.scene).to(.025, {
y: -30
}).to(.025, {
y: 0
}).to(.025, {
y: -30
}).to(.025, {
y: 0
}).start();
} else o.includes("play_") && AudioManager.playEffect(o);
});
cc.systemEvent.on(EventsName.HideFightPopup, function() {
AudioManager.playBGMusic(AudioName.BGMBattle, !1);
AudioManager.playBGMusic(AudioName.BGMMain, !0);
e.hide();
}, this);
cc.systemEvent.on(EventsName.Resurgence, function(t) {
if (t) {
f.GTemporary.myData.CurrentHealth = f.GTemporary.myData.AllHealth;
e.spineMyMecha.standBy();
e.roundStart();
}
}, this);
cc.systemEvent.on(EventsName.PauseGame, function(t) {
if (t) {
f.GTemporary.gamePause = !0;
e.spineMyMecha.pause();
e.spineEnemyMecha.pause();
l.default.instance.showSudokuN(!0);
} else {
f.GTemporary.gamePause = !1;
e.spineMyMecha.remuse();
e.spineEnemyMecha.remuse();
l.default.instance.showSudokuN(!1);
}
}, this);
cc.systemEvent.on(EventsName.ShowFinalSkillEffect, function(t) {
if (t) {
e.spineFinalSkillEffect.node.active = !0;
p.G.playSpine(e.spineFinalSkillEffect, "0-heng", !1, function() {
p.G.playSpine(e.spineFinalSkillEffect, "2-heng", !0, null);
});
} else p.G.playSpine(e.spineFinalSkillEffect, "1-heng", !1, function() {
e.spineFinalSkillEffect.node.active = !1;
});
}, this);
cc.systemEvent.on(EventsName.ReleaseSkillFinish, function(t) {
if (0 != f.GTemporary.myData.CurrentHealth && 0 != f.GTemporary.enemyData.CurrentHealth) if (t) {
var a = m.MData.getSkillData(f.GTemporary.enemyData.MechaIndex, f.GTemporary.enemyData.SkillIndex), o = f.GTemporary.enemyData.Awaken ? a.AwakenAniName : a.AniName;
e.scheduleOnce(function() {
e.spineEnemyMecha.releaseSkill(f.GTemporary.enemyData.SkillIndex, o, !1, function() {
e.roundStart();
});
}, 1);
} else {
var n = m.MData.getSkillData(f.GTemporary.myData.MechaIndex, f.GTemporary.myData.SkillIndex), i = f.GTemporary.myData.Awaken ? n.AwakenAniName : n.AniName;
e.scheduleOnce(function() {
e.spineMyMecha.releaseSkill(f.GTemporary.myData.SkillIndex, i, !1, function() {
e.roundStart();
});
}, 1);
}
}, this);
f.GTemporary.isShowingNewGuide && "New" == f.GTemporary.newGuideType && this.scheduleOnce(function() {
h.GBundle.GetBundle(h.EBundle.Spines).load("3/Skeleton", sp.SkeletonData, function(e, t) {
if (e) cc.error(e); else {
console.log("新手引导 第三个机甲下载完成");
f.GTemporary.fightSpineMap.set(3, t);
}
});
}, 5);
};
t.prototype.initData = function() {
if (f.GTemporary.tryOutMecha) {
var e = m.MData.getTargetLevelAndPartsMechaProperty(f.GTemporary.myData.MechaIndex, m.MData.getPartMaxLevel(f.GTemporary.myData.MechaIndex), m.MData.getMechaProperty(f.GTemporary.myData.MechaIndex).Level);
f.GTemporary.myData = {
MechaIndex: f.GTemporary.myData.MechaIndex,
AllHealth: e.Health,
CurrentHealth: e.Health,
Defence: e.Defence,
Attack: e.Attack,
Crit: e.Crit,
Dodge: e.Dodge,
Energy: 0,
SkillIndex: 0,
Skills: m.MData.getEnemySkillsByPartsNumber(f.GTemporary.myData.MechaIndex, m.MData.getPartMaxLevel(f.GTemporary.myData.MechaIndex)),
Awaken: !1,
IsRobot: !1,
PartsNumber: m.MData.getPartMaxLevel(f.GTemporary.myData.MechaIndex)
};
} else {
e = m.MData.getMechaProperty(m.MData.getCurrentMecha());
f.GTemporary.myData = {
MechaIndex: m.MData.getCurrentMecha(),
AllHealth: e.Health,
CurrentHealth: e.Health,
Defence: e.Defence,
Attack: e.Attack,
Crit: e.Crit,
Dodge: e.Dodge,
Energy: 0,
SkillIndex: 0,
Awaken: !1,
IsRobot: !1,
PartsNumber: m.MData.getCurrentPartMaxLevel(m.MData.getCurrentMecha()),
Skills: m.MData.getMechaUnlockSkills(m.MData.getCurrentMecha())
};
}
m.MData.setAIData();
var t = !1;
"PVE" == f.GTemporary.fightMode ? t = 0 == m.MData.getCheckpointData(f.GTemporary.chosenCheckPointIndex).AIIndex : "PVP" == f.GTemporary.fightMode && (t = 2 == f.GTemporary.pvpInfo.Index);
if (GA.isVivo() && GA.Info.underCheck) {
t = !1;
0 == f.GTemporary.currentAIData.MechaIndex && (f.GTemporary.currentAIData.MechaIndex = 1);
}
f.GTemporary.enemyData = {
MechaIndex: t ? 0 : f.GTemporary.currentAIData.MechaIndex,
AllHealth: f.GTemporary.currentAIData.Health,
CurrentHealth: f.GTemporary.currentAIData.Health,
Attack: f.GTemporary.currentAIData.Attack,
Defence: f.GTemporary.currentAIData.Defene,
Crit: f.GTemporary.currentAIData.Crit,
Dodge: f.GTemporary.currentAIData.Dodge,
Energy: 0,
SkillIndex: 0,
Awaken: !1,
IsRobot: t,
PartsNumber: f.GTemporary.currentAIData.PartsNumber,
Skills: m.MData.getEnemySkillsByPartsNumber(t ? 0 : f.GTemporary.currentAIData.MechaIndex, f.GTemporary.currentAIData.PartsNumber)
};
f.GTemporary.round = 0;
console.log("GTemporary.myData:", f.GTemporary.myData);
console.log("GTemporary.enemyData:", f.GTemporary.enemyData);
console.log("EnemyPower", 12 * (f.GTemporary.enemyData.Attack + f.GTemporary.enemyData.Defence) + f.GTemporary.enemyData.AllHealth);
};
t.prototype.startBattle = function() {
cc.systemEvent.emit(EventsName.StartBattle);
this.roundStart();
};
t.prototype.roundStart = function() {
f.GTemporary.round++;
cc.systemEvent.emit(EventsName.RoundStart);
};
t.prototype.afterUserConfirmSkill = function() {
var e = this;
this.attackTimer = 0;
f.GTemporary.enemyData.IsRobot ? f.GTemporary.enemyData.SkillIndex = 0 : f.GTemporary.enemyData.Skills.length > 4 ? 100 == f.GTemporary.enemyData.Energy && 4 != f.GTemporary.myData.SkillIndex && 5 != f.GTemporary.myData.SkillIndex ? f.GTemporary.enemyData.Awaken ? f.GTemporary.enemyData.SkillIndex = f.GTemporary.enemyData.Skills[GA.rand(0, 4)] : f.GTemporary.enemyData.SkillIndex = f.GTemporary.enemyData.Skills[GA.rand(0, f.GTemporary.enemyData.Skills.length - 1)] : f.GTemporary.enemyData.SkillIndex = f.GTemporary.enemyData.Skills[GA.rand(0, 3)] : f.GTemporary.enemyData.SkillIndex = f.GTemporary.enemyData.Skills[GA.rand(0, f.GTemporary.enemyData.Skills.length - 1)];
f.GTemporary.isShowingNewGuide && "New" == f.GTemporary.newGuideType && 1 == f.GTemporary.round && (f.GTemporary.enemyData.SkillIndex = 0);
var t = m.MData.getSkillData(f.GTemporary.myData.MechaIndex, f.GTemporary.myData.SkillIndex), a = m.MData.getSkillData(f.GTemporary.enemyData.MechaIndex, f.GTemporary.enemyData.SkillIndex), o = f.GTemporary.myData.Awaken ? t.AwakenAniName : t.AniName, n = f.GTemporary.enemyData.Awaken ? a.AwakenAniName : a.AniName;
4 != f.GTemporary.enemyData.SkillIndex && 5 != f.GTemporary.enemyData.SkillIndex || (f.GTemporary.enemyData.Energy = 0);
if (5 == f.GTemporary.myData.SkillIndex) {
f.GTemporary.currentRestrain = "Equal";
f.GTemporary.myData.Awaken = !0;
var i = GA.randFloat(0, 2);
this.scheduleOnce(function() {
cc.systemEvent.emit(EventsName.ShowRestrain);
e.scheduleOnce(function() {
cc.systemEvent.emit(EventsName.RefreshEnergy, !0);
e.spineMyMecha.awaken(function() {
5 == f.GTemporary.enemyData.SkillIndex ? e.spineEnemyMecha.awaken(function() {
e.spineEnemyMecha.standBy();
e.roundStart();
}) : e.spineEnemyMecha.releaseSkill(f.GTemporary.enemyData.SkillIndex, n, !1, function() {
e.roundStart();
});
});
}, 2);
}, i);
} else if (5 == f.GTemporary.enemyData.SkillIndex) {
f.GTemporary.currentRestrain = "Equal";
f.GTemporary.enemyData.Awaken = !0;
var r = GA.randFloat(0, 2);
this.scheduleOnce(function() {
cc.systemEvent.emit(EventsName.ShowRestrain);
e.scheduleOnce(function() {
cc.systemEvent.emit(EventsName.RefreshEnergy, !1);
e.spineEnemyMecha.awaken(function() {
5 == f.GTemporary.myData.SkillIndex ? e.spineMyMecha.awaken(function() {
e.spineMyMecha.standBy();
e.roundStart();
}) : e.spineMyMecha.releaseSkill(f.GTemporary.myData.SkillIndex, o, !1, function() {
e.roundStart();
});
});
}, 2);
}, r);
} else {
this.compareRestrain(t, a);
f.GTemporary.isShowingNewGuide && "New" == f.GTemporary.newGuideType && 2 == f.GTemporary.round && (f.GTemporary.currentRestrain = "Me");
this.firstAttack = !0;
i = GA.randFloat(0, 2);
this.scheduleOnce(function() {
cc.systemEvent.emit(EventsName.ShowRestrain);
e.scheduleOnce(function() {
"Me" == f.GTemporary.currentRestrain ? e.spineMyMecha.releaseSkill(f.GTemporary.myData.SkillIndex, o, !0, null) : "Enemy" == f.GTemporary.currentRestrain ? e.spineEnemyMecha.releaseSkill(f.GTemporary.enemyData.SkillIndex, n, !0, null) : f.GTemporary.isShowingNewGuide ? "Wait" != f.GTemporary.newGuideStepInFightA ? e.spineMyMecha.releaseSkill(f.GTemporary.myData.SkillIndex, o, !0, null) : e.spineEnemyMecha.releaseSkill(f.GTemporary.enemyData.SkillIndex, n, !0, null) : 0 == GA.rand(0, 1) ? e.spineMyMecha.releaseSkill(f.GTemporary.myData.SkillIndex, o, !0, null) : e.spineEnemyMecha.releaseSkill(f.GTemporary.enemyData.SkillIndex, n, !0, null);
}, 2);
}, i);
}
};
t.prototype.endBattle = function() {
console.log("游戏结束了", 0 == f.GTemporary.enemyData.CurrentHealth ? "玩家胜利" : "玩家失败");
y.GTool.sentLogs([ {
eventId: 0 == f.GTemporary.enemyData.CurrentHealth ? "GameSuccess" : "GameFailed",
detail: JSON.stringify({
"时长": Math.ceil(Date.now() - f.GTemporary.battleStartTime) / 1e3,
mode: f.GTemporary.fightMode
})
}, {
eventId: "GameEnd"
} ]);
if (0 == f.GTemporary.enemyData.CurrentHealth) {
this.spineEnemyMecha.die(function() {
p.G.checkCanShowFullScreenVideo("GameEnd");
g.PopupManager.show("Rank" == f.GTemporary.fightMode ? UIPath.RankResultPopup : UIPath.ResultPopup);
});
if ("PVP" == f.GTemporary.fightMode) {
m.MData.winPVP();
m.MData.finishTask("PVP");
} else if ("PVE" == f.GTemporary.fightMode) {
if (!f.GTemporary.isShowingNewGuide) {
m.MData.passCheckPoint();
m.MData.finishTask("PVE");
}
} else m.MData.userData.accountData.Model += 10;
} else this.spineMyMecha.die(function() {
p.G.checkCanShowFullScreenVideo("GameEnd");
g.PopupManager.show("Rank" == f.GTemporary.fightMode ? UIPath.RankResultPopup : UIPath.ResultPopup);
});
};
t.prototype.compareRestrain = function(e, t) {
switch (e.SkillIndex) {
case 0:
4 != t.SkillIndex ? f.GTemporary.currentRestrain = "Equal" : f.GTemporary.currentRestrain = "Enemy";
break;

case 4:
4 != t.SkillIndex ? f.GTemporary.currentRestrain = "Me" : f.GTemporary.currentRestrain = "Equal";
break;

case 1:
3 == t.SkillIndex ? f.GTemporary.currentRestrain = "Me" : 2 == t.SkillIndex || 4 == t.SkillIndex ? f.GTemporary.currentRestrain = "Enemy" : f.GTemporary.currentRestrain = "Equal";
break;

case 2:
1 == t.SkillIndex ? f.GTemporary.currentRestrain = "Me" : 3 == t.SkillIndex || 4 == t.SkillIndex ? f.GTemporary.currentRestrain = "Enemy" : f.GTemporary.currentRestrain = "Equal";
break;

case 3:
2 == t.SkillIndex ? f.GTemporary.currentRestrain = "Me" : 1 == t.SkillIndex || 4 == t.SkillIndex ? f.GTemporary.currentRestrain = "Enemy" : f.GTemporary.currentRestrain = "Equal";
}
};
t.prototype.doAttack = function(e, t, a, o) {
var n = this;
if (this.needRefreshEnery) {
this.needRefreshEnery = !1;
cc.systemEvent.emit(EventsName.RefreshEnergy, e);
}
var i = 1;
if (e) {
i = f.GTemporary.myData.Attack - f.GTemporary.enemyData.Defence > 0 ? f.GTemporary.myData.Attack - f.GTemporary.enemyData.Defence : 1;
i *= f.GTemporary.myData.Awaken ? 2 : 1;
} else {
i = f.GTemporary.enemyData.Attack - f.GTemporary.myData.Defence > 0 ? f.GTemporary.enemyData.Attack - f.GTemporary.myData.Defence : 1;
i *= f.GTemporary.enemyData.Awaken ? 2 : 1;
}
switch (e ? a.SkillIndex : o.SkillIndex) {
case 4:
i *= 1.8;
break;

case 1:
case 2:
case 3:
i *= 1.2;
}
var r = e ? f.GTemporary.myData.Awaken ? a.AwakenAttackTime : a.AttackTime : f.GTemporary.enemyData.Awaken ? o.AwakenAttackTime : o.AttackTime, s = GA.rand(1, 100) <= (e ? f.GTemporary.myData.Crit : f.GTemporary.enemyData.Crit), c = GA.rand(1, 100) <= (e ? f.GTemporary.enemyData.Dodge : f.GTemporary.myData.Dodge), l = Math.round(i / r);
s && (l *= 2);
c && (l /= 2);
l <= 0 && (l = 1);
if (f.GTemporary.isShowingNewGuide) if ("Old" == f.GTemporary.newGuideType) {
if (e) {
if (1 == f.GTemporary.round) {
l = .7 * f.GTemporary.enemyData.AllHealth / a.AttackTime;
s = !0;
c = !1;
} else if (2 == f.GTemporary.round) {
l = f.GTemporary.enemyData.CurrentHealth / (r - this.attackTimer);
s = !1;
c = !1;
}
} else if (3 == f.GTemporary.round) {
l = f.GTemporary.myData.CurrentHealth / (r - this.attackTimer);
s = !0;
c = !1;
}
} else if (1 == f.GTemporary.round) if (e) {
l = .3 * f.GTemporary.enemyData.AllHealth / a.AttackTime;
s = !1;
c = !1;
} else {
l = .3 * f.GTemporary.myData.AllHealth / a.AttackTime;
s = !1;
c = !1;
} else if (2 == f.GTemporary.round) if ("ShowWarning" == f.GTemporary.newGuideStepInFightB) {
l = Math.ceil(.7 * f.GTemporary.enemyData.AllHealth / r);
s = !0;
c = !1;
} else if ("Awaken" == f.GTemporary.newGuideStepInFightB) {
l = Math.ceil(f.GTemporary.myData.AllHealth / r);
s = !0;
c = !1;
} else if (f.GTemporary.newGuideStepInFightB = "Last") {
l = Math.ceil(f.GTemporary.enemyData.AllHealth / r);
s = !0;
c = !1;
}
l = Math.ceil(l);
GA.Info.isPreview;
e ? f.GTemporary.enemyData.CurrentHealth = f.GTemporary.enemyData.CurrentHealth - l > 0 ? f.GTemporary.enemyData.CurrentHealth - l : 0 : f.GTemporary.myData.CurrentHealth = f.GTemporary.myData.CurrentHealth - l > 0 ? f.GTemporary.myData.CurrentHealth - l : 0;
cc.systemEvent.emit(EventsName.GetHurt, {
enemyGetHurt: e,
damage: l,
isCrit: s,
isDodge: c
});
this.attackTimer++;
if (this.attackTimer == r) {
this.needRefreshEnery = !0;
switch (f.GTemporary.currentRestrain) {
case "Me":
e ? f.GTemporary.myData.Energy = f.GTemporary.myData.Energy + 36 > 100 ? 100 : f.GTemporary.myData.Energy + 36 : f.GTemporary.enemyData.Energy = f.GTemporary.enemyData.Energy + 18 > 100 ? 100 : f.GTemporary.enemyData.Energy + 18;
break;

case "Enemy":
e ? f.GTemporary.myData.Energy = f.GTemporary.myData.Energy + 18 > 100 ? 100 : f.GTemporary.myData.Energy + 18 : f.GTemporary.enemyData.Energy = f.GTemporary.enemyData.Energy + 36 > 100 ? 100 : f.GTemporary.enemyData.Energy + 36;
break;

case "Equal":
e ? f.GTemporary.myData.Energy = f.GTemporary.myData.Energy + 30 > 100 ? 100 : f.GTemporary.myData.Energy + 30 : f.GTemporary.enemyData.Energy = f.GTemporary.enemyData.Energy + 30 > 100 ? 100 : f.GTemporary.enemyData.Energy + 30;
}
cc.systemEvent.emit(EventsName.RefreshEnergy, e);
if (0 == f.GTemporary.myData.CurrentHealth || 0 == f.GTemporary.enemyData.CurrentHealth) if (f.GTemporary.isShowingNewGuide) if ("Old" == f.GTemporary.newGuideType) {
if (2 == f.GTemporary.round) {
f.GTemporary.newGuideStepInFightA = "ShowWaring";
this.spineEnemyMecha.die(function() {
n.showNewUserGuide();
});
} else if (3 == f.GTemporary.round) {
f.GTemporary.newGuideStepInFightA = "Resurgence";
this.spineMyMecha.die(function() {
n.showNewUserGuide();
});
}
} else "ShowWarning" == f.GTemporary.newGuideStepInFightB ? this.spineEnemyMecha.die(function() {
n.showNewUserGuide();
}) : "Awaken" == f.GTemporary.newGuideStepInFightB ? this.spineMyMecha.die(function() {
n.showNewUserGuide();
}) : "Last" == f.GTemporary.newGuideStepInFightB && this.endBattle(); else this.endBattle(); else {
this.firstAttack && t && t();
this.firstAttack = !1;
}
}
};
t.prototype.clickPause = function() {
GA.isWeChat() && d.GAd.showOrHideNativeGridsAd([ {
pos: d.AdPos.Left,
show: !1
}, {
pos: d.AdPos.Right,
show: !1
}, {
pos: d.AdPos.LeftVertical,
show: !0
} ]);
y.GTool.sendBtnEvent("点击暂停");
AudioManager.playEffect(AudioName.BtnClick);
f.GTemporary.gamePause = !0;
this.panelPause.active = !0;
this.spineMyMecha.pause();
this.spineEnemyMecha.pause();
l.default.instance.showSudokuN(!0);
};
t.prototype.clickBackMain = function() {
GA.isWeChat() && d.GAd.showOrHideNativeGridsAd([ {
pos: d.AdPos.LeftVertical,
show: !1
} ]);
l.default.instance.showSudokuN(!1);
y.GTool.sendBtnEvent("返回主页");
y.GTool.sentLogs([ {
eventId: "GameFailed",
detail: JSON.stringify({
"时长": Math.ceil(Date.now() - f.GTemporary.battleStartTime) / 1e3,
mode: f.GTemporary.fightMode
})
}, {
eventId: "GameEnd"
} ]);
f.GTemporary.isShowingNewGuide && "Old" == f.GTemporary.newGuideType && (f.GTemporary.isShowingNewGuide = !1);
AudioManager.playEffect(AudioName.BtnClick);
this.hide();
l.default.instance.showMain(!0);
AudioManager.playBGMusic(AudioName.BGMBattle, !1);
AudioManager.playBGMusic(AudioName.BGMMain, !0);
};
t.prototype.clickBackGame = function() {
GA.isWeChat() && d.GAd.showOrHideNativeGridsAd([ {
pos: d.AdPos.Left,
show: !0
}, {
pos: d.AdPos.Right,
show: !0
}, {
pos: d.AdPos.LeftVertical,
show: !1
} ]);
y.GTool.sendBtnEvent("返回游戏");
AudioManager.playEffect(AudioName.BtnClick);
f.GTemporary.gamePause = !1;
this.panelPause.active = !1;
this.spineMyMecha.remuse();
this.spineEnemyMecha.remuse();
l.default.instance.showSudokuN(!1);
};
t.prototype.onDestroy = function() {
GA.isWeChat() && 1 == c.GConfig.ServerConfig.GameBannerSwitch && d.GAd.hideBanner("banner2");
u.GPool.destroyPool(u.EPool.DamageLabel);
u.GPool.destroyPool(u.EPool.PicCrit);
u.GPool.destroyPool(u.EPool.PicDodge);
AudioManager.stopAllEffect();
};
t.prototype.showNewUserGuide = function() {
var e = this;
if (1 == this.panelPause.active) {
f.GTemporary.gamePause = !1;
this.panelPause.active = !1;
this.spineMyMecha.remuse();
this.spineEnemyMecha.remuse();
}
this.spineWarn.active = !1;
this.guideAwaken.active = !1;
this.warnSkillOne.active = !1;
this.warnSkillTwo.active = !1;
this.guide.active = !1;
this.hand.active = !1;
cc.Tween.stopAllByTarget(this.hand);
if ("Old" == f.GTemporary.newGuideType) switch (f.GTemporary.newGuideStepInFightA) {
case "FirstRound":
if (1 == f.GTemporary.round) {
this.guide.active = !0;
this.mask.active = !0;
this.warnSkillOne.active = !0;
this.guideAwaken.active = !0;
var t = this.main.convertToNodeSpaceAR(this.btnFirstSkill.convertToWorldSpaceAR(cc.v3()));
this.mask.setPosition(t);
this.mask.getComponentInChildren(cc.Widget).updateAlignment();
cc.Tween.stopAllByTarget(this.hand);
cc.tween(this.hand).set({
active: !0,
position: t.addSelf(cc.v3(40, -40))
}).repeatForever(cc.tween().by(.5, {
x: 50,
y: -50
}).by(.5, {
x: -50,
y: 50
})).start();
}
f.GTemporary.newGuideStepInFightA = "SecondRound";
break;

case "SecondRound":
if (2 == f.GTemporary.round) {
this.guide.active = !0;
this.mask.active = !0;
this.warnSkillOne.active = !0;
this.guideAwaken.active = !0;
var a = this.main.convertToNodeSpaceAR(this.btnFirstSkill.convertToWorldSpaceAR(cc.v3()));
this.mask.setPosition(a);
this.mask.getComponentInChildren(cc.Widget).updateAlignment();
cc.Tween.stopAllByTarget(this.hand);
cc.tween(this.hand).set({
active: !0,
position: a.addSelf(cc.v3(40, -40))
}).repeatForever(cc.tween().by(.5, {
x: 50,
y: -50
}).by(.5, {
x: -50,
y: 50
})).start();
}
break;

case "ShowWaring":
if (2 == f.GTemporary.round) {
cc.tween(this.hand).set({
active: !0,
position: cc.v3(50, 50)
}).repeatForever(cc.tween().by(.5, {
x: 50,
y: -50
}).by(.5, {
x: -50,
y: 50
})).start();
this.guide.active = !0;
this.mask.active = !1;
this.spineWarn.active = !0;
AudioManager.playEffect(AudioName.BossWarn, !0);
p.G.playSpine(this.spineWarn.getComponent(sp.Skeleton), "animation", !0, null);
this.guideAwaken.active = !0;
this.warnEnemyAwaken.active = !0;
this.guideAwaken.off(cc.Node.EventType.TOUCH_END);
this.guideAwaken.on(cc.Node.EventType.TOUCH_END, function() {
AudioManager.stopAllEffect();
e.guideAwaken.off(cc.Node.EventType.TOUCH_END);
e.guideAwaken.active = !1;
e.warnEnemyAwaken.active = !1;
e.guide.active = !1;
cc.tween(e.spineEnemyMecha.node).by(0, {
x: 500
}).call(function() {
e.spineEnemyMecha.mechaStatus = r.MechaStatus.StandBy;
f.GTemporary.enemyData.PartsNumber = m.MData.getPartMaxLevel(f.GTemporary.enemyData.MechaIndex);
var t = m.MData.getTargetLevelAndPartsMechaProperty(f.GTemporary.enemyData.MechaIndex, f.GTemporary.enemyData.PartsNumber, 1);
f.GTemporary.enemyData.Attack = t.Attack;
f.GTemporary.enemyData.Defence = t.Defence;
f.GTemporary.enemyData.AllHealth = t.Health;
f.GTemporary.enemyData.CurrentHealth = t.Health;
f.GTemporary.enemyData.Crit = t.Crit;
f.GTemporary.enemyData.Dodge = t.Dodge;
cc.systemEvent.emit(EventsName.RefresHealth, !1);
e.spineEnemyMecha.showOwnedPart();
p.G.playSpine(e.spineEnemyMecha.spine, "move", !0, null);
}).by(3, {
x: -500
}).call(function() {
e.spineEnemyMecha.standBy();
e.roundStart();
}).start();
}, this);
f.GTemporary.newGuideStepInFightA = "Wait";
}
break;

case "Resurgence":
this.guide.active = !0;
this.mask.active = !1;
this.hand.active = !1;
cc.Tween.stopAllByTarget(this.hand);
this.guideAwaken.active = !0;
this.warnMeAwaken.active = !0;
cc.tween(this.hand).set({
active: !0,
position: cc.v3(215, -160)
}).repeatForever(cc.tween().by(.5, {
x: 50,
y: -50
}).by(.5, {
x: -50,
y: 50
})).start();
this.guideAwaken.off(cc.Node.EventType.TOUCH_END);
this.guideAwaken.on(cc.Node.EventType.TOUCH_END, function() {
cc.Tween.stopAllByTarget(e.hand);
e.hand.active = !1;
e.guideAwaken.active = !1;
e.warnMeAwaken.active = !1;
f.GTemporary.myData.CurrentHealth = f.GTemporary.myData.AllHealth;
cc.systemEvent.emit(EventsName.RefresHealth, !0);
e.spineMyMecha.mechaStatus = r.MechaStatus.StandBy;
cc.tween(e.spineMyMecha.node).by(0, {
x: -500
}).call(function() {
f.GTemporary.myData.Skills = [ 0, 1, 2, 3, 4, 5 ];
var t = m.MData.getTargetLevelAndPartsMechaProperty(f.GTemporary.myData.MechaIndex, m.MData.getPartMaxLevel(f.GTemporary.myData.MechaIndex), 1);
f.GTemporary.myData.Attack = t.Attack;
f.GTemporary.myData.Defence = t.Defence;
f.GTemporary.myData.AllHealth = t.Health;
f.GTemporary.myData.CurrentHealth = t.Health;
f.GTemporary.myData.Crit = t.Crit;
f.GTemporary.myData.Dodge = t.Dodge;
cc.systemEvent.emit(EventsName.RefreshSkill);
e.spineMyMecha.showOwnedPart(!0);
p.G.playSpine(e.spineMyMecha.spine, "move", !0, null);
}).by(3, {
x: 500
}).call(function() {
e.roundStart();
e.spineMyMecha.standBy();
}).start();
}, this);
f.GTemporary.newGuideStepInFightA = "ClickAwaken";
break;

case "ClickAwaken":
cc.systemEvent.emit(EventsName.NewUserClickAwaken);
this.guide.active = !0;
this.mask.active = !0;
this.guideAwaken.active = !1;
this.warnMeAwaken.active = !1;
var o = this.main.convertToNodeSpaceAR(this.btnAwaken.convertToWorldSpaceAR(cc.v3()));
this.mask.setPosition(o);
this.mask.getComponentInChildren(cc.Widget).updateAlignment();
cc.Tween.stopAllByTarget(this.hand);
cc.tween(this.hand).set({
active: !0,
position: o.addSelf(cc.v3(40, -40))
}).repeatForever(cc.tween().to(.5, {
scale: 1.2
}).to(.5, {
scale: 1
})).start();
f.GTemporary.newGuideStepInFightA = "WaitForClickAwaken";
} else if (1 == f.GTemporary.round && "FristRound" == f.GTemporary.newGuideStepInFightB) {
this.guide.active = !0;
this.mask.active = !0;
this.warnSkillOne.active = !0;
this.guideAwaken.active = !0;
o = this.main.convertToNodeSpaceAR(this.btnFirstSkill.convertToWorldSpaceAR(cc.v3()));
this.mask.setPosition(o);
this.mask.getComponentInChildren(cc.Widget).updateAlignment();
cc.Tween.stopAllByTarget(this.hand);
cc.tween(this.hand).set({
active: !0,
position: o.addSelf(cc.v3(40, -40))
}).repeatForever(cc.tween().by(.5, {
x: 50,
y: -50
}).by(.5, {
x: -50,
y: 50
})).start();
f.GTemporary.newGuideStepInFightB = "SecondRound";
} else if (2 == f.GTemporary.round && "SecondRound" == f.GTemporary.newGuideStepInFightB) {
this.guide.active = !0;
this.mask.active = !0;
this.warnSkillTwo.active = !0;
this.guideAwaken.active = !0;
o = this.main.convertToNodeSpaceAR(this.btnSecondSkill.convertToWorldSpaceAR(cc.v3()));
this.mask.setPosition(o);
this.mask.getComponentInChildren(cc.Widget).updateAlignment();
cc.Tween.stopAllByTarget(this.hand);
cc.tween(this.hand).set({
active: !0,
position: o.addSelf(cc.v3(40, -40))
}).repeatForever(cc.tween().by(.5, {
x: 50,
y: -50
}).by(.5, {
x: -50,
y: 50
})).start();
f.GTemporary.newGuideStepInFightB = "ShowWarning";
} else if (2 == f.GTemporary.round && "ShowWarning" == f.GTemporary.newGuideStepInFightB) {
f.GTemporary.newGuideStepInFightB = "Awaken";
cc.tween(this.hand).set({
active: !0,
position: cc.v3(50, 50)
}).repeatForever(cc.tween().by(.5, {
x: 50,
y: -50
}).by(.5, {
x: -50,
y: 50
})).start();
this.guide.active = !0;
this.mask.active = !1;
this.spineWarn.active = !0;
AudioManager.playEffect(AudioName.BossWarn, !0);
p.G.playSpine(this.spineWarn.getComponent(sp.Skeleton), "animation", !0, null);
this.guideAwaken.active = !0;
this.warnEnemyAwaken.active = !0;
this.guideAwaken.off(cc.Node.EventType.TOUCH_END);
this.guideAwaken.on(cc.Node.EventType.TOUCH_END, function() {
AudioManager.stopAllEffect();
e.guideAwaken.off(cc.Node.EventType.TOUCH_END);
e.guideAwaken.active = !1;
e.warnEnemyAwaken.active = !1;
e.guide.active = !1;
cc.tween(e.spineEnemyMecha.node).by(0, {
x: 500
}).call(function() {
e.spineEnemyMecha.mechaStatus = r.MechaStatus.StandBy;
f.GTemporary.enemyData.PartsNumber = m.MData.getPartMaxLevel(f.GTemporary.enemyData.MechaIndex);
var t = m.MData.getTargetLevelAndPartsMechaProperty(f.GTemporary.enemyData.MechaIndex, f.GTemporary.enemyData.PartsNumber, 1);
f.GTemporary.enemyData.Attack = t.Attack;
f.GTemporary.enemyData.Defence = t.Defence;
f.GTemporary.enemyData.AllHealth = t.Health;
f.GTemporary.enemyData.CurrentHealth = t.Health;
f.GTemporary.enemyData.Crit = t.Crit;
f.GTemporary.enemyData.Dodge = t.Dodge;
cc.systemEvent.emit(EventsName.RefresHealth, !1);
e.spineEnemyMecha.showOwnedPart();
p.G.playSpine(e.spineEnemyMecha.spine, "move", !0, null);
}).by(3, {
x: -500
}).call(function() {
e.spineEnemyMecha.standBy();
e.spineEnemyMecha.node.setSiblingIndex(cc.macro.MAX_ZINDEX);
e.attackTimer = 0;
e.firstAttack = !0;
f.GTemporary.currentRestrain = "Enemy";
f.GTemporary.enemyData.SkillIndex = 4;
e.spineFinalSkillEffect.node.active = !0;
p.G.playSpine(e.spineFinalSkillEffect, "0-heng", !1, function() {
p.G.playSpine(e.spineFinalSkillEffect, "2-heng", !0, null);
});
p.G.playSpine(e.spineEnemyMecha.spine, "attack0_5", !1, function() {
p.G.playSpine(e.spineFinalSkillEffect, "1-heng", !1, function() {
e.spineFinalSkillEffect.node.active = !1;
});
console.log("敌人攻击我结束");
e.spineEnemyMecha.standBy();
});
}).start();
}, this);
} else if (2 == f.GTemporary.round && "Awaken" == f.GTemporary.newGuideStepInFightB) {
f.GTemporary.newGuideStepInFightB = "Last";
this.guide.active = !0;
this.mask.active = !1;
this.hand.active = !1;
cc.Tween.stopAllByTarget(this.hand);
this.guideAwaken.active = !0;
this.warnMeAwaken.active = !0;
cc.tween(this.hand).set({
active: !0,
position: cc.v3(215, -160)
}).repeatForever(cc.tween().by(.5, {
x: 50,
y: -50
}).by(.5, {
x: -50,
y: 50
})).start();
this.guideAwaken.off(cc.Node.EventType.TOUCH_END);
this.guideAwaken.on(cc.Node.EventType.TOUCH_END, function() {
cc.Tween.stopAllByTarget(e.hand);
e.hand.active = !1;
e.guideAwaken.active = !1;
e.warnMeAwaken.active = !1;
f.GTemporary.myData.CurrentHealth = f.GTemporary.myData.AllHealth;
cc.systemEvent.emit(EventsName.RefresHealth, !0);
e.spineMyMecha.mechaStatus = r.MechaStatus.StandBy;
cc.tween(e.spineMyMecha.node).by(0, {
x: -500
}).call(function() {
if (f.GTemporary.fightSpineMap.has(3)) {
e.spineMyMecha.spine.skeletonData = f.GTemporary.fightSpineMap.get(3);
f.GTemporary.myData.MechaIndex = 3;
}
f.GTemporary.myData.Skills = [ 0, 1, 2, 3, 4, 5 ];
var t = m.MData.getTargetLevelAndPartsMechaProperty(f.GTemporary.myData.MechaIndex, m.MData.getPartMaxLevel(f.GTemporary.myData.MechaIndex), 1);
f.GTemporary.myData.Attack = t.Attack;
f.GTemporary.myData.Defence = t.Defence;
f.GTemporary.myData.AllHealth = t.Health;
f.GTemporary.myData.CurrentHealth = t.Health;
f.GTemporary.myData.Crit = t.Crit;
f.GTemporary.myData.Dodge = t.Dodge;
cc.systemEvent.emit(EventsName.RefreshSkill);
e.spineMyMecha.showOwnedPart(!0);
p.G.playSpine(e.spineMyMecha.spine, "move", !0, null);
}).by(3, {
x: 500
}).call(function() {
e.spineMyMecha.node.setSiblingIndex(cc.macro.MAX_ZINDEX);
e.attackTimer = 0;
e.firstAttack = !0;
f.GTemporary.currentRestrain = "Me";
f.GTemporary.myData.SkillIndex = 4;
e.spineFinalSkillEffect.node.active = !0;
p.G.playSpine(e.spineFinalSkillEffect, "0-heng", !1, function() {
p.G.playSpine(e.spineFinalSkillEffect, "2-heng", !0, null);
});
p.G.playSpine(e.spineMyMecha.spine, "attack0_5", !1, function() {
p.G.playSpine(e.spineFinalSkillEffect, "1-heng", !1, function() {
e.spineFinalSkillEffect.node.active = !1;
});
});
}).start();
}, this);
}
};
i([ A({
type: v.default,
displayName: "回合面板"
}) ], t.prototype, "panelRound", void 0);
i([ A({
type: G.default,
displayName: "技能面板"
}) ], t.prototype, "panelSkill", void 0);
i([ A({
type: cc.Node,
displayName: "属性面板"
}) ], t.prototype, "panelProperty", void 0);
i([ A({
type: cc.Button,
displayName: "暂停按钮"
}) ], t.prototype, "btnPause", void 0);
i([ A({
type: cc.Node,
displayName: "暂停界面"
}) ], t.prototype, "panelPause", void 0);
i([ A(cc.Node) ], t.prototype, "labelDamage", void 0);
i([ A(cc.Node) ], t.prototype, "picCrit", void 0);
i([ A(cc.Node) ], t.prototype, "picDodge", void 0);
i([ A(cc.Font) ], t.prototype, "fontWhite", void 0);
i([ A(cc.Font) ], t.prototype, "fontRed", void 0);
i([ A(cc.Font) ], t.prototype, "fontYellow", void 0);
i([ A(P.default) ], t.prototype, "spineMyMecha", void 0);
i([ A(P.default) ], t.prototype, "spineEnemyMecha", void 0);
i([ A(cc.Node) ], t.prototype, "scene", void 0);
i([ A(sp.Skeleton) ], t.prototype, "spineFinalSkillEffect", void 0);
i([ A(cc.Node) ], t.prototype, "doorRight", void 0);
i([ A(cc.Node) ], t.prototype, "doorLeft", void 0);
i([ A(cc.Sprite) ], t.prototype, "sceneBg", void 0);
i([ A(cc.SpriteFrame) ], t.prototype, "spriteSceneBGs", void 0);
i([ A(cc.Node) ], t.prototype, "guide", void 0);
i([ A(cc.Node) ], t.prototype, "mask", void 0);
i([ A(cc.Node) ], t.prototype, "hand", void 0);
i([ A(cc.Node) ], t.prototype, "btnFirstSkill", void 0);
i([ A(cc.Node) ], t.prototype, "btnSecondSkill", void 0);
i([ A(cc.Node) ], t.prototype, "btnAwaken", void 0);
i([ A(cc.Node) ], t.prototype, "spineWarn", void 0);
i([ A(cc.Node) ], t.prototype, "guideAwaken", void 0);
i([ A(cc.Node) ], t.prototype, "warnSkillOne", void 0);
i([ A(cc.Node) ], t.prototype, "warnSkillTwo", void 0);
i([ A(cc.Node) ], t.prototype, "warnEnemyAwaken", void 0);
i([ A(cc.Node) ], t.prototype, "warnMeAwaken", void 0);
return i([ M ], t);
}(s.default);
a.default = b;
cc._RF.pop();
}, {
"../Base/BaseMecha": "BaseMecha",
"../Base/BasePopup": "BasePopup",
"../Config/GConfig": "GConfig",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GBundle": "GBundle",
"../Global/GPool": "GPool",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Global/Global": "Global",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager",
"../Panels/PanelProperty": "PanelProperty",
"../Panels/PanelSkill": "PanelSkill",
"../Player/Mecha": "Mecha"
} ],
GAd: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "30734+DxKtBx6qKf+/F9ag4", "GAd");
Object.defineProperty(a, "__esModule", {
value: !0
});
a.GAd = a.AdPos = a.NativeAdItem = void 0;
var o, n = e("../Config/GConfig"), i = e("./GTemporary"), r = e("./GTool");
a.NativeAdItem = function() {};
(function(e) {
e.Left = "Left";
e.Right = "Right";
e.LeftVertical = "LeftVertical";
e.RightVertical = "LeftVertical";
e.BottomLeft = "BottomLeft";
e.TopLeft = "TopLeft";
e.Main = "Main";
e.Matrix = "Matrix";
})(o = a.AdPos || (a.AdPos = {}));
a.GAd = new (function() {
function e() {
this.customAdIds = new Map();
this.customAds = new Map();
this.customAdValidTimes = new Map();
this.loadFiveGridADSuccess = !1;
this.topLeftPos = cc.v3();
this.midLeftPos = cc.v3();
this.bottomLeftPos = cc.v3();
this.rightPos = cc.v3();
this.midRightPos = cc.v3();
this.ads = new Map();
this.adLeft = new Map();
this.adUnitIds = new Map();
this.bannerHeight = 80;
this.gamePortalAdId = "";
this.nativeAdId = "";
this.nativeAdImgUrl = null;
this.nativeAdReportAdShowInterval = 2;
this.vivoCustomAd = null;
this.gamePortalAdIsLoad = !1;
this.vivoBanner = null;
this.vivoBannerPosId = "";
this.vivoBannerHeight = 113;
this.vivoBannerWeight = 720;
this.gameBannerAd = null;
this.gameBannerAdId = "";
this.currInterstitialAd = null;
this.currInterstitialAdStatus = 0;
this.interstitialAd = null;
this.kwaiAdunitId = "";
}
e.prototype.initCustomAd = function(e) {
var t = this;
GA.isWeChat() && e.forEach(function(e, a) {
t.customAdIds.set(a, e);
if ("Matrix" == a) {
var o = GA.PA.getMenuButtonBoundingClientRect();
t.showCustomAdAtPos({
tag: a,
style: {
top: o.top + o.height,
left: 0
},
onlyCache: !0
});
}
});
};
e.prototype.setCustomAdValidTimes = function(e) {
var t = this;
e.forEach(function(e, a) {
t.customAdValidTimes.set(a, {
count: e,
times: 0,
isShow: !1
});
});
};
e.prototype.showOrHideNativeGridsAd = function(e, t) {
var a = this;
0 != n.GConfig.ServerConfig.OpenGrid && e.forEach(function(e) {
if (e.pos == o.LeftVertical && 2 == n.GConfig.ServerConfig.LeftGrid) {
a.showOrHideNativeGridAd(o.TopLeft, e.show, null != t ? t : null);
a.showOrHideNativeGridAd(o.BottomLeft, e.show, null != t ? t : null);
} else a.showOrHideNativeGridAd(e.pos, e.show, null != t ? t : null);
});
};
e.prototype.showOrHideNativeGridAd = function(e, t, a) {
if (GA.isPlatform(GA.Platform.WeChat) && !GA.Info.isPreview && !i.GTemporary.isShowingNewGuide) {
var n = {
tag: e,
style: {
top: 0,
left: 0
},
onlyCache: !1
};
switch (e) {
case o.Left:
n.style.top = GA.PA.getMenuButtonBoundingClientRect().bottom + 30;
n.style.left = this.midLeftPos.x / r.GTool.Info.DesignPixelRatio;
break;

case o.Right:
n.style.top = GA.PA.getMenuButtonBoundingClientRect().bottom + 30;
n.style.left = GA.PA.getSystemInfoSync().screenWidth - 100;
break;

case o.LeftVertical:
n.style.top = GA.PA.getMenuButtonBoundingClientRect().top;
n.style.left = this.midLeftPos.x / r.GTool.Info.DesignPixelRatio;
break;

case o.BottomLeft:
n.style.top = this.topLeftPos.y / r.GTool.Info.DesignPixelRatio;
n.style.left = this.bottomLeftPos.x / r.GTool.Info.DesignPixelRatio;
break;

case o.TopLeft:
n.style.top = this.bottomLeftPos.y / r.GTool.Info.DesignPixelRatio;
n.style.left = this.topLeftPos.x / r.GTool.Info.DesignPixelRatio;
break;

case o.BottomLeft:
n.style.top = this.topLeftPos.y / r.GTool.Info.DesignPixelRatio;
n.style.left = this.bottomLeftPos.x / r.GTool.Info.DesignPixelRatio;
break;

case o.Main:
n.style.top = GA.PA.getMenuButtonBoundingClientRect().bottom + 60;
n.style.left = GA.PA.getSystemInfoSync().screenWidth / 2;
break;

case o.Matrix:
var s = GA.PA.getMenuButtonBoundingClientRect();
n.style.top = s.top;
n.style.left = 0;
n.onlyCache = !0;
}
t ? a ? this.showCustomAdAtPos(n, a) : this.showCustomAdAtPos(n) : this.hideCustomAd(e);
}
};
e.prototype.showCustomAdAtPos = function(e, t) {
if (GA.isPlatform(GA.Platform.WeChat)) try {
var a = this.customAdValidTimes.get(e.tag);
if (!a) {
a = {
count: 3,
times: 0,
isShow: !1
};
this.customAdValidTimes.set(e.tag, a);
}
if (a.count <= 0) return;
a.times++;
a.isShow = !0;
if (a.times > a.count && this.customAds.has(e.tag)) {
this.customAds.get(e.tag).destroy();
this.customAds.delete(e.tag);
}
if (this.customAds.has(e.tag)) this.customAds.get(e.tag).show(); else if (!GA.Info.isPreview) {
var o = e.onlyCache, n = t || null, i = this.createCustomAd(e, n);
i && !o && i.show();
}
} catch (e) {
console.warn(e);
}
};
e.prototype.hideCustomAd = function(e) {
if (GA.isPlatform([ GA.Platform.WeChat, GA.Platform.QQ ])) try {
var t = this.customAdValidTimes.get(e);
t.isShow = !1;
if (t.times >= t.count) {
if (this.customAds.has(e)) {
this.customAds.get(e).destroy();
this.customAds.delete(e);
}
t.times = 0;
} else this.customAds.has(e) && this.customAds.get(e).hide();
} catch (e) {
console.warn(e);
}
};
e.prototype.createCustomAd = function(e) {
var t, a = this, n = this.customAdIds.get(e.tag);
GA.isPlatform(GA.Platform.WeChat) && (t = e.tag == o.Matrix ? GA.PA.createCustomAd({
adUnitId: n,
style: {
left: GA.PA.getSystemInfoSync().screenWidth / 2 - 200,
top: 10,
width: 400
}
}) : GA.PA.createCustomAd({
adUnitId: n,
style: e.style
}));
if (t) {
this.customAds.set(e.tag, t);
t.onError(function(t) {
console.log(e.tag, "CustomAd error:" + t.errCode + " " + t.errMsg);
"Matrix" == e.tag && (a.loadFiveGridADSuccess = !1);
});
t.onLoad(function() {
console.log(e.tag, "CustomAd onLoad");
if ("Matrix" == e.tag) {
a.loadFiveGridADSuccess = !0;
console.log("5X5广告加载成功");
}
var o = a.customAdValidTimes.get(e.tag);
o && !o.isShow && setTimeout(function() {
t.hide();
}, 300);
});
}
return t;
};
e.prototype.initBannerAd = function(e, t, a) {
var o = this;
if (GA.isWeChat() && !GA.Info.isPreview) {
this.adUnitIds.set(e, t);
var i = GA.PA.getSystemInfoSync(), s = i.screenWidth < i.screenHeight ? i.screenWidth : 200, c = (i.screenWidth - s) / 2;
if ("Small" == r.GTool.Info.ScreenType) {
c -= 50;
s *= .8;
}
try {
var l = GA.PA.createBannerAd({
adUnitId: t,
adIntervals: n.GConfig.ServerConfig.BannerRefreshTime,
style: {
left: c,
top: i.screenHeight - 100,
width: s,
height: 80
}
});
l.onLoad(function() {
if (o.ads.has(e)) {
console.log(e + " reinit sussess");
o.ads.get(e).banner = l;
} else {
console.log(e + " init sussess");
o.ads.set(e, {
banner: l,
showTime: 0,
visible: !1
});
}
a && a();
});
l.onError(function(e) {
cc.warn("banner onError:", e);
});
l.onResize(function(t) {
try {
console.log(e + " onResize sussess " + t);
l.style.height = 80;
l.style.width = s;
o.bannerHeight = t.height;
l.style.top = i.screenHeight - t.height;
} catch (e) {}
});
} catch (e) {}
}
};
e.prototype.showBanner = function(e, t, a) {
var o = this;
if (GA.isWeChat() && !GA.Info.isPreview && !i.GTemporary.isShowingNewGuide) {
var n = this.ads.get(e);
n && (n.visible = !0);
if (n && n.banner) {
console.log("Try show " + e);
n.showTime++;
"Large" != r.GTool.Info.ScreenType && (a -= 30);
this.adLeft.has(e) || this.adLeft.set(e, a);
t && (n.banner.style.top = GA.PA.getSystemInfoSync().screenHeight - this.bannerHeight - t);
this.adLeft.has(e) && this.adLeft.get(e) && (n.banner.style.left = this.adLeft.get(e));
n.banner.show();
} else {
console.log("Try reinit " + e);
this.initBannerAd(e, this.adUnitIds.get(e), function() {
if (o.ads.get(e) && o.ads.get(e).visible) {
console.log("Try reinit " + e + " show");
o.showBanner(e, t, a);
} else console.log("Try reinit " + e + " hide");
});
}
}
};
e.prototype.hideBanner = function(e) {
if (GA.isWeChat() && !GA.Info.isPreview && !i.GTemporary.isShowingNewGuide) {
var t = this.ads.get(e);
t && (t.visible = !1);
if (t && t.banner) if (t.showTime >= n.GConfig.ServerConfig.BannerForceRefreshTime) {
console.log("Try destroy " + e);
t.banner.destroy();
this.ads.set(e, {
banner: null,
showTime: 0,
visible: !1
});
this.initBannerAd(e, this.adUnitIds.get(e), null);
} else {
console.log("Try hide " + e);
t.banner.hide();
}
}
};
e.prototype.init = function(e) {
var t = this;
this.gamePortalAdId = e.gamePortalAd;
this.nativeAdId = e.nativeId;
if (GA.isPlatform([ GA.Platform.OPPO, GA.Platform.Vivo ])) try {
if (GA.isOPPO()) {
console.log("准备创建九宫格广告");
this.gamePortalAd = qg.createGamePortalAd({
adUnitId: this.gamePortalAdId
});
}
GA.isVivo() && (this.gamePortalAd = GA.PA.createBoxPortalAd({
posId: this.gamePortalAdId,
marginTop: GA.PA.getSystemInfoSync().screenHeight / 2 / GA.PA.getSystemInfoSync().designPixelRatio
}));
this.gamePortalAd.onClose(function() {
console.log("用户关闭九宫");
t.gamePortalAdIsLoad = !1;
GA.isOPPO() && t.gamePortalAd.load();
});
this.gamePortalAd.onError(function(e) {
e && t.gamePortalAd.load();
console.error("创建九宫格error", e);
GA.PA.showToast({
title: "广告加载失败",
icon: "none"
});
});
this.gamePortalAd.onLoad(function() {
this.gamePortalAdIsLoad = !0;
console.log("互推盒子九宫格广告加载成功");
GA.isVivo() && this.gamePortalAd.show();
});
if (GA.isOPPO()) {
this.gamePortalAd.load();
console.log("原生广告ID:", this.nativeAdId);
this.nativeAd = qg.createNativeAd({
adUnitId: this.nativeAdId
});
this.nativeAd.onLoad(function(e) {
try {
var a = e.adList[0];
t.nativeAdImgUrl = a.imgUrlList[0];
t.curNativeAdId = a.adId;
console.log("成功，地址", t.nativeAdImgUrl);
} catch (e) {
console.error("1原生广告加载失败" + JSON.stringify(e));
}
});
this.nativeAd.onError(function(e) {
try {
t.nativeAdImgUrl = "";
t.curNativeAdId = "";
t.nativeAd && t.nativeAd.load();
console.error("2原生广告加载失败" + JSON.stringify(e));
} catch (e) {
console.error("3原生广告加载失败" + JSON.stringify(e));
}
});
this.nativeAd && this.nativeAd.load();
} else this.createVivoCustomAd();
} catch (e) {
cc.error("Oppo Create Ad Error:", e);
}
};
e.prototype.createVivoCustomAd = function() {
var e = this;
try {
var t = GA.PA.getMenuButtonBoundingClientRect();
this.vivoCustomAd = qg.createCustomAd({
adUnitId: this.nativeAdId,
style: {
top: t.bottom,
left: GA.PA.getSystemInfoSync().screenWidth / 2 + 100
}
});
if (this.vivoCustomAd) {
this.vivoCustomAd.onError(function(t) {
console.log("Vivo CustomAd error:" + t.errCode + " " + t.errMsg);
e.vivoCustomAd = null;
});
this.vivoCustomAd.onLoad(function() {
console.log("Vivo CustomAd onLoad");
});
}
} catch (e) {
cc.error(e);
}
};
e.prototype.showVivoCustomAd = function() {
try {
if (GA.isVivo() && !GA.Info.isPreview) if (this.vivoCustomAd) this.vivoCustomAd.show(); else {
this.createVivoCustomAd();
this.vivoCustomAd && this.vivoCustomAd.show();
}
} catch (e) {
cc.error(e);
}
};
e.prototype.hideVivoCustomAd = function() {
try {
GA.isVivo() && !GA.Info.isPreview && this.vivoCustomAd && this.vivoCustomAd.hide();
} catch (e) {
cc.error(e);
}
};
e.prototype.initVivoBanner = function(e) {
var t = this;
e && (this.vivoBannerPosId = e);
this.vivoBanner = qg.createBannerAd({
posId: this.vivoBannerPosId,
style: {
left: GA.PA.getSystemInfoSync().screenWidth / 2 - this.vivoBannerWeight / r.GTool.Info.DesignPixelRatio,
top: GA.PA.getSystemInfoSync().screenHeight - this.vivoBannerHeight / r.GTool.Info.DesignPixelRatio
}
});
this.vivoBanner.onLoad(function() {
console.log("Vivo banner load");
});
this.vivoBanner.onError(function(e) {
console.log("Vivo banner onerror", e);
});
this.vivoBanner.onSize(function(e) {
console.log("Vivo banner onSize", e);
t.vivoBannerWeight = null == e ? void 0 : e.weight;
t.vivoBannerHeight = null == e ? void 0 : e.height;
});
};
e.prototype.showVivoBanner = function() {
if (!GA.Info.isPreview) if (this.vivoBanner) this.vivoBanner.show(); else {
this.initVivoBanner("");
this.vivoBanner && this.vivoBanner.show();
}
};
e.prototype.hideVivoBanner = function() {
GA.Info.isPreview || this.vivoBanner && this.vivoBanner.hide();
};
e.prototype.getNativeAdImgUrl = function() {
if (GA.isOPPO() || GA.isVivo()) {
if (this.nativeAd && this.curNativeAdId) this.nativeAd.reportAdShow({
adId: this.curNativeAdId
}); else {
this.nativeAd.load();
"" != this.curNativeAdId && this.nativeAd.reportAdShow({
adId: this.curNativeAdId
});
}
return this.nativeAdImgUrl;
}
};
e.prototype.nativeAdCheckRefresh = function() {
if (GA.isOPPO()) {
this.nativeAdImgUrl = null;
this.nativeAd && this.nativeAd.load();
}
};
e.prototype.nativeAdReportAdClick = function() {
if (GA.isOPPO()) {
GA.isOPPO() ? this.nativeAd && this.curNativeAdId && this.nativeAd.reportAdClick({
adId: this.curNativeAdId
}) : GA.isPlatform(GA.Platform.Android) && GA.PA.reportOppoNativeAdClick(this.curNativeAdId);
this.nativeAdCheckRefresh();
}
};
e.prototype.showGamePortalAd = function() {
if ((GA.isOPPO() || GA.isVivo()) && this.gamePortalAd) if (GA.isVivo()) try {
this.gamePortalAd.show();
} catch (e) {} else if (this.gamePortalAdIsLoad) this.gamePortalAd && this.gamePortalAd.show(); else {
GA.PA.showToast({
title: "暂无广告！",
icon: "none",
mask: !1
});
this.gamePortalAd && GA.isOPPO() && this.gamePortalAd.load();
}
};
e.prototype.hideGamePortalAd = function() {
if ((GA.isOPPO() || GA.isVivo()) && this.gamePortalAd && GA.isVivo()) try {
this.gamePortalAd.hide();
} catch (e) {}
};
e.prototype.initGameBannerAd = function(e) {
if (GA.isOPPO() && !GA.Info.underCheck) {
console.log("初始化互推盒子横幅广告");
try {
this.gameBannerAdId = e;
if (qg.getSystemInfoSync().platformVersionCode >= 1076) {
GA.isOPPO() ? this.gameBannerAd = qg.createGameBannerAd({
adUnitId: this.gameBannerAdId
}) : this.gameBannerAd = qg.createBannerAd({
adUnitId: this.gameBannerAdId
});
console.log(this.gameBannerAd);
this.gameBannerAd.onLoad(function() {
console.log("互推盒子横幅广告加载成功!");
});
} else console.log("initGameBannerAd 版本小于1076");
} catch (e) {
console.log(e);
}
}
};
e.prototype.showGameBannerAd = function() {
if (GA.isOPPO() && !GA.Info.underCheck && this.gameBannerAd && qg.getSystemInfoSync().platformVersionCode >= 1076) try {
this.gameBannerAd.show().then(function() {
console.log("gameBannerAd show success!");
}).catch(function(e) {
console.log("gameBannerAd show fail with:" + JSON.stringify(e));
});
} catch (e) {}
};
e.prototype.hideGameBannerAd = function() {
if ((GA.isOPPO() || GA.isVivo()) && !GA.Info.underCheck) try {
this.gameBannerAd && this.gameBannerAd.hide().then(function() {
console.log("gameBannerAd hide success");
}).catch(function(e) {
console.log("gameBannerAd hide fail with:" + e.errCode + "," + e.errMsg);
});
} catch (e) {}
};
e.prototype.initInterstitialAd = function(e) {
var t = this;
try {
this.currInterstitialAd = GA.PA.createInterstitialAd({
adUnitId: e.adid
});
if (this.currInterstitialAd) {
console.log("interstitialAd init success");
this.loadInterstitialAd();
this.currInterstitialAd.onLoad(function() {
console.log("interstitialAd onLoad success");
});
this.currInterstitialAd.onError(function(e) {
console.log("interstitialAd onError with:" + e.errCode + "," + e.errMsg);
});
this.currInterstitialAd.onClose(function() {
console.log("interstitialAd onClose success");
t.currInterstitialAdStatus = 0;
t.loadInterstitialAd();
});
}
} catch (e) {}
};
e.prototype.loadInterstitialAd = function(e, t) {
var a = this;
if (this.currInterstitialAd && 0 == this.currInterstitialAdStatus) {
this.currInterstitialAdStatus = 1;
this.currInterstitialAd.load().then(function() {
a.currInterstitialAdStatus = 2;
console.log("interstitialAd load success");
e && e();
}).catch(function(e) {
a.currInterstitialAdStatus = 0;
console.log("interstitialAd load fail with:" + e.errCode + "," + e.errMsg);
t && t();
});
}
};
e.prototype.showInterstitialAd = function() {
var e = this;
if (GA.isPlatform([ GA.Platform.iOS, GA.Platform.Android ])) try {
GA.PA.showInterstitialAd();
} catch (e) {} else 0 == this.currInterstitialAdStatus ? this.loadInterstitialAd(function() {
e.showInterstitialAd();
}, function() {}) : 1 == this.currInterstitialAdStatus || 2 == this.currInterstitialAdStatus && this.currInterstitialAd.show().then(function() {
console.log("interstitialAd show success");
}).catch(function(e) {
console.log("interstitialAd show fail with:" + e.errCode + "," + e.errMsg);
});
};
e.prototype.initKwaiInterstitialAd = function(e) {
var t = {
adUnitId: e
};
this.kwaiAdunitId = e;
this.interstitialAd = ks.createInterstitialAd(t);
if (this.interstitialAd) {
this.interstitialAd.onClose(function(e) {
console.log("插屏广告Close", e);
});
this.interstitialAd.onError(function(e) {
console.log("插屏广告Error", e);
});
} else console.log("创建插屏广告组件失败");
};
e.prototype.createKwaiInterstitialAd = function() {
if (this.interstitialAd) this.interstitialAd.show().then(function(e) {
console.log("show interstitial ad success, result is " + e);
}).catch(function(e) {
try {
console.log("1show interstitial ad failed, error is " + e.toString());
} catch (e) {}
try {
console.log("2show interstitial ad failed, error is " + JSON.stringify(e));
} catch (e) {}
e.code;
}); else {
console.log("重新创建插屏广告");
this.interstitialAd = null;
var e = {
adUnitId: this.kwaiAdunitId
};
this.interstitialAd = ks.createInterstitialAd(e);
if (this.interstitialAd) {
this.interstitialAd.onClose(function(e) {
console.log("插屏广告Close", e);
});
this.interstitialAd.onError(function(e) {
console.log("插屏广告Error", e);
});
this.interstitialAd.show().then(function(e) {
console.log("show interstitial ad success, result is " + e);
}).catch(function(e) {
try {
console.log("1show interstitial ad failed, error is " + e.toString());
} catch (e) {}
try {
console.log("2show interstitial ad failed, error is " + JSON.stringify(e));
} catch (e) {}
e.code;
});
} else console.log("创建插屏广告组件失败");
}
};
return e;
}())();
cc._RF.pop();
}, {
"../Config/GConfig": "GConfig",
"./GTemporary": "GTemporary",
"./GTool": "GTool"
} ],
GBundle: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "99de9RO9X9OJqxDnze7Jqr1", "GBundle");
Object.defineProperty(a, "__esModule", {
value: !0
});
a.GBundle = a.EBundle = void 0;
(function(e) {
e.Audio = "Audio";
e.Popups = "Popups";
e.Spines = "Spines";
e.MechaPics = "MechaPics";
})(a.EBundle || (a.EBundle = {}));
a.GBundle = new (function() {
function e() {
this.BundleMap = new Map();
}
e.prototype.SetBundle = function(e, t) {
this.BundleMap.set(e, t);
};
e.prototype.GetBundle = function(e) {
var t = this;
if (this.BundleMap.has(e)) return this.BundleMap.get(e);
cc.assetManager.loadBundle(e, function(a, o) {
if (a) {
cc.error("Load Bundle Error," + JSON.stringify(a));
return null;
}
t.SetBundle(e, o);
return o;
});
};
return e;
}())();
cc._RF.pop();
}, {} ],
GConfig: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "a6b2c7VmAtM8Z7hwwUZNOGh", "GConfig");
Object.defineProperty(a, "__esModule", {
value: !0
});
a.GConfig = void 0;
var o = function() {
this.OpenGrid = 1;
this.LeftGrid = 1;
this.BannerRefreshTime = 3e3;
this.BannerForceRefreshTime = 5;
this.GridRefreshTime = 3;
this.GoldSupply = [ {
MinLevel: 0,
Rewards: [ 400, 600, 800, 1e3, 2e3 ]
}, {
MinLevel: 20,
Rewards: [ 600, 900, 1200, 1500, 3e3 ]
}, {
MinLevel: 40,
Rewards: [ 800, 1200, 1600, 2e3, 4e3 ]
}, {
MinLevel: 60,
Rewards: [ 1e3, 1500, 2e3, 2500, 5e3 ]
}, {
MinLevel: 80,
Rewards: [ 1200, 1800, 2800, 3e3, 6e3 ]
}, {
MinLevel: 100,
Rewards: [ 1400, 2100, 3300, 3500, 7e3 ]
}, {
MinLevel: 120,
Rewards: [ 1600, 2400, 3800, 4e3, 8e3 ]
}, {
MinLevel: 140,
Rewards: [ 1800, 2700, 4300, 4500, 9e3 ]
}, {
MinLevel: 160,
Rewards: [ 2e3, 3e3, 4800, 5e3, 1e4 ]
}, {
MinLevel: 180,
Rewards: [ 2300, 3300, 5300, 5500, 11e3 ]
}, {
MinLevel: 220,
Rewards: [ 2400, 3600, 5800, 6e3, 12e3 ]
}, {
MinLevel: 220,
Rewards: [ 2600, 3900, 6300, 6500, 13e3 ]
} ];
this.RematchTime = 5;
this.BanedMechas = [ 5, 6 ];
this.ShowNerUserGuide = 0;
this.NewUserGuideSwitch = 0;
this.SkyBoxInterval = 30;
this.SurpriseBoxInterval = 30;
this.GoldPageBannerSwitch = 0;
this.PVEWakenPercent = .9;
this.OppoCheatInterval = 3;
this.OppoCheatTime = 3;
this.GameBannerSwitch = 0;
this.WechatCheatSwitch = 1;
this.WechatCheatDailyGift = 1;
this.WechatCheatNewPart = 1;
this.WechatCheatResult = 1;
this.WechatCheatAddGold = 1;
};
a.GConfig = new (function() {
function e() {
this.ServerConfig = new o();
}
e.prototype.init = function(e) {
this.ServerConfig = e;
};
e.prototype.setDefaultData = function() {
this.ServerConfig = new o();
console.log("DefaultValue:", this.ServerConfig);
};
return e;
}())();
cc._RF.pop();
}, {} ],
GPool: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "cd7c08w/c9A851OxjB6/fuJ", "GPool");
Object.defineProperty(a, "__esModule", {
value: !0
});
a.GPool = a.EPool = void 0;
(function(e) {
e.Part = "Part";
e.DamageLabel = "DamageLabel";
e.PicCrit = "PicCrit";
e.PicDodge = "PicDodge";
e.MixSpine = "MixSpine";
e.Toast = "Toast";
e.Box = "Box";
})(a.EPool || (a.EPool = {}));
a.GPool = new (function() {
function e() {
this.poolMap = new Map();
}
e.prototype.initPool = function(e, t) {
this.poolMap.has(e) ? console.log("Pool already exists,don`t create repeatly.") : this.poolMap.set(e, {
pool: new cc.NodePool(),
prefab: cc.instantiate(t)
});
};
e.prototype.recycle = function(e, t) {
if (!this.poolMap.has(e)) {
this.initPool(e, cc.instantiate(t));
cc.error("Create pool using this recycle part because pool is not created.");
}
this.poolMap.get(e).pool.put(t);
};
e.prototype.getPart = function(e) {
if (this.poolMap.has(e)) return this.poolMap.get(e).pool.size() > 0 ? this.poolMap.get(e).pool.get() : cc.instantiate(this.poolMap.get(e).prefab);
cc.error("Pool is not created.");
return null;
};
e.prototype.destroyPool = function(e) {
if (this.poolMap.has(e)) {
this.poolMap.get(e).pool.clear();
this.poolMap.get(e).prefab.destroy();
this.poolMap.delete(e);
} else cc.error("Pool is not created yet.");
};
return e;
}())();
cc._RF.pop();
}, {} ],
GTemporary: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "0ef08ZtFCZHGIDwK7NC0PHY", "GTemporary");
Object.defineProperty(a, "__esModule", {
value: !0
});
a.GTemporary = void 0;
a.GTemporary = new function() {
this.region = "Inland";
this.languageVersion = "Chinese";
this.touchId = null;
this.mechaProperties = [];
this.chosenCheckPointIndex = 1;
this.chosenSkillIndex = 0;
this.chosenMechaIndex = 0;
this.currentAIData = null;
this.round = 1;
this.tryOutMecha = !1;
this.myData = null;
this.enemyData = null;
this.currentRestrain = "Equal";
this.warehouseChoosenMechaIndex = 1;
this.gamePause = !1;
this.fightMode = "PVE";
this.newPartInfo = {
MechaIndex: 1,
PartIndex: 1
};
this.pvpInfo = {
Index: 0,
MechaIndex: 1,
Power: 0,
Reward: 0
};
this.noOriginPicSlot = new Map([ [ 1, [ "1-1", "3-3", "3-8", "3-9" ] ], [ 2, [ "1-1", "3-3", "3-8", "3-9" ] ], [ 4, [ "5-1", "5-4", "5-4-h", "5-6-h", "5-6", "8-1", "8-2", "8-3", "8-4" ] ] ]);
this.unlockNewSkillInfo = {
New: !1,
MechaIndex: 1,
SkillIndex: 1
};
this.isShowingNewGuide = !1;
this.newGuideType = "Old";
this.newGuideStepInWarehouse = "Buy";
this.newGuideStepInFightA = "SeeRestrain";
this.newGuideStepInFightB = "FristRound";
this.battleStartTime = 0;
this.displaySpineMap = new Map();
this.fightSpineMap = new Map();
this.displaySpineMainPos = new Map([ [ 1, cc.v3(-218, -233) ], [ 2, cc.v3(-218, -257) ], [ 3, cc.v3(-223, -224) ], [ 4, cc.v3(-204, -245) ], [ 5, cc.v3(-204, -235) ], [ 6, cc.v3(-204, -235) ], [ 7, cc.v3(-204, -245) ] ]);
this.displaySpineWarehousePos = new Map([ [ 1, cc.v3(-274, -82) ], [ 2, cc.v3(-220, -120) ], [ 3, cc.v3(-242, -73) ], [ 4, cc.v3(-224, -91) ], [ 5, cc.v3(-224, -75) ], [ 6, cc.v3(-224, -75) ], [ 7, cc.v3(-223, -82) ] ]);
this.inWarehousePopup = !1;
this.surpriseBoxInfo = {
MechaIndex: 1,
Level: 1,
Pos: 0
};
this.skyBoxTimer = 0;
this.surpriseBoxTimer = 0;
this.gainRewardType = {
Type: "Gold",
Number: 0,
OneGet: !1
};
this.openSignInPopup = !1;
this.needReturnWarehouse = !1;
this.haveTransformBtn = [ 3, 5 ];
this.RemuseBGMusic = !1;
this.currentSeason = 1;
this.needCheckDailyGiftPopup = !1;
this.RankMatchInfo = {
Name: "机甲斗士",
Power: 0,
Mecha: 1
};
this.CheatPopup = null;
this.NextPageAfterMatrix = "Main";
}();
cc._RF.pop();
}, {} ],
GTool: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "f8665ngyGFBn6l4MDzme0F6", "GTool");
Object.defineProperty(a, "__esModule", {
value: !0
});
a.GTool = void 0;
var o = e("../Manager/MData"), n = e("./GPool"), i = e("./GTemporary"), r = function() {
this.ScreenType = "Large";
};
a.GTool = new (function() {
function e() {
this.uiZoomRatio = 1;
}
e.prototype.Init = function() {
this.Info = new r();
this.Info.GameStartTime = Date.now();
this.Info.SystemInfo = GA.PA.getSystemInfoSync();
this.Info.Rect = GA.PA.getMenuButtonBoundingClientRect();
this.Info.DesignPixelRatio = this.Info.SystemInfo.designPixelRatio;
var e = GA.PA.getSystemInfoSync().screenHeight, t = GA.PA.getSystemInfoSync().screenWidth, a = Math.max(e, t) / Math.min(e, t);
if (a >= 2) {
this.Info.ScreenType = "Large";
console.log("大屏");
} else if (a > 1.776) {
this.Info.ScreenType = "Middle";
console.log("中屏");
} else {
this.uiZoomRatio = t / e / 1.775;
console.log("UIZoomRatio:", this.uiZoomRatio);
this.Info.ScreenType = "Small";
console.log("小屏");
}
};
e.prototype.SetCanvasFit = function() {
var e = cc.view.getCanvasSize();
if (e.height / e.width < 1.5) {
cc.Canvas.instance.fitHeight = !0;
cc.Canvas.instance.fitWidth = !1;
} else {
cc.Canvas.instance.fitHeight = !1;
cc.Canvas.instance.fitWidth = !0;
}
console.log("getCanvasSize:", cc.view.getCanvasSize());
};
e.prototype.isIpad = function() {
return GA.PA.getSystemInfoSync().model.indexOf("iPad") >= 0;
};
e.prototype.showToast = function(e) {
var t = n.GPool.getPart(n.EPool.Toast);
t.active = !0;
t.setParent(cc.Canvas.instance.node);
t.setSiblingIndex(cc.macro.MAX_ZINDEX);
t.getComponentInChildren(cc.Label).string = "Chinese" == i.GTemporary.languageVersion ? e : a.GTool.getLanguage(e);
t.setPosition(cc.v3());
cc.tween(t).set({
scaleY: .1
}).to(.2, {
scaleY: 1
}).delay(1).call(function() {
n.GPool.recycle(n.EPool.Toast, t);
}).start();
};
e.prototype.sentLogs = function(e, t) {
GA.isM4399MiniGame() || GA.sentLogs(e, t);
};
e.prototype.sentLog = function(e, t, a, o) {
GA.isM4399MiniGame() || GA.Info.isPreview || this.sentLogs([ {
eventId: e,
detail: a ? JSON.stringify(a) : "",
extraNum: t || 0
} ], o);
};
e.prototype.sendBtnEvent = function(e) {
GA.isM4399MiniGame() || GA.Info.isPreview || this.sentLogs([ {
eventId: "按钮",
detail: JSON.stringify({
pos: e
})
} ]);
};
e.prototype.isNextRewardVideo = function(e) {
return !!GA.isNative() || GA.isNextRewardVideo(e) && GA.haveRewardVideo();
};
e.prototype.formatTime = function(e) {
var t = Math.floor(e / 86400), a = Math.floor(e / 3600), o = Math.floor((e - 3600 * a) / 60), n = Math.floor(e % 60), i = "";
if (t > 0) {
i = t.toFixed() + "天:";
a = Math.floor((e - 86400 * t) / 3600);
}
a > 0 && (i += (a < 10 ? "0" : "") + a.toFixed() + ":");
return i + (o < 10 ? "0" : "") + o.toFixed() + ":" + (n < 10 ? "0" : "") + n.toFixed();
};
e.prototype.getLanguage = function(e) {
var t = e;
"TraditionalChinese" == i.GTemporary.languageVersion && o.MData.excelData.ExcelMultisource.forEach(function(a) {
a.Chinese == e && (t = a.TraditionalChinese);
});
return t;
};
return e;
}())();
cc._RF.pop();
}, {
"../Manager/MData": "MData",
"./GPool": "GPool",
"./GTemporary": "GTemporary"
} ],
GainPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "09136dPNadJCJcMgSf35Vq1", "GainPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../GameLogic"), c = e("../Global/GAd"), l = e("../Global/GTemporary"), d = e("../Global/GTool"), h = e("../Manager/MData"), p = cc._decorator, u = p.ccclass, f = p.property, y = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.spriteDebris = null;
t.spriteDebris_7 = null;
t.spriteGold = null;
t.spriteMedal = null;
t.debrisInfo = null;
t.labelReward = null;
t.doubleGetNodes = [];
t.oneGetNodes = [];
t.spriteFrame = null;
t.picFrames = [];
return t;
}
t.prototype.start = function() {
this.refreshPage();
if (GA.isWeChat()) {
c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.Left,
show: !1
}, {
pos: c.AdPos.Right,
show: !1
}, {
pos: c.AdPos.LeftVertical,
show: !0
} ]);
c.GAd.showBanner("banner2", 0, GA.PA.getSystemInfoSync().screenWidth / 2 + 50);
s.default.instance.showSudokuN(!0);
} else (GA.isOPPO() || GA.isVivo()) && cc.systemEvent.emit(EventsName.ShowOppoNative, this.node, !0);
};
t.prototype.refreshPage = function() {
this.debrisInfo.active = "Debris" == l.GTemporary.gainRewardType.Type || "Debris_7" == l.GTemporary.gainRewardType.Type;
this.spriteGold.active = "Gold" == l.GTemporary.gainRewardType.Type;
this.spriteDebris.active = "Debris" == l.GTemporary.gainRewardType.Type;
this.spriteDebris_7.active = "Debris_7" == l.GTemporary.gainRewardType.Type;
this.spriteMedal.active = "Medal" == l.GTemporary.gainRewardType.Type;
this.oneGetNodes.forEach(function(e) {
e.active = l.GTemporary.gainRewardType.OneGet;
});
this.doubleGetNodes.forEach(function(e) {
e.active = !l.GTemporary.gainRewardType.OneGet;
});
"Gold" == l.GTemporary.gainRewardType.Type ? this.labelReward.string = GA.formatNumber(l.GTemporary.gainRewardType.Number) : "Debris" == l.GTemporary.gainRewardType.Type ? this.labelReward.string = "嗜血钢甲龙*碎片X" + GA.formatNumber(l.GTemporary.gainRewardType.Number) : "Debris_7" == l.GTemporary.gainRewardType.Type ? this.labelReward.string = "绝地机械武士*碎片X" + GA.formatNumber(l.GTemporary.gainRewardType.Number) : "Medal" == l.GTemporary.gainRewardType.Type && (this.labelReward.string = "勋章X" + GA.formatNumber(l.GTemporary.gainRewardType.Number));
};
t.prototype.clickGetOne = function() {
if ("Gold" == l.GTemporary.gainRewardType.Type) {
d.GTool.showToast(d.GTool.getLanguage("获得金币") + l.GTemporary.gainRewardType.Number);
h.MData.addGold(l.GTemporary.gainRewardType.Number, !1);
cc.systemEvent.emit(EventsName.GainGold, {
pos: this.main.convertToWorldSpaceAR(cc.v3()),
endCallback: function() {
cc.systemEvent.emit(EventsName.Refresh);
}
});
} else if ("Debris" == l.GTemporary.gainRewardType.Type) {
d.GTool.showToast(d.GTool.getLanguage("获得碎片") + l.GTemporary.gainRewardType.Number);
h.MData.addDebris(3, l.GTemporary.gainRewardType.Number);
} else if ("Debris_7" == l.GTemporary.gainRewardType.Type) {
d.GTool.showToast(d.GTool.getLanguage("获得碎片") + l.GTemporary.gainRewardType.Number);
h.MData.addDebris(7, l.GTemporary.gainRewardType.Number);
} else if ("Medal" == l.GTemporary.gainRewardType.Type) {
d.GTool.showToast(d.GTool.getLanguage("获得勋章") + l.GTemporary.gainRewardType.Number);
h.MData.userData.accountData.Model += l.GTemporary.gainRewardType.Number;
}
this.checkHaveExtra();
};
t.prototype.clickGetDouble = function() {
var e = this;
GA.rewardOperation({
tag: RewardType.DoubleGain,
byVideo: d.GTool.isNextRewardVideo(RewardType.DoubleGain),
page: "Gain",
result: function(t) {
if (t.reward) {
if ("Gold" == l.GTemporary.gainRewardType.Type) {
d.GTool.showToast(d.GTool.getLanguage("获得金币") + 2 * l.GTemporary.gainRewardType.Number);
h.MData.addGold(2 * l.GTemporary.gainRewardType.Number, !1);
cc.systemEvent.emit(EventsName.GainGold, {
pos: e.main.convertToWorldSpaceAR(cc.v3()),
endCallback: function() {
cc.systemEvent.emit(EventsName.Refresh);
}
});
} else if ("Debris" == l.GTemporary.gainRewardType.Type) {
d.GTool.showToast(d.GTool.getLanguage("获得碎片") + 2 * l.GTemporary.gainRewardType.Number);
h.MData.addDebris(3, 2 * l.GTemporary.gainRewardType.Number, !0);
} else if ("Debris_7" == l.GTemporary.gainRewardType.Type) {
d.GTool.showToast(d.GTool.getLanguage("获得碎片") + 2 * l.GTemporary.gainRewardType.Number);
h.MData.addDebris(7, 2 * l.GTemporary.gainRewardType.Number, !0);
} else if ("Medal" == l.GTemporary.gainRewardType.Type) {
d.GTool.showToast(d.GTool.getLanguage("获得勋章") + 2 * l.GTemporary.gainRewardType.Number);
h.MData.userData.accountData.Model += 2 * l.GTemporary.gainRewardType.Number;
}
e.checkHaveExtra();
}
}
});
};
t.prototype.checkHaveExtra = function() {
if (l.GTemporary.gainRewardType.Extra) {
var e = l.GTemporary.gainRewardType.Extra;
l.GTemporary.gainRewardType = {
Type: e.Type,
Number: e.Number,
OneGet: !1
};
this.refreshPage();
} else this.hide();
};
t.prototype.clickClose = function() {
d.GTool.sendBtnEvent("关闭获得界面");
AudioManager.playEffect(AudioName.BtnClose);
this.hide();
};
t.prototype.onDestroy = function() {
if (GA.isWeChat()) {
c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.Left,
show: !0
}, {
pos: c.AdPos.Right,
show: !0
}, {
pos: c.AdPos.LeftVertical,
show: !1
} ]);
c.GAd.hideBanner("banner2");
s.default.instance.showSudokuN(!1);
} else (GA.isOPPO() || GA.isVivo()) && cc.systemEvent.emit(EventsName.ShowOppoNative, null, !1);
};
i([ f(cc.Node) ], t.prototype, "spriteDebris", void 0);
i([ f(cc.Node) ], t.prototype, "spriteDebris_7", void 0);
i([ f(cc.Node) ], t.prototype, "spriteGold", void 0);
i([ f(cc.Node) ], t.prototype, "spriteMedal", void 0);
i([ f(cc.Node) ], t.prototype, "debrisInfo", void 0);
i([ f(cc.Label) ], t.prototype, "labelReward", void 0);
i([ f(cc.Node) ], t.prototype, "doubleGetNodes", void 0);
i([ f(cc.Node) ], t.prototype, "oneGetNodes", void 0);
i([ f(cc.Sprite) ], t.prototype, "spriteFrame", void 0);
i([ f(cc.SpriteFrame) ], t.prototype, "picFrames", void 0);
return i([ u ], t);
}(r.default);
a.default = y;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Manager/MData": "MData"
} ],
GameLogic: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "0d8feBE7W9EiJGRUdA/9fXe", "GameLogic");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r, s = e("./Base/BasePopup"), c = e("./Config/GConfig"), l = e("./Global/GAd"), d = e("./Global/GBundle"), h = e("./Global/Global"), p = e("./Global/GPool"), u = e("./Global/GTemporary"), f = e("./Global/GTool"), y = e("./Manager/MData"), m = e("./Manager/PopupManager"), g = e("./Popups/MainPopup"), v = cc._decorator, G = v.ccclass, P = v.property, w = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.toast = null;
t.mainPopup = null;
t.doorRight = null;
t.doorLeft = null;
t.showGameClubBtn = !0;
t.gameClubButton = null;
t.authBtn = null;
t.backMainTime = 0;
t.sudokuN = null;
t.navigationData = [];
t.showDoorTime = 0;
t.oppoNativeAd = null;
t.oppoAdPic = null;
t.btnSeeNativeAd = null;
t.showOppoNativeAdTime = 0;
t.oppoCheatTime = 0;
t.ads = new Map();
t.status = new Map();
t.adUnitIds = new Map();
t.bannerHeight = 0;
return t;
}
a = t;
t.prototype.onLoad = function() {
GA.isAndroid() && "Inland" == u.GTemporary.region && GA.request({
url: "https://game.17tcw.com/game/wechat",
method: "POST",
data: {
appid: "android_bxjjl_xiaomi"
},
success: function(e) {
console.log("UUID", JSON.stringify(e));
GA.Info.underCheck = "5A645BA7-7BDB-436F-84EC-B353A8A35D28" == e.data;
console.log(GA.Info.underCheck ? "审核模式" : "非审核模式");
},
fail: function(e) {
console.log("请求APP UUID FAIL:", e);
}
});
a.instance = this;
f.GTool.SetCanvasFit();
if (GA.Info.isPreview) {
y.MData.createPreviewData();
c.GConfig.ServerConfig.SurpriseBoxInterval = 5;
c.GConfig.ServerConfig.SkyBoxInterval = 5;
}
if (y.MData.isNew()) {
y.MData.addGold(100);
y.MData.unlockMecha(1);
}
y.MData.initMechaProperty();
c.GConfig.ServerConfig.BanedMechas.includes(y.MData.getCurrentMecha()) && y.MData.setChosenMecha(y.MData.allMecha[0]);
var e = y.MData.getMechaProperty(y.MData.getCurrentMecha());
u.GTemporary.myData = {
MechaIndex: y.MData.getCurrentMecha(),
AllHealth: e.Health,
CurrentHealth: e.Health,
Attack: e.Attack,
Defence: e.Defence,
Crit: e.Crit,
Dodge: e.Dodge,
Energy: 80,
SkillIndex: 0,
Awaken: !1,
IsRobot: !1,
PartsNumber: y.MData.getCurrentPartMaxLevel(y.MData.getCurrentMecha()),
Skills: y.MData.getMechaUnlockSkills(y.MData.getCurrentMecha())
};
GA.sentLog("HomeStartGame");
};
t.prototype.start = function() {
var e = this;
u.GTemporary.currentSeason = y.MData.getCurrentSeason();
GA.PA.onShow(function() {
console.log("OnShow", u.GTemporary.RemuseBGMusic);
if (u.GTemporary.RemuseBGMusic) {
u.GTemporary.RemuseBGMusic = !1;
AudioManager.playBGMusic(AudioName.BGMMain, !0);
}
});
AudioManager.playBGMusic(AudioName.BGMMain, !0);
p.GPool.initPool(p.EPool.Toast, this.toast);
u.GTemporary.isShowingNewGuide ? this.showGameClubBtn = !1 : !(y.MData.getCurrentCheckpoint() >= 3) || y.MData.checkFreeSignInToday() && y.MData.checkRewardSignInToday() || (this.showGameClubBtn = !1);
if (y.MData.isNew() && 1 == c.GConfig.ServerConfig.ShowNerUserGuide) {
f.GTool.sentLogs([ {
eventId: "Old" == u.GTemporary.newGuideType ? "旧版新手引导" : "新手引导",
detail: JSON.stringify({
Pos: "开始"
})
} ]);
u.GTemporary.isShowingNewGuide = !0;
1 == c.GConfig.ServerConfig.NewUserGuideSwitch ? u.GTemporary.newGuideType = "Old" : 2 == c.GConfig.ServerConfig.NewUserGuideSwitch ? u.GTemporary.newGuideType = "New" : u.GTemporary.newGuideType = GA.Info.uid % 2 == 1 ? "Old" : "New";
console.log("GTemporary.newGuideType:", u.GTemporary.newGuideType);
if ("Old" == u.GTemporary.newGuideType) m.PopupManager.show(UIPath.WarehousePopup); else {
u.GTemporary.fightMode = "PVE";
m.PopupManager.show(UIPath.FightPopup);
}
} else this.showMain(!0);
cc.systemEvent.on(EventsName.ShowGameClubBtn, function(t) {
e.showGameClubBtn = t;
!GA.Info.isPreview && GA.isWeChat() && !u.GTemporary.isShowingNewGuide && e.gameClubButton && (t ? e.gameClubButton.show() : e.gameClubButton.hide());
}, this);
GA.addVideoPlayCallback(function() {
h.G.reportCheatAction("videoSuccess");
cc.game.pause();
});
GA.addVideoCloseCallback(function() {
cc.game.resume();
});
GA.addVideoEndCallback(function() {
h.G.lastRewardVideoTime = Date.now();
h.G.reportCheatAction("videoEnd");
cc.game.resume();
y.MData.addVideoTime();
});
var t = cc.Canvas.instance.node.getChildByName("TopLeft");
l.GAd.topLeftPos = t.convertToWorldSpaceAR(cc.v3());
var a = cc.Canvas.instance.node.getChildByName("MidLeft");
l.GAd.midLeftPos = a.convertToWorldSpaceAR(cc.v3());
var o = cc.Canvas.instance.node.getChildByName("BottomLeft");
l.GAd.bottomLeftPos = o.convertToWorldSpaceAR(cc.v3());
var n = cc.Canvas.instance.node.getChildByName("Right");
l.GAd.rightPos = n.convertToWorldSpaceAR(cc.v3());
var i = cc.Canvas.instance.node.getChildByName("MidRight");
l.GAd.midRightPos = i.convertToWorldSpaceAR(cc.v3());
if (cc.winSize.width > 2e3) {
this.doorRight.width = cc.winSize.width / 2;
this.doorLeft.width = cc.winSize.width / 2;
}
var r = y.MData.getExcelSkillData();
y.MData.allMecha.forEach(function(e) {
var t = y.MData.getCurrentPartMaxLevel(e);
r.forEach(function(a) {
t >= a.UnlockCondition && !y.MData.checkUnlockSkill(e, a.SkillIndex) && y.MData.unlockMechaSkill(e, a.SkillIndex);
});
});
cc.systemEvent.on(EventsName.ShowOppoNative, function(t, a) {
e.showOppoNativeAd(a, t);
}, this);
!GA.Info.isPreview && GA.isWeChat() && 1 == c.GConfig.ServerConfig.WechatCheatSwitch && this.initBannerAd("CheatBanner", "adunit-43d5c7ed60230a7e", null);
};
t.prototype.showMain = function(e, t) {
var a = this;
if (e) {
u.GTemporary.needReturnWarehouse = !1;
if (this.mainPopup) {
GA.isWeChat() && l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Main,
show: !0
} ]);
this.mainPopup.active = !0;
this.mainPopup.getComponent(g.default).init();
var o = this.mainPopup.getComponent(s.default).main;
o.scale = "Small" == f.GTool.Info.ScreenType ? f.GTool.uiZoomRatio : 1;
o.opacity = 255;
t && t();
if (u.GTemporary.openSignInPopup) {
u.GTemporary.openSignInPopup = !1;
m.PopupManager.show(UIPath.SignInPopup);
} else GA.isWeChat() ? l.GAd.showInterstitialAd() : GA.isAndroid() && "Inland" == u.GTemporary.region && !GA.Info.underCheck && GA.showInterstitialAd();
if (!GA.Info.isPreview && GA.isWeChat() && !u.GTemporary.isShowingNewGuide) {
this.showGameClubBtn = !0;
this.gameClubButton.show();
this.showAuthBtn(!0);
}
if ((GA.isVivo() || GA.isOPPO()) && !GA.Info.isPreview) {
this.backMainTime++;
1 == this.backMainTime ? GA.PA.hasShortcutInstalled({
success: function(e) {
0 == e && GA.PA.installShortcut({});
}
}) : l.GAd.showInterstitialAd();
}
} else {
GA.isAndroid() || GA.PA.showLoading({
title: "努力加载中",
mask: !0
});
d.GBundle.GetBundle(d.EBundle.Popups).load(UIPath.MainPopup, cc.Prefab, function(e, o) {
if (e) cc.error(e); else {
GA.isAndroid() || GA.PA.hideLoading({});
a.mainPopup = cc.instantiate(o);
a.mainPopup.setParent(cc.Canvas.instance.node);
a.mainPopup.getComponent(g.default).init();
a.mainPopup.getComponent(s.default).main.scale = "Small" == f.GTool.Info.ScreenType ? f.GTool.uiZoomRatio : 1;
t && t();
if (u.GTemporary.isShowingNewGuide) a.mainPopup.getComponent(g.default).showNewUserGuide(); else if (!GA.Info.isPreview) if (!(y.MData.getCurrentCheckpoint() >= 3) || y.MData.checkFreeSignInToday() && y.MData.checkRewardSignInToday()) y.MData.checkGetDailyGift() ? GA.isWeChat() && l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Main,
show: !0
} ]) : m.PopupManager.show(UIPath.DailyGiftPopup); else {
m.PopupManager.show(UIPath.SignInPopup);
u.GTemporary.needCheckDailyGiftPopup = !0;
}
}
});
if (GA.isWeChat() && !GA.Info.isPreview) try {
if (!GA.Info.isPreview && GA.isWeChat()) {
this.gameClubButton = GA.PA.createGameClubButton({
type: "image",
style: {
left: GA.PA.getMenuButtonBoundingClientRect().left - 60,
top: GA.PA.getMenuButtonBoundingClientRect().top,
width: 40,
height: 40
},
icon: "light"
});
this.gameClubButton.onTap(function() {
f.GTool.sendBtnEvent("点击游戏圈");
u.GTemporary.RemuseBGMusic = !0;
});
this.showGameClubBtn && this.gameClubButton.show();
}
} catch (e) {
cc.error("GameClubButton Error", e);
}
}
cc.systemEvent.emit(EventsName.StartMainGuide);
!GA.isVivo() || GA.Info.isPreview || u.GTemporary.isShowingNewGuide || l.GAd.showGamePortalAd();
} else {
if (GA.isWeChat() && !GA.Info.isPreview) try {
this.gameClubButton && this.gameClubButton.hide();
} catch (e) {}
GA.isVivo() && !GA.Info.isPreview && l.GAd.hideGamePortalAd();
this.mainPopup.active = !1;
t && t();
}
};
t.prototype.createAuthBtn = function(e) {
var t = this;
if (!GA.Info.isPreview && GA.isWeChat() && 0 == y.MData.userData.userData.haveAuth) {
var a = e.parent.convertToWorldSpaceAR(e.getPosition());
this.authBtn = GA.PA.createUserInfoButton({
type: "text",
text: "",
image: "",
style: {
left: (a.x + e.width / 2) / f.GTool.Info.DesignPixelRatio,
top: GA.PA.getSystemInfoSync().screenHeight / 2 + (a.y - e.height / 2) / f.GTool.Info.DesignPixelRatio,
width: 2 * e.width / f.GTool.Info.DesignPixelRatio,
height: 2 * e.height / f.GTool.Info.DesignPixelRatio,
backgroundColor: "",
borderColor: "",
borderWidth: 0,
borderRadius: 4,
color: "",
textAlign: "center",
fontSize: 16,
lineHeight: 40
},
withCredentials: !1
});
this.authBtn.onTap(function(e) {
if (e.userInfo) {
var a = e.userInfo;
y.MData.userData.userData.nickName = a.nickName;
y.MData.userData.userData.avatarUrl = a.avatarUrl;
y.MData.userData.userData.haveAuth = 1;
t.authBtn.destroy();
t.authBtn = null;
} else t.showAuthBtn(!1);
t.showMain(!1, function() {
m.PopupManager.show(UIPath.RankListPopup);
});
});
this.authBtn.show();
}
};
t.prototype.showAuthBtn = function(e) {
!GA.Info.isPreview && GA.isWeChat() && this.authBtn && 0 == y.MData.userData.userData.haveAuth && (e ? this.authBtn.show() : this.authBtn.hide());
};
t.prototype.showSudokuN = function(e, t) {
var a = this;
void 0 === t && (t = 164);
if (GA.isWeChat() && !GA.Info.isPreview && !u.GTemporary.isShowingNewGuide) {
this.sudokuN.children.forEach(function(e) {
e.active = !1;
});
if (e && GA.isWeChat() && 1 == c.GConfig.ServerConfig.OpenGrid) {
this.sudokuN.active = !0;
this.sudokuN.setParent(cc.Canvas.instance.node);
this.sudokuN.setSiblingIndex(cc.macro.MAX_ZINDEX);
GA.getNavigationList(164, 9, []).then(function(e) {
a.navigationData = e;
a.navigationData.forEach(function(e, o) {
var n = a.sudokuN.children[o], i = n.children[0].getComponent(cc.Sprite);
if ("" != e.icon) {
cc.assetManager.loadRemote(e.icon, {
ext: ".png"
}, function(e, t) {
if (e) cc.error(e); else try {
n.active = !0;
i.spriteFrame = new cc.SpriteFrame(t);
} catch (e) {}
});
n.off(cc.Node.EventType.TOUCH_END);
n.on(cc.Node.EventType.TOUCH_END, function() {
h.G.reportCheatAction("clickRedirect");
GA.PA.navigateToMiniProgram({
appId: e.appid,
pkgName: e.appid,
path: e.path,
success: function() {
h.G.reportCheatAction("confirmRedirect");
GA.saveRedirect(t, e.appid, e.path);
},
fail: function() {}
});
});
}
});
}).catch(function(e) {
console.error(e);
});
} else this.sudokuN.active = !1;
}
};
t.prototype.showDoor = function(e) {
if (e) {
this.showDoorTime = Date.now();
this.doorRight.active = !0;
this.doorRight.setParent(cc.Canvas.instance.node);
this.doorRight.setSiblingIndex(cc.macro.MAX_ZINDEX);
this.doorLeft.active = !0;
this.doorLeft.setParent(cc.Canvas.instance.node);
this.doorLeft.setSiblingIndex(cc.macro.MAX_ZINDEX);
} else {
this.doorRight.active = !1;
this.doorLeft.active = !1;
}
};
t.prototype.showOppoNativeAd = function(e, t) {
var a = this;
if (GA.isOPPO()) if (GA.Info.isPreview) if (e) {
this.oppoNativeAd.active = !0;
this.oppoNativeAd.setSiblingIndex(cc.macro.MAX_ZINDEX);
if (GA.isOPPO()) {
cc.Tween.stopAllByTarget(this.btnSeeNativeAd);
cc.tween(this.btnSeeNativeAd).set({
active: !0
}).repeatForever(cc.tween().to(1, {
scale: .7
}).to(1, {
scale: 1
})).start();
}
this.showOppoNativeAdTime++;
if (!GA.Info.underCheck && 0 != c.GConfig.ServerConfig.OppoCheatInterval && this.showOppoNativeAdTime % c.GConfig.ServerConfig.OppoCheatInterval == 0) {
var o = GA.randFloat(.5, 1);
this.scheduleOnce(function() {
t && t.active && a.oppoNativeAd.active && console.log("触发误触");
}, o);
}
} else {
this.oppoNativeAd.active = !1;
this.btnSeeNativeAd.active = !1;
} else if (e) {
var n = l.GAd.getNativeAdImgUrl();
this.oppoAdPic.spriteFrame = null;
n && cc.assetManager.loadRemote(n, {
ext: ".png"
}, function(e, o) {
if (e) cc.error(e); else {
a.oppoNativeAd.active = !0;
a.oppoNativeAd.setSiblingIndex(cc.macro.MAX_ZINDEX);
a.oppoAdPic.spriteFrame = new cc.SpriteFrame(o);
if (GA.isOPPO()) {
cc.Tween.stopAllByTarget(a.btnSeeNativeAd);
cc.tween(a.btnSeeNativeAd).set({
active: !0
}).repeatForever(cc.tween().to(1, {
scale: .7
}).to(1, {
scale: 1
})).start();
}
a.showOppoNativeAdTime++;
if (!GA.Info.underCheck && 0 != c.GConfig.ServerConfig.OppoCheatInterval && a.showOppoNativeAdTime % c.GConfig.ServerConfig.OppoCheatInterval == 0 && a.oppoCheatTime < c.GConfig.ServerConfig.OppoCheatTime) {
a.oppoCheatTime++;
var n = GA.randFloat(.5, 1);
a.scheduleOnce(function() {
if (t && t.active && a.oppoNativeAd.active) {
console.log("触发误触");
a.clickNativeAD();
}
}, n);
}
}
});
} else {
this.oppoNativeAd.active = !1;
this.btnSeeNativeAd.active = !1;
} else GA.Info.isPreview || (e ? l.GAd.showVivoCustomAd() : l.GAd.hideVivoCustomAd());
};
t.prototype.clickHideNativeAD = function() {
cc.systemEvent.emit(EventsName.HideOppoNative);
this.oppoNativeAd.active = !1;
this.btnSeeNativeAd.active = !1;
};
t.prototype.clickNativeAD = function() {
l.GAd.nativeAdReportAdClick();
};
t.prototype.initBannerAd = function(e, t, a) {
var o = this;
if (GA.isWeChat() && !GA.Info.isPreview) {
this.adUnitIds.set(e, t);
var n = GA.PA.getSystemInfoSync(), i = n.screenWidth < n.screenHeight ? n.screenWidth : 200, s = (n.screenWidth - i) / 2;
if ("Small" == f.GTool.Info.ScreenType) {
s -= 50;
i *= .8;
}
var l = GA.PA.createBannerAd({
adUnitId: t,
adIntervals: c.GConfig.ServerConfig.BannerRefreshTime,
style: {
left: s,
top: n.screenHeight - 100,
width: i,
height: 80
}
});
l.onLoad(function() {
console.log("Init cheatbanner");
o.status.set(e, r.Loaded);
o.ads.set(e, l);
a && a();
});
l.onError(function(t) {
o.status.set(e, r.Error);
cc.warn("banner onError:", t);
});
l.onResize(function(e) {
try {
console.log("res.height=" + e.height);
l.style.height = e.height;
o.bannerHeight = e.height;
l.style.top = n.screenHeight - e.height;
} catch (e) {}
});
}
};
t.prototype.showBanner = function(e, t, a) {
var o = this;
if (GA.isWeChat() && !GA.Info.isPreview) {
var n = this.ads.get(e);
console.log("ShowBanner", n);
if (n) {
n.style.top = t;
if (0 != a) {
var i = GA.PA.getSystemInfoSync(), r = i.screenWidth < i.screenHeight ? i.screenWidth : 200, s = (i.screenWidth - r) / 2;
"Small" == f.GTool.Info.ScreenType && (s -= 50);
n.style.left = s + a;
}
n.show();
} else this.initBannerAd(e, this.adUnitIds.get(e), function() {
o.showBanner(e, t, a);
});
}
};
t.prototype.hideBanner = function(e) {
if (GA.isWeChat() && !GA.Info.isPreview) {
var t = this.ads.get(e);
if (t) {
t.destroy();
this.initBannerAd(e, this.adUnitIds.get(e), null);
}
}
};
var a;
t.instance = null;
i([ P(cc.Node) ], t.prototype, "toast", void 0);
i([ P(cc.Node) ], t.prototype, "doorRight", void 0);
i([ P(cc.Node) ], t.prototype, "doorLeft", void 0);
i([ P(cc.Node) ], t.prototype, "sudokuN", void 0);
i([ P(cc.Node) ], t.prototype, "oppoNativeAd", void 0);
i([ P(cc.Sprite) ], t.prototype, "oppoAdPic", void 0);
i([ P(cc.Node) ], t.prototype, "btnSeeNativeAd", void 0);
return a = i([ G ], t);
}(cc.Component);
a.default = w;
(function(e) {
e[e.Invalid = 0] = "Invalid";
e[e.Loaded = 1] = "Loaded";
e[e.Error = 2] = "Error";
e[e.Shown = 3] = "Shown";
e[e.Hidden = 4] = "Hidden";
})(r || (r = {}));
cc._RF.pop();
}, {
"./Base/BasePopup": "BasePopup",
"./Config/GConfig": "GConfig",
"./Global/GAd": "GAd",
"./Global/GBundle": "GBundle",
"./Global/GPool": "GPool",
"./Global/GTemporary": "GTemporary",
"./Global/GTool": "GTool",
"./Global/Global": "Global",
"./Manager/MData": "MData",
"./Manager/PopupManager": "PopupManager",
"./Popups/MainPopup": "MainPopup"
} ],
Global: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "239fecSRMBOtqXDD8Suo0ip", "Global");
Object.defineProperty(a, "__esModule", {
value: !0
});
a.G = a.CheatPos = void 0;
var o = e("../Config/GConfig"), n = e("./GTemporary");
(function(e) {
e.DailyGift = "DailyGift";
e.NewPart = "NewPart";
e.Result = "Result";
e.AddGold = "AddGold";
})(a.CheatPos || (a.CheatPos = {}));
var i = function() {
function e() {
this.clickData = {
score: 0,
cheatClickMax: 0,
postionLimitList: []
};
this.NoFullVideoAfterRewardVideo = 60;
this.NoFullVideoAfterFullVideo = 60;
this.NoFullVideoAfterStart = 60;
this.PosLuckySwitch = 1;
this.PosGameEndSwitch = 1;
this.gameStartTime = 0;
this.lastFullVideoTime = 0;
this.lastRewardVideoTime = 0;
}
e.prototype.initClickData = function(e) {
this.clickData.score = e.score;
this.clickData.cheatClickMax = e.cheatClickMax;
this.clickData.postionLimitList = e.postionLimitList;
console.log("用户骗点次数实例化:", this.clickData);
};
e.prototype.checkWeChatCanCheatClick = function(e) {
var t = !1;
if (GA.Info.underCheck || !GA.isWeChat() || 1 != o.GConfig.ServerConfig.WechatCheatSwitch || n.GTemporary.isShowingNewGuide) t = !1; else if (0 == this.clickData.cheatClickMax) t = !1; else for (var a = 0; a < this.clickData.postionLimitList.length; a++) this.clickData.postionLimitList[a].position == e && this.clickData.postionLimitList[a].count > 0 && (t = !0);
console.log("__________", t ? "可以骗点" : "不可以骗点");
return t;
};
e.prototype.triggerCheatReport = function(e) {
var t = this;
GA.isWeChat() && GA.request({
url: Urls.url_CheckTriger,
data: {
userId: GA.Info.uid,
position: e,
channel: GA.Info.channelId
},
method: "POST",
success: function(a) {
console.log("骗点 触发上报", e, "->", a.data.data);
t.initClickData(a.data.data);
}
});
};
e.prototype.reportCheatAction = function(e) {
var t = this;
GA.isWeChat() && GA.request({
url: Urls.url_CheckAction,
data: {
userId: GA.Info.uid,
action: e,
scene: GA.Info.scene,
channel: GA.Info.channelId
},
method: "POST",
success: function(a) {
console.log("骗点 行为上报", e, "->", a.data.data);
t.initClickData(a.data.data);
}
});
};
e.prototype.playSpine = function(e, t, a, o, n) {
void 0 === n && (n = !1);
var i = e.setAnimation(0, t, a);
if (n) {
var r = e.getCurrent(0);
r.trackTime = r.animationEnd;
e.timeScale = -1;
setInterval(function() {
o();
}, r.animationEnd);
} else e.timeScale = 1;
i && o && !n && e.setCompleteListener(function(e) {
(e.animation ? e.animation.name : "") === t && o();
});
};
e.prototype.checkCanShowFullScreenVideo = function(e) {
if (GA.isAndroid() && "Oversea" == n.GTemporary.region && !GA.Info.isPreview) {
var t = !0;
"Lucky" == e && 1 != this.PosLuckySwitch && (t = !1);
"GameEnd" == e && 1 != this.PosGameEndSwitch && (t = !1);
Date.now() - this.gameStartTime < 1e3 * this.NoFullVideoAfterStart && (t = !1);
Date.now() - this.lastRewardVideoTime < 1e3 * this.NoFullVideoAfterRewardVideo && (t = !1);
Date.now() - this.lastFullVideoTime < 1e3 * this.NoFullVideoAfterFullVideo && (t = !1);
if (t) {
console.log("展示全屏视频");
this.lastFullVideoTime = Date.now();
GA.showFullScreenVideoAd();
} else console.log("不能展示全屏视频ƒ");
}
};
return e;
}();
a.G = new i();
window.G = a.G;
cc._RF.pop();
}, {
"../Config/GConfig": "GConfig",
"./GTemporary": "GTemporary"
} ],
HorizontalScrollN: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "3a925tYtj5MgIRaFujw0TJA", "HorizontalScrollN");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Config/GConfig"), s = e("../Global/Global"), c = e("../Global/GTemporary"), l = cc._decorator, d = l.ccclass, h = l.property, p = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.type = 163;
t.scrollview = null;
t.itemtemp = null;
t.navigationData = [];
t.autoscrolltime = 3;
t.scrolltime = 0;
t.direction = 1;
t.moveOffsetX = 2.5;
return t;
}
t.prototype.start = function() {
GA.isWeChat() ? 0 == r.GConfig.ServerConfig.OpenGrid || c.GTemporary.isShowingNewGuide ? this.node.active = !1 : this.loadData() : this.node.active = !1;
};
t.prototype.loadData = function() {
var e = this;
GA.getNavigationList(this.type, 20, []).then(function(t) {
e.navigationData = t;
e.updateWithData();
}).catch(function(e) {
console.error(e);
});
};
t.prototype.update = function(e) {
this.scrolltime += e;
if (this.scrolltime >= this.autoscrolltime) {
this.scrolltime = 0;
var t = this.scrollview.getScrollOffset().x;
Math.abs(t - 0) < 1 ? this.direction = 1 : Math.abs(t + this.scrollview.getMaxScrollOffset().x) < 1 && (this.direction = -1);
var a = this.direction * (this.itemtemp.node.width + this.moveOffsetX) + -1 * this.scrollview.getScrollOffset().x;
a = Math.round(a / (this.itemtemp.node.width + this.moveOffsetX)) * (this.itemtemp.node.width + this.moveOffsetX);
this.scrollview.scrollToOffset(cc.v2(a, 0), .5);
}
};
t.prototype.updateWithData = function() {
var e = this;
this.navigationData.forEach(function(t) {
var a = cc.instantiate(e.itemtemp.node);
a.parent = e.scrollview.content;
a.active = !0;
var o = a.children[0].getComponent(cc.Sprite);
if ("" != t.icon) {
cc.assetManager.loadRemote(t.icon, function(e, t) {
if (e) cc.error(e); else try {
o.spriteFrame = new cc.SpriteFrame(t);
} catch (e) {}
});
a.off(cc.Node.EventType.TOUCH_END);
a.on(cc.Node.EventType.TOUCH_END, function() {
s.G.reportCheatAction("clickRedirect");
GA.PA.navigateToMiniProgram({
appId: t.appid,
pkgName: t.appid,
path: t.path,
success: function() {
s.G.reportCheatAction("confirmRedirect");
GA.saveRedirect(e.type, t.appid, t.path);
},
fail: function() {}
});
});
}
});
};
t.prototype.onScrollViewEvent = function() {
this.scrolltime = 0;
};
i([ h(cc.ScrollView) ], t.prototype, "scrollview", void 0);
i([ h(cc.Button) ], t.prototype, "itemtemp", void 0);
return i([ d ], t);
}(cc.Component);
a.default = p;
cc._RF.pop();
}, {
"../Config/GConfig": "GConfig",
"../Global/GTemporary": "GTemporary",
"../Global/Global": "Global"
} ],
IPartInfo: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "aeb4d8/yPZNlZD9fejTHDf5", "IPartInfo");
Object.defineProperty(a, "__esModule", {
value: !0
});
cc._RF.pop();
}, {} ],
ITable: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "45d94HSwZRLfaxdUWTSNsn9", "ITable");
Object.defineProperty(a, "__esModule", {
value: !0
});
cc._RF.pop();
}, {} ],
InfoPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "d48514rIX5GKaGSQmO4bAb3", "InfoPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../GameLogic"), c = e("../Global/GAd"), l = e("../Global/GBundle"), d = e("../Global/GTemporary"), h = e("../Global/GTool"), p = e("../Manager/MData"), u = cc._decorator, f = u.ccclass, y = u.property, m = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.labelSkillName = null;
t.labelSkillInfo = null;
t.labelUnlockNum = null;
t.topicNewSkill = null;
t.topic = null;
t.picSkill = null;
return t;
}
t.prototype.start = function() {
var e = this;
if (GA.isWeChat()) {
c.GAd.hideBanner("banner");
c.GAd.showBanner("banner2", 0, GA.PA.getSystemInfoSync().screenWidth / 2 + 50);
s.default.instance.showSudokuN(!0);
c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.LeftVertical,
show: !0
} ]);
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, this.node, !0) : GA.isAndroid() && "Inland" == d.GTemporary.region && !GA.Info.underCheck && GA.showNativeAd({
offsetX: 500,
type: 2
});
var t = "";
if (d.GTemporary.unlockNewSkillInfo.New) {
d.GTemporary.unlockNewSkillInfo.New = !1;
this.topic.active = !1;
this.topicNewSkill.active = !0;
var a = p.MData.getSkillData(d.GTemporary.unlockNewSkillInfo.MechaIndex, d.GTemporary.unlockNewSkillInfo.SkillIndex);
if ("Chinese" == d.GTemporary.languageVersion) {
this.labelSkillName.string = a.SkillName;
this.labelSkillInfo.string = a.Des;
} else {
this.labelSkillName.string = h.GTool.getLanguage(a.SkillName);
this.labelSkillInfo.string = h.GTool.getLanguage(a.Des);
}
this.labelUnlockNum.node.active = !1;
t = 5 == d.GTemporary.unlockNewSkillInfo.SkillIndex ? "TraditionalChinese" == d.GTemporary.languageVersion ? "Skill/BtnTransform_T" : "Skill/BtnTransform" : "Skill/" + d.GTemporary.unlockNewSkillInfo.MechaIndex + "_" + d.GTemporary.unlockNewSkillInfo.SkillIndex;
} else {
a = p.MData.getSkillData(d.GTemporary.chosenMechaIndex, d.GTemporary.chosenSkillIndex);
if ("Chinese" == d.GTemporary.languageVersion) {
this.labelSkillName.string = a.SkillName;
this.labelSkillInfo.string = a.Des;
} else {
this.labelSkillName.string = h.GTool.getLanguage(a.SkillName);
this.labelSkillInfo.string = h.GTool.getLanguage(a.Des);
}
this.labelUnlockNum.node.active = !p.MData.checkUnlockSkill(d.GTemporary.chosenMechaIndex, d.GTemporary.chosenSkillIndex);
this.labelUnlockNum.node.active && (this.labelUnlockNum.string = p.MData.getSkillUnlockCondition(d.GTemporary.chosenMechaIndex, d.GTemporary.chosenSkillIndex).toString());
t = 5 == d.GTemporary.chosenSkillIndex ? "TraditionalChinese" == d.GTemporary.languageVersion ? "Skill/BtnTransform_T" : "Skill/BtnTransform" : "Skill/" + d.GTemporary.chosenMechaIndex + "_" + d.GTemporary.chosenSkillIndex;
}
l.GBundle.GetBundle(l.EBundle.MechaPics).load(t, cc.SpriteFrame, function(t, a) {
t ? cc.error(t) : e.node && e.picSkill && (e.picSkill.spriteFrame = a);
});
};
t.prototype.clickClose = function() {
h.GTool.sendBtnEvent("关闭详情弹窗");
AudioManager.playEffect(AudioName.BtnClose);
this.hide();
};
t.prototype.onDestroy = function() {
if (GA.isWeChat()) {
c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.LeftVertical,
show: !1
} ]);
c.GAd.hideBanner("banner2");
c.GAd.showBanner("banner", 0, 0);
s.default.instance.showSudokuN(!1);
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, null, !1) : GA.isAndroid() && "Inland" == d.GTemporary.region && !GA.Info.underCheck && GA.hideNativeAd();
};
i([ y(cc.Label) ], t.prototype, "labelSkillName", void 0);
i([ y(cc.Label) ], t.prototype, "labelSkillInfo", void 0);
i([ y(cc.Label) ], t.prototype, "labelUnlockNum", void 0);
i([ y(cc.Node) ], t.prototype, "topicNewSkill", void 0);
i([ y(cc.Node) ], t.prototype, "topic", void 0);
i([ y(cc.Sprite) ], t.prototype, "picSkill", void 0);
return i([ f ], t);
}(r.default);
a.default = m;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GBundle": "GBundle",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Manager/MData": "MData"
} ],
Interface: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "70d3fzWqH1KVJpUw3b89UuW", "Interface");
Object.defineProperty(a, "__esModule", {
value: !0
});
cc._RF.pop();
}, {} ],
LabelDebris: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "6b168+XAiJArp9lwSpTar77", "LabelDebris");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Manager/MData"), s = e("../Manager/PopupManager"), c = cc._decorator, l = c.ccclass, d = c.property, h = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.mechaIndex = 3;
return t;
}
t.prototype.start = function() {
var e = this;
this.node.getComponent(cc.Label).string = GA.formatNumber(r.MData.getMechaDebris(this.mechaIndex));
cc.systemEvent.on(EventsName.Refresh, function() {
e.node.getComponent(cc.Label).string = GA.formatNumber(r.MData.getMechaDebris(e.mechaIndex));
}, this);
this.node.parent.on(cc.Node.EventType.TOUCH_END, function() {
if (3 == e.mechaIndex) {
AudioManager.playEffect(AudioName.BtnClick);
s.PopupManager.show(UIPath.DrawPopup);
}
}, this);
};
i([ d() ], t.prototype, "mechaIndex", void 0);
return i([ l ], t);
}(cc.Component);
a.default = h;
cc._RF.pop();
}, {
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager"
} ],
LabelDiamond: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "a58e5TkB9NOR7zAQaAK2OfK", "LabelDiamond");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) t.hasOwnProperty(a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Manager/MData"), s = cc._decorator, c = s.ccclass, l = (s.property, 
function(e) {
n(t, e);
function t() {
return null !== e && e.apply(this, arguments) || this;
}
t.prototype.start = function() {
var e = this;
this.node.getComponent(cc.Label).string = GA.formatNumber(r.MData.getCurrentDiamond());
cc.systemEvent.on(EventsName.Refresh, function() {
e.node.getComponent(cc.Label).string = GA.formatNumber(r.MData.getCurrentDiamond());
}, this);
this.node.parent.on(cc.Node.EventType.TOUCH_END, function() {}, this);
};
return i([ c ], t);
}(cc.Component));
a.default = l;
cc._RF.pop();
}, {
"../Manager/MData": "MData"
} ],
LabelGold: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "af051jc0qZLxLFei0wZ+aIJ", "LabelGold");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) t.hasOwnProperty(a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Manager/MData"), s = e("../Manager/PopupManager"), c = cc._decorator, l = c.ccclass, d = (c.property, 
function(e) {
n(t, e);
function t() {
return null !== e && e.apply(this, arguments) || this;
}
t.prototype.start = function() {
var e = this;
this.node.getComponent(cc.Label).string = GA.formatNumber(r.MData.getCurrentGold());
cc.systemEvent.on(EventsName.Refresh, function() {
e.node.getComponent(cc.Label).string = GA.formatNumber(r.MData.getCurrentGold());
}, this);
this.node.parent.on(cc.Node.EventType.TOUCH_END, function() {
AudioManager.playEffect(AudioName.BtnClick);
s.PopupManager.show(UIPath.AddGoldPopup);
}, this);
};
return i([ l ], t);
}(cc.Component));
a.default = d;
cc._RF.pop();
}, {
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager"
} ],
LightCircle: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "61b7bJBssNMB5XCOG1sdNuH", "LightCircle");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) t.hasOwnProperty(a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = cc._decorator, s = r.ccclass, c = r.property, l = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.reverse = !1;
t.time = 10;
return t;
}
t.prototype.start = function() {
cc.tween(this.node).repeatForever(cc.tween().by(this.time, {
angle: this.reverse ? -360 : 360
})).start();
};
t.prototype.onDestroy = function() {
cc.Tween.stopAllByTarget(this.node);
};
i([ c() ], t.prototype, "reverse", void 0);
i([ c() ], t.prototype, "time", void 0);
return i([ s ], t);
}(cc.Component);
a.default = l;
cc._RF.pop();
}, {} ],
LoadingManager: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "dc19bX4z/9Jn58XQsaCdBtW", "LoadingManager");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
e("gameassistant3");
var r = e("../Config/GConfig"), s = e("../Global/GAd"), c = e("../Global/GBundle"), l = e("../Global/Global"), d = e("../Global/GTemporary"), h = e("../Global/GTool"), p = e("./MData"), u = e("./PopupManager"), f = cc._decorator, y = f.ccclass, m = f.property, g = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.fakeProgress = null;
t.mainProgress = null;
t.jdLab = null;
t.spine = null;
t.logo = null;
t.vivoLogo = null;
t.traditionalLogo = null;
t.progress = 0;
t.isReady = !1;
t.ageWarn = null;
t.panelPrivacy = null;
t.picPrivacyInfo = null;
return t;
}
t.prototype.onLoad = function() {
var e = this;
l.G.gameStartTime = Date.now();
var t = cc.sys.languageCode;
GA.ENABLE_NEXT_VERSION = !0;
-1 != t.indexOf("zh") && (-1 == t.indexOf("cn") && -1 == t.indexOf("CN") || -1 != t.indexOf("hant") || -1 != t.indexOf("Hant") ? d.GTemporary.languageVersion = "TraditionalChinese" : d.GTemporary.languageVersion = "Chinese");
this.progress = 20;
this.loadBundle();
h.GTool.SetCanvasFit();
var a = GA.Platform.Android;
cc.tween(this.fakeProgress).repeatForever(cc.tween().to(.5, {
fillRange: 1
}).set({
fillRange: 0
})).start();
GA.init({
isPreview: !1,
platform: a,
engine: GA.EngineType.CocosCreator,
appId: "android_bxjjl_xiaomi",
channelKey: "krq_bxjjl",
uuid: "5A645BA7-7BDB-436F-84EC-B353A8A35D28",
resolution: {
width: 720,
height: 1280
},
sharePath: "krq_bxjjl=001",
debugLog: !1
}).then(function() {
if (GA.isAndroid() && "Inland" == d.GTemporary.region && !GA.Info.underCheck) {
GA.showNativeAd({
type: 4
});
setTimeout(function() {
console.log("Hide Fullscreen NativeAd");
GA.hideNativeAd();
}, 5e3);
}
h.GTool.Init();
if (GA.isAndroid() && "Oversea" == d.GTemporary.region) {
var t = cc.sys.localStorage.getItem("GameData");
p.MData.initUserData(t);
e.initAppProxy();
e.progress += 30;
e.loadLocalExcel();
r.GConfig.setDefaultData();
} else GA.getOpenId(function() {
if (GA.isM4399MiniGame()) {
var t = GA.PA.getStorageSync("GameData");
GA.setUserId("1");
p.MData.initUserData(t);
} else {
console.log("openid:", GA.Info.openId);
GA.request({
url: Urls.url_reqLogin,
data: {
openid: GA.Info.openId,
channel: GA.Info.channelId,
scence: GA.Info.scene,
nickname: GA.Info.nickname,
headicon: GA.Info.avatar
},
method: "POST",
success: function(t) {
GA.setUserId(t.data.data.userId);
console.log("userId:", GA.Info.uid);
p.MData.initUserData(t.data.data.data);
l.G.reportCheatAction("login");
GA.request({
url: Urls.url_getNewConfigs,
data: [],
method: "POST",
success: function(t) {
r.GConfig.init(t.data.data);
p.MData.loadServerExcel(function() {
e.progress += 20;
});
e.initAD();
e.progress += 30;
},
fail: function(t) {
console.log("读取服务器数据出错", t);
e.progress += 30;
e.loadLocalExcel();
r.GConfig.setDefaultData();
}
});
}
});
}
}, !1, !0);
}).catch(function() {});
};
t.prototype.playAni = function() {
var e = this;
l.G.playSpine(this.spine, "attack0_5", !1, function() {
l.G.playSpine(e.spine, "standby1", !0, null);
e.scheduleOnce(function() {
e.node && e.node.active && e.playAni();
}, 2);
});
};
t.prototype.start = function() {
this.playAni();
};
t.prototype.loadLocalExcel = function() {
var e = this;
p.MData.loadLocalExcel(function() {
e.progress += 20;
});
};
t.prototype.loadBundle = function() {
var e = this;
cc.assetManager.loadBundle("Audio", function(t, a) {
if (t) console.log("err:", t); else {
AudioManager.audioBundle = a;
c.GBundle.SetBundle(c.EBundle.Audio, a);
e.progress += 10;
}
});
cc.assetManager.loadBundle("Popups", function(t, a) {
if (t) console.log("err:", t); else {
u.PopupManager.popupsBundle = a;
c.GBundle.SetBundle(c.EBundle.Popups, a);
e.progress += 10;
}
});
cc.assetManager.loadBundle("Spines", function(t, a) {
if (t) console.log("err:", t); else {
c.GBundle.SetBundle(c.EBundle.Spines, a);
e.progress += 5;
}
});
cc.assetManager.loadBundle("MechaPics", function(t, a) {
if (t) console.log("err:", t); else {
c.GBundle.SetBundle(c.EBundle.MechaPics, a);
e.progress += 5;
}
});
};
t.prototype.update = function() {
this.mainProgress.fillRange = this.progress >= 100 ? 1 : this.progress / 100;
this.jdLab.string = "加载" + Math.ceil(100 * this.mainProgress.fillRange) + "%";
if (this.mainProgress.fillRange >= 1 && !this.isReady) {
(GA.isOPPO() || GA.isVivo()) && (p.MData.isNew() || GA.Info.underCheck) ? this.panelPrivacy.active = !0 : cc.director.loadScene("GameScene");
this.isReady = !0;
}
};
t.prototype.initAD = function() {
if (!GA.Info.isPreview) if (GA.isWeChat()) {
GA.initRewardVideoAd([ "adunit-ed4bbeefc92d5201" ]);
s.GAd.initBannerAd("banner", "adunit-43d5c7ed60230a7e", null);
s.GAd.initBannerAd("banner2", "adunit-43d5c7ed60230a7e", null);
s.GAd.initInterstitialAd({
adid: "adunit-9c9bc51dfb18afe3"
});
var e = new Map();
e.set(s.AdPos.Right, "adunit-2db1b76f1a9d7483");
e.set(s.AdPos.Left, "adunit-2db1b76f1a9d7483");
e.set(s.AdPos.BottomLeft, "adunit-2db1b76f1a9d7483");
e.set(s.AdPos.TopLeft, "adunit-2db1b76f1a9d7483");
e.set(s.AdPos.Main, "adunit-2db1b76f1a9d7483");
e.set(s.AdPos.LeftVertical, "adunit-3ed49039c900ea53");
e.set(s.AdPos.Matrix, "adunit-ad5d182f1a39af1f");
s.GAd.initCustomAd(e);
s.GAd.setCustomAdValidTimes(new Map([ [ s.AdPos.Right, r.GConfig.ServerConfig.GridRefreshTime ], [ s.AdPos.Left, r.GConfig.ServerConfig.GridRefreshTime ], [ s.AdPos.BottomLeft, r.GConfig.ServerConfig.GridRefreshTime ], [ s.AdPos.TopLeft, r.GConfig.ServerConfig.GridRefreshTime ], [ s.AdPos.Main, r.GConfig.ServerConfig.GridRefreshTime ], [ s.AdPos.LeftVertical, r.GConfig.ServerConfig.GridRefreshTime ] ]));
} else if (GA.isVivo()) {
s.GAd.initVivoBanner("7830209bb37a49e984f1039189c8404f");
GA.initRewardVideoAd([ "f0b9facc479e46c1adc291710992a397" ]);
s.GAd.initInterstitialAd({
adid: "1170343c9ff74d3f88fa3a684677da44"
});
s.GAd.init({
gamePortalAd: "f7fa68bd205a4e3bb3d3afbe6d34fd77",
nativeId: "2068cf3aee1b4182a67098d439eaddad"
});
} else if (GA.isOPPO()) {
GA.initRewardVideoAd([ "446644" ]);
s.GAd.init({
gamePortalAd: "446645",
nativeId: "446643"
});
s.GAd.initGameBannerAd("446646");
GA.initBannerAd({
adTag: "banner",
adId: "446641"
});
}
};
t.prototype.clickOppoAgreePrivacy = function() {
cc.director.loadScene("GameScene");
};
t.prototype.clickOppoDisagreePrivacy = function() {
qg.exitApplication({});
};
t.prototype.clickOppoSeePrivacy = function() {
this.picPrivacyInfo.active = !0;
};
t.prototype.clickOppoClosePrivacy = function() {
this.picPrivacyInfo.active = !1;
};
t.prototype.initAppProxy = function() {
if (!GA.Info.isPreview) try {
var e = function() {
var e = null === AppProxy || void 0 === AppProxy ? void 0 : AppProxy.getRemoteConfig();
console.log("Remote Configs:", JSON.stringify(e));
e.forEach(function(e, t) {
console.log("Remote config " + e + ":" + t);
switch (t) {
case "NoFullVideoAfterRewardVideo":
l.G.NoFullVideoAfterRewardVideo = Number(e);
break;

case "NoFullVideoAfterFullVideo":
l.G.NoFullVideoAfterFullVideo = Number(e);
break;

case "NoFullVideoAfterStart":
l.G.NoFullVideoAfterStart = Number(e);
break;

case "PosLuckySwitch":
l.G.PosLuckySwitch = Number(e);
break;

case "PosGameEndSwitch":
l.G.PosGameEndSwitch = Number(e);
}
});
};
null === AppProxy || void 0 === AppProxy || AppProxy.registListener(AppProxy.ListenerKey.REMOTE_CONFIG_SYNC, function(t) {
if (t) e(); else {
var a = "", o = "", n = "";
if ("Chinese" == d.GTemporary.languageVersion) {
a = "提示";
o = "远程配置获取失败，请重试！";
n = "确定";
} else if ("TraditionalChinese" == d.GTemporary.languageVersion) {
a = "提示";
o = "遠程配寘獲取失敗，請重試！";
n = "確定";
}
GA.PA.showModal({
title: a,
content: o,
showCancel: !1,
confirmText: n,
success: function() {
null === AppProxy || void 0 === AppProxy || AppProxy.fetchRemoteConfig();
}
});
}
});
null === AppProxy || void 0 === AppProxy || AppProxy.fetchRemoteConfig();
} catch (e) {}
};
i([ m({
type: cc.Sprite,
displayName: "假进度条"
}) ], t.prototype, "fakeProgress", void 0);
i([ m({
type: cc.Sprite,
displayName: "加载进度条"
}) ], t.prototype, "mainProgress", void 0);
i([ m({
type: cc.Label,
displayName: "进度条文本"
}) ], t.prototype, "jdLab", void 0);
i([ m(sp.Skeleton) ], t.prototype, "spine", void 0);
i([ m(cc.Node) ], t.prototype, "logo", void 0);
i([ m(cc.Node) ], t.prototype, "vivoLogo", void 0);
i([ m(cc.Node) ], t.prototype, "traditionalLogo", void 0);
i([ m(cc.Node) ], t.prototype, "ageWarn", void 0);
i([ m(cc.Node) ], t.prototype, "panelPrivacy", void 0);
i([ m(cc.Node) ], t.prototype, "picPrivacyInfo", void 0);
return i([ y ], t);
}(cc.Component);
a.default = g;
cc._RF.pop();
}, {
"../Config/GConfig": "GConfig",
"../Global/GAd": "GAd",
"../Global/GBundle": "GBundle",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Global/Global": "Global",
"./MData": "MData",
"./PopupManager": "PopupManager",
gameassistant3: 37
} ],
MAccountData: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "b7b5aI7xsBIobJ5fUz6UpMJ", "MAccountData");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
});
Object.defineProperty(a, "__esModule", {
value: !0
});
a.MAccountData = void 0;
var i = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.chosenMechaIndex = 1;
t.ChessboardParts = [];
t.UnshowedBoxes = {
MechaIndex: 1,
Left: 0
};
t.MechaDatas = [];
t.MatchInfo = {
Power: 0,
MatchTime: 0,
List: []
};
t.VideoUnlockTime = [];
t.RedeemCodes = [];
t.RankInfo = [];
t.Model = 0;
t.GetRewardSeasons = [];
return t;
}
return t;
}(e("../Base/BaseModel").BaseModel);
a.MAccountData = i;
cc._RF.pop();
}, {
"../Base/BaseModel": "BaseModel"
} ],
MData: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "72942DnawFEfblVoAwtI4eW", "MData");
var o = this && this.__spreadArrays || function() {
for (var e = 0, t = 0, a = arguments.length; t < a; t++) e += arguments[t].length;
var o = Array(e), n = 0;
for (t = 0; t < a; t++) for (var i = arguments[t], r = 0, s = i.length; r < s; r++, 
n++) o[n] = i[r];
return o;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
a.MData = void 0;
var n = e("../Config/ExcelData"), i = e("../Global/GTemporary"), r = e("../Global/UserData"), s = e("../Config/GConfig"), c = e("../Global/GTool");
a.MData = new (function() {
function e() {
this.userData = null;
this.excelData = null;
this.allMecha = [];
}
e.prototype.getAttackPromotePercent = function(e) {
var t = 1;
this.excelData.ExcelMechaData.forEach(function(a) {
a.Index == e && (t = a.UpgradeAttackPromote);
});
return t;
};
e.prototype.getDefencePromotePercent = function(e) {
var t = 1;
this.excelData.ExcelMechaData.forEach(function(a) {
a.Index == e && (t = a.UpgradeDefencePromote);
});
return t;
};
e.prototype.getHealthPromotePercent = function(e) {
var t = 1;
this.excelData.ExcelMechaData.forEach(function(a) {
a.Index == e && (t = a.UpgradeHealthPromote);
});
return t > 1 ? t : 1.01;
};
e.prototype.initUserData = function(e) {
this.userData = new r.UserData();
this.userData.initData(e);
};
e.prototype.loadServerExcel = function(e) {
this.excelData = new n.ExcelData();
this.excelData.loadServerExcel(e);
"TraditionalChinese" == i.GTemporary.languageVersion && this.excelData.loadMultisourceData();
};
e.prototype.loadLocalExcel = function(e) {
this.excelData = new n.ExcelData();
this.excelData.loadLocalExcel(e);
"TraditionalChinese" == i.GTemporary.languageVersion && this.excelData.loadMultisourceData();
};
e.prototype.save = function(e) {
this.userData.save(e);
};
e.prototype.isNew = function() {
return this.userData.userData.newUser;
};
e.prototype.getNextCheckpoint = function() {
return this.userData.userData.checkpoint + 1;
};
e.prototype.resetData = function() {
this.userData.userData.gold = 0;
cc.systemEvent.emit(EventsName.Refresh);
this.userData.accountData.ChessboardParts = [ {
MechaIndex: 1,
Parts: []
} ];
this.userData.accountData.MechaDatas = [ {
MechaIndex: 1,
Level: 1,
Parts: [],
Skills: [ 0 ]
} ];
};
e.prototype.createPreviewData = function() {
this.userData.accountData.ChessboardParts = [ {
MechaIndex: 1,
Parts: []
} ];
this.userData.accountData.MechaDatas = [ {
MechaIndex: 1,
Level: 1,
Parts: [],
Skills: [ 0, 1, 2, 3, 4, 5 ]
}, {
MechaIndex: 2,
Level: 1,
Parts: [],
Skills: [ 0, 1, 2, 3, 4, 5 ]
}, {
MechaIndex: 3,
Level: 1,
Parts: [],
Skills: [ 0 ]
}, {
MechaIndex: 4,
Level: 1,
Parts: [],
Skills: [ 0, 1, 2, 3, 4, 5 ]
}, {
MechaIndex: 5,
Level: 1,
Parts: [],
Skills: [ 0, 1, 2, 3, 4, 5 ]
}, {
MechaIndex: 6,
Level: 1,
Parts: [],
Skills: [ 0, 1, 2, 3, 4, 5 ]
} ];
for (var e = 1; e <= 19; e++) this.userData.accountData.MechaDatas[5].Parts.push({
PartIndex: e,
Status: 1
});
this.userData.userData.gold = 1e8;
this.userData.userData.checkpoint = 10;
this.userData.userData.signInDays = 1;
this.userData.userData.freeDrawTime = 1;
this.userData.userData.drwaTime = 0;
this.userData.userData.freeSignInTime = 0;
this.userData.userData.rewardSignInTime = 0;
this.userData.userData.boxReward = [ 0, 0, 0 ];
this.userData.accountData.chosenMechaIndex = 1;
this.userData.accountData.UnshowedBoxes = {
MechaIndex: 1,
Left: 0
};
this.userData.userData.myDebris = [];
this.userData.userData.newUser = !1;
this.userData.accountData.RedeemCodes = [];
this.userData.accountData.Model = 800;
this.userData.accountData.RankInfo = [ {
Season: 0,
Rank: 4,
MaxRank: 5,
Stars: 0,
WinTime: 0,
LoseTime: 0,
Rewards: []
} ];
};
e.prototype.getCurrentMecha = function() {
return this.userData.accountData.chosenMechaIndex;
};
e.prototype.setChosenMecha = function(e) {
this.userData.accountData.chosenMechaIndex = e;
i.GTemporary.mechaProperties.forEach(function(t) {
t.MechaIndex == e && (i.GTemporary.myData = {
MechaIndex: e,
AllHealth: t.Health,
CurrentHealth: t.Health,
Attack: t.Attack,
Defence: t.Defence,
Crit: t.Crit,
Dodge: t.Dodge,
Energy: 0,
SkillIndex: 0,
Awaken: !1,
IsRobot: !1,
PartsNumber: 0,
Skills: a.MData.getMechaUnlockSkills(e)
});
});
};
e.prototype.getMechaUnlockSkills = function(e) {
var t = [];
this.userData.accountData.MechaDatas.forEach(function(a) {
a.MechaIndex == e && (t = o(a.Skills));
});
return t;
};
e.prototype.getUnshowedBoxes = function() {
return this.userData.accountData.UnshowedBoxes;
};
e.prototype.haveNoUnshowedBox = function() {
var e = this, t = !1;
this.userData.accountData.UnshowedBoxes.Left > 0 ? t = !0 : this.userData.accountData.ChessboardParts.forEach(function(a) {
a.MechaIndex == e.getCurrentMecha() && a.Parts.forEach(function(e) {
2 == e.Type && (t = !0);
});
});
return t;
};
e.prototype.showBox = function() {
this.userData.accountData.UnshowedBoxes.Left--;
};
e.prototype.getSkyBox = function() {
this.userData.accountData.UnshowedBoxes = {
MechaIndex: this.userData.accountData.chosenMechaIndex,
Left: 8
};
this.finishTask("SkyBox");
};
e.prototype.getPartMaxLevel = function(e) {
var t = 0;
this.excelData.ExcelMechaPartData.forEach(function(a) {
a.BelongIndex == e && a.PartIndex > t && (t = a.PartIndex);
});
return t;
};
e.prototype.getPartsData = function(e) {
var t = [];
this.userData.accountData.MechaDatas.forEach(function(a) {
a.MechaIndex == e && (t = a.Parts);
});
return t;
};
e.prototype.getChessboardDatas = function(e) {
var t = {
MechaIndex: e,
Parts: []
};
this.userData.accountData.ChessboardParts.forEach(function(a) {
a.MechaIndex == e && (t = a);
});
return t;
};
e.prototype.getCurrentPartMaxLevel = function(e) {
var t = 1;
this.userData.accountData.MechaDatas.forEach(function(a) {
a.MechaIndex == e && a.Parts.forEach(function(e) {
e.PartIndex > t && (t = e.PartIndex);
});
});
this.userData.accountData.ChessboardParts.forEach(function(a) {
a.MechaIndex == e && a.Parts.forEach(function(e) {
1 == e.Type && e.PartIndex > t && (t = e.PartIndex);
});
});
return t;
};
e.prototype.getOperateParts = function() {
return this.userData.accountData.ChessboardParts;
};
e.prototype.checkHavePart = function(e, t) {
var a = !1;
this.userData.accountData.MechaDatas.forEach(function(o) {
o.MechaIndex == e && o.Parts.forEach(function(e) {
e.PartIndex == t && 0 != e.Status && (a = !0);
});
});
return a;
};
e.prototype.getOperatePartsLength = function(e) {
var t = 0;
this.userData.accountData.ChessboardParts.forEach(function(a) {
a.MechaIndex == e && (t = a.Parts.length);
});
return t;
};
e.prototype.getOperatePartPrice = function() {
return 1;
};
e.prototype.checkPartPos = function(e, t) {
var a = null;
this.userData.accountData.ChessboardParts.forEach(function(o) {
o.MechaIndex == e && o.Parts.forEach(function(e) {
e.Pos == t && (a = e);
});
});
return a;
};
e.prototype.upgradePart = function(e, t) {
this.userData.accountData.ChessboardParts.forEach(function(a) {
a.MechaIndex == e && a.Parts.forEach(function(e) {
e.Pos == t && e.PartIndex++;
});
});
this.checkCanUnlockNewSkill(e);
};
e.prototype.checkCanUnlockNewSkill = function(e) {
var t = this, a = this.getCurrentPartMaxLevel(e);
this.excelData.ExcelSkillData.forEach(function(o) {
if (o.BelongIndex == e && !t.checkUnlockSkill(e, o.SkillIndex) && a == o.UnlockCondition) {
t.userData.accountData.MechaDatas.forEach(function(t) {
t.MechaIndex == e && (t.Skills.includes(o.SkillIndex) || t.Skills.push(o.SkillIndex));
});
i.GTemporary.unlockNewSkillInfo = {
New: !0,
MechaIndex: e,
SkillIndex: o.SkillIndex
};
cc.systemEvent.emit(EventsName.UnlockNewSkill);
}
});
};
e.prototype.buyPart = function(e, t) {
var a = !1;
this.userData.accountData.ChessboardParts.forEach(function(o) {
if (o.MechaIndex == e) {
o.Parts.push(t);
a = !0;
}
});
a || this.userData.accountData.ChessboardParts.push({
MechaIndex: e,
Parts: [ t ]
});
};
e.prototype.destroyPart = function(e, t) {
this.userData.accountData.ChessboardParts.forEach(function(a) {
a.MechaIndex == e && (a.Parts = a.Parts.filter(function(e) {
return e.Pos != t;
}));
});
};
e.prototype.changePartPos = function(e, t, a) {
this.userData.accountData.ChessboardParts.forEach(function(o) {
o.MechaIndex == e && o.Parts.forEach(function(e) {
e.Pos == t && (e.Pos = a);
});
});
};
e.prototype.exchangePartsPos = function(e, t, a) {
var o = null, n = null;
this.userData.accountData.ChessboardParts.forEach(function(i) {
i.MechaIndex == e && i.Parts.forEach(function(e) {
e.Pos == t ? o = e : e.Pos == a && (n = n);
});
});
if (o && n) {
o.Pos = a;
n.Pos = t;
}
};
e.prototype.unlockMecha = function(e) {
this.userData.accountData.MechaDatas.push({
MechaIndex: e,
Level: 1,
Parts: [],
Skills: [ 0 ]
});
};
e.prototype.unlockMechaSkill = function(e, t) {
this.userData.accountData.MechaDatas.forEach(function(a) {
a.MechaIndex == e && (a.Skills.includes(t) || a.Skills.push(t));
});
};
e.prototype.checkUnlockMecha = function(e) {
var t = !1;
this.userData.accountData.MechaDatas.forEach(function(a) {
a.MechaIndex == e && (t = !0);
});
return t;
};
e.prototype.installPart = function(e, t) {
this.userData.accountData.MechaDatas.forEach(function(a) {
if (a.MechaIndex == e) {
var o = !1;
a.Parts.forEach(function(e) {
if (e.PartIndex == t) {
o = !0;
e.Status = 1;
}
});
o || a.Parts.push({
PartIndex: t,
Status: 1
});
}
});
};
e.prototype.checkUnlockPart = function(e, t) {
var a = !1;
this.userData.accountData.MechaDatas.forEach(function(o) {
o.MechaIndex == e && o.Parts.forEach(function(e) {
e.PartIndex == t && 0 != e.Status && (a = !0);
});
});
return a;
};
e.prototype.getUnlockPrice = function(e) {
var t = 0;
this.excelData.ExcelMechaData.forEach(function(a) {
a.Index == e && (t = a.UnlockNumber);
});
return t;
};
e.prototype.getUpgradePrice = function(e) {
var t = 0;
this.excelData.ExcelMechaData.forEach(function(a) {
a.Index == e && (t = a.UpgradePrice);
});
return t;
};
e.prototype.getVideoUnlockMaxTime = function(e) {
var t = 0;
this.excelData.ExcelMechaData.forEach(function(a) {
a.Index == e && (t = a.VideoTime);
});
return t;
};
e.prototype.getVideoUnlockTime = function(e) {
var t = 0;
this.userData.accountData.VideoUnlockTime.forEach(function(a) {
a.MechaIndex == e && (t = a.VideoTime);
});
return t;
};
e.prototype.addVideoUnlockTime = function(e) {
var t = this, a = !1;
this.userData.accountData.VideoUnlockTime.forEach(function(o) {
if (o.MechaIndex == e) {
o.VideoTime++;
a = !0;
if (o.VideoTime == t.getVideoUnlockMaxTime(e)) {
c.GTool.showToast("成功解锁机甲");
t.unlockMecha(e);
c.GTool.sentLogs([ {
eventId: "解锁机甲",
detail: JSON.stringify({
Index: e
})
} ]);
cc.systemEvent.emit(EventsName.UnlockMecha);
} else {
var n = Math.round(100 * o.VideoTime / t.getVideoUnlockMaxTime(e));
"Chinese" == i.GTemporary.languageVersion ? c.GTool.showToast("获得" + n + "%能量,马上就能解锁机甲了") : c.GTool.showToast("" + c.GTool.getLanguage("获得") + n + "%" + c.GTool.getLanguage("能量,马上就能解锁机甲了"));
}
}
});
if (!a) {
this.userData.accountData.VideoUnlockTime.push({
MechaIndex: e,
VideoTime: 1
});
var o = Math.round(100 / this.getVideoUnlockMaxTime(e));
"Chinese" == i.GTemporary.languageVersion ? c.GTool.showToast("获得" + o + "%能量,马上就能解锁机甲了") : c.GTool.showToast("" + c.GTool.getLanguage("获得") + o + "%" + c.GTool.getLanguage("能量,马上就能解锁机甲了"));
}
};
e.prototype.getExcelRedeem = function() {
return this.excelData.ExcelRedeenData;
};
e.prototype.checkHaveThisRedeem = function(e) {
return this.userData.accountData.RedeemCodes.includes(e);
};
e.prototype.useRedeem = function(e) {
this.userData.accountData.RedeemCodes.includes(e) || this.userData.accountData.RedeemCodes.push(e);
};
e.prototype.getCurrentPower = function() {
var e = 0;
i.GTemporary.mechaProperties.forEach(function(t) {
t.MechaIndex == i.GTemporary.myData.MechaIndex && (e = t.Health + 12 * t.Attack + 12 * t.Defence);
});
return e;
};
e.prototype.checkHaveOriginPic = function(e, t) {
var o = a.MData.getPartInfo(e, t), n = {
Have: !0,
PicName: o.PicName,
AdditionPicName: o.AdditionPicName
};
i.GTemporary.noOriginPicSlot.forEach(function(t, a) {
a == e && (n.Have = !t.includes(o.PicName));
});
3 == e && (n.Have = !1);
return n;
};
e.prototype.initMechaProperty = function() {
var e = this;
this.excelData.ExcelMechaData.forEach(function(t) {
if (!s.GConfig.ServerConfig.BanedMechas.includes(t.Index)) {
var a = null;
e.userData.accountData.MechaDatas.forEach(function(e) {
e.MechaIndex == t.Index && (a = e);
});
var o = {
MechaIndex: t.Index,
Level: null != a ? a.Level : 1,
Attack: t.DefaultAttack,
Defence: t.DefaultDefence,
Health: t.DefaultHealth,
Crit: t.DefaultCrit,
Dodge: t.DefaultDodge,
MinPower: t.DefaultHealth + 12 * t.DefaultAttack + 12 * t.DefaultDefence,
MaxPower: 0
}, n = {
Health: t.DefaultHealth,
Attack: t.DefaultAttack,
Defence: t.DefaultDefence
};
a && t.Index == a.MechaIndex && a.Parts.forEach(function(t) {
1 == t.Status && e.excelData.ExcelMechaPartData.forEach(function(e) {
if (e.BelongIndex == a.MechaIndex && e.PartIndex == t.PartIndex) {
o.Attack += e.Attack;
o.Defence += e.Defence;
o.Health += e.Health;
o.Crit += e.Crit;
o.Dodge += e.Dodge;
}
});
});
e.excelData.ExcelMechaPartData.forEach(function(e) {
if (e.BelongIndex == t.Index) {
n.Attack += e.Attack;
n.Defence += e.Defence;
n.Health += e.Health;
}
});
o.Attack *= Math.pow(e.getAttackPromotePercent(t.Index), o.Level - 1);
o.Defence *= Math.pow(e.getDefencePromotePercent(t.Index), o.Level - 1);
o.Health *= Math.pow(e.getHealthPromotePercent(t.Index), o.Level - 1);
n.Health *= Math.pow(e.getHealthPromotePercent(t.Index), t.MaxLevel - 1);
n.Attack *= Math.pow(e.getAttackPromotePercent(t.Index), t.MaxLevel - 1);
n.Defence *= Math.pow(e.getDefencePromotePercent(t.Index), t.MaxLevel - 1);
o.MaxPower = Math.round(n.Health + 12 * (n.Attack + n.Defence));
i.GTemporary.mechaProperties.push(o);
}
});
this.allMecha = [];
var t = [];
this.excelData.ExcelMechaData.forEach(function(e) {
0 == e.Index || s.GConfig.ServerConfig.BanedMechas.includes(e.Index) || t.push({
MechaIndex: e.Index,
Order: e.ShowIndex
});
});
t.sort(function(e, t) {
return e.Order - t.Order;
});
t.forEach(function(t) {
e.allMecha.push(t.MechaIndex);
});
console.log("All Mechas :", this.allMecha);
};
e.prototype.getPartInfo = function(e, t) {
var a = null;
this.excelData.ExcelMechaPartData.forEach(function(o) {
o.BelongIndex == e && o.PartIndex == t && (a = o);
});
return a;
};
e.prototype.getPartPromoteData = function(e, t) {
var a = null;
this.excelData.ExcelMechaPartData.forEach(function(o) {
o.BelongIndex == e && o.PartIndex == t && (a = {
Attack: o.Attack,
Defence: o.Defence,
Health: o.Health,
Crit: o.Crit,
Dodge: o.Dodge
});
});
return a;
};
e.prototype.getMechaProperty = function(e) {
var t = null;
i.GTemporary.mechaProperties.forEach(function(a) {
a.MechaIndex == e && (t = a);
});
return t;
};
e.prototype.getMechaData = function(e) {
var t = null;
this.excelData.ExcelMechaData.forEach(function(a) {
a.Index == e && (t = a);
});
return t;
};
e.prototype.getMechaPartsNum = function(e) {
var t = 0;
this.excelData.ExcelMechaPartData.forEach(function(a) {
a.BelongIndex == e && t++;
});
return t;
};
e.prototype.getTargetLevelMechaData = function(e, t) {
var a = this, o = null;
this.userData.accountData.MechaDatas.forEach(function(n) {
n.MechaIndex == e && a.excelData.ExcelMechaData.forEach(function(i) {
if (i.Index == e) {
o = {
MechaIndex: e,
Level: t,
Attack: i.DefaultAttack,
Defence: i.DefaultDefence,
Health: i.DefaultHealth,
Crit: i.DefaultCrit,
Dodge: i.DefaultDodge,
MaxPower: i.DefaultHealth + 12 * i.DefaultAttack + 12 * i.DefaultDefence,
MinPower: i.DefaultHealth + 12 * i.DefaultAttack + 12 * i.DefaultDefence
};
n.Parts.forEach(function(e) {
1 == e.Status && a.excelData.ExcelMechaPartData.forEach(function(t) {
if (t.BelongIndex == n.MechaIndex && t.PartIndex == e.PartIndex) {
o.Attack += t.Attack;
o.Defence += t.Defence;
o.Health += t.Health;
o.Crit += t.Crit;
o.Dodge += t.Dodge;
}
});
});
o.Attack *= Math.pow(a.getAttackPromotePercent(i.Index), t - 1);
o.Defence *= Math.pow(a.getDefencePromotePercent(i.Index), t - 1);
o.Health *= Math.pow(a.getHealthPromotePercent(i.Index), t - 1);
}
});
});
return o;
};
e.prototype.upgradeMecha = function(e) {
var t = this;
this.userData.accountData.MechaDatas.forEach(function(t) {
t.MechaIndex == e && t.Level++;
});
i.GTemporary.mechaProperties.forEach(function(a) {
if (a.MechaIndex == e) {
a.Level++;
a.Attack *= t.getAttackPromotePercent(e);
a.Health *= t.getHealthPromotePercent(e);
a.Defence *= t.getDefencePromotePercent(e);
}
});
};
e.prototype.getMechaSkillDes = function(e, t) {
var a = {
Name: "",
Des: ""
};
this.excelData.ExcelSkillData.forEach(function(o) {
if (o.BelongIndex == e && o.Index == t) {
a.Name = o.SkillName;
a.Des = o.Des;
}
});
return a;
};
e.prototype.getExcelSkillData = function() {
return this.excelData.ExcelSkillData;
};
e.prototype.getSkillData = function(e, t) {
var a = null;
this.excelData.ExcelSkillData.forEach(function(o) {
o.BelongIndex == e && o.SkillIndex == t && (a = o);
});
return a;
};
e.prototype.checkUnlockSkill = function(e, t) {
var a = !1;
this.userData.accountData.MechaDatas.forEach(function(o) {
o.MechaIndex == e && (a = o.Skills.includes(t));
});
return a;
};
e.prototype.checkUnlockSkillInFight = function(e) {
return i.GTemporary.myData.Skills.includes(e);
};
e.prototype.getSkillUnlockCondition = function(e, t) {
var a = this.getCurrentPartMaxLevel(e), o = 0;
this.excelData.ExcelSkillData.forEach(function(a) {
a.BelongIndex == e && a.SkillIndex == t && (o = a.UnlockCondition);
});
console.log("unlockCondition", o);
console.log("unlockNum", a);
return o - a;
};
e.prototype.getEnemySkillsByPartsNumber = function(e, t) {
var a = [ 0 ];
this.excelData.ExcelSkillData.forEach(function(o) {
o.BelongIndex == e && o.UnlockCondition <= t && (a.includes(o.SkillIndex) || a.push(o.SkillIndex));
});
a.sort(function(e, t) {
return e - t;
});
return a;
};
e.prototype.getTargetLevelAndPartsMechaProperty = function(e, t, a) {
var o = {
Attack: 0,
Defence: 0,
Health: 0,
Crit: 0,
Dodge: 0
};
this.excelData.ExcelMechaData.forEach(function(t) {
if (t.Index == e) {
o.Attack = t.DefaultAttack;
o.Defence = t.DefaultDefence;
o.Health = t.DefaultHealth;
o.Crit = t.DefaultCrit;
o.Dodge = t.DefaultDodge;
}
});
this.excelData.ExcelMechaPartData.forEach(function(a) {
if (a.BelongIndex == e && t >= a.PartIndex) {
o.Attack += a.Attack;
o.Defence += a.Defence;
o.Health += a.Health;
o.Crit += a.Crit;
o.Dodge += a.Dodge;
}
});
o.Attack *= Math.pow(this.getAttackPromotePercent(e), a - 1);
o.Defence *= Math.pow(this.getDefencePromotePercent(e), a - 1);
o.Health *= Math.pow(this.getHealthPromotePercent(e), a - 1);
return o;
};
e.prototype.getMatchInfo = function() {
return this.userData.accountData.MatchInfo;
};
e.prototype.winPVP = function() {
this.userData.accountData.MatchInfo.List = this.userData.accountData.MatchInfo.List.filter(function(e) {
return e.Index != i.GTemporary.pvpInfo.Index;
});
};
e.prototype.passCheckPoint = function() {
this.userData.userData.checkpoint++;
};
e.prototype.getMaxCheckpoint = function() {
var e = 0;
this.excelData.ExcelCheckPointData.forEach(function(t) {
t.CheckPointIndex > e && (e = t.CheckPointIndex);
});
return e;
};
e.prototype.getCurrentCheckpoint = function() {
return this.userData.userData.checkpoint;
};
e.prototype.getCheckpointData = function(e) {
var t = null;
this.excelData.ExcelCheckPointData.forEach(function(a) {
a.CheckPointIndex == e && (t = a);
});
return t;
};
e.prototype.getExcelCheckPointData = function() {
return this.excelData.ExcelCheckPointData;
};
e.prototype.setAIData = function() {
var e = this;
if ("PVP" == i.GTemporary.fightMode) {
var t = this.getRandomPropertyByBinarySearch(i.GTemporary.pvpInfo.MechaIndex, i.GTemporary.pvpInfo.Power);
console.log(t);
i.GTemporary.currentAIData = {
Index: i.GTemporary.pvpInfo.Index,
MechaIndex: i.GTemporary.pvpInfo.MechaIndex,
Level: 1,
Attack: t.Attack,
Defene: t.Defence,
Health: t.Health,
Crit: 2 == i.GTemporary.pvpInfo.Index ? i.GTemporary.myData.Crit : GA.rand(0, 5),
Dodge: 2 == i.GTemporary.pvpInfo.Index ? i.GTemporary.myData.Dodge : GA.rand(0, 5),
Skills: 2 == i.GTemporary.pvpInfo.Index ? [ 0 ] : [ 0, 1 ],
PartsNumber: t.PartsNumber
};
} else if ("PVE" == i.GTemporary.fightMode) this.excelData.ExcelCheckPointData.forEach(function(t) {
if (t.CheckPointIndex == i.GTemporary.chosenCheckPointIndex) {
var a = [ 1 ];
i.GTemporary.mechaProperties.forEach(function(e) {
e.MinPower <= t.SuggestPower && e.MaxPower >= t.SuggestPower && a.push(e.MechaIndex);
});
var o = a[GA.rand(0, a.length - 1)], n = e.getRandomPropertyByBinarySearch(o, t.SuggestPower);
console.log("关卡RandomData", n);
i.GTemporary.currentAIData = {
Index: 1,
MechaIndex: o,
Level: 1,
Attack: n.Attack * s.GConfig.ServerConfig.PVEWakenPercent,
Defene: n.Defence * s.GConfig.ServerConfig.PVEWakenPercent,
Health: n.Health * s.GConfig.ServerConfig.PVEWakenPercent,
Crit: 0 == t.AIIndex ? i.GTemporary.myData.Crit : GA.rand(0, 5),
Dodge: 0 == t.AIIndex ? i.GTemporary.myData.Dodge : GA.rand(0, 5),
Skills: 0 == t.AIIndex ? [ 0 ] : [ 0, 1 ],
PartsNumber: n.PartsNumber
};
}
}); else if ("Rank" == i.GTemporary.fightMode) {
t = this.getRandomPropertyByBinarySearch(i.GTemporary.RankMatchInfo.Mecha, i.GTemporary.RankMatchInfo.Power);
console.log(t);
i.GTemporary.currentAIData = {
Index: i.GTemporary.pvpInfo.Index,
MechaIndex: i.GTemporary.RankMatchInfo.Mecha,
Level: 1,
Attack: t.Attack,
Defene: t.Defence,
Health: t.Health,
Crit: GA.rand(0, 5),
Dodge: GA.rand(0, 5),
Skills: [ 0, 1 ],
PartsNumber: t.PartsNumber
};
}
};
e.prototype.getRandomPropertyByBinarySearch = function(e, t) {
var a = this, o = this.getMechaData(e), n = o.MaxLevel, r = this.getMechaPartsNum(e), s = 0, c = 0;
i.GTemporary.mechaProperties.forEach(function(t) {
if (t.MechaIndex == e) {
s = t.MinPower;
c = t.MaxPower;
}
});
var l = o.DefaultAttack, d = o.DefaultDefence, h = o.DefaultHealth, p = {
Attack: l,
Defence: d,
Health: h,
Power: 12 * (l + d) + h,
PartsNumber: 0
}, u = 12 * (l + d) + h;
if (t <= s || Math.abs(u - t) / t <= .05) return p;
if (t > c) {
var f = n, y = 0, m = 0, g = 0;
this.excelData.ExcelMechaPartData.forEach(function(t) {
if (t.BelongIndex == e) {
y += t.Attack;
m += t.Defence;
g += t.Health;
}
});
var v = function() {
f++;
var o = (l + y) * Math.pow(a.getAttackPromotePercent(e), f - 1), n = d + m * Math.pow(a.getDefencePromotePercent(e), f - 1), i = h + g * Math.pow(a.getHealthPromotePercent(e), f - 1);
u = 12 * (o + n) + i;
if (Math.abs(u - t) / t <= .05) return p;
if (!(u < t)) return p = {
Attack: o,
Defence: n,
Health: i,
Power: u,
PartsNumber: r
};
p = {
Attack: o,
Defence: n,
Health: i,
Power: u,
PartsNumber: r
};
v();
};
v();
} else {
var G = GA.rand(1, n), P = GA.rand(0, r), w = 0, M = function() {
w++;
var o = 0, i = 0, s = 0;
a.excelData.ExcelMechaPartData.forEach(function(t) {
if (t.BelongIndex == e && t.PartIndex <= P) {
o += t.Attack;
i += t.Defence;
s += t.Health;
}
});
var c = (l + o) * Math.pow(a.getAttackPromotePercent(e), G - 1), f = d + i * Math.pow(a.getDefencePromotePercent(e), G - 1), y = h + s * Math.pow(a.getHealthPromotePercent(e), G - 1);
u = 12 * (c + f) + y;
if (w > 40) return p;
Math.abs(u - t) < Math.abs(p.Power - t) && (p = {
Attack: c,
Defence: f,
Health: y,
Power: u,
PartsNumber: P
});
if (Math.abs(u - t) / t <= .05) return p = {
Attack: c,
Defence: f,
Health: y,
Power: u,
PartsNumber: P
};
if (u > t && 1 == G && 0 == P) return p;
if (u < t && G == n && P == r) return p;
if (0 == GA.rand(0, 1)) {
G = u > t ? GA.rand(1, G > 1 ? G - 1 : 1) : GA.rand(G + 1 > n ? n : G + 1, n);
M();
} else {
P = u > t ? GA.rand(0, P > 1 ? P - 1 : 1) : GA.rand(P + 1 > r ? r : P + 1, r);
M();
}
};
M();
}
return p;
};
e.prototype.startGame = function(e) {
"PVP" == e ? this.userData.userData.pvpWarTime++ : "PVE" == e ? this.userData.userData.pveWarTime++ : this.userData.userData.rankTime++;
};
e.prototype.getFreeDrawTime = function() {
return this.userData.userData.freeDrawTime;
};
e.prototype.getDrawTime = function() {
return this.userData.userData.drwaTime;
};
e.prototype.isNextDrawDouble = function() {
return 1 == this.userData.userData.isNextDouble;
};
e.prototype.setNextDrawDouble = function(e) {
this.userData.userData.isNextDouble = e ? 1 : 0;
};
e.prototype.getRewardBoxData = function() {
return this.userData.userData.boxReward;
};
e.prototype.getRewardBox = function(e, t) {
this.userData.userData.boxReward[e] = t;
};
e.prototype.freeDraw = function() {
this.userData.userData.freeDrawTime = 0;
this.userData.userData.drwaTime++;
};
e.prototype.rewardDraw = function() {
this.userData.userData.drwaTime++;
};
e.prototype.getCurrentGold = function() {
return this.userData.userData.gold;
};
e.prototype.getCurrentDiamond = function() {
return this.userData.userData.diamond;
};
e.prototype.getMechaDebris = function(e) {
var t = 0;
this.userData.userData.myDebris.forEach(function(a) {
a.K == e && (t = a.V);
});
return t;
};
e.prototype.canAffordDebris = function(e, t) {
var a = !1;
this.userData.userData.myDebris.forEach(function(o) {
o.K == e && o.V >= t && (a = !0);
});
return a;
};
e.prototype.canAffordGold = function(e) {
return this.userData.userData.gold >= e;
};
e.prototype.addGold = function(e, t) {
void 0 === t && (t = !0);
this.userData.userData.gold += e;
t && cc.systemEvent.emit(EventsName.Refresh);
};
e.prototype.addDebris = function(e, t, a) {
void 0 === a && (a = !0);
var o = !1;
this.userData.userData.myDebris.forEach(function(a) {
if (a.K == e) {
o = !0;
a.V += t;
}
});
o || this.userData.userData.myDebris.push({
K: e,
V: t
});
a && cc.systemEvent.emit(EventsName.Refresh);
};
e.prototype.getGoldSupplyTime = function() {
return this.userData.userData.getGoldTime % 5 + 1;
};
e.prototype.getNextGoldRewardNumber = function() {
var e = this, t = 400;
s.GConfig.ServerConfig.GoldSupply.sort(function(e, t) {
return e.MinLevel - t.MinLevel;
});
0 == this.userData.userData.checkpoint ? t = s.GConfig.ServerConfig.GoldSupply[0].Rewards[this.getGoldSupplyTime() - 1] : s.GConfig.ServerConfig.GoldSupply.forEach(function(a) {
e.userData.userData.checkpoint > a.MinLevel && (t = a.Rewards[e.getGoldSupplyTime() - 1]);
});
return t;
};
e.prototype.getFinalGoldRewardNumber = function() {
var e = this, t = 2e3;
s.GConfig.ServerConfig.GoldSupply.sort(function(e, t) {
return e.MinLevel - t.MinLevel;
});
0 == this.userData.userData.checkpoint ? t = s.GConfig.ServerConfig.GoldSupply[0].Rewards[4] : s.GConfig.ServerConfig.GoldSupply.forEach(function(a) {
e.userData.userData.checkpoint > a.MinLevel && (t = a.Rewards[a.Rewards.length - 1]);
});
return t;
};
e.prototype.addGetGoldSupplyTime = function(e) {
this.userData.userData.getGoldTime++;
e && (this.userData.userData.addGoldTime = Date.now());
};
e.prototype.checkShowShareAddGoldPopup = function() {
return this.userData.userData.getGoldTime >= 5 && Date.now() - this.userData.userData.addGoldTime < 3e4;
};
e.prototype.getSignInDay = function() {
return this.userData.userData.signInDays % 7 + 1;
};
e.prototype.checkFreeSignInToday = function() {
return GA.isToday(this.userData.userData.freeSignInTime);
};
e.prototype.checkRewardSignInToday = function() {
return GA.isToday(this.userData.userData.rewardSignInTime);
};
e.prototype.signIn = function(e) {
if (e) this.userData.userData.rewardSignInTime = Date.now(); else {
this.userData.userData.freeSignInTime = Date.now();
this.userData.userData.signInDays++;
}
};
e.prototype.resetSignInTime = function() {
this.userData.userData.freeSignInTime = 0;
this.userData.userData.rewardSignInTime = 0;
};
e.prototype.getRankExcel = function() {
return this.excelData.ExcelRankData;
};
e.prototype.getCurrentSeason = function() {
var e = new Date();
e.setFullYear(2022);
e.setMonth(0);
e.setDate(1);
e.setHours(0);
e.setMinutes(0);
e.setSeconds(0);
var t = e.getTime();
return Math.floor((Date.now() - t) / 12096e5);
};
e.prototype.getRankInfo = function() {
var e, t = !1;
this.userData.accountData.RankInfo.forEach(function(a) {
if (a.Season == i.GTemporary.currentSeason) {
t = !0;
e = a;
}
});
if (!t) {
this.userData.accountData.RankInfo.push({
Season: i.GTemporary.currentSeason,
Rank: 0,
MaxRank: 0,
Stars: 0,
WinTime: 0,
LoseTime: 0,
Rewards: [ 0, 0, 0, 0, 0, 0 ]
});
e = {
Season: i.GTemporary.currentSeason,
Rank: 0,
Stars: 0,
WinTime: 0,
LoseTime: 0,
Model: 0
};
}
return e;
};
e.prototype.finishRank = function(e) {
var t = this, a = this.getCurrentSeason();
this.userData.accountData.RankInfo.forEach(function(o) {
if (o.Season == a) {
if (e) o.WinTime++; else {
o.LoseTime++;
t.userData.accountData.Model += 10;
}
if (e) if (o.Rank == t.getMaxRank() - 1) o.Stars++; else if (o.Stars + 1 > t.getUpgradeRankCondition(o.Rank)) {
o.Stars = 1;
o.Rank++;
0 == o.Rewards[o.Rank - 1] && (o.Rewards[o.Rank - 1] = 1);
if (o.MaxRank < o.Rank) {
o.MaxRank = o.Rank;
o.Rewards[o.Rank - 1] = 1;
}
} else o.Stars++; else if (0 == o.Stars) {
if (0 != o.Rank) {
o.Rank--;
o.Stars = t.getUpgradeRankCondition(o.Rank) - 1;
}
} else o.Stars--;
}
});
};
e.prototype.getUpgradeRankCondition = function(e) {
var t = 3;
this.excelData.ExcelRankData.forEach(function(a) {
a.Index == e && (t = a.RankStars);
});
return t;
};
e.prototype.getMaxRank = function() {
return this.excelData.ExcelRankData.size;
};
e.prototype.getRankByStar = function(e) {
var t = {
rankName: "英勇黄铜",
star: e,
rankIndex: 0
};
if (e <= 3) {
t.rankName = "英勇黄铜";
t.star = e;
t.rankIndex = 0;
} else if (3 < e && e <= 7) {
t.rankName = "英勇白银";
t.star = e - 4;
t.rankIndex = 1;
} else if (7 < e && e <= 11) {
t.rankName = "荣耀黄金";
t.star = e - 8;
t.rankIndex = 2;
} else if (11 < e && e <= 16) {
t.rankName = "尊贵铂金";
t.star = e - 12;
t.rankIndex = 3;
} else if (16 < e && e <= 22) {
t.rankName = "永恒钻石";
t.star = e - 17;
t.rankIndex = 4;
} else if (22 < e && e <= 29) {
t.rankName = "璀璨星耀";
t.star = e - 23;
t.rankIndex = 5;
} else if (29 < e) {
t.rankName = "最强王者";
t.star = e - 30;
t.rankIndex = 6;
}
return t;
};
e.prototype.getRankScore = function() {
var e = 0, t = this.getRankInfo(), a = this.getRankInfo().Stars;
switch (t.Rank) {
case 0:
e = a;
break;

case 1:
e = a + 4;
break;

case 2:
e = a + 8;
break;

case 3:
e = a + 12;
break;

case 4:
e = a + 17;
break;

case 5:
e = a + 23;
break;

case 6:
e = a + 30;
}
return e;
};
e.prototype.finishTask = function(e) {
var t = !1;
this.userData.userData.task.forEach(function(a) {
if (a.K == e) {
t = !0;
a.V++;
}
});
t || this.userData.userData.task.push({
K: e,
V: 1,
G: 0
});
};
e.prototype.getTaskInfo = function() {
return this.userData.userData.task;
};
e.prototype.getTaskReward = function(e) {
this.userData.userData.task.forEach(function(t) {
t.K == e && (t.G = 1);
});
};
e.prototype.checkGetTaskReward = function(e) {
var t = !1;
this.userData.userData.task.forEach(function(a) {
a.K == e && (t = 1 == a.G);
});
return t;
};
e.prototype.getDailyGift = function() {
this.userData.userData.getGift = !0;
};
e.prototype.checkGetDailyGift = function() {
return this.userData.userData.getGift;
};
e.prototype.addVideoTime = function() {
this.userData.userData.videoTime++;
};
return e;
}())();
cc._RF.pop();
}, {
"../Config/ExcelData": "ExcelData",
"../Config/GConfig": "GConfig",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Global/UserData": "UserData"
} ],
MUserData: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "8b0f8DeGyBEFpRL19CrUCur", "MUserData");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
});
Object.defineProperty(a, "__esModule", {
value: !0
});
a.MUserData = void 0;
var i = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.quitTime = 0;
t.registTime = 0;
t.loginTime = 0;
t.newUser = !0;
t.gold = 0;
t.diamond = 0;
t.myDebris = [];
t.pvpWarTime = 0;
t.pveWarTime = 0;
t.rankTime = 0;
t.signInDays = 0;
t.freeSignInTime = 0;
t.rewardSignInTime = 0;
t.getGoldTime = 0;
t.addGoldTime = 0;
t.checkpoint = 0;
t.freeDrawTime = 1;
t.drwaTime = 0;
t.isNextDouble = 0;
t.boxReward = [ 0, 0, 0 ];
t.task = [];
t.getGift = !1;
t.videoTime = 0;
t.redeemTime = 0;
t.rankMatchTime = 5;
t.haveAuth = 0;
t.nickName = "";
t.avatarUrl = "";
return t;
}
t.prototype.checkIsSameDay = function() {
if (GA.isToday(this.loginTime)) console.log("是同一天登陆的"); else {
console.log("不是同一天登陆的");
this.getGoldTime = 0;
this.addGoldTime = 0;
this.freeDrawTime = 1;
this.task = [];
this.getGift = !1;
this.redeemTime = 0;
this.rankMatchTime = 5;
}
this.loginTime = Date.now();
};
return t;
}(e("../Base/BaseModel").BaseModel);
a.MUserData = i;
cc._RF.pop();
}, {
"../Base/BaseModel": "BaseModel"
} ],
MainPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "08cd0ewpZ5IHZwp6dQRIyKa", "MainPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Config/GConfig"), c = e("../GameLogic"), l = e("../Global/GAd"), d = e("../Global/GBundle"), h = e("../Global/Global"), p = e("../Global/GTemporary"), u = e("../Global/GTool"), f = e("../Manager/MData"), y = e("../Manager/PopupManager"), m = cc._decorator, g = m.ccclass, v = m.property, G = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.picWarnSignin = null;
t.spineMecha = null;
t.spinePart = null;
t.spineWarehorse = null;
t.spinePVE = null;
t.btnDraw = null;
t.panelDraw = null;
t.signInRedPoint = null;
t.drawRedPoint = null;
t.redeemPoint = null;
t.taskPoint = null;
t.dailyGiftPoint = null;
t.btnDailyGift = null;
t.btnBank = null;
t.btnSignIn = null;
t.btnRedeem = null;
t.frameGold = null;
t.picGuide = null;
t.btnRank = null;
t.btnRankList = null;
t.mechaIndex = 0;
t.lastTouchTime = 0;
t.canCount = !0;
t.guide = null;
t.hand = null;
t.sudokuN = null;
t.navigationData = [];
return t;
}
t.prototype.start = function() {
var e = this;
this.btnRedeem.active = "Inland" == p.GTemporary.region;
this.btnRankList.active = GA.isWeChat();
this.picWarnSignin.active = !f.MData.checkFreeSignInToday();
1 == s.GConfig.ServerConfig.OpenGrid ? cc.tween(this.btnDraw).repeatForever(cc.tween().by(.1, {
angle: 10
}).by(.1, {
angle: -10
}).by(.1, {
angle: -15
}).by(.1, {
angle: 15
}).delay(1)).start() : this.btnDraw.active = !1;
GA.isVivo() ? this.btnDraw.active = !1 : GA.isAndroid() && !GA.Info.underCheck && (this.btnDraw.active = !1);
cc.systemEvent.on(EventsName.SignIn, function() {
e.signInRedPoint.active = f.MData.getCurrentCheckpoint() >= 3 && (!f.MData.checkFreeSignInToday() || !f.MData.checkRewardSignInToday());
}, this);
this.signInRedPoint.active = f.MData.getCurrentCheckpoint() >= 3 && (!f.MData.checkFreeSignInToday() || !f.MData.checkRewardSignInToday());
cc.systemEvent.on(EventsName.Draw, function() {
e.drawRedPoint.active = !1;
}, this);
this.drawRedPoint.active = 1 == f.MData.getFreeDrawTime();
cc.tween(this.signInRedPoint).repeatForever(cc.tween().to(.5, {
scale: 1.3
}).to(.5, {
scale: 1
})).start();
cc.tween(this.drawRedPoint).repeatForever(cc.tween().to(.5, {
scale: 1.3
}).to(.5, {
scale: 1
})).start();
cc.tween(this.redeemPoint).repeatForever(cc.tween().to(.5, {
scale: 1.3
}).to(.5, {
scale: 1
})).start();
cc.tween(this.taskPoint).repeatForever(cc.tween().to(.5, {
scale: 1.3
}).to(.5, {
scale: 1
})).start();
cc.tween(this.dailyGiftPoint).repeatForever(cc.tween().to(.5, {
scale: 1.3
}).to(.5, {
scale: 1
})).start();
this.frameGold.on(cc.Node.EventType.TOUCH_END, function() {
e.stopShowGuide();
}, this);
this.schedule(function() {
if (!e.picGuide.active && e.canCount) {
e.lastTouchTime++;
if (5 == e.lastTouchTime) {
e.lastTouchTime = 0;
cc.Tween.stopAllByTarget(e.picGuide);
var t = cc.v3(420, -250), a = f.MData.getNextCheckpoint();
if (a != f.MData.getMaxCheckpoint() + 1) {
var o = f.MData.getCheckpointData(a);
t = f.MData.getCurrentPower() >= o.SuggestPower ? cc.v3(520, -80) : cc.v3(240, -250);
} else t = cc.v3(420, -250);
cc.tween(e.picGuide).set({
active: !0,
position: t,
scale: 1
}).repeatForever(cc.tween().by(1, {
scale: .3,
x: 30,
y: -50
}, {
easing: cc.easing.quadInOut
}).by(1, {
scale: -.3,
x: -30,
y: 50
}, {
easing: cc.easing.quadInOut
})).start();
}
}
}, 1);
cc.systemEvent.on(EventsName.StartMainGuide, function() {
e.canCount = !0;
e.lastTouchTime = 0;
}, this);
cc.systemEvent.on(EventsName.GetDailyGift, function() {
cc.Tween.stopAllByTarget(e.dailyGiftPoint);
e.dailyGiftPoint.active = !1;
e.btnDailyGift.active = !1;
}, this);
this.scheduleOnce(function() {
c.default.instance.createAuthBtn(e.btnRank);
});
};
t.prototype.stopShowGuide = function() {
this.canCount = !1;
this.lastTouchTime = 0;
this.picGuide.active = !1;
};
t.prototype.init = function() {
var e = this;
this.lastTouchTime = 0;
if (this.mechaIndex != f.MData.getCurrentMecha()) {
this.mechaIndex = f.MData.getCurrentMecha();
if (p.GTemporary.displaySpineMap.has(this.mechaIndex)) {
this.spineMecha.skeletonData = p.GTemporary.displaySpineMap.get(this.mechaIndex);
f.MData.getPartsData(p.GTemporary.myData.MechaIndex).forEach(function(t) {
if (1 == t.Status) {
var a = f.MData.getPartInfo(p.GTemporary.myData.MechaIndex, t.PartIndex);
e.spineMecha.setAttachment(a.PicName, a.PicName);
a.AdditionPicName && "" != a.AdditionPicName && e.spineMecha.setAttachment(a.AdditionPicName, a.AdditionPicName);
}
});
h.G.playSpine(this.spineMecha, "standby1", !0, null);
this.spineMecha.node.setPosition(p.GTemporary.displaySpineMainPos.get(this.mechaIndex));
this.spineMecha.node.scale = 7 == this.mechaIndex ? .9 : 1.1;
} else {
var t = "Display/" + this.mechaIndex.toString() + "/Skeleton";
d.GBundle.GetBundle(d.EBundle.Spines).load(t, sp.SkeletonData, function(t, a) {
if (t) cc.error(t); else {
p.GTemporary.displaySpineMap.set(e.mechaIndex, a);
e.spineMecha.skeletonData = a;
f.MData.getPartsData(p.GTemporary.myData.MechaIndex).forEach(function(t) {
if (1 == t.Status) {
var a = f.MData.getPartInfo(p.GTemporary.myData.MechaIndex, t.PartIndex);
e.spineMecha.setAttachment(a.PicName, a.PicName);
null != a.AdditionPicName && "" != a.AdditionPicName && e.spineMecha.setAttachment(a.AdditionPicName, a.AdditionPicName);
}
});
e.spineMecha.node.setPosition(p.GTemporary.displaySpineMainPos.get(e.mechaIndex));
e.spineMecha.node.scale = 7 == e.mechaIndex ? .9 : 1.1;
h.G.playSpine(e.spineMecha, "standby1", !0, null);
}
});
}
} else f.MData.getPartsData(p.GTemporary.myData.MechaIndex).forEach(function(t) {
if (1 == t.Status) {
var a = f.MData.getPartInfo(p.GTemporary.myData.MechaIndex, t.PartIndex);
e.spineMecha.setAttachment(a.PicName, a.PicName);
a.AdditionPicName && "" != a.AdditionPicName && e.spineMecha.setAttachment(a.AdditionPicName, a.AdditionPicName);
}
});
this.picWarnSignin.active = !f.MData.checkFreeSignInToday();
this.btnSignIn.active = f.MData.getCurrentCheckpoint() >= 3;
var a = f.MData.getNextCheckpoint();
this.spinePVE.active = !1;
if (a != f.MData.getMaxCheckpoint() + 1) {
var o = f.MData.getCheckpointData(a);
f.MData.getCurrentPower() >= o.SuggestPower && (this.spinePVE.active = !0);
}
var n = f.MData.getCurrentPartMaxLevel(this.mechaIndex);
if (0 == n) this.spineWarehorse.active = !0; else if (n == f.MData.getPartMaxLevel(this.mechaIndex)) this.spineWarehorse.active = !1; else {
var i = f.MData.getPartInfo(p.GTemporary.myData.MechaIndex, n);
"Gold" == i.UnlockWay ? f.MData.canAffordGold(i.Price) ? this.spineWarehorse.active = !0 : this.spineWarehorse.active = !1 : "Debris" == i.UnlockWay && (f.MData.canAffordGold(i.Price) ? this.spineWarehorse.active = !0 : this.spineWarehorse.active = !1);
}
if (this.guide.active) {
this.guide.active = !1;
cc.Tween.stopAllByTarget(this.hand);
this.hand.active = !1;
}
this.signInRedPoint.active = f.MData.getCurrentCheckpoint() >= 3 && (!f.MData.checkFreeSignInToday() || !f.MData.checkRewardSignInToday());
var r = f.MData.getTaskInfo(), s = !1;
r.forEach(function(e) {
if (1 != e.G) switch (e.K) {
case "PVP":
case "PVE":
e.V >= 5 && (s = !0);
break;

case "SkyBox":
e.V >= 2 && (s = !0);
break;

case "BuyPart":
e.V >= 10 && (s = !0);
}
});
this.taskPoint.active = s;
this.btnDailyGift.active = !f.MData.checkGetDailyGift();
this.btnBank.active = 5 != f.MData.userData.userData.redeemTime;
};
t.prototype.clickWarehouse = function() {
this.stopShowGuide();
u.GTool.sendBtnEvent("点击仓库");
AudioManager.playEffect(AudioName.BtnClick);
c.default.instance.showAuthBtn(!1);
c.default.instance.showMain(!1, function() {
y.PopupManager.show(UIPath.WarehousePopup);
});
};
t.prototype.clickPVE = function() {
this.stopShowGuide();
u.GTool.sendBtnEvent("点击PVE");
c.default.instance.showAuthBtn(!1);
AudioManager.playEffect(AudioName.BtnClick);
c.default.instance.showMain(!1, function() {
y.PopupManager.show(UIPath.CheckPointPopup);
});
};
t.prototype.clickPVP = function() {
this.stopShowGuide();
u.GTool.sendBtnEvent("点击PVP");
AudioManager.playEffect(AudioName.BtnClick);
c.default.instance.showAuthBtn(!1);
c.default.instance.showMain(!1, function() {
y.PopupManager.show(UIPath.MatchPopup);
});
};
t.prototype.clickRank = function() {
this.stopShowGuide();
u.GTool.sendBtnEvent("点击Rank");
AudioManager.playEffect(AudioName.BtnClick);
c.default.instance.showAuthBtn(!1);
c.default.instance.showMain(!1, function() {
y.PopupManager.show(UIPath.RankPopup);
});
};
t.prototype.clickArena = function() {
this.stopShowGuide();
u.GTool.sendBtnEvent("点击竞技场");
c.default.instance.showAuthBtn(!1);
AudioManager.playEffect(AudioName.BtnClick);
c.default.instance.showMain(!1, function() {
y.PopupManager.show(UIPath.RankPopup);
});
};
t.prototype.clickRankList = function() {
this.stopShowGuide();
u.GTool.sendBtnEvent("点击排行榜");
AudioManager.playEffect(AudioName.BtnClick);
c.default.instance.showMain(!1, function() {
y.PopupManager.show(UIPath.RankListPopup);
});
};
t.prototype.clickTask = function() {
this.stopShowGuide();
u.GTool.sendBtnEvent("点击任务");
AudioManager.playEffect(AudioName.BtnClick);
y.PopupManager.show(UIPath.TaskPopup);
};
t.prototype.clickDailyGift = function() {
this.stopShowGuide();
u.GTool.sendBtnEvent("点击每日礼包");
AudioManager.playEffect(AudioName.BtnClick);
y.PopupManager.show(UIPath.DailyGiftPopup);
};
t.prototype.clickBank = function() {
this.stopShowGuide();
u.GTool.sendBtnEvent("点击商店");
AudioManager.playEffect(AudioName.BtnClick);
y.PopupManager.show(UIPath.BankPopup);
};
t.prototype.clickSet = function() {
this.stopShowGuide();
u.GTool.sendBtnEvent("点击设置");
AudioManager.playEffect(AudioName.BtnClick);
y.PopupManager.show(UIPath.SetPopup);
};
t.prototype.clickFriendHelp = function() {
this.stopShowGuide();
u.GTool.sendBtnEvent("点击好友助力");
AudioManager.playEffect(AudioName.BtnClick);
y.PopupManager.show(UIPath.SharePopup);
};
t.prototype.clickRedeem = function() {
this.stopShowGuide();
u.GTool.sendBtnEvent("点击兑换界面");
AudioManager.playEffect(AudioName.BtnClick);
y.PopupManager.show(UIPath.SetPopup);
};
t.prototype.clickSignIn = function() {
this.stopShowGuide();
u.GTool.sendBtnEvent("点击签到");
AudioManager.playEffect(AudioName.BtnClick);
f.MData.getCurrentCheckpoint() >= 3 ? y.PopupManager.show(UIPath.SignInPopup) : u.GTool.showToast("通关兽王争霸第三关后开启");
};
t.prototype.clickDraw = function() {
this.stopShowGuide();
u.GTool.sendBtnEvent("点击抽奖");
AudioManager.playEffect(AudioName.BtnClick);
y.PopupManager.show(UIPath.DrawPopup);
};
t.prototype.clickAddGold = function() {
f.MData.addGold(1e4);
};
t.prototype.clickResetData = function() {
var e = this;
f.MData.resetData();
this.init();
var t = "Display/" + this.mechaIndex.toString() + "/Skeleton";
d.GBundle.GetBundle(d.EBundle.Spines).load(t, sp.SkeletonData, function(t, a) {
if (t) cc.error(t); else {
e.spineMecha.skeletonData = a;
f.MData.getPartsData(p.GTemporary.myData.MechaIndex).forEach(function(t) {
if (1 == t.Status) {
var a = f.MData.getPartInfo(p.GTemporary.myData.MechaIndex, t.PartIndex);
e.spineMecha.setAttachment(a.PicName, a.PicName);
a.AdditionPicName && "" != a.AdditionPicName && e.spineMecha.setAttachment(a.AdditionPicName, a.AdditionPicName);
}
});
h.G.playSpine(e.spineMecha, "standby1", !0, null);
}
});
};
t.prototype.showNewUserGuide = function() {
this.guide.active = !0;
cc.tween(this.hand).repeatForever(cc.tween().to(.5, {
scale: 1.2
}).to(.5, {
scale: 1
})).start();
};
t.prototype.showSudokuN = function(e, t) {
var a = this;
void 0 === t && (t = 100);
if (GA.isWeChat() && !GA.Info.isPreview) {
this.sudokuN.active = !0;
this.sudokuN.children.forEach(function(e) {
e.active = !1;
});
if (e && GA.isWeChat() && 1 == s.GConfig.ServerConfig.OpenGrid) {
this.sudokuN.setParent(cc.Canvas.instance.node);
this.sudokuN.setSiblingIndex(cc.macro.MAX_ZINDEX);
GA.getNavigationList(t, 10, []).then(function(e) {
a.navigationData = e;
a.navigationData.forEach(function(e, o) {
var n = a.sudokuN.children[o], i = n.children[0].getComponent(cc.Sprite);
if ("" != e.icon) {
cc.assetManager.loadRemote(e.icon, {
ext: ".png"
}, function(e, t) {
if (e) cc.error(e); else try {
n.active = !0;
i.spriteFrame = new cc.SpriteFrame(t);
} catch (e) {}
});
n.off(cc.Node.EventType.TOUCH_END);
n.on(cc.Node.EventType.TOUCH_END, function() {
h.G.reportCheatAction("clickRedirect");
GA.PA.navigateToMiniProgram({
appId: e.appid,
pkgName: e.appid,
path: e.path,
success: function() {
h.G.reportCheatAction("confirmRedirect");
GA.saveRedirect(t, e.appid, e.path);
},
fail: function() {}
});
});
}
});
}).catch(function(e) {
console.error(e);
});
} else this.sudokuN.active = !1;
}
};
t.prototype.clickShowDrawPanel = function() {
this.stopShowGuide();
if (GA.isWeChat()) {
u.GTool.sendBtnEvent("打开抽屉界面");
this.panelDraw.active = !0;
this.showSudokuN(!0);
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Main,
show: !1
} ]);
} else GA.isOPPO() && l.GAd.showGamePortalAd();
};
t.prototype.clickHideDrawPanel = function() {
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Main,
show: !0
} ]);
this.canCount = !0;
u.GTool.sendBtnEvent("关闭抽屉界面");
this.panelDraw.active = !1;
this.showSudokuN(!1);
};
t.prototype.clickAddDebris = function() {
f.MData.addDebris(3, 1e6);
};
t.prototype.clickResetSignIn = function() {
f.MData.userData.userData.getGift = !1;
this.btnDailyGift.active = !0;
this.dailyGiftPoint.active = !0;
};
i([ v(cc.Node) ], t.prototype, "picWarnSignin", void 0);
i([ v(sp.Skeleton) ], t.prototype, "spineMecha", void 0);
i([ v(sp.Skeleton) ], t.prototype, "spinePart", void 0);
i([ v(cc.Node) ], t.prototype, "spineWarehorse", void 0);
i([ v(cc.Node) ], t.prototype, "spinePVE", void 0);
i([ v(cc.Node) ], t.prototype, "btnDraw", void 0);
i([ v(cc.Node) ], t.prototype, "panelDraw", void 0);
i([ v(cc.Node) ], t.prototype, "signInRedPoint", void 0);
i([ v(cc.Node) ], t.prototype, "drawRedPoint", void 0);
i([ v(cc.Node) ], t.prototype, "redeemPoint", void 0);
i([ v(cc.Node) ], t.prototype, "taskPoint", void 0);
i([ v(cc.Node) ], t.prototype, "dailyGiftPoint", void 0);
i([ v(cc.Node) ], t.prototype, "btnDailyGift", void 0);
i([ v(cc.Node) ], t.prototype, "btnBank", void 0);
i([ v(cc.Node) ], t.prototype, "btnSignIn", void 0);
i([ v(cc.Node) ], t.prototype, "btnRedeem", void 0);
i([ v(cc.Node) ], t.prototype, "frameGold", void 0);
i([ v(cc.Node) ], t.prototype, "picGuide", void 0);
i([ v(cc.Node) ], t.prototype, "btnRank", void 0);
i([ v(cc.Node) ], t.prototype, "btnRankList", void 0);
i([ v(cc.Node) ], t.prototype, "guide", void 0);
i([ v(cc.Node) ], t.prototype, "hand", void 0);
i([ v(cc.Node) ], t.prototype, "sudokuN", void 0);
return i([ g ], t);
}(r.default);
a.default = G;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Config/GConfig": "GConfig",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GBundle": "GBundle",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Global/Global": "Global",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager"
} ],
MatchPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "794a0fl8tpPwrjzTK8sclrI", "MatchPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Config/GConfig"), c = e("../GameLogic"), l = e("../Global/GAd"), d = e("../Global/GTemporary"), h = e("../Global/GTool"), p = e("../Manager/MData"), u = e("../Manager/PopupManager"), f = cc._decorator, y = f.ccclass, m = f.property, g = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.prefabMatch = null;
t.labelPower = null;
t.content = null;
t.headPics = [];
t.doorRight = null;
t.doorLeft = null;
t.guide = null;
return t;
}
t.prototype.start = function() {
var e = this;
d.GTemporary.myData.MechaIndex = p.MData.getCurrentMecha();
if (GA.isWeChat()) {
l.GAd.showBanner("banner2", 0, GA.PA.getSystemInfoSync().screenWidth / 2 + 50);
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Left,
show: !0
}, {
pos: l.AdPos.Right,
show: !0
}, {
pos: l.AdPos.Main,
show: !1
} ]);
c.default.instance.showAuthBtn(!1);
} else GA.isVivo() ? l.GAd.showVivoBanner() : GA.isOPPO() ? GA.showBanner({
adTag: "banner"
}) : GA.isAndroid() && "Inland" == d.GTemporary.region && !GA.Info.underCheck && GA.showNativeAd({
type: 3
});
d.GTemporary.mechaProperties.forEach(function(t) {
t.MechaIndex == d.GTemporary.myData.MechaIndex && (e.labelPower.string = Math.round(t.Health + 12 * t.Attack + 12 * t.Defence).toString());
});
var t = p.MData.getMatchInfo();
Date.now() - t.MatchTime > 6e4 * s.GConfig.ServerConfig.RematchTime ? this.match(!0) : p.MData.getMatchInfo().Power != p.MData.getCurrentPower() ? this.match(!1) : this.showMatchEnemy();
};
t.prototype.clickRematch = function() {
var e = this;
h.GTool.sendBtnEvent("重新匹配");
GA.rewardOperation({
tag: RewardType.Rematch,
byVideo: h.GTool.isNextRewardVideo(RewardType.Rematch),
page: "Match",
result: function(t) {
t.reward && e.match(!0);
}
});
};
t.prototype.match = function(e) {
var t = this, a = function(a) {
var o = a.data.data, n = p.MData.getMatchInfo();
n.Power = p.MData.getCurrentPower();
if (e) {
n.MatchTime = Date.now();
n.List = [];
o.forEach(function(e, a) {
var o = t.getRandomPower(a);
n.List.push({
Name: 2 == a ? "机器人" : e.nickname,
Reward: t.getRandomReward(a),
Power: o,
Index: a,
MechaIndex: 2 == a ? 0 : t.getTargetMecha(o)
});
});
} else n.List.forEach(function(e, a) {
var n = t.getRandomPower(a);
e.Power = n;
e.MechaIndex = t.getTargetMecha(n);
e.Name = 2 == a ? "机器人" : o[a].nickname;
});
t.node && t.node.active && t.showMatchEnemy();
};
"Chinese" == d.GTemporary.languageVersion ? GA.request({
url: Urls.url_GetRobots,
data: {
limit: 5
},
method: "POST",
success: function(e) {
0 == e.data.code ? a(e) : h.GTool.showToast("匹配失败");
}
}) : a({
data: {
code: 0,
data: [ {
openid: "",
icon: "",
nickname: "玩家1",
level: 0
}, {
openid: "",
icon: "",
nickname: "玩家2",
level: 0
}, {
openid: "",
icon: "",
nickname: "玩家3",
level: 0
}, {
openid: "",
icon: "",
nickname: "玩家4",
level: 0
}, {
openid: "",
icon: "",
nickname: "玩家5",
level: 0
} ]
}
});
};
t.prototype.getRandomPower = function(e) {
var t = d.GTemporary.myData.AllHealth + 12 * (d.GTemporary.myData.Attack + d.GTemporary.myData.Defence);
switch (e) {
case 0:
t *= GA.randFloat(.8, 1.1);
break;

case 1:
t *= GA.randFloat(1, 1.1);
break;

case 2:
t *= GA.randFloat(.5, .8);
break;

case 3:
t *= GA.randFloat(1.2, 1.4);
break;

case 4:
t *= GA.randFloat(1.4, 1.5);
}
return t;
};
t.prototype.getRandomReward = function(e) {
var t = p.MData.getPartInfo(p.MData.getCurrentMecha(), p.MData.getCurrentPartMaxLevel(p.MData.getCurrentMecha()) > 1 ? p.MData.getCurrentPartMaxLevel(p.MData.getCurrentMecha()) - 1 : 1).Price;
p.MData.allMecha.forEach(function(e) {
if (p.MData.checkUnlockMecha(e) && 3 != e) {
var a = 1;
p.MData.getCurrentPartMaxLevel(e) > 1 && (a = p.MData.getCurrentPartMaxLevel(e));
var o = p.MData.getPartInfo(e, a).Price;
o > t && (t = o);
}
});
var a = t;
if (p.MData.getCurrentCheckpoint() < 5) switch (e) {
case 0:
a = Math.round(.6 * t);
break;

case 1:
a = Math.round(.8 * t);
break;

case 2:
a = Math.round(1 * t);
break;

case 3:
a = Math.round(1.2 * t);
break;

case 4:
a = Math.round(1.5 * t);
} else if (p.MData.getCurrentCheckpoint() < 10) switch (e) {
case 0:
a = Math.round(.3 * t);
break;

case 1:
a = Math.round(.5 * t);
break;

case 2:
a = Math.round(.6 * t);
break;

case 3:
a = Math.round(.7 * t);
break;

case 4:
a = Math.round(.9 * t);
} else switch (e) {
case 0:
a = Math.round(.22 * t);
break;

case 1:
a = Math.round(.3 * t);
break;

case 2:
a = Math.round(.35 * t);
break;

case 3:
a = Math.round(.4 * t);
break;

case 4:
a = Math.round(.5 * t);
}
0 == a && (a = 50);
return a;
};
t.prototype.getTargetMecha = function(e) {
var t = [ 1 ];
d.GTemporary.mechaProperties.forEach(function(a) {
a.MinPower <= e && a.MaxPower >= e && !s.GConfig.ServerConfig.BanedMechas.includes(a.MechaIndex) && t.push(a.MechaIndex);
});
return t[GA.rand(0, t.length - 1)];
};
t.prototype.showMatchEnemy = function() {
var e = this, t = p.MData.getMatchInfo();
this.content.destroyAllChildren();
t.List.forEach(function(t) {
var a = cc.instantiate(e.prefabMatch);
a.active = !0;
a.setParent(e.content);
a.getChildByName("LabelName").getComponent(cc.Label).string = t.Name.length > 5 ? t.Name.substr(0, 4) + ".." : t.Name;
a.getChildByName("LabelPower").getComponent(cc.Label).string = Math.round(t.Power).toString();
a.getChildByName("LabelReward").getComponent(cc.Label).string = "+" + GA.formatNumber(t.Reward);
GA.isVivo() && GA.Info.underCheck ? a.getChildByName("PicHead").getComponent(cc.Sprite).spriteFrame = 2 == t.Index ? e.headPics[1] : e.headPics[t.MechaIndex] : a.getChildByName("PicHead").getComponent(cc.Sprite).spriteFrame = 2 == t.Index ? e.headPics[0] : e.headPics[t.MechaIndex];
if (2 == t.Index) {
e.guide.active = !0;
cc.tween(e.guide).repeatForever(cc.tween().to(.5, {
scale: 1.4
}).to(.5, {
scale: 1
})).start();
}
a.on(cc.Node.EventType.TOUCH_END, function() {
d.GTemporary.pvpInfo = {
Index: t.Index,
MechaIndex: t.MechaIndex,
Power: t.Power,
Reward: t.Reward
};
d.GTemporary.fightMode = "PVP";
if (GA.isWeChat()) {
l.GAd.hideBanner("banner2");
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Left,
show: !1
}, {
pos: l.AdPos.Right,
show: !1
} ]);
} else GA.isVivo() ? l.GAd.hideVivoBanner() : GA.isOPPO() && GA.hideBanner("banner");
e.showCloseDoorAni(function() {
e.hide();
u.PopupManager.show(UIPath.FightPopup);
});
}, e);
});
};
t.prototype.clickClose = function() {
if (GA.isWeChat()) {
l.GAd.hideBanner("banner2");
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Left,
show: !1
}, {
pos: l.AdPos.Right,
show: !1
} ]);
} else GA.isVivo() ? l.GAd.hideVivoBanner() : GA.isOPPO() && GA.hideBanner("banner");
h.GTool.sendBtnEvent("关闭匹配弹窗");
AudioManager.playEffect(AudioName.BtnClose);
this.hide();
if (d.GTemporary.needReturnWarehouse) {
d.GTemporary.needReturnWarehouse = !1;
u.PopupManager.show(UIPath.WarehousePopup);
} else c.default.instance.showMain(!0);
};
t.prototype.onDestroy = function() {
GA.isAndroid() && "Inland" == d.GTemporary.region && !GA.Info.underCheck && GA.hideNativeAd();
};
t.prototype.showCloseDoorAni = function(e) {
if (cc.winSize.width > 2e3) {
this.doorRight.width = cc.winSize.width / 2;
this.doorLeft.width = cc.winSize.width / 2;
}
AudioManager.playEffect("play_step1");
cc.tween(this.doorRight).set({
active: !0
}).to(.5, {
x: -110
}, {
easing: cc.easing.expoInOut
}).call(function() {
c.default.instance.showDoor(!0);
e && e();
}).start();
cc.tween(this.doorLeft).set({
active: !0
}).to(.5, {
x: 110
}, {
easing: cc.easing.expoInOut
}).start();
};
i([ m(cc.Node) ], t.prototype, "prefabMatch", void 0);
i([ m(cc.Label) ], t.prototype, "labelPower", void 0);
i([ m(cc.Node) ], t.prototype, "content", void 0);
i([ m(cc.SpriteFrame) ], t.prototype, "headPics", void 0);
i([ m(cc.Node) ], t.prototype, "doorRight", void 0);
i([ m(cc.Node) ], t.prototype, "doorLeft", void 0);
i([ m(cc.Node) ], t.prototype, "guide", void 0);
return i([ y ], t);
}(r.default);
a.default = g;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Config/GConfig": "GConfig",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager"
} ],
MatrixGridPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "0e460AcGp1NtJ3eM+RZ3gJn", "MatrixGridPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../GameLogic"), c = e("../Global/GAd"), l = e("../Global/GTemporary"), d = e("../Manager/PopupManager"), h = cc._decorator, p = h.ccclass, u = (h.property, 
function(e) {
n(t, e);
function t() {
return null !== e && e.apply(this, arguments) || this;
}
t.prototype.start = function() {
GA.isWeChat() && !GA.Info.isPreview && c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.Matrix,
show: !0
} ]);
};
t.prototype.clickClose = function() {
GA.isWeChat() && !GA.Info.isPreview && c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.Matrix,
show: !1
} ]);
this.hide();
switch (l.GTemporary.NextPageAfterMatrix) {
case "Main":
s.default.instance.showMain(!0);
break;

case "Warehourse":
d.PopupManager.show(UIPath.WarehousePopup);
}
};
return i([ p ], t);
}(r.default));
a.default = u;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Manager/PopupManager": "PopupManager"
} ],
Mecha: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "22686VnmbdL25ZEnclmaBAh", "Mecha");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BaseMecha"), s = e("../Global/Global"), c = e("../Global/GTemporary"), l = e("../Manager/MData"), d = cc._decorator, h = d.ccclass, p = (d.property, 
function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.standByAniName = "";
return t;
}
t.prototype.releaseSkill = function(e, t, a, o) {
var n = this;
this.node.setSiblingIndex(cc.macro.MAX_ZINDEX);
var i = this.isPlayer ? c.GTemporary.myData.Awaken : c.GTemporary.enemyData.Awaken;
4 == e && cc.systemEvent.emit(EventsName.ShowFinalSkillEffect, !0);
s.G.playSpine(this.spine, t, !1, function() {
4 == e && cc.systemEvent.emit(EventsName.ShowFinalSkillEffect, !1);
if (4 == e && i) s.G.playSpine(n.spine, "attack1_5.1", !1, function() {
n.isPlayer ? c.GTemporary.myData.Awaken = !1 : c.GTemporary.enemyData.Awaken = !1;
n.showOwnedPart();
n.standBy();
n.node.setSiblingIndex(cc.macro.MAX_ZINDEX);
a && cc.systemEvent.emit(EventsName.ReleaseSkillFinish, n.isPlayer);
0 != c.GTemporary.myData.CurrentHealth && 0 != c.GTemporary.enemyData.CurrentHealth && o && o();
}); else {
n.standBy();
a && cc.systemEvent.emit(EventsName.ReleaseSkillFinish, n.isPlayer);
0 != c.GTemporary.myData.CurrentHealth && 0 != c.GTemporary.enemyData.CurrentHealth && o && o();
}
});
};
t.prototype.awaken = function(e) {
var t = this;
s.G.playSpine(this.spine, "transform2", !1, function() {
s.G.playSpine(t.spine, "transform2.1", !1, function() {
t.standBy();
e && e();
});
});
};
t.prototype.playSpine = function(e, t, a, o) {
void 0 === o && (o = !1);
};
t.prototype.standBy = function() {
s.G.playSpine(this.spine, this.isPlayer ? c.GTemporary.myData.Awaken ? "standby2" : "standby1" : c.GTemporary.enemyData.Awaken ? "standby2" : "standby1", !0, null);
};
t.prototype.getHurt = function() {
var e = this;
if (this.mechaStatus != r.MechaStatus.Die) {
this.mechaStatus = r.MechaStatus.GetHurt;
s.G.playSpine(this.spine, this.getGetHurtAniName(), !1, function() {
e.mechaStatus = r.MechaStatus.StandBy;
s.G.playSpine(e.spine, e.getstandbyName(), !0, null);
});
}
};
t.prototype.die = function(e) {
this.mechaStatus = r.MechaStatus.Die;
s.G.playSpine(this.spine, this.getDieAniName(), !1, function() {
e && e();
});
};
t.prototype.showOwnedPart = function(e) {
var t = this;
void 0 === e && (e = !1);
if (this.isPlayer) for (var a = l.MData.getPartMaxLevel(c.GTemporary.myData.MechaIndex), o = l.MData.getPartsData(c.GTemporary.myData.MechaIndex), n = function(a) {
try {
var n = l.MData.checkHaveOriginPic(c.GTemporary.myData.MechaIndex, a);
if (c.GTemporary.tryOutMecha || e) {
i.spine.setAttachment(n.PicName, n.PicName);
n.AdditionPicName && "" != n.AdditionPicName && i.spine.setAttachment(n.AdditionPicName, n.AdditionPicName);
} else if (l.MData.checkHavePart(c.GTemporary.myData.MechaIndex, a)) o.forEach(function(e) {
if (e.PartIndex == a) if (0 == e.Status) {
n.Have && t.spine.setAttachment(n.PicName, "1.0/" + n.PicName);
n.AdditionPicName && "" != n.AdditionPicName && t.spine.setAttachment(n.AdditionPicName, "1.0/" + n.AdditionPicName);
} else if (1 == e.Status) {
t.spine.setAttachment(n.PicName, n.PicName);
n.AdditionPicName && "" != n.AdditionPicName && t.spine.setAttachment(n.AdditionPicName, n.AdditionPicName);
}
}); else if (n.Have) {
n.Have && i.spine.setAttachment(n.PicName, "1.0/" + n.PicName);
n.AdditionPicName && "" != n.AdditionPicName && i.spine.setAttachment(n.AdditionPicName, "1.0/" + n.AdditionPicName);
}
} catch (e) {}
}, i = this, r = 1; r <= a; r++) n(r); else if (0 != c.GTemporary.enemyData.MechaIndex) for (var s = 1; s <= c.GTemporary.enemyData.PartsNumber; s++) try {
var d = l.MData.checkHaveOriginPic(c.GTemporary.enemyData.MechaIndex, s);
this.spine.setAttachment(d.PicName, d.PicName);
d.AdditionPicName && "" != d.AdditionPicName && this.spine.setAttachment(d.AdditionPicName, d.AdditionPicName);
} catch (e) {}
};
t.prototype.pause = function() {
this.spine.paused = !0;
};
t.prototype.remuse = function() {
this.spine.paused = !1;
};
return i([ h ], t);
}(r.default));
a.default = p;
cc._RF.pop();
}, {
"../Base/BaseMecha": "BaseMecha",
"../Global/GTemporary": "GTemporary",
"../Global/Global": "Global",
"../Manager/MData": "MData"
} ],
Multisource: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "4bbafuILptKoLFMwppSVErO", "Multisource");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Global/GTemporary"), s = e("../Global/GTool"), c = cc._decorator, l = c.ccclass, d = c.property, h = c.menu, p = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.picOversea = null;
return t;
}
t.prototype.start = function() {
if ("TraditionalChinese" == r.GTemporary.languageVersion) {
this.node.getComponent(cc.Sprite) && (this.node.getComponent(cc.Sprite).spriteFrame = this.picOversea);
this.node.getComponent(cc.Label) && (this.node.getComponent(cc.Label).string = s.GTool.getLanguage(this.node.getComponent(cc.Label).string));
}
};
i([ d(cc.SpriteFrame) ], t.prototype, "picOversea", void 0);
return i([ l, h("多源切换") ], t);
}(cc.Component);
a.default = p;
cc._RF.pop();
}, {
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool"
} ],
NewPartPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "ccfedGeDHRCWJzATMsf9cB0", "NewPartPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Config/GConfig"), c = e("../GameLogic"), l = e("../Global/GAd"), d = e("../Global/GBundle"), h = e("../Global/Global"), p = e("../Global/GTemporary"), u = e("../Global/GTool"), f = e("../Manager/MData"), y = e("../Manager/PopupManager"), m = cc._decorator, g = m.ccclass, v = m.property, G = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.spritePart = null;
t.lastParts = [];
t.spineMix = null;
t.btnConfirm = null;
t.btnPVP = null;
t.btnPVE = null;
t.btnCheat = null;
t.wechatCanCheat = !1;
t.showCheatBanner = !1;
t.onShowCallback = null;
return t;
}
t.prototype.start = function() {
var e = this;
cc.systemEvent.emit(EventsName.RefreshMech3Price);
if (GA.isWeChat()) {
l.GAd.hideBanner("banner");
c.default.instance.showSudokuN(!0);
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.LeftVertical,
show: !0
} ]);
this.wechatCanCheat = h.G.checkWeChatCanCheatClick(h.CheatPos.NewPart);
if (this.wechatCanCheat) {
p.GTemporary.CheatPopup = this.node;
this.onShowCallback = function() {
var e;
null === (e = p.GTemporary.CheatPopup) || void 0 === e || e.getComponent(r.default).hide();
};
this.btnCheat.clickEvents = [];
1 == s.GConfig.ServerConfig.WechatCheatNewPart ? this.btnCheat.node.on("click", function() {
e.btnCheat.node.off("click");
h.G.triggerCheatReport(h.CheatPos.NewPart);
e.scheduleOnce(function() {
console.log("显示广告");
e.showCheatBanner = !0;
c.default.instance.showBanner("CheatBanner", GA.PA.getSystemInfoSync().screenHeight - 100, 0);
e.scheduleOnce(function() {
e.btnCheat.node.on("click", function() {
e.clickClose();
});
console.log("关闭广告");
e.showCheatBanner = !1;
GA.PA.offShow(e.onShowCallback);
c.default.instance.hideBanner("CheatBanner");
}, 1);
}, .5);
}) : this.btnCheat.node.on("click", function() {
console.log("骗点视频");
h.G.triggerCheatReport(h.CheatPos.NewPart);
e.btnCheat.node.off("click");
e.btnCheat.node.on("click", function() {
e.clickClose();
});
GA.rewardOperation({
tag: RewardType.Cheat,
page: "NewPart",
byVideo: !0,
result: function() {}
});
});
} else l.GAd.showBanner("banner2", 0, GA.PA.getSystemInfoSync().screenWidth / 2 + 50);
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, this.node, !0) : GA.isAndroid() && "Inland" == p.GTemporary.region && !GA.Info.underCheck && GA.showNativeAd({
offsetX: 500,
type: 2
});
this.btnConfirm.active = !1;
this.spineMix.setEventListener(function(t, a) {
var o = a.data.name;
if ("hide" == o) e.lastParts.forEach(function(e) {
e.node.active = !1;
}); else if ("show" == o) {
e.spritePart.node.active = !0;
e.btnConfirm.active = !0;
var n = f.MData.getNextCheckpoint();
if (n != f.MData.getMaxCheckpoint() + 1) {
var i = f.MData.getCheckpointData(n);
e.btnPVE.active = f.MData.getCurrentPower() >= i.SuggestPower;
e.btnPVP.active = f.MData.getCurrentPower() < i.SuggestPower;
} else {
e.btnPVE.active = !1;
e.btnPVP.active = !0;
}
}
});
var t = 0;
this.spritePart.node.active = !1;
var a = function() {
e.scheduleOnce(function() {
AudioManager.playEffect(AudioName.NewPart);
}, .5);
e.spineMix.node.active = !0;
h.G.playSpine(e.spineMix, "animation", !1, function() {
e.lastParts.forEach(function(e) {
e.node.active = !1;
});
h.G.playSpine(e.spineMix, "animation2", !0, null);
});
}, o = f.MData.getPartInfo(p.GTemporary.newPartInfo.MechaIndex, p.GTemporary.newPartInfo.PartIndex).PicName, n = "Parts/" + p.GTemporary.newPartInfo.MechaIndex + "/" + o;
d.GBundle.GetBundle(d.EBundle.MechaPics).load(n, cc.SpriteFrame, function(o, n) {
if (o) cc.error(o); else {
e.spritePart.spriteFrame = n;
2 == ++t && a();
}
});
var i = f.MData.getPartInfo(p.GTemporary.newPartInfo.MechaIndex, p.GTemporary.newPartInfo.PartIndex - 1).PicName, u = "Parts/" + p.GTemporary.newPartInfo.MechaIndex + "/" + i;
d.GBundle.GetBundle(d.EBundle.MechaPics).load(u, cc.SpriteFrame, function(o, n) {
if (o) cc.error(o); else {
e.lastParts.forEach(function(e) {
e.spriteFrame = n;
});
2 == ++t && a();
}
});
};
t.prototype.clickClose = function() {
u.GTool.sendBtnEvent("关闭新部件弹窗");
AudioManager.playEffect(AudioName.BtnClose);
this.hide();
if (p.GTemporary.unlockNewSkillInfo.New) y.PopupManager.show(UIPath.InfoPopup); else if (GA.isWeChat()) {
this.wechatCanCheat || l.GAd.hideBanner("banner2");
l.GAd.showBanner("banner", 0, 0);
c.default.instance.showSudokuN(!1);
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.LeftVertical,
show: !1
} ]);
}
};
t.prototype.clickPVP = function() {
p.GTemporary.needReturnWarehouse = !0;
if (GA.isWeChat()) {
this.wechatCanCheat || l.GAd.hideBanner("banner2");
c.default.instance.showSudokuN(!1);
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.LeftVertical,
show: !1
} ]);
}
cc.systemEvent.emit(EventsName.CloseWarehouse);
this.hide();
y.PopupManager.show(UIPath.MatchPopup);
};
t.prototype.clickPVE = function() {
p.GTemporary.needReturnWarehouse = !0;
if (GA.isWeChat()) {
this.wechatCanCheat || l.GAd.hideBanner("banner2");
c.default.instance.showSudokuN(!1);
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.LeftVertical,
show: !1
} ]);
}
cc.systemEvent.emit(EventsName.CloseWarehouse);
this.hide();
y.PopupManager.show(UIPath.CheckPointPopup);
};
t.prototype.onDestroy = function() {
(GA.isOPPO() || GA.isVivo()) && cc.systemEvent.emit(EventsName.ShowOppoNative, null, !1);
if (GA.isWeChat() && !GA.Info.isPreview && this.wechatCanCheat && this.showCheatBanner) {
c.default.instance.hideBanner("CheatBanner");
GA.PA.offShow(this.onShowCallback);
p.GTemporary.CheatPopup = null;
}
f.MData.save(!1);
};
i([ v(cc.Sprite) ], t.prototype, "spritePart", void 0);
i([ v(cc.Sprite) ], t.prototype, "lastParts", void 0);
i([ v(sp.Skeleton) ], t.prototype, "spineMix", void 0);
i([ v(cc.Node) ], t.prototype, "btnConfirm", void 0);
i([ v(cc.Node) ], t.prototype, "btnPVP", void 0);
i([ v(cc.Node) ], t.prototype, "btnPVE", void 0);
i([ v(cc.Button) ], t.prototype, "btnCheat", void 0);
return i([ g ], t);
}(r.default);
a.default = G;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Config/GConfig": "GConfig",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GBundle": "GBundle",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Global/Global": "Global",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager"
} ],
OperatePart: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "0eee3BxMnRI1YEum0eWU8k5", "OperatePart");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../../Global/GBundle"), s = e("../../Global/Global"), c = e("../../Global/GPool"), l = e("../../Global/GTemporary"), d = e("../../Global/GTool"), h = e("../../Manager/MData"), p = e("../../Manager/PopupManager"), u = cc._decorator, f = u.ccclass, y = u.property, m = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.part = null;
t.levelLabel = null;
t.panel = null;
t.recycleNode = null;
t.picCanMix = null;
t.frameUnpacked = null;
t.mecha = null;
t.spritePart = null;
t.spine = null;
t.partInfo = null;
t.mechaIndex = 1;
t.partPicName = "";
t.maxLevel = 1;
return t;
}
t.prototype.start = function() {
var e = this;
this.node.on(cc.Node.EventType.TOUCH_START, this.onTouchStart, this);
this.node.on(cc.Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
this.node.on(cc.Node.EventType.TOUCH_END, this.onTouchEndOrCancle, this);
this.node.on(cc.Node.EventType.TOUCH_CANCEL, this.onTouchEndOrCancle, this);
cc.systemEvent.on(EventsName.ExchangePart, function(t, a) {
if (e.node && e.node.active && t == e.partInfo.Pos) {
e.partInfo.Pos = a;
e.setPosition();
}
}, this);
cc.systemEvent.on(EventsName.UpgradePart, function(t) {
if (e.node && e.node.active && t == e.partInfo.Pos) {
e.spritePart.spriteFrame = null;
e.refresh();
e.partPicName = h.MData.getPartInfo(e.mechaIndex, e.partInfo.PartIndex).PicName;
e.loadPartPic();
}
}, this);
cc.systemEvent.on(EventsName.TouchPartStart, function(t) {
e.node && e.node.active && t.Pos != e.partInfo.Pos && t.PartIndex == e.partInfo.PartIndex && (e.picCanMix.active = !0);
}, this);
cc.systemEvent.on(EventsName.TouchPartEnd, function() {
e.node && e.node.active && (e.picCanMix.active = !1);
}, this);
cc.systemEvent.on(EventsName.InstallPart, function(t) {
e.node && e.node.active && e.partInfo.PartIndex == t && e.refresh();
}, this);
};
t.prototype.init = function(e, t) {
this.mechaIndex = t;
this.partInfo = e;
this.partPicName = h.MData.getPartInfo(t, e.PartIndex).PicName;
this.maxLevel = h.MData.getPartMaxLevel(t);
this.loadPartPic();
this.refresh();
this.setPosition();
};
t.prototype.loadPartPic = function() {
var e = this, t = "Parts/" + this.mechaIndex.toString() + "/" + this.partPicName;
r.GBundle.GetBundle(r.EBundle.MechaPics).load(t, cc.SpriteFrame, function(t, a) {
if (t) cc.error(t); else {
e.spritePart.spriteFrame = a;
if (e.spritePart.node.width > 80 || e.spritePart.node.height > 80) if (e.spritePart.node.width >= 80 && e.spritePart.node.height >= 80) if (e.spritePart.node.height >= e.spritePart.node.width) {
var o = 80 / e.spritePart.node.height;
e.spritePart.node.height = 80;
e.spritePart.node.width = e.spritePart.node.width * o;
} else {
o = 80 / e.spritePart.node.width;
e.spritePart.node.width = 80;
e.spritePart.node.height = e.spritePart.node.height * o;
} else if (e.spritePart.node.width >= 80 && e.spritePart.node.height < 80) {
o = 80 / e.spritePart.node.width;
e.spritePart.node.width = 80;
e.spritePart.node.height = e.spritePart.node.height * o;
} else if (e.spritePart.node.width < 80 && e.spritePart.node.height >= 80) {
o = 80 / e.spritePart.node.height;
e.spritePart.node.height = 80;
e.spritePart.node.width = e.spritePart.node.width * o;
}
}
});
};
t.prototype.onTouchStart = function(e) {
if (null == l.GTemporary.touchId) {
l.GTemporary.touchId = e.getID();
cc.systemEvent.emit(EventsName.TouchPartStart, {
Pos: this.partInfo.Pos,
PartIndex: this.partInfo.PartIndex,
PicName: this.partPicName
});
this.node.setSiblingIndex(cc.macro.MAX_ZINDEX);
}
};
t.prototype.onTouchMove = function(e) {
if (e.getID() == l.GTemporary.touchId) {
this.spritePart.node.x += e.getDelta().x;
this.spritePart.node.y += e.getDelta().y;
}
};
t.prototype.onTouchEndOrCancle = function(e) {
if (e.getID() == l.GTemporary.touchId) {
l.GTemporary.touchId = null;
cc.systemEvent.emit(EventsName.TouchPartEnd, {
Pos: this.partInfo.Pos,
PartIndex: this.partInfo.PartIndex,
PicName: this.partPicName
});
if (h.MData.checkHavePart(this.mechaIndex, this.partInfo.PartIndex) && this.recycleNode.getBoundingBoxToWorld().contains(e.getLocation())) {
AudioManager.playEffect(AudioName.Recycle);
var t = h.MData.getPartInfo(this.mechaIndex, this.partInfo.PartIndex);
if ("Gold" == h.MData.getMechaData(this.mechaIndex).UnlockWay) {
h.MData.addGold(Math.round(t.Price / 8), !1);
d.GTool.showToast(d.GTool.getLanguage("获得") + Math.round(t.Price / 8) + d.GTool.getLanguage("金币"));
cc.systemEvent.emit(EventsName.GainGold, {
count: t.Price / 8 > 30 ? 30 : t.Price / 2,
endCallback: function() {
cc.systemEvent.emit(EventsName.Refresh);
}
});
} else {
h.MData.addDebris(this.mechaIndex, Math.round(t.Price / 8), !1);
d.GTool.showToast(d.GTool.getLanguage("获得") + Math.round(t.Price / 8) + "碎片");
cc.systemEvent.emit(3 == this.mechaIndex ? EventsName.GainDebris : EventsName.GainDebris_7, {
count: t.Price / 8 > 30 ? 30 : t.Price / 2,
endCallback: function() {
cc.systemEvent.emit(EventsName.Refresh);
}
});
}
h.MData.destroyPart(this.mechaIndex, this.partInfo.Pos);
c.GPool.recycle(c.EPool.Part, this.node);
cc.systemEvent.emit(EventsName.CheckShowBox);
return;
}
if (this.mecha.getBoundingBoxToWorld().contains(e.getLocation())) {
if (h.MData.checkHavePart(this.mechaIndex, this.partInfo.PartIndex)) {
d.GTool.showToast(d.GTool.getLanguage("已安装该部件"));
this.setPosition();
l.GTemporary.touchId = null;
} else {
AudioManager.playEffect(0 == GA.rand(0, 1) ? AudioName.Assemble1 : AudioName.Assemble2);
h.MData.installPart(this.mechaIndex, this.partInfo.PartIndex);
cc.systemEvent.emit(EventsName.InstallPart, this.partInfo.PartIndex);
this.setPosition();
if (l.GTemporary.isShowingNewGuide) {
4 == h.MData.getCurrentPartMaxLevel(this.mechaIndex) && cc.systemEvent.emit(EventsName.FinishGuideInWarehouse);
"Move" == l.GTemporary.newGuideStepInWarehouse && cc.systemEvent.emit(EventsName.ShowNextNewUserGuide);
}
h.MData.save(!1);
}
return;
}
var a = function(t) {
var a = o.panel.children[t];
if (t != o.partInfo.Pos && a.getBoundingBoxToWorld().contains(e.getLocation())) {
var n = h.MData.checkPartPos(o.mechaIndex, t);
if (null == n) {
if (!l.GTemporary.isShowingNewGuide) {
h.MData.changePartPos(o.mechaIndex, o.partInfo.Pos, t);
o.partInfo.Pos = t;
}
} else if (1 != n.Type) ; else if (n.PartIndex != o.partInfo.PartIndex) {
h.MData.exchangePartsPos(o.mechaIndex, o.partInfo.Pos, t);
cc.systemEvent.emit(EventsName.ExchangePart, t, o.partInfo.Pos);
o.partInfo.Pos = t;
} else if (o.partInfo.PartIndex != o.maxLevel) if (h.MData.checkHavePart(o.mechaIndex, o.partInfo.PartIndex)) {
var i = c.GPool.getPart(c.EPool.MixSpine);
i.active = !0;
i.setParent(o.node.parent);
i.setPosition(a.position);
i.setSiblingIndex(cc.macro.MAX_ZINDEX);
s.G.playSpine(i.getComponent(sp.Skeleton), "animation", !1, function() {
c.GPool.recycle(c.EPool.MixSpine, i);
});
if (l.GTemporary.isShowingNewGuide) {
if ("Compound" == l.GTemporary.newGuideStepInWarehouse) {
l.GTemporary.newGuideStepInWarehouse = "Wait";
cc.systemEvent.emit(EventsName.ShowNextNewUserGuide);
}
} else if (h.MData.getCurrentPartMaxLevel(o.mechaIndex) == o.partInfo.PartIndex) {
l.GTemporary.newPartInfo = {
MechaIndex: o.mechaIndex,
PartIndex: o.partInfo.PartIndex + 1
};
p.PopupManager.show(UIPath.NewPartPopup);
}
AudioManager.playEffect(AudioName.Mix);
h.MData.destroyPart(o.mechaIndex, o.partInfo.Pos);
h.MData.upgradePart(o.mechaIndex, t);
cc.systemEvent.emit(EventsName.UpgradePart, t);
c.GPool.recycle(c.EPool.Part, o.node);
cc.systemEvent.emit(EventsName.CheckShowBox);
} else d.GTool.showToast("请先将未安装的零件组装"); else d.GTool.showToast("已合成至最高等级");
return "break-check";
}
}, o = this;
e: for (var n = 0; n < this.panel.childrenCount; n++) switch (a(n)) {
case "break-check":
break e;
}
this.setPosition();
}
};
t.prototype.setPosition = function() {
var e = this.partInfo.Pos % 4, t = Math.floor(this.partInfo.Pos / 4), a = cc.v3(115 * e - 170, 184 - 124 * t);
this.spritePart.node.position = cc.v3();
this.node.setPosition(a);
};
t.prototype.refresh = function() {
this.levelLabel.string = this.partInfo.PartIndex.toString();
this.frameUnpacked.active = !h.MData.checkUnlockPart(this.mechaIndex, this.partInfo.PartIndex);
};
i([ y(cc.Node) ], t.prototype, "part", void 0);
i([ y(cc.Label) ], t.prototype, "levelLabel", void 0);
i([ y(cc.Node) ], t.prototype, "panel", void 0);
i([ y(cc.Node) ], t.prototype, "recycleNode", void 0);
i([ y(cc.Node) ], t.prototype, "picCanMix", void 0);
i([ y(cc.Node) ], t.prototype, "frameUnpacked", void 0);
i([ y(cc.Node) ], t.prototype, "mecha", void 0);
i([ y(cc.Sprite) ], t.prototype, "spritePart", void 0);
i([ y(sp.Skeleton) ], t.prototype, "spine", void 0);
return i([ f ], t);
}(cc.Component);
a.default = m;
cc._RF.pop();
}, {
"../../Global/GBundle": "GBundle",
"../../Global/GPool": "GPool",
"../../Global/GTemporary": "GTemporary",
"../../Global/GTool": "GTool",
"../../Global/Global": "Global",
"../../Manager/MData": "MData",
"../../Manager/PopupManager": "PopupManager"
} ],
PanelPause: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "0635egW8JlH7oMxA8OYce5/", "PanelPause");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePanel"), s = e("../Global/GTemporary"), c = cc._decorator, l = c.ccclass, d = c.property, h = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.spriteMusic = null;
t.picMusic = [];
t.traditionalPicMusic = [];
t.spriteVirbrate = null;
t.picVirbrate = [];
t.traditionalPicVirbrate = [];
return t;
}
t.prototype.start = function() {
if ("Chinese" == s.GTemporary.languageVersion) {
this.spriteMusic.spriteFrame = this.picMusic[AudioManager.audioSwitch ? 0 : 1];
this.spriteVirbrate.spriteFrame = this.picVirbrate[AudioManager.virbrateSwitch ? 0 : 1];
} else {
this.spriteMusic.spriteFrame = this.traditionalPicMusic[AudioManager.audioSwitch ? 0 : 1];
this.spriteVirbrate.spriteFrame = this.traditionalPicVirbrate[AudioManager.virbrateSwitch ? 0 : 1];
}
};
t.prototype.clickAudio = function() {
AudioManager.audioSwitch && AudioManager.playBGMusic(AudioName.BGMBattle, !1);
AudioManager.audioSwitch = !AudioManager.audioSwitch;
AudioManager.audioSwitch && AudioManager.playBGMusic(AudioName.BGMBattle, !0);
"Chinese" == s.GTemporary.languageVersion ? this.spriteMusic.spriteFrame = this.picMusic[AudioManager.audioSwitch ? 0 : 1] : this.spriteMusic.spriteFrame = this.traditionalPicMusic[AudioManager.audioSwitch ? 0 : 1];
};
t.prototype.clickVibrate = function() {
AudioManager.virbrateSwitch = !AudioManager.virbrateSwitch;
"Chinese" == s.GTemporary.languageVersion ? this.spriteVirbrate.spriteFrame = this.picVirbrate[AudioManager.virbrateSwitch ? 0 : 1] : this.spriteVirbrate.spriteFrame = this.traditionalPicVirbrate[AudioManager.virbrateSwitch ? 0 : 1];
};
i([ d(cc.Sprite) ], t.prototype, "spriteMusic", void 0);
i([ d(cc.SpriteFrame) ], t.prototype, "picMusic", void 0);
i([ d(cc.SpriteFrame) ], t.prototype, "traditionalPicMusic", void 0);
i([ d(cc.Sprite) ], t.prototype, "spriteVirbrate", void 0);
i([ d(cc.SpriteFrame) ], t.prototype, "picVirbrate", void 0);
i([ d(cc.SpriteFrame) ], t.prototype, "traditionalPicVirbrate", void 0);
return i([ l ], t);
}(r.default);
a.default = h;
cc._RF.pop();
}, {
"../Base/BasePanel": "BasePanel",
"../Global/GTemporary": "GTemporary"
} ],
PanelProperty: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "130a21dF19Pm4DTUkEWRTK+", "PanelProperty");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) t.hasOwnProperty(a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePanel"), s = e("../Global/GTemporary"), c = e("../Manager/MData"), l = cc._decorator, d = l.ccclass, h = l.property, p = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.labelCountdown = null;
t.picMyHealth = null;
t.picEnemyHealth = null;
t.picMyEnergy = null;
t.picEnemyEnergy = null;
t.spineMyEnergy = null;
t.spineEnemyEnergy = null;
t.spineBtnTransform = null;
t.spineBtnFinalSkill = null;
t.healthWidth = 330;
t.energyWidth = 229;
t.countdownTime = 0;
t.timer = 0;
t.startCountdown = !1;
return t;
}
t.prototype.start = function() {
var e = this;
cc.systemEvent.on(EventsName.StartBattle, function() {
e.picMyHealth.getComponent(cc.Sprite).fillRange = 1;
e.picMyEnergy.getComponent(cc.Sprite).fillRange = s.GTemporary.myData.Energy / 100;
e.picEnemyHealth.getComponent(cc.Sprite).fillRange = 1;
e.picEnemyEnergy.getComponent(cc.Sprite).fillRange = s.GTemporary.enemyData.Energy / 100;
}, this);
cc.systemEvent.on(EventsName.ChooseSkill, function() {
e.labelCountdown.string = "";
e.startCountdown = !1;
}, this);
cc.systemEvent.on(EventsName.GetHurt, function(t) {
t.enemyGetHurt ? e.showEffect(e.picEnemyHealth, s.GTemporary.enemyData.CurrentHealth / s.GTemporary.enemyData.AllHealth) : e.showEffect(e.picMyHealth, s.GTemporary.myData.CurrentHealth / s.GTemporary.myData.AllHealth);
}, this);
cc.systemEvent.on(EventsName.RefresHealth, function(t) {
t ? e.showEffect(e.picMyHealth, s.GTemporary.myData.CurrentHealth / s.GTemporary.myData.AllHealth) : e.showEffect(e.picEnemyHealth, s.GTemporary.enemyData.CurrentHealth / s.GTemporary.enemyData.AllHealth);
}, this);
cc.systemEvent.on(EventsName.RefreshEnergy, function(t) {
t ? e.showEffect(e.picMyEnergy, s.GTemporary.myData.Energy / 100, function() {
e.spineMyEnergy.active = 100 == s.GTemporary.myData.Energy;
100 == s.GTemporary.myData.Energy && c.MData.checkUnlockSkill(s.GTemporary.myData.MechaIndex, 5) && (e.spineBtnFinalSkill.active = !0);
100 == s.GTemporary.myData.Energy && c.MData.checkUnlockSkill(s.GTemporary.myData.MechaIndex, 4) && !s.GTemporary.myData.Awaken && (e.spineBtnTransform.active = !0);
if (100 != s.GTemporary.myData.Energy) {
e.spineBtnFinalSkill.active = !1;
e.spineBtnTransform.active = !1;
}
}) : e.showEffect(e.picEnemyEnergy, s.GTemporary.enemyData.Energy / 100, function() {
e.spineEnemyEnergy.active = 100 == s.GTemporary.enemyData.Energy;
});
}, this);
cc.systemEvent.on(EventsName.Resurgence, function(t) {
t ? e.picMyHealth.getComponent(cc.Sprite).fillRange = 1 : e.picEnemyHealth.getComponent(cc.Sprite).fillRange = 1;
}, this);
cc.systemEvent.on(EventsName.StartChooseSkill, function(t) {
e.labelCountdown.string = t + "";
e.countdownTime = t;
e.timer = 1;
e.startCountdown = !0;
}, this);
};
t.prototype.update = function(e) {
if (this.startCountdown && !s.GTemporary.gamePause) {
this.timer -= e;
if (this.timer <= 0) {
this.countdownTime -= 1;
this.labelCountdown.string = this.countdownTime + "";
this.timer = 1;
if (0 == this.countdownTime) {
this.labelCountdown.string = "";
cc.systemEvent.emit(EventsName.CountDownFinish);
this.startCountdown = !1;
}
}
}
};
t.prototype.showEffect = function(e, t, a, o) {
void 0 === o && (o = .1);
cc.Tween.stopAllByTarget(e);
cc.tween(e.getComponent(cc.Sprite)).to(o, {
fillRange: t
}).call(function() {
a && a();
}).start();
};
i([ h({
type: cc.Label,
displayName: "倒计时Label"
}) ], t.prototype, "labelCountdown", void 0);
i([ h({
type: cc.Node,
displayName: "我方血量"
}) ], t.prototype, "picMyHealth", void 0);
i([ h({
type: cc.Node,
displayName: "敌方血量"
}) ], t.prototype, "picEnemyHealth", void 0);
i([ h({
type: cc.Node,
displayName: "我方能量"
}) ], t.prototype, "picMyEnergy", void 0);
i([ h({
type: cc.Node,
displayName: "敌方能量"
}) ], t.prototype, "picEnemyEnergy", void 0);
i([ h({
type: cc.Node,
displayName: "我方能量spine"
}) ], t.prototype, "spineMyEnergy", void 0);
i([ h({
type: cc.Node,
displayName: "敌方能量spine"
}) ], t.prototype, "spineEnemyEnergy", void 0);
i([ h({
type: cc.Node,
displayName: "变身技能spine"
}) ], t.prototype, "spineBtnTransform", void 0);
i([ h({
type: cc.Node,
displayName: "终极技能spine"
}) ], t.prototype, "spineBtnFinalSkill", void 0);
return i([ d ], t);
}(r.default);
a.default = p;
cc._RF.pop();
}, {
"../Base/BasePanel": "BasePanel",
"../Global/GTemporary": "GTemporary",
"../Manager/MData": "MData"
} ],
PanelRestrain: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "d757frAUQVJ+J67mdXNTr2E", "PanelRestrain");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) t.hasOwnProperty(a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePanel"), s = cc._decorator, c = s.ccclass, l = (s.property, 
function(e) {
n(t, e);
function t() {
return null !== e && e.apply(this, arguments) || this;
}
return i([ c ], t);
}(r.default));
a.default = l;
cc._RF.pop();
}, {
"../Base/BasePanel": "BasePanel"
} ],
PanelRound: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "2f265SLMr5JxKTiD3MYLAY9", "PanelRound");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r, s = e("../Base/BasePanel"), c = e("../Global/GBundle"), l = e("../Global/GTemporary");
(function(e) {
e[e.StartBattle = 0] = "StartBattle";
e[e.Round = 1] = "Round";
e[e.Restrain = 2] = "Restrain";
})(r || (r = {}));
var d = cc._decorator, h = d.ccclass, p = d.property, u = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.labelRound = null;
t.picBattleStart = null;
t.picMySkill = null;
t.picEnemySkill = null;
t.picEqual = null;
t.picRestrain = null;
t.spriteRestrains = [];
t.spriteSkills = [];
t.panelFrame = null;
t.skillPicMap = new Map();
t.aniList = [];
t.isShowingAni = !1;
return t;
}
t.prototype.start = function() {
var e = this;
this.labelRound.node.active = !1;
this.picBattleStart.active = !1;
this.panelFrame.active = !1;
this.picMySkill.active = !1;
this.picEnemySkill.active = !1;
this.picEqual.active = !1;
this.picRestrain.active = !1;
cc.systemEvent.on(EventsName.RoundStart, function() {
e.showAni(r.Round);
}, this);
cc.systemEvent.on(EventsName.StartBattle, function() {
e.showAni(r.StartBattle);
}, this);
cc.systemEvent.on(EventsName.ShowRestrain, function() {
e.picMySkill.getComponent(cc.Sprite).spriteFrame = l.GTemporary.myData.SkillIndex <= 4 ? e.spriteSkills[l.GTemporary.myData.SkillIndex] : null;
e.picEnemySkill.getComponent(cc.Sprite).spriteFrame = l.GTemporary.enemyData.SkillIndex <= 4 ? e.spriteSkills[l.GTemporary.enemyData.SkillIndex] : null;
var t = 5 != l.GTemporary.myData.SkillIndex ? l.GTemporary.myData.MechaIndex + "_" + l.GTemporary.myData.SkillIndex : "BtnTransform", a = 5 != l.GTemporary.enemyData.SkillIndex ? l.GTemporary.enemyData.MechaIndex + "_" + l.GTemporary.enemyData.SkillIndex : "BtnTransform";
0 == l.GTemporary.enemyData.MechaIndex && 0 == l.GTemporary.enemyData.SkillIndex && (a = "0_0");
if (e.skillPicMap.has(t)) e.picMySkill.getChildByName("PicSkill").getComponent(cc.Sprite).spriteFrame = e.skillPicMap.get(t); else {
var o = "Skill/" + t;
e.picMySkill.getChildByName("PicSkill").getComponent(cc.Sprite).spriteFrame = null;
c.GBundle.GetBundle(c.EBundle.MechaPics).load(o, cc.SpriteFrame, function(a, o) {
if (a) cc.error(a); else {
e.skillPicMap.set(t, o);
e.picMySkill.getChildByName("PicSkill").getComponent(cc.Sprite).spriteFrame = o;
}
});
}
if (e.skillPicMap.has(a)) e.picEnemySkill.getChildByName("PicSkill").getComponent(cc.Sprite).spriteFrame = e.skillPicMap.get(a); else {
var n = "Skill/" + a;
e.picEnemySkill.getChildByName("PicSkill").getComponent(cc.Sprite).spriteFrame = null;
c.GBundle.GetBundle(c.EBundle.MechaPics).load(n, cc.SpriteFrame, function(t, o) {
if (t) cc.error(t); else {
e.skillPicMap.set(a, o);
e.picEnemySkill.getChildByName("PicSkill").getComponent(cc.Sprite).spriteFrame = o;
}
});
}
e.showAni(r.Restrain);
}, this);
};
t.prototype.showAni = function(e) {
var t = this;
if (this.isShowingAni) this.aniList.push(e); else {
this.isShowingAni = !0;
switch (e) {
case r.Round:
this.labelRound.string = l.GTemporary.round.toString();
cc.tween(this.labelRound.node).set({
active: !0,
x: -300,
opacity: 100
}).to(.15, {
x: 0,
opacity: 255
}).delay(.6).to(.15, {
x: 300,
opacity: 100
}).call(function() {
cc.systemEvent.emit(EventsName.StartChooseSkill, 15);
l.GTemporary.isShowingNewGuide && cc.systemEvent.emit(EventsName.ShowNewUserGuideInFight);
t.isShowingAni = !1;
if (t.aniList.length > 0) {
var e = t.aniList.shift();
t.showAni(e);
}
}).set({
active: !1
}).start();
break;

case r.Restrain:
cc.tween(this.picMySkill).set({
active: !0,
x: -180,
scale: 3
}).to(.2, {
scale: 1
}, {
easing: cc.easing.backOut
}).start();
cc.tween(this.picEnemySkill).set({
active: !0,
x: 180,
scale: 3
}).to(.2, {
scale: 1
}, {
easing: cc.easing.backOut
}).call(function() {
if ("Equal" == l.GTemporary.currentRestrain) cc.tween(t.picEqual).set({
active: !0,
x: 0
}).delay(.8).call(function() {
t.picMySkill.active = !1;
t.picEnemySkill.active = !1;
t.picEqual.active = !1;
t.picRestrain.active = !1;
t.isShowingAni = !1;
if (t.aniList.length > 0) {
var e = t.aniList.shift();
t.showAni(e);
}
}).start(); else {
t.picRestrain.getComponent(cc.Sprite).spriteFrame = t.spriteRestrains["Me" == l.GTemporary.currentRestrain ? 0 : 1];
cc.tween(t.picRestrain).set({
active: !0,
x: 0
}).delay(.8).call(function() {
t.picMySkill.active = !1;
t.picEnemySkill.active = !1;
t.picEqual.active = !1;
t.picRestrain.active = !1;
t.isShowingAni = !1;
if (t.aniList.length > 0) {
var e = t.aniList.shift();
t.showAni(e);
}
}).start();
}
}).start();
break;

case r.StartBattle:
cc.tween(this.picBattleStart).set({
scale: 2,
active: !0
}).to(.3, {
scale: 1
}, {
easing: cc.easing.bounceOut
}).delay(.2).call(function() {
t.panelFrame.active = !0;
}).delay(1).call(function() {
t.isShowingAni = !1;
if (t.aniList.length > 0) {
var e = t.aniList.shift();
t.showAni(e);
}
t.picBattleStart.active = !1;
t.panelFrame.active = !1;
}).start();
}
}
};
i([ p({
type: cc.Label,
displayName: "回合Label"
}) ], t.prototype, "labelRound", void 0);
i([ p({
type: cc.Node,
displayName: "游戏开始Panel"
}) ], t.prototype, "picBattleStart", void 0);
i([ p({
type: cc.Node,
displayName: "我方技能"
}) ], t.prototype, "picMySkill", void 0);
i([ p({
type: cc.Node,
displayName: "敌方技能"
}) ], t.prototype, "picEnemySkill", void 0);
i([ p({
type: cc.Node,
displayName: "相等图片"
}) ], t.prototype, "picEqual", void 0);
i([ p({
type: cc.Node,
displayName: "克制图片"
}) ], t.prototype, "picRestrain", void 0);
i([ p({
type: cc.SpriteFrame,
displayName: "克制图片"
}) ], t.prototype, "spriteRestrains", void 0);
i([ p({
type: cc.SpriteFrame,
displayName: "技能背景图片"
}) ], t.prototype, "spriteSkills", void 0);
i([ p({
type: cc.Node,
displayName: "底图"
}) ], t.prototype, "panelFrame", void 0);
return i([ h ], t);
}(s.default);
a.default = u;
cc._RF.pop();
}, {
"../Base/BasePanel": "BasePanel",
"../Global/GBundle": "GBundle",
"../Global/GTemporary": "GTemporary"
} ],
PanelSkill: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "6ee05zDErxD2KqqPxs5SX3B", "PanelSkill");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePanel"), s = e("../Global/GBundle"), c = e("../Global/GTemporary"), l = e("../Global/GTool"), d = e("../Manager/MData"), h = e("../Manager/PopupManager"), p = cc._decorator, u = p.ccclass, f = p.property, y = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.btnSkills = [];
t.btnAwaken = null;
t.videoUnlockedSkills = [];
return t;
}
t.prototype.start = function() {
var e = this;
if (!GA.Info.isPreview) {
console.log("safeArea:", l.GTool.Info.SystemInfo.safeArea);
this.scheduleOnce(function() {
if (l.GTool.Info.SystemInfo.safeArea) {
e.node.getComponent(cc.Widget).left = l.GTool.Info.SystemInfo.safeArea.left;
e.node.getComponent(cc.Widget).updateAlignment();
} else {
e.node.getComponent(cc.Widget).left = 40;
e.node.getComponent(cc.Widget).updateAlignment();
}
});
}
this.btnAwaken.node.active = 3 != c.GTemporary.myData.MechaIndex && 7 != c.GTemporary.myData.MechaIndex;
cc.systemEvent.on(EventsName.StartBattle, function() {
for (var t = function(t) {
e.btnSkills[t].off("click");
e.btnSkills[t].on("click", function() {
e.clickChooseSkill(t);
});
}, a = 0; a < 5; a++) t(a);
e.btnAwaken.node.on("click", function() {
e.clickChooseSkill(5);
});
e.refresh();
}, this);
this.setButtonCanTouch(!1);
cc.systemEvent.on(EventsName.StartChooseSkill, function() {
e.refresh();
e.setButtonCanTouch(!0);
}, this);
this.btnSkills.forEach(function(t, a) {
var o = "Skill/" + c.GTemporary.myData.MechaIndex + "_" + a;
s.GBundle.GetBundle(s.EBundle.MechaPics).load(o, cc.SpriteFrame, function(a, o) {
a ? cc.error(a) : e.node && t && (t.getComponent(cc.Sprite).spriteFrame = o);
});
});
cc.systemEvent.on(EventsName.RefreshSkill, function() {
e.refresh();
}, this);
cc.systemEvent.on(EventsName.NewUserClickAwaken, function() {
e.refresh();
}, this);
cc.systemEvent.on(EventsName.CountDownFinish, function() {
e.setButtonCanTouch(!1);
}, this);
};
t.prototype.refresh = function() {
if (c.GTemporary.isShowingNewGuide && "ClickAwaken" == c.GTemporary.newGuideStepInFightA) {
for (var e = 0; e < 5; e++) {
this.btnSkills[e].parent.getChildByName("Reward").active = !1;
this.btnSkills[e].parent.getChildByName("Lock").active = !1;
}
this.btnAwaken.node.getChildByName("Reward").active = !1;
this.btnAwaken.node.getChildByName("Lock").active = !1;
} else {
for (e = 0; e < 5; e++) {
this.btnSkills[e].parent.getChildByName("Reward").active = !c.GTemporary.tryOutMecha && !d.MData.checkUnlockSkillInFight(e);
this.btnSkills[e].parent.getChildByName("Lock").active = !c.GTemporary.tryOutMecha && !d.MData.checkUnlockSkillInFight(e);
}
this.btnAwaken.node.getChildByName("Reward").active = !c.GTemporary.tryOutMecha && !d.MData.checkUnlockSkillInFight(5);
this.btnAwaken.node.getChildByName("Lock").active = !c.GTemporary.tryOutMecha && !d.MData.checkUnlockSkillInFight(5);
d.MData.checkUnlockSkillInFight(4) && (this.btnSkills[4].parent.getChildByName("Reward").active = c.GTemporary.myData.Energy < 100);
d.MData.checkUnlockSkillInFight(5) && (this.btnAwaken.node.getChildByName("Reward").active = c.GTemporary.myData.Energy < 100);
}
if (c.GTemporary.isShowingNewGuide && "New" == c.GTemporary.newGuideType) {
for (e = 0; e < 5; e++) {
this.btnSkills[e].parent.getChildByName("Reward").active = !1;
this.btnSkills[e].parent.getChildByName("Lock").active = !1;
}
this.btnAwaken.node.getChildByName("Reward").active = !1;
this.btnAwaken.node.getChildByName("Lock").active = !1;
}
};
t.prototype.clickChooseSkill = function(e) {
var t = this;
AudioManager.vibrateShort({});
console.log(c.GTemporary.newGuideStepInFightA);
if (c.GTemporary.isShowingNewGuide) {
console.log("新手引导点击技能:", e);
c.GTemporary.myData.SkillIndex = e;
cc.systemEvent.emit(EventsName.ChooseSkill);
this.setButtonCanTouch(!1);
if ("WaitForClickAwaken" == c.GTemporary.newGuideStepInFightA) {
c.GTemporary.newGuideStepInFightA = "Finish";
"Old" == c.GTemporary.newGuideType && (c.GTemporary.isShowingNewGuide = !1);
this.refresh();
}
} else if (c.GTemporary.tryOutMecha || d.MData.checkUnlockSkillInFight(e)) if (4 == e || 5 == e) if (100 == c.GTemporary.myData.Energy) {
c.GTemporary.myData.Energy = 0;
c.GTemporary.myData.SkillIndex = e;
cc.systemEvent.emit(EventsName.ChooseSkill);
this.setButtonCanTouch(!1);
} else GA.rewardOperation({
tag: RewardType.TryoutSkill,
byVideo: l.GTool.isNextRewardVideo(RewardType.TryoutSkill),
page: "Fight",
result: function(a) {
if (a.reward) {
5 == e ? t.btnAwaken.node.getChildByName("Reward").active = !1 : t.btnSkills[e].parent.getChildByName("Reward").active = !1;
c.GTemporary.myData.SkillIndex = e;
cc.systemEvent.emit(EventsName.ChooseSkill);
t.setButtonCanTouch(!1);
}
}
}); else {
c.GTemporary.myData.SkillIndex = e;
cc.systemEvent.emit(EventsName.ChooseSkill);
this.setButtonCanTouch(!1);
} else GA.rewardOperation({
tag: RewardType.TryoutSkill,
byVideo: l.GTool.isNextRewardVideo(RewardType.TryoutSkill),
page: "Fight",
result: function(a) {
if (a.reward) {
5 == e ? t.btnAwaken.node.getChildByName("Reward").active = !1 : t.btnSkills[e].parent.getChildByName("Reward").active = !1;
c.GTemporary.myData.SkillIndex = e;
cc.systemEvent.emit(EventsName.ChooseSkill);
t.setButtonCanTouch(!1);
}
}
});
};
t.prototype.setButtonCanTouch = function(e) {
this.btnSkills.forEach(function(t) {
t.getComponent(cc.Button).interactable = e;
});
this.btnAwaken.interactable = e && !c.GTemporary.myData.Awaken;
};
t.prototype.clickRestrain = function() {
if (!c.GTemporary.isShowingNewGuide) {
h.PopupManager.show(UIPath.RestrainPopup);
cc.systemEvent.emit(EventsName.PauseGame, !0);
}
};
i([ f(cc.Node) ], t.prototype, "btnSkills", void 0);
i([ f(cc.Button) ], t.prototype, "btnAwaken", void 0);
return i([ u ], t);
}(r.default);
a.default = y;
cc._RF.pop();
}, {
"../Base/BasePanel": "BasePanel",
"../Global/GBundle": "GBundle",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager"
} ],
PopupManager: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "92f6aq6Sb9Hvo8acs7qif7o", "PopupManager");
var o = this && this.__awaiter || function(e, t, a, o) {
return new (a || (a = Promise))(function(n, i) {
function r(e) {
try {
c(o.next(e));
} catch (e) {
i(e);
}
}
function s(e) {
try {
c(o.throw(e));
} catch (e) {
i(e);
}
}
function c(e) {
e.done ? n(e.value) : (t = e.value, t instanceof a ? t : new a(function(e) {
e(t);
})).then(r, s);
var t;
}
c((o = o.apply(e, t || [])).next());
});
}, n = this && this.__generator || function(e, t) {
var a, o, n, i, r = {
label: 0,
sent: function() {
if (1 & n[0]) throw n[1];
return n[1];
},
trys: [],
ops: []
};
return i = {
next: s(0),
throw: s(1),
return: s(2)
}, "function" == typeof Symbol && (i[Symbol.iterator] = function() {
return this;
}), i;
function s(e) {
return function(t) {
return c([ e, t ]);
};
}
function c(i) {
if (a) throw new TypeError("Generator is already executing.");
for (;r; ) try {
if (a = 1, o && (n = 2 & i[0] ? o.return : i[0] ? o.throw || ((n = o.return) && n.call(o), 
0) : o.next) && !(n = n.call(o, i[1])).done) return n;
(o = 0, n) && (i = [ 2 & i[0], n.value ]);
switch (i[0]) {
case 0:
case 1:
n = i;
break;

case 4:
r.label++;
return {
value: i[1],
done: !1
};

case 5:
r.label++;
o = i[1];
i = [ 0 ];
continue;

case 7:
i = r.ops.pop();
r.trys.pop();
continue;

default:
if (!(n = r.trys, n = n.length > 0 && n[n.length - 1]) && (6 === i[0] || 2 === i[0])) {
r = 0;
continue;
}
if (3 === i[0] && (!n || i[1] > n[0] && i[1] < n[3])) {
r.label = i[1];
break;
}
if (6 === i[0] && r.label < n[1]) {
r.label = n[1];
n = i;
break;
}
if (n && r.label < n[2]) {
r.label = n[2];
r.ops.push(i);
break;
}
n[2] && r.ops.pop();
r.trys.pop();
continue;
}
i = t.call(e, r);
} catch (e) {
i = [ 6, e ];
o = 0;
} finally {
a = n = 0;
}
if (5 & i[0]) throw i[1];
return {
value: i[0] ? i[1] : void 0,
done: !0
};
}
};
Object.defineProperty(a, "__esModule", {
value: !0
});
a.PopupCloseWay = a.PopupOpenWay = a.PopupCacheMode = a.PopupShowResult = a.PopupManager = void 0;
var i, r, s, c, l = e("../Base/BasePopup"), d = function() {
function e() {}
Object.defineProperty(e, "prefabMap", {
get: function() {
return this._prefabMap;
},
enumerable: !1,
configurable: !0
});
Object.defineProperty(e, "nodeMap", {
get: function() {
return this._nodeMap;
},
enumerable: !1,
configurable: !0
});
Object.defineProperty(e, "queue", {
get: function() {
return this._queue;
},
enumerable: !1,
configurable: !0
});
Object.defineProperty(e, "current", {
get: function() {
return this._current;
},
enumerable: !1,
configurable: !0
});
e.show = function(t, a, d, h, p) {
var u = this;
void 0 === a && (a = r.Once);
void 0 === d && (d = !1);
void 0 === h && (h = s.Bigger);
void 0 === p && (p = c.Smaller);
return new Promise(function(r) {
return o(u, void 0, void 0, function() {
var s, c, d, u = this;
return n(this, function(f) {
switch (f.label) {
case 0:
this._current = {
path: t,
cacheMode: a,
openMode: h,
closeMode: p
};
s = this.getNodeFromCache(t);
if (cc.isValid(s)) return [ 3, 2 ];
e.loadStartCallback = function() {
try {
GA.isAndroid() || GA.PA.showLoading({
title: "界面努力加载中",
mask: !0
});
} catch (e) {}
};
this.loadStartCallback && this.loadStartCallback();
return [ 4, this.load(t) ];

case 1:
c = f.sent();
e.loadFinishCallback = function() {
try {
GA.isAndroid() || GA.PA.hideLoading({});
} catch (e) {}
};
this.loadFinishCallback && this.loadFinishCallback();
if (!cc.isValid(c)) {
cc.warn("PopupManager LoadError:" + t);
this._current = null;
r(i.Fail);
return [ 2 ];
}
s = cc.instantiate(c);
f.label = 2;

case 2:
s.setParent(cc.Canvas.instance.node);
s.setSiblingIndex(cc.macro.MAX_ZINDEX);
if (d = s.getComponent(l.default)) {
d.setFinishCallback(function() {
return o(u, void 0, void 0, function() {
var e = this;
return n(this, function(o) {
switch (o.label) {
case 0:
this.lockedForNext = this._queue.length > 0;
this.recycle(t, s, a);
this._current = null;
r(i.Done);
return [ 4, new Promise(function(t) {
cc.Canvas.instance.scheduleOnce(t, e.interval);
}) ];

case 1:
o.sent();
this.next();
return [ 2 ];
}
});
});
});
d.show(h);
} else {
s.active = !1;
r(i.Directly);
}
return [ 2 ];
}
});
});
});
};
e.hideCurrent = function() {
if (this._current.popup) this._current.popup.hide(); else if (this._current.node) {
this._current.node.destroy();
this.release(this._current.path);
this._current = null;
}
};
e.recycle = function(e, t, a) {
switch (a) {
case r.Once:
t.destroy();
this._nodeMap.has(e) && this._nodeMap.delete(e);
this.release(e);
break;

case r.Normal:
t.destroy();
this._nodeMap.has(e) && this._nodeMap.delete(e);
break;

case r.Frequent:
t.removeFromParent(!1);
this._nodeMap.has(e) || this._nodeMap.set(e, t);
}
};
e.load = function(e) {
var t = this;
return new Promise(function(a) {
t.popupsBundle.load(e, function(o, n) {
if (o) a(null); else {
n.addRef();
t._prefabMap.set(e, n);
a(n);
}
});
});
};
e.release = function(e) {
var t = this._nodeMap.get(e);
if (t) {
this._nodeMap.delete(e);
cc.isValid(t) && t.destroy();
t = null;
}
var a = this._prefabMap.get(e);
if (a) {
this._prefabMap.delete(e);
a.decRef();
a = null;
}
};
e.next = function() {
if (!this._current && 0 !== this._queue.length) {
var e = this._queue.shift();
this.lockedForNext = !1;
this.show(e.path, e.cacheMode);
}
};
e.push = function(e, t, a, o, n) {
void 0 === t && (t = r.Once);
void 0 === a && (a = !1);
void 0 === o && (o = s.Bigger);
void 0 === n && (n = c.Smaller);
this._current || this.lockedForNext ? a ? this._queue.unshift({
path: e,
cacheMode: t,
openMode: o,
closeMode: n
}) : this._queue.push({
path: e,
cacheMode: t,
openMode: o,
closeMode: n
}) : this.show(e, t);
};
e.getNodeFromCache = function(e) {
if (this._nodeMap.has(e)) {
var t = this._nodeMap.get(e);
if (cc.isValid(t)) return t;
this._nodeMap.delete(e);
}
if (this._prefabMap.has(e)) {
var a = this._prefabMap.get(e);
if (cc.isValid(a)) return cc.instantiate(a);
this._prefabMap.delete(e);
}
return null;
};
e._prefabMap = new Map();
e._nodeMap = new Map();
e._queue = [];
e._current = null;
e.lockedForNext = !1;
e.container = null;
e.interval = .1;
e.loadStartCallback = null;
e.loadFinishCallback = null;
e.popupsBundle = null;
return e;
}();
a.PopupManager = d;
(function(e) {
e[e.Done = 1] = "Done";
e[e.Fail = 2] = "Fail";
e[e.Wait = 3] = "Wait";
e[e.Directly = 4] = "Directly";
})(i = a.PopupShowResult || (a.PopupShowResult = {}));
(function(e) {
e[e.Once = 1] = "Once";
e[e.Normal = 2] = "Normal";
e[e.Frequent = 3] = "Frequent";
})(r = a.PopupCacheMode || (a.PopupCacheMode = {}));
(function(e) {
e[e.MoveFromLeft = 0] = "MoveFromLeft";
e[e.MoveFromRight = 1] = "MoveFromRight";
e[e.MoveFromTop = 2] = "MoveFromTop";
e[e.MoveFromBottom = 3] = "MoveFromBottom";
e[e.Bigger = 4] = "Bigger";
e[e.FadeIn = 5] = "FadeIn";
})(s = a.PopupOpenWay || (a.PopupOpenWay = {}));
(function(e) {
e[e.MoveToLeft = 0] = "MoveToLeft";
e[e.MoveToRight = 1] = "MoveToRight";
e[e.MoveToTop = 2] = "MoveToTop";
e[e.MoveToBottom = 3] = "MoveToBottom";
e[e.Smaller = 4] = "Smaller";
e[e.FadeAway = 5] = "FadeAway";
e[e.Hide = 6] = "Hide";
})(c = a.PopupCloseWay || (a.PopupCloseWay = {}));
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup"
} ],
RankFinishRewardPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "05725kyLHxOOZUFEaXRhYKq", "RankFinishRewardPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Global/Global"), c = e("../Global/GTemporary"), l = e("../Global/GTool"), d = e("../Manager/MData"), h = cc._decorator, p = h.ccclass, u = h.property, f = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.labelTopic = null;
t.spine = null;
t.spriteRank = null;
t.picRanks = [];
t.spriteRankName = null;
t.picRankNames = [];
t.hideNodes = [];
t.season = 0;
t.canClickClose = !1;
return t;
}
t.prototype.start = function() {
var e = this, t = 3;
d.MData.userData.accountData.RankInfo.forEach(function(a) {
if (a.Season < c.GTemporary.currentSeason && a.MaxRank >= 3 && !d.MData.userData.accountData.GetRewardSeasons.includes(a.Season)) {
e.season = a.Season;
t = a.MaxRank;
}
});
this.labelTopic.string = "S" + this.season + "赛季结算";
this.spriteRank.spriteFrame = this.picRanks[t];
this.spriteRankName.spriteFrame = this.picRankNames[t];
s.G.playSpine(this.spine, "chuxian", !1, function() {
e.hideNodes.forEach(function(e) {
e.active = !0;
});
e.canClickClose = !0;
s.G.playSpine(e.spine, "xunhuan", !0, null);
});
};
t.prototype.clickClose = function() {
if (this.canClickClose) {
l.GTool.sendBtnEvent("关闭赛季结算");
d.MData.addDebris(7, 5);
l.GTool.showToast("恭喜获得绝地机械武士碎片X5");
d.MData.userData.accountData.GetRewardSeasons.push(this.season);
e.prototype.clickClose.call(this);
}
};
i([ u(cc.Label) ], t.prototype, "labelTopic", void 0);
i([ u(sp.Skeleton) ], t.prototype, "spine", void 0);
i([ u(cc.Sprite) ], t.prototype, "spriteRank", void 0);
i([ u(cc.SpriteFrame) ], t.prototype, "picRanks", void 0);
i([ u(cc.Sprite) ], t.prototype, "spriteRankName", void 0);
i([ u(cc.SpriteFrame) ], t.prototype, "picRankNames", void 0);
i([ u(cc.Node) ], t.prototype, "hideNodes", void 0);
return i([ p ], t);
}(r.default);
a.default = f;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Global/Global": "Global",
"../Manager/MData": "MData"
} ],
RankHistoryPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "228b0lkFbtDVoyKiXfrT+kQ", "RankHistoryPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Global/GTemporary"), c = e("../Global/GTool"), l = e("../Manager/MData"), d = cc._decorator, h = d.ccclass, p = d.property, u = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.item = null;
t.content = null;
t.picCurrentSeason = null;
t.picRanks = [];
t.picRankNames = [];
return t;
}
t.prototype.start = function() {
var e = this;
l.MData.userData.accountData.RankInfo.sort(function(e, t) {
return t.Season - e.Season;
});
l.MData.userData.accountData.RankInfo.forEach(function(t) {
var a = cc.instantiate(e.item);
a.active = !0;
a.setParent(e.content);
t.Season == s.GTemporary.currentSeason && (a.getComponent(cc.Sprite).spriteFrame = e.picCurrentSeason);
a.getChildByName("LabelCurrentSeason").active = t.Season == s.GTemporary.currentSeason;
a.getChildByName("LabelSeason").getComponent(cc.Label).string = "S" + t.Season + "赛季";
a.getChildByName("PicRank").getComponent(cc.Sprite).spriteFrame = e.picRanks[t.MaxRank];
a.getChildByName("PicRankName").getComponent(cc.Sprite).spriteFrame = e.picRankNames[t.MaxRank];
});
};
t.prototype.clickClose = function() {
c.GTool.sendBtnEvent("关闭历史段位");
AudioManager.playEffect(AudioName.BtnClose);
e.prototype.clickClose.call(this);
};
i([ p(cc.Node) ], t.prototype, "item", void 0);
i([ p(cc.Node) ], t.prototype, "content", void 0);
i([ p(cc.SpriteFrame) ], t.prototype, "picCurrentSeason", void 0);
i([ p(cc.SpriteFrame) ], t.prototype, "picRanks", void 0);
i([ p(cc.SpriteFrame) ], t.prototype, "picRankNames", void 0);
return i([ h ], t);
}(r.default);
a.default = u;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Manager/MData": "MData"
} ],
RankItem: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "57436wrWpxAzpt1h+DYmeP6", "RankItem");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Manager/MData"), s = cc._decorator, c = s.ccclass, l = s.property, d = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.labelRank = null;
t.labelName = null;
t.labelRankName = null;
t.stars = null;
t.kingStars = null;
t.spriteHeadPic = null;
t.index = 0;
return t;
}
t.prototype.init = function(e) {
var t = this;
this.labelRank && (this.labelRank.string = (e.rank + 1).toString());
var a = e.nickname;
a = "" == a || null == a ? "游客" : a.length > 4 ? a.substring(0, 4) + ".." : a;
this.labelName.string = a;
var o = r.MData.getRankByStar(e.score);
this.stars.active = 6 != o.rankIndex;
this.kingStars.active = 6 == o.rankIndex;
this.labelRankName.string = o.rankName;
if (6 == o.rankIndex) this.kingStars.getComponentInChildren(cc.Label).string = "X" + o.star; else for (var n = r.MData.getUpgradeRankCondition(o.rankIndex), i = 0; i < 6; i++) {
this.stars.children[i].active = i < n;
i < n && (this.stars.children[i].children[0].active = i < o.star);
}
e.headpic && !GA.Info.isPreview && cc.assetManager.loadRemote(e.headpic, {
ext: ".png",
cacheEnabled: !1
}, function(e, a) {
e ? cc.error(e) : t.spriteHeadPic && t.node && (t.spriteHeadPic.spriteFrame = new cc.SpriteFrame(a));
});
};
i([ l(cc.Label) ], t.prototype, "labelRank", void 0);
i([ l(cc.Label) ], t.prototype, "labelName", void 0);
i([ l(cc.Label) ], t.prototype, "labelRankName", void 0);
i([ l(cc.Node) ], t.prototype, "stars", void 0);
i([ l(cc.Node) ], t.prototype, "kingStars", void 0);
i([ l(cc.Sprite) ], t.prototype, "spriteHeadPic", void 0);
return i([ c ], t);
}(cc.Component);
a.default = d;
cc._RF.pop();
}, {
"../Manager/MData": "MData"
} ],
RankListPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "bf1b20vSLdG8pHF27goAy3F", "RankListPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../GameLogic"), c = e("../Global/GAd"), l = e("../Global/GTemporary"), d = e("../Global/GTool"), h = e("../Manager/MData"), p = e("../Manager/PopupManager"), u = e("../Part/RankItem"), f = cc._decorator, y = f.ccclass, m = f.property, g = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.rankItem = null;
t.content = null;
t.list = null;
t.view = null;
t.lastListY = 0;
t.topMax = 0;
t.bottomMax = 0;
t.spacingY = 0;
t.itemHeight = 69;
t.rowItemCounts = 10;
t.rankItems = [];
t.rankInfos = [];
t.topRankItems = [];
t.mineRank = 0;
t.spriteMyRank = null;
t.picRanks = [];
t.spriteMyRankName = null;
t.picRankNames = [];
t.stars = null;
t.kingStars = null;
t.labelMyRank = null;
t.labelLeftDay = null;
t.labelCurrentSeason = null;
return t;
}
t.prototype.start = function() {
var e = this;
GA.isWeChat() && c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.Main,
show: !1
} ]);
this.labelCurrentSeason.string = "S" + l.GTemporary.currentSeason + "赛季";
var t = new Date();
t.setFullYear(2022);
t.setMonth(0);
t.setDate(17);
t.setHours(0);
t.setMinutes(0);
t.setSeconds(0);
var a = t.getTime(), o = Date.now(), n = Math.floor((o - a) / 864e5);
this.labelLeftDay.string = (14 * l.GTemporary.currentSeason - n).toString();
this.showMyData();
GA.request({
url: Urls.url_saveRank,
data: {
userid: GA.Info.uid,
score: h.MData.getRankScore(),
nickname: h.MData.userData.userData.nickName,
headicon: h.MData.userData.userData.avatarUrl
},
method: "POST",
success: function(t) {
console.log("Save Rank Data Success:", t);
e.node && GA.request({
url: Urls.url_getRank,
data: {
openid: GA.Info.openId,
excludeHeadIcon: 1
},
method: "POST",
success: function(t) {
console.log("Get Rank Data Success:", t);
e.node && e.initRank(t.data.data);
},
fail: function(e) {
console.log("Get Rank Data Fail:", e);
}
});
},
fail: function(e) {
console.log("Get Rank Data Fail:", e);
}
});
console.log("???", l.GTemporary.currentSeason);
console.log(h.MData.userData.accountData.RankInfo);
this.checkCanShowSeasonFinishReward() && p.PopupManager.show(UIPath.RankFinishRewardPopup);
};
t.prototype.checkCanShowSeasonFinishReward = function() {
var e = !1;
h.MData.userData.accountData.RankInfo.forEach(function(t) {
t.Season < l.GTemporary.currentSeason && t.MaxRank >= 3 && !h.MData.userData.accountData.GetRewardSeasons.includes(t.Season) && (e = !0);
});
return e;
};
t.prototype.showMyData = function() {
var e = h.MData.getRankInfo();
this.spriteMyRank.spriteFrame = this.picRanks[e.Rank];
this.spriteMyRankName.spriteFrame = this.picRankNames[e.Rank];
if (e.Rank == h.MData.getMaxRank() - 1) {
this.stars.active = !1;
this.kingStars.active = !0;
this.kingStars.getComponentInChildren(cc.Label).string = "X" + e.Stars;
} else {
this.stars.active = !0;
this.kingStars.active = !1;
var t = h.MData.getUpgradeRankCondition(e.Rank), a = this.stars.childrenCount;
if (a < t) for (var o = t - a, n = 0; n < o; n++) {
var i = cc.instantiate(this.stars.children[0]);
i.active = !0;
i.setParent(this.stars);
}
for (n = 0; n < this.stars.childrenCount; n++) if (this.stars.children[n]) if (n < t) {
this.stars.children[n].active = !0;
this.stars.children[n].children[0].active = n < e.Stars;
} else this.stars.children[n].active = !1;
}
};
t.prototype.initRank = function(e) {
this.mineRank = e.userRank.rank;
this.labelMyRank.string = this.mineRank > 100 ? "100+" : (this.mineRank + 1).toString();
this.rankInfos = [];
if (e.rankList.length <= 3) for (var t = 0; t < 3; t++) t < e.rankList.length ? this.topRankItems[t].init({
nickname: e.rankList[t].nickname,
headpic: e.rankList[t].headpic,
score: e.rankList[t].score,
rank: t
}, this.mineRank == t) : this.topRankItems[t].node.active = !1; else {
for (t = 0; t < 3; t++) this.topRankItems[t].init({
nickname: e.rankList[t].nickname,
headpic: e.rankList[t].headpic,
score: e.rankList[t].score,
rank: t
}, this.mineRank == t);
for (t = 3; t < e.rankList.length; t++) this.rankInfos.push({
nickname: e.rankList[t].nickname,
headpic: e.rankList[t].headpic,
score: e.rankList[t].score,
rank: t
});
var a = this.content.childrenCount;
this.rowItemCounts = 10 + Math.ceil(this.view.height / (this.itemHeight + this.spacingY));
for (var o = 0; o < this.rowItemCounts; o++) if (o < this.rankInfos.length) {
var n = null;
if (o < a) n = this.content.children[o].getComponent(u.default); else {
n = cc.instantiate(this.rankItem).getComponent(u.default);
this.rankItems.push(n.getComponent(u.default));
}
n.node.parent = this.content;
n.node.active = !0;
var i = n.getComponent(u.default);
i.index = o;
i.init(this.rankInfos[o], this.rankInfos[o].rank == this.mineRank);
n.node.y = -o * (this.itemHeight + this.spacingY) - this.itemHeight / 2;
}
this.list.setContentSize(this.list.width, this.rankInfos.length * (this.itemHeight + this.spacingY));
this.topMax = this.view.height;
this.bottomMax = -(this.view.height + this.topMax);
this.lastListY = this.list.y;
}
};
t.prototype.update = function() {
if (this.rankInfos.length > 0) {
for (var e = this.list.y > this.lastListY, t = this.rankItems.length, a = this.rankInfos.length, o = 0; o < this.rankItems.length; o++) {
var n = this.rankItems[o], i = this.list.convertToWorldSpaceAR(n.node.position);
i.y -= this.view.height / 2;
i = this.view.convertToNodeSpaceAR(i);
if (e) {
if (i.y > this.topMax) {
if ((r = n.index + t) >= a) return;
n.node.y = -r * (this.itemHeight + this.spacingY) - this.itemHeight / 2;
n.index = r;
n.init(this.rankInfos[r], this.rankInfos[r].rank == this.mineRank);
}
} else if (i.y < this.bottomMax) {
var r;
if ((r = n.index - t) < 0) return;
n.node.y = -r * (this.itemHeight + this.spacingY) - this.itemHeight / 2;
n.index = r;
n.init(this.rankInfos[r], this.rankInfos[r].rank == this.mineRank);
}
}
this.lastListY = this.list.y;
}
};
t.prototype.clickUpRank = function() {
d.GTool.sendBtnEvent("提升段位");
AudioManager.playEffect(AudioName.BtnClose);
e.prototype.clickClose.call(this);
p.PopupManager.show(UIPath.RankPopup);
};
t.prototype.clickRankHistory = function() {
d.GTool.sendBtnEvent("历史段位");
AudioManager.playEffect(AudioName.BtnClose);
p.PopupManager.show(UIPath.RankHistoryPopup);
};
t.prototype.clickClose = function() {
d.GTool.sendBtnEvent("关闭排行榜");
AudioManager.playEffect(AudioName.BtnClose);
e.prototype.clickClose.call(this);
s.default.instance.showMain(!0);
};
i([ m(cc.Node) ], t.prototype, "rankItem", void 0);
i([ m(cc.Node) ], t.prototype, "content", void 0);
i([ m(cc.Node) ], t.prototype, "list", void 0);
i([ m(cc.Node) ], t.prototype, "view", void 0);
i([ m(u.default) ], t.prototype, "topRankItems", void 0);
i([ m(cc.Sprite) ], t.prototype, "spriteMyRank", void 0);
i([ m(cc.SpriteFrame) ], t.prototype, "picRanks", void 0);
i([ m(cc.Sprite) ], t.prototype, "spriteMyRankName", void 0);
i([ m(cc.SpriteFrame) ], t.prototype, "picRankNames", void 0);
i([ m(cc.Node) ], t.prototype, "stars", void 0);
i([ m(cc.Node) ], t.prototype, "kingStars", void 0);
i([ m(cc.Label) ], t.prototype, "labelMyRank", void 0);
i([ m(cc.Label) ], t.prototype, "labelLeftDay", void 0);
i([ m(cc.Label) ], t.prototype, "labelCurrentSeason", void 0);
return i([ y ], t);
}(r.default);
a.default = g;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager",
"../Part/RankItem": "RankItem"
} ],
RankPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "f3c96M2//9ABqbQ4ppWF28K", "RankPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Config/GConfig"), c = e("../GameLogic"), l = e("../Global/GAd"), d = e("../Global/GTemporary"), h = e("../Global/GTool"), p = e("../Manager/MData"), u = e("../Manager/PopupManager"), f = cc._decorator, y = f.ccclass, m = f.property, g = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.spriteMyRank = null;
t.picRanks = [];
t.spriteMyRankName = null;
t.picRankNames = [];
t.picTraditionalRankNames = [];
t.labelMatchTime = null;
t.btnResetMatchTime = null;
t.btnMatch = null;
t.myHeadIcon = null;
t.picIcons = [];
t.labelMyPower = null;
t.labeEnemyPower = null;
t.labelEnemyName = null;
t.enemyHeadIcon = null;
t.stars = null;
t.kingStar = null;
t.labelSearching = null;
t.enemyInfo = null;
t.btns = [];
t.doorRight = null;
t.doorLeft = null;
t.redPoint = null;
t.btnReward = null;
t.btnInvite = null;
return t;
}
t.prototype.start = function() {
if (GA.isWeChat()) {
c.default.instance.showAuthBtn(!1);
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Left,
show: !0
}, {
pos: l.AdPos.Right,
show: !0
}, {
pos: l.AdPos.Main,
show: !1
} ]);
}
this.btnReward.angle = 0;
this.refresh();
this.checkHaveReward();
this.btnMatch.active = p.MData.userData.userData.rankMatchTime > 0;
this.btnResetMatchTime.active = p.MData.userData.userData.rankMatchTime <= 0;
this.btnInvite.active = GA.isWeChat();
if (!GA.isWeChat()) {
this.btnMatch.x = 0;
this.btnResetMatchTime.x = 0;
}
this.checkCanShowSeasonFinishReward() && u.PopupManager.show(UIPath.RankFinishRewardPopup);
};
t.prototype.checkCanShowSeasonFinishReward = function() {
var e = !1;
p.MData.userData.accountData.RankInfo.forEach(function(t) {
t.Season < d.GTemporary.currentSeason && t.MaxRank >= 3 && !p.MData.userData.accountData.GetRewardSeasons.includes(t.Season) && (e = !0);
});
return e;
};
t.prototype.checkHaveReward = function() {
var e = p.MData.getRankInfo().Rewards.some(function(e) {
return 1 == e;
});
this.redPoint.active = e;
if (e) {
cc.Tween.stopAllByTarget(this.redPoint);
cc.tween(this.redPoint).repeatForever(cc.tween().to(.5, {
scale: 1.3
}).to(.5, {
scale: 1
})).start();
cc.Tween.stopAllByTarget(this.btnReward);
cc.tween(this.btnReward).set({
angle: 0
}).repeatForever(cc.tween().by(.1, {
angle: 10
}).by(.1, {
angle: -10
}).by(.1, {
angle: -15
}).by(.1, {
angle: 15
}).delay(1)).start();
}
};
t.prototype.refresh = function() {
var e = this;
d.GTemporary.mechaProperties.forEach(function(t) {
t.MechaIndex == d.GTemporary.myData.MechaIndex && (e.labelMyPower.string = Math.round(t.Health + 12 * t.Attack + 12 * t.Defence).toString());
});
this.myHeadIcon.spriteFrame = this.picIcons[d.GTemporary.myData.MechaIndex - 1];
var t = p.MData.getRankInfo();
this.spriteMyRank.spriteFrame = this.picRanks[t.Rank];
"Chinese" == d.GTemporary.languageVersion ? this.spriteMyRankName.spriteFrame = this.picRankNames[t.Rank] : this.spriteMyRankName.spriteFrame = this.picTraditionalRankNames[t.Rank];
if (t.Rank == p.MData.getMaxRank() - 1) {
this.stars.active = !1;
this.kingStar.active = !0;
this.kingStar.getComponentInChildren(cc.Label).string = "X" + t.Stars;
} else {
this.stars.active = !0;
this.kingStar.active = !1;
var a = p.MData.getUpgradeRankCondition(t.Rank), o = this.stars.childrenCount;
if (o < a) for (var n = a - o, i = 0; i < n; i++) {
var r = cc.instantiate(this.stars.children[0]);
r.active = !0;
r.setParent(this.stars);
}
for (i = 0; i < this.stars.childrenCount; i++) if (this.stars.children[i]) if (i < a) {
this.stars.children[i].active = !0;
this.stars.children[i].children[0].active = i < t.Stars;
} else this.stars.children[i].active = !1;
this.stars.getComponent(cc.Layout).spacingX = a > 4 ? 10 : 30;
}
p.MData.userData.userData.rankMatchTime > 0 && (this.labelMatchTime.string = p.MData.userData.userData.rankMatchTime + "/5");
this.btnResetMatchTime.active = p.MData.userData.userData.rankMatchTime <= 0;
};
t.prototype.clickTestWin = function() {
p.MData.finishRank(!0);
this.refresh();
this.checkHaveReward();
};
t.prototype.clickTestLose = function() {
p.MData.finishRank(!1);
this.refresh();
};
t.prototype.clickMatch = function() {
if (p.MData.userData.userData.rankMatchTime > 0) {
p.MData.userData.userData.rankMatchTime--;
this.match();
}
};
t.prototype.clickResetMatchTime = function() {
var e = this;
GA.rewardOperation({
tag: RewardType.RankMatch,
byVideo: h.GTool.isNextRewardVideo(RewardType.RankMatch),
page: "Rank",
result: function(t) {
if (t.reward) {
p.MData.userData.userData.rankMatchTime = 5;
e.labelMatchTime.string = p.MData.userData.userData.rankMatchTime + "/5";
e.btnMatch.active = !0;
e.btnResetMatchTime.active = !1;
}
}
});
};
t.prototype.match = function() {
var e = this, t = 0;
d.GTemporary.mechaProperties.forEach(function(e) {
e.MechaIndex == d.GTemporary.myData.MechaIndex && (t = Math.round(e.Health + 12 * e.Attack + 12 * e.Defence));
});
var a = p.MData.getRankInfo(), o = .9, n = .98;
switch (a.Rank) {
case 0:
o = .9;
n = .98;
break;

case 1:
o = .98;
n = 1.05;
break;

case 2:
o = .99;
n = 1.15;
break;

case 3:
o = 1.05;
n = 1.2;
break;

case 4:
o = 1.15;
n = 1.3;
break;

case 5:
o = 1.25;
n = 1.4;
break;

case 6:
o = 1.4;
n = 1.6;
}
d.GTemporary.RankMatchInfo.Power = t * GA.randFloat(o, n);
var i = [ 1 ];
d.GTemporary.mechaProperties.forEach(function(e) {
e.MinPower <= d.GTemporary.RankMatchInfo.Power && e.MaxPower >= d.GTemporary.RankMatchInfo.Power && !s.GConfig.ServerConfig.BanedMechas.includes(e.MechaIndex) && i.push(e.MechaIndex);
});
d.GTemporary.RankMatchInfo.Mecha = i[GA.rand(0, i.length - 1)];
"Chinese" == d.GTemporary.languageVersion ? GA.request({
url: Urls.url_GetRobots,
data: {
limit: 1
},
method: "POST",
success: function(e) {
if (0 == e.data.code) {
var t = e.data.data;
d.GTemporary.RankMatchInfo.Name = t[0].nickname;
} else d.GTemporary.RankMatchInfo.Name = "机甲斗士";
console.log("RankMatchInfo:", d.GTemporary.RankMatchInfo);
}
}) : d.GTemporary.RankMatchInfo.Name = "玩家" + GA.rand(1, 1e3);
this.btns.forEach(function(e) {
e.active = !1;
});
this.labelSearching.node.active = !0;
cc.tween(this.node).repeat(3, cc.tween().call(function() {
e.labelSearching.string = "匹配中";
e.enemyHeadIcon.spriteFrame = e.picIcons[GA.rand(0, e.picIcons.length - 1)];
e.labeEnemyPower.string = Math.round(t * GA.randFloat(o, n)).toString();
}).delay(.2).call(function() {
e.labelSearching.string = "匹配中.";
e.enemyHeadIcon.spriteFrame = e.picIcons[GA.rand(0, e.picIcons.length - 1)];
e.labeEnemyPower.string = Math.round(t * GA.randFloat(o, n)).toString();
}).delay(.2).call(function() {
e.labelSearching.string = "匹配中..";
e.enemyHeadIcon.spriteFrame = e.picIcons[GA.rand(0, e.picIcons.length - 1)];
e.labeEnemyPower.string = Math.round(t * GA.randFloat(o, n)).toString();
}).delay(.2).call(function() {
e.labelSearching.string = "匹配中...";
e.enemyHeadIcon.spriteFrame = e.picIcons[GA.rand(0, e.picIcons.length - 1)];
e.labeEnemyPower.string = Math.round(t * GA.randFloat(o, n)).toString();
})).call(function() {
e.labeEnemyPower.string = Math.round(d.GTemporary.RankMatchInfo.Power).toString();
e.labelSearching.node.active = !1;
e.labelEnemyName.string = d.GTemporary.RankMatchInfo.Name;
d.GTemporary.fightMode = "Rank";
}).delay(1).call(function() {
e.showCloseDoorAni(function() {
e.hide();
u.PopupManager.show(UIPath.FightPopup);
});
}).start();
};
t.prototype.showCloseDoorAni = function(e) {
if (cc.winSize.width > 2e3) {
this.doorRight.width = cc.winSize.width / 2;
this.doorLeft.width = cc.winSize.width / 2;
}
AudioManager.playEffect("play_step1");
cc.tween(this.doorRight).set({
active: !0
}).to(.5, {
x: -110
}, {
easing: cc.easing.expoInOut
}).call(function() {
c.default.instance.showDoor(!0);
e && e();
}).start();
cc.tween(this.doorLeft).set({
active: !0
}).to(.5, {
x: 110
}, {
easing: cc.easing.expoInOut
}).start();
};
t.prototype.clickRankReward = function() {
h.GTool.sendBtnEvent("打开排位奖励");
AudioManager.playEffect(AudioName.BtnClose);
e.prototype.clickClose.call(this);
u.PopupManager.show(UIPath.RankRewardPopup);
};
t.prototype.clickRankShop = function() {
h.GTool.sendBtnEvent("打开排位商店");
AudioManager.playEffect(AudioName.BtnClose);
e.prototype.clickClose.call(this);
u.PopupManager.show(UIPath.RankShopPopup);
};
t.prototype.clickInviteFriend = function() {
h.GTool.sendBtnEvent("排位界面分享");
GA.randomShare({
tag: RewardType.RankShareGame,
page: "Arena",
result: function() {}
});
};
t.prototype.clickClose = function() {
h.GTool.sendBtnEvent("关闭排位弹窗");
AudioManager.playEffect(AudioName.BtnClose);
e.prototype.clickClose.call(this);
c.default.instance.showMain(!0);
};
t.prototype.onDestroy = function() {
this.unscheduleAllCallbacks();
GA.isWeChat() && !GA.Info.isPreview && l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Left,
show: !1
}, {
pos: l.AdPos.Right,
show: !1
} ]);
};
i([ m(cc.Sprite) ], t.prototype, "spriteMyRank", void 0);
i([ m(cc.SpriteFrame) ], t.prototype, "picRanks", void 0);
i([ m(cc.Sprite) ], t.prototype, "spriteMyRankName", void 0);
i([ m(cc.SpriteFrame) ], t.prototype, "picRankNames", void 0);
i([ m(cc.SpriteFrame) ], t.prototype, "picTraditionalRankNames", void 0);
i([ m(cc.Label) ], t.prototype, "labelMatchTime", void 0);
i([ m(cc.Node) ], t.prototype, "btnResetMatchTime", void 0);
i([ m(cc.Node) ], t.prototype, "btnMatch", void 0);
i([ m(cc.Sprite) ], t.prototype, "myHeadIcon", void 0);
i([ m(cc.SpriteFrame) ], t.prototype, "picIcons", void 0);
i([ m(cc.Label) ], t.prototype, "labelMyPower", void 0);
i([ m(cc.Label) ], t.prototype, "labeEnemyPower", void 0);
i([ m(cc.Label) ], t.prototype, "labelEnemyName", void 0);
i([ m(cc.Sprite) ], t.prototype, "enemyHeadIcon", void 0);
i([ m(cc.Node) ], t.prototype, "stars", void 0);
i([ m(cc.Node) ], t.prototype, "kingStar", void 0);
i([ m(cc.Label) ], t.prototype, "labelSearching", void 0);
i([ m(cc.Node) ], t.prototype, "enemyInfo", void 0);
i([ m(cc.Node) ], t.prototype, "btns", void 0);
i([ m(cc.Node) ], t.prototype, "doorRight", void 0);
i([ m(cc.Node) ], t.prototype, "doorLeft", void 0);
i([ m(cc.Node) ], t.prototype, "redPoint", void 0);
i([ m(cc.Node) ], t.prototype, "btnReward", void 0);
i([ m(cc.Node) ], t.prototype, "btnInvite", void 0);
return i([ y ], t);
}(r.default);
a.default = g;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Config/GConfig": "GConfig",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager"
} ],
RankResultPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "8415ey7QtlGGJZ40VHiyWJR", "RankResultPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Config/GConfig"), c = e("../GameLogic"), l = e("../Global/GAd"), d = e("../Global/Global"), h = e("../Global/GTemporary"), p = e("../Global/GTool"), u = e("../Manager/MData"), f = e("../Manager/PopupManager"), y = cc._decorator, m = y.ccclass, g = y.property, v = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.winNode = null;
t.loseNode = null;
t.ani = null;
t.stars = null;
t.kingStars = null;
t.picRanks = [];
t.spriteMyRankName = null;
t.picRankNames = [];
t.picTraditionalRankNames = [];
t.btns = [];
t.spine = null;
t.nextPic = [];
t.beforePic = null;
return t;
}
t.prototype.start = function() {
var e = this;
if (GA.isWeChat() && !GA.Info.isPreview) {
1 == s.GConfig.ServerConfig.GameBannerSwitch && l.GAd.hideBanner("banner2");
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.LeftVertical,
show: !0
} ]);
c.default.instance.showSudokuN(!0);
}
var t = 0 == h.GTemporary.enemyData.CurrentHealth;
this.winNode.active = t;
this.loseNode.active = !t;
this.refresh();
d.G.playSpine(this.spine, "chuchang", !1, function() {
e.finishRank(t, null);
});
};
t.prototype.finishRank = function(e, t) {
var a = this, o = u.MData.getRankInfo().Rank;
u.MData.finishRank(e);
var n = u.MData.getRankInfo().Rank, i = u.MData.getRankInfo();
if (n == o) {
d.G.playSpine(this.spine, "daiji", !0, null);
n == u.MData.getMaxRank() - 1 ? this.scheduleOnce(function() {
a.kingStars.getComponentInChildren(cc.Label).string = "X" + i.Stars;
t && t();
a.btns.forEach(function(e) {
e.active = !0;
});
}, .5) : this.showStarAni(i.Stars, e, function() {
t && t();
a.btns.forEach(function(e) {
e.active = !0;
});
});
} else {
var r = e ? "shengduan" : "jiangduan", s = e ? n - 1 : n;
this.beforePic.spriteFrame = this.picRanks[s];
this.nextPic.forEach(function(e) {
e.spriteFrame = a.picRanks[s + 1];
});
this.spriteMyRankName.node.active = !1;
d.G.playSpine(this.spine, r, !1, function() {
a.spriteMyRankName.node.active = !0;
a.refresh();
t && t();
a.btns.forEach(function(e) {
e.active = !0;
});
d.G.playSpine(a.spine, "daiji", !0, null);
});
}
};
t.prototype.showStarAni = function(e, t, a) {
var o = e - 1 < 0 ? 0 : e - 1;
t || (o = e);
var n = this.stars.children[o].children[0];
t ? cc.tween(n).delay(.5).set({
active: !0,
scale: 5
}).to(.5, {
scale: 1
}, {
easing: cc.easing.backOut
}).call(function() {
a && a();
}).start() : cc.tween(n).delay(1).set({
active: !1
}).call(function() {
a && a();
}).start();
};
t.prototype.refresh = function() {
var e = this, t = u.MData.getRankInfo();
"Chinese" == h.GTemporary.languageVersion ? this.spriteMyRankName.spriteFrame = this.picRankNames[t.Rank] : this.spriteMyRankName.spriteFrame = this.picTraditionalRankNames[t.Rank];
this.beforePic.spriteFrame = this.picRanks[t.Rank];
this.nextPic.forEach(function(a) {
a.spriteFrame = e.picRanks[t.Rank];
});
if (t.Rank == u.MData.getMaxRank() - 1) {
this.stars.active = !1;
this.kingStars.active = !0;
this.kingStars.getComponentInChildren(cc.Label).string = "X" + t.Stars;
} else {
this.stars.active = !0;
this.kingStars.active = !1;
var a = u.MData.getUpgradeRankCondition(t.Rank), o = this.stars.childrenCount;
if (o < a) for (var n = a - o, i = 0; i < n; i++) {
var r = cc.instantiate(this.stars.children[0]);
r.active = !0;
r.setParent(this.stars);
}
for (i = 0; i < this.stars.childrenCount; i++) if (this.stars.children[i]) if (i < a) {
this.stars.children[i].active = !0;
this.stars.children[i].children[0].active = i < t.Stars;
} else this.stars.children[i].active = !1;
this.stars.getComponent(cc.Layout).spacingX = a > 4 ? 10 : 30;
}
};
t.prototype.clickMoreStar = function() {
var e = this;
GA.rewardOperation({
tag: RewardType.MoreStar,
byVideo: p.GTool.isNextRewardVideo(RewardType.MoreStar),
page: "RankResult",
result: function(t) {
t.reward && e.finishRank(!0, function() {
e.hide();
f.PopupManager.show(UIPath.RankPopup);
});
}
});
};
t.prototype.clickWarehourse = function() {
p.GTool.sendBtnEvent("排位结算强化");
AudioManager.playEffect(AudioName.BtnClose);
this.hide();
f.PopupManager.show(UIPath.WarehousePopup);
};
t.prototype.clickClose = function() {
p.GTool.sendBtnEvent("关闭排位结算");
AudioManager.playEffect(AudioName.BtnClose);
cc.systemEvent.emit(EventsName.HideFightPopup);
this.hide();
f.PopupManager.show(UIPath.RankPopup);
};
t.prototype.clickTestWin = function() {
this.btns.forEach(function(e) {
e.active = !1;
});
this.finishRank(!0, null);
};
t.prototype.clickTestLose = function() {
this.btns.forEach(function(e) {
e.active = !1;
});
this.finishRank(!1, null);
};
t.prototype.onDestroy = function() {
cc.systemEvent.emit(EventsName.HideFightPopup);
if (GA.isWeChat() && !GA.Info.isPreview) {
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.LeftVertical,
show: !1
}, {
pos: l.AdPos.Left,
show: !1
}, {
pos: l.AdPos.Right,
show: !1
} ]);
c.default.instance.showSudokuN(!1);
}
};
i([ g(cc.Node) ], t.prototype, "winNode", void 0);
i([ g(cc.Node) ], t.prototype, "loseNode", void 0);
i([ g(sp.Skeleton) ], t.prototype, "ani", void 0);
i([ g(cc.Node) ], t.prototype, "stars", void 0);
i([ g(cc.Node) ], t.prototype, "kingStars", void 0);
i([ g(cc.SpriteFrame) ], t.prototype, "picRanks", void 0);
i([ g(cc.Sprite) ], t.prototype, "spriteMyRankName", void 0);
i([ g(cc.SpriteFrame) ], t.prototype, "picRankNames", void 0);
i([ g(cc.SpriteFrame) ], t.prototype, "picTraditionalRankNames", void 0);
i([ g(cc.Node) ], t.prototype, "btns", void 0);
i([ g(sp.Skeleton) ], t.prototype, "spine", void 0);
i([ g(cc.Sprite) ], t.prototype, "nextPic", void 0);
i([ g(cc.Sprite) ], t.prototype, "beforePic", void 0);
return i([ m ], t);
}(r.default);
a.default = v;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Config/GConfig": "GConfig",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Global/Global": "Global",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager"
} ],
RankRewardPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "ba7ffzpWaxPCbutL8NKr8Ah", "RankRewardPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Config/GConfig"), c = e("../Global/GTool"), l = e("../Manager/MData"), d = e("../Manager/PopupManager"), h = cc._decorator, p = h.ccclass, u = h.property, f = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.progress = null;
t.progressWidth = [ 0, 230, 460, 690, 950, 1200, 1400 ];
t.rankItems = [];
t.rankRewards = [ {
Rank: 1,
Gold: 400,
Model: 200
}, {
Rank: 2,
Gold: 600,
Model: 300
}, {
Rank: 3,
Gold: 800,
Model: 500
}, {
Rank: 4,
Gold: 1e3,
Model: 800
}, {
Rank: 5,
Gold: 2e3,
Model: 1e3
}, {
Rank: 6,
Gold: 4e3,
Model: 2e3
} ];
return t;
}
t.prototype.start = function() {
var e = this, t = {
MinLevel: 0,
Rewards: [ 400, 600, 800, 1e3, 2e3 ]
};
s.GConfig.ServerConfig.GoldSupply.sort(function(e, t) {
return e.MinLevel - t.MinLevel;
});
var a = l.MData.getCurrentCheckpoint();
0 == a ? t = s.GConfig.ServerConfig.GoldSupply[0] : s.GConfig.ServerConfig.GoldSupply.forEach(function(e) {
a >= e.MinLevel && (t = e);
});
5 != t.Rewards.length && (t.Rewards = [ 400, 600, 800, 1e3, 2e3 ]);
this.rankRewards = [ {
Rank: 1,
Gold: t.Rewards[0],
Model: 200
}, {
Rank: 2,
Gold: t.Rewards[1],
Model: 300
}, {
Rank: 3,
Gold: t.Rewards[2],
Model: 500
}, {
Rank: 4,
Gold: t.Rewards[3],
Model: 800
}, {
Rank: 5,
Gold: t.Rewards[4],
Model: 1e3
}, {
Rank: 6,
Gold: 2 * t.Rewards[4],
Model: 2e3
} ];
var o = l.MData.getRankInfo();
this.rankItems.forEach(function(t, a) {
t.getChildByName("Frame1").getChildByName("LabelGold").getComponent(cc.Label).string = e.rankRewards[a].Gold.toString();
t.getChildByName("Frame1").getChildByName("PicFinish").active = 2 == o.Rewards[a];
t.getChildByName("Frame2").getChildByName("PicFinish").active = 2 == o.Rewards[a];
var n = t.getChildByName("BtnGet");
n.active = 1 == o.Rewards[a];
if (n.active) {
n.off("click");
n.on("click", function() {
o.Rewards[a] = 2;
n.active = !1;
t.getChildByName("Frame1").getChildByName("PicFinish").active = !0;
t.getChildByName("Frame2").getChildByName("PicFinish").active = !0;
l.MData.addGold(e.rankRewards[a].Gold);
l.MData.userData.accountData.Model += e.rankRewards[a].Model;
c.GTool.showToast("" + c.GTool.getLanguage("获得金币") + e.rankRewards[a].Gold + ",奖章" + e.rankRewards[a].Model);
});
}
});
for (var n = -1, i = o.Rewards.length - 1; i >= 0; i--) 0 == o.Rewards[i] && (n = i);
this.progress.width = -1 == n ? 1400 : this.progressWidth[n];
};
t.prototype.clickGet = function() {};
t.prototype.clickClose = function() {
c.GTool.sendBtnEvent("关闭排位奖励");
AudioManager.playEffect(AudioName.BtnClose);
e.prototype.clickClose.call(this);
d.PopupManager.show(UIPath.RankPopup);
};
i([ u(cc.Node) ], t.prototype, "progress", void 0);
i([ u(cc.Node) ], t.prototype, "rankItems", void 0);
return i([ p ], t);
}(r.default);
a.default = f;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Config/GConfig": "GConfig",
"../Global/GTool": "GTool",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager"
} ],
RankShopPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "6576cUbKkBD84NgG3I8m0rz", "RankShopPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Config/GConfig"), c = e("../Global/GAd"), l = e("../Global/GTool"), d = e("../Manager/MData"), h = e("../Manager/PopupManager"), p = cc._decorator, u = p.ccclass, f = p.property, y = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.labelModel = null;
t.labelGold = null;
t.gold = 800;
return t;
}
t.prototype.start = function() {
GA.isWeChat() && !GA.Info.isPreview && c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.Left,
show: !0
}, {
pos: c.AdPos.Right,
show: !0
} ]);
this.labelModel.string = d.MData.userData.accountData.Model.toString();
console.log("??MData.userData.accountData.Model:", d.MData.userData.accountData.Model);
var e = {
MinLevel: 0,
Rewards: [ 400, 600, 800, 1e3, 2e3 ]
};
s.GConfig.ServerConfig.GoldSupply.sort(function(e, t) {
return e.MinLevel - t.MinLevel;
});
var t = d.MData.getCurrentCheckpoint();
0 == t ? e = s.GConfig.ServerConfig.GoldSupply[0] : s.GConfig.ServerConfig.GoldSupply.forEach(function(a) {
t >= a.MinLevel && (e = a);
});
5 != e.Rewards.length && (e.Rewards = [ 400, 600, 800, 1e3, 2e3 ]);
this.labelGold.string = "X" + e.Rewards[2].toString();
this.gold = e.Rewards[2];
};
t.prototype.clickBuy = function(e, t) {
var a = "2" == t ? 500 : 100;
if (d.MData.userData.accountData.Model >= a) {
d.MData.userData.accountData.Model -= a;
this.labelModel.string = d.MData.userData.accountData.Model.toString();
switch (t) {
case "0":
d.MData.addGold(this.gold);
l.GTool.showToast(l.GTool.getLanguage("获得金币") + "X" + this.gold);
break;

case "1":
d.MData.addDebris(3, 5);
l.GTool.showToast(l.GTool.getLanguage("获得嗜血钢甲龙碎片X") + 5);
break;

case "2":
d.MData.addDebris(7, 5);
l.GTool.showToast(l.GTool.getLanguage("获得绝地机械武士碎片X") + 5);
}
} else l.GTool.showToast("勋章不足");
};
t.prototype.clickClose = function() {
l.GTool.sendBtnEvent("关闭排位商店");
AudioManager.playEffect(AudioName.BtnClose);
e.prototype.clickClose.call(this);
h.PopupManager.show(UIPath.RankPopup);
};
t.prototype.onDestroy = function() {
GA.isWeChat() && !GA.Info.isPreview && c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.Left,
show: !1
}, {
pos: c.AdPos.Right,
show: !1
} ]);
};
i([ f(cc.Label) ], t.prototype, "labelModel", void 0);
i([ f(cc.Label) ], t.prototype, "labelGold", void 0);
return i([ u ], t);
}(r.default);
a.default = y;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Config/GConfig": "GConfig",
"../Global/GAd": "GAd",
"../Global/GTool": "GTool",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager"
} ],
RestrainPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "52e8bo3QrxI+YIv/zapXrQG", "RestrainPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../GameLogic"), c = e("../Global/GAd"), l = e("../Global/GTemporary"), d = e("../Global/GTool"), h = cc._decorator, p = h.ccclass, u = (h.property, 
function(e) {
n(t, e);
function t() {
return null !== e && e.apply(this, arguments) || this;
}
t.prototype.start = function() {
if (GA.isWeChat()) {
c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.Left,
show: !1
}, {
pos: c.AdPos.Right,
show: !1
}, {
pos: c.AdPos.LeftVertical,
show: !0
} ]);
s.default.instance.showSudokuN(!0);
} else (GA.isOPPO() || GA.isVivo()) && cc.systemEvent.emit(EventsName.ShowOppoNative, this.node, !0);
};
t.prototype.clickClose = function() {
d.GTool.sendBtnEvent("关闭克制关系弹窗");
l.GTemporary.isShowingNewGuide ? "SeeRestrain" == l.GTemporary.newGuideStepInFightA && cc.systemEvent.emit(EventsName.AfterSeeRestrain) : cc.systemEvent.emit(EventsName.CloseRestrain);
AudioManager.playEffect(AudioName.BtnClose);
cc.systemEvent.emit(EventsName.PauseGame, !1);
this.hide();
};
t.prototype.onDestroy = function() {
if (GA.isWeChat()) {
c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.Left,
show: !0
}, {
pos: c.AdPos.Right,
show: !0
}, {
pos: c.AdPos.LeftVertical,
show: !1
} ]);
s.default.instance.showSudokuN(!1);
} else (GA.isOPPO() || GA.isVivo()) && cc.systemEvent.emit(EventsName.ShowOppoNative, null, !1);
};
return i([ p ], t);
}(r.default));
a.default = u;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool"
} ],
ResultPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "e13bdAGK6xMO70vRKF7m+P8", "ResultPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Config/GConfig"), c = e("../GameLogic"), l = e("../Global/GAd"), d = e("../Global/Global"), h = e("../Global/GTemporary"), p = e("../Global/GTool"), u = e("../Manager/MData"), f = e("../Manager/PopupManager"), y = cc._decorator, m = y.ccclass, g = y.property, v = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.win = null;
t.fail = null;
t.labelRewardGold = null;
t.labelRewardDiamond = null;
t.reward = 100;
t.btnCheat = null;
t.wechatCanCheat = !1;
t.showCheatBanner = !1;
t.onShowCallback = null;
return t;
}
t.prototype.start = function() {
var e = this;
if (GA.isAndroid() && "Inland" == h.GTemporary.region && !GA.Info.underCheck) {
this.win.x = -cc.winSize.width / 2 + this.win.width / 2 + 20;
this.fail.x = -cc.winSize.width / 2 + this.fail.width / 2 + 20;
GA.showNativeAd({
offsetX: 500,
type: 2
});
}
h.GTemporary.myData.MechaIndex = u.MData.getCurrentMecha();
if (GA.isWeChat()) {
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Left,
show: !1
}, {
pos: l.AdPos.BottomLeft,
show: !0
}, {
pos: l.AdPos.Right,
show: !1
} ]);
c.default.instance.showSudokuN(!0);
if (0 == h.GTemporary.enemyData.CurrentHealth) {
this.wechatCanCheat = d.G.checkWeChatCanCheatClick(d.CheatPos.Result);
if (this.wechatCanCheat) {
h.GTemporary.CheatPopup = this.node;
this.onShowCallback = function() {};
1 == s.GConfig.ServerConfig.GameBannerSwitch && l.GAd.hideBanner("banner2");
this.btnCheat.clickEvents = [];
1 == s.GConfig.ServerConfig.WechatCheatResult ? this.btnCheat.node.on("click", function() {
d.G.triggerCheatReport(d.CheatPos.Result);
e.btnCheat.node.off("click");
e.scheduleOnce(function() {
e.showCheatBanner = !0;
c.default.instance.showBanner("CheatBanner", GA.PA.getSystemInfoSync().screenHeight - 150, 0);
e.scheduleOnce(function() {
e.btnCheat.node.on("click", function() {
u.MData.addGold(e.reward);
e.clickClose();
});
console.log("关闭广告");
e.showCheatBanner = !1;
GA.PA.offShow(e.onShowCallback);
c.default.instance.hideBanner("CheatBanner");
}, 1);
}, .5);
}) : this.btnCheat.node.on("click", function() {
console.log("骗点视频");
d.G.triggerCheatReport(d.CheatPos.Result);
e.btnCheat.node.off("click");
e.btnCheat.node.on("click", function() {
u.MData.addGold(e.reward);
e.clickClose();
});
GA.rewardOperation({
tag: RewardType.Cheat,
page: "Result",
byVideo: !0,
result: function() {}
});
});
}
}
} else (GA.isOPPO() || GA.isVivo()) && cc.systemEvent.emit(EventsName.ShowOppoNative, this.node, !0);
if (0 == h.GTemporary.myData.CurrentHealth) {
this.fail.active = !0;
AudioManager.playEffect(AudioName.Defeat);
} else {
3 == u.MData.getCurrentCheckpoint() && "PVE" == h.GTemporary.fightMode && (h.GTemporary.openSignInPopup = !0);
AudioManager.playEffect(AudioName.Victory);
this.win.active = !0;
this.labelRewardGold.node.parent.active = !0;
this.labelRewardDiamond.node.parent.active = !1;
"PVP" == h.GTemporary.fightMode ? this.reward = h.GTemporary.pvpInfo.Reward : "PVE" == h.GTemporary.fightMode && (this.reward = u.MData.getCheckpointData(h.GTemporary.chosenCheckPointIndex).RewardNumber);
this.labelRewardGold.string = "x" + GA.formatNumber(this.reward);
}
};
t.prototype.init = function() {};
t.prototype.clickDoubleGet = function() {
var e = this;
p.GTool.sendBtnEvent("双倍领取");
AudioManager.playEffect(AudioName.BtnClick);
GA.rewardOperation({
tag: RewardType.DoubleGet,
byVideo: p.GTool.isNextRewardVideo(RewardType.DoubleGet),
page: "Result",
result: function(t) {
if (t.reward) {
u.MData.addGold(2 * e.reward);
p.GTool.showToast(p.GTool.getLanguage("获得金币") + "X" + 2 * e.reward);
cc.systemEvent.emit(EventsName.HideFightPopup);
e.hide();
if (h.GTemporary.isShowingNewGuide && "New" == h.GTemporary.newGuideType) {
f.PopupManager.show(UIPath.WarehousePopup);
p.GTool.sentLogs([ {
eventId: "新手引导",
detail: JSON.stringify({
Pos: "战斗结束"
})
} ]);
} else if (GA.isWeChat() && l.GAd.loadFiveGridADSuccess) {
h.GTemporary.NextPageAfterMatrix = "Main";
f.PopupManager.show(UIPath.MatrixGridPopup);
} else c.default.instance.showMain(!0);
}
}
});
};
t.prototype.clickGet = function() {
p.GTool.sendBtnEvent("单倍领取");
AudioManager.playEffect(AudioName.BtnClick);
u.MData.addGold(this.reward);
p.GTool.showToast(p.GTool.getLanguage("获得金币") + "X" + this.reward);
cc.systemEvent.emit(EventsName.HideFightPopup);
this.hide();
if (h.GTemporary.isShowingNewGuide && "New" == h.GTemporary.newGuideType) {
f.PopupManager.show(UIPath.WarehousePopup);
p.GTool.sentLogs([ {
eventId: "新手引导",
detail: JSON.stringify({
Pos: "战斗结束"
})
} ]);
} else if (GA.isWeChat() && l.GAd.loadFiveGridADSuccess) {
h.GTemporary.NextPageAfterMatrix = "Main";
f.PopupManager.show(UIPath.MatrixGridPopup);
} else c.default.instance.showMain(!0);
};
t.prototype.clickResurgence = function() {
var e = this;
AudioManager.playEffect(AudioName.BtnClick);
p.GTool.sendBtnEvent("点击复活");
GA.rewardOperation({
tag: RewardType.Rematch,
byVideo: p.GTool.isNextRewardVideo(RewardType.Rematch),
page: "Match",
result: function(t) {
if (t.reward) {
cc.systemEvent.emit(EventsName.Resurgence, !0);
e.hide();
}
}
});
};
t.prototype.clickWarehouse = function() {
p.GTool.sendBtnEvent("前往仓库");
AudioManager.playEffect(AudioName.BtnClick);
cc.systemEvent.emit(EventsName.HideFightPopup);
this.hide();
if (GA.isWeChat() && l.GAd.loadFiveGridADSuccess) {
h.GTemporary.NextPageAfterMatrix = "Warehourse";
f.PopupManager.show(UIPath.MatrixGridPopup);
} else f.PopupManager.show(UIPath.WarehousePopup);
};
t.prototype.clickClose = function() {
p.GTool.sendBtnEvent("关闭结果界面");
AudioManager.playEffect(AudioName.BtnClose);
cc.systemEvent.emit(EventsName.HideFightPopup);
this.hide();
if (GA.isWeChat() && l.GAd.loadFiveGridADSuccess) {
h.GTemporary.NextPageAfterMatrix = "Main";
f.PopupManager.show(UIPath.MatrixGridPopup);
} else c.default.instance.showMain(!0);
};
t.prototype.onDestroy = function() {
if (GA.isWeChat()) {
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.BottomLeft,
show: !1
} ]);
c.default.instance.showSudokuN(!1);
if (this.wechatCanCheat && this.showCheatBanner) {
c.default.instance.hideBanner("CheatBanner");
GA.PA.offShow(this.onShowCallback);
h.GTemporary.CheatPopup = null;
}
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, null, !1) : GA.isAndroid() && "Inland" == h.GTemporary.region && !GA.Info.underCheck && GA.hideNativeAd();
};
i([ g(cc.Node) ], t.prototype, "win", void 0);
i([ g(cc.Node) ], t.prototype, "fail", void 0);
i([ g(cc.Label) ], t.prototype, "labelRewardGold", void 0);
i([ g(cc.Label) ], t.prototype, "labelRewardDiamond", void 0);
i([ g(cc.Button) ], t.prototype, "btnCheat", void 0);
return i([ m ], t);
}(r.default);
a.default = v;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Config/GConfig": "GConfig",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Global/Global": "Global",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager"
} ],
RewardChange: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "d68b9Rv1wtKrrms7pBrZz9x", "RewardChange");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Global/GTemporary"), s = e("../Global/GTool"), c = cc._decorator, l = c.ccclass, d = c.property, h = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.tag = "";
t.frameShare = null;
t.frameVideo = null;
t.traditionalPicVideo = null;
return t;
}
t.prototype.onEnable = function() {
this.node.getComponent(cc.Sprite) && ("TraditionalChinese" == r.GTemporary.languageVersion && this.traditionalPicVideo ? this.node.getComponent(cc.Sprite).spriteFrame = this.traditionalPicVideo : this.node.getComponent(cc.Sprite).spriteFrame = s.GTool.isNextRewardVideo(this.tag) ? this.frameVideo : this.frameShare);
};
i([ d() ], t.prototype, "tag", void 0);
i([ d(cc.SpriteFrame) ], t.prototype, "frameShare", void 0);
i([ d(cc.SpriteFrame) ], t.prototype, "frameVideo", void 0);
i([ d(cc.SpriteFrame) ], t.prototype, "traditionalPicVideo", void 0);
return i([ l ], t);
}(cc.Component);
a.default = h;
cc._RF.pop();
}, {
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool"
} ],
RewardType: [ function(e, t) {
"use strict";
cc._RF.push(t, "1888fq80IFP6aKPlo+EIf6c", "RewardType");
window.RewardType = new function() {
this.AddGold = "AddGold";
this.ShareAddGold = "ShareAddGold";
this.ShareGame = "ShareGame";
this.RankShareGame = "RankShareGame";
this.DoubleGet = "DoubleGet";
this.Rematch = "Rematch";
this.TryoutSkill = "TryoutSkill";
this.TryoutMecha = "TryoutMecha";
this.UnlockMecha = "UnlockMecha";
this.GetSkyBox = "GetSkyBox";
this.GetSurpriseBox = "GetSurpriseBox";
this.SignIn = "SignIn";
this.Draw = "Draw";
this.DoubleGain = "DoubleGain";
this.DailyGift = "DailyGift";
this.RankMatch = "RankMatch";
this.MoreStar = "MoreStar";
this.Cheat = "Cheat";
}();
cc._RF.pop();
}, {} ],
SetPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "deac5jYALlMH7wgK0nyYux/", "SetPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../GameLogic"), c = e("../Global/GAd"), l = e("../Global/GTemporary"), d = e("../Global/GTool"), h = e("../Manager/MData"), p = e("../Manager/PopupManager"), u = cc._decorator, f = u.ccclass, y = u.property, m = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.spriteMusic = null;
t.picMusic = [];
t.picTraditionalMusic = [];
t.spriteVirbrate = null;
t.picVirbrate = [];
t.picTraditionalVirbrate = [];
t.editBoxRedeem = null;
t.btnRedeem = null;
t.btnShare = null;
t.gameClubButton = null;
t.panelPrivacy = null;
t.btnPrivacy = null;
return t;
}
t.prototype.start = function() {
this.btnShare.active = GA.isWeChat();
if (GA.isWeChat()) {
c.GAd.showBanner("banner2", 0, GA.PA.getSystemInfoSync().screenWidth / 2 + 50);
s.default.instance.showSudokuN(!0);
c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.LeftVertical,
show: !0
}, {
pos: c.AdPos.Main,
show: !1
} ]);
cc.systemEvent.emit(EventsName.ShowGameClubBtn, !1);
s.default.instance.showAuthBtn(!1);
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, this.node, !0) : GA.isAndroid() && "Inland" == l.GTemporary.region && !GA.Info.underCheck && GA.showNativeAd({
offsetX: 500,
type: 2
});
if ("Oversea" == l.GTemporary.region) {
this.btnRedeem.active = !1;
this.editBoxRedeem.node.active = !1;
}
var e = this.main.getChildByName("Bg").getChildByName("Pos"), t = e.parent.convertToWorldSpaceAR(e.getPosition());
try {
if (!GA.Info.isPreview && GA.isWeChat()) if (null == this.gameClubButton) {
this.gameClubButton = GA.PA.createGameClubButton({
type: "image",
style: {
left: (t.x + 130) / d.GTool.Info.DesignPixelRatio,
top: GA.PA.getSystemInfoSync().screenHeight / 2 + (t.y - 44) / d.GTool.Info.DesignPixelRatio,
width: 1.62 * 261 / d.GTool.Info.DesignPixelRatio,
height: 142.56 / d.GTool.Info.DesignPixelRatio
},
image: "https://xyx-1253482990.cos.ap-guangzhou.myqcloud.com/GameRes/BianXingJiJiaLong/WeChat/remote/BtnGame.png",
icon: "light"
});
this.gameClubButton.show();
this.gameClubButton.onTap(function() {
d.GTool.sendBtnEvent("点击游戏圈");
l.GTemporary.RemuseBGMusic = !0;
});
} else this.gameClubButton.show();
} catch (e) {}
if ("Chinese" == l.GTemporary.languageVersion) {
this.spriteMusic.spriteFrame = this.picMusic[AudioManager.audioSwitch ? 0 : 1];
this.spriteVirbrate.spriteFrame = this.picVirbrate[AudioManager.virbrateSwitch ? 0 : 1];
} else {
this.spriteMusic.spriteFrame = this.picTraditionalMusic[AudioManager.audioSwitch ? 0 : 1];
this.spriteVirbrate.spriteFrame = this.picTraditionalVirbrate[AudioManager.virbrateSwitch ? 0 : 1];
}
this.btnPrivacy.active = GA.isOPPO() || GA.isVivo();
};
t.prototype.clickAudio = function() {
AudioManager.audioSwitch && AudioManager.playBGMusic(AudioName.BGMMain, !1);
AudioManager.audioSwitch = !AudioManager.audioSwitch;
AudioManager.audioSwitch && AudioManager.playBGMusic(AudioName.BGMMain, !0);
"Chinese" == l.GTemporary.languageVersion ? this.spriteMusic.spriteFrame = this.picMusic[AudioManager.audioSwitch ? 0 : 1] : this.spriteMusic.spriteFrame = this.picTraditionalMusic[AudioManager.audioSwitch ? 0 : 1];
AudioManager.playEffect(AudioName.BtnClick);
};
t.prototype.clickVibrate = function() {
AudioManager.virbrateSwitch = !AudioManager.virbrateSwitch;
"Chinese" == l.GTemporary.languageVersion ? this.spriteVirbrate.spriteFrame = this.picVirbrate[AudioManager.virbrateSwitch ? 0 : 1] : this.spriteVirbrate.spriteFrame = this.picTraditionalVirbrate[AudioManager.virbrateSwitch ? 0 : 1];
};
t.prototype.clickShare = function() {
d.GTool.sendBtnEvent("设置界面分享");
GA.randomShare({
tag: RewardType.ShareGame,
page: "Set",
result: function() {}
});
};
t.prototype.clickRedeem = function() {
d.GTool.sendBtnEvent("点击兑换码");
var e = this.editBoxRedeem.string, t = h.MData.getExcelRedeem(), a = !1, o = !1, n = null;
t.forEach(function(t) {
if (t.RedeemCode.toString() == e) {
n = t;
a = !0;
h.MData.checkHaveThisRedeem(t.Index) && (o = !0);
}
});
if (a) if (o) d.GTool.showToast("已使用该兑换码"); else {
h.MData.useRedeem(n.Index);
switch (n.RewardType) {
case "Gold":
l.GTemporary.gainRewardType = {
Type: "Gold",
OneGet: !0,
Number: n.RewardNumber
};
this.hide();
p.PopupManager.show(UIPath.GainPopup);
break;

case "Debris_3":
l.GTemporary.gainRewardType = {
Type: "Debris",
OneGet: !0,
Number: n.RewardNumber
};
this.hide();
p.PopupManager.show(UIPath.GainPopup);
break;

case "Debris_7":
l.GTemporary.gainRewardType = {
Type: "Debris_7",
OneGet: !0,
Number: n.RewardNumber
};
this.hide();
p.PopupManager.show(UIPath.GainPopup);
break;

case "Medal":
l.GTemporary.gainRewardType = {
Type: "Medal",
OneGet: !0,
Number: n.RewardNumber
};
this.hide();
p.PopupManager.show(UIPath.GainPopup);
}
} else d.GTool.showToast("兑换码错误");
};
t.prototype.clickClose = function() {
d.GTool.sendBtnEvent("关闭设置界面");
AudioManager.playEffect(AudioName.BtnClose);
this.hide();
s.default.instance.showAuthBtn(!0);
};
t.prototype.onDestroy = function() {
if (GA.isWeChat()) {
c.GAd.hideBanner("banner2");
s.default.instance.showSudokuN(!1);
c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.LeftVertical,
show: !1
}, {
pos: c.AdPos.Main,
show: !0
} ]);
} else GA.isAndroid() && "Inland" == l.GTemporary.region && !GA.Info.underCheck && GA.hideNativeAd();
cc.systemEvent.emit(EventsName.StartMainGuide);
cc.systemEvent.emit(EventsName.ShowGameClubBtn, !0);
if (GA.isWeChat() && !GA.Info.isPreview) try {
this.gameClubButton && this.gameClubButton.hide();
} catch (e) {} else (GA.isOPPO() || GA.isVivo()) && cc.systemEvent.emit(EventsName.ShowOppoNative, null, !1);
};
t.prototype.clickShowPrivacy = function() {
this.panelPrivacy.active = !0;
cc.systemEvent.emit(EventsName.ShowOppoNative, null, !1);
GA.isVivo() && c.GAd.hideGamePortalAd();
};
t.prototype.clickHidePrivacy = function() {
this.panelPrivacy.active = !1;
cc.systemEvent.emit(EventsName.ShowOppoNative, this.node, !0);
GA.isVivo() && c.GAd.showGamePortalAd();
};
i([ y(cc.Sprite) ], t.prototype, "spriteMusic", void 0);
i([ y(cc.SpriteFrame) ], t.prototype, "picMusic", void 0);
i([ y(cc.SpriteFrame) ], t.prototype, "picTraditionalMusic", void 0);
i([ y(cc.Sprite) ], t.prototype, "spriteVirbrate", void 0);
i([ y(cc.SpriteFrame) ], t.prototype, "picVirbrate", void 0);
i([ y(cc.SpriteFrame) ], t.prototype, "picTraditionalVirbrate", void 0);
i([ y(cc.EditBox) ], t.prototype, "editBoxRedeem", void 0);
i([ y(cc.Node) ], t.prototype, "btnRedeem", void 0);
i([ y(cc.Node) ], t.prototype, "btnShare", void 0);
i([ y(cc.Node) ], t.prototype, "panelPrivacy", void 0);
i([ y(cc.Node) ], t.prototype, "btnPrivacy", void 0);
return i([ f ], t);
}(r.default);
a.default = m;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager"
} ],
ShareAddGoldPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "8e8d7N3/udNxZ73frKapj9P", "ShareAddGoldPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../GameLogic"), c = e("../Global/GAd"), l = e("../Global/GTool"), d = e("../Manager/MData"), h = cc._decorator, p = h.ccclass, u = h.property, f = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.btnGain = null;
return t;
}
t.prototype.start = function() {
if (GA.isWeChat()) {
c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.LeftVertical,
show: !0
} ]);
c.GAd.showBanner("banner2", 0, GA.PA.getSystemInfoSync().screenWidth / 2 + 50);
s.default.instance.showSudokuN(!0);
}
};
t.prototype.clickShareGetGold = function() {
var e = this;
l.GTool.sendBtnEvent("分享获得金币");
GA.rewardOperation({
tag: RewardType.ShareAddGold,
byVideo: !1,
page: "ShareAddGold",
result: function(t) {
if (t.reward) {
var a = d.MData.getNextGoldRewardNumber();
d.MData.addGold(a, !1);
l.GTool.showToast(l.GTool.getLanguage("获得金币") + a);
cc.systemEvent.emit(EventsName.GainGold, {
pos: e.btnGain.convertToWorldSpaceAR(cc.v3()),
endCallback: function() {
cc.systemEvent.emit(EventsName.Refresh);
}
});
e.hide();
}
}
});
};
t.prototype.clickClose = function() {
l.GTool.sendBtnEvent("关闭分享金币弹窗");
AudioManager.playEffect(AudioName.BtnClose);
this.hide();
};
t.prototype.onDestroy = function() {
if (GA.isWeChat()) {
c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.LeftVertical,
show: !1
} ]);
s.default.instance.showSudokuN(!1);
c.GAd.hideBanner("banner2");
}
};
i([ u(cc.Node) ], t.prototype, "btnGain", void 0);
return i([ p ], t);
}(r.default);
a.default = f;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTool": "GTool",
"../Manager/MData": "MData"
} ],
SharePopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "cfa163OddNFfLoR+uZ4nAow", "SharePopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Global/GTool"), c = cc._decorator, l = c.ccclass, d = c.property, h = function(t) {
n(a, t);
function a() {
var e = null !== t && t.apply(this, arguments) || this;
e.subContextView = null;
return e;
}
a.prototype.start = function() {
this.subContextView.active = !0;
cc.systemEvent.emit(EventsName.ShowGameClubBtn, !1);
if (GA.isWeChat() && !GA.Info.isPreview) {
var t = wx.setMessageToFriendQuery({
shareMessageToFriendScene: 1
});
console.log(t ? "设置Query成功" : "设置Query失败");
wx.getUserInteractiveStorage({
keyList: [ "1" ],
success: function(t) {
console.log("主域 wx.getUserInteractiveStorage success", t);
var a = GA.Info.session_key, o = t.iv, n = t.encryptedData;
console.log("GA.Info.session_key", GA.Info.session_key);
var i = e("crypto-js");
a = i.enc.Base64.parse(decodeURIComponent(a));
o = i.enc.Base64.parse(decodeURIComponent(o));
var r = i.AES.decrypt(n, a, {
iv: o,
mode: i.mode.CBC,
padding: i.pad.Pkcs7
});
console.log("decrypt", r.toString(i.enc.Utf8));
},
fail: function(e) {
console.log("主域 wx.getUserInteractiveStorage fail", e);
},
complete: function(e) {
console.log("主域 wx.getUserInteractiveStorage complete", e);
}
});
}
};
a.prototype.clickClose = function() {
cc.systemEvent.emit(EventsName.ShowGameClubBtn, !0);
s.GTool.sendBtnEvent("关闭好友助力");
AudioManager.playEffect(AudioName.BtnClose);
t.prototype.clickClose.call(this);
};
i([ d(cc.Node) ], a.prototype, "subContextView", void 0);
return i([ l ], a);
}(r.default);
a.default = h;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Global/GTool": "GTool",
"crypto-js": 11
} ],
SignInPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "22e32T9E9FDSa5CdcskZFH/", "SignInPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Global/GAd"), c = e("../Global/GTemporary"), l = e("../Global/GTool"), d = e("../Manager/MData"), h = e("../Manager/PopupManager"), p = cc._decorator, u = p.ccclass, f = p.property, y = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.btnSignIn = null;
t.btnDoubleGet = null;
t.btnNoGet = null;
t.days = [];
t.reward = [ {
Day: 1,
Type: "Gold",
Reward: 500
}, {
Day: 2,
Type: "Debris",
Reward: 5,
DebrisIndex: 3
}, {
Day: 3,
Type: "Gold",
Reward: 1200
}, {
Day: 4,
Type: "Gold",
Reward: 1200
}, {
Day: 5,
Type: "Debris",
Reward: 10,
DebrisIndex: 3
}, {
Day: 6,
Type: "Gold",
Reward: 1500
}, {
Day: 7,
Type: "Debris",
Reward: 20,
DebrisIndex: 3
} ];
return t;
}
t.prototype.start = function() {
cc.systemEvent.emit(EventsName.ShowGameClubBtn, !1);
GA.isWeChat() && s.GAd.showOrHideNativeGridsAd([ {
pos: s.AdPos.Left,
show: !0
}, {
pos: s.AdPos.Right,
show: !0
}, {
pos: s.AdPos.Main,
show: !1
} ]);
this.refresh();
};
t.prototype.refresh = function() {
for (var e = d.MData.getSignInDay(), t = 0; t < 7; t++) {
this.days[t].getChildByName("FrameSigned").active = t < e - 1;
d.MData.checkFreeSignInToday() ? d.MData.checkRewardSignInToday() || (this.days[t].getChildByName("FrameCanGet").active = t == e - 2) : this.days[t].getChildByName("FrameCanGet").active = t == e - 1;
}
if (d.MData.checkFreeSignInToday()) {
this.btnSignIn.node.active = !1;
this.btnDoubleGet.active = !1;
this.btnNoGet.active = !0;
if (d.MData.getSignInDay() - 1 == 0) for (t = 0; t < 7; t++) this.days[t].getChildByName("FrameSigned").active = !0;
} else {
this.btnSignIn.node.active = 1 == e;
this.btnDoubleGet.active = 1 != e;
this.btnNoGet.active = !1;
}
console.log("checkFreeSignInToday", d.MData.checkFreeSignInToday());
console.log("checkRewardSignInToday", d.MData.checkRewardSignInToday());
if (d.MData.checkFreeSignInToday() && d.MData.checkRewardSignInToday()) {
this.btnSignIn.node.active = !1;
this.btnDoubleGet.active = !1;
this.btnNoGet.active = !0;
} else if (d.MData.checkFreeSignInToday()) {
this.btnSignIn.node.active = !1;
this.btnDoubleGet.active = !0;
this.btnNoGet.active = !1;
} else {
this.btnSignIn.node.active = !0;
this.btnDoubleGet.active = !1;
this.btnNoGet.active = !1;
}
};
t.prototype.clickSignIn = function() {
var e;
l.GTool.sendBtnEvent("点击签到");
AudioManager.playEffect(AudioName.BtnClick);
var t = this.reward[d.MData.getSignInDay() - 1];
if ("Gold" == t.Type) {
d.MData.addGold(t.Reward, !1);
l.GTool.showToast(l.GTool.getLanguage("获得金币") + t.Reward);
cc.systemEvent.emit(EventsName.GainGold, {
pos: this.btnSignIn.node.convertToWorldSpaceAR(cc.v3()),
endCallback: function() {
cc.systemEvent.emit(EventsName.Refresh);
}
});
} else {
d.MData.addDebris(null !== (e = t.DebrisIndex) && void 0 !== e ? e : 3, t.Reward);
l.GTool.showToast(l.GTool.getLanguage("获得碎片") + t.Reward);
}
d.MData.signIn(!1);
cc.systemEvent.emit(EventsName.SignIn);
this.refresh();
};
t.prototype.clickDoubleSignIn = function() {
var e = this;
GA.rewardOperation({
tag: RewardType.SignIn,
byVideo: l.GTool.isNextRewardVideo(RewardType.SignIn),
page: "SignIn",
result: function(t) {
var a;
if (t.reward) {
var o = e.reward[d.MData.getSignInDay() - 2 < 0 ? 6 : d.MData.getSignInDay() - 2];
console.log("双倍签到的索引是", d.MData.getSignInDay() - 2 < 0 ? 6 : d.MData.getSignInDay() - 2);
if ("Gold" == o.Type) {
d.MData.addGold(o.Reward, !1);
l.GTool.showToast(l.GTool.getLanguage("获得金币") + o.Reward);
cc.systemEvent.emit(EventsName.GainGold, {
pos: e.btnSignIn.node.convertToWorldSpaceAR(cc.v3()),
endCallback: function() {
cc.systemEvent.emit(EventsName.Refresh);
}
});
} else {
d.MData.addDebris(null !== (a = o.DebrisIndex) && void 0 !== a ? a : 3, o.Reward);
l.GTool.showToast(l.GTool.getLanguage("获得碎片") + o.Reward);
}
d.MData.signIn(!0);
cc.systemEvent.emit(EventsName.SignIn);
e.hide();
}
}
});
};
t.prototype.clickNoGet = function() {
l.GTool.showToast("今日已签到");
};
t.prototype.clickClose = function() {
l.GTool.sendBtnEvent("关闭签到界面");
AudioManager.playEffect(AudioName.BtnClose);
this.hide();
};
t.prototype.onDestroy = function() {
cc.systemEvent.emit(EventsName.ShowGameClubBtn, !0);
GA.isWeChat() && s.GAd.showOrHideNativeGridsAd([ {
pos: s.AdPos.Left,
show: !1
}, {
pos: s.AdPos.Right,
show: !1
}, {
pos: s.AdPos.Main,
show: !0
} ]);
cc.systemEvent.emit(EventsName.StartMainGuide);
c.GTemporary.needCheckDailyGiftPopup && (d.MData.checkGetDailyGift() || h.PopupManager.show(UIPath.DailyGiftPopup));
};
i([ f(cc.Button) ], t.prototype, "btnSignIn", void 0);
i([ f(cc.Node) ], t.prototype, "btnDoubleGet", void 0);
i([ f(cc.Node) ], t.prototype, "btnNoGet", void 0);
i([ f(cc.Node) ], t.prototype, "days", void 0);
return i([ u ], t);
}(r.default);
a.default = y;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager"
} ],
SkyBoxPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "d3c06WIzJJMuJTs/2RZYXCX", "SkyBoxPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../GameLogic"), c = e("../Global/GAd"), l = e("../Global/GTemporary"), d = e("../Global/GTool"), h = e("../Manager/MData"), p = cc._decorator, u = p.ccclass, f = p.property, y = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.box = null;
return t;
}
t.prototype.start = function() {
if (GA.isWeChat()) {
c.GAd.hideBanner("banner");
c.GAd.showBanner("banner2", 0, GA.PA.getSystemInfoSync().screenWidth / 2 + 50);
s.default.instance.showSudokuN(!0);
c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.LeftVertical,
show: !0
} ]);
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, this.node, !0) : GA.isAndroid() && "Inland" == l.GTemporary.region && !GA.Info.underCheck && GA.showNativeAd({
offsetX: 500,
type: 2
});
};
t.prototype.clickGetSkyBox = function() {
var e = this;
GA.rewardOperation({
tag: RewardType.GetSkyBox,
byVideo: d.GTool.isNextRewardVideo(RewardType.GetSkyBox),
page: "SkyBox",
result: function(t) {
if (t.reward) {
h.MData.getSkyBox();
e.hide();
cc.systemEvent.emit(EventsName.CheckShowBox);
cc.systemEvent.emit(EventsName.OpenSkyBox);
}
}
});
};
t.prototype.clickClose = function() {
d.GTool.sendBtnEvent("关闭天降宝箱弹窗");
AudioManager.playEffect(AudioName.BtnClose);
cc.systemEvent.emit(EventsName.GiveUpSkyBox);
this.hide();
};
t.prototype.onDestroy = function() {
if (GA.isWeChat()) {
c.GAd.hideBanner("banner2");
c.GAd.showBanner("banner", 0, 0);
s.default.instance.showSudokuN(!1);
c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.LeftVertical,
show: !1
} ]);
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, null, !1) : GA.isAndroid() && "Inland" == l.GTemporary.region && !GA.Info.underCheck && GA.hideNativeAd();
};
i([ f(cc.Node) ], t.prototype, "box", void 0);
return i([ u ], t);
}(r.default);
a.default = y;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Manager/MData": "MData"
} ],
SurpriseBoxPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "ed45aUj6VREGYWGvSiojLsQ", "SurpriseBoxPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../GameLogic"), c = e("../Global/GAd"), l = e("../Global/GBundle"), d = e("../Global/GTemporary"), h = e("../Global/GTool"), p = e("../Manager/MData"), u = cc._decorator, f = u.ccclass, y = u.property, m = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.lebalLevel = null;
t.picPart = null;
return t;
}
t.prototype.start = function() {
var e = this;
if (GA.isWeChat()) {
c.GAd.hideBanner("banner");
c.GAd.showBanner("banner2", 0, GA.PA.getSystemInfoSync().screenWidth / 2 + 50);
s.default.instance.showSudokuN(!0);
c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.LeftVertical,
show: !0
} ]);
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, this.node, !0) : GA.isAndroid() && "Inland" == d.GTemporary.region && !GA.Info.underCheck && GA.showNativeAd({
offsetX: 500,
type: 2
});
this.lebalLevel.string = d.GTemporary.surpriseBoxInfo.Level + "";
var t = p.MData.getPartInfo(d.GTemporary.surpriseBoxInfo.MechaIndex, d.GTemporary.surpriseBoxInfo.Level).PicName, a = "Parts/" + d.GTemporary.surpriseBoxInfo.MechaIndex + "/" + t;
l.GBundle.GetBundle(l.EBundle.MechaPics).load(a, cc.SpriteFrame, function(t, a) {
t ? console.error(t) : e.picPart.spriteFrame = a;
});
};
t.prototype.clickGetSkyBox = function() {
var e = this;
GA.rewardOperation({
tag: RewardType.GetSurpriseBox,
byVideo: h.GTool.isNextRewardVideo(RewardType.GetSurpriseBox),
page: "SurpriseBox",
result: function(t) {
if (t.reward) {
cc.systemEvent.emit(EventsName.OpenSurpriseBox);
e.hide();
}
}
});
};
t.prototype.clickClose = function() {
h.GTool.sendBtnEvent("关闭惊喜宝箱弹窗");
AudioManager.playEffect(AudioName.BtnClose);
cc.systemEvent.emit(EventsName.GiveUpSurpriseBox);
this.hide();
};
t.prototype.onDestroy = function() {
if (GA.isWeChat()) {
c.GAd.hideBanner("banner2");
c.GAd.showBanner("banner", 0, 0);
s.default.instance.showSudokuN(!1);
c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.LeftVertical,
show: !1
} ]);
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, null, !1) : GA.isAndroid() && "Inland" == d.GTemporary.region && !GA.Info.underCheck && GA.hideNativeAd();
};
i([ y(cc.Label) ], t.prototype, "lebalLevel", void 0);
i([ y(cc.Sprite) ], t.prototype, "picPart", void 0);
return i([ f ], t);
}(r.default);
a.default = m;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GBundle": "GBundle",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Manager/MData": "MData"
} ],
TaskPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "411cftRNBdNC7s7kccCCQGM", "TaskPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Config/GConfig"), c = e("../GameLogic"), l = e("../Global/GAd"), d = e("../Global/GTemporary"), h = e("../Global/GTool"), p = e("../Manager/MData"), u = e("../Manager/PopupManager"), f = cc._decorator, y = f.ccclass, m = f.property, g = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.itemTask = null;
t.content = null;
t.picCanGet = null;
t.picChallenge = null;
t.picTraditionalCanGet = null;
t.picTraditionalChallenge = null;
t.picFinish = null;
t.taskInfos = [ {
Type: "PVE",
RewardIndex: 1,
Target: 5,
RewardNumber: 600
}, {
Type: "BuyPart",
RewardIndex: 0,
Target: 10,
RewardNumber: 400
}, {
Type: "PVP",
RewardIndex: 1,
Target: 5,
RewardNumber: 600
}, {
Type: "SkyBox",
RewardIndex: 0,
Target: 2,
RewardNumber: 400
} ];
return t;
}
t.prototype.start = function() {
if (GA.isWeChat()) {
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Left,
show: !0
}, {
pos: l.AdPos.Right,
show: !0
}, {
pos: l.AdPos.Main,
show: !1
} ]);
c.default.instance.showAuthBtn(!1);
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, this.node, !0) : GA.isAndroid() && "Inland" == d.GTemporary.region && !GA.Info.underCheck && GA.showNativeAd({
offsetX: 500,
type: 2
});
var e = {
MinLevel: 0,
Rewards: [ 400, 600, 800, 1e3, 2e3 ]
};
s.GConfig.ServerConfig.GoldSupply.sort(function(e, t) {
return e.MinLevel - t.MinLevel;
});
var t = p.MData.getCurrentCheckpoint();
0 == t ? e = s.GConfig.ServerConfig.GoldSupply[0] : s.GConfig.ServerConfig.GoldSupply.forEach(function(a) {
t >= a.MinLevel && (e = a);
});
5 != e.Rewards.length && (e.Rewards = [ 400, 600, 800, 1e3, 2e3 ]);
this.taskInfos.forEach(function(t) {
t.RewardNumber = e.Rewards[t.RewardIndex];
});
this.initItems();
};
t.prototype.initItems = function() {
var e = this, t = p.MData.getTaskInfo();
this.taskInfos.forEach(function(a) {
var o = cc.instantiate(e.itemTask);
o.active = !0;
o.setParent(e.content);
var n = "";
switch (a.Type) {
case "PVE":
n = "成功挑战关卡" + a.Target + "次";
break;

case "PVP":
n = "竞技场击败" + a.Target + "个对手";
break;

case "BuyPart":
n = "购买零件" + a.Target + "次";
break;

case "SkyBox":
n = "领取天降宝箱" + a.Target + "次";
}
var i = 0;
t.forEach(function(e) {
var t;
e.K == a.Type && (i = null !== (t = e.V) && void 0 !== t ? t : 0);
});
"Chinese" == d.GTemporary.languageVersion ? o.getChildByName("LabelDes").getComponent(cc.Label).string = n : o.getChildByName("LabelDes").getComponent(cc.Label).string = h.GTool.getLanguage(n);
var r = i + "/" + a.Target;
o.getChildByName("LabelProgress").getComponent(cc.Label).string = r;
o.getChildByName("Progress").getComponent(cc.Sprite).fillRange = i / a.Target > 1 ? 1 : i / a.Target;
o.getChildByName("LabelReward").getComponent(cc.Label).string = "X" + a.RewardNumber;
var s = o.getChildByName("BtnGet"), l = s.getComponent(cc.Sprite);
s.off(cc.Node.EventType.TOUCH_END);
if (p.MData.checkGetTaskReward(a.Type)) {
l.spriteFrame = e.picFinish;
s.on(cc.Node.EventType.TOUCH_END, function() {
h.GTool.showToast("已领取该奖励");
});
} else if (i < a.Target) {
"Chinese" == d.GTemporary.languageVersion ? l.spriteFrame = e.picChallenge : l.spriteFrame = e.picTraditionalChallenge;
s.on(cc.Node.EventType.TOUCH_END, function() {
switch (a.Type) {
case "PVE":
e.hide();
c.default.instance.showMain(!1, function() {
u.PopupManager.show(UIPath.CheckPointPopup);
});
break;

case "PVP":
e.hide();
c.default.instance.showMain(!1, function() {
u.PopupManager.show(UIPath.MatchPopup);
});
break;

case "BuyPart":
case "SkyBox":
e.hide();
c.default.instance.showMain(!1, function() {
u.PopupManager.show(UIPath.WarehousePopup);
});
}
});
} else {
"Chinese" == d.GTemporary.languageVersion ? l.spriteFrame = e.picCanGet : l.spriteFrame = e.picTraditionalCanGet;
s.on(cc.Node.EventType.TOUCH_END, function() {
p.MData.getTaskReward(a.Type);
p.MData.addGold(a.RewardNumber, !1);
h.GTool.showToast("" + h.GTool.getLanguage("获得") + a.RewardNumber + h.GTool.getLanguage("金币"));
cc.systemEvent.emit(EventsName.GainGold, {
pos: s.convertToWorldSpaceAR(cc.v3()),
endCallback: function() {
cc.systemEvent.emit(EventsName.Refresh);
}
});
l.spriteFrame = e.picFinish;
s.off(cc.Node.EventType.TOUCH_END);
s.on(cc.Node.EventType.TOUCH_END, function() {
h.GTool.showToast("已领取该奖励");
});
});
}
});
};
t.prototype.clickClose = function() {
h.GTool.sendBtnEvent("关闭任务弹窗");
AudioManager.playEffect(AudioName.BtnClose);
e.prototype.clickClose.call(this);
c.default.instance.showMain(!0);
};
t.prototype.onDestroy = function() {
if (GA.isWeChat()) {
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Left,
show: !1
}, {
pos: l.AdPos.Right,
show: !1
}, {
pos: l.AdPos.Main,
show: !0
} ]);
c.default.instance.showAuthBtn(!0);
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, null, !1) : GA.isAndroid() && "Inland" == d.GTemporary.region && !GA.Info.underCheck && GA.hideNativeAd();
};
i([ m(cc.Node) ], t.prototype, "itemTask", void 0);
i([ m(cc.Node) ], t.prototype, "content", void 0);
i([ m(cc.SpriteFrame) ], t.prototype, "picCanGet", void 0);
i([ m(cc.SpriteFrame) ], t.prototype, "picChallenge", void 0);
i([ m(cc.SpriteFrame) ], t.prototype, "picTraditionalCanGet", void 0);
i([ m(cc.SpriteFrame) ], t.prototype, "picTraditionalChallenge", void 0);
i([ m(cc.SpriteFrame) ], t.prototype, "picFinish", void 0);
return i([ y ], t);
}(r.default);
a.default = g;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Config/GConfig": "GConfig",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager"
} ],
TestItem: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "ae14eTIhFZOt6dwjw1ZjbBH", "TestItem");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) t.hasOwnProperty(a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = cc._decorator, s = r.ccclass, c = (r.property, function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.index = 0;
return t;
}
t.prototype.init = function(e) {
this.index = e;
this.getComponentInChildren(cc.Label).string = this.index.toString();
};
return i([ s ], t);
}(cc.Component));
a.default = c;
cc._RF.pop();
}, {} ],
TestScrollview: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "ccb64NDTSRD3LIJPr+1vbTM", "TestScrollview");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) t.hasOwnProperty(a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("./TestItem"), s = cc._decorator, c = s.ccclass, l = s.property, d = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.item = null;
t.view = null;
t.list = null;
t.rankInfos = [];
t.rowItemCounts = 0;
t.spacingY = 0;
t.itemHeight = 300;
t.topMax = 0;
t.bottomMax = 0;
t.lastListY = 0;
t.rankItems = [];
return t;
}
t.prototype.start = function() {
for (var e = 0; e < 1e3; e++) this.rankInfos.push(e.toString());
this.rowItemCounts = 4 + Math.ceil(this.view.height / (this.itemHeight + this.spacingY));
for (e = 0; e < this.rowItemCounts; e++) {
var t = cc.instantiate(this.item);
t.active = !0;
t.setParent(this.list);
this.rankItems.push(t.getComponent(r.default));
t.getComponent(r.default).init(e);
t.y = -e * (this.itemHeight + this.spacingY) - 150;
}
this.list.setContentSize(this.list.width, this.rankInfos.length * (this.itemHeight + this.spacingY));
this.topMax = this.view.height;
this.bottomMax = -(this.view.height + this.topMax);
this.lastListY = this.list.y;
};
t.prototype.update = function() {
for (var e = this.list.y > this.lastListY, t = this.rankInfos.length, a = 0; a < this.rankItems.length; a++) {
var o = this.rankItems[a], n = this.list.convertToWorldSpaceAR(o.node.position);
n.y -= this.view.height / 2;
n = this.view.convertToNodeSpaceAR(n);
if (e) {
if (n.y > this.topMax) {
if ((i = o.index + this.rankItems.length) >= t) return;
o.node.y = -i * (this.itemHeight + this.spacingY) - 150;
o.init(i);
}
} else if (n.y < this.bottomMax) {
var i;
if ((i = o.index - this.rankItems.length) < 0) return;
o.node.y = -i * (this.itemHeight + this.spacingY) - 150;
o.init(i);
}
}
this.lastListY = this.list.y;
};
i([ l(cc.Node) ], t.prototype, "item", void 0);
i([ l(cc.Node) ], t.prototype, "view", void 0);
i([ l(cc.Node) ], t.prototype, "list", void 0);
return i([ c ], t);
}(cc.Component);
a.default = d;
cc._RF.pop();
}, {
"./TestItem": "TestItem"
} ],
TopWidget: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "4a066g55xZFTK/V5fLhAERz", "TopWidget");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) t.hasOwnProperty(a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = cc._decorator, s = r.ccclass, c = (r.property, function(e) {
n(t, e);
function t() {
return null !== e && e.apply(this, arguments) || this;
}
t.prototype.onLoad = function() {
var e = GA.PA.getMenuButtonBoundingClientRect();
GA.Info.isPreview ? this.node.getComponent(cc.Widget).top = 80 : (null == e ? void 0 : e.top) ? this.node.getComponent(cc.Widget).top = (e.top + e.height / 2) * GA.PA.getSystemInfoSync().designPixelRatio : this.node.getComponent(cc.Widget).top = 80;
};
return i([ s ], t);
}(cc.Component));
a.default = c;
cc._RF.pop();
}, {} ],
TryoutPopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "bd226DHbQFHt6qyK9D2uG+q", "TryoutPopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Config/GConfig"), c = e("../GameLogic"), l = e("../Global/GAd"), d = e("../Global/GBundle"), h = e("../Global/Global"), p = e("../Global/GTemporary"), u = e("../Global/GTool"), f = e("../Manager/MData"), y = cc._decorator, m = y.ccclass, g = y.property, v = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.spineMecha = null;
t.mecha3 = null;
t.spinePos = new Map([ [ 2, cc.v3(-130, -190) ] ]);
t.targetIndex = 1;
return t;
}
t.prototype.start = function() {
var e = this;
if (GA.isWeChat()) {
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.LeftVertical,
show: !0
} ]);
c.default.instance.showSudokuN(!0);
l.GAd.showBanner("banner2", 0, GA.PA.getSystemInfoSync().screenWidth / 2 + 50);
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, this.node, !0) : GA.isAndroid() && "Inland" == p.GTemporary.region && !GA.Info.underCheck && GA.showNativeAd({
offsetX: 500,
type: 2
});
this.targetIndex = p.GTemporary.myData.MechaIndex;
var t = [ p.GTemporary.myData.MechaIndex ];
p.GTemporary.mechaProperties.forEach(function(e) {
0 != e.MechaIndex && !s.GConfig.ServerConfig.BanedMechas.includes(e.MechaIndex) && e.MaxPower > f.MData.getCurrentPower() && (t.includes(e.MechaIndex) || t.push(e.MechaIndex));
});
this.targetIndex = t[GA.rand(0, t.length - 1)];
if (3 == this.targetIndex) {
this.mecha3.active = !0;
this.spineMecha.node.active = !1;
} else {
var a = function() {
for (var t = f.MData.getPartMaxLevel(e.targetIndex), a = 1; a <= t; a++) {
var o = f.MData.checkHaveOriginPic(e.targetIndex, a);
e.spineMecha.setAttachment(o.PicName, o.PicName);
o.AdditionPicName && "" != o.AdditionPicName && e.spineMecha.setAttachment(o.AdditionPicName, o.AdditionPicName);
}
};
if (p.GTemporary.displaySpineMap.has(this.targetIndex)) {
this.spineMecha.skeletonData = p.GTemporary.displaySpineMap.get(this.targetIndex);
h.G.playSpine(this.spineMecha, "standby1", !0, null);
a();
this.spinePos.has(this.targetIndex) && this.spineMecha.node.setPosition(this.spinePos.get(this.targetIndex));
7 == this.targetIndex && (this.spineMecha.node.scale = .8);
} else {
var o = "Display/" + this.targetIndex.toString() + "/Skeleton";
d.GBundle.GetBundle(d.EBundle.Spines).load(o, sp.SkeletonData, function(t, o) {
if (t) cc.error(t); else {
p.GTemporary.displaySpineMap.set(e.targetIndex, o);
e.spineMecha.skeletonData = o;
a();
e.spinePos.has(e.targetIndex) && e.spineMecha.node.setPosition(e.spinePos.get(e.targetIndex));
7 == e.targetIndex && (e.spineMecha.node.scale = .8);
h.G.playSpine(e.spineMecha, "standby1", !0, null);
}
});
}
}
};
t.prototype.clickTryout = function() {
var e = this;
u.GTool.sendBtnEvent("试用机甲");
GA.rewardOperation({
tag: RewardType.TryoutMecha,
byVideo: u.GTool.isNextRewardVideo(RewardType.TryoutMecha),
page: "Tryout",
result: function(t) {
if (t.reward) {
p.GTemporary.tryOutMecha = !0;
p.GTemporary.myData.MechaIndex = e.targetIndex;
e.hide();
cc.systemEvent.emit(EventsName.CloseTryout);
}
}
});
};
t.prototype.clickClose = function() {
u.GTool.sendBtnEvent("关闭试用");
AudioManager.playEffect(AudioName.BtnClose);
this.hide();
cc.systemEvent.emit(EventsName.CloseTryout);
};
t.prototype.onDestroy = function() {
if (GA.isWeChat()) {
l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.LeftVertical,
show: !1
} ]);
c.default.instance.showSudokuN(!1);
l.GAd.hideBanner("banner2");
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, null, !1) : GA.isAndroid() && "Inland" == p.GTemporary.region && !GA.Info.underCheck && GA.hideNativeAd();
};
i([ g(sp.Skeleton) ], t.prototype, "spineMecha", void 0);
i([ g(cc.Node) ], t.prototype, "mecha3", void 0);
return i([ m ], t);
}(r.default);
a.default = v;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Config/GConfig": "GConfig",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GBundle": "GBundle",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Global/Global": "Global",
"../Manager/MData": "MData"
} ],
UIPath: [ function(e, t) {
"use strict";
cc._RF.push(t, "5e436ZCG/FEEa+E7IixMruD", "UIPath");
window.UIPath = new function() {
this.AddGoldPopup = "AddGoldPopup";
this.ShareAddGoldPopup = "ShareAddGoldPopup";
this.AddDiamondPopup = "AddDiamondPopup";
this.CheckPointPopup = "CheckPointPopup";
this.FightPopup = "FightPopup";
this.SetPopup = "SetPopup";
this.SignInPopup = "SignInPopup";
this.InfoPopup = "InfoPopup";
this.UpgradePopup = "UpgradePopup";
this.WarehousePopup = "WarehousePopup";
this.MainPopup = "MainPopup";
this.ResultPopup = "ResultPopup";
this.MatchPopup = "MatchPopup";
this.RankPopup = "RankPopup";
this.NewPartPopup = "NewPartPopup";
this.RestrainPopup = "RestrainPopup";
this.TryoutPopup = "TryoutPopup";
this.SurpriseBoxPopup = "SurpriseBoxPopup";
this.SkyBoxPopup = "SkyBoxPopup";
this.DrawPopup = "DrawPopup";
this.GainPopup = "GainPopup";
this.BankPopup = "BankPopup";
this.DailyGiftPopup = "DailyGiftPopup";
this.TaskPopup = "TaskPopup";
this.SharePopup = "SharePopup";
this.RankShopPopup = "RankShopPopup";
this.RankRewardPopup = "RankRewardPopup";
this.RankListPopup = "RankListPopup";
this.RankResultPopup = "RankResultPopup";
this.RankFinishRewardPopup = "RankFinishRewardPopup";
this.RankHistoryPopup = "RankHistoryPopup";
this.MatrixGridPopup = "MatrixGridPopup";
}();
cc._RF.pop();
}, {} ],
UpgradePopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "66cc5urhBROUL9D78itA4dg", "UpgradePopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../GameLogic"), c = e("../Global/GAd"), l = e("../Global/GTemporary"), d = e("../Global/GTool"), h = e("../Manager/MData"), p = cc._decorator, u = p.ccclass, f = p.property, y = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.labelAttackNow = null;
t.labelAttackTarget = null;
t.labelDefencekNow = null;
t.labelDefenceTarget = null;
t.labelHealthNow = null;
t.labelHealthTarget = null;
t.labelCritNow = null;
t.labelCritTarget = null;
t.labelDodgeNow = null;
t.labelDodgeTarget = null;
t.labelLevel = null;
t.spriteIcon = null;
t.picIcons = [];
t.labelUpgradePrice = null;
t.labelName = null;
t.maxHideNodes = [];
return t;
}
t.prototype.start = function() {
if (GA.isWeChat()) {
c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.LeftVertical,
show: !0
} ]);
c.GAd.hideBanner("banner");
c.GAd.showBanner("banner2", 0, GA.PA.getSystemInfoSync().screenWidth / 2 + 50);
s.default.instance.showSudokuN(!0);
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, this.node, !0) : GA.isAndroid() && "Inland" == l.GTemporary.region && !GA.Info.underCheck && GA.showNativeAd({
offsetX: 500,
type: 2
});
this.refreshLabel();
};
t.prototype.refreshLabel = function() {
if (h.MData.getMechaProperty(l.GTemporary.warehouseChoosenMechaIndex).Level >= h.MData.getMechaData(l.GTemporary.warehouseChoosenMechaIndex).MaxLevel) {
this.labelLevel.string = "等级已升至最高级";
this.labelLevel.node.setPosition(cc.v3(0, -40));
this.maxHideNodes.forEach(function(e) {
e.active = !1;
});
} else {
var e = h.MData.getMechaData(l.GTemporary.warehouseChoosenMechaIndex);
this.labelName.string = e.Name;
var t = h.MData.getMechaProperty(l.GTemporary.warehouseChoosenMechaIndex);
this.labelAttackNow.string = GA.formatNumber(t.Attack);
this.labelDefencekNow.string = GA.formatNumber(t.Defence);
this.labelHealthNow.string = GA.formatNumber(t.Health);
this.labelCritNow.string = GA.formatNumber(t.Crit) + "%";
this.labelDodgeNow.string = GA.formatNumber(t.Dodge) + "%";
var a = h.MData.getTargetLevelMechaData(l.GTemporary.warehouseChoosenMechaIndex, t.Level + 1);
this.labelAttackTarget.string = GA.formatNumber(a.Attack);
this.labelDefenceTarget.string = GA.formatNumber(a.Defence);
this.labelHealthTarget.string = GA.formatNumber(a.Health);
this.labelCritTarget.string = GA.formatNumber(a.Crit) + "%";
this.labelDodgeTarget.string = GA.formatNumber(a.Dodge) + "%";
this.labelLevel.string = "LV:" + t.Level.toString();
this.spriteIcon.spriteFrame = this.picIcons[l.GTemporary.warehouseChoosenMechaIndex - 1];
this.labelUpgradePrice.string = GA.formatNumber(h.MData.getUpgradePrice(l.GTemporary.warehouseChoosenMechaIndex));
}
};
t.prototype.clickUpgrade = function() {
if (h.MData.getMechaProperty(l.GTemporary.warehouseChoosenMechaIndex).Level >= h.MData.getMechaData(l.GTemporary.warehouseChoosenMechaIndex).MaxLevel) d.GTool.showToast("已升级至最高等级"); else if (h.MData.canAffordGold(h.MData.getUpgradePrice(l.GTemporary.warehouseChoosenMechaIndex))) {
AudioManager.playEffect(AudioName.BtnClick);
h.MData.upgradeMecha(l.GTemporary.warehouseChoosenMechaIndex);
h.MData.addGold(-h.MData.getUpgradePrice(l.GTemporary.warehouseChoosenMechaIndex));
d.GTool.sendBtnEvent("升级机甲");
cc.systemEvent.emit(EventsName.RefreshPower);
this.refreshLabel();
} else {
d.GTool.showToast("金币不足");
d.GTool.sendBtnEvent("升级机甲金币不足");
}
};
t.prototype.clickClose = function() {
d.GTool.sendBtnEvent("关闭升级");
AudioManager.playEffect(AudioName.BtnClose);
this.hide();
};
t.prototype.onDestroy = function() {
if (GA.isWeChat()) {
c.GAd.showOrHideNativeGridsAd([ {
pos: c.AdPos.LeftVertical,
show: !1
} ]);
c.GAd.hideBanner("banner2");
c.GAd.showBanner("banner", 0, 0);
s.default.instance.showSudokuN(!1);
} else GA.isOPPO() || GA.isVivo() ? cc.systemEvent.emit(EventsName.ShowOppoNative, null, !1) : GA.isAndroid() && "Inland" == l.GTemporary.region && !GA.Info.underCheck && GA.hideNativeAd();
};
i([ f(cc.Label) ], t.prototype, "labelAttackNow", void 0);
i([ f(cc.Label) ], t.prototype, "labelAttackTarget", void 0);
i([ f(cc.Label) ], t.prototype, "labelDefencekNow", void 0);
i([ f(cc.Label) ], t.prototype, "labelDefenceTarget", void 0);
i([ f(cc.Label) ], t.prototype, "labelHealthNow", void 0);
i([ f(cc.Label) ], t.prototype, "labelHealthTarget", void 0);
i([ f(cc.Label) ], t.prototype, "labelCritNow", void 0);
i([ f(cc.Label) ], t.prototype, "labelCritTarget", void 0);
i([ f(cc.Label) ], t.prototype, "labelDodgeNow", void 0);
i([ f(cc.Label) ], t.prototype, "labelDodgeTarget", void 0);
i([ f(cc.Label) ], t.prototype, "labelLevel", void 0);
i([ f(cc.Sprite) ], t.prototype, "spriteIcon", void 0);
i([ f(cc.SpriteFrame) ], t.prototype, "picIcons", void 0);
i([ f(cc.Label) ], t.prototype, "labelUpgradePrice", void 0);
i([ f(cc.Label) ], t.prototype, "labelName", void 0);
i([ f(cc.Node) ], t.prototype, "maxHideNodes", void 0);
return i([ u ], t);
}(r.default);
a.default = y;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Manager/MData": "MData"
} ],
Urls: [ function(e, t) {
"use strict";
cc._RF.push(t, "efd9ecizghPZZ065UoInVfK", "Urls");
window.Urls = new function() {
this.url_clickShare = "https://game.17tcw.com/default/game/clickShare";
this.url_reqLogin = "https://game.17tcw.com/default/login/reqLogin";
this.url_reqSaveUser = "https://game.17tcw.com/default/game/reqSaveUser";
this.url_list = "https://game.17tcw.com/default/redirect/list";
this.url_confirm = "https://game.17tcw.com/default/redirect/confirm";
this.url_getRank = "https://game.17tcw.com/default/lobby/reqRank";
this.url_saveRank = "https://game.17tcw.com/default/lobby/saveRank";
this.url_reqGetInvite = "https://game.17tcw.com/default/extra/reqGetInvite";
this.url_saveInvite = "https://game.17tcw.com/default/extra/reqSaveInvite";
this.url_gameConfig = "https://game.17tcw.com/default/config/gameConfig";
this.url_getNewConfigs = "https://game.17tcw.com/default/extra/getNewConfigs";
this.url_CheckTriger = "https://game.17tcw.com/default/cheatClick/triger";
this.url_CheckAction = "https://game.17tcw.com/default/cheatClick/action";
this.url_GetRobots = "https://game.17tcw.com/game/extra/getSomeRobots2";
}();
cc._RF.pop();
}, {} ],
UserData: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "ad485BfmzlGsbMVEC161U3W", "UserData");
Object.defineProperty(a, "__esModule", {
value: !0
});
a.UserData = void 0;
var o = e("../Data/MAccountData"), n = e("../Data/MUserData"), i = e("./GTemporary"), r = function() {
function e() {
this.userData = new n.MUserData();
this.accountData = new o.MAccountData();
}
e.prototype.getData = function() {
var e = new Object();
e.userData = this.userData.getData();
e.accountData = this.accountData.getData();
return e;
};
e.prototype.initData = function(e) {
var t, a, o = this;
try {
if (null != e && "" != e) {
console.log("老玩家");
var n = JSON.parse(e);
if (GA.isAndroid() && "Oversea" == i.GTemporary.region) ; else {
var r = GA.PA.getStorageSync("GameData");
if (null != r && "" != r) {
var s = JSON.parse(r), c = null === (t = null == s ? void 0 : s.userData) || void 0 === t ? void 0 : t.quitTime, l = null === (a = null == n ? void 0 : n.userData) || void 0 === a ? void 0 : a.quitTime;
if (c && l && c > l) {
n = s;
console.log("使用本地数据");
}
}
}
for (var d in n) this[d].syncData(n[d]);
this.userData.newUser = !1;
this.userData.checkIsSameDay();
} else {
console.log("新用户");
this.userData.registTime = Date.now();
}
} catch (e) {
cc.error(e);
} finally {
GA.PA.onHide(function() {
o.save(!0);
});
}
};
e.prototype.save = function(e) {
if (!GA.Info.isPreview) {
this.userData.quitTime = Date.now();
var t = this.getData();
GA.isM4399MiniGame() || !e || GA.isAndroid() && "Oversea" == i.GTemporary.region ? GA.PA.setStorageSync("GameData", JSON.stringify(t)) : this.upload(JSON.stringify(t));
}
};
e.prototype.upload = function(e, t) {
GA.request({
url: Urls.url_reqSaveUser,
data: {
userId: GA.Info.uid,
data: e,
guanqia: 0
},
method: "POST",
success: function(e) {
console.log("upload data ", e);
0 == e.data.code && (null == t || t());
}
});
};
return e;
}();
a.UserData = r;
cc._RF.pop();
}, {
"../Data/MAccountData": "MAccountData",
"../Data/MUserData": "MUserData",
"./GTemporary": "GTemporary"
} ],
Utils: [ function(e, t) {
"use strict";
cc._RF.push(t, "0ccccCTtsxOH70N6v511r/a", "Utils");
var a = window.Utils = new (function() {
function e() {}
e.prototype.isToday = function(e) {
return Math.floor(e / 864e5) == Math.floor(new Date().getTime() / 864e5);
};
e.prototype.rgbToHex = function(e, t, a) {
var o = (e << 16 | t << 8 | a).toString(16);
return "#" + new Array(Math.abs(o.length - 7)).join("0") + o;
};
e.prototype.hexToRgb = function(e) {
for (var t = [], a = 1; a < 7; a += 2) t.push(parseInt("0x" + e.slice(a, a + 2)));
return t;
};
e.prototype.getRandom = function(e, t) {
return Math.floor(Math.random() * (t - e)) + e;
};
e.prototype.isNextVideoOrShare = function(e) {
return GTool.isNextRewardVideo(e);
};
e.prototype.getValueByWeight = function(e) {
var t = 0;
e.forEach(function(e) {
t += e;
});
for (var o = a.getRandom(0, t), n = 0, i = 0; i < e.length; i++) if (o < (n += e[i])) return i;
};
return e;
}())();
cc._RF.pop();
}, {} ],
WarehousePopup: [ function(e, t, a) {
"use strict";
cc._RF.push(t, "c8415wKy79CeqRFbo9dLRFB", "WarehousePopup");
var o, n = this && this.__extends || (o = function(e, t) {
return (o = Object.setPrototypeOf || {
__proto__: []
} instanceof Array && function(e, t) {
e.__proto__ = t;
} || function(e, t) {
for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && (e[a] = t[a]);
})(e, t);
}, function(e, t) {
o(e, t);
function a() {
this.constructor = e;
}
e.prototype = null === t ? Object.create(t) : (a.prototype = t.prototype, new a());
}), i = this && this.__decorate || function(e, t, a, o) {
var n, i = arguments.length, r = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, a) : o;
if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, a, o); else for (var s = e.length - 1; s >= 0; s--) (n = e[s]) && (r = (i < 3 ? n(r) : i > 3 ? n(t, a, r) : n(t, a)) || r);
return i > 3 && r && Object.defineProperty(t, a, r), r;
};
Object.defineProperty(a, "__esModule", {
value: !0
});
var r = e("../Base/BasePopup"), s = e("../Config/GConfig"), c = e("../GameLogic"), l = e("../Global/GAd"), d = e("../Global/GBundle"), h = e("../Global/Global"), p = e("../Global/GPool"), u = e("../Global/GTemporary"), f = e("../Global/GTool"), y = e("../Manager/MData"), m = e("../Manager/PopupManager"), g = e("../Part/Mix/Box"), v = e("../Part/Mix/OperatePart"), G = cc._decorator, P = G.ccclass, w = G.property, M = function(e) {
n(t, e);
function t() {
var t = null !== e && e.apply(this, arguments) || this;
t.partPfrfab = null;
t.labelAttack = null;
t.labelDefence = null;
t.labelHealth = null;
t.labelCrit = null;
t.labelDodge = null;
t.labelPower = null;
t.labelPrice = null;
t.btnNext = null;
t.btnLast = null;
t.partsPanel = null;
t.spineMecha = null;
t.picRecycle = null;
t.btnChooseMecha = null;
t.picChosenMecha = null;
t.panelProperty = null;
t.panelUnowned = null;
t.unownedHideNodes = [];
t.unownedGoldNodes = [];
t.unownedDebrisNodes = [];
t.unownedDebris_7Nodes = [];
t.labelUnlockPrice_Gold = null;
t.labelUnlockPrice_Debris = null;
t.labelUnlockPrice_Debris_7 = null;
t.labelVideoTime = null;
t.spriteTarget = null;
t.labelMechaName = null;
t.mixSpine = null;
t.picGuide = null;
t.panelChessboard = null;
t.skillsParent = null;
t.btnAwaken = null;
t.btnTransform = null;
t.box = null;
t.skyBox = null;
t.pricePicGold = null;
t.pricePicDebris = null;
t.pricePicDebris_7 = null;
t.pricePicVideo = null;
t.frameGold = null;
t.frameDebris = null;
t.frameDebris_7 = null;
t.btnOVPVE = null;
t.changeShapeMechas = [ 2, 5 ];
t.currentMechaIndex = 1;
t.buyPrice = 1;
t.buyPartIndex = 1;
t.hasTransformed = !1;
t.skyboxFallTime = 20;
t.canTransform = !0;
t.guide = null;
t.mask = null;
t.btnBuy = null;
t.targetChessboard = null;
t.btnBack = null;
t.guideSetp = 0;
return t;
}
t.prototype.start = function() {
var e = this;
if (GA.Info.isPreview) {
s.GConfig.ServerConfig.SkyBoxInterval = 10;
this.skyboxFallTime = 5;
}
u.GTemporary.needReturnWarehouse = !1;
cc.systemEvent.on(EventsName.CloseWarehouse, function() {
e.hide();
}, this);
u.GTemporary.inWarehousePopup = !0;
if (!GA.Info.isPreview && GA.isWeChat()) {
var t = this.btnAwaken.convertToWorldSpaceAR(cc.v3(200, 0));
l.GAd.showBanner("banner", 0, t.x / f.GTool.Info.DesignPixelRatio);
c.default.instance.showAuthBtn(!1), l.GAd.showOrHideNativeGridsAd([ {
pos: l.AdPos.Main,
show: !1
} ]);
}
p.GPool.initPool(p.EPool.Part, this.partPfrfab);
p.GPool.initPool(p.EPool.MixSpine, this.mixSpine);
p.GPool.initPool(p.EPool.Box, this.box);
this.currentMechaIndex = y.MData.getCurrentMecha();
this.pricePicGold.active = "Gold" == y.MData.getMechaData(this.currentMechaIndex).UnlockWay;
if ("Gold" != y.MData.getMechaData(this.currentMechaIndex).UnlockWay) {
this.pricePicDebris.active = 3 == this.currentMechaIndex;
this.pricePicDebris_7.active = 7 == this.currentMechaIndex;
}
this.checkAndroidVideoBuyPart();
this.frameGold.active = "Gold" == y.MData.getMechaData(this.currentMechaIndex).UnlockWay;
if ("Gold" != y.MData.getMechaData(this.currentMechaIndex).UnlockWay) {
this.frameDebris.active = 3 == this.currentMechaIndex;
this.frameDebris_7.active = 7 == this.currentMechaIndex;
} else {
this.frameDebris.active = !1;
this.frameDebris_7.active = !1;
}
this.btnAwaken.active = 3 != this.currentMechaIndex && 7 != this.currentMechaIndex;
this.frameDebris.active && (this.frameDebris.getComponentInChildren(cc.Label).string = GA.formatNumber(y.MData.getMechaDebris(this.currentMechaIndex)));
if (this.currentMechaIndex == y.MData.getCurrentMecha()) {
this.picChosenMecha.active = !0;
this.btnChooseMecha.active = !1;
} else {
this.picChosenMecha.active = !1;
this.btnChooseMecha.active = !0;
this.btnChooseMecha.getComponent(cc.Button).interactable = y.MData.checkUnlockMecha(this.currentMechaIndex);
}
this.btnTransform.active = this.changeShapeMechas.includes(this.currentMechaIndex);
this.refreshParts(!1);
this.refreshMechaProperty();
cc.systemEvent.on(EventsName.UnlockNewSkill, function() {
e.refreshMechaProperty();
}, this);
this.refreshPrice();
cc.systemEvent.on(EventsName.InstallPart, function(t) {
var a = y.MData.getPartPromoteData(e.currentMechaIndex, t), o = y.MData.getMechaProperty(e.currentMechaIndex);
(a.Attack > 0 || a.Defence > 0) && e.showAddEffect(e.labelPower, o.Health + 12 * o.Attack + 12 * o.Defence, a.Health + 12 * a.Attack + 12 * a.Defence, !1, !0);
if (a.Attack > 0) {
e.showAddEffect(e.labelAttack, o.Attack, a.Attack);
o.Attack += a.Attack;
}
if (a.Defence > 0) {
e.showAddEffect(e.labelDefence, o.Defence, a.Defence);
o.Defence += a.Defence;
}
if (a.Health > 0) {
e.showAddEffect(e.labelHealth, o.Health, a.Health);
o.Health += a.Health;
}
if (a.Crit > 0) {
e.showAddEffect(e.labelCrit, o.Crit, a.Crit, !0);
o.Crit += a.Crit;
}
if (a.Dodge > 0) {
e.showAddEffect(e.labelDodge, o.Dodge, a.Dodge, !0);
o.Dodge += a.Dodge;
}
var n = y.MData.getPartInfo(e.currentMechaIndex, t);
e.spineMecha.setAttachment(n.PicName, n.PicName);
n.AdditionPicName && "" != n.AdditionPicName && e.spineMecha.setAttachment(n.AdditionPicName, n.AdditionPicName);
}, this);
cc.systemEvent.on(EventsName.TouchPartStart, function(t) {
y.MData.checkHavePart(e.currentMechaIndex, t.PartIndex) && (e.picRecycle.active = !0);
if (!y.MData.checkHavePart(e.currentMechaIndex, t.PartIndex)) {
var a = y.MData.getPartInfo(e.currentMechaIndex, t.PartIndex);
e.spineMecha.setAttachment(a.PicName, "3.0/" + a.PicName);
}
}, this);
cc.systemEvent.on(EventsName.TouchPartEnd, function(t) {
e.picRecycle.active = !1;
if (!y.MData.checkHavePart(e.currentMechaIndex, t.PartIndex)) {
var a = y.MData.getPartInfo(e.currentMechaIndex, t.PartIndex);
e.checkHaveOriginPic(a.PicName) ? e.spineMecha.setAttachment(a.PicName, "1.0/" + a.PicName) : e.spineMecha.setAttachment(a.PicName, null);
a.AdditionPicName && "" != a.AdditionPicName && (e.checkHaveOriginPic(a.AdditionPicName) ? e.spineMecha.setAttachment(a.AdditionPicName, "1.0/" + a.AdditionPicName) : e.spineMecha.setAttachment(a.AdditionPicName, null));
}
}, this);
cc.systemEvent.on(EventsName.UnlockMecha, function() {
console.log("解锁了机甲");
e.refreshParts(!1);
e.refreshMechaProperty();
e.btnChooseMecha.getComponent(cc.Button).interactable = !0;
}, this);
var a = cc.v3(this.btnNext.position), o = a.add(cc.v3(20)), n = cc.v3(this.btnLast.position), i = n.add(cc.v3(-20));
cc.tween(this.btnNext).repeatForever(cc.tween().to(.3, {
position: a
}).to(.3, {
position: o
})).start();
cc.tween(this.btnLast).repeatForever(cc.tween().to(.3, {
position: n
}).to(.3, {
position: i
})).start();
if (u.GTemporary.displaySpineMap.has(this.currentMechaIndex)) {
this.spineMecha.skeletonData = u.GTemporary.displaySpineMap.get(this.currentMechaIndex);
h.G.playSpine(this.spineMecha, "standby1", !0, null);
this.showOwnedParts();
this.spineMecha.node.setPosition(u.GTemporary.displaySpineWarehousePos.get(this.currentMechaIndex));
this.spineMecha.node.scale = 7 == this.currentMechaIndex ? .8 : .9;
} else {
var r = "Display/" + this.currentMechaIndex + "/Skeleton";
d.GBundle.GetBundle(d.EBundle.Spines).load(r, sp.SkeletonData, function(t, a) {
if (t) cc.error(t); else {
u.GTemporary.displaySpineMap.set(e.currentMechaIndex, a);
e.spineMecha.skeletonData = a;
h.G.playSpine(e.spineMecha, "standby1", !0, null);
e.spineMecha.node.setPosition(u.GTemporary.displaySpineWarehousePos.get(e.currentMechaIndex));
e.spineMecha.node.scale = 7 == e.currentMechaIndex ? .8 : .9;
e.showOwnedParts();
}
});
}
if (u.GTemporary.isShowingNewGuide) {
cc.systemEvent.on(EventsName.ShowNextNewUserGuide, function() {
if ("Wait" == u.GTemporary.newGuideStepInWarehouse) {
e.guide.active = !1;
cc.Tween.stopAllByTarget(e.picGuide);
e.picGuide.active = !1;
e.schedule(function() {
e.checkShowGuide();
}, 5);
} else e.showNewUserGuide(!1);
}, this);
cc.systemEvent.on(EventsName.FinishGuideInWarehouse, function() {
"Old" == u.GTemporary.newGuideType && e.showNewUserGuide(!0);
}, this);
this.showNewUserGuide(!1);
} else this.schedule(function() {
e.checkShowGuide();
}, 5);
cc.systemEvent.on(EventsName.RefreshPower, function() {
e.refreshMechaProperty();
}, this);
cc.systemEvent.on(EventsName.OpenBox, function(t, a) {
var o = {
PartIndex: a,
Pos: t,
Type: 1
};
y.MData.buyPart(e.currentMechaIndex, o);
var n = p.GPool.getPart(p.EPool.Part);
n.active = !0;
n.setParent(e.partsPanel);
console.log(o);
n.getComponent(v.default).init(o, e.currentMechaIndex);
}, this);
cc.systemEvent.on(EventsName.CheckShowBox, function() {
var t = y.MData.getUnshowedBoxes(), a = y.MData.getOperatePartsLength(e.currentMechaIndex);
if (t.MechaIndex == e.currentMechaIndex && t.Left > 0 && a < 12) for (var o = Math.min(12 - a, t.Left), n = 0; n < o; n++) {
var i = 0;
e: for (var r = 0; r < 12; r++) if (null == y.MData.checkPartPos(e.currentMechaIndex, r)) {
i = r;
break e;
}
var s = {
PartIndex: 1,
Pos: i,
Type: 2
};
y.MData.buyPart(e.currentMechaIndex, s);
var c = p.GPool.getPart(p.EPool.Box);
c.active = !0;
c.setParent(e.partsPanel);
c.getComponent(g.default).init(s, e.currentMechaIndex);
y.MData.showBox();
}
}, this);
cc.systemEvent.emit(EventsName.CheckShowBox);
if (!u.GTemporary.isShowingNewGuide) {
this.skyBox.on(cc.Node.EventType.TOUCH_END, function() {
u.GTemporary.warehouseChoosenMechaIndex = e.currentMechaIndex;
m.PopupManager.show(UIPath.SkyBoxPopup);
}, this);
cc.systemEvent.on(EventsName.GiveUpSkyBox, function() {
cc.Tween.stopAllByTarget(e.skyBox);
e.skyBox.active = !1;
u.GTemporary.skyBoxTimer = 0;
}, this);
this.schedule(function() {
u.GTemporary.skyBoxTimer++;
if (y.MData.getUnshowedBoxes().Left <= 0 && y.MData.getCurrentPartMaxLevel(e.currentMechaIndex) >= 5 && !y.MData.haveNoUnshowedBox() && 3 != e.currentMechaIndex && !e.skyBox.active && u.GTemporary.skyBoxTimer >= s.GConfig.ServerConfig.SkyBoxInterval) {
cc.Tween.stopAllByTarget(e.skyBox);
cc.tween(e.skyBox).set({
position: cc.v3(330, 500),
active: !0
}).by(e.skyboxFallTime, {
y: -1e3
}).set({
active: !1
}).call(function() {
u.GTemporary.skyBoxTimer = 0;
}).start();
}
u.GTemporary.surpriseBoxTimer++;
if (u.GTemporary.surpriseBoxTimer >= s.GConfig.ServerConfig.SurpriseBoxInterval) {
u.GTemporary.surpriseBoxTimer = 0;
var t = !1;
y.MData.getChessboardDatas(e.currentMechaIndex).Parts.forEach(function(e) {
3 == e.Type && (t = !0);
});
y.MData.checkUnlockMecha(e.currentMechaIndex) && "Debris" != y.MData.getMechaData(e.currentMechaIndex).UnlockWay || (t = !0);
if (!t && y.MData.getOperatePartsLength(e.currentMechaIndex) < 12) {
var a = 0;
e: for (var o = 0; o < 12; o++) if (null == y.MData.checkPartPos(e.currentMechaIndex, o)) {
a = o;
break e;
}
var n = {
PartIndex: 1,
Pos: a,
Type: 3
};
y.MData.buyPart(e.currentMechaIndex, n);
var i = p.GPool.getPart(p.EPool.Box);
i.active = !0;
i.setParent(e.partsPanel);
i.getComponent(g.default).init(n, e.currentMechaIndex);
}
}
}, 1);
cc.systemEvent.on(EventsName.OpenSkyBox, function() {
cc.Tween.stopAllByTarget(e.skyBox);
u.GTemporary.skyBoxTimer = 0;
e.skyBox.active = !1;
}, this);
cc.systemEvent.on(EventsName.OpenSurpriseBox, function() {
e.partsPanel.children.forEach(function(t) {
if (t.getComponent(g.default) && 3 == t.getComponent(g.default).info.Type) {
var a = p.GPool.getPart(p.EPool.MixSpine);
a.active = !0;
a.setParent(e.partsPanel);
a.setSiblingIndex(cc.macro.MAX_ZINDEX);
a.setPosition(t.position);
h.G.playSpine(a.getComponent(sp.Skeleton), "animation", !1, function() {
p.GPool.recycle(p.EPool.MixSpine, a);
});
p.GPool.recycle(p.EPool.Box, t);
}
});
y.MData.destroyPart(u.GTemporary.surpriseBoxInfo.MechaIndex, u.GTemporary.surpriseBoxInfo.Pos);
var t = {
PartIndex: u.GTemporary.surpriseBoxInfo.Level,
Pos: u.GTemporary.surpriseBoxInfo.Pos,
Type: 1
};
y.MData.buyPart(e.currentMechaIndex, t);
var a = p.GPool.getPart(p.EPool.Part);
a.active = !0;
a.setParent(e.partsPanel);
a.getComponent(v.default).init(t, e.currentMechaIndex);
}, this);
cc.systemEvent.on(EventsName.GiveUpSurpriseBox, function() {
e.partsPanel.children.forEach(function(e) {
e.getComponent(g.default) && 3 == e.getComponent(g.default).info.Type && p.GPool.recycle(p.EPool.Box, e);
});
y.MData.destroyPart(u.GTemporary.surpriseBoxInfo.MechaIndex, u.GTemporary.surpriseBoxInfo.Pos);
}, this);
}
this.panelProperty.setContentSize(cc.winSize);
this.panelProperty.on(cc.Node.EventType.TOUCH_START, function() {
e.panelProperty.active = !1;
}, this);
cc.systemEvent.on(EventsName.Refresh, function() {
e.frameDebris.active && (e.frameDebris.getComponentInChildren(cc.Label).string = GA.formatNumber(y.MData.getMechaDebris(e.currentMechaIndex)));
e.checkAndroidVideoBuyPart();
}, this);
cc.systemEvent.on(EventsName.RefreshMech3Price, function() {
3 != e.currentMechaIndex && 7 != e.currentMechaIndex || e.refreshPrice();
}, this);
!GA.isVivo() && !GA.isOPPO() || u.GTemporary.isShowingNewGuide || (this.btnOVPVE.active = !0);
};
t.prototype.showOwnedParts = function() {
var e = this;
y.MData.getPartsData(this.currentMechaIndex).forEach(function(t) {
if (1 == t.Status) {
var a = y.MData.getPartInfo(e.currentMechaIndex, t.PartIndex);
e.spineMecha.setAttachment(a.PicName, a.PicName);
a.AdditionPicName && "" != a.AdditionPicName && e.spineMecha.setAttachment(a.AdditionPicName, a.AdditionPicName);
}
});
};
t.prototype.checkHaveOriginPic = function(e) {
var t = this, a = !0;
u.GTemporary.noOriginPicSlot.forEach(function(o, n) {
n == t.currentMechaIndex && (a = !o.includes(e));
});
3 != this.currentMechaIndex && 7 != this.currentMechaIndex || (a = !1);
return a;
};
t.prototype.refreshPrice = function() {
var e = this;
if ("Gold" == y.MData.getMechaData(this.currentMechaIndex).UnlockWay) {
var t = y.MData.getPartMaxLevel(this.currentMechaIndex), a = y.MData.getCurrentPartMaxLevel(this.currentMechaIndex), o = a < t ? a + 1 : t, n = y.MData.getPartInfo(this.currentMechaIndex, o).Price, i = [], r = a > 4 ? a - 4 : 1;
i.push({
PartIndex: r,
Price: Math.round(n / Math.pow(2, o - r)) > 0 ? Math.round(n / Math.pow(2, o - r)) : 1
});
for (var s = r + 1; s < o; s++) {
var c = Math.round(n / Math.pow(2, o - s)) > 0 ? Math.round(n / Math.pow(2, o - s)) : 1;
y.MData.canAffordGold(c) && i.push({
PartIndex: s,
Price: c
});
}
var l = i[GA.rand(0, i.length - 1)];
if (u.GTemporary.isShowingNewGuide || GA.Info.isPreview) {
i.sort(function(e, t) {
return e.PartIndex - t.PartIndex;
});
l = i[i.length - 1];
}
this.buyPrice = l.Price;
this.labelPrice.string = GA.formatNumber(this.buyPrice);
this.buyPartIndex = l.PartIndex;
} else if ("Debris" == y.MData.getMechaData(this.currentMechaIndex).UnlockWay) {
var h = y.MData.getCurrentPartMaxLevel(this.currentMechaIndex), p = y.MData.getPartMaxLevel(this.currentMechaIndex);
l = h == p ? p : h + 1;
this.buyPartIndex = h > 0 ? h : 1;
this.buyPrice = y.MData.getPartInfo(this.currentMechaIndex, l).Price;
this.labelPrice.string = GA.formatNumber(this.buyPrice);
}
var f = "Parts/" + this.currentMechaIndex + "/" + y.MData.getPartInfo(this.currentMechaIndex, this.buyPartIndex).PicName;
"" != f && d.GBundle.GetBundle(d.EBundle.MechaPics).load(f, cc.SpriteFrame, function(t, a) {
if (t) cc.error(t); else {
e.spriteTarget.spriteFrame = a;
if (e.spriteTarget.node.width > 60 || e.spriteTarget.node.height > 60) if (e.spriteTarget.node.width >= 60 && e.spriteTarget.node.height >= 60) if (e.spriteTarget.node.height >= e.spriteTarget.node.width) {
var o = 60 / e.spriteTarget.node.height;
e.spriteTarget.node.height = 60;
e.spriteTarget.node.width = e.spriteTarget.node.width * o;
} else {
o = 60 / e.spriteTarget.node.width;
e.spriteTarget.node.width = 60;
e.spriteTarget.node.height = e.spriteTarget.node.height * o;
} else if (e.spriteTarget.node.width >= 60 && e.spriteTarget.node.height < 60) {
o = 60 / e.spriteTarget.node.width;
e.spriteTarget.node.width = 60;
e.spriteTarget.node.height = e.spriteTarget.node.height * o;
} else if (e.spriteTarget.node.width < 60 && e.spriteTarget.node.height >= 60) {
o = 60 / e.spriteTarget.node.height;
e.spriteTarget.node.height = 60;
e.spriteTarget.node.width = e.spriteTarget.node.width * o;
}
}
});
};
t.prototype.buyPart = function() {
f.GTool.sendBtnEvent("购买");
if (u.GTemporary.isShowingNewGuide && "Buy" == u.GTemporary.newGuideStepInWarehouse) {
AudioManager.playEffect(AudioName.BtnClick);
y.MData.addGold(-this.buyPrice);
var e = 0;
e: for (var t = 0; t < 12; t++) if (null == y.MData.checkPartPos(this.currentMechaIndex, t)) {
e = t;
break e;
}
var a = {
PartIndex: this.buyPartIndex,
Pos: e,
Type: 1
};
y.MData.buyPart(this.currentMechaIndex, a);
(o = p.GPool.getPart(p.EPool.Part)).active = !0;
o.setParent(this.partsPanel);
o.getComponent(v.default).init(a, this.currentMechaIndex);
this.refreshPrice();
this.showNewUserGuide(!1);
} else {
this.checkAndroidVideoBuyPart();
if (12 == y.MData.getOperatePartsLength(this.currentMechaIndex)) {
AudioManager.playEffect(AudioName.BtnCantClick);
f.GTool.showToast("没有多余位置");
} else {
if ("Gold" == y.MData.getMechaData(this.currentMechaIndex).UnlockWay) {
if (!y.MData.canAffordGold(this.buyPrice)) {
if (GA.isAndroid()) this.buyPartByVideoInAndroid(); else {
AudioManager.playEffect(AudioName.BtnCantClick);
y.MData.checkShowShareAddGoldPopup() ? f.GTool.showToast("金币不足") : m.PopupManager.show(UIPath.AddGoldPopup);
f.GTool.sendBtnEvent("购买金币不足");
}
return;
}
AudioManager.playEffect(AudioName.BtnClick);
y.MData.addGold(-this.buyPrice);
} else if ("Debris" == y.MData.getMechaData(this.currentMechaIndex).UnlockWay) {
if (!y.MData.canAffordDebris(this.currentMechaIndex, this.buyPrice)) {
if (GA.isAndroid()) this.buyPartByVideoInAndroid(); else {
AudioManager.playEffect(AudioName.BtnCantClick);
m.PopupManager.show(UIPath.DrawPopup);
f.GTool.sendBtnEvent("购买碎片不足");
}
return;
}
AudioManager.playEffect(AudioName.BtnClick);
y.MData.addDebris(this.currentMechaIndex, -this.buyPrice);
}
y.MData.finishTask("BuyPart");
e = 0;
e: for (t = 0; t < 12; t++) if (null == y.MData.checkPartPos(this.currentMechaIndex, t)) {
e = t;
break e;
}
var o;
a = {
PartIndex: this.buyPartIndex,
Pos: e,
Type: 1
};
y.MData.buyPart(this.currentMechaIndex, a);
(o = p.GPool.getPart(p.EPool.Part)).active = !0;
o.setParent(this.partsPanel);
o.getComponent(v.default).init(a, this.currentMechaIndex);
this.refreshPrice();
}
}
};
t.prototype.refreshParts = function(e) {
var t = this;
if (e) {
for (var a = this.partsPanel.childrenCount - 1; a >= 0; a--) null != this.partsPanel.children[a].getComponent(v.default) ? p.GPool.recycle(p.EPool.Part, this.partsPanel.children[a]) : p.GPool.recycle(p.EPool.Box, this.partsPanel.children[a]);
this.refreshPrice();
}
if (y.MData.checkUnlockMecha(this.currentMechaIndex)) {
y.MData.getOperateParts().forEach(function(e) {
e.MechaIndex == t.currentMechaIndex && e.Parts.forEach(function(e) {
if (1 == e.Type) {
var a = p.GPool.getPart(p.EPool.Part);
a.active = !0;
a.setParent(t.partsPanel);
a.getComponent(v.default).init(e, t.currentMechaIndex);
} else {
var o = p.GPool.getPart(p.EPool.Box);
o.active = !0;
o.setParent(t.partsPanel);
o.getComponent(g.default).init(e, t.currentMechaIndex, !1);
}
});
});
this.unownedHideNodes.forEach(function(e) {
e.active = !0;
});
this.panelUnowned.active = !1;
if (this.currentMechaIndex == y.MData.getCurrentMecha()) {
this.picChosenMecha.active = !0;
this.btnChooseMecha.active = !1;
} else {
this.picChosenMecha.active = !1;
this.btnChooseMecha.active = !0;
this.btnChooseMecha.getComponent(cc.Button).interactable = y.MData.checkUnlockMecha(this.currentMechaIndex);
}
} else {
var o = y.MData.getMechaData(this.currentMechaIndex);
this.panelUnowned.active = !0;
this.unownedHideNodes.forEach(function(e) {
e.active = !1;
});
this.unownedGoldNodes.forEach(function(e) {
e.active = "Gold" == o.UnlockWay;
});
if ("Debris" == o.UnlockWay) {
this.unownedDebrisNodes.forEach(function(e) {
e.active = 3 == t.currentMechaIndex;
});
this.unownedDebris_7Nodes.forEach(function(e) {
e.active = 7 == t.currentMechaIndex;
});
} else {
this.unownedDebrisNodes.forEach(function(e) {
e.active = !1;
});
this.unownedDebris_7Nodes.forEach(function(e) {
e.active = !1;
});
}
if ("Gold" == o.UnlockWay) {
this.labelUnlockPrice_Gold.string = GA.formatNumber(y.MData.getUnlockPrice(this.currentMechaIndex));
this.labelVideoTime.string = y.MData.getVideoUnlockTime(this.currentMechaIndex).toString() + "/" + y.MData.getVideoUnlockMaxTime(this.currentMechaIndex).toString();
} else 3 == this.currentMechaIndex ? this.labelUnlockPrice_Debris.string = o.UnlockNumber.toString() : this.labelUnlockPrice_Debris_7.string = o.UnlockNumber.toString();
}
};
t.prototype.refreshMechaProperty = function() {
var e = this;
u.GTemporary.mechaProperties.forEach(function(t) {
if (t.MechaIndex == e.currentMechaIndex) {
e.labelAttack.string = Math.round(t.Attack).toString();
e.labelDefence.string = Math.round(t.Defence).toString();
e.labelHealth.string = Math.round(t.Health).toString();
e.labelCrit.string = Math.round(t.Crit).toString() + "%";
e.labelDodge.string = Math.round(t.Dodge).toString() + "%";
e.labelPower.string = Math.round(t.Health + 12 * t.Attack + 12 * t.Defence).toString();
}
});
var t = y.MData.getMechaData(this.currentMechaIndex);
"Chinese" == u.GTemporary.languageVersion ? this.labelMechaName.string = t.Name : this.labelMechaName.string = f.GTool.getLanguage(t.Name);
this.skillsParent.children.forEach(function(t, a) {
t.getChildByName("Lock").active = !y.MData.checkUnlockSkill(e.currentMechaIndex, a);
var o = "Skill/" + e.currentMechaIndex + "_" + a;
d.GBundle.GetBundle(d.EBundle.MechaPics).load(o, cc.SpriteFrame, function(a, o) {
a ? cc.error(a) : e.node && t && (t.getComponentInChildren(cc.Sprite).spriteFrame = o);
});
});
this.btnAwaken.getChildByName("Lock").active = !y.MData.checkUnlockSkill(this.currentMechaIndex, 5);
};
t.prototype.showAddEffect = function(e, t, a, o, n, i, r, s) {
void 0 === n && (n = !1);
void 0 === i && (i = .5);
void 0 === r && (r = .01);
void 0 === s && (s = 50);
this.schedule(function() {
t += r / i * a;
e.string = n ? Math.round(t).toString() : o ? GA.formatNumber(Math.round(t)) + "%" : GA.formatNumber(Math.round(t));
}, r, s - 1);
};
t.prototype.clickChangeMecha = function(e, t) {
var a = this;
this.canTransform = !0;
f.GTool.sendBtnEvent("切换机甲");
AudioManager.playEffect(AudioName.BtnClick);
0 == y.MData.allMecha.indexOf(this.currentMechaIndex) && -1 == parseInt(t) ? this.currentMechaIndex = y.MData.allMecha[y.MData.allMecha.length - 1] : y.MData.allMecha.indexOf(this.currentMechaIndex) == y.MData.allMecha.length - 1 && 1 == parseInt(t) ? this.currentMechaIndex = y.MData.allMecha[0] : this.currentMechaIndex = y.MData.allMecha[y.MData.allMecha.indexOf(this.currentMechaIndex) + parseInt(t)];
this.pricePicGold.active = "Gold" == y.MData.getMechaData(this.currentMechaIndex).UnlockWay;
if ("Gold" != y.MData.getMechaData(this.currentMechaIndex).UnlockWay) {
this.pricePicDebris.active = 3 == this.currentMechaIndex;
this.pricePicDebris_7.active = 7 == this.currentMechaIndex;
}
this.checkAndroidVideoBuyPart();
this.frameGold.active = "Gold" == y.MData.getMechaData(this.currentMechaIndex).UnlockWay;
if ("Gold" != y.MData.getMechaData(this.currentMechaIndex).UnlockWay) {
this.frameDebris.active = 3 == this.currentMechaIndex;
this.frameDebris_7.active = 7 == this.currentMechaIndex;
} else {
this.frameDebris.active = !1;
this.frameDebris_7.active = !1;
}
if (u.GTemporary.skyBoxTimer >= s.GConfig.ServerConfig.SkyBoxInterval && y.MData.getUnshowedBoxes().Left <= 0 && y.MData.getCurrentPartMaxLevel(this.currentMechaIndex) >= 5 && !y.MData.haveNoUnshowedBox() && 3 != this.currentMechaIndex) {
this.skyBox.active = !0;
cc.Tween.stopAllByTarget(this.skyBox);
cc.tween(this.skyBox).set({
position: cc.v3(300, 500)
}).by(this.skyboxFallTime, {
y: -1e3
}).set({
active: !1
}).call(function() {
u.GTemporary.skyBoxTimer = 0;
}).start();
} else {
this.skyBox.active = !1;
cc.Tween.stopAllByTarget(this.skyBox);
}
this.btnAwaken.active = 3 != this.currentMechaIndex && 7 != this.currentMechaIndex;
this.frameDebris.active && (this.frameDebris.getComponentInChildren(cc.Label).string = GA.formatNumber(y.MData.getMechaDebris(this.currentMechaIndex)));
this.refreshParts(!0);
this.refreshMechaProperty();
if (this.currentMechaIndex == y.MData.getCurrentMecha()) {
this.picChosenMecha.active = !0;
this.btnChooseMecha.active = !1;
} else {
this.picChosenMecha.active = !1;
this.btnChooseMecha.active = !0;
this.btnChooseMecha.getComponent(cc.Button).interactable = y.MData.checkUnlockMecha(this.currentMechaIndex);
}
this.btnTransform.active = this.changeShapeMechas.includes(this.currentMechaIndex);
this.hasTransformed = !1;
this.refreshPrice();
this.spineMecha.node.active = !0;
if (u.GTemporary.displaySpineMap.has(this.currentMechaIndex)) {
this.spineMecha.skeletonData = u.GTemporary.displaySpineMap.get(this.currentMechaIndex);
h.G.playSpine(this.spineMecha, "standby1", !0, null);
this.showOwnedParts();
this.spineMecha.node.setPosition(u.GTemporary.displaySpineWarehousePos.get(this.currentMechaIndex));
this.spineMecha.node.scale = 7 == this.currentMechaIndex ? .8 : .9;
} else {
this.spineMecha.skeletonData = null;
var o = this.currentMechaIndex, n = "Display/" + o + "/Skeleton";
d.GBundle.GetBundle(d.EBundle.Spines).load(n, sp.SkeletonData, function(e, t) {
if (e) cc.error(e); else {
u.GTemporary.displaySpineMap.set(o, t);
a.spineMecha.skeletonData = t;
h.G.playSpine(a.spineMecha, "standby1", !0, null);
a.spineMecha.node.setPosition(u.GTemporary.displaySpineWarehousePos.get(o));
a.spineMecha.node.scale = 7 == a.currentMechaIndex ? .8 : .9;
a.showOwnedParts();
}
});
}
cc.systemEvent.emit(EventsName.CheckShowBox);
y.MData.save(!1);
};
t.prototype.clickUpgrade = function() {
if (y.MData.getMechaProperty(this.currentMechaIndex).Level >= y.MData.getMechaData(this.currentMechaIndex).MaxLevel) f.GTool.showToast("已升级至最高等级"); else {
f.GTool.sendBtnEvent("打开升级弹窗");
AudioManager.playEffect(AudioName.BtnClick);
u.GTemporary.warehouseChoosenMechaIndex = this.currentMechaIndex;
m.PopupManager.show(UIPath.UpgradePopup);
}
};
t.prototype.clickChooseMecha = function() {
f.GTool.sendBtnEvent("选择机甲");
AudioManager.playEffect(AudioName.BtnClick);
y.MData.setChosenMecha(this.currentMechaIndex);
this.picChosenMecha.active = !0;
this.btnChooseMecha.active = !1;
};
t.prototype.clickShowProperty = function() {
f.GTool.sendBtnEvent("查看完整属性");
AudioManager.playEffect(AudioName.BtnClick);
this.panelProperty.active = !this.panelProperty.active;
};
t.prototype.clickUnlockMechaByGold = function() {
for (var e = y.MData.allMecha.indexOf(this.currentMechaIndex), t = !0, a = 1; a < e; a++) y.MData.checkUnlockMecha(y.MData.allMecha[a]) || (t = !1);
if (t) {
AudioManager.playEffect(AudioName.BtnClick);
var o = y.MData.getUnlockPrice(this.currentMechaIndex);
if (y.MData.canAffordGold(o)) {
y.MData.addGold(-o);
y.MData.unlockMecha(this.currentMechaIndex);
f.GTool.sentLogs([ {
eventId: "解锁机甲",
detail: JSON.stringify({
Index: this.currentMechaIndex
})
} ]);
this.refreshParts(!1);
this.refreshMechaProperty();
f.GTool.sendBtnEvent("金币解锁机甲");
this.picChosenMecha.active = !1;
this.btnChooseMecha.active = !0;
this.btnChooseMecha.getComponent(cc.Button).interactable = !0;
} else {
f.GTool.showToast("金币不足");
f.GTool.sendBtnEvent("金币不足解锁机甲");
}
} else f.GTool.showToast("请先解锁前面的机甲");
};
t.prototype.clickUnlockMechaByDebris = function() {
for (var e = y.MData.allMecha.indexOf(this.currentMechaIndex), t = !0, a = 1; a < e; a++) y.MData.checkUnlockMecha(y.MData.allMecha[a]) || (t = !1);
7 == this.currentMechaIndex && (t = !0);
if (t) {
AudioManager.playEffect(AudioName.BtnClick);
var o = y.MData.getUnlockPrice(this.currentMechaIndex);
if (y.MData.canAffordDebris(this.currentMechaIndex, o)) {
y.MData.addDebris(this.currentMechaIndex, -o);
y.MData.unlockMecha(this.currentMechaIndex);
f.GTool.sentLogs([ {
eventId: "解锁机甲",
detail: JSON.stringify({
Index: this.currentMechaIndex
})
} ]);
this.refreshParts(!1);
this.refreshMechaProperty();
f.GTool.sendBtnEvent("碎片解锁机甲");
this.picChosenMecha.active = !1;
this.btnChooseMecha.active = !0;
this.btnChooseMecha.getComponent(cc.Button).interactable = !0;
} else {
m.PopupManager.show(UIPath.DrawPopup);
f.GTool.sendBtnEvent("碎片不足解锁机甲");
}
} else f.GTool.showToast("请先解锁前面的机甲");
};
t.prototype.clickUnlockMechaByVideo = function() {
for (var e = this, t = y.MData.allMecha.indexOf(this.currentMechaIndex), a = !0, o = 1; o < t; o++) y.MData.checkUnlockMecha(y.MData.allMecha[o]) || (a = !1);
if (a) {
f.GTool.sendBtnEvent("视频解锁" + this.currentMechaIndex);
GA.rewardOperation({
tag: RewardType.UnlockMecha,
byVideo: f.GTool.isNextRewardVideo(RewardType.UnlockMecha),
page: "Warehouse",
result: function(t) {
if (t.reward) {
y.MData.addVideoUnlockTime(e.currentMechaIndex);
e.refreshParts(!1);
}
}
});
} else f.GTool.showToast("请先解锁前面的机甲");
};
t.prototype.clickSkill = function(e, t) {
f.GTool.sendBtnEvent("点击技能介绍");
AudioManager.playEffect(AudioName.BtnClick);
u.GTemporary.chosenMechaIndex = this.currentMechaIndex;
u.GTemporary.chosenSkillIndex = parseInt(t);
m.PopupManager.show(UIPath.InfoPopup);
};
t.prototype.clickPVE = function() {
this.hide();
m.PopupManager.show(UIPath.CheckPointPopup);
};
t.prototype.clickTransform = function() {
var e = this;
f.GTool.sendBtnEvent("点击切换形态");
if (this.canTransform) {
this.hasTransformed ? this.playSpine(this.spineMecha, "transform1", !1, function() {
e.canTransform = !0;
h.G.playSpine(e.spineMecha, "standby1", !0, null);
}, !0) : h.G.playSpine(this.spineMecha, "transform1", !1, function() {
e.canTransform = !0;
h.G.playSpine(e.spineMecha, "standby2", !0, null);
});
this.hasTransformed = !this.hasTransformed;
this.canTransform = !1;
}
};
t.prototype.clickClose = function() {
GA.isWeChat() && !GA.Info.isPreview && l.GAd.hideBanner("banner");
f.GTool.sendBtnEvent("关闭仓库弹窗");
if (u.GTemporary.isShowingNewGuide) {
u.GTemporary.newGuideStepInWarehouse = "Finish";
console.log("仓库的新手引导结束了");
"New" == u.GTemporary.newGuideType && (u.GTemporary.isShowingNewGuide = !1);
f.GTool.sentLogs([ {
eventId: "Old" == u.GTemporary.newGuideType ? "旧版新手引导" : "新手引导",
detail: JSON.stringify({
Pos: "仓库结束"
})
} ]);
}
AudioManager.playEffect(AudioName.BtnClose);
this.hide();
c.default.instance.showMain(!0);
};
t.prototype.checkShowGuide = function() {
var e = y.MData.getChessboardDatas(this.currentMechaIndex);
e.Parts.sort(function(e, t) {
return e.Pos - t.Pos;
});
var t = -1;
e: for (var a = 0; a < e.Parts.length; a++) if (!y.MData.checkUnlockPart(this.currentMechaIndex, e.Parts[a].PartIndex) && 1 == e.Parts[a].Type) {
t = e.Parts[a].Pos;
break e;
}
if (-1 != t) {
var o = this.panelChessboard.children[t].convertToWorldSpaceAR(cc.v3()), n = this.picGuide.parent.convertToNodeSpaceAR(o).addSelf(cc.v3(0, -40));
cc.Tween.stopAllByTarget(this.picGuide);
cc.tween(this.picGuide).set({
active: !0,
position: n,
scale: 1
}).delay(.3).to(1.5, {
position: this.spineMecha.node.position.addSelf(cc.v3(0, 200))
}).delay(.3).set({
active: !1
}).start();
}
};
t.prototype.onDestroy = function() {
y.MData.save(!1);
u.GTemporary.inWarehousePopup = !1;
this.unscheduleAllCallbacks();
p.GPool.destroyPool(p.EPool.Part);
p.GPool.destroyPool(p.EPool.MixSpine);
p.GPool.destroyPool(p.EPool.Box);
};
t.prototype.showNewUserGuide = function(e) {
if (e) {
this.guide.active = !0;
this.mask.setPosition(this.btnBack.position);
this.mask.setContentSize(100, 100);
this.mask.getComponentInChildren(cc.Widget).updateAlignment();
var t = this.btnBack.position.addSelf(cc.v3(40, -60));
cc.tween(this.picGuide).set({
active: !0,
position: t
}).repeatForever(cc.tween().to(.5, {
scale: 1.4
}).to(.5, {
scale: 1
})).start();
} else {
this.guideSetp++;
cc.Tween.stopAllByTarget(this.picGuide);
this.picGuide.active = !1;
console.log("GuideStep", this.guideSetp);
switch (this.guideSetp) {
case 1:
case 3:
u.GTemporary.newGuideStepInWarehouse = "Buy";
this.guide.active = !0;
this.mask.setPosition(this.btnBuy.position);
this.mask.getComponentInChildren(cc.Widget).updateAlignment();
t = this.btnBuy.position.addSelf(cc.v3(80, -60));
cc.tween(this.picGuide).set({
active: !0,
position: t
}).repeatForever(cc.tween().to(.5, {
scale: 1.4
}).to(.5, {
scale: 1
})).start();
break;

case 2:
u.GTemporary.newGuideStepInWarehouse = "Move";
this.guide.active = !1;
var a = y.MData.getChessboardDatas(this.currentMechaIndex);
a.Parts.sort(function(e, t) {
return e.Pos - t.Pos;
});
var o = -1;
e: for (var n = 0; n < a.Parts.length; n++) if (!y.MData.checkUnlockPart(this.currentMechaIndex, a.Parts[n].PartIndex)) {
o = a.Parts[n].Pos;
break e;
}
if (-1 != o) {
var i = this.panelChessboard.children[o].convertToWorldSpaceAR(cc.v3()), r = this.picGuide.parent.convertToNodeSpaceAR(i).addSelf(cc.v3(0, -40));
cc.tween(this.picGuide).set({
active: !0,
scale: 1
}).repeatForever(cc.tween().set({
active: !0,
position: r
}).delay(.3).to(1.5, {
position: this.spineMecha.node.position.addSelf(cc.v3(150, 50))
}).delay(.3)).start();
}
break;

case 4:
u.GTemporary.newGuideStepInWarehouse = "Compound";
this.guide.active = !0;
var s = this.main.convertToNodeSpaceAR(this.targetChessboard.convertToWorldSpaceAR(cc.v3()).addSelf(cc.v3(55, 0, 0)));
this.mask.setPosition(s);
this.mask.getComponentInChildren(cc.Widget).updateAlignment();
var c = this.mask.position.addSelf(cc.v3(-60, -50)), l = this.mask.position.addSelf(cc.v3(100, -50));
cc.tween(this.picGuide).set({
active: !0,
scale: 1
}).repeatForever(cc.tween().set({
position: c
}).to(1, {
position: l
}).delay(.5)).start();
}
}
};
t.prototype.playSpine = function(e, t, a, o, n) {
var i = e.setAnimation(0, t, a);
if (n) {
var r = e.getCurrent(0);
r.trackTime = r.animationEnd;
e.timeScale = -1;
this.scheduleOnce(function() {
o();
}, r.animationEnd);
} else e.timeScale = 1;
i && o && !n && e.setCompleteListener(function(e) {
(e.animation ? e.animation.name : "") === t && o();
});
};
t.prototype.checkAndroidVideoBuyPart = function() {
if (GA.isAndroid()) if (12 == y.MData.getOperatePartsLength(this.currentMechaIndex)) {
this.pricePicGold.active = "Gold" == y.MData.getMechaData(this.currentMechaIndex).UnlockWay;
if ("Gold" != y.MData.getMechaData(this.currentMechaIndex).UnlockWay) {
this.pricePicDebris.active = 3 == this.currentMechaIndex;
this.pricePicDebris_7.active = 7 == this.currentMechaIndex;
}
this.pricePicVideo.active = !1;
} else if ("Gold" == y.MData.getMechaData(this.currentMechaIndex).UnlockWay ? y.MData.canAffordGold(this.buyPrice) : y.MData.canAffordDebris(this.currentMechaIndex, this.buyPrice)) {
this.pricePicGold.active = "Gold" == y.MData.getMechaData(this.currentMechaIndex).UnlockWay;
if ("Gold" != y.MData.getMechaData(this.currentMechaIndex).UnlockWay) {
this.pricePicDebris.active = 3 == this.currentMechaIndex;
this.pricePicDebris_7.active = 7 == this.currentMechaIndex;
}
this.pricePicVideo.active = !1;
} else {
this.pricePicGold.active = !1;
this.pricePicDebris.active = !1;
this.pricePicDebris_7.active = !1;
this.pricePicVideo.active = !0;
}
};
t.prototype.buyPartByVideoInAndroid = function() {
var e = this;
GA.isAndroid() && GA.rewardOperation({
tag: "BuyPart",
byVideo: !0,
page: "Warehouse",
result: function(t) {
if (t.reward) {
y.MData.finishTask("BuyPart");
var a = 0;
e: for (var o = 0; o < 12; o++) if (null == y.MData.checkPartPos(e.currentMechaIndex, o)) {
a = o;
break e;
}
var n = {
PartIndex: y.MData.getCurrentPartMaxLevel(e.currentMechaIndex),
Pos: a,
Type: 1
};
y.MData.buyPart(e.currentMechaIndex, n);
var i = p.GPool.getPart(p.EPool.Part);
i.active = !0;
i.setParent(e.partsPanel);
i.getComponent(v.default).init(n, e.currentMechaIndex);
e.refreshPrice();
}
}
});
};
i([ w(cc.Node) ], t.prototype, "partPfrfab", void 0);
i([ w(cc.Label) ], t.prototype, "labelAttack", void 0);
i([ w(cc.Label) ], t.prototype, "labelDefence", void 0);
i([ w(cc.Label) ], t.prototype, "labelHealth", void 0);
i([ w(cc.Label) ], t.prototype, "labelCrit", void 0);
i([ w(cc.Label) ], t.prototype, "labelDodge", void 0);
i([ w(cc.Label) ], t.prototype, "labelPower", void 0);
i([ w(cc.Label) ], t.prototype, "labelPrice", void 0);
i([ w(cc.Node) ], t.prototype, "btnNext", void 0);
i([ w(cc.Node) ], t.prototype, "btnLast", void 0);
i([ w(cc.Node) ], t.prototype, "partsPanel", void 0);
i([ w(sp.Skeleton) ], t.prototype, "spineMecha", void 0);
i([ w(cc.Node) ], t.prototype, "picRecycle", void 0);
i([ w(cc.Node) ], t.prototype, "btnChooseMecha", void 0);
i([ w(cc.Node) ], t.prototype, "picChosenMecha", void 0);
i([ w(cc.Node) ], t.prototype, "panelProperty", void 0);
i([ w(cc.Node) ], t.prototype, "panelUnowned", void 0);
i([ w(cc.Node) ], t.prototype, "unownedHideNodes", void 0);
i([ w(cc.Node) ], t.prototype, "unownedGoldNodes", void 0);
i([ w(cc.Node) ], t.prototype, "unownedDebrisNodes", void 0);
i([ w(cc.Node) ], t.prototype, "unownedDebris_7Nodes", void 0);
i([ w(cc.Label) ], t.prototype, "labelUnlockPrice_Gold", void 0);
i([ w(cc.Label) ], t.prototype, "labelUnlockPrice_Debris", void 0);
i([ w(cc.Label) ], t.prototype, "labelUnlockPrice_Debris_7", void 0);
i([ w(cc.Label) ], t.prototype, "labelVideoTime", void 0);
i([ w(cc.Sprite) ], t.prototype, "spriteTarget", void 0);
i([ w(cc.Label) ], t.prototype, "labelMechaName", void 0);
i([ w(cc.Node) ], t.prototype, "mixSpine", void 0);
i([ w(cc.Node) ], t.prototype, "picGuide", void 0);
i([ w(cc.Node) ], t.prototype, "panelChessboard", void 0);
i([ w(cc.Node) ], t.prototype, "skillsParent", void 0);
i([ w(cc.Node) ], t.prototype, "btnAwaken", void 0);
i([ w(cc.Node) ], t.prototype, "btnTransform", void 0);
i([ w(cc.Node) ], t.prototype, "box", void 0);
i([ w(cc.Node) ], t.prototype, "skyBox", void 0);
i([ w(cc.Node) ], t.prototype, "pricePicGold", void 0);
i([ w(cc.Node) ], t.prototype, "pricePicDebris", void 0);
i([ w(cc.Node) ], t.prototype, "pricePicDebris_7", void 0);
i([ w(cc.Node) ], t.prototype, "pricePicVideo", void 0);
i([ w(cc.Node) ], t.prototype, "frameGold", void 0);
i([ w(cc.Node) ], t.prototype, "frameDebris", void 0);
i([ w(cc.Node) ], t.prototype, "frameDebris_7", void 0);
i([ w(cc.Node) ], t.prototype, "btnOVPVE", void 0);
i([ w(cc.Node) ], t.prototype, "guide", void 0);
i([ w(cc.Node) ], t.prototype, "mask", void 0);
i([ w(cc.Node) ], t.prototype, "btnBuy", void 0);
i([ w(cc.Node) ], t.prototype, "targetChessboard", void 0);
i([ w(cc.Node) ], t.prototype, "btnBack", void 0);
return i([ P ], t);
}(r.default);
a.default = M;
cc._RF.pop();
}, {
"../Base/BasePopup": "BasePopup",
"../Config/GConfig": "GConfig",
"../GameLogic": "GameLogic",
"../Global/GAd": "GAd",
"../Global/GBundle": "GBundle",
"../Global/GPool": "GPool",
"../Global/GTemporary": "GTemporary",
"../Global/GTool": "GTool",
"../Global/Global": "Global",
"../Manager/MData": "MData",
"../Manager/PopupManager": "PopupManager",
"../Part/Mix/Box": "Box",
"../Part/Mix/OperatePart": "OperatePart"
} ]
}, {}, [ "BaseMecha", "BaseModel", "BasePanel", "BasePart", "BasePopup", "ActionCollect", "AdjustBG", "BottomLine", "Multisource", "RewardChange", "TopWidget", "AudioName", "Enum", "EventsName", "ExcelData", "GConfig", "RewardType", "UIPath", "Urls", "Utils", "MAccountData", "MUserData", "GameLogic", "GAd", "GBundle", "GPool", "GTemporary", "GTool", "Global", "UserData", "IPartInfo", "ITable", "Interface", "AudioManager", "LoadingManager", "MData", "PopupManager", "PanelPause", "PanelProperty", "PanelRestrain", "PanelRound", "PanelSkill", "CheckPoint", "HorizontalScrollN", "LabelDebris", "LabelDiamond", "LabelGold", "LightCircle", "Box", "OperatePart", "RankItem", "Mecha", "AddGoldPopup", "BankPopup", "CheckPointPopup", "DailyGiftPopup", "DrawPopup", "FightPopup", "GainPopup", "InfoPopup", "MainPopup", "MatchPopup", "MatrixGridPopup", "NewPartPopup", "RankFinishRewardPopup", "RankHistoryPopup", "RankListPopup", "RankPopup", "RankResultPopup", "RankRewardPopup", "RankShopPopup", "RestrainPopup", "ResultPopup", "SetPopup", "ShareAddGoldPopup", "SharePopup", "SignInPopup", "SkyBoxPopup", "SurpriseBoxPopup", "TaskPopup", "TryoutPopup", "UpgradePopup", "WarehousePopup", "TestItem", "TestScrollview" ]);